@sumaris-net/ngx-components 1.6.11 → 1.6.15

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.
@@ -3052,16 +3052,10 @@
3052
3052
  function TranslateContextPipe(translate) {
3053
3053
  this.translate = translate;
3054
3054
  }
3055
- TranslateContextPipe.prototype.transform = function (query) {
3056
- var params = [];
3057
- for (var _i = 1; _i < arguments.length; _i++) {
3058
- params[_i - 1] = arguments[_i];
3059
- }
3055
+ TranslateContextPipe.prototype.transform = function (query, context, interpolateParams) {
3060
3056
  if (!query || !query.length)
3061
3057
  return query;
3062
- var suffix = params && params.length ? params[0] : '';
3063
- params = suffix && params.slice(1);
3064
- return this.translate.instant(query, suffix, params);
3058
+ return this.translate.instant(query, context, interpolateParams);
3065
3059
  };
3066
3060
  return TranslateContextPipe;
3067
3061
  }());
@@ -8376,11 +8370,37 @@
8376
8370
  function MatBadgeIconDirective(el) {
8377
8371
  this.el = el;
8378
8372
  }
8373
+ Object.defineProperty(MatBadgeIconDirective.prototype, "matIcon", {
8374
+ set: function (icon) {
8375
+ if (this._matIcon !== icon) {
8376
+ this._matIcon = icon;
8377
+ this.updateView();
8378
+ }
8379
+ },
8380
+ enumerable: false,
8381
+ configurable: true
8382
+ });
8383
+ Object.defineProperty(MatBadgeIconDirective.prototype, "ionIcon", {
8384
+ set: function (icon) {
8385
+ if (this._ionIcon !== icon) {
8386
+ this._ionIcon = icon;
8387
+ this.updateView();
8388
+ }
8389
+ },
8390
+ enumerable: false,
8391
+ configurable: true
8392
+ });
8379
8393
  MatBadgeIconDirective.prototype.ngOnInit = function () {
8394
+ this.updateView();
8395
+ };
8396
+ MatBadgeIconDirective.prototype.updateView = function () {
8380
8397
  this.size = this.size || 'medium';
8381
8398
  this.color = this.color || 'primary';
8382
8399
  if (this.color === 'warn')
8383
8400
  this.color = 'warning';
8401
+ var badge = this.el.nativeElement.querySelector('.mat-badge-content');
8402
+ if (!badge)
8403
+ return;
8384
8404
  var fontSize;
8385
8405
  switch (this.size) {
8386
8406
  case 'large':
@@ -8393,7 +8413,6 @@
8393
8413
  fontSize = '16px';
8394
8414
  break;
8395
8415
  }
8396
- var badge = this.el.nativeElement.querySelector('.mat-badge-content');
8397
8416
  badge.style.display = 'flex';
8398
8417
  badge.style.alignItems = 'center';
8399
8418
  badge.style.justifyContent = 'center';
@@ -8407,11 +8426,11 @@
8407
8426
  badge.style.background = "var(--ion-color-" + this.color + ")";
8408
8427
  badge.style.color = "var(--ion-color-" + this.color + "-contrast)";
8409
8428
  }
