@xuda.io/runtime-bundle 1.0.414 → 1.0.416

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.
@@ -9066,7 +9066,7 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9066
9066
  };
9067
9067
 
9068
9068
  func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
9069
- let elm_node;
9069
+ let elm_nodes = [];
9070
9070
  const iterate_progUi = function (node) {
9071
9071
  for (let item of node) {
9072
9072
  if (!tag_name || item.tagName === tag_name) {
@@ -9076,7 +9076,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9076
9076
  if (attr === `xu-exp:${prop}` || attr === prop) {
9077
9077
  // found = val.includes('@' + field_id);
9078
9078
  if (val.includes('@' + field_id)) {
9079
- elm_node = item;
9079
+ elm_nodes.push(item);
9080
9080
  break;
9081
9081
  }
9082
9082
  }
@@ -9084,11 +9084,11 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9084
9084
  }
9085
9085
  } else {
9086
9086
  if (tag_name) {
9087
- elm_node = item;
9087
+ elm_nodes.push(item);
9088
9088
  }
9089
9089
  }
9090
9090
  }
9091
- if (elm_node) break;
9091
+ // if (elm_node) break;
9092
9092
 
9093
9093
  if (item.children) {
9094
9094
  iterate_progUi(item.children);
@@ -9096,7 +9096,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9096
9096
  }
9097
9097
  };
9098
9098
  iterate_progUi(progUi);
9099
- return elm_node;
9099
+ return elm_nodes;
9100
9100
  };
9101
9101
  func.events = {};
9102
9102
  func.events.validate = async function (SESSION_ID, triggerP, dsSessionP, eventIdP, sourceP, argumentsP, return_validation_onlyP) {
@@ -11614,21 +11614,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11614
11614
  if (progUi) {
11615
11615
  await iterate_field_in_progUi(progUi, field_id);
11616
11616
  // find invisible panels
11617
- const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
11618
- console.log('elm_node', elm_node);
11619
- let prog_id = elm_node?.attributes?.program;
11620
- const exp = elm_node?.attributes?.['xu-exp:program'];
11621
- if (exp) {
11622
- let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
11623
- prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
11624
- inviable_panels_obj[elm_node.id] = { prog_id };
11625
- }
11617
+ const inviable_panels_arr = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
11618
+ console.log('inviable_panels_arr', inviable_panels_arr);
11619
+ // let prog_id = elm_node?.attributes?.program;
11620
+ // const exp = elm_node?.attributes?.['xu-exp:program'];
11621
+ // if (exp) {
11622
+ // let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
11623
+ // prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
11624
+ // inviable_panels_obj[elm_node.id] = { prog_id };
11625
+ // }
11626
11626
  }
11627
11627
  }
11628
11628
  // run panels
11629
11629
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
11630
11630
  const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
11631
+ await iterate_field_in_progUi(prog_doc.progUi, field_id);
11632
+ }
11631
11633
 
11634
+ // run invisible panels
11635
+ for await (const [parent_element_ui_id, panel_val] of Object.entries(inviable_panels_obj)) {
11636
+ const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.prog_id);
11632
11637
  await iterate_field_in_progUi(prog_doc.progUi, field_id);
11633
11638
  }
11634
11639
  }
@@ -11700,7 +11705,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11700
11705
  if (found) break;
11701
11706
 
11702
11707
  // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
11703
- found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for');
11708
+ found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
11704
11709
  if (found) break;
11705
11710
  }
11706
11711
  }
@@ -9067,7 +9067,7 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9067
9067
  };
9068
9068
 
9069
9069
  func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
9070
- let elm_node;
9070
+ let elm_nodes = [];
9071
9071
  const iterate_progUi = function (node) {
9072
9072
  for (let item of node) {
9073
9073
  if (!tag_name || item.tagName === tag_name) {
@@ -9077,7 +9077,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9077
9077
  if (attr === `xu-exp:${prop}` || attr === prop) {
9078
9078
  // found = val.includes('@' + field_id);
9079
9079
  if (val.includes('@' + field_id)) {
9080
- elm_node = item;
9080
+ elm_nodes.push(item);
9081
9081
  break;
9082
9082
  }
9083
9083
  }
@@ -9085,11 +9085,11 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9085
9085
  }
9086
9086
  } else {
9087
9087
  if (tag_name) {
9088
- elm_node = item;
9088
+ elm_nodes.push(item);
9089
9089
  }
9090
9090
  }
9091
9091
  }
9092
- if (elm_node) break;
9092
+ // if (elm_node) break;
9093
9093
 
9094
9094
  if (item.children) {
9095
9095
  iterate_progUi(item.children);
@@ -9097,7 +9097,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
9097
9097
  }
9098
9098
  };
9099
9099
  iterate_progUi(progUi);
9100
- return elm_node;
9100
+ return elm_nodes;
9101
9101
  };
9102
9102
  func.UI.screen = {};
9103
9103
  func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callingDataSource_objP, $callingContainerP, triggerIdP, rowIdP, jobNoP, is_panelP, parameters_obj_inP, source_functionP, call_screen_propertiesP) {
@@ -9687,21 +9687,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9687
9687
  if (progUi) {
9688
9688
  await iterate_field_in_progUi(progUi, field_id);
9689
9689
  // find invisible panels
9690
- const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
9691
- console.log('elm_node', elm_node);
9692
- let prog_id = elm_node?.attributes?.program;
9693
- const exp = elm_node?.attributes?.['xu-exp:program'];
9694
- if (exp) {
9695
- let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
9696
- prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
9697
- inviable_panels_obj[elm_node.id] = { prog_id };
9698
- }
9690
+ const inviable_panels_arr = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
9691
+ console.log('inviable_panels_arr', inviable_panels_arr);
9692
+ // let prog_id = elm_node?.attributes?.program;
9693
+ // const exp = elm_node?.attributes?.['xu-exp:program'];
9694
+ // if (exp) {
9695
+ // let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
9696
+ // prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
9697
+ // inviable_panels_obj[elm_node.id] = { prog_id };
9698
+ // }
9699
9699
  }
9700
9700
  }
9701
9701
  // run panels
9702
9702
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
9703
9703
  const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
9704
+ await iterate_field_in_progUi(prog_doc.progUi, field_id);
9705
+ }
9704
9706
 
9707
+ // run invisible panels
9708
+ for await (const [parent_element_ui_id, panel_val] of Object.entries(inviable_panels_obj)) {
9709
+ const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.prog_id);
9705
9710
  await iterate_field_in_progUi(prog_doc.progUi, field_id);
9706
9711
  }
9707
9712
  }
@@ -9773,7 +9778,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9773
9778
  if (found) break;
9774
9779
 
9775
9780
  // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
9776
- found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for');
9781
+ found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
9777
9782
  if (found) break;
9778
9783
  }
9779
9784
  }