@juice-js/notifications 0.0.0-stage → 2.1.0-alpha.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"juice-js-notifications.mjs","sources":["../../../../projects/juice-js/notifications/src/lib/models.ts","../../../../projects/juice-js/notifications/src/lib/notifications.config.ts","../../../../projects/juice-js/notifications/src/lib/notifications-api.service.ts","../../../../projects/juice-js/notifications/src/lib/inbox-hub.ts","../../../../projects/juice-js/notifications/src/lib/inbox.service.ts","../../../../projects/juice-js/notifications/src/lib/push.ts","../../../../projects/juice-js/notifications/src/lib/components/inbox-panel/inbox-panel.component.ts","../../../../projects/juice-js/notifications/src/lib/components/inbox-panel/inbox-panel.component.html","../../../../projects/juice-js/notifications/src/lib/components/notification-bell/notification-bell.component.ts","../../../../projects/juice-js/notifications/src/lib/pages/problem.ts","../../../../projects/juice-js/notifications/src/lib/pages/preferences/preferences.component.ts","../../../../projects/juice-js/notifications/src/lib/pages/preferences/preferences.component.html","../../../../projects/juice-js/notifications/src/lib/pages/contact-points/contact-points.component.ts","../../../../projects/juice-js/notifications/src/lib/pages/contact-points/contact-points.component.html","../../../../projects/juice-js/notifications/src/lib/pages/templates/templates.component.ts","../../../../projects/juice-js/notifications/src/lib/pages/templates/templates.component.html","../../../../projects/juice-js/notifications/src/lib/notifications.module.ts","../../../../projects/juice-js/notifications/src/lib/notifications-routing.module.ts","../../../../projects/juice-js/notifications/src/public-api.ts","../../../../projects/juice-js/notifications/src/juice-js-notifications.ts"],"sourcesContent":["/**\n * The shapes of the Juice.Notifications person's API (`/api/v1/tenants/{tenantId}/me/…`), as it sends them: camelCase, enums as strings,\n * times as ISO 8601 text.\n */\n\nexport type NotificationPriority = 'low' | 'normal' | 'high' | 'critical';\n\n/** An action a type declares (`{ id, label }`): listed on its items, acted on from phase 3. */\nexport interface InboxAction {\n id: string;\n label: string;\n}\n\n/** A correlation's state, as the API writes it (camelCase). */\nexport type CorrelationState = 'open' | 'acknowledged' | 'resolved' | 'cancelled';\n\n/** The item's correlation: open ones wait for someone; a resolved one shows its outcome (Juice.Notifications phase 3). */\nexport interface InboxCorrelation {\n state: CorrelationState;\n outcome: string | null;\n acknowledgedBy: string | null;\n resolvedAt: string | null;\n}\n\n/** What the person did with the item: `read`, `acknowledged`, or `action` with its id. */\nexport interface InboxInteraction {\n kind: 'read' | 'acknowledged' | 'action';\n actionId: string | null;\n at: string;\n}\n\n/** An item in the person's inbox. */\nexport interface InboxItem {\n id: string;\n type: string;\n group: string;\n title: string;\n body: string;\n url: string | null;\n actions: InboxAction[] | null;\n actionable: boolean;\n priority: NotificationPriority;\n createdAt: string;\n readAt: string | null;\n archivedAt: string | null;\n /** Null when the notification has no correlation key. */\n correlation?: InboxCorrelation | null;\n interactions?: InboxInteraction[];\n}\n\n/** Whether the item's actions can still be chosen: it has some, and its correlation (if any) is open or acknowledged. */\nexport function canAct(item: InboxItem): boolean {\n return !!item.actions?.length && (!item.correlation || item.correlation.state === 'open' || item.correlation.state === 'acknowledged');\n}\n\n/** The action the person chose on the item, if any. */\nexport function chosenAction(item: InboxItem): string | null {\n return item.interactions?.find((i) => i.kind === 'action')?.actionId ?? null;\n}\n\n/** A display group of the tenant, in order, with the person's open and unread counts in it. */\nexport interface InboxGroupCount {\n key: string;\n name: string;\n position: number;\n open: number;\n unread: number;\n}\n\nexport interface InboxCounts {\n groups: InboxGroupCount[];\n unread: number;\n actionableOpen: number;\n}\n\n/** What a listing asks for; everything is optional. */\nexport interface InboxQuery {\n /** A display group's key; left out: every group. */\n group?: string;\n unread?: boolean;\n /** Actionable and open (not archived). */\n actionable?: boolean;\n /** Archived items instead of open ones. */\n archived?: boolean;\n /** The id of the last item already shown: the page after it. */\n before?: string;\n /** At most 100; the API's default is 50. */\n limit?: number;\n}\n\n/** What the inbox hub says: `added` or `changed` with the items, or `reset` (reload everything). */\nexport interface InboxChange {\n kind: 'added' | 'changed' | 'reset';\n items: string[];\n}\n\nexport type PreferenceMode = 'on' | 'off' | 'digest';\n\n/** How the person hears about a category (or `*`) on a channel (or `*`); the most specific choice wins. */\nexport interface Preference {\n category: string;\n channel: string;\n mode: PreferenceMode;\n updatedAt?: string;\n}\n\n/** A quiet period: on `days` (`mon` … `sun`; null: every day) from `start` to `end` (`HH:mm`), in `timeZone` (IANA). */\nexport interface QuietHours {\n days: string[] | null;\n start: string;\n end: string;\n timeZone: string | null;\n}\n\n/** The signed-in person as the service knows them. */\nexport interface Me {\n id: string;\n source: string;\n externalId: string;\n name: string | null;\n locale: string | null;\n timeZone: string | null;\n quietHours: QuietHours | null;\n}\n\n/** As the API writes it (camelCase: `ok`, `bouncing`, `failed`). A failed address isn't used until verified again. */\nexport type ContactHealth = 'ok' | 'bouncing' | 'failed';\n\n/** One of the person's addresses; only a verified one that hasn't failed is used. */\nexport interface ContactPoint {\n id: string;\n channel: string;\n address: string;\n verified: boolean;\n verifiedAt: string | null;\n verifiedBy: string | null;\n health: ContactHealth;\n healthReason: string | null;\n createdAt: string;\n}\n\n/** A code to send the tenant's bot from the chat account to link (`ABCD-EFGH`), valid until `expiresAt` and once. */\nexport interface LinkCode {\n channel: string;\n code: string;\n expiresAt: string;\n}\n\n/** A type the tenant receives, at its latest version, with each channel's templates (the application's, the tenant's own). */\nexport interface TenantType {\n key: string;\n name: string;\n version: number;\n application: string;\n channels: { channel: string; declared: boolean; overridden: boolean }[];\n}\n\n/** A channel's templates for a type: the application's, and the tenant's own (null without one). */\nexport interface TenantTemplate {\n type: string;\n typeVersion: number;\n channel: string;\n locale: string;\n application: string | null;\n tenant: string | null;\n tenantVersion: number | null;\n updatedAt: string | null;\n}\n\n/** A template rendered: the channel's content (email: subject, text, html), or why it failed; and the data it used. */\nexport interface TemplatePreview {\n channel: string;\n content: Record<string, unknown> | null;\n error: string | null;\n data: Record<string, unknown>;\n}\n\n/** A device registered for push; its token is never returned. */\nexport interface Device {\n id: string;\n platform: 'fcm' | 'apns' | 'webpush';\n appId: string;\n locale: string | null;\n createdAt: string;\n lastSeenAt: string;\n}\n\n/** A registration: a token (FCM, APNs) or a Web Push subscription. Registering again refreshes it. */\nexport interface RegisterDevice {\n platform: 'fcm' | 'apns' | 'webpush';\n appId: string;\n token?: string;\n subscription?: { endpoint: string; p256dh: string; auth: string };\n locale?: string | null;\n}\n\n/** A verification code is on its way, valid until `expiresAt`. */\nexport interface VerificationSent {\n expiresAt: string;\n}\n\n/** The API's error body (RFC 9457 problem details with a `code`, and field errors by JSON pointer). */\nexport interface NotificationsProblem {\n status: number;\n code: string;\n detail?: string;\n errors?: { pointer: string; message: string }[];\n}\n","import { EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\n\n/**\n * Where the Juice.Notifications API is, and how to find the person's tenant and token. Only `apiUrl` is required: the tenant comes from the\n * access token's `platform_tenant` claim and the token from `angular-oauth2-oidc`'s `OAuthService`, as `@juice-js/auth` signs people in.\n */\nexport interface NotificationsConfig {\n /** The API's base URL, without a trailing slash: `https://notifications.example.com`. */\n apiUrl: string;\n /** The inbox hub; left out: `${apiUrl}/hubs/inbox`. */\n hubUrl?: string;\n /**\n * The tenant's id (a GUID, which the API routes by; not the app's tenant identifier in its URL). A string, or a function read on each call;\n * left out: the access token's `platform_tenant` claim.\n */\n tenantId?: string | (() => string | null | undefined);\n /** The access token; left out: `OAuthService.getAccessToken()`. The REST calls get theirs from `@juice-js/auth`'s interceptor. */\n accessToken?: () => string | null | undefined;\n /** Items per page in the panel (at most 100). */\n pageSize?: number;\n /**\n * The chat accounts people may link on the contact points page, as the tenant's integrations offer them: `['slack', 'telegram']`. Left out:\n * none (email only).\n */\n linkChannels?: string[];\n /** Whether people may add phone numbers for SMS (the tenant sends SMS). Left out: email only. */\n phoneNumbers?: boolean;\n /** The Telegram bot's username, without `@`: the link code then opens the bot with it (`https://t.me/{bot}?start={code}`). */\n telegramBot?: string;\n}\n\nexport const NOTIFICATIONS_CONFIG = new InjectionToken<NotificationsConfig>('NOTIFICATIONS_CONFIG');\n\n/** Registers the configuration: `providers: [provideNotifications({ apiUrl: environment.notificationsApi })]`. */\nexport function provideNotifications(config: NotificationsConfig): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: NOTIFICATIONS_CONFIG, useValue: config }]);\n}\n\n/** A JWT's payload claim, or null when the token isn't a JWT or hasn't it. Reads; never verifies (the API does). */\nexport function tokenClaim(token: string | null | undefined, claim: string): string | null {\n const payload = token?.split('.')[1];\n if (!payload) {\n return null;\n }\n try {\n const json = atob(payload.replace(/-/g, '+').replace(/_/g, '/').padEnd(Math.ceil(payload.length / 4) * 4, '='));\n const value = JSON.parse(decodeURIComponent(Array.from(json, (c) => '%' + c.charCodeAt(0).toString(16).padStart(2, '0')).join('')))[claim];\n return typeof value === 'string' && value.length > 0 ? value : null;\n } catch {\n return null;\n }\n}\n","import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { OAuthService } from 'angular-oauth2-oidc';\nimport { Observable, throwError } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport {\n ContactPoint, Device, LinkCode, RegisterDevice, TemplatePreview, TenantTemplate, TenantType, InboxCounts, InboxItem, InboxQuery, Me, Preference, QuietHours, VerificationSent,\n} from './models';\nimport { NOTIFICATIONS_CONFIG, NotificationsConfig, tokenClaim } from './notifications.config';\n\n/** Thrown (as an observable error) when no tenant id can be found: the configuration has none and the token no `platform_tenant` claim. */\nexport class NoTenantError extends Error {\n constructor() {\n super('[@juice-js/notifications] No tenant: configure tenantId, or sign in with a token that has a platform_tenant claim.');\n }\n}\n\n/**\n * The person's API of Juice.Notifications, one method per call. The bearer token comes from `@juice-js/auth`'s interceptor (list the API in\n * `AuthModuleConfig.allowedUrls`); errors are the API's problem details ({@link NotificationsProblem}) in an `HttpErrorResponse`.\n */\n@Injectable({ providedIn: 'root' })\nexport class NotificationsApi {\n private readonly http = inject(HttpClient);\n private readonly config: NotificationsConfig = inject(NOTIFICATIONS_CONFIG);\n private readonly oauth = inject(OAuthService, { optional: true });\n\n /** The access token for the hub (REST calls get theirs from the interceptor). */\n accessToken(): string | null {\n return (this.config.accessToken ? this.config.accessToken() : this.oauth?.getAccessToken()) ?? null;\n }\n\n /** The tenant's id: configured, or the token's `platform_tenant` claim. */\n tenantId(): string | null {\n const configured = typeof this.config.tenantId === 'function' ? this.config.tenantId() : this.config.tenantId;\n return configured || tokenClaim(this.accessToken(), 'platform_tenant');\n }\n\n get hubUrl(): string {\n return this.config.hubUrl ?? `${this.config.apiUrl}/hubs/inbox`;\n }\n\n // The inbox.\n\n inbox(query: InboxQuery = {}): Observable<InboxItem[]> {\n let params = new HttpParams();\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined && value !== null && value !== false) {\n params = params.set(key, String(value));\n }\n }\n return this.me((base) => this.http.get<InboxItem[]>(`${base}/inbox`, { params }));\n }\n\n counts(): Observable<InboxCounts> {\n return this.me((base) => this.http.get<InboxCounts>(`${base}/inbox/counts`));\n }\n\n item(id: string): Observable<InboxItem> {\n return this.me((base) => this.http.get<InboxItem>(`${base}/inbox/${encodeURIComponent(id)}`));\n }\n\n /** Marks an item read (`true`) or unread. */\n read(id: string, read = true): Observable<InboxItem> {\n const url = (base: string) => `${base}/inbox/${encodeURIComponent(id)}/read`;\n return this.me((base) => read ? this.http.post<InboxItem>(url(base), null) : this.http.delete<InboxItem>(url(base)));\n }\n\n /** Archives an item (`true`, which also reads it) or puts it back. */\n archive(id: string, archive = true): Observable<InboxItem> {\n const url = (base: string) => `${base}/inbox/${encodeURIComponent(id)}/archive`;\n return this.me((base) => archive ? this.http.post<InboxItem>(url(base), null) : this.http.delete<InboxItem>(url(base)));\n }\n\n /**\n * Chooses one of the item's actions: the producer hears it and decides (the inbox decides nothing). Once per action; refused (409\n * `correlation_closed`) once it has been decided.\n */\n act(id: string, actionId: string): Observable<InboxItem> {\n return this.me((base) => this.http.post<InboxItem>(`${base}/inbox/${encodeURIComponent(id)}/actions/${encodeURIComponent(actionId)}`, null));\n }\n\n /** Acknowledges the item: the producer hears it. */\n acknowledge(id: string): Observable<InboxItem> {\n return this.me((base) => this.http.post<InboxItem>(`${base}/inbox/${encodeURIComponent(id)}/acknowledge`, null));\n }\n\n /** Marks every open item read, in one group or all; answers how many were. */\n readAll(group?: string): Observable<number> {\n const params = group ? new HttpParams().set('group', group) : undefined;\n return this.me((base) => this.http.post<{ marked: number }>(`${base}/inbox/read-all`, null, { params }).pipe(map((r) => r.marked)));\n }\n\n // The person and their settings.\n\n profile(): Observable<Me> {\n return this.me((base) => this.http.get<Me>(base));\n }\n\n preferences(): Observable<Preference[]> {\n return this.me((base) => this.http.get<Preference[]>(`${base}/preferences`));\n }\n\n /** Replaces all of the person's preferences (an empty list: everything on). */\n savePreferences(preferences: Preference[]): Observable<Preference[]> {\n const body = { preferences: preferences.map(({ category, channel, mode }) => ({ category, channel, mode })) };\n return this.me((base) => this.http.put<Preference[]>(`${base}/preferences`, body));\n }\n\n saveQuietHours(quiet: QuietHours): Observable<QuietHours> {\n return this.me((base) => this.http.put<QuietHours>(`${base}/quiet-hours`, quiet));\n }\n\n clearQuietHours(): Observable<void> {\n return this.me((base) => this.http.delete<void>(`${base}/quiet-hours`));\n }\n\n contactPoints(): Observable<ContactPoint[]> {\n return this.me((base) => this.http.get<ContactPoint[]>(`${base}/contact-points`));\n }\n\n addContactPoint(channel: string, address: string): Observable<ContactPoint> {\n return this.me((base) => this.http.post<ContactPoint>(`${base}/contact-points`, { channel, address }));\n }\n\n removeContactPoint(id: string): Observable<void> {\n return this.me((base) => this.http.delete<void>(`${base}/contact-points/${encodeURIComponent(id)}`));\n }\n\n /** Sends a verification code to the address. */\n sendCode(id: string): Observable<VerificationSent> {\n return this.me((base) => this.http.post<VerificationSent>(`${base}/contact-points/${encodeURIComponent(id)}/verification`, null));\n }\n\n verify(id: string, code: string): Observable<ContactPoint> {\n return this.me((base) => this.http.post<ContactPoint>(`${base}/contact-points/${encodeURIComponent(id)}/verify`, { code }));\n }\n\n /** A code to link a chat account (`slack`, `telegram`): the person sends it to the tenant's bot from that account. */\n linkCode(channel: string): Observable<LinkCode> {\n return this.me((base) => this.http.post<LinkCode>(`${base}/links`, { channel }));\n }\n\n devices(): Observable<Device[]> {\n return this.me((base) => this.http.get<Device[]>(`${base}/devices`));\n }\n\n /** Registers this device for push (or refreshes its registration); see `enableWebPush` for browsers. */\n registerDevice(device: RegisterDevice): Observable<Device> {\n return this.me((base) => this.http.post<Device>(`${base}/devices`, device));\n }\n\n removeDevice(id: string): Observable<void> {\n return this.me((base) => this.http.delete<void>(`${base}/devices/${encodeURIComponent(id)}`));\n }\n\n /** The types the tenant receives (tenant admins), for the template editor. */\n tenantTypes(): Observable<TenantType[]> {\n return this.tenant((base) => this.http.get<TenantType[]>(`${base}/types`));\n }\n\n template(type: string, channel: string): Observable<TenantTemplate> {\n return this.tenant((base) => this.http.get<TenantTemplate>(`${base}/types/${encodeURIComponent(type)}/templates/${encodeURIComponent(channel)}`));\n }\n\n /** Saves the tenant's own template for a type and channel, over the application's. */\n saveTemplate(type: string, channel: string, body: string): Observable<TenantTemplate> {\n return this.tenant((base) => this.http.put<TenantTemplate>(`${base}/types/${encodeURIComponent(type)}/templates/${encodeURIComponent(channel)}`, { body }));\n }\n\n /** Removes the tenant's template: the application's is used again. */\n removeTemplate(type: string, channel: string): Observable<void> {\n return this.tenant((base) => this.http.delete<void>(`${base}/types/${encodeURIComponent(type)}/templates/${encodeURIComponent(channel)}`));\n }\n\n /** Renders a template (the one in effect, without `body`) with `data` (a sample from the type's schema, without it). Nothing is stored. */\n previewTemplate(type: string, channel: string, body: string | null, data: unknown | null): Observable<TemplatePreview> {\n return this.tenant((base) => this.http.post<TemplatePreview>(`${base}/templates/preview`, { type, channel, body, data }));\n }\n\n /** A call under `…/tenants/{tenantId}` (the tenant's admins), or {@link NoTenantError} when there's no tenant. */\n private tenant<T>(call: (base: string) => Observable<T>): Observable<T> {\n const tenant = this.tenantId();\n return tenant ? call(`${this.config.apiUrl}/api/v1/tenants/${encodeURIComponent(tenant)}`) : throwError(() => new NoTenantError());\n }\n\n /** A call under `…/tenants/{tenantId}/me`, or {@link NoTenantError} when there's no tenant. */\n private me<T>(call: (base: string) => Observable<T>): Observable<T> {\n const tenant = this.tenantId();\n return tenant\n ? call(`${this.config.apiUrl}/api/v1/tenants/${encodeURIComponent(tenant)}/me`)\n : throwError(() => new NoTenantError());\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HubConnection, HubConnectionBuilder, HubConnectionState, LogLevel } from '@microsoft/signalr';\nimport { InboxChange } from './models';\n\n/** What the inbox needs from its live connection. */\nexport interface InboxHubHandlers {\n /** The hub's one event, `inboxChanged`. */\n changed(change: InboxChange): void;\n /** Connected again after a drop: anything may have changed meanwhile, so reload. */\n reconnected(): void;\n}\n\n/** A live connection; `stop()` ends it. */\nexport interface InboxHubHandle {\n stop(): Promise<void>;\n}\n\n/**\n * Opens the inbox hub (`/hubs/inbox?tenant=…`, the token as `access_token` in the query, as WebSockets need). It reconnects on its own, and\n * after the server closes a session whose token expired it starts again with a fresh token. Replace it in tests.\n */\n@Injectable({ providedIn: 'root' })\nexport class InboxHubConnector {\n connect(url: string, tenantId: string, accessToken: () => string | null, handlers: InboxHubHandlers): InboxHubHandle {\n const connection: HubConnection = new HubConnectionBuilder()\n .withUrl(`${url}?tenant=${encodeURIComponent(tenantId)}`, { accessTokenFactory: () => accessToken() ?? '' })\n .withAutomaticReconnect()\n .configureLogging(LogLevel.Warning)\n .build();\n connection.on('inboxChanged', (change: InboxChange) => handlers.changed(change));\n connection.onreconnected(() => handlers.reconnected());\n let stopped = false;\n let retry: ReturnType<typeof setTimeout> | undefined;\n const start = (delay: number) => {\n connection.start().then(() => delay > 1000 && handlers.reconnected()).catch(() => {\n // Refused (an expired token, the server not up yet): try again, more slowly each time, up to a minute.\n if (!stopped) {\n retry = setTimeout(() => start(Math.min(delay * 2, 60_000)), delay);\n }\n });\n };\n // Closed for good (automatic reconnection gave up, or the server ended a session whose token expired): start again.\n connection.onclose(() => {\n if (!stopped && connection.state === HubConnectionState.Disconnected) {\n retry = setTimeout(() => start(2000), 1000);\n }\n });\n start(1000);\n return {\n stop: () => {\n stopped = true;\n clearTimeout(retry);\n return connection.stop();\n },\n };\n }\n}\n","import { Injectable, OnDestroy, computed, inject, signal } from '@angular/core';\nimport { Observable, Subscription, firstValueFrom } from 'rxjs';\nimport { InboxHubConnector, InboxHubHandle } from './inbox-hub';\nimport { InboxChange, InboxCounts, InboxItem, InboxQuery, canAct } from './models';\nimport { NotificationsApi } from './notifications-api.service';\nimport { NOTIFICATIONS_CONFIG } from './notifications.config';\n\n/**\n * The person's inbox as signals, kept current by the hub: the counts (the bell's badge, the panel's tabs), and the items of the group and filter\n * shown. Call {@link start} once signed in (the bell does); {@link stop} on sign-out.\n */\n@Injectable({ providedIn: 'root' })\nexport class InboxService implements OnDestroy {\n private readonly api = inject(NotificationsApi);\n private readonly hub = inject(InboxHubConnector);\n private readonly pageSize = Math.min(Math.max(inject(NOTIFICATIONS_CONFIG).pageSize ?? 20, 1), 100);\n\n private readonly _counts = signal<InboxCounts | null>(null);\n private readonly _items = signal<InboxItem[]>([]);\n private readonly _group = signal<string | null>(null);\n private readonly _actionable = signal(false);\n private readonly _loading = signal(false);\n private readonly _more = signal(false);\n private readonly _error = signal<unknown>(null);\n\n readonly counts = this._counts.asReadonly();\n /** Unread in every group: the bell's badge. */\n readonly unread = computed(() => this._counts()?.unread ?? 0);\n readonly actionableOpen = computed(() => this._counts()?.actionableOpen ?? 0);\n readonly items = this._items.asReadonly();\n /** The group shown (a key), or null for every group. */\n readonly group = this._group.asReadonly();\n /** Only actionable and open items. */\n readonly actionableOnly = this._actionable.asReadonly();\n readonly loading = this._loading.asReadonly();\n /** Whether there may be more items past the last one shown. */\n readonly hasMore = this._more.asReadonly();\n /** The last load's error, until the next one succeeds. */\n readonly error = this._error.asReadonly();\n\n private connection: InboxHubHandle | null = null;\n private listing: Subscription | null = null;\n private started = false;\n\n /** Loads the counts and the first page, and opens the hub. Again after {@link stop}; once otherwise. */\n start(): void {\n if (this.started) {\n return;\n }\n const tenant = this.api.tenantId();\n if (!tenant) {\n return; // not signed in yet: the bell asks again when it is\n }\n this.started = true;\n this.reload();\n this.connection = this.hub.connect(this.api.hubUrl, tenant, () => this.api.accessToken(), {\n changed: (change) => this.onChange(change),\n reconnected: () => this.reload(),\n });\n }\n\n stop(): void {\n this.started = false;\n this.listing?.unsubscribe();\n void this.connection?.stop();\n this.connection = null;\n this._counts.set(null);\n this._items.set([]);\n }\n\n ngOnDestroy(): void {\n this.stop();\n }\n\n /** Shows one group (a key) or every group (null). */\n showGroup(group: string | null): void {\n if (group !== this._group()) {\n this._group.set(group);\n this.loadItems();\n }\n }\n\n showActionableOnly(only: boolean): void {\n if (only !== this._actionable()) {\n this._actionable.set(only);\n this.loadItems();\n }\n }\n\n /** The page after the last item shown. */\n loadMore(): void {\n const last = this._items().at(-1);\n if (last && this._more() && !this._loading()) {\n this.loadItems(last.id);\n }\n }\n\n /** Counts and the first page again. */\n reload(): void {\n this.loadCounts();\n this.loadItems();\n }\n\n /** Marks an item read (or unread), here at once and then as the API answers. */\n async markRead(item: InboxItem, read = true): Promise<void> {\n if (!!item.readAt === read) {\n return;\n }\n this.replace({ ...item, readAt: read ? new Date().toISOString() : null });\n await this.apply(this.api.read(item.id, read), item);\n }\n\n /** Archives an item (or restores one): it leaves (or joins) the open items. */\n async archive(item: InboxItem, archive = true): Promise<void> {\n this._items.update((items) => items.filter((i) => i.id !== item.id));\n await this.apply(this.api.archive(item.id, archive), item);\n }\n\n /** Chooses one of the item's actions; the item comes back with the choice recorded (and the correlation as it stands). */\n async act(item: InboxItem, actionId: string): Promise<void> {\n await this.apply(this.api.act(item.id, actionId), item);\n }\n\n /** Marks every open item read, in the group shown or all. */\n async readAll(): Promise<void> {\n const group = this._group();\n this._items.update((items) => items.map((i) => i.readAt ? i : { ...i, readAt: new Date().toISOString() }));\n try {\n await firstValueFrom(this.api.readAll(group ?? undefined));\n } catch (error) {\n this._error.set(error);\n }\n this.loadCounts();\n }\n\n private async apply(call: Observable<InboxItem>, before: InboxItem): Promise<void> {\n try {\n const after = await firstValueFrom(call);\n this.replace(after);\n this._error.set(null);\n } catch (error) {\n this._error.set(error);\n this.loadItems(); // back to what the server has\n }\n this.loadCounts();\n }\n\n /** An item as it now is: replaced where shown, or dropped if it no longer belongs to the listing. */\n private replace(item: InboxItem): void {\n const fits = !item.archivedAt && (this._group() === null || item.group === this._group()) && (!this._actionable() || canAct(item));\n this._items.update((items) => fits ? items.map((i) => i.id === item.id ? item : i) : items.filter((i) => i.id !== item.id));\n }\n\n private onChange(change: InboxChange): void {\n this.loadCounts();\n if (change.kind === 'changed') {\n // Only the items shown matter here; any other changed item shows up when its page loads.\n for (const id of change.items.filter((id) => this._items().some((i) => i.id === id))) {\n firstValueFrom(this.api.item(id)).then((item) => this.replace(item), () => this._items.update((items) => items.filter((i) => i.id !== id)));\n }\n return;\n }\n // Added (newest first, so at the top) or reset: the first page again.\n this.loadItems();\n }\n\n private loadCounts(): void {\n this.api.counts().subscribe({ next: (counts) => this._counts.set(counts), error: (error) => this._error.set(error) });\n }\n\n private loadItems(before?: string): void {\n this.listing?.unsubscribe();\n const query: InboxQuery = { group: this._group() ?? undefined, actionable: this._actionable(), before, limit: this.pageSize };\n this._loading.set(true);\n this.listing = this.api.inbox(query).subscribe({\n next: (page) => {\n this._items.update((items) => before ? [...items, ...page.filter((p) => !items.some((i) => i.id === p.id))] : page);\n this._more.set(page.length === this.pageSize);\n this._loading.set(false);\n this._error.set(null);\n },\n error: (error) => {\n this._loading.set(false);\n this._error.set(error);\n },\n });\n }\n}\n","import { firstValueFrom } from 'rxjs';\nimport { Device } from './models';\nimport { NotificationsApi } from './notifications-api.service';\n\n/** How the app turns on Web Push for the signed-in person. */\nexport interface WebPushOptions {\n /** The tenant's VAPID public key (its `webpush` integration's `settings.publicKey`), base64url. */\n vapidPublicKey: string;\n /** The service worker to register: the library's `juice-push-sw.js`, copied to the app's root (see the README). */\n serviceWorkerUrl?: string;\n /** What the registration is called on the service: this web app. Left out: `web`. */\n appId?: string;\n /** The person's locale for this device. */\n locale?: string;\n}\n\n/** Web Push isn't available here: no service workers, no Push API, or the person said no. */\nexport class WebPushUnavailableError extends Error {}\n\n/** Whether this browser can take Web Push at all. */\nexport function webPushSupported(): boolean {\n return typeof navigator !== 'undefined' && 'serviceWorker' in navigator && typeof window !== 'undefined' && 'PushManager' in window;\n}\n\nfunction fromBase64Url(text: string): Uint8Array {\n const base64 = text.replace(/-/g, '+').replace(/_/g, '/').padEnd(Math.ceil(text.length / 4) * 4, '=');\n return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));\n}\n\nfunction toBase64Url(buffer: ArrayBuffer | null): string {\n const bytes = new Uint8Array(buffer ?? new ArrayBuffer(0));\n return btoa(String.fromCharCode(...bytes)).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\n\n/**\n * Subscribes this browser to push (asking the person, when they haven't answered yet) and registers the subscription with the service, so\n * notifications of types with a `push` template reach it. Call it again on each start: registering an existing subscription only refreshes it.\n */\nexport async function enableWebPush(api: NotificationsApi, options: WebPushOptions): Promise<Device> {\n if (!webPushSupported()) {\n throw new WebPushUnavailableError('This browser has no Web Push.');\n }\n if ((await Notification.requestPermission()) !== 'granted') {\n throw new WebPushUnavailableError('Notifications are not allowed for this site.');\n }\n const registration = await navigator.serviceWorker.register(options.serviceWorkerUrl ?? '/juice-push-sw.js');\n await navigator.serviceWorker.ready;\n const subscription = (await registration.pushManager.getSubscription())\n ?? (await registration.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: fromBase64Url(options.vapidPublicKey) as BufferSource }));\n return firstValueFrom(api.registerDevice({\n platform: 'webpush',\n appId: options.appId ?? 'web',\n subscription: { endpoint: subscription.endpoint, p256dh: toBase64Url(subscription.getKey('p256dh')), auth: toBase64Url(subscription.getKey('auth')) },\n locale: options.locale ?? null,\n }));\n}\n\n/** On sign-out: removes the registration from the service and unsubscribes this browser. */\nexport async function disableWebPush(api: NotificationsApi, deviceId: string, serviceWorkerUrl = '/juice-push-sw.js'): Promise<void> {\n await firstValueFrom(api.removeDevice(deviceId));\n if (!webPushSupported()) {\n return;\n }\n const registration = await navigator.serviceWorker.getRegistration(serviceWorkerUrl);\n await (await registration?.pushManager.getSubscription())?.unsubscribe();\n}\n","import { DatePipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, input, output } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { InboxService } from '../../inbox.service';\nimport { InboxItem, canAct, chosenAction } from '../../models';\n\n/**\n * The person's inbox: a tab per display group with its unread count, an \"actionable and open\" filter, the items newest first (unread ones\n * marked), and per item read and archive. Opening an item reads it and follows its link (`links.self`) unless {@link opened} is handled\n * (`followLinks` false).\n */\n@Component({\n selector: 'juice-inbox-panel',\n standalone: true,\n imports: [DatePipe, MatButtonModule, MatButtonToggleModule, MatIconModule, MatProgressBarModule, MatSlideToggleModule, MatTooltipModule, TranslatePipe],\n templateUrl: './inbox-panel.component.html',\n styleUrl: './inbox-panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InboxPanelComponent {\n readonly inbox = inject(InboxService);\n\n /** Whether opening an item follows its link; when false, handle {@link opened}. */\n readonly followLinks = input(true);\n /** An item was opened (after it was marked read). */\n readonly opened = output<InboxItem>();\n\n open(item: InboxItem): void {\n void this.inbox.markRead(item);\n this.opened.emit(item);\n if (this.followLinks() && item.url && /^https?:\\/\\//i.test(item.url)) {\n window.location.assign(item.url);\n }\n }\n\n toggleRead(item: InboxItem, event: Event): void {\n event.stopPropagation();\n void this.inbox.markRead(item, !item.readAt);\n }\n\n archive(item: InboxItem, event: Event): void {\n event.stopPropagation();\n void this.inbox.archive(item);\n }\n\n act(item: InboxItem, actionId: string, event: Event): void {\n event.stopPropagation();\n void this.inbox.act(item, actionId);\n }\n\n readonly canAct = canAct;\n readonly chosen = chosenAction;\n}\n","<section class=\"inbox\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <header class=\"inbox-header\">\n <h2 class=\"inbox-title\">{{ 'Notifications' | translate }}</h2>\n <mat-slide-toggle class=\"inbox-actionable\" [checked]=\"inbox.actionableOnly()\" (change)=\"inbox.showActionableOnly($event.checked)\">\n {{ 'Needs action' | translate }} ({{ inbox.actionableOpen() }})\n </mat-slide-toggle>\n <button mat-icon-button type=\"button\" (click)=\"inbox.readAll()\" [disabled]=\"!inbox.unread()\"\n [matTooltip]=\"'Mark all as read' | translate\" [attr.aria-label]=\"'Mark all as read' | translate\">\n <mat-icon>done_all</mat-icon>\n </button>\n </header>\n\n <mat-button-toggle-group class=\"inbox-groups\" hideSingleSelectionIndicator [value]=\"inbox.group()\" (change)=\"inbox.showGroup($event.value)\"\n [attr.aria-label]=\"'Groups' | translate\">\n <mat-button-toggle [value]=\"null\">{{ 'All' | translate }}@if (inbox.unread()) { <span class=\"unread-count\">{{ inbox.unread() }}</span> }</mat-button-toggle>\n @for (group of inbox.counts()?.groups ?? []; track group.key) {\n <mat-button-toggle [value]=\"group.key\">{{ group.name }}@if (group.unread) { <span class=\"unread-count\">{{ group.unread }}</span> }</mat-button-toggle>\n }\n </mat-button-toggle-group>\n\n @if (inbox.loading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n @if (inbox.error()) {\n <p class=\"inbox-error\" role=\"alert\">{{ 'Notifications could not be loaded.' | translate }}\n <button mat-button type=\"button\" (click)=\"inbox.reload()\">{{ 'Try again' | translate }}</button></p>\n }\n\n <ul class=\"inbox-items\" role=\"list\">\n @for (item of inbox.items(); track item.id) {\n <li class=\"inbox-item\" [class.unread]=\"!item.readAt\" [class.urgent]=\"item.priority === 'high' || item.priority === 'critical'\">\n <button type=\"button\" class=\"inbox-item-open\" (click)=\"open(item)\">\n <span class=\"inbox-item-title\">{{ item.title }}</span>\n @if (item.body) { <span class=\"inbox-item-body\">{{ item.body }}</span> }\n @if (item.correlation?.state === 'resolved' || item.correlation?.state === 'cancelled') {\n <span class=\"inbox-item-outcome\">{{ item.correlation!.outcome || (item.correlation!.state === 'resolved' ? 'Done' : 'Cancelled') | translate }}</span>\n }\n <time class=\"inbox-item-time\" [attr.datetime]=\"item.createdAt\">{{ item.createdAt | date: 'short' }}</time>\n </button>\n @if (canAct(item)) {\n <span class=\"inbox-item-actions\">\n @for (action of item.actions; track action.id) {\n <button mat-stroked-button type=\"button\" class=\"inbox-item-action\" [class.chosen]=\"chosen(item) === action.id\"\n [disabled]=\"chosen(item) === action.id\" (click)=\"act(item, action.id, $event)\">{{ action.label }}</button>\n }\n </span>\n }\n <span class=\"inbox-item-tools\">\n <button mat-icon-button type=\"button\" (click)=\"toggleRead(item, $event)\"\n [matTooltip]=\"(item.readAt ? 'Mark as unread' : 'Mark as read') | translate\"\n [attr.aria-label]=\"(item.readAt ? 'Mark as unread' : 'Mark as read') | translate\">\n <mat-icon>{{ item.readAt ? 'mark_email_unread' : 'mark_email_read' }}</mat-icon>\n </button>\n <button mat-icon-button type=\"button\" (click)=\"archive(item, $event)\" [matTooltip]=\"'Archive' | translate\" [attr.aria-label]=\"'Archive' | translate\">\n <mat-icon>archive</mat-icon>\n </button>\n </span>\n </li>\n } @empty {\n @if (!inbox.loading()) {\n <li class=\"inbox-empty\">{{ 'Nothing here.' | translate }}</li>\n }\n }\n </ul>\n\n @if (inbox.hasMore()) {\n <button mat-button type=\"button\" class=\"inbox-more\" (click)=\"inbox.loadMore()\" [disabled]=\"inbox.loading()\">{{ 'Show more' | translate }}</button>\n }\n</section>\n","import { ChangeDetectionStrategy, Component, DestroyRef, OnInit, inject, input } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { OAuthService } from 'angular-oauth2-oidc';\nimport { InboxService } from '../../inbox.service';\nimport { InboxPanelComponent } from '../inbox-panel/inbox-panel.component';\n\n/**\n * The bell for a toolbar: the person's unread count as its badge, and the inbox panel when clicked. It starts the inbox once the person is\n * signed in (and again after a new sign-in), and stops it on sign-out.\n */\n@Component({\n selector: 'juice-notification-bell',\n standalone: true,\n imports: [MatBadgeModule, MatButtonModule, MatIconModule, MatMenuModule, TranslatePipe, InboxPanelComponent],\n template: `\n <button mat-icon-button type=\"button\" [matMenuTriggerFor]=\"panel\" (menuOpened)=\"inbox.start()\"\n [attr.aria-label]=\"'Notifications' | translate\" [title]=\"'Notifications' | translate\">\n <mat-icon [matBadge]=\"badge()\" [matBadgeHidden]=\"!inbox.unread()\" matBadgeSize=\"small\" matBadgeColor=\"warn\"\n [attr.aria-hidden]=\"true\">{{ inbox.unread() ? 'notifications_active' : 'notifications' }}</mat-icon>\n </button>\n <mat-menu #panel=\"matMenu\" class=\"juice-inbox-menu\" xPosition=\"before\">\n <juice-inbox-panel [followLinks]=\"followLinks()\"></juice-inbox-panel>\n </mat-menu>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NotificationBellComponent implements OnInit {\n readonly inbox = inject(InboxService);\n private readonly oauth = inject(OAuthService, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n\n /** Whether opening an item follows its link. */\n readonly followLinks = input(true);\n\n badge(): string {\n const unread = this.inbox.unread();\n return unread > 99 ? '99+' : String(unread);\n }\n\n ngOnInit(): void {\n this.inbox.start();\n this.oauth?.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {\n if (event.type === 'token_received') {\n this.inbox.start();\n } else if (event.type === 'logout' || event.type === 'session_terminated') {\n this.inbox.stop();\n }\n });\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { NotificationsProblem } from '../models';\nimport { NoTenantError } from '../notifications-api.service';\n\n/** A message for the person from an API error: the problem's field errors, else its detail, else a general one. */\nexport function problemMessage(error: unknown, fallback = 'Something went wrong. Try again.'): string {\n if (error instanceof NoTenantError) {\n return 'Sign in to see your notifications.';\n }\n if (error instanceof HttpErrorResponse && error.error && typeof error.error === 'object') {\n const problem = error.error as Partial<NotificationsProblem>;\n if (problem.errors?.length) {\n return problem.errors.map((e) => e.message).join(' ');\n }\n if (problem.detail) {\n return problem.detail;\n }\n }\n return fallback;\n}\n","import { ChangeDetectionStrategy, Component, OnInit, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { firstValueFrom } from 'rxjs';\nimport { Preference, PreferenceMode, QuietHours } from '../../models';\nimport { NotificationsApi } from '../../notifications-api.service';\nimport { problemMessage } from '../problem';\n\n/** Days as the API names them, Monday first. */\nexport const WEEK_DAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] as const;\n\n/**\n * The person's notification preferences (a mode per category and channel; `*` for every one; the most specific wins) and quiet hours, when\n * personal channels wait and the inbox doesn't. A mandatory type reaches the person anyway, in the inbox at least.\n */\n@Component({\n selector: 'juice-notification-preferences',\n standalone: true,\n imports: [FormsModule, MatButtonModule, MatCheckboxModule, MatFormFieldModule, MatIconModule, MatInputModule, MatSelectModule, MatSlideToggleModule,\n TranslatePipe],\n templateUrl: './preferences.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PreferencesComponent implements OnInit {\n private readonly api = inject(NotificationsApi);\n\n readonly channels = ['*', 'inbox', 'email', 'push', 'sms', 'slack', 'teams'];\n readonly modes: PreferenceMode[] = ['on', 'off', 'digest'];\n readonly days = WEEK_DAYS;\n\n readonly rows = signal<Preference[]>([]);\n readonly quiet = signal<QuietHours | null>(null);\n readonly quietOn = signal(false);\n readonly busy = signal(false);\n readonly message = signal<string | null>(null);\n readonly error = signal<string | null>(null);\n\n async ngOnInit(): Promise<void> {\n await this.run(async () => {\n const [preferences, me] = await Promise.all([firstValueFrom(this.api.preferences()), firstValueFrom(this.api.profile())]);\n this.rows.set(preferences.map((p) => ({ ...p })));\n this.quietOn.set(!!me.quietHours);\n this.quiet.set(me.quietHours ?? { days: null, start: '22:00', end: '07:00', timeZone: me.timeZone ?? browserZone() });\n });\n }\n\n add(): void {\n this.rows.update((rows) => [...rows, { category: '*', channel: '*', mode: 'on' }]);\n }\n\n remove(index: number): void {\n this.rows.update((rows) => rows.filter((_, i) => i !== index));\n }\n\n update(index: number, change: Partial<Preference>): void {\n this.rows.update((rows) => rows.map((row, i) => i === index ? { ...row, ...change } : row));\n }\n\n async savePreferences(): Promise<void> {\n await this.run(async () => {\n this.rows.set(await firstValueFrom(this.api.savePreferences(this.rows())));\n this.message.set('Preferences saved.');\n });\n }\n\n quietDay(day: string): boolean {\n return this.quiet()?.days?.includes(day) ?? true;\n }\n\n setQuiet(change: Partial<QuietHours>): void {\n this.quiet.update((q) => q ? { ...q, ...change } : q);\n }\n\n toggleDay(day: string, on: boolean): void {\n const current = this.quiet()?.days ?? [...WEEK_DAYS];\n const days = WEEK_DAYS.filter((d) => d === day ? on : current.includes(d));\n // Every day is no list at all.\n this.setQuiet({ days: days.length === WEEK_DAYS.length ? null : days });\n }\n\n async saveQuietHours(): Promise<void> {\n await this.run(async () => {\n if (this.quietOn() && this.quiet()) {\n this.quiet.set(await firstValueFrom(this.api.saveQuietHours(this.quiet()!)));\n } else {\n await firstValueFrom(this.api.clearQuietHours());\n }\n this.message.set('Quiet hours saved.');\n });\n }\n\n private async run(work: () => Promise<void>): Promise<void> {\n this.busy.set(true);\n this.message.set(null);\n this.error.set(null);\n try {\n await work();\n } catch (error) {\n this.error.set(problemMessage(error));\n } finally {\n this.busy.set(false);\n }\n }\n}\n\nfunction browserZone(): string | null {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone ?? null;\n } catch {\n return null;\n }\n}\n","<section class=\"juice-notification-settings\">\n <h2>{{ 'Notification preferences' | translate }}</h2>\n <p>{{ 'Choose how you hear about each category. The most specific choice wins; * means every category or channel. Required notifications still reach your inbox.' | translate }}</p>\n\n @if (error()) { <p class=\"error\" role=\"alert\">{{ error()! | translate }}</p> }\n @if (message()) { <p class=\"message\" role=\"status\">{{ message()! | translate }}</p> }\n\n <table class=\"preferences\">\n <thead>\n <tr><th>{{ 'Category' | translate }}</th><th>{{ 'Channel' | translate }}</th><th>{{ 'Mode' | translate }}</th><th></th></tr>\n </thead>\n <tbody>\n @for (row of rows(); track $index; let i = $index) {\n <tr>\n <td>\n <mat-form-field subscriptSizing=\"dynamic\">\n <input matInput [ngModel]=\"row.category\" (ngModelChange)=\"update(i, { category: $event })\" [attr.aria-label]=\"'Category' | translate\" required>\n </mat-form-field>\n </td>\n <td>\n <mat-form-field subscriptSizing=\"dynamic\">\n <mat-select [ngModel]=\"row.channel\" (ngModelChange)=\"update(i, { channel: $event })\" [attr.aria-label]=\"'Channel' | translate\">\n @for (channel of channels; track channel) { <mat-option [value]=\"channel\">{{ channel }}</mat-option> }\n </mat-select>\n </mat-form-field>\n </td>\n <td>\n <mat-form-field subscriptSizing=\"dynamic\">\n <mat-select [ngModel]=\"row.mode\" (ngModelChange)=\"update(i, { mode: $event })\" [attr.aria-label]=\"'Mode' | translate\">\n @for (mode of modes; track mode) { <mat-option [value]=\"mode\">{{ mode | translate }}</mat-option> }\n </mat-select>\n </mat-form-field>\n </td>\n <td>\n <button mat-icon-button type=\"button\" (click)=\"remove(i)\" [attr.aria-label]=\"'Remove' | translate\"><mat-icon>delete</mat-icon></button>\n </td>\n </tr>\n } @empty {\n <tr><td colspan=\"4\">{{ 'Everything is on.' | translate }}</td></tr>\n }\n </tbody>\n </table>\n <div class=\"buttons\">\n <button mat-button type=\"button\" (click)=\"add()\" [disabled]=\"busy()\"><mat-icon>add</mat-icon> {{ 'Add a preference' | translate }}</button>\n <button mat-flat-button type=\"button\" (click)=\"savePreferences()\" [disabled]=\"busy()\">{{ 'Save preferences' | translate }}</button>\n </div>\n\n <h3>{{ 'Quiet hours' | translate }}</h3>\n <p>{{ 'During quiet hours email and other personal channels wait until they end; your inbox still gets everything.' | translate }}</p>\n <mat-slide-toggle [checked]=\"quietOn()\" (change)=\"quietOn.set($event.checked)\">{{ 'Use quiet hours' | translate }}</mat-slide-toggle>\n @if (quietOn() && quiet(); as q) {\n <div class=\"quiet\">\n <mat-form-field>\n <mat-label>{{ 'From' | translate }}</mat-label>\n <input matInput type=\"time\" [ngModel]=\"q.start\" (ngModelChange)=\"setQuiet({ start: $event })\" required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ 'Until' | translate }}</mat-label>\n <input matInput type=\"time\" [ngModel]=\"q.end\" (ngModelChange)=\"setQuiet({ end: $event })\" required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ 'Time zone' | translate }}</mat-label>\n <input matInput [ngModel]=\"q.timeZone\" (ngModelChange)=\"setQuiet({ timeZone: $event || null })\" placeholder=\"Europe/Paris\">\n </mat-form-field>\n <div class=\"days\" role=\"group\" [attr.aria-label]=\"'Days' | translate\">\n @for (day of days; track day) {\n <mat-checkbox [checked]=\"quietDay(day)\" (change)=\"toggleDay(day, $event.checked)\">{{ day | translate }}</mat-checkbox>\n }\n </div>\n </div>\n }\n <div class=\"buttons\">\n <button mat-flat-button type=\"button\" (click)=\"saveQuietHours()\" [disabled]=\"busy()\">{{ 'Save quiet hours' | translate }}</button>\n </div>\n</section>\n","import { DatePipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, OnInit, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { firstValueFrom } from 'rxjs';\nimport { ContactPoint, LinkCode } from '../../models';\nimport { NOTIFICATIONS_CONFIG } from '../../notifications.config';\nimport { NotificationsApi } from '../../notifications-api.service';\nimport { problemMessage } from '../problem';\n\n/**\n * The person's email addresses: add one, have a code sent to it and enter the code, or remove one. Only a verified address that hasn't failed\n * is ever used; one your organization's directory vouches for arrives verified. And their chat accounts (`linkChannels`): a chat account is\n * never typed in; the person asks for a code and sends it to the tenant's bot from that account, which links it.\n */\n@Component({\n selector: 'juice-contact-points',\n standalone: true,\n imports: [DatePipe, FormsModule, MatButtonModule, MatFormFieldModule, MatIconModule, MatInputModule, TranslatePipe],\n templateUrl: './contact-points.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ContactPointsComponent implements OnInit {\n private readonly api = inject(NotificationsApi);\n private readonly config = inject(NOTIFICATIONS_CONFIG);\n\n readonly points = signal<ContactPoint[]>([]);\n readonly emails = computed(() => this.points().filter((p) => p.channel === 'email' || p.channel === 'sms'));\n readonly accounts = computed(() => this.points().filter((p) => p.channel !== 'email' && p.channel !== 'sms'));\n readonly phoneNumbers = this.config.phoneNumbers ?? false;\n readonly phone = signal('');\n readonly linkChannels = this.config.linkChannels ?? [];\n /** The code being shown, for the channel it links. */\n readonly link = signal<LinkCode | null>(null);\n readonly address = signal('');\n /** Codes being typed, by contact point. */\n readonly codes = signal<Record<string, string>>({});\n /** Contact points a code was sent to, with when it expires. */\n readonly sent = signal<Record<string, string>>({});\n readonly busy = signal(false);\n readonly error = signal<string | null>(null);\n\n async ngOnInit(): Promise<void> {\n await this.run(() => this.load());\n }\n\n async add(channel: 'email' | 'sms' = 'email'): Promise<void> {\n const field = channel === 'sms' ? this.phone : this.address;\n const address = field().trim();\n if (!address) {\n return;\n }\n await this.run(async () => {\n const point = await firstValueFrom(this.api.addContactPoint(channel, address));\n field.set('');\n await this.load();\n await this.sendCode(point, false);\n });\n }\n\n async sendCode(point: ContactPoint, alone = true): Promise<void> {\n const send = async () => {\n const sent = await firstValueFrom(this.api.sendCode(point.id));\n this.sent.update((s) => ({ ...s, [point.id]: sent.expiresAt }));\n };\n await (alone ? this.run(send) : send());\n }\n\n setCode(id: string, code: string): void {\n this.codes.update((c) => ({ ...c, [id]: code }));\n }\n\n async verify(point: ContactPoint): Promise<void> {\n const code = (this.codes()[point.id] ?? '').trim();\n if (!code) {\n return;\n }\n await this.run(async () => {\n await firstValueFrom(this.api.verify(point.id, code));\n this.sent.update(({ [point.id]: _, ...rest }) => rest);\n this.codes.update(({ [point.id]: _, ...rest }) => rest);\n await this.load();\n });\n }\n\n async linkAccount(channel: string): Promise<void> {\n await this.run(async () => this.link.set(await firstValueFrom(this.api.linkCode(channel))));\n }\n\n /** Telegram's deep link, which opens the bot with the code (`/start`), when the bot's name is configured. */\n telegramLink(code: LinkCode): string | null {\n const bot = this.config.telegramBot;\n return code.channel === 'telegram' && bot ? `https://t.me/${encodeURIComponent(bot)}?start=${code.code.replace('-', '')}` : null;\n }\n\n /** After sending the code: the linked account shows up in the list. */\n async linked(): Promise<void> {\n await this.run(async () => {\n await this.load();\n this.link.set(null);\n });\n }\n\n async remove(point: ContactPoint): Promise<void> {\n await this.run(async () => {\n await firstValueFrom(this.api.removeContactPoint(point.id));\n await this.load();\n });\n }\n\n private async load(): Promise<void> {\n this.points.set(await firstValueFrom(this.api.contactPoints()));\n }\n\n private async run(work: () => Promise<void>): Promise<void> {\n this.busy.set(true);\n this.error.set(null);\n try {\n await work();\n } catch (error) {\n this.error.set(problemMessage(error));\n } finally {\n this.busy.set(false);\n }\n }\n}\n","<section class=\"juice-notification-settings\">\n <h2>{{ (phoneNumbers ? 'Email addresses and phone numbers' : 'Email addresses') | translate }}</h2>\n <p>{{ 'Notifications are sent only to addresses you have verified.' | translate }}</p>\n\n @if (error()) { <p class=\"error\" role=\"alert\">{{ error()! | translate }}</p> }\n\n <ul class=\"contact-points\" role=\"list\">\n @for (point of emails(); track point.id) {\n <li class=\"contact-point\">\n <span class=\"contact-point-address\">{{ point.address }}</span>\n @if (point.health === 'failed') {\n <span class=\"contact-point-state failed\">{{ 'Not delivering: verify it again' | translate }}</span>\n } @else if (point.verified) {\n <span class=\"contact-point-state verified\"><mat-icon inline>verified</mat-icon> {{ 'Verified' | translate }}</span>\n } @else {\n <span class=\"contact-point-state\">{{ 'Not verified' | translate }}</span>\n }\n @if (!point.verified || point.health === 'failed') {\n @if (sent()[point.id]; as expires) {\n <mat-form-field subscriptSizing=\"dynamic\" class=\"contact-point-code\">\n <mat-label>{{ 'Code' | translate }}</mat-label>\n <input matInput inputmode=\"numeric\" autocomplete=\"one-time-code\" maxlength=\"6\" [ngModel]=\"codes()[point.id] ?? ''\"\n (ngModelChange)=\"setCode(point.id, $event)\" (keyup.enter)=\"verify(point)\">\n <mat-hint>{{ 'Valid until' | translate }} {{ expires | date: 'shortTime' }}</mat-hint>\n </mat-form-field>\n <button mat-flat-button type=\"button\" (click)=\"verify(point)\" [disabled]=\"busy()\">{{ 'Verify' | translate }}</button>\n }\n <button mat-button type=\"button\" (click)=\"sendCode(point)\" [disabled]=\"busy()\">\n {{ (sent()[point.id] ? 'Send another code' : 'Send a code') | translate }}\n </button>\n }\n <button mat-icon-button type=\"button\" (click)=\"remove(point)\" [disabled]=\"busy()\" [attr.aria-label]=\"'Remove' | translate\"><mat-icon>delete</mat-icon></button>\n </li>\n } @empty {\n <li>{{ 'No addresses yet.' | translate }}</li>\n }\n </ul>\n\n <form class=\"contact-point-add\" (ngSubmit)=\"add()\">\n <mat-form-field>\n <mat-label>{{ 'Add an email address' | translate }}</mat-label>\n <input matInput type=\"email\" name=\"address\" autocomplete=\"email\" [ngModel]=\"address()\" (ngModelChange)=\"address.set($event)\" required>\n </mat-form-field>\n <button mat-flat-button type=\"submit\" [disabled]=\"busy() || !address().trim()\">{{ 'Add' | translate }}</button>\n </form>\n @if (phoneNumbers) {\n <form class=\"contact-point-add\" (ngSubmit)=\"add('sms')\">\n <mat-form-field>\n <mat-label>{{ 'Add a phone number for SMS' | translate }}</mat-label>\n <input matInput type=\"tel\" name=\"phone\" autocomplete=\"tel\" placeholder=\"+84 90 123 4567\" [ngModel]=\"phone()\" (ngModelChange)=\"phone.set($event)\" required>\n <mat-hint>{{ 'With the country code, starting with +' | translate }}</mat-hint>\n </mat-form-field>\n <button mat-flat-button type=\"submit\" [disabled]=\"busy() || !phone().trim()\">{{ 'Add' | translate }}</button>\n </form>\n }\n</section>\n\n@if (linkChannels.length > 0) {\n <section class=\"juice-notification-settings juice-chat-accounts\">\n <h2>{{ 'Chat accounts' | translate }}</h2>\n <p>{{ 'Link an account to get notifications there. You prove it is yours by sending a code to the bot from it.' | translate }}</p>\n <ul class=\"contact-points\" role=\"list\">\n @for (point of accounts(); track point.id) {\n <li class=\"contact-point\">\n <span class=\"contact-point-channel\">{{ point.channel }}</span>\n <span class=\"contact-point-address\">{{ point.address }}</span>\n @if (point.health === 'failed') {\n <span class=\"contact-point-state failed\">{{ 'Not delivering: link it again' | translate }}</span>\n } @else {\n <span class=\"contact-point-state verified\"><mat-icon inline>link</mat-icon> {{ 'Linked' | translate }}</span>\n }\n <button mat-icon-button type=\"button\" (click)=\"remove(point)\" [disabled]=\"busy()\" [attr.aria-label]=\"'Remove' | translate\"><mat-icon>delete</mat-icon></button>\n </li>\n } @empty {\n <li>{{ 'No chat accounts yet.' | translate }}</li>\n }\n </ul>\n @if (link(); as code) {\n <div class=\"link-code\" role=\"status\">\n <p>\n @if (code.channel === 'telegram') {\n {{ 'Send this to the bot in Telegram:' | translate }} <code>/start {{ code.code }}</code>\n } @else {\n {{ 'Send this code to the app in a direct message:' | translate }} <code>{{ code.code }}</code>\n }\n </p>\n @if (telegramLink(code); as url) {\n <a mat-stroked-button [href]=\"url\" target=\"_blank\" rel=\"noopener\">{{ 'Open Telegram' | translate }}</a>\n }\n <p class=\"hint\">{{ 'Valid until' | translate }} {{ code.expiresAt | date: 'shortTime' }}</p>\n <button mat-flat-button type=\"button\" (click)=\"linked()\" [disabled]=\"busy()\">{{ 'I sent it' | translate }}</button>\n </div>\n }\n <div class=\"link-actions\">\n @for (channel of linkChannels; track channel) {\n <button mat-button type=\"button\" (click)=\"linkAccount(channel)\" [disabled]=\"busy()\">{{ 'Link' | translate }} {{ channel }}</button>\n }\n </div>\n </section>\n}\n","import { JsonPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, OnInit, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { firstValueFrom } from 'rxjs';\nimport { TemplatePreview, TenantTemplate, TenantType } from '../../models';\nimport { NotificationsApi } from '../../notifications-api.service';\nimport { problemMessage } from '../problem';\n\n/**\n * The tenant's own templates (Juice.Notifications D22): pick a type and a channel, edit the text (Scriban), preview it with the type's sample\n * data or your own, save it over the application's template, or remove it to use the application's again. For the tenant's admins.\n */\n@Component({\n selector: 'juice-notification-templates',\n standalone: true,\n imports: [JsonPipe, FormsModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatSelectModule, TranslatePipe],\n templateUrl: './templates.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TemplatesComponent implements OnInit {\n private readonly api = inject(NotificationsApi);\n\n readonly types = signal<TenantType[]>([]);\n readonly type = signal<string | null>(null);\n readonly channel = signal<string | null>(null);\n readonly template = signal<TenantTemplate | null>(null);\n readonly body = signal('');\n readonly data = signal('');\n readonly preview = signal<TemplatePreview | null>(null);\n readonly busy = signal(false);\n readonly error = signal<string | null>(null);\n readonly saved = signal(false);\n\n /** The chosen type's channels with a template (the application's or the tenant's). */\n readonly channels = computed(() => this.types().find((t) => t.key === this.type())?.channels.filter((c) => c.declared || c.overridden) ?? []);\n\n async ngOnInit(): Promise<void> {\n await this.run(async () => this.types.set(await firstValueFrom(this.api.tenantTypes())));\n }\n\n async pickType(key: string): Promise<void> {\n this.type.set(key);\n const first = this.channels()[0]?.channel ?? null;\n await this.pickChannel(first);\n }\n\n async pickChannel(channel: string | null): Promise<void> {\n this.channel.set(channel);\n this.template.set(null);\n this.preview.set(null);\n this.data.set('');\n this.saved.set(false);\n const type = this.type();\n if (!type || !channel) {\n return;\n }\n await this.run(async () => {\n const template = await firstValueFrom(this.api.template(type, channel));\n this.template.set(template);\n this.body.set(template.tenant ?? template.application ?? '');\n await this.render();\n });\n }\n\n async previewNow(): Promise<void> {\n await this.run(() => this.render());\n }\n\n /** Saves the text as the tenant's template (refused with the reason when it doesn't parse, as a producer's would be). */\n async save(): Promise<void> {\n const type = this.type();\n const channel = this.channel();\n if (!type || !channel || !this.body().trim()) {\n return;\n }\n await this.run(async () => {\n this.template.set(await firstValueFrom(this.api.saveTemplate(type, channel, this.body())));\n this.saved.set(true);\n this.types.update((all) => all.map((t) => t.key !== type ? t\n : { ...t, channels: t.channels.map((c) => (c.channel === channel ? { ...c, overridden: true } : c)) }));\n });\n }\n\n /** Removes the tenant's template: the application's is used again. */\n async remove(): Promise<void> {\n const type = this.type();\n const channel = this.channel();\n if (!type || !channel || !this.template()?.tenant) {\n return;\n }\n await this.run(async () => {\n await firstValueFrom(this.api.removeTemplate(type, channel));\n this.types.update((all) => all.map((t) => t.key !== type ? t\n : { ...t, channels: t.channels.map((c) => (c.channel === channel ? { ...c, overridden: false } : c)) }));\n });\n await this.pickChannel(channel);\n }\n\n private async render(): Promise<void> {\n const type = this.type();\n const channel = this.channel();\n if (!type || !channel) {\n return;\n }\n let data: unknown = null;\n if (this.data().trim()) {\n try {\n data = JSON.parse(this.data());\n } catch {\n this.error.set('The data is not JSON.');\n return;\n }\n }\n const preview = await firstValueFrom(this.api.previewTemplate(type, channel, this.body(), data));\n this.preview.set(preview);\n if (!this.data().trim()) {\n this.data.set(JSON.stringify(preview.data, null, 2));\n }\n }\n\n private async run(work: () => Promise<void>): Promise<void> {\n this.busy.set(true);\n this.error.set(null);\n try {\n await work();\n } catch (error) {\n this.error.set(problemMessage(error));\n } finally {\n this.busy.set(false);\n }\n }\n}\n","<section class=\"juice-notification-settings juice-notification-templates\">\n <h2>{{ 'Notification templates' | translate }}</h2>\n <p>{{ \"Change what a notification says for your organization. Your template is used instead of the application's until you remove it.\" | translate }}</p>\n\n @if (error()) { <p class=\"error\" role=\"alert\">{{ error()! | translate }}</p> }\n\n <div class=\"template-pick\">\n <mat-form-field>\n <mat-label>{{ 'Type' | translate }}</mat-label>\n <mat-select [value]=\"type()\" (selectionChange)=\"pickType($event.value)\">\n @for (t of types(); track t.key) {\n <mat-option [value]=\"t.key\">{{ t.name }} ({{ t.key }} v{{ t.version }})</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ 'Channel' | translate }}</mat-label>\n <mat-select [value]=\"channel()\" (selectionChange)=\"pickChannel($event.value)\" [disabled]=\"!type()\">\n @for (c of channels(); track c.channel) {\n <mat-option [value]=\"c.channel\">{{ c.channel }}@if (c.overridden) { ({{ 'yours' | translate }}) }</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n @if (template(); as t) {\n <div class=\"template-edit\">\n <div class=\"template-source\">\n <mat-form-field class=\"template-body\">\n <mat-label>{{ (t.tenant ? \"Your template\" : \"The application's template (edit to make it yours)\") | translate }}</mat-label>\n <textarea matInput rows=\"14\" spellcheck=\"false\" [ngModel]=\"body()\" (ngModelChange)=\"body.set($event); saved.set(false)\"></textarea>\n <mat-hint>Scriban: <code ngNonBindable>{{ data.field }}</code>. {{ \"A first line Subject: (email) or Title: (inbox, chat, push) sets the heading.\" | translate }}</mat-hint>\n </mat-form-field>\n <mat-form-field class=\"template-data\">\n <mat-label>{{ 'Sample data (JSON)' | translate }}</mat-label>\n <textarea matInput rows=\"8\" spellcheck=\"false\" [ngModel]=\"data()\" (ngModelChange)=\"data.set($event)\"></textarea>\n </mat-form-field>\n <div class=\"template-actions\">\n <button mat-button type=\"button\" (click)=\"previewNow()\" [disabled]=\"busy()\">{{ 'Preview' | translate }}</button>\n <button mat-flat-button type=\"button\" (click)=\"save()\" [disabled]=\"busy() || !body().trim()\">{{ 'Save' | translate }}</button>\n @if (t.tenant) {\n <button mat-button type=\"button\" (click)=\"remove()\" [disabled]=\"busy()\">{{ \"Use the application's template\" | translate }}</button>\n }\n @if (saved()) { <span role=\"status\">{{ 'Saved' | translate }}</span> }\n </div>\n </div>\n <div class=\"template-preview\" aria-live=\"polite\">\n <h3>{{ 'Preview' | translate }}</h3>\n @if (preview(); as p) {\n @if (p.error) {\n <p class=\"error\">{{ p.error }}</p>\n } @else {\n <pre>{{ p.content | json }}</pre>\n }\n }\n </div>\n </div>\n }\n</section>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { InboxPanelComponent } from './components/inbox-panel/inbox-panel.component';\nimport { NotificationBellComponent } from './components/notification-bell/notification-bell.component';\nimport { NOTIFICATIONS_CONFIG, NotificationsConfig } from './notifications.config';\n\n/**\n * For NgModule apps: `NotificationsModule.forRoot({ apiUrl })` once, then `<juice-notification-bell>` in the toolbar. Standalone apps use\n * `provideNotifications` and import the components directly.\n */\n@NgModule({\n imports: [NotificationBellComponent, InboxPanelComponent],\n exports: [NotificationBellComponent, InboxPanelComponent],\n})\nexport class NotificationsModule {\n static forRoot(config: NotificationsConfig): ModuleWithProviders<NotificationsModule> {\n return { ngModule: NotificationsModule, providers: [{ provide: NOTIFICATIONS_CONFIG, useValue: config }] };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { ContactPointsComponent } from './pages/contact-points/contact-points.component';\nimport { PreferencesComponent } from './pages/preferences/preferences.component';\nimport { TemplatesComponent } from './pages/templates/templates.component';\n\n/**\n * The settings pages, for `loadChildren`: `preferences` and `contact-points` (the person's), `templates` (the tenant's admins). Guard the\n * route with the app's `AuthGuard`.\n */\nconst routes: Routes = [\n { path: 'preferences', component: PreferencesComponent, title: 'Notification preferences',\n data: { menuDisplay: true, menuIcon: 'tune', menuTitle: 'Notification preferences', menuOrder: 10 } },\n { path: 'contact-points', component: ContactPointsComponent, title: 'Email addresses',\n data: { menuDisplay: true, menuIcon: 'alternate_email', menuTitle: 'Email addresses', menuOrder: 11 } },\n // For the tenant's admins (the API refuses others): the tenant's own templates, with a preview.\n { path: 'templates', component: TemplatesComponent, title: 'Notification templates',\n data: { menuDisplay: false, menuIcon: 'edit_note', menuTitle: 'Notification templates', menuOrder: 20 } },\n { path: '', redirectTo: 'preferences', pathMatch: 'full' },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class NotificationsRoutingModule {\n}\n","/*\n * Public API Surface of notifications\n */\n\nexport * from './lib/models';\nexport * from './lib/notifications.config';\nexport * from './lib/notifications-api.service';\nexport * from './lib/inbox-hub';\nexport * from './lib/inbox.service';\nexport * from './lib/push';\nexport * from './lib/components/notification-bell/notification-bell.component';\nexport * from './lib/components/inbox-panel/inbox-panel.component';\nexport * from './lib/pages/preferences/preferences.component';\nexport * from './lib/pages/contact-points/contact-points.component';\nexport * from './lib/pages/templates/templates.component';\nexport * from './lib/notifications.module';\nexport * from './lib/notifications-routing.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i4","i3","i6","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AA+CH;AACM,SAAU,MAAM,CAAC,IAAe,EAAA;AACpC,IAAA,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,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0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACxC,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;ACxBD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@juice-js/notifications",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.1.0-alpha.1",
4
+ "description": "The person's notification inbox, preferences and contact points for Juice.Notifications: a bell, an inbox panel kept live over SignalR, and settings pages",
5
+ "author": "jack@creatorflow.io",
6
+ "license": "MIT",
7
+ "bugs": {
8
+ "url": "https://github.com/creatorflow-io/juice-layout/issues"
9
+ },
10
+ "homepage": "https://github.com/creatorflow-io/juice-layout#readme",
11
+ "publishConfig": {
12
+ "access": "public",
13
+ "provenance": true
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/creatorflow-io/juice-layout.git"
18
+ },
19
+ "peerDependencies": {
20
+ "@angular/common": "^22.0.0",
21
+ "@angular/core": "^22.0.0",
22
+ "@angular/forms": "^22.0.0",
23
+ "@angular/material": "^22.0.0",
24
+ "@angular/router": "^22.0.0",
25
+ "@microsoft/signalr": "^10.0.0",
26
+ "@ngx-translate/core": "^18.0.0",
27
+ "angular-oauth2-oidc": "^22.0.0"
28
+ },
29
+ "dependencies": {
30
+ "tslib": "^2.3.0"
31
+ },
32
+ "sideEffects": false,
33
+ "module": "fesm2022/juice-js-notifications.mjs",
34
+ "typings": "types/juice-js-notifications.d.ts",
35
+ "exports": {
36
+ "./package.json": {
37
+ "default": "./package.json"
38
+ },
39
+ ".": {
40
+ "types": "./types/juice-js-notifications.d.ts",
41
+ "default": "./fesm2022/juice-js-notifications.mjs"
42
+ }
43
+ },
44
+ "type": "module"
45
+ }