@xuda.io/runtime-bundle 1.0.337 → 1.0.339

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
31589
+ // // look if the changed field include in the calling in parameters
31590
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
- }
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,7 +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
+ // console.log('selectors', selectors);
31736
31736
  let refreshed_ids = [];
31737
31737
  // handle xu-for
31738
31738
  let parent_element_ui_id;
@@ -31761,22 +31761,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31761
31761
  _elem_val.attributes.push(key);
31762
31762
  });
31763
31763
 
31764
- // await func.UI.worker.add_to_queue(
31765
- // SESSION_ID,
31766
- // "gui event",
31767
- // "execute_xu_for",
31768
- // {
31769
- // ui_type: elem_val.$elm.data().xuData.ui_type,
31770
- // SESSION_ID,
31771
- // elem_key,
31772
- // elem_val,
31773
- // fields_arr,
31774
- // },
31775
- // new_job,
31776
- // elem_val.$elm,
31777
- // elem_val.$elm.data().xuData.paramsP.dsSessionP
31778
- // );
31779
-
31780
31764
  await func.UI.worker.add_to_queue(
31781
31765
  SESSION_ID,
31782
31766
  'gui event',
@@ -31881,29 +31865,28 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31881
31865
  // var panels_obj = {};
31882
31866
  const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
31883
31867
 
31884
- // const find_field_in_progUi = function (progUi, field_id) {
31885
- // let found;
31886
- // const iterate_progUi = function (node) {
31887
- // for (let item of node) {
31888
- // // if (item.tagName === "xu-panel") {
31889
- // if (!_.isEmpty(item.attributes)) {
31890
- // for (const [attr, val] of Object.entries(item.attributes)) {
31891
- // // if (attr === "xu-exp:program" || attr === "xu-exp:xu-for") {
31892
- // if (attr === 'xu-exp:program') {
31893
- // found = val.includes('@' + field_id);
31894
- // }
31895
- // }
31896
- // }
31897
- // if (found) break;
31898
- // // }
31899
- // if (item.children) {
31900
- // iterate_progUi(item.children);
31901
- // }
31902
- // }
31903
- // };
31904
- // iterate_progUi(progUi);
31905
- // return found;
31906
- // };
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
+ };
31907
31890
 
31908
31891
  // // set panels_obj
31909
31892
  // for await (const [elem_key, elem_val] of Object.entries($elm)) {
@@ -31974,8 +31957,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31974
31957
  // found = progUi_str?.includes("@" + parameter_in_field_id);
31975
31958
  // if (found) return false;
31976
31959
 
31977
- // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id)
31978
- // if (found) break
31960
+ found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
31961
+ if (found) break;
31979
31962
  }
31980
31963
  }
31981
31964