@nova-ui/dashboards 11.11.0-3141 → 11.12.0-3267

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.
@@ -11114,7 +11114,7 @@
11114
11114
  return;
11115
11115
  }
11116
11116
  var dataFields = (isUndefined__default['default'](event.payload.result) ? event.payload : (event.payload.result || {})).dataFields;
11117
- _this.dataSourceFields = dataFields;
11117
+ _this.dataSourceFields = dataFields !== null && dataFields !== void 0 ? dataFields : [];
11118
11118
  var disableColumnGeneration = (_d = (_c = (_b = _this.dataSource) === null || _b === void 0 ? void 0 : _b.features) === null || _c === void 0 ? void 0 : _c.getFeatureConfig(exports.WellKnownDataSourceFeatures.DisableTableColumnGeneration)) === null || _d === void 0 ? void 0 : _d.enabled;
11119
11119
  var columns = _this.mergeColumns(_this.dataSourceFields, _this.getColumns());
11120
11120
  if ((columns === null || columns === void 0 ? void 0 : columns.length) || disableColumnGeneration) {
@@ -13358,15 +13358,21 @@
13358
13358
  var templateObject_1$e;
13359
13359
 
13360
13360
  /**
13361
- * Checks whether given form has a field that should be visually marked as invalid
13361
+ * Checks whether given form has a field that should be visually marked as invalid.
13362
+ * Form is not in an error state if it's untouched even if it's invalid at that moment,
13363
+ * a user must first interact with the form before it can be considered as invalid.
13364
+ * 'invalid' form property should not be used for the purpose of this function,
13365
+ * it can be affected by its children form statuses, which can be considered as valid (untouched).
13362
13366
  *
13363
13367
  * @param parent
13364
13368
  */
13365
13369
  function hasControlInErrorState(parent) {
13366
13370
  var e_1, _a;
13371
+ // FormGroup/FormArray/FormControl is not in an error state if it's either valid or untouched
13367
13372
  if (parent.valid || parent.untouched) {
13368
13373
  return false;
13369
13374
  }
13375
+ // FormGroup is considred valid if every child form is either valid or untouched
13370
13376
  if (parent instanceof forms.FormGroup) {
13371
13377
  try {
13372
13378
  for (var _b = __values(Object.keys(parent.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -13385,6 +13391,7 @@
13385
13391
  finally { if (e_1) throw e_1.error; }
13386
13392
  }
13387
13393
  }
13394
+ // FormArray is considred valid if every child form is either valid or untouched
13388
13395
  if (parent instanceof forms.FormArray) {
13389
13396
  for (var i = 0; i < parent.length; i++) {
13390
13397
  var control = parent.at(i);
@@ -13393,7 +13400,8 @@
13393
13400
  }
13394
13401
  }
13395
13402
  }
13396
- return ((parent.touched || parent.dirty) && parent.invalid);
13403
+ // Errors property contains only errors related to the currecnt form and it's not affected by any child forms
13404
+ return ((parent.touched || parent.dirty) && !!parent.errors);
13397
13405
  }
13398
13406
 
13399
13407
  var WidgetEditorAccordionFormStatePipe = /** @class */ (function () {