@xuda.io/runtime-bundle 1.0.1024 → 1.0.1026

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.
@@ -12711,57 +12711,66 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12711
12711
 
12712
12712
  /////////// !value ///////////
12713
12713
 
12714
- if ($elm.prop('tagName') === 'XURENDER') {
12715
- func.events.delete_job(SESSION_ID, jobNoP);
12716
- return;
12714
+ const xu_ui_id = $div.attr('xu-ui-id');
12715
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12716
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12717
12717
  }
12718
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12719
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = { $div: $elm.clone(true) };
12720
+ $elm.remove();
12721
+ func.events.delete_job(SESSION_ID, jobNoP);
12718
12722
 
12719
- let tmp_$div = $('<div>');
12720
- // const xu_ui_id = $elm.attr('xu-ui-id');
12721
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12722
-
12723
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
12724
- // // was true before
12725
- // if ($elm.data().xuData.xurender_node) {
12726
- // $xurender.data({
12727
- // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
12728
- // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
12729
- // });
12730
- // } else {
12731
- // default new state
12723
+ // if ($elm.prop('tagName') === 'XURENDER') {
12724
+ // func.events.delete_job(SESSION_ID, jobNoP);
12725
+ // return;
12726
+ // }
12732
12727
 
12733
- $xurender.data({
12734
- xuAttributes: $elm.data().xuAttributes || {},
12735
- xuData: $elm.data().xuData || {},
12736
- });
12737
- // const original_data_obj = {
12738
- // nodeP: _.cloneDeep($elm.data().xuData.node_org),
12739
- // paramsP: $elm.data().xuData.paramsP,
12740
- // $container: $elm.clone(true),
12741
- // parent_infoP: parent_infoP,
12728
+ // let tmp_$div = $('<div>');
12729
+ // // const xu_ui_id = $elm.attr('xu-ui-id');
12730
+ // const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12731
+
12732
+ // let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
12733
+ // // // was true before
12734
+ // // if ($elm.data().xuData.xurender_node) {
12735
+ // // $xurender.data({
12736
+ // // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
12737
+ // // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
12738
+ // // });
12739
+ // // } else {
12740
+ // // default new state
12741
+
12742
+ // $xurender.data({
12743
+ // xuAttributes: $elm.data().xuAttributes || {},
12744
+ // xuData: $elm.data().xuData || {},
12745
+ // });
12746
+ // // const original_data_obj = {
12747
+ // // nodeP: _.cloneDeep($elm.data().xuData.node_org),
12748
+ // // paramsP: $elm.data().xuData.paramsP,
12749
+ // // $container: $elm.clone(true),
12750
+ // // parent_infoP: parent_infoP,
12751
+ // // };
12752
+ // const cloned_$div = $elm.clone(true);
12753
+ // let original_data_obj = {
12754
+ // force_render: false,
12755
+ // $container: cloned_$div,
12756
+ // nodeP: cloned_$div.data().xuData.node_org,
12757
+ // parent_infoP,
12758
+ // paramsP,
12759
+ // keyP,
12760
+ // parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
12761
+ // $root_container,
12742
12762
  // };
12743
- const cloned_$div = $elm.clone(true);
12744
- let original_data_obj = {
12745
- force_render: false,
12746
- $container: cloned_$div,
12747
- nodeP: cloned_$div.data().xuData.node_org,
12748
- parent_infoP,
12749
- paramsP,
12750
- keyP,
12751
- parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
12752
- $root_container,
12753
- };
12754
12763
 
12755
- $xurender.data().xuData.original_data_obj = original_data_obj;
12764
+ // $xurender.data().xuData.original_data_obj = original_data_obj;
12756
12765
 
12757
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12758
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12759
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12760
- }
12761
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12766
+ // const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12767
+ // if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12768
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12762
12769
  // }
12763
- $elm.replaceWith(tmp_$div.children());
12764
- func.events.delete_job(SESSION_ID, jobNoP);
12770
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12771
+ // // }
12772
+ // $elm.replaceWith(tmp_$div.children());
12773
+ // func.events.delete_job(SESSION_ID, jobNoP);
12765
12774
  };
12766
12775
  if (is_init) {
12767
12776
  return await init_render();
@@ -14768,8 +14777,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14768
14777
  if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
14769
14778
  UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
14770
14779
  }
14771
-
14772
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = $div;
14780
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
14781
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = { $div: $div.clone(true) };
14773
14782
  return $div;
