@xuda.io/runtime-bundle 1.0.1017 → 1.0.1019
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.
- package/js/xuda-runtime-bundle.js +278 -268
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +279 -269
- package/js/xuda-runtime-slim.min.es.js +279 -269
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +2 -0
- package/js/xuda-worker-bundle.js +2 -0
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +2 -0
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -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 = {};
|
|
@@ -8660,7 +8662,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
|
|
|
8660
8662
|
{},
|
|
8661
8663
|
queue_obj.jobNoP,
|
|
8662
8664
|
_data.xuData.key,
|
|
8663
|
-
_data.xuData.
|
|
8665
|
+
_data.xuData.parent_node,
|
|
8664
8666
|
'xu-render',
|
|
8665
8667
|
queue_obj.paramsP.elem_val.$elm,
|
|
8666
8668
|
{
|
|
@@ -12467,300 +12469,309 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12467
12469
|
set_value();
|
|
12468
12470
|
return {};
|
|
12469
12471
|
},
|
|
12470
|
-
'xu-render
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
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
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
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
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12511
|
+
if (!original_data_obj) {
|
|
12512
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12513
|
+
return { delete_job: jobNoP };
|
|
12514
|
+
}
|
|
12507
12515
|
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
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
|
-
|
|
12514
|
-
|
|
12515
|
-
$elm
|
|
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
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
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
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
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 (
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12567
|
+
let tmp_$div = $('<div>');
|
|
12565
12568
|
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
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
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
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
|
-
|
|
12588
|
-
|
|
12590
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
12591
|
+
}
|
|
12589
12592
|
|
|
12590
|
-
|
|
12591
|
-
|
|
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
|
-
|
|
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
|
+
if (!value) {
|
|
12607
|
+
// const cloned_$div = $elm.clone(true);
|
|
12608
|
+
|
|
12609
|
+
// const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
|
|
12610
|
+
|
|
12611
|
+
// let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).attr('hidden', true).appendTo($container).hide();
|
|
12612
|
+
// let original_data_obj = {
|
|
12613
|
+
// force_render: true,
|
|
12614
|
+
// $container: cloned_$div,
|
|
12615
|
+
// nodeP: _.cloneDeep(nodeP),
|
|
12616
|
+
// parent_infoP,
|
|
12617
|
+
// paramsP,
|
|
12618
|
+
// keyP,
|
|
12619
|
+
// parent_nodeP,
|
|
12620
|
+
// $root_container,
|
|
12621
|
+
// };
|
|
12622
|
+
// $xurender.data('xuData', cloned_$div.data().xuData);
|
|
12623
|
+
// $xurender.data().xuData.original_data_obj = original_data_obj;
|
|
12624
|
+
// $xurender.data().xuData.xurender_node = cloned_$div;
|
|
12625
|
+
// $xurender.data().xuAttributes = nodeP.attributes || {};
|
|
12626
|
+
// $xurender.hide();
|
|
12627
|
+
|
|
12628
|
+
// $elm.remove();
|
|
12629
|
+
parent_nodeP.xu_render = true;
|
|
12630
|
+
return { xu_render: true };
|
|
12631
|
+
}
|
|
12632
|
+
return {};
|
|
12633
|
+
};
|
|
12606
12634
|
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
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();
|
|
12635
|
+
const post_render = async function () {
|
|
12636
|
+
if (value) {
|
|
12637
|
+
try {
|
|
12638
|
+
// abort if already rended
|
|
12639
|
+
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
12640
|
+
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
12641
|
+
}
|
|
12623
12642
|
|
|
12624
|
-
|
|
12625
|
-
return { abort: true };
|
|
12626
|
-
}
|
|
12627
|
-
return {};
|
|
12628
|
-
};
|
|
12643
|
+
let original_data_obj = $elm.data().xuData.original_data_obj;
|
|
12629
12644
|
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
if ($elm[0].tagName !== 'XURENDER' && $elm?.length) {
|
|
12635
|
-
return func.events.delete_job(SESSION_ID, jobNoP);
|
|
12636
|
-
}
|
|
12645
|
+
if (!original_data_obj) {
|
|
12646
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12647
|
+
return { delete_job: jobNoP };
|
|
12648
|
+
}
|
|
12637
12649
|
|
|
12638
|
-
|
|
12650
|
+
////////////
|
|
12651
|
+
const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
|
|
12652
|
+
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
12653
|
+
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id]?.[cache_str]?.$container.clone(true);
|
|
12639
12654
|
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
return { delete_job: jobNoP };
|
|
12643
|
-
}
|
|
12655
|
+
/////////////
|
|
12656
|
+
// let new_$div = original_data_obj.$container.clone(true);
|
|
12644
12657
|
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12658
|
+
if (original_data_obj.force_render || !new_$div) {
|
|
12659
|
+
new_$div = await func.UI.screen.render_ui_tree(
|
|
12660
|
+
SESSION_ID,
|
|
12661
|
+
$elm, //original_data_obj.$container,
|
|
12662
|
+
_.cloneDeep(original_data_obj.nodeP),
|
|
12663
|
+
original_data_obj.parent_infoP,
|
|
12664
|
+
original_data_obj.paramsP,
|
|
12665
|
+
jobNoP,
|
|
12666
|
+
null,
|
|
12667
|
+
original_data_obj.keyP,
|
|
12668
|
+
null,
|
|
12669
|
+
original_data_obj.parent_nodeP,
|
|
12670
|
+
null,
|
|
12671
|
+
original_data_obj.$root_container,
|
|
12672
|
+
);
|
|
12673
|
+
}
|
|
12674
|
+
////////////
|
|
12675
|
+
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
12676
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
12677
|
+
}
|
|
12678
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
|
|
12679
|
+
//////////////
|
|
12680
|
+
new_$div.data().xuData.original_data_obj = original_data_obj;
|
|
12681
|
+
new_$div.data().xuData.xurender_node = $elm.clone(true);
|
|
12682
|
+
new_$div.data().xuAttributes = $elm.data().xuAttributes || {};
|
|
12683
|
+
|
|
12684
|
+
const replace = async function () {
|
|
12685
|
+
$elm.replaceWith(new_$div);
|
|
12686
|
+
if (from_panel) {
|
|
12687
|
+
const xuPanelWrapper = _.clone(new_$div.data().xuPanelWrapper);
|
|
12688
|
+
$elm.parent().data().xuPanelWrapper = xuPanelWrapper;
|
|
12689
|
+
$elm.replaceWith(new_$div.children());
|
|
12690
|
+
}
|
|
12649
12691
|
|
|
12650
|
-
|
|
12651
|
-
|
|
12692
|
+
if (val.fields_arr) {
|
|
12693
|
+
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
12694
|
+
}
|
|
12695
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12696
|
+
};
|
|
12652
12697
|
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
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
|
-
}
|
|
12698
|
+
if ($elm && func.UI.utils.find_in_element_data('xuData', $(SESSION_OBJ[SESSION_ID].root_element), 'xu_id', $elm.data().xuData.xu_id).length) {
|
|
12699
|
+
if (new_$div.data().xuData.paramsP) {
|
|
12700
|
+
return await replace();
|
|
12701
|
+
}
|
|
12686
12702
|
|
|
12687
|
-
|
|
12688
|
-
return await func.UI.screen.refresh_xu_attributes(SESSION_ID, val.fields_arr, val.jobNoP, new_$div);
|
|
12703
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12689
12704
|
}
|
|
12705
|
+
} catch (error) {
|
|
12690
12706
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12691
|
-
}
|
|
12707
|
+
}
|
|
12708
|
+
return;
|
|
12709
|
+
}
|
|
12692
12710
|
|
|
12693
|
-
|
|
12694
|
-
if (new_$div.data().xuData.paramsP) {
|
|
12695
|
-
return await replace();
|
|
12696
|
-
}
|
|
12711
|
+
/////////// !value ///////////
|
|
12697
12712
|
|
|
12698
|
-
|
|
12699
|
-
}
|
|
12700
|
-
} catch (error) {
|
|
12713
|
+
if ($elm.prop('tagName') === 'XURENDER') {
|
|
12701
12714
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12715
|
+
return;
|
|
12702
12716
|
}
|
|
12703
|
-
return;
|
|
12704
|
-
}
|
|
12705
12717
|
|
|
12706
|
-
|
|
12718
|
+
let tmp_$div = $('<div>');
|
|
12719
|
+
// const xu_ui_id = $elm.attr('xu-ui-id');
|
|
12720
|
+
const xu_ui_id = await generate_xu_ui_id(SESSION_ID, nodeP, $container, paramsP, keyP);
|
|
12707
12721
|
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12722
|
+
let $xurender = $('<xurender>').attr('xu-ui-id', xu_ui_id).appendTo(tmp_$div).hide();
|
|
12723
|
+
// // was true before
|
|
12724
|
+
// if ($elm.data().xuData.xurender_node) {
|
|
12725
|
+
// $xurender.data({
|
|
12726
|
+
// xuAttributes: $elm.data().xuData.xurender_node.data().xuAttributes || {},
|
|
12727
|
+
// xuData: $elm.data().xuData.xurender_node.data().xuData || {},
|
|
12728
|
+
// });
|
|
12729
|
+
// } else {
|
|
12730
|
+
// default new state
|
|
12712
12731
|
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
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
|
-
};
|
|
12732
|
+
$xurender.data({
|
|
12733
|
+
xuAttributes: $elm.data().xuAttributes || {},
|
|
12734
|
+
xuData: $elm.data().xuData || {},
|
|
12735
|
+
});
|
|
12736
|
+
// const original_data_obj = {
|
|
12737
|
+
// nodeP: _.cloneDeep($elm.data().xuData.node_org),
|
|
12738
|
+
// paramsP: $elm.data().xuData.paramsP,
|
|
12739
|
+
// $container: $elm.clone(true),
|
|
12740
|
+
// parent_infoP: parent_infoP,
|
|
12741
|
+
// };
|
|
12742
|
+
const cloned_$div = $elm.clone(true);
|
|
12743
|
+
let original_data_obj = {
|
|
12744
|
+
force_render: false,
|
|
12745
|
+
$container: cloned_$div,
|
|
12746
|
+
nodeP: cloned_$div.data().xuData.node_org,
|
|
12747
|
+
parent_infoP,
|
|
12748
|
+
paramsP,
|
|
12749
|
+
keyP,
|
|
12750
|
+
parent_nodeP, //:cloned_$div.data().xuData.original_data_obj.parent_nodeP,
|
|
12751
|
+
$root_container,
|
|
12752
|
+
};
|
|
12748
12753
|
|
|
12749
|
-
|
|
12754
|
+
$xurender.data().xuData.original_data_obj = original_data_obj;
|
|
12750
12755
|
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12756
|
+
const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP);
|
|
12757
|
+
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
12758
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
12759
|
+
}
|
|
12760
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id][cache_str] = original_data_obj;
|
|
12761
|
+
// }
|
|
12762
|
+
$elm.replaceWith(tmp_$div.children());
|
|
12763
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12764
|
+
};
|
|
12765
|
+
if (is_init) {
|
|
12766
|
+
return await init_render();
|
|
12754
12767
|
}
|
|
12755
|
-
|
|
12756
|
-
// }
|
|
12757
|
-
$elm.replaceWith(tmp_$div.children());
|
|
12758
|
-
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12768
|
+
return await post_render();
|
|
12759
12769
|
};
|
|
12760
|
-
|
|
12761
|
-
|
|
12770
|
+
|
|
12771
|
+
if (glb.new_xu_render) {
|
|
12772
|
+
return new_render();
|
|
12762
12773
|
}
|
|
12763
|
-
return
|
|
12774
|
+
return old_render();
|
|
12764
12775
|
},
|
|
12765
12776
|
'xu-show': async function ($elm, val) {
|
|
12766
12777
|
var value = await func.common.get_cast_val(SESSION_ID, 'common fx', 'xu-show', 'bool', val.value);
|
|
@@ -13319,22 +13330,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
13319
13330
|
continue;
|
|
13320
13331
|
}
|
|
13321
13332
|
|
|
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
13333
|
if (!nodeP?.attributes?.hasOwnProperty(attr) && !nodeP?.attributes?.hasOwnProperty(`xu-exp:${attr}`)) {
|
|
13339
13334
|
continue;
|
|
13340
13335
|
}
|
|
@@ -13359,7 +13354,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
13359
13354
|
{
|
|
13360
13355
|
key: attr,
|
|
13361
13356
|
|
|
13362
|
-
// value: (await get_xuExp(attr)) || func.UI.screen.fix_val_defaults(attr, nodeP.attributes[attr]),
|
|
13363
13357
|
value: await get_attr_value(attr),
|
|
13364
13358
|
},
|
|
13365
13359
|
is_init,
|
|
@@ -13933,6 +13927,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13933
13927
|
// debugger;
|
|
13934
13928
|
}
|
|
13935
13929
|
|
|
13930
|
+
///////////
|
|
13931
|
+
if (glb.new_xu_render) {
|
|
13932
|
+
}
|
|
13933
|
+
|
|
13934
|
+
///////////
|
|
13936
13935
|
var is_mobile = glb.MOBILE_ARR.includes(paramsP.screenInfo.properties?.menuType) ? true : false;
|
|
13937
13936
|
|
|
13938
13937
|
const get_element_info = function () {
|
|
@@ -14085,6 +14084,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14085
14084
|
node_promises.push(
|
|
14086
14085
|
new Promise(async (resolve, reject) => {
|
|
14087
14086
|
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);
|
|
14087
|
+
debugger;
|
|
14088
14088
|
resolve();
|
|
14089
14089
|
}),
|
|
14090
14090
|
);
|
|
@@ -14778,7 +14778,9 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14778
14778
|
}
|
|
14779
14779
|
|
|
14780
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']))
|
|
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'])) {
|
|
14782
|
+
return await done();
|
|
14783
|
+
}
|
|
14782
14784
|
// check if iterator made to prevent children render
|
|
14783
14785
|
|
|
14784
14786
|
if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
@@ -14872,7 +14874,15 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14872
14874
|
};
|
|
14873
14875
|
xu_viewport();
|
|
14874
14876
|
} else {
|
|
14875
|
-
|
|
14877
|
+
if (glb.new_xu_render) {
|
|
14878
|
+
if (ret.xu_render) {
|
|
14879
|
+
iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14880
|
+
} else {
|
|
14881
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14882
|
+
}
|
|
14883
|
+
} else {
|
|
14884
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14885
|
+
}
|
|
14876
14886
|
}
|
|
14877
14887
|
|
|
14878
14888
|
// const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
|