@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.
@@ -11561,26 +11561,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11561
11561
  $(search_from)
11562
11562
  .find('*')
11563
11563
  .filter(function () {
11564
- // look if the changed field include in the calling in parameters
11565
- let parameter_in_filed_id;
11566
- const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
11567
- if (_$callingContainer) {
11568
- const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
11569
- if (_source_xuAttributes) {
11570
- for (const [attr, value] of Object.entries(_source_xuAttributes)) {
11571
- if (value && typeof value === 'string' && value.includes(val_field)) {
11572
- const pattern = /xu-exp:(\w+)/;
11573
- const match = attr.match(pattern);
11574
- if (match) {
11575
- parameter_in_filed_id = attr.split(':')[1];
11576
- } else {
11577
- parameter_in_filed_id = attr;
11578
- }
11579
- break;
11580
- }
11581
- }
11582
- }
11583
- }
11564
+ // // look if the changed field include in the calling in parameters
11565
+ // let parameter_in_filed_id;
11566
+ // const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
11567
+ // if (_$callingContainer) {
11568
+ // const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
11569
+ // if (_source_xuAttributes) {
11570
+ // for (const [attr, value] of Object.entries(_source_xuAttributes)) {
11571
+ // if (value && typeof value === 'string' && value.includes(val_field)) {
11572
+ // const pattern = /xu-exp:(\w+)/;
11573
+ // const match = attr.match(pattern);
11574
+ // if (match) {
11575
+ // parameter_in_filed_id = attr.split(':')[1];
11576
+ // } else {
11577
+ // parameter_in_filed_id = attr;
11578
+ // }
11579
+ // break;
11580
+ // }
11581
+ // }
11582
+ // }
11583
+ // }
11584
11584
 
11585
11585
  let attr = [];
11586
11586
 
@@ -11707,6 +11707,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11707
11707
  // xu-for
11708
11708
  selectors = {};
11709
11709
  get_selectors();
11710
+ console.log('selectors', selectors);
11710
11711
  let refreshed_ids = [];
11711
11712
  // handle xu-for
11712
11713
  let parent_element_ui_id;
@@ -11735,22 +11736,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11735
11736
  _elem_val.attributes.push(key);
11736
11737
  });
11737
11738
 
11738
- // await func.UI.worker.add_to_queue(
11739
- // SESSION_ID,
11740
- // "gui event",
11741
- // "execute_xu_for",
11742
- // {
11743
- // ui_type: elem_val.$elm.data().xuData.ui_type,
11744
- // SESSION_ID,
11745
- // elem_key,
11746
- // elem_val,
11747
- // fields_arr,
11748
- // },
11749
- // new_job,
11750
- // elem_val.$elm,
11751
- // elem_val.$elm.data().xuData.paramsP.dsSessionP
11752
- // );
11753
-
11754
11739
  await func.UI.worker.add_to_queue(
11755
11740
  SESSION_ID,
11756
11741
  'gui event',
@@ -11855,29 +11840,28 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11855
11840
  // var panels_obj = {};
11856
11841
  const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
11857
11842
 
11858
- // const find_field_in_progUi = function (progUi, field_id) {
11859
- // let found;
11860
- // const iterate_progUi = function (node) {
11861
- // for (let item of node) {
11862
- // // if (item.tagName === "xu-panel") {
11863
- // if (!_.isEmpty(item.attributes)) {
11864
- // for (const [attr, val] of Object.entries(item.attributes)) {
11865
- // // if (attr === "xu-exp:program" || attr === "xu-exp:xu-for") {
11866
- // if (attr === 'xu-exp:program') {
11867
- // found = val.includes('@' + field_id);
11868
- // }
11869
- // }
11870
- // }
11871
- // if (found) break;
11872
- // // }
11873
- // if (item.children) {
11874
- // iterate_progUi(item.children);
11875
- // }
11876
- // }
11877
- // };
11878
- // iterate_progUi(progUi);
11879
- // return found;
11880
- // };
11843
+ const find_field_in_progUi = function (progUi, field_id, prop) {
11844
+ let found;
11845
+ const iterate_progUi = function (node) {
11846
+ for (let item of node) {
11847
+ // if (item.tagName === "xu-panel") {
11848
+ if (!_.isEmpty(item.attributes)) {
11849
+ for (const [attr, val] of Object.entries(item.attributes)) {
11850
+ if (attr === `xu-exp:${prop}`) {
11851
+ found = val.includes('@' + field_id);
11852
+ }
11853
+ }
11854
+ }
11855
+ if (found) break;
11856
+ // }
11857
+ if (item.children) {
11858
+ iterate_progUi(item.children);
11859
+ }
11860
+ }
11861
+ };
11862
+ iterate_progUi(progUi);
11863
+ return found;
11864
+ };
11881
11865
 
11882
11866
  // // set panels_obj
11883
11867
  // for await (const [elem_key, elem_val] of Object.entries($elm)) {
@@ -11948,8 +11932,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11948
11932
  // found = progUi_str?.includes("@" + parameter_in_field_id);
11949
11933
  // if (found) return false;
11950
11934
 
11951
- // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id)
11952
- // if (found) break
11935
+ found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
11936
+ if (found) break;
11953
11937
  }
11954
11938
  }
11955
11939
 
