@rolatech/angular-notification 17.1.0
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/README.md +7 -0
- package/esm2022/index.mjs +9 -0
- package/esm2022/lib/components/notification-detail/notification-detail.component.mjs +28 -0
- package/esm2022/lib/components/notification-icon/notification-icon.component.mjs +62 -0
- package/esm2022/lib/components/notification-index/notification-index.component.mjs +105 -0
- package/esm2022/lib/components/notification-item/notification-item.component.mjs +55 -0
- package/esm2022/lib/components/notification-layout/notification-layout.component.mjs +29 -0
- package/esm2022/lib/interfaces/notification.mjs +6 -0
- package/esm2022/lib/notification.routes.mjs +12 -0
- package/esm2022/lib/services/index.mjs +5 -0
- package/esm2022/lib/services/notification-template.service.mjs +74 -0
- package/esm2022/lib/services/notification.service.mjs +111 -0
- package/esm2022/lib/state/store.mjs +18 -0
- package/esm2022/provider.mjs +13 -0
- package/esm2022/rolatech-angular-notification.mjs +5 -0
- package/fesm2022/rolatech-angular-notification.mjs +482 -0
- package/fesm2022/rolatech-angular-notification.mjs.map +1 -0
- package/index.d.ts +8 -0
- package/lib/components/notification-detail/notification-detail.component.d.ts +15 -0
- package/lib/components/notification-icon/notification-icon.component.d.ts +19 -0
- package/lib/components/notification-index/notification-index.component.d.ts +38 -0
- package/lib/components/notification-item/notification-item.component.d.ts +13 -0
- package/lib/components/notification-layout/notification-layout.component.d.ts +10 -0
- package/lib/interfaces/notification.d.ts +13 -0
- package/lib/notification.routes.d.ts +2 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/notification-template.service.d.ts +14 -0
- package/lib/services/notification.service.d.ts +19 -0
- package/lib/state/store.d.ts +8 -0
- package/package.json +31 -0
- package/provider.d.ts +2 -0
- package/themes/_default.scss +1 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, Component, Input, EventEmitter, Output, ViewChild, importProvidersFrom, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';
|
|
5
|
+
import { catchError, BehaviorSubject, map } from 'rxjs';
|
|
6
|
+
import { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';
|
|
7
|
+
import * as i1 from '@angular/router';
|
|
8
|
+
import { RouterLinkActive, RouterLink, RouterOutlet, RouterModule } from '@angular/router';
|
|
9
|
+
import * as i2 from '@angular/material/badge';
|
|
10
|
+
import * as i3 from '@angular/material/button';
|
|
11
|
+
import * as i4 from '@angular/material/icon';
|
|
12
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
+
import * as i5 from '@angular/material/menu';
|
|
14
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
15
|
+
import * as i1$1 from '@angular/material/paginator';
|
|
16
|
+
import { MatTableDataSource } from '@angular/material/table';
|
|
17
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
18
|
+
import { NgClass, DatePipe, CommonModule } from '@angular/common';
|
|
19
|
+
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
20
|
+
|
|
21
|
+
class NotificationTemplateService {
|
|
22
|
+
environment = inject(APP_CONFIG);
|
|
23
|
+
http = inject(HttpClient);
|
|
24
|
+
find(options) {
|
|
25
|
+
return this.http
|
|
26
|
+
.get(`${this.environment.baseUrl}/notifications`, {
|
|
27
|
+
params: options,
|
|
28
|
+
withCredentials: true,
|
|
29
|
+
})
|
|
30
|
+
.pipe(catchError((error) => {
|
|
31
|
+
throw error;
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
me(options) {
|
|
35
|
+
return this.http
|
|
36
|
+
.get(`${this.environment.baseUrl}/notifications/me`, {
|
|
37
|
+
params: options,
|
|
38
|
+
withCredentials: true,
|
|
39
|
+
})
|
|
40
|
+
.pipe(catchError((error) => {
|
|
41
|
+
throw error;
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
get(id) {
|
|
45
|
+
return this.http
|
|
46
|
+
.get(`${this.environment.baseUrl}/notifications/${id}`, {
|
|
47
|
+
withCredentials: true,
|
|
48
|
+
})
|
|
49
|
+
.pipe(catchError((error) => {
|
|
50
|
+
throw error;
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
read(ids) {
|
|
54
|
+
return this.http
|
|
55
|
+
.get(`${this.environment.baseUrl}/notifications/${ids}`, {
|
|
56
|
+
withCredentials: true,
|
|
57
|
+
})
|
|
58
|
+
.pipe(catchError((error) => {
|
|
59
|
+
throw error;
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
delete(id) {
|
|
63
|
+
return this.http
|
|
64
|
+
.get(`${this.environment.baseUrl}/notifications/${id}`, {
|
|
65
|
+
withCredentials: true,
|
|
66
|
+
})
|
|
67
|
+
.pipe(catchError((error) => {
|
|
68
|
+
throw error;
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
findByUserId(userId) {
|
|
72
|
+
return this.http
|
|
73
|
+
.get(`${this.environment.baseUrl}/notifications/by?userId=${userId}`, {
|
|
74
|
+
withCredentials: true,
|
|
75
|
+
})
|
|
76
|
+
.pipe(catchError((error) => {
|
|
77
|
+
throw error;
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationTemplateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
81
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationTemplateService, providedIn: 'root' });
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationTemplateService, decorators: [{
|
|
84
|
+
type: Injectable,
|
|
85
|
+
args: [{
|
|
86
|
+
providedIn: 'root',
|
|
87
|
+
}]
|
|
88
|
+
}] });
|
|
89
|
+
|
|
90
|
+
class StoreService {
|
|
91
|
+
$count = new BehaviorSubject(0);
|
|
92
|
+
getCount() {
|
|
93
|
+
return this.$count.asObservable();
|
|
94
|
+
}
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: StoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
96
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: StoreService, providedIn: 'root' });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: StoreService, decorators: [{
|
|
99
|
+
type: Injectable,
|
|
100
|
+
args: [{
|
|
101
|
+
providedIn: 'root',
|
|
102
|
+
}]
|
|
103
|
+
}] });
|
|
104
|
+
|
|
105
|
+
class NotificationService {
|
|
106
|
+
environment = inject(APP_CONFIG);
|
|
107
|
+
http = inject(HttpClient);
|
|
108
|
+
storeService = inject(StoreService);
|
|
109
|
+
find(options) {
|
|
110
|
+
return this.http
|
|
111
|
+
.get(`${this.environment.baseUrl}/notifications`, {
|
|
112
|
+
params: options,
|
|
113
|
+
withCredentials: true,
|
|
114
|
+
})
|
|
115
|
+
.pipe(catchError((error) => {
|
|
116
|
+
throw error;
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
me(options) {
|
|
120
|
+
return this.http
|
|
121
|
+
.get(`${this.environment.baseUrl}/notifications/me`, {
|
|
122
|
+
params: options,
|
|
123
|
+
withCredentials: true,
|
|
124
|
+
})
|
|
125
|
+
.pipe(catchError((error) => {
|
|
126
|
+
throw error;
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
get(id) {
|
|
130
|
+
return this.http
|
|
131
|
+
.get(`${this.environment.baseUrl}/notifications/${id}`, {
|
|
132
|
+
withCredentials: true,
|
|
133
|
+
})
|
|
134
|
+
.pipe(catchError((error) => {
|
|
135
|
+
throw error;
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
read(ids) {
|
|
139
|
+
return this.http
|
|
140
|
+
.get(`${this.environment.baseUrl}/notifications/${ids}`, {
|
|
141
|
+
withCredentials: true,
|
|
142
|
+
})
|
|
143
|
+
.pipe(catchError((error) => {
|
|
144
|
+
throw error;
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
update(id) {
|
|
148
|
+
return this.http
|
|
149
|
+
.put(`${this.environment.baseUrl}/notifications/${id}`, { status: 'READ' }, {
|
|
150
|
+
withCredentials: true,
|
|
151
|
+
})
|
|
152
|
+
.pipe(map((res) => {
|
|
153
|
+
const value = this.storeService.$count.value - 1;
|
|
154
|
+
this.storeService.$count.next(value);
|
|
155
|
+
}), catchError((error) => {
|
|
156
|
+
throw error;
|
|
157
|
+
}));
|
|
158
|
+
}
|
|
159
|
+
readAll() {
|
|
160
|
+
return this.http
|
|
161
|
+
.put(`${this.environment.baseUrl}/notifications/status/all`, { status: 'READ' }, {
|
|
162
|
+
withCredentials: true,
|
|
163
|
+
})
|
|
164
|
+
.pipe(map((res) => {
|
|
165
|
+
this.storeService.$count.next(0);
|
|
166
|
+
}), catchError((error) => {
|
|
167
|
+
throw error;
|
|
168
|
+
}));
|
|
169
|
+
}
|
|
170
|
+
delete(id) {
|
|
171
|
+
return this.http
|
|
172
|
+
.get(`${this.environment.baseUrl}/notifications/${id}`, {
|
|
173
|
+
withCredentials: true,
|
|
174
|
+
})
|
|
175
|
+
.pipe(catchError((error) => {
|
|
176
|
+
throw error;
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
findByUserId(userId) {
|
|
180
|
+
return this.http
|
|
181
|
+
.get(`${this.environment.baseUrl}/notifications/by?userId=${userId}`, {
|
|
182
|
+
withCredentials: true,
|
|
183
|
+
})
|
|
184
|
+
.pipe(catchError((error) => {
|
|
185
|
+
throw error;
|
|
186
|
+
}));
|
|
187
|
+
}
|
|
188
|
+
countByStatus(status) {
|
|
189
|
+
return this.http
|
|
190
|
+
.get(`${this.environment.baseUrl}/notifications/count/by?status=${status}`, {
|
|
191
|
+
withCredentials: true,
|
|
192
|
+
})
|
|
193
|
+
.pipe(map(({ data }) => {
|
|
194
|
+
this.storeService.$count.next(data);
|
|
195
|
+
return data;
|
|
196
|
+
}), catchError((error) => {
|
|
197
|
+
throw error;
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
201
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
202
|
+
}
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationService, decorators: [{
|
|
204
|
+
type: Injectable,
|
|
205
|
+
args: [{
|
|
206
|
+
providedIn: 'root',
|
|
207
|
+
}]
|
|
208
|
+
}] });
|
|
209
|
+
|
|
210
|
+
const services = [NotificationService, NotificationTemplateService];
|
|
211
|
+
|
|
212
|
+
class NotificationIconComponent {
|
|
213
|
+
router = '/notifications';
|
|
214
|
+
notifications = [];
|
|
215
|
+
notificationService = inject(NotificationService);
|
|
216
|
+
storeService = inject(StoreService);
|
|
217
|
+
count = 0;
|
|
218
|
+
countSubscription;
|
|
219
|
+
ngOnInit() {
|
|
220
|
+
this.countNotificationByStatus();
|
|
221
|
+
this.storeService.$count.subscribe((data) => {
|
|
222
|
+
this.count = data;
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
ngOnDestroy() {
|
|
226
|
+
if (this.countSubscription)
|
|
227
|
+
this.countSubscription.unsubscribe();
|
|
228
|
+
}
|
|
229
|
+
countNotificationByStatus() {
|
|
230
|
+
this.notificationService.countByStatus('UNREAD').subscribe({
|
|
231
|
+
next: (res) => {
|
|
232
|
+
this.loadUnreadNotifications();
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
loadUnreadNotifications() {
|
|
237
|
+
const options = {
|
|
238
|
+
filter: 'status:UNREAD',
|
|
239
|
+
};
|
|
240
|
+
this.notificationService.me(options).subscribe({
|
|
241
|
+
next: (res) => {
|
|
242
|
+
this.notifications = res.data;
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
readAll() {
|
|
247
|
+
this.notificationService.readAll().subscribe({
|
|
248
|
+
next: (res) => {
|
|
249
|
+
this.notifications = [];
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.1", type: NotificationIconComponent, isStandalone: true, selector: "rolatech-notification-icon", inputs: { router: "router" }, 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()\">\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-gray-100\" [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-gray-100\" [routerLink]=\"router\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-orange-600\"> \u901A\u77E5\u4E2D\u5FC3 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: [":host .custom-menu>.mat-mdc-menu-content{padding:0!important}:host .mat-mdc-menu-content{padding:0!important}.mat-mdc-menu-content{padding:0!important}\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"] }] });
|
|
255
|
+
}
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationIconComponent, decorators: [{
|
|
257
|
+
type: Component,
|
|
258
|
+
args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-notification-icon', 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()\">\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-gray-100\" [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-gray-100\" [routerLink]=\"router\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-orange-600\"> \u901A\u77E5\u4E2D\u5FC3 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: [":host .custom-menu>.mat-mdc-menu-content{padding:0!important}:host .mat-mdc-menu-content{padding:0!important}.mat-mdc-menu-content{padding:0!important}\n"] }]
|
|
259
|
+
}], propDecorators: { router: [{
|
|
260
|
+
type: Input
|
|
261
|
+
}] } });
|
|
262
|
+
|
|
263
|
+
class NotificationDetailComponent extends BaseComponent {
|
|
264
|
+
notificationService = inject(NotificationService);
|
|
265
|
+
snackBar = inject(MatSnackBar);
|
|
266
|
+
notification;
|
|
267
|
+
ngOnInit() {
|
|
268
|
+
this.get();
|
|
269
|
+
}
|
|
270
|
+
get() {
|
|
271
|
+
this.notificationService.get(this.id).subscribe({
|
|
272
|
+
next: (res) => {
|
|
273
|
+
this.notification = res.data;
|
|
274
|
+
this.titleService.setTitle(`通知 | ${this.notification.title}`);
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
279
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.1", type: NotificationDetailComponent, isStandalone: true, selector: "rolatech-notification-detail", usesInheritance: true, ngImport: i0, template: "@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", styles: [""] });
|
|
280
|
+
}
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationDetailComponent, decorators: [{
|
|
282
|
+
type: Component,
|
|
283
|
+
args: [{ selector: 'rolatech-notification-detail', standalone: true, imports: [], template: "@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" }]
|
|
284
|
+
}] });
|
|
285
|
+
|
|
286
|
+
var NotificationStatus;
|
|
287
|
+
(function (NotificationStatus) {
|
|
288
|
+
NotificationStatus[NotificationStatus["UNREAD"] = '未读'] = "UNREAD";
|
|
289
|
+
NotificationStatus[NotificationStatus["READ"] = '已读'] = "READ";
|
|
290
|
+
})(NotificationStatus || (NotificationStatus = {}));
|
|
291
|
+
|
|
292
|
+
class NotificationItemComponent {
|
|
293
|
+
notification;
|
|
294
|
+
isContentHidden = true;
|
|
295
|
+
expand = false;
|
|
296
|
+
toggle = new EventEmitter();
|
|
297
|
+
toggleContent() {
|
|
298
|
+
this.isContentHidden = !this.isContentHidden;
|
|
299
|
+
}
|
|
300
|
+
onToggle(item) {
|
|
301
|
+
this.toggle.emit(item);
|
|
302
|
+
}
|
|
303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: NotificationItemComponent, isStandalone: true, selector: "rolatech-notification-item", inputs: { notification: "notification", expand: "expand" }, 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-gray-400' : ''\"\n (click)=\"onToggle(notification)\"\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-gray-400' : ''\"\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: [
|
|
305
|
+
trigger('contentAnimation', [
|
|
306
|
+
state('hidden', style({
|
|
307
|
+
height: '0',
|
|
308
|
+
opacity: 0,
|
|
309
|
+
})),
|
|
310
|
+
state('visible', style({
|
|
311
|
+
height: '*',
|
|
312
|
+
opacity: 1,
|
|
313
|
+
})),
|
|
314
|
+
transition('hidden <=> visible', animate('300ms ease-in-out')),
|
|
315
|
+
]),
|
|
316
|
+
] });
|
|
317
|
+
}
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationItemComponent, decorators: [{
|
|
319
|
+
type: Component,
|
|
320
|
+
args: [{ selector: 'rolatech-notification-item', animations: [
|
|
321
|
+
trigger('contentAnimation', [
|
|
322
|
+
state('hidden', style({
|
|
323
|
+
height: '0',
|
|
324
|
+
opacity: 0,
|
|
325
|
+
})),
|
|
326
|
+
state('visible', style({
|
|
327
|
+
height: '*',
|
|
328
|
+
opacity: 1,
|
|
329
|
+
})),
|
|
330
|
+
transition('hidden <=> visible', animate('300ms ease-in-out')),
|
|
331
|
+
]),
|
|
332
|
+
], standalone: true, imports: [NgClass, MatIconModule, DatePipe], 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-gray-400' : ''\"\n (click)=\"onToggle(notification)\"\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-gray-400' : ''\"\n >\n {{ notification.content }}\n </div>\n <div class=\"divide\"></div>\n</div>\n" }]
|
|
333
|
+
}], propDecorators: { notification: [{
|
|
334
|
+
type: Input
|
|
335
|
+
}], expand: [{
|
|
336
|
+
type: Input
|
|
337
|
+
}], toggle: [{
|
|
338
|
+
type: Output
|
|
339
|
+
}] } });
|
|
340
|
+
|
|
341
|
+
class NotificationIndexComponent {
|
|
342
|
+
notificationService = inject(NotificationService);
|
|
343
|
+
snackBar = inject(MatSnackBar);
|
|
344
|
+
notifications = [];
|
|
345
|
+
filter = '';
|
|
346
|
+
pageEvent;
|
|
347
|
+
length = 100;
|
|
348
|
+
pageSize = 15;
|
|
349
|
+
pageSizeOptions = [5, 10, 25, 100];
|
|
350
|
+
isLoading = false;
|
|
351
|
+
isSearch = false;
|
|
352
|
+
selectedId = '';
|
|
353
|
+
notificationIconComponent = NotificationIconComponent;
|
|
354
|
+
displayedColumns = ['title', 'status', 'createdAt', 'actions'];
|
|
355
|
+
paginator;
|
|
356
|
+
orderOptions = [
|
|
357
|
+
{
|
|
358
|
+
key: 'createdAt',
|
|
359
|
+
value: '创建时间',
|
|
360
|
+
icon: 'arrow_upward',
|
|
361
|
+
sort: 'asc',
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
key: 'createdAt',
|
|
365
|
+
value: '创建时间',
|
|
366
|
+
icon: 'arrow_downward',
|
|
367
|
+
sort: 'desc',
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
key: 'status',
|
|
371
|
+
value: '状态',
|
|
372
|
+
icon: 'arrow_upward',
|
|
373
|
+
sort: 'asc',
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
key: 'status',
|
|
377
|
+
value: '状态',
|
|
378
|
+
icon: 'arrow_downward',
|
|
379
|
+
sort: 'desc',
|
|
380
|
+
},
|
|
381
|
+
];
|
|
382
|
+
status = NotificationStatus;
|
|
383
|
+
orderString = 'createdAt desc';
|
|
384
|
+
dataSource = new MatTableDataSource();
|
|
385
|
+
ngOnInit() {
|
|
386
|
+
this.find(null);
|
|
387
|
+
}
|
|
388
|
+
find(event) {
|
|
389
|
+
this.isLoading = true;
|
|
390
|
+
const page = event ? event.pageIndex + 1 : 1;
|
|
391
|
+
const limit = event ? event.pageSize : 15;
|
|
392
|
+
const sort = this.orderString;
|
|
393
|
+
const options = {
|
|
394
|
+
page,
|
|
395
|
+
limit,
|
|
396
|
+
sort,
|
|
397
|
+
filter: this.filter,
|
|
398
|
+
};
|
|
399
|
+
this.notificationService.me(options).subscribe({
|
|
400
|
+
next: (res) => {
|
|
401
|
+
this.notifications = res.data;
|
|
402
|
+
this.dataSource.data = this.notifications;
|
|
403
|
+
this.length = res.meta.pagination.count;
|
|
404
|
+
this.isLoading = false;
|
|
405
|
+
},
|
|
406
|
+
error: (e) => {
|
|
407
|
+
this.isLoading = false;
|
|
408
|
+
this.snackBar.open(e.message);
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
read(item) {
|
|
413
|
+
this.selectedId = item.id;
|
|
414
|
+
if (item.status === 'READ') {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
this.notificationService.update(item.id).subscribe({
|
|
418
|
+
next: (res) => {
|
|
419
|
+
item.status = 'READ';
|
|
420
|
+
},
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
424
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.1", type: NotificationIndexComponent, isStandalone: true, selector: "rolatech-notification-index", viewQueries: [{ propertyName: "paginator", first: true, predicate: ["paginator"], descendants: true }], ngImport: i0, template: "@if (isLoading) {\n <div style=\"height: 80%\">\n <!-- <app-loading-spinner></app-loading-spinner> -->\n </div>\n} @else {\n @for (item of notifications; track $index) {\n <div class=\"divide-y\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\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", styles: [""], dependencies: [{ kind: "component", type: NotificationItemComponent, selector: "rolatech-notification-item", inputs: ["notification", "expand"], outputs: ["toggle"] }, { kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i1$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }] });
|
|
425
|
+
}
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationIndexComponent, decorators: [{
|
|
427
|
+
type: Component,
|
|
428
|
+
args: [{ selector: 'rolatech-notification-index', standalone: true, imports: [NotificationItemComponent, AngularCommonModule, AngularComponentsModule], template: "@if (isLoading) {\n <div style=\"height: 80%\">\n <!-- <app-loading-spinner></app-loading-spinner> -->\n </div>\n} @else {\n @for (item of notifications; track $index) {\n <div class=\"divide-y\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\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" }]
|
|
429
|
+
}], propDecorators: { paginator: [{
|
|
430
|
+
type: ViewChild,
|
|
431
|
+
args: ['paginator']
|
|
432
|
+
}] } });
|
|
433
|
+
|
|
434
|
+
class NotificationLayoutComponent {
|
|
435
|
+
links = [
|
|
436
|
+
{
|
|
437
|
+
name: '全部',
|
|
438
|
+
icon: 'dashboard',
|
|
439
|
+
link: '.',
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: '课程',
|
|
443
|
+
icon: 'category',
|
|
444
|
+
link: 'course',
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: '订单',
|
|
448
|
+
icon: 'category',
|
|
449
|
+
link: 'order',
|
|
450
|
+
},
|
|
451
|
+
];
|
|
452
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
453
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.1", type: NotificationLayoutComponent, isStandalone: true, selector: "rolatech-notification-layout", ngImport: i0, template: "<div class=\"p-3 max-w-[1120px] m-auto\">\n <div class=\"text-3xl font-medium p-2\">\u901A\u77E5\u4E2D\u5FC3</div>\n <div class=\"flex gap-3 items-center mb-2 p-2\">\n @for (item of links; track $index) {\n <div class=\"font-medium\">\n <a\n class=\"text-gray-600 py-2\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n >{{ item.name }}</a\n >\n </div>\n }\n </div>\n <div>\n <router-outlet></router-outlet>\n </div>\n</div>\n", styles: [".active{color:#000;border-bottom:4px solid #ff6600}\n"], dependencies: [{ kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
454
|
+
}
|
|
455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: NotificationLayoutComponent, decorators: [{
|
|
456
|
+
type: Component,
|
|
457
|
+
args: [{ selector: 'rolatech-notification-layout', standalone: true, imports: [RouterLinkActive, RouterLink, RouterOutlet], template: "<div class=\"p-3 max-w-[1120px] m-auto\">\n <div class=\"text-3xl font-medium p-2\">\u901A\u77E5\u4E2D\u5FC3</div>\n <div class=\"flex gap-3 items-center mb-2 p-2\">\n @for (item of links; track $index) {\n <div class=\"font-medium\">\n <a\n class=\"text-gray-600 py-2\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n >{{ item.name }}</a\n >\n </div>\n }\n </div>\n <div>\n <router-outlet></router-outlet>\n </div>\n</div>\n", styles: [".active{color:#000;border-bottom:4px solid #ff6600}\n"] }]
|
|
458
|
+
}] });
|
|
459
|
+
|
|
460
|
+
function provideAngularNotifications() {
|
|
461
|
+
const providers = [
|
|
462
|
+
...services,
|
|
463
|
+
importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),
|
|
464
|
+
];
|
|
465
|
+
return makeEnvironmentProviders(providers);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const notificationRoutes = [
|
|
469
|
+
{
|
|
470
|
+
path: '',
|
|
471
|
+
component: NotificationLayoutComponent,
|
|
472
|
+
children: [{ path: '', component: NotificationIndexComponent }],
|
|
473
|
+
},
|
|
474
|
+
{ path: ':id', component: NotificationDetailComponent },
|
|
475
|
+
];
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Generated bundle index. Do not edit.
|
|
479
|
+
*/
|
|
480
|
+
|
|
481
|
+
export { NotificationDetailComponent, NotificationIconComponent, NotificationIndexComponent, NotificationItemComponent, NotificationLayoutComponent, NotificationService, NotificationTemplateService, notificationRoutes, provideAngularNotifications };
|
|
482
|
+
//# sourceMappingURL=rolatech-angular-notification.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-notification.mjs","sources":["../../../../libs/angular-notification/src/lib/services/notification-template.service.ts","../../../../libs/angular-notification/src/lib/state/store.ts","../../../../libs/angular-notification/src/lib/services/notification.service.ts","../../../../libs/angular-notification/src/lib/services/index.ts","../../../../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/lib/components/notification-layout/notification-layout.component.ts","../../../../libs/angular-notification/src/lib/components/notification-layout/notification-layout.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 { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { APP_CONFIG } from '@rolatech/angular-common';\nimport { catchError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationTemplateService {\n environment = inject(APP_CONFIG);\n http = inject(HttpClient);\n\n find(options: any) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications`, {\n params: options,\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n })\n );\n }\n me(options: any) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/me`, {\n params: options,\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n })\n );\n }\n get(id: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/${id}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n })\n );\n }\n read(ids: Array<string>) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/${ids}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n })\n );\n }\n delete(id: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/${id}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n })\n );\n }\n findByUserId(userId: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/by?userId=${userId}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n })\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { map, BehaviorSubject, catchError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoreService {\n $count = new BehaviorSubject(0);\n getCount() {\n return this.$count.asObservable();\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { APP_CONFIG } from '@rolatech/angular-common';\nimport { map, BehaviorSubject, catchError } from 'rxjs';\nimport { StoreService } from '../state/store';\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationService {\n environment = inject(APP_CONFIG);\n http = inject(HttpClient);\n storeService = inject(StoreService);\n\n find(options: any) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications`, {\n params: options,\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n }),\n );\n }\n me(options: any) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/me`, {\n params: options,\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n }),\n );\n }\n get(id: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/${id}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n }),\n );\n }\n read(ids: Array<string>) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/${ids}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n }),\n );\n }\n update(id: string) {\n return this.http\n .put<any>(\n `${this.environment.baseUrl}/notifications/${id}`,\n { status: 'READ' },\n {\n withCredentials: true,\n },\n )\n .pipe(\n map((res) => {\n const value = this.storeService.$count.value - 1;\n this.storeService.$count.next(value);\n }),\n catchError((error) => {\n throw error;\n }),\n );\n }\n readAll() {\n return this.http\n .put<any>(\n `${this.environment.baseUrl}/notifications/status/all`,\n { status: 'READ' },\n {\n withCredentials: true,\n },\n )\n .pipe(\n map((res) => {\n this.storeService.$count.next(0);\n }),\n catchError((error) => {\n throw error;\n }),\n );\n }\n delete(id: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/${id}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n }),\n );\n }\n findByUserId(userId: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/by?userId=${userId}`, {\n withCredentials: true,\n })\n .pipe(\n catchError((error) => {\n throw error;\n }),\n );\n }\n countByStatus(status: string) {\n return this.http\n .get<any>(`${this.environment.baseUrl}/notifications/count/by?status=${status}`, {\n withCredentials: true,\n })\n .pipe(\n map(({ data }) => {\n this.storeService.$count.next(data);\n return data;\n }),\n catchError((error) => {\n throw error;\n }),\n );\n }\n}\n","import { NotificationTemplateService } from './notification-template.service';\nimport { NotificationService } from './notification.service';\n\nexport { NotificationService, NotificationTemplateService };\nexport const services: any[] = [NotificationService, NotificationTemplateService];\n","import { Component, Input, OnDestroy, OnInit, inject } from '@angular/core';\nimport { NotificationService } from '../../services';\nimport { Subscription } from 'rxjs';\nimport { StoreService } from '../../state/store';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { RouterModule } from '@angular/router';\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})\nexport class NotificationIconComponent implements OnInit, OnDestroy {\n @Input()\n router = '/notifications';\n notifications: any = [];\n notificationService = inject(NotificationService);\n storeService = inject(StoreService);\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 };\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()\">全部已读</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-gray-100\" [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-gray-100\" [routerLink]=\"router\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-orange-600\"> 通知中心 </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 { NotificationService } from '../../services';\nimport { BaseComponent } from '@rolatech/angular-components';\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, EventEmitter, Input, OnInit, Output, inject } 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 @Input()\n notification!: INotification;\n isContentHidden = true;\n @Input()\n expand = false;\n @Output() toggle = new EventEmitter<INotification>();\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-gray-400' : ''\"\n (click)=\"onToggle(notification)\"\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-gray-400' : ''\"\n >\n {{ notification.content }}\n </div>\n <div class=\"divide\"></div>\n</div>\n","import { Component, OnInit, ViewChild, inject } from '@angular/core';\nimport { NotificationService } from '../../services';\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 { NotificationIconComponent } from '../notification-icon/notification-icon.component';\nimport { NotificationItemComponent } from '../notification-item/notification-item.component';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule } from '@rolatech/angular-components';\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: [NotificationItemComponent, AngularCommonModule, AngularComponentsModule],\n})\nexport class NotificationIndexComponent implements OnInit {\n notificationService = inject(NotificationService);\n snackBar = inject(MatSnackBar);\n notifications: INotification[] = [];\n filter = '';\n pageEvent!: PageEvent;\n length = 100;\n pageSize = 15;\n pageSizeOptions: number[] = [5, 10, 25, 100];\n\n isLoading = false;\n isSearch = false;\n selectedId = '';\n\n notificationIconComponent = NotificationIconComponent;\n\n displayedColumns: string[] = ['title', 'status', 'createdAt', 'actions'];\n @ViewChild('paginator')\n paginator!: 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 ngOnInit(): void {\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 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","@if (isLoading) {\n <div style=\"height: 80%\">\n <!-- <app-loading-spinner></app-loading-spinner> -->\n </div>\n} @else {\n @for (item of notifications; track $index) {\n <div class=\"divide-y\">\n <rolatech-notification-item\n [notification]=\"item\"\n (toggle)=\"read(item)\"\n [expand]=\"item.id === selectedId\"\n ></rolatech-notification-item>\n </div>\n }\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","import { Component } from '@angular/core';\nimport { RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'rolatech-notification-layout',\n templateUrl: './notification-layout.component.html',\n styleUrls: ['./notification-layout.component.scss'],\n standalone: true,\n imports: [RouterLinkActive, RouterLink, RouterOutlet],\n})\nexport class NotificationLayoutComponent {\n links = [\n {\n name: '全部',\n icon: 'dashboard',\n link: '.',\n },\n {\n name: '课程',\n icon: 'category',\n link: 'course',\n },\n {\n name: '订单',\n icon: 'category',\n link: 'order',\n },\n ];\n}\n","<div class=\"p-3 max-w-[1120px] m-auto\">\n <div class=\"text-3xl font-medium p-2\">通知中心</div>\n <div class=\"flex gap-3 items-center mb-2 p-2\">\n @for (item of links; track $index) {\n <div class=\"font-medium\">\n <a\n class=\"text-gray-600 py-2\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n >{{ item.name }}</a\n >\n </div>\n }\n </div>\n <div>\n <router-outlet></router-outlet>\n </div>\n</div>\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';\nimport * as fromServices from './lib/services';\n\nexport function provideAngularNotifications(): EnvironmentProviders {\n const providers: (Provider | EnvironmentProviders)[] = [\n ...fromServices.services,\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';\nimport { NotificationLayoutComponent } from './components/notification-layout/notification-layout.component';\n\nexport const notificationRoutes: Routes = [\n {\n path: '',\n component: NotificationLayoutComponent,\n children: [{ path: '', 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","fromServices.services"],"mappings":";;;;;;;;;;;;;;;;;;;;MAQa,2BAA2B,CAAA;AACtC,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACjC,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAE1B,IAAA,IAAI,CAAC,OAAY,EAAA;QACf,OAAO,IAAI,CAAC,IAAI;aACb,GAAG,CAAM,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,gBAAgB,EAAE;AACrD,YAAA,MAAM,EAAE,OAAO;AACf,YAAA,eAAe,EAAE,IAAI;SACtB,CAAC;AACD,aAAA,IAAI,CACH,UAAU,CAAC,CAAC,KAAK,KAAI;AACnB,YAAA,MAAM,KAAK,CAAC;SACb,CAAC,CACH,CAAC;KACL;AACD,IAAA,EAAE,CAAC,OAAY,EAAA;QACb,OAAO,IAAI,CAAC,IAAI;aACb,GAAG,CAAM,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,mBAAmB,EAAE;AACxD,YAAA,MAAM,EAAE,OAAO;AACf,YAAA,eAAe,EAAE,IAAI;SACtB,CAAC;AACD,aAAA,IAAI,CACH,UAAU,CAAC,CAAC,KAAK,KAAI;AACnB,YAAA,MAAM,KAAK,CAAC;SACb,CAAC,CACH,CAAC;KACL;AACD,IAAA,GAAG,CAAC,EAAU,EAAA;QACZ,OAAO,IAAI,CAAC,IAAI;aACb,GAAG,CAAM,CAAG,EAAA,IAAI,CAAC,WAAW,CAAC,OAAO,CAAA,eAAA,EAAkB,EAAE,CAAA,CAAE,EAAE;AAC3D,YAAA,eAAe,EAAE,IAAI;SACtB,CAAC;AACD,aAAA,IAAI,CACH,UAAU,CAAC,CAAC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GAAwC;QACrD,GAAGC,QAAqB;QACxB,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF,CAAC;AACF,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;AAC7C;;ACPa,MAAA,kBAAkB,GAAW;AACxC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,2BAA2B;QACtC,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC;AAChE,KAAA;AACD,IAAA,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,2BAA2B,EAAE;;;ACXzD;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { NotificationIconComponent } from './lib/components/notification-icon/notification-icon.component';
|
|
2
|
+
export { NotificationDetailComponent } from './lib/components/notification-detail/notification-detail.component';
|
|
3
|
+
export { NotificationIndexComponent } from './lib/components/notification-index/notification-index.component';
|
|
4
|
+
export { NotificationItemComponent } from './lib/components/notification-item/notification-item.component';
|
|
5
|
+
export { NotificationLayoutComponent } from './lib/components/notification-layout/notification-layout.component';
|
|
6
|
+
export { NotificationService, NotificationTemplateService } from './lib/services';
|
|
7
|
+
export * from './provider';
|
|
8
|
+
export * from './lib/notification.routes';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { INotification } from '../../interfaces/notification';
|
|
3
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
|
+
import { NotificationService } from '../../services';
|
|
5
|
+
import { BaseComponent } from '@rolatech/angular-components';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NotificationDetailComponent extends BaseComponent implements OnInit {
|
|
8
|
+
notificationService: NotificationService;
|
|
9
|
+
snackBar: MatSnackBar;
|
|
10
|
+
notification: INotification;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
get(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationDetailComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationDetailComponent, "rolatech-notification-detail", never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { NotificationService } from '../../services';
|
|
3
|
+
import { StoreService } from '../../state/store';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NotificationIconComponent implements OnInit, OnDestroy {
|
|
6
|
+
router: string;
|
|
7
|
+
notifications: any;
|
|
8
|
+
notificationService: NotificationService;
|
|
9
|
+
storeService: StoreService;
|
|
10
|
+
count: number;
|
|
11
|
+
private countSubscription;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
countNotificationByStatus(): void;
|
|
15
|
+
loadUnreadNotifications(): void;
|
|
16
|
+
readAll(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationIconComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationIconComponent, "rolatech-notification-icon", never, { "router": { "alias": "router"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|