@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
|
@@ -8970,12 +8970,19 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
8970
8970
|
};
|
|
8971
8971
|
|
|
8972
8972
|
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
8973
|
+
// return;
|
|
8973
8974
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
8974
8975
|
|
|
8975
8976
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
8976
8977
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
8977
8978
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
8978
8979
|
|
|
8980
|
+
// for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
8981
|
+
// if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
8982
|
+
// delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
8983
|
+
// }
|
|
8984
|
+
// }
|
|
8985
|
+
|
|
8979
8986
|
let abort;
|
|
8980
8987
|
|
|
8981
8988
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -9022,7 +9029,7 @@ func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0
|
|
|
9022
9029
|
func.datasource.del(SESSION_ID, val);
|
|
9023
9030
|
}
|
|
9024
9031
|
};
|
|
9025
|
-
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9032
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
9026
9033
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
9027
9034
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9028
9035
|
|
|
@@ -9473,6 +9480,9 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9473
9480
|
|
|
9474
9481
|
if (!elem_val?.$elm?.data()?.xuData?.ui_type) continue;
|
|
9475
9482
|
|
|
9483
|
+
// // already rended
|
|
9484
|
+
// if (elem_val.$elm[0].tagName !== 'XURENDER' && elem_val?.$elm?.length) continue;
|
|
9485
|
+
|
|
9476
9486
|
new_job = await func.UI.worker.add_to_queue(
|
|
9477
9487
|
SESSION_ID,
|
|
9478
9488
|
'gui event',
|
|
@@ -9988,20 +9998,16 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9988
9998
|
|
|
9989
9999
|
const common_fx = {
|
|
9990
10000
|
'xu-ref': async function ($elm, val) {
|
|
10001
|
+
// console.log('xu-ref', $elm, val);
|
|
9991
10002
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
9992
10003
|
let _ds_0 = _session.DS_GLB[0];
|
|
9993
|
-
|
|
10004
|
+
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS']) {
|
|
10005
|
+
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
10006
|
+
// }
|
|
10007
|
+
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
9994
10008
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
const data = _.clone(_ds?.data_feed?.rows?.[row_idx]) || {};
|
|
9998
|
-
|
|
9999
|
-
const props = _ds.in_parameters || {};
|
|
10000
|
-
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
10001
|
-
|
|
10002
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
10003
|
-
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, data, attributes, props };
|
|
10004
|
-
|
|
10009
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data: _ds?.data_feed?.rows || {}, props: $elm?.data()?.xuData?.properties };
|
|
10010
|
+
// }
|
|
10005
10011
|
return {};
|
|
10006
10012
|
},
|
|
10007
10013
|
'xu-bind': async function ($elm, val) {
|
|
@@ -10334,12 +10340,14 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10334
10340
|
if (!custom_iterator_key) {
|
|
10335
10341
|
is_key_dynamic_field = true;
|
|
10336
10342
|
|
|
10343
|
+
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
10337
10344
|
iterator_key = '_FOR_KEY';
|
|
10338
10345
|
}
|
|
10339
10346
|
|
|
10340
10347
|
if (!custom_iterator_val) {
|
|
10341
10348
|
is_val_dynamic_field = true;
|
|
10342
10349
|
|
|
10350
|
+
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
10343
10351
|
iterator_val = '_FOR_VAL';
|
|
10344
10352
|
}
|
|
10345
10353
|
|
|
@@ -10386,7 +10394,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10386
10394
|
};
|
|
10387
10395
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
10388
10396
|
_parent_info.iterate_info = iterate_info;
|
|
10389
|
-
|
|
10397
|
+
// if (parent_infoP) {
|
|
10398
|
+
// _parent_info = iterate_info;
|
|
10399
|
+
// } else {
|
|
10400
|
+
// _parent_info = {
|
|
10401
|
+
// iterate_info,
|
|
10402
|
+
// };
|
|
10403
|
+
// }
|
|
10390
10404
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
10391
10405
|
SESSION_ID,
|
|
10392
10406
|
$container,
|
|
@@ -10452,6 +10466,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10452
10466
|
},
|
|
10453
10467
|
'xu-exp': async function ($elm, val) {
|
|
10454
10468
|
let exp = val.value === null ? true : val.value;
|
|
10469
|
+
// if (val.value.includes("@_FOR_KEY")) {
|
|
10470
|
+
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
10471
|
+
// }
|
|
10472
|
+
|
|
10473
|
+
// if (val.value.includes("@_FOR_VAL")) {
|
|
10474
|
+
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
10475
|
+
// }
|
|
10455
10476
|
|
|
10456
10477
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
10457
10478
|
|
|
@@ -10860,6 +10881,10 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
10860
10881
|
_ret = _.assignIn(_ret, ret);
|
|
10861
10882
|
}
|
|
10862
10883
|
|
|
10884
|
+
// if (nodeP.tagName === "svg") {
|
|
10885
|
+
// console.log(svg_attributes_str);
|
|
10886
|
+
// }
|
|
10887
|
+
|
|
10863
10888
|
// EXP for
|
|
10864
10889
|
|
|
10865
10890
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -10968,6 +10993,20 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
10968
10993
|
if ($old_panel_div?.length) {
|
|
10969
10994
|
$($old_panel_div[0]).after($wrapper.children());
|
|
10970
10995
|
} else {
|
|
10996
|
+
// $container.append($wrapper.children());
|
|
10997
|
+
|
|
10998
|
+
// find existing xurender
|
|
10999
|
+
// $.each($wrapper.children(), function (key, val) {
|
|
11000
|
+
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
11001
|
+
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
11002
|
+
// if (
|
|
11003
|
+
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
11004
|
+
// $elm.length
|
|
11005
|
+
// ) {
|
|
11006
|
+
// $elm.remove();
|
|
11007
|
+
// }
|
|
11008
|
+
// $container.append($(val));
|
|
11009
|
+
// });
|
|
10971
11010
|
$.each($wrapper.children(), function (key, child) {
|
|
10972
11011
|
$.each($container.children(), function (key, elm) {
|
|
10973
11012
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -11095,7 +11134,59 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
11095
11134
|
},
|
|
11096
11135
|
xuAttributes: {},
|
|
11097
11136
|
});
|
|
11137
|
+
// }
|
|
11098
11138
|
|
|
11139
|
+
// $div.appendTo($appendTo);
|
|
11140
|
+
|
|
11141
|
+
////////////////////////
|
|
11142
|
+
|
|
11143
|
+
// let svg_attributes_str = ""
|
|
11144
|
+
// if (div_typeP === "svg") {
|
|
11145
|
+
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
11146
|
+
// svg_attributes_str += `${key}="${val}" `
|
|
11147
|
+
// }
|
|
11148
|
+
// }
|
|
11149
|
+
|
|
11150
|
+
// var $div =
|
|
11151
|
+
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
11152
|
+
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
11153
|
+
// .attr("xu-ui-id", ui_id)
|
|
11154
|
+
// .data({
|
|
11155
|
+
// xuData: {
|
|
11156
|
+
// prog_id: _paramsP.prog_id,
|
|
11157
|
+
// nodeid: nodeP.id,
|
|
11158
|
+
// ui_type: nodeP.tagName,
|
|
11159
|
+
// xu_id: xu_id,
|
|
11160
|
+
// recordid: currentRecordId,
|
|
11161
|
+
// paramsP: _paramsP,
|
|
11162
|
+
// key: keyP,
|
|
11163
|
+
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
11164
|
+
// screenId: _paramsP.screenId,
|
|
11165
|
+
// parent_container: $container?.attr("id"),
|
|
11166
|
+
// elem_key,
|
|
11167
|
+
// ui_id,
|
|
11168
|
+
// properties: prop,
|
|
11169
|
+
// node: nodeP,
|
|
11170
|
+
// node_org: _.cloneDeep(nodeP),
|
|
11171
|
+
// is_panelP: _paramsP.is_panelP,
|
|
11172
|
+
|
|
11173
|
+
// elem_prop: elem_propP,
|
|
11174
|
+
// debug_info: {
|
|
11175
|
+
// id: nodeP.id,
|
|
11176
|
+
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
11177
|
+
// items: items,
|
|
11178
|
+
// },
|
|
11179
|
+
// parent_node: parent_nodeP,
|
|
11180
|
+
// currentRecordId: currentRecordId,
|
|
11181
|
+
// $root_container: $root_container,
|
|
11182
|
+
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
11183
|
+
// },
|
|
11184
|
+
// xuAttributes: {},
|
|
11185
|
+
// })
|
|
11186
|
+
|
|
11187
|
+
// if (div_typeP === "svg") {
|
|
11188
|
+
// $div.removeAttr("xu-ui-id")
|
|
11189
|
+
// }
|
|
11099
11190
|
if (div_typeP !== 'svg') {
|
|
11100
11191
|
$div.appendTo($appendTo);
|
|
11101
11192
|
}
|
|
@@ -11658,8 +11749,20 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11658
11749
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
11659
11750
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
11660
11751
|
await set_call_screen_properties_values(page);
|
|
11661
|
-
await page.create(
|
|
11662
|
-
|
|
11752
|
+
await page.create(
|
|
11753
|
+
params,
|
|
11754
|
+
// SESSION_ID,
|
|
11755
|
+
// paramsP.dsSessionP,
|
|
11756
|
+
// nav,
|
|
11757
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
11758
|
+
);
|
|
11759
|
+
await page.init(
|
|
11760
|
+
params,
|
|
11761
|
+
// SESSION_ID,
|
|
11762
|
+
// paramsP.dsSessionP,
|
|
11763
|
+
// nav,
|
|
11764
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
11765
|
+
);
|
|
11663
11766
|
nav.push(component_name, { params });
|
|
11664
11767
|
} else {
|
|
11665
11768
|
debugger;
|
|
@@ -11895,6 +11998,20 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11895
11998
|
} catch (err) {
|
|
11896
11999
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
11897
12000
|
}
|
|
12001
|
+
|
|
12002
|
+
// glb.lifecycle.plugins[plugin_name] = {
|
|
12003
|
+
// plugin_script: fx,
|
|
12004
|
+
// setup_data: plugin_setup_ret.data,
|
|
12005
|
+
// fields,
|
|
12006
|
+
// params,
|
|
12007
|
+
// };
|
|
12008
|
+
|
|
12009
|
+
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
12010
|
+
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
12011
|
+
|
|
12012
|
+
// } catch (err) {
|
|
12013
|
+
// report_error(err);
|
|
12014
|
+
// }
|
|
11898
12015
|
}
|
|
11899
12016
|
return $div;
|
|
11900
12017
|
},
|
|
@@ -11906,6 +12023,10 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11906
12023
|
var $wrapper = $('<div>');
|
|
11907
12024
|
$div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, prop, null, null, 'div', $wrapper, '');
|
|
11908
12025
|
|
|
12026
|
+
// if (paramsP.is_panelP) {
|
|
12027
|
+
// var id = $div.attr('id');
|
|
12028
|
+
// }
|
|
12029
|
+
|
|
11909
12030
|
if (!$div) return;
|
|
11910
12031
|
|
|
11911
12032
|
if (!REFRESHER_IN_PROGRESS && (paramsP.is_mobile_popover || paramsP.is_mobile_page)) {
|
|
@@ -11934,7 +12055,107 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11934
12055
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
11935
12056
|
});
|
|
11936
12057
|
|
|
12058
|
+
// var $div_content = $div.children();
|
|
12059
|
+
|
|
12060
|
+
// $.each($div_content, function (key, val) {
|
|
12061
|
+
// $(val).data().xuData.parent_container =
|
|
12062
|
+
// $div.data().xuData.parent_container;
|
|
12063
|
+
// });
|
|
12064
|
+
|
|
11937
12065
|
return await render_screen_type($div);
|
|
12066
|
+
|
|
12067
|
+
// if (paramsP.is_mobile_modal) {
|
|
12068
|
+
// return await open_modal($div);
|
|
12069
|
+
// }
|
|
12070
|
+
// if (paramsP.is_mobile_popover) {
|
|
12071
|
+
// open_popover($div);
|
|
12072
|
+
// func.UI.utils.screen_blocker(
|
|
12073
|
+
// false,
|
|
12074
|
+
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
12075
|
+
// );
|
|
12076
|
+
// return;
|
|
12077
|
+
// }
|
|
12078
|
+
|
|
12079
|
+
// if (paramsP.is_mobile_page) {
|
|
12080
|
+
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
12081
|
+
// const nav = $nav[0];
|
|
12082
|
+
|
|
12083
|
+
// var params = {
|
|
12084
|
+
// div: $div_content,
|
|
12085
|
+
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
12086
|
+
// screenId: paramsP.screenId,
|
|
12087
|
+
// $container: $container,
|
|
12088
|
+
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
12089
|
+
// dsSession: paramsP.dsSessionP,
|
|
12090
|
+
// };
|
|
12091
|
+
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
12092
|
+
// if (!$(nav).data().xuData.nav_params) {
|
|
12093
|
+
// $(nav).data().xuData.nav_params = {};
|
|
12094
|
+
// }
|
|
12095
|
+
|
|
12096
|
+
// //restore validate
|
|
12097
|
+
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
12098
|
+
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
12099
|
+
// .data()
|
|
12100
|
+
// .xuData.params[
|
|
12101
|
+
// paramsP.dsSessionP
|
|
12102
|
+
// ].$container.data().xuData.validate_screen_ready;
|
|
12103
|
+
// }
|
|
12104
|
+
|
|
12105
|
+
// if (!$(nav)?.data()?.xuData) return;
|
|
12106
|
+
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
12107
|
+
// if (!$(component_name).length) {
|
|
12108
|
+
// await func.UI.component.create_app_page_component(
|
|
12109
|
+
// SESSION_ID,
|
|
12110
|
+
// paramsP.dsSessionP
|
|
12111
|
+
// );
|
|
12112
|
+
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
12113
|
+
// await page.create(
|
|
12114
|
+
// SESSION_ID,
|
|
12115
|
+
// paramsP.dsSessionP,
|
|
12116
|
+
// nav,
|
|
12117
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
12118
|
+
// );
|
|
12119
|
+
// await page.init(
|
|
12120
|
+
// SESSION_ID,
|
|
12121
|
+
// paramsP.dsSessionP,
|
|
12122
|
+
// nav,
|
|
12123
|
+
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
12124
|
+
// );
|
|
12125
|
+
// nav.push(component_name, { params });
|
|
12126
|
+
// } else {
|
|
12127
|
+
// debugger;
|
|
12128
|
+
// $(component_name).empty();
|
|
12129
|
+
|
|
12130
|
+
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
12131
|
+
// }
|
|
12132
|
+
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
12133
|
+
|
|
12134
|
+
// return $div;
|
|
12135
|
+
// }
|
|
12136
|
+
|
|
12137
|
+
// if (
|
|
12138
|
+
// !paramsP.is_mobile_page &&
|
|
12139
|
+
// !paramsP.is_mobile_modal &&
|
|
12140
|
+
// !paramsP.is_mobile_popover &&
|
|
12141
|
+
// !paramsP.is_panelP
|
|
12142
|
+
// ) {
|
|
12143
|
+
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
12144
|
+
// if ($nav && $nav.length) {
|
|
12145
|
+
// // refresh made
|
|
12146
|
+
// } else {
|
|
12147
|
+
// $nav = $("<xu-nav>");
|
|
12148
|
+
// $container.append($nav);
|
|
12149
|
+
// func.UI.component.init_xu_nav($container, $nav);
|
|
12150
|
+
// }
|
|
12151
|
+
|
|
12152
|
+
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
12153
|
+
|
|
12154
|
+
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
12155
|
+
// } else {
|
|
12156
|
+
// $container.append($div_content);
|
|
12157
|
+
// }
|
|
12158
|
+
// return $container;
|
|
11938
12159
|
},
|
|
11939
12160
|
[`xu-multi-view`]: async function () {
|
|
11940
12161
|
var $div = $container;
|
|
@@ -11951,26 +12172,60 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
11951
12172
|
}
|
|
11952
12173
|
|
|
11953
12174
|
const done = async function (continuous_idx) {
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
// if (paramsP.screenInfo.properties?.rtl) {
|
|
11967
|
-
// $div_content.attr('dir', 'rtl');
|
|
11968
|
-
// }
|
|
12175
|
+
const do_callback = async function ($div) {
|
|
12176
|
+
// if ($root_container.data().xuData.progress_bar_circle) {
|
|
12177
|
+
// setTimeout(function () {
|
|
12178
|
+
// $.each(
|
|
12179
|
+
// $root_container.data().xuData.progress_bar_circle,
|
|
12180
|
+
// function (key, val) {
|
|
12181
|
+
// val.bar.set(parseFloat(val.value)); // Number from 0.0 to 1.0
|
|
12182
|
+
// }
|
|
12183
|
+
// );
|
|
12184
|
+
// }, 2000);
|
|
12185
|
+
// }
|
|
11969
12186
|
|
|
11970
|
-
|
|
11971
|
-
|
|
12187
|
+
if (paramsP.screenInfo.properties?.rtl) {
|
|
12188
|
+
$div_content.attr('dir', 'rtl');
|
|
12189
|
+
}
|
|
12190
|
+
|
|
12191
|
+
return $div;
|
|
12192
|
+
};
|
|
11972
12193
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
12194
|
+
// var $div_content = $div.children();
|
|
12195
|
+
|
|
12196
|
+
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
12197
|
+
// $.each($div.data().xuData, function (key, val) {
|
|
12198
|
+
// $container.data().xuData[key] = val;
|
|
12199
|
+
// });
|
|
12200
|
+
// $.each($div.data().xuAttributes, function (key, val) {
|
|
12201
|
+
// $container.data().xuAttributes[key] = val;
|
|
12202
|
+
// });
|
|
12203
|
+
|
|
12204
|
+
// if (!$container.data().xuData.node) {
|
|
12205
|
+
// $container.data().xuData.node = {};
|
|
12206
|
+
// }
|
|
11973
12207
|
|
|
12208
|
+
// $container.data().xuData.node.children = [];
|
|
12209
|
+
|
|
12210
|
+
// $.each($div_content, function (key, val) {
|
|
12211
|
+
// if (!$(val)?.data()?.xuData) return;
|
|
12212
|
+
// if (
|
|
12213
|
+
// continuous_idx === null ||
|
|
12214
|
+
// (continuous_idx && key > continuous_idx)
|
|
12215
|
+
// ) {
|
|
12216
|
+
// $(val).data().xuData.parent_container =
|
|
12217
|
+
// $div.data().xuData.parent_container;
|
|
12218
|
+
// $container
|
|
12219
|
+
// .data()
|
|
12220
|
+
// .xuData.node.children.push($(val).data().xuData.node);
|
|
12221
|
+
// }
|
|
12222
|
+
// });
|
|
12223
|
+
// }
|
|
12224
|
+
|
|
12225
|
+
// if (continuous_idx !== null) {
|
|
12226
|
+
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
12227
|
+
// return;
|
|
12228
|
+
// }
|
|
11974
12229
|
return await render_screen_type($div);
|
|
11975
12230
|
};
|
|
11976
12231
|
|
|
@@ -12004,6 +12259,38 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12004
12259
|
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);
|
|
12005
12260
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
12006
12261
|
return await done(null);
|
|
12262
|
+
|
|
12263
|
+
// var text = "";
|
|
12264
|
+
// if (prop?.app_empty_result_text !== "undefined") {
|
|
12265
|
+
// text = prop.app_empty_result_text;
|
|
12266
|
+
// }
|
|
12267
|
+
// if (
|
|
12268
|
+
// prop.app_empty_result_text_EXP &&
|
|
12269
|
+
// prop.app_empty_result_text_EXP !== "undefined"
|
|
12270
|
+
// ) {
|
|
12271
|
+
// let exp = prop.app_empty_result_text_EXP;
|
|
12272
|
+
// if (exp && exp !== "undefined") {
|
|
12273
|
+
// var res = func.expression.get(
|
|
12274
|
+
// SESSION_ID,
|
|
12275
|
+
// exp,
|
|
12276
|
+
// paramsP.dsSessionP,
|
|
12277
|
+
// "app_empty_result_text_EXP",
|
|
12278
|
+
// _ds.currentRecordId
|
|
12279
|
+
// );
|
|
12280
|
+
// text = res.result;
|
|
12281
|
+
// }
|
|
12282
|
+
// }
|
|
12283
|
+
// if (icon || text) {
|
|
12284
|
+
// $container.append(
|
|
12285
|
+
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
12286
|
+
// );
|
|
12287
|
+
// }
|
|
12288
|
+
// await func.events.validate(
|
|
12289
|
+
// SESSION_ID,
|
|
12290
|
+
// "record_not_found",
|
|
12291
|
+
// paramsP.dsSessionP
|
|
12292
|
+
// );
|
|
12293
|
+
// return await done(null);
|
|
12007
12294
|
};
|
|
12008
12295
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
12009
12296
|
|
|
@@ -12016,7 +12303,25 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12016
12303
|
var i = 0;
|
|
12017
12304
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
12018
12305
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
12019
|
-
|
|
12306
|
+
// TO FIX
|
|
12307
|
+
// if (
|
|
12308
|
+
// continuous_idx === null &&
|
|
12309
|
+
// prop.app_items_per_page &&
|
|
12310
|
+
// i >= Number(prop.app_items_per_page)
|
|
12311
|
+
// ) {
|
|
12312
|
+
// continuous_idx = i;
|
|
12313
|
+
// await done(null);
|
|
12314
|
+
|
|
12315
|
+
// setTimeout(async function () {
|
|
12316
|
+
// await run_item(continuous_idx);
|
|
12317
|
+
// if (!glb.CURRENT_APP_LOADING) {
|
|
12318
|
+
// glb.CURRENT_APP_LOADING = 1;
|
|
12319
|
+
// } // deactivate loader
|
|
12320
|
+
// }, 1000);
|
|
12321
|
+
|
|
12322
|
+
// continue;
|
|
12323
|
+
// }
|
|
12324
|
+
////////
|
|
12020
12325
|
_ds.currentRecordId = val._ROWID;
|
|
12021
12326
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
12022
12327
|
|
|
@@ -12068,6 +12373,46 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
12068
12373
|
};
|
|
12069
12374
|
if (!element || element === 'script') return await done();
|
|
12070
12375
|
let str = '';
|
|
12376
|
+
// var $div
|
|
12377
|
+
// const draw_svg = function () {
|
|
12378
|
+
// const get_tag_str = function (element, prop, val) {
|
|
12379
|
+
// let class_str = "";
|
|
12380
|
+
// let attr_str = "";
|
|
12381
|
+
// for (const [key, val] of Object.entries(prop)) {
|
|
12382
|
+
// if (key.substr(0, 2) !== "xu") {
|
|
12383
|
+
// attr_str += ` ${key}="${val}" `;
|
|
12384
|
+
// }
|
|
12385
|
+
// }
|
|
12386
|
+
// if (element === "svg") {
|
|
12387
|
+
// return `<${element} ${attr_str} > `;
|
|
12388
|
+
// }
|
|
12389
|
+
// let ret = "";
|
|
12390
|
+
// if (val?.children?.length) {
|
|
12391
|
+
// ret = iterate_svg(val);
|
|
12392
|
+
// }
|
|
12393
|
+
|
|
12394
|
+
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
12395
|
+
// };
|
|
12396
|
+
// let svg_str = get_tag_str(element, prop);
|
|
12397
|
+
// let inner_str = "";
|
|
12398
|
+
// const iterate_svg = function (node) {
|
|
12399
|
+
// let ret = "";
|
|
12400
|
+
// if (node.children) {
|
|
12401
|
+
// for (let val of node.children) {
|
|
12402
|
+
// let prop = val.attributes;
|
|
12403
|
+
// ret += get_tag_str(val.tagName, prop, val);
|
|
12404
|
+
// }
|
|
12405
|
+
// }
|
|
12406
|
+
// return ret;
|
|
12407
|
+
// };
|
|
12408
|
+
// inner_str = iterate_svg(nodeP);
|
|
12409
|
+
|
|
12410
|
+
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
12411
|
+
// };
|
|
12412
|
+
// if (element === "svg") {
|
|
12413
|
+
// draw_svg();
|
|
12414
|
+
// // return await done();
|
|
12415
|
+
// }
|
|
12071
12416
|
|
|
12072
12417
|
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);
|
|
12073
12418
|
|