@xuda.io/runtime-bundle 1.0.757 → 1.0.759
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
|
@@ -12465,6 +12465,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12465
12465
|
let field_prop;
|
|
12466
12466
|
let bind_field_id;
|
|
12467
12467
|
let bind_field_exp;
|
|
12468
|
+
const input_field_type = $elm.attr('type');
|
|
12468
12469
|
|
|
12469
12470
|
const get_bind_field = async function (field_id) {
|
|
12470
12471
|
if (['_FOR_VAL', '_FOR_KEY'].includes(field_id)) {
|
|
@@ -12534,7 +12535,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12534
12535
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
12535
12536
|
|
|
12536
12537
|
// update array for checkbox that not in xu-for
|
|
12537
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
12538
|
+
if (field_prop.props.fieldType === 'array' && input_field_type === 'checkbox' && val_is_reference_field) {
|
|
12538
12539
|
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
12539
12540
|
let value_from_getter = bind.getter($elm[0]);
|
|
12540
12541
|
let value;
|
|
@@ -12557,7 +12558,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12557
12558
|
}
|
|
12558
12559
|
|
|
12559
12560
|
// update array for radio that not in xu-for
|
|
12560
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
12561
|
+
if (field_prop.props.fieldType === 'array' && input_field_type === 'radio' && val_is_reference_field) {
|
|
12561
12562
|
let value_from_getter = bind.getter($elm[0]);
|
|
12562
12563
|
|
|
12563
12564
|
let datasource_changes = {
|
|
@@ -12578,7 +12579,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12578
12579
|
// }
|
|
12579
12580
|
|
|
12580
12581
|
if (field_prop.props.fieldType === 'object') {
|
|
12581
|
-
value = bind.getter($elm[0]);
|
|
12582
|
+
value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', input_field_type, bind.getter($elm[0]));
|
|
12582
12583
|
}
|
|
12583
12584
|
|
|
12584
12585
|
if (!_ds.currentRecordId) return;
|
|
@@ -12651,16 +12652,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
12651
12652
|
} else {
|
|
12652
12653
|
value = false;
|
|
12653
12654
|
}
|
|
12654
|
-
}
|
|
12655
|
-
|
|
12656
|
-
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
|
|
12655
|
+
} else if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
|
|
12657
12656
|
if (value.includes($elm.attr('value'))) {
|
|
12658
12657
|
value = $elm.attr('value');
|
|
12659
12658
|
} else {
|
|
12660
12659
|
value = false;
|
|
12661
12660
|
}
|
|
12662
|
-
}
|
|
12663
|
-
if (field_prop.props.fieldType === 'object' && $elm.attr('type') === 'text' && val.value.split('.').length > 1) {
|
|
12661
|
+
} else if (field_prop.props.fieldType === 'object' && val.value.split('.').length > 1) {
|
|
12664
12662
|
let str = val.value.replace(bind_field_id, '(' + JSON.stringify(value) + ')');
|
|
12665
12663
|
value = eval(str);
|
|
12666
12664
|
}
|
|
@@ -10175,6 +10175,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10175
10175
|
let field_prop;
|
|
10176
10176
|
let bind_field_id;
|
|
10177
10177
|
let bind_field_exp;
|
|
10178
|
+
const input_field_type = $elm.attr('type');
|
|
10178
10179
|
|
|
10179
10180
|
const get_bind_field = async function (field_id) {
|
|
10180
10181
|
if (['_FOR_VAL', '_FOR_KEY'].includes(field_id)) {
|
|
@@ -10244,7 +10245,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10244
10245
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
|
|
10245
10246
|
|
|
10246
10247
|
// update array for checkbox that not in xu-for
|
|
10247
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
10248
|
+
if (field_prop.props.fieldType === 'array' && input_field_type === 'checkbox' && val_is_reference_field) {
|
|
10248
10249
|
let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
|
|
10249
10250
|
let value_from_getter = bind.getter($elm[0]);
|
|
10250
10251
|
let value;
|
|
@@ -10267,7 +10268,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10267
10268
|
}
|
|
10268
10269
|
|
|
10269
10270
|
// update array for radio that not in xu-for
|
|
10270
|
-
if (field_prop.props.fieldType === 'array' &&
|
|
10271
|
+
if (field_prop.props.fieldType === 'array' && input_field_type === 'radio' && val_is_reference_field) {
|
|
10271
10272
|
let value_from_getter = bind.getter($elm[0]);
|
|
10272
10273
|
|
|
10273
10274
|
let datasource_changes = {
|
|
@@ -10288,7 +10289,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10288
10289
|
// }
|
|
10289
10290
|
|
|
10290
10291
|
if (field_prop.props.fieldType === 'object') {
|
|
10291
|
-
value = bind.getter($elm[0]);
|
|
10292
|
+
value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', input_field_type, bind.getter($elm[0]));
|
|
10292
10293
|
}
|
|
10293
10294
|
|
|
10294
10295
|
if (!_ds.currentRecordId) return;
|
|
@@ -10361,16 +10362,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
|
|
|
10361
10362
|
} else {
|
|
10362
10363
|
value = false;
|
|
10363
10364
|
}
|
|
10364
|
-
}
|
|
10365
|
-
|
|
10366
|
-
if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
|
|
10365
|
+
} else if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
|
|
10367
10366
|
if (value.includes($elm.attr('value'))) {
|
|
10368
10367
|
value = $elm.attr('value');
|
|
10369
10368
|
} else {
|
|
10370
10369
|
value = false;
|
|
10371
10370
|
}
|
|
10372
|
-
}
|
|
10373
|
-
if (field_prop.props.fieldType === 'object' && $elm.attr('type') === 'text' && val.value.split('.').length > 1) {
|
|
10371
|
+
} else if (field_prop.props.fieldType === 'object' && val.value.split('.').length > 1) {
|
|
10374
10372
|
let str = val.value.replace(bind_field_id, '(' + JSON.stringify(value) + ')');
|
|
10375
10373
|
value = eval(str);
|
|
10376
10374
|
}
|