@sumaris-net/ngx-components 1.6.16 → 1.6.17
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.
- package/bundles/sumaris-net.ngx-components.umd.js +16 -7
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/shared/material/badge/badge-icon.directive.js +18 -8
- package/fesm2015/sumaris-net.ngx-components.js +16 -7
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -8433,20 +8433,26 @@
|
|
|
8433
8433
|
});
|
|
8434
8434
|
MatBadgeIconDirective.prototype.ngOnInit = function () {
|
|
8435
8435
|
var _this = this;
|
|
8436
|
+
// Default value
|
|
8436
8437
|
this._size = this._size || 'medium';
|
|
8437
8438
|
this._color = this._color || 'primary';
|
|
8438
8439
|
if (this._color === 'warn')
|
|
8439
8440
|
this._color = 'warning';
|
|
8440
|
-
this.updateView();
|
|
8441
|
+
this.updateView(true);
|
|
8441
8442
|
this._subscription = this._$update
|
|
8442
|
-
|
|
8443
|
-
.subscribe(function () { return _this.updateView(); });
|
|
8443
|
+
.pipe(operators.debounceTime(100))
|
|
8444
|
+
.subscribe(function () { return _this.updateView(true); });
|
|
8444
8445
|
};
|
|
8445
8446
|
MatBadgeIconDirective.prototype.ngOnDestroy = function () {
|
|
8446
8447
|
var _a;
|
|
8447
8448
|
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
8448
8449
|
};
|
|
8449
|
-
MatBadgeIconDirective.prototype.updateView = function () {
|
|
8450
|
+
MatBadgeIconDirective.prototype.updateView = function (immediate) {
|
|
8451
|
+
// Async by default
|
|
8452
|
+
if (!immediate) {
|
|
8453
|
+
this._$update.next();
|
|
8454
|
+
return;
|
|
8455
|
+
}
|
|
8450
8456
|
var badge = this.el.nativeElement.querySelector('.mat-badge-content');
|
|
8451
8457
|
if (!badge)
|
|
8452
8458
|
return;
|
|
@@ -8484,9 +8490,12 @@
|
|
|
8484
8490
|
badge.style.background = "var(--ion-color-" + this._color + ")";
|
|
8485
8491
|
badge.style.color = "var(--ion-color-" + this._color + "-contrast)";
|
|
8486
8492
|
}
|
|
8487
|
-
badge.style.
|
|
8488
|
-
|
|
8489
|
-
badge.style.
|
|
8493
|
+
if (badge.style.display !== 'inline-block')
|
|
8494
|
+
badge.style.display = 'inline-block';
|
|
8495
|
+
if (badge.style.alignItems !== 'center')
|
|
8496
|
+
badge.style.alignItems = 'center';
|
|
8497
|
+
if (badge.style.justifyContent !== 'center')
|
|
8498
|
+
badge.style.justifyContent = 'center';
|
|
8490
8499
|
};
|
|
8491
8500
|
return MatBadgeIconDirective;
|
|
8492
8501
|
}());
|