@xuda.io/runtime-bundle 1.0.1003 → 1.0.1005

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.
@@ -32265,12 +32265,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32265
32265
  if (!value) {
32266
32266
  var cloned_$div = $elm.clone(true);
32267
32267
 
32268
- let $xurender = $('<xurender>')
32269
- // .attr('xu-ui-id', nodeP.id + '_' + $elm.data().xuData.recordid)
32270
- .attr('xu-ui-id', $elm.attr('xu-ui-id'))
32271
- .attr('hidden', true)
32272
- .appendTo($container)
32273
- .hide();
32268
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
32274
32269
  let original_data_obj = {
32275
32270
  force_render: true,
32276
32271
  $container: cloned_$div,
@@ -32308,9 +32303,15 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32308
32303
  return { delete_job: jobNoP };
32309
32304
  }
32310
32305
 
32311
- let new_$div = original_data_obj.$container.clone(true);
32306
+ ////////////
32307
+ const cache_str = get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
32308
+
32309
+ let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
32310
+
32311
+ /////////////
32312
+ // let new_$div = original_data_obj.$container.clone(true);
32312
32313
 
32313
- if (original_data_obj.force_render) {
32314
+ if (original_data_obj.force_render || !new_$div) {
32314
32315
  new_$div = await func.UI.screen.render_ui_tree(
32315
32316
  SESSION_ID,
32316
32317
  $elm, //original_data_obj.$container,
@@ -32326,7 +32327,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32326
32327
  original_data_obj.$root_container,
32327
32328
  );
32328
32329
  }
32329
-
32330
+ ////////////
32331
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
32332
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
32333
+ }
32334
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
32335
+ //////////////
32330
32336
  new_$div.data().xuData.original_data_obj = original_data_obj;
32331
32337
  new_$div.data().xuData.xurender_node = $elm.clone(true);
32332
32338
  new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
@@ -32390,8 +32396,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32390
32396
 
32391
32397
  $xurender.data().xuData.original_data_obj = original_data_obj;
32392
32398
 
32393
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = original_data_obj;
32394
32399
  const cache_str = get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
32400
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
32401
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
32402
+ }
32403
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
32395
32404
 
32396
32405
  // }
32397
32406
  $elm.replaceWith(tmp_$div.children());
@@ -34566,8 +34575,8 @@ const get_xu_render_cache_str = function (SESSION_ID, dsSessionP) {
34566
34575
  str += val;
34567
34576
  }
34568
34577
 
34569
- if (_ds.parentDataSourceNo) {
34570
- str += get_xu_render_cache_str(SESSION_ID, parentDataSourceNo);
34578
+ if (typeof _ds.parentDataSourceNo !== 'undefined') {
34579
+ str += get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
34571
34580
  }
34572
34581
 
34573
34582
  return str;