@xuda.io/runtime-bundle 1.0.406 → 1.0.407
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.
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -9064,6 +9064,33 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9064
9064
|
SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
|
|
9065
9065
|
}
|
|
9066
9066
|
};
|
|
9067
|
+
|
|
9068
|
+
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop) {
|
|
9069
|
+
let elm_node;
|
|
9070
|
+
const iterate_progUi = function (node) {
|
|
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;
|
|
9080
|
+
}
|
|
9081
|
+
}
|
|
9082
|
+
}
|
|
9083
|
+
}
|
|
9084
|
+
if (elm_node) break;
|
|
9085
|
+
|
|
9086
|
+
if (item.children) {
|
|
9087
|
+
iterate_progUi(item.children);
|
|
9088
|
+
}
|
|
9089
|
+
}
|
|
9090
|
+
};
|
|
9091
|
+
iterate_progUi(progUi);
|
|
9092
|
+
return elm_node;
|
|
9093
|
+
};
|
|
9067
9094
|
func.events = {};
|
|
9068
9095
|
func.events.validate = async function (SESSION_ID, triggerP, dsSessionP, eventIdP, sourceP, argumentsP, return_validation_onlyP) {
|
|
9069
9096
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -11558,7 +11585,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11558
11585
|
}
|
|
11559
11586
|
}
|
|
11560
11587
|
}
|
|
11561
|
-
|
|
11588
|
+
if (found) break;
|
|
11562
11589
|
|
|
11563
11590
|
if (item.children) {
|
|
11564
11591
|
await iterate_progUi(item.children, item.id);
|
|
@@ -11578,6 +11605,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11578
11605
|
const progUi = $xu_embed_div?.data()?.xuData?.screenInfo?.progUi;
|
|
11579
11606
|
if (progUi) {
|
|
11580
11607
|
await iterate_field_in_progUi(progUi, field_id);
|
|
11608
|
+
// find invisible panels
|
|
11609
|
+
const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, 'xu-panel');
|
|
11610
|
+
console.log('elm_node', elm_node);
|
|
11581
11611
|
}
|
|
11582
11612
|
}
|
|
11583
11613
|
// run panels
|
|
@@ -11588,8 +11618,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11588
11618
|
}
|
|
11589
11619
|
}
|
|
11590
11620
|
|
|
11591
|
-
// }
|
|
11592
|
-
|
|
11593
11621
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
11594
11622
|
};
|
|
11595
11623
|
|
|
@@ -11598,28 +11626,28 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11598
11626
|
|
|
11599
11627
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
11600
11628
|
|
|
11601
|
-
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
};
|
|
11629
|
+
// const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
11630
|
+
// let found;
|
|
11631
|
+
// const iterate_progUi = function (node) {
|
|
11632
|
+
// for (let item of node) {
|
|
11633
|
+
// // if (item.tagName === "xu-panel") {
|
|
11634
|
+
// if (!_.isEmpty(item.attributes)) {
|
|
11635
|
+
// for (const [attr, val] of Object.entries(item.attributes)) {
|
|
11636
|
+
// if (attr === `xu-exp:${prop}`) {
|
|
11637
|
+
// found = val.includes('@' + field_id);
|
|
11638
|
+
// }
|
|
11639
|
+
// }
|
|
11640
|
+
// }
|
|
11641
|
+
// if (found) break;
|
|
11642
|
+
// // }
|
|
11643
|
+
// if (item.children) {
|
|
11644
|
+
// iterate_progUi(item.children);
|
|
11645
|
+
// }
|
|
11646
|
+
// }
|
|
11647
|
+
// };
|
|
11648
|
+
// iterate_progUi(progUi);
|
|
11649
|
+
// return found;
|
|
11650
|
+
// };
|
|
11623
11651
|
|
|
11624
11652
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
11625
11653
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
@@ -11656,7 +11684,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11656
11684
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
11657
11685
|
if (found) break;
|
|
11658
11686
|
|
|
11659
|
-
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
11687
|
+
// found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
11688
|
+
found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
11660
11689
|
if (found) break;
|
|
11661
11690
|
}
|
|
11662
11691
|
}
|
|
@@ -11943,6 +11972,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11943
11972
|
// Start observing the target node for configured mutations
|
|
11944
11973
|
observer.observe(targetNode, config);
|
|
11945
11974
|
|
|
11975
|
+
// Later, you can stop observing
|
|
11976
|
+
// observer.disconnect();
|
|
11977
|
+
|
|
11946
11978
|
return {};
|
|
11947
11979
|
},
|
|
11948
11980
|
'xu-bind': async function ($elm, val) {
|
|
@@ -9065,6 +9065,33 @@ func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
|
9065
9065
|
SYS_GLOBAL_OBJ_REFS[ref_field_id].xu_ui_id = $elm.attr('xu-ui-id');
|
|
9066
9066
|
}
|
|
9067
9067
|
};
|
|
9068
|
+
|
|
9069
|
+
func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop) {
|
|
9070
|
+
let elm_node;
|
|
9071
|
+
const iterate_progUi = function (node) {
|
|
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;
|
|
9081
|
+
}
|
|
9082
|
+
}
|
|
9083
|
+
}
|
|
9084
|
+
}
|
|
9085
|
+
if (elm_node) break;
|
|
9086
|
+
|
|
9087
|
+
if (item.children) {
|
|
9088
|
+
iterate_progUi(item.children);
|
|
9089
|
+
}
|
|
9090
|
+
}
|
|
9091
|
+
};
|
|
9092
|
+
iterate_progUi(progUi);
|
|
9093
|
+
return elm_node;
|
|
9094
|
+
};
|
|
9068
9095
|
func.UI.screen = {};
|
|
9069
9096
|
func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callingDataSource_objP, $callingContainerP, triggerIdP, rowIdP, jobNoP, is_panelP, parameters_obj_inP, source_functionP, call_screen_propertiesP) {
|
|
9070
9097
|
if (!prog_id) return console.error('program is empty');
|
|
@@ -9631,7 +9658,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9631
9658
|
}
|
|
9632
9659
|
}
|
|
9633
9660
|
}
|
|
9634
|
-
|
|
9661
|
+
if (found) break;
|
|
9635
9662
|
|
|
9636
9663
|
if (item.children) {
|
|
9637
9664
|
await iterate_progUi(item.children, item.id);
|
|
@@ -9651,6 +9678,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9651
9678
|
const progUi = $xu_embed_div?.data()?.xuData?.screenInfo?.progUi;
|
|
9652
9679
|
if (progUi) {
|
|
9653
9680
|
await iterate_field_in_progUi(progUi, field_id);
|
|
9681
|
+
// find invisible panels
|
|
9682
|
+
const elm_node = func.UI.find_field_in_progUi_attributes(progUi, field_id, 'xu-panel');
|
|
9683
|
+
console.log('elm_node', elm_node);
|
|
9654
9684
|
}
|
|
9655
9685
|
}
|
|
9656
9686
|
// run panels
|
|
@@ -9661,8 +9691,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9661
9691
|
}
|
|
9662
9692
|
}
|
|
9663
9693
|
|
|
9664
|
-
// }
|
|
9665
|
-
|
|
9666
9694
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
9667
9695
|
};
|
|
9668
9696
|
|
|
@@ -9671,28 +9699,28 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9671
9699
|
|
|
9672
9700
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
9673
9701
|
|
|
9674
|
-
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
};
|
|
9702
|
+
// const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
9703
|
+
// let found;
|
|
9704
|
+
// const iterate_progUi = function (node) {
|
|
9705
|
+
// for (let item of node) {
|
|
9706
|
+
// // if (item.tagName === "xu-panel") {
|
|
9707
|
+
// if (!_.isEmpty(item.attributes)) {
|
|
9708
|
+
// for (const [attr, val] of Object.entries(item.attributes)) {
|
|
9709
|
+
// if (attr === `xu-exp:${prop}`) {
|
|
9710
|
+
// found = val.includes('@' + field_id);
|
|
9711
|
+
// }
|
|
9712
|
+
// }
|
|
9713
|
+
// }
|
|
9714
|
+
// if (found) break;
|
|
9715
|
+
// // }
|
|
9716
|
+
// if (item.children) {
|
|
9717
|
+
// iterate_progUi(item.children);
|
|
9718
|
+
// }
|
|
9719
|
+
// }
|
|
9720
|
+
// };
|
|
9721
|
+
// iterate_progUi(progUi);
|
|
9722
|
+
// return found;
|
|
9723
|
+
// };
|
|
9696
9724
|
|
|
9697
9725
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9698
9726
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
@@ -9729,7 +9757,8 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9729
9757
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
9730
9758
|
if (found) break;
|
|
9731
9759
|
|
|
9732
|
-
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
9760
|
+
// found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
9761
|
+
found = func.UI.find_field_in_progUi_attributes(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
9733
9762
|
if (found) break;
|
|
9734
9763
|
}
|
|
9735
9764
|
}
|
|
@@ -10016,6 +10045,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10016
10045
|
// Start observing the target node for configured mutations
|
|
10017
10046
|
observer.observe(targetNode, config);
|
|
10018
10047
|
|
|
10048
|
+
// Later, you can stop observing
|
|
10049
|
+
// observer.disconnect();
|
|
10050
|
+
|
|
10019
10051
|
return {};
|
|
10020
10052
|
},
|
|
10021
10053
|
'xu-bind': async function ($elm, val) {
|