@xuda.io/runtime-bundle 1.0.1066 → 1.0.1068
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 +39 -23
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +39 -23
- package/js/xuda-runtime-slim.min.es.js +39 -23
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +4 -4
- package/js/xuda-worker-bundle.js +4 -4
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -4656,11 +4656,11 @@ func.datasource.del = function (SESSION_ID, dsP) {
|
|
|
4656
4656
|
delete_pending_jobs();
|
|
4657
4657
|
|
|
4658
4658
|
for (const [ui_cache_key, ui_cache_val] of Object.entries(UI_WORKER_OBJ.xu_render_cache)) {
|
|
4659
|
-
for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
}
|
|
4659
|
+
// for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
4660
|
+
if (ui_cache_val.paramsP.dsSessionP === dsP) {
|
|
4661
|
+
delete UI_WORKER_OBJ.xu_render_cache[ui_cache_key];
|
|
4663
4662
|
}
|
|
4663
|
+
// }
|
|
4664
4664
|
}
|
|
4665
4665
|
}
|
|
4666
4666
|
if ($(SESSION_OBJ[SESSION_ID].root_element).find('xu-nav').length) {
|
|
@@ -11786,7 +11786,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11786
11786
|
if (item.id !== node.id) continue;
|
|
11787
11787
|
|
|
11788
11788
|
if (typeof node.xu_render_made !== 'undefined' && !node.xu_render_made) {
|
|
11789
|
-
const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id
|
|
11789
|
+
const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id + node.xu_render_cache_id];
|
|
11790
11790
|
parent_element_ui_id;
|
|
11791
11791
|
const elem_key = node.xu_render_xu_ui_id;
|
|
11792
11792
|
const elem_val = { attributes: [attr], $elm: node_data.$div };
|
|
@@ -12667,14 +12667,14 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12667
12667
|
try {
|
|
12668
12668
|
const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($elm.data()?.xuData.attr_exp_info?.['xu-render']?.fields || {}));
|
|
12669
12669
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
12670
|
-
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id
|
|
12670
|
+
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
|
|
12671
12671
|
|
|
12672
12672
|
if (!new_$div || !new_$div.$div) {
|
|
12673
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
12673
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
|
|
12674
12674
|
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
12675
12675
|
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
12676
12676
|
new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $container, nodeP, parent_infoP, paramsP, jobNoP, null, keyP, null, parent_nodeP, null, $root_container);
|
|
12677
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
12677
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
|
|
12678
12678
|
}
|
|
12679
12679
|
// append order handling
|
|
12680
12680
|
|
|
@@ -12706,11 +12706,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12706
12706
|
/////////// !value ///////////
|
|
12707
12707
|
|
|
12708
12708
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
12709
|
-
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
12710
|
-
|
|
12711
|
-
}
|
|
12709
|
+
// if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
12710
|
+
// UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
12711
|
+
// }
|
|
12712
12712
|
const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($elm.data()?.xuData.attr_exp_info?.['xu-render']?.fields || {}));
|
|
12713
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
12713
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + cache_str] = { $div: $elm.clone(true) };
|
|
12714
12714
|
$elm.remove();
|
|
12715
12715
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
12716
12716
|
};
|
|
@@ -14725,12 +14725,12 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14725
14725
|
if (glb.new_xu_render) {
|
|
14726
14726
|
if (ret.has_xu_render_attribute) {
|
|
14727
14727
|
const xu_ui_id = $div.attr('xu-ui-id');
|
|
14728
|
-
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
14729
|
-
|
|
14730
|
-
}
|
|
14728
|
+
// if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
14729
|
+
// UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
14730
|
+
// }
|
|
14731
14731
|
|
|
14732
14732
|
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 || {}));
|
|
14733
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
14733
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
|
|
14734
14734
|
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
14735
14735
|
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
14736
14736
|
if (ret.xu_render_in_process) {
|
|
@@ -14928,15 +14928,31 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
14928
14928
|
|
|
14929
14929
|
////////
|
|
14930
14930
|
for (const [ui_cache_key, ui_cache_val] of Object.entries(UI_WORKER_OBJ.xu_render_cache)) {
|
|
14931
|
-
for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
}
|
|
14931
|
+
// for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
14932
|
+
// const dsP=cache_val.paramsP.dsSessionP
|
|
14933
|
+
let prog_obj = await func.utils.VIEWS_OBJ.get(SESSION_ID, ui_cache_val.paramsP.prog_id);
|
|
14934
|
+
if (prog_obj?.progDataSource?.dataSourceTableId === doc_change.table_id) {
|
|
14935
|
+
// UI_WORKER_OBJ.xu_render_cache[ui_cache_key][cache_key];
|
|
14936
|
+
ui_cache_val.$div = null;
|
|
14938
14937
|
}
|
|
14938
|
+
// }
|
|
14939
|
+
}
|
|
14940
|
+
};
|
|
14941
|
+
|
|
14942
|
+
const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
|
|
14943
|
+
var _session = SESSION_OBJ[SESSION_ID];
|
|
14944
|
+
var _ds = _session.DS_GLB[dsSessionP];
|
|
14945
|
+
|
|
14946
|
+
const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14947
|
+
const data = _ds.data_feed.rows[idx];
|
|
14948
|
+
|
|
14949
|
+
let obj = {};
|
|
14950
|
+
|
|
14951
|
+
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
14952
|
+
obj = get_parent_ds_fields(SESSION_ID, _ds.parentDataSourceNo);
|
|
14939
14953
|
}
|
|
14954
|
+
|
|
14955
|
+
return { ...data, ...obj };
|
|
14940
14956
|
};
|
|
14941
14957
|
|
|
14942
14958
|
const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
@@ -4657,11 +4657,11 @@ func.datasource.del = function (SESSION_ID, dsP) {
|
|
|
4657
4657
|
delete_pending_jobs();
|
|
4658
4658
|
|
|
4659
4659
|
for (const [ui_cache_key, ui_cache_val] of Object.entries(UI_WORKER_OBJ.xu_render_cache)) {
|
|
4660
|
-
for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
}
|
|
4660
|
+
// for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
4661
|
+
if (ui_cache_val.paramsP.dsSessionP === dsP) {
|
|
4662
|
+
delete UI_WORKER_OBJ.xu_render_cache[ui_cache_key];
|
|
4664
4663
|
}
|
|
4664
|
+
// }
|
|
4665
4665
|
}
|
|
4666
4666
|
}
|
|
4667
4667
|
if ($(SESSION_OBJ[SESSION_ID].root_element).find('xu-nav').length) {
|
|
@@ -9511,7 +9511,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9511
9511
|
if (item.id !== node.id) continue;
|
|
9512
9512
|
|
|
9513
9513
|
if (typeof node.xu_render_made !== 'undefined' && !node.xu_render_made) {
|
|
9514
|
-
const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id
|
|
9514
|
+
const node_data = UI_WORKER_OBJ.xu_render_cache[node.xu_render_xu_ui_id + node.xu_render_cache_id];
|
|
9515
9515
|
parent_element_ui_id;
|
|
9516
9516
|
const elem_key = node.xu_render_xu_ui_id;
|
|
9517
9517
|
const elem_val = { attributes: [attr], $elm: node_data.$div };
|
|
@@ -10392,14 +10392,14 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10392
10392
|
try {
|
|
10393
10393
|
const xu_render_cache_id = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($elm.data()?.xuData.attr_exp_info?.['xu-render']?.fields || {}));
|
|
10394
10394
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
10395
|
-
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id
|
|
10395
|
+
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
|
|
10396
10396
|
|
|
10397
10397
|
if (!new_$div || !new_$div.$div) {
|
|
10398
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
10398
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
|
|
10399
10399
|
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
10400
10400
|
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
10401
10401
|
new_$div = await func.UI.screen.render_ui_tree(SESSION_ID, $container, nodeP, parent_infoP, paramsP, jobNoP, null, keyP, null, parent_nodeP, null, $root_container);
|
|
10402
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
10402
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
|
|
10403
10403
|
}
|
|
10404
10404
|
// append order handling
|
|
10405
10405
|
|
|
@@ -10431,11 +10431,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10431
10431
|
/////////// !value ///////////
|
|
10432
10432
|
|
|
10433
10433
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
10434
|
-
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
10435
|
-
|
|
10436
|
-
}
|
|
10434
|
+
// if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
10435
|
+
// UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
10436
|
+
// }
|
|
10437
10437
|
const cache_str = await get_xu_render_cache_str(SESSION_ID, paramsP.dsSessionP, Object.keys($elm.data()?.xuData.attr_exp_info?.['xu-render']?.fields || {}));
|
|
10438
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
10438
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + cache_str] = { $div: $elm.clone(true) };
|
|
10439
10439
|
$elm.remove();
|
|
10440
10440
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
10441
10441
|
};
|
|
@@ -12450,12 +12450,12 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12450
12450
|
if (glb.new_xu_render) {
|
|
12451
12451
|
if (ret.has_xu_render_attribute) {
|
|
12452
12452
|
const xu_ui_id = $div.attr('xu-ui-id');
|
|
12453
|
-
if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
12454
|
-
|
|
12455
|
-
}
|
|
12453
|
+
// if (!UI_WORKER_OBJ.xu_render_cache[xu_ui_id]) {
|
|
12454
|
+
// UI_WORKER_OBJ.xu_render_cache[xu_ui_id] = {};
|
|
12455
|
+
// }
|
|
12456
12456
|
|
|
12457
12457
|
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 || {}));
|
|
12458
|
-
UI_WORKER_OBJ.xu_render_cache[xu_ui_id
|
|
12458
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { $div: $div.clone(true), paramsP };
|
|
12459
12459
|
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
12460
12460
|
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
12461
12461
|
if (ret.xu_render_in_process) {
|
|
@@ -12653,15 +12653,31 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
12653
12653
|
|
|
12654
12654
|
////////
|
|
12655
12655
|
for (const [ui_cache_key, ui_cache_val] of Object.entries(UI_WORKER_OBJ.xu_render_cache)) {
|
|
12656
|
-
for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
}
|
|
12656
|
+
// for (const [cache_key, cache_val] of Object.entries(ui_cache_val)) {
|
|
12657
|
+
// const dsP=cache_val.paramsP.dsSessionP
|
|
12658
|
+
let prog_obj = await func.utils.VIEWS_OBJ.get(SESSION_ID, ui_cache_val.paramsP.prog_id);
|
|
12659
|
+
if (prog_obj?.progDataSource?.dataSourceTableId === doc_change.table_id) {
|
|
12660
|
+
// UI_WORKER_OBJ.xu_render_cache[ui_cache_key][cache_key];
|
|
12661
|
+
ui_cache_val.$div = null;
|
|
12663
12662
|
}
|
|
12663
|
+
// }
|
|
12664
|
+
}
|
|
12665
|
+
};
|
|
12666
|
+
|
|
12667
|
+
const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
|
|
12668
|
+
var _session = SESSION_OBJ[SESSION_ID];
|
|
12669
|
+
var _ds = _session.DS_GLB[dsSessionP];
|
|
12670
|
+
|
|
12671
|
+
const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
12672
|
+
const data = _ds.data_feed.rows[idx];
|
|
12673
|
+
|
|
12674
|
+
let obj = {};
|
|
12675
|
+
|
|
12676
|
+
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
12677
|
+
obj = get_parent_ds_fields(SESSION_ID, _ds.parentDataSourceNo);
|
|
12664
12678
|
}
|
|
12679
|
+
|
|
12680
|
+
return { ...data, ...obj };
|
|
12665
12681
|
};
|
|
12666
12682
|
|
|
12667
12683
|
const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|