@xuda.io/runtime-bundle 1.0.407 → 1.0.409

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.
@@ -8896,7 +8896,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8896
8896
  null,
8897
8897
  queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
8898
8898
  );
8899
- console.log(res);
8899
+ // console.log(res);
8900
8900
  }
8901
8901
 
8902
8902
  const attr_new = attr.split('xu-exp:')[1];
@@ -9065,26 +9065,34 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9065
9065
  }
9066
9066
  };
9067
9067
 
9068
- func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop) {
9068
+ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
9069
9069
  let elm_node;
9070
9070
  const iterate_progUi = function (node) {
9071
9071
  for (let item of node) {
9072
- // if (item.tagName === "xu-panel") {
9073
- if (!_.isEmpty(item.attributes)) {
9074
- for (const [attr, val] of Object.entries(item.attributes)) {
9075
- if (attr === `xu-exp:${prop}` || attr === prop) {
9076
- // found = val.includes('@' + field_id);
9077
- if (val.includes('@' + field_id)) {
9078
- elm_node = node;
9079
- break;
9072
+ if (!tag_name || item.tagName === tag_name) {
9073
+ if (prop) {
9074
+ if (!_.isEmpty(item.attributes)) {
9075
+ for (const [attr, val] of Object.entries(item.attributes)) {
9076
+ if (attr === `xu-exp:${prop}` || attr === prop) {
9077
+ // found = val.includes('@' + field_id);
9078
+ if (val.includes('@' + field_id)) {
9079
+ elm_node = node;
9080
+ break;
9081
+ }
9082
+ }
9080
9083
  }
9081
9084
  }
9085
+ } else {
9086
+ if (tag_name) {
9087
+ elm_node = node;
9088
+ }
9082
9089
  }
9083
- }
9084
- if (elm_node) break;
9085
9090
 
9086
- if (item.children) {
9087
- iterate_progUi(item.children);
9091
+ if (elm_node) break;
9092
+
9093
+ if (item.children) {
9094
+ iterate_progUi(item.children);
9095
+ }
9088
9096
  }
9089
9097
  }
9090
9098
  };
@@ -11606,7 +11614,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11606
11614
  if (progUi) {
11607
11615
  await iterate_field_in_progUi(progUi, field_id);
11608
11616
  // find invisible panels
11609
- const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, 'xu-panel');
11617
+ const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
11610
11618
  console.log('elm_node', elm_node);
11611
11619
  }
11612
11620
  }
@@ -8897,7 +8897,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8897
8897
  null,
8898
8898
  queue_obj.paramsP.elem_val.$elm.data().xuData.iterate_info,
8899
8899
  );
8900
- console.log(res);
8900
+ // console.log(res);
8901
8901
  }
8902
8902
 
8903
8903
  const attr_new = attr.split('xu-exp:')[1];
@@ -9066,26 +9066,34 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
9066
9066
  }
9067
9067
  };
9068
9068
 
9069
- func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop) {
9069
+ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_name) {
9070
9070
  let elm_node;
9071
9071
  const iterate_progUi = function (node) {
9072
9072
  for (let item of node) {
9073
- // if (item.tagName === "xu-panel") {
9074
- if (!_.isEmpty(item.attributes)) {
9075
- for (const [attr, val] of Object.entries(item.attributes)) {
9076
- if (attr === `xu-exp:${prop}` || attr === prop) {
9077
- // found = val.includes('@' + field_id);
9078
- if (val.includes('@' + field_id)) {
9079
- elm_node = node;
9080
- break;
9073
+ if (!tag_name || item.tagName === tag_name) {
9074
+ if (prop) {
9075
+ if (!_.isEmpty(item.attributes)) {
9076
+ for (const [attr, val] of Object.entries(item.attributes)) {
9077
+ if (attr === `xu-exp:${prop}` || attr === prop) {
9078
+ // found = val.includes('@' + field_id);
9079
+ if (val.includes('@' + field_id)) {
9080
+ elm_node = node;
9081
+ break;
9082
+ }
9083
+ }
9081
9084
  }
9082
9085
  }
9086
+ } else {
9087
+ if (tag_name) {
9088
+ elm_node = node;
9089
+ }
9083
9090
  }
9084
- }
9085
- if (elm_node) break;
9086
9091
 
9087
- if (item.children) {
9088
- iterate_progUi(item.children);
9092
+ if (elm_node) break;
9093
+
9094
+ if (item.children) {
9095
+ iterate_progUi(item.children);
9096
+ }
9089
9097
  }
9090
9098
  }
9091
9099
  };
@@ -9679,7 +9687,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9679
9687
  if (progUi) {
9680
9688
  await iterate_field_in_progUi(progUi, field_id);
9681
9689
  // find invisible panels
9682
- const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, 'xu-panel');
9690
+ const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, null, 'xu-panel');
9683
9691
  console.log('elm_node', elm_node);
9684
9692
  }
9685
9693
  }