@xuda.io/runtime-bundle 1.0.351 → 1.0.353
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.
|
@@ -27809,62 +27809,6 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
|
|
|
27809
27809
|
func.UI.worker = {};
|
|
27810
27810
|
func.UI.worker.ID = null;
|
|
27811
27811
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
27812
|
-
// var _session = SESSION_OBJ[SESSION_ID];
|
|
27813
|
-
|
|
27814
|
-
// function getWorkerURL(url) {
|
|
27815
|
-
// const content = `importScripts( "${url}" );`;
|
|
27816
|
-
// return URL.createObjectURL(
|
|
27817
|
-
// new Blob([content], { type: "text/javascript" })
|
|
27818
|
-
// );
|
|
27819
|
-
// }
|
|
27820
|
-
|
|
27821
|
-
// let blob = getWorkerURL(
|
|
27822
|
-
// func.common.get_url(
|
|
27823
|
-
// SESSION_ID,
|
|
27824
|
-
// "dist",
|
|
27825
|
-
// func.utils.get_resource_filename(
|
|
27826
|
-
// _session.engine_mode === "live_preview"
|
|
27827
|
-
// ? ""
|
|
27828
|
-
// : _session?.opt?.app_build_id,
|
|
27829
|
-
// "runtime/js/xuda_UI_worker.js"
|
|
27830
|
-
// )
|
|
27831
|
-
// )
|
|
27832
|
-
// );
|
|
27833
|
-
|
|
27834
|
-
// func.UI.worker.ID = new Worker(blob, {
|
|
27835
|
-
// name: "xuda UI worker ",
|
|
27836
|
-
// });
|
|
27837
|
-
|
|
27838
|
-
// func.UI.worker.ID.postMessage({ method: "init" });
|
|
27839
|
-
|
|
27840
|
-
// func.UI.worker.ID.addEventListener(
|
|
27841
|
-
// "message",
|
|
27842
|
-
// function (e) {
|
|
27843
|
-
// if (e.data.dsSessionP && !_session.DS_GLB[e.data.dsSessionP]) {
|
|
27844
|
-
// func.UI.worker.delete_job(e.data.job_num);
|
|
27845
|
-
// }
|
|
27846
|
-
|
|
27847
|
-
// let queue_obj = e.data;
|
|
27848
|
-
|
|
27849
|
-
// queue_obj.elementP = $(`[xu-ui-id=${queue_obj.xu_ui_id}]`);
|
|
27850
|
-
|
|
27851
|
-
// if (queue_obj?.paramsP?.elem_val?.elm_xu_ui_id) {
|
|
27852
|
-
// queue_obj.paramsP.elem_val.$elm = $(
|
|
27853
|
-
// `[xu-ui-id=${queue_obj.paramsP.elem_val.elm_xu_ui_id}]`
|
|
27854
|
-
// );
|
|
27855
|
-
// }
|
|
27856
|
-
|
|
27857
|
-
// func.UI.worker.execute(SESSION_ID, queue_obj);
|
|
27858
|
-
// },
|
|
27859
|
-
// false
|
|
27860
|
-
// );
|
|
27861
|
-
|
|
27862
|
-
// setInterval(async function () {
|
|
27863
|
-
// func.UI.garbage_collector();
|
|
27864
|
-
// }, 10000);
|
|
27865
|
-
|
|
27866
|
-
// return;
|
|
27867
|
-
|
|
27868
27812
|
$.fn.isInViewport = function () {
|
|
27869
27813
|
var elementTop = $(this).offset().top;
|
|
27870
27814
|
var elementBottom = elementTop + $(this).outerHeight();
|
|
@@ -27921,8 +27865,12 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
27921
27865
|
this._interval = setInterval(job_iterator, 1);
|
|
27922
27866
|
|
|
27923
27867
|
setInterval(async function () {
|
|
27924
|
-
func.UI.
|
|
27868
|
+
func.UI.ds_garbage_collector();
|
|
27925
27869
|
}, 10000);
|
|
27870
|
+
|
|
27871
|
+
setInterval(async function () {
|
|
27872
|
+
func.UI.refs_garbage_collector();
|
|
27873
|
+
}, 1000);
|
|
27926
27874
|
};
|
|
27927
27875
|
func.UI.worker.add_to_queue = async function (SESSION_ID, source, functionP, paramsP, calling_job, elementP, dsSession, calling_trigger_prop) {
|
|
27928
27876
|
// try {
|
|
@@ -28200,7 +28148,7 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
28200
28148
|
return ret;
|
|
28201
28149
|
};
|
|
28202
28150
|
|
|
28203
|
-
func.UI.
|
|
28151
|
+
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
28204
28152
|
// return;
|
|
28205
28153
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
28206
28154
|
|
|
@@ -28208,11 +28156,11 @@ func.UI.garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0],
|
|
|
28208
28156
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
28209
28157
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
28210
28158
|
|
|
28211
|
-
for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
28212
|
-
|
|
28213
|
-
|
|
28214
|
-
|
|
28215
|
-
}
|
|
28159
|
+
// for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
28160
|
+
// if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
28161
|
+
// delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
28162
|
+
// }
|
|
28163
|
+
// }
|
|
28216
28164
|
|
|
28217
28165
|
let abort;
|
|
28218
28166
|
|
|
@@ -28259,6 +28207,16 @@ func.UI.garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0],
|
|
|
28259
28207
|
for (const val of ds_pending_to_delete) {
|
|
28260
28208
|
func.datasource.del(SESSION_ID, val);
|
|
28261
28209
|
}
|
|
28210
|
+
};
|
|
28211
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
28212
|
+
let _session = SESSION_OBJ[SESSION_ID];
|
|
28213
|
+
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
28214
|
+
|
|
28215
|
+
for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
28216
|
+
if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
28217
|
+
delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
28218
|
+
}
|
|
28219
|
+
}
|
|
28262
28220
|
};
|
|
28263
28221
|
func.datasource = {};
|
|
28264
28222
|
func.datasource.create = async function (
|