@xuda.io/runtime-bundle 1.0.353 → 1.0.355
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 +26 -355
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +26 -355
- package/js/xuda-runtime-slim.min.es.js +26 -355
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +11 -1
- package/js/xuda-worker-bundle.js +11 -1
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -5142,6 +5142,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5142
5142
|
_ds.data_feed.rows[row_idx][field_id] = value;
|
|
5143
5143
|
await set_fieldComputed_dependencies(dataSource, field_id, null);
|
|
5144
5144
|
|
|
5145
|
+
// search the field in refs
|
|
5146
|
+
let _ds_0 = _session.DS_GLB[0];
|
|
5147
|
+
for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
|
|
5148
|
+
if (val.dsSession == dataSource) {
|
|
5149
|
+
if (!fields_changed.includes(ref_name)) {
|
|
5150
|
+
fields_changed.push(ref_name);
|
|
5151
|
+
}
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5154
|
+
|
|
5145
5155
|
if (!update_local_scope_only) {
|
|
5146
5156
|
let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
5147
5157
|
if (glb.IS_WORKER) {
|
|
@@ -5213,8 +5223,8 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5213
5223
|
}
|
|
5214
5224
|
///// REFRESH SCREEN
|
|
5215
5225
|
if (!avoid_refresh && fields_changed.length) {
|
|
5216
|
-
// await removed from the below function cause to dead lock Mar 3 25
|
|
5217
5226
|
await func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_changed);
|
|
5227
|
+
// await removed from the below function cause to dead lock Mar 3 25
|
|
5218
5228
|
func.UI.screen.refresh_screen(
|
|
5219
5229
|
SESSION_ID,
|
|
5220
5230
|
fields_changed,
|
|
@@ -8959,19 +8969,12 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
8959
8969
|
};
|
|
8960
8970
|
|
|
8961
8971
|
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
8962
|
-
// return;
|
|
8963
8972
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
8964
8973
|
|
|
8965
8974
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
8966
8975
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
8967
8976
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
8968
8977
|
|
|
8969
|
-
// for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
8970
|
-
// if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
8971
|
-
// delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
8972
|
-
// }
|
|
8973
|
-
// }
|
|
8974
|
-
|
|
8975
8978
|
let abort;
|
|
8976
8979
|
|
|
8977
8980
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -9018,7 +9021,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
|
|
|
9018
9021
|
func.datasource.del(SESSION_ID, val);
|
|
9019
9022
|
}
|
|
9020
9023
|
};
|
|
9021
|
-
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]) {
|
|
9022
9025
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
9023
9026
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9024
9027
|
|
|
@@ -11922,16 +11925,19 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11922
11925
|
|
|
11923
11926
|
const common_fx = {
|
|
11924
11927
|
'xu-ref': async function ($elm, val) {
|
|
11925
|
-
// console.log('xu-ref', $elm, val);
|
|
11926
11928
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
11927
11929
|
let _ds_0 = _session.DS_GLB[0];
|
|
11928
|
-
|
|
11929
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
11930
|
-
// }
|
|
11931
|
-
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
11930
|
+
|
|
11932
11931
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
11933
|
-
|
|
11934
|
-
|
|
11932
|
+
|
|
11933
|
+
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
11934
|
+
const data = _ds?.data_feed?.rows?.[row_idx] || {};
|
|
11935
|
+
|
|
11936
|
+
const props = _ds.in_parameters || {};
|
|
11937
|
+
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
11938
|
+
|
|
11939
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
11940
|
+
|
|
11935
11941
|
return {};
|
|
11936
11942
|
},
|
|
11937
11943
|
'xu-bind': async function ($elm, val) {
|
|
@@ -12264,14 +12270,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12264
12270
|
if (!custom_iterator_key) {
|
|
12265
12271
|
is_key_dynamic_field = true;
|
|
12266
12272
|
|
|
12267
|
-
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
12268
12273
|
iterator_key = '_FOR_KEY';
|
|
12269
12274
|
}
|
|
12270
12275
|
|
|
12271
12276
|
if (!custom_iterator_val) {
|
|
12272
12277
|
is_val_dynamic_field = true;
|
|
12273
12278
|
|
|
12274
|
-
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
12275
12279
|
iterator_val = '_FOR_VAL';
|
|
12276
12280
|
}
|
|
12277
12281
|
|
|
@@ -12318,13 +12322,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12318
12322
|
};
|
|
12319
12323
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
12320
12324
|
_parent_info.iterate_info = iterate_info;
|
|
12321
|
-
|
|
12322
|
-
// _parent_info = iterate_info;
|
|
12323
|
-
// } else {
|
|
12324
|
-
// _parent_info = {
|
|
12325
|
-
// iterate_info,
|
|
12326
|
-
// };
|
|
12327
|
-
// }
|
|
12325
|
+
|
|
12328
12326
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
12329
12327
|
SESSION_ID,
|
|
12330
12328
|
$container,
|
|
@@ -12390,13 +12388,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12390
12388
|
},
|
|
12391
12389
|
'xu-exp': async function ($elm, val) {
|
|
12392
12390
|
let exp = val.value === null ? true : val.value;
|
|
12393
|
-
// if (val.value.includes("@_FOR_KEY")) {
|
|
12394
|
-
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
12395
|
-
// }
|
|
12396
|
-
|
|
12397
|
-
// if (val.value.includes("@_FOR_VAL")) {
|
|
12398
|
-
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
12399
|
-
// }
|
|
12400
12391
|
|
|
12401
12392
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
12402
12393
|
|
|
@@ -12805,10 +12796,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12805
12796
|
_ret = _.assignIn(_ret, ret);
|
|
12806
12797
|
}
|
|
12807
12798
|
|
|
12808
|
-
// if (nodeP.tagName === "svg") {
|
|
12809
|
-
// console.log(svg_attributes_str);
|
|
12810
|
-
// }
|
|
12811
|
-
|
|
12812
12799
|
// EXP for
|
|
12813
12800
|
|
|
12814
12801
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -12917,20 +12904,6 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
12917
12904
|
if ($old_panel_div?.length) {
|
|
12918
12905
|
$($old_panel_div[0]).after($wrapper.children());
|
|
12919
12906
|
} else {
|
|
12920
|
-
// $container.append($wrapper.children());
|
|
12921
|
-
|
|
12922
|
-
// find existing xurender
|
|
12923
|
-
// $.each($wrapper.children(), function (key, val) {
|
|
12924
|
-
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12925
|
-
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12926
|
-
// if (
|
|
12927
|
-
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
12928
|
-
// $elm.length
|
|
12929
|
-
// ) {
|
|
12930
|
-
// $elm.remove();
|
|
12931
|
-
// }
|
|
12932
|
-
// $container.append($(val));
|
|
12933
|
-
// });
|
|
12934
12907
|
$.each($wrapper.children(), function (key, child) {
|
|
12935
12908
|
$.each($container.children(), function (key, elm) {
|
|
12936
12909
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -13058,59 +13031,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
13058
13031
|
},
|
|
13059
13032
|
xuAttributes: {},
|
|
13060
13033
|
});
|
|
13061
|
-
// }
|
|
13062
|
-
|
|
13063
|
-
// $div.appendTo($appendTo);
|
|
13064
|
-
|
|
13065
|
-
////////////////////////
|
|
13066
|
-
|
|
13067
|
-
// let svg_attributes_str = ""
|
|
13068
|
-
// if (div_typeP === "svg") {
|
|
13069
|
-
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
13070
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
13071
|
-
// }
|
|
13072
|
-
// }
|
|
13073
13034
|
|
|
13074
|
-
// var $div =
|
|
13075
|
-
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
13076
|
-
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
13077
|
-
// .attr("xu-ui-id", ui_id)
|
|
13078
|
-
// .data({
|
|
13079
|
-
// xuData: {
|
|
13080
|
-
// prog_id: _paramsP.prog_id,
|
|
13081
|
-
// nodeid: nodeP.id,
|
|
13082
|
-
// ui_type: nodeP.tagName,
|
|
13083
|
-
// xu_id: xu_id,
|
|
13084
|
-
// recordid: currentRecordId,
|
|
13085
|
-
// paramsP: _paramsP,
|
|
13086
|
-
// key: keyP,
|
|
13087
|
-
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
13088
|
-
// screenId: _paramsP.screenId,
|
|
13089
|
-
// parent_container: $container?.attr("id"),
|
|
13090
|
-
// elem_key,
|
|
13091
|
-
// ui_id,
|
|
13092
|
-
// properties: prop,
|
|
13093
|
-
// node: nodeP,
|
|
13094
|
-
// node_org: _.cloneDeep(nodeP),
|
|
13095
|
-
// is_panelP: _paramsP.is_panelP,
|
|
13096
|
-
|
|
13097
|
-
// elem_prop: elem_propP,
|
|
13098
|
-
// debug_info: {
|
|
13099
|
-
// id: nodeP.id,
|
|
13100
|
-
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
13101
|
-
// items: items,
|
|
13102
|
-
// },
|
|
13103
|
-
// parent_node: parent_nodeP,
|
|
13104
|
-
// currentRecordId: currentRecordId,
|
|
13105
|
-
// $root_container: $root_container,
|
|
13106
|
-
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
13107
|
-
// },
|
|
13108
|
-
// xuAttributes: {},
|
|
13109
|
-
// })
|
|
13110
|
-
|
|
13111
|
-
// if (div_typeP === "svg") {
|
|
13112
|
-
// $div.removeAttr("xu-ui-id")
|
|
13113
|
-
// }
|
|
13114
13035
|
if (div_typeP !== 'svg') {
|
|
13115
13036
|
$div.appendTo($appendTo);
|
|
13116
13037
|
}
|
|
@@ -13673,20 +13594,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13673
13594
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
13674
13595
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
13675
13596
|
await set_call_screen_properties_values(page);
|
|
13676
|
-
await page.create(
|
|
13677
|
-
|
|
13678
|
-
// SESSION_ID,
|
|
13679
|
-
// paramsP.dsSessionP,
|
|
13680
|
-
// nav,
|
|
13681
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13682
|
-
);
|
|
13683
|
-
await page.init(
|
|
13684
|
-
params,
|
|
13685
|
-
// SESSION_ID,
|
|
13686
|
-
// paramsP.dsSessionP,
|
|
13687
|
-
// nav,
|
|
13688
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13689
|
-
);
|
|
13597
|
+
await page.create(params);
|
|
13598
|
+
await page.init(params);
|
|
13690
13599
|
nav.push(component_name, { params });
|
|
13691
13600
|
} else {
|
|
13692
13601
|
debugger;
|
|
@@ -13922,20 +13831,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13922
13831
|
} catch (err) {
|
|
13923
13832
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
13924
13833
|
}
|
|
13925
|
-
|
|
13926
|
-
// glb.lifecycle.plugins[plugin_name] = {
|
|
13927
|
-
// plugin_script: fx,
|
|
13928
|
-
// setup_data: plugin_setup_ret.data,
|
|
13929
|
-
// fields,
|
|
13930
|
-
// params,
|
|
13931
|
-
// };
|
|
13932
|
-
|
|
13933
|
-
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
13934
|
-
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
13935
|
-
|
|
13936
|
-
// } catch (err) {
|
|
13937
|
-
// report_error(err);
|
|
13938
|
-
// }
|
|
13939
13834
|
}
|
|
13940
13835
|
return $div;
|
|
13941
13836
|
},
|
|
@@ -13979,107 +13874,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13979
13874
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
13980
13875
|
});
|
|
13981
13876
|
|
|
13982
|
-
// var $div_content = $div.children();
|
|
13983
|
-
|
|
13984
|
-
// $.each($div_content, function (key, val) {
|
|
13985
|
-
// $(val).data().xuData.parent_container =
|
|
13986
|
-
// $div.data().xuData.parent_container;
|
|
13987
|
-
// });
|
|
13988
|
-
|
|
13989
13877
|
return await render_screen_type($div);
|
|
13990
|
-
|
|
13991
|
-
// if (paramsP.is_mobile_modal) {
|
|
13992
|
-
// return await open_modal($div);
|
|
13993
|
-
// }
|
|
13994
|
-
// if (paramsP.is_mobile_popover) {
|
|
13995
|
-
// open_popover($div);
|
|
13996
|
-
// func.UI.utils.screen_blocker(
|
|
13997
|
-
// false,
|
|
13998
|
-
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
13999
|
-
// );
|
|
14000
|
-
// return;
|
|
14001
|
-
// }
|
|
14002
|
-
|
|
14003
|
-
// if (paramsP.is_mobile_page) {
|
|
14004
|
-
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14005
|
-
// const nav = $nav[0];
|
|
14006
|
-
|
|
14007
|
-
// var params = {
|
|
14008
|
-
// div: $div_content,
|
|
14009
|
-
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
14010
|
-
// screenId: paramsP.screenId,
|
|
14011
|
-
// $container: $container,
|
|
14012
|
-
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
14013
|
-
// dsSession: paramsP.dsSessionP,
|
|
14014
|
-
// };
|
|
14015
|
-
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
14016
|
-
// if (!$(nav).data().xuData.nav_params) {
|
|
14017
|
-
// $(nav).data().xuData.nav_params = {};
|
|
14018
|
-
// }
|
|
14019
|
-
|
|
14020
|
-
// //restore validate
|
|
14021
|
-
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
14022
|
-
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
14023
|
-
// .data()
|
|
14024
|
-
// .xuData.params[
|
|
14025
|
-
// paramsP.dsSessionP
|
|
14026
|
-
// ].$container.data().xuData.validate_screen_ready;
|
|
14027
|
-
// }
|
|
14028
|
-
|
|
14029
|
-
// if (!$(nav)?.data()?.xuData) return;
|
|
14030
|
-
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
14031
|
-
// if (!$(component_name).length) {
|
|
14032
|
-
// await func.UI.component.create_app_page_component(
|
|
14033
|
-
// SESSION_ID,
|
|
14034
|
-
// paramsP.dsSessionP
|
|
14035
|
-
// );
|
|
14036
|
-
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
14037
|
-
// await page.create(
|
|
14038
|
-
// SESSION_ID,
|
|
14039
|
-
// paramsP.dsSessionP,
|
|
14040
|
-
// nav,
|
|
14041
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14042
|
-
// );
|
|
14043
|
-
// await page.init(
|
|
14044
|
-
// SESSION_ID,
|
|
14045
|
-
// paramsP.dsSessionP,
|
|
14046
|
-
// nav,
|
|
14047
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14048
|
-
// );
|
|
14049
|
-
// nav.push(component_name, { params });
|
|
14050
|
-
// } else {
|
|
14051
|
-
// debugger;
|
|
14052
|
-
// $(component_name).empty();
|
|
14053
|
-
|
|
14054
|
-
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
14055
|
-
// }
|
|
14056
|
-
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
14057
|
-
|
|
14058
|
-
// return $div;
|
|
14059
|
-
// }
|
|
14060
|
-
|
|
14061
|
-
// if (
|
|
14062
|
-
// !paramsP.is_mobile_page &&
|
|
14063
|
-
// !paramsP.is_mobile_modal &&
|
|
14064
|
-
// !paramsP.is_mobile_popover &&
|
|
14065
|
-
// !paramsP.is_panelP
|
|
14066
|
-
// ) {
|
|
14067
|
-
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14068
|
-
// if ($nav && $nav.length) {
|
|
14069
|
-
// // refresh made
|
|
14070
|
-
// } else {
|
|
14071
|
-
// $nav = $("<xu-nav>");
|
|
14072
|
-
// $container.append($nav);
|
|
14073
|
-
// func.UI.component.init_xu_nav($container, $nav);
|
|
14074
|
-
// }
|
|
14075
|
-
|
|
14076
|
-
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
14077
|
-
|
|
14078
|
-
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
14079
|
-
// } else {
|
|
14080
|
-
// $container.append($div_content);
|
|
14081
|
-
// }
|
|
14082
|
-
// return $container;
|
|
14083
13878
|
},
|
|
14084
13879
|
[`xu-multi-view`]: async function () {
|
|
14085
13880
|
var $div = $container;
|
|
@@ -14115,41 +13910,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14115
13910
|
return $div;
|
|
14116
13911
|
};
|
|
14117
13912
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
14118
|
-
// var $div_content = $div.children();
|
|
14119
|
-
|
|
14120
|
-
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
14121
|
-
// $.each($div.data().xuData, function (key, val) {
|
|
14122
|
-
// $container.data().xuData[key] = val;
|
|
14123
|
-
// });
|
|
14124
|
-
// $.each($div.data().xuAttributes, function (key, val) {
|
|
14125
|
-
// $container.data().xuAttributes[key] = val;
|
|
14126
|
-
// });
|
|
14127
|
-
|
|
14128
|
-
// if (!$container.data().xuData.node) {
|
|
14129
|
-
// $container.data().xuData.node = {};
|
|
14130
|
-
// }
|
|
14131
|
-
|
|
14132
|
-
// $container.data().xuData.node.children = [];
|
|
14133
|
-
|
|
14134
|
-
// $.each($div_content, function (key, val) {
|
|
14135
|
-
// if (!$(val)?.data()?.xuData) return;
|
|
14136
|
-
// if (
|
|
14137
|
-
// continuous_idx === null ||
|
|
14138
|
-
// (continuous_idx && key > continuous_idx)
|
|
14139
|
-
// ) {
|
|
14140
|
-
// $(val).data().xuData.parent_container =
|
|
14141
|
-
// $div.data().xuData.parent_container;
|
|
14142
|
-
// $container
|
|
14143
|
-
// .data()
|
|
14144
|
-
// .xuData.node.children.push($(val).data().xuData.node);
|
|
14145
|
-
// }
|
|
14146
|
-
// });
|
|
14147
|
-
// }
|
|
14148
13913
|
|
|
14149
|
-
// if (continuous_idx !== null) {
|
|
14150
|
-
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
14151
|
-
// return;
|
|
14152
|
-
// }
|
|
14153
13914
|
return await render_screen_type($div);
|
|
14154
13915
|
};
|
|
14155
13916
|
|
|
@@ -14183,38 +13944,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14183
13944
|
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);
|
|
14184
13945
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
14185
13946
|
return await done(null);
|
|
14186
|
-
|
|
14187
|
-
// var text = "";
|
|
14188
|
-
// if (prop?.app_empty_result_text !== "undefined") {
|
|
14189
|
-
// text = prop.app_empty_result_text;
|
|
14190
|
-
// }
|
|
14191
|
-
// if (
|
|
14192
|
-
// prop.app_empty_result_text_EXP &&
|
|
14193
|
-
// prop.app_empty_result_text_EXP !== "undefined"
|
|
14194
|
-
// ) {
|
|
14195
|
-
// let exp = prop.app_empty_result_text_EXP;
|
|
14196
|
-
// if (exp && exp !== "undefined") {
|
|
14197
|
-
// var res = func.expression.get(
|
|
14198
|
-
// SESSION_ID,
|
|
14199
|
-
// exp,
|
|
14200
|
-
// paramsP.dsSessionP,
|
|
14201
|
-
// "app_empty_result_text_EXP",
|
|
14202
|
-
// _ds.currentRecordId
|
|
14203
|
-
// );
|
|
14204
|
-
// text = res.result;
|
|
14205
|
-
// }
|
|
14206
|
-
// }
|
|
14207
|
-
// if (icon || text) {
|
|
14208
|
-
// $container.append(
|
|
14209
|
-
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
14210
|
-
// );
|
|
14211
|
-
// }
|
|
14212
|
-
// await func.events.validate(
|
|
14213
|
-
// SESSION_ID,
|
|
14214
|
-
// "record_not_found",
|
|
14215
|
-
// paramsP.dsSessionP
|
|
14216
|
-
// );
|
|
14217
|
-
// return await done(null);
|
|
14218
13947
|
};
|
|
14219
13948
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
14220
13949
|
|
|
@@ -14227,25 +13956,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14227
13956
|
var i = 0;
|
|
14228
13957
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
14229
13958
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
14230
|
-
|
|
14231
|
-
// if (
|
|
14232
|
-
// continuous_idx === null &&
|
|
14233
|
-
// prop.app_items_per_page &&
|
|
14234
|
-
// i >= Number(prop.app_items_per_page)
|
|
14235
|
-
// ) {
|
|
14236
|
-
// continuous_idx = i;
|
|
14237
|
-
// await done(null);
|
|
14238
|
-
|
|
14239
|
-
// setTimeout(async function () {
|
|
14240
|
-
// await run_item(continuous_idx);
|
|
14241
|
-
// if (!glb.CURRENT_APP_LOADING) {
|
|
14242
|
-
// glb.CURRENT_APP_LOADING = 1;
|
|
14243
|
-
// } // deactivate loader
|
|
14244
|
-
// }, 1000);
|
|
14245
|
-
|
|
14246
|
-
// continue;
|
|
14247
|
-
// }
|
|
14248
|
-
////////
|
|
13959
|
+
|
|
14249
13960
|
_ds.currentRecordId = val._ROWID;
|
|
14250
13961
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
14251
13962
|
|
|
@@ -14297,46 +14008,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14297
14008
|
};
|
|
14298
14009
|
if (!element || element === 'script') return await done();
|
|
14299
14010
|
let str = '';
|
|
14300
|
-
// var $div
|
|
14301
|
-
// const draw_svg = function () {
|
|
14302
|
-
// const get_tag_str = function (element, prop, val) {
|
|
14303
|
-
// let class_str = "";
|
|
14304
|
-
// let attr_str = "";
|
|
14305
|
-
// for (const [key, val] of Object.entries(prop)) {
|
|
14306
|
-
// if (key.substr(0, 2) !== "xu") {
|
|
14307
|
-
// attr_str += ` ${key}="${val}" `;
|
|
14308
|
-
// }
|
|
14309
|
-
// }
|
|
14310
|
-
// if (element === "svg") {
|
|
14311
|
-
// return `<${element} ${attr_str} > `;
|
|
14312
|
-
// }
|
|
14313
|
-
// let ret = "";
|
|
14314
|
-
// if (val?.children?.length) {
|
|
14315
|
-
// ret = iterate_svg(val);
|
|
14316
|
-
// }
|
|
14317
|
-
|
|
14318
|
-
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
14319
|
-
// };
|
|
14320
|
-
// let svg_str = get_tag_str(element, prop);
|
|
14321
|
-
// let inner_str = "";
|
|
14322
|
-
// const iterate_svg = function (node) {
|
|
14323
|
-
// let ret = "";
|
|
14324
|
-
// if (node.children) {
|
|
14325
|
-
// for (let val of node.children) {
|
|
14326
|
-
// let prop = val.attributes;
|
|
14327
|
-
// ret += get_tag_str(val.tagName, prop, val);
|
|
14328
|
-
// }
|
|
14329
|
-
// }
|
|
14330
|
-
// return ret;
|
|
14331
|
-
// };
|
|
14332
|
-
// inner_str = iterate_svg(nodeP);
|
|
14333
|
-
|
|
14334
|
-
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
14335
|
-
// };
|
|
14336
|
-
// if (element === "svg") {
|
|
14337
|
-
// draw_svg();
|
|
14338
|
-
// // return await done();
|
|
14339
|
-
// }
|
|
14340
14011
|
|
|
14341
14012
|
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);
|
|
14342
14013
|
|