@xuda.io/runtime-bundle 1.0.1041 → 1.0.1043

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.
@@ -11767,20 +11767,18 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11767
11767
 
11768
11768
  if (glb.new_xu_render) {
11769
11769
  if (attr === 'xu-exp:xu-render' || attr === 'xu-render') {
11770
- debugger;
11771
- // $.each(_$elem, function (key, val) {
11772
11770
  for await (const [key, val] of Object.entries(_$elem)) {
11773
11771
  if (key === 'length') break;
11774
11772
  if ($(val).data().xuData.node) {
11775
- // $.each($(val).data().xuData.node.children, function (key, node) {
11776
11773
  for await (const node of $(val).data().xuData.node.children) {
11777
11774
  if (item.id !== node.id) continue;
11778
11775
 
11779
11776
  if (typeof node.xu_render_made !== 'undefined' && !node.xu_render_made) {
11780
11777
  const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id][node.xu_render_cache_id];
11778
+ parent_element_ui_id;
11781
11779
  const elem_key = node.xu_render_xu_ui_id;
11782
11780
  const elem_val = { attributes: [attr], $elm: node_data.$div };
11783
-
11781
+ elem_val.$elm.data().xuData.parent_element_ui_id = parent_element_ui_id;
11784
11782
  var res = await func.expression.get(SESSION_ID, elem_val.$elm.data().xuAttributes['xu-exp:xu-render'], elem_val.$elm.data().xuData.paramsP.dsSessionP, 'UI Property EXP', elem_val.$elm.data().xuData.recordid);
11785
11783
 
11786
11784
  var attr_value = await func.common.get_cast_val(SESSION_ID, 'refresh xu-attributes', 'xu-render', 'bool', res.result);
@@ -11793,7 +11791,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
11793
11791
  fields_arr,
11794
11792
  attr_value,
11795
11793
  };
11796
- func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, _elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
11794
+ func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
11797
11795
  }
11798
11796
  }
11799
11797
  }
@@ -12677,17 +12675,17 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12677
12675
  nodeP.xu_render_made = value;
12678
12676
  if (value) {
12679
12677
  try {
12680
- // abort if already rended
12681
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
12682
- return func.events.delete_job(SESSION_ID, jobNoP);
12683
- }
12678
+ // // abort if already rended
12679
+ // if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
12680
+ // return func.events.delete_job(SESSION_ID, jobNoP);
12681
+ // }
12684
12682
 
12685
- let original_data_obj = $elm.data().xuData.original_data_obj;
12683
+ // let original_data_obj = $elm.data().xuData.original_data_obj;
12686
12684
 
12687
- if (!original_data_obj) {
12688
- func.events.delete_job(SESSION_ID, jobNoP);
12689
- return { delete_job: jobNoP };
12690
- }
12685
+ // if (!original_data_obj) {
12686
+ // func.events.delete_job(SESSION_ID, jobNoP);
12687
+ // return { delete_job: jobNoP };
12688
+ // }
12691
12689
 
12692
12690
  ////////////
12693
12691
  const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
@@ -12713,37 +12711,37 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12713
12711
  original_data_obj.$root_container,
12714
12712
  );
12715
12713
  }
12716
- ////////////
12717
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12718
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12719
- }
12720
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12721
- //////////////
12722
- new_$div.data().xuData.original_data_obj = original_data_obj;
12723
- new_$div.data().xuData.xurender_node = $elm.clone(true);
12724
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
12725
-
12726
- const replace = async function () {
12727
- $elm.replaceWith(new_$div);
12728
- if (from_panel) {
12729
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
12730
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
12731
- $elm.replaceWith(new_$div.children());
12732
- }
12733
-
12734
- if (val.fields_arr) {
12735
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
12736
- }
12737
- func.events.delete_job(SESSION_ID, jobNoP);
12738
- };
12739
-
12740
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
12741
- if (new_$div.data().xuData.paramsP) {
12742
- return await replace();
12743
- }
12744
-
12745
- func.events.delete_job(SESSION_ID, jobNoP);
12746
- }
12714
+ // ////////////
12715
+ // if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12716
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12717
+ // }
12718
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12719
+ // //////////////
12720
+ // new_$div.data().xuData.original_data_obj = original_data_obj;
12721
+ // new_$div.data().xuData.xurender_node = $elm.clone(true);
12722
+ // new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
12723
+
12724
+ // const replace = async function () {
12725
+ // $elm.replaceWith(new_$div);
12726
+ // if (from_panel) {
12727
+ // const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
12728
+ // $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
12729
+ // $elm.replaceWith(new_$div.children());
12730
+ // }
12731
+
12732
+ // if (val.fields_arr) {
12733
+ // return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
12734
+ // }
12735
+ // func.events.delete_job(SESSION_ID, jobNoP);
12736
+ // };
12737
+
12738
+ // if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
12739
+ // if (new_$div.data().xuData.paramsP) {
12740
+ // return await replace();
12741
+ // }
12742
+
12743
+ // func.events.delete_job(SESSION_ID, jobNoP);
12744
+ // }
12747
12745
  } catch (error) {
12748
12746
  func.events.delete_job(SESSION_ID, jobNoP);
12749
12747
  }
