@xuda.io/runtime-bundle 1.0.1105 → 1.0.1107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12737,7 +12737,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12737
12737
  nodeP.xu_render_xu_ui_id = xu_ui_id;
12738
12738
  nodeP.xu_render_cache_id = xu_render_cache_id;
12739
12739
  new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $container, nodeP, parent_infoP, paramsP, jobNoP, null, keyP, null, parent_nodeP, null, $root_container);
12740
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
12740
+ const _$div = new_$div.clone(true);
12741
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = _$div;
12742
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].data = _$div.data();
12741
12743
  }
12742
12744
  // append order handling
12743
12745
 
@@ -14912,10 +14914,15 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14912
14914
 
14913
14915
  if (ret.has_xu_exp_render_attribute) {
14914
14916
  // $div.css('display', 'unset');
14915
- const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
14916
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
14917
- nodeP.xu_render_xu_ui_id = xu_ui_id;
14918
- nodeP.xu_render_cache_id = xu_render_cache_id;
14917
+ if (!ret.xu_render_background_processing) {
14918
+ const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
14919
+ const _$div = $div.clone(true);
14920
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: _$div, paramsP, data: _$div.data() };
14921
+ nodeP.xu_render_xu_ui_id = xu_ui_id;
14922
+ nodeP.xu_render_cache_id = xu_render_cache_id;
14923
+ temp_$div.replaceWith($div);
14924
+ return $div;
14925
+ }
14919
14926
  if (ret.xu_render_background_processing) {
14920
14927
  temp_$div.remove();
14921
14928
  // $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
@@ -15056,11 +15063,14 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
15056
15063
  };
15057
15064
  xu_viewport();
15058
15065
  } else {
15059
- if (ret.xu_render_background_processing) {
15060
- // let temp_$div = $div.clone(true);
15066
+ // if (ret.xu_render_background_processing) {
15067
+ // // let temp_$div = $div.clone(true);
15068
+ // iterate_child($div, nodeP, parent_infoP, $root_container);
15069
+ // } else {
15070
+ // await iterate_child($div, nodeP, parent_infoP, $root_container);
15071
+ // }
15072
+ if (!ret.xu_render_background_processing) {
15061
15073
  iterate_child($div, nodeP, parent_infoP, $root_container);
15062
- } else {
15063
- await iterate_child($div, nodeP, parent_infoP, $root_container);
15064
15074
  }
15065
15075
  }
15066
15076
 
@@ -15152,12 +15162,6 @@ const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
15152
15162
  const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
15153
15163
  const fields_obj = get_parent_ds_fields(SESSION_ID, dsSessionP);
15154
15164
 
15155
- // var _session = SESSION_OBJ[SESSION_ID];
15156
- // var _ds = _session.DS_GLB[dsSessionP];
15157
-
15158
- // const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
15159
- // const data = _ds.data_feed.rows[idx];
15160
-
15161
15165
  let str = '';
15162
15166
 
15163
15167
  for (const [key, val] of Object.entries(fields_obj)) {
@@ -15165,33 +15169,8 @@ const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_
15165
15169
  str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
15166
15170
  }
15167
15171
 
15168
- // if (typeof _ds.parentDataSourceNo !== 'undefined') {
15169
- // str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
15170
- // }
15171
-
15172
15172
  return 'C-' + (await func.common.sha256(str));
15173
15173
  };
15174
-
15175
- // const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
15176
- // var _session = SESSION_OBJ[SESSION_ID];
15177
- // var _ds = _session.DS_GLB[dsSessionP];
15178
-
15179
- // const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
15180
- // const data = _ds.data_feed.rows[idx];
15181
-
15182
- // let str = '';
15183
-
15184
- // for (const [key, val] of Object.entries(data)) {
15185
- // if (exclude_vars.includes(key)) continue;
15186
- // str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
15187
- // }
15188
-
15189
- // if (typeof _ds.parentDataSourceNo !== 'undefined') {
15190
- // str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
15191
- // }
15192
-
15193
- // return 'C-' + (await func.common.sha256(str));
15194
- // };
15195
15174
  func.UI.component = {};
15196
15175
 
