@xuda.io/runtime-bundle 1.0.880 → 1.0.882
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 +19 -39
- package/js/xuda-runtime-bundle.min.js +3 -3
- package/js/xuda-runtime-slim.js +19 -39
- package/js/xuda-runtime-slim.min.es.js +19 -39
- package/js/xuda-runtime-slim.min.js +3 -3
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +9 -28
- package/js/xuda-worker-bundle.js +9 -28
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -5710,7 +5710,7 @@ func.datasource.update_changes_for_out_parameter = async function (SESSION_ID, d
|
|
|
5710
5710
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
5711
5711
|
let _ds = _session.DS_GLB[dsSessionP];
|
|
5712
5712
|
const _calling_ds = _session.DS_GLB[calling_dsP];
|
|
5713
|
-
|
|
5713
|
+
|
|
5714
5714
|
if (_ds.PARAM_OUT_INFO) {
|
|
5715
5715
|
let data = {};
|
|
5716
5716
|
for await (const [key, val] of Object.entries(_ds.PARAM_OUT_INFO)) {
|
|
@@ -9811,10 +9811,9 @@ func.events.execute = async function (
|
|
|
9811
9811
|
return;
|
|
9812
9812
|
}
|
|
9813
9813
|
|
|
9814
|
-
// args.prog_id = _viewId;
|
|
9815
9814
|
if (_ds) {
|
|
9816
9815
|
func.utils.debug.watch(SESSION_ID, calling_trigger_prop?.id, functionP, null, calling_trigger_prop, expCond);
|
|
9817
|
-
|
|
9816
|
+
|
|
9818
9817
|
const ret = await func.datasource.create(SESSION_ID, await get_prog_id(), args.dataSourceNoP, args.parentDataSourceNoP, args.containerIdP, args.rowIdP, args.jobNoP, args.calling_trigger_prop, null, null, args.callingSourceP, args.calling_jobP, args.screen_dsP, args.is_panelP, params_obj);
|
|
9819
9818
|
|
|
9820
9819
|
let _ds_new = _session.DS_GLB[ret.dsSessionP];
|
|
@@ -9822,31 +9821,6 @@ func.events.execute = async function (
|
|
|
9822
9821
|
if (parameters && !_.isEmpty(parameters)) {
|
|
9823
9822
|
await func.datasource.update_changes_for_out_parameter(SESSION_ID, _ds_new.dsSession, _ds.dsSession);
|
|
9824
9823
|
}
|
|
9825
|
-
// if (parameters && !_.isEmpty(parameters) && _ds_new.PARAM_OUT_INFO) {
|
|
9826
|
-
// let data = {};
|
|
9827
|
-
// for await (const [key, val] of Object.entries(
|
|
9828
|
-
// _ds_new.PARAM_OUT_INFO
|
|
9829
|
-
// )) {
|
|
9830
|
-
// if (val.prop === "out") {
|
|
9831
|
-
// try {
|
|
9832
|
-
// const row_idx = func.common.find_ROWID_idx(
|
|
9833
|
-
// _ds_new,
|
|
9834
|
-
// _ds_new.currentRecordId
|
|
9835
|
-
// );
|
|
9836
|
-
// data[val.details] =
|
|
9837
|
-
// _ds_new.data_feed.rows[row_idx][val.fieldId];
|
|
9838
|
-
// } catch (err) {
|
|
9839
|
-
// console.error(err);
|
|
9840
|
-
// }
|
|
9841
|
-
// }
|
|
9842
|
-
// }
|
|
9843
|
-
// if (!_.isEmpty(data)) {
|
|
9844
|
-
// let datasource_changes = {
|
|
9845
|
-
// [_ds.dsSession]: { [_ds.currentRecordId]: data },
|
|
9846
|
-
// };
|
|
9847
|
-
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
9848
|
-
// }
|
|
9849
|
-
// }
|
|
9850
9824
|
|
|
9851
9825
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
9852
9826
|
return _ds_new;
|
|
@@ -9901,6 +9875,13 @@ func.events.execute = async function (
|
|
|
9901
9875
|
}
|
|
9902
9876
|
|
|
9903
9877
|
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
9878
|
+
|
|
9879
|
+
if (_ds.PARAM_OUT_INFO) {
|
|
9880
|
+
for await (const [dsSession_to_update, val] of Object.entries(datasource_changes)) {
|
|
9881
|
+
await func.datasource.update_changes_for_out_parameter(SESSION_ID, _ds.dsSession, dsSession_to_update);
|
|
9882
|
+
}
|
|
9883
|
+
}
|
|
9884
|
+
|
|
9904
9885
|
if (jobNoP) func.events.delete_job(SESSION_ID, jobNoP);
|
|
9905
9886
|
// return changes;
|
|
9906
9887
|
},
|
|
@@ -12229,7 +12210,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12229
12210
|
let is_dynamic_field = false;
|
|
12230
12211
|
let field_prop;
|
|
12231
12212
|
let bind_field_id;
|
|
12232
|
-
|
|
12213
|
+
|
|
12233
12214
|
const input_field_type = $elm.attr('type');
|
|
12234
12215
|
|
|
12235
12216
|
const get_bind_field = async function (field_id) {
|
|
@@ -12240,11 +12221,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12240
12221
|
field_prop = func.common.find_item_by_key(view_ret.progFields, 'field_id', field_id);
|
|
12241
12222
|
if (!field_prop) {
|
|
12242
12223
|
/// find the field everywhere in the chain Aug 30 2024
|
|
12243
|
-
const ret_get_value = await func.datasource.get_value(
|
|
12244
|
-
SESSION_ID,
|
|
12245
|
-
field_id,
|
|
12246
|
-
_dsP, // $elm.data().xuData.paramsP.dsSessionP
|
|
12247
|
-
);
|
|
12224
|
+
const ret_get_value = await func.datasource.get_value(SESSION_ID, field_id, _dsP);
|
|
12248
12225
|
|
|
12249
12226
|
if (ret_get_value.found) {
|
|
12250
12227
|
_dsP = ret_get_value.dsSessionP;
|
|
@@ -12268,7 +12245,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12268
12245
|
} catch (err) {
|
|
12269
12246
|
console.error(err?.message || err);
|
|
12270
12247
|
return {};
|
|
12271
|
-
// return {};
|
|
12272
12248
|
}
|
|
12273
12249
|
|
|
12274
12250
|
const field_changed = async function (e) {
|
|
@@ -13569,10 +13545,14 @@ func.UI.screen.execute_screen_ready_events = async function (SESSION_ID, paramsP
|
|
|
13569
13545
|
}
|
|
13570
13546
|
return viewEventExec_arr.length;
|
|
13571
13547
|
};
|
|
13548
|
+
try {
|
|
13549
|
+
let count = await get_view_events_count('screen_ready');
|
|
13572
13550
|
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13551
|
+
if (!count) return;
|
|
13552
|
+
return await execute_view_events(sourceP);
|
|
13553
|
+
} catch (error) {
|
|
13554
|
+
debugger;
|
|
13555
|
+
}
|
|
13576
13556
|
};
|
|
13577
13557
|
func.UI.screen.screen_loading_done = async function (SESSION_ID, paramsP, $div, jobNoP) {
|
|
13578
13558
|
// await
|
|
@@ -16461,7 +16441,7 @@ func.index.init_document_listeners = function () {
|
|
|
16461
16441
|
set_idle(0);
|
|
16462
16442
|
}
|
|
16463
16443
|
|
|
16464
|
-
if (_session.engine_mode === 'live_preview' || !_session.opt.
|
|
16444
|
+
if (_session.engine_mode === 'live_preview' || !_session.opt.enable_user_assist) {
|
|
16465
16445
|
return;
|
|
16466
16446
|
}
|
|
16467
16447
|
|
|
@@ -5711,7 +5711,7 @@ func.datasource.update_changes_for_out_parameter = async function (SESSION_ID, d
|
|
|
5711
5711
|
let _session = SESSION_OBJ[SESSION_ID];
|
|
5712
5712
|
let _ds = _session.DS_GLB[dsSessionP];
|
|
5713
5713
|
const _calling_ds = _session.DS_GLB[calling_dsP];
|
|
5714
|
-
|
|
5714
|
+
|
|
5715
5715
|
if (_ds.PARAM_OUT_INFO) {
|
|
5716
5716
|
let data = {};
|
|
5717
5717
|
for await (const [key, val] of Object.entries(_ds.PARAM_OUT_INFO)) {
|
|
@@ -9937,7 +9937,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9937
9937
|
let is_dynamic_field = false;
|
|
9938
9938
|
let field_prop;
|
|
9939
9939
|
let bind_field_id;
|
|
9940
|
-
|
|
9940
|
+
|
|
9941
9941
|
const input_field_type = $elm.attr('type');
|
|
9942
9942
|
|
|
9943
9943
|
const get_bind_field = async function (field_id) {
|
|
@@ -9948,11 +9948,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9948
9948
|
field_prop = func.common.find_item_by_key(view_ret.progFields, 'field_id', field_id);
|
|
9949
9949
|
if (!field_prop) {
|
|
9950
9950
|
/// find the field everywhere in the chain Aug 30 2024
|
|
9951
|
-
const ret_get_value = await func.datasource.get_value(
|
|
9952
|
-
SESSION_ID,
|
|
9953
|
-
field_id,
|
|
9954
|
-
_dsP, // $elm.data().xuData.paramsP.dsSessionP
|
|
9955
|
-
);
|
|
9951
|
+
const ret_get_value = await func.datasource.get_value(SESSION_ID, field_id, _dsP);
|
|
9956
9952
|
|
|
9957
9953
|
if (ret_get_value.found) {
|
|
9958
9954
|
_dsP = ret_get_value.dsSessionP;
|
|
@@ -9976,7 +9972,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
9976
9972
|
} catch (err) {
|
|
9977
9973
|
console.error(err?.message || err);
|
|
9978
9974
|
return {};
|
|
9979
|
-
// return {};
|
|
9980
9975
|
}
|
|
9981
9976
|
|
|
9982
9977
|
const field_changed = async function (e) {
|
|
@@ -11277,10 +11272,14 @@ func.UI.screen.execute_screen_ready_events = async function (SESSION_ID, paramsP
|
|
|
11277
11272
|
}
|
|
11278
11273
|
return viewEventExec_arr.length;
|
|
11279
11274
|
};
|
|
11275
|
+
try {
|
|
11276
|
+
let count = await get_view_events_count('screen_ready');
|
|
11280
11277
|
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11278
|
+
if (!count) return;
|
|
11279
|
+
return await execute_view_events(sourceP);
|
|
11280
|
+
} catch (error) {
|
|
11281
|
+
debugger;
|
|
11282
|
+
}
|
|
11284
11283
|
};
|
|
11285
11284
|
func.UI.screen.screen_loading_done = async function (SESSION_ID, paramsP, $div, jobNoP) {
|
|
11286
11285
|
// await
|
|
@@ -13770,10 +13769,9 @@ func.events.execute = async function (
|
|
|
13770
13769
|
return;
|
|
13771
13770
|
}
|
|
13772
13771
|
|
|
13773
|
-
// args.prog_id = _viewId;
|
|
13774
13772
|
if (_ds) {
|
|
13775
13773
|
func.utils.debug.watch(SESSION_ID, calling_trigger_prop?.id, functionP, null, calling_trigger_prop, expCond);
|
|
13776
|
-
|
|
13774
|
+
|
|
13777
13775
|
const ret = await func.datasource.create(SESSION_ID, await get_prog_id(), args.dataSourceNoP, args.parentDataSourceNoP, args.containerIdP, args.rowIdP, args.jobNoP, args.calling_trigger_prop, null, null, args.callingSourceP, args.calling_jobP, args.screen_dsP, args.is_panelP, params_obj);
|
|
13778
13776
|
|
|
13779
13777
|
let _ds_new = _session.DS_GLB[ret.dsSessionP];
|
|
@@ -13781,31 +13779,6 @@ func.events.execute = async function (
|
|
|
13781
13779
|
if (parameters && !_.isEmpty(parameters)) {
|
|
13782
13780
|
await func.datasource.update_changes_for_out_parameter(SESSION_ID, _ds_new.dsSession, _ds.dsSession);
|
|
13783
13781
|
}
|
|
13784
|
-
// if (parameters && !_.isEmpty(parameters) && _ds_new.PARAM_OUT_INFO) {
|
|
13785
|
-
// let data = {};
|
|
13786
|
-
// for await (const [key, val] of Object.entries(
|
|
13787
|
-
// _ds_new.PARAM_OUT_INFO
|
|
13788
|
-
// )) {
|
|
13789
|
-
// if (val.prop === "out") {
|
|
13790
|
-
// try {
|
|
13791
|
-
// const row_idx = func.common.find_ROWID_idx(
|
|
13792
|
-
// _ds_new,
|
|
13793
|
-
// _ds_new.currentRecordId
|
|
13794
|
-
// );
|
|
13795
|
-
// data[val.details] =
|
|
13796
|
-
// _ds_new.data_feed.rows[row_idx][val.fieldId];
|
|
13797
|
-
// } catch (err) {
|
|
13798
|
-
// console.error(err);
|
|
13799
|
-
// }
|
|
13800
|
-
// }
|
|
13801
|
-
// }
|
|
13802
|
-
// if (!_.isEmpty(data)) {
|
|
13803
|
-
// let datasource_changes = {
|
|
13804
|
-
// [_ds.dsSession]: { [_ds.currentRecordId]: data },
|
|
13805
|
-
// };
|
|
13806
|
-
// await func.datasource.update(SESSION_ID, datasource_changes);
|
|
13807
|
-
// }
|
|
13808
|
-
// }
|
|
13809
13782
|
|
|
13810
13783
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
13811
13784
|
return _ds_new;
|
|
@@ -13860,6 +13833,13 @@ func.events.execute = async function (
|
|
|
13860
13833
|
}
|
|
13861
13834
|
|
|
13862
13835
|
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
13836
|
+
|
|
13837
|
+
if (_ds.PARAM_OUT_INFO) {
|
|
13838
|
+
for await (const [dsSession_to_update, val] of Object.entries(datasource_changes)) {
|
|
13839
|
+
await func.datasource.update_changes_for_out_parameter(SESSION_ID, _ds.dsSession, dsSession_to_update);
|
|
13840
|
+
}
|
|
13841
|
+
}
|
|
13842
|
+
|
|
13863
13843
|
if (jobNoP) func.events.delete_job(SESSION_ID, jobNoP);
|
|
13864
13844
|
// return changes;
|
|
13865
13845
|
},
|
|
@@ -16462,7 +16442,7 @@ func.index.init_document_listeners = function () {
|
|
|
16462
16442
|
set_idle(0);
|
|
16463
16443
|
}
|
|
16464
16444
|
|
|
16465
|
-
if (_session.engine_mode === 'live_preview' || !_session.opt.
|
|
16445
|
+
if (_session.engine_mode === 'live_preview' || !_session.opt.enable_user_assist) {
|
|
16466
16446
|
return;
|
|
16467
16447
|
}
|
|
16468
16448
|
|