@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
|
@@ -2900,7 +2900,7 @@ func.datasource.create = async function (
|
|
|
2900
2900
|
rowIdP,
|
|
2901
2901
|
jobNoP,
|
|
2902
2902
|
calling_trigger_prop,
|
|
2903
|
-
|
|
2903
|
+
parameters_raw_obj,
|
|
2904
2904
|
NA_isInitP,
|
|
2905
2905
|
NA_callingSourceP,
|
|
2906
2906
|
calling_jobP,
|
|
@@ -2933,6 +2933,7 @@ func.datasource.create = async function (
|
|
|
2933
2933
|
parameters_obj_inP,
|
|
2934
2934
|
static_refreshP,
|
|
2935
2935
|
worker_id,
|
|
2936
|
+
parameters_raw_obj,
|
|
2936
2937
|
};
|
|
2937
2938
|
|
|
2938
2939
|
var IS_DATASOURCE_REFRESH = null;
|
|
@@ -3068,7 +3069,7 @@ func.datasource.create = async function (
|
|
|
3068
3069
|
args.rowIdP,
|
|
3069
3070
|
args.jobNoP,
|
|
3070
3071
|
args.calling_trigger_prop,
|
|
3071
|
-
|
|
3072
|
+
args.parameters_raw_obj,
|
|
3072
3073
|
null,
|
|
3073
3074
|
null,
|
|
3074
3075
|
args.calling_jobP,
|
|
@@ -3109,7 +3110,7 @@ func.datasource.create = async function (
|
|
|
3109
3110
|
return done(SESSION_ID, jsonP.dsSession, true);
|
|
3110
3111
|
});
|
|
3111
3112
|
};
|
|
3112
|
-
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop,
|
|
3113
|
+
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) {
|
|
3113
3114
|
const set_parameters = async function () {
|
|
3114
3115
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
3115
3116
|
const get_Out_parameters = async function (fieldIdP, located_field_param_idxP, param_row_idP) {
|
|
@@ -3238,6 +3239,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
3238
3239
|
static_refreshP,
|
|
3239
3240
|
run_atP,
|
|
3240
3241
|
worker_id,
|
|
3242
|
+
parameters_raw_obj,
|
|
3241
3243
|
};
|
|
3242
3244
|
|
|
3243
3245
|
var dataSourceSession = null;
|
|
@@ -4156,7 +4158,7 @@ func.datasource.run_events_functions = async function (SESSION_ID, dataSourceSes
|
|
|
4156
4158
|
clearInterval(interval);
|
|
4157
4159
|
resolve(job_num);
|
|
4158
4160
|
}
|
|
4159
|
-
if (i >
|
|
4161
|
+
if (i > 50) {
|
|
4160
4162
|
console.error('deadlock detected');
|
|
4161
4163
|
clearInterval(interval);
|
|
4162
4164
|
resolve(job_num);
|
|
@@ -4894,6 +4896,18 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4894
4896
|
|
|
4895
4897
|
if (!fields_changed.includes(field_id)) {
|
|
4896
4898
|
fields_changed.push(field_id);
|
|
4899
|
+
|
|
4900
|
+
///// REFRESH PARAMETERS IN
|
|
4901
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
4902
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
4903
|
+
// for (const [key, exp] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
4904
|
+
// if (exp.includes(field_id)) {
|
|
4905
|
+
// let ret = await func.expression.get(SESSION_ID, exp, _dsSession, 'parameters');
|
|
4906
|
+
// _ds.in_parameters[key].value = ret.result;
|
|
4907
|
+
// }
|
|
4908
|
+
// }
|
|
4909
|
+
// }
|
|
4910
|
+
// }
|
|
4897
4911
|
}
|
|
4898
4912
|
if (!datasource_changed.includes(dataSource)) {
|
|
4899
4913
|
datasource_changed.push(dataSource);
|
|
@@ -4940,6 +4954,19 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
4940
4954
|
datasource_changed[0], // refresh the current datasource only
|
|
4941
4955
|
);
|
|
4942
4956
|
}
|
|
4957
|
+
// ///// REFRESH PARAMETERS IN
|
|
4958
|
+
// if (fields_changed.length) {
|
|
4959
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
4960
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
4961
|
+
// for (const [key, val] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
4962
|
+
// if (fields_changed.includes(val)) {
|
|
4963
|
+
// let ret = await func.expression.get(SESSION_ID, '@' + val, _dsSession, 'parameters');
|
|
4964
|
+
// _ds.in_parameters[val].value = ret.result;
|
|
4965
|
+
// }
|
|
4966
|
+
// }
|
|
4967
|
+
// }
|
|
4968
|
+
// }
|
|
4969
|
+
// }
|
|
4943
4970
|
}
|
|
4944
4971
|
resolve();
|
|
4945
4972
|
});
|
|
@@ -8884,7 +8911,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
|
|
|
8884
8911
|
return elm_nodes;
|
|
8885
8912
|
};
|
|
8886
8913
|
func.UI.screen = {};
|
|
8887
|
-
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) {
|
|
8914
|
+
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) {
|
|
8888
8915
|
if (!prog_id) return console.error('program is empty');
|
|
8889
8916
|
let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
|
|
8890
8917
|
if (!screen_ret) return console.error('program is not a screen object');
|
|
@@ -8937,6 +8964,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
|
|
|
8937
8964
|
screenInfo,
|
|
8938
8965
|
call_screen_propertiesP,
|
|
8939
8966
|
parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
|
|
8967
|
+
parameters_raw_obj,
|
|
8940
8968
|
};
|
|
8941
8969
|
|
|
8942
8970
|
switch (screen_type) {
|
|
@@ -9103,7 +9131,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
|
|
|
9103
9131
|
rowIdP,
|
|
9104
9132
|
jobNoP,
|
|
9105
9133
|
null,
|
|
9106
|
-
|
|
9134
|
+
parameters_raw_obj,
|
|
9107
9135
|
null,
|
|
9108
9136
|
null,
|
|
9109
9137
|
null,
|
|
@@ -9710,212 +9738,200 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
|
|
|
9710
9738
|
}
|
|
9711
9739
|
};
|
|
9712
9740
|
|
|
9713
|
-
|
|
9714
|
-
//
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
// }
|
|
9741
|
+
func.UI.screen.refresh_screen_old = async function (SESSION_ID, fields_changed_arr, datasource_changed, fields_changed_datasource) {
|
|
9742
|
+
// check the main program
|
|
9743
|
+
if (fields_changed_datasource) {
|
|
9744
|
+
const _session = SESSION_OBJ[SESSION_ID];
|
|
9745
|
+
const _ds = _session.DS_GLB[fields_changed_datasource];
|
|
9746
|
+
const prog_doc = await func.utils.DOCS_OBJ.get(SESSION_ID, _ds.prog_id);
|
|
9747
|
+
const progDataSource_str = JSON.stringify(prog_doc.progDataSource);
|
|
9748
|
+
for (const field_id of fields_changed_arr || []) {
|
|
9749
|
+
}
|
|
9750
|
+
}
|
|
9724
9751
|
|
|
9725
|
-
|
|
9752
|
+
const panels_obj = await func.UI.utils.get_panels_wrapper_from_dom(SESSION_ID, $(SESSION_OBJ[SESSION_ID].root_element), false);
|
|
9726
9753
|
|
|
9727
|
-
|
|
9728
|
-
|
|
9754
|
+
for await (const [parent_element_ui_id, panel_val] of Object.entries(panels_obj)) {
|
|
9755
|
+
const progDataSource_str = JSON.stringify(panel_val.prog_doc.progDataSource);
|
|
9729
9756
|
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
//
|
|
9737
|
-
|
|
9757
|
+
var found, refresh_reason, refresh_details;
|
|
9758
|
+
if (fields_changed_arr) {
|
|
9759
|
+
if (fields_changed_datasource && panel_val._ds.dsSession <= Number(fields_changed_datasource)) {
|
|
9760
|
+
continue;
|
|
9761
|
+
}
|
|
9762
|
+
for (const field_id of fields_changed_arr) {
|
|
9763
|
+
// get panel attributes
|
|
9764
|
+
const _attributes = panel_val?.panelXuAttributes || {};
|
|
9738
9765
|
|
|
9739
|
-
//
|
|
9740
|
-
|
|
9766
|
+
// detect if program changed
|
|
9767
|
+
found = _attributes['xu-exp:program']?.includes('@' + field_id);
|
|
9741
9768
|
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9769
|
+
if (found) {
|
|
9770
|
+
refresh_reason = `program ${_attributes['xu-exp:program']} ${field_id} changed `;
|
|
9771
|
+
refresh_details = _attributes;
|
|
9772
|
+
break;
|
|
9773
|
+
}
|
|
9747
9774
|
|
|
9748
|
-
//
|
|
9749
|
-
//
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9775
|
+
// _attributes holds also info of parameters in code_in: @code
|
|
9776
|
+
// search field changed in panel call send parameters exp
|
|
9777
|
+
for (const [attr, value] of Object.entries(_attributes)) {
|
|
9778
|
+
const pattern = /xu-exp:(\w+)/;
|
|
9779
|
+
const match = attr.match(pattern);
|
|
9753
9780
|
|
|
9754
|
-
|
|
9755
|
-
//
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
//
|
|
9759
|
-
|
|
9760
|
-
//
|
|
9761
|
-
|
|
9762
|
-
//
|
|
9763
|
-
|
|
9781
|
+
if (!match) {
|
|
9782
|
+
// continue if attribute is not expression
|
|
9783
|
+
continue;
|
|
9784
|
+
}
|
|
9785
|
+
// code_in
|
|
9786
|
+
const parameter_in_field_id = match?.[1];
|
|
9787
|
+
// @code
|
|
9788
|
+
if (value.includes(field_id)) {
|
|
9789
|
+
// search parameter in field in the target program's progDataSource
|
|
9790
|
+
found = progDataSource_str?.includes('@' + parameter_in_field_id);
|
|
9764
9791
|
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9792
|
+
if (found) {
|
|
9793
|
+
refresh_reason = `field ${field_id} in progDataSource parameter_in changed`;
|
|
9794
|
+
refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
9768
9795
|
|
|
9769
|
-
|
|
9770
|
-
|
|
9796
|
+
break;
|
|
9797
|
+
}
|
|
9771
9798
|
|
|
9772
|
-
//
|
|
9773
|
-
|
|
9799
|
+
// found = find_field_in_progUi(prog_doc.progUi, parameter_in_field_id, 'xu-for');
|
|
9800
|
+
found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, parameter_in_field_id, 'xu-for').length;
|
|
9774
9801
|
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9802
|
+
if (found) {
|
|
9803
|
+
refresh_reason = `field ${field_id} in progUi xu-for parameter_in changed`;
|
|
9804
|
+
refresh_details = found;
|
|
9778
9805
|
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9806
|
+
break;
|
|
9807
|
+
}
|
|
9808
|
+
}
|
|
9809
|
+
}
|
|
9783
9810
|
|
|
9784
|
-
|
|
9811
|
+
if (found) break;
|
|
9785
9812
|
|
|
9786
|
-
//
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9813
|
+
// search field changed in the target program's progDataSource // @code
|
|
9814
|
+
found = progDataSource_str?.includes('@' + field_id);
|
|
9815
|
+
if (found) {
|
|
9816
|
+
refresh_reason = `field ${field_id} in progDataSource changed`;
|
|
9817
|
+
refresh_details = panel_val?.prog_doc?.progDataSource;
|
|
9791
9818
|
|
|
9792
|
-
|
|
9793
|
-
|
|
9819
|
+
break;
|
|
9820
|
+
}
|
|
9794
9821
|
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9822
|
+
found = func.UI.find_field_in_progUi_attributes(panel_val.prog_doc.progUi, field_id, 'xu-for').length;
|
|
9823
|
+
if (found) {
|
|
9824
|
+
refresh_reason = `field ${field_id} in progUi xu-for changed`;
|
|
9825
|
+
refresh_details = found;
|
|
9799
9826
|
|
|
9800
|
-
|
|
9801
|
-
|
|
9827
|
+
break;
|
|
9828
|
+
}
|
|
9802
9829
|
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9830
|
+
if (found) {
|
|
9831
|
+
break;
|
|
9832
|
+
}
|
|
9833
|
+
}
|
|
9834
|
+
}
|
|
9808
9835
|
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9836
|
+
if (datasource_changed) {
|
|
9837
|
+
if (panel_val._ds.dsSession == datasource_changed) {
|
|
9838
|
+
refresh_reason = `panel datasource ${datasource_changed} changed`;
|
|
9839
|
+
refresh_details = '';
|
|
9813
9840
|
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9841
|
+
found = true;
|
|
9842
|
+
}
|
|
9843
|
+
}
|
|
9844
|
+
if (found) {
|
|
9845
|
+
const _session = SESSION_OBJ[SESSION_ID];
|
|
9846
|
+
if (_session.engine_mode === 'live_preview') {
|
|
9847
|
+
console.info('========= refresh info ==============');
|
|
9848
|
+
console.info('reason:', refresh_reason);
|
|
9849
|
+
console.info('details:', refresh_details);
|
|
9850
|
+
console.info('panel:', panel_val);
|
|
9851
|
+
console.info('=====================================');
|
|
9852
|
+
}
|
|
9853
|
+
const $div_elm = panel_val.$panel_div;
|
|
9854
|
+
const wrapper_data = $div_elm.data();
|
|
9828
9855
|
|
|
9829
|
-
|
|
9856
|
+
if (_.isEmpty(wrapper_data)) continue;
|
|
9830
9857
|
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
//
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9858
|
+
try {
|
|
9859
|
+
const ts = Date.now();
|
|
9860
|
+
// remove old panel content
|
|
9861
|
+
$.each(panel_val.ids, async function (key, val) {
|
|
9862
|
+
$("[xu-ui-id='" + val + "']")
|
|
9863
|
+
.attr('xu-ui-id', val + ts)
|
|
9864
|
+
.removeData();
|
|
9865
|
+
});
|
|
9839
9866
|
|
|
9840
|
-
|
|
9841
|
-
//
|
|
9867
|
+
let refreshed_ds;
|
|
9868
|
+
// check if ds exist and deleted by garbage collector
|
|
9842
9869
|
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9870
|
+
if (_session.DS_GLB[panel_val._ds.dsSession]) {
|
|
9871
|
+
refreshed_ds = panel_val._ds.dsSession;
|
|
9872
|
+
}
|
|
9873
|
+
for await (const item of wrapper_data.xuData.node_org.children) {
|
|
9874
|
+
if (item.tagName !== 'xu-panel') continue;
|
|
9848
9875
|
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
|
|
9876
|
+
const new_$div = await func.UI.screen.render_ui_tree(
|
|
9877
|
+
SESSION_ID,
|
|
9878
|
+
$div_elm, // the wrapper
|
|
9879
|
+
_.cloneDeep(item), // _.cloneDeep(wrapper_data.xuData.node_org.children[0]), // the xu-panel node
|
|
9880
|
+
{},
|
|
9881
|
+
wrapper_data.xuData.paramsP, // the wrapper params
|
|
9882
|
+
null,
|
|
9883
|
+
null,
|
|
9884
|
+
wrapper_data.xuData.key, // the wrapper key
|
|
9885
|
+
refreshed_ds, // the refreshed_ds
|
|
9886
|
+
wrapper_data.xuData.parent_node, // the wrapper parent node
|
|
9887
|
+
null,
|
|
9888
|
+
wrapper_data.xuData.$root_container, // the wrapper root container
|
|
9889
|
+
);
|
|
9890
|
+
}
|
|
9864
9891
|
|
|
9865
|
-
//
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
//
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9892
|
+
// remove old panel content
|
|
9893
|
+
$.each(panel_val.ids, async function (key, val) {
|
|
9894
|
+
$("[xu-ui-id='" + val + ts + "']").remove();
|
|
9895
|
+
});
|
|
9896
|
+
} catch (error) {
|
|
9897
|
+
debugger;
|
|
9898
|
+
}
|
|
9899
|
+
// continue;
|
|
9900
|
+
}
|
|
9901
|
+
}
|
|
9902
|
+
};
|
|
9876
9903
|
|
|
9877
9904
|
const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession) {
|
|
9878
9905
|
const _prog = await func.utils.VIEWS_OBJ.get(SESSION_ID, prog_id);
|
|
9879
9906
|
if (!_prog) return;
|
|
9880
9907
|
|
|
9881
9908
|
// get in parameters
|
|
9882
|
-
|
|
9909
|
+
let params_res = {},
|
|
9910
|
+
params_raw = {};
|
|
9883
9911
|
if (_prog?.properties?.progParams) {
|
|
9884
9912
|
for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
|
|
9885
9913
|
if (!['in', 'out'].includes(val.data.dir)) continue;
|
|
9886
9914
|
|
|
9887
9915
|
if (nodeP.attributes) {
|
|
9888
9916
|
if (nodeP.attributes[val.data.parameter]) {
|
|
9889
|
-
|
|
9917
|
+
params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
|
|
9890
9918
|
} else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
|
|
9891
9919
|
if (val.data.dir == 'out') {
|
|
9892
9920
|
// only reference
|
|
9893
|
-
|
|
9921
|
+
params_res[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
|
|
9894
9922
|
} else {
|
|
9895
9923
|
// in parameter
|
|
9896
9924
|
let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
|
|
9897
|
-
|
|
9925
|
+
params_res[val.data.parameter] = ret.result;
|
|
9926
|
+
params_raw[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`];
|
|
9898
9927
|
}
|
|
9899
9928
|
}
|
|
9900
|
-
|
|
9901
|
-
// if (parameters_obj_inP?.[val.data.parameter].fx) {
|
|
9902
|
-
// let ret = await func.expression.get(
|
|
9903
|
-
// SESSION_ID,
|
|
9904
|
-
// parameters_obj_inP?.[val.data.parameter].fx,
|
|
9905
|
-
// dsSession,
|
|
9906
|
-
// "parameters"
|
|
9907
|
-
// );
|
|
9908
|
-
// params_obj[val.data.parameter] = ret.result;
|
|
9909
|
-
// } else {
|
|
9910
|
-
// params_obj[val.data.parameter] =
|
|
9911
|
-
// parameters_obj_inP?.[val.data.parameter].value;
|
|
9912
|
-
// }
|
|
9913
9929
|
continue;
|
|
9914
9930
|
}
|
|
9915
9931
|
console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
|
|
9916
9932
|
}
|
|
9917
9933
|
}
|
|
9918
|
-
return
|
|
9934
|
+
return { params_res, params_raw };
|
|
9919
9935
|
};
|
|
9920
9936
|
|
|
9921
9937
|
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) {
|
|
@@ -9932,8 +9948,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9932
9948
|
const init_program = async function () {
|
|
9933
9949
|
async function render_panel() {
|
|
9934
9950
|
const prog_id = val.value?.prog || val.value;
|
|
9935
|
-
const
|
|
9936
|
-
let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true,
|
|
9951
|
+
const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
|
|
9952
|
+
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);
|
|
9937
9953
|
ret = { $new_div: ret_panel };
|
|
9938
9954
|
$container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
|
|
9939
9955
|
$container.data().xuData.xuPanelData = ret_panel.data();
|
|
@@ -9982,8 +9998,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9982
9998
|
const program = val.value?.prog || val.value;
|
|
9983
9999
|
var $wrapper = $('<div>');
|
|
9984
10000
|
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, '');
|
|
9985
|
-
const
|
|
9986
|
-
let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true,
|
|
10001
|
+
const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
|
|
10002
|
+
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);
|
|
9987
10003
|
ret = {
|
|
9988
10004
|
$new_div: ret_init,
|
|
9989
10005
|
abort: true,
|