@xuda.io/runtime-bundle 1.0.405 → 1.0.406
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
|
@@ -11558,7 +11558,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11558
11558
|
}
|
|
11559
11559
|
}
|
|
11560
11560
|
}
|
|
11561
|
-
if (found) break;
|
|
11561
|
+
// if (found) break;
|
|
11562
11562
|
|
|
11563
11563
|
if (item.children) {
|
|
11564
11564
|
await iterate_progUi(item.children, item.id);
|
|
@@ -11594,8 +11594,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11594
11594
|
};
|
|
11595
11595
|
|
|
11596
11596
|
func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
11597
|
-
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
11598
|
-
|
|
11597
|
+
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
11598
|
+
|
|
11599
11599
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
11600
11600
|
|
|
11601
11601
|
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
@@ -11624,9 +11624,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11624
11624
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
11625
11625
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
11626
11626
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
11627
|
-
// const progUi_str = JSON.stringify(prog_doc.progUi);
|
|
11628
|
-
|
|
11629
|
-
// console.log("panel_val", panel_val)
|
|
11630
11627
|
|
|
11631
11628
|
var found;
|
|
11632
11629
|
if (fields_changed_arr) {
|
|
@@ -11646,7 +11643,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11646
11643
|
for (const [attr, value] of Object.entries(_attributes)) {
|
|
11647
11644
|
const pattern = /xu-exp:(\w+)/;
|
|
11648
11645
|
const match = attr.match(pattern);
|
|
11649
|
-
|
|
11646
|
+
|
|
11650
11647
|
if (!match) {
|
|
11651
11648
|
// continue if attribute is not expression
|
|
11652
11649
|
continue;
|
|
@@ -11659,9 +11656,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11659
11656
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
11660
11657
|
if (found) break;
|
|
11661
11658
|
|
|
11662
|
-
// found = progUi_str?.includes("@" + parameter_in_field_id);
|
|
11663
|
-
// if (found) return false;
|
|
11664
|
-
|
|
11665
11659
|
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
11666
11660
|
if (found) break;
|
|
11667
11661
|
}
|
|
@@ -11672,12 +11666,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11672
11666
|
// search field changed in the target program's progDataSource // @code
|
|
11673
11667
|
found = progDataSource_str?.includes('@' + field_id);
|
|
11674
11668
|
if (found) break;
|
|
11675
|
-
|
|
11676
|
-
// found = progUi_str?.includes("@" + field_id);
|
|
11677
|
-
// if (found) return false;
|
|
11678
|
-
|
|
11679
|
-
// found = find_field_in_progUi(prog_doc.progUi, field_id)
|
|
11680
|
-
// if (found) break
|
|
11681
11669
|
}
|
|
11682
11670
|
}
|
|
11683
11671
|
|
|
@@ -11694,26 +11682,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
11694
11682
|
|
|
11695
11683
|
// restore original panel
|
|
11696
11684
|
try {
|
|
11697
|
-
const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
11698
|
-
|
|
11699
|
-
// const old_ds = $($org_panel).data().xuData.paramsP.dsSessionP;
|
|
11700
|
-
// func.datasource.del(SESSION_ID, old_ds);
|
|
11685
|
+
// const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
11701
11686
|
|
|
11702
11687
|
const new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $div_elm, _.cloneDeep(panel_val.$div.data().xuPanelData.node), {}, $div_elm.data().xuData.paramsP, null, null, $div_elm.data().xuData.key, null, $div_elm.data().xuData.parent_node, null, $div_elm.data().xuData.$root_container);
|
|
11703
|
-
|
|
11704
|
-
// SESSION_ID,
|
|
11705
|
-
// $div_elm,
|
|
11706
|
-
// _.cloneDeep(panel_val.$div.data().xuPanelData.node),
|
|
11707
|
-
// {},
|
|
11708
|
-
// $org_panel.data().xuData.paramsP,
|
|
11709
|
-
// null,
|
|
11710
|
-
// null,
|
|
11711
|
-
// $org_panel.data().xuData.key,
|
|
11712
|
-
// null,
|
|
11713
|
-
// $org_panel.data().xuData.parent_node,
|
|
11714
|
-
// null,
|
|
11715
|
-
// $org_panel.data().xuData.$root_container
|
|
11716
|
-
// );
|
|
11688
|
+
|
|
11717
11689
|
// remove old panel content
|
|
11718
11690
|
$.each(panel_val.ids, async function (key, val) {
|
|
11719
11691
|
$("[xu-ui-id='" + val + "']").remove();
|
|
@@ -11963,14 +11935,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11963
11935
|
// Callback function to execute when mutations are observed
|
|
11964
11936
|
const callback = (mutationList, observer) => {
|
|
11965
11937
|
func.UI.screen.refresh_xu_attributes(SESSION_ID, [val.value]);
|
|
11966
|
-
// return;
|
|
11967
|
-
// for (const mutation of mutationList) {
|
|
11968
|
-
// if (mutation.type === 'childList') {
|
|
11969
|
-
// console.log('A child node has been added or removed.');
|
|
11970
|
-
// } else if (mutation.type === 'attributes') {
|
|
11971
|
-
// console.log(`The ${mutation.attributeName} attribute was modified.`);
|
|
11972
|
-
// }
|
|
11973
|
-
// }
|
|
11974
11938
|
};
|
|
11975
11939
|
|
|
11976
11940
|
// Create an observer instance linked to the callback function
|
|
@@ -9631,7 +9631,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9631
9631
|
}
|
|
9632
9632
|
}
|
|
9633
9633
|
}
|
|
9634
|
-
if (found) break;
|
|
9634
|
+
// if (found) break;
|
|
9635
9635
|
|
|
9636
9636
|
if (item.children) {
|
|
9637
9637
|
await iterate_progUi(item.children, item.id);
|
|
@@ -9667,8 +9667,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9667
9667
|
};
|
|
9668
9668
|
|
|
9669
9669
|
func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
9670
|
-
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
9671
|
-
|
|
9670
|
+
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
9671
|
+
|
|
9672
9672
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
9673
9673
|
|
|
9674
9674
|
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
@@ -9697,9 +9697,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9697
9697
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9698
9698
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
9699
9699
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
9700
|
-
// const progUi_str = JSON.stringify(prog_doc.progUi);
|
|
9701
|
-
|
|
9702
|
-
// console.log("panel_val", panel_val)
|
|
9703
9700
|
|
|
9704
9701
|
var found;
|
|
9705
9702
|
if (fields_changed_arr) {
|
|
@@ -9719,7 +9716,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9719
9716
|
for (const [attr, value] of Object.entries(_attributes)) {
|
|
9720
9717
|
const pattern = /xu-exp:(\w+)/;
|
|
9721
9718
|
const match = attr.match(pattern);
|
|
9722
|
-
|
|
9719
|
+
|
|
9723
9720
|
if (!match) {
|
|
9724
9721
|
// continue if attribute is not expression
|
|
9725
9722
|
continue;
|
|
@@ -9732,9 +9729,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9732
9729
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
9733
9730
|
if (found) break;
|
|
9734
9731
|
|
|
9735
|
-
// found = progUi_str?.includes("@" + parameter_in_field_id);
|
|
9736
|
-
// if (found) return false;
|
|
9737
|
-
|
|
9738
9732
|
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
9739
9733
|
if (found) break;
|
|
9740
9734
|
}
|
|
@@ -9745,12 +9739,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9745
9739
|
// search field changed in the target program's progDataSource // @code
|
|
9746
9740
|
found = progDataSource_str?.includes('@' + field_id);
|
|
9747
9741
|
if (found) break;
|
|
9748
|
-
|
|
9749
|
-
// found = progUi_str?.includes("@" + field_id);
|
|
9750
|
-
// if (found) return false;
|
|
9751
|
-
|
|
9752
|
-
// found = find_field_in_progUi(prog_doc.progUi, field_id)
|
|
9753
|
-
// if (found) break
|
|
9754
9742
|
}
|
|
9755
9743
|
}
|
|
9756
9744
|
|
|
@@ -9767,26 +9755,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9767
9755
|
|
|
9768
9756
|
// restore original panel
|
|
9769
9757
|
try {
|
|
9770
|
-
const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
9771
|
-
|
|
9772
|
-
// const old_ds = $($org_panel).data().xuData.paramsP.dsSessionP;
|
|
9773
|
-
// func.datasource.del(SESSION_ID, old_ds);
|
|
9758
|
+
// const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
9774
9759
|
|
|
9775
9760
|
const new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $div_elm, _.cloneDeep(panel_val.$div.data().xuPanelData.node), {}, $div_elm.data().xuData.paramsP, null, null, $div_elm.data().xuData.key, null, $div_elm.data().xuData.parent_node, null, $div_elm.data().xuData.$root_container);
|
|
9776
|
-
|
|
9777
|
-
// SESSION_ID,
|
|
9778
|
-
// $div_elm,
|
|
9779
|
-
// _.cloneDeep(panel_val.$div.data().xuPanelData.node),
|
|
9780
|
-
// {},
|
|
9781
|
-
// $org_panel.data().xuData.paramsP,
|
|
9782
|
-
// null,
|
|
9783
|
-
// null,
|
|
9784
|
-
// $org_panel.data().xuData.key,
|
|
9785
|
-
// null,
|
|
9786
|
-
// $org_panel.data().xuData.parent_node,
|
|
9787
|
-
// null,
|
|
9788
|
-
// $org_panel.data().xuData.$root_container
|
|
9789
|
-
// );
|
|
9761
|
+
|
|
9790
9762
|
// remove old panel content
|
|
9791
9763
|
$.each(panel_val.ids, async function (key, val) {
|
|
9792
9764
|
$("[xu-ui-id='" + val + "']").remove();
|
|
@@ -10036,14 +10008,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10036
10008
|
// Callback function to execute when mutations are observed
|
|
10037
10009
|
const callback = (mutationList, observer) => {
|
|
10038
10010
|
func.UI.screen.refresh_xu_attributes(SESSION_ID, [val.value]);
|
|
10039
|
-
// return;
|
|
10040
|
-
// for (const mutation of mutationList) {
|
|
10041
|
-
// if (mutation.type === 'childList') {
|
|
10042
|
-
// console.log('A child node has been added or removed.');
|
|
10043
|
-
// } else if (mutation.type === 'attributes') {
|
|
10044
|
-
// console.log(`The ${mutation.attributeName} attribute was modified.`);
|
|
10045
|
-
// }
|
|
10046
|
-
// }
|
|
10047
10011
|
};
|
|
10048
10012
|
|
|
10049
10013
|
// Create an observer instance linked to the callback function
|