@xuda.io/runtime-bundle 1.0.702 → 1.0.703

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.
@@ -11162,7 +11162,7 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
11162
11162
  }
11163
11163
  };
11164
11164
  func.UI.screen = {};
11165
- 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) {
11165
+ 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) {
11166
11166
  if (!prog_id) return console.error('program is empty');
11167
11167
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
11168
11168
  if (!screen_ret) return console.error('program is not a screen object');
@@ -11215,6 +11215,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
11215
11215
  screenInfo,
11216
11216
  call_screen_propertiesP,
11217
11217
  parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
11218
+ parameters_raw_obj,
11218
11219
  };
11219
11220
 
11220
11221
  switch (screen_type) {
@@ -11381,7 +11382,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
11381
11382
  rowIdP,
11382
11383
  jobNoP,
11383
11384
  null,
11384
- null,
11385
+ parameters_raw_obj,
11385
11386
  null,
11386
11387
  null,
11387
11388
  null,
@@ -12157,22 +12158,24 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
12157
12158
  if (!_prog) return;
12158
12159
 
12159
12160
  // get in parameters
12160
- var params_obj = {};
12161
+ let params_res = {},
12162
+ params_raw = {};
12161
12163
  if (_prog?.properties?.progParams) {
12162
12164
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
12163
12165
  if (!['in', 'out'].includes(val.data.dir)) continue;
12164
12166
 
12165
12167
  if (nodeP.attributes) {
12166
12168
  if (nodeP.attributes[val.data.parameter]) {
12167
- params_obj[val.data.parameter] = nodeP.attributes[val.data.parameter];
12169
+ params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
12168
12170
  } else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
12169
12171
  if (val.data.dir == 'out') {
12170
12172
  // only reference
12171
- params_obj[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
12173
+ params_res[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
12172
12174
  } else {
12173
12175
  // in parameter
12174
12176
  let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
12175
- params_obj[val.data.parameter] = ret.result;
12177
+ params_res[val.data.parameter] = ret.result;
12178
+ params_raw[val.data.parameter] = `xu-exp:${val.data.parameter}`;
12176
12179
  }
12177
12180
  }
12178
12181
  continue;
@@ -12180,7 +12183,7 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
12180
12183
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
12181
12184
  }
12182
12185
  }
12183
- return params_obj;
12186
+ return { params_res, params_raw };
12184
12187
  };
12185
12188
 
12186
12189
  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) {
@@ -12197,8 +12200,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12197
12200
  const init_program = async function () {
12198
12201
  async function render_panel() {
12199
12202
  const prog_id = val.value?.prog || val.value;
12200
- const param_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
12201
- let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, param_obj, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds);
12203
+ const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
12204
+ let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.param_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.param_raw);
12202
12205
  ret = { $new_div: ret_panel };
12203
12206
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
12204
12207
  $container.data().xuData.xuPanelData = ret_panel.data();
@@ -12247,8 +12250,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
12247
12250
  const program = val.value?.prog || val.value;
12248
12251
  var $wrapper = $('<div>');
12249
12252
  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, '');
12250
- const param_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
12251
- let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, param_obj, 'alterXu_panel');
12253
+ const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
12254
+ let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, params_obj.param_res, 'alterXu_panel', undefined, undefined, params_obj.param_raw);
12252
12255
  ret = {
12253
12256
  $new_div: ret_init,
12254
12257
  abort: true,
@@ -8884,7 +8884,7 @@ func.UI.find_field_in_progUi_attributes = function (progUi, field_id, prop, tag_
8884
8884
  return elm_nodes;
8885
8885
  };
8886
8886
  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) {
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, parameters_raw_obj) {
8888
8888
  if (!prog_id) return console.error('program is empty');
8889
8889
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
8890
8890
  if (!screen_ret) return console.error('program is not a screen object');
@@ -8937,6 +8937,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
8937
8937
  screenInfo,
8938
8938
  call_screen_propertiesP,
8939
8939
  parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
8940
+ parameters_raw_obj,
8940
8941
  };
8941
8942
 
8942
8943
  switch (screen_type) {
@@ -9103,7 +9104,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
9103
9104
  rowIdP,
9104
9105
  jobNoP,
9105
9106
  null,
9106
- null,
9107
+ parameters_raw_obj,
9107
9108
  null,
9108
9109
  null,
9109
9110
  null,
@@ -9879,22 +9880,24 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
9879
9880
  if (!_prog) return;
9880
9881
 
9881
9882
  // get in parameters
9882
- var params_obj = {};
9883
+ let params_res = {},
9884
+ params_raw = {};
9883
9885
  if (_prog?.properties?.progParams) {
9884
9886
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
9885
9887
  if (!['in', 'out'].includes(val.data.dir)) continue;
9886
9888
 
9887
9889
  if (nodeP.attributes) {
9888
9890
  if (nodeP.attributes[val.data.parameter]) {
9889
- params_obj[val.data.parameter] = nodeP.attributes[val.data.parameter];
9891
+ params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
9890
9892
  } else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
9891
9893
  if (val.data.dir == 'out') {
9892
9894
  // only reference
9893
- params_obj[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
9895
+ params_res[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
9894
9896
  } else {
9895
9897
  // in parameter
9896
9898
  let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
9897
- params_obj[val.data.parameter] = ret.result;
9899
+ params_res[val.data.parameter] = ret.result;
9900
+ params_raw[val.data.parameter] = `xu-exp:${val.data.parameter}`;
9898
9901
  }
9899
9902
  }
9900
9903
  continue;
@@ -9902,7 +9905,7 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
9902
9905
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
9903
9906
  }
9904
9907
  }
9905
- return params_obj;
9908
+ return { params_res, params_raw };
9906
9909
  };
9907
9910
 
9908
9911
  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) {
@@ -9919,8 +9922,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
9919
9922
  const init_program = async function () {
9920
9923
  async function render_panel() {
9921
9924
  const prog_id = val.value?.prog || val.value;
9922
- const param_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
9923
- let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, param_obj, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds);
9925
+ const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
9926
+ let ret_panel = await func.UI.screen.init(SESSION_ID, prog_id, paramsP.screenId, _ds, $elm, null, _ds.currentRecordId, null, true, params_obj.param_res, 'initXu_panel', undefined, prog_id !== _ds.prog_id ? null : refreshed_ds, params_obj.param_raw);
9924
9927
  ret = { $new_div: ret_panel };
9925
9928
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
9926
9929
  $container.data().xuData.xuPanelData = ret_panel.data();
@@ -9969,8 +9972,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
9969
9972
  const program = val.value?.prog || val.value;
9970
9973
  var $wrapper = $('<div>');
9971
9974
  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, '');
9972
- const param_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
9973
- let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, param_obj, 'alterXu_panel');
9975
+ const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
9976
+ let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, params_obj.param_res, 'alterXu_panel', undefined, undefined, params_obj.param_raw);
9974
9977
  ret = {
9975
9978
  $new_div: ret_init,
9976
9979
  abort: true,