@xuda.io/runtime-bundle 1.0.1018 → 1.0.1020

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.
@@ -2677,6 +2677,8 @@ func.common.sha256 = async function (str) {
2677
2677
  const bytes = new Uint8Array(buf);
2678
2678
  return [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
2679
2679
  };
2680
+
2681
+ glb.new_xu_render = true;
2680
2682
  glb.DEBUG_INFO_OBJ = {};
2681
2683
  // var CONNECTION_ATTEMPTS = 0;
2682
2684
  glb.APP_INFO = {};
@@ -12467,300 +12469,310 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12467
12469
  set_value();
12468
12470
  return {};
12469
12471
  },
12470
- 'xu-render-org': async function ($elm, val, from_panel) {
12471
- var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
12472
- const init_render = function () {
12473
- if (!value) {
12474
- var cloned_$div = $elm.clone(true);
12472
+ 'xu-render': async function ($elm, val, from_panel) {
12473
+ const old_render = async function () {
12474
+ var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
12475
+ const init_render = function () {
12476
+ if (!value) {
12477
+ var cloned_$div = $elm.clone(true);
12478
+
12479
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
12480
+ let original_data_obj = {
12481
+ $container: cloned_$div,
12482
+ nodeP: _.cloneDeep(nodeP),
12483
+ parent_infoP,
12484
+ paramsP,
12485
+ keyP,
12486
+ parent_nodeP,
12487
+ $root_container,
12488
+ };
12489
+ $xurender.data('xuData', cloned_$div.data().xuData);
12490
+ $xurender.data().xuData.original_data_obj = original_data_obj;
12491
+ $xurender.data().xuData.xurender_node = cloned_$div;
12492
+ $xurender.data().xuAttributes = nodeP.attributes || {};
12493
+ $xurender.hide();
12475
12494
 
12476
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).attr('hidden', true).appendTo($container).hide();
12477
- let original_data_obj = {
12478
- $container: cloned_$div,
12479
- nodeP: _.cloneDeep(nodeP),
12480
- parent_infoP,
12481
- paramsP,
12482
- keyP,
12483
- parent_nodeP,
12484
- $root_container,
12485
- };
12486
- $xurender.data('xuData', cloned_$div.data().xuData);
12487
- $xurender.data().xuData.original_data_obj = original_data_obj;
12488
- $xurender.data().xuData.xurender_node = cloned_$div;
12489
- $xurender.data().xuAttributes = nodeP.attributes || {};
12490
- $xurender.hide();
12495
+ $elm.remove();
12496
+ return { abort: true };
12497
+ }
12498
+ return {};
12499
+ };
12491
12500
 
12492
- $elm.remove();
12493
- return { abort: true };
12494
- }
12495
- return {};
12496
- };
12501
+ const post_render = async function () {
12502
+ if (value) {
12503
+ try {
12504
+ // abort if already rended
12505
+ if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
12506
+ return func.events.delete_job(SESSION_ID, jobNoP);
12507
+ }
12497
12508
 
12498
- const post_render = async function () {
12499
- if (value) {
12500
- try {
12501
- // abort if already rended
12502
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
12503
- return func.events.delete_job(SESSION_ID, jobNoP);
12504
- }
12509
+ let original_data_obj = $elm.data().xuData.original_data_obj;
12505
12510
 
12506
- let original_data_obj = $elm.data().xuData.original_data_obj;
12511
+ if (!original_data_obj) {
12512
+ func.events.delete_job(SESSION_ID, jobNoP);
12513
+ return { delete_job: jobNoP };
12514
+ }
12507
12515
 
12508
- if (!original_data_obj) {
12509
- func.events.delete_job(SESSION_ID, jobNoP);
12510
- return { delete_job: jobNoP };
12511
- }
12516
+ const new_$div = await func.UI.screen.render_ui_tree(
12517
+ SESSION_ID,
12518
+ $elm, //original_data_obj.$container,
12519
+ _.cloneDeep(original_data_obj.nodeP),
12520
+ original_data_obj.parent_infoP,
12521
+ original_data_obj.paramsP,
12522
+ jobNoP,
12523
+ null,
12524
+ original_data_obj.keyP,
12525
+ null,
12526
+ original_data_obj.parent_nodeP,
12527
+ null,
12528
+ original_data_obj.$root_container,
12529
+ );
12512
12530
 
12513
- const new_$div = await func.UI.screen.render_ui_tree(
12514
- SESSION_ID,
12515
- $elm, //original_data_obj.$container,
12516
- _.cloneDeep(original_data_obj.nodeP),
12517
- original_data_obj.parent_infoP,
12518
- original_data_obj.paramsP,
12519
- jobNoP,
12520
- null,
12521
- original_data_obj.keyP,
12522
- null,
12523
- original_data_obj.parent_nodeP,
12524
- null,
12525
- original_data_obj.$root_container,
12526
- );
12531
+ new_$div.data().xuData.original_data_obj = original_data_obj;
12532
+ new_$div.data().xuData.xurender_node = $elm.clone(true);
12533
+ new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
12527
12534
 
12528
- new_$div.data().xuData.original_data_obj = original_data_obj;
12529
- new_$div.data().xuData.xurender_node = $elm.clone(true);
12530
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
12535
+ const replace = async function () {
12536
+ $elm.replaceWith(new_$div);
12537
+ if (from_panel) {
12538
+ const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
12539
+ $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
12540
+ $elm.replaceWith(new_$div.children());
12541
+ }
12531
12542
 
12532
- const replace = async function () {
12533
- $elm.replaceWith(new_$div);
12534
- if (from_panel) {
12535
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
12536
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
12537
- $elm.replaceWith(new_$div.children());
12538
- }
12543
+ if (val.fields_arr) {
12544
+ return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
12545
+ }
12546
+ func.events.delete_job(SESSION_ID, jobNoP);
12547
+ };
12539
12548
 
12540
- if (val.fields_arr) {
12541
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
12542
- }
12543
- func.events.delete_job(SESSION_ID, jobNoP);
12544
- };
12549
+ if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
12550
+ if (new_$div.data().xuData.paramsP) {
12551
+ return await replace();
12552
+ }
12545
12553
 
12546
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
12547
- if (new_$div.data().xuData.paramsP) {
12548
- return await replace();
12554
+ func.events.delete_job(SESSION_ID, jobNoP);
12549
12555
  }
12550
-
12556
+ } catch (error) {
12551
12557
  func.events.delete_job(SESSION_ID, jobNoP);
12552
12558
  }
12553
- } catch (error) {
12559
+ return;
12560
+ }
12561
+ // if (!value) {
12562
+ if ($elm.prop('tagName') === 'XURENDER') {
12554
12563
  func.events.delete_job(SESSION_ID, jobNoP);
12564
+ return;
12555
12565
  }
12556
- return;
12557
- }
12558
- // if (!value) {
12559
- if ($elm.prop('tagName') === 'XURENDER') {
12560
- func.events.delete_job(SESSION_ID, jobNoP);
12561
- return;
12562
- }
12563
12566
 
12564
- let tmp_$div = $('<div>');
12567
+ let tmp_$div = $('<div>');
12565
12568
 
12566
- let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
12567
- // was true before
12568
- if ($elm.data().xuData.xurender_node) {
12569
- $xurender.data({
12570
- xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
12571
- xuData: $elm.data().xuData.xurender_node.data().xuData || {},
12572
- });
12573
- } else {
12574
- // default new state
12569
+ let $xurender = $('<xurender>').attr('xu-ui-id', $elm.attr('xu-ui-id')).appendTo(tmp_$div).hide();
12570
+ // was true before
12571
+ if ($elm.data().xuData.xurender_node) {
12572
+ $xurender.data({
12573
+ xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
12574
+ xuData: $elm.data().xuData.xurender_node.data().xuData || {},
12575
+ });
12576
+ } else {
12577
+ // default new state
12575
12578
 
12576
- $xurender.data({
12577
- xuAttributes: $elm.data().xuAttributes || {},
12578
- xuData: $elm.data().xuData || {},
12579
- });
12580
- const original_data_obj = {
12581
- nodeP: _.cloneDeep($elm.data().xuData.node_org),
12582
- paramsP: $elm.data().xuData.paramsP,
12583
- $container: $elm.clone(true),
12584
- parent_infoP: parent_infoP,
12585
- };
12579
+ $xurender.data({
12580
+ xuAttributes: $elm.data().xuAttributes || {},
12581
+ xuData: $elm.data().xuData || {},
12582
+ });
12583
+ const original_data_obj = {
12584
+ nodeP: _.cloneDeep($elm.data().xuData.node_org),
12585
+ paramsP: $elm.data().xuData.paramsP,
12586
+ $container: $elm.clone(true),
12587
+ parent_infoP: parent_infoP,
12588
+ };
12586
12589
 
12587
- $xurender.data().xuData.original_data_obj = original_data_obj;
12588
- }
12590
+ $xurender.data().xuData.original_data_obj = original_data_obj;
12591
+ }
12589
12592
 
12590
- $elm.replaceWith(tmp_$div.children());
12591
- func.events.delete_job(SESSION_ID, jobNoP);
12592
- // }
12593
+ $elm.replaceWith(tmp_$div.children());
12594
+ func.events.delete_job(SESSION_ID, jobNoP);
12595
+ // }
12596
+ };
12597
+ if (is_init) {
12598
+ return init_render();
12599
+ }
12600
+ return await post_render();
12593
12601
  };
12594
- if (is_init) {
12595
- return init_render();
12596
- }
12597
- return await post_render();
12598
- },
12599
- 'xu-render': async function ($elm, val, from_panel) {
12600
- var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
12601
- const init_render = async function () {
12602
- if (!value) {
12603
- const cloned_$div = $elm.clone(true);
12604
12602
 
12605
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12603
+ const new_render = async function () {
12604
+ var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-render', 'bool', val.value);
12605
+ const init_render = async function () {
12606
+ nodeP.xu_render_made = value;
12607
+ if (!value) {
12608
+ // const cloned_$div = $elm.clone(true);
12609
+
12610
+ // const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12611
+
12612
+ // let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
12613
+ // let original_data_obj = {
12614
+ // force_render: true,
12615
+ // $container: cloned_$div,
12616
+ // nodeP: _.cloneDeep(nodeP),
12617
+ // parent_infoP,
12618
+ // paramsP,
12619
+ // keyP,
12620
+ // parent_nodeP,
12621
+ // $root_container,
12622
+ // };
12623
+ // $xurender.data('xuData', cloned_$div.data().xuData);
12624
+ // $xurender.data().xuData.original_data_obj = original_data_obj;
12625
+ // $xurender.data().xuData.xurender_node = cloned_$div;
12626
+ // $xurender.data().xuAttributes = nodeP.attributes || {};
12627
+ // $xurender.hide();
12628
+
12629
+ // $elm.remove();
12630
+ // nodeP.xu_render_made = true;
12631
+ return { xu_render_in_process: true };
12632
+ }
12633
+ return {};
12634
+ };
12606
12635
 
12607
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
12608
- let original_data_obj = {
12609
- force_render: true,
12610
- $container: cloned_$div,
12611
- nodeP: _.cloneDeep(nodeP),
12612
- parent_infoP,
12613
- paramsP,
12614
- keyP,
12615
- parent_nodeP,
12616
- $root_container,
12617
- };
12618
- $xurender.data('xuData', cloned_$div.data().xuData);
12619
- $xurender.data().xuData.original_data_obj = original_data_obj;
12620
- $xurender.data().xuData.xurender_node = cloned_$div;
12621
- $xurender.data().xuAttributes = nodeP.attributes || {};
12622
- $xurender.hide();
12636
+ const post_render = async function () {
12637
+ if (value) {
12638
+ try {
12639
+ // abort if already rended
12640
+ if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
12641
+ return func.events.delete_job(SESSION_ID, jobNoP);
12642
+ }
12623
12643
 
12624
- $elm.remove();
12625
- return { abort: true };
12626
- }
12627
- return {};
12628
- };
12644
+ let original_data_obj = $elm.data().xuData.original_data_obj;
12629
12645
 
12630
- const post_render = async function () {
12631
- if (value) {
12632
- try {
12633
- // abort if already rended
12634
- if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
12635
- return func.events.delete_job(SESSION_ID, jobNoP);
12636
- }
12646
+ if (!original_data_obj) {
12647
+ func.events.delete_job(SESSION_ID, jobNoP);
12648
+ return { delete_job: jobNoP };
12649
+ }
12637
12650
 
12638
- let original_data_obj = $elm.data().xuData.original_data_obj;
12651
+ ////////////
12652
+ const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12653
+ const xu_ui_id = $elm.attr('xu-ui-id');
12654
+ let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
12639
12655
 
12640
- if (!original_data_obj) {
12641
- func.events.delete_job(SESSION_ID, jobNoP);
12642
- return { delete_job: jobNoP };
12643
- }
12656
+ /////////////
12657
+ // let new_$div = original_data_obj.$container.clone(true);
12644
12658
 
12645
- ////////////
12646
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12647
- const xu_ui_id = $elm.attr('xu-ui-id');
12648
- let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
12659
+ if (original_data_obj.force_render || !new_$div) {
12660
+ new_$div = await func.UI.screen.render_ui_tree(
12661
+ SESSION_ID,
12662
+ $elm, //original_data_obj.$container,
12663
+ _.cloneDeep(original_data_obj.nodeP),
12664
+ original_data_obj.parent_infoP,
12665
+ original_data_obj.paramsP,
12666
+ jobNoP,
12667
+ null,
12668
+ original_data_obj.keyP,
12669
+ null,
12670
+ original_data_obj.parent_nodeP,
12671
+ null,
12672
+ original_data_obj.$root_container,
12673
+ );
12674
+ }
12675
+ ////////////
12676
+ if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12677
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12678
+ }
12679
+ UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12680
+ //////////////
12681
+ new_$div.data().xuData.original_data_obj = original_data_obj;
12682
+ new_$div.data().xuData.xurender_node = $elm.clone(true);
12683
+ new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
12684
+
12685
+ const replace = async function () {
12686
+ $elm.replaceWith(new_$div);
12687
+ if (from_panel) {
12688
+ const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
12689
+ $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
12690
+ $elm.replaceWith(new_$div.children());
12691
+ }
12649
12692
 
12650
- /////////////
12651
- // let new_$div = original_data_obj.$container.clone(true);
12693
+ if (val.fields_arr) {
12694
+ return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
12695
+ }
12696
+ func.events.delete_job(SESSION_ID, jobNoP);
12697
+ };
12652
12698
 
12653
- if (original_data_obj.force_render || !new_$div) {
12654
- new_$div = await func.UI.screen.render_ui_tree(
12655
- SESSION_ID,
12656
- $elm, //original_data_obj.$container,
12657
- _.cloneDeep(original_data_obj.nodeP),
12658
- original_data_obj.parent_infoP,
12659
- original_data_obj.paramsP,
12660
- jobNoP,
12661
- null,
12662
- original_data_obj.keyP,
12663
- null,
12664
- original_data_obj.parent_nodeP,
12665
- null,
12666
- original_data_obj.$root_container,
12667
- );
12668
- }
12669
- ////////////
12670
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12671
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
12672
- }
12673
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12674
- //////////////
12675
- new_$div.data().xuData.original_data_obj = original_data_obj;
12676
- new_$div.data().xuData.xurender_node = $elm.clone(true);
12677
- new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
12678
-
12679
- const replace = async function () {
12680
- $elm.replaceWith(new_$div);
12681
- if (from_panel) {
12682
- const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
12683
- $elm.parent().data().xuPanelWrapper = xuPanelWrapper;
12684
- $elm.replaceWith(new_$div.children());
12685
- }
12699
+ if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
12700
+ if (new_$div.data().xuData.paramsP) {
12701
+ return await replace();
12702
+ }
12686
12703
 
12687
- if (val.fields_arr) {
12688
- return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
12704
+ func.events.delete_job(SESSION_ID, jobNoP);
12689
12705
  }
12706
+ } catch (error) {
12690
12707
  func.events.delete_job(SESSION_ID, jobNoP);
12691
- };
12708
+ }
12709
+ return;
12710
+ }
12692
12711
 
12693
- if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
12694
- if (new_$div.data().xuData.paramsP) {
12695
- return await replace();
12696
- }
12712
+ /////////// !value ///////////
12697
12713
 
12698
- func.events.delete_job(SESSION_ID, jobNoP);
12699
- }
12700
- } catch (error) {
12714
+ if ($elm.prop('tagName') === 'XURENDER') {
12701
12715
  func.events.delete_job(SESSION_ID, jobNoP);
12716
+ return;
12702
12717
  }
12703
- return;
12704
- }
12705
12718
 
