@xuda.io/runtime-bundle 1.0.713 → 1.0.714

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.
@@ -30870,7 +30870,7 @@ func.datasource.get_args_property_value = async function (SESSION_ID, dsSession,
30870
30870
  return _value;
30871
30871
  };
30872
30872
  func.UI.screen = {};
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) {
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) {
30874
30874
  if (!prog_id) return console.error('program is empty');
30875
30875
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
30876
30876
  if (!screen_ret) return console.error('program is not a screen object');
@@ -30923,7 +30923,6 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
30923
30923
  screenInfo,
30924
30924
  call_screen_propertiesP,
30925
30925
  parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
30926
- parameters_raw_obj,
30927
30926
  };
30928
30927
 
30929
30928
  switch (screen_type) {
@@ -31090,7 +31089,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
31090
31089
  rowIdP,
31091
31090
  jobNoP,
31092
31091
  null,
31093
- parameters_raw_obj,
31092
+ null,
31094
31093
  null,
31095
31094
  null,
31096
31095
  null,
@@ -31866,32 +31865,43 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
31866
31865
  if (!_prog) return;
31867
31866
 
31868
31867
  // get in parameters
31869
- let params_res = {},
31870
- params_raw = {};
31868
+ var params_obj = {};
31871
31869
  if (_prog?.properties?.progParams) {
31872
31870
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
31873
31871
  if (!['in', 'out'].includes(val.data.dir)) continue;
31874
31872
 
31875
31873
  if (nodeP.attributes) {
31876
31874
  if (nodeP.attributes[val.data.parameter]) {
31877
- params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
31875
+ params_obj[val.data.parameter] = nodeP.attributes[val.data.parameter];
31878
31876
  } else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
31879
31877
  if (val.data.dir == 'out') {
31880
31878
  // only reference
31881
- params_res[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
31879
+ params_obj[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`].replaceAll('@', '');
31882
31880
  } else {
31883
31881
  // in parameter
31884
31882
  let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
31885
- params_res[val.data.parameter] = ret.result;
31886
- params_raw[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`];
31883
+ params_obj[val.data.parameter] = ret.result;
31887
31884
  }
31888
31885
  }
31886
+
31887
+ // if (parameters_obj_inP?.[val.data.parameter].fx) {
31888
+ // let ret = await func.expression.get(
31889
+ // SESSION_ID,
31890
+ // parameters_obj_inP?.[val.data.parameter].fx,
31891
+ // dsSession,
31892
+ // "parameters"
31893
+ // );
31894
+ // params_obj[val.data.parameter] = ret.result;
31895
+ // } else {
31896
+ // params_obj[val.data.parameter] =
31897
+ // parameters_obj_inP?.[val.data.parameter].value;
31898
+ // }
31889
31899
  continue;
31890
31900
  }
31891
31901
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
31892
31902
  }
31893
31903
  }
31894
- return { params_res, params_raw };
31904
+ return params_obj;
31895
31905
  };
31896
31906
 
31897
31907
  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) {
@@ -31908,8 +31918,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31908
31918
  const init_program = async function () {
31909
31919
  async function render_panel() {
31910
31920
  const prog_id = val.value?.prog || val.value;
31911
- const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
31912
- 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);
31921
+ const param_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
31922
+ 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);
31913
31923
  ret = { $new_div: ret_panel };
31914
31924
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
31915
31925
  $container.data().xuData.xuPanelData = ret_panel.data();
@@ -31958,8 +31968,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31958
31968
  const program = val.value?.prog || val.value;
31959
31969
  var $wrapper = $('<div>');
31960
31970
  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, '');
31961
- const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
31962
- 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);
31971
+ const param_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
31972
+ let ret_init = await func.UI.screen.init(SESSION_ID, program, paramsP.screenId, _ds, $div, null, _ds.currentRecordId, jobNoP, true, param_obj, 'alterXu_panel');
31963
31973
  ret = {
31964
31974
  $new_div: ret_init,
31965
31975
  abort: true,