@@ -9627,26 +9627,26 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9627
9627
  $(search_from)
9628
9628
  .find('*')
9629
9629
  .filter(function () {
9630
- // look if the changed field include in the calling in parameters
9631
- let parameter_in_filed_id;
9632
- const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
9633
- if (_$callingContainer) {
9634
- const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
9635
- if (_source_xuAttributes) {
9636
- for (const [attr, value] of Object.entries(_source_xuAttributes)) {
9637
- if (value && typeof value === 'string' && value.includes(val_field)) {
9638
- const pattern = /xu-exp:(\w+)/;
9639
- const match = attr.match(pattern);
9640
- if (match) {
9641
- parameter_in_filed_id = attr.split(':')[1];
9642
- } else {
9643
- parameter_in_filed_id = attr;
9644
- }
9645
- break;
9646
- }
9647
- }
9648
- }
9649
- }
9630
+ // // look if the changed field include in the calling in parameters
9631
+ // let parameter_in_filed_id;
9632
+ // const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
9633
+ // if (_$callingContainer) {
9634
+ // const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
9635
+ // if (_source_xuAttributes) {
9636
+ // for (const [attr, value] of Object.entries(_source_xuAttributes)) {
9637
+ // if (value && typeof value === 'string' && value.includes(val_field)) {
9638
+ // const pattern = /xu-exp:(\w+)/;
9639
+ // const match = attr.match(pattern);
9640
+ // if (match) {
9641
+ // parameter_in_filed_id = attr.split(':')[1];
9642
+ // } else {
9643
+ // parameter_in_filed_id = attr;
9644
+ // }
9645
+ // break;
9646
+ // }
9647
+ // }
9648
+ // }
9649
+ // }
9650
9650
 
9651
9651
  let attr = [];
9652
9652
 
@@ -9773,6 +9773,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9773
9773
  // xu-for
9774
9774
  selectors = {};
9775
9775
  get_selectors();
9776
+ console.log('selectors', selectors);
9776
9777
  let refreshed_ids = [];
9777
9778
  // handle xu-for
9778
9779
  let parent_element_ui_id;
@@ -9801,22 +9802,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9801
9802
  _elem_val.attributes.push(key);
9802
9803
  });
9803
9804
 
9804
- // await func.UI.worker.add_to_queue(
9805
- // SESSION_ID,
9806
- // "gui event",
9807
- // "execute_xu_for",
9808
- // {
9809
- // ui_type: elem_val.$elm.data().xuData.ui_type,
9810
- // SESSION_ID,
9811
- // elem_key,
9812
- // elem_val,
9813
- // fields_arr,
9814
- // },
9815
- // new_job,
9816
- // elem_val.$elm,
9817
- // elem_val.$elm.data().xuData.paramsP.dsSessionP
9818
- // );
9819
-
9820
9805
  await func.UI.worker.add_to_queue(
9821
9806
  SESSION_ID,
9822
9807
  'gui event',
@@ -9921,29 +9906,28 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9921
9906
  // var panels_obj = {};
9922
9907
  const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
9923
9908
 
9924
- // const find_field_in_progUi = function (progUi, field_id) {
9925
- // let found;
9926
- // const iterate_progUi = function (node) {
9927
- // for (let item of node) {
9928
- // // if (item.tagName === "xu-panel") {
9929
- // if (!_.isEmpty(item.attributes)) {
9930
- // for (const [attr, val] of Object.entries(item.attributes)) {
9931
- // // if (attr === "xu-exp:program" || attr === "xu-exp:xu-for") {
9932
- // if (attr === 'xu-exp:program') {
9933
- // found = val.includes('@' + field_id);
9934
- // }
9935
- // }
9936
- // }
9937
- // if (found) break;
9938
- // // }
9939
- // if (item.children) {
9940
- // iterate_progUi(item.children);
9941
- // }
9942
- // }
9943
- // };
9944
- // iterate_progUi(progUi);
9945
- // return found;
9946
- // };
9909
+ const find_field_in_progUi = function (progUi, field_id, prop) {
9910
+ let found;
9911
+ const iterate_progUi = function (node) {
9912
+ for (let item of node) {
9913
+ // if (item.tagName === "xu-panel") {
9914
+ if (!_.isEmpty(item.attributes)) {
9915
+ for (const [attr, val] of Object.entries(item.attributes)) {
9916
+ if (attr === `xu-exp:${prop}`) {
9917
+ found = val.includes('@' + field_id);
9918
+ }
9919
+ }
9920
+ }
9921
+ if (found) break;
9922
+ // }
9923
+ if (item.children) {
9924
+ iterate_progUi(item.children);
9925
+ }
9926
+ }
9927
+ };
9928
+ iterate_progUi(progUi);
9929
+ return found;
9930
+ };
9947
9931
 
9948
9932
  // // set panels_obj
9949
9933
  // for await (const [elem_key, elem_val] of Object.entries($elm)) {
@@ -10014,8 +9998,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
10014
9998
  // found = progUi_str?.includes("@" + parameter_in_field_id);
10015
9999
  // if (found) return false;
10016
10000
 
10017
- // found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id)
10018
- // if (found) break
10001
+ found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
10002
+ if (found) break;
10019
10003
  }
10020
10004
  }
10021
10005