@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.
@@ -31191,24 +31191,6 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
31191
31191
  .filter(function () {
31192
31192
  // // look if the changed field include in the calling in parameters
31193
31193
  let parameter_in_filed_id;
31194
- // const _$callingContainer = $(this).data()?.xuData?.paramsP?.$callingContainerP;
31195
- // if (_$callingContainer) {
31196
- // const _source_xuAttributes = _$callingContainer.data()?.xuAttributes;
31197
- // if (_source_xuAttributes) {
31198
- // for (const [attr, value] of Object.entries(_source_xuAttributes)) {
31199
- // if (value && typeof value === 'string' && value.includes(val_field)) {
31200
- // const pattern = /xu-exp:(\w+)/;
31201
- // const match = attr.match(pattern);
31202
- // if (match) {
31203
- // parameter_in_filed_id = attr.split(':')[1];
31204
- // } else {
31205
- // parameter_in_filed_id = attr;
31206
- // }
31207
- // break;
31208
- // }
31209
- // }
31210
- // }
31211
- // }
31212
31194
 
31213
31195
  let attr = [];
31214
31196
 
@@ -31986,7 +31968,6 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
31986
31968
  'xu-bind': async function ($elm, val) {
31987
31969
  if (is_skeleton) return;
31988
31970
 
31989
- // let view_field_id = val.value;
31990
31971
  let val_is_reference_field = false;
31991
31972
 
31992
31973
  let _prog_id = $elm.data().xuData.paramsP.prog_id;
@@ -32080,17 +32061,9 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32080
32061
  return await func.datasource.update(SESSION_ID, datasource_changes);
32081
32062
  }
32082
32063
 
32083
- // update array for checkbox that not in xu-for
32064
+ // update array for radio that not in xu-for
32084
32065
  if (field_prop.props.fieldType === 'array' && $elm.attr('type') === 'radio' && val_is_reference_field) {
32085
- let arr_value_before_cast = _.clone((await func.datasource.get_value(SESSION_ID, bind_field_id, _dsP, _ds.currentRecordId)).ret.value);
32086
32066
  let value_from_getter = bind.getter($elm[0]);
32087
- // let value;
32088
- // if (arr_value_before_cast.includes(value_from_getter)) {
32089
- // value = arr_value_before_cast.filter((item) => !_.isEqual(item, value_from_getter));
32090
- // } else {
32091
- // arr_value_before_cast.push(value_from_getter);
32092
- // value = arr_value_before_cast;
32093
- // }
32094
32067
 
32095
32068
  let datasource_changes = {
32096
32069
  [_dsP]: {
@@ -32551,6 +32524,11 @@ func.UI.screen.execute_xu_functions = async function (SESSION_ID, is_skeleton, $
32551
32524
  const trigger = val.key.split('xu-on:')[1].toLowerCase();
32552
32525
  $elm.on(trigger, async function (evt) {
32553
32526
  for await (const [key, val] of Object.entries($elm.data().xuAttributes['xu-on:' + evt.type])) {
32527
+ if (!_.isEmpty(val.props.condition)) {
32528
+ const expCond = await func.expression.get(SESSION_ID, val.props.condition, paramsP.dsSessionP, 'condition', paramsP.recordid); // execute expression
32529
+ if (!expCond.result) continue;
32530
+ }
32531
+
32554
32532
  if (val.event_modifiers && evt[val.event_modifiers]) {
32555
32533
  evt[val.event_modifiers]();
32556
32534
  }