@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.
@@ -30843,7 +30843,7 @@ func.datasource.get_args_property_value = async function (SESSION_ID, dsSession,
30843
30843
  return _value;
30844
30844
  };
30845
30845
  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) {
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, parameters_raw_obj) {
30847
30847
  if (!prog_id) return console.error('program is empty');
30848
30848
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
30849
30849
  if (!screen_ret) return console.error('program is not a screen object');
@@ -30896,6 +30896,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
30896
30896
  screenInfo,
30897
30897
  call_screen_propertiesP,
30898
30898
  parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
30899
+ parameters_raw_obj,
30899
30900
  };
30900
30901
 
30901
30902
  switch (screen_type) {
@@ -31062,7 +31063,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
31062
31063
  rowIdP,
31063
31064
  jobNoP,
31064
31065
  null,
31065
- null,
31066
+ parameters_raw_obj,
31066
31067
  null,
31067
31068
  null,
31068
31069
  null,
@@ -31838,22 +31839,24 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
31838
31839
  if (!_prog) return;
31839
31840
 
31840
31841
  // get in parameters
31841
- var params_obj = {};
31842
+ let params_res = {},
31843
+ params_raw = {};
31842
31844
  if (_prog?.properties?.progParams) {
31843
31845
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
31844
31846
  if (!['in', 'out'].includes(val.data.dir)) continue;
31845
31847
 
31846
31848
  if (nodeP.attributes) {
31847
31849
  if (nodeP.attributes[val.data.parameter]) {
31848
- params_obj[val.data.parameter] = nodeP.attributes[val.data.parameter];
31850
+ params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
31849
31851
  } else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
31850
31852
  if (val.data.dir == 'out') {
31851
31853
  // only reference
31852
- params_obj[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
31854
+ params_res[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
31853
31855
  } else {
31854
31856
  // in parameter
31855
31857
  let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
31856
- params_obj[val.data.parameter] = ret.result;
31858
+ params_res[val.data.parameter] = ret.result;
31859
+ params_raw[val.data.parameter] = `xu-exp:${val.data.parameter}`;
31857
31860
  }
31858
31861
  }
31859
31862
  continue;
@@ -31861,7 +31864,7 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
31861
31864
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
31862
31865
  }
31863
31866
  }
31864
- return params_obj;
31867
+ return { params_res, params_raw };
31865
31868
  };
31866
31869
 
31867
31870
  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) {
@@ -31878,8 +31881,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31878
31881
  const init_program = async function () {
31879
31882
  async function render_panel() {
31880
31883
  const prog_id = val.value?.prog || val.value;
31881
- const param_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
31882
- 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);
31884
+ const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
31885
+ 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);
31883
31886
  ret = { $new_div: ret_panel };
31884
31887
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
31885
31888
  $container.data().xuData.xuPanelData = ret_panel.data();
@@ -31928,8 +31931,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31928
31931
  const program = val.value?.prog || val.value;
31929
31932
  var $wrapper = $('<div>');
31930
31933
  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, '');
31931
- const param_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
31932
- let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, param_obj, 'alterXu_panel');
31934
+ const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
31935
+ 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);
31933
31936
  ret = {
31934
31937
  $new_div: ret_init,
31935
31938
  abort: true,