@xuda.io/runtime-bundle 1.0.420 → 1.0.421
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
|
@@ -8628,6 +8628,39 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
|
|
|
8628
8628
|
return panels_obj;
|
|
8629
8629
|
};
|
|
8630
8630
|
|
|
8631
|
+
func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embed_container, ignore_disableAutoRefresh) {
|
|
8632
|
+
const $elm = func.UI.utils.find_in_element_data('xuPanelWrapper', $(SESSION_OBJ[SESSION_ID].root_element), 'isWrapper');
|
|
8633
|
+
var panels_obj = {};
|
|
8634
|
+
|
|
8635
|
+
// set panels_obj
|
|
8636
|
+
for (const [elem_key, elem_val] of Object.entries($elm)) {
|
|
8637
|
+
if (elem_key === 'length') break;
|
|
8638
|
+
var $div = $(elem_val);
|
|
8639
|
+
|
|
8640
|
+
const panelXuAttributes = $div?.xuPanelWrapper?.panelXuAttributes;
|
|
8641
|
+
let prog_id = panelXuAttributes?.program;
|
|
8642
|
+
const exp = panelXuAttributes?.['xu-exp:program'];
|
|
8643
|
+
if (exp) {
|
|
8644
|
+
let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
|
|
8645
|
+
prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
|
|
8646
|
+
}
|
|
8647
|
+
|
|
8648
|
+
if (!ignore_disableAutoRefresh && _ds.tree_obj.disableAutoRefresh) {
|
|
8649
|
+
continue;
|
|
8650
|
+
}
|
|
8651
|
+
|
|
8652
|
+
const parent_element_ui_id = $div.data().xuPanelData.parent_element_ui_id;
|
|
8653
|
+
if (!panels_obj[parent_element_ui_id]) {
|
|
8654
|
+
panels_obj[$div.attr('xu-ui-id')] = {
|
|
8655
|
+
prog_id,
|
|
8656
|
+
panelXuAttributes,
|
|
8657
|
+
};
|
|
8658
|
+
}
|
|
8659
|
+
}
|
|
8660
|
+
|
|
8661
|
+
return panels_obj;
|
|
8662
|
+
};
|
|
8663
|
+
|
|
8631
8664
|
func.UI.worker = {};
|
|
8632
8665
|
func.UI.worker.ID = null;
|
|
8633
8666
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
@@ -11604,8 +11637,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11604
11637
|
};
|
|
11605
11638
|
|
|
11606
11639
|
const $xu_embed_container = $('.xu_embed_container');
|
|
11607
|
-
const panels_obj = func.UI.utils.
|
|
11608
|
-
let inviable_panels_obj = {};
|
|
11640
|
+
const panels_obj = func.UI.utils.get_panels_wrapper_from_dom(SESSION_ID, $xu_embed_container, true);
|
|
11641
|
+
// let inviable_panels_obj = {};
|
|
11609
11642
|
|
|
11610
11643
|
for await (const field_id of fields_arr) {
|
|
11611
11644
|
// run root
|
|
@@ -11627,7 +11660,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11627
11660
|
}
|
|
11628
11661
|
// run panels
|
|
11629
11662
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
11630
|
-
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.
|
|
11663
|
+
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.prog_id);
|
|
11631
11664
|
await iterate_field_in_progUi(prog_doc.progUi, field_id);
|
|
11632
11665
|
}
|
|
11633
11666
|
|
|
@@ -12943,7 +12976,7 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
12943
12976
|
};
|
|
12944
12977
|
var $old_panel_div = find_old_panels_elements();
|
|
12945
12978
|
const set_xuPanelData_to_the_new_rendered_items = (_) => {
|
|
12946
|
-
$container.data().xuPanelWrapper = true;
|
|
12979
|
+
$container.data().xuPanelWrapper = { isWrapper: true, panelXuAttributes: _.clone($wrapper.data().xuAttributes) };
|
|
12947
12980
|
$.each($wrapper.children(), function (key, val) {
|
|
12948
12981
|
if (!$(val).data().xuPanelData) {
|
|
12949
12982
|
$(val).data().xuPanelData = {};
|
|
@@ -8629,6 +8629,39 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
|
|
|
8629
8629
|
return panels_obj;
|
|
8630
8630
|
};
|
|
8631
8631
|
|
|
8632
|
+
func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embed_container, ignore_disableAutoRefresh) {
|
|
8633
|
+
const $elm = func.UI.utils.find_in_element_data('xuPanelWrapper', $(SESSION_OBJ[SESSION_ID].root_element), 'isWrapper');
|
|
8634
|
+
var panels_obj = {};
|
|
8635
|
+
|
|
8636
|
+
// set panels_obj
|
|
8637
|
+
for (const [elem_key, elem_val] of Object.entries($elm)) {
|
|
8638
|
+
if (elem_key === 'length') break;
|
|
8639
|
+
var $div = $(elem_val);
|
|
8640
|
+
|
|
8641
|
+
const panelXuAttributes = $div?.xuPanelWrapper?.panelXuAttributes;
|
|
8642
|
+
let prog_id = panelXuAttributes?.program;
|
|
8643
|
+
const exp = panelXuAttributes?.['xu-exp:program'];
|
|
8644
|
+
if (exp) {
|
|
8645
|
+
let exp_ret = await func.expression.get(SESSION_ID, exp, $xu_embed_container?.data()?.xuData?.paramsP?.dsSessionP, 'UI Attr EXP');
|
|
8646
|
+
prog_id = func.UI.screen.fix_val_defaults('program', exp_ret.result);
|
|
8647
|
+
}
|
|
8648
|
+
|
|
8649
|
+
if (!ignore_disableAutoRefresh && _ds.tree_obj.disableAutoRefresh) {
|
|
8650
|
+
continue;
|
|
8651
|
+
}
|
|
8652
|
+
|
|
8653
|
+
const parent_element_ui_id = $div.data().xuPanelData.parent_element_ui_id;
|
|
8654
|
+
if (!panels_obj[parent_element_ui_id]) {
|
|
8655
|
+
panels_obj[$div.attr('xu-ui-id')] = {
|
|
8656
|
+
prog_id,
|
|
8657
|
+
panelXuAttributes,
|
|
8658
|
+
};
|
|
8659
|
+
}
|
|
8660
|
+
}
|
|
8661
|
+
|
|
8662
|
+
return panels_obj;
|
|
8663
|
+
};
|
|
8664
|
+
|
|
8632
8665
|
func.UI.worker = {};
|
|
8633
8666
|
func.UI.worker.ID = null;
|
|
8634
8667
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
@@ -9677,8 +9710,8 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9677
9710
|
};
|
|
9678
9711
|
|
|
9679
9712
|
const $xu_embed_container = $('.xu_embed_container');
|
|
9680
|
-
const panels_obj = func.UI.utils.
|
|
9681
|
-
let inviable_panels_obj = {};
|
|
9713
|
+
const panels_obj = func.UI.utils.get_panels_wrapper_from_dom(SESSION_ID, $xu_embed_container, true);
|
|
9714
|
+
// let inviable_panels_obj = {};
|
|
9682
9715
|
|
|
9683
9716
|
for await (const field_id of fields_arr) {
|
|
9684
9717
|
// run root
|
|
@@ -9700,7 +9733,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9700
9733
|
}
|
|
9701
9734
|
// run panels
|
|
9702
9735
|
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9703
|
-
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.
|
|
9736
|
+
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, panel_val.prog_id);
|
|
9704
9737
|
await iterate_field_in_progUi(prog_doc.progUi, field_id);
|
|
9705
9738
|
}
|
|
9706
9739
|
|
|
@@ -11016,7 +11049,7 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
11016
11049
|
};
|
|
11017
11050
|
var $old_panel_div = find_old_panels_elements();
|
|
11018
11051
|
const set_xuPanelData_to_the_new_rendered_items = (_) => {
|
|
11019
|
-
$container.data().xuPanelWrapper = true;
|
|
11052
|
+
$container.data().xuPanelWrapper = { isWrapper: true, panelXuAttributes: _.clone($wrapper.data().xuAttributes) };
|
|
11020
11053
|
$.each($wrapper.children(), function (key, val) {
|
|
11021
11054
|
if (!$(val).data().xuPanelData) {
|
|
11022
11055
|
$(val).data().xuPanelData = {};
|