@xuda.io/runtime-bundle 1.0.462 → 1.0.464

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.
@@ -29192,7 +29192,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
29192
29192
  break;
29193
29193
  }
29194
29194
 
29195
- case 'get_data':
29195
+ case 'get_data': {
29196
29196
  if (await get_before_record_count()) {
29197
29197
  await func.datasource.execute_view_events(SESSION_ID, dataSourceSession, 'before_record');
29198
29198
  }
@@ -29204,8 +29204,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
29204
29204
  }
29205
29205
  await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
29206
29206
  break;
29207
-
29208
- case 'set_data':
29207
+ }
29208
+ case 'set_data': {
29209
29209
  if (!prog_obj.progDataSource?.dataSourceType || _ds.progDataSource.dataSourceType !== 'table' || !_ds._dataSourceTableId) {
29210
29210
  return func.utils.debug_report(SESSION_ID, 'Data source', 'Datasource DB Table must be defined for Set Data operation', 'E');
29211
29211
  }
@@ -29295,8 +29295,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
29295
29295
  // ret = await callback_datasource();
29296
29296
  await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
29297
29297
  break;
29298
-
29299
- case 'component':
29298
+ }
29299
+ case 'component': {
29300
29300
  _raw_data_rows = _ds?.v.raw_data?.rows || [];
29301
29301
  _ds.rows_processed = 0;
29302
29302
  _ds.viewRangeExp_rows_deleted = 0;
@@ -29314,11 +29314,33 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
29314
29314
  }
29315
29315
 
29316
29316
  const row_not_found = async function () {
29317
- debugger;
29318
- if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
29317
+ // if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
29318
+ // _ds.currentRecordId = 'newRecord';
29319
+ // _ds.set_mode = 'C';
29320
+ // _ds.record_not_found = true;
29321
+
29322
+ // try {
29323
+ // const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
29324
+ // } catch (error) {
29325
+ // await func.datasource.render_fields_form(SESSION_ID, dataSourceSession, { id: 'newRecord', value: {} });
29326
+ // }
29327
+
29328
+ // var count = await func.datasource.get_field_init_count(SESSION_ID, dataSourceSession, 'newRecord', false);
29329
+ // if (
29330
+ // count > 0 // was: && !args.dataSourceNoP
29331
+ // ) {
29332
+ // await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
29333
+ // }
29334
+ // }
29335
+
29336
+ if (!prog_obj.progDataSource?.dataSourceType || prog_obj.properties.renderType === 'from' || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
29319
29337
  _ds.currentRecordId = 'newRecord';
29320
- _ds.set_mode = 'C';
29321
- _ds.record_not_found = true;
29338
+ if (tree_obj.rwMode === 'U' && tree_obj.allowCreate) {
29339
+ _ds.set_mode = 'C';
29340
+ }
29341
+ if (prog_obj.progDataSource?.dataSourceType) {
29342
+ _ds.record_not_found = true;
29343
+ }
29322
29344
 
29323
29345
  try {
29324
29346
  const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
@@ -29333,6 +29355,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
29333
29355
  await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
29334
29356
  }
29335
29357
  }
29358
+
29336
29359
  await func.datasource.callback(SESSION_ID, dataSourceSession, args.rowIdP, args.jobNoP, _ds.prog_id);
29337
29360
  };
29338
29361
  if (!rows) {
@@ -29395,7 +29418,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
29395
29418
  await finish_form();
29396
29419
 
29397
29420
  break;
29398
-
29421
+ }
29399
29422
  default:
29400
29423
  return func.utils.debug_report(SESSION_ID, 'Data source', 'Program type not defined', 'E');
29401
29424
  }