@xuda.io/runtime-bundle 1.0.966 → 1.0.968
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
|
@@ -8397,12 +8397,12 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8397
8397
|
if (UI_WORKER_OBJ.jobs.length) {
|
|
8398
8398
|
let running_job_children_elements = [];
|
|
8399
8399
|
let active_job_children_elements = [];
|
|
8400
|
-
for (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8400
|
+
for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8401
8401
|
try {
|
|
8402
8402
|
if (val.stat === 'busy') continue;
|
|
8403
8403
|
|
|
8404
8404
|
if (!val.elementP) {
|
|
8405
|
-
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8405
|
+
await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8406
8406
|
continue;
|
|
8407
8407
|
}
|
|
8408
8408
|
|
|
@@ -8410,42 +8410,42 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8410
8410
|
if (!active_xu_ui_id) continue;
|
|
8411
8411
|
|
|
8412
8412
|
const running_job_obj = UI_WORKER_OBJ.jobs[0];
|
|
8413
|
+
if (running_job_obj.job_num !== val.job_num) {
|
|
8414
|
+
const running_xu_ui_id = running_job_obj?.elementP?.attr('xu-ui-id');
|
|
8415
|
+
if (!running_xu_ui_id) continue;
|
|
8416
|
+
|
|
8417
|
+
$.each(running_job_obj.elementP.find('*'), function (key, val) {
|
|
8418
|
+
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8419
|
+
if (!xu_ui_id) return true;
|
|
8420
|
+
running_job_children_elements.push(xu_ui_id);
|
|
8421
|
+
});
|
|
8413
8422
|
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8419
|
-
if (!xu_ui_id) return true;
|
|
8420
|
-
running_job_children_elements.push(xu_ui_id);
|
|
8421
|
-
});
|
|
8422
|
-
|
|
8423
|
-
$.each(val.elementP.find('*'), function (key, val) {
|
|
8424
|
-
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8425
|
-
if (!xu_ui_id) return true;
|
|
8426
|
-
active_job_children_elements.push(xu_ui_id);
|
|
8427
|
-
});
|
|
8428
|
-
|
|
8429
|
-
// skip - if job element exist in the active job ui as child element
|
|
8430
|
-
if (running_job_children_elements.includes(active_xu_ui_id)) {
|
|
8431
|
-
continue;
|
|
8432
|
-
}
|
|
8433
|
-
|
|
8434
|
-
// abort - if active job element exist in the current job ui (parent element changed)
|
|
8435
|
-
if (active_job_children_elements.includes(running_xu_ui_id)) {
|
|
8436
|
-
$.each(active_job_children_elements, function (key, val) {
|
|
8437
|
-
const $elm = $(`[xu-ui-id=${val}]`);
|
|
8438
|
-
if (!$elm.length) return true;
|
|
8439
|
-
if (!$elm.data().xuData) return true;
|
|
8440
|
-
$elm.data().xuData.pending_to_delete = true;
|
|
8423
|
+
$.each(val.elementP.find('*'), function (key, val) {
|
|
8424
|
+
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8425
|
+
if (!xu_ui_id) return true;
|
|
8426
|
+
active_job_children_elements.push(xu_ui_id);
|
|
8441
8427
|
});
|
|
8442
8428
|
|
|
8443
|
-
|
|
8429
|
+
// skip - if job element exist in the active job ui as child element
|
|
8430
|
+
if (running_job_children_elements.includes(active_xu_ui_id)) {
|
|
8431
|
+
continue;
|
|
8432
|
+
}
|
|
8433
|
+
|
|
8434
|
+
// abort - if active job element exist in the current job ui (parent element changed)
|
|
8435
|
+
if (active_job_children_elements.includes(running_xu_ui_id)) {
|
|
8436
|
+
$.each(active_job_children_elements, function (key, val) {
|
|
8437
|
+
const $elm = $(`[xu-ui-id=${val}]`);
|
|
8438
|
+
if (!$elm.length) return true;
|
|
8439
|
+
if (!$elm.data().xuData) return true;
|
|
8440
|
+
$elm.data().xuData.pending_to_delete = true;
|
|
8441
|
+
});
|
|
8442
|
+
}
|
|
8443
|
+
await func.UI.worker.delete_job(SESSION_ID, running_job_obj.job_num);
|
|
8444
8444
|
break;
|
|
8445
8445
|
}
|
|
8446
8446
|
|
|
8447
8447
|
// execute - if active job element not exist the current job ui and not detected as parent element
|
|
8448
|
-
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8448
|
+
await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8449
8449
|
continue;
|
|
8450
8450
|
|
|
8451
8451
|
// active_job_children_elements = [];
|
|
@@ -8398,12 +8398,12 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8398
8398
|
if (UI_WORKER_OBJ.jobs.length) {
|
|
8399
8399
|
let running_job_children_elements = [];
|
|
8400
8400
|
let active_job_children_elements = [];
|
|
8401
|
-
for (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8401
|
+
for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8402
8402
|
try {
|
|
8403
8403
|
if (val.stat === 'busy') continue;
|
|
8404
8404
|
|
|
8405
8405
|
if (!val.elementP) {
|
|
8406
|
-
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8406
|
+
await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8407
8407
|
continue;
|
|
8408
8408
|
}
|
|
8409
8409
|
|
|
@@ -8411,42 +8411,42 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8411
8411
|
if (!active_xu_ui_id) continue;
|
|
8412
8412
|
|
|
8413
8413
|
const running_job_obj = UI_WORKER_OBJ.jobs[0];
|
|
8414
|
+
if (running_job_obj.job_num !== val.job_num) {
|
|
8415
|
+
const running_xu_ui_id = running_job_obj?.elementP?.attr('xu-ui-id');
|
|
8416
|
+
if (!running_xu_ui_id) continue;
|
|
8417
|
+
|
|
8418
|
+
$.each(running_job_obj.elementP.find('*'), function (key, val) {
|
|
8419
|
+
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8420
|
+
if (!xu_ui_id) return true;
|
|
8421
|
+
running_job_children_elements.push(xu_ui_id);
|
|
8422
|
+
});
|
|
8414
8423
|
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8420
|
-
if (!xu_ui_id) return true;
|
|
8421
|
-
running_job_children_elements.push(xu_ui_id);
|
|
8422
|
-
});
|
|
8423
|
-
|
|
8424
|
-
$.each(val.elementP.find('*'), function (key, val) {
|
|
8425
|
-
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8426
|
-
if (!xu_ui_id) return true;
|
|
8427
|
-
active_job_children_elements.push(xu_ui_id);
|
|
8428
|
-
});
|
|
8429
|
-
|
|
8430
|
-
// skip - if job element exist in the active job ui as child element
|
|
8431
|
-
if (running_job_children_elements.includes(active_xu_ui_id)) {
|
|
8432
|
-
continue;
|
|
8433
|
-
}
|
|
8434
|
-
|
|
8435
|
-
// abort - if active job element exist in the current job ui (parent element changed)
|
|
8436
|
-
if (active_job_children_elements.includes(running_xu_ui_id)) {
|
|
8437
|
-
$.each(active_job_children_elements, function (key, val) {
|
|
8438
|
-
const $elm = $(`[xu-ui-id=${val}]`);
|
|
8439
|
-
if (!$elm.length) return true;
|
|
8440
|
-
if (!$elm.data().xuData) return true;
|
|
8441
|
-
$elm.data().xuData.pending_to_delete = true;
|
|
8424
|
+
$.each(val.elementP.find('*'), function (key, val) {
|
|
8425
|
+
const xu_ui_id = $(val).attr('xu-ui-id');
|
|
8426
|
+
if (!xu_ui_id) return true;
|
|
8427
|
+
active_job_children_elements.push(xu_ui_id);
|
|
8442
8428
|
});
|
|
8443
8429
|
|
|
8444
|
-
|
|
8430
|
+
// skip - if job element exist in the active job ui as child element
|
|
8431
|
+
if (running_job_children_elements.includes(active_xu_ui_id)) {
|
|
8432
|
+
continue;
|
|
8433
|
+
}
|
|
8434
|
+
|
|
8435
|
+
// abort - if active job element exist in the current job ui (parent element changed)
|
|
8436
|
+
if (active_job_children_elements.includes(running_xu_ui_id)) {
|
|
8437
|
+
$.each(active_job_children_elements, function (key, val) {
|
|
8438
|
+
const $elm = $(`[xu-ui-id=${val}]`);
|
|
8439
|
+
if (!$elm.length) return true;
|
|
8440
|
+
if (!$elm.data().xuData) return true;
|
|
8441
|
+
$elm.data().xuData.pending_to_delete = true;
|
|
8442
|
+
});
|
|
8443
|
+
}
|
|
8444
|
+
await func.UI.worker.delete_job(SESSION_ID, running_job_obj.job_num);
|
|
8445
8445
|
break;
|
|
8446
8446
|
}
|
|
8447
8447
|
|
|
8448
8448
|
// execute - if active job element not exist the current job ui and not detected as parent element
|
|
8449
|
-
func.UI.worker.execute(val.SESSION_ID, val);
|
|
8449
|
+
await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8450
8450
|
continue;
|
|
8451
8451
|
|
|
8452
8452
|
// active_job_children_elements = [];
|