@xuda.io/runtime-bundle 1.0.365 → 1.0.367
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 +378 -33
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +378 -33
- package/js/xuda-runtime-slim.min.es.js +378 -33
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -8969,12 +8969,19 @@ 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;
|
|
8972
8973
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
8973
8974
|
|
|
8974
8975
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
8975
8976
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
8976
8977
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
8977
8978
|
|
|
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
|
+
|
|
8978
8985
|
let abort;
|
|
8979
8986
|
|
|
8980
8987
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -9021,7 +9028,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
|
|
|
9021
9028
|
func.datasource.del(SESSION_ID, val);
|
|
9022
9029
|
}
|
|
9023
9030
|
};
|
|
9024
|
-
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9031
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
9025
9032
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
9026
9033
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9027
9034
|
|
|
@@ -11402,6 +11409,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11402
11409
|
|
|
11403
11410
|
if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
|
|
11404
11411
|
|
|
11412
|
+
// // already rended
|
|
11413
|
+
// if (elem_val.$elm[0].tagName !== 'XURENDER' && elem_val?.$elm?.length) continue;
|
|
11414
|
+
|
|
11405
11415
|
new_job = await func.UI.worker.add_to_queue(
|
|
11406
11416
|
SESSION_ID,
|
|
11407
11417
|
'gui event',
|
|
@@ -11917,20 +11927,16 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11917
11927
|
|
|
11918
11928
|
const common_fx = {
|
|
11919
11929
|
'xu-ref': async function ($elm, val) {
|
|
11930
|
+
// console.log('xu-ref', $elm, val);
|
|
11920
11931
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
11921
11932
|
let _ds_0 = _session.DS_GLB[0];
|
|
11922
|
-
|
|
11933
|
+
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
|
|
11934
|
+
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
11935
|
+
// }
|
|
11936
|
+
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
11923
11937
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
11924
|
-
|
|
11925
|
-
|
|
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
|
-
|
|
11938
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data: _ds?.data_feed?.rows || {}, props: $elm?.data()?.xuData?.properties };
|
|
11939
|
+
// }
|
|
11934
11940
|
return {};
|
|
11935
11941
|
},
|
|
11936
11942
|
'xu-bind': async function ($elm, val) {
|
|
@@ -12263,12 +12269,14 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12263
12269
|
if (!custom_iterator_key) {
|
|
12264
12270
|
is_key_dynamic_field = true;
|
|
12265
12271
|
|
|
12272
|
+
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
12266
12273
|
iterator_key = '_FOR_KEY';
|
|
12267
12274
|
}
|
|
12268
12275
|
|
|
12269
12276
|
if (!custom_iterator_val) {
|
|
12270
12277
|
is_val_dynamic_field = true;
|
|
12271
12278
|
|
|
12279
|
+
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
12272
12280
|
iterator_val = '_FOR_VAL';
|
|
12273
12281
|
}
|
|
12274
12282
|
|
|
@@ -12315,7 +12323,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12315
12323
|
};
|
|
12316
12324
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
12317
12325
|
_parent_info.iterate_info = iterate_info;
|
|
12318
|
-
|
|
12326
|
+
// if (parent_infoP) {
|
|
12327
|
+
// _parent_info = iterate_info;
|
|
12328
|
+
// } else {
|
|
12329
|
+
// _parent_info = {
|
|
12330
|
+
// iterate_info,
|
|
12331
|
+
// };
|
|
12332
|
+
// }
|
|
12319
12333
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
12320
12334
|
SESSION_ID,
|
|
12321
12335
|
$container,
|
|
@@ -12381,6 +12395,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12381
12395
|
},
|
|
12382
12396
|
'xu-exp': async function ($elm, val) {
|
|
12383
12397
|
let exp = val.value === null ? true : val.value;
|
|
12398
|
+
// if (val.value.includes("@_FOR_KEY")) {
|
|
12399
|
+
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
12400
|
+
// }
|
|
12401
|
+
|
|
12402
|
+
// if (val.value.includes("@_FOR_VAL")) {
|
|
12403
|
+
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
12404
|
+
// }
|
|
12384
12405
|
|
|
12385
12406
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
12386
12407
|
|
|
@@ -12789,6 +12810,10 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12789
12810
|
_ret = _.assignIn(_ret, ret);
|
|
12790
12811
|
}
|
|
12791
12812
|
|
|
12813
|
+
// if (nodeP.tagName === "svg") {
|
|
12814
|
+
// console.log(svg_attributes_str);
|
|
12815
|
+
// }
|
|
12816
|
+
|
|
12792
12817
|
// EXP for
|
|
12793
12818
|
|
|
12794
12819
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -12897,6 +12922,20 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
12897
12922
|
if ($old_panel_div?.length) {
|
|
12898
12923
|
$($old_panel_div[0]).after($wrapper.children());
|
|
12899
12924
|
} else {
|
|
12925
|
+
// $container.append($wrapper.children());
|
|
12926
|
+
|
|
12927
|
+
// find existing xurender
|
|
12928
|
+
// $.each($wrapper.children(), function (key, val) {
|
|
12929
|
+
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12930
|
+
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12931
|
+
// if (
|
|
12932
|
+
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
12933
|
+
// $elm.length
|
|
12934
|
+
// ) {
|
|
12935
|
+
// $elm.remove();
|
|
12936
|
+
// }
|
|
12937
|
+
// $container.append($(val));
|
|
12938
|
+
// });
|
|
12900
12939
|
$.each($wrapper.children(), function (key, child) {
|
|
12901
12940
|
$.each($container.children(), function (key, elm) {
|
|
12902
12941
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -13024,7 +13063,59 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
13024
13063
|
},
|
|
13025
13064
|
xuAttributes: {},
|
|
13026
13065
|
});
|
|
13066
|
+
// }
|
|
13027
13067
|
|
|
13068
|
+
// $div.appendTo($appendTo);
|
|
13069
|
+
|
|
13070
|
+
////////////////////////
|
|
13071
|
+
|
|
13072
|
+
// let svg_attributes_str = ""
|
|
13073
|
+
// if (div_typeP === "svg") {
|
|
13074
|
+
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
13075
|
+
// svg_attributes_str += `${key}="${val}" `
|
|
13076
|
+
// }
|
|
13077
|
+
// }
|
|
13078
|
+
|
|
13079
|
+
// var $div =
|
|
13080
|
+
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
13081
|
+
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
13082
|
+
// .attr("xu-ui-id", ui_id)
|
|
13083
|
+
// .data({
|
|
13084
|
+
// xuData: {
|
|
13085
|
+
// prog_id: _paramsP.prog_id,
|
|
13086
|
+
// nodeid: nodeP.id,
|
|
13087
|
+
// ui_type: nodeP.tagName,
|
|
13088
|
+
// xu_id: xu_id,
|
|
13089
|
+
// recordid: currentRecordId,
|
|
13090
|
+
// paramsP: _paramsP,
|
|
13091
|
+
// key: keyP,
|
|
13092
|
+
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
13093
|
+
// screenId: _paramsP.screenId,
|
|
13094
|
+
// parent_container: $container?.attr("id"),
|
|
13095
|
+
// elem_key,
|
|
13096
|
+
// ui_id,
|
|
13097
|
+
// properties: prop,
|
|
13098
|
+
// node: nodeP,
|
|
13099
|
+
// node_org: _.cloneDeep(nodeP),
|
|
13100
|
+
// is_panelP: _paramsP.is_panelP,
|
|
13101
|
+
|
|
13102
|
+
// elem_prop: elem_propP,
|
|
13103
|
+
// debug_info: {
|
|
13104
|
+
// id: nodeP.id,
|
|
13105
|
+
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
13106
|
+
// items: items,
|
|
13107
|
+
// },
|
|
13108
|
+
// parent_node: parent_nodeP,
|
|
13109
|
+
// currentRecordId: currentRecordId,
|
|
13110
|
+
// $root_container: $root_container,
|
|
13111
|
+
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
13112
|
+
// },
|
|
13113
|
+
// xuAttributes: {},
|
|
13114
|
+
// })
|
|
13115
|
+
|
|
13116
|
+
// if (div_typeP === "svg") {
|
|
13117
|
+
// $div.removeAttr("xu-ui-id")
|
|
13118
|
+
// }
|
|
13028
13119
|
if (div_typeP !== 'svg') {
|
|
13029
13120
|
$div.appendTo($appendTo);
|
|
13030
13121
|
}
|
|
@@ -13587,8 +13678,20 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13587
13678
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
13588
13679
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
13589
13680
|
await set_call_screen_properties_values(page);
|
|
13590
|
-
await page.create(
|
|
13591
|
-
|
|
13681
|
+
await page.create(
|
|
13682
|
+
params,
|
|
13683
|
+
// SESSION_ID,
|
|
13684
|
+
// paramsP.dsSessionP,
|
|
13685
|
+
// nav,
|
|
13686
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13687
|
+
);
|
|
13688
|
+
await page.init(
|
|
13689
|
+
params,
|
|
13690
|
+
// SESSION_ID,
|
|
13691
|
+
// paramsP.dsSessionP,
|
|
13692
|
+
// nav,
|
|
13693
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13694
|
+
);
|
|
13592
13695
|
nav.push(component_name, { params });
|
|
13593
13696
|
} else {
|
|
13594
13697
|
debugger;
|
|
@@ -13824,6 +13927,20 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13824
13927
|
} catch (err) {
|
|
13825
13928
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
13826
13929
|
}
|
|
13930
|
+
|
|
13931
|
+
// glb.lifecycle.plugins[plugin_name] = {
|
|
13932
|
+
// plugin_script: fx,
|
|
13933
|
+
// setup_data: plugin_setup_ret.data,
|
|
13934
|
+
// fields,
|
|
13935
|
+
// params,
|
|
13936
|
+
// };
|
|
13937
|
+
|
|
13938
|
+
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
13939
|
+
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
13940
|
+
|
|
13941
|
+
// } catch (err) {
|
|
13942
|
+
// report_error(err);
|
|
13943
|
+
// }
|
|
13827
13944
|
}
|
|
13828
13945
|
return $div;
|
|
13829
13946
|
},
|
|
@@ -13835,6 +13952,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13835
13952
|
var $wrapper = $('<div>');
|
|
13836
13953
|
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
13837
13954
|
|
|
13955
|
+
// if (paramsP.is_panelP) {
|
|
13956
|
+
// var id = $div.attr('id');
|
|
13957
|
+
// }
|
|
13958
|
+
|
|
13838
13959
|
if (!$div) return;
|
|
13839
13960
|
|
|
13840
13961
|
if (!REFRESHER_IN_PROGRESS && (paramsP.is_mobile_popover || paramsP.is_mobile_page)) {
|
|
@@ -13863,7 +13984,107 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13863
13984
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
13864
13985
|
});
|
|
13865
13986
|
|
|
13987
|
+
// var $div_content = $div.children();
|
|
13988
|
+
|
|
13989
|
+
// $.each($div_content, function (key, val) {
|
|
13990
|
+
// $(val).data().xuData.parent_container =
|
|
13991
|
+
// $div.data().xuData.parent_container;
|
|
13992
|
+
// });
|
|
13993
|
+
|
|
13866
13994
|
return await render_screen_type($div);
|
|
13995
|
+
|
|
13996
|
+
// if (paramsP.is_mobile_modal) {
|
|
13997
|
+
// return await open_modal($div);
|
|
13998
|
+
// }
|
|
13999
|
+
// if (paramsP.is_mobile_popover) {
|
|
14000
|
+
// open_popover($div);
|
|
14001
|
+
// func.UI.utils.screen_blocker(
|
|
14002
|
+
// false,
|
|
14003
|
+
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
14004
|
+
// );
|
|
14005
|
+
// return;
|
|
14006
|
+
// }
|
|
14007
|
+
|
|
14008
|
+
// if (paramsP.is_mobile_page) {
|
|
14009
|
+
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14010
|
+
// const nav = $nav[0];
|
|
14011
|
+
|
|
14012
|
+
// var params = {
|
|
14013
|
+
// div: $div_content,
|
|
14014
|
+
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
14015
|
+
// screenId: paramsP.screenId,
|
|
14016
|
+
// $container: $container,
|
|
14017
|
+
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
14018
|
+
// dsSession: paramsP.dsSessionP,
|
|
14019
|
+
// };
|
|
14020
|
+
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
14021
|
+
// if (!$(nav).data().xuData.nav_params) {
|
|
14022
|
+
// $(nav).data().xuData.nav_params = {};
|
|
14023
|
+
// }
|
|
14024
|
+
|
|
14025
|
+
// //restore validate
|
|
14026
|
+
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
14027
|
+
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
14028
|
+
// .data()
|
|
14029
|
+
// .xuData.params[
|
|
14030
|
+
// paramsP.dsSessionP
|
|
14031
|
+
// ].$container.data().xuData.validate_screen_ready;
|
|
14032
|
+
// }
|
|
14033
|
+
|
|
14034
|
+
// if (!$(nav)?.data()?.xuData) return;
|
|
14035
|
+
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
14036
|
+
// if (!$(component_name).length) {
|
|
14037
|
+
// await func.UI.component.create_app_page_component(
|
|
14038
|
+
// SESSION_ID,
|
|
14039
|
+
// paramsP.dsSessionP
|
|
14040
|
+
// );
|
|
14041
|
+
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
14042
|
+
// await page.create(
|
|
14043
|
+
// SESSION_ID,
|
|
14044
|
+
// paramsP.dsSessionP,
|
|
14045
|
+
// nav,
|
|
14046
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14047
|
+
// );
|
|
14048
|
+
// await page.init(
|
|
14049
|
+
// SESSION_ID,
|
|
14050
|
+
// paramsP.dsSessionP,
|
|
14051
|
+
// nav,
|
|
14052
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14053
|
+
// );
|
|
14054
|
+
// nav.push(component_name, { params });
|
|
14055
|
+
// } else {
|
|
14056
|
+
// debugger;
|
|
14057
|
+
// $(component_name).empty();
|
|
14058
|
+
|
|
14059
|
+
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
14060
|
+
// }
|
|
14061
|
+
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
14062
|
+
|
|
14063
|
+
// return $div;
|
|
14064
|
+
// }
|
|
14065
|
+
|
|
14066
|
+
// if (
|
|
14067
|
+
// !paramsP.is_mobile_page &&
|
|
14068
|
+
// !paramsP.is_mobile_modal &&
|
|
14069
|
+
// !paramsP.is_mobile_popover &&
|
|
14070
|
+
// !paramsP.is_panelP
|
|
14071
|
+
// ) {
|
|
14072
|
+
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14073
|
+
// if ($nav && $nav.length) {
|
|
14074
|
+
// // refresh made
|
|
14075
|
+
// } else {
|
|
14076
|
+
// $nav = $("<xu-nav>");
|
|
14077
|
+
// $container.append($nav);
|
|
14078
|
+
// func.UI.component.init_xu_nav($container, $nav);
|
|
14079
|
+
// }
|
|
14080
|
+
|
|
14081
|
+
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
14082
|
+
|
|
14083
|
+
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
14084
|
+
// } else {
|
|
14085
|
+
// $container.append($div_content);
|
|
14086
|
+
// }
|
|
14087
|
+
// return $container;
|
|
13867
14088
|
},
|
|
13868
14089
|
[`xu-multi-view`]: async function () {
|
|
13869
14090
|
var $div = $container;
|
|
@@ -13880,26 +14101,60 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13880
14101
|
}
|
|
13881
14102
|
|
|
13882
14103
|
const done = async function (continuous_idx) {
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
|
|
13894
|
-
|
|
13895
|
-
// if (paramsP.screenInfo.properties?.rtl) {
|
|
13896
|
-
// $div_content.attr('dir', 'rtl');
|
|
13897
|
-
// }
|
|
14104
|
+
const do_callback = async function ($div) {
|
|
14105
|
+
// if ($root_container.data().xuData.progress_bar_circle) {
|
|
14106
|
+
// setTimeout(function () {
|
|
14107
|
+
// $.each(
|
|
14108
|
+
// $root_container.data().xuData.progress_bar_circle,
|
|
14109
|
+
// function (key, val) {
|
|
14110
|
+
// val.bar.set(parseFloat(val.value)); // Number from 0.0 to 1.0
|
|
14111
|
+
// }
|
|
14112
|
+
// );
|
|
14113
|
+
// }, 2000);
|
|
14114
|
+
// }
|
|
13898
14115
|
|
|
13899
|
-
|
|
13900
|
-
|
|
14116
|
+
if (paramsP.screenInfo.properties?.rtl) {
|
|
14117
|
+
$div_content.attr('dir', 'rtl');
|
|
14118
|
+
}
|
|
14119
|
+
|
|
14120
|
+
return $div;
|
|
14121
|
+
};
|
|
13901
14122
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
14123
|
+
// var $div_content = $div.children();
|
|
14124
|
+
|
|
14125
|
+
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
14126
|
+
// $.each($div.data().xuData, function (key, val) {
|
|
14127
|
+
// $container.data().xuData[key] = val;
|
|
14128
|
+
// });
|
|
14129
|
+
// $.each($div.data().xuAttributes, function (key, val) {
|
|
14130
|
+
// $container.data().xuAttributes[key] = val;
|
|
14131
|
+
// });
|
|
14132
|
+
|
|
14133
|
+
// if (!$container.data().xuData.node) {
|
|
14134
|
+
// $container.data().xuData.node = {};
|
|
14135
|
+
// }
|
|
13902
14136
|
|
|
14137
|
+
// $container.data().xuData.node.children = [];
|
|
14138
|
+
|
|
14139
|
+
// $.each($div_content, function (key, val) {
|
|
14140
|
+
// if (!$(val)?.data()?.xuData) return;
|
|
14141
|
+
// if (
|
|
14142
|
+
// continuous_idx === null ||
|
|
14143
|
+
// (continuous_idx && key > continuous_idx)
|
|
14144
|
+
// ) {
|
|
14145
|
+
// $(val).data().xuData.parent_container =
|
|
14146
|
+
// $div.data().xuData.parent_container;
|
|
14147
|
+
// $container
|
|
14148
|
+
// .data()
|
|
14149
|
+
// .xuData.node.children.push($(val).data().xuData.node);
|
|
14150
|
+
// }
|
|
14151
|
+
// });
|
|
14152
|
+
// }
|
|
14153
|
+
|
|
14154
|
+
// if (continuous_idx !== null) {
|
|
14155
|
+
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
14156
|
+
// return;
|
|
14157
|
+
// }
|
|
13903
14158
|
return await render_screen_type($div);
|
|
13904
14159
|
};
|
|
13905
14160
|
|
|
@@ -13933,6 +14188,38 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13933
14188
|
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);
|
|
13934
14189
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
13935
14190
|
return await done(null);
|
|
14191
|
+
|
|
14192
|
+
// var text = "";
|
|
14193
|
+
// if (prop?.app_empty_result_text !== "undefined") {
|
|
14194
|
+
// text = prop.app_empty_result_text;
|
|
14195
|
+
// }
|
|
14196
|
+
// if (
|
|
14197
|
+
// prop.app_empty_result_text_EXP &&
|
|
14198
|
+
// prop.app_empty_result_text_EXP !== "undefined"
|
|
14199
|
+
// ) {
|
|
14200
|
+
// let exp = prop.app_empty_result_text_EXP;
|
|
14201
|
+
// if (exp && exp !== "undefined") {
|
|
14202
|
+
// var res = func.expression.get(
|
|
14203
|
+
// SESSION_ID,
|
|
14204
|
+
// exp,
|
|
14205
|
+
// paramsP.dsSessionP,
|
|
14206
|
+
// "app_empty_result_text_EXP",
|
|
14207
|
+
// _ds.currentRecordId
|
|
14208
|
+
// );
|
|
14209
|
+
// text = res.result;
|
|
14210
|
+
// }
|
|
14211
|
+
// }
|
|
14212
|
+
// if (icon || text) {
|
|
14213
|
+
// $container.append(
|
|
14214
|
+
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
14215
|
+
// );
|
|
14216
|
+
// }
|
|
14217
|
+
// await func.events.validate(
|
|
14218
|
+
// SESSION_ID,
|
|
14219
|
+
// "record_not_found",
|
|
14220
|
+
// paramsP.dsSessionP
|
|
14221
|
+
// );
|
|
14222
|
+
// return await done(null);
|
|
13936
14223
|
};
|
|
13937
14224
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
13938
14225
|
|
|
@@ -13945,7 +14232,25 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13945
14232
|
var i = 0;
|
|
13946
14233
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
13947
14234
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
13948
|
-
|
|
14235
|
+
// TO FIX
|
|
14236
|
+
// if (
|
|
14237
|
+
// continuous_idx === null &&
|
|
14238
|
+
// prop.app_items_per_page &&
|
|
14239
|
+
// i >= Number(prop.app_items_per_page)
|
|
14240
|
+
// ) {
|
|
14241
|
+
// continuous_idx = i;
|
|
14242
|
+
// await done(null);
|
|
14243
|
+
|
|
14244
|
+
// setTimeout(async function () {
|
|
14245
|
+
// await run_item(continuous_idx);
|
|
14246
|
+
// if (!glb.CURRENT_APP_LOADING) {
|
|
14247
|
+
// glb.CURRENT_APP_LOADING = 1;
|
|
14248
|
+
// } // deactivate loader
|
|
14249
|
+
// }, 1000);
|
|
14250
|
+
|
|
14251
|
+
// continue;
|
|
14252
|
+
// }
|
|
14253
|
+
////////
|
|
13949
14254
|
_ds.currentRecordId = val._ROWID;
|
|
13950
14255
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
13951
14256
|
|
|
@@ -13997,6 +14302,46 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13997
14302
|
};
|
|
13998
14303
|
if (!element || element === 'script') return await done();
|
|
13999
14304
|
let str = '';
|
|
14305
|
+
// var $div
|
|
14306
|
+
// const draw_svg = function () {
|
|
14307
|
+
// const get_tag_str = function (element, prop, val) {
|
|
14308
|
+
// let class_str = "";
|
|
14309
|
+
// let attr_str = "";
|
|
14310
|
+
// for (const [key, val] of Object.entries(prop)) {
|
|
14311
|
+
// if (key.substr(0, 2) !== "xu") {
|
|
14312
|
+
// attr_str += ` ${key}="${val}" `;
|
|
14313
|
+
// }
|
|
14314
|
+
// }
|
|
14315
|
+
// if (element === "svg") {
|
|
14316
|
+
// return `<${element} ${attr_str} > `;
|
|
14317
|
+
// }
|
|
14318
|
+
// let ret = "";
|
|
14319
|
+
// if (val?.children?.length) {
|
|
14320
|
+
// ret = iterate_svg(val);
|
|
14321
|
+
// }
|
|
14322
|
+
|
|
14323
|
+
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
14324
|
+
// };
|
|
14325
|
+
// let svg_str = get_tag_str(element, prop);
|
|
14326
|
+
// let inner_str = "";
|
|
14327
|
+
// const iterate_svg = function (node) {
|
|
14328
|
+
// let ret = "";
|
|
14329
|
+
// if (node.children) {
|
|
14330
|
+
// for (let val of node.children) {
|
|
14331
|
+
// let prop = val.attributes;
|
|
14332
|
+
// ret += get_tag_str(val.tagName, prop, val);
|
|
14333
|
+
// }
|
|
14334
|
+
// }
|
|
14335
|
+
// return ret;
|
|
14336
|
+
// };
|
|
14337
|
+
// inner_str = iterate_svg(nodeP);
|
|
14338
|
+
|
|
14339
|
+
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
14340
|
+
// };
|
|
14341
|
+
// if (element === "svg") {
|
|
14342
|
+
// draw_svg();
|
|
14343
|
+
// // return await done();
|
|
14344
|
+
// }
|
|
14000
14345
|
|
|
14001
14346
|
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);
|
|
14002
14347
|
|