@@ -9492,20 +9492,18 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9492
9492
 
9493
9493
  if (glb.new_xu_render) {
9494
9494
  if (attr === 'xu-exp:xu-render' || attr === 'xu-render') {
9495
- debugger;
9496
- // $.each(_$elem, function (key, val) {
9497
9495
  for await (const [key, val] of Object.entries(_$elem)) {
9498
9496
  if (key === 'length') break;
9499
9497
  if ($(val).data().xuData.node) {
9500
- // $.each($(val).data().xuData.node.children, function (key, node) {
9501
9498
  for await (const node of $(val).data().xuData.node.children) {
9502
9499
  if (item.id !== node.id) continue;
9503
9500
 
9504
9501
  if (typeof node.xu_render_made !== 'undefined' && !node.xu_render_made) {
9505
9502
  const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id][node.xu_render_cache_id];
9503
+ parent_element_ui_id;
9506
9504
  const elem_key = node.xu_render_xu_ui_id;
9507
9505
  const elem_val = { attributes: [attr], $elm: node_data.$div };
9508
-
9506
+ elem_val.$elm.data().xuData.parent_element_ui_id = parent_element_ui_id;
9509
9507
  var res = await func.expression.get(SESSION_ID, elem_val.$elm.data().xuAttributes['xu-exp:xu-render'], elem_val.$elm.data().xuData.paramsP.dsSessionP, 'UI Property EXP', elem_val.$elm.data().xuData.recordid);
9510
9508
 
9511
9509
  var attr_value = await func.common.get_cast_val(SESSION_ID, 'refresh xu-attributes', 'xu-render', 'bool', res.result);
@@ -9518,7 +9516,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
9518
9516
  fields_arr,
9519
9517
  attr_value,
9520
9518
  };
9521
- func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, _elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
9519
+ func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_render_attributes', obj, new_job, elem_val.$elm, elem_val.$elm.data().xuData.paramsP.dsSessionP);
9522
9520
  }
9523
9521
  }
9524
9522
  }
@@ -10402,17 +10400,17 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10402
10400
  nodeP.xu_render_made = value;
10403
10401
  if (value) {
10404
10402
  try {
10405
- // abort if already rended
10406
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
10407
- return func.events.delete_job(SESSION_ID, jobNoP);
10408
- }
10403
+ // // abort if already rended
10404
+ // if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
10405
+ // return func.events.delete_job(SESSION_ID, jobNoP);
10406
+ // }
10409
10407
 
10410
- let original_data_obj = $elm.data().xuData.original_data_obj;
10408
+ // let original_data_obj = $elm.data().xuData.original_data_obj;
10411
10409
 
10412
- if (!original_data_obj) {
10413
- func.events.delete_job(SESSION_ID, jobNoP);
10414
- return { delete_job: jobNoP };
10415
- }
10410
+ // if (!original_data_obj) {
10411
+ // func.events.delete_job(SESSION_ID, jobNoP);
10412
+ // return { delete_job: jobNoP };
10413
+ // }
10416
10414
 
10417
10415
  ////////////
10418
10416
  const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
@@ -10438,37 +10436,37 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10438
10436
  original_data_obj.$root_container,
10439
10437
  );
10440
10438
  }
10441
- ////////////
10442
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10443
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10444
- }
10445
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10446
- //////////////
10447
- new_$div.data().xuData.original_data_obj = original_data_obj;
10448
- new_$div.data().xuData.xurender_node = $elm.clone(true);
10449
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
10450
-
10451
- const replace = async function () {
10452
- $elm.replaceWith(new_$div);
10453
- if (from_panel) {
10454
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
10455
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
10456
- $elm.replaceWith(new_$div.children());
10457
- }
10458
-
10459
- if (val.fields_arr) {
10460
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
10461
- }
10462
- func.events.delete_job(SESSION_ID, jobNoP);
10463
- };
10464
-
10465
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
10466
- if (new_$div.data().xuData.paramsP) {
10467
- return await replace();
10468
- }
10469
-
10470
- func.events.delete_job(SESSION_ID, jobNoP);
10471
- }
10439
+ // ////////////
10440
+ // if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10441
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10442
+ // }
10443
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10444
+ // //////////////
10445
+ // new_$div.data().xuData.original_data_obj = original_data_obj;
10446
+ // new_$div.data().xuData.xurender_node = $elm.clone(true);
10447
+ // new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
10448
+
10449
+ // const replace = async function () {
10450
+ // $elm.replaceWith(new_$div);
10451
+ // if (from_panel) {
10452
+ // const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
10453
+ // $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
10454
+ // $elm.replaceWith(new_$div.children());
10455
+ // }
10456
+
10457
+ // if (val.fields_arr) {
10458
+ // return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
10459
+ // }
10460
+ // func.events.delete_job(SESSION_ID, jobNoP);
10461
+ // };
10462
+
10463
+ // if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
10464
+ // if (new_$div.data().xuData.paramsP) {
10465
+ // return await replace();
10466
+ // }
10467
+
10468
+ // func.events.delete_job(SESSION_ID, jobNoP);
10469
+ // }
10472
10470
  } catch (error) {
10473
10471
  func.events.delete_job(SESSION_ID, jobNoP);
10474
10472
  }