@xuda.io/runtime-bundle 1.0.958 → 1.0.960

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.
@@ -31013,13 +31013,14 @@ func.UI.screen.call_embed = function (SESSION_ID, prog) {
31013
31013
  func.UI.main.embed_prog_execute(SESSION_ID, prog);
31014
31014
  };
31015
31015
  func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed, avoid_xu_for_refresh) {
31016
- // if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
31017
- // // let dom to finish
31018
- // setTimeout(() => {
31019
- // func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
31020
- // }, 100);
31021
- // return;
31022
- // }
31016
+ if (!_.isEmpty(SCREEN_BLOCKER_OBJ)) {
31017
+ // let dom to finish
31018
+ setTimeout(() => {
31019
+ func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_arr, jobNoP, $elm_to_search, dsSession_changed);
31020
+ }, 100);
31021
+ return;
31022
+ }
31023
+
31023
31024
  UI_WORKER_OBJ.cache = {};
31024
31025
  const _session = SESSION_OBJ[SESSION_ID];
31025
31026
  if (glb.DEBUG_MODE) {
@@ -31137,11 +31138,10 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31137
31138
 
31138
31139
  get_selectors();
31139
31140
  // console.log('selectors>>>>', selectors);
31140
- // let children_items_ignore_list = [];
31141
+
31141
31142
  for await (let [elem_key, elem_val] of Object.entries(selectors)) {
31142
31143
  if (elem_key === 'length') break;
31143
- // const xu_ui_id = $(elem_val.$elm).attr('xu-ui-id');
31144
- // if (!xu_ui_id) continue;
31144
+
31145
31145
  if (!elem_val.$elm.data().xuData) continue;
31146
31146
  if (elem_val.$elm.data().xuData.pending_to_delete) continue;
31147
31147
 
@@ -31196,7 +31196,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31196
31196
 
31197
31197
  // mark children items ignore list
31198
31198
  $.each(elem_val.$elm.find('*'), function (key, val) {
31199
- // children_items_ignore_list.push($(val).attr('xu-ui-id'));
31200
31199
  if ($(val).data().xuData) {
31201
31200
  $(val).data().xuData.pending_to_delete = true;
31202
31201
  }
@@ -31224,9 +31223,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31224
31223
  for await (let [elem_key, elem_val] of Object.entries(selectors)) {
31225
31224
  if (elem_key === 'length') break;
31226
31225
 
31227
- // const xu_ui_id = $(elem_val.$elm).attr('xu-ui-id');
31228
- // if (!xu_ui_id) continue;
31229
- // if (children_items_ignore_list.includes(xu_ui_id)) continue;
31230
31226
  if (!elem_val.$elm.data().xuData) continue;
31231
31227
  if (elem_val.$elm.data().xuData.pending_to_delete) continue;
31232
31228
 
@@ -33432,12 +33428,43 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
33432
33428
  await before_record_function();
33433
33429
  }
33434
33430
  if (nodeP?.children?.length) {
33435
- for await (const [key, val] of Object.entries(nodeP.children)) {
33436
- const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $divP, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
33431
+ let node_promises = [];
33432
+ for (const [key, val] of Object.entries(nodeP.children)) {
33433
+ node_promises.push(
33434
+ new Promise(async (resolve, reject) => {
33435
+ const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $divP, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
33436
+ resolve();
33437
+ }),
33438
+ );
33437
33439
  }
33440
+ await Promise.all(node_promises);
33438
33441
  }
33439
33442
  return await done($divP);
33440
33443
  };
33444
+ // const iterate_child = async function ($divP, nodeP, parent_infoP, $root_container, before_record_function) {
33445
+ // if (!is_mobile && nodeP.busy) return;
33446
+ // nodeP.busy = true;
33447
+ // const done = async function ($divP) {
33448
+ // setTimeout(function () {
33449
+ // nodeP.busy = false;
33450
+ // }, 1000);
33451
+
33452
+ // return $divP;
33453
+ // };
33454
+ // if (!nodeP || !nodeP.children) {
33455
+ // return await done($divP);
33456
+ // }
33457
+
33458
+ // if (before_record_function) {
33459
+ // await before_record_function();
33460
+ // }
33461
+ // if (nodeP?.children?.length) {
33462
+ // for await (const [key, val] of Object.entries(nodeP.children)) {
33463
+ // const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $divP, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
33464
+ // }
33465
+ // }
33466
+ // return await done($divP);
33467
+ // };
33441
33468
 
33442
33469
  const _$ = function ($elm) {
33443
33470
  try {