@rolatech/angular-notification 17.4.0 → 17.4.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/esm2022/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
+ export { NotificationIconComponent } from './lib/components/notification-icon/notification-icon.component';
1
2
  export { NotificationDetailComponent } from './lib/components/notification-detail/notification-detail.component';
2
3
  export { NotificationIndexComponent } from './lib/components/notification-index/notification-index.component';
3
4
  export { NotificationItemComponent } from './lib/components/notification-item/notification-item.component';
4
5
  export * from './provider';
5
6
  export * from './lib/notification.routes';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItbm90aWZpY2F0aW9uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxvRUFBb0UsQ0FBQztBQUNqSCxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxrRUFBa0UsQ0FBQztBQUM5RyxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxnRUFBZ0UsQ0FBQztBQUMzRyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgTm90aWZpY2F0aW9uRGV0YWlsQ29tcG9uZW50IH0gZnJvbSAnLi9saWIvY29tcG9uZW50cy9ub3RpZmljYXRpb24tZGV0YWlsL25vdGlmaWNhdGlvbi1kZXRhaWwuY29tcG9uZW50JztcbmV4cG9ydCB7IE5vdGlmaWNhdGlvbkluZGV4Q29tcG9uZW50IH0gZnJvbSAnLi9saWIvY29tcG9uZW50cy9ub3RpZmljYXRpb24taW5kZXgvbm90aWZpY2F0aW9uLWluZ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VudCc7XG5leHBvcnQgeyBOb3RpZmljYXRpb25JbmRleENvbXBvbmVudCB9IGZyb20gJy4vbGliL2NvbXBvbmVudHMvbm90aWZpY2F0aW9uLWluZGV4L25vdGlmaWNhdGlvbi1pbmRleC5jb21wb25lbnQnO1xuZXhwb3J0IHsgTm90aWZpY2F0aW9uSXRlbUNvbXBvbmVudCB9IGZyb20gJy4vbGliL2NvbXBvbmVudHMvbm90aWZpY2F0aW9uLWl0ZW0vbm90aWZpY2F0aW9uLWl0ZW0uY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vcHJvdmlkZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbm90aWZpY2F0aW9uLnJvdXRlcyc7XG4iXX0=