12706
- /////////// !value ///////////
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);
12707
12722
 
12708
- if ($elm.prop('tagName') === 'XURENDER') {
12709
- func.events.delete_job(SESSION_ID, jobNoP);
12710
- return;
12711
- }
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
12712
12732
 
12713
- let tmp_$div = $('<div>');
12714
- // const xu_ui_id = $elm.attr('xu-ui-id');
12715
- const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
12716
-
12717
- let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
12718
- // // was true before
12719
- // if ($elm.data().xuData.xurender_node) {
12720
- // $xurender.data({
12721
- // xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
12722
- // xuData: $elm.data().xuData.xurender_node.data().xuData || {},
12723
- // });
12724
- // } else {
12725
- // default new state
12726
-
12727
- $xurender.data({
12728
- xuAttributes: $elm.data().xuAttributes || {},
12729
- xuData: $elm.data().xuData || {},
12730
- });
12731
- // const original_data_obj = {
12732
- // nodeP: _.cloneDeep($elm.data().xuData.node_org),
12733
- // paramsP: $elm.data().xuData.paramsP,
12734
- // $container: $elm.clone(true),
12735
- // parent_infoP: parent_infoP,
12736
- // };
12737
- const cloned_$div = $elm.clone(true);
12738
- let original_data_obj = {
12739
- force_render: false,
12740
- $container: cloned_$div,
12741
- nodeP: cloned_$div.data().xuData.node_org,
12742
- parent_infoP,
12743
- paramsP,
12744
- keyP,
12745
- parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
12746
- $root_container,
12747
- };
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,
12742
+ // };
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
+ };
12748
12754
 
