nuxeo-development-framework 3.9.9 → 4.0.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.
- package/bundles/nuxeo-development-framework.umd.js +47 -37
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/notifications/components/notification-item/notification-item.component.js +1 -1
- package/esm2015/lib/components/notifications/components/notifications-button/notifications-button.component.js +23 -21
- package/esm2015/lib/components/notifications/components/notifications-settings/check-if-subscribed.pipe.js +4 -3
- package/esm2015/lib/components/notifications/components/notifications-settings/notifications-settings.adapter.js +2 -2
- package/esm2015/lib/components/notifications/models/notification-setting.presenter.js +1 -1
- package/esm2015/lib/components/notifications/services/notifications.service.js +11 -10
- package/esm2015/lib/components/notifications/services/socket.service.js +12 -7
- package/fesm2015/nuxeo-development-framework.js +46 -37
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/notifications/components/notifications-button/notifications-button.component.d.ts +1 -0
- package/lib/components/notifications/models/notification-setting.presenter.d.ts +1 -1
- package/package.json +1 -1
|
@@ -27261,12 +27261,17 @@ class SocketService {
|
|
|
27261
27261
|
}
|
|
27262
27262
|
_prepareConnection() {
|
|
27263
27263
|
var _a;
|
|
27264
|
-
|
|
27265
|
-
|
|
27266
|
-
|
|
27267
|
-
|
|
27268
|
-
|
|
27269
|
-
|
|
27264
|
+
try {
|
|
27265
|
+
const socket = new WebSocket((_a = this._environment) === null || _a === void 0 ? void 0 : _a.socketUrl);
|
|
27266
|
+
socket.onopen = (event) => this._handleSocketConnection(true, event);
|
|
27267
|
+
socket.onclose = (event) => this._handleSocketConnection(false, event);
|
|
27268
|
+
socket.onerror = (event) => this._handleSocketError(event);
|
|
27269
|
+
socket.onmessage = (event) => this._handleSocketMessage(event);
|
|
27270
|
+
this._socket = socket;
|
|
27271
|
+
}
|
|
27272
|
+
catch (error) {
|
|
27273
|
+
this._handleSocketError(error);
|
|
27274
|
+
}
|
|
27270
27275
|
}
|
|
27271
27276
|
ngOnDestroy() {
|
|
27272
27277
|
this._destroy$.next();
|
|
@@ -27304,22 +27309,23 @@ class NotificationsService extends SocketService {
|
|
|
27304
27309
|
*
|
|
27305
27310
|
*/
|
|
27306
27311
|
constructor(_environment, _nuxeoService, _callApi, _http) {
|
|
27307
|
-
var _a, _b;
|
|
27312
|
+
var _a, _b, _c;
|
|
27308
27313
|
super(_environment, _nuxeoService);
|
|
27309
27314
|
this._environment = _environment;
|
|
27310
27315
|
this._nuxeoService = _nuxeoService;
|
|
27311
27316
|
this._callApi = _callApi;
|
|
27312
27317
|
this._http = _http;
|
|
27313
27318
|
this.listenerObserver = new Subject();
|
|
27314
|
-
|
|
27315
|
-
if ((_b = (_a = this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) {
|
|
27319
|
+
if (((_b = (_a = this._nuxeoService.nuxeoClient) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.id) && ((_c = this._environment) === null || _c === void 0 ? void 0 : _c.socketUrl)) {
|
|
27316
27320
|
this.socketConnect()
|
|
27317
|
-
.pipe(switchMap(() => this.onMessage$),
|
|
27321
|
+
.pipe(switchMap(() => this.onMessage$), catchError((error) => {
|
|
27322
|
+
console.log(error);
|
|
27323
|
+
return throwError(() => error);
|
|
27324
|
+
}), takeUntil(this._destroy$))
|
|
27318
27325
|
.subscribe((res) => {
|
|
27319
27326
|
this.listenerObserver.next(res);
|
|
27320
27327
|
});
|
|
27321
27328
|
}
|
|
27322
|
-
// });
|
|
27323
27329
|
}
|
|
27324
27330
|
get _tenantId() {
|
|
27325
27331
|
return this._nuxeoService.nuxeoClient.user.properties.tenantId;
|
|
@@ -27387,7 +27393,7 @@ class NotificationsService extends SocketService {
|
|
|
27387
27393
|
}
|
|
27388
27394
|
getDefinitions(payload = {}) {
|
|
27389
27395
|
return this._callApi
|
|
27390
|
-
.query(Object.assign({ pageProvider: NotificationsService.providers.definition, notfnotificationdef_applicationKey: this._appKey, pageSize:
|
|
27396
|
+
.query(Object.assign({ pageProvider: NotificationsService.providers.definition, notfnotificationdef_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER, notfnotificationdef_isActive: true }, payload), {
|
|
27391
27397
|
headers: {
|
|
27392
27398
|
properties: '*',
|
|
27393
27399
|
},
|
|
@@ -27396,7 +27402,7 @@ class NotificationsService extends SocketService {
|
|
|
27396
27402
|
}
|
|
27397
27403
|
getSubscriptions(payload = {}) {
|
|
27398
27404
|
return this._callApi
|
|
27399
|
-
.query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize:
|
|
27405
|
+
.query(Object.assign({ pageProvider: NotificationsService.providers.subscription, notfsubscription_companyName: this._tenantId, notfsubscription_applicationKey: this._appKey, pageSize: Number.MAX_SAFE_INTEGER }, payload), {
|
|
27400
27406
|
headers: {
|
|
27401
27407
|
properties: '*',
|
|
27402
27408
|
},
|
|
@@ -27549,7 +27555,7 @@ class NotificationItemComponent extends DestroySubject {
|
|
|
27549
27555
|
}
|
|
27550
27556
|
}
|
|
27551
27557
|
NotificationItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27552
|
-
NotificationItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationItemComponent, selector: "app-notification-item", inputs: { iconOptions: "iconOptions", currentLang: "currentLang", notification: "notification" }, outputs: { markAsUnread: "markAsUnread", markAsRead: "markAsRead", markAsDeleted: "markAsDeleted" }, usesInheritance: true, ngImport: i0, template: "<div\r\n *ngIf=\"notification?.properties as properties\"\r\n class=\"notification-item\"\r\n [class.new-item]=\"properties['notif_cnt:status'] == status.new\"\r\n [class.unread-item]=\"properties['notif_cnt:status'] == status.unRead\"\r\n>\r\n <div class=\"notification-item__icon\">\r\n <div class=\"notification-item__icon__wrapper\" *ngIf=\"iconOptions?.active\">\r\n <i [class]=\"notification | getIcon : iconOptions\"></i>\r\n </div>\r\n </div>\r\n <div class=\"notification-item__content\">\r\n <p class=\"notification-item__message line-clamp-2\">\r\n {{\r\n currentLang === 'ar-AR'\r\n ? properties['notif_cnt:arMessage']\r\n : properties['notif_cnt:enMessage']\r\n }}\r\n </p>\r\n <button\r\n class=\"mat-icon-button\"\r\n [matMenuTriggerFor]=\"appMenu\"\r\n mat-icon-button\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon class=\"mat-24\">more_horiz</mat-icon>\r\n </button>\r\n <span class=\"notification-item__date\">{{\r\n properties['dc:created'] | timeAgo : currentLang\r\n }}</span>\r\n </div>\r\n\r\n <mat-menu class=\"notification-item__actions\" #appMenu=\"matMenu\">\r\n <span (click)=\"closeMenu($event, appMenu)\">\r\n <button\r\n *ngIf=\"properties['notif_cnt:status'] == status.read\"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsUnread.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsUnread' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n properties['notif_cnt:status'] == status.new ||\r\n properties['notif_cnt:status'] == status.unRead\r\n \"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsRead.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsRead' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n mat-menu-item\r\n (click)=\"markAsDeleted.emit(notification)\"\r\n class=\"notification-item__actions__item\"\r\n >\r\n <span>{{ 'notifications.delete' | translate }}</span>\r\n </button>\r\n </span>\r\n </mat-menu>\r\n</div>\r\n", styles: [".notification-item{display:var(--n-item-display, grid);grid-template-columns:var(--n-item-columns, auto 1fr);grid-gap:var(--n-item-gap, .5rem);gap:var(--n-item-gap, .5rem);padding:var(--n-items-padding, .5rem 1rem);border:var(--n-item-border, solid #eee);border-width:var(--n-item-border-width, 0 0 1px 0);background:var(--n-item-background, transparent);min-height:var(--n-item-height, 85px)}.notification-item.new-item{--n-item-background: var(--n-status-new-color, #
|
|
27558
|
+
NotificationItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationItemComponent, selector: "app-notification-item", inputs: { iconOptions: "iconOptions", currentLang: "currentLang", notification: "notification" }, outputs: { markAsUnread: "markAsUnread", markAsRead: "markAsRead", markAsDeleted: "markAsDeleted" }, usesInheritance: true, ngImport: i0, template: "<div\r\n *ngIf=\"notification?.properties as properties\"\r\n class=\"notification-item\"\r\n [class.new-item]=\"properties['notif_cnt:status'] == status.new\"\r\n [class.unread-item]=\"properties['notif_cnt:status'] == status.unRead\"\r\n>\r\n <div class=\"notification-item__icon\">\r\n <div class=\"notification-item__icon__wrapper\" *ngIf=\"iconOptions?.active\">\r\n <i [class]=\"notification | getIcon : iconOptions\"></i>\r\n </div>\r\n </div>\r\n <div class=\"notification-item__content\">\r\n <p class=\"notification-item__message line-clamp-2\">\r\n {{\r\n currentLang === 'ar-AR'\r\n ? properties['notif_cnt:arMessage']\r\n : properties['notif_cnt:enMessage']\r\n }}\r\n </p>\r\n <button\r\n class=\"mat-icon-button\"\r\n [matMenuTriggerFor]=\"appMenu\"\r\n mat-icon-button\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon class=\"mat-24\">more_horiz</mat-icon>\r\n </button>\r\n <span class=\"notification-item__date\">{{\r\n properties['dc:created'] | timeAgo : currentLang\r\n }}</span>\r\n </div>\r\n\r\n <mat-menu class=\"notification-item__actions\" #appMenu=\"matMenu\">\r\n <span (click)=\"closeMenu($event, appMenu)\">\r\n <button\r\n *ngIf=\"properties['notif_cnt:status'] == status.read\"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsUnread.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsUnread' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n properties['notif_cnt:status'] == status.new ||\r\n properties['notif_cnt:status'] == status.unRead\r\n \"\r\n mat-menu-item\r\n class=\"notification-item__actions__item\"\r\n (click)=\"markAsRead.emit(notification)\"\r\n >\r\n <span class=\"mx-1\">{{ 'notifications.markAsRead' | translate }}</span>\r\n </button>\r\n\r\n <button\r\n mat-menu-item\r\n (click)=\"markAsDeleted.emit(notification)\"\r\n class=\"notification-item__actions__item\"\r\n >\r\n <span>{{ 'notifications.delete' | translate }}</span>\r\n </button>\r\n </span>\r\n </mat-menu>\r\n</div>\r\n", styles: [".notification-item{display:var(--n-item-display, grid);grid-template-columns:var(--n-item-columns, auto 1fr);grid-gap:var(--n-item-gap, .5rem);gap:var(--n-item-gap, .5rem);padding:var(--n-items-padding, .5rem 1rem);border:var(--n-item-border, solid #eee);border-width:var(--n-item-border-width, 0 0 1px 0);background:var(--n-item-background, transparent);min-height:var(--n-item-height, 85px);position:relative}.notification-item.new-item{--n-item-background: var(--n-status-new-color, #ecf8fe)}.notification-item.unread-item{--n-item-background: var(--n-status-unread-color, #ecf8fe)}.notification-item.unread-item:before{content:\"\";position:absolute;inset-inline-start:var(--n-item-unread-inline, 6px);inset-block-start:var(--n-item-unread-block, 6px);width:var(--n-item-unread-width, 8px);height:var(--n-item-unread-height, 8px);background:var(--n-item-unread-background, #39559d);border-radius:50%}.notification-item__icon{display:var(--n-item-icon-display, flex);align-items:var(--n-item-icon-align-items, center)}.notification-item__icon__wrapper{width:var(--n-item-icon-width, 56px);height:var(--n-item-icon-height, 56px);background:var(--n-item-icon-background, rgba(0, 0, 0, .025));color:var(--n-item-icon-color, #636363);font-size:var(--n-item-icon-size, 1.5rem);border-radius:var(--n-item-icon-radius, 50%);display:grid;place-items:center}.notification-item__content{display:var(--n-item-content-display, grid);grid-template-columns:var(--n-item-content-columns, 1fr auto);grid-gap:var(--n-item-gap, .2rem);gap:var(--n-item-gap, .2rem)}.notification-item__message{margin-bottom:0;font-size:var(--n-item-font-size, .9rem);color:var(--n-item-message-color)}.notification-item__date{font-size:var(--n-item-date-size, .8rem);text-align:var(--n-item-date-align, end);grid-column:var(--n-item-date-column, span 2);padding:var(--n-item-date-padding, 0 11px);color:var(--n-item-date-color)}.notification-item__actions{border-radius:var(--n-actions-radius, 4px);background:var(--n-actions-background, #fff);box-shadow:var(--n-actions-shadow, 0px 1px 4px -1px rgba(28, 52, 84, .26))}.notification-item__actions .mat-menu-content:not(:empty){padding:var(--n-actions--menu-padding, .5rem)}.notification-item__actions__item{text-align:var(--action-item-align, start)!important;background:var(--action-item-background, transparent)!important;color:var(--action-item-color, #28282d);padding:var(--action-item-padding, .4rem);height:var(--action-item-height, 38px);line-height:var(--action-item-line, 38px);border-radius:var(--action-item-radius, 4px);font-size:var(--action-item-size, 14px)}.notification-item__actions__item:hover{--action-item-background: var(--action-hover-background, #e6f7ff);--action-item-color: var(--action-hover-color, #005fdb)}\n"], components: [{ type: i1$8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], pipes: { "getIcon": GetIconPipe, "timeAgo": TimeAgoPipe, "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
27553
27559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NotificationItemComponent, decorators: [{
|
|
27554
27560
|
type: Component,
|
|
27555
27561
|
args: [{
|
|
@@ -28290,31 +28296,14 @@ class NotificationsButtonComponent extends BaseNotification {
|
|
|
28290
28296
|
this.openSettings = new EventEmitter();
|
|
28291
28297
|
this.openNotifications = new EventEmitter();
|
|
28292
28298
|
this.onNotification = new EventEmitter();
|
|
28293
|
-
this.newNotificationCount$ = this._getCountSub
|
|
28294
|
-
.asObservable()
|
|
28295
|
-
.pipe(map((count) => (count >= 100 ? '99+' : count)));
|
|
28299
|
+
this.newNotificationCount$ = this._getCountSub.asObservable();
|
|
28296
28300
|
this.panelMode = PANEL_MODE.sidebar;
|
|
28297
28301
|
this.panelModeEnum = PANEL_MODE;
|
|
28298
28302
|
if (_options === null || _options === void 0 ? void 0 : _options.panelMode) {
|
|
28299
28303
|
this.panelMode = _options.panelMode;
|
|
28300
28304
|
}
|
|
28301
|
-
this.
|
|
28302
|
-
|
|
28303
|
-
const isAr = this._translationService.isArabic.getValue();
|
|
28304
|
-
return this._toasterService
|
|
28305
|
-
.showToast({
|
|
28306
|
-
type: 'info',
|
|
28307
|
-
title: 'notifications.newNotification',
|
|
28308
|
-
customContent: isAr ? res.arabicMessage : res.englishMessage,
|
|
28309
|
-
})
|
|
28310
|
-
.onTap.pipe(map(() => res));
|
|
28311
|
-
}), takeUntil(this.destroy$))
|
|
28312
|
-
.subscribe((res) => {
|
|
28313
|
-
this.refreshUnreadCount();
|
|
28314
|
-
if (res === null || res === void 0 ? void 0 : res.clickable) {
|
|
28315
|
-
this.onNotification.emit(res);
|
|
28316
|
-
}
|
|
28317
|
-
});
|
|
28305
|
+
this._socketListener();
|
|
28306
|
+
this.refreshUnreadCount();
|
|
28318
28307
|
}
|
|
28319
28308
|
hideBadgeCount() {
|
|
28320
28309
|
this._showBadgeSub.next(false);
|
|
@@ -28340,6 +28329,25 @@ class NotificationsButtonComponent extends BaseNotification {
|
|
|
28340
28329
|
this._cdr.detectChanges();
|
|
28341
28330
|
});
|
|
28342
28331
|
}
|
|
28332
|
+
_socketListener() {
|
|
28333
|
+
this.notificationsService.listenerObserver
|
|
28334
|
+
.pipe(switchMap((res) => {
|
|
28335
|
+
const isAr = this._translationService.isArabic.getValue();
|
|
28336
|
+
return this._toasterService
|
|
28337
|
+
.showToast({
|
|
28338
|
+
type: 'info',
|
|
28339
|
+
title: 'notifications.newNotification',
|
|
28340
|
+
customContent: isAr ? res.arabicMessage : res.englishMessage,
|
|
28341
|
+
})
|
|
28342
|
+
.onTap.pipe(map(() => res));
|
|
28343
|
+
}), takeUntil(this.destroy$))
|
|
28344
|
+
.subscribe((res) => {
|
|
28345
|
+
this.refreshUnreadCount();
|
|
28346
|
+
if (res === null || res === void 0 ? void 0 : res.clickable) {
|
|
28347
|
+
this.onNotification.emit(res);
|
|
28348
|
+
}
|
|
28349
|
+
});
|
|
28350
|
+
}
|
|
28343
28351
|
}
|
|
28344
28352
|
NotificationsButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NotificationsButtonComponent, deps: [{ token: i0.Injector }, { token: TranslationService }, { token: CustomToastrService }, { token: i0.ChangeDetectorRef }, { token: NOTIFICATIONS_LIST_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
28345
28353
|
NotificationsButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NotificationsButtonComponent, selector: "app-notifications-button", inputs: { styleClass: "styleClass", badgeOptions: "badgeOptions" }, outputs: { listItemClick: "listItemClick", openSettings: "openSettings", openNotifications: "openNotifications", onNotification: "onNotification" }, host: { classAttribute: "inline-flex justify-center items-center notification-button" }, queries: [{ propertyName: "customIconTemplate", first: true, predicate: NOTIFICATION_ICON, descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<button\r\n *ngIf=\"panelMode === panelModeEnum.panel\"\r\n [matMenuTriggerFor]=\"notifications\"\r\n [matBadge]=\"newNotificationCount$ | async\"\r\n [matBadgeHidden]=\"!(showBadge$ | async)\"\r\n [matBadgeSize]=\"badgeOptions.size\"\r\n [matBadgeColor]=\"badgeOptions.color\"\r\n [matBadgePosition]=\"badgeOptions.position\"\r\n [class]=\"styleClass\"\r\n (menuOpened)=\"markAllAsUnread()\"\r\n>\r\n <ng-container [ngTemplateOutlet]=\"customIconTemplate || defaultIconTemplate\">\r\n </ng-container>\r\n</button>\r\n\r\n<mat-menu #notifications=\"matMenu\" class=\"notification-list-panel\">\r\n <ng-template matMenuContent>\r\n <app-notifications-list\r\n (itemClicked)=\"listItemClick.emit($event); notifications.closed.emit()\"\r\n (openSettings)=\"openSettings.emit($event); notifications.closed.emit()\"\r\n (openNotifications)=\"openNotifications.emit($event); notifications.closed.emit()\"\r\n (markAllRead)=\"refreshUnreadCount()\"\r\n ></app-notifications-list>\r\n </ng-template>\r\n <div class=\"notification-list-panel__footer flex justify-center\">\r\n <ng-content select=\"[notifications-footer]\"></ng-content>\r\n </div>\r\n</mat-menu>\r\n\r\n<ng-container *ngIf=\"panelMode === panelModeEnum.sidebar\">\r\n <button\r\n [matBadge]=\"newNotificationCount$ | async\"\r\n [matBadgeHidden]=\"!(showBadge$ | async)\"\r\n [matBadgeSize]=\"badgeOptions.size\"\r\n [matBadgeColor]=\"badgeOptions.color\"\r\n [matBadgePosition]=\"badgeOptions.position\"\r\n [class]=\"styleClass\"\r\n (click)=\"toggleSideBar(); markAllAsUnread()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"customIconTemplate || defaultIconTemplate\">\r\n </ng-container>\r\n </button>\r\n <app-notifications-sidebar\r\n [(visible)]=\"isSidebarOpened\"\r\n (visibleChange)=\"refreshUnreadCount()\"\r\n [position]=\"sidebarPosition$ | async\"\r\n >\r\n <ng-template appNotificationSidebarContent>\r\n <app-notifications-list\r\n class=\"notifications-sidebar\"\r\n (itemClicked)=\"\r\n listItemClick.emit($event); toggleSideBar(false); refreshUnreadCount()\r\n \"\r\n (openSettings)=\"openSettings.emit($event); toggleSideBar(false)\"\r\n (openNotifications)=\"openNotifications.emit($event); toggleSideBar(false)\"\r\n (markAllRead)=\"refreshUnreadCount()\"\r\n ></app-notifications-list>\r\n </ng-template>\r\n </app-notifications-sidebar>\r\n</ng-container>\r\n\r\n<ng-template #defaultIconTemplate>\r\n <i class=\"bi bi-bell bell\"></i>\r\n</ng-template>\r\n", styles: [".notification-button{font-size:var(--not-btn-font-size, 1.5rem);width:var(--not-btn-width, 40px)}.notification-list-panel{--width: var(--nos-panel-width, min(80vw, 450px));width:var(--width);border-radius:var(--nos-panel-radius, 5px);overflow:hidden;-webkit-overflow-scrolling:touch;outline:0;background:var(--nos-panel-background, #fff)}.notification-list-panel.mat-menu-panel{max-width:var(--width);max-height:var(--nos-panel-max-height, var(--height))}.notification-list-panel__navigate-btn{background:var(--not-btn-background, transparent);border-radius:var(--not-btn-radius, 5px);padding:var(--not-btn-padding, .5rem 1rem);margin:var(--not-btn-margin, .5rem 0);color:var(--not-btn-color, currentColor);width:var(--not-btn-width, 90%)}.notification-list-panel__navigate-btn:hover{--not-btn-background: var(--not-btn-hover-background, #f0f0f0);--not-btn-color: var(--not-btn-hover-color);-webkit-text-decoration:var(--not-btn-decoration, none);text-decoration:var(--not-btn-decoration, none)}.notification-list-panel__navigate-btn:active{--not-btn-background: var(--not-btn-active-background, #e2e2e2);--not-btn-color: var(--not-btn-active-color)}.notifications-sidebar{--nto-list-header-padding: var(--sidebar-list-header-padding , 1rem);--nto-list-height: var(--sidebar-list-height , calc(100vh - 100px))}\n"], components: [{ type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: NotificationsListComponent, selector: "app-notifications-list", outputs: ["openSettings", "openNotifications"] }, { type: NotificationsSidebarComponent, selector: "app-notifications-sidebar", inputs: ["appendToBody", "clearOnCLose", "visible", "position"], outputs: ["visibleChange", "onShow", "onHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { type: i7$3.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { type: NotificationSidebarContentDirective, selector: "[appNotificationSidebarContent]" }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
@@ -28479,7 +28487,7 @@ const mapDefinitionToPresenter = (definition) => {
|
|
|
28479
28487
|
sourceType: _properties['notf_nt:sourceTypee'],
|
|
28480
28488
|
isActive: _properties['notif_def:isActive'],
|
|
28481
28489
|
autoSubscription: _properties['notif_def:autoSubscription'],
|
|
28482
|
-
|
|
28490
|
+
sentByDefault: _properties['notif_def:sentByDefault'],
|
|
28483
28491
|
applicationKey: _properties['notif_def:applicationKey'],
|
|
28484
28492
|
channel: _properties['notif_def:channel'],
|
|
28485
28493
|
title: definition.title,
|
|
@@ -28512,10 +28520,11 @@ class CheckIfSubscribedPipe {
|
|
|
28512
28520
|
sub.applicationKey == definition.applicationKey &&
|
|
28513
28521
|
sub.notificationKey == definition.notificationKey);
|
|
28514
28522
|
});
|
|
28515
|
-
if (_subscription
|
|
28523
|
+
if (_subscription &&
|
|
28524
|
+
Object.values(SUBSCRIPTION_STATE).includes(_subscription === null || _subscription === void 0 ? void 0 : _subscription.state)) {
|
|
28516
28525
|
return _subscription.state === SUBSCRIPTION_STATE.subscribed;
|
|
28517
28526
|
}
|
|
28518
|
-
return
|
|
28527
|
+
return !!(definition === null || definition === void 0 ? void 0 : definition.sentByDefault);
|
|
28519
28528
|
}
|
|
28520
28529
|
}
|
|
28521
28530
|
CheckIfSubscribedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CheckIfSubscribedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|