15197
15176
  func.UI.component.create_app_modal_component = function (
@@ -10462,7 +10462,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10462
10462
  nodeP.xu_render_xu_ui_id = xu_ui_id;
10463
10463
  nodeP.xu_render_cache_id = xu_render_cache_id;
10464
10464
  new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $container, nodeP, parent_infoP, paramsP, jobNoP, null, keyP, null, parent_nodeP, null, $root_container);
10465
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
10465
+ const _$div = new_$div.clone(true);
10466
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = _$div;
10467
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].data = _$div.data();
10466
10468
  }
10467
10469
  // append order handling
10468
10470
 
@@ -12637,10 +12639,15 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12637
12639
 
12638
12640
  if (ret.has_xu_exp_render_attribute) {
12639
12641
  // $div.css('display', 'unset');
12640
- const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
12641
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
12642
- nodeP.xu_render_xu_ui_id = xu_ui_id;
12643
- nodeP.xu_render_cache_id = xu_render_cache_id;
12642
+ if (!ret.xu_render_background_processing) {
12643
+ const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
12644
+ const _$div = $div.clone(true);
12645
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: _$div, paramsP, data: _$div.data() };
12646
+ nodeP.xu_render_xu_ui_id = xu_ui_id;
12647
+ nodeP.xu_render_cache_id = xu_render_cache_id;
12648
+ temp_$div.replaceWith($div);
12649
+ return $div;
12650
+ }
12644
12651
  if (ret.xu_render_background_processing) {
12645
12652
  temp_$div.remove();
12646
12653
  // $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
@@ -12781,11 +12788,14 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12781
12788
  };
12782
12789
  xu_viewport();
12783
12790
  } else {
12784
- if (ret.xu_render_background_processing) {
12785
- // let temp_$div = $div.clone(true);
12791
+ // if (ret.xu_render_background_processing) {
12792
+ // // let temp_$div = $div.clone(true);
12793
+ // iterate_child($div, nodeP, parent_infoP, $root_container);
12794
+ // } else {
12795
+ // await iterate_child($div, nodeP, parent_infoP, $root_container);
12796
+ // }
12797
+ if (!ret.xu_render_background_processing) {
12786
12798
  iterate_child($div, nodeP, parent_infoP, $root_container);
12787
- } else {
12788
- await iterate_child($div, nodeP, parent_infoP, $root_container);
12789
12799
  }
12790
12800
  }
12791
12801
 
@@ -12877,12 +12887,6 @@ const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
12877
12887
  const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
12878
12888
  const fields_obj = get_parent_ds_fields(SESSION_ID, dsSessionP);
12879
12889
 
12880
- // var _session = SESSION_OBJ[SESSION_ID];
12881
- // var _ds = _session.DS_GLB[dsSessionP];
12882
-
12883
- // const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
12884
- // const data = _ds.data_feed.rows[idx];
12885
-
12886
12890
  let str = '';
12887
12891
 
12888
12892
  for (const [key, val] of Object.entries(fields_obj)) {
@@ -12890,33 +12894,8 @@ const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_
12890
12894
  str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
12891
12895
  }
12892
12896
 
12893
- // if (typeof _ds.parentDataSourceNo !== 'undefined') {
12894
- // str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
12895
- // }
12896
-
12897
12897
  return 'C-' + (await func.common.sha256(str));
12898
12898
  };
12899
-
12900
- // const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
12901
- // var _session = SESSION_OBJ[SESSION_ID];
12902
- // var _ds = _session.DS_GLB[dsSessionP];
12903
-
12904
- // const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
12905
- // const data = _ds.data_feed.rows[idx];
12906
-
12907
- // let str = '';
12908
-
12909
- // for (const [key, val] of Object.entries(data)) {
12910
- // if (exclude_vars.includes(key)) continue;
12911
- // str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
12912
- // }
12913
-
12914
- // if (typeof _ds.parentDataSourceNo !== 'undefined') {
12915
- // str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
12916
- // }
12917
-
12918
- // return 'C-' + (await func.common.sha256(str));
12919
- // };
12920
12899
  func.UI.component = {};
12921
12900
 
12922
12901
  func.UI.component.create_app_modal_component = function (