@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
|
@@ -2483,7 +2483,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2483
2483
|
break;
|
|
2484
2484
|
}
|
|
2485
2485
|
|
|
2486
|
-
case 'get_data':
|
|
2486
|
+
case 'get_data': {
|
|
2487
2487
|
if (await get_before_record_count()) {
|
|
2488
2488
|
await func.datasource.execute_view_events(SESSION_ID, dataSourceSession, 'before_record');
|
|
2489
2489
|
}
|
|
@@ -2495,8 +2495,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2495
2495
|
}
|
|
2496
2496
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
2497
2497
|
break;
|
|
2498
|
-
|
|
2499
|
-
case 'set_data':
|
|
2498
|
+
}
|
|
2499
|
+
case 'set_data': {
|
|
2500
2500
|
if (!prog_obj.progDataSource?.dataSourceType || _ds.progDataSource.dataSourceType !== 'table' || !_ds._dataSourceTableId) {
|
|
2501
2501
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Datasource DB Table must be defined for Set Data operation', 'E');
|
|
2502
2502
|
}
|
|
@@ -2586,8 +2586,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2586
2586
|
// ret = await callback_datasource();
|
|
2587
2587
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
2588
2588
|
break;
|
|
2589
|
-
|
|
2590
|
-
case 'component':
|
|
2589
|
+
}
|
|
2590
|
+
case 'component': {
|
|
2591
2591
|
_raw_data_rows = _ds?.v.raw_data?.rows || [];
|
|
2592
2592
|
_ds.rows_processed = 0;
|
|
2593
2593
|
_ds.viewRangeExp_rows_deleted = 0;
|
|
@@ -2605,11 +2605,33 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2605
2605
|
}
|
|
2606
2606
|
|
|
2607
2607
|
const row_not_found = async function () {
|
|
2608
|
-
|
|
2609
|
-
|
|
2608
|
+
// if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
2609
|
+
// _ds.currentRecordId = 'newRecord';
|
|
2610
|
+
// _ds.set_mode = 'C';
|
|
2611
|
+
// _ds.record_not_found = true;
|
|
2612
|
+
|
|
2613
|
+
// try {
|
|
2614
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
2615
|
+
// } catch (error) {
|
|
2616
|
+
// await func.datasource.render_fields_form(SESSION_ID, dataSourceSession, { id: 'newRecord', value: {} });
|
|
2617
|
+
// }
|
|
2618
|
+
|
|
2619
|
+
// var count = await func.datasource.get_field_init_count(SESSION_ID, dataSourceSession, 'newRecord', false);
|
|
2620
|
+
// if (
|
|
2621
|
+
// count > 0 // was: && !args.dataSourceNoP
|
|
2622
|
+
// ) {
|
|
2623
|
+
// await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
2624
|
+
// }
|
|
2625
|
+
// }
|
|
2626
|
+
|
|
2627
|
+
if (!prog_obj.progDataSource?.dataSourceType || prog_obj.properties.renderType === 'from' || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
2610
2628
|
_ds.currentRecordId = 'newRecord';
|
|
2611
|
-
|
|
2612
|
-
|
|
2629
|
+
if (tree_obj.rwMode === 'U' && tree_obj.allowCreate) {
|
|
2630
|
+
_ds.set_mode = 'C';
|
|
2631
|
+
}
|
|
2632
|
+
if (prog_obj.progDataSource?.dataSourceType) {
|
|
2633
|
+
_ds.record_not_found = true;
|
|
2634
|
+
}
|
|
2613
2635
|
|
|
2614
2636
|
try {
|
|
2615
2637
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
@@ -2624,6 +2646,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2624
2646
|
await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
2625
2647
|
}
|
|
2626
2648
|
}
|
|
2649
|
+
|
|
2627
2650
|
await func.datasource.callback(SESSION_ID, dataSourceSession, args.rowIdP, args.jobNoP, _ds.prog_id);
|
|
2628
2651
|
};
|
|
2629
2652
|
if (!rows) {
|
|
@@ -2686,7 +2709,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2686
2709
|
await finish_form();
|
|
2687
2710
|
|
|
2688
2711
|
break;
|
|
2689
|
-
|
|
2712
|
+
}
|
|
2690
2713
|
default:
|
|
2691
2714
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Program type not defined', 'E');
|
|
2692
2715
|
}
|
package/js/xuda-worker-bundle.js
CHANGED
|
@@ -2483,7 +2483,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2483
2483
|
break;
|
|
2484
2484
|
}
|
|
2485
2485
|
|
|
2486
|
-
case 'get_data':
|
|
2486
|
+
case 'get_data': {
|
|
2487
2487
|
if (await get_before_record_count()) {
|
|
2488
2488
|
await func.datasource.execute_view_events(SESSION_ID, dataSourceSession, 'before_record');
|
|
2489
2489
|
}
|
|
@@ -2495,8 +2495,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2495
2495
|
}
|
|
2496
2496
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
2497
2497
|
break;
|
|
2498
|
-
|
|
2499
|
-
case 'set_data':
|
|
2498
|
+
}
|
|
2499
|
+
case 'set_data': {
|
|
2500
2500
|
if (!prog_obj.progDataSource?.dataSourceType || _ds.progDataSource.dataSourceType !== 'table' || !_ds._dataSourceTableId) {
|
|
2501
2501
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Datasource DB Table must be defined for Set Data operation', 'E');
|
|
2502
2502
|
}
|
|
@@ -2586,8 +2586,8 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2586
2586
|
// ret = await callback_datasource();
|
|
2587
2587
|
await func.datasource.set_outputField(SESSION_ID, dataSourceSession, _ds?.v?.raw_data?.rows, _ds.args);
|
|
2588
2588
|
break;
|
|
2589
|
-
|
|
2590
|
-
case 'component':
|
|
2589
|
+
}
|
|
2590
|
+
case 'component': {
|
|
2591
2591
|
_raw_data_rows = _ds?.v.raw_data?.rows || [];
|
|
2592
2592
|
_ds.rows_processed = 0;
|
|
2593
2593
|
_ds.viewRangeExp_rows_deleted = 0;
|
|
@@ -2605,11 +2605,33 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2605
2605
|
}
|
|
2606
2606
|
|
|
2607
2607
|
const row_not_found = async function () {
|
|
2608
|
-
|
|
2609
|
-
|
|
2608
|
+
// if (!prog_obj.progDataSource?.dataSourceType || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
2609
|
+
// _ds.currentRecordId = 'newRecord';
|
|
2610
|
+
// _ds.set_mode = 'C';
|
|
2611
|
+
// _ds.record_not_found = true;
|
|
2612
|
+
|
|
2613
|
+
// try {
|
|
2614
|
+
// const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
2615
|
+
// } catch (error) {
|
|
2616
|
+
// await func.datasource.render_fields_form(SESSION_ID, dataSourceSession, { id: 'newRecord', value: {} });
|
|
2617
|
+
// }
|
|
2618
|
+
|
|
2619
|
+
// var count = await func.datasource.get_field_init_count(SESSION_ID, dataSourceSession, 'newRecord', false);
|
|
2620
|
+
// if (
|
|
2621
|
+
// count > 0 // was: && !args.dataSourceNoP
|
|
2622
|
+
// ) {
|
|
2623
|
+
// await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
2624
|
+
// }
|
|
2625
|
+
// }
|
|
2626
|
+
|
|
2627
|
+
if (!prog_obj.progDataSource?.dataSourceType || prog_obj.properties.renderType === 'from' || (tree_obj.rwMode === 'U' && tree_obj.allowCreate)) {
|
|
2610
2628
|
_ds.currentRecordId = 'newRecord';
|
|
2611
|
-
|
|
2612
|
-
|
|
2629
|
+
if (tree_obj.rwMode === 'U' && tree_obj.allowCreate) {
|
|
2630
|
+
_ds.set_mode = 'C';
|
|
2631
|
+
}
|
|
2632
|
+
if (prog_obj.progDataSource?.dataSourceType) {
|
|
2633
|
+
_ds.record_not_found = true;
|
|
2634
|
+
}
|
|
2613
2635
|
|
|
2614
2636
|
try {
|
|
2615
2637
|
const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
|
|
@@ -2624,6 +2646,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2624
2646
|
await func.datasource.execute_field_init_events(SESSION_ID, dataSourceSession, 'form', 'newRecord');
|
|
2625
2647
|
}
|
|
2626
2648
|
}
|
|
2649
|
+
|
|
2627
2650
|
await func.datasource.callback(SESSION_ID, dataSourceSession, args.rowIdP, args.jobNoP, _ds.prog_id);
|
|
2628
2651
|
};
|
|
2629
2652
|
if (!rows) {
|
|
@@ -2686,7 +2709,7 @@ func.datasource.execute = async function (SESSION_ID, dataSourceSession, IS_DATA
|
|
|
2686
2709
|
await finish_form();
|
|
2687
2710
|
|
|
2688
2711
|
break;
|
|
2689
|
-
|
|
2712
|
+
}
|
|
2690
2713
|
default:
|
|
2691
2714
|
return func.utils.debug_report(SESSION_ID, 'Data source', 'Program type not defined', 'E');
|
|
2692
2715
|
}
|