@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.
|
@@ -32353,12 +32353,24 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32353
32353
|
const xu_ui_id = $elm.attr('xu-ui-id');
|
|
32354
32354
|
let new_$div = UI_WORKER_OBJ?.xu_render_cache?.[xu_ui_id + xu_render_cache_id]?.$div.clone(true);
|
|
32355
32355
|
|
|
32356
|
-
if (!new_$div
|
|
32357
|
-
|
|
32358
|
-
|
|
32359
|
-
|
|
32360
|
-
|
|
32361
|
-
|
|
32356
|
+
if (!new_$div?.$div) {
|
|
32357
|
+
// validate if $div contains fields from parent ds
|
|
32358
|
+
const parent_fields = get_parent_ds_fields(SESSION_ID, paramsP.dsSessionP);
|
|
32359
|
+
const div_str = JSON.stringify(new_$div.$div.children());
|
|
32360
|
+
let found = false;
|
|
32361
|
+
for (const [key, val] of Object.entries(parent_fields)) {
|
|
32362
|
+
if (div_str.includes('@' + key)) {
|
|
32363
|
+
found = true;
|
|
32364
|
+
break;
|
|
32365
|
+
}
|
|
32366
|
+
}
|
|
32367
|
+
if (!found) {
|
|
32368
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id] = { paramsP };
|
|
32369
|
+
nodeP.xu_render_xu_ui_id = xu_ui_id;
|
|
32370
|
+
nodeP.xu_render_cache_id = xu_render_cache_id;
|
|
32371
|
+
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);
|
|
32372
|
+
UI_WORKER_OBJ.xu_render_cache[xu_ui_id + xu_render_cache_id].$div = new_$div.clone(true);
|
|
32373
|
+
}
|
|
32362
32374
|
}
|
|
32363
32375
|
// append order handling
|
|
32364
32376
|
|
|
@@ -34623,26 +34635,65 @@ func.UI.screen.refresh_document_changes_for_realtime_update = async function (SE
|
|
|
34623
34635
|
}
|
|
34624
34636
|
};
|
|
34625
34637
|
|
|
34626
|
-
const
|
|
34638
|
+
const get_parent_ds_fields = function (SESSION_ID, dsSessionP) {
|
|
34627
34639
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
34628
34640
|
var _ds = _session.DS_GLB[dsSessionP];
|
|
34629
34641
|
|
|
34630
34642
|
const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
34631
34643
|
const data = _ds.data_feed.rows[idx];
|
|
34632
34644
|
|
|
34645
|
+
let obj = {};
|
|
34646
|
+
|
|
34647
|
+
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
34648
|
+
obj = get_parent_ds_fields(SESSION_ID, _ds.parentDataSourceNo);
|
|
34649
|
+
}
|
|
34650
|
+
|
|
34651
|
+
return { ...data, ...obj };
|
|
34652
|
+
};
|
|
34653
|
+
|
|
34654
|
+
const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
34655
|
+
const fields_obj = get_parent_ds_fields(SESSION_ID, dsSessionP);
|
|
34656
|
+
|
|
34657
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
34658
|
+
// var _ds = _session.DS_GLB[dsSessionP];
|
|
34659
|
+
|
|
34660
|
+
// const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
34661
|
+
// const data = _ds.data_feed.rows[idx];
|
|
34662
|
+
|
|
34633
34663
|
let str = '';
|
|
34634
34664
|
|
|
34635
|
-
for (const [key, val] of Object.entries(
|
|
34665
|
+
for (const [key, val] of Object.entries(fields_obj)) {
|
|
34636
34666
|
if (exclude_vars.includes(key)) continue;
|
|
34637
34667
|
str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
|
|
34638
34668
|
}
|
|
34639
34669
|
|
|
34640
|
-
if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
34641
|
-
|
|
34642
|
-
}
|
|
34670
|
+
// if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
34671
|
+
// str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
34672
|
+
// }
|
|
34643
34673
|
|
|
34644
34674
|
return 'C-' + (await func.common.sha256(str));
|
|
34645
34675
|
};
|
|
34676
|
+
|
|
34677
|
+
// const get_xu_render_cache_str = async function (SESSION_ID, dsSessionP, exclude_vars = []) {
|
|
34678
|
+
// var _session = SESSION_OBJ[SESSION_ID];
|
|
34679
|
+
// var _ds = _session.DS_GLB[dsSessionP];
|
|
34680
|
+
|
|
34681
|
+
// const idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
34682
|
+
// const data = _ds.data_feed.rows[idx];
|
|
34683
|
+
|
|
34684
|
+
// let str = '';
|
|
34685
|
+
|
|
34686
|
+
// for (const [key, val] of Object.entries(data)) {
|
|
34687
|
+
// if (exclude_vars.includes(key)) continue;
|
|
34688
|
+
// str += typeof val !== 'undefined' ? JSON.stringify(val) : '';
|
|
34689
|
+
// }
|
|
34690
|
+
|
|
34691
|
+
// if (typeof _ds.parentDataSourceNo !== 'undefined') {
|
|
34692
|
+
// str += await get_xu_render_cache_str(SESSION_ID, _ds.parentDataSourceNo);
|
|
34693
|
+
// }
|
|
34694
|
+
|
|
34695
|
+
// return 'C-' + (await func.common.sha256(str));
|
|
34696
|
+
// };
|
|
34646
34697
|
func.UI.component = {};
|
|
34647
34698
|
|
|
34648
34699
|
func.UI.component.create_app_modal_component = function (
|