@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
|
@@ -5143,6 +5143,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5143
5143
|
_ds.data_feed.rows[row_idx][field_id] = value;
|
|
5144
5144
|
await set_fieldComputed_dependencies(dataSource, field_id, null);
|
|
5145
5145
|
|
|
5146
|
+
// search the field in refs
|
|
5147
|
+
let _ds_0 = _session.DS_GLB[0];
|
|
5148
|
+
for ([ref_name, val] of Object.entries(_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'])) {
|
|
5149
|
+
if (val.dsSession == dataSource) {
|
|
5150
|
+
if (!fields_changed.includes(ref_name)) {
|
|
5151
|
+
fields_changed.push(ref_name);
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5154
|
+
}
|
|
5155
|
+
|
|
5146
5156
|
if (!update_local_scope_only) {
|
|
5147
5157
|
let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
5148
5158
|
if (glb.IS_WORKER) {
|
|
@@ -5214,8 +5224,8 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
5214
5224
|
}
|
|
5215
5225
|
///// REFRESH SCREEN
|
|
5216
5226
|
if (!avoid_refresh && fields_changed.length) {
|
|
5217
|
-
// await removed from the below function cause to dead lock Mar 3 25
|
|
5218
5227
|
await func.UI.screen.refresh_xu_attributes(SESSION_ID, fields_changed);
|
|
5228
|
+
// await removed from the below function cause to dead lock Mar 3 25
|
|
5219
5229
|
func.UI.screen.refresh_screen(
|
|
5220
5230
|
SESSION_ID,
|
|
5221
5231
|
fields_changed,
|
|
@@ -8960,19 +8970,12 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
8960
8970
|
};
|
|
8961
8971
|
|
|
8962
8972
|
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
8963
|
-
// return;
|
|
8964
8973
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
8965
8974
|
|
|
8966
8975
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
8967
8976
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
8968
8977
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
8969
8978
|
|
|
8970
|
-
// for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
8971
|
-
// if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
8972
|
-
// delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
8973
|
-
// }
|
|
8974
|
-
// }
|
|
8975
|
-
|
|
8976
8979
|
let abort;
|
|
8977
8980
|
|
|
8978
8981
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -9019,7 +9022,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
|
|
|
9019
9022
|
func.datasource.del(SESSION_ID, val);
|
|
9020
9023
|
}
|
|
9021
9024
|
};
|
|
9022
|
-
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]
|
|
9025
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9023
9026
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
9024
9027
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9025
9028
|
|
|
@@ -9988,16 +9991,19 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9988
9991
|
|
|
9989
9992
|
const common_fx = {
|
|
9990
9993
|
'xu-ref': async function ($elm, val) {
|
|
9991
|
-
// console.log('xu-ref', $elm, val);
|
|
9992
9994
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
9993
9995
|
let _ds_0 = _session.DS_GLB[0];
|
|
9994
|
-
|
|
9995
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
9996
|
-
// }
|
|
9997
|
-
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
9996
|
+
|
|
9998
9997
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
9999
|
-
|
|
10000
|
-
|
|
9998
|
+
|
|
9999
|
+
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
10000
|
+
const data = _ds?.data_feed?.rows?.[row_idx] || {};
|
|
10001
|
+
|
|
10002
|
+
const props = _ds.in_parameters || {};
|
|
10003
|
+
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
10004
|
+
|
|
10005
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
10006
|
+
|
|
10001
10007
|
return {};
|
|
10002
10008
|
},
|
|
10003
10009
|
'xu-bind': async function ($elm, val) {
|
|
@@ -10330,14 +10336,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10330
10336
|
if (!custom_iterator_key) {
|
|
10331
10337
|
is_key_dynamic_field = true;
|
|
10332
10338
|
|
|
10333
|
-
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
10334
10339
|
iterator_key = '_FOR_KEY';
|
|
10335
10340
|
}
|
|
10336
10341
|
|
|
10337
10342
|
if (!custom_iterator_val) {
|
|
10338
10343
|
is_val_dynamic_field = true;
|
|
10339
10344
|
|
|
10340
|
-
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
10341
10345
|
iterator_val = '_FOR_VAL';
|
|
10342
10346
|
}
|
|
10343
10347
|
|
|
@@ -10384,13 +10388,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10384
10388
|
};
|
|
10385
10389
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
10386
10390
|
_parent_info.iterate_info = iterate_info;
|
|
10387
|
-
|
|
10388
|
-
// _parent_info = iterate_info;
|
|
10389
|
-
// } else {
|
|
10390
|
-
// _parent_info = {
|
|
10391
|
-
// iterate_info,
|
|
10392
|
-
// };
|
|
10393
|
-
// }
|
|
10391
|
+
|
|
10394
10392
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
10395
10393
|
SESSION_ID,
|
|
10396
10394
|
$container,
|
|
@@ -10456,13 +10454,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10456
10454
|
},
|
|
10457
10455
|
'xu-exp': async function ($elm, val) {
|
|
10458
10456
|
let exp = val.value === null ? true : val.value;
|
|
10459
|
-
// if (val.value.includes("@_FOR_KEY")) {
|
|
10460
|
-
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
10461
|
-
// }
|
|
10462
|
-
|
|
10463
|
-
// if (val.value.includes("@_FOR_VAL")) {
|
|
10464
|
-
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
10465
|
-
// }
|
|
10466
10457
|
|
|
10467
10458
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
10468
10459
|
|
|
@@ -10871,10 +10862,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
10871
10862
|
_ret = _.assignIn(_ret, ret);
|
|
10872
10863
|
}
|
|
10873
10864
|
|
|
10874
|
-
// if (nodeP.tagName === "svg") {
|
|
10875
|
-
// console.log(svg_attributes_str);
|
|
10876
|
-
// }
|
|
10877
|
-
|
|
10878
10865
|
// EXP for
|
|
10879
10866
|
|
|
10880
10867
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -10983,20 +10970,6 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
10983
10970
|
if ($old_panel_div?.length) {
|
|
10984
10971
|
$($old_panel_div[0]).after($wrapper.children());
|
|
10985
10972
|
} else {
|
|
10986
|
-
// $container.append($wrapper.children());
|
|
10987
|
-
|
|
10988
|
-
// find existing xurender
|
|
10989
|
-
// $.each($wrapper.children(), function (key, val) {
|
|
10990
|
-
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
10991
|
-
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
10992
|
-
// if (
|
|
10993
|
-
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
10994
|
-
// $elm.length
|
|
10995
|
-
// ) {
|
|
10996
|
-
// $elm.remove();
|
|
10997
|
-
// }
|
|
10998
|
-
// $container.append($(val));
|
|
10999
|
-
// });
|
|
11000
10973
|
$.each($wrapper.children(), function (key, child) {
|
|
11001
10974
|
$.each($container.children(), function (key, elm) {
|
|
11002
10975
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -11124,59 +11097,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
11124
11097
|
},
|
|
11125
11098
|
xuAttributes: {},
|
|
11126
11099
|
});
|
|
11127
|
-
// }
|
|
11128
|
-
|
|
11129
|
-
// $div.appendTo($appendTo);
|
|
11130
|
-
|
|
11131
|
-
////////////////////////
|
|
11132
|
-
|
|
11133
|
-
// let svg_attributes_str = ""
|
|
11134
|
-
// if (div_typeP === "svg") {
|
|
11135
|
-
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
11136
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
11137
|
-
// }
|
|
11138
|
-
// }
|
|
11139
11100
|
|
|
11140
|
-
// var $div =
|
|
11141
|
-
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
11142
|
-
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
11143
|
-
// .attr("xu-ui-id", ui_id)
|
|
11144
|
-
// .data({
|
|
11145
|
-
// xuData: {
|
|
11146
|
-
// prog_id: _paramsP.prog_id,
|
|
11147
|
-
// nodeid: nodeP.id,
|
|
11148
|
-
// ui_type: nodeP.tagName,
|
|
11149
|
-
// xu_id: xu_id,
|
|
11150
|
-
// recordid: currentRecordId,
|
|
11151
|
-
// paramsP: _paramsP,
|
|
11152
|
-
// key: keyP,
|
|
11153
|
-
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
11154
|
-
// screenId: _paramsP.screenId,
|
|
11155
|
-
// parent_container: $container?.attr("id"),
|
|
11156
|
-
// elem_key,
|
|
11157
|
-
// ui_id,
|
|
11158
|
-
// properties: prop,
|
|
11159
|
-
// node: nodeP,
|
|
11160
|
-
// node_org: _.cloneDeep(nodeP),
|
|
11161
|
-
// is_panelP: _paramsP.is_panelP,
|
|
11162
|
-
|
|
11163
|
-
// elem_prop: elem_propP,
|
|
11164
|
-
// debug_info: {
|
|
11165
|
-
// id: nodeP.id,
|
|
11166
|
-
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
11167
|
-
// items: items,
|
|
11168
|
-
// },
|
|
11169
|
-
// parent_node: parent_nodeP,
|
|
11170
|
-
// currentRecordId: currentRecordId,
|
|
11171
|
-
// $root_container: $root_container,
|
|
11172
|
-
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
11173
|
-
// },
|
|
11174
|
-
// xuAttributes: {},
|
|
11175
|
-
// })
|
|
11176
|
-
|
|
11177
|
-
// if (div_typeP === "svg") {
|
|
11178
|
-
// $div.removeAttr("xu-ui-id")
|
|
11179
|
-
// }
|
|
11180
11101
|
if (div_typeP !== 'svg') {
|
|
11181
11102
|
$div.appendTo($appendTo);
|
|
11182
11103
|
}
|
|
@@ -11739,20 +11660,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11739
11660
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
11740
11661
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
11741
11662
|
await set_call_screen_properties_values(page);
|
|
11742
|
-
await page.create(
|
|
11743
|
-
|
|
11744
|
-
// SESSION_ID,
|
|
11745
|
-
// paramsP.dsSessionP,
|
|
11746
|
-
// nav,
|
|
11747
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
11748
|
-
);
|
|
11749
|
-
await page.init(
|
|
11750
|
-
params,
|
|
11751
|
-
// SESSION_ID,
|
|
11752
|
-
// paramsP.dsSessionP,
|
|
11753
|
-
// nav,
|
|
11754
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
11755
|
-
);
|
|
11663
|
+
await page.create(params);
|
|
11664
|
+
await page.init(params);
|
|
11756
11665
|
nav.push(component_name, { params });
|
|
11757
11666
|
} else {
|
|
11758
11667
|
debugger;
|
|
@@ -11988,20 +11897,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11988
11897
|
} catch (err) {
|
|
11989
11898
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
11990
11899
|
}
|
|
11991
|
-
|
|
11992
|
-
// glb.lifecycle.plugins[plugin_name] = {
|
|
11993
|
-
// plugin_script: fx,
|
|
11994
|
-
// setup_data: plugin_setup_ret.data,
|
|
11995
|
-
// fields,
|
|
11996
|
-
// params,
|
|
11997
|
-
// };
|
|
11998
|
-
|
|
11999
|
-
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
12000
|
-
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
12001
|
-
|
|
12002
|
-
// } catch (err) {
|
|
12003
|
-
// report_error(err);
|
|
12004
|
-
// }
|
|
12005
11900
|
}
|
|
12006
11901
|
return $div;
|
|
12007
11902
|
},
|
|
@@ -12045,107 +11940,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12045
11940
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
12046
11941
|
});
|
|
12047
11942
|
|
|
12048
|
-
// var $div_content = $div.children();
|
|
12049
|
-
|
|
12050
|
-
// $.each($div_content, function (key, val) {
|
|
12051
|
-
// $(val).data().xuData.parent_container =
|
|
12052
|
-
// $div.data().xuData.parent_container;
|
|
12053
|
-
// });
|
|
12054
|
-
|
|
12055
11943
|
return await render_screen_type($div);
|
|
12056
|
-
|
|
12057
|
-
// if (paramsP.is_mobile_modal) {
|
|
12058
|
-
// return await open_modal($div);
|
|
12059
|
-
// }
|
|
12060
|
-
// if (paramsP.is_mobile_popover) {
|
|
12061
|
-
// open_popover($div);
|
|
12062
|
-
// func.UI.utils.screen_blocker(
|
|
12063
|
-
// false,
|
|
12064
|
-
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
12065
|
-
// );
|
|
12066
|
-
// return;
|
|
12067
|
-
// }
|
|
12068
|
-
|
|
12069
|
-
// if (paramsP.is_mobile_page) {
|
|
12070
|
-
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
12071
|
-
// const nav = $nav[0];
|
|
12072
|
-
|
|
12073
|
-
// var params = {
|
|
12074
|
-
// div: $div_content,
|
|
12075
|
-
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
12076
|
-
// screenId: paramsP.screenId,
|
|
12077
|
-
// $container: $container,
|
|
12078
|
-
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
12079
|
-
// dsSession: paramsP.dsSessionP,
|
|
12080
|
-
// };
|
|
12081
|
-
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
12082
|
-
// if (!$(nav).data().xuData.nav_params) {
|
|
12083
|
-
// $(nav).data().xuData.nav_params = {};
|
|
12084
|
-
// }
|
|
12085
|
-
|
|
12086
|
-
// //restore validate
|
|
12087
|
-
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
12088
|
-
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
12089
|
-
// .data()
|
|
12090
|
-
// .xuData.params[
|
|
12091
|
-
// paramsP.dsSessionP
|
|
12092
|
-
// ].$container.data().xuData.validate_screen_ready;
|
|
12093
|
-
// }
|
|
12094
|
-
|
|
12095
|
-
// if (!$(nav)?.data()?.xuData) return;
|
|
12096
|
-
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
12097
|
-
// if (!$(component_name).length) {
|
|
12098
|
-
// await func.UI.component.create_app_page_component(
|
|
12099
|
-
// SESSION_ID,
|
|
12100
|
-
// paramsP.dsSessionP
|
|
12101
|
-
// );
|
|
12102
|
-
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
12103
|
-
// await page.create(
|
|
12104
|
-
// SESSION_ID,
|
|
12105
|
-
// paramsP.dsSessionP,
|
|
12106
|
-
// nav,
|
|
12107
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
12108
|
-
// );
|
|
12109
|
-
// await page.init(
|
|
12110
|
-
// SESSION_ID,
|
|
12111
|
-
// paramsP.dsSessionP,
|
|
12112
|
-
// nav,
|
|
12113
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
12114
|
-
// );
|
|
12115
|
-
// nav.push(component_name, { params });
|
|
12116
|
-
// } else {
|
|
12117
|
-
// debugger;
|
|
12118
|
-
// $(component_name).empty();
|
|
12119
|
-
|
|
12120
|
-
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
12121
|
-
// }
|
|
12122
|
-
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
12123
|
-
|
|
12124
|
-
// return $div;
|
|
12125
|
-
// }
|
|
12126
|
-
|
|
12127
|
-
// if (
|
|
12128
|
-
// !paramsP.is_mobile_page &&
|
|
12129
|
-
// !paramsP.is_mobile_modal &&
|
|
12130
|
-
// !paramsP.is_mobile_popover &&
|
|
12131
|
-
// !paramsP.is_panelP
|
|
12132
|
-
// ) {
|
|
12133
|
-
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
12134
|
-
// if ($nav && $nav.length) {
|
|
12135
|
-
// // refresh made
|
|
12136
|
-
// } else {
|
|
12137
|
-
// $nav = $("<xu-nav>");
|
|
12138
|
-
// $container.append($nav);
|
|
12139
|
-
// func.UI.component.init_xu_nav($container, $nav);
|
|
12140
|
-
// }
|
|
12141
|
-
|
|
12142
|
-
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
12143
|
-
|
|
12144
|
-
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
12145
|
-
// } else {
|
|
12146
|
-
// $container.append($div_content);
|
|
12147
|
-
// }
|
|
12148
|
-
// return $container;
|
|
12149
11944
|
},
|
|
12150
11945
|
[`xu-multi-view`]: async function () {
|
|
12151
11946
|
var $div = $container;
|
|
@@ -12181,41 +11976,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12181
11976
|
return $div;
|
|
12182
11977
|
};
|
|
12183
11978
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
12184
|
-
// var $div_content = $div.children();
|
|
12185
|
-
|
|
12186
|
-
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
12187
|
-
// $.each($div.data().xuData, function (key, val) {
|
|
12188
|
-
// $container.data().xuData[key] = val;
|
|
12189
|
-
// });
|
|
12190
|
-
// $.each($div.data().xuAttributes, function (key, val) {
|
|
12191
|
-
// $container.data().xuAttributes[key] = val;
|
|
12192
|
-
// });
|
|
12193
|
-
|
|
12194
|
-
// if (!$container.data().xuData.node) {
|
|
12195
|
-
// $container.data().xuData.node = {};
|
|
12196
|
-
// }
|
|
12197
|
-
|
|
12198
|
-
// $container.data().xuData.node.children = [];
|
|
12199
|
-
|
|
12200
|
-
// $.each($div_content, function (key, val) {
|
|
12201
|
-
// if (!$(val)?.data()?.xuData) return;
|
|
12202
|
-
// if (
|
|
12203
|
-
// continuous_idx === null ||
|
|
12204
|
-
// (continuous_idx && key > continuous_idx)
|
|
12205
|
-
// ) {
|
|
12206
|
-
// $(val).data().xuData.parent_container =
|
|
12207
|
-
// $div.data().xuData.parent_container;
|
|
12208
|
-
// $container
|
|
12209
|
-
// .data()
|
|
12210
|
-
// .xuData.node.children.push($(val).data().xuData.node);
|
|
12211
|
-
// }
|
|
12212
|
-
// });
|
|
12213
|
-
// }
|
|
12214
11979
|
|
|
12215
|
-
// if (continuous_idx !== null) {
|
|
12216
|
-
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
12217
|
-
// return;
|
|
12218
|
-
// }
|
|
12219
11980
|
return await render_screen_type($div);
|
|
12220
11981
|
};
|
|
12221
11982
|
|
|
@@ -12249,38 +12010,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12249
12010
|
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);
|
|
12250
12011
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
12251
12012
|
return await done(null);
|
|
12252
|
-
|
|
12253
|
-
// var text = "";
|
|
12254
|
-
// if (prop?.app_empty_result_text !== "undefined") {
|
|
12255
|
-
// text = prop.app_empty_result_text;
|
|
12256
|
-
// }
|
|
12257
|
-
// if (
|
|
12258
|
-
// prop.app_empty_result_text_EXP &&
|
|
12259
|
-
// prop.app_empty_result_text_EXP !== "undefined"
|
|
12260
|
-
// ) {
|
|
12261
|
-
// let exp = prop.app_empty_result_text_EXP;
|
|
12262
|
-
// if (exp && exp !== "undefined") {
|
|
12263
|
-
// var res = func.expression.get(
|
|
12264
|
-
// SESSION_ID,
|
|
12265
|
-
// exp,
|
|
12266
|
-
// paramsP.dsSessionP,
|
|
12267
|
-
// "app_empty_result_text_EXP",
|
|
12268
|
-
// _ds.currentRecordId
|
|
12269
|
-
// );
|
|
12270
|
-
// text = res.result;
|
|
12271
|
-
// }
|
|
12272
|
-
// }
|
|
12273
|
-
// if (icon || text) {
|
|
12274
|
-
// $container.append(
|
|
12275
|
-
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
12276
|
-
// );
|
|
12277
|
-
// }
|
|
12278
|
-
// await func.events.validate(
|
|
12279
|
-
// SESSION_ID,
|
|
12280
|
-
// "record_not_found",
|
|
12281
|
-
// paramsP.dsSessionP
|
|
12282
|
-
// );
|
|
12283
|
-
// return await done(null);
|
|
12284
12013
|
};
|
|
12285
12014
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
12286
12015
|
|
|
@@ -12293,25 +12022,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12293
12022
|
var i = 0;
|
|
12294
12023
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
12295
12024
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
12296
|
-
|
|
12297
|
-
// if (
|
|
12298
|
-
// continuous_idx === null &&
|
|
12299
|
-
// prop.app_items_per_page &&
|
|
12300
|
-
// i >= Number(prop.app_items_per_page)
|
|
12301
|
-
// ) {
|
|
12302
|
-
// continuous_idx = i;
|
|
12303
|
-
// await done(null);
|
|
12304
|
-
|
|
12305
|
-
// setTimeout(async function () {
|
|
12306
|
-
// await run_item(continuous_idx);
|
|
12307
|
-
// if (!glb.CURRENT_APP_LOADING) {
|
|
12308
|
-
// glb.CURRENT_APP_LOADING = 1;
|
|
12309
|
-
// } // deactivate loader
|
|
12310
|
-
// }, 1000);
|
|
12311
|
-
|
|
12312
|
-
// continue;
|
|
12313
|
-
// }
|
|
12314
|
-
////////
|
|
12025
|
+
|
|
12315
12026
|
_ds.currentRecordId = val._ROWID;
|
|
12316
12027
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
12317
12028
|
|
|
@@ -12363,46 +12074,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12363
12074
|
};
|
|
12364
12075
|
if (!element || element === 'script') return await done();
|
|
12365
12076
|
let str = '';
|
|
12366
|
-
// var $div
|
|
12367
|
-
// const draw_svg = function () {
|
|
12368
|
-
// const get_tag_str = function (element, prop, val) {
|
|
12369
|
-
// let class_str = "";
|
|
12370
|
-
// let attr_str = "";
|
|
12371
|
-
// for (const [key, val] of Object.entries(prop)) {
|
|
12372
|
-
// if (key.substr(0, 2) !== "xu") {
|
|
12373
|
-
// attr_str += ` ${key}="${val}" `;
|
|
12374
|
-
// }
|
|
12375
|
-
// }
|
|
12376
|
-
// if (element === "svg") {
|
|
12377
|
-
// return `<${element} ${attr_str} > `;
|
|
12378
|
-
// }
|
|
12379
|
-
// let ret = "";
|
|
12380
|
-
// if (val?.children?.length) {
|
|
12381
|
-
// ret = iterate_svg(val);
|
|
12382
|
-
// }
|
|
12383
|
-
|
|
12384
|
-
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
12385
|
-
// };
|
|
12386
|
-
// let svg_str = get_tag_str(element, prop);
|
|
12387
|
-
// let inner_str = "";
|
|
12388
|
-
// const iterate_svg = function (node) {
|
|
12389
|
-
// let ret = "";
|
|
12390
|
-
// if (node.children) {
|
|
12391
|
-
// for (let val of node.children) {
|
|
12392
|
-
// let prop = val.attributes;
|
|
12393
|
-
// ret += get_tag_str(val.tagName, prop, val);
|
|
12394
|
-
// }
|
|
12395
|
-
// }
|
|
12396
|
-
// return ret;
|
|
12397
|
-
// };
|
|
12398
|
-
// inner_str = iterate_svg(nodeP);
|
|
12399
|
-
|
|
12400
|
-
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
12401
|
-
// };
|
|
12402
|
-
// if (element === "svg") {
|
|
12403
|
-
// draw_svg();
|
|
12404
|
-
// // return await done();
|
|
12405
|
-
// }
|
|
12406
12077
|
|
|
12407
12078
|
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);
|
|
12408
12079
|
|