@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.
@@ -32134,6 +32134,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32134
32134
  let field_prop;
32135
32135
  let bind_field_id;
32136
32136
  let bind_field_exp;
32137
+ const input_field_type = $elm.attr('type');
32137
32138
 
32138
32139
  const get_bind_field = async function (field_id) {
32139
32140
  if (['_FOR_VAL', '_FOR_KEY'].includes(field_id)) {
@@ -32203,7 +32204,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32203
32204
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[_dsP];
32204
32205
 
32205
32206
  // update array for checkbox that not in xu-for
32206
- if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'checkbox' && val_is_reference_field) {
32207
+ if (field_prop.props.fieldType === 'array' && input_field_type === 'checkbox' && val_is_reference_field) {
32207
32208
  let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
32208
32209
  let value_from_getter = bind.getter($elm[0]);
32209
32210
  let value;
@@ -32226,7 +32227,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32226
32227
  }
32227
32228
 
32228
32229
  // update array for radio that not in xu-for
32229
- if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
32230
+ if (field_prop.props.fieldType === 'array' && input_field_type === 'radio' && val_is_reference_field) {
32230
32231
  let value_from_getter = bind.getter($elm[0]);
32231
32232
 
32232
32233
  let datasource_changes = {
@@ -32247,7 +32248,7 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32247
32248
  // }
32248
32249
 
32249
32250
  if (field_prop.props.fieldType === 'object') {
32250
- value = bind.getter($elm[0]);
32251
+ value = await func.common.get_cast_val(SESSION_ID, 'xu-bind', 'value', input_field_type, bind.getter($elm[0]));
32251
32252
  }
32252
32253
 
32253
32254
  if (!_ds.currentRecordId) return;
@@ -32320,16 +32321,13 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32320
32321
  } else {
32321
32322
  value = false;
32322
32323
  }
32323
- }
32324
-
32325
- if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
32324
+ } else if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && $elm.attr('value')) {
32326
32325
  if (value.includes($elm.attr('value'))) {
32327
32326
  value = $elm.attr('value');
32328
32327
  } else {
32329
32328
  value = false;
32330
32329
  }
32331
- }
32332
- if (field_prop.props.fieldType === 'object' && $elm.attr('type') === 'text' && val.value.split('.').length > 1) {
32330
+ } else if (field_prop.props.fieldType === 'object' && val.value.split('.').length > 1) {
32333
32331
  let str = val.value.replace(bind_field_id, '(' + JSON.stringify(value) + ')');
32334
32332
  value = eval(str);
32335
32333
  }