@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
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -8969,19 +8969,12 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
8969
8969
|
};
|
|
8970
8970
|
|
|
8971
8971
|
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
8972
|
-
// return;
|
|
8973
8972
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
8974
8973
|
|
|
8975
8974
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
8976
8975
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
8977
8976
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
8978
8977
|
|
|
8979
|
-
// for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
8980
|
-
// if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
8981
|
-
// delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
8982
|
-
// }
|
|
8983
|
-
// }
|
|
8984
|
-
|
|
8985
8978
|
let abort;
|
|
8986
8979
|
|
|
8987
8980
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -9028,7 +9021,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
|
|
|
9028
9021
|
func.datasource.del(SESSION_ID, val);
|
|
9029
9022
|
}
|
|
9030
9023
|
};
|
|
9031
|
-
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]
|
|
9024
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9032
9025
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
9033
9026
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9034
9027
|
|
|
@@ -10484,6 +10477,7 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
10484
10477
|
var split = [];
|
|
10485
10478
|
var var_Arr = [];
|
|
10486
10479
|
split = func.expression.parse(ret);
|
|
10480
|
+
|
|
10487
10481
|
for await (const [arr_key, val] of Object.entries(split)) {
|
|
10488
10482
|
// run each field
|
|
10489
10483
|
const key = Number(arr_key);
|
|
@@ -10574,14 +10568,8 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
10574
10568
|
} // put default
|
|
10575
10569
|
fields[val.fieldId] = var_Arr[key].value;
|
|
10576
10570
|
|
|
10577
|
-
const ret = await func.datasource.get_value(
|
|
10578
|
-
|
|
10579
|
-
val.fieldId,
|
|
10580
|
-
dsSessionP,
|
|
10581
|
-
|
|
10582
|
-
rowIdP,
|
|
10583
|
-
); // find field in dataSources
|
|
10584
|
-
|
|
10571
|
+
const ret = await func.datasource.get_value(SESSION_ID, val.fieldId, dsSessionP, rowIdP); // find field in dataSources
|
|
10572
|
+
console.log(valP, val.fieldId, ret);
|
|
10585
10573
|
await replace_value_in_string(ret.ret, ret.fieldIdP);
|
|
10586
10574
|
}
|
|
10587
10575
|
}
|
|
@@ -11414,9 +11402,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11414
11402
|
|
|
11415
11403
|
if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
|
|
11416
11404
|
|
|
11417
|
-
// // already rended
|
|
11418
|
-
// if (elem_val.$elm[0].tagName !== 'XURENDER' && elem_val?.$elm?.length) continue;
|
|
11419
|
-
|
|
11420
11405
|
new_job = await func.UI.worker.add_to_queue(
|
|
11421
11406
|
SESSION_ID,
|
|
11422
11407
|
'gui event',
|
|
@@ -11932,16 +11917,20 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11932
11917
|
|
|
11933
11918
|
const common_fx = {
|
|
11934
11919
|
'xu-ref': async function ($elm, val) {
|
|
11935
|
-
// console.log('xu-ref', $elm, val);
|
|
11936
11920
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
11937
11921
|
let _ds_0 = _session.DS_GLB[0];
|
|
11938
|
-
|
|
11939
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
11940
|
-
// }
|
|
11941
|
-
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
11922
|
+
|
|
11942
11923
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
11943
|
-
|
|
11944
|
-
|
|
11924
|
+
|
|
11925
|
+
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
11926
|
+
const data = _.clone(_ds?.data_feed?.rows?.[row_idx]) || {};
|
|
11927
|
+
|
|
11928
|
+
const props = _ds.in_parameters || {};
|
|
11929
|
+
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
11930
|
+
|
|
11931
|
+
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
11932
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, data, attributes, props };
|
|
11933
|
+
|
|
11945
11934
|
return {};
|
|
11946
11935
|
},
|
|
11947
11936
|
'xu-bind': async function ($elm, val) {
|
|
@@ -12274,14 +12263,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12274
12263
|
if (!custom_iterator_key) {
|
|
12275
12264
|
is_key_dynamic_field = true;
|
|
12276
12265
|
|
|
12277
|
-
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
12278
12266
|
iterator_key = '_FOR_KEY';
|
|
12279
12267
|
}
|
|
12280
12268
|
|
|
12281
12269
|
if (!custom_iterator_val) {
|
|
12282
12270
|
is_val_dynamic_field = true;
|
|
12283
12271
|
|
|
12284
|
-
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
12285
12272
|
iterator_val = '_FOR_VAL';
|
|
12286
12273
|
}
|
|
12287
12274
|
|
|
@@ -12328,13 +12315,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12328
12315
|
};
|
|
12329
12316
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
12330
12317
|
_parent_info.iterate_info = iterate_info;
|
|
12331
|
-
|
|
12332
|
-
// _parent_info = iterate_info;
|
|
12333
|
-
// } else {
|
|
12334
|
-
// _parent_info = {
|
|
12335
|
-
// iterate_info,
|
|
12336
|
-
// };
|
|
12337
|
-
// }
|
|
12318
|
+
|
|
12338
12319
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
12339
12320
|
SESSION_ID,
|
|
12340
12321
|
$container,
|
|
@@ -12375,8 +12356,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12375
12356
|
},
|
|
12376
12357
|
'xu-class': async function ($elm, val) {
|
|
12377
12358
|
try {
|
|
12378
|
-
|
|
12379
|
-
|
|
12359
|
+
const classes_string = val.value;
|
|
12360
|
+
// let obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
|
|
12361
|
+
|
|
12362
|
+
const classes_obj = _.isString(classes_string) ? JSON.parse(classes_string) : _.defaults(classes_string, {});
|
|
12363
|
+
for await (const [cla, cond] of Object.entries(classes_obj)) {
|
|
12380
12364
|
let res = (
|
|
12381
12365
|
await func.expression.get(
|
|
12382
12366
|
SESSION_ID,
|
|
@@ -12400,13 +12384,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12400
12384
|
},
|
|
12401
12385
|
'xu-exp': async function ($elm, val) {
|
|
12402
12386
|
let exp = val.value === null ? true : val.value;
|
|
12403
|
-
// if (val.value.includes("@_FOR_KEY")) {
|
|
12404
|
-
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
12405
|
-
// }
|
|
12406
|
-
|
|
12407
|
-
// if (val.value.includes("@_FOR_VAL")) {
|
|
12408
|
-
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
12409
|
-
// }
|
|
12410
12387
|
|
|
12411
12388
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
12412
12389
|
|
|
@@ -12815,10 +12792,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12815
12792
|
_ret = _.assignIn(_ret, ret);
|
|
12816
12793
|
}
|
|
12817
12794
|
|
|
12818
|
-
// if (nodeP.tagName === "svg") {
|
|
12819
|
-
// console.log(svg_attributes_str);
|
|
12820
|
-
// }
|
|
12821
|
-
|
|
12822
12795
|
// EXP for
|
|
12823
12796
|
|
|
12824
12797
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -12927,20 +12900,6 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
12927
12900
|
if ($old_panel_div?.length) {
|
|
12928
12901
|
$($old_panel_div[0]).after($wrapper.children());
|
|
12929
12902
|
} else {
|
|
12930
|
-
// $container.append($wrapper.children());
|
|
12931
|
-
|
|
12932
|
-
// find existing xurender
|
|
12933
|
-
// $.each($wrapper.children(), function (key, val) {
|
|
12934
|
-
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12935
|
-
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12936
|
-
// if (
|
|
12937
|
-
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
12938
|
-
// $elm.length
|
|
12939
|
-
// ) {
|
|
12940
|
-
// $elm.remove();
|
|
12941
|
-
// }
|
|
12942
|
-
// $container.append($(val));
|
|
12943
|
-
// });
|
|
12944
12903
|
$.each($wrapper.children(), function (key, child) {
|
|
12945
12904
|
$.each($container.children(), function (key, elm) {
|
|
12946
12905
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -13068,59 +13027,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
13068
13027
|
},
|
|
13069
13028
|
xuAttributes: {},
|
|
13070
13029
|
});
|
|
13071
|
-
// }
|
|
13072
|
-
|
|
13073
|
-
// $div.appendTo($appendTo);
|
|
13074
|
-
|
|
13075
|
-
////////////////////////
|
|
13076
13030
|
|
|
13077
|
-
// let svg_attributes_str = ""
|
|
13078
|
-
// if (div_typeP === "svg") {
|
|
13079
|
-
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
13080
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
13081
|
-
// }
|
|
13082
|
-
// }
|
|
13083
|
-
|
|
13084
|
-
// var $div =
|
|
13085
|
-
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
13086
|
-
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
13087
|
-
// .attr("xu-ui-id", ui_id)
|
|
13088
|
-
// .data({
|
|
13089
|
-
// xuData: {
|
|
13090
|
-
// prog_id: _paramsP.prog_id,
|
|
13091
|
-
// nodeid: nodeP.id,
|
|
13092
|
-
// ui_type: nodeP.tagName,
|
|
13093
|
-
// xu_id: xu_id,
|
|
13094
|
-
// recordid: currentRecordId,
|
|
13095
|
-
// paramsP: _paramsP,
|
|
13096
|
-
// key: keyP,
|
|
13097
|
-
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
13098
|
-
// screenId: _paramsP.screenId,
|
|
13099
|
-
// parent_container: $container?.attr("id"),
|
|
13100
|
-
// elem_key,
|
|
13101
|
-
// ui_id,
|
|
13102
|
-
// properties: prop,
|
|
13103
|
-
// node: nodeP,
|
|
13104
|
-
// node_org: _.cloneDeep(nodeP),
|
|
13105
|
-
// is_panelP: _paramsP.is_panelP,
|
|
13106
|
-
|
|
13107
|
-
// elem_prop: elem_propP,
|
|
13108
|
-
// debug_info: {
|
|
13109
|
-
// id: nodeP.id,
|
|
13110
|
-
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
13111
|
-
// items: items,
|
|
13112
|
-
// },
|
|
13113
|
-
// parent_node: parent_nodeP,
|
|
13114
|
-
// currentRecordId: currentRecordId,
|
|
13115
|
-
// $root_container: $root_container,
|
|
13116
|
-
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
13117
|
-
// },
|
|
13118
|
-
// xuAttributes: {},
|
|
13119
|
-
// })
|
|
13120
|
-
|
|
13121
|
-
// if (div_typeP === "svg") {
|
|
13122
|
-
// $div.removeAttr("xu-ui-id")
|
|
13123
|
-
// }
|
|
13124
13031
|
if (div_typeP !== 'svg') {
|
|
13125
13032
|
$div.appendTo($appendTo);
|
|
13126
13033
|
}
|
|
@@ -13683,20 +13590,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13683
13590
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
13684
13591
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
13685
13592
|
await set_call_screen_properties_values(page);
|
|
13686
|
-
await page.create(
|
|
13687
|
-
|
|
13688
|
-
// SESSION_ID,
|
|
13689
|
-
// paramsP.dsSessionP,
|
|
13690
|
-
// nav,
|
|
13691
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13692
|
-
);
|
|
13693
|
-
await page.init(
|
|
13694
|
-
params,
|
|
13695
|
-
// SESSION_ID,
|
|
13696
|
-
// paramsP.dsSessionP,
|
|
13697
|
-
// nav,
|
|
13698
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13699
|
-
);
|
|
13593
|
+
await page.create(params);
|
|
13594
|
+
await page.init(params);
|
|
13700
13595
|
nav.push(component_name, { params });
|
|
13701
13596
|
} else {
|
|
13702
13597
|
debugger;
|
|
@@ -13932,20 +13827,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13932
13827
|
} catch (err) {
|
|
13933
13828
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
13934
13829
|
}
|
|
13935
|
-
|
|
13936
|
-
// glb.lifecycle.plugins[plugin_name] = {
|
|
13937
|
-
// plugin_script: fx,
|
|
13938
|
-
// setup_data: plugin_setup_ret.data,
|
|
13939
|
-
// fields,
|
|
13940
|
-
// params,
|
|
13941
|
-
// };
|
|
13942
|
-
|
|
13943
|
-
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
13944
|
-
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
13945
|
-
|
|
13946
|
-
// } catch (err) {
|
|
13947
|
-
// report_error(err);
|
|
13948
|
-
// }
|
|
13949
13830
|
}
|
|
13950
13831
|
return $div;
|
|
13951
13832
|
},
|
|
@@ -13957,10 +13838,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13957
13838
|
var $wrapper = $('<div>');
|
|
13958
13839
|
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
13959
13840
|
|
|
13960
|
-
// if (paramsP.is_panelP) {
|
|
13961
|
-
// var id = $div.attr('id');
|
|
13962
|
-
// }
|
|
13963
|
-
|
|
13964
13841
|
if (!$div) return;
|
|
13965
13842
|
|
|
13966
13843
|
if (!REFRESHER_IN_PROGRESS && (paramsP.is_mobile_popover || paramsP.is_mobile_page)) {
|
|
@@ -13989,107 +13866,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13989
13866
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
13990
13867
|
});
|
|
13991
13868
|
|
|
13992
|
-
// var $div_content = $div.children();
|
|
13993
|
-
|
|
13994
|
-
// $.each($div_content, function (key, val) {
|
|
13995
|
-
// $(val).data().xuData.parent_container =
|
|
13996
|
-
// $div.data().xuData.parent_container;
|
|
13997
|
-
// });
|
|
13998
|
-
|
|
13999
13869
|
return await render_screen_type($div);
|
|
14000
|
-
|
|
14001
|
-
// if (paramsP.is_mobile_modal) {
|
|
14002
|
-
// return await open_modal($div);
|
|
14003
|
-
// }
|
|
14004
|
-
// if (paramsP.is_mobile_popover) {
|
|
14005
|
-
// open_popover($div);
|
|
14006
|
-
// func.UI.utils.screen_blocker(
|
|
14007
|
-
// false,
|
|
14008
|
-
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
14009
|
-
// );
|
|
14010
|
-
// return;
|
|
14011
|
-
// }
|
|
14012
|
-
|
|
14013
|
-
// if (paramsP.is_mobile_page) {
|
|
14014
|
-
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14015
|
-
// const nav = $nav[0];
|
|
14016
|
-
|
|
14017
|
-
// var params = {
|
|
14018
|
-
// div: $div_content,
|
|
14019
|
-
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
14020
|
-
// screenId: paramsP.screenId,
|
|
14021
|
-
// $container: $container,
|
|
14022
|
-
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
14023
|
-
// dsSession: paramsP.dsSessionP,
|
|
14024
|
-
// };
|
|
14025
|
-
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
14026
|
-
// if (!$(nav).data().xuData.nav_params) {
|
|
14027
|
-
// $(nav).data().xuData.nav_params = {};
|
|
14028
|
-
// }
|
|
14029
|
-
|
|
14030
|
-
// //restore validate
|
|
14031
|
-
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
14032
|
-
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
14033
|
-
// .data()
|
|
14034
|
-
// .xuData.params[
|
|
14035
|
-
// paramsP.dsSessionP
|
|
14036
|
-
// ].$container.data().xuData.validate_screen_ready;
|
|
14037
|
-
// }
|
|
14038
|
-
|
|
14039
|
-
// if (!$(nav)?.data()?.xuData) return;
|
|
14040
|
-
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
14041
|
-
// if (!$(component_name).length) {
|
|
14042
|
-
// await func.UI.component.create_app_page_component(
|
|
14043
|
-
// SESSION_ID,
|
|
14044
|
-
// paramsP.dsSessionP
|
|
14045
|
-
// );
|
|
14046
|
-
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
14047
|
-
// await page.create(
|
|
14048
|
-
// SESSION_ID,
|
|
14049
|
-
// paramsP.dsSessionP,
|
|
14050
|
-
// nav,
|
|
14051
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14052
|
-
// );
|
|
14053
|
-
// await page.init(
|
|
14054
|
-
// SESSION_ID,
|
|
14055
|
-
// paramsP.dsSessionP,
|
|
14056
|
-
// nav,
|
|
14057
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14058
|
-
// );
|
|
14059
|
-
// nav.push(component_name, { params });
|
|
14060
|
-
// } else {
|
|
14061
|
-
// debugger;
|
|
14062
|
-
// $(component_name).empty();
|
|
14063
|
-
|
|
14064
|
-
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
14065
|
-
// }
|
|
14066
|
-
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
14067
|
-
|
|
14068
|
-
// return $div;
|
|
14069
|
-
// }
|
|
14070
|
-
|
|
14071
|
-
// if (
|
|
14072
|
-
// !paramsP.is_mobile_page &&
|
|
14073
|
-
// !paramsP.is_mobile_modal &&
|
|
14074
|
-
// !paramsP.is_mobile_popover &&
|
|
14075
|
-
// !paramsP.is_panelP
|
|
14076
|
-
// ) {
|
|
14077
|
-
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14078
|
-
// if ($nav && $nav.length) {
|
|
14079
|
-
// // refresh made
|
|
14080
|
-
// } else {
|
|
14081
|
-
// $nav = $("<xu-nav>");
|
|
14082
|
-
// $container.append($nav);
|
|
14083
|
-
// func.UI.component.init_xu_nav($container, $nav);
|
|
14084
|
-
// }
|
|
14085
|
-
|
|
14086
|
-
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
14087
|
-
|
|
14088
|
-
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
14089
|
-
// } else {
|
|
14090
|
-
// $container.append($div_content);
|
|
14091
|
-
// }
|
|
14092
|
-
// return $container;
|
|
14093
13870
|
},
|
|
14094
13871
|
[`xu-multi-view`]: async function () {
|
|
14095
13872
|
var $div = $container;
|
|
@@ -14106,60 +13883,26 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14106
13883
|
}
|
|
14107
13884
|
|
|
14108
13885
|
const done = async function (continuous_idx) {
|
|
14109
|
-
const do_callback = async function ($div) {
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
}
|
|
14124
|
-
|
|
14125
|
-
return $div;
|
|
14126
|
-
};
|
|
14127
|
-
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
14128
|
-
// var $div_content = $div.children();
|
|
14129
|
-
|
|
14130
|
-
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
14131
|
-
// $.each($div.data().xuData, function (key, val) {
|
|
14132
|
-
// $container.data().xuData[key] = val;
|
|
14133
|
-
// });
|
|
14134
|
-
// $.each($div.data().xuAttributes, function (key, val) {
|
|
14135
|
-
// $container.data().xuAttributes[key] = val;
|
|
14136
|
-
// });
|
|
14137
|
-
|
|
14138
|
-
// if (!$container.data().xuData.node) {
|
|
14139
|
-
// $container.data().xuData.node = {};
|
|
13886
|
+
// const do_callback = async function ($div) {
|
|
13887
|
+
// // if ($root_container.data().xuData.progress_bar_circle) {
|
|
13888
|
+
// // setTimeout(function () {
|
|
13889
|
+
// // $.each(
|
|
13890
|
+
// // $root_container.data().xuData.progress_bar_circle,
|
|
13891
|
+
// // function (key, val) {
|
|
13892
|
+
// // val.bar.set(parseFloat(val.value)); // Number from 0.0 to 1.0
|
|
13893
|
+
// // }
|
|
13894
|
+
// // );
|
|
13895
|
+
// // }, 2000);
|
|
13896
|
+
// // }
|
|
13897
|
+
|
|
13898
|
+
// if (paramsP.screenInfo.properties?.rtl) {
|
|
13899
|
+
// $div_content.attr('dir', 'rtl');
|
|
14140
13900
|
// }
|
|
14141
13901
|
|
|
14142
|
-
// $
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
// if (!$(val)?.data()?.xuData) return;
|
|
14146
|
-
// if (
|
|
14147
|
-
// continuous_idx === null ||
|
|
14148
|
-
// (continuous_idx && key > continuous_idx)
|
|
14149
|
-
// ) {
|
|
14150
|
-
// $(val).data().xuData.parent_container =
|
|
14151
|
-
// $div.data().xuData.parent_container;
|
|
14152
|
-
// $container
|
|
14153
|
-
// .data()
|
|
14154
|
-
// .xuData.node.children.push($(val).data().xuData.node);
|
|
14155
|
-
// }
|
|
14156
|
-
// });
|
|
14157
|
-
// }
|
|
13902
|
+
// return $div;
|
|
13903
|
+
// };
|
|
13904
|
+
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
14158
13905
|
|
|
14159
|
-
// if (continuous_idx !== null) {
|
|
14160
|
-
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
14161
|
-
// return;
|
|
14162
|
-
// }
|
|
14163
13906
|
return await render_screen_type($div);
|
|
14164
13907
|
};
|
|
14165
13908
|
|
|
@@ -14193,38 +13936,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14193
13936
|
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);
|
|
14194
13937
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
14195
13938
|
return await done(null);
|
|
14196
|
-
|
|
14197
|
-
// var text = "";
|
|
14198
|
-
// if (prop?.app_empty_result_text !== "undefined") {
|
|
14199
|
-
// text = prop.app_empty_result_text;
|
|
14200
|
-
// }
|
|
14201
|
-
// if (
|
|
14202
|
-
// prop.app_empty_result_text_EXP &&
|
|
14203
|
-
// prop.app_empty_result_text_EXP !== "undefined"
|
|
14204
|
-
// ) {
|
|
14205
|
-
// let exp = prop.app_empty_result_text_EXP;
|
|
14206
|
-
// if (exp && exp !== "undefined") {
|
|
14207
|
-
// var res = func.expression.get(
|
|
14208
|
-
// SESSION_ID,
|
|
14209
|
-
// exp,
|
|
14210
|
-
// paramsP.dsSessionP,
|
|
14211
|
-
// "app_empty_result_text_EXP",
|
|
14212
|
-
// _ds.currentRecordId
|
|
14213
|
-
// );
|
|
14214
|
-
// text = res.result;
|
|
14215
|
-
// }
|
|
14216
|
-
// }
|
|
14217
|
-
// if (icon || text) {
|
|
14218
|
-
// $container.append(
|
|
14219
|
-
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
14220
|
-
// );
|
|
14221
|
-
// }
|
|
14222
|
-
// await func.events.validate(
|
|
14223
|
-
// SESSION_ID,
|
|
14224
|
-
// "record_not_found",
|
|
14225
|
-
// paramsP.dsSessionP
|
|
14226
|
-
// );
|
|
14227
|
-
// return await done(null);
|
|
14228
13939
|
};
|
|
14229
13940
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
14230
13941
|
|
|
@@ -14237,25 +13948,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14237
13948
|
var i = 0;
|
|
14238
13949
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
14239
13950
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
14240
|
-
|
|
14241
|
-
// if (
|
|
14242
|
-
// continuous_idx === null &&
|
|
14243
|
-
// prop.app_items_per_page &&
|
|
14244
|
-
// i >= Number(prop.app_items_per_page)
|
|
14245
|
-
// ) {
|
|
14246
|
-
// continuous_idx = i;
|
|
14247
|
-
// await done(null);
|
|
14248
|
-
|
|
14249
|
-
// setTimeout(async function () {
|
|
14250
|
-
// await run_item(continuous_idx);
|
|
14251
|
-
// if (!glb.CURRENT_APP_LOADING) {
|
|
14252
|
-
// glb.CURRENT_APP_LOADING = 1;
|
|
14253
|
-
// } // deactivate loader
|
|
14254
|
-
// }, 1000);
|
|
14255
|
-
|
|
14256
|
-
// continue;
|
|
14257
|
-
// }
|
|
14258
|
-
////////
|
|
13951
|
+
|
|
14259
13952
|
_ds.currentRecordId = val._ROWID;
|
|
14260
13953
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
14261
13954
|
|
|
@@ -14307,46 +14000,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14307
14000
|
};
|
|
14308
14001
|
if (!element || element === 'script') return await done();
|
|
14309
14002
|
let str = '';
|
|
14310
|
-
// var $div
|
|
14311
|
-
// const draw_svg = function () {
|
|
14312
|
-
// const get_tag_str = function (element, prop, val) {
|
|
14313
|
-
// let class_str = "";
|
|
14314
|
-
// let attr_str = "";
|
|
14315
|
-
// for (const [key, val] of Object.entries(prop)) {
|
|
14316
|
-
// if (key.substr(0, 2) !== "xu") {
|
|
14317
|
-
// attr_str += ` ${key}="${val}" `;
|
|
14318
|
-
// }
|
|
14319
|
-
// }
|
|
14320
|
-
// if (element === "svg") {
|
|
14321
|
-
// return `<${element} ${attr_str} > `;
|
|
14322
|
-
// }
|
|
14323
|
-
// let ret = "";
|
|
14324
|
-
// if (val?.children?.length) {
|
|
14325
|
-
// ret = iterate_svg(val);
|
|
14326
|
-
// }
|
|
14327
|
-
|
|
14328
|
-
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
14329
|
-
// };
|
|
14330
|
-
// let svg_str = get_tag_str(element, prop);
|
|
14331
|
-
// let inner_str = "";
|
|
14332
|
-
// const iterate_svg = function (node) {
|
|
14333
|
-
// let ret = "";
|
|
14334
|
-
// if (node.children) {
|
|
14335
|
-
// for (let val of node.children) {
|
|
14336
|
-
// let prop = val.attributes;
|
|
14337
|
-
// ret += get_tag_str(val.tagName, prop, val);
|
|
14338
|
-
// }
|
|
14339
|
-
// }
|
|
14340
|
-
// return ret;
|
|
14341
|
-
// };
|
|
14342
|
-
// inner_str = iterate_svg(nodeP);
|
|
14343
|
-
|
|
14344
|
-
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
14345
|
-
// };
|
|
14346
|
-
// if (element === "svg") {
|
|
14347
|
-
// draw_svg();
|
|
14348
|
-
// // return await done();
|
|
14349
|
-
// }
|
|
14350
14003
|
|
|
14351
14004
|
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);
|
|
14352
14005
|
|