@xuda.io/runtime-bundle 1.0.719 → 1.0.720
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 +184 -168
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +181 -165
- package/js/xuda-runtime-slim.min.es.js +181 -165
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +31 -4
- package/js/xuda-worker-bundle.js +31 -4
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -28009,7 +28009,7 @@ func.datasource.create = async function (
|
|
|
28009
28009
|
rowIdP,
|
|
28010
28010
|
jobNoP,
|
|
28011
28011
|
calling_trigger_prop,
|
|
28012
|
-
|
|
28012
|
+
parameters_raw_obj,
|
|
28013
28013
|
NA_isInitP,
|
|
28014
28014
|
NA_callingSourceP,
|
|
28015
28015
|
calling_jobP,
|
|
@@ -28042,6 +28042,7 @@ func.datasource.create = async function (
|
|
|
28042
28042
|
parameters_obj_inP,
|
|
28043
28043
|
static_refreshP,
|
|
28044
28044
|
worker_id,
|
|
28045
|
+
parameters_raw_obj,
|
|
28045
28046
|
};
|
|
28046
28047
|
|
|
28047
28048
|
var IS_DATASOURCE_REFRESH = null;
|
|
@@ -28177,7 +28178,7 @@ func.datasource.create = async function (
|
|
|
28177
28178
|
args.rowIdP,
|
|
28178
28179
|
args.jobNoP,
|
|
28179
28180
|
args.calling_trigger_prop,
|
|
28180
|
-
|
|
28181
|
+
args.parameters_raw_obj,
|
|
28181
28182
|
null,
|
|
28182
28183
|
null,
|
|
28183
28184
|
args.calling_jobP,
|
|
@@ -28218,7 +28219,7 @@ func.datasource.create = async function (
|
|
|
28218
28219
|
return done(SESSION_ID, jsonP.dsSession, true);
|
|
28219
28220
|
});
|
|
28220
28221
|
};
|
|
28221
|
-
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop,
|
|
28222
|
+
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop, parameters_raw_obj, NA_isInitP, callingSourceP, calling_jobP, NA_screen_dsP, is_panelP, parameters_obj_inP, static_refreshP, run_atP, worker_id) {
|
|
28222
28223
|
const set_parameters = async function () {
|
|
28223
28224
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
28224
28225
|
const get_Out_parameters = async function (fieldIdP, located_field_param_idxP, param_row_idP) {
|
|
@@ -28347,6 +28348,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
28347
28348
|
static_refreshP,
|
|
28348
28349
|
run_atP,
|
|
28349
28350
|
worker_id,
|
|
28351
|
+
parameters_raw_obj,
|
|
28350
28352
|
};
|
|
28351
28353
|
|
|
28352
28354
|
var dataSourceSession = null;
|
|
@@ -29265,7 +29267,7 @@ func.datasource.run_events_functions = async function (SESSION_ID, dataSourceSes
|
|
|
29265
29267
|
clearInterval(interval);
|
|
29266
29268
|
resolve(job_num);
|
|
29267
29269
|
}
|
|
29268
|
-
if (i >
|
|
29270
|
+
if (i > 50) {
|
|
29269
29271
|
console.error('deadlock detected');
|
|
29270
29272
|
clearInterval(interval);
|
|
29271
29273
|
resolve(job_num);
|
|
@@ -30003,6 +30005,18 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
30003
30005
|
|
|
30004
30006
|
if (!fields_changed.includes(field_id)) {
|
|
30005
30007
|
fields_changed.push(field_id);
|
|
30008
|
+
|
|
30009
|
+
///// REFRESH PARAMETERS IN
|
|
30010
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
30011
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
30012
|
+
// for (const [key, exp] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
30013
|
+
// if (exp.includes(field_id)) {
|
|
30014
|
+
// let ret = await func.expression.get(SESSION_ID, exp, _dsSession, 'parameters');
|
|
30015
|
+
// _ds.in_parameters[key].value = ret.result;
|
|
30016
|
+
// }
|
|
30017
|
+
// }
|
|
30018
|
+
// }
|
|
30019
|
+
// }
|
|
30006
30020
|
}
|
|
30007
30021
|
if (!datasource_changed.includes(dataSource)) {
|
|
30008
30022
|
datasource_changed.push(dataSource);
|
|
@@ -30049,6 +30063,19 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
30049
30063
|
datasource_changed[0], // refresh the current datasource only
|
|
30050
30064
|
);
|
|
30051
30065
|
}
|
|
30066
|
+
// ///// REFRESH PARAMETERS IN
|
|
30067
|
+
// if (fields_changed.length) {
|
|
30068
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
30069
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
30070
|
+
// for (const [key, val] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
30071
|
+
// if (fields_changed.includes(val)) {
|
|
30072
|
+
// let ret = await func.expression.get(SESSION_ID, '@' + val, _dsSession, 'parameters');
|
|
30073
|
+
// _ds.in_parameters[val].value = ret.result;
|
|
30074
|
+
// }
|
|
30075
|
+
// }
|
|
30076
|
+
// }
|
|
30077
|
+
// }
|
|
30078
|
+
// }
|
|
30052
30079
|
}
|
|
30053
30080
|
resolve();
|
|
30054
30081
|
});
|
|
@@ -30843,7 +30870,7 @@ func.datasource.get_args_property_value = async function (SESSION_ID, dsSession,
|
|
|
30843
30870
|
return _value;
|
|
30844
30871
|
};
|
|
30845
30872
|
func.UI.screen = {};
|
|
30846
|
-
func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callingDataSource_objP, $callingContainerP, triggerIdP, rowIdP, jobNoP, is_panelP, parameters_obj_inP, source_functionP, call_screen_propertiesP, refreshed_ds) {
|
|
30873
|
+
func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callingDataSource_objP, $callingContainerP, triggerIdP, rowIdP, jobNoP, is_panelP, parameters_obj_inP, source_functionP, call_screen_propertiesP, refreshed_ds, parameters_raw_obj) {
|
|
30847
30874
|
if (!prog_id) return console.error('program is empty');
|
|
30848
30875
|
let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
|
|
30849
30876
|
if (!screen_ret) return console.error('program is not a screen object');
|
|
@@ -30896,6 +30923,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
|
|
|
30896
30923
|
screenInfo,
|
|
30897
30924
|
call_screen_propertiesP,
|
|
30898
30925
|
parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
|
|
30926
|
+
parameters_raw_obj,
|
|
30899
30927
|
};
|
|
30900
30928
|
|
|
30901
30929
|
switch (screen_type) {
|
|
@@ -31062,7 +31090,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
|
|
|
31062
31090
|
rowIdP,
|
|
31063
31091
|
jobNoP,
|
|
31064
31092
|
null,
|
|
31065
|
-
|
|
31093
|
+
parameters_raw_obj,
|
|
31066
31094
|
null,
|
|
31067
31095
|
null,
|
|
31068
31096
|
null,
|
|
@@ -31669,212 +31697,200 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
31669
31697
|
}
|
|
31670
31698
|
};
|
|
31671
31699
|
|
|
31672
|
-
|
|
31673
|
-
//
|
|
31674
|
-
|
|
31675
|
-
|
|
31676
|
-
|
|
31677
|
-
|
|
31678
|
-
|
|
31679
|
-
|
|
31700
|
+
func.UI.screen.refresh_screen_old = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
31701
|
+
// check the main program
|
|
31702
|
+
if (fields_changed_datasource) {
|
|
31703
|
+
const _session = SESSION_OBJ[SESSION_ID];
|
|
31704
|
+
const _ds = _session.DS_GLB[fields_changed_datasource];
|
|
31705
|
+
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
31706
|
+
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
31707
|
+
for (const field_id of fields_changed_arr || []) {
|
|
31708
|
+
}
|
|
31709
|
+
}
|
|
31680
31710
|
|
|
31681
|
-
|
|
31682
|
-
// }
|
|
31711
|
+
const panels_obj = await func.UI.utils.get_panels_wrapper_from_dom(SESSION_ID, $(SESSION_OBJ[SESSION_ID].root_element), false);
|
|
31683
31712
|
|
|
31684
|
-
|
|
31713
|
+
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
31714
|
+
const progDataSource_str = JSON.stringify(panel_val.prog_doc.progDataSource);
|
|
31685
31715
|
|
|
31686
|
-
|
|
31687
|
-
|
|
31716
|
+
var found, refresh_reason, refresh_details;
|
|
31717
|
+
if (fields_changed_arr) {
|
|
31718
|
+
if (fields_changed_datasource && panel_val._ds.dsSession <= Number(fields_changed_datasource)) {
|
|
31719
|
+
continue;
|
|
31720
|
+
}
|
|
31721
|
+
for (const field_id of fields_changed_arr) {
|
|
31722
|
+
// get panel attributes
|
|
31723
|
+
const _attributes = panel_val?.panelXuAttributes || {};
|
|
31688
31724
|
|
|
31689
|
-
//
|
|
31690
|
-
|
|
31691
|
-
// if (fields_changed_datasource && panel_val._ds.dsSession <= Number(fields_changed_datasource)) {
|
|
31692
|
-
// continue;
|
|
31693
|
-
// }
|
|
31694
|
-
// for (const field_id of fields_changed_arr) {
|
|
31695
|
-
// // get panel attributes
|
|
31696
|
-
// const _attributes = panel_val?.panelXuAttributes || {};
|
|
31725
|
+
// detect if program changed
|
|
31726
|
+
found = _attributes['xu-exp:program']?.includes('@' + field_id);
|
|
31697
31727
|
|
|
31698
|
-
|
|
31699
|
-
|
|
31728
|
+
if (found) {
|
|
31729
|
+
refresh_reason = `program ${_attributes['xu-exp:program']} ${field_id} changed `;
|
|
31730
|
+
refresh_details = _attributes;
|
|
31731
|
+
break;
|
|
31732
|
+
}
|
|
31700
31733
|
|
|
31701
|
-
//
|
|
31702
|
-
//
|
|
31703
|
-
|
|
31704
|
-
|
|
31705
|
-
|
|
31734
|
+
// _attributes holds also info of parameters in code_in: @code
|
|
31735
|
+
// search field changed in panel call send parameters exp
|
|
31736
|
+
for (const [attr, value] of Object.entries(_attributes)) {
|
|
31737
|
+
const pattern = /xu-exp:(\w+)/;
|
|
31738
|
+
const match = attr.match(pattern);
|
|
31706
31739
|
|
|
31707
|
-
|
|
31708
|
-
//
|
|
31709
|
-
|
|
31710
|
-
|
|
31711
|
-
//
|
|
31740
|
+
if (!match) {
|
|
31741
|
+
// continue if attribute is not expression
|
|
31742
|
+
continue;
|
|
31743
|
+
}
|
|
31744
|
+
// code_in
|
|
31745
|
+
const parameter_in_field_id = match?.[1];
|
|
31746
|
+
// @code
|
|
31747
|
+
if (value.includes(field_id)) {
|
|
31748
|
+
// search parameter in field in the target program's progDataSource
|
|
31749
|
+
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
31712
31750
|
|
|
31713
|
-
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
// }
|
|
31717
|
-
// // code_in
|
|
31718
|
-
// const parameter_in_field_id = match?.[1];
|
|
31719
|
-
// // @code
|
|
31720
|
-
// if (value.includes(field_id)) {
|
|
31721
|
-
// // search parameter in field in the target program's progDataSource
|
|
31722
|
-
// found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
31723
|
-
|
|
31724
|
-
// if (found) {
|
|
31725
|
-
// refresh_reason = `field ${field_id} in progDataSource parameter_in changed`;
|
|
31726
|
-
// refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
31727
|
-
|
|
31728
|
-
// break;
|
|
31729
|
-
// }
|
|
31751
|
+
if (found) {
|
|
31752
|
+
refresh_reason = `field ${field_id} in progDataSource parameter_in changed`;
|
|
31753
|
+
refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
31730
31754
|
|
|
31731
|
-
|
|
31732
|
-
|
|
31755
|
+
break;
|
|
31756
|
+
}
|
|
31733
31757
|
|
|
31734
|
-
//
|
|
31735
|
-
|
|
31736
|
-
// refresh_details = found;
|
|
31758
|
+
// found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
31759
|
+
found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
|
|
31737
31760
|
|
|
31738
|
-
|
|
31739
|
-
|
|
31740
|
-
|
|
31741
|
-
// }
|
|
31761
|
+
if (found) {
|
|
31762
|
+
refresh_reason = `field ${field_id} in progUi xu-for parameter_in changed`;
|
|
31763
|
+
refresh_details = found;
|
|
31742
31764
|
|
|
31743
|
-
|
|
31765
|
+
break;
|
|
31766
|
+
}
|
|
31767
|
+
}
|
|
31768
|
+
}
|
|
31744
31769
|
|
|
31745
|
-
|
|
31746
|
-
// found = progDataSource_str?.includes('@' + field_id);
|
|
31747
|
-
// if (found) {
|
|
31748
|
-
// refresh_reason = `field ${field_id} in progDataSource changed`;
|
|
31749
|
-
// refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
31770
|
+
if (found) break;
|
|
31750
31771
|
|
|
31751
|
-
//
|
|
31752
|
-
|
|
31772
|
+
// search field changed in the target program's progDataSource // @code
|
|
31773
|
+
found = progDataSource_str?.includes('@' + field_id);
|
|
31774
|
+
if (found) {
|
|
31775
|
+
refresh_reason = `field ${field_id} in progDataSource changed`;
|
|
31776
|
+
refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
31753
31777
|
|
|
31754
|
-
|
|
31755
|
-
|
|
31756
|
-
// refresh_reason = `field ${field_id} in progUi xu-for changed`;
|
|
31757
|
-
// refresh_details = found;
|
|
31778
|
+
break;
|
|
31779
|
+
}
|
|
31758
31780
|
|
|
31759
|
-
|
|
31760
|
-
|
|
31781
|
+
found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, field_id, 'xu-for').length;
|
|
31782
|
+
if (found) {
|
|
31783
|
+
refresh_reason = `field ${field_id} in progUi xu-for changed`;
|
|
31784
|
+
refresh_details = found;
|
|
31761
31785
|
|
|
31762
|
-
|
|
31763
|
-
|
|
31764
|
-
|
|
31765
|
-
|
|
31766
|
-
|
|
31786
|
+
break;
|
|
31787
|
+
}
|
|
31788
|
+
|
|
31789
|
+
if (found) {
|
|
31790
|
+
break;
|
|
31791
|
+
}
|
|
31792
|
+
}
|
|
31793
|
+
}
|
|
31767
31794
|
|
|
31768
|
-
|
|
31769
|
-
|
|
31770
|
-
|
|
31771
|
-
|
|
31795
|
+
if (datasource_changed) {
|
|
31796
|
+
if (panel_val._ds.dsSession == datasource_changed) {
|
|
31797
|
+
refresh_reason = `panel datasource ${datasource_changed} changed`;
|
|
31798
|
+
refresh_details = '';
|
|
31772
31799
|
|
|
31773
|
-
|
|
31774
|
-
|
|
31775
|
-
|
|
31776
|
-
|
|
31777
|
-
|
|
31778
|
-
|
|
31779
|
-
|
|
31780
|
-
|
|
31781
|
-
|
|
31782
|
-
|
|
31783
|
-
|
|
31784
|
-
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
|
|
31788
|
-
// if (_.isEmpty(wrapper_data)) continue;
|
|
31789
|
-
|
|
31790
|
-
// try {
|
|
31791
|
-
// const ts = Date.now();
|
|
31792
|
-
// // remove old panel content
|
|
31793
|
-
// $.each(panel_val.ids, async function (key, val) {
|
|
31794
|
-
// $("[xu-ui-id='" + val + "']")
|
|
31795
|
-
// .attr('xu-ui-id', val + ts)
|
|
31796
|
-
// .removeData();
|
|
31797
|
-
// });
|
|
31800
|
+
found = true;
|
|
31801
|
+
}
|
|
31802
|
+
}
|
|
31803
|
+
if (found) {
|
|
31804
|
+
const _session = SESSION_OBJ[SESSION_ID];
|
|
31805
|
+
if (_session.engine_mode === 'live_preview') {
|
|
31806
|
+
console.info('========= refresh info ==============');
|
|
31807
|
+
console.info('reason:', refresh_reason);
|
|
31808
|
+
console.info('details:', refresh_details);
|
|
31809
|
+
console.info('panel:', panel_val);
|
|
31810
|
+
console.info('=====================================');
|
|
31811
|
+
}
|
|
31812
|
+
const $div_elm = panel_val.$panel_div;
|
|
31813
|
+
const wrapper_data = $div_elm.data();
|
|
31798
31814
|
|
|
31799
|
-
|
|
31800
|
-
// // check if ds exist and deleted by garbage collector
|
|
31815
|
+
if (_.isEmpty(wrapper_data)) continue;
|
|
31801
31816
|
|
|
31802
|
-
|
|
31803
|
-
|
|
31804
|
-
//
|
|
31805
|
-
|
|
31806
|
-
|
|
31817
|
+
try {
|
|
31818
|
+
const ts = Date.now();
|
|
31819
|
+
// remove old panel content
|
|
31820
|
+
$.each(panel_val.ids, async function (key, val) {
|
|
31821
|
+
$("[xu-ui-id='" + val + "']")
|
|
31822
|
+
.attr('xu-ui-id', val + ts)
|
|
31823
|
+
.removeData();
|
|
31824
|
+
});
|
|
31807
31825
|
|
|
31808
|
-
|
|
31809
|
-
//
|
|
31810
|
-
// $div_elm, // the wrapper
|
|
31811
|
-
// _.cloneDeep(item), // _.cloneDeep(wrapper_data.xuData.node_org.children[0]), // the xu-panel node
|
|
31812
|
-
// {},
|
|
31813
|
-
// wrapper_data.xuData.paramsP, // the wrapper params
|
|
31814
|
-
// null,
|
|
31815
|
-
// null,
|
|
31816
|
-
// wrapper_data.xuData.key, // the wrapper key
|
|
31817
|
-
// refreshed_ds, // the refreshed_ds
|
|
31818
|
-
// wrapper_data.xuData.parent_node, // the wrapper parent node
|
|
31819
|
-
// null,
|
|
31820
|
-
// wrapper_data.xuData.$root_container, // the wrapper root container
|
|
31821
|
-
// );
|
|
31822
|
-
// }
|
|
31826
|
+
let refreshed_ds;
|
|
31827
|
+
// check if ds exist and deleted by garbage collector
|
|
31823
31828
|
|
|
31824
|
-
|
|
31825
|
-
|
|
31826
|
-
|
|
31827
|
-
|
|
31828
|
-
|
|
31829
|
-
|
|
31830
|
-
|
|
31831
|
-
|
|
31832
|
-
//
|
|
31833
|
-
//
|
|
31834
|
-
|
|
31829
|
+
if (_session.DS_GLB[panel_val._ds.dsSession]) {
|
|
31830
|
+
refreshed_ds = panel_val._ds.dsSession;
|
|
31831
|
+
}
|
|
31832
|
+
for await (const item of wrapper_data.xuData.node_org.children) {
|
|
31833
|
+
if (item.tagName !== 'xu-panel') continue;
|
|
31834
|
+
|
|
31835
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
31836
|
+
SESSION_ID,
|
|
31837
|
+
$div_elm, // the wrapper
|
|
31838
|
+
_.cloneDeep(item), // _.cloneDeep(wrapper_data.xuData.node_org.children[0]), // the xu-panel node
|
|
31839
|
+
{},
|
|
31840
|
+
wrapper_data.xuData.paramsP, // the wrapper params
|
|
31841
|
+
null,
|
|
31842
|
+
null,
|
|
31843
|
+
wrapper_data.xuData.key, // the wrapper key
|
|
31844
|
+
refreshed_ds, // the refreshed_ds
|
|
31845
|
+
wrapper_data.xuData.parent_node, // the wrapper parent node
|
|
31846
|
+
null,
|
|
31847
|
+
wrapper_data.xuData.$root_container, // the wrapper root container
|
|
31848
|
+
);
|
|
31849
|
+
}
|
|
31850
|
+
|
|
31851
|
+
// remove old panel content
|
|
31852
|
+
$.each(panel_val.ids, async function (key, val) {
|
|
31853
|
+
$("[xu-ui-id='" + val + ts + "']").remove();
|
|
31854
|
+
});
|
|
31855
|
+
} catch (error) {
|
|
31856
|
+
debugger;
|
|
31857
|
+
}
|
|
31858
|
+
// continue;
|
|
31859
|
+
}
|
|
31860
|
+
}
|
|
31861
|
+
};
|
|
31835
31862
|
|
|
31836
31863
|
const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession) {
|
|
31837
31864
|
const _prog = await func.utils.VIEWS_OBJ.get(SESSION_ID, prog_id);
|
|
31838
31865
|
if (!_prog) return;
|
|
31839
31866
|
|
|
31840
31867
|
// get in parameters
|
|
31841
|
-
|
|
31868
|
+
let params_res = {},
|
|
31869
|
+
params_raw = {};
|
|
31842
31870
|
if (_prog?.properties?.progParams) {
|
|
31843
31871
|
for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
|
|
31844
31872
|
if (!['in', 'out'].includes(val.data.dir)) continue;
|
|
31845
31873
|
|
|
31846
31874
|
if (nodeP.attributes) {
|
|
31847
31875
|
if (nodeP.attributes[val.data.parameter]) {
|
|
31848
|
-
|
|
31876
|
+
params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
|
|
31849
31877
|
} else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
|
|
31850
31878
|
if (val.data.dir == 'out') {
|
|
31851
31879
|
// only reference
|
|
31852
|
-
|
|
31880
|
+
params_res[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
|
|
31853
31881
|
} else {
|
|
31854
31882
|
// in parameter
|
|
31855
31883
|
let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
|
|
31856
|
-
|
|
31884
|
+
params_res[val.data.parameter] = ret.result;
|
|
31885
|
+
params_raw[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`];
|
|
31857
31886
|
}
|
|
31858
31887
|
}
|
|
31859
|
-
|
|
31860
|
-
// if (parameters_obj_inP?.[val.data.parameter].fx) {
|
|
31861
|
-
// let ret = await func.expression.get(
|
|
31862
|
-
// SESSION_ID,
|
|
31863
|
-
// parameters_obj_inP?.[val.data.parameter].fx,
|
|
31864
|
-
// dsSession,
|
|
31865
|
-
// "parameters"
|
|
31866
|
-
// );
|
|
31867
|
-
// params_obj[val.data.parameter] = ret.result;
|
|
31868
|
-
// } else {
|
|
31869
|
-
// params_obj[val.data.parameter] =
|
|
31870
|
-
// parameters_obj_inP?.[val.data.parameter].value;
|
|
31871
|
-
// }
|
|
31872
31888
|
continue;
|
|
31873
31889
|
}
|
|
31874
31890
|
console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
|
|
31875
31891
|
}
|
|
31876
31892
|
}
|
|
31877
|
-
return
|
|
31893
|
+
return { params_res, params_raw };
|
|
31878
31894
|
};
|
|
31879
31895
|
|
|
31880
31896
|
func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, xu_func, $elm, val, is_init, refreshed_ds) {
|
|
@@ -31891,8 +31907,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31891
31907
|
const init_program = async function () {
|
|
31892
31908
|
async function render_panel() {
|
|
31893
31909
|
const prog_id = val.value?.prog || val.value;
|
|
31894
|
-
const
|
|
31895
|
-
let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true,
|
|
31910
|
+
const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
|
|
31911
|
+
let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.params_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.params_raw);
|
|
31896
31912
|
ret = { $new_div: ret_panel };
|
|
31897
31913
|
$container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
|
|
31898
31914
|
$container.data().xuData.xuPanelData = ret_panel.data();
|
|
@@ -31941,8 +31957,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
31941
31957
|
const program = val.value?.prog || val.value;
|
|
31942
31958
|
var $wrapper = $('<div>');
|
|
31943
31959
|
var $div = func.UI.screen.create_container(SESSION_ID, $root_container, nodeP, $container, paramsP, parent_infoP, jobNoP, keyP, parent_nodeP, nodeP.attributes, null, null, null, $wrapper, '');
|
|
31944
|
-
const
|
|
31945
|
-
let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true,
|
|
31960
|
+
const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
|
|
31961
|
+
let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, params_obj.params_res, 'alterXu_panel', undefined, undefined, params_obj.params_raw);
|
|
31946
31962
|
ret = {
|
|
31947
31963
|
$new_div: ret_init,
|
|
31948
31964
|
abort: true,
|