@xuda.io/runtime-bundle 1.0.1387 → 1.0.1389
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.
|
@@ -33138,6 +33138,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
33138
33138
|
}
|
|
33139
33139
|
},
|
|
33140
33140
|
'xu-exp': async function ($elm, val) {
|
|
33141
|
+
// fix to prevent breaking the code executing func.expression.get-- Jan 7,26
|
|
33142
|
+
if (!SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP]) return {};
|
|
33143
|
+
|
|
33141
33144
|
let exp = val.value === null ? true : val.value;
|
|
33142
33145
|
|
|
33143
33146
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId, null, null, null, null, null, $elm.data().xuData.iterate_info);
|
|
@@ -34807,53 +34810,57 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
34807
34810
|
$panel_div, // the panel div
|
|
34808
34811
|
jobNoP,
|
|
34809
34812
|
) {
|
|
34810
|
-
|
|
34811
|
-
|
|
34812
|
-
|
|
34813
|
-
|
|
34814
|
-
|
|
34815
|
-
|
|
34816
|
-
|
|
34817
|
-
|
|
34818
|
-
|
|
34819
|
-
|
|
34820
|
-
|
|
34821
|
-
|
|
34822
|
-
|
|
34823
|
-
|
|
34824
|
-
|
|
34825
|
-
|
|
34826
|
-
|
|
34827
|
-
|
|
34828
|
-
|
|
34829
|
-
|
|
34830
|
-
|
|
34813
|
+
try {
|
|
34814
|
+
const _container_ds = SESSION_OBJ[SESSION_ID].DS_GLB[$container.data().xuData.paramsP.dsSessionP];
|
|
34815
|
+
const _ds = SESSION_OBJ[SESSION_ID].DS_GLB[$wrapper.data().xuData.paramsP.dsSessionP];
|
|
34816
|
+
const find_old_panels_elements = function () {
|
|
34817
|
+
return func.UI.utils.find_in_element_data('xuPanelData', $container.parent(), 'xu-ui-id', $container.data()?.xuPanelData?.xu_panel_xu_ui_id);
|
|
34818
|
+
};
|
|
34819
|
+
var $old_panel_div = find_old_panels_elements();
|
|
34820
|
+
const set_xuPanelData_to_the_new_rendered_items = () => {
|
|
34821
|
+
$container.data().xuPanelWrapper = { isWrapper: true, panelXuAttributes: _.clone($wrapper.data().xuAttributes), panelDivData: _.clone($wrapper.data()) };
|
|
34822
|
+
$container.attr('xu-panel-wrapper-id', $wrapper.attr('xu-ui-id'));
|
|
34823
|
+
$.each($wrapper.children(), function (key, val) {
|
|
34824
|
+
if (!$(val).data().xuPanelData) {
|
|
34825
|
+
$(val).data().xuPanelData = {};
|
|
34826
|
+
}
|
|
34827
|
+
$(val).data().xuPanelData.parent_element_ui_id = $old_panel_div?.length ? $container.parent().data().xuData.ui_id : $container.data().xuData.ui_id;
|
|
34828
|
+
|
|
34829
|
+
$(val).data().xuPanelData.xu_panel_xu_ui_id = (nodeP.xu_tree_id || nodeP.id) + '-' + _container_ds?.currentRecordId;
|
|
34830
|
+
$(val).data().xuPanelData.node = nodeP;
|
|
34831
|
+
$(val).data().xuPanelData.$panel_div = $panel_div.clone(true);
|
|
34832
|
+
});
|
|
34833
|
+
};
|
|
34834
|
+
set_xuPanelData_to_the_new_rendered_items();
|
|
34831
34835
|
|
|
34832
|
-
|
|
34833
|
-
|
|
34834
|
-
|
|
34835
|
-
|
|
34836
|
-
|
|
34837
|
-
|
|
34838
|
-
|
|
34839
|
-
|
|
34836
|
+
if ($old_panel_div?.length) {
|
|
34837
|
+
$($old_panel_div[0]).after($wrapper.children());
|
|
34838
|
+
} else {
|
|
34839
|
+
$.each($wrapper.children(), function (key, child) {
|
|
34840
|
+
$.each($container.children(), function (key, elm) {
|
|
34841
|
+
if ($(elm)?.data()?.xuData && $(elm)?.data()?.xuData?.elem_key === $(child)?.data()?.xuData?.elem_key) {
|
|
34842
|
+
$(elm).remove();
|
|
34843
|
+
}
|
|
34844
|
+
});
|
|
34845
|
+
$container.append($(child));
|
|
34840
34846
|
});
|
|
34841
|
-
|
|
34842
|
-
});
|
|
34843
|
-
}
|
|
34847
|
+
}
|
|
34844
34848
|
|
|
34845
|
-
|
|
34849
|
+
if (!$wrapper.data()?.xuData?.dsSession) return;
|
|
34846
34850
|
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
-
|
|
34851
|
+
if ($old_panel_div?.length) {
|
|
34852
|
+
$container.parent().data().xuData.paramsP.dsSessionP = _ds.parentDataSourceNo; // set the new ds when panel replaced
|
|
34853
|
+
} else {
|
|
34854
|
+
$container.data().xuData.paramsP.dsSessionP = _ds.parentDataSourceNo; // set the new ds when panel replaced
|
|
34855
|
+
}
|
|
34852
34856
|
|
|
34853
|
-
|
|
34854
|
-
|
|
34857
|
+
if ($old_panel_div?.length) {
|
|
34858
|
+
$old_panel_div.remove();
|
|
34859
|
+
}
|
|
34860
|
+
return jobNoP;
|
|
34861
|
+
} catch (error) {
|
|
34862
|
+
return jobNoP;
|
|
34855
34863
|
}
|
|
34856
|
-
return jobNoP;
|
|
34857
34864
|
};
|
|
34858
34865
|
|
|
34859
34866
|
// const generate_xu_ui_id = async function (SESSION_ID, nodeP, $container, paramsP, keyP) {
|