@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.
|
@@ -31590,7 +31590,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31590
31590
|
}
|
|
31591
31591
|
}
|
|
31592
31592
|
}
|
|
31593
|
-
if (found) break;
|
|
31593
|
+
// if (found) break;
|
|
31594
31594
|
|
|
31595
31595
|
if (item.children) {
|
|
31596
31596
|
await iterate_progUi(item.children, item.id);
|
|
@@ -31626,8 +31626,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31626
31626
|
};
|
|
31627
31627
|
|
|
31628
31628
|
func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
31629
|
-
const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
31630
|
-
|
|
31629
|
+
// const $elm = func.UI.utils.find_in_element_data('xuPanelData', $(SESSION_OBJ[SESSION_ID].root_element), 'parent_element_ui_id');
|
|
31630
|
+
|
|
31631
31631
|
const panels_obj = func.UI.utils.get_panels_from_dom(SESSION_ID, false);
|
|
31632
31632
|
|
|
31633
31633
|
const find_field_in_progUi = function (progUi, field_id, prop) {
|
|
@@ -31656,9 +31656,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31656
31656
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
31657
31657
|
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val._ds.prog_id);
|
|
31658
31658
|
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
31659
|
-
// const progUi_str = JSON.stringify(prog_doc.progUi);
|
|
31660
|
-
|
|
31661
|
-
// console.log("panel_val", panel_val)
|
|
31662
31659
|
|
|
31663
31660
|
var found;
|
|
31664
31661
|
if (fields_changed_arr) {
|
|
@@ -31678,7 +31675,7 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31678
31675
|
for (const [attr, value] of Object.entries(_attributes)) {
|
|
31679
31676
|
const pattern = /xu-exp:(\w+)/;
|
|
31680
31677
|
const match = attr.match(pattern);
|
|
31681
|
-
|
|
31678
|
+
|
|
31682
31679
|
if (!match) {
|
|
31683
31680
|
// continue if attribute is not expression
|
|
31684
31681
|
continue;
|
|
@@ -31691,9 +31688,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31691
31688
|
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
31692
31689
|
if (found) break;
|
|
31693
31690
|
|
|
31694
|
-
// found = progUi_str?.includes("@" + parameter_in_field_id);
|
|
31695
|
-
// if (found) return false;
|
|
31696
|
-
|
|
31697
31691
|
found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
31698
31692
|
if (found) break;
|
|
31699
31693
|
}
|
|
@@ -31704,12 +31698,6 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31704
31698
|
// search field changed in the target program's progDataSource // @code
|
|
31705
31699
|
found = progDataSource_str?.includes('@' + field_id);
|
|
31706
31700
|
if (found) break;
|
|
31707
|
-
|
|
31708
|
-
// found = progUi_str?.includes("@" + field_id);
|
|
31709
|
-
// if (found) return false;
|
|
31710
|
-
|
|
31711
|
-
// found = find_field_in_progUi(prog_doc.progUi, field_id)
|
|
31712
|
-
// if (found) break
|
|
31713
31701
|
}
|
|
31714
31702
|
}
|
|
31715
31703
|
|
|
@@ -31726,26 +31714,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31726
31714
|
|
|
31727
31715
|
// restore original panel
|
|
31728
31716
|
try {
|
|
31729
|
-
const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
31730
|
-
|
|
31731
|
-
// const old_ds = $($org_panel).data().xuData.paramsP.dsSessionP;
|
|
31732
|
-
// func.datasource.del(SESSION_ID, old_ds);
|
|
31717
|
+
// const $org_panel = panel_val.$div.data().xuPanelData.$panel_div;
|
|
31733
31718
|
|
|
31734
31719
|
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);
|
|
31735
|
-
|
|
31736
|
-
// SESSION_ID,
|
|
31737
|
-
// $div_elm,
|
|
31738
|
-
// _.cloneDeep(panel_val.$div.data().xuPanelData.node),
|
|
31739
|
-
// {},
|
|
31740
|
-
// $org_panel.data().xuData.paramsP,
|
|
31741
|
-
// null,
|
|
31742
|
-
// null,
|
|
31743
|
-
// $org_panel.data().xuData.key,
|
|
31744
|
-
// null,
|
|
31745
|
-
// $org_panel.data().xuData.parent_node,
|
|
31746
|
-
// null,
|
|
31747
|
-
// $org_panel.data().xuData.$root_container
|
|
31748
|
-
// );
|
|
31720
|
+
|
|
31749
31721
|
// remove old panel content
|
|
31750
31722
|
$.each(panel_val.ids, async function (key, val) {
|
|
31751
31723
|
$("[xu-ui-id='" + val + "']").remove();
|
|
@@ -31995,14 +31967,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31995
31967
|
// Callback function to execute when mutations are observed
|
|
31996
31968
|
const callback = (mutationList, observer) => {
|
|
31997
31969
|
func.UI.screen.refresh_xu_attributes(SESSION_ID, [val.value]);
|
|
31998
|
-
// return;
|
|
31999
|
-
// for (const mutation of mutationList) {
|
|
32000
|
-
// if (mutation.type === 'childList') {
|
|
32001
|
-
// console.log('A child node has been added or removed.');
|
|
32002
|
-
// } else if (mutation.type === 'attributes') {
|
|
32003
|
-
// console.log(`The ${mutation.attributeName} attribute was modified.`);
|
|
32004
|
-
// }
|
|
32005
|
-
// }
|
|
32006
31970
|
};
|
|
32007
31971
|
|
|
32008
31972
|
// Create an observer instance linked to the callback function
|