@xuda.io/runtime-bundle 1.0.1067 → 1.0.1069
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-slim.js
CHANGED
|
@@ -12669,12 +12669,24 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12669
12669
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
12670
12670
|
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
|
|
12671
12671
|
|
|
12672
|
-
if (!new_$div
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12672
|
+
if (!new_$div?.$div) {
|
|
12673
|
+
// validate if $div contains fields from parent ds
|
|
12674
|
+
const parent_fields = get_parent_ds_fields(SESSION_ID, paramsP.dsSessionP);
|
|
12675
|
+
const div_str = JSON.stringify(new_$div.$div.children());
|
|
12676
|
+
let found = false;
|
|
12677
|
+
for (const [key, val] of Object.entries(parent_fields)) {
|
|
12678
|
+
if (div_str.includes('@' + key)) {
|
|
12679
|
+
found = true;
|
|
12680
|
+
break;
|
|
12681
|
+
}
|
|
12682
|
+
}
|
|
12683
|
+
if (!found) {
|
|
12684
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
|
|
12685
|
+
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
12686
|
+
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
12687
|
+
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);
|
|
12688
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
|
|
12689
|
+
}
|
|
12678
12690
|
}
|
|
12679
12691
|
// append order handling
|
|
12680
12692
|
|
|
@@ -14939,26 +14951,65 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
14939
14951
|
}
|
|
14940
14952
|
};
|
|
14941
14953
|
|
|
14942
|
-
const
|
|
14954
|
+
const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
|
|
14943
14955
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
14944
14956
|
var _ds = _session.DS_GLB[dsSessionP];
|
|
14945
14957
|
|
|
14946
14958
|
const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14947
14959
|
const data = _ds.data_feed.rows[idx];
|
|
14948
14960
|
|
|
14961
|
+
let obj = {};
|
|
14962
|
+
|
|
14963
|
+
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
14964
|
+
obj = get_parent_ds_fields(SESSION_ID, _ds.parentDataSourceNo);
|
|
14965
|
+
}
|
|
14966
|
+
|
|
14967
|
+
return { ...data, ...obj };
|
|
14968
|
+
};
|
|
14969
|
+
|
|
14970
|
+
const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
14971
|
+
const fields_obj = get_parent_ds_fields(SESSION_ID, dsSessionP);
|
|
14972
|
+
|
|
14973
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
14974
|
+
// var _ds = _session.DS_GLB[dsSessionP];
|
|
14975
|
+
|
|
14976
|
+
// const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14977
|
+
// const data = _ds.data_feed.rows[idx];
|
|
14978
|
+
|
|
14949
14979
|
let str = '';
|
|
14950
14980
|
|
|
14951
|
-
for (const [key, val] of Object.entries(
|
|
14981
|
+
for (const [key, val] of Object.entries(fields_obj)) {
|
|
14952
14982
|
if (exclude_vars.includes(key)) continue;
|
|
14953
14983
|
str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
|
|
14954
14984
|
}
|
|
14955
14985
|
|
|
14956
|
-
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
14957
|
-
|
|
14958
|
-
}
|
|
14986
|
+
// if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
14987
|
+
// str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
14988
|
+
// }
|
|
14959
14989
|
|
|
14960
14990
|
return 'C-' + (await func.common.sha256(str));
|
|
14961
14991
|
};
|
|
14992
|
+
|
|
14993
|
+
// const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
14994
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
14995
|
+
// var _ds = _session.DS_GLB[dsSessionP];
|
|
14996
|
+
|
|
14997
|
+
// const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
14998
|
+
// const data = _ds.data_feed.rows[idx];
|
|
14999
|
+
|
|
15000
|
+
// let str = '';
|
|
15001
|
+
|
|
15002
|
+
// for (const [key, val] of Object.entries(data)) {
|
|
15003
|
+
// if (exclude_vars.includes(key)) continue;
|
|
15004
|
+
// str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
|
|
15005
|
+
// }
|
|
15006
|
+
|
|
15007
|
+
// if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
15008
|
+
// str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
15009
|
+
// }
|
|
15010
|
+
|
|
15011
|
+
// return 'C-' + (await func.common.sha256(str));
|
|
15012
|
+
// };
|
|
14962
15013
|
func.UI.component = {};
|
|
14963
15014
|
|
|
14964
15015
|
func.UI.component.create_app_modal_component = function (
|
|
@@ -10394,12 +10394,24 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10394
10394
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
10395
10395
|
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
|
|
10396
10396
|
|
|
10397
|
-
if (!new_$div
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10397
|
+
if (!new_$div?.$div) {
|
|
10398
|
+
// validate if $div contains fields from parent ds
|
|
10399
|
+
const parent_fields = get_parent_ds_fields(SESSION_ID, paramsP.dsSessionP);
|
|
10400
|
+
const div_str = JSON.stringify(new_$div.$div.children());
|
|
10401
|
+
let found = false;
|
|
10402
|
+
for (const [key, val] of Object.entries(parent_fields)) {
|
|
10403
|
+
if (div_str.includes('@' + key)) {
|
|
10404
|
+
found = true;
|
|
10405
|
+
break;
|
|
10406
|
+
}
|
|
10407
|
+
}
|
|
10408
|
+
if (!found) {
|
|
10409
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
|
|
10410
|
+
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
10411
|
+
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
10412
|
+
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);
|
|
10413
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
|
|
10414
|
+
}
|
|
10403
10415
|
}
|
|
10404
10416
|
// append order handling
|
|
10405
10417
|
|
|
@@ -12664,26 +12676,65 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
12664
12676
|
}
|
|
12665
12677
|
};
|
|
12666
12678
|
|
|
12667
|
-
const
|
|
12679
|
+
const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
|
|
12668
12680
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
12669
12681
|
var _ds = _session.DS_GLB[dsSessionP];
|
|
12670
12682
|
|
|
12671
12683
|
const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
12672
12684
|
const data = _ds.data_feed.rows[idx];
|
|
12673
12685
|
|
|
12686
|
+
let obj = {};
|
|
12687
|
+
|
|
12688
|
+
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
12689
|
+
obj = get_parent_ds_fields(SESSION_ID, _ds.parentDataSourceNo);
|
|
12690
|
+
}
|
|
12691
|
+
|
|
12692
|
+
return { ...data, ...obj };
|
|
12693
|
+
};
|
|
12694
|
+
|
|
12695
|
+
const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
12696
|
+
const fields_obj = get_parent_ds_fields(SESSION_ID, dsSessionP);
|
|
12697
|
+
|
|
12698
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
12699
|
+
// var _ds = _session.DS_GLB[dsSessionP];
|
|
12700
|
+
|
|
12701
|
+
// const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
12702
|
+
// const data = _ds.data_feed.rows[idx];
|
|
12703
|
+
|
|
12674
12704
|
let str = '';
|
|
12675
12705
|
|
|
12676
|
-
for (const [key, val] of Object.entries(
|
|
12706
|
+
for (const [key, val] of Object.entries(fields_obj)) {
|
|
12677
12707
|
if (exclude_vars.includes(key)) continue;
|
|
12678
12708
|
str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
|
|
12679
12709
|
}
|
|
12680
12710
|
|
|
12681
|
-
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
12682
|
-
|
|
12683
|
-
}
|
|
12711
|
+
// if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
12712
|
+
// str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
12713
|
+
// }
|
|
12684
12714
|
|
|
12685
12715
|
return 'C-' + (await func.common.sha256(str));
|
|
12686
12716
|
};
|
|
12717
|
+
|
|
12718
|
+
// const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
12719
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
12720
|
+
// var _ds = _session.DS_GLB[dsSessionP];
|
|
12721
|
+
|
|
12722
|
+
// const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
12723
|
+
// const data = _ds.data_feed.rows[idx];
|
|
12724
|
+
|
|
12725
|
+
// let str = '';
|
|
12726
|
+
|
|
12727
|
+
// for (const [key, val] of Object.entries(data)) {
|
|
12728
|
+
// if (exclude_vars.includes(key)) continue;
|
|
12729
|
+
// str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
|
|
12730
|
+
// }
|
|
12731
|
+
|
|
12732
|
+
// if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
12733
|
+
// str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
12734
|
+
// }
|
|
12735
|
+
|
|
12736
|
+
// return 'C-' + (await func.common.sha256(str));
|
|
12737
|
+
// };
|
|
12687
12738
|
func.UI.component = {};
|
|
12688
12739
|
|
|
12689
12740
|
func.UI.component.create_app_modal_component = function (
|