12749
- $xurender.data().xuData.original_data_obj = original_data_obj;
12755
+ $xurender.data().xuData.original_data_obj = original_data_obj;
12750
12756
 
12751
- const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
12752
- if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
12753
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
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;
12762
+ // }
12763
+ $elm.replaceWith(tmp_$div.children());
12764
+ func.events.delete_job(SESSION_ID, jobNoP);
12765
+ };
12766
+ if (is_init) {
12767
+ return await init_render();
12754
12768
  }
12755
- UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
12756
- // }
12757
- $elm.replaceWith(tmp_$div.children());
12758
- func.events.delete_job(SESSION_ID, jobNoP);
12769
+ return await post_render();
12759
12770
  };
12760
- if (is_init) {
12761
- return await init_render();
12771
+
12772
+ if (glb.new_xu_render) {
12773
+ return new_render();
12762
12774
  }
12763
- return await post_render();
12775
+ return old_render();
12764
12776
  },
12765
12777
  'xu-show': async function ($elm, val) {
12766
12778
  var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-show', 'bool', val.value);
@@ -13319,22 +13331,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
13319
13331
  continue;
13320
13332
  }
13321
13333
 
13322
- // if (!nodeP.attributes || !nodeP.attributes[attr] & !nodeP.attributes[`xu-exp:${attr}`]) {
13323
- // continue;
13324
- // }
13325
-
13326
- // if (_.isEmpty(nodeP.attributes)) {
13327
- // break;
13328
- // }
13329
-
13330
- // if (typeof nodeP.attributes[attr] === 'undefined') {
13331
- // continue;
13332
- // }
13333
-
13334
- // if (typeof func.UI.screen.fix_val_defaults(attr, (await get_xuExp(attr)) || nodeP.attributes[attr]) === 'undefined') {
13335
- // continue;
13336
- // }
13337
-
13338
13334
  if (!nodeP?.attributes?.hasOwnProperty(attr) && !nodeP?.attributes?.hasOwnProperty(`xu-exp:${attr}`)) {
13339
13335
  continue;
13340
13336
  }
