@xuda.io/runtime-bundle 1.0.1263 → 1.0.1265
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.
|
@@ -27842,10 +27842,10 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
27842
27842
|
}
|
|
27843
27843
|
|
|
27844
27844
|
const fx = {
|
|
27845
|
-
update_datasource: async function () {
|
|
27845
|
+
update_datasource: async function (currentRecordId) {
|
|
27846
27846
|
if (queue_obj?.paramsP) {
|
|
27847
27847
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
|
|
27848
|
-
_ds.currentRecordId = queue_obj.paramsP.currentRecordId;
|
|
27848
|
+
_ds.currentRecordId = currentRecordId || queue_obj.paramsP.currentRecordId;
|
|
27849
27849
|
|
|
27850
27850
|
var datasource_changes = {
|
|
27851
27851
|
[_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
|
|
@@ -27983,6 +27983,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
27983
27983
|
render_viewport: async function () {
|
|
27984
27984
|
const { nodeP, $div, parent_infoP, $root_container, jobNoP, is_skeleton, paramsP, $container } = queue_obj?.paramsP || {};
|
|
27985
27985
|
if (nodeP?.children?.length && !$div.children().length) {
|
|
27986
|
+
await fx.update_datasource($div?.data()?.xuData?.currentRecordId);
|
|
27986
27987
|
$div.removeClass('skeleton');
|
|
27987
27988
|
for await (const [key, val] of Object.entries(nodeP.children)) {
|
|
27988
27989
|
const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $div, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
|
|
@@ -34049,28 +34050,28 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
34049
34050
|
|
|
34050
34051
|
// ALL
|
|
34051
34052
|
|
|
34052
|
-
function sortArrayByIncludedStrings(mainArray, searchStrings) {
|
|
34053
|
-
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
34057
|
-
|
|
34058
|
-
|
|
34059
|
-
|
|
34060
|
-
|
|
34061
|
-
|
|
34062
|
-
|
|
34063
|
-
|
|
34064
|
-
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34070
|
-
|
|
34071
|
-
}
|
|
34053
|
+
// function sortArrayByIncludedStrings(mainArray, searchStrings) {
|
|
34054
|
+
// return mainArray.sort((a, b) => {
|
|
34055
|
+
// // Check if 'a' includes any of the search strings
|
|
34056
|
+
// const aIncludesSearchString = searchStrings.some((str) => a[0].includes(str));
|
|
34057
|
+
// // Check if 'b' includes any of the search strings
|
|
34058
|
+
// const bIncludesSearchString = searchStrings.some((str) => b[0].includes(str));
|
|
34059
|
+
|
|
34060
|
+
// if (aIncludesSearchString && !bIncludesSearchString) {
|
|
34061
|
+
// // 'a' has a search string, 'b' doesn't, so 'a' comes first
|
|
34062
|
+
// return -1;
|
|
34063
|
+
// } else if (!aIncludesSearchString && bIncludesSearchString) {
|
|
34064
|
+
// // 'b' has a search string, 'a' doesn't, so 'b' comes first
|
|
34065
|
+
// return 1;
|
|
34066
|
+
// } else {
|
|
34067
|
+
// // Both or neither include a search string, maintain original relative order or use another sorting criteria
|
|
34068
|
+
// // For example, you could sort alphabetically here:
|
|
34069
|
+
// return 0; //a.localeCompare(b);
|
|
34070
|
+
// }
|
|
34071
|
+
// });
|
|
34072
|
+
// }
|
|
34072
34073
|
|
|
34073
|
-
const sortedAttrs = sortArrayByIncludedStrings(Object.entries(nodeP.attributes), ['xu-exp:xu-render', 'xu-render', 'xu-exp:program', 'program']);
|
|
34074
|
+
// const sortedAttrs = sortArrayByIncludedStrings(Object.entries(nodeP.attributes), ['xu-exp:xu-render', 'xu-render', 'xu-exp:program', 'program']);
|
|
34074
34075
|
|
|
34075
34076
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
34076
34077
|
if (_ret.abort || $container?.data()?.xuData?.pending_to_delete) break;
|