@xuda.io/runtime-bundle 1.0.1003 → 1.0.1004

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.
@@ -12581,12 +12581,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12581
12581
  if (!value) {
12582
12582
  var cloned_$div = $elm.clone(true);
12583
12583
 
12584
- let $xurender = $('<xurender>')
12585
- // .attr('xu-ui-id', nodeP.id + '_' + $elm.data().xuData.recordid)
12586
- .attr('xu-ui-id', $elm.attr('xu-ui-id'))
12587
- .attr('hidden', true)
12588
- .appendTo($container)
12589
- .hide();
12584
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
12590
12585
  let original_data_obj = {
12591
12586
  force_render: true,
12592
12587
  $container: cloned_$div,
@@ -12624,9 +12619,15 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12624
12619
  return { delete_job: jobNoP };
12625
12620
  }
12626
12621
 
12627
- let new_$div = original_data_obj.$container.clone(true);
12622
+ ////////////
12623
+ const cache_str = get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12624
+
12625
+ let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
12626
+
12627
+ /////////////
12628
+ // let new_$div = original_data_obj.$container.clone(true);
12628
12629
 
12629
- if (original_data_obj.force_render) {
12630
+ if (original_data_obj.force_render || !new_$div) {
12630
12631
  new_$div = await func.UI.screen.render_ui_tree(
12631
12632
  SESSION_ID,
12632
12633
  $elm, //original_data_obj.$container,
@@ -12642,7 +12643,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12642
12643
  original_data_obj.$root_container,
12643
12644
  );
12644
12645
  }
12645
-
12646
+ ////////////
12647
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12648
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12649
+ }
12650
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12651
+ //////////////
12646
12652
  new_$div.data().xuData.original_data_obj = original_data_obj;
12647
12653
  new_$div.data().xuData.xurender_node = $elm.clone(true);
12648
12654
  new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
@@ -12706,8 +12712,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12706
12712
 
12707
12713
  $xurender.data().xuData.original_data_obj = original_data_obj;
12708
12714
 
12709
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = original_data_obj;
12710
12715
  const cache_str = get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12716
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12717
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12718
+ }
12719
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12711
12720
 
12712
12721
  // }
12713
12722
  $elm.replaceWith(tmp_$div.children());
@@ -14882,7 +14891,7 @@ const get_xu_render_cache_str = function (SESSION_ID, dsSessionP) {
14882
14891
  str += val;
14883
14892
  }
14884
14893
 
14885
- if (_ds.parentDataSourceNo) {
14894
+ if (typeof _ds.parentDataSourceNo !== 'undefined') {
14886
14895
  str += get_xu_render_cache_str(SESSION_ID, parentDataSourceNo);
14887
14896
  }
14888
14897
 
@@ -10306,12 +10306,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10306
10306
  if (!value) {
10307
10307
  var cloned_$div = $elm.clone(true);
10308
10308
 
10309
- let $xurender = $('<xurender>')
10310
- // .attr('xu-ui-id', nodeP.id + '_' + $elm.data().xuData.recordid)
10311
- .attr('xu-ui-id', $elm.attr('xu-ui-id'))
10312
- .attr('hidden', true)
10313
- .appendTo($container)
10314
- .hide();
10309
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
10315
10310
  let original_data_obj = {
10316
10311
  force_render: true,
10317
10312
  $container: cloned_$div,
@@ -10349,9 +10344,15 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10349
10344
  return { delete_job: jobNoP };
10350
10345
  }
10351
10346
 
10352
- let new_$div = original_data_obj.$container.clone(true);
10347
+ ////////////
10348
+ const cache_str = get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10349
+
10350
+ let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
10351
+
10352
+ /////////////
10353
+ // let new_$div = original_data_obj.$container.clone(true);
10353
10354
 
10354
- if (original_data_obj.force_render) {
10355
+ if (original_data_obj.force_render || !new_$div) {
10355
10356
  new_$div = await func.UI.screen.render_ui_tree(
10356
10357
  SESSION_ID,
10357
10358
  $elm, //original_data_obj.$container,
@@ -10367,7 +10368,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10367
10368
  original_data_obj.$root_container,
10368
10369
  );
10369
10370
  }
10370
-
10371
+ ////////////
10372
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10373
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10374
+ }
10375
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10376
+ //////////////
10371
10377
  new_$div.data().xuData.original_data_obj = original_data_obj;
10372
10378
  new_$div.data().xuData.xurender_node = $elm.clone(true);
10373
10379
  new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
@@ -10431,8 +10437,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10431
10437
 
10432
10438
  $xurender.data().xuData.original_data_obj = original_data_obj;
10433
10439
 
10434
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = original_data_obj;
10435
10440
  const cache_str = get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10441
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10442
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10443
+ }
10444
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10436
10445
 
10437
10446
  // }
10438
10447
  $elm.replaceWith(tmp_$div.children());
@@ -12607,7 +12616,7 @@ const get_xu_render_cache_str = function (SESSION_ID, dsSessionP) {
12607
12616
  str += val;
12608
12617
  }
12609
12618
 
12610
- if (_ds.parentDataSourceNo) {
12619
+ if (typeof _ds.parentDataSourceNo !== 'undefined') {
12611
12620
  str += get_xu_render_cache_str(SESSION_ID, parentDataSourceNo);
12612
12621
  }
12613
12622