@xuda.io/runtime-bundle 1.0.719 → 1.0.721
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 +231 -287
- package/js/xuda-runtime-bundle.min.js +2 -2
- package/js/xuda-runtime-slim.js +228 -284
- package/js/xuda-runtime-slim.min.es.js +228 -284
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +32 -5
- package/js/xuda-worker-bundle.js +32 -5
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -1275,7 +1275,7 @@ func.datasource.create = async function (
|
|
|
1275
1275
|
rowIdP,
|
|
1276
1276
|
jobNoP,
|
|
1277
1277
|
calling_trigger_prop,
|
|
1278
|
-
|
|
1278
|
+
parameters_raw_obj,
|
|
1279
1279
|
NA_isInitP,
|
|
1280
1280
|
NA_callingSourceP,
|
|
1281
1281
|
calling_jobP,
|
|
@@ -1308,6 +1308,7 @@ func.datasource.create = async function (
|
|
|
1308
1308
|
parameters_obj_inP,
|
|
1309
1309
|
static_refreshP,
|
|
1310
1310
|
worker_id,
|
|
1311
|
+
parameters_raw_obj,
|
|
1311
1312
|
};
|
|
1312
1313
|
|
|
1313
1314
|
var IS_DATASOURCE_REFRESH = null;
|
|
@@ -1443,7 +1444,7 @@ func.datasource.create = async function (
|
|
|
1443
1444
|
args.rowIdP,
|
|
1444
1445
|
args.jobNoP,
|
|
1445
1446
|
args.calling_trigger_prop,
|
|
1446
|
-
|
|
1447
|
+
args.parameters_raw_obj,
|
|
1447
1448
|
null,
|
|
1448
1449
|
null,
|
|
1449
1450
|
args.calling_jobP,
|
|
@@ -1484,7 +1485,7 @@ func.datasource.create = async function (
|
|
|
1484
1485
|
return done(SESSION_ID, jsonP.dsSession, true);
|
|
1485
1486
|
});
|
|
1486
1487
|
};
|
|
1487
|
-
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop,
|
|
1488
|
+
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop, parameters_raw_obj, NA_isInitP, callingSourceP, calling_jobP, NA_screen_dsP, is_panelP, parameters_obj_inP, static_refreshP, run_atP, worker_id) {
|
|
1488
1489
|
const set_parameters = async function () {
|
|
1489
1490
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
1490
1491
|
const get_Out_parameters = async function (fieldIdP, located_field_param_idxP, param_row_idP) {
|
|
@@ -1613,6 +1614,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
1613
1614
|
static_refreshP,
|
|
1614
1615
|
run_atP,
|
|
1615
1616
|
worker_id,
|
|
1617
|
+
parameters_raw_obj,
|
|
1616
1618
|
};
|
|
1617
1619
|
|
|
1618
1620
|
var dataSourceSession = null;
|
|
@@ -2531,7 +2533,7 @@ func.datasource.run_events_functions = async function (SESSION_ID, dataSourceSes
|
|
|
2531
2533
|
clearInterval(interval);
|
|
2532
2534
|
resolve(job_num);
|
|
2533
2535
|
}
|
|
2534
|
-
if (i >
|
|
2536
|
+
if (i > 50) {
|
|
2535
2537
|
console.error('deadlock detected');
|
|
2536
2538
|
clearInterval(interval);
|
|
2537
2539
|
resolve(job_num);
|
|
@@ -3269,6 +3271,18 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
3269
3271
|
|
|
3270
3272
|
if (!fields_changed.includes(field_id)) {
|
|
3271
3273
|
fields_changed.push(field_id);
|
|
3274
|
+
|
|
3275
|
+
///// REFRESH PARAMETERS IN
|
|
3276
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
3277
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
3278
|
+
// for (const [key, exp] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
3279
|
+
// if (exp.includes(field_id)) {
|
|
3280
|
+
// let ret = await func.expression.get(SESSION_ID, exp, _dsSession, 'parameters');
|
|
3281
|
+
// _ds.in_parameters[key].value = ret.result;
|
|
3282
|
+
// }
|
|
3283
|
+
// }
|
|
3284
|
+
// }
|
|
3285
|
+
// }
|
|
3272
3286
|
}
|
|
3273
3287
|
if (!datasource_changed.includes(dataSource)) {
|
|
3274
3288
|
datasource_changed.push(dataSource);
|
|
@@ -3315,6 +3329,19 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
3315
3329
|
datasource_changed[0], // refresh the current datasource only
|
|
3316
3330
|
);
|
|
3317
3331
|
}
|
|
3332
|
+
// ///// REFRESH PARAMETERS IN
|
|
3333
|
+
// if (fields_changed.length) {
|
|
3334
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
3335
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
3336
|
+
// for (const [key, val] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
3337
|
+
// if (fields_changed.includes(val)) {
|
|
3338
|
+
// let ret = await func.expression.get(SESSION_ID, '@' + val, _dsSession, 'parameters');
|
|
3339
|
+
// _ds.in_parameters[val].value = ret.result;
|
|
3340
|
+
// }
|
|
3341
|
+
// }
|
|
3342
|
+
// }
|
|
3343
|
+
// }
|
|
3344
|
+
// }
|
|
3318
3345
|
}
|
|
3319
3346
|
resolve();
|
|
3320
3347
|
});
|
|
@@ -6632,7 +6659,7 @@ func.events.execute = async function (
|
|
|
6632
6659
|
var params_obj = {};
|
|
6633
6660
|
if (_prog?.properties?.progParams) {
|
|
6634
6661
|
for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
|
|
6635
|
-
if (val.data.dir
|
|
6662
|
+
if (!val.data.dir === 'in') continue;
|
|
6636
6663
|
if (typeof args.parameters_obj_inP?.[val.data.parameter] !== 'undefined') {
|
|
6637
6664
|
if (args.parameters_obj_inP?.[val.data.parameter].fx) {
|
|
6638
6665
|
let ret = await func.expression.get(SESSION_ID, args.parameters_obj_inP?.[val.data.parameter].fx, dsSession, 'parameters');
|
package/js/xuda-worker-bundle.js
CHANGED
|
@@ -1275,7 +1275,7 @@ func.datasource.create = async function (
|
|
|
1275
1275
|
rowIdP,
|
|
1276
1276
|
jobNoP,
|
|
1277
1277
|
calling_trigger_prop,
|
|
1278
|
-
|
|
1278
|
+
parameters_raw_obj,
|
|
1279
1279
|
NA_isInitP,
|
|
1280
1280
|
NA_callingSourceP,
|
|
1281
1281
|
calling_jobP,
|
|
@@ -1308,6 +1308,7 @@ func.datasource.create = async function (
|
|
|
1308
1308
|
parameters_obj_inP,
|
|
1309
1309
|
static_refreshP,
|
|
1310
1310
|
worker_id,
|
|
1311
|
+
parameters_raw_obj,
|
|
1311
1312
|
};
|
|
1312
1313
|
|
|
1313
1314
|
var IS_DATASOURCE_REFRESH = null;
|
|
@@ -1443,7 +1444,7 @@ func.datasource.create = async function (
|
|
|
1443
1444
|
args.rowIdP,
|
|
1444
1445
|
args.jobNoP,
|
|
1445
1446
|
args.calling_trigger_prop,
|
|
1446
|
-
|
|
1447
|
+
args.parameters_raw_obj,
|
|
1447
1448
|
null,
|
|
1448
1449
|
null,
|
|
1449
1450
|
args.calling_jobP,
|
|
@@ -1484,7 +1485,7 @@ func.datasource.create = async function (
|
|
|
1484
1485
|
return done(SESSION_ID, jsonP.dsSession, true);
|
|
1485
1486
|
});
|
|
1486
1487
|
};
|
|
1487
|
-
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop,
|
|
1488
|
+
func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, parentDataSourceNoP, containerIdP, rowIdP, jobNoP, calling_trigger_prop, parameters_raw_obj, NA_isInitP, callingSourceP, calling_jobP, NA_screen_dsP, is_panelP, parameters_obj_inP, static_refreshP, run_atP, worker_id) {
|
|
1488
1489
|
const set_parameters = async function () {
|
|
1489
1490
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
1490
1491
|
const get_Out_parameters = async function (fieldIdP, located_field_param_idxP, param_row_idP) {
|
|
@@ -1613,6 +1614,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
1613
1614
|
static_refreshP,
|
|
1614
1615
|
run_atP,
|
|
1615
1616
|
worker_id,
|
|
1617
|
+
parameters_raw_obj,
|
|
1616
1618
|
};
|
|
1617
1619
|
|
|
1618
1620
|
var dataSourceSession = null;
|
|
@@ -2531,7 +2533,7 @@ func.datasource.run_events_functions = async function (SESSION_ID, dataSourceSes
|
|
|
2531
2533
|
clearInterval(interval);
|
|
2532
2534
|
resolve(job_num);
|
|
2533
2535
|
}
|
|
2534
|
-
if (i >
|
|
2536
|
+
if (i > 50) {
|
|
2535
2537
|
console.error('deadlock detected');
|
|
2536
2538
|
clearInterval(interval);
|
|
2537
2539
|
resolve(job_num);
|
|
@@ -3269,6 +3271,18 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
3269
3271
|
|
|
3270
3272
|
if (!fields_changed.includes(field_id)) {
|
|
3271
3273
|
fields_changed.push(field_id);
|
|
3274
|
+
|
|
3275
|
+
///// REFRESH PARAMETERS IN
|
|
3276
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
3277
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
3278
|
+
// for (const [key, exp] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
3279
|
+
// if (exp.includes(field_id)) {
|
|
3280
|
+
// let ret = await func.expression.get(SESSION_ID, exp, _dsSession, 'parameters');
|
|
3281
|
+
// _ds.in_parameters[key].value = ret.result;
|
|
3282
|
+
// }
|
|
3283
|
+
// }
|
|
3284
|
+
// }
|
|
3285
|
+
// }
|
|
3272
3286
|
}
|
|
3273
3287
|
if (!datasource_changed.includes(dataSource)) {
|
|
3274
3288
|
datasource_changed.push(dataSource);
|
|
@@ -3315,6 +3329,19 @@ func.datasource.update = async function (SESSION_ID, datasource_changes, update_
|
|
|
3315
3329
|
datasource_changed[0], // refresh the current datasource only
|
|
3316
3330
|
);
|
|
3317
3331
|
}
|
|
3332
|
+
// ///// REFRESH PARAMETERS IN
|
|
3333
|
+
// if (fields_changed.length) {
|
|
3334
|
+
// for (const [_dsSession, _ds] of Object.entries(_session.DS_GLB)) {
|
|
3335
|
+
// if (_ds.args.parameters_raw_obj) {
|
|
3336
|
+
// for (const [key, val] of Object.entries(_ds.args.parameters_raw_obj)) {
|
|
3337
|
+
// if (fields_changed.includes(val)) {
|
|
3338
|
+
// let ret = await func.expression.get(SESSION_ID, '@' + val, _dsSession, 'parameters');
|
|
3339
|
+
// _ds.in_parameters[val].value = ret.result;
|
|
3340
|
+
// }
|
|
3341
|
+
// }
|
|
3342
|
+
// }
|
|
3343
|
+
// }
|
|
3344
|
+
// }
|
|
3318
3345
|
}
|
|
3319
3346
|
resolve();
|
|
3320
3347
|
});
|
|
@@ -6632,7 +6659,7 @@ func.events.execute = async function (
|
|
|
6632
6659
|
var params_obj = {};
|
|
6633
6660
|
if (_prog?.properties?.progParams) {
|
|
6634
6661
|
for await (const [key, val] of Object.entries(_prog.properties.progParams)) {
|
|
6635
|
-
if (val.data.dir
|
|
6662
|
+
if (!val.data.dir === 'in') continue;
|
|
6636
6663
|
if (typeof args.parameters_obj_inP?.[val.data.parameter] !== 'undefined') {
|
|
6637
6664
|
if (args.parameters_obj_inP?.[val.data.parameter].fx) {
|
|
6638
6665
|
let ret = await func.expression.get(SESSION_ID, args.parameters_obj_inP?.[val.data.parameter].fx, dsSession, 'parameters');
|