@xuda.io/runtime-bundle 1.0.1102 → 1.0.1104

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.
@@ -31298,17 +31298,22 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31298
31298
 
31299
31299
  const add_execute_queue = async function (type) {
31300
31300
  if (!elem_val.$elm?.data?.()?.xuData) return;
31301
- const obj = {
31302
- ui_type: elem_val.$elm.data().xuData.ui_type,
31303
- SESSION_ID,
31304
- fields_arr,
31305
- elem_key,
31306
- elem_val,
31307
- };
31308
- new_job = await func.UI.worker.add_to_queue(SESSION_ID, 'gui event', type, obj, new_job, elem_val.$elm);
31301
+ try {
31302
+ const obj = {
31303
+ ui_type: elem_val.$elm.data().xuData.ui_type,
31304
+ SESSION_ID,
31305
+ fields_arr,
31306
+ elem_key,
31307
+ elem_val,
31308
+ };
31309
31309
 
31310
- if (glb.DEBUG_MODE) {
31311
- console.log(type + '>>>', new_job, obj);
31310
+ new_job = await func.UI.worker.add_to_queue(SESSION_ID, 'gui event', type, obj, new_job, elem_val.$elm);
31311
+
31312
+ if (glb.DEBUG_MODE) {
31313
+ console.log(type + '>>>', new_job, obj);
31314
+ }
31315
+ } catch (error) {
31316
+ debugger;
31312
31317
  }
31313
31318
  };
31314
31319
  //////////// process render first ///////////////
@@ -31879,31 +31884,59 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31879
31884
  },
31880
31885
  [`xu-teleport`]: {
31881
31886
  to: async function ($elm, val) {
31882
- if (val.value) {
31883
- if ($elm?.parent()?.data()?.xuData?.length) {
31884
- $elm.parent().data('xuTeleportData', []);
31885
- for (const [key, node] of Object.entries(nodeP.children)) {
31886
- 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);
31887
-
31888
- $elm.parent().data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
31889
- $teleport_elm.attr('xu-teleport-parent-id', $elm.parent().attr('xu-ui-id'));
31890
- }
31891
- $elm.remove();
31892
- } else {
31893
- $elm.data('xuTeleportData', []).attr('hidden', true);
31894
- for (const [key, node] of Object.entries(nodeP.children)) {
31895
- const $to_container = $(val.value);
31896
- if (!$to_container?.length) {
31897
- return console.error(`container ${val.value} for xuTeleportData not found`);
31887
+ if (!glb.new_xu_render) {
31888
+ if (val.value) {
31889
+ // parent_infoP.is_xu_teleport;
31890
+ if ($elm?.parent()?.data()?.xuData?.length) {
31891
+ $elm.parent().data('xuTeleportData', []);
31892
+ for (const [key, node] of Object.entries(nodeP.children)) {
31893
+ 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);
31894
+
31895
+ $elm.parent().data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
31896
+ $teleport_elm.attr('xu-teleport-parent-id', $elm.parent().attr('xu-ui-id'));
31898
31897
  }
31899
- const $teleport_elm = await func.UI.screen.render_ui_tree(SESSION_ID, $to_container, node, parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, node, null, $root_container);
31898
+ $elm.remove();
31899
+ } else {
31900
+ $elm.data('xuTeleportData', []).attr('hidden', true);
31901
+ for (const [key, node] of Object.entries(nodeP.children)) {
31902
+ const $to_container = $(val.value);
31903
+ if (!$to_container?.length) {
31904
+ return console.error(`container ${val.value} for xuTeleportData not found`);
31905
+ }
31906
+ const $teleport_elm = await func.UI.screen.render_ui_tree(SESSION_ID, $to_container, node, parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, node, null, $root_container);
31900
31907
 
31901
- $elm.data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
31902
- $teleport_elm.attr('xu-teleport-parent-id', $elm.attr('xu-ui-id'));
31908
+ $elm.data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
31909
+ $teleport_elm.attr('xu-teleport-parent-id', $elm.attr('xu-ui-id'));
31910
+ }
31903
31911
  }
31904
31912
  }
31913
+ return { abort: true };
31905
31914
  }
31906
- return { abort: true };
31915
+
31916
+ if (val.value) {
31917
+ // // parent_infoP.is_xu_teleport;
31918
+ // if ($elm?.parent()?.data()?.xuData?.length) {
31919
+ // $elm.parent().data('xuTeleportData', []);
31920
+ // for (const [key, node] of Object.entries(nodeP.children)) {
31921
+ // 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);
31922
+ // $elm.parent().data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
31923
+ // $teleport_elm.attr('xu-teleport-parent-id', $elm.parent().attr('xu-ui-id'));
31924
+ // }
31925
+ // $elm.remove();
31926
+ // } else {
31927
+ // $elm.data('xuTeleportData', []).attr('hidden', true);
31928
+ // for (const [key, node] of Object.entries(nodeP.children)) {
31929
+ // const $to_container = $(val.value);
31930
+ // if (!$to_container?.length) {
31931
+ // return console.error(`container ${val.value} for xuTeleportData not found`);
31932
+ // }
31933
+ // const $teleport_elm = await func.UI.screen.render_ui_tree(SESSION_ID, $to_container, node, parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, node, null, $root_container);
31934
+ // $elm.data().xuTeleportData.push($teleport_elm.attr('xu-ui-id'));
31935
+ // $teleport_elm.attr('xu-teleport-parent-id', $elm.attr('xu-ui-id'));
31936
+ // }
31937
+ // }
31938
+ }
31939
+ return {};
31907
31940
  },
31908
31941
  'xu-render': async function ($elm, val) {
31909
31942
  let ret = await common_fx['xu-render']($elm, val, true);