@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
|
@@ -27809,62 +27809,6 @@ func.UI.utils.get_panels_from_dom = function (SESSION_ID, ignore_disableAutoRefr
|
|
|
27809
27809
|
func.UI.worker = {};
|
|
27810
27810
|
func.UI.worker.ID = null;
|
|
27811
27811
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
27812
|
-
// var _session = SESSION_OBJ[SESSION_ID];
|
|
27813
|
-
|
|
27814
|
-
// function getWorkerURL(url) {
|
|
27815
|
-
// const content = `importScripts( "${url}" );`;
|
|
27816
|
-
// return URL.createObjectURL(
|
|
27817
|
-
// new Blob([content], { type: "text/javascript" })
|
|
27818
|
-
// );
|
|
27819
|
-
// }
|
|
27820
|
-
|
|
27821
|
-
// let blob = getWorkerURL(
|
|
27822
|
-
// func.common.get_url(
|
|
27823
|
-
// SESSION_ID,
|
|
27824
|
-
// "dist",
|
|
27825
|
-
// func.utils.get_resource_filename(
|
|
27826
|
-
// _session.engine_mode === "live_preview"
|
|
27827
|
-
// ? ""
|
|
27828
|
-
// : _session?.opt?.app_build_id,
|
|
27829
|
-
// "runtime/js/xuda_UI_worker.js"
|
|
27830
|
-
// )
|
|
27831
|
-
// )
|
|
27832
|
-
// );
|
|
27833
|
-
|
|
27834
|
-
// func.UI.worker.ID = new Worker(blob, {
|
|
27835
|
-
// name: "xuda UI worker ",
|
|
27836
|
-
// });
|
|
27837
|
-
|
|
27838
|
-
// func.UI.worker.ID.postMessage({ method: "init" });
|
|
27839
|
-
|
|
27840
|
-
// func.UI.worker.ID.addEventListener(
|
|
27841
|
-
// "message",
|
|
27842
|
-
// function (e) {
|
|
27843
|
-
// if (e.data.dsSessionP && !_session.DS_GLB[e.data.dsSessionP]) {
|
|
27844
|
-
// func.UI.worker.delete_job(e.data.job_num);
|
|
27845
|
-
// }
|
|
27846
|
-
|
|
27847
|
-
// let queue_obj = e.data;
|
|
27848
|
-
|
|
27849
|
-
// queue_obj.elementP = $(`[xu-ui-id=${queue_obj.xu_ui_id}]`);
|
|
27850
|
-
|
|
27851
|
-
// if (queue_obj?.paramsP?.elem_val?.elm_xu_ui_id) {
|
|
27852
|
-
// queue_obj.paramsP.elem_val.$elm = $(
|
|
27853
|
-
// `[xu-ui-id=${queue_obj.paramsP.elem_val.elm_xu_ui_id}]`
|
|
27854
|
-
// );
|
|
27855
|
-
// }
|
|
27856
|
-
|
|
27857
|
-
// func.UI.worker.execute(SESSION_ID, queue_obj);
|
|
27858
|
-
// },
|
|
27859
|
-
// false
|
|
27860
|
-
// );
|
|
27861
|
-
|
|
27862
|
-
// setInterval(async function () {
|
|
27863
|
-
// func.UI.garbage_collector();
|
|
27864
|
-
// }, 10000);
|
|
27865
|
-
|
|
27866
|
-
// return;
|
|
27867
|
-
|
|
27868
27812
|
$.fn.isInViewport = function () {
|
|
27869
27813
|
var elementTop = $(this).offset().top;
|
|
27870
27814
|
var elementBottom = elementTop + $(this).outerHeight();
|
|
@@ -27921,8 +27865,12 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
27921
27865
|
this._interval = setInterval(job_iterator, 1);
|
|
27922
27866
|
|
|
27923
27867
|
setInterval(async function () {
|
|
27924
|
-
func.UI.
|
|
27868
|
+
func.UI.ds_garbage_collector();
|
|
27925
27869
|
}, 10000);
|
|
27870
|
+
|
|
27871
|
+
setInterval(async function () {
|
|
27872
|
+
func.UI.refs_garbage_collector();
|
|
27873
|
+
}, 1000);
|
|
27926
27874
|
};
|
|
27927
27875
|
func.UI.worker.add_to_queue = async function (SESSION_ID, source, functionP, paramsP, calling_job, elementP, dsSession, calling_trigger_prop) {
|
|
27928
27876
|
// try {
|
|
@@ -28200,20 +28148,13 @@ func.UI.worker.find_job_index = function (SESSION_ID, jobNoP) {
|
|
|
28200
28148
|
return ret;
|
|
28201
28149
|
};
|
|
28202
28150
|
|
|
28203
|
-
func.UI.
|
|
28204
|
-
// return;
|
|
28151
|
+
func.UI.ds_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0], re_check) {
|
|
28205
28152
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
28206
28153
|
|
|
28207
28154
|
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
28208
28155
|
if (_data_system?.SYS_GLOBAL_BOL_AJAX_BUSY) return;
|
|
28209
28156
|
if (!_data_system?.SYS_GLOBAL_BOL_IDLE) return;
|
|
28210
28157
|
|
|
28211
|
-
for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
28212
|
-
if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
28213
|
-
delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
28214
|
-
}
|
|
28215
|
-
}
|
|
28216
|
-
|
|
28217
28158
|
let abort;
|
|
28218
28159
|
|
|
28219
28160
|
for (const [dsP, _ds] of Object.entries(_session.DS_GLB)) {
|
|
@@ -28259,6 +28200,16 @@ func.UI.garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0],
|
|
|
28259
28200
|
for (const val of ds_pending_to_delete) {
|
|
28260
28201
|
func.datasource.del(SESSION_ID, val);
|
|
28261
28202
|
}
|
|
28203
|
+
};
|
|
28204
|
+
func.UI.refs_garbage_collector = function (SESSION_ID = Object.keys(SESSION_OBJ)[0]) {
|
|
28205
|
+
let _session = SESSION_OBJ[SESSION_ID];
|
|
28206
|
+
const _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
28207
|
+
|
|
28208
|
+
for (const [key, val] of Object.entries(_data_system?.SYS_GLOBAL_OBJ_REFS || {})) {
|
|
28209
|
+
if (!$(`[xu-ui-id='${val?.$el.attr('xu-ui-id')}'`)?.length) {
|
|
28210
|
+
delete _data_system.SYS_GLOBAL_OBJ_REFS[key];
|
|
28211
|
+
}
|
|
28212
|
+
}
|
|
28262
28213
|
};
|
|
28263
28214
|
func.datasource = {};
|
|
28264
28215
|
func.datasource.create = async function (
|
|
@@ -31989,16 +31940,19 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31989
31940
|
|
|
31990
31941
|
const common_fx = {
|
|
31991
31942
|
'xu-ref': async function ($elm, val) {
|
|
31992
|
-
// console.log('xu-ref', $elm, val);
|
|
31993
31943
|
const _session = SESSION_OBJ[SESSION_ID];
|
|
31994
31944
|
let _ds_0 = _session.DS_GLB[0];
|
|
31995
|
-
|
|
31996
|
-
// _ds_0.data_system['SYS_GLOBAL_OBJ_REFS'] = {};
|
|
31997
|
-
// }
|
|
31998
|
-
// if (!_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val]) {
|
|
31945
|
+
|
|
31999
31946
|
const _ds = _session.DS_GLB[paramsP.dsSessionP];
|
|
32000
|
-
|
|
32001
|
-
|
|
31947
|
+
|
|
31948
|
+
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
31949
|
+
const data = _ds?.data_feed?.rows?.[row_idx] || {};
|
|
31950
|
+
|
|
31951
|
+
const props = _ds.in_parameters || {};
|
|
31952
|
+
const attributes = $elm?.data()?.xuData?.properties || {};
|
|
31953
|
+
|
|
31954
|
+
_ds_0.data_system['SYS_GLOBAL_OBJ_REFS'][val.value] = { $el: $elm, ds: _ds, data, attributes, props };
|
|
31955
|
+
|
|
32002
31956
|
return {};
|
|
32003
31957
|
},
|
|
32004
31958
|
'xu-bind': async function ($elm, val) {
|
|
@@ -32331,14 +32285,12 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32331
32285
|
if (!custom_iterator_key) {
|
|
32332
32286
|
is_key_dynamic_field = true;
|
|
32333
32287
|
|
|
32334
|
-
// iterator_key = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_KEY";
|
|
32335
32288
|
iterator_key = '_FOR_KEY';
|
|
32336
32289
|
}
|
|
32337
32290
|
|
|
32338
32291
|
if (!custom_iterator_val) {
|
|
32339
32292
|
is_val_dynamic_field = true;
|
|
32340
32293
|
|
|
32341
|
-
// iterator_val = $elm.data().xuData.node_org.id.replaceAll("-", "_") + "_FOR_VAL";
|
|
32342
32294
|
iterator_val = '_FOR_VAL';
|
|
32343
32295
|
}
|
|
32344
32296
|
|
|
@@ -32385,13 +32337,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32385
32337
|
};
|
|
32386
32338
|
let _parent_info = _.cloneDeep(parent_infoP) || {};
|
|
32387
32339
|
_parent_info.iterate_info = iterate_info;
|
|
32388
|
-
|
|
32389
|
-
// _parent_info = iterate_info;
|
|
32390
|
-
// } else {
|
|
32391
|
-
// _parent_info = {
|
|
32392
|
-
// iterate_info,
|
|
32393
|
-
// };
|
|
32394
|
-
// }
|
|
32340
|
+
|
|
32395
32341
|
const $divP = await func.UI.screen.render_ui_tree(
|
|
32396
32342
|
SESSION_ID,
|
|
32397
32343
|
$container,
|
|
@@ -32457,13 +32403,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
32457
32403
|
},
|
|
32458
32404
|
'xu-exp': async function ($elm, val) {
|
|
32459
32405
|
let exp = val.value === null ? true : val.value;
|
|
32460
|
-
// if (val.value.includes("@_FOR_KEY")) {
|
|
32461
|
-
// exp = exp.replaceAll("@_FOR_KEY", "@" + $elm.data().xuData.iterate_info.iterator_key);
|
|
32462
|
-
// }
|
|
32463
|
-
|
|
32464
|
-
// if (val.value.includes("@_FOR_VAL")) {
|
|
32465
|
-
// exp = exp.replaceAll("@_FOR_VAL", "@" + $elm.data().xuData.iterate_info.iterator_val);
|
|
32466
|
-
// }
|
|
32467
32406
|
|
|
32468
32407
|
let exp_ret = await func.expression.get(SESSION_ID, exp, paramsP.dsSessionP, 'UI Attr EXP', SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP].currentRecordId);
|
|
32469
32408
|
|
|
@@ -32872,10 +32811,6 @@ func.UI.screen.set_attributes_new = async function (SESSION_ID, is_skeleton, $ro
|
|
|
32872
32811
|
_ret = _.assignIn(_ret, ret);
|
|
32873
32812
|
}
|
|
32874
32813
|
|
|
32875
|
-
// if (nodeP.tagName === "svg") {
|
|
32876
|
-
// console.log(svg_attributes_str);
|
|
32877
|
-
// }
|
|
32878
|
-
|
|
32879
32814
|
// EXP for
|
|
32880
32815
|
|
|
32881
32816
|
for await (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
@@ -32984,20 +32919,6 @@ func.UI.screen.panel_post_render_handler = async function (
|
|
|
32984
32919
|
if ($old_panel_div?.length) {
|
|
32985
32920
|
$($old_panel_div[0]).after($wrapper.children());
|
|
32986
32921
|
} else {
|
|
32987
|
-
// $container.append($wrapper.children());
|
|
32988
|
-
|
|
32989
|
-
// find existing xurender
|
|
32990
|
-
// $.each($wrapper.children(), function (key, val) {
|
|
32991
|
-
// console.log(">", `[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
32992
|
-
// const $elm = $container.find(`[xu-ui-id=${$(val).attr("xu-ui-id")}]`);
|
|
32993
|
-
// if (
|
|
32994
|
-
// // $(val).data().xuData.key_path === cloned_$div.data().xuData.key_path
|
|
32995
|
-
// $elm.length
|
|
32996
|
-
// ) {
|
|
32997
|
-
// $elm.remove();
|
|
32998
|
-
// }
|
|
32999
|
-
// $container.append($(val));
|
|
33000
|
-
// });
|
|
33001
32922
|
$.each($wrapper.children(), function (key, child) {
|
|
33002
32923
|
$.each($container.children(), function (key, elm) {
|
|
33003
32924
|
if ($(elm).data().xuData.elem_key === $(child).data().xuData.elem_key) {
|
|
@@ -33125,59 +33046,7 @@ func.UI.screen.create_container = function (SESSION_ID, $root_container, nodeP,
|
|
|
33125
33046
|
},
|
|
33126
33047
|
xuAttributes: {},
|
|
33127
33048
|
});
|
|
33128
|
-
// }
|
|
33129
|
-
|
|
33130
|
-
// $div.appendTo($appendTo);
|
|
33131
|
-
|
|
33132
|
-
////////////////////////
|
|
33133
|
-
|
|
33134
|
-
// let svg_attributes_str = ""
|
|
33135
|
-
// if (div_typeP === "svg") {
|
|
33136
|
-
// for (const [key, val] of Object.entries(nodeP.attributes)) {
|
|
33137
|
-
// svg_attributes_str += `${key}="${val}" `
|
|
33138
|
-
// }
|
|
33139
|
-
// }
|
|
33140
33049
|
|
|
33141
|
-
// var $div =
|
|
33142
|
-
// // $(`<${div} ${attr_str ? attr_str : ""} ${svg_attributes_str}>`)
|
|
33143
|
-
// $(`<${div} ${attr_str ? attr_str : ""}>`)
|
|
33144
|
-
// .attr("xu-ui-id", ui_id)
|
|
33145
|
-
// .data({
|
|
33146
|
-
// xuData: {
|
|
33147
|
-
// prog_id: _paramsP.prog_id,
|
|
33148
|
-
// nodeid: nodeP.id,
|
|
33149
|
-
// ui_type: nodeP.tagName,
|
|
33150
|
-
// xu_id: xu_id,
|
|
33151
|
-
// recordid: currentRecordId,
|
|
33152
|
-
// paramsP: _paramsP,
|
|
33153
|
-
// key: keyP,
|
|
33154
|
-
// key_path, //:($container?.data()?.xuData?.key || "0") + "-" + (keyP || "0"),
|
|
33155
|
-
// screenId: _paramsP.screenId,
|
|
33156
|
-
// parent_container: $container?.attr("id"),
|
|
33157
|
-
// elem_key,
|
|
33158
|
-
// ui_id,
|
|
33159
|
-
// properties: prop,
|
|
33160
|
-
// node: nodeP,
|
|
33161
|
-
// node_org: _.cloneDeep(nodeP),
|
|
33162
|
-
// is_panelP: _paramsP.is_panelP,
|
|
33163
|
-
|
|
33164
|
-
// elem_prop: elem_propP,
|
|
33165
|
-
// debug_info: {
|
|
33166
|
-
// id: nodeP.id,
|
|
33167
|
-
// parent_id: $container?.data()?.xuData?.ui_id,
|
|
33168
|
-
// items: items,
|
|
33169
|
-
// },
|
|
33170
|
-
// parent_node: parent_nodeP,
|
|
33171
|
-
// currentRecordId: currentRecordId,
|
|
33172
|
-
// $root_container: $root_container,
|
|
33173
|
-
// parent_element_ui_id: $container?.data()?.xuData?.ui_id,
|
|
33174
|
-
// },
|
|
33175
|
-
// xuAttributes: {},
|
|
33176
|
-
// })
|
|
33177
|
-
|
|
33178
|
-
// if (div_typeP === "svg") {
|
|
33179
|
-
// $div.removeAttr("xu-ui-id")
|
|
33180
|
-
// }
|
|
33181
33050
|
if (div_typeP !== 'svg') {
|
|
33182
33051
|
$div.appendTo($appendTo);
|
|
33183
33052
|
}
|
|
@@ -33740,20 +33609,8 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33740
33609
|
await func.UI.component.create_app_page_component(SESSION_ID, paramsP.dsSessionP);
|
|
33741
33610
|
const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
33742
33611
|
await set_call_screen_properties_values(page);
|
|
33743
|
-
await page.create(
|
|
33744
|
-
|
|
33745
|
-
// SESSION_ID,
|
|
33746
|
-
// paramsP.dsSessionP,
|
|
33747
|
-
// nav,
|
|
33748
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
33749
|
-
);
|
|
33750
|
-
await page.init(
|
|
33751
|
-
params,
|
|
33752
|
-
// SESSION_ID,
|
|
33753
|
-
// paramsP.dsSessionP,
|
|
33754
|
-
// nav,
|
|
33755
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
33756
|
-
);
|
|
33612
|
+
await page.create(params);
|
|
33613
|
+
await page.init(params);
|
|
33757
33614
|
nav.push(component_name, { params });
|
|
33758
33615
|
} else {
|
|
33759
33616
|
debugger;
|
|
@@ -33989,20 +33846,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
33989
33846
|
} catch (err) {
|
|
33990
33847
|
func.utils.debug_report(SESSION_ID, `${plugin_name} widget`, err.message, 'E');
|
|
33991
33848
|
}
|
|
33992
|
-
|
|
33993
|
-
// glb.lifecycle.plugins[plugin_name] = {
|
|
33994
|
-
// plugin_script: fx,
|
|
33995
|
-
// setup_data: plugin_setup_ret.data,
|
|
33996
|
-
// fields,
|
|
33997
|
-
// params,
|
|
33998
|
-
// };
|
|
33999
|
-
|
|
34000
|
-
// await glb.lifecycle.execute(SESSION_ID, "initialized");
|
|
34001
|
-
// await glb.lifecycle.execute(SESSION_ID, method);
|
|
34002
|
-
|
|
34003
|
-
// } catch (err) {
|
|
34004
|
-
// report_error(err);
|
|
34005
|
-
// }
|
|
34006
33849
|
}
|
|
34007
33850
|
return $div;
|
|
34008
33851
|
},
|
|
@@ -34046,107 +33889,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34046
33889
|
$container.data().xuAttributes[key] = _.cloneDeep(val);
|
|
34047
33890
|
});
|
|
34048
33891
|
|
|
34049
|
-
// var $div_content = $div.children();
|
|
34050
|
-
|
|
34051
|
-
// $.each($div_content, function (key, val) {
|
|
34052
|
-
// $(val).data().xuData.parent_container =
|
|
34053
|
-
// $div.data().xuData.parent_container;
|
|
34054
|
-
// });
|
|
34055
|
-
|
|
34056
33892
|
return await render_screen_type($div);
|
|
34057
|
-
|
|
34058
|
-
// if (paramsP.is_mobile_modal) {
|
|
34059
|
-
// return await open_modal($div);
|
|
34060
|
-
// }
|
|
34061
|
-
// if (paramsP.is_mobile_popover) {
|
|
34062
|
-
// open_popover($div);
|
|
34063
|
-
// func.UI.utils.screen_blocker(
|
|
34064
|
-
// false,
|
|
34065
|
-
// paramsP.prog_id + "_" + paramsP.sourceScreenP
|
|
34066
|
-
// );
|
|
34067
|
-
// return;
|
|
34068
|
-
// }
|
|
34069
|
-
|
|
34070
|
-
// if (paramsP.is_mobile_page) {
|
|
34071
|
-
// const $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
34072
|
-
// const nav = $nav[0];
|
|
34073
|
-
|
|
34074
|
-
// var params = {
|
|
34075
|
-
// div: $div_content,
|
|
34076
|
-
// name: paramsP.screenInfo.properties?.menuTitle,
|
|
34077
|
-
// screenId: paramsP.screenId,
|
|
34078
|
-
// $container: $container,
|
|
34079
|
-
// // icon: $div.data().xuData.paramsP.screenInfo.rICN,
|
|
34080
|
-
// dsSession: paramsP.dsSessionP,
|
|
34081
|
-
// };
|
|
34082
|
-
// var component_name = "xu-page-component-" + paramsP.dsSessionP;
|
|
34083
|
-
// if (!$(nav).data().xuData.nav_params) {
|
|
34084
|
-
// $(nav).data().xuData.nav_params = {};
|
|
34085
|
-
// }
|
|
34086
|
-
|
|
34087
|
-
// //restore validate
|
|
34088
|
-
// if ($(nav)?.data()?.xuData?.params?.[paramsP.dsSessionP]) {
|
|
34089
|
-
// params.$container.data().xuData.validate_screen_ready = $(nav)
|
|
34090
|
-
// .data()
|
|
34091
|
-
// .xuData.params[
|
|
34092
|
-
// paramsP.dsSessionP
|
|
34093
|
-
// ].$container.data().xuData.validate_screen_ready;
|
|
34094
|
-
// }
|
|
34095
|
-
|
|
34096
|
-
// if (!$(nav)?.data()?.xuData) return;
|
|
34097
|
-
// $(nav).data().xuData.nav_params[paramsP.dsSessionP] = params;
|
|
34098
|
-
// if (!$(component_name).length) {
|
|
34099
|
-
// await func.UI.component.create_app_page_component(
|
|
34100
|
-
// SESSION_ID,
|
|
34101
|
-
// paramsP.dsSessionP
|
|
34102
|
-
// );
|
|
34103
|
-
// const page = new UI_FRAMEWORK_PLUGIN.page();
|
|
34104
|
-
// await page.create(
|
|
34105
|
-
// SESSION_ID,
|
|
34106
|
-
// paramsP.dsSessionP,
|
|
34107
|
-
// nav,
|
|
34108
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
34109
|
-
// );
|
|
34110
|
-
// await page.init(
|
|
34111
|
-
// SESSION_ID,
|
|
34112
|
-
// paramsP.dsSessionP,
|
|
34113
|
-
// nav,
|
|
34114
|
-
// $nav.data().xuData.nav_params[paramsP.dsSessionP]
|
|
34115
|
-
// );
|
|
34116
|
-
// nav.push(component_name, { params });
|
|
34117
|
-
// } else {
|
|
34118
|
-
// debugger;
|
|
34119
|
-
// $(component_name).empty();
|
|
34120
|
-
|
|
34121
|
-
// await UI_FRAMEWORK_PLUGIN.page(SESSION_ID, paramsP.dsSessionP);
|
|
34122
|
-
// }
|
|
34123
|
-
// $div.data().xuData.paramsP = $container.data().xuData.paramsP;
|
|
34124
|
-
|
|
34125
|
-
// return $div;
|
|
34126
|
-
// }
|
|
34127
|
-
|
|
34128
|
-
// if (
|
|
34129
|
-
// !paramsP.is_mobile_page &&
|
|
34130
|
-
// !paramsP.is_mobile_modal &&
|
|
34131
|
-
// !paramsP.is_mobile_popover &&
|
|
34132
|
-
// !paramsP.is_panelP
|
|
34133
|
-
// ) {
|
|
34134
|
-
// var $nav = $(SESSION_OBJ[SESSION_ID].root_element).find("xu-nav");
|
|
34135
|
-
// if ($nav && $nav.length) {
|
|
34136
|
-
// // refresh made
|
|
34137
|
-
// } else {
|
|
34138
|
-
// $nav = $("<xu-nav>");
|
|
34139
|
-
// $container.append($nav);
|
|
34140
|
-
// func.UI.component.init_xu_nav($container, $nav);
|
|
34141
|
-
// }
|
|
34142
|
-
|
|
34143
|
-
// $nav.data().xuData.$div = $div_content; // set data to nav to use in the component
|
|
34144
|
-
|
|
34145
|
-
// await $nav[0].setRoot("xu-root-component-" + SESSION_ID);
|
|
34146
|
-
// } else {
|
|
34147
|
-
// $container.append($div_content);
|
|
34148
|
-
// }
|
|
34149
|
-
// return $container;
|
|
34150
33893
|
},
|
|
34151
33894
|
[`xu-multi-view`]: async function () {
|
|
34152
33895
|
var $div = $container;
|
|
@@ -34182,41 +33925,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34182
33925
|
return $div;
|
|
34183
33926
|
};
|
|
34184
33927
|
await func.UI.screen.set_attributes_new(SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, $container, true);
|
|
34185
|
-
// var $div_content = $div.children();
|
|
34186
|
-
|
|
34187
|
-
// if (continuous_idx !== null || !prop.app_items_per_page) {
|
|
34188
|
-
// $.each($div.data().xuData, function (key, val) {
|
|
34189
|
-
// $container.data().xuData[key] = val;
|
|
34190
|
-
// });
|
|
34191
|
-
// $.each($div.data().xuAttributes, function (key, val) {
|
|
34192
|
-
// $container.data().xuAttributes[key] = val;
|
|
34193
|
-
// });
|
|
34194
|
-
|
|
34195
|
-
// if (!$container.data().xuData.node) {
|
|
34196
|
-
// $container.data().xuData.node = {};
|
|
34197
|
-
// }
|
|
34198
|
-
|
|
34199
|
-
// $container.data().xuData.node.children = [];
|
|
34200
|
-
|
|
34201
|
-
// $.each($div_content, function (key, val) {
|
|
34202
|
-
// if (!$(val)?.data()?.xuData) return;
|
|
34203
|
-
// if (
|
|
34204
|
-
// continuous_idx === null ||
|
|
34205
|
-
// (continuous_idx && key > continuous_idx)
|
|
34206
|
-
// ) {
|
|
34207
|
-
// $(val).data().xuData.parent_container =
|
|
34208
|
-
// $div.data().xuData.parent_container;
|
|
34209
|
-
// $container
|
|
34210
|
-
// .data()
|
|
34211
|
-
// .xuData.node.children.push($(val).data().xuData.node);
|
|
34212
|
-
// }
|
|
34213
|
-
// });
|
|
34214
|
-
// }
|
|
34215
33928
|
|
|
34216
|
-
// if (continuous_idx !== null) {
|
|
34217
|
-
// if (glb.CURRENT_APP_LOADING === 1) glb.CURRENT_APP_LOADING = 0; // re-activate loader
|
|
34218
|
-
// return;
|
|
34219
|
-
// }
|
|
34220
33929
|
return await render_screen_type($div);
|
|
34221
33930
|
};
|
|
34222
33931
|
|
|
@@ -34250,38 +33959,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34250
33959
|
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);
|
|
34251
33960
|
await func.events.validate(SESSION_ID, 'record_not_found', paramsP.dsSessionP);
|
|
34252
33961
|
return await done(null);
|
|
34253
|
-
|
|
34254
|
-
// var text = "";
|
|
34255
|
-
// if (prop?.app_empty_result_text !== "undefined") {
|
|
34256
|
-
// text = prop.app_empty_result_text;
|
|
34257
|
-
// }
|
|
34258
|
-
// if (
|
|
34259
|
-
// prop.app_empty_result_text_EXP &&
|
|
34260
|
-
// prop.app_empty_result_text_EXP !== "undefined"
|
|
34261
|
-
// ) {
|
|
34262
|
-
// let exp = prop.app_empty_result_text_EXP;
|
|
34263
|
-
// if (exp && exp !== "undefined") {
|
|
34264
|
-
// var res = func.expression.get(
|
|
34265
|
-
// SESSION_ID,
|
|
34266
|
-
// exp,
|
|
34267
|
-
// paramsP.dsSessionP,
|
|
34268
|
-
// "app_empty_result_text_EXP",
|
|
34269
|
-
// _ds.currentRecordId
|
|
34270
|
-
// );
|
|
34271
|
-
// text = res.result;
|
|
34272
|
-
// }
|
|
34273
|
-
// }
|
|
34274
|
-
// if (icon || text) {
|
|
34275
|
-
// $container.append(
|
|
34276
|
-
// `<div style="width: 100%;" >${img}<h6 style="text-align: center;">${text}</h6></div>`
|
|
34277
|
-
// );
|
|
34278
|
-
// }
|
|
34279
|
-
// await func.events.validate(
|
|
34280
|
-
// SESSION_ID,
|
|
34281
|
-
// "record_not_found",
|
|
34282
|
-
// paramsP.dsSessionP
|
|
34283
|
-
// );
|
|
34284
|
-
// return await done(null);
|
|
34285
33962
|
};
|
|
34286
33963
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[paramsP.dsSessionP];
|
|
34287
33964
|
|
|
@@ -34294,25 +33971,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34294
33971
|
var i = 0;
|
|
34295
33972
|
for await (const [key, val] of Object.entries(_ds.data_feed.rows)) {
|
|
34296
33973
|
var node = JSON.parse(JSON.stringify(nodeP));
|
|
34297
|
-
|
|
34298
|
-
// if (
|
|
34299
|
-
// continuous_idx === null &&
|
|
34300
|
-
// prop.app_items_per_page &&
|
|
34301
|
-
// i >= Number(prop.app_items_per_page)
|
|
34302
|
-
// ) {
|
|
34303
|
-
// continuous_idx = i;
|
|
34304
|
-
// await done(null);
|
|
34305
|
-
|
|
34306
|
-
// setTimeout(async function () {
|
|
34307
|
-
// await run_item(continuous_idx);
|
|
34308
|
-
// if (!glb.CURRENT_APP_LOADING) {
|
|
34309
|
-
// glb.CURRENT_APP_LOADING = 1;
|
|
34310
|
-
// } // deactivate loader
|
|
34311
|
-
// }, 1000);
|
|
34312
|
-
|
|
34313
|
-
// continue;
|
|
34314
|
-
// }
|
|
34315
|
-
////////
|
|
33974
|
+
|
|
34316
33975
|
_ds.currentRecordId = val._ROWID;
|
|
34317
33976
|
const ret = await iterate_child($div, node, { continuous_idx }, null, $root_container);
|
|
34318
33977
|
|
|
@@ -34364,46 +34023,6 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
|
|
|
34364
34023
|
};
|
|
34365
34024
|
if (!element || element === 'script') return await done();
|
|
34366
34025
|
let str = '';
|
|
34367
|
-
// var $div
|
|
34368
|
-
// const draw_svg = function () {
|
|
34369
|
-
// const get_tag_str = function (element, prop, val) {
|
|
34370
|
-
// let class_str = "";
|
|
34371
|
-
// let attr_str = "";
|
|
34372
|
-
// for (const [key, val] of Object.entries(prop)) {
|
|
34373
|
-
// if (key.substr(0, 2) !== "xu") {
|
|
34374
|
-
// attr_str += ` ${key}="${val}" `;
|
|
34375
|
-
// }
|
|
34376
|
-
// }
|
|
34377
|
-
// if (element === "svg") {
|
|
34378
|
-
// return `<${element} ${attr_str} > `;
|
|
34379
|
-
// }
|
|
34380
|
-
// let ret = "";
|
|
34381
|
-
// if (val?.children?.length) {
|
|
34382
|
-
// ret = iterate_svg(val);
|
|
34383
|
-
// }
|
|
34384
|
-
|
|
34385
|
-
// return `<${element} ${class_str} ${attr_str} > ${ret} </${element}>`;
|
|
34386
|
-
// };
|
|
34387
|
-
// let svg_str = get_tag_str(element, prop);
|
|
34388
|
-
// let inner_str = "";
|
|
34389
|
-
// const iterate_svg = function (node) {
|
|
34390
|
-
// let ret = "";
|
|
34391
|
-
// if (node.children) {
|
|
34392
|
-
// for (let val of node.children) {
|
|
34393
|
-
// let prop = val.attributes;
|
|
34394
|
-
// ret += get_tag_str(val.tagName, prop, val);
|
|
34395
|
-
// }
|
|
34396
|
-
// }
|
|
34397
|
-
// return ret;
|
|
34398
|
-
// };
|
|
34399
|
-
// inner_str = iterate_svg(nodeP);
|
|
34400
|
-
|
|
34401
|
-
// $div = $(svg_str + inner_str + "</svg>").appendTo($container);
|
|
34402
|
-
// };
|
|
34403
|
-
// if (element === "svg") {
|
|
34404
|
-
// draw_svg();
|
|
34405
|
-
// // return await done();
|
|
34406
|
-
// }
|
|
34407
34026
|
|
|
34408
34027
|
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);
|
|
34409
34028
|
|