@indice/ng-components 0.2.148-beta → 0.2.149-beta
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/indice-ng-components.umd.js +8 -3
- package/bundles/indice-ng-components.umd.js.map +1 -1
- package/esm2015/lib/layouts/shell/shell-header/shell-header.component.js +8 -5
- package/fesm2015/indice-ng-components.js +7 -4
- package/fesm2015/indice-ng-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -2073,6 +2073,7 @@
|
|
|
2073
2073
|
|
|
2074
2074
|
var ShellHeaderComponent = /** @class */ (function () {
|
|
2075
2075
|
function ShellHeaderComponent(authService, router, links) {
|
|
2076
|
+
var _this = this;
|
|
2076
2077
|
this.authService = authService;
|
|
2077
2078
|
this.router = router;
|
|
2078
2079
|
this.links = links;
|
|
@@ -2098,6 +2099,9 @@
|
|
|
2098
2099
|
this.user = null;
|
|
2099
2100
|
this.avatarName = null;
|
|
2100
2101
|
this.notificationsCount = 0;
|
|
2102
|
+
this.notificationLinks.pipe(operators.take(1)).subscribe(function (notifications) {
|
|
2103
|
+
_this.notificationsCount = notifications.filter(function (x) { return !x.isRead; }).length;
|
|
2104
|
+
});
|
|
2101
2105
|
}
|
|
2102
2106
|
ShellHeaderComponent.prototype.ngOnDestroy = function () {
|
|
2103
2107
|
if (this.routerSub$) {
|
|
@@ -2135,9 +2139,6 @@
|
|
|
2135
2139
|
// console.log('ShellHeaderComponent user subscription');
|
|
2136
2140
|
_this.setCurrentUser(user);
|
|
2137
2141
|
});
|
|
2138
|
-
this.notificationLinks.pipe(operators.map(function (notifications) {
|
|
2139
|
-
_this.notificationsCount = notifications.filter(function (x) { return !x.isRead; }).length;
|
|
2140
|
-
})).subscribe();
|
|
2141
2142
|
};
|
|
2142
2143
|
ShellHeaderComponent.prototype.setCurrentUser = function (user) {
|
|
2143
2144
|
var _a, _b;
|
|
@@ -2166,8 +2167,12 @@
|
|
|
2166
2167
|
this.notificationsMenuExpanded = false;
|
|
2167
2168
|
};
|
|
2168
2169
|
ShellHeaderComponent.prototype.expandNotificationsMenu = function () {
|
|
2170
|
+
var _this = this;
|
|
2169
2171
|
this.notificationsMenuExpanded = !this.notificationsMenuExpanded;
|
|
2170
2172
|
this.userMenuExpanded = false;
|
|
2173
|
+
this.notificationLinks.pipe(operators.take(1)).subscribe(function (notifications) {
|
|
2174
|
+
_this.notificationsCount = notifications.filter(function (x) { return !x.isRead; }).length;
|
|
2175
|
+
});
|
|
2171
2176
|
};
|
|
2172
2177
|
return ShellHeaderComponent;
|
|
2173
2178
|
}());
|