@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.
@@ -28248,7 +28248,7 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
28248
28248
  };
28249
28249
 
28250
28250
  func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
28251
- let elm_node;
28251
+ let elm_nodes = [];
28252
28252
  const iterate_progUi = function (node) {
28253
28253
  for (let item of node) {
28254
28254
  if (!tag_name || item.tagName === tag_name) {
@@ -28258,7 +28258,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
28258
28258
  if (attr === `xu-exp:${prop}` || attr === prop) {
28259
28259
  // found = val.includes('@' + field_id);
28260
28260
  if (val.includes('@' + field_id)) {
28261
- elm_node = item;
28261
+ elm_nodes.push(item);
28262
28262
  break;
28263
28263
  }
28264
28264
  }
@@ -28266,11 +28266,11 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
28266
28266
  }
28267
28267
  } else {
28268
28268
  if (tag_name) {
28269
- elm_node = item;
28269
+ elm_nodes.push(item);
28270
28270
  }
28271
28271
  }
28272
28272
  }
28273
- if (elm_node) break;
28273
+ // if (elm_node) break;
28274
28274
 
28275
28275
  if (item.children) {
28276
28276
  iterate_progUi(item.children);
@@ -28278,7 +28278,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
28278
28278
  }
28279
28279
  };
28280
28280
  iterate_progUi(progUi);
28281
- return elm_node;
28281
+ return elm_nodes;
28282
28282
  };
28283
28283
  func.datasource = {};
28284
28284
  func.datasource.create = async function (
@@ -31646,21 +31646,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31646
31646
  if (progUi) {
31647
31647
  await iterate_field_in_progUi(progUi, field_id);
31648
31648
  // find invisible panels
31649
- const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
31650
- console.log('elm_node', elm_node);
31651
- let prog_id = elm_node?.attributes?.program;
31652
- const exp = elm_node?.attributes?.['xu-exp:program'];
31653
- if (exp) {
31654
- let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
31655
- prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
31656
- inviable_panels_obj[elm_node.id] = { prog_id };
31657
- }
31649
+ const inviable_panels_arr = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
31650
+ console.log('inviable_panels_arr', inviable_panels_arr);
31651
+ // let prog_id = elm_node?.attributes?.program;
31652
+ // const exp = elm_node?.attributes?.['xu-exp:program'];
31653
+ // if (exp) {
31654
+ // let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
31655
+ // prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
31656
+ // inviable_panels_obj[elm_node.id] = { prog_id };
31657
+ // }
31658
31658
  }
31659
31659
  }
31660
31660
  // run panels
31661
31661
  for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
31662
31662
  const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
31663
+ await iterate_field_in_progUi(prog_doc.progUi, field_id);
31664
+ }
31663
31665
 
31666
+ // run invisible panels
31667
+ for await (const [parent_element_ui_id, panel_val] of Object.entries(inviable_panels_obj)) {
31668
+ const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.prog_id);
31664
31669
  await iterate_field_in_progUi(prog_doc.progUi, field_id);
31665
31670
  }
31666
31671
  }
@@ -31732,7 +31737,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31732
31737
  if (found) break;
31733
31738
 
31734
31739
  // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
31735
- found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for');
31740
+ found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
31736
31741
  if (found) break;
31737
31742
  }
31738
31743
  }