@xuda.io/runtime-bundle 1.0.1090 → 1.0.1092
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 +153 -35
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +153 -35
- package/js/xuda-runtime-slim.min.es.js +153 -35
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -14743,37 +14743,154 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14743
14743
|
},
|
|
14744
14744
|
};
|
|
14745
14745
|
|
|
14746
|
-
const
|
|
14747
|
-
let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
|
|
14748
|
-
if (!glb.new_xu_render) {
|
|
14749
|
-
temp_$container = $container;
|
|
14750
|
-
}
|
|
14746
|
+
const draw_html_element_org = async function (element) {
|
|
14751
14747
|
const done = async function (ret = {}) {
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14748
|
+
return $div;
|
|
14749
|
+
};
|
|
14750
|
+
if (!element || element === 'script') return await done();
|
|
14751
|
+
let str = '';
|
|
14752
|
+
|
|
14753
|
+
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);
|
|
14754
|
+
|
|
14755
|
+
$div.hover(
|
|
14756
|
+
function (e) {
|
|
14757
|
+
hover_in($div, e);
|
|
14758
|
+
},
|
|
14759
|
+
function (e) {
|
|
14760
|
+
hover_out();
|
|
14761
|
+
},
|
|
14762
|
+
);
|
|
14763
|
+
if (paramsP.paramsP === 'grid' || parent_infoP?.iterate_info) {
|
|
14764
|
+
$div.on('click contextmenu', function (e) {
|
|
14765
|
+
hover_in($div, e);
|
|
14766
|
+
});
|
|
14767
|
+
}
|
|
14768
|
+
|
|
14769
|
+
let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $container, nodeP, $div, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
|
|
14770
|
+
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'])) {
|
|
14771
|
+
return await done(ret);
|
|
14772
|
+
}
|
|
14773
|
+
// check if iterator made to prevent children render
|
|
14774
|
+
|
|
14775
|
+
if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
14776
|
+
// const xu_viewport = async function () {
|
|
14777
|
+
// const data = { $div: $div.clone(true), nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container };
|
|
14778
|
+
// const container_id = $container.attr('xu-ui-id');
|
|
14779
|
+
// if (!UI_WORKER_OBJ.pending_for_viewport_render[container_id]) {
|
|
14780
|
+
// UI_WORKER_OBJ.pending_for_viewport_render[container_id] = { base_$div: $div, data: [], $container };
|
|
14781
|
+
// await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14782
|
+
// } else {
|
|
14783
|
+
// $div.remove();
|
|
14784
|
+
// }
|
|
14785
|
+
// UI_WORKER_OBJ.pending_for_viewport_render[container_id].data.push(data);
|
|
14786
|
+
|
|
14787
|
+
// // if (!$div.children().length) {
|
|
14788
|
+
// // // render the first element to determine height
|
|
14789
|
+
// // await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14790
|
+
// // // hover_in($div);
|
|
14791
|
+
// // // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', data, null, null, paramsP.dsSessionP);
|
|
14792
|
+
// // } else {
|
|
14793
|
+
// // }
|
|
14794
|
+
// };
|
|
14795
|
+
const xu_viewport = function () {
|
|
14796
|
+
const observer_inViewport = new IntersectionObserver(
|
|
14797
|
+
function (entries) {
|
|
14798
|
+
entries.forEach((entry) => {
|
|
14799
|
+
if (entry.isIntersecting) {
|
|
14800
|
+
$(entry.target).trigger('inViewport');
|
|
14801
|
+
|
|
14802
|
+
// Optional: stop observing once triggered
|
|
14803
|
+
observer_inViewport.unobserve(entry.target);
|
|
14804
|
+
}
|
|
14805
|
+
});
|
|
14806
|
+
},
|
|
14807
|
+
{
|
|
14808
|
+
threshold: 0.1, // Trigger when 10% of element is visible
|
|
14809
|
+
},
|
|
14810
|
+
);
|
|
14811
|
+
|
|
14812
|
+
const observer_outViewport = new IntersectionObserver(
|
|
14813
|
+
function (entries) {
|
|
14814
|
+
entries.forEach((entry) => {
|
|
14815
|
+
if (!entry.isIntersecting) {
|
|
14816
|
+
// Element is OUT of viewport - trigger custom event
|
|
14817
|
+
$(entry.target).trigger('outViewport');
|
|
14818
|
+
|
|
14819
|
+
// Optional: stop observing once triggered
|
|
14820
|
+
// observer_outViewport.unobserve(entry.target);
|
|
14821
|
+
}
|
|
14822
|
+
});
|
|
14823
|
+
},
|
|
14824
|
+
{
|
|
14825
|
+
threshold: 0, // Trigger when element is completely out of view
|
|
14826
|
+
},
|
|
14827
|
+
);
|
|
14828
|
+
|
|
14829
|
+
let ui_job_id;
|
|
14830
|
+
$div.on('inViewport', function () {
|
|
14831
|
+
if ($div.children().length) {
|
|
14832
|
+
$div.removeClass('skeleton');
|
|
14833
|
+
return;
|
|
14834
|
+
}
|
|
14835
|
+
|
|
14836
|
+
// if (UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]) {
|
|
14837
|
+
// $div[0].style.removeProperty('height');
|
|
14838
|
+
// $div.removeClass('skeleton');
|
|
14839
|
+
// $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
|
|
14840
|
+
// } else {
|
|
14841
|
+
hover_in($div);
|
|
14842
|
+
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);
|
|
14766
14843
|
// }
|
|
14844
|
+
observer_outViewport.observe($div[0]);
|
|
14845
|
+
});
|
|
14846
|
+
|
|
14847
|
+
$div.on('outViewport', function () {
|
|
14848
|
+
func.UI.worker.delete_job(SESSION_ID, ui_job_id);
|
|
14767
14849
|
|
|
14850
|
+
if ($div.children().length) {
|
|
14851
|
+
// UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')] = $div.children().clone(true);
|
|
14852
|
+
$div.empty();
|
|
14853
|
+
const height = $div?.data()?.xuData?.viewport_height || 10;
|
|
14854
|
+
if (typeof height !== 'undefined') {
|
|
14855
|
+
$div.css('height', height);
|
|
14856
|
+
}
|
|
14857
|
+
}
|
|
14858
|
+
// $div.addClass('skeleton');
|
|
14859
|
+
observer_inViewport.observe($div[0]);
|
|
14860
|
+
});
|
|
14861
|
+
$div.addClass('skeleton');
|
|
14862
|
+
observer_inViewport.observe($div[0]);
|
|
14863
|
+
};
|
|
14864
|
+
xu_viewport();
|
|
14865
|
+
} else {
|
|
14866
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14867
|
+
}
|
|
14868
|
+
|
|
14869
|
+
// const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
|
|
14870
|
+
return await done(ret);
|
|
14871
|
+
};
|
|
14872
|
+
|
|
14873
|
+
const draw_html_element = async function (element) {
|
|
14874
|
+
const done = async function (ret = {}) {
|
|
14875
|
+
const xu_ui_id = $div.attr('xu-ui-id');
|
|
14876
|
+
$div.css('display', 'unset');
|
|
14877
|
+
if (ret.has_xu_exp_render_attribute) {
|
|
14878
|
+
const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
|
|
14879
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
|
|
14880
|
+
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
14881
|
+
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
14882
|
+
if (ret.xu_render_background_processing) {
|
|
14883
|
+
// $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
|
|
14768
14884
|
return $div;
|
|
14769
14885
|
} else {
|
|
14770
|
-
|
|
14771
|
-
if (ret.has_xu_render_attribute) {
|
|
14772
|
-
$container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
|
|
14773
|
-
}
|
|
14886
|
+
$container.append(temp_$container.children());
|
|
14774
14887
|
return $div;
|
|
14775
14888
|
}
|
|
14776
14889
|
} else {
|
|
14890
|
+
// $container.append(temp_$container.children());
|
|
14891
|
+
if (ret.has_xu_render_attribute) {
|
|
14892
|
+
// $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
|
|
14893
|
+
}
|
|
14777
14894
|
return $div;
|
|
14778
14895
|
}
|
|
14779
14896
|
};
|
|
@@ -14782,9 +14899,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14782
14899
|
|
|
14783
14900
|
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);
|
|
14784
14901
|
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14902
|
+
$div.css('display', 'none');
|
|
14903
|
+
|
|
14904
|
+
let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
|
|
14905
|
+
let temp_$div = $div.clone(true);
|
|
14788
14906
|
|
|
14789
14907
|
$div.hover(
|
|
14790
14908
|
function (e) {
|
|
@@ -14800,7 +14918,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14800
14918
|
});
|
|
14801
14919
|
}
|
|
14802
14920
|
|
|
14803
|
-
let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $
|
|
14921
|
+
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, temp_$div, true);
|
|
14804
14922
|
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'])) {
|
|
14805
14923
|
return await done(ret);
|
|
14806
14924
|
}
|
|
@@ -14897,15 +15015,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14897
15015
|
};
|
|
14898
15016
|
xu_viewport();
|
|
14899
15017
|
} else {
|
|
14900
|
-
if (
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14904
|
-
} else {
|
|
14905
|
-
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
14906
|
-
}
|
|
15018
|
+
if (ret.xu_render_background_processing) {
|
|
15019
|
+
// let temp_$div = $div.clone(true);
|
|
15020
|
+
iterate_child(temp_$div, nodeP, parent_infoP, $root_container);
|
|
14907
15021
|
} else {
|
|
14908
|
-
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
15022
|
+
await iterate_child(temp_$div, nodeP, parent_infoP, $root_container);
|
|
14909
15023
|
}
|
|
14910
15024
|
}
|
|
14911
15025
|
|
|
@@ -14937,7 +15051,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14937
15051
|
// if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
14938
15052
|
// return await xu_viewport();
|
|
14939
15053
|
// } else {
|
|
15054
|
+
if (!glb.new_xu_render) {
|
|
15055
|
+
return await draw_html_element_org(nodeP.tagName);
|
|
15056
|
+
}
|
|
14940
15057
|
return await draw_html_element(nodeP.tagName);
|
|
15058
|
+
|
|
14941
15059
|
// }
|
|
14942
15060
|
};
|
|
14943
15061
|
|
|
@@ -12468,37 +12468,154 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12468
12468
|
},
|
|
12469
12469
|
};
|
|
12470
12470
|
|
|
12471
|
-
const
|
|
12472
|
-
let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
|
|
12473
|
-
if (!glb.new_xu_render) {
|
|
12474
|
-
temp_$container = $container;
|
|
12475
|
-
}
|
|
12471
|
+
const draw_html_element_org = async function (element) {
|
|
12476
12472
|
const done = async function (ret = {}) {
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12473
|
+
return $div;
|
|
12474
|
+
};
|
|
12475
|
+
if (!element || element === 'script') return await done();
|
|
12476
|
+
let str = '';
|
|
12477
|
+
|
|
12478
|
+
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);
|
|
12479
|
+
|
|
12480
|
+
$div.hover(
|
|
12481
|
+
function (e) {
|
|
12482
|
+
hover_in($div, e);
|
|
12483
|
+
},
|
|
12484
|
+
function (e) {
|
|
12485
|
+
hover_out();
|
|
12486
|
+
},
|
|
12487
|
+
);
|
|
12488
|
+
if (paramsP.paramsP === 'grid' || parent_infoP?.iterate_info) {
|
|
12489
|
+
$div.on('click contextmenu', function (e) {
|
|
12490
|
+
hover_in($div, e);
|
|
12491
|
+
});
|
|
12492
|
+
}
|
|
12493
|
+
|
|
12494
|
+
let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $container, nodeP, $div, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $div, true);
|
|
12495
|
+
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'])) {
|
|
12496
|
+
return await done(ret);
|
|
12497
|
+
}
|
|
12498
|
+
// check if iterator made to prevent children render
|
|
12499
|
+
|
|
12500
|
+
if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
12501
|
+
// const xu_viewport = async function () {
|
|
12502
|
+
// const data = { $div: $div.clone(true), nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container };
|
|
12503
|
+
// const container_id = $container.attr('xu-ui-id');
|
|
12504
|
+
// if (!UI_WORKER_OBJ.pending_for_viewport_render[container_id]) {
|
|
12505
|
+
// UI_WORKER_OBJ.pending_for_viewport_render[container_id] = { base_$div: $div, data: [], $container };
|
|
12506
|
+
// await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
12507
|
+
// } else {
|
|
12508
|
+
// $div.remove();
|
|
12509
|
+
// }
|
|
12510
|
+
// UI_WORKER_OBJ.pending_for_viewport_render[container_id].data.push(data);
|
|
12511
|
+
|
|
12512
|
+
// // if (!$div.children().length) {
|
|
12513
|
+
// // // render the first element to determine height
|
|
12514
|
+
// // await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
12515
|
+
// // // hover_in($div);
|
|
12516
|
+
// // // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', data, null, null, paramsP.dsSessionP);
|
|
12517
|
+
// // } else {
|
|
12518
|
+
// // }
|
|
12519
|
+
// };
|
|
12520
|
+
const xu_viewport = function () {
|
|
12521
|
+
const observer_inViewport = new IntersectionObserver(
|
|
12522
|
+
function (entries) {
|
|
12523
|
+
entries.forEach((entry) => {
|
|
12524
|
+
if (entry.isIntersecting) {
|
|
12525
|
+
$(entry.target).trigger('inViewport');
|
|
12526
|
+
|
|
12527
|
+
// Optional: stop observing once triggered
|
|
12528
|
+
observer_inViewport.unobserve(entry.target);
|
|
12529
|
+
}
|
|
12530
|
+
});
|
|
12531
|
+
},
|
|
12532
|
+
{
|
|
12533
|
+
threshold: 0.1, // Trigger when 10% of element is visible
|
|
12534
|
+
},
|
|
12535
|
+
);
|
|
12536
|
+
|
|
12537
|
+
const observer_outViewport = new IntersectionObserver(
|
|
12538
|
+
function (entries) {
|
|
12539
|
+
entries.forEach((entry) => {
|
|
12540
|
+
if (!entry.isIntersecting) {
|
|
12541
|
+
// Element is OUT of viewport - trigger custom event
|
|
12542
|
+
$(entry.target).trigger('outViewport');
|
|
12543
|
+
|
|
12544
|
+
// Optional: stop observing once triggered
|
|
12545
|
+
// observer_outViewport.unobserve(entry.target);
|
|
12546
|
+
}
|
|
12547
|
+
});
|
|
12548
|
+
},
|
|
12549
|
+
{
|
|
12550
|
+
threshold: 0, // Trigger when element is completely out of view
|
|
12551
|
+
},
|
|
12552
|
+
);
|
|
12553
|
+
|
|
12554
|
+
let ui_job_id;
|
|
12555
|
+
$div.on('inViewport', function () {
|
|
12556
|
+
if ($div.children().length) {
|
|
12557
|
+
$div.removeClass('skeleton');
|
|
12558
|
+
return;
|
|
12559
|
+
}
|
|
12560
|
+
|
|
12561
|
+
// if (UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]) {
|
|
12562
|
+
// $div[0].style.removeProperty('height');
|
|
12563
|
+
// $div.removeClass('skeleton');
|
|
12564
|
+
// $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
|
|
12565
|
+
// } else {
|
|
12566
|
+
hover_in($div);
|
|
12567
|
+
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);
|
|
12491
12568
|
// }
|
|
12569
|
+
observer_outViewport.observe($div[0]);
|
|
12570
|
+
});
|
|
12571
|
+
|
|
12572
|
+
$div.on('outViewport', function () {
|
|
12573
|
+
func.UI.worker.delete_job(SESSION_ID, ui_job_id);
|
|
12492
12574
|
|
|
12575
|
+
if ($div.children().length) {
|
|
12576
|
+
// UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')] = $div.children().clone(true);
|
|
12577
|
+
$div.empty();
|
|
12578
|
+
const height = $div?.data()?.xuData?.viewport_height || 10;
|
|
12579
|
+
if (typeof height !== 'undefined') {
|
|
12580
|
+
$div.css('height', height);
|
|
12581
|
+
}
|
|
12582
|
+
}
|
|
12583
|
+
// $div.addClass('skeleton');
|
|
12584
|
+
observer_inViewport.observe($div[0]);
|
|
12585
|
+
});
|
|
12586
|
+
$div.addClass('skeleton');
|
|
12587
|
+
observer_inViewport.observe($div[0]);
|
|
12588
|
+
};
|
|
12589
|
+
xu_viewport();
|
|
12590
|
+
} else {
|
|
12591
|
+
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
12592
|
+
}
|
|
12593
|
+
|
|
12594
|
+
// const ret_iterate_child = await iterate_child($div, nodeP, parent_infoP, null, $root_container);
|
|
12595
|
+
return await done(ret);
|
|
12596
|
+
};
|
|
12597
|
+
|
|
12598
|
+
const draw_html_element = async function (element) {
|
|
12599
|
+
const done = async function (ret = {}) {
|
|
12600
|
+
const xu_ui_id = $div.attr('xu-ui-id');
|
|
12601
|
+
$div.css('display', 'unset');
|
|
12602
|
+
if (ret.has_xu_exp_render_attribute) {
|
|
12603
|
+
const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($div.data()?.xuData?.attr_exp_info?.['xu-render']?.fields || {}));
|
|
12604
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
|
|
12605
|
+
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
12606
|
+
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
12607
|
+
if (ret.xu_render_background_processing) {
|
|
12608
|
+
// $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
|
|
12493
12609
|
return $div;
|
|
12494
12610
|
} else {
|
|
12495
|
-
|
|
12496
|
-
if (ret.has_xu_render_attribute) {
|
|
12497
|
-
$container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
|
|
12498
|
-
}
|
|
12611
|
+
$container.append(temp_$container.children());
|
|
12499
12612
|
return $div;
|
|
12500
12613
|
}
|
|
12501
12614
|
} else {
|
|
12615
|
+
// $container.append(temp_$container.children());
|
|
12616
|
+
if (ret.has_xu_render_attribute) {
|
|
12617
|
+
// $container.find(`[xu-ui-id="${xu_ui_id}"]`).remove();
|
|
12618
|
+
}
|
|
12502
12619
|
return $div;
|
|
12503
12620
|
}
|
|
12504
12621
|
};
|
|
@@ -12507,9 +12624,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12507
12624
|
|
|
12508
12625
|
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);
|
|
12509
12626
|
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12627
|
+
$div.css('display', 'none');
|
|
12628
|
+
|
|
12629
|
+
let temp_$container = $('<tmp>').data('xuData', $container.data().xuData);
|
|
12630
|
+
let temp_$div = $div.clone(true);
|
|
12513
12631
|
|
|
12514
12632
|
$div.hover(
|
|
12515
12633
|
function (e) {
|
|
@@ -12525,7 +12643,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12525
12643
|
});
|
|
12526
12644
|
}
|
|
12527
12645
|
|
|
12528
|
-
let ret = await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $
|
|
12646
|
+
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, temp_$div, true);
|
|
12529
12647
|
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'])) {
|
|
12530
12648
|
return await done(ret);
|
|
12531
12649
|
}
|
|
@@ -12622,15 +12740,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12622
12740
|
};
|
|
12623
12741
|
xu_viewport();
|
|
12624
12742
|
} else {
|
|
12625
|
-
if (
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
12629
|
-
} else {
|
|
12630
|
-
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
12631
|
-
}
|
|
12743
|
+
if (ret.xu_render_background_processing) {
|
|
12744
|
+
// let temp_$div = $div.clone(true);
|
|
12745
|
+
iterate_child(temp_$div, nodeP, parent_infoP, $root_container);
|
|
12632
12746
|
} else {
|
|
12633
|
-
await iterate_child($div, nodeP, parent_infoP, $root_container);
|
|
12747
|
+
await iterate_child(temp_$div, nodeP, parent_infoP, $root_container);
|
|
12634
12748
|
}
|
|
12635
12749
|
}
|
|
12636
12750
|
|
|
@@ -12662,7 +12776,11 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12662
12776
|
// if (nodeP?.attributes?.['xu-viewport'] == 'true') {
|
|
12663
12777
|
// return await xu_viewport();
|
|
12664
12778
|
// } else {
|
|
12779
|
+
if (!glb.new_xu_render) {
|
|
12780
|
+
return await draw_html_element_org(nodeP.tagName);
|
|
12781
|
+
}
|
|
12665
12782
|
return await draw_html_element(nodeP.tagName);
|
|
12783
|
+
|
|
12666
12784
|
// }
|
|
12667
12785
|
};
|
|
12668
12786
|
|