@xuda.io/runtime-bundle 1.0.676 → 1.0.677
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-slim.js
CHANGED
|
@@ -11510,24 +11510,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
11510
11510
|
.filter(function () {
|
|
11511
11511
|
// // look if the changed field include in the calling in parameters
|
|
11512
11512
|
let parameter_in_filed_id;
|
|
11513
|
-
// const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
|
|
11514
|
-
// if (_$callingContainer) {
|
|
11515
|
-
// const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
|
|
11516
|
-
// if (_source_xuAttributes) {
|
|
11517
|
-
// for (const [attr, value] of Object.entries(_source_xuAttributes)) {
|
|
11518
|
-
// if (value && typeof value === 'string' && value.includes(val_field)) {
|
|
11519
|
-
// const pattern = /xu-exp:(\w+)/;
|
|
11520
|
-
// const match = attr.match(pattern);
|
|
11521
|
-
// if (match) {
|
|
11522
|
-
// parameter_in_filed_id = attr.split(':')[1];
|
|
11523
|
-
// } else {
|
|
11524
|
-
// parameter_in_filed_id = attr;
|
|
11525
|
-
// }
|
|
11526
|
-
// break;
|
|
11527
|
-
// }
|
|
11528
|
-
// }
|
|
11529
|
-
// }
|
|
11530
|
-
// }
|
|
11531
11513
|
|
|
11532
11514
|
let attr = [];
|
|
11533
11515
|
|
|
@@ -12305,7 +12287,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12305
12287
|
'xu-bind': async function ($elm, val) {
|
|
12306
12288
|
if (is_skeleton) return;
|
|
12307
12289
|
|
|
12308
|
-
// let view_field_id = val.value;
|
|
12309
12290
|
let val_is_reference_field = false;
|
|
12310
12291
|
|
|
12311
12292
|
let _prog_id = $elm.data().xuData.paramsP.prog_id;
|
|
@@ -12399,17 +12380,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12399
12380
|
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
12400
12381
|
}
|
|
12401
12382
|
|
|
12402
|
-
// update array for
|
|
12383
|
+
// update array for radio that not in xu-for
|
|
12403
12384
|
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
|
|
12404
|
-
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
12405
12385
|
let value_from_getter = bind.getter($elm[0]);
|
|
12406
|
-
// let value;
|
|
12407
|
-
// if (arr_value_before_cast.includes(value_from_getter)) {
|
|
12408
|
-
// value = arr_value_before_cast.filter((item) => !_.isEqual(item, value_from_getter));
|
|
12409
|
-
// } else {
|
|
12410
|
-
// arr_value_before_cast.push(value_from_getter);
|
|
12411
|
-
// value = arr_value_before_cast;
|
|
12412
|
-
// }
|
|
12413
12386
|
|
|
12414
12387
|
let datasource_changes = {
|
|
12415
12388
|
[_dsP]: {
|
|
@@ -12870,6 +12843,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12870
12843
|
const trigger = val.key.split('xu-on:')[1].toLowerCase();
|
|
12871
12844
|
$elm.on(trigger, async function (evt) {
|
|
12872
12845
|
for await (const [key, val] of Object.entries($elm.data().xuAttributes['xu-on:' + evt.type])) {
|
|
12846
|
+
if (!_.isEmpty(val.props.condition)) {
|
|
12847
|
+
const expCond = await func.expression.get(SESSION_ID, val.props.condition, paramsP.dsSessionP, 'condition', paramsP.recordid); // execute expression
|
|
12848
|
+
if (!expCond.result) continue;
|
|
12849
|
+
}
|
|
12850
|
+
|
|
12873
12851
|
if (val.event_modifiers && evt[val.event_modifiers]) {
|
|
12874
12852
|
evt[val.event_modifiers]();
|
|
12875
12853
|
}
|
|
@@ -9232,24 +9232,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9232
9232
|
.filter(function () {
|
|
9233
9233
|
// // look if the changed field include in the calling in parameters
|
|
9234
9234
|
let parameter_in_filed_id;
|
|
9235
|
-
// const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
|
|
9236
|
-
// if (_$callingContainer) {
|
|
9237
|
-
// const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
|
|
9238
|
-
// if (_source_xuAttributes) {
|
|
9239
|
-
// for (const [attr, value] of Object.entries(_source_xuAttributes)) {
|
|
9240
|
-
// if (value && typeof value === 'string' && value.includes(val_field)) {
|
|
9241
|
-
// const pattern = /xu-exp:(\w+)/;
|
|
9242
|
-
// const match = attr.match(pattern);
|
|
9243
|
-
// if (match) {
|
|
9244
|
-
// parameter_in_filed_id = attr.split(':')[1];
|
|
9245
|
-
// } else {
|
|
9246
|
-
// parameter_in_filed_id = attr;
|
|
9247
|
-
// }
|
|
9248
|
-
// break;
|
|
9249
|
-
// }
|
|
9250
|
-
// }
|
|
9251
|
-
// }
|
|
9252
|
-
// }
|
|
9253
9235
|
|
|
9254
9236
|
let attr = [];
|
|
9255
9237
|
|
|
@@ -10027,7 +10009,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10027
10009
|
'xu-bind': async function ($elm, val) {
|
|
10028
10010
|
if (is_skeleton) return;
|
|
10029
10011
|
|
|
10030
|
-
// let view_field_id = val.value;
|
|
10031
10012
|
let val_is_reference_field = false;
|
|
10032
10013
|
|
|
10033
10014
|
let _prog_id = $elm.data().xuData.paramsP.prog_id;
|
|
@@ -10121,17 +10102,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10121
10102
|
return await func.datasource.update(SESSION_ID, datasource_changes);
|
|
10122
10103
|
}
|
|
10123
10104
|
|
|
10124
|
-
// update array for
|
|
10105
|
+
// update array for radio that not in xu-for
|
|
10125
10106
|
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
|
|
10126
|
-
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
10127
10107
|
let value_from_getter = bind.getter($elm[0]);
|
|
10128
|
-
// let value;
|
|
10129
|
-
// if (arr_value_before_cast.includes(value_from_getter)) {
|
|
10130
|
-
// value = arr_value_before_cast.filter((item) => !_.isEqual(item, value_from_getter));
|
|
10131
|
-
// } else {
|
|
10132
|
-
// arr_value_before_cast.push(value_from_getter);
|
|
10133
|
-
// value = arr_value_before_cast;
|
|
10134
|
-
// }
|
|
10135
10108
|
|
|
10136
10109
|
let datasource_changes = {
|
|
10137
10110
|
[_dsP]: {
|
|
@@ -10592,6 +10565,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10592
10565
|
const trigger = val.key.split('xu-on:')[1].toLowerCase();
|
|
10593
10566
|
$elm.on(trigger, async function (evt) {
|
|
10594
10567
|
for await (const [key, val] of Object.entries($elm.data().xuAttributes['xu-on:' + evt.type])) {
|
|
10568
|
+
if (!_.isEmpty(val.props.condition)) {
|
|
10569
|
+
const expCond = await func.expression.get(SESSION_ID, val.props.condition, paramsP.dsSessionP, 'condition', paramsP.recordid); // execute expression
|
|
10570
|
+
if (!expCond.result) continue;
|
|
10571
|
+
}
|
|
10572
|
+
|
|
10595
10573
|
if (val.event_modifiers && evt[val.event_modifiers]) {
|
|
10596
10574
|
evt[val.event_modifiers]();
|
|
10597
10575
|
}
|