@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.
@@ -27532,12 +27532,12 @@ func.UI.worker.init = async function (SESSION_ID) {
27532
27532
  if (UI_WORKER_OBJ.jobs.length) {
27533
27533
  let running_job_children_elements = [];
27534
27534
  let active_job_children_elements = [];
27535
- for (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
27535
+ for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
27536
27536
  try {
27537
27537
  if (val.stat === 'busy') continue;
27538
27538
 
27539
27539
  if (!val.elementP) {
27540
- func.UI.worker.execute(val.SESSION_ID, val);
27540
+ await func.UI.worker.execute(val.SESSION_ID, val);
27541
27541
  continue;
27542
27542
  }
27543
27543
 
@@ -27545,42 +27545,42 @@ func.UI.worker.init = async function (SESSION_ID) {
27545
27545
  if (!active_xu_ui_id) continue;
27546
27546
 
27547
27547
  const running_job_obj = UI_WORKER_OBJ.jobs[0];
27548
+ if (running_job_obj.job_num !== val.job_num) {
27549
+ const running_xu_ui_id = running_job_obj?.elementP?.attr('xu-ui-id');
27550
+ if (!running_xu_ui_id) continue;
27551
+
27552
+ $.each(running_job_obj.elementP.find('*'), function (key, val) {
27553
+ const xu_ui_id = $(val).attr('xu-ui-id');
27554
+ if (!xu_ui_id) return true;
27555
+ running_job_children_elements.push(xu_ui_id);
27556
+ });
27548
27557
 
27549
- const running_xu_ui_id = running_job_obj?.elementP?.attr('xu-ui-id');
27550
- if (!running_xu_ui_id) continue;
27551
-
27552
- $.each(running_job_obj.elementP.find('*'), function (key, val) {
27553
- const xu_ui_id = $(val).attr('xu-ui-id');
27554
- if (!xu_ui_id) return true;
27555
- running_job_children_elements.push(xu_ui_id);
27556
- });
27557
-
27558
- $.each(val.elementP.find('*'), function (key, val) {
27559
- const xu_ui_id = $(val).attr('xu-ui-id');
27560
- if (!xu_ui_id) return true;
27561
- active_job_children_elements.push(xu_ui_id);
27562
- });
27563
-
27564
- // skip - if job element exist in the active job ui as child element
27565
- if (running_job_children_elements.includes(active_xu_ui_id)) {
27566
- continue;
27567
- }
27568
-
27569
- // abort - if active job element exist in the current job ui (parent element changed)
27570
- if (active_job_children_elements.includes(running_xu_ui_id)) {
27571
- $.each(active_job_children_elements, function (key, val) {
27572
- const $elm = $(`[xu-ui-id=${val}]`);
27573
- if (!$elm.length) return true;
27574
- if (!$elm.data().xuData) return true;
27575
- $elm.data().xuData.pending_to_delete = true;
27558
+ $.each(val.elementP.find('*'), function (key, val) {
27559
+ const xu_ui_id = $(val).attr('xu-ui-id');
27560
+ if (!xu_ui_id) return true;
27561
+ active_job_children_elements.push(xu_ui_id);
27576
27562
  });
27577
27563
 
27578
- func.UI.worker.delete_job(SESSION_ID, running_job_obj.job_num);
27564
+ // skip - if job element exist in the active job ui as child element
27565
+ if (running_job_children_elements.includes(active_xu_ui_id)) {
27566
+ continue;
27567
+ }
27568
+
27569
+ // abort - if active job element exist in the current job ui (parent element changed)
27570
+ if (active_job_children_elements.includes(running_xu_ui_id)) {
27571
+ $.each(active_job_children_elements, function (key, val) {
27572
+ const $elm = $(`[xu-ui-id=${val}]`);
27573
+ if (!$elm.length) return true;
27574
+ if (!$elm.data().xuData) return true;
27575
+ $elm.data().xuData.pending_to_delete = true;
27576
+ });
27577
+ }
27578
+ await func.UI.worker.delete_job(SESSION_ID, running_job_obj.job_num);
27579
27579
  break;
27580
27580
  }
27581
27581
 
27582
27582
  // execute - if active job element not exist the current job ui and not detected as parent element
27583
- func.UI.worker.execute(val.SESSION_ID, val);
27583
+ await func.UI.worker.execute(val.SESSION_ID, val);
27584
27584
  continue;
27585
27585
 
27586
27586
  // active_job_children_elements = [];