Skip to content

Commit

Permalink
Apps can access GLOBALS() now
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Feb 25, 2024
1 parent 8af33af commit 18fe735
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions src/runtimePipelineYazzUiMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@
},


// helper fns
// SQL helper fns
sqlQuery: async function ( sql , params ) {
let mm = this
console.log("Called sqlQuery:")
Expand All @@ -1433,7 +1433,10 @@
},

// helper fns
isValidObject: function ( ) {
GLOBALS: function ( ) {
return window.GLOBALS
},
isValidObject: function ( ) {
return window.isValidObject
},
getEditor: function ( ) {
Expand Down
16 changes: 8 additions & 8 deletions src/runtimePipelineYazzUiTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
<pre style="height:80%;width:100%;overflow:scroll;padding: 5px;background-color:lightgray;">
{{debug_component_code_id?GLOBALS.getCodeForComponent({codeId: debug_component_code_id}):""}}
{{debug_component_code_id?GLOBALS().getCodeForComponent({codeId: debug_component_code_id}):""}}
</pre>
</div>
Expand Down Expand Up @@ -340,7 +340,7 @@
v-bind:select_design_time_component='childSelectComponent'
v-bind:children='getChildren( model.forms[active_form].components[active_component_detail_index].name)'
v-on:send="processControlEvent"
v-bind:is='model.forms[active_form].components[active_component_detail_index].code_id?model.forms[active_form].components[active_component_detail_index].code_id:GLOBALS.baseComponentIdReturnsCommitId[model.forms[active_form].components[active_component_detail_index].base_component_id]'
v-bind:is='model.forms[active_form].components[active_component_detail_index].code_id?model.forms[active_form].components[active_component_detail_index].code_id:GLOBALS().baseComponentIdReturnsCommitId[model.forms[active_form].components[active_component_detail_index].base_component_id]'
v-bind:name='model.forms[active_form].components[active_component_detail_index].name + "_design_mode_" + design_mode'
v-bind:props='model.forms[active_form].components[active_component_detail_index]'
v-if='model.forms[active_form].components[active_component_detail_index]'
Expand All @@ -360,7 +360,7 @@
v-bind:style='"z-index:100000;position: relative; top: " + child_item.topY + "px; left: " + child_item.leftX + "px;height:" + child_item.height + "px;width:" + child_item.width + "px;overflow:auto;"'
v-bind:id='active_form + "_" + model.forms[active_form].components[child_item.index_in_parent_array].name + (design_mode?"_design":"")'
v-on:send="processControlEvent"
v-bind:is='child_item.code_id?child_item.code_id:GLOBALS.baseComponentIdReturnsCommitId[child_item.base_component_id]'
v-bind:is='child_item.code_id?child_item.code_id:GLOBALS().baseComponentIdReturnsCommitId[child_item.base_component_id]'
v-bind:name='child_item.name + "_design_mode_" + design_mode'
v-bind:properties='model.forms[active_form].components[child_item.index_in_parent_array]'
v-if='model.forms[active_form].components[child_item.index_in_parent_array]'
Expand Down Expand Up @@ -2003,7 +2003,7 @@ Pushlist
v-bind:design_mode='design_mode'
v-bind:children='getChildren(item.name)'
v-on:send="processControlEvent"
v-bind:is='item.code_id?item.code_id:GLOBALS.baseComponentIdReturnsCommitId[item.base_component_id]'
v-bind:is='item.code_id?item.code_id:GLOBALS().baseComponentIdReturnsCommitId[item.base_component_id]'
v-if='!item.parent && model.forms[formName].components[index]'
v-bind:name='item.name + "_design_mode_" + design_mode'
v-bind:properties='model.forms[formName].components[index]'
Expand All @@ -2024,7 +2024,7 @@ Pushlist
v-bind:style='(formName==active_form)?"z-index:100000;position: absolute; top: " + child_item.topY + "px; left: " + child_item.leftX + "px;height:" + child_item.height + "px;width:" + child_item.width + "px;overflow:auto;":"display:none;"'
v-bind:id='formName + "_" + model.forms[formName].components[child_item.index_in_parent_array].name + (design_mode?"_design":"")'
v-on:send="processControlEvent"
v-bind:is='child_item.code_id?child_item.code_id:GLOBALS.baseComponentIdReturnsCommitId[child_item.base_component_id]'
v-bind:is='child_item.code_id?child_item.code_id:GLOBALS().baseComponentIdReturnsCommitId[child_item.base_component_id]'
v-bind:name='child_item.name + "_design_mode_" + design_mode'
v-bind:properties='model.forms[formName].components[child_item.index_in_parent_array]'
v-if='model.forms[formName].components[child_item.index_in_parent_array]'
Expand Down Expand Up @@ -2224,7 +2224,7 @@ Pushlist
// if only a BCI
} else {
debug_component_code_id=GLOBALS.getCommitIdForBaseComponentId( model.forms[active_form].components[active_component_index].base_component_id);
debug_component_code_id=GLOBALS().getCommitIdForBaseComponentId( model.forms[active_form].components[active_component_index].base_component_id);
}'
> ..
</div>
Expand Down Expand Up @@ -2360,7 +2360,7 @@ Pushlist
style='padding:0px;font-family:verdana,helvetica;font-size: 13px;'
class='col-md-12 small'>
{{GLOBALS.getTypeDisplayName(
{{GLOBALS().getTypeDisplayName(
{
baseComponentId: model.forms[active_form].components[active_component_index].base_component_id,
codeId: model.forms[active_form].components[active_component_index].code_id
Expand All @@ -2372,7 +2372,7 @@ Pushlist
style='padding:0px;font-family:verdana,helvetica;font-size: 13px;'
class='col-md-12 small'>
<img v-bind:src='GLOBALS.getTypeDisplayIcon(
<img v-bind:src='GLOBALS().getTypeDisplayIcon(
{
baseComponentId: model.forms[active_form].components[active_component_index].base_component_id,
codeId: model.forms[active_form].components[active_component_index].code_id
Expand Down

0 comments on commit 18fe735

Please sign in to comment.