@xuda.io/runtime-bundle 1.0.1069 → 1.0.1071

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.
@@ -12668,25 +12668,26 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12668
12668
  const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($elm.data()?.xuData.attr_exp_info?.['xu-render']?.fields || {}));
12669
12669
  const xu_ui_id = $elm.attr('xu-ui-id');
12670
12670
  let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
12671
-
12672
- if (!new_$div?.$div) {
12671
+ let found_parent_vars = false;
12672
+ if (new_$div) {
12673
12673
  // validate if $div contains fields from parent ds
12674
12674
  const parent_fields = get_parent_ds_fields(SESSION_ID, paramsP.dsSessionP);
12675
- const div_str = JSON.stringify(new_$div.$div.children());
12676
- let found = false;
12675
+ const div_str = JSON.stringify(new_$div.children());
12676
+
12677
12677
  for (const [key, val] of Object.entries(parent_fields)) {
12678
12678
  if (div_str.includes('@' + key)) {
12679
- found = true;
12679
+ found_parent_vars = true;
12680
12680
  break;
12681
12681
  }
12682
12682
  }
12683
- if (!found) {
12684
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
12685
- nodeP.xu_render_xu_ui_id = xu_ui_id;
12686
- nodeP.xu_render_cache_id = xu_render_cache_id;
12687
- 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);
12688
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
12689
- }
12683
+ }
12684
+
12685
+ if (!new_$div || found_parent_vars) {
12686
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
12687
+ nodeP.xu_render_xu_ui_id = xu_ui_id;
12688
+ nodeP.xu_render_cache_id = xu_render_cache_id;
12689
+ 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);
12690
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
12690
12691
  }
12691
12692
  // append order handling
12692
12693
 
@@ -10393,25 +10393,26 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10393
10393
  const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($elm.data()?.xuData.attr_exp_info?.['xu-render']?.fields || {}));
10394
10394
  const xu_ui_id = $elm.attr('xu-ui-id');
10395
10395
  let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
10396
-
10397
- if (!new_$div?.$div) {
10396
+ let found_parent_vars = false;
10397
+ if (new_$div) {
10398
10398
  // validate if $div contains fields from parent ds
10399
10399
  const parent_fields = get_parent_ds_fields(SESSION_ID, paramsP.dsSessionP);
10400
- const div_str = JSON.stringify(new_$div.$div.children());
10401
- let found = false;
10400
+ const div_str = JSON.stringify(new_$div.children());
10401
+
10402
10402
  for (const [key, val] of Object.entries(parent_fields)) {
10403
10403
  if (div_str.includes('@' + key)) {
10404
- found = true;
10404
+ found_parent_vars = true;
10405
10405
  break;
10406
10406
  }
10407
10407
  }
10408
- if (!found) {
10409
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
10410
- nodeP.xu_render_xu_ui_id = xu_ui_id;
10411
- nodeP.xu_render_cache_id = xu_render_cache_id;
10412
- 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);
10413
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
10414
- }
10408
+ }
10409
+
10410
+ if (!new_$div || found_parent_vars) {
10411
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
10412
+ nodeP.xu_render_xu_ui_id = xu_ui_id;
10413
+ nodeP.xu_render_cache_id = xu_render_cache_id;
10414
+ 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);
10415
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
10415
10416
  }
10416
10417
  // append order handling
10417
10418