@xuda.io/runtime-bundle 1.0.352 → 1.0.354
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 +30 -411
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +30 -411
- package/js/xuda-runtime-slim.min.es.js +30 -411
- package/js/xuda-runtime-slim.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -8619,62 +8619,6 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
|
|
|
8619
8619
|
func.UI.worker = {};
|
|
8620
8620
|
func.UI.worker.ID = null;
|
|
8621
8621
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
8622
|
-
// var _session = SESSION_OBJ[SESSION_ID];
|
|
8623
|
-
|
|
8624
|
-
// function getWorkerURL(url) {
|
|
8625
|
-
// const content = `importScripts( "${url}" );`;
|
|
8626
|
-
// return URL.createObjectURL(
|
|
8627
|
-
// new Blob([content], { type: "text/javascript" })
|
|
8628
|
-
// );
|
|
8629
|
-
// }
|
|
8630
|
-
|
|
8631
|
-
// let blob = getWorkerURL(
|
|
8632
|
-
// func.common.get_url(
|
|
8633
|
-
// SESSION_ID,
|
|
8634
|
-
// "dist",
|
|
8635
|
-
// func.utils.get_resource_filename(
|
|
8636
|
-
// _session.engine_mode === "live_preview"
|
|
8637
|
-
// ? ""
|
|
8638
|
-
// : _session?.opt?.app_build_id,
|
|
8639
|
-
// "runtime/js/xuda_UI_worker.js"
|
|
8640
|
-
// )
|
|
8641
|
-
// )
|
|
8642
|
-
// );
|
|
8643
|
-
|
|
8644
|
-
// func.UI.worker.ID = new Worker(blob, {
|
|
8645
|
-
// name: "xuda UI worker ",
|
|
8646
|
-
// });
|
|
8647
|
-
|
|
8648
|
-
// func.UI.worker.ID.postMessage({ method: "init" });
|
|
8649
|
-
|
|
8650
|
-
// func.UI.worker.ID.addEventListener(
|
|
8651
|
-
// "message",
|
|
8652
|
-
// function (e) {
|
|
8653
|
-
// if (e.data.dsSessionP && !_session.DS_GLB[e.data.dsSessionP]) {
|
|
8654
|
-
// func.UI.worker.delete_job(e.data.job_num);
|
|
8655
|
-
// }
|
|
8656
|
-
|
|
8657
|
-
// let queue_obj = e.data;
|
|
8658
|
-
|
|
8659
|
-
// queue_obj.elementP = $(`[xu-ui-id=${queue_obj.xu_ui_id}]`);
|
|
8660
|
-
|
|
8661
|
-
// if (queue_obj?.paramsP?.elem_val?.elm_xu_ui_id) {
|
|
8662
|
-
// queue_obj.paramsP.elem_val.$elm = $(
|
|
8663
|
-
// `[xu-ui-id=${queue_obj.paramsP.elem_val.elm_xu_ui_id}]`
|
|
8664
|
-
// );
|
|
8665
|
-
// }
|
|
8666
|
-
|
|
8667
|
-
// func.UI.worker.execute(SESSION_ID, queue_obj);
|
|
8668
|
-
// },
|
|
8669
|
-
// false
|
|
8670
|
-
// );
|
|
8671
|
-
|
|
8672
|
-
// setInterval(async function () {
|
|
8673
|
-
// func.UI.garbage_collector();
|
|
8674
|
-
// }, 10000);
|
|
8675
|
-
|
|
8676
|
-
// return;
|
|
8677
|
-
|
|
8678
8622
|
$.fn.isInViewport = function () {
|
|
8679
8623
|
var elementTop = $(this).offset().top;
|
|
8680
8624
|
var elementBottom = elementTop + $(this).outerHeight();
|
|
@@ -8731,8 +8675,12 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8731
8675
|
this._interval = setInterval(job_iterator, 1);
|
|
8732
8676
|
|
|
8733
8677
|
setInterval(async function () {
|
|
8734
|
-
func.UI.
|
|
8678
|
+
func.UI.ds_garbage_collector();
|
|
8735
8679
|
}, 10000);
|
|
8680
|
+
|
|
8681
|
+
setInterval(async function () {
|
|
8682
|
+
func.UI.refs_garbage_collector();
|
|
8683
|
+
}, 1000);
|
|
8736
8684
|
};
|
|
8737
8685
|
func.UI.worker.add_to_queue = async function (SESSION_ID, source, functionP, paramsP, calling_job, elementP, dsSession, calling_trigger_prop) {
|
|
8738
8686
|
// try {
|
|
@@ -9010,20 +8958,13 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
9010
8958
|
return ret;
|
|
9011
8959
|
};
|
|
9012
8960
|
|
|
9013
|
-
func.UI.
|
|
9014
|
-
// return;
|
|
8961
|
+
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
9015
8962
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
9016
8963
|
|
|
9017
8964
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9018
8965
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
9019
8966
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
9020
8967
|
|
|
9021
|
-
for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
9022
|
-
if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
9023
|
-
delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
9024
|
-
}
|
|
9025
|
-
}
|
|
9026
|
-
|
|
9027
8968
|
let abort;
|
|
9028
8969
|
|
|
9029
8970
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -9069,6 +9010,16 @@ func.UI.garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0],
|
|
|
9069
9010
|
for (const val of ds_pending_to_delete) {
|
|
9070
9011
|
func.datasource.del(SESSION_ID, val);
|
|
9071
9012
|
}
|
|
9013
|
+
};
|
|
9014
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
9015
|
+
let _session = SESSION_OBJ[SESSION_ID];
|
|
9016
|
+
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
9017
|
+
|
|
9018
|
+
for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
9019
|
+
if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
9020
|
+
delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
9021
|
+
}
|
|
9022
|
+
}
|
|
9072
9023
|
};
|
|
9073
9024
|
func.events = {};
|
|
9074
9025
|
func.events.validate = async function (SESSION_ID, triggerP, dsSessionP, eventIdP, sourceP, argumentsP, return_validation_onlyP) {
|
|
@@ -11964,16 +11915,19 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
11964
11915
|
|
|
11965
11916
|
const common_fx = {
|
|
11966
11917
|
'xu-ref': async function ($elm, val) {
|
|
11967
|
-
// console.log('xu-ref', $elm, val);
|
|
11968
11918
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
11969
11919
|
let _ds_0 = _session.DS_GLB[0];
|
|
11970
|
-
|
|
11971
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
11972
|
-
// }
|
|
11973
|
-
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
11920
|
+
|
|
11974
11921
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
11975
|
-
|
|
11976
|
-
|
|
11922
|
+
|
|
11923
|
+
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
11924
|
+
const data = _ds?.data_feed?.rows?.[row_idx] || {};
|
|
11925
|
+
|
|
11926
|
+
const props = _ds.in_parameters || {};
|
|
11927
|
+
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
11928
|
+
|
|
11929
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
11930
|
+
|
|
11977
11931
|
return {};
|
|
11978
11932
|
},
|
|
11979
11933
|
'xu-bind': async function ($elm, val) {
|
|
@@ -12306,14 +12260,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12306
12260
|
if (!custom_iterator_key) {
|
|
12307
12261
|
is_key_dynamic_field = true;
|
|
12308
12262
|
|
|
12309
|
-
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
12310
12263
|
iterator_key = '_FOR_KEY';
|
|
12311
12264
|
}
|
|
12312
12265
|
|
|
12313
12266
|
if (!custom_iterator_val) {
|
|
12314
12267
|
is_val_dynamic_field = true;
|
|
12315
12268
|
|
|
12316
|
-
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
12317
12269
|
iterator_val = '_FOR_VAL';
|
|
12318
12270
|
}
|
|
12319
12271
|
|
|
@@ -12360,13 +12312,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12360
12312
|
};
|
|
12361
12313
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
12362
12314
|
_parent_info.iterate_info = iterate_info;
|
|
12363
|
-
|
|
12364
|
-
// _parent_info = iterate_info;
|
|
12365
|
-
// } else {
|
|
12366
|
-
// _parent_info = {
|
|
12367
|
-
// iterate_info,
|
|
12368
|
-
// };
|
|
12369
|
-
// }
|
|
12315
|
+
|
|
12370
12316
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
12371
12317
|
SESSION_ID,
|
|
12372
12318
|
$container,
|
|
@@ -12432,13 +12378,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12432
12378
|
},
|
|
12433
12379
|
'xu-exp': async function ($elm, val) {
|
|
12434
12380
|
let exp = val.value === null ? true : val.value;
|
|
12435
|
-
// if (val.value.includes("@_FOR_KEY")) {
|
|
12436
|
-
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
12437
|
-
// }
|
|
12438
|
-
|
|
12439
|
-
// if (val.value.includes("@_FOR_VAL")) {
|
|
12440
|
-
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
12441
|
-
// }
|
|
12442
12381
|
|
|
12443
12382
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
12444
12383
|
|
|
@@ -12847,10 +12786,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
12847
12786
|
_ret = _.assignIn(_ret, ret);
|
|
12848
12787
|
}
|
|
12849
12788
|
|
|
12850
|
-
// if (nodeP.tagName === "svg") {
|
|
12851
|
-
// console.log(svg_attributes_str);
|
|
12852
|
-
// }
|
|
12853
|
-
|
|
12854
12789
|
// EXP for
|
|
12855
12790
|
|
|
12856
12791
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -12959,20 +12894,6 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
12959
12894
|
if ($old_panel_div?.length) {
|
|
12960
12895
|
$($old_panel_div[0]).after($wrapper.children());
|
|
12961
12896
|
} else {
|
|
12962
|
-
// $container.append($wrapper.children());
|
|
12963
|
-
|
|
12964
|
-
// find existing xurender
|
|
12965
|
-
// $.each($wrapper.children(), function (key, val) {
|
|
12966
|
-
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12967
|
-
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
12968
|
-
// if (
|
|
12969
|
-
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
12970
|
-
// $elm.length
|
|
12971
|
-
// ) {
|
|
12972
|
-
// $elm.remove();
|
|
12973
|
-
// }
|
|
12974
|
-
// $container.append($(val));
|
|
12975
|
-
// });
|
|
12976
12897
|
$.each($wrapper.children(), function (key, child) {
|
|
12977
12898
|
$.each($container.children(), function (key, elm) {
|
|
12978
12899
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -13100,59 +13021,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
13100
13021
|
},
|
|
13101
13022
|
xuAttributes: {},
|
|
13102
13023
|
});
|
|
13103
|
-
// }
|
|
13104
|
-
|
|
13105
|
-
// $div.appendTo($appendTo);
|
|
13106
|
-
|
|
13107
|
-
////////////////////////
|
|
13108
|
-
|
|
13109
|
-
// let svg_attributes_str = ""
|
|
13110
|
-
// if (div_typeP === "svg") {
|
|
13111
|
-
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
13112
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
13113
|
-
// }
|
|
13114
|
-
// }
|
|
13115
13024
|
|
|
13116
|
-
// var $div =
|
|
13117
|
-
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
13118
|
-
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
13119
|
-
// .attr("xu-ui-id", ui_id)
|
|
13120
|
-
// .data({
|
|
13121
|
-
// xuData: {
|
|
13122
|
-
// prog_id: _paramsP.prog_id,
|
|
13123
|
-
// nodeid: nodeP.id,
|
|
13124
|
-
// ui_type: nodeP.tagName,
|
|
13125
|
-
// xu_id: xu_id,
|
|
13126
|
-
// recordid: currentRecordId,
|
|
13127
|
-
// paramsP: _paramsP,
|
|
13128
|
-
// key: keyP,
|
|
13129
|
-
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
13130
|
-
// screenId: _paramsP.screenId,
|
|
13131
|
-
// parent_container: $container?.attr("id"),
|
|
13132
|
-
// elem_key,
|
|
13133
|
-
// ui_id,
|
|
13134
|
-
// properties: prop,
|
|
13135
|
-
// node: nodeP,
|
|
13136
|
-
// node_org: _.cloneDeep(nodeP),
|
|
13137
|
-
// is_panelP: _paramsP.is_panelP,
|
|
13138
|
-
|
|
13139
|
-
// elem_prop: elem_propP,
|
|
13140
|
-
// debug_info: {
|
|
13141
|
-
// id: nodeP.id,
|
|
13142
|
-
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
13143
|
-
// items: items,
|
|
13144
|
-
// },
|
|
13145
|
-
// parent_node: parent_nodeP,
|
|
13146
|
-
// currentRecordId: currentRecordId,
|
|
13147
|
-
// $root_container: $root_container,
|
|
13148
|
-
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
13149
|
-
// },
|
|
13150
|
-
// xuAttributes: {},
|
|
13151
|
-
// })
|
|
13152
|
-
|
|
13153
|
-
// if (div_typeP === "svg") {
|
|
13154
|
-
// $div.removeAttr("xu-ui-id")
|
|
13155
|
-
// }
|
|
13156
13025
|
if (div_typeP !== 'svg') {
|
|
13157
13026
|
$div.appendTo($appendTo);
|
|
13158
13027
|
}
|
|
@@ -13715,20 +13584,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13715
13584
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
13716
13585
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
13717
13586
|
await set_call_screen_properties_values(page);
|
|
13718
|
-
await page.create(
|
|
13719
|
-
|
|
13720
|
-
// SESSION_ID,
|
|
13721
|
-
// paramsP.dsSessionP,
|
|
13722
|
-
// nav,
|
|
13723
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13724
|
-
);
|
|
13725
|
-
await page.init(
|
|
13726
|
-
params,
|
|
13727
|
-
// SESSION_ID,
|
|
13728
|
-
// paramsP.dsSessionP,
|
|
13729
|
-
// nav,
|
|
13730
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
13731
|
-
);
|
|
13587
|
+
await page.create(params);
|
|
13588
|
+
await page.init(params);
|
|
13732
13589
|
nav.push(component_name, { params });
|
|
13733
13590
|
} else {
|
|
13734
13591
|
debugger;
|
|
@@ -13964,20 +13821,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
13964
13821
|
} catch (err) {
|
|
13965
13822
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
13966
13823
|
}
|
|
13967
|
-
|
|
13968
|
-
// glb.lifecycle.plugins[plugin_name] = {
|
|
13969
|
-
// plugin_script: fx,
|
|
13970
|
-
// setup_data: plugin_setup_ret.data,
|
|
13971
|
-
// fields,
|
|
13972
|
-
// params,
|
|
13973
|
-
// };
|
|
13974
|
-
|
|
13975
|
-
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
13976
|
-
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
13977
|
-
|
|
13978
|
-
// } catch (err) {
|
|
13979
|
-
// report_error(err);
|
|
13980
|
-
// }
|
|
13981
13824
|
}
|
|
13982
13825
|
return $div;
|
|
13983
13826
|
},
|
|
@@ -14021,107 +13864,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14021
13864
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
14022
13865
|
});
|
|
14023
13866
|
|
|
14024
|
-
// var $div_content = $div.children();
|
|
14025
|
-
|
|
14026
|
-
// $.each($div_content, function (key, val) {
|
|
14027
|
-
// $(val).data().xuData.parent_container =
|
|
14028
|
-
// $div.data().xuData.parent_container;
|
|
14029
|
-
// });
|
|
14030
|
-
|
|
14031
13867
|
return await render_screen_type($div);
|
|
14032
|
-
|
|
14033
|
-
// if (paramsP.is_mobile_modal) {
|
|
14034
|
-
// return await open_modal($div);
|
|
14035
|
-
// }
|
|
14036
|
-
// if (paramsP.is_mobile_popover) {
|
|
14037
|
-
// open_popover($div);
|
|
14038
|
-
// func.UI.utils.screen_blocker(
|
|
14039
|
-
// false,
|
|
14040
|
-
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
14041
|
-
// );
|
|
14042
|
-
// return;
|
|
14043
|
-
// }
|
|
14044
|
-
|
|
14045
|
-
// if (paramsP.is_mobile_page) {
|
|
14046
|
-
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14047
|
-
// const nav = $nav[0];
|
|
14048
|
-
|
|
14049
|
-
// var params = {
|
|
14050
|
-
// div: $div_content,
|
|
14051
|
-
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
14052
|
-
// screenId: paramsP.screenId,
|
|
14053
|
-
// $container: $container,
|
|
14054
|
-
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
14055
|
-
// dsSession: paramsP.dsSessionP,
|
|
14056
|
-
// };
|
|
14057
|
-
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
14058
|
-
// if (!$(nav).data().xuData.nav_params) {
|
|
14059
|
-
// $(nav).data().xuData.nav_params = {};
|
|
14060
|
-
// }
|
|
14061
|
-
|
|
14062
|
-
// //restore validate
|
|
14063
|
-
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
14064
|
-
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
14065
|
-
// .data()
|
|
14066
|
-
// .xuData.params[
|
|
14067
|
-
// paramsP.dsSessionP
|
|
14068
|
-
// ].$container.data().xuData.validate_screen_ready;
|
|
14069
|
-
// }
|
|
14070
|
-
|
|
14071
|
-
// if (!$(nav)?.data()?.xuData) return;
|
|
14072
|
-
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
14073
|
-
// if (!$(component_name).length) {
|
|
14074
|
-
// await func.UI.component.create_app_page_component(
|
|
14075
|
-
// SESSION_ID,
|
|
14076
|
-
// paramsP.dsSessionP
|
|
14077
|
-
// );
|
|
14078
|
-
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
14079
|
-
// await page.create(
|
|
14080
|
-
// SESSION_ID,
|
|
14081
|
-
// paramsP.dsSessionP,
|
|
14082
|
-
// nav,
|
|
14083
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14084
|
-
// );
|
|
14085
|
-
// await page.init(
|
|
14086
|
-
// SESSION_ID,
|
|
14087
|
-
// paramsP.dsSessionP,
|
|
14088
|
-
// nav,
|
|
14089
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
14090
|
-
// );
|
|
14091
|
-
// nav.push(component_name, { params });
|
|
14092
|
-
// } else {
|
|
14093
|
-
// debugger;
|
|
14094
|
-
// $(component_name).empty();
|
|
14095
|
-
|
|
14096
|
-
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
14097
|
-
// }
|
|
14098
|
-
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
14099
|
-
|
|
14100
|
-
// return $div;
|
|
14101
|
-
// }
|
|
14102
|
-
|
|
14103
|
-
// if (
|
|
14104
|
-
// !paramsP.is_mobile_page &&
|
|
14105
|
-
// !paramsP.is_mobile_modal &&
|
|
14106
|
-
// !paramsP.is_mobile_popover &&
|
|
14107
|
-
// !paramsP.is_panelP
|
|
14108
|
-
// ) {
|
|
14109
|
-
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
14110
|
-
// if ($nav && $nav.length) {
|
|
14111
|
-
// // refresh made
|
|
14112
|
-
// } else {
|
|
14113
|
-
// $nav = $("<xu-nav>");
|
|
14114
|
-
// $container.append($nav);
|
|
14115
|
-
// func.UI.component.init_xu_nav($container, $nav);
|
|
14116
|
-
// }
|
|
14117
|
-
|
|
14118
|
-
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
14119
|
-
|
|
14120
|
-
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
14121
|
-
// } else {
|
|
14122
|
-
// $container.append($div_content);
|
|
14123
|
-
// }
|
|
14124
|
-
// return $container;
|
|
14125
13868
|
},
|
|
14126
13869
|
[`xu-multi-view`]: async function () {
|
|
14127
13870
|
var $div = $container;
|
|
@@ -14157,41 +13900,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14157
13900
|
return $div;
|
|
14158
13901
|
};
|
|
14159
13902
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
14160
|
-
// var $div_content = $div.children();
|
|
14161
|
-
|
|
14162
|
-
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
14163
|
-
// $.each($div.data().xuData, function (key, val) {
|
|
14164
|
-
// $container.data().xuData[key] = val;
|
|
14165
|
-
// });
|
|
14166
|
-
// $.each($div.data().xuAttributes, function (key, val) {
|
|
14167
|
-
// $container.data().xuAttributes[key] = val;
|
|
14168
|
-
// });
|
|
14169
|
-
|
|
14170
|
-
// if (!$container.data().xuData.node) {
|
|
14171
|
-
// $container.data().xuData.node = {};
|
|
14172
|
-
// }
|
|
14173
|
-
|
|
14174
|
-
// $container.data().xuData.node.children = [];
|
|
14175
|
-
|
|
14176
|
-
// $.each($div_content, function (key, val) {
|
|
14177
|
-
// if (!$(val)?.data()?.xuData) return;
|
|
14178
|
-
// if (
|
|
14179
|
-
// continuous_idx === null ||
|
|
14180
|
-
// (continuous_idx && key > continuous_idx)
|
|
14181
|
-
// ) {
|
|
14182
|
-
// $(val).data().xuData.parent_container =
|
|
14183
|
-
// $div.data().xuData.parent_container;
|
|
14184
|
-
// $container
|
|
14185
|
-
// .data()
|
|
14186
|
-
// .xuData.node.children.push($(val).data().xuData.node);
|
|
14187
|
-
// }
|
|
14188
|
-
// });
|
|
14189
|
-
// }
|
|
14190
13903
|
|
|
14191
|
-
// if (continuous_idx !== null) {
|
|
14192
|
-
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
14193
|
-
// return;
|
|
14194
|
-
// }
|
|
14195
13904
|
return await render_screen_type($div);
|
|
14196
13905
|
};
|
|
14197
13906
|
|
|
@@ -14225,38 +13934,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14225
13934
|
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);
|
|
14226
13935
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
14227
13936
|
return await done(null);
|
|
14228
|
-
|
|
14229
|
-
// var text = "";
|
|
14230
|
-
// if (prop?.app_empty_result_text !== "undefined") {
|
|
14231
|
-
// text = prop.app_empty_result_text;
|
|
14232
|
-
// }
|
|
14233
|
-
// if (
|
|
14234
|
-
// prop.app_empty_result_text_EXP &&
|
|
14235
|
-
// prop.app_empty_result_text_EXP !== "undefined"
|
|
14236
|
-
// ) {
|
|
14237
|
-
// let exp = prop.app_empty_result_text_EXP;
|
|
14238
|
-
// if (exp && exp !== "undefined") {
|
|
14239
|
-
// var res = func.expression.get(
|
|
14240
|
-
// SESSION_ID,
|
|
14241
|
-
// exp,
|
|
14242
|
-
// paramsP.dsSessionP,
|
|
14243
|
-
// "app_empty_result_text_EXP",
|
|
14244
|
-
// _ds.currentRecordId
|
|
14245
|
-
// );
|
|
14246
|
-
// text = res.result;
|
|
14247
|
-
// }
|
|
14248
|
-
// }
|
|
14249
|
-
// if (icon || text) {
|
|
14250
|
-
// $container.append(
|
|
14251
|
-
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
14252
|
-
// );
|
|
14253
|
-
// }
|
|
14254
|
-
// await func.events.validate(
|
|
14255
|
-
// SESSION_ID,
|
|
14256
|
-
// "record_not_found",
|
|
14257
|
-
// paramsP.dsSessionP
|
|
14258
|
-
// );
|
|
14259
|
-
// return await done(null);
|
|
14260
13937
|
};
|
|
14261
13938
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
14262
13939
|
|
|
@@ -14269,25 +13946,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14269
13946
|
var i = 0;
|
|
14270
13947
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
14271
13948
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
14272
|
-
|
|
14273
|
-
// if (
|
|
14274
|
-
// continuous_idx === null &&
|
|
14275
|
-
// prop.app_items_per_page &&
|
|
14276
|
-
// i >= Number(prop.app_items_per_page)
|
|
14277
|
-
// ) {
|
|
14278
|
-
// continuous_idx = i;
|
|
14279
|
-
// await done(null);
|
|
14280
|
-
|
|
14281
|
-
// setTimeout(async function () {
|
|
14282
|
-
// await run_item(continuous_idx);
|
|
14283
|
-
// if (!glb.CURRENT_APP_LOADING) {
|
|
14284
|
-
// glb.CURRENT_APP_LOADING = 1;
|
|
14285
|
-
// } // deactivate loader
|
|
14286
|
-
// }, 1000);
|
|
14287
|
-
|
|
14288
|
-
// continue;
|
|
14289
|
-
// }
|
|
14290
|
-
////////
|
|
13949
|
+
|
|
14291
13950
|
_ds.currentRecordId = val._ROWID;
|
|
14292
13951
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
14293
13952
|
|
|
@@ -14339,46 +13998,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
14339
13998
|
};
|
|
14340
13999
|
if (!element || element === 'script') return await done();
|
|
14341
14000
|
let str = '';
|
|
14342
|
-
// var $div
|
|
14343
|
-
// const draw_svg = function () {
|
|
14344
|
-
// const get_tag_str = function (element, prop, val) {
|
|
14345
|
-
// let class_str = "";
|
|
14346
|
-
// let attr_str = "";
|
|
14347
|
-
// for (const [key, val] of Object.entries(prop)) {
|
|
14348
|
-
// if (key.substr(0, 2) !== "xu") {
|
|
14349
|
-
// attr_str += ` ${key}="${val}" `;
|
|
14350
|
-
// }
|
|
14351
|
-
// }
|
|
14352
|
-
// if (element === "svg") {
|
|
14353
|
-
// return `<${element} ${attr_str} > `;
|
|
14354
|
-
// }
|
|
14355
|
-
// let ret = "";
|
|
14356
|
-
// if (val?.children?.length) {
|
|
14357
|
-
// ret = iterate_svg(val);
|
|
14358
|
-
// }
|
|
14359
|
-
|
|
14360
|
-
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
14361
|
-
// };
|
|
14362
|
-
// let svg_str = get_tag_str(element, prop);
|
|
14363
|
-
// let inner_str = "";
|
|
14364
|
-
// const iterate_svg = function (node) {
|
|
14365
|
-
// let ret = "";
|
|
14366
|
-
// if (node.children) {
|
|
14367
|
-
// for (let val of node.children) {
|
|
14368
|
-
// let prop = val.attributes;
|
|
14369
|
-
// ret += get_tag_str(val.tagName, prop, val);
|
|
14370
|
-
// }
|
|
14371
|
-
// }
|
|
14372
|
-
// return ret;
|
|
14373
|
-
// };
|
|
14374
|
-
// inner_str = iterate_svg(nodeP);
|
|
14375
|
-
|
|
14376
|
-
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
14377
|
-
// };
|
|
14378
|
-
// if (element === "svg") {
|
|
14379
|
-
// draw_svg();
|
|
14380
|
-
// // return await done();
|
|
14381
|
-
// }
|
|
14382
14001
|
|
|
14383
14002
|
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);
|
|
14384
14003
|
|