@xuda.io/runtime-bundle 1.0.700 → 1.0.702

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.
@@ -2899,7 +2899,7 @@ func.datasource.create = async function (
2899
2899
  rowIdP,
2900
2900
  jobNoP,
2901
2901
  calling_trigger_prop,
2902
- screen_param,
2902
+ parameters_raw_obj,
2903
2903
  NA_isInitP,
2904
2904
  NA_callingSourceP,
2905
2905
  calling_jobP,
@@ -2932,6 +2932,7 @@ func.datasource.create = async function (
2932
2932
  parameters_obj_inP,
2933
2933
  static_refreshP,
2934
2934
  worker_id,
2935
+ parameters_raw_obj,
2935
2936
  };
2936
2937
 
2937
2938
  var IS_DATASOURCE_REFRESH = null;
@@ -8597,25 +8598,26 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8597
8598
 
8598
8599
  const fx = {
8599
8600
  update_datasource: async function () {
8600
- var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8601
- _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8601
+ if (queue_obj?.paramsP) {
8602
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8603
+ _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8602
8604
 
8603
- var datasource_changes = {
8604
- [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8605
- };
8606
- await func.datasource.update(SESSION_ID, datasource_changes);
8607
-
8608
- if (queue_obj.paramsP.field_id) {
8609
- datasource_changes = {
8610
- [_ds.dsSession]: {
8611
- [_ds.currentRecordId]: {
8612
- [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8613
- },
8614
- },
8605
+ var datasource_changes = {
8606
+ [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8615
8607
  };
8616
8608
  await func.datasource.update(SESSION_ID, datasource_changes);
8617
- }
8618
8609
 
8610
+ if (queue_obj.paramsP.field_id) {
8611
+ datasource_changes = {
8612
+ [_ds.dsSession]: {
8613
+ [_ds.currentRecordId]: {
8614
+ [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8615
+ },
8616
+ },
8617
+ };
8618
+ await func.datasource.update(SESSION_ID, datasource_changes);
8619
+ }
8620
+ }
8619
8621
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
8620
8622
  },
8621
8623
  execute_xu_render_attributes: async function () {
@@ -9372,7 +9374,7 @@ func.events.execute = async function (
9372
9374
  var params_obj = {};
9373
9375
  if (_prog?.properties?.progParams) {
9374
9376
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
9375
- if (!val.data.dir === 'in') continue;
9377
+ if (val.data.dir !== 'in') continue;
9376
9378
  if (typeof args.parameters_obj_inP?.[val.data.parameter] !== 'undefined') {
9377
9379
  if (args.parameters_obj_inP?.[val.data.parameter].fx) {
9378
9380
  let ret = await func.expression.get(SESSION_ID, args.parameters_obj_inP?.[val.data.parameter].fx, dsSession, 'parameters');
@@ -11892,6 +11894,13 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
11892
11894
  // $("[xu-ui-id='" + elm_to_delete + "']").remove();
11893
11895
  // });
11894
11896
 
11897
+ if (_session.engine_mode === 'live_preview') {
11898
+ console.info('========= refresh main info ==============');
11899
+ console.info('reason:', refresh_reason);
11900
+ console.info('element:', $elm);
11901
+ console.info('==========================================');
11902
+ }
11903
+
11895
11904
  return;
11896
11905
  }
11897
11906
  }
@@ -12166,19 +12175,6 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
12166
12175
  params_obj[val.data.parameter] = ret.result;
12167
12176
  }
12168
12177
  }
12169
-
12170
- // if (parameters_obj_inP?.[val.data.parameter].fx) {
12171
- // let ret = await func.expression.get(
12172
- // SESSION_ID,
12173
- // parameters_obj_inP?.[val.data.parameter].fx,
12174
- // dsSession,
12175
- // "parameters"
12176
- // );
12177
- // params_obj[val.data.parameter] = ret.result;
12178
- // } else {
12179
- // params_obj[val.data.parameter] =
12180
- // parameters_obj_inP?.[val.data.parameter].value;
12181
- // }
12182
12178
  continue;
12183
12179
  }
12184
12180
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
@@ -2900,7 +2900,7 @@ func.datasource.create = async function (
2900
2900
  rowIdP,
2901
2901
  jobNoP,
2902
2902
  calling_trigger_prop,
2903
- screen_param,
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;
@@ -8598,25 +8599,26 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8598
8599
 
8599
8600
  const fx = {
8600
8601
  update_datasource: async function () {
8601
- var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8602
- _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8602
+ if (queue_obj?.paramsP) {
8603
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8604
+ _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8603
8605
 
8604
- var datasource_changes = {
8605
- [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8606
- };
8607
- await func.datasource.update(SESSION_ID, datasource_changes);
8608
-
8609
- if (queue_obj.paramsP.field_id) {
8610
- datasource_changes = {
8611
- [_ds.dsSession]: {
8612
- [_ds.currentRecordId]: {
8613
- [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8614
- },
8615
- },
8606
+ var datasource_changes = {
8607
+ [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8616
8608
  };
8617
8609
  await func.datasource.update(SESSION_ID, datasource_changes);
8618
- }
8619
8610
 
8611
+ if (queue_obj.paramsP.field_id) {
8612
+ datasource_changes = {
8613
+ [_ds.dsSession]: {
8614
+ [_ds.currentRecordId]: {
8615
+ [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8616
+ },
8617
+ },
8618
+ };
8619
+ await func.datasource.update(SESSION_ID, datasource_changes);
8620
+ }
8621
+ }
8620
8622
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
8621
8623
  },
8622
8624
  execute_xu_render_attributes: async function () {
@@ -9614,6 +9616,13 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
9614
9616
  // $("[xu-ui-id='" + elm_to_delete + "']").remove();
9615
9617
  // });
9616
9618
 
9619
+ if (_session.engine_mode === 'live_preview') {
9620
+ console.info('========= refresh main info ==============');
9621
+ console.info('reason:', refresh_reason);
9622
+ console.info('element:', $elm);
9623
+ console.info('==========================================');
9624
+ }
9625
+
9617
9626
  return;
9618
9627
  }
9619
9628
  }
@@ -9888,19 +9897,6 @@ const get_params_obj_new = async function (SESSION_ID, prog_id, nodeP, dsSession
9888
9897
  params_obj[val.data.parameter] = ret.result;
9889
9898
  }
9890
9899
  }
9891
-
9892
- // if (parameters_obj_inP?.[val.data.parameter].fx) {
9893
- // let ret = await func.expression.get(
9894
- // SESSION_ID,
9895
- // parameters_obj_inP?.[val.data.parameter].fx,
9896
- // dsSession,
9897
- // "parameters"
9898
- // );
9899
- // params_obj[val.data.parameter] = ret.result;
9900
- // } else {
9901
- // params_obj[val.data.parameter] =
9902
- // parameters_obj_inP?.[val.data.parameter].value;
9903
- // }
9904
9900
  continue;
9905
9901
  }
9906
9902
  console.warn(`Warning: Program ${_prog.properties.menuName} expected In parameter: ${val.data.parameter} but received null instead`);
@@ -13465,7 +13461,7 @@ func.events.execute = async function (
13465
13461
  var params_obj = {};
13466
13462
  if (_prog?.properties?.progParams) {
13467
13463
  for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
13468
- if (!val.data.dir === 'in') continue;
13464
+ if (val.data.dir !== 'in') continue;
13469
13465
  if (typeof args.parameters_obj_inP?.[val.data.parameter] !== 'undefined') {
13470
13466
  if (args.parameters_obj_inP?.[val.data.parameter].fx) {
13471
13467
  let ret = await func.expression.get(SESSION_ID, args.parameters_obj_inP?.[val.data.parameter].fx, dsSession, 'parameters');