@sumaris-net/ngx-components 0.16.8 → 0.17.1

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.
@@ -1282,7 +1282,7 @@
1282
1282
  });
1283
1283
  MatAutocompleteField.prototype.ngOnInit = function () {
1284
1284
  var _this = this;
1285
- var _a;
1285
+ var _a, _b;
1286
1286
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
1287
1287
  if (!this.formControl)
1288
1288
  throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-autocomplete-field>.');
@@ -1325,12 +1325,11 @@
1325
1325
  // Default comparator (only need when using mat-select)
1326
1326
  if (!this.searchable && !this.compareWith)
1327
1327
  this.compareWith = function (o1, o2) { return o1 && o2 && o1.id === o2.id; };
1328
- var classList = !this.panelWidth && this.classList && this.classList.split(' ');
1329
- this.panelWidth = this.panelWidth || (classList
1330
- && (classList.includes('min-width-medium') && '300px')
1328
+ var classList = (_b = this.classList) === null || _b === void 0 ? void 0 : _b.split(' ');
1329
+ this.panelWidth = this.panelWidth || (classList && ((classList.includes('min-width-medium') && '300px')
1331
1330
  || (classList.includes('min-width-large') && '400px')
1332
1331
  || (classList.includes('min-width-xlarge') && '450px')
1333
- || (classList.includes('mat-autocomplete-panel-full-size') && '100vw'));
1332
+ || (classList.includes('mat-autocomplete-panel-full-size') && '100vw')));
1334
1333
  this.debounceTime = toNumber(this.debounceTime, 250);
1335
1334
  this.suggestLengthThreshold = this.suggestLengthThreshold || 0;
1336
1335
  // No suggestFn: filter on the given items
@@ -24519,7 +24518,8 @@
24519
24518
  });
24520
24519
  Object.defineProperty(AppTabEditor.prototype, "dirty", {
24521
24520
  get: function () {
24522
- return this._dirty || (this._children && this._children.find(function (c) { return c.dirty; }) && true);
24521
+ var _a;
24522
+ return this._dirty || (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.dirty; })) !== -1) || false;
24523
24523
  },
24524
24524
  enumerable: false,
24525
24525
  configurable: true
@@ -24530,7 +24530,7 @@
24530
24530
  */
24531
24531
  get: function () {
24532
24532
  // Important: Should be not invalid AND not pending, so use '!valid' (DO NOT use 'invalid')
24533
- return !this._children || !this._children.filter(function (c) { return c.enabled; }).find(function (c) { return !c.valid; }) && true || false;
24533
+ return !this._children || this._children.findIndex(function (c) { return c.enabled && !c.valid; }) === -1;
24534
24534
  },
24535
24535
  enumerable: false,
24536
24536
  configurable: true
@@ -24538,7 +24538,7 @@
24538
24538
  Object.defineProperty(AppTabEditor.prototype, "invalid", {
24539
24539
  get: function () {
24540
24540
  var _a;
24541
- return ((_a = this._children) === null || _a === void 0 ? void 0 : _a.filter(function (c) { return c.enabled; }).find(function (c) { return c.invalid; })) && true || false;
24541
+ return (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.invalid; })) !== -1) || false;
24542
24542
  },
24543
24543
  enumerable: false,
24544
24544
  configurable: true
@@ -24546,7 +24546,7 @@
24546
24546
  Object.defineProperty(AppTabEditor.prototype, "pending", {
24547
24547
  get: function () {
24548
24548
  var _a;
24549
- return ((_a = this._children) === null || _a === void 0 ? void 0 : _a.filter(function (c) { return c.enabled; }).find(function (c) { return c.pending; })) && true || false;
24549
+ return (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.pending; })) !== -1) || false;
24550
24550
  },
24551
24551
  enumerable: false,
24552
24552
  configurable: true
@@ -24554,7 +24554,7 @@
24554
24554
  Object.defineProperty(AppTabEditor.prototype, "loading", {
24555
24555
  get: function () {
24556
24556
  var _a;
24557
- return this._loading || ((_a = this._children) === null || _a === void 0 ? void 0 : _a.filter(function (c) { return c.enabled; }).find(function (c) { return c.loading; })) && true || false;
24557
+ return this._loading || (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.loading; })) !== -1) || false;
24558
24558
  },
24559
24559
  enumerable: false,
24560
24560
  configurable: true