14774
14783
  } else {
14775
14784
  $container.append(temp_$container.children());
@@ -10436,57 +10436,66 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
10436
10436
 
10437
10437
  /////////// !value ///////////
10438
10438
 
10439
- if ($elm.prop('tagName') === 'XURENDER') {
10440
- func.events.delete_job(SESSION_ID, jobNoP);
10441
- return;
10439
+ const xu_ui_id = $div.attr('xu-ui-id');
10440
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10441
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10442
10442
  }
10443
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10444
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = { $div: $elm.clone(true) };
10445
+ $elm.remove();
10446
+ func.events.delete_job(SESSION_ID, jobNoP);
10443
10447
 
10444
- let tmp_$div = $('<div>');
10445
- // const xu_ui_id = $elm.attr('xu-ui-id');
10446
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10447
-
10448
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
10449
- // // was true before
10450
- // if ($elm.data().xuData.xurender_node) {
10451
- // $xurender.data({
10452
- // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
10453
- // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
10454
- // });
10455
- // } else {
10456
- // default new state
10448
+ // if ($elm.prop('tagName') === 'XURENDER') {
10449
+ // func.events.delete_job(SESSION_ID, jobNoP);
10450
+ // return;
10451
+ // }
10457
10452
 
10458
- $xurender.data({
10459
- xuAttributes: $elm.data().xuAttributes || {},
10460
- xuData: $elm.data().xuData || {},
10461
- });
10462
- // const original_data_obj = {
10463
- // nodeP: _.cloneDeep($elm.data().xuData.node_org),
10464
- // paramsP: $elm.data().xuData.paramsP,
10465
- // $container: $elm.clone(true),
10466
- // parent_infoP: parent_infoP,
10453
+ // let tmp_$div = $('<div>');
10454
+ // // const xu_ui_id = $elm.attr('xu-ui-id');
10455
+ // const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
10456
+
10457
+ // let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
10458
+ // // // was true before
10459
+ // // if ($elm.data().xuData.xurender_node) {
10460
+ // // $xurender.data({
10461
+ // // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
10462
+ // // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
10463
+ // // });
10464
+ // // } else {
10465
+ // // default new state
10466
+
10467
+ // $xurender.data({
10468
+ // xuAttributes: $elm.data().xuAttributes || {},
10469
+ // xuData: $elm.data().xuData || {},
10470
+ // });
10471
+ // // const original_data_obj = {
10472
+ // // nodeP: _.cloneDeep($elm.data().xuData.node_org),
10473
+ // // paramsP: $elm.data().xuData.paramsP,
10474
+ // // $container: $elm.clone(true),
10475
+ // // parent_infoP: parent_infoP,
10476
+ // // };
10477
+ // const cloned_$div = $elm.clone(true);
10478
+ // let original_data_obj = {
10479
+ // force_render: false,
10480
+ // $container: cloned_$div,
10481
+ // nodeP: cloned_$div.data().xuData.node_org,
10482
+ // parent_infoP,
10483
+ // paramsP,
10484
+ // keyP,
10485
+ // parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
10486
+ // $root_container,
10467
10487
  // };
10468
- const cloned_$div = $elm.clone(true);
10469
- let original_data_obj = {
10470
- force_render: false,
10471
- $container: cloned_$div,
10472
- nodeP: cloned_$div.data().xuData.node_org,
10473
- parent_infoP,
10474
- paramsP,
10475
- keyP,
10476
- parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
10477
- $root_container,
10478
- };
10479
10488
 
10480
- $xurender.data().xuData.original_data_obj = original_data_obj;
10489
+ // $xurender.data().xuData.original_data_obj = original_data_obj;
10481
10490
 
10482
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10483
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10484
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10485
- }
10486
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10491
+ // const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
10492
+ // if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
10493
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
10487
10494
  // }
10488
- $elm.replaceWith(tmp_$div.children());
10489
- func.events.delete_job(SESSION_ID, jobNoP);
10495
+ // UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
10496
+ // // }
10497
+ // $elm.replaceWith(tmp_$div.children());
10498
+ // func.events.delete_job(SESSION_ID, jobNoP);
10490
10499
  };
10491
10500
  if (is_init) {
10492
10501
  return await init_render();
@@ -12493,8 +12502,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
12493
12502
  if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12494
12503
  UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12495
12504
  }
12496
-
12497
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = $div;
12505
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12506
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = { $div: $div.clone(true) };
12498
12507
  return $div;
12499
12508
  } else {
12500
12509
  $container.append(temp_$container.children());