@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.
- package/js/xuda-runtime-bundle.js +33 -10
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +33 -10
- package/js/xuda-runtime-slim.min.es.js +33 -10
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +33 -10
- package/js/xuda-worker-bundle.js +33 -10
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -4107,7 +4107,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4107
4107
|
break;
|
|
4108
4108
|
}
|
|
4109
4109
|
|
|
4110
|
-
case 'get_data':
|
|
4110
|
+
case 'get_data': {
|
|
4111
4111
|
if (await get_before_record_count()) {
|
|
4112
4112
|
await func.datasource.execute_view_events(SESSION_ID, dataSourceSession, 'before_record');
|
|
4113
4113
|
}
|
|
@@ -4119,8 +4119,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4119
4119
|
}
|
|
4120
4120
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
4121
4121
|
break;
|
|
4122
|
-
|
|
4123
|
-
case 'set_data':
|
|
4122
|
+
}
|
|
4123
|
+
case 'set_data': {
|
|
4124
4124
|
if (!prog_obj.progDataSource?.dataSourceType || _ds.progDataSource.dataSourceType !== 'table' || !_ds._dataSourceTableId) {
|
|
4125
4125
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Datasource DB Table must be defined for Set Data operation', 'E');
|
|
4126
4126
|
}
|
|
@@ -4210,8 +4210,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4210
4210
|
// ret = await callback_datasource();
|
|
4211
4211
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
4212
4212
|
break;
|
|
4213
|
-
|
|
4214
|
-
case 'component':
|
|
4213
|
+
}
|
|
4214
|
+
case 'component': {
|
|
4215
4215
|
_raw_data_rows = _ds?.v.raw_data?.rows || [];
|
|
4216
4216
|
_ds.rows_processed = 0;
|
|
4217
4217
|
_ds.viewRangeExp_rows_deleted = 0;
|
|
@@ -4229,11 +4229,33 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4229
4229
|
}
|
|
4230
4230
|
|
|
4231
4231
|
const row_not_found = async function () {
|
|
4232
|
-
|
|
4233
|
-
|
|
4232
|
+
// if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
4233
|
+
// _ds.currentRecordId = 'newRecord';
|
|
4234
|
+
// _ds.set_mode = 'C';
|
|
4235
|
+
// _ds.record_not_found = true;
|
|
4236
|
+
|
|
4237
|
+
// try {
|
|
4238
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
4239
|
+
// } catch (error) {
|
|
4240
|
+
// await func.datasource.render_fields_form(SESSION_ID, dataSourceSession, { id: 'newRecord', value: {} });
|
|
4241
|
+
// }
|
|
4242
|
+
|
|
4243
|
+
// var count = await func.datasource.get_field_init_count(SESSION_ID, dataSourceSession, 'newRecord', false);
|
|
4244
|
+
// if (
|
|
4245
|
+
// count > 0 // was: && !args.dataSourceNoP
|
|
4246
|
+
// ) {
|
|
4247
|
+
// await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
4248
|
+
// }
|
|
4249
|
+
// }
|
|
4250
|
+
|
|
4251
|
+
if (!prog_obj.progDataSource?.dataSourceType || prog_obj.properties.renderType === 'from' || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
4234
4252
|
_ds.currentRecordId = 'newRecord';
|
|
4235
|
-
|
|
4236
|
-
|
|
4253
|
+
if (tree_obj.rwMode === 'U' && tree_obj.allowCreate) {
|
|
4254
|
+
_ds.set_mode = 'C';
|
|
4255
|
+
}
|
|
4256
|
+
if (prog_obj.progDataSource?.dataSourceType) {
|
|
4257
|
+
_ds.record_not_found = true;
|
|
4258
|
+
}
|
|
4237
4259
|
|
|
4238
4260
|
try {
|
|
4239
4261
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
@@ -4248,6 +4270,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4248
4270
|
await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
4249
4271
|
}
|
|
4250
4272
|
}
|
|
4273
|
+
|
|
4251
4274
|
await func.datasource.callback(SESSION_ID, dataSourceSession, args.rowIdP, args.jobNoP, _ds.prog_id);
|
|
4252
4275
|
};
|
|
4253
4276
|
if (!rows) {
|
|
@@ -4310,7 +4333,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4310
4333
|
await finish_form();
|
|
4311
4334
|
|
|
4312
4335
|
break;
|
|
4313
|
-
|
|
4336
|
+
}
|
|
4314
4337
|
default:
|
|
4315
4338
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Program type not defined', 'E');
|
|
4316
4339
|
}
|
|
@@ -4108,7 +4108,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4108
4108
|
break;
|
|
4109
4109
|
}
|
|
4110
4110
|
|
|
4111
|
-
case 'get_data':
|
|
4111
|
+
case 'get_data': {
|
|
4112
4112
|
if (await get_before_record_count()) {
|
|
4113
4113
|
await func.datasource.execute_view_events(SESSION_ID, dataSourceSession, 'before_record');
|
|
4114
4114
|
}
|
|
@@ -4120,8 +4120,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4120
4120
|
}
|
|
4121
4121
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
4122
4122
|
break;
|
|
4123
|
-
|
|
4124
|
-
case 'set_data':
|
|
4123
|
+
}
|
|
4124
|
+
case 'set_data': {
|
|
4125
4125
|
if (!prog_obj.progDataSource?.dataSourceType || _ds.progDataSource.dataSourceType !== 'table' || !_ds._dataSourceTableId) {
|
|
4126
4126
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Datasource DB Table must be defined for Set Data operation', 'E');
|
|
4127
4127
|
}
|
|
@@ -4211,8 +4211,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4211
4211
|
// ret = await callback_datasource();
|
|
4212
4212
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
4213
4213
|
break;
|
|
4214
|
-
|
|
4215
|
-
case 'component':
|
|
4214
|
+
}
|
|
4215
|
+
case 'component': {
|
|
4216
4216
|
_raw_data_rows = _ds?.v.raw_data?.rows || [];
|
|
4217
4217
|
_ds.rows_processed = 0;
|
|
4218
4218
|
_ds.viewRangeExp_rows_deleted = 0;
|
|
@@ -4230,11 +4230,33 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4230
4230
|
}
|
|
4231
4231
|
|
|
4232
4232
|
const row_not_found = async function () {
|
|
4233
|
-
|
|
4234
|
-
|
|
4233
|
+
// if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
4234
|
+
// _ds.currentRecordId = 'newRecord';
|
|
4235
|
+
// _ds.set_mode = 'C';
|
|
4236
|
+
// _ds.record_not_found = true;
|
|
4237
|
+
|
|
4238
|
+
// try {
|
|
4239
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
4240
|
+
// } catch (error) {
|
|
4241
|
+
// await func.datasource.render_fields_form(SESSION_ID, dataSourceSession, { id: 'newRecord', value: {} });
|
|
4242
|
+
// }
|
|
4243
|
+
|
|
4244
|
+
// var count = await func.datasource.get_field_init_count(SESSION_ID, dataSourceSession, 'newRecord', false);
|
|
4245
|
+
// if (
|
|
4246
|
+
// count > 0 // was: && !args.dataSourceNoP
|
|
4247
|
+
// ) {
|
|
4248
|
+
// await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
4249
|
+
// }
|
|
4250
|
+
// }
|
|
4251
|
+
|
|
4252
|
+
if (!prog_obj.progDataSource?.dataSourceType || prog_obj.properties.renderType === 'from' || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
4235
4253
|
_ds.currentRecordId = 'newRecord';
|
|
4236
|
-
|
|
4237
|
-
|
|
4254
|
+
if (tree_obj.rwMode === 'U' && tree_obj.allowCreate) {
|
|
4255
|
+
_ds.set_mode = 'C';
|
|
4256
|
+
}
|
|
4257
|
+
if (prog_obj.progDataSource?.dataSourceType) {
|
|
4258
|
+
_ds.record_not_found = true;
|
|
4259
|
+
}
|
|
4238
4260
|
|
|
4239
4261
|
try {
|
|
4240
4262
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
@@ -4249,6 +4271,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4249
4271
|
await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
4250
4272
|
}
|
|
4251
4273
|
}
|
|
4274
|
+
|
|
4252
4275
|
await func.datasource.callback(SESSION_ID, dataSourceSession, args.rowIdP, args.jobNoP, _ds.prog_id);
|
|
4253
4276
|
};
|
|
4254
4277
|
if (!rows) {
|
|
@@ -4311,7 +4334,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
4311
4334
|
await finish_form();
|
|
4312
4335
|
|
|
4313
4336
|
break;
|
|
4314
|
-
|
|
4337
|
+
}
|
|
4315
4338
|
default:
|
|
4316
4339
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Program type not defined', 'E');
|
|
4317
4340
|
}
|