ngx-techlify-core 14.6.2 → 14.6.3-alpha-6
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/esm2020/lib/core/pusher.service.mjs +43 -0
- package/esm2020/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.mjs +40 -35
- package/fesm2015/ngx-techlify-core.mjs +75 -31
- package/fesm2015/ngx-techlify-core.mjs.map +1 -1
- package/fesm2020/ngx-techlify-core.mjs +73 -29
- package/fesm2020/ngx-techlify-core.mjs.map +1 -1
- package/lib/core/pusher.service.d.ts +15 -0
- package/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.d.ts +8 -3
- package/package.json +3 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import Pusher from 'pusher-js';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./credentials.service";
|
|
6
|
+
import * as i2 from "./config.service";
|
|
7
|
+
export class PusherService {
|
|
8
|
+
constructor(credentialService, techlifyConfig) {
|
|
9
|
+
this.credentialService = credentialService;
|
|
10
|
+
this.techlifyConfig = techlifyConfig;
|
|
11
|
+
this.pusher = new BehaviorSubject(null);
|
|
12
|
+
this.initPusher();
|
|
13
|
+
}
|
|
14
|
+
initPusher() {
|
|
15
|
+
console.log('Init Pusher');
|
|
16
|
+
if (this.pusher.value) {
|
|
17
|
+
this.pusher.value.disconnect();
|
|
18
|
+
}
|
|
19
|
+
console.log('pusher', this.pusher);
|
|
20
|
+
this.pusher.next(new Pusher(this.techlifyConfig.getConfigsRaw().pusherAppKey, {
|
|
21
|
+
cluster: this.techlifyConfig.getConfigsRaw().pusherAppCluster,
|
|
22
|
+
forceTLS: true,
|
|
23
|
+
authEndpoint: this.techlifyConfig.getApiUrl() + 'broadcasting/auth',
|
|
24
|
+
auth: {
|
|
25
|
+
headers: {
|
|
26
|
+
Authorization: 'Bearer ' + this.credentialService?.credentials?.token?.access_token
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
getPusher() {
|
|
32
|
+
return this.pusher.asObservable();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
PusherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PusherService, deps: [{ token: i1.CredentialsService }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
+
PusherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PusherService, providedIn: 'root' });
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PusherService, decorators: [{
|
|
38
|
+
type: Injectable,
|
|
39
|
+
args: [{
|
|
40
|
+
providedIn: 'root'
|
|
41
|
+
}]
|
|
42
|
+
}], ctorParameters: function () { return [{ type: i1.CredentialsService }, { type: i2.ConfigService }]; } });
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVzaGVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdGVjaGxpZnktY29yZS9zcmMvbGliL2NvcmUvcHVzaGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLE1BQU0sTUFBTSxXQUFXLENBQUM7QUFDL0IsT0FBTyxFQUFFLGVBQWUsRUFBYyxNQUFNLE1BQU0sQ0FBQzs7OztBQU9uRCxNQUFNLE9BQU8sYUFBYTtJQUV4QixZQUNVLGlCQUFxQyxFQ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VzaGVyKVxuICAgIHRoaXMucHVzaGVyLm5leHQobmV3IFB1c2hlcih0aGlzLnRlY2hsaWZ5Q29uZmlnLmdldENvbmZpZ3NSYXcoKS5wdXNoZXJBcHBLZXksIHtcbiAgICAgIGNsdXN0ZXI6IHRoaXMudGVjaGxpZnlDb25maWcuZ2V0Q29uZmlnc1JhdygpLnB1c2hlckFwcENsdXN0ZXIsXG4gICAgICBmb3JjZVRMUzogdHJ1ZSxcbiAgICAgIGF1dGhFbmRwb2ludDogdGhpcy50ZWNobGlmeUNvbmZpZy5nZXRBcGlVcmwoKSArICdicm9hZGNhc3RpbmcvYXV0aCcsXG4gICAgICBhdXRoOiB7XG4gICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICBBdXRob3JpemF0aW9uOiAnQmVhcmVyICcgKyB0aGlzLmNyZWRlbnRpYWxTZXJ2aWNlPy5jcmVkZW50aWFscz8udG9rZW4/LmFjY2Vzc190b2tlblxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSkpO1xuICB9XG5cbiAgZ2V0UHVzaGVyKCk6IE9ic2VydmFibGU8UHVzaGVyPiB7XG4gICAgcmV0dXJuIHRoaXMucHVzaGVyLmFzT2JzZXJ2YWJsZSgpO1xuICB9XG59Il19
|
package/esm2020/lib/techlify-notifications/ngx-techlify-notifier/ngx-techlify-notifier.component.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Component, Inject } from '@angular/core';
|
|
3
3
|
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
|
4
|
-
import { interval } from 'rxjs';
|
|
5
|
-
import { switchMap } from 'rxjs/operators';
|
|
6
4
|
import { TechlifyNotificationUserStatus } from '../techlify-notification-user-status.model';
|
|
7
5
|
import * as i0 from "@angular/core";
|
|
8
6
|
import * as i1 from "../../core";
|
|
9
7
|
import * as i2 from "ngx-toastr";
|
|
10
|
-
import * as i3 from "
|
|
11
|
-
import * as i4 from "
|
|
12
|
-
import * as i5 from "
|
|
13
|
-
import * as i6 from "@angular/material/
|
|
14
|
-
import * as i7 from "@angular/material/
|
|
15
|
-
import * as i8 from "@angular/material/
|
|
16
|
-
import * as i9 from "@angular/
|
|
17
|
-
import * as i10 from "@angular/flex-layout/
|
|
8
|
+
import * as i3 from "../../core/pusher.service";
|
|
9
|
+
import * as i4 from "@angular/common";
|
|
10
|
+
import * as i5 from "ngx-infinite-scroll";
|
|
11
|
+
import * as i6 from "@angular/material/button";
|
|
12
|
+
import * as i7 from "@angular/material/icon";
|
|
13
|
+
import * as i8 from "@angular/material/menu";
|
|
14
|
+
import * as i9 from "@angular/material/badge";
|
|
15
|
+
import * as i10 from "@angular/flex-layout/flex";
|
|
16
|
+
import * as i11 from "@angular/flex-layout/extended";
|
|
18
17
|
let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
19
|
-
constructor(http, toastr, environment) {
|
|
18
|
+
constructor(http, toastr, credentialService, pusherService, environment) {
|
|
20
19
|
this.http = http;
|
|
21
20
|
this.toastr = toastr;
|
|
21
|
+
this.credentialService = credentialService;
|
|
22
|
+
this.pusherService = pusherService;
|
|
22
23
|
this.environment = environment;
|
|
23
24
|
this.notifications = [];
|
|
24
25
|
this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };
|
|
@@ -27,37 +28,23 @@ let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
|
27
28
|
isLoadRelations: true,
|
|
28
29
|
relations: 'status,notification'
|
|
29
30
|
};
|
|
31
|
+
this.user = this.credentialService.credentials.user;
|
|
30
32
|
}
|
|
31
33
|
ngOnInit() {
|
|
34
|
+
console.log('Init Notifications');
|
|
32
35
|
this.rootScrollContainer = this.environment?.rootScrollContainer || 'body';
|
|
33
|
-
this.pollingInterval = this.environment?.notificationPollingInterval || 5000;
|
|
34
|
-
this.
|
|
36
|
+
// this.pollingInterval = this.environment?.notificationPollingInterval || 5000;
|
|
37
|
+
this.pushNotifications();
|
|
35
38
|
}
|
|
36
39
|
loadNotifications(initiate = false) {
|
|
40
|
+
console.log('Load Notifications');
|
|
37
41
|
this.fetchNotifications(this.pageEvent).subscribe((result) => {
|
|
38
42
|
this.notifications = this.notifications.concat(result.data);
|
|
39
43
|
this.notifications = [...new Map(this.notifications.map(item => [item['id'], item])).values()];
|
|
40
44
|
this.pageEvent.page = result.current_page;
|
|
41
45
|
this.pageEvent.lastPage = result.last_page;
|
|
42
|
-
if (initiate) {
|
|
43
|
-
this.startNotificationPolling();
|
|
44
|
-
}
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
startNotificationPolling() {
|
|
48
|
-
this.$notificationLoader =
|
|
49
|
-
interval(this.pollingInterval)
|
|
50
|
-
.pipe(switchMap((_) => this.fetchNotifications({ page: 1, perPage: 25, lastPage: 1 })), untilDestroyed(this)).subscribe((result) => {
|
|
51
|
-
//Look for any new notifications
|
|
52
|
-
const newNotifications = result.data.filter((item) => !this.notifications.some((x) => x.id == item.id));
|
|
53
|
-
if (newNotifications?.length > 0) {
|
|
54
|
-
this.notifications = newNotifications.concat(this.notifications);
|
|
55
|
-
newNotifications.forEach((item) => {
|
|
56
|
-
this.toastr.success(item?.notification?.body, item?.notification?.title);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
48
|
get unreadNotificationsCount() {
|
|
62
49
|
return this.notifications.filter(x => x.status_id === TechlifyNotificationUserStatus.DELIVERED).length;
|
|
63
50
|
}
|
|
@@ -65,6 +52,24 @@ let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
|
65
52
|
return this.http.get(`api/notification-users`, { params: { ...this.filters, ...pageEvent } })
|
|
66
53
|
.pipe(untilDestroyed(this));
|
|
67
54
|
}
|
|
55
|
+
pushNotifications() {
|
|
56
|
+
console.log('Push Notifications');
|
|
57
|
+
if (this.user) {
|
|
58
|
+
console.log('Found User');
|
|
59
|
+
// load messages
|
|
60
|
+
this.loadNotifications();
|
|
61
|
+
// get pusher
|
|
62
|
+
this.pusherService.getPusher().subscribe((pusher) => {
|
|
63
|
+
// generate channel name
|
|
64
|
+
let channelName = `notification-channel-32`;
|
|
65
|
+
// subscribe to chat channel
|
|
66
|
+
this.channel = pusher.subscribe(channelName);
|
|
67
|
+
this.channel = this.channel.bind('notification-event', (e) => {
|
|
68
|
+
console.log(e);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
68
73
|
onScroll() {
|
|
69
74
|
if (this.pageEvent.lastPage > this.pageEvent.page) {
|
|
70
75
|
this.pageEvent.page += 1;
|
|
@@ -87,17 +92,17 @@ let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
};
|
|
90
|
-
NgxTechlifyNotifierComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NgxTechlifyNotifierComponent, deps: [{ token: i1.HttpService }, { token: i2.ToastrService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
-
NgxTechlifyNotifierComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NgxTechlifyNotifierComponent, selector: "app-ngx-techlify-notifier", ngImport: i0, template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">
|
|
95
|
+
NgxTechlifyNotifierComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NgxTechlifyNotifierComponent, deps: [{ token: i1.HttpService }, { token: i2.ToastrService }, { token: i1.CredentialsService }, { token: i3.PusherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
NgxTechlifyNotifierComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NgxTechlifyNotifierComponent, selector: "app-ngx-techlify-notifier", ngImport: i0, template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">Test Title</span>\n </div>\n <div class=\"text-secondary\">\n {{item?.notification?.body}}\n </div>\n </div>\n </ng-container>\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\" fxLayoutAlign=\"start center\"\n *ngIf=\"notifications.length == 0\">\n <span> No Notifications to show</span>\n </div>\n</mat-menu>", styles: [":host{display:flex}::ng-deep .mat-menu-panel.notifications{width:500px!important;max-width:500px!important;min-height:unset!important}::ng-deep .mat-menu-panel.notifications .mat-menu-content{padding:0!important}::ng-deep .mat-menu-panel.notifications .mat-menu-item{height:auto!important;line-height:20px!important}:host ::ng-deep .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{top:-10px;right:5px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i6.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"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i9.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i11.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
|
|
92
97
|
NgxTechlifyNotifierComponent = __decorate([
|
|
93
98
|
UntilDestroy()
|
|
94
99
|
], NgxTechlifyNotifierComponent);
|
|
95
100
|
export { NgxTechlifyNotifierComponent };
|
|
96
101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NgxTechlifyNotifierComponent, decorators: [{
|
|
97
102
|
type: Component,
|
|
98
|
-
args: [{ selector: 'app-ngx-techlify-notifier', template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">
|
|
99
|
-
}], ctorParameters: function () { return [{ type: i1.HttpService }, { type: i2.ToastrService }, { type: undefined, decorators: [{
|
|
103
|
+
args: [{ selector: 'app-ngx-techlify-notifier', template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">Test Title</span>\n </div>\n <div class=\"text-secondary\">\n {{item?.notification?.body}}\n </div>\n </div>\n </ng-container>\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\" fxLayoutAlign=\"start center\"\n *ngIf=\"notifications.length == 0\">\n <span> No Notifications to show</span>\n </div>\n</mat-menu>", styles: [":host{display:flex}::ng-deep .mat-menu-panel.notifications{width:500px!important;max-width:500px!important;min-height:unset!important}::ng-deep .mat-menu-panel.notifications .mat-menu-content{padding:0!important}::ng-deep .mat-menu-panel.notifications .mat-menu-item{height:auto!important;line-height:20px!important}:host ::ng-deep .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{top:-10px;right:5px}\n"] }]
|
|
104
|
+
}], ctorParameters: function () { return [{ type: i1.HttpService }, { type: i2.ToastrService }, { type: i1.CredentialsService }, { type: i3.PusherService }, { type: undefined, decorators: [{
|
|
100
105
|
type: Inject,
|
|
101
106
|
args: ['environment']
|
|
102
107
|
}] }]; } });
|
|
103
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXRlY2hsaWZ5LW5vdGlmaWVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saWIvdGVjaGxpZnktbm90aWZpY2F0aW9ucy9uZ3gtdGVjaGxpZnktbm90aWZpZXIvbmd4LXRlY2hsaWZ5LW5vdGlmaWVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC10ZWNobGlmeS1jb3JlL3NyYy9saW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BcIj57e2l0ZW0/Lm5vdGlmaWNhdGlvbj8udGl0bGV9fTwvaDM+XG4gICAgICAgICAgICAgICAgPHNwYW4gZnhGbGV4Pjwvc3Bhbj5cbiAgICAgICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJ7J3RleHQtc3VjY2Vzcyc6KGl0ZW0/LnN0YXR1c19pZCA9PSAyKSwndGV4dC1zZWNvbmRhcnknOihpdGVtPy5zdGF0dXNfaWQgPT0gMSl9XCI+VGVzdCBUaXRsZTwvc3Bhbj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRleHQtc2Vjb25kYXJ5XCI+XG4gICAgICAgICAgICAgICAge3tpdGVtPy5ub3RpZmljYXRpb24/LmJvZHl9fVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgIDwvbmctY29udGFpbmVyPlxuICAgIDxkaXYgbWF0LW1lbnUtaXRlbSBjbGFzcz1cIm1hdC1lbGV2YXRpb24tejEgcC0yIG1hdC10eXBvZ3JhcGh5XCIgZnhMYXlvdXQ9XCJjb2x1bW5cIiBmeExheW91dEFsaWduPVwic3RhcnQgY2VudGVyXCJcbiAgICAgICAgKm5nSWY9XCJub3RpZmljYXRpb25zLmxlbmd0aCA9PSAwXCI+XG4gICAgICAgIDxzcGFuPiBObyBOb3RpZmljYXRpb25zIHRvIHNob3c8L3NwYW4+XG4gICAgPC9kaXY+XG48L21hdC1tZW51PiJdfQ==
|
|
@@ -30,7 +30,7 @@ import * as i1$4 from '@angular/forms';
|
|
|
30
30
|
import { UntypedFormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
31
31
|
import * as i1$2 from '@angular/common/http';
|
|
32
32
|
import { HttpResponse, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
33
|
-
import { throwError, Observable, Subject, fromEvent, of, from,
|
|
33
|
+
import { throwError, Observable, Subject, fromEvent, of, from, BehaviorSubject } from 'rxjs';
|
|
34
34
|
import { catchError, debounceTime, takeUntil, tap, distinctUntilChanged, startWith, switchMap, finalize, map, filter } from 'rxjs/operators';
|
|
35
35
|
import * as i1$1 from '@angular/material/snack-bar';
|
|
36
36
|
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
@@ -62,13 +62,14 @@ import * as i1$5 from '@angular/router';
|
|
|
62
62
|
import { RouteReuseStrategy, RouterModule, NavigationEnd } from '@angular/router';
|
|
63
63
|
import * as i7$3 from '@angular/material/divider';
|
|
64
64
|
import { MatDividerModule } from '@angular/material/divider';
|
|
65
|
-
import * as i8$
|
|
65
|
+
import * as i8$3 from '@angular/material/list';
|
|
66
66
|
import { MatListModule } from '@angular/material/list';
|
|
67
67
|
import * as i5$1 from '@angular/material/button-toggle';
|
|
68
68
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
69
69
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
70
70
|
import * as i2$1 from 'ngx-toastr';
|
|
71
|
-
import
|
|
71
|
+
import Pusher from 'pusher-js';
|
|
72
|
+
import * as i9$3 from '@angular/material/badge';
|
|
72
73
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
73
74
|
import * as i10$1 from '@angular/material/slide-toggle';
|
|
74
75
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
@@ -4265,10 +4266,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
4265
4266
|
}]
|
|
4266
4267
|
}] });
|
|
4267
4268
|
|
|
4269
|
+
class PusherService {
|
|
4270
|
+
constructor(credentialService, techlifyConfig) {
|
|
4271
|
+
this.credentialService = credentialService;
|
|
4272
|
+
this.techlifyConfig = techlifyConfig;
|
|
4273
|
+
this.pusher = new BehaviorSubject(null);
|
|
4274
|
+
this.initPusher();
|
|
4275
|
+
}
|
|
4276
|
+
initPusher() {
|
|
4277
|
+
var _a, _b, _c;
|
|
4278
|
+
console.log('Init Pusher');
|
|
4279
|
+
if (this.pusher.value) {
|
|
4280
|
+
this.pusher.value.disconnect();
|
|
4281
|
+
}
|
|
4282
|
+
console.log('pusher', this.pusher);
|
|
4283
|
+
this.pusher.next(new Pusher(this.techlifyConfig.getConfigsRaw().pusherAppKey, {
|
|
4284
|
+
cluster: this.techlifyConfig.getConfigsRaw().pusherAppCluster,
|
|
4285
|
+
forceTLS: true,
|
|
4286
|
+
authEndpoint: this.techlifyConfig.getApiUrl() + 'broadcasting/auth',
|
|
4287
|
+
auth: {
|
|
4288
|
+
headers: {
|
|
4289
|
+
Authorization: 'Bearer ' + ((_c = (_b = (_a = this.credentialService) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.token) === null || _c === void 0 ? void 0 : _c.access_token)
|
|
4290
|
+
}
|
|
4291
|
+
}
|
|
4292
|
+
}));
|
|
4293
|
+
}
|
|
4294
|
+
getPusher() {
|
|
4295
|
+
return this.pusher.asObservable();
|
|
4296
|
+
}
|
|
4297
|
+
}
|
|
4298
|
+
PusherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PusherService, deps: [{ token: CredentialsService }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4299
|
+
PusherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PusherService, providedIn: 'root' });
|
|
4300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PusherService, decorators: [{
|
|
4301
|
+
type: Injectable,
|
|
4302
|
+
args: [{
|
|
4303
|
+
providedIn: 'root'
|
|
4304
|
+
}]
|
|
4305
|
+
}], ctorParameters: function () { return [{ type: CredentialsService }, { type: ConfigService }]; } });
|
|
4306
|
+
|
|
4268
4307
|
let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
4269
|
-
constructor(http, toastr, environment) {
|
|
4308
|
+
constructor(http, toastr, credentialService, pusherService, environment) {
|
|
4270
4309
|
this.http = http;
|
|
4271
4310
|
this.toastr = toastr;
|
|
4311
|
+
this.credentialService = credentialService;
|
|
4312
|
+
this.pusherService = pusherService;
|
|
4272
4313
|
this.environment = environment;
|
|
4273
4314
|
this.notifications = [];
|
|
4274
4315
|
this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };
|
|
@@ -4277,39 +4318,24 @@ let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
|
4277
4318
|
isLoadRelations: true,
|
|
4278
4319
|
relations: 'status,notification'
|
|
4279
4320
|
};
|
|
4321
|
+
this.user = this.credentialService.credentials.user;
|
|
4280
4322
|
}
|
|
4281
4323
|
ngOnInit() {
|
|
4282
|
-
var _a
|
|
4324
|
+
var _a;
|
|
4325
|
+
console.log('Init Notifications');
|
|
4283
4326
|
this.rootScrollContainer = ((_a = this.environment) === null || _a === void 0 ? void 0 : _a.rootScrollContainer) || 'body';
|
|
4284
|
-
this.pollingInterval =
|
|
4285
|
-
this.
|
|
4327
|
+
// this.pollingInterval = this.environment?.notificationPollingInterval || 5000;
|
|
4328
|
+
this.pushNotifications();
|
|
4286
4329
|
}
|
|
4287
4330
|
loadNotifications(initiate = false) {
|
|
4331
|
+
console.log('Load Notifications');
|
|
4288
4332
|
this.fetchNotifications(this.pageEvent).subscribe((result) => {
|
|
4289
4333
|
this.notifications = this.notifications.concat(result.data);
|
|
4290
4334
|
this.notifications = [...new Map(this.notifications.map(item => [item['id'], item])).values()];
|
|
4291
4335
|
this.pageEvent.page = result.current_page;
|
|
4292
4336
|
this.pageEvent.lastPage = result.last_page;
|
|
4293
|
-
if (initiate) {
|
|
4294
|
-
this.startNotificationPolling();
|
|
4295
|
-
}
|
|
4296
4337
|
});
|
|
4297
4338
|
}
|
|
4298
|
-
startNotificationPolling() {
|
|
4299
|
-
this.$notificationLoader =
|
|
4300
|
-
interval(this.pollingInterval)
|
|
4301
|
-
.pipe(switchMap((_) => this.fetchNotifications({ page: 1, perPage: 25, lastPage: 1 })), untilDestroyed(this)).subscribe((result) => {
|
|
4302
|
-
//Look for any new notifications
|
|
4303
|
-
const newNotifications = result.data.filter((item) => !this.notifications.some((x) => x.id == item.id));
|
|
4304
|
-
if ((newNotifications === null || newNotifications === void 0 ? void 0 : newNotifications.length) > 0) {
|
|
4305
|
-
this.notifications = newNotifications.concat(this.notifications);
|
|
4306
|
-
newNotifications.forEach((item) => {
|
|
4307
|
-
var _a, _b;
|
|
4308
|
-
this.toastr.success((_a = item === null || item === void 0 ? void 0 : item.notification) === null || _a === void 0 ? void 0 : _a.body, (_b = item === null || item === void 0 ? void 0 : item.notification) === null || _b === void 0 ? void 0 : _b.title);
|
|
4309
|
-
});
|
|
4310
|
-
}
|
|
4311
|
-
});
|
|
4312
|
-
}
|
|
4313
4339
|
get unreadNotificationsCount() {
|
|
4314
4340
|
return this.notifications.filter(x => x.status_id === TechlifyNotificationUserStatus.DELIVERED).length;
|
|
4315
4341
|
}
|
|
@@ -4317,6 +4343,24 @@ let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
|
4317
4343
|
return this.http.get(`api/notification-users`, { params: Object.assign(Object.assign({}, this.filters), pageEvent) })
|
|
4318
4344
|
.pipe(untilDestroyed(this));
|
|
4319
4345
|
}
|
|
4346
|
+
pushNotifications() {
|
|
4347
|
+
console.log('Push Notifications');
|
|
4348
|
+
if (this.user) {
|
|
4349
|
+
console.log('Found User');
|
|
4350
|
+
// load messages
|
|
4351
|
+
this.loadNotifications();
|
|
4352
|
+
// get pusher
|
|
4353
|
+
this.pusherService.getPusher().subscribe((pusher) => {
|
|
4354
|
+
// generate channel name
|
|
4355
|
+
let channelName = `notification-channel-32`;
|
|
4356
|
+
// subscribe to chat channel
|
|
4357
|
+
this.channel = pusher.subscribe(channelName);
|
|
4358
|
+
this.channel = this.channel.bind('notification-event', (e) => {
|
|
4359
|
+
console.log(e);
|
|
4360
|
+
});
|
|
4361
|
+
});
|
|
4362
|
+
}
|
|
4363
|
+
}
|
|
4320
4364
|
onScroll() {
|
|
4321
4365
|
if (this.pageEvent.lastPage > this.pageEvent.page) {
|
|
4322
4366
|
this.pageEvent.page += 1;
|
|
@@ -4339,16 +4383,16 @@ let NgxTechlifyNotifierComponent = class NgxTechlifyNotifierComponent {
|
|
|
4339
4383
|
}
|
|
4340
4384
|
}
|
|
4341
4385
|
};
|
|
4342
|
-
NgxTechlifyNotifierComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NgxTechlifyNotifierComponent, deps: [{ token: HttpService }, { token: i2$1.ToastrService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
|
|
4343
|
-
NgxTechlifyNotifierComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NgxTechlifyNotifierComponent, selector: "app-ngx-techlify-notifier", ngImport: i0, template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">
|
|
4386
|
+
NgxTechlifyNotifierComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NgxTechlifyNotifierComponent, deps: [{ token: HttpService }, { token: i2$1.ToastrService }, { token: CredentialsService }, { token: PusherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
|
|
4387
|
+
NgxTechlifyNotifierComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NgxTechlifyNotifierComponent, selector: "app-ngx-techlify-notifier", ngImport: i0, template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">Test Title</span>\n </div>\n <div class=\"text-secondary\">\n {{item?.notification?.body}}\n </div>\n </div>\n </ng-container>\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\" fxLayoutAlign=\"start center\"\n *ngIf=\"notifications.length == 0\">\n <span> No Notifications to show</span>\n </div>\n</mat-menu>", styles: [":host{display:flex}::ng-deep .mat-menu-panel.notifications{width:500px!important;max-width:500px!important;min-height:unset!important}::ng-deep .mat-menu-panel.notifications .mat-menu-content{padding:0!important}::ng-deep .mat-menu-panel.notifications .mat-menu-item{height:auto!important;line-height:20px!important}:host ::ng-deep .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{top:-10px;right:5px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i5.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"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i9$3.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i7.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
|
|
4344
4388
|
NgxTechlifyNotifierComponent = __decorate([
|
|
4345
4389
|
UntilDestroy()
|
|
4346
4390
|
], NgxTechlifyNotifierComponent);
|
|
4347
4391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NgxTechlifyNotifierComponent, decorators: [{
|
|
4348
4392
|
type: Component,
|
|
4349
|
-
args: [{ selector: 'app-ngx-techlify-notifier', template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">
|
|
4393
|
+
args: [{ selector: 'app-ngx-techlify-notifier', template: "<button mat-button [matMenuTriggerFor]=\"notificaitonMenu\" type=\"button\" #menuTrigger=\"matMenuTrigger\"\n [matBadge]=\"unreadNotificationsCount\" matBadgePosition=\"after\" matBadgeColor=\"warn\"\n [matBadgeHidden]=\"unreadNotificationsCount == 0\">\n <mat-icon>notifications_active</mat-icon>\n</button>\n\n<mat-menu #notificaitonMenu=\"matMenu\" class=\"notifications\">\n <ng-container *ngIf=\"notifications.length > 0 && menuTrigger.menuOpen\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" infiniteScrollContainer=\".mat-menu-panel.notifications\"\n [fromRoot]=\"true\">\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\"\n *ngFor=\"let item of notifications\" (click)=\"notificationClick($event, item)\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h3 class=\"m-0\">{{item?.notification?.title}}</h3>\n <span fxFlex></span>\n <span\n [ngClass]=\"{'text-success':(item?.status_id == 2),'text-secondary':(item?.status_id == 1)}\">Test Title</span>\n </div>\n <div class=\"text-secondary\">\n {{item?.notification?.body}}\n </div>\n </div>\n </ng-container>\n <div mat-menu-item class=\"mat-elevation-z1 p-2 mat-typography\" fxLayout=\"column\" fxLayoutAlign=\"start center\"\n *ngIf=\"notifications.length == 0\">\n <span> No Notifications to show</span>\n </div>\n</mat-menu>", styles: [":host{display:flex}::ng-deep .mat-menu-panel.notifications{width:500px!important;max-width:500px!important;min-height:unset!important}::ng-deep .mat-menu-panel.notifications .mat-menu-content{padding:0!important}::ng-deep .mat-menu-panel.notifications .mat-menu-item{height:auto!important;line-height:20px!important}:host ::ng-deep .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content{top:-10px;right:5px}\n"] }]
|
|
4350
4394
|
}], ctorParameters: function () {
|
|
4351
|
-
return [{ type: HttpService }, { type: i2$1.ToastrService }, { type: undefined, decorators: [{
|
|
4395
|
+
return [{ type: HttpService }, { type: i2$1.ToastrService }, { type: CredentialsService }, { type: PusherService }, { type: undefined, decorators: [{
|
|
4352
4396
|
type: Inject,
|
|
4353
4397
|
args: ['environment']
|
|
4354
4398
|
}] }];
|
|
@@ -4452,7 +4496,7 @@ let TechlifyNotificationForUserComponent = class TechlifyNotificationForUserComp
|
|
|
4452
4496
|
}
|
|
4453
4497
|
};
|
|
4454
4498
|
TechlifyNotificationForUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TechlifyNotificationForUserComponent, deps: [{ token: HttpService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
|
|
4455
|
-
TechlifyNotificationForUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TechlifyNotificationForUserComponent, selector: "app-techlify-notification-for-user", inputs: { blockAdminNotification: "blockAdminNotification" }, ngImport: i0, template: "<div fxLayout=\"column\" class=\"container my-4\">\n\n <div infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\" [infiniteScrollContainer]=\"rootScrollContainer\">\n <mat-list>\n <div mat-subheader>Notifications</div>\n <mat-list-item *ngFor=\"let notification of notifications\">\n <mat-icon mat-list-icon>email</mat-icon>\n <div mat-line>{{notification?.title}} </div>\n <div mat-line> {{notification?.description}} </div>\n <div fxLayout fxLayoutAlign=\"end\">\n <button *ngIf=\"notification?.current_user_subscription?.is_subscribed\" type=\"button\"\n mat-stroked-button color=\"primary\" (click)=\"toggleSubscription(notification)\">\n Unsubscribe\n </button>\n <button *ngIf=\"!notification?.current_user_subscription?.is_subscribed\" type=\"button\"\n mat-raised-button color=\"primary\" (click)=\"toggleSubscription(notification)\">\n Subscribe\n </button>\n </div>\n <mat-divider></mat-divider>\n </mat-list-item>\n </mat-list>\n </div>\n\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i5.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"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i7$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8$
|
|
4499
|
+
TechlifyNotificationForUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TechlifyNotificationForUserComponent, selector: "app-techlify-notification-for-user", inputs: { blockAdminNotification: "blockAdminNotification" }, ngImport: i0, template: "<div fxLayout=\"column\" class=\"container my-4\">\n\n <div infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\" [infiniteScrollContainer]=\"rootScrollContainer\">\n <mat-list>\n <div mat-subheader>Notifications</div>\n <mat-list-item *ngFor=\"let notification of notifications\">\n <mat-icon mat-list-icon>email</mat-icon>\n <div mat-line>{{notification?.title}} </div>\n <div mat-line> {{notification?.description}} </div>\n <div fxLayout fxLayoutAlign=\"end\">\n <button *ngIf=\"notification?.current_user_subscription?.is_subscribed\" type=\"button\"\n mat-stroked-button color=\"primary\" (click)=\"toggleSubscription(notification)\">\n Unsubscribe\n </button>\n <button *ngIf=\"!notification?.current_user_subscription?.is_subscribed\" type=\"button\"\n mat-raised-button color=\"primary\" (click)=\"toggleSubscription(notification)\">\n Subscribe\n </button>\n </div>\n <mat-divider></mat-divider>\n </mat-list-item>\n </mat-list>\n </div>\n\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i5.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"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i7$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8$3.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { kind: "component", type: i8$3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "directive", type: i8$3.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { kind: "directive", type: i8$3.MatListSubheaderCssMatStyler, selector: "[mat-subheader], [matSubheader]" }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
|
|
4456
4500
|
TechlifyNotificationForUserComponent = __decorate([
|
|
4457
4501
|
UntilDestroy()
|
|
4458
4502
|
], TechlifyNotificationForUserComponent);
|
|
@@ -6528,7 +6572,7 @@ let EmailSubscriptionForUserComponent = class EmailSubscriptionForUserComponent
|
|
|
6528
6572
|
}
|
|
6529
6573
|
};
|
|
6530
6574
|
EmailSubscriptionForUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EmailSubscriptionForUserComponent, deps: [{ token: HttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6531
|
-
EmailSubscriptionForUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: EmailSubscriptionForUserComponent, selector: "app-email-subscription-for-user", ngImport: i0, template: "<div fxLayout=\"column\" class=\"container my-4\">\n\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <mat-list>\n <div mat-subheader>Available Subscriptions</div>\n <mat-list-item *ngFor=\"let sub of subscriptions\">\n <mat-icon mat-list-icon>email</mat-icon>\n <div mat-line>{{sub?.title}} </div>\n <div mat-line class=\"text-secondary\">{{sub?.frequency?.title}}</div>\n <div mat-line> {{sub?.description}} </div>\n <div fxLayout fxLayoutAlign=\"end\">\n <button type=\"button\" *ngIf=\"!sub?.current_user_subscription\" mat-raised-button color=\"primary\"\n (click)=\"subscribe(sub)\">Subscribe</button>\n <button type=\"button\" *ngIf=\"sub?.current_user_subscription\" mat-stroked-button color=\"primary\"\n (click)=\"unsubscribe(sub)\">Unsubscribe</button>\n </div>\n <mat-divider></mat-divider>\n </mat-list-item>\n </mat-list>\n </div>\n\n</div>", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i5.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"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i7$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8$
|
|
6575
|
+
EmailSubscriptionForUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: EmailSubscriptionForUserComponent, selector: "app-email-subscription-for-user", ngImport: i0, template: "<div fxLayout=\"column\" class=\"container my-4\">\n\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <mat-list>\n <div mat-subheader>Available Subscriptions</div>\n <mat-list-item *ngFor=\"let sub of subscriptions\">\n <mat-icon mat-list-icon>email</mat-icon>\n <div mat-line>{{sub?.title}} </div>\n <div mat-line class=\"text-secondary\">{{sub?.frequency?.title}}</div>\n <div mat-line> {{sub?.description}} </div>\n <div fxLayout fxLayoutAlign=\"end\">\n <button type=\"button\" *ngIf=\"!sub?.current_user_subscription\" mat-raised-button color=\"primary\"\n (click)=\"subscribe(sub)\">Subscribe</button>\n <button type=\"button\" *ngIf=\"sub?.current_user_subscription\" mat-stroked-button color=\"primary\"\n (click)=\"unsubscribe(sub)\">Unsubscribe</button>\n </div>\n <mat-divider></mat-divider>\n </mat-list-item>\n </mat-list>\n </div>\n\n</div>", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i5.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"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i7$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8$3.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { kind: "component", type: i8$3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "directive", type: i8$3.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { kind: "directive", type: i8$3.MatListSubheaderCssMatStyler, selector: "[mat-subheader], [matSubheader]" }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
|
|
6532
6576
|
EmailSubscriptionForUserComponent = __decorate([
|
|
6533
6577
|
UntilDestroy()
|
|
6534
6578
|
], EmailSubscriptionForUserComponent);
|