@xuda.io/runtime-bundle 1.0.409 → 1.0.411

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.
@@ -9087,12 +9087,11 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9087
9087
  elm_node = node;
9088
9088
  }
9089
9089
  }
9090
+ }
9091
+ if (elm_node) break;
9090
9092
 
9091
- if (elm_node) break;
9092
-
9093
- if (item.children) {
9094
- iterate_progUi(item.children);
9095
- }
9093
+ if (item.children) {
9094
+ iterate_progUi(item.children);
9096
9095
  }
9097
9096
  }
9098
9097
  };
@@ -11605,7 +11604,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11605
11604
  };
11606
11605
 
11607
11606
  const $xu_embed_div = $('.xu_embed_div');
11608
- const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, true);
11607
+ let panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, true);
11609
11608
 
11610
11609
  for await (const field_id of fields_arr) {
11611
11610
  // run root
@@ -11616,11 +11615,18 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11616
11615
  // find invisible panels
11617
11616
  const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
11618
11617
  console.log('elm_node', elm_node);
11618
+ let prog_id = elm_node?.attributes?.program;
11619
+ const exp = elm_node?.attributes?.['xu-exp:program'];
11620
+ if (exp) {
11621
+ let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_div?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
11622
+ prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
11623
+ panels_obj[elm_node.id] = { prog_id };
11624
+ }
11619
11625
  }
11620
11626
  }
11621
11627
  // run panels
11622
11628
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
11623
- const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
11629
+ const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id || panel_val.prog_id);
11624
11630
 
11625
11631
  await iterate_field_in_progUi(prog_doc.progUi, field_id);
11626
11632
  }
@@ -9088,12 +9088,11 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9088
9088
  elm_node = node;
9089
9089
  }
9090
9090
  }
9091
+ }
9092
+ if (elm_node) break;
9091
9093
 
9092
- if (elm_node) break;
9093
-
9094
- if (item.children) {
9095
- iterate_progUi(item.children);
9096
- }
9094
+ if (item.children) {
9095
+ iterate_progUi(item.children);
9097
9096
  }
9098
9097
  }
9099
9098
  };
@@ -9678,7 +9677,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9678
9677
  };
9679
9678
 
9680
9679
  const $xu_embed_div = $('.xu_embed_div');
9681
- const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, true);
9680
+ let panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, true);
9682
9681
 
9683
9682
  for await (const field_id of fields_arr) {
9684
9683
  // run root
@@ -9689,11 +9688,18 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9689
9688
  // find invisible panels
9690
9689
  const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
9691
9690
  console.log('elm_node', elm_node);
9691
+ let prog_id = elm_node?.attributes?.program;
9692
+ const exp = elm_node?.attributes?.['xu-exp:program'];
9693
+ if (exp) {
9694
+ let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_div?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
9695
+ prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
9696
+ panels_obj[elm_node.id] = { prog_id };
9697
+ }
9692
9698
  }
9693
9699
  }
9694
9700
  // run panels
9695
9701
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
9696
- const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
9702
+ const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id || panel_val.prog_id);
9697
9703
 
9698
9704
  await iterate_field_in_progUi(prog_doc.progUi, field_id);
9699
9705
  }