@xuda.io/runtime-bundle 1.0.712 → 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.
@@ -30007,17 +30007,16 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
30007
30007
  fields_changed.push(field_id);
30008
30008
 
30009
30009
  ///// REFRESH PARAMETERS IN
30010
-
30011
- for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
30012
- if (_ds.args.parameters_raw_obj) {
30013
- for (const [key, exp] of Object.entries(_ds.args.parameters_raw_obj)) {
30014
- if (exp.includes(field_id)) {
30015
- let ret = await func.expression.get(SESSION_ID, exp, _dsSession, 'parameters');
30016
- _ds.in_parameters[key].value = ret.result;
30017
- }
30018
- }
30019
- }
30020
- }
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
+ // }
30021
30020
  }
30022
30021
  if (!datasource_changed.includes(dataSource)) {
30023
30022
  datasource_changed.push(dataSource);
@@ -30871,7 +30870,7 @@ func.datasource.get_args_property_value = async function (SESSION_ID, dsSession,
30871
30870
  return _value;
30872
30871
  };
30873
30872
  func.UI.screen = {};
30874
- 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) {
30875
30874
  if (!prog_id) return console.error('program is empty');
30876
30875
  let screen_ret = await func.utils.get_screen_obj(SESSION_ID, prog_id);
30877
30876
  if (!screen_ret) return console.error('program is not a screen object');
@@ -30924,7 +30923,6 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
30924
30923
  screenInfo,
30925
30924
  call_screen_propertiesP,
30926
30925
  parentDataSourceNoP: _session.DS_GLB?.[callingDataSource_objP?.dsSession]?.dsSession || callingDataSource_objP?.parentDataSourceNo || 0,
30927
- parameters_raw_obj,
30928
30926
  };
30929
30927
 
30930
30928
  switch (screen_type) {
@@ -31091,7 +31089,7 @@ func.UI.screen.init = async function (SESSION_ID, prog_id, sourceScreenP, callin
31091
31089
  rowIdP,
31092
31090
  jobNoP,
31093
31091
  null,
31094
- parameters_raw_obj,
31092
+ null,
31095
31093
  null,
31096
31094
  null,
31097
31095
  null,
@@ -31867,32 +31865,43 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
31867
31865
  if (!_prog) return;
31868
31866
 
31869
31867
  // get in parameters
31870
- let params_res = {},
31871
- params_raw = {};
31868
+ var params_obj = {};
31872
31869
  if (_prog?.properties?.progParams) {
31873
31870
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
31874
31871
  if (!['in', 'out'].includes(val.data.dir)) continue;
31875
31872
 
31876
31873
  if (nodeP.attributes) {
31877
31874
  if (nodeP.attributes[val.data.parameter]) {
31878
- params_res[val.data.parameter] = nodeP.attributes[val.data.parameter];
31875
+ params_obj[val.data.parameter] = nodeP.attributes[val.data.parameter];
31879
31876
  } else if (nodeP.attributes[`xu-exp:${val.data.parameter}`]) {
31880
31877
  if (val.data.dir == 'out') {
31881
31878
  // only reference
31882
- 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('@', '');
31883
31880
  } else {
31884
31881
  // in parameter
31885
31882
  let ret = await func.expression.get(SESSION_ID, nodeP.attributes[`xu-exp:${val.data.parameter}`], dsSession, 'parameters');
31886
- params_res[val.data.parameter] = ret.result;
31887
- params_raw[val.data.parameter] = nodeP.attributes[`xu-exp:${val.data.parameter}`];
31883
+ params_obj[val.data.parameter] = ret.result;
31888
31884
  }
31889
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
+ // }
31890
31899
  continue;
31891
31900
  }
31892
31901
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
31893
31902
  }
31894
31903
  }
31895
- return { params_res, params_raw };
31904
+ return params_obj;
31896
31905
  };
31897
31906
 
31898
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) {
@@ -31909,8 +31918,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31909
31918
  const init_program = async function () {
31910
31919
  async function render_panel() {
31911
31920
  const prog_id = val.value?.prog || val.value;
31912
- const params_obj = await get_params_obj_new(SESSION_ID, prog_id, nodeP, paramsP.dsSessionP);
31913
- 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);
31914
31923
  ret = { $new_div: ret_panel };
31915
31924
  $container.data().xuData.xuPanelProps = $elm.data().xuAttributes;
31916
31925
  $container.data().xuData.xuPanelData = ret_panel.data();
@@ -31959,8 +31968,8 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31959
31968
  const program = val.value?.prog || val.value;
31960
31969
  var $wrapper = $('<div>');
31961
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, '');
31962
- const params_obj = await get_params_obj_new(SESSION_ID, program, nodeP, paramsP.dsSessionP);
31963
- 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');
31964
31973
  ret = {
31965
31974
  $new_div: ret_init,
31966
31975
  abort: true,