@@ -13359,7 +13355,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
13359
13355
  {
13360
13356
  key: attr,
13361
13357
 
13362
- // value: (await get_xuExp(attr)) || func.UI.screen.fix_val_defaults(attr, nodeP.attributes[attr]),
13363
13358
  value: await get_attr_value(attr),
13364
13359
  },
13365
13360
  is_init,
@@ -13933,6 +13928,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
13933
13928
  // debugger;
13934
13929
  }
13935
13930
 
13931
+ ///////////
13932
+ if (glb.new_xu_render) {
13933
+ }
13934
+
13935
+ ///////////
13936
13936
  var is_mobile = glb.MOBILE_ARR.includes(paramsP.screenInfo.properties?.menuType) ? true : false;
13937
13937
 
13938
13938
  const get_element_info = function () {
@@ -14085,6 +14085,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14085
14085
  node_promises.push(
14086
14086
  new Promise(async (resolve, reject) => {
14087
14087
  const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $divP, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
14088
+ debugger;
14088
14089
  resolve();
14089
14090
  }),
14090
14091
  );
@@ -14755,13 +14756,27 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14755
14756
  };
14756
14757
 
14757
14758
  const draw_html_element = async function (element) {
14758
- const done = async function () {
14759
- return $div;
14759
+ let temp_$container = $('<tmp>');
14760
+ if (!glb.new_xu_render) {
14761
+ temp_$container = $container;
14762
+ }
14763
+ const done = async function (ret) {
14764
+ if (glb.new_xu_render) {
14765
+ if (ret.xu_render_in_process) {
14766
+ debugger;
14767
+ $container.append(temp_$container.children());
14768
+ return $div;
14769
+ } else {
14770
+ return $div;
14771
+ }
14772
+ } else {
14773
+ return $div;
14774
+ }
14760
14775
  };
14761
14776
  if (!element || element === 'script') return await done();
14762
14777
  let str = '';
14763
14778
 
14764
- var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
14779
+ var $div = await func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, temp_$container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
14765
14780
 
14766
14781
  $div.hover(
14767
14782
  function (e) {
@@ -14777,8 +14792,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14777
14792
  });
14778
14793
  }
14779
14794
 
14780
- let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
14781
- if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) return await done();
14795
+ let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, temp_$container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
14796
+ if (ret.abort || nodeP.tagName === 'svg' || !_.isEmpty(nodeP?.attributes?.['xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-html']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-text']) || !_.isEmpty(nodeP?.attributes?.['xu-exp:xu-html'])) {
14797
+ return await done();
14798
+ }
14782
14799
  // check if iterator made to prevent children render
14783
14800
 
14784
14801
  if (nodeP?.attributes?.['xu-viewport'] == 'true') {
@@ -14848,7 +14865,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14848
14865
  // $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
14849
14866
  // } else {
14850
14867
  hover_in($div);
14851
- ui_job_id = func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container }, null, null, paramsP.dsSessionP);
14868
+ ui_job_id = func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, temp_$container }, null, null, paramsP.dsSessionP);
14852
14869
  // }
14853
14870
  observer_outViewport.observe($div[0]);
14854
14871
  });
@@ -14872,11 +14889,19 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
14872
14889
  };
14873
14890
  xu_viewport();
14874
14891
  } else {
14875
- await iterate_child($div, nodeP, parent_infoP, $root_container);
14892
+ if (glb.new_xu_render) {
14893
+ if (ret.xu_render_in_process) {
14894
+ iterate_child($div, nodeP, parent_infoP, $root_container);
14895
+ } else {
14896
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
14897
+ }
14898
+ } else {
14899
+ await iterate_child($div, nodeP, parent_infoP, $root_container);
14900
+ }
14876
14901
  }
14877
14902
 
14878
14903
  // const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
14879
- return await done();
14904
+ return await done(ret);
14880
14905
  };
14881
14906
 
14882
14907
  if (nodeP.content && nodeP.attributes) {