8410
- if (this.matIcon) {
8411
- badge.innerHTML = "<i class=\"material-icons\" style=\"font-size: " + fontSize + ";\">" + this.matIcon + "</i>";
8429
+ if (this._matIcon) {
8430
+ badge.innerHTML = "<i class=\"material-icons\" style=\"font-size: " + fontSize + ";\">" + this._matIcon + "</i>";
8412
8431
  }
8413
- else if (this.ionIcon) {
8414
- badge.innerHTML = "<ion-icon style=\"font-size: " + fontSize + "; pointer-events: none;\" name=\"" + this.ionIcon + "\"></ion-icon>";
8432
+ else if (this._ionIcon) {
8433
+ badge.innerHTML = "<ion-icon style=\"font-size: " + fontSize + "; pointer-events: none;\" name=\"" + this._ionIcon + "\"></ion-icon>";
8415
8434
  }
8416
8435
  };
8417
8436
  return MatBadgeIconDirective;
@@ -19580,13 +19599,18 @@
19580
19599
 
19581
19600
  var MatBadgeIconTestPage = /** @class */ (function () {
19582
19601
  function MatBadgeIconTestPage() {
19602
+ this.$dynamicIcon = new rxjs.BehaviorSubject('alert');
19583
19603
  }
19604
+ MatBadgeIconTestPage.prototype.changeIcon = function (event) {
19605
+ console.info(event);
19606
+ this.$dynamicIcon.next(event.value);
19607
+ };
19584
19608
  return MatBadgeIconTestPage;
19585
19609
  }());
19586
19610
  MatBadgeIconTestPage.decorators = [
19587
19611
  { type: i0.Component, args: [{
19588
19612
  selector: 'mat-badge-icon-test',
19589
- template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>matBadgeIcon directive</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <!-- small badge -->\n <p>\n <ion-text color=\"tertiary\">\n <span matBadge matIcon=\"check\"\n matBadgeSize=\"small\"\n matBadgeColor=\"accent\"\n matBadgeOverlap=\"false\">Small badge</span>\n </ion-text>\n </p>\n\n <!-- medium badge -->\n <p>\n <ion-text matBadge matBadgeIcon=\"check\"\n matBadgeSize=\"medium\"\n matBadgeColor=\"tertiary\"\n matBadgeOverlap=\"false\"\n >Medium badge</ion-text>\n </p>\n\n <!-- small badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"close\" matBadgeSize=\"large\"\n matBadgeOverlap=\"false\">Large badge</ion-label>\n </p>\n\n <!-- default size badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"check\" matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge (no size, no color)\n </ion-label>\n </p>\n\n <!-- ion icon -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark\"\n matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge with ion-icon\n </ion-label>\n </p>\n\n <!-- ion icon clear -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark-circle\"\n matBadgeColor=\"tertiary\"\n matBadgeFill=\"clear\"\n matBadgeOverlap=\"false\">Badge with clear icon\n </ion-label>\n </p>\n\n\n</ion-content>\n"
19613
+ template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>matBadgeIcon directive</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <!-- small badge -->\n <p>\n <ion-text color=\"tertiary\">\n <span matBadge matIcon=\"check\"\n matBadgeSize=\"small\"\n matBadgeColor=\"accent\"\n matBadgeOverlap=\"false\">Small badge</span>\n </ion-text>\n </p>\n\n <!-- medium badge -->\n <p>\n <ion-text matBadge matBadgeIcon=\"check\"\n matBadgeSize=\"medium\"\n matBadgeColor=\"tertiary\"\n matBadgeOverlap=\"false\"\n >Medium badge</ion-text>\n </p>\n\n <!-- small badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"close\" matBadgeSize=\"large\"\n matBadgeOverlap=\"false\">Large badge</ion-label>\n </p>\n\n <!-- default size badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"check\" matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge (no size, no color)\n </ion-label>\n </p>\n\n <!-- ion icon -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark\"\n matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge with ion-icon\n </ion-label>\n </p>\n\n <!-- ion icon clear -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark-circle\"\n matBadgeColor=\"tertiary\"\n matBadgeFill=\"clear\"\n matBadgeOverlap=\"false\">Badge with clear icon\n </ion-label>\n </p>\n\n <ion-row class=\"ion-no-padding\">\n <ion-col>\n <ion-label matBadge\n [ionBadgeIcon]=\"$dynamicIcon|async\"\n matBadgeColor=\"tertiary\"\n matBadgeFill=\"clear\"\n matBadgeOverlap=\"false\">Badge with dynamic icon\n </ion-label>\n </ion-col>\n\n <ion-col>\n <mat-form-field>\n <mat-select\n placeholder=\"Select icon\" (selectionChange)=\"changeIcon($event)\"\n [value]=\"$dynamicIcon.value\">\n <mat-option [value]=\"'checkmark-circle'\">checkmark-circle</mat-option>\n <mat-option [value]=\"'alert'\">alert</mat-option>\n <mat-option [value]=\"'flag'\">flag</mat-option>\n </mat-select>\n </mat-form-field>\n\n </ion-col>\n </ion-row>\n\n</ion-content>\n"
19590
19614
  },] }
19591
19615
  ];
19592
19616
 
@@ -24847,7 +24871,7 @@
24847
24871
  .subscribe(function (value) { return _this.onDirty.emit(value); }));
24848
24872
  // Propagate row dirty state to table
24849
24873
  this.registerSubscription(this.onStartEditingRow
24850
- .pipe(operators.filter(function (row) { return row.validator && true; }), operators.mergeMap(function (row) { return row.validator.valueChanges
24874
+ .pipe(operators.filter(function (row) { return (row === null || row === void 0 ? void 0 : row.validator) && true; }), operators.mergeMap(function (row) { return row.validator.valueChanges
24851
24875
  .pipe(operators.takeUntil(
24852
24876
  // Stop if next another row, or destroying
24853
24877
  rxjs.combineLatest([