@sumaris-net/ngx-components 1.12.6 → 1.12.10

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.
@@ -566,7 +566,7 @@
566
566
  var nextOffset = (opts && opts.offset || 0) + pageData.length;
567
567
  if (nextOffset < total) {
568
568
  result.fetchMore = function (_) { return __awaiter(_this, void 0, void 0, function () {
569
- return __generator(this, function (_a) {
569
+ return __generator(this, function (_b) {
570
570
  return [2 /*return*/, suggestFromArray(filteredItems, undefined /*OPTIMISATION: already applied*/, Object.assign(Object.assign({}, opts), { offset: nextOffset, skipSort: true, excludedIds: undefined // OPTIMISATION: already filtered
571
571
  }))];
572
572
  });
@@ -738,7 +738,8 @@
738
738
  }
739
739
  function splitByProperty(array, propertyName) {
740
740
  return (array || []).reduce(function (res, value) {
741
- var key = value === null || value === void 0 ? void 0 : value[propertyName];
741
+ var _a;
742
+ var key = (_a = value) === null || _a === void 0 ? void 0 : _a[propertyName];
742
743
  if (isNotNil(key)) {
743
744
  res[key] = value;
744
745
  }
@@ -4386,6 +4387,21 @@
4386
4387
  { type: FormErrorTranslator },
4387
4388
  { type: i0.ChangeDetectorRef }
4388
4389
  ]; };
4390
+ var FormControlGetPipe = /** @class */ (function () {
4391
+ function FormControlGetPipe() {
4392
+ }
4393
+ FormControlGetPipe.prototype.transform = function (form, path) {
4394
+ return form.get(path);
4395
+ };
4396
+ return FormControlGetPipe;
4397
+ }());
4398
+ FormControlGetPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function FormControlGetPipe_Factory() { return new FormControlGetPipe(); }, token: FormControlGetPipe, providedIn: "root" });
4399
+ FormControlGetPipe.decorators = [
4400
+ { type: i0.Pipe, args: [{
4401
+ name: 'formGet'
4402
+ },] },
4403
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
4404
+ ];
4389
4405
 
4390
4406
  var SharedPipesModule = /** @class */ (function () {
4391
4407
  function SharedPipesModule() {
@@ -4431,7 +4447,8 @@
4431
4447
  TranslateContextPipe,
4432
4448
  TranslatablePipe,
4433
4449
  NgInitDirective,
4434
- FormErrorTranslatePipe
4450
+ FormErrorTranslatePipe,
4451
+ FormControlGetPipe
4435
4452
  ],
4436
4453
  exports: [
4437
4454
  PropertyGetPipe,
@@ -4465,7 +4482,8 @@
4465
4482
  TranslateContextPipe,
4466
4483
  TranslatablePipe,
4467
4484
  NgInitDirective,
4468
- FormErrorTranslatePipe
4485
+ FormErrorTranslatePipe,
4486
+ FormControlGetPipe
4469
4487
  ]
4470
4488
  },] }
4471
4489
  ];
@@ -25576,7 +25594,7 @@
25576
25594
  event === null || event === void 0 ? void 0 : event.preventDefault();
25577
25595
  if (!this._enabled || isEmptyArray(rows))
25578
25596
  return [2 /*return*/, 0]; // Skip is disabled, or no rows to delete
25579
- if (this.loading && (!opts || opts.skipIfLoading !== true)) {
25597
+ if (this.loading && (!opts || opts.skipIfLoading !== false)) {
25580
25598
  console.warn('[app-table] Skip deleteRows() because table is busy (loading). Use opts.skipLoading = false to force deletion');
25581
25599
  return [2 /*return*/, 0]; // Skip if loading
25582
25600
  }
@@ -25669,6 +25687,8 @@
25669
25687
  case 1:
25670
25688
  _e.sent();
25671
25689
  row = this.dataSource.getRow(id);
25690
+ if (!row)
25691
+ return [2 /*return*/, false];
25672
25692
  return [2 /*return*/, this.clickRow(null, row)];
25673
25693
  }
25674
25694
  });
@@ -25694,7 +25714,9 @@
25694
25714
  case 2:
25695
25715
  row = ((_e.sent()) || [])
25696
25716
  .find(function (row) { return _this.equals(row.currentData, data); });
25697
- return [2 /*return*/, row && this.clickRow(null, row)];
25717
+ if (!row)
25718
+ return [2 /*return*/, false];
25719
+ return [2 /*return*/, this.clickRow(null, row)];
25698
25720
  }
25699
25721
  });
25700
25722
  });
@@ -30744,6 +30766,7 @@
30744
30766
  exports.FormArrayHelper = FormArrayHelper;
30745
30767
  exports.FormButtonsBarComponent = FormButtonsBarComponent;
30746
30768
  exports.FormButtonsBarToken = FormButtonsBarToken;
30769
+ exports.FormControlGetPipe = FormControlGetPipe;
30747
30770
  exports.FormErrorTranslatePipe = FormErrorTranslatePipe;
30748
30771
  exports.FormErrorTranslator = FormErrorTranslator;
30749
30772
  exports.FormFieldValuesHolder = FormFieldValuesHolder;