@xuda.io/runtime-bundle 1.0.573 → 1.0.574
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
|
@@ -8997,6 +8997,22 @@ func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)
|
|
|
8997
8997
|
}
|
|
8998
8998
|
};
|
|
8999
8999
|
|
|
9000
|
+
func.UI.teleport_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9001
|
+
if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
|
|
9002
|
+
// let dom to finish build
|
|
9003
|
+
return;
|
|
9004
|
+
}
|
|
9005
|
+
|
|
9006
|
+
const $teleport_elements = $(`[xu-teleport-parent-id='*node-`);
|
|
9007
|
+
|
|
9008
|
+
$.each($teleport_elements, (key, val) => {
|
|
9009
|
+
const xu_teleport_parent_id = $(val).attr('xu-teleport-parent-id');
|
|
9010
|
+
if (!$(`[xu-ui-id='${xu_teleport_parent_id}`)?.length) {
|
|
9011
|
+
$(val).remove();
|
|
9012
|
+
}
|
|
9013
|
+
});
|
|
9014
|
+
};
|
|
9015
|
+
|
|
9000
9016
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9001
9017
|
let ret;
|
|
9002
9018
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -12356,25 +12372,26 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12356
12372
|
const $teleport_elm = await func.UI.screen.render_ui_tree(SESSION_ID, $(val.value), node, parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, node, null, $root_container);
|
|
12357
12373
|
// $teleport_elm.data('xuTeleportParentId', );
|
|
12358
12374
|
$elm.data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
|
|
12359
|
-
|
|
12375
|
+
$teleport_elm.attr('xu-teleport-parent-id', $elm.attr('xu-ui-id'));
|
|
12376
|
+
// console.log($teleport_elm);
|
|
12360
12377
|
}
|
|
12361
12378
|
|
|
12362
|
-
// Select the node that will be observed for mutations
|
|
12363
|
-
const targetNode = $elm[0];
|
|
12379
|
+
// // Select the node that will be observed for mutations
|
|
12380
|
+
// const targetNode = $elm[0];
|
|
12364
12381
|
|
|
12365
|
-
// Options for the observer (which mutations to observe)
|
|
12366
|
-
const config = { attributes: true, childList: true, subtree: true };
|
|
12382
|
+
// // Options for the observer (which mutations to observe)
|
|
12383
|
+
// const config = { attributes: true, childList: true, subtree: true };
|
|
12367
12384
|
|
|
12368
|
-
// Callback function to execute when mutations are observed
|
|
12369
|
-
const callback = (mutationList, observer) => {
|
|
12370
|
-
|
|
12371
|
-
};
|
|
12385
|
+
// // Callback function to execute when mutations are observed
|
|
12386
|
+
// const callback = (mutationList, observer) => {
|
|
12387
|
+
// console.log(mutationList, observer);
|
|
12388
|
+
// };
|
|
12372
12389
|
|
|
12373
|
-
// Create an observer instance linked to the callback function
|
|
12374
|
-
const observer = new MutationObserver(callback);
|
|
12390
|
+
// // Create an observer instance linked to the callback function
|
|
12391
|
+
// const observer = new MutationObserver(callback);
|
|
12375
12392
|
|
|
12376
|
-
// Start observing the target node for configured mutations
|
|
12377
|
-
observer.observe(targetNode, config);
|
|
12393
|
+
// // Start observing the target node for configured mutations
|
|
12394
|
+
// observer.observe(targetNode, config);
|
|
12378
12395
|
}
|
|
12379
12396
|
return { abort: true };
|
|
12380
12397
|
},
|
|
@@ -8998,6 +8998,22 @@ func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)
|
|
|
8998
8998
|
}
|
|
8999
8999
|
};
|
|
9000
9000
|
|
|
9001
|
+
func.UI.teleport_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9002
|
+
if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
|
|
9003
|
+
// let dom to finish build
|
|
9004
|
+
return;
|
|
9005
|
+
}
|
|
9006
|
+
|
|
9007
|
+
const $teleport_elements = $(`[xu-teleport-parent-id='*node-`);
|
|
9008
|
+
|
|
9009
|
+
$.each($teleport_elements, (key, val) => {
|
|
9010
|
+
const xu_teleport_parent_id = $(val).attr('xu-teleport-parent-id');
|
|
9011
|
+
if (!$(`[xu-ui-id='${xu_teleport_parent_id}`)?.length) {
|
|
9012
|
+
$(val).remove();
|
|
9013
|
+
}
|
|
9014
|
+
});
|
|
9015
|
+
};
|
|
9016
|
+
|
|
9001
9017
|
func.UI.update_xu_ref = function (SESSION_ID, dsSessionP, ref_field_id, $elm) {
|
|
9002
9018
|
let ret;
|
|
9003
9019
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -10088,25 +10104,26 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10088
10104
|
const $teleport_elm = await func.UI.screen.render_ui_tree(SESSION_ID, $(val.value), node, parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, node, null, $root_container);
|
|
10089
10105
|
// $teleport_elm.data('xuTeleportParentId', );
|
|
10090
10106
|
$elm.data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
|
|
10091
|
-
|
|
10107
|
+
$teleport_elm.attr('xu-teleport-parent-id', $elm.attr('xu-ui-id'));
|
|
10108
|
+
// console.log($teleport_elm);
|
|
10092
10109
|
}
|
|
10093
10110
|
|
|
10094
|
-
// Select the node that will be observed for mutations
|
|
10095
|
-
const targetNode = $elm[0];
|
|
10111
|
+
// // Select the node that will be observed for mutations
|
|
10112
|
+
// const targetNode = $elm[0];
|
|
10096
10113
|
|
|
10097
|
-
// Options for the observer (which mutations to observe)
|
|
10098
|
-
const config = { attributes: true, childList: true, subtree: true };
|
|
10114
|
+
// // Options for the observer (which mutations to observe)
|
|
10115
|
+
// const config = { attributes: true, childList: true, subtree: true };
|
|
10099
10116
|
|
|
10100
|
-
// Callback function to execute when mutations are observed
|
|
10101
|
-
const callback = (mutationList, observer) => {
|
|
10102
|
-
|
|
10103
|
-
};
|
|
10117
|
+
// // Callback function to execute when mutations are observed
|
|
10118
|
+
// const callback = (mutationList, observer) => {
|
|
10119
|
+
// console.log(mutationList, observer);
|
|
10120
|
+
// };
|
|
10104
10121
|
|
|
10105
|
-
// Create an observer instance linked to the callback function
|
|
10106
|
-
const observer = new MutationObserver(callback);
|
|
10122
|
+
// // Create an observer instance linked to the callback function
|
|
10123
|
+
// const observer = new MutationObserver(callback);
|
|
10107
10124
|
|
|
10108
|
-
// Start observing the target node for configured mutations
|
|
10109
|
-
observer.observe(targetNode, config);
|
|
10125
|
+
// // Start observing the target node for configured mutations
|
|
10126
|
+
// observer.observe(targetNode, config);
|
|
10110
10127
|
}
|
|
10111
10128
|
return { abort: true };
|
|
10112
10129
|
},
|