@xuda.io/runtime-bundle 1.0.368 → 1.0.370
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 +41 -388
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +41 -388
- package/js/xuda-runtime-slim.min.es.js +41 -388
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +3 -8
- package/js/xuda-worker-bundle.js +3 -8
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -28149,19 +28149,12 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
28149
28149
|
};
|
|
28150
28150
|
|
|
28151
28151
|
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
28152
|
-
// return;
|
|
28153
28152
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
28154
28153
|
|
|
28155
28154
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
28156
28155
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
28157
28156
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
28158
28157
|
|
|
28159
|
-
// for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
28160
|
-
// if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
28161
|
-
// delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
28162
|
-
// }
|
|
28163
|
-
// }
|
|
28164
|
-
|
|
28165
28158
|
let abort;
|
|
28166
28159
|
|
|
28167
28160
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -28208,7 +28201,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
|
|
|
28208
28201
|
func.datasource.del(SESSION_ID, val);
|
|
28209
28202
|
}
|
|
28210
28203
|
};
|
|
28211
|
-
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]
|
|
28204
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
28212
28205
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
28213
28206
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
28214
28207
|
|
|
@@ -31439,9 +31432,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
31439
31432
|
|
|
31440
31433
|
if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
|
|
31441
31434
|
|
|
31442
|
-
// // already rended
|
|
31443
|
-
// if (elem_val.$elm[0].tagName !== 'XURENDER' && elem_val?.$elm?.length) continue;
|
|
31444
|
-
|
|
31445
31435
|
new_job = await func.UI.worker.add_to_queue(
|
|
31446
31436
|
SESSION_ID,
|
|
31447
31437
|
'gui event',
|
|
@@ -31957,16 +31947,20 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31957
31947
|
|
|
31958
31948
|
const common_fx = {
|
|
31959
31949
|
'xu-ref': async function ($elm, val) {
|
|
31960
|
-
// console.log('xu-ref', $elm, val);
|
|
31961
31950
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
31962
31951
|
let _ds_0 = _session.DS_GLB[0];
|
|
31963
|
-
|
|
31964
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
31965
|
-
// }
|
|
31966
|
-
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
31952
|
+
|
|
31967
31953
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
31968
|
-
|
|
31969
|
-
|
|
31954
|
+
|
|
31955
|
+
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
31956
|
+
const data = _.clone(_ds?.data_feed?.rows?.[row_idx]) || {};
|
|
31957
|
+
|
|
31958
|
+
const props = _ds.in_parameters || {};
|
|
31959
|
+
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
31960
|
+
|
|
31961
|
+
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
31962
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, data, attributes, props };
|
|
31963
|
+
|
|
31970
31964
|
return {};
|
|
31971
31965
|
},
|
|
31972
31966
|
'xu-bind': async function ($elm, val) {
|
|
@@ -32299,14 +32293,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32299
32293
|
if (!custom_iterator_key) {
|
|
32300
32294
|
is_key_dynamic_field = true;
|
|
32301
32295
|
|
|
32302
|
-
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
32303
32296
|
iterator_key = '_FOR_KEY';
|
|
32304
32297
|
}
|
|
32305
32298
|
|
|
32306
32299
|
if (!custom_iterator_val) {
|
|
32307
32300
|
is_val_dynamic_field = true;
|
|
32308
32301
|
|
|
32309
|
-
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
32310
32302
|
iterator_val = '_FOR_VAL';
|
|
32311
32303
|
}
|
|
32312
32304
|
|
|
@@ -32353,13 +32345,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32353
32345
|
};
|
|
32354
32346
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
32355
32347
|
_parent_info.iterate_info = iterate_info;
|
|
32356
|
-
|
|
32357
|
-
// _parent_info = iterate_info;
|
|
32358
|
-
// } else {
|
|
32359
|
-
// _parent_info = {
|
|
32360
|
-
// iterate_info,
|
|
32361
|
-
// };
|
|
32362
|
-
// }
|
|
32348
|
+
|
|
32363
32349
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
32364
32350
|
SESSION_ID,
|
|
32365
32351
|
$container,
|
|
@@ -32400,8 +32386,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32400
32386
|
},
|
|
32401
32387
|
'xu-class': async function ($elm, val) {
|
|
32402
32388
|
try {
|
|
32403
|
-
|
|
32404
|
-
|
|
32389
|
+
const classes_string = val.value;
|
|
32390
|
+
// let obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
|
|
32391
|
+
|
|
32392
|
+
const classes_obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
|
|
32393
|
+
for await (const [cla, cond] of Object.entries(classes_obj)) {
|
|
32405
32394
|
let res = (
|
|
32406
32395
|
await func.expression.get(
|
|
32407
32396
|
SESSION_ID,
|
|
@@ -32425,13 +32414,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32425
32414
|
},
|
|
32426
32415
|
'xu-exp': async function ($elm, val) {
|
|
32427
32416
|
let exp = val.value === null ? true : val.value;
|
|
32428
|
-
// if (val.value.includes("@_FOR_KEY")) {
|
|
32429
|
-
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
32430
|
-
// }
|
|
32431
|
-
|
|
32432
|
-
// if (val.value.includes("@_FOR_VAL")) {
|
|
32433
|
-
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
32434
|
-
// }
|
|
32435
32417
|
|
|
32436
32418
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
32437
32419
|
|
|
@@ -32840,10 +32822,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
32840
32822
|
_ret = _.assignIn(_ret, ret);
|
|
32841
32823
|
}
|
|
32842
32824
|
|
|
32843
|
-
// if (nodeP.tagName === "svg") {
|
|
32844
|
-
// console.log(svg_attributes_str);
|
|
32845
|
-
// }
|
|
32846
|
-
|
|
32847
32825
|
// EXP for
|
|
32848
32826
|
|
|
32849
32827
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -32952,20 +32930,6 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
32952
32930
|
if ($old_panel_div?.length) {
|
|
32953
32931
|
$($old_panel_div[0]).after($wrapper.children());
|
|
32954
32932
|
} else {
|
|
32955
|
-
// $container.append($wrapper.children());
|
|
32956
|
-
|
|
32957
|
-
// find existing xurender
|
|
32958
|
-
// $.each($wrapper.children(), function (key, val) {
|
|
32959
|
-
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
32960
|
-
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
32961
|
-
// if (
|
|
32962
|
-
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
32963
|
-
// $elm.length
|
|
32964
|
-
// ) {
|
|
32965
|
-
// $elm.remove();
|
|
32966
|
-
// }
|
|
32967
|
-
// $container.append($(val));
|
|
32968
|
-
// });
|
|
32969
32933
|
$.each($wrapper.children(), function (key, child) {
|
|
32970
32934
|
$.each($container.children(), function (key, elm) {
|
|
32971
32935
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -33093,59 +33057,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
33093
33057
|
},
|
|
33094
33058
|
xuAttributes: {},
|
|
33095
33059
|
});
|
|
33096
|
-
// }
|
|
33097
33060
|
|
|
33098
|
-
// $div.appendTo($appendTo);
|
|
33099
|
-
|
|
33100
|
-
////////////////////////
|
|
33101
|
-
|
|
33102
|
-
// let svg_attributes_str = ""
|
|
33103
|
-
// if (div_typeP === "svg") {
|
|
33104
|
-
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
33105
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
33106
|
-
// }
|
|
33107
|
-
// }
|
|
33108
|
-
|
|
33109
|
-
// var $div =
|
|
33110
|
-
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
33111
|
-
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
33112
|
-
// .attr("xu-ui-id", ui_id)
|
|
33113
|
-
// .data({
|
|
33114
|
-
// xuData: {
|
|
33115
|
-
// prog_id: _paramsP.prog_id,
|
|
33116
|
-
// nodeid: nodeP.id,
|
|
33117
|
-
// ui_type: nodeP.tagName,
|
|
33118
|
-
// xu_id: xu_id,
|
|
33119
|
-
// recordid: currentRecordId,
|
|
33120
|
-
// paramsP: _paramsP,
|
|
33121
|
-
// key: keyP,
|
|
33122
|
-
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
33123
|
-
// screenId: _paramsP.screenId,
|
|
33124
|
-
// parent_container: $container?.attr("id"),
|
|
33125
|
-
// elem_key,
|
|
33126
|
-
// ui_id,
|
|
33127
|
-
// properties: prop,
|
|
33128
|
-
// node: nodeP,
|
|
33129
|
-
// node_org: _.cloneDeep(nodeP),
|
|
33130
|
-
// is_panelP: _paramsP.is_panelP,
|
|
33131
|
-
|
|
33132
|
-
// elem_prop: elem_propP,
|
|
33133
|
-
// debug_info: {
|
|
33134
|
-
// id: nodeP.id,
|
|
33135
|
-
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
33136
|
-
// items: items,
|
|
33137
|
-
// },
|
|
33138
|
-
// parent_node: parent_nodeP,
|
|
33139
|
-
// currentRecordId: currentRecordId,
|
|
33140
|
-
// $root_container: $root_container,
|
|
33141
|
-
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
33142
|
-
// },
|
|
33143
|
-
// xuAttributes: {},
|
|
33144
|
-
// })
|
|
33145
|
-
|
|
33146
|
-
// if (div_typeP === "svg") {
|
|
33147
|
-
// $div.removeAttr("xu-ui-id")
|
|
33148
|
-
// }
|
|
33149
33061
|
if (div_typeP !== 'svg') {
|
|
33150
33062
|
$div.appendTo($appendTo);
|
|
33151
33063
|
}
|
|
@@ -33708,20 +33620,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33708
33620
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
33709
33621
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
33710
33622
|
await set_call_screen_properties_values(page);
|
|
33711
|
-
await page.create(
|
|
33712
|
-
|
|
33713
|
-
// SESSION_ID,
|
|
33714
|
-
// paramsP.dsSessionP,
|
|
33715
|
-
// nav,
|
|
33716
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
33717
|
-
);
|
|
33718
|
-
await page.init(
|
|
33719
|
-
params,
|
|
33720
|
-
// SESSION_ID,
|
|
33721
|
-
// paramsP.dsSessionP,
|
|
33722
|
-
// nav,
|
|
33723
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
33724
|
-
);
|
|
33623
|
+
await page.create(params);
|
|
33624
|
+
await page.init(params);
|
|
33725
33625
|
nav.push(component_name, { params });
|
|
33726
33626
|
} else {
|
|
33727
33627
|
debugger;
|
|
@@ -33957,20 +33857,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33957
33857
|
} catch (err) {
|
|
33958
33858
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
33959
33859
|
}
|
|
33960
|
-
|
|
33961
|
-
// glb.lifecycle.plugins[plugin_name] = {
|
|
33962
|
-
// plugin_script: fx,
|
|
33963
|
-
// setup_data: plugin_setup_ret.data,
|
|
33964
|
-
// fields,
|
|
33965
|
-
// params,
|
|
33966
|
-
// };
|
|
33967
|
-
|
|
33968
|
-
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
33969
|
-
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
33970
|
-
|
|
33971
|
-
// } catch (err) {
|
|
33972
|
-
// report_error(err);
|
|
33973
|
-
// }
|
|
33974
33860
|
}
|
|
33975
33861
|
return $div;
|
|
33976
33862
|
},
|
|
@@ -33982,10 +33868,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33982
33868
|
var $wrapper = $('<div>');
|
|
33983
33869
|
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
33984
33870
|
|
|
33985
|
-
// if (paramsP.is_panelP) {
|
|
33986
|
-
// var id = $div.attr('id');
|
|
33987
|
-
// }
|
|
33988
|
-
|
|
33989
33871
|
if (!$div) return;
|
|
33990
33872
|
|
|
33991
33873
|
if (!REFRESHER_IN_PROGRESS && (paramsP.is_mobile_popover || paramsP.is_mobile_page)) {
|
|
@@ -34014,107 +33896,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34014
33896
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
34015
33897
|
});
|
|
34016
33898
|
|
|
34017
|
-
// var $div_content = $div.children();
|
|
34018
|
-
|
|
34019
|
-
// $.each($div_content, function (key, val) {
|
|
34020
|
-
// $(val).data().xuData.parent_container =
|
|
34021
|
-
// $div.data().xuData.parent_container;
|
|
34022
|
-
// });
|
|
34023
|
-
|
|
34024
33899
|
return await render_screen_type($div);
|
|
34025
|
-
|
|
34026
|
-
// if (paramsP.is_mobile_modal) {
|
|
34027
|
-
// return await open_modal($div);
|
|
34028
|
-
// }
|
|
34029
|
-
// if (paramsP.is_mobile_popover) {
|
|
34030
|
-
// open_popover($div);
|
|
34031
|
-
// func.UI.utils.screen_blocker(
|
|
34032
|
-
// false,
|
|
34033
|
-
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
34034
|
-
// );
|
|
34035
|
-
// return;
|
|
34036
|
-
// }
|
|
34037
|
-
|
|
34038
|
-
// if (paramsP.is_mobile_page) {
|
|
34039
|
-
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
34040
|
-
// const nav = $nav[0];
|
|
34041
|
-
|
|
34042
|
-
// var params = {
|
|
34043
|
-
// div: $div_content,
|
|
34044
|
-
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
34045
|
-
// screenId: paramsP.screenId,
|
|
34046
|
-
// $container: $container,
|
|
34047
|
-
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
34048
|
-
// dsSession: paramsP.dsSessionP,
|
|
34049
|
-
// };
|
|
34050
|
-
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
34051
|
-
// if (!$(nav).data().xuData.nav_params) {
|
|
34052
|
-
// $(nav).data().xuData.nav_params = {};
|
|
34053
|
-
// }
|
|
34054
|
-
|
|
34055
|
-
// //restore validate
|
|
34056
|
-
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
34057
|
-
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
34058
|
-
// .data()
|
|
34059
|
-
// .xuData.params[
|
|
34060
|
-
// paramsP.dsSessionP
|
|
34061
|
-
// ].$container.data().xuData.validate_screen_ready;
|
|
34062
|
-
// }
|
|
34063
|
-
|
|
34064
|
-
// if (!$(nav)?.data()?.xuData) return;
|
|
34065
|
-
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
34066
|
-
// if (!$(component_name).length) {
|
|
34067
|
-
// await func.UI.component.create_app_page_component(
|
|
34068
|
-
// SESSION_ID,
|
|
34069
|
-
// paramsP.dsSessionP
|
|
34070
|
-
// );
|
|
34071
|
-
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
34072
|
-
// await page.create(
|
|
34073
|
-
// SESSION_ID,
|
|
34074
|
-
// paramsP.dsSessionP,
|
|
34075
|
-
// nav,
|
|
34076
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
34077
|
-
// );
|
|
34078
|
-
// await page.init(
|
|
34079
|
-
// SESSION_ID,
|
|
34080
|
-
// paramsP.dsSessionP,
|
|
34081
|
-
// nav,
|
|
34082
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
34083
|
-
// );
|
|
34084
|
-
// nav.push(component_name, { params });
|
|
34085
|
-
// } else {
|
|
34086
|
-
// debugger;
|
|
34087
|
-
// $(component_name).empty();
|
|
34088
|
-
|
|
34089
|
-
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
34090
|
-
// }
|
|
34091
|
-
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
34092
|
-
|
|
34093
|
-
// return $div;
|
|
34094
|
-
// }
|
|
34095
|
-
|
|
34096
|
-
// if (
|
|
34097
|
-
// !paramsP.is_mobile_page &&
|
|
34098
|
-
// !paramsP.is_mobile_modal &&
|
|
34099
|
-
// !paramsP.is_mobile_popover &&
|
|
34100
|
-
// !paramsP.is_panelP
|
|
34101
|
-
// ) {
|
|
34102
|
-
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
34103
|
-
// if ($nav && $nav.length) {
|
|
34104
|
-
// // refresh made
|
|
34105
|
-
// } else {
|
|
34106
|
-
// $nav = $("<xu-nav>");
|
|
34107
|
-
// $container.append($nav);
|
|
34108
|
-
// func.UI.component.init_xu_nav($container, $nav);
|
|
34109
|
-
// }
|
|
34110
|
-
|
|
34111
|
-
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
34112
|
-
|
|
34113
|
-
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
34114
|
-
// } else {
|
|
34115
|
-
// $container.append($div_content);
|
|
34116
|
-
// }
|
|
34117
|
-
// return $container;
|
|
34118
33900
|
},
|
|
34119
33901
|
[`xu-multi-view`]: async function () {
|
|
34120
33902
|
var $div = $container;
|
|
@@ -34131,60 +33913,26 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34131
33913
|
}
|
|
34132
33914
|
|
|
34133
33915
|
const done = async function (continuous_idx) {
|
|
34134
|
-
const do_callback = async function ($div) {
|
|
34135
|
-
|
|
34136
|
-
|
|
34137
|
-
|
|
34138
|
-
|
|
34139
|
-
|
|
34140
|
-
|
|
34141
|
-
|
|
34142
|
-
|
|
34143
|
-
|
|
34144
|
-
|
|
34145
|
-
|
|
34146
|
-
|
|
34147
|
-
|
|
34148
|
-
}
|
|
34149
|
-
|
|
34150
|
-
return $div;
|
|
34151
|
-
};
|
|
34152
|
-
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
34153
|
-
// var $div_content = $div.children();
|
|
34154
|
-
|
|
34155
|
-
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
34156
|
-
// $.each($div.data().xuData, function (key, val) {
|
|
34157
|
-
// $container.data().xuData[key] = val;
|
|
34158
|
-
// });
|
|
34159
|
-
// $.each($div.data().xuAttributes, function (key, val) {
|
|
34160
|
-
// $container.data().xuAttributes[key] = val;
|
|
34161
|
-
// });
|
|
34162
|
-
|
|
34163
|
-
// if (!$container.data().xuData.node) {
|
|
34164
|
-
// $container.data().xuData.node = {};
|
|
33916
|
+
// const do_callback = async function ($div) {
|
|
33917
|
+
// // if ($root_container.data().xuData.progress_bar_circle) {
|
|
33918
|
+
// // setTimeout(function () {
|
|
33919
|
+
// // $.each(
|
|
33920
|
+
// // $root_container.data().xuData.progress_bar_circle,
|
|
33921
|
+
// // function (key, val) {
|
|
33922
|
+
// // val.bar.set(parseFloat(val.value)); // Number from 0.0 to 1.0
|
|
33923
|
+
// // }
|
|
33924
|
+
// // );
|
|
33925
|
+
// // }, 2000);
|
|
33926
|
+
// // }
|
|
33927
|
+
|
|
33928
|
+
// if (paramsP.screenInfo.properties?.rtl) {
|
|
33929
|
+
// $div_content.attr('dir', 'rtl');
|
|
34165
33930
|
// }
|
|
34166
33931
|
|
|
34167
|
-
// $
|
|
34168
|
-
|
|
34169
|
-
|
|
34170
|
-
// if (!$(val)?.data()?.xuData) return;
|
|
34171
|
-
// if (
|
|
34172
|
-
// continuous_idx === null ||
|
|
34173
|
-
// (continuous_idx && key > continuous_idx)
|
|
34174
|
-
// ) {
|
|
34175
|
-
// $(val).data().xuData.parent_container =
|
|
34176
|
-
// $div.data().xuData.parent_container;
|
|
34177
|
-
// $container
|
|
34178
|
-
// .data()
|
|
34179
|
-
// .xuData.node.children.push($(val).data().xuData.node);
|
|
34180
|
-
// }
|
|
34181
|
-
// });
|
|
34182
|
-
// }
|
|
33932
|
+
// return $div;
|
|
33933
|
+
// };
|
|
33934
|
+
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
34183
33935
|
|
|
34184
|
-
// if (continuous_idx !== null) {
|
|
34185
|
-
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
34186
|
-
// return;
|
|
34187
|
-
// }
|
|
34188
33936
|
return await render_screen_type($div);
|
|
34189
33937
|
};
|
|
34190
33938
|
|
|
@@ -34218,38 +33966,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34218
33966
|
const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $container, empty_result_node, parent_infoP, paramsP, jobNoP, null, 0, null, nodeP, null, $root_container);
|
|
34219
33967
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
34220
33968
|
return await done(null);
|
|
34221
|
-
|
|
34222
|
-
// var text = "";
|
|
34223
|
-
// if (prop?.app_empty_result_text !== "undefined") {
|
|
34224
|
-
// text = prop.app_empty_result_text;
|
|
34225
|
-
// }
|
|
34226
|
-
// if (
|
|
34227
|
-
// prop.app_empty_result_text_EXP &&
|
|
34228
|
-
// prop.app_empty_result_text_EXP !== "undefined"
|
|
34229
|
-
// ) {
|
|
34230
|
-
// let exp = prop.app_empty_result_text_EXP;
|
|
34231
|
-
// if (exp && exp !== "undefined") {
|
|
34232
|
-
// var res = func.expression.get(
|
|
34233
|
-
// SESSION_ID,
|
|
34234
|
-
// exp,
|
|
34235
|
-
// paramsP.dsSessionP,
|
|
34236
|
-
// "app_empty_result_text_EXP",
|
|
34237
|
-
// _ds.currentRecordId
|
|
34238
|
-
// );
|
|
34239
|
-
// text = res.result;
|
|
34240
|
-
// }
|
|
34241
|
-
// }
|
|
34242
|
-
// if (icon || text) {
|
|
34243
|
-
// $container.append(
|
|
34244
|
-
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
34245
|
-
// );
|
|
34246
|
-
// }
|
|
34247
|
-
// await func.events.validate(
|
|
34248
|
-
// SESSION_ID,
|
|
34249
|
-
// "record_not_found",
|
|
34250
|
-
// paramsP.dsSessionP
|
|
34251
|
-
// );
|
|
34252
|
-
// return await done(null);
|
|
34253
33969
|
};
|
|
34254
33970
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
34255
33971
|
|
|
@@ -34262,25 +33978,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34262
33978
|
var i = 0;
|
|
34263
33979
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
34264
33980
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
34265
|
-
|
|
34266
|
-
// if (
|
|
34267
|
-
// continuous_idx === null &&
|
|
34268
|
-
// prop.app_items_per_page &&
|
|
34269
|
-
// i >= Number(prop.app_items_per_page)
|
|
34270
|
-
// ) {
|
|
34271
|
-
// continuous_idx = i;
|
|
34272
|
-
// await done(null);
|
|
34273
|
-
|
|
34274
|
-
// setTimeout(async function () {
|
|
34275
|
-
// await run_item(continuous_idx);
|
|
34276
|
-
// if (!glb.CURRENT_APP_LOADING) {
|
|
34277
|
-
// glb.CURRENT_APP_LOADING = 1;
|
|
34278
|
-
// } // deactivate loader
|
|
34279
|
-
// }, 1000);
|
|
34280
|
-
|
|
34281
|
-
// continue;
|
|
34282
|
-
// }
|
|
34283
|
-
////////
|
|
33981
|
+
|
|
34284
33982
|
_ds.currentRecordId = val._ROWID;
|
|
34285
33983
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
34286
33984
|
|
|
@@ -34332,46 +34030,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34332
34030
|
};
|
|
34333
34031
|
if (!element || element === 'script') return await done();
|
|
34334
34032
|
let str = '';
|
|
34335
|
-
// var $div
|
|
34336
|
-
// const draw_svg = function () {
|
|
34337
|
-
// const get_tag_str = function (element, prop, val) {
|
|
34338
|
-
// let class_str = "";
|
|
34339
|
-
// let attr_str = "";
|
|
34340
|
-
// for (const [key, val] of Object.entries(prop)) {
|
|
34341
|
-
// if (key.substr(0, 2) !== "xu") {
|
|
34342
|
-
// attr_str += ` ${key}="${val}" `;
|
|
34343
|
-
// }
|
|
34344
|
-
// }
|
|
34345
|
-
// if (element === "svg") {
|
|
34346
|
-
// return `<${element} ${attr_str} > `;
|
|
34347
|
-
// }
|
|
34348
|
-
// let ret = "";
|
|
34349
|
-
// if (val?.children?.length) {
|
|
34350
|
-
// ret = iterate_svg(val);
|
|
34351
|
-
// }
|
|
34352
|
-
|
|
34353
|
-
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
34354
|
-
// };
|
|
34355
|
-
// let svg_str = get_tag_str(element, prop);
|
|
34356
|
-
// let inner_str = "";
|
|
34357
|
-
// const iterate_svg = function (node) {
|
|
34358
|
-
// let ret = "";
|
|
34359
|
-
// if (node.children) {
|
|
34360
|
-
// for (let val of node.children) {
|
|
34361
|
-
// let prop = val.attributes;
|
|
34362
|
-
// ret += get_tag_str(val.tagName, prop, val);
|
|
34363
|
-
// }
|
|
34364
|
-
// }
|
|
34365
|
-
// return ret;
|
|
34366
|
-
// };
|
|
34367
|
-
// inner_str = iterate_svg(nodeP);
|
|
34368
|
-
|
|
34369
|
-
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
34370
|
-
// };
|
|
34371
|
-
// if (element === "svg") {
|
|
34372
|
-
// draw_svg();
|
|
34373
|
-
// // return await done();
|
|
34374
|
-
// }
|
|
34375
34033
|
|
|
34376
34034
|
var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, element, null, str);
|
|
34377
34035
|
|
|
@@ -35157,6 +34815,7 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
35157
34815
|
var split = [];
|
|
35158
34816
|
var var_Arr = [];
|
|
35159
34817
|
split = func.expression.parse(ret);
|
|
34818
|
+
|
|
35160
34819
|
for await (const [arr_key, val] of Object.entries(split)) {
|
|
35161
34820
|
// run each field
|
|
35162
34821
|
const key = Number(arr_key);
|
|
@@ -35247,14 +34906,8 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
35247
34906
|
} // put default
|
|
35248
34907
|
fields[val.fieldId] = var_Arr[key].value;
|
|
35249
34908
|
|
|
35250
|
-
const ret = await func.datasource.get_value(
|
|
35251
|
-
|
|
35252
|
-
val.fieldId,
|
|
35253
|
-
dsSessionP,
|
|
35254
|
-
|
|
35255
|
-
rowIdP,
|
|
35256
|
-
); // find field in dataSources
|
|
35257
|
-
|
|
34909
|
+
const ret = await func.datasource.get_value(SESSION_ID, val.fieldId, dsSessionP, rowIdP); // find field in dataSources
|
|
34910
|
+
console.log(valP, val.fieldId, ret);
|
|
35258
34911
|
await replace_value_in_string(ret.ret, ret.fieldIdP);
|
|
35259
34912
|
}
|
|
35260
34913
|
}
|