@kolektor/nucleus-notifications 0.1.1172 → 0.1.1911
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kolektor-nucleus-notifications.mjs","sources":["../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/models.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/nucleus-notifications.service.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/nucleus-notifications.module.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/kolektor-nucleus-notifications.ts"],"sourcesContent":["export class Notification {\n public id: string;\n public sender: Identity;\n public data: NotificationData;\n public isRead: boolean;\n public dateCreated: Date;\n public expirationDate: Date;\n}\n\nexport class Identity {\n public subject: string;\n public name: string;\n public pictureUrl: string;\n}\n\nexport class Recipient {\n public attributeName: string;\n public directoryName: string;\n public attributeValue: string;\n}\n\nexport class NotificationData {\n title: string;\n message: string;\n htmlMessage: string;\n preventDismissal: boolean;\n deepLink: string;\n}\n\nexport class WebKey {\n publicKey: string;\n}\n\nexport class Registration {\n id: string;\n token: string;\n platform: PlatformValue;\n}\n\nexport class RegistrationResult {\n id: string;\n}\n\nexport class PayloadData {\n notificationId: string;\n eventType: NotificationEventType;\n}\n\nexport class NucleusNotificationsConfig {\n serverApiUrl: string;\n}\n\nexport class NotificationClick {\n id: string;\n type: NotificationType;\n routerLink?: string;\n}\n\nexport type NotificationEventType =\n | 'new'\n | 'updated'\n | 'deleted'\n | 'deletedAll'\n | 'updatedAll'\n | 'newSilent';\n\nexport type PlatformValue = 'ios' | 'android' | 'web' | 'none';\n\nexport type NotificationType = 'default' | 'deeplink';\n\nexport interface ChannelId {\n senderId: string;\n channelId: string;\n}\n\nexport class UserChannelConfig {\n channelId: string;\n displayName: string;\n isSubscribed: boolean;\n subscriptionType: ChannelSubscriptionType;\n methods: NotifyMethod[];\n allowedMethods: NotifyMethod[];\n}\n\nexport type ChannelSubscriptionType = 'invariant' | 'optIn' | 'optOut';\n\nexport type NotifyMethod = 'push' | 'email' | 'sms';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { SwPush } from '@angular/service-worker';\nimport {\n PushNotifications,\n PushNotificationSchema,\n} from '@capacitor/push-notifications';\nimport { NucleusAppService } from '@kolektor/nucleus-common';\nimport { Observable, of, Subject } from 'rxjs';\nimport {\n ChannelId,\n Notification,\n NotificationClick,\n NotificationEventType,\n NotificationType,\n NucleusNotificationsConfig,\n PayloadData,\n PlatformValue,\n Registration,\n RegistrationResult,\n UserChannelConfig,\n WebKey,\n} from './models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NucleusNotificationsService {\n constructor(\n private http: HttpClient,\n private swPush: SwPush,\n private appService: NucleusAppService,\n config: NucleusNotificationsConfig\n ) {\n let url = config.serverApiUrl;\n if (!url.endsWith('/')) {\n url += '/';\n }\n this.apiUrl = url;\n }\n\n private apiUrl: string;\n private readonly registrationStorageKey = 'NucleusNotificationsRegistrationId';\n private readonly notificationsStorageKey = 'NucleusNotificationsLocalCache';\n private _platform: PlatformValue;\n private _isInitialized = false;\n private _newNotifications = new Subject<Notification>();\n private _clicksSubject = new Subject<NotificationClick>();\n private _stateChangesSubject = new Subject<void>();\n\n public notifications: Notification[] = [];\n\n public get unreadCount() {\n return this.notifications.filter((x) => !x.isRead).length;\n }\n\n public get newNotifications() {\n return this._newNotifications.asObservable();\n }\n\n public get clicks() {\n return this._clicksSubject.asObservable();\n }\n public get stateChanges() {\n return this._stateChangesSubject.asObservable();\n }\n\n public get isInitialized() {\n return this._isInitialized;\n }\n\n public async initialize() {\n // make sure app service has finished initializing\n await this.appService.init();\n\n this.loadFromStorage();\n\n if (this.appService.isNative) {\n this._platform = this.appService.deviceInfo.platform as PlatformValue;\n await this.registerCapacitorEvents();\n } else if (this.swPush.isEnabled) {\n this._platform = 'web';\n this.registerWebPushEvents();\n } else {\n console.warn(\n 'Nucleus.Notifications: There is no push capability, timer will be used to update notifications'\n );\n setInterval(() => {\n console.log('Updating notifications...');\n this.refresh(true);\n }, 5 * 60 * 1000);\n }\n this._isInitialized = true;\n this.refresh();\n }\n\n public register(): Promise<any> {\n return new Promise((_resolve, _reject) => {\n this.getRegistrationInfo()\n .then((info) => {\n this.http\n .post<RegistrationResult>(this.apiUrl + 'registration', info)\n .subscribe({\n next: (regResult) => {\n window.localStorage.setItem(\n this.registrationStorageKey,\n regResult.id\n );\n _resolve(null);\n },\n error: (error) => {\n console.log(\n 'Nucleus.Notifications: Failed to send notification registration to server.',\n error\n );\n _reject(error);\n }\n });\n })\n .catch((error) => _reject(error));\n });\n }\n\n public unregister(): Promise<any> {\n return new Promise((_resolve, _reject) => {\n this.getRegistrationInfo()\n .then((info) => {\n this.http\n .request<any>('DELETE', this.apiUrl + 'registration', {\n body: info,\n })\n .subscribe({\n next: () => {\n window.localStorage.removeItem(this.registrationStorageKey);\n _resolve(null);\n },\n error: (error) => {\n console.log(\n 'Nucleus.Notifications: Failed to remove registration from server.',\n error\n );\n _reject(error);\n }\n });\n })\n .catch((error) => _reject(error));\n });\n }\n\n public refresh(notifyAboutNew = false) {\n this.http\n .get<Notification[]>(this.apiUrl + 'notifications')\n .subscribe((res) => {\n this.updateNotifications(res, notifyAboutNew);\n });\n }\n\n public getNotification(id: string): Observable<Notification> {\n const localNotification = this.notifications.find((x) => x.id === id);\n if (localNotification) {\n return of(localNotification);\n }\n return this.http.get<Notification>(this.apiUrl + 'notifications/' + id);\n }\n\n public readNotification(id: string) {\n const n = this.notifications.find((x) => x.id === id);\n if (n && !n.isRead) {\n n.isRead = true;\n this.notifyStateChanged();\n }\n this.http.get(this.apiUrl + 'notifications/read/' + id).subscribe();\n }\n\n public dismissNotification(id: string) {\n this.deleteNotificaton(id);\n this.http.delete(this.apiUrl + 'notifications/' + id).subscribe();\n this.removeDeliveredNotification(id);\n }\n\n public dismissAll() {\n this.notifications.splice(0);\n this.notifyStateChanged();\n this.http.delete(this.apiUrl + 'notifications/all').subscribe();\n if (this._platform === 'ios' || this._platform === 'android') {\n PushNotifications.removeAllDeliveredNotifications();\n } else if (this._platform === 'web') {\n // TODO: remove all web push notifications\n }\n }\n\n public readAll() {\n for (const n of this.notifications) {\n n.isRead = true;\n }\n this.notifyStateChanged();\n this.http.get(this.apiUrl + 'notifications/read/all').subscribe();\n }\n\n public getChannelConfig(\n senderId: string,\n channelId: string,\n language?: string\n ) {\n return this.http.get<UserChannelConfig>(\n this.apiUrl +\n `settings/channel/${senderId}/${channelId}?language=${language}`\n );\n }\n\n public getChannelConfigsForSender(\n senderId: string,\n channelIds: string[],\n language?: string\n ) {\n const idsStr = channelIds.map((x) => senderId + ',' + x).join(';');\n return this.getChannelConfigsInternal(idsStr, language);\n }\n\n public getChannelConfigs(ids: ChannelId[], language?: string) {\n const idsStr = ids.map((x) => x.senderId + ',' + x.channelId).join(';');\n return this.getChannelConfigsInternal(idsStr, language);\n }\n\n public setChannelConfig(senderId: string, config: UserChannelConfig) {\n return this.http.post<void>(\n `${this.apiUrl}settings/channel/${senderId}`,\n config\n );\n }\n\n public setChannelConfigs(configs: UserChannelConfig[]) {\n return this.http.post<void>(`${this.apiUrl}settings/channels`, configs);\n }\n\n private getChannelConfigsInternal(ids: string, language?: string) {\n return this.http.get<UserChannelConfig[]>(\n `${this.apiUrl}settings/channels?ids=${ids}&language=${language}`\n );\n }\n\n private updateNotifications(\n newNotifications: Notification[],\n notifyAboutNew = false\n ) {\n let stateChanged = false;\n for (const n of newNotifications) {\n const existing = this.notifications.find((x) => x.id === n.id);\n if (existing) {\n if (existing.isRead !== n.isRead) {\n existing.isRead = n.isRead;\n stateChanged = true;\n }\n } else {\n let i = 0;\n while (\n i < this.notifications.length &&\n n.dateCreated < this.notifications[i].dateCreated\n ) {\n i++;\n }\n this.notifications.splice(i, 0, n);\n stateChanged = true;\n if (notifyAboutNew) {\n this._newNotifications.next(n);\n }\n }\n }\n\n const now = Date.now();\n for (let i = this.notifications.length - 1; i >= 0; i--) {\n const n = this.notifications[i];\n if (\n new Date(n.expirationDate).getTime() < now ||\n !newNotifications.find((x) => x.id === n.id)\n ) {\n this.notifications.splice(i, 1);\n stateChanged = true;\n }\n }\n\n if (stateChanged) {\n this.notifyStateChanged();\n }\n }\n\n private saveToStorage() {\n const str = JSON.stringify(this.notifications);\n window.localStorage.setItem(this.notificationsStorageKey, str);\n }\n\n private loadFromStorage() {\n try {\n const str = window.localStorage.getItem(this.notificationsStorageKey);\n if (str) {\n const notifications = JSON.parse(str) as Notification[];\n this.notifications = notifications.filter((x) => !!x);\n // precaution for notification.isRead of undefined error\n this.notifyStateChanged(false);\n }\n } catch {\n /* empty */\n }\n }\n\n private handleNotificationEvent(\n id: string,\n eventType: NotificationEventType\n ) {\n if (eventType.startsWith('new') || eventType === 'updated') {\n // we are handling new and newSilent\n this.getNotification(id).subscribe((n) => {\n if (eventType.startsWith('new') && !n.isRead) {\n this._newNotifications.next(n);\n }\n const existing = this.notifications.find((x) => x.id === n.id);\n if (existing) {\n existing.isRead = n.isRead;\n } else {\n this.notifications.splice(0, 0, n);\n }\n this.notifyStateChanged();\n });\n } else if (eventType === 'deleted') {\n this.deleteNotificaton(id);\n } else {\n this.refresh();\n }\n }\n\n private deleteNotificaton(id: string) {\n const i = this.notifications.findIndex((x) => x.id === id);\n if (i >= 0) {\n this.notifications.splice(i, 1);\n this.notifyStateChanged();\n }\n }\n\n private notifyStateChanged(persistState = true) {\n if (persistState) {\n this.saveToStorage();\n }\n this._stateChangesSubject.next();\n }\n\n private handleNotificationAction(notificationAction: string | undefined) {\n if (!notificationAction) {\n throw new Error('Notification action is empty!');\n }\n\n const arr = notificationAction.split(':');\n const notificationClick: NotificationClick = {\n id: arr[0],\n type: arr[1] as NotificationType,\n routerLink: arr[2],\n };\n\n const validNotificationClickTypes = ['default', 'deeplink'];\n if (validNotificationClickTypes.includes(notificationClick.type)) {\n this._clicksSubject.next(notificationClick);\n } else {\n console.error(\n `Nucleus.Notifications: Unknown notification action: '${notificationAction}'.`\n );\n }\n }\n\n private removeDeliveredNotification(id: string) {\n if (this._platform === 'ios' || this._platform === 'android') {\n PushNotifications.getDeliveredNotifications().then((list) => {\n const toRemove = list.notifications.filter((n) => {\n const data = this.getNotificationPayloadData(n);\n return data.notificationId === id;\n });\n\n // TODO: On Android this does not currently work because notificationID is not set.\n // This my solve the issue: https://github.com/ionic-team/capacitor/pull/3523\n PushNotifications.removeDeliveredNotifications({\n notifications: toRemove,\n });\n });\n } else if (this._platform === 'web') {\n // TODO: remove web push notification\n }\n }\n\n private getNotificationPayloadData(\n pushNotification: PushNotificationSchema\n ): PayloadData {\n return this._platform === 'ios'\n ? pushNotification.data.data\n : pushNotification.data;\n }\n\n private async registerCapacitorEvents() {\n await PushNotifications.addListener('pushNotificationReceived', (n) => {\n const data = this.getNotificationPayloadData(n);\n console.log(\n 'Nucleus.Notifications: Received capacitor push event: ' +\n data.eventType,\n n\n );\n this.handleNotificationEvent(data.notificationId, data.eventType);\n });\n\n await PushNotifications.addListener(\n 'pushNotificationActionPerformed',\n (a) => {\n let action = (a as any).notification.data.notificationAction;\n if (this._platform === 'ios') {\n action = (a as any).notification.data.data.notificationAction;\n }\n console.log(\n 'Nucleus.Notifications: Received capacitor action event',\n action\n );\n this.handleNotificationAction(action);\n }\n );\n }\n\n private registerWebPushEvents() {\n this.swPush.messages.subscribe((n) => {\n const data: PayloadData = (n as any).data;\n console.log(\n 'Nucleus.Notifications: Received WebPush event: ' + data.eventType,\n n\n );\n this.handleNotificationEvent(data.notificationId, data.eventType);\n });\n\n this.swPush.notificationClicks.subscribe((action) => {\n console.log(\n 'Nucleus.Notifications: Received WebPush action event',\n action\n );\n const tag = action.notification.tag;\n this.handleNotificationAction(tag);\n });\n }\n\n private getRegistrationInfo(): Promise<Registration> {\n return new Promise((_resolve, _reject) => {\n const registrationId = window.localStorage.getItem(\n this.registrationStorageKey\n ) as string;\n if (this._platform === 'android' || this._platform === 'ios') {\n // capacitor platform\n PushNotifications.addListener('registration', (token) => {\n _resolve({\n id: registrationId,\n token: token.value,\n platform: this._platform,\n });\n })\n .then(listener => {\n listener.remove();\n return PushNotifications.register();\n })\n .catch((error) =>\n _reject('Could not register for notifications:' + error)\n );\n } else if (this._platform === 'web') {\n // Web Push API\n this.http.get<WebKey>(this.apiUrl + 'registration/webkey').subscribe({\n next: (key) => {\n this.getWebPushSubscription(key.publicKey).then((subscription) => {\n const t = JSON.stringify(subscription.toJSON());\n _resolve({ id: registrationId, token: t, platform: 'web' });\n });\n },\n error: (error) => _reject(error)\n });\n } else {\n _reject(`Nucleus.Notifications: Platform is not supported`);\n }\n });\n }\n\n private getWebPushSubscription(publicKey: string): Promise<PushSubscription> {\n return new Promise((_resolve, _reject) => {\n this.swPush.subscription.subscribe({\n next: (subscription) => {\n if (subscription != null) {\n _resolve(subscription);\n } else {\n this.swPush\n .requestSubscription({ serverPublicKey: publicKey })\n .then((s) => _resolve(s))\n .catch((e) => _reject(e));\n }\n },\n error: (error) => {\n console.error(\n 'Nucleus.Notifications: Cannot get web push subscription',\n error\n );\n _reject(error);\n }\n });\n });\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { NucleusNotificationsConfig } from './models';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n})\nexport class NucleusNotificationsModule {\n static forRoot(\n config: NucleusNotificationsConfig\n ): ModuleWithProviders<NucleusNotificationsModule> {\n return {\n ngModule: NucleusNotificationsModule,\n providers: [{ provide: NucleusNotificationsConfig, useValue: config }],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.NucleusNotificationsConfig"],"mappings":";;;;;;;;MAAa,YAAY,CAAA;AAOxB,CAAA;MAEY,QAAQ,CAAA;AAIpB,CAAA;MAEY,SAAS,CAAA;AAIrB,CAAA;MAEY,gBAAgB,CAAA;AAM5B,CAAA;MAEY,MAAM,CAAA;A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AA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kolektor-nucleus-notifications.mjs","sources":["../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/models.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/nucleus-notifications.service.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/nucleus-notifications.module.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/kolektor-nucleus-notifications.ts"],"sourcesContent":["export class Notification {\n public id: string;\n public sender: Identity;\n public data: NotificationData;\n public isRead: boolean;\n public dateCreated: Date;\n public expirationDate: Date;\n}\n\nexport class Identity {\n public subject: string;\n public name: string;\n public pictureUrl: string;\n}\n\nexport class Recipient {\n public attributeName: string;\n public directoryName: string;\n public attributeValue: string;\n}\n\nexport class NotificationData {\n title: string;\n message: string;\n htmlMessage: string;\n preventDismissal: boolean;\n deepLink: string;\n}\n\nexport class WebKey {\n publicKey: string;\n}\n\nexport class Registration {\n id: string;\n token: string;\n platform: PlatformValue;\n}\n\nexport class RegistrationResult {\n id: string;\n}\n\nexport class PayloadData {\n notificationId: string;\n eventType: NotificationEventType;\n}\n\nexport class NucleusNotificationsConfig {\n serverApiUrl: string;\n}\n\nexport class NotificationClick {\n id: string;\n type: NotificationType;\n routerLink?: string;\n}\n\nexport type NotificationEventType =\n | 'new'\n | 'updated'\n | 'deleted'\n | 'deletedAll'\n | 'updatedAll'\n | 'newSilent';\n\nexport type PlatformValue = 'ios' | 'android' | 'web' | 'none';\n\nexport type NotificationType = 'default' | 'deeplink';\n\nexport interface ChannelId {\n senderId: string;\n channelId: string;\n}\n\nexport class UserChannelConfig {\n channelId: string;\n displayName: string;\n isSubscribed: boolean;\n subscriptionType: ChannelSubscriptionType;\n methods: NotifyMethod[];\n allowedMethods: NotifyMethod[];\n}\n\nexport type ChannelSubscriptionType = 'invariant' | 'optIn' | 'optOut';\n\nexport type NotifyMethod = 'push' | 'email' | 'sms';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { SwPush } from '@angular/service-worker';\nimport {\n PushNotifications,\n PushNotificationSchema,\n} from '@capacitor/push-notifications';\nimport { NucleusAppService } from '@kolektor/nucleus-common';\nimport { Observable, of, Subject } from 'rxjs';\nimport {\n ChannelId,\n Notification,\n NotificationClick,\n NotificationEventType,\n NotificationType,\n NucleusNotificationsConfig,\n PayloadData,\n PlatformValue,\n Registration,\n RegistrationResult,\n UserChannelConfig,\n WebKey,\n} from './models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NucleusNotificationsService {\n constructor(\n private http: HttpClient,\n private swPush: SwPush,\n private appService: NucleusAppService,\n config: NucleusNotificationsConfig\n ) {\n let url = config.serverApiUrl;\n if (!url.endsWith('/')) {\n url += '/';\n }\n this.apiUrl = url;\n }\n\n private apiUrl: string;\n private readonly registrationStorageKey = 'NucleusNotificationsRegistrationId';\n private readonly notificationsStorageKey = 'NucleusNotificationsLocalCache';\n private _platform: PlatformValue;\n private _isInitialized = false;\n private _newNotifications = new Subject<Notification>();\n private _clicksSubject = new Subject<NotificationClick>();\n private _stateChangesSubject = new Subject<void>();\n\n public notifications: Notification[] = [];\n\n public get unreadCount() {\n return this.notifications.filter((x) => !x.isRead).length;\n }\n\n public get newNotifications() {\n return this._newNotifications.asObservable();\n }\n\n public get clicks() {\n return this._clicksSubject.asObservable();\n }\n public get stateChanges() {\n return this._stateChangesSubject.asObservable();\n }\n\n public get isInitialized() {\n return this._isInitialized;\n }\n\n public async initialize() {\n // make sure app service has finished initializing\n await this.appService.init();\n\n this.loadFromStorage();\n\n if (this.appService.isNative) {\n this._platform = this.appService.deviceInfo.platform as PlatformValue;\n await this.registerCapacitorEvents();\n } else if (this.swPush.isEnabled) {\n this._platform = 'web';\n this.registerWebPushEvents();\n } else {\n console.warn(\n 'Nucleus.Notifications: There is no push capability, timer will be used to update notifications'\n );\n setInterval(() => {\n console.log('Updating notifications...');\n this.refresh(true);\n }, 5 * 60 * 1000);\n }\n this._isInitialized = true;\n this.refresh();\n }\n\n public register(): Promise<any> {\n return new Promise((_resolve, _reject) => {\n this.getRegistrationInfo()\n .then((info) => {\n this.http\n .post<RegistrationResult>(this.apiUrl + 'registration', info)\n .subscribe({\n next: (regResult) => {\n window.localStorage.setItem(\n this.registrationStorageKey,\n regResult.id\n );\n _resolve(null);\n },\n error: (error) => {\n console.log(\n 'Nucleus.Notifications: Failed to send notification registration to server.',\n error\n );\n _reject(error);\n }\n });\n })\n .catch((error) => _reject(error));\n });\n }\n\n public unregister(): Promise<any> {\n return new Promise((_resolve, _reject) => {\n this.getRegistrationInfo()\n .then((info) => {\n this.http\n .request<any>('DELETE', this.apiUrl + 'registration', {\n body: info,\n })\n .subscribe({\n next: () => {\n window.localStorage.removeItem(this.registrationStorageKey);\n _resolve(null);\n },\n error: (error) => {\n console.log(\n 'Nucleus.Notifications: Failed to remove registration from server.',\n error\n );\n _reject(error);\n }\n });\n })\n .catch((error) => _reject(error));\n });\n }\n\n public refresh(notifyAboutNew = false) {\n this.http\n .get<Notification[]>(this.apiUrl + 'notifications')\n .subscribe((res) => {\n this.updateNotifications(res, notifyAboutNew);\n });\n }\n\n public getNotification(id: string): Observable<Notification> {\n const localNotification = this.notifications.find((x) => x.id === id);\n if (localNotification) {\n return of(localNotification);\n }\n return this.http.get<Notification>(this.apiUrl + 'notifications/' + id);\n }\n\n public readNotification(id: string) {\n const n = this.notifications.find((x) => x.id === id);\n if (n && !n.isRead) {\n n.isRead = true;\n this.notifyStateChanged();\n }\n this.http.get(this.apiUrl + 'notifications/read/' + id).subscribe();\n }\n\n public dismissNotification(id: string) {\n this.deleteNotificaton(id);\n this.http.delete(this.apiUrl + 'notifications/' + id).subscribe();\n this.removeDeliveredNotification(id);\n }\n\n public dismissAll() {\n this.notifications.splice(0);\n this.notifyStateChanged();\n this.http.delete(this.apiUrl + 'notifications/all').subscribe();\n if (this._platform === 'ios' || this._platform === 'android') {\n PushNotifications.removeAllDeliveredNotifications();\n } else if (this._platform === 'web') {\n // TODO: remove all web push notifications\n }\n }\n\n public readAll() {\n for (const n of this.notifications) {\n n.isRead = true;\n }\n this.notifyStateChanged();\n this.http.get(this.apiUrl + 'notifications/read/all').subscribe();\n }\n\n public getChannelConfig(\n senderId: string,\n channelId: string,\n language?: string\n ) {\n return this.http.get<UserChannelConfig>(\n this.apiUrl +\n `settings/channel/${senderId}/${channelId}?language=${language}`\n );\n }\n\n public getChannelConfigsForSender(\n senderId: string,\n channelIds: string[],\n language?: string\n ) {\n const idsStr = channelIds.map((x) => senderId + ',' + x).join(';');\n return this.getChannelConfigsInternal(idsStr, language);\n }\n\n public getChannelConfigs(ids: ChannelId[], language?: string) {\n const idsStr = ids.map((x) => x.senderId + ',' + x.channelId).join(';');\n return this.getChannelConfigsInternal(idsStr, language);\n }\n\n public setChannelConfig(senderId: string, config: UserChannelConfig) {\n return this.http.post<void>(\n `${this.apiUrl}settings/channel/${senderId}`,\n config\n );\n }\n\n public setChannelConfigs(configs: UserChannelConfig[]) {\n return this.http.post<void>(`${this.apiUrl}settings/channels`, configs);\n }\n\n private getChannelConfigsInternal(ids: string, language?: string) {\n return this.http.get<UserChannelConfig[]>(\n `${this.apiUrl}settings/channels?ids=${ids}&language=${language}`\n );\n }\n\n private updateNotifications(\n newNotifications: Notification[],\n notifyAboutNew = false\n ) {\n let stateChanged = false;\n for (const n of newNotifications) {\n const existing = this.notifications.find((x) => x.id === n.id);\n if (existing) {\n if (existing.isRead !== n.isRead) {\n existing.isRead = n.isRead;\n stateChanged = true;\n }\n } else {\n let i = 0;\n while (\n i < this.notifications.length &&\n n.dateCreated < this.notifications[i].dateCreated\n ) {\n i++;\n }\n this.notifications.splice(i, 0, n);\n stateChanged = true;\n if (notifyAboutNew) {\n this._newNotifications.next(n);\n }\n }\n }\n\n const now = Date.now();\n for (let i = this.notifications.length - 1; i >= 0; i--) {\n const n = this.notifications[i];\n if (\n new Date(n.expirationDate).getTime() < now ||\n !newNotifications.find((x) => x.id === n.id)\n ) {\n this.notifications.splice(i, 1);\n stateChanged = true;\n }\n }\n\n if (stateChanged) {\n this.notifyStateChanged();\n }\n }\n\n private saveToStorage() {\n const str = JSON.stringify(this.notifications);\n window.localStorage.setItem(this.notificationsStorageKey, str);\n }\n\n private loadFromStorage() {\n try {\n const str = window.localStorage.getItem(this.notificationsStorageKey);\n if (str) {\n const notifications = JSON.parse(str) as Notification[];\n this.notifications = notifications.filter((x) => !!x);\n // precaution for notification.isRead of undefined error\n this.notifyStateChanged(false);\n }\n } catch {\n /* empty */\n }\n }\n\n private handleNotificationEvent(\n id: string,\n eventType: NotificationEventType\n ) {\n if (eventType.startsWith('new') || eventType === 'updated') {\n // we are handling new and newSilent\n this.getNotification(id).subscribe((n) => {\n if (eventType.startsWith('new') && !n.isRead) {\n this._newNotifications.next(n);\n }\n const existing = this.notifications.find((x) => x.id === n.id);\n if (existing) {\n existing.isRead = n.isRead;\n } else {\n this.notifications.splice(0, 0, n);\n }\n this.notifyStateChanged();\n });\n } else if (eventType === 'deleted') {\n this.deleteNotificaton(id);\n } else {\n this.refresh();\n }\n }\n\n private deleteNotificaton(id: string) {\n const i = this.notifications.findIndex((x) => x.id === id);\n if (i >= 0) {\n this.notifications.splice(i, 1);\n this.notifyStateChanged();\n }\n }\n\n private notifyStateChanged(persistState = true) {\n if (persistState) {\n this.saveToStorage();\n }\n this._stateChangesSubject.next();\n }\n\n private handleNotificationAction(notificationAction: string | undefined) {\n if (!notificationAction) {\n throw new Error('Notification action is empty!');\n }\n\n const arr = notificationAction.split(':');\n const notificationClick: NotificationClick = {\n id: arr[0],\n type: arr[1] as NotificationType,\n routerLink: arr[2],\n };\n\n const validNotificationClickTypes = ['default', 'deeplink'];\n if (validNotificationClickTypes.includes(notificationClick.type)) {\n this._clicksSubject.next(notificationClick);\n } else {\n console.error(\n `Nucleus.Notifications: Unknown notification action: '${notificationAction}'.`\n );\n }\n }\n\n private removeDeliveredNotification(id: string) {\n if (this._platform === 'ios' || this._platform === 'android') {\n PushNotifications.getDeliveredNotifications().then((list) => {\n const toRemove = list.notifications.filter((n) => {\n const data = this.getNotificationPayloadData(n);\n return data.notificationId === id;\n });\n\n // TODO: On Android this does not currently work because notificationID is not set.\n // This my solve the issue: https://github.com/ionic-team/capacitor/pull/3523\n PushNotifications.removeDeliveredNotifications({\n notifications: toRemove,\n });\n });\n } else if (this._platform === 'web') {\n // TODO: remove web push notification\n }\n }\n\n private getNotificationPayloadData(\n pushNotification: PushNotificationSchema\n ): PayloadData {\n return this._platform === 'ios'\n ? pushNotification.data.data\n : pushNotification.data;\n }\n\n private async registerCapacitorEvents() {\n await PushNotifications.addListener('pushNotificationReceived', (n) => {\n const data = this.getNotificationPayloadData(n);\n console.log(\n 'Nucleus.Notifications: Received capacitor push event: ' +\n data.eventType,\n n\n );\n this.handleNotificationEvent(data.notificationId, data.eventType);\n });\n\n await PushNotifications.addListener(\n 'pushNotificationActionPerformed',\n (a) => {\n let action = (a as any).notification.data.notificationAction;\n if (this._platform === 'ios') {\n action = (a as any).notification.data.data.notificationAction;\n }\n console.log(\n 'Nucleus.Notifications: Received capacitor action event',\n action\n );\n this.handleNotificationAction(action);\n }\n );\n }\n\n private registerWebPushEvents() {\n this.swPush.messages.subscribe((n) => {\n const data: PayloadData = (n as any).data;\n console.log(\n 'Nucleus.Notifications: Received WebPush event: ' + data.eventType,\n n\n );\n this.handleNotificationEvent(data.notificationId, data.eventType);\n });\n\n this.swPush.notificationClicks.subscribe((action) => {\n console.log(\n 'Nucleus.Notifications: Received WebPush action event',\n action\n );\n const tag = action.notification.tag;\n this.handleNotificationAction(tag);\n });\n }\n\n private getRegistrationInfo(): Promise<Registration> {\n return new Promise((_resolve, _reject) => {\n const registrationId = window.localStorage.getItem(\n this.registrationStorageKey\n ) as string;\n if (this._platform === 'android' || this._platform === 'ios') {\n // capacitor platform\n PushNotifications.addListener('registration', (token) => {\n _resolve({\n id: registrationId,\n token: token.value,\n platform: this._platform,\n });\n })\n .then(listener => {\n listener.remove();\n return PushNotifications.register();\n })\n .catch((error) =>\n _reject('Could not register for notifications:' + error)\n );\n } else if (this._platform === 'web') {\n // Web Push API\n this.http.get<WebKey>(this.apiUrl + 'registration/webkey').subscribe({\n next: (key) => {\n this.getWebPushSubscription(key.publicKey).then((subscription) => {\n const t = JSON.stringify(subscription.toJSON());\n _resolve({ id: registrationId, token: t, platform: 'web' });\n });\n },\n error: (error) => _reject(error)\n });\n } else {\n _reject(`Nucleus.Notifications: Platform is not supported`);\n }\n });\n }\n\n private getWebPushSubscription(publicKey: string): Promise<PushSubscription> {\n return new Promise((_resolve, _reject) => {\n this.swPush.subscription.subscribe({\n next: (subscription) => {\n if (subscription != null) {\n _resolve(subscription);\n } else {\n this.swPush\n .requestSubscription({ serverPublicKey: publicKey })\n .then((s) => _resolve(s))\n .catch((e) => _reject(e));\n }\n },\n error: (error) => {\n console.error(\n 'Nucleus.Notifications: Cannot get web push subscription',\n error\n );\n _reject(error);\n }\n });\n });\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { NucleusNotificationsConfig } from './models';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n})\nexport class NucleusNotificationsModule {\n static forRoot(\n config: NucleusNotificationsConfig\n ): ModuleWithProviders<NucleusNotificationsModule> {\n return {\n ngModule: NucleusNotificationsModule,\n providers: [{ provide: NucleusNotificationsConfig, useValue: config }],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.NucleusNotificationsConfig"],"mappings":";;;;;;;;MAAa,YAAY,CAAA;AAOxB;MAEY,QAAQ,CAAA;AAIpB;MAEY,SAAS,CAAA;A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,OAAO,CACZ,MAAkC,EAAA;QAElC,OAAO;AACL,YAAA,QAAQ,EAAE,0BAA0B;YACpC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SACvE;IACH;8GARW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAA1B,0BAA0B,EAAA,CAAA,CAAA;+GAA1B,0BAA0B,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA;;;ACPD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"@angular/core": "^17.3.0",
|
|
6
6
|
"@angular/service-worker": "^17.3.0",
|
|
7
7
|
"@kolektor/nucleus-common": "0.1.x",
|
|
8
|
-
"@capacitor/push-notifications": "^
|
|
8
|
+
"@capacitor/push-notifications": "^7.0.0",
|
|
9
9
|
"rxjs": "~7.8.0"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": false,
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"tslib": "^2.3.0"
|
|
27
27
|
},
|
|
28
|
-
"version": "0.1.
|
|
28
|
+
"version": "0.1.1911"
|
|
29
29
|
}
|