@xuda.io/runtime-bundle 1.0.336 → 1.0.338

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.
@@ -31586,26 +31586,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31586
31586
  $(search_from)
31587
31587
  .find('*')
31588
31588
  .filter(function () {
31589
- // look if the changed field include in the calling in parameters
31590
- let parameter_in_filed_id;
31591
- const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
31592
- if (_$callingContainer) {
31593
- const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
31594
- if (_source_xuAttributes) {
31595
- for (const [attr, value] of Object.entries(_source_xuAttributes)) {
31596
- if (value && typeof value === 'string' && value.includes(val_field)) {
31597
- const pattern = /xu-exp:(\w+)/;
31598
- const match = attr.match(pattern);
31599
- if (match) {
31600
- parameter_in_filed_id = attr.split(':')[1];
31601
- } else {
31602
- parameter_in_filed_id = attr;
31603
- }
31604
- break;
31605
- }
31606
- }
31607
- }
31608
- }
31589
+ // // look if the changed field include in the calling in parameters
31590
+ // let parameter_in_filed_id;
31591
+ // const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
31592
+ // if (_$callingContainer) {
31593
+ // const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
31594
+ // if (_source_xuAttributes) {
31595
+ // for (const [attr, value] of Object.entries(_source_xuAttributes)) {
31596
+ // if (value && typeof value === 'string' && value.includes(val_field)) {
31597
+ // const pattern = /xu-exp:(\w+)/;
31598
+ // const match = attr.match(pattern);
31599
+ // if (match) {
31600
+ // parameter_in_filed_id = attr.split(':')[1];
31601
+ // } else {
31602
+ // parameter_in_filed_id = attr;
31603
+ // }
31604
+ // break;
31605
+ // }
31606
+ // }
31607
+ // }
31608
+ // }
31609
31609
 
31610
31610
  let attr = [];
31611
31611
 
@@ -31732,6 +31732,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31732
31732
  // xu-for
31733
31733
  selectors = {};
31734
31734
  get_selectors();
31735
+ console.log('selectors', selectors);
31735
31736
  let refreshed_ids = [];
31736
31737
  // handle xu-for
31737
31738
  let parent_element_ui_id;
@@ -31760,22 +31761,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31760
31761
  _elem_val.attributes.push(key);
31761
31762
  });
31762
31763
 
31763
- // await func.UI.worker.add_to_queue(
31764
- // SESSION_ID,
31765
- // "gui event",
31766
- // "execute_xu_for",
31767
- // {
31768
- // ui_type: elem_val.$elm.data().xuData.ui_type,
31769
- // SESSION_ID,
31770
- // elem_key,
31771
- // elem_val,
31772
- // fields_arr,
31773
- // },
31774
- // new_job,
31775
- // elem_val.$elm,
31776
- // elem_val.$elm.data().xuData.paramsP.dsSessionP
31777
- // );
31778
-
31779
31764
  await func.UI.worker.add_to_queue(
31780
31765
  SESSION_ID,
31781
31766
  'gui event',
@@ -31880,29 +31865,28 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31880
31865
  // var panels_obj = {};
31881
31866
  const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
31882
31867
 
31883
- // const find_field_in_progUi = function (progUi, field_id) {
31884
- // let found;
31885
- // const iterate_progUi = function (node) {
31886
- // for (let item of node) {
31887
- // // if (item.tagName === "xu-panel") {
31888
- // if (!_.isEmpty(item.attributes)) {
31889
- // for (const [attr, val] of Object.entries(item.attributes)) {
31890
- // // if (attr === "xu-exp:program" || attr === "xu-exp:xu-for") {
31891
- // if (attr === 'xu-exp:program') {
31892
- // found = val.includes('@' + field_id);
31893
- // }
31894
- // }
31895
- // }
31896
- // if (found) break;
31897
- // // }
31898
- // if (item.children) {
31899
- // iterate_progUi(item.children);
31900
- // }
31901
- // }
31902
- // };
31903
- // iterate_progUi(progUi);
31904
- // return found;
31905
- // };
31868
+ const find_field_in_progUi = function (progUi, field_id, prop) {
31869
+ let found;
31870
+ const iterate_progUi = function (node) {
31871
+ for (let item of node) {
31872
+ // if (item.tagName === "xu-panel") {
31873
+ if (!_.isEmpty(item.attributes)) {
31874
+ for (const [attr, val] of Object.entries(item.attributes)) {
31875
+ if (attr === `xu-exp:${prop}`) {
31876
+ found = val.includes('@' + field_id);
31877
+ }
31878
+ }
31879
+ }
31880
+ if (found) break;
31881
+ // }
31882
+ if (item.children) {
31883
+ iterate_progUi(item.children);
31884
+ }
31885
+ }
31886
+ };
31887
+ iterate_progUi(progUi);
31888
+ return found;
31889
+ };
31906
31890
 
31907
31891
  // // set panels_obj
31908
31892
  // for await (const [elem_key, elem_val] of Object.entries($elm)) {
@@ -31973,8 +31957,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31973
31957
  // found = progUi_str?.includes("@" + parameter_in_field_id);
31974
31958
  // if (found) return false;
31975
31959
 
31976
- // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id)
31977
- // if (found) break
31960
+ found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
31961
+ if (found) break;
31978
31962
  }
31979
31963
  }
31980
31964