@@ -0,0 +1,60 @@
1
+ import { Component, ViewEncapsulation, inject, input } from '@angular/core';
2
+ import { AngularCommonModule } from '@rolatech/angular-common';
3
+ import { NotificationService, NotificationStore } from '@rolatech/angular-services';
4
+ import { AngularComponentsModule } from '@rolatech/angular-components';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@angular/router";
7
+ import * as i2 from "@angular/material/badge";
8
+ import * as i3 from "@angular/material/button";
9
+ import * as i4 from "@angular/material/icon";
10
+ import * as i5 from "@angular/material/menu";
11
+ export class NotificationIconComponent {
12
+ router = input('/notifications');
13
+ notifications = [];
14
+ notificationService = inject(NotificationService);
15
+ storeService = inject(NotificationStore);
16
+ count = 0;
17
+ countSubscription;
18
+ ngOnInit() {
19
+ this.countNotificationByStatus();
20
+ this.storeService.$count.subscribe((data) => {
21
+ this.count = data;
22
+ });
23
+ }
24
+ ngOnDestroy() {
25
+ if (this.countSubscription)
26
+ this.countSubscription.unsubscribe();
27
+ }
28
+ countNotificationByStatus() {
29
+ this.notificationService.countByStatus('UNREAD').subscribe({
30
+ next: (res) => {
31
+ this.loadUnreadNotifications();
32
+ },
33
+ });
34
+ }
35
+ loadUnreadNotifications() {
36
+ const options = {
37
+ filter: 'status:UNREAD',
38
+ sort: 'createdAt desc',
39
+ };
40
+ this.notificationService.me(options).subscribe({
41
+ next: (res) => {
42
+ this.notifications = res.data;
43
+ },
44
+ });
45
+ }
46
+ readAll() {
47
+ this.notificationService.readAll().subscribe({
48
+ next: (res) => {
49
+ this.notifications = [];
50
+ },
51
+ });
52
+ }
53
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
54
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: NotificationIconComponent, isStandalone: true, selector: "rolatech-notification-icon", inputs: { router: { classPropertyName: "router", publicName: "router", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">notifications</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[256px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u901A\u77E5\u6D88\u606F</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"readAll()\" aria-hidden=\"true\">\u5168\u90E8\u5DF2\u8BFB</span>\n }\n </div>\n <div>\n @if (notifications && notifications.length > 0) {\n <div class=\"divide-y\">\n @for (item of notifications; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0\u901A\u77E5</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> \u901A\u77E5\u4E2D\u5FC3 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-notification-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "directive", type: i2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None });
55
+ }
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationIconComponent, decorators: [{
57
+ type: Component,
58
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-notification-icon', encapsulation: ViewEncapsulation.None, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">notifications</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[256px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u901A\u77E5\u6D88\u606F</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"readAll()\" aria-hidden=\"true\">\u5168\u90E8\u5DF2\u8BFB</span>\n }\n </div>\n <div>\n @if (notifications && notifications.length > 0) {\n <div class=\"divide-y\">\n @for (item of notifications; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0\u901A\u77E5</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> \u901A\u77E5\u4E2D\u5FC3 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-notification-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"] }]
59
+ }] });
60
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWljb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLW5vdGlma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AgICA8L2Rpdj5cbiAgICA8ZGl2IGNsYXNzPVwiaC0xMSBmbGV4IGp1c3RpZnktY2VudGVyIGl0ZW1zLWNlbnRlciBjdXJzb3ItcG9pbnRlciBob3ZlcjpiZy1bLS1ydC1yYWlzZWQtYmFja2dyb3VuZF1cIiBbcm91dGVyTGlua109XCJyb3V0ZXIoKVwiPlxuICAgICAgPGEgY2xhc3M9XCJmbGV4IGp1c3RpZnktY2VudGVyIGl0ZW1zLWNlbnRlclwiPlxuICAgICAgICA8c3BhbiBjbGFzcz1cInRleHQtc20gdGV4dC1bLS1ydC1icmFuZC1jb2xvcl1cIj4g6YCa55+l5Lit5b+DIDwvc3Bhbj5cbiAgICAgIDwvYT5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L21hdC1tZW51PlxuIl19
@@ -1,20 +1,73 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Component, input, output, viewChild, ViewEncapsulation, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';
2
+ import { input, inject, Component, ViewEncapsulation, output, viewChild, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';
3
+ import { AngularCommonModule } from '@rolatech/angular-common';
4
+ import { NotificationService, NotificationStore } from '@rolatech/angular-services';
5
+ import { AngularComponentsModule, BaseComponent, ContainerComponent, ToolbarComponent, TabsComponent, TabComponent, ListComponent, EmptyComponent } from '@rolatech/angular-components';
6
+ import * as i1 from '@angular/router';
7
+ import { ActivatedRoute, RouterModule } from '@angular/router';
8
+ import * as i2 from '@angular/material/badge';
9
+ import * as i3 from '@angular/material/button';
10
+ import * as i4 from '@angular/material/icon';
11
+ import { MatIconModule } from '@angular/material/icon';
12
+ import * as i5 from '@angular/material/menu';
3
13
  import { MatSnackBar } from '@angular/material/snack-bar';
4
- import { BaseComponent, AngularComponentsModule, ContainerComponent, ToolbarComponent, TabsComponent, TabComponent, ListComponent, EmptyComponent } from '@rolatech/angular-components';
5
- import { NotificationService } from '@rolatech/angular-services';
6
- import * as i2 from '@angular/material/paginator';
14
+ import * as i2$1 from '@angular/material/paginator';
7
15
  import { MatPaginator } from '@angular/material/paginator';
8
16
  import { MatTableDataSource } from '@angular/material/table';
9
17
  import { trigger, state, style, transition, animate } from '@angular/animations';
10
- import * as i1 from '@angular/material/icon';
11
- import { MatIconModule } from '@angular/material/icon';
12
18
  import { NgClass, DatePipe, CommonModule } from '@angular/common';
13
- import { AngularCommonModule } from '@rolatech/angular-common';
14
- import * as i1$1 from '@angular/router';
15
- import { ActivatedRoute, RouterModule } from '@angular/router';
16
19
  import { ReactiveFormsModule, FormsModule } from '@angular/forms';
17
20
 
21
+ class NotificationIconComponent {
22
+ router = input('/notifications');
23
+ notifications = [];
24
+ notificationService = inject(NotificationService);
25
+ storeService = inject(NotificationStore);
26
+ count = 0;
27
+ countSubscription;
28
+ ngOnInit() {
29
+ this.countNotificationByStatus();
30
+ this.storeService.$count.subscribe((data) => {
31
+ this.count = data;
32
+ });
33
+ }
34
+ ngOnDestroy() {
35
+ if (this.countSubscription)
36
+ this.countSubscription.unsubscribe();
37
+ }
38
+ countNotificationByStatus() {
39
+ this.notificationService.countByStatus('UNREAD').subscribe({
40
+ next: (res) => {
41
+ this.loadUnreadNotifications();
42
+ },
43
+ });
44
+ }
45
+ loadUnreadNotifications() {
46
+ const options = {
47
+ filter: 'status:UNREAD',
48
+ sort: 'createdAt desc',
49
+ };
50
+ this.notificationService.me(options).subscribe({
51
+ next: (res) => {
52
+ this.notifications = res.data;
53
+ },
54
+ });
55
+ }
56
+ readAll() {
57
+ this.notificationService.readAll().subscribe({
58
+ next: (res) => {
59
+ this.notifications = [];
60
+ },
61
+ });
62
+ }
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: NotificationIconComponent, isStandalone: true, selector: "rolatech-notification-icon", inputs: { router: { classPropertyName: "router", publicName: "router", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">notifications</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[256px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u901A\u77E5\u6D88\u606F</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"readAll()\" aria-hidden=\"true\">\u5168\u90E8\u5DF2\u8BFB</span>\n }\n </div>\n <div>\n @if (notifications && notifications.length > 0) {\n <div class=\"divide-y\">\n @for (item of notifications; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0\u901A\u77E5</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> \u901A\u77E5\u4E2D\u5FC3 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-notification-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "directive", type: i2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None });
65
+ }
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationIconComponent, decorators: [{
67
+ type: Component,
68
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-notification-icon', encapsulation: ViewEncapsulation.None, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">notifications</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[256px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u901A\u77E5\u6D88\u606F</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"readAll()\" aria-hidden=\"true\">\u5168\u90E8\u5DF2\u8BFB</span>\n }\n </div>\n <div>\n @if (notifications && notifications.length > 0) {\n <div class=\"divide-y\">\n @for (item of notifications; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0\u901A\u77E5</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> \u901A\u77E5\u4E2D\u5FC3 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-notification-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"] }]
69
+ }] });
70
+
18
71
  class NotificationDetailComponent extends BaseComponent {
19
72
  notificationService = inject(NotificationService);
20
73
  snackBar = inject(MatSnackBar);
@@ -56,7 +109,7 @@ class NotificationItemComponent {
56
109
  this.toggle.emit(item);
57
110
  }
58
111
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: NotificationItemComponent, isStandalone: true, selector: "rolatech-notification-item", inputs: { notification: { classPropertyName: "notification", publicName: "notification", isSignal: true, isRequired: true, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle" }, ngImport: i0, template: "<div class=\"border-b\" [ngClass]=\"expand() ? 'shadow shadow-light-400' : ''\">\n <div\n class=\"flex justify-between items-center h-16 cursor-pointer px-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n (click)=\"onToggle(notification())\"\n aria-hidden=\"true\"\n >\n <div>{{ notification().title }}</div>\n <div class=\"flex items-center opacity-60\">\n <div class=\"text-sm mr-3\">{{ notification().createdAt | date }}</div>\n <mat-icon>{{ expand() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon>\n </div>\n </div>\n <div\n [class.hidden]=\"!expand()\"\n [@contentAnimation]=\"expand()\"\n class=\"p-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n >\n {{ notification().content }}\n </div>\n <div class=\"divide\"></div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: DatePipe, name: "date" }], animations: [
112
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: NotificationItemComponent, isStandalone: true, selector: "rolatech-notification-item", inputs: { notification: { classPropertyName: "notification", publicName: "notification", isSignal: true, isRequired: true, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle" }, ngImport: i0, template: "<div class=\"border-b\" [ngClass]=\"expand() ? 'shadow shadow-light-400' : ''\">\n <div\n class=\"flex justify-between items-center h-16 cursor-pointer px-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n (click)=\"onToggle(notification())\"\n aria-hidden=\"true\"\n >\n <div>{{ notification().title }}</div>\n <div class=\"flex items-center opacity-60\">\n <div class=\"text-sm mr-3\">{{ notification().createdAt | date }}</div>\n <mat-icon>{{ expand() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon>\n </div>\n </div>\n <div\n [class.hidden]=\"!expand()\"\n [@contentAnimation]=\"expand()\"\n class=\"p-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n >\n {{ notification().content }}\n </div>\n <div class=\"divide\"></div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: DatePipe, name: "date" }], animations: [
60
113
  trigger('contentAnimation', [
61
114
  state('hidden', style({
62
115
  height: '0',
@@ -199,7 +252,7 @@ class NotificationIndexComponent {
199
252
  });
200
253
  }
201
254
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
202
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: NotificationIndexComponent, isStandalone: true, selector: "rolatech-notification-index", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u901A\u77E5\u4E2D\u5FC3\" large></rolatech-toolbar>\n <rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.type) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ type: item.type }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n </rolatech-tabs>\n <rolatech-list>\n @if (notifications) {\n @for (item of notifications; track $index) {\n <div class=\"divide-y px-3\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n </rolatech-list>\n</rolatech-container>\n", styles: [".notification-active{color:#000;border-bottom:4px solid #ff6600}\n"], dependencies: [{ kind: "component", type: NotificationItemComponent, selector: "rolatech-notification-item", inputs: ["notification", "expand"], outputs: ["toggle"] }, { kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: TabsComponent, selector: "rolatech-tabs", inputs: ["select", "loading"], outputs: ["selectChange"] }, { kind: "component", type: TabComponent, selector: "rolatech-tab", inputs: ["label"] }, { kind: "component", type: ListComponent, selector: "rolatech-list" }, { kind: "component", type: EmptyComponent, selector: "rolatech-empty" }], encapsulation: i0.ViewEncapsulation.None });
255
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: NotificationIndexComponent, isStandalone: true, selector: "rolatech-notification-index", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u901A\u77E5\u4E2D\u5FC3\" large></rolatech-toolbar>\n <rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.type) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ type: item.type }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n </rolatech-tabs>\n <rolatech-list>\n @if (notifications) {\n @for (item of notifications; track $index) {\n <div class=\"divide-y px-3\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n </rolatech-list>\n</rolatech-container>\n", styles: [".notification-active{color:#000;border-bottom:4px solid #ff6600}\n"], dependencies: [{ kind: "component", type: NotificationItemComponent, selector: "rolatech-notification-item", inputs: ["notification", "expand"], outputs: ["toggle"] }, { kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: TabsComponent, selector: "rolatech-tabs", inputs: ["select", "loading"], outputs: ["selectChange"] }, { kind: "component", type: TabComponent, selector: "rolatech-tab", inputs: ["label"] }, { kind: "component", type: ListComponent, selector: "rolatech-list" }, { kind: "component", type: EmptyComponent, selector: "rolatech-empty" }], encapsulation: i0.ViewEncapsulation.None });
203
256
  }
204
257
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: NotificationIndexComponent, decorators: [{
205
258
  type: Component,
@@ -235,5 +288,5 @@ const notificationRoutes = [
235
288
  * Generated bundle index. Do not edit.
236
289
  */
237
290
 
238
- export { NotificationDetailComponent, NotificationIndexComponent, NotificationItemComponent, notificationRoutes, provideAngularNotification };
291
+ export { NotificationDetailComponent, NotificationIconComponent, NotificationIndexComponent, NotificationItemComponent, notificationRoutes, provideAngularNotification };
239
292
  //# sourceMappingURL=rolatech-angular-notification.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-notification.mjs","sources":["../../../../libs/angular-notification/src/lib/components/notification-detail/notification-detail.component.ts","../../../../libs/angular-notification/src/lib/components/notification-detail/notification-detail.component.html","../../../../libs/angular-notification/src/lib/interfaces/notification.ts","../../../../libs/angular-notification/src/lib/components/notification-item/notification-item.component.ts","../../../../libs/angular-notification/src/lib/components/notification-item/notification-item.component.html","../../../../libs/angular-notification/src/lib/components/notification-index/notification-index.component.ts","../../../../libs/angular-notification/src/lib/components/notification-index/notification-index.component.html","../../../../libs/angular-notification/src/provider.ts","../../../../libs/angular-notification/src/lib/notification.routes.ts","../../../../libs/angular-notification/src/rolatech-angular-notification.ts"],"sourcesContent":["import { Component, OnInit, inject } from '@angular/core';\nimport { INotification } from '../../interfaces/notification';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { BaseComponent } from '@rolatech/angular-components';\nimport { NotificationService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-notification-detail',\n templateUrl: './notification-detail.component.html',\n styleUrls: ['./notification-detail.component.scss'],\n standalone: true,\n imports: [],\n})\nexport class NotificationDetailComponent extends BaseComponent implements OnInit {\n notificationService = inject(NotificationService);\n snackBar = inject(MatSnackBar);\n notification!: INotification;\n ngOnInit(): void {\n this.get();\n }\n get() {\n this.notificationService.get(this.id).subscribe({\n next: (res: any) => {\n this.notification = res.data;\n this.titleService.setTitle(`通知 | ${this.notification.title}`);\n },\n });\n }\n}\n","@if (notification) {\n <div class=\"p-3\">\n <div class=\"text-xl\">{{ notification.title }}</div>\n <div class=\"text-md\">\n {{ notification.content }}\n </div>\n </div>\n}\n","export interface INotification {\n id: string;\n title: string;\n content: string;\n userId: string;\n status: NotificationStatus | string;\n createdAt: string;\n updatedAt: string;\n}\nexport enum NotificationStatus {\n UNREAD = <any>'未读',\n READ = <any>'已读',\n}\n","import { Component, input, output } from '@angular/core';\nimport { INotification } from '../../interfaces/notification';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { MatIconModule } from '@angular/material/icon';\nimport { NgClass, DatePipe } from '@angular/common';\n\n@Component({\n selector: 'rolatech-notification-item',\n templateUrl: './notification-item.component.html',\n styleUrls: ['./notification-item.component.scss'],\n animations: [\n trigger('contentAnimation', [\n state(\n 'hidden',\n style({\n height: '0',\n opacity: 0,\n }),\n ),\n state(\n 'visible',\n style({\n height: '*',\n opacity: 1,\n }),\n ),\n transition('hidden <=> visible', animate('300ms ease-in-out')),\n ]),\n ],\n standalone: true,\n imports: [NgClass, MatIconModule, DatePipe],\n})\nexport class NotificationItemComponent {\n notification = input.required<INotification>();\n expand = input<boolean>(false);\n toggle = output<INotification>();\n isContentHidden = true;\n\n toggleContent() {\n this.isContentHidden = !this.isContentHidden;\n }\n onToggle(item: INotification) {\n this.toggle.emit(item);\n }\n}\n","<div class=\"border-b\" [ngClass]=\"expand() ? 'shadow shadow-light-400' : ''\">\n <div\n class=\"flex justify-between items-center h-16 cursor-pointer px-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n (click)=\"onToggle(notification())\"\n aria-hidden=\"true\"\n >\n <div>{{ notification().title }}</div>\n <div class=\"flex items-center opacity-60\">\n <div class=\"text-sm mr-3\">{{ notification().createdAt | date }}</div>\n <mat-icon>{{ expand() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon>\n </div>\n </div>\n <div\n [class.hidden]=\"!expand()\"\n [@contentAnimation]=\"expand()\"\n class=\"p-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n >\n {{ notification().content }}\n </div>\n <div class=\"divide\"></div>\n</div>\n","import { Component, OnInit, ViewEncapsulation, inject, viewChild } from '@angular/core';\nimport { INotification, NotificationStatus } from '../../interfaces/notification';\nimport { MatPaginator, PageEvent } from '@angular/material/paginator';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { NotificationItemComponent } from '../notification-item/notification-item.component';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport {\n AngularComponentsModule,\n ContainerComponent,\n EmptyComponent,\n ListComponent,\n TabComponent,\n TabsComponent,\n ToolbarComponent,\n} from '@rolatech/angular-components';\nimport { ActivatedRoute } from '@angular/router';\nimport { NotificationService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-notification-index',\n templateUrl: './notification-index.component.html',\n styleUrls: ['./notification-index.component.scss'],\n standalone: true,\n imports: [\n NotificationItemComponent,\n AngularCommonModule,\n AngularComponentsModule,\n ContainerComponent,\n ToolbarComponent,\n TabsComponent,\n TabComponent,\n ListComponent,\n EmptyComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class NotificationIndexComponent implements OnInit {\n route = inject(ActivatedRoute);\n notificationService = inject(NotificationService);\n snackBar = inject(MatSnackBar);\n notifications: INotification[] = [];\n filter: string | boolean = false;\n pageEvent!: PageEvent;\n length = 100;\n pageSize = 15;\n pageSizeOptions: number[] = [5, 10, 25, 100];\n isLoading = false;\n isSearch = false;\n selectedId = '';\n select = 0;\n displayedColumns: string[] = ['title', 'status', 'createdAt', 'actions'];\n paginator = viewChild(MatPaginator);\n\n orderOptions = [\n {\n key: 'createdAt',\n value: '创建时间',\n icon: 'arrow_upward',\n sort: 'asc',\n },\n {\n key: 'createdAt',\n value: '创建时间',\n icon: 'arrow_downward',\n sort: 'desc',\n },\n {\n key: 'status',\n value: '状态',\n icon: 'arrow_upward',\n sort: 'asc',\n },\n {\n key: 'status',\n value: '状态',\n icon: 'arrow_downward',\n sort: 'desc',\n },\n ];\n status: any = NotificationStatus;\n orderString = 'createdAt desc';\n dataSource = new MatTableDataSource<INotification>();\n links = [\n {\n name: '全部',\n icon: 'dashboard',\n },\n {\n name: '课程',\n icon: 'category',\n type: 'course',\n },\n {\n name: '订单',\n icon: 'category',\n type: 'order',\n },\n ];\n ngOnInit(): void {\n this.route.queryParams.subscribe(({ type }) => {\n this.select = this.links.findIndex((item) => item.type === type);\n if (type) {\n this.filter = `type:${type}`;\n } else {\n this.filter = false;\n }\n this.find(null);\n });\n this.find(null);\n }\n\n find(event?: PageEvent | null): any {\n this.isLoading = true;\n const page = event ? event.pageIndex + 1 : 1;\n const limit = event ? event.pageSize : 15;\n const sort = this.orderString;\n const options = {\n page,\n limit,\n sort,\n };\n if (this.filter) {\n options['filter'] = this.filter;\n }\n this.notificationService.me(options).subscribe({\n next: (res) => {\n this.notifications = res.data;\n this.dataSource.data = this.notifications;\n this.length = res.meta.pagination.count;\n this.isLoading = false;\n },\n error: (e) => {\n this.isLoading = false;\n this.snackBar.open(e.message);\n },\n });\n }\n read(item: any) {\n this.selectedId = item.id;\n if (item.status === 'READ') {\n return;\n }\n this.notificationService.update(item.id).subscribe({\n next: (res) => {\n item.status = 'READ';\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"通知中心\" large></rolatech-toolbar>\n <rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.type) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ type: item.type }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n </rolatech-tabs>\n <rolatech-list>\n @if (notifications) {\n @for (item of notifications; track $index) {\n <div class=\"divide-y px-3\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n </rolatech-list>\n</rolatech-container>\n","import { EnvironmentProviders, Provider, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\n\nexport function provideAngularNotification(): EnvironmentProviders {\n const providers: (Provider | EnvironmentProviders)[] = [\n importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),\n ];\n return makeEnvironmentProviders(providers);\n}\n","import { Routes } from '@angular/router';\nimport { NotificationIndexComponent } from './components/notification-index/notification-index.component';\nimport { NotificationDetailComponent } from './components/notification-detail/notification-detail.component';\n\nexport const notificationRoutes: Routes = [\n {\n path: '',\n component: NotificationIndexComponent,\n },\n { path: ':id', component: NotificationDetailComponent },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;AAaM,MAAO,2BAA4B,SAAQ,aAAa,CAAA;AAC5D,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAClD,IAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAC/B,IAAA,YAAY,CAAiB;IAC7B,QAAQ,GAAA;QACN,IAAI,CAAC,GAAG,EAAE,CAAC;KACZ;IACD,GAAG,GAAA;QACD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,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AAA,EACb,cAAc,EAAA,QAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAIL,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAlBtC,SAAS;+BACE,6BAA6B,EAAA,UAAA,EAG3B,IAAI,EACP,OAAA,EAAA;wBACP,yBAAyB;wBACzB,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,gBAAgB;wBAChB,aAAa;wBACb,YAAY;wBACZ,aAAa;wBACb,cAAc;qBACf,EACc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,4rCAAA,EAAA,MAAA,EAAA,CAAA,oEAAA,CAAA,EAAA,CAAA;;;SE9BvB,0BAA0B,GAAA;AACxC,IAAA,MAAM,SAAS,GAAwC;QACrD,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF,CAAC;AACF,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;AAC7C;;ACNa,MAAA,kBAAkB,GAAW;AACxC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,0BAA0B;AACtC,KAAA;AACD,IAAA,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,2BAA2B,EAAE;;;ACTzD;;AAEG;;;;"}
1
+ {"version":3,"file":"rolatech-angular-notification.mjs","sources":["../../../../libs/angular-notification/src/lib/components/notification-icon/notification-icon.component.ts","../../../../libs/angular-notification/src/lib/components/notification-icon/notification-icon.component.html","../../../../libs/angular-notification/src/lib/components/notification-detail/notification-detail.component.ts","../../../../libs/angular-notification/src/lib/components/notification-detail/notification-detail.component.html","../../../../libs/angular-notification/src/lib/interfaces/notification.ts","../../../../libs/angular-notification/src/lib/components/notification-item/notification-item.component.ts","../../../../libs/angular-notification/src/lib/components/notification-item/notification-item.component.html","../../../../libs/angular-notification/src/lib/components/notification-index/notification-index.component.ts","../../../../libs/angular-notification/src/lib/components/notification-index/notification-index.component.html","../../../../libs/angular-notification/src/provider.ts","../../../../libs/angular-notification/src/lib/notification.routes.ts","../../../../libs/angular-notification/src/rolatech-angular-notification.ts"],"sourcesContent":["import { Component, OnDestroy, OnInit, ViewEncapsulation, inject, input } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { NotificationService, NotificationStore } from '@rolatech/angular-services';\nimport { AngularComponentsModule } from '@rolatech/angular-components';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'rolatech-notification-icon',\n templateUrl: './notification-icon.component.html',\n styleUrls: ['./notification-icon.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class NotificationIconComponent implements OnInit, OnDestroy {\n router = input<string>('/notifications');\n notifications: any = [];\n notificationService = inject(NotificationService);\n storeService = inject(NotificationStore);\n\n count = 0;\n private countSubscription!: Subscription;\n ngOnInit(): void {\n this.countNotificationByStatus();\n this.storeService.$count.subscribe((data) => {\n this.count = data;\n });\n }\n ngOnDestroy() {\n if (this.countSubscription) this.countSubscription.unsubscribe();\n }\n\n countNotificationByStatus() {\n this.notificationService.countByStatus('UNREAD').subscribe({\n next: (res) => {\n this.loadUnreadNotifications();\n },\n });\n }\n loadUnreadNotifications() {\n const options = {\n filter: 'status:UNREAD',\n sort: 'createdAt desc',\n };\n this.notificationService.me(options).subscribe({\n next: (res) => {\n this.notifications = res.data;\n },\n });\n }\n readAll() {\n this.notificationService.readAll().subscribe({\n next: (res) => {\n this.notifications = [];\n },\n });\n }\n}\n","<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">notifications</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[256px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">通知消息</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"readAll()\" aria-hidden=\"true\">全部已读</span>\n }\n </div>\n <div>\n @if (notifications && notifications.length > 0) {\n <div class=\"divide-y\">\n @for (item of notifications; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">暂无通知</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> 通知中心 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n","import { Component, OnInit, inject } from '@angular/core';\nimport { INotification } from '../../interfaces/notification';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { BaseComponent } from '@rolatech/angular-components';\nimport { NotificationService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-notification-detail',\n templateUrl: './notification-detail.component.html',\n styleUrls: ['./notification-detail.component.scss'],\n standalone: true,\n imports: [],\n})\nexport class NotificationDetailComponent extends BaseComponent implements OnInit {\n notificationService = inject(NotificationService);\n snackBar = inject(MatSnackBar);\n notification!: INotification;\n ngOnInit(): void {\n this.get();\n }\n get() {\n this.notificationService.get(this.id).subscribe({\n next: (res: any) => {\n this.notification = res.data;\n this.titleService.setTitle(`通知 | ${this.notification.title}`);\n },\n });\n }\n}\n","@if (notification) {\n <div class=\"p-3\">\n <div class=\"text-xl\">{{ notification.title }}</div>\n <div class=\"text-md\">\n {{ notification.content }}\n </div>\n </div>\n}\n","export interface INotification {\n id: string;\n title: string;\n content: string;\n userId: string;\n status: NotificationStatus | string;\n createdAt: string;\n updatedAt: string;\n}\nexport enum NotificationStatus {\n UNREAD = <any>'未读',\n READ = <any>'已读',\n}\n","import { Component, input, output } from '@angular/core';\nimport { INotification } from '../../interfaces/notification';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { MatIconModule } from '@angular/material/icon';\nimport { NgClass, DatePipe } from '@angular/common';\n\n@Component({\n selector: 'rolatech-notification-item',\n templateUrl: './notification-item.component.html',\n styleUrls: ['./notification-item.component.scss'],\n animations: [\n trigger('contentAnimation', [\n state(\n 'hidden',\n style({\n height: '0',\n opacity: 0,\n }),\n ),\n state(\n 'visible',\n style({\n height: '*',\n opacity: 1,\n }),\n ),\n transition('hidden <=> visible', animate('300ms ease-in-out')),\n ]),\n ],\n standalone: true,\n imports: [NgClass, MatIconModule, DatePipe],\n})\nexport class NotificationItemComponent {\n notification = input.required<INotification>();\n expand = input<boolean>(false);\n toggle = output<INotification>();\n isContentHidden = true;\n\n toggleContent() {\n this.isContentHidden = !this.isContentHidden;\n }\n onToggle(item: INotification) {\n this.toggle.emit(item);\n }\n}\n","<div class=\"border-b\" [ngClass]=\"expand() ? 'shadow shadow-light-400' : ''\">\n <div\n class=\"flex justify-between items-center h-16 cursor-pointer px-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n (click)=\"onToggle(notification())\"\n aria-hidden=\"true\"\n >\n <div>{{ notification().title }}</div>\n <div class=\"flex items-center opacity-60\">\n <div class=\"text-sm mr-3\">{{ notification().createdAt | date }}</div>\n <mat-icon>{{ expand() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon>\n </div>\n </div>\n <div\n [class.hidden]=\"!expand()\"\n [@contentAnimation]=\"expand()\"\n class=\"p-3\"\n [ngClass]=\"notification().status === 'READ' ? 'text-[--rt-text-secondary]' : ''\"\n >\n {{ notification().content }}\n </div>\n <div class=\"divide\"></div>\n</div>\n","import { Component, OnInit, ViewEncapsulation, inject, viewChild } from '@angular/core';\nimport { INotification, NotificationStatus } from '../../interfaces/notification';\nimport { MatPaginator, PageEvent } from '@angular/material/paginator';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { NotificationItemComponent } from '../notification-item/notification-item.component';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport {\n AngularComponentsModule,\n ContainerComponent,\n EmptyComponent,\n ListComponent,\n TabComponent,\n TabsComponent,\n ToolbarComponent,\n} from '@rolatech/angular-components';\nimport { ActivatedRoute } from '@angular/router';\nimport { NotificationService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-notification-index',\n templateUrl: './notification-index.component.html',\n styleUrls: ['./notification-index.component.scss'],\n standalone: true,\n imports: [\n NotificationItemComponent,\n AngularCommonModule,\n AngularComponentsModule,\n ContainerComponent,\n ToolbarComponent,\n TabsComponent,\n TabComponent,\n ListComponent,\n EmptyComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class NotificationIndexComponent implements OnInit {\n route = inject(ActivatedRoute);\n notificationService = inject(NotificationService);\n snackBar = inject(MatSnackBar);\n notifications: INotification[] = [];\n filter: string | boolean = false;\n pageEvent!: PageEvent;\n length = 100;\n pageSize = 15;\n pageSizeOptions: number[] = [5, 10, 25, 100];\n isLoading = false;\n isSearch = false;\n selectedId = '';\n select = 0;\n displayedColumns: string[] = ['title', 'status', 'createdAt', 'actions'];\n paginator = viewChild(MatPaginator);\n\n orderOptions = [\n {\n key: 'createdAt',\n value: '创建时间',\n icon: 'arrow_upward',\n sort: 'asc',\n },\n {\n key: 'createdAt',\n value: '创建时间',\n icon: 'arrow_downward',\n sort: 'desc',\n },\n {\n key: 'status',\n value: '状态',\n icon: 'arrow_upward',\n sort: 'asc',\n },\n {\n key: 'status',\n value: '状态',\n icon: 'arrow_downward',\n sort: 'desc',\n },\n ];\n status: any = NotificationStatus;\n orderString = 'createdAt desc';\n dataSource = new MatTableDataSource<INotification>();\n links = [\n {\n name: '全部',\n icon: 'dashboard',\n },\n {\n name: '课程',\n icon: 'category',\n type: 'course',\n },\n {\n name: '订单',\n icon: 'category',\n type: 'order',\n },\n ];\n ngOnInit(): void {\n this.route.queryParams.subscribe(({ type }) => {\n this.select = this.links.findIndex((item) => item.type === type);\n if (type) {\n this.filter = `type:${type}`;\n } else {\n this.filter = false;\n }\n this.find(null);\n });\n this.find(null);\n }\n\n find(event?: PageEvent | null): any {\n this.isLoading = true;\n const page = event ? event.pageIndex + 1 : 1;\n const limit = event ? event.pageSize : 15;\n const sort = this.orderString;\n const options = {\n page,\n limit,\n sort,\n };\n if (this.filter) {\n options['filter'] = this.filter;\n }\n this.notificationService.me(options).subscribe({\n next: (res) => {\n this.notifications = res.data;\n this.dataSource.data = this.notifications;\n this.length = res.meta.pagination.count;\n this.isLoading = false;\n },\n error: (e) => {\n this.isLoading = false;\n this.snackBar.open(e.message);\n },\n });\n }\n read(item: any) {\n this.selectedId = item.id;\n if (item.status === 'READ') {\n return;\n }\n this.notificationService.update(item.id).subscribe({\n next: (res) => {\n item.status = 'READ';\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"通知中心\" large></rolatech-toolbar>\n <rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.type) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ type: item.type }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n </rolatech-tabs>\n <rolatech-list>\n @if (notifications) {\n @for (item of notifications; track $index) {\n <div class=\"divide-y px-3\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\n <mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"pageEvent = find($event)\"\n hidePageSize\n showFirstLastButtons\n >\n </mat-paginator>\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n </rolatech-list>\n</rolatech-container>\n","import { EnvironmentProviders, Provider, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\n\nexport function provideAngularNotification(): EnvironmentProviders {\n const providers: (Provider | EnvironmentProviders)[] = [\n importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),\n ];\n return makeEnvironmentProviders(providers);\n}\n","import { Routes } from '@angular/router';\nimport { NotificationIndexComponent } from './components/notification-index/notification-index.component';\nimport { NotificationDetailComponent } from './components/notification-detail/notification-detail.component';\n\nexport const notificationRoutes: Routes = [\n {\n path: '',\n component: NotificationIndexComponent,\n },\n { path: ':id', component: NotificationDetailComponent },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;MAca,yBAAyB,CAAA;AACpC,IAAA,MAAM,GAAG,KAAK,CAAS,gBAAgB,CAAC,CAAC;IACzC,aAAa,GAAQ,EAAE,CAAC;AACxB,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAClD,IAAA,YAAY,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEzC,KAAK,GAAG,CAAC,CAAC;AACF,IAAA,iBAAiB,CAAgB;IACzC,QAAQ,GAAA;QACN,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,KAAI;AAC1C,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACpB,SAAC,CAAC,CAAC;KACJ;IACD,WAAW,GAAA;QACT,IAAI,IAAI,CAAC,iBAAiB;AAAE,YAAA,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAC;KAClE;IAED,yBAAyB,G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A,CAAA;;;SE9BvB,0BAA0B,GAAA;AACxC,IAAA,MAAM,SAAS,GAAwC;QACrD,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF,CAAC;AACF,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;AAC7C;;ACNa,MAAA,kBAAkB,GAAW;AACxC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,0BAA0B;AACtC,KAAA;AACD,IAAA,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,2BAA2B,EAAE;;;ACTzD;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { NotificationIconComponent } from './lib/components/notification-icon/notification-icon.component';
1
2
  export { NotificationDetailComponent } from './lib/components/notification-detail/notification-detail.component';
2
3
  export { NotificationIndexComponent } from './lib/components/notification-index/notification-index.component';
3
4
  export { NotificationItemComponent } from './lib/components/notification-item/notification-item.component';
@@ -0,0 +1,18 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { NotificationService, NotificationStore } from '@rolatech/angular-services';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NotificationIconComponent implements OnInit, OnDestroy {
5
+ router: import("@angular/core").InputSignal<string>;
6
+ notifications: any;
7
+ notificationService: NotificationService;
8
+ storeService: NotificationStore;
9
+ count: number;
10
+ private countSubscription;
11
+ ngOnInit(): void;
12
+ ngOnDestroy(): void;
13
+ countNotificationByStatus(): void;
14
+ loadUnreadNotifications(): void;
15
+ readAll(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationIconComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationIconComponent, "rolatech-notification-icon", never, { "router": { "alias": "router"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolatech/angular-notification",
3
- "version": "17.4.0",
3
+ "version": "17.4.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",