@su-labs/notifications 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,8 +48,8 @@ Inject the `SuNotificationService` into any component or service and call its `s
48
48
  ```ts
49
49
  // src/app/my-example.component.ts
50
50
  import { Component, inject } from '@angular/core';
51
- import { SuNotificationService } from '@su-labs/notifications';
52
51
  import { CommonModule } from '@angular/common';
52
+ import { SuNotificationService } from '@su-labs/notifications';
53
53
 
54
54
  @Component({
55
55
  selector: 'app-my-example',
@@ -3,7 +3,6 @@ import { signal, Injectable, inject, Component } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { DomSanitizer } from '@angular/platform-browser';
6
- import { describe, it, expect, vi } from 'vitest';
7
6
 
8
7
  /**
9
8
  * Service for managing notifications.
@@ -138,61 +137,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
138
137
  args: [{ selector: 'su-lib-notifications', standalone: true, imports: [CommonModule], template: "<div class=\"notification-container\" [ngClass]=\"[service.position]\">\n\t@for (notification of notifications(); track notification.id) {\n\t<div class=\"notification\" [ngClass]=\"[notification.type, notification.cssClass]\">\n\n\t\t<div class=\"icon-container\">\n\t\t\t@if (notification.icon) {\n\t\t\t\t@if (isImage(notification.icon!)) {\n\t\t\t\t\t<img [src]=\"notification.icon\" alt=\"icon\" />\n\t\t\t\t} @else if (typeof notification.icon === 'string') {\n\t\t\t\t\t<span [innerHTML]=\"getSanitizedIcon(notification.icon)\"></span>\n\t\t\t\t}\n\t\t\t<!-- if icon === true, render default SVG via switch -->\n\t\t\t\t@else {\n\t\t\t\t\t@switch (notification.type) {\n\t\t\t\t\t@case('success') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M20 6L9 17l-5-5\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('info') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"8\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('warning') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"17\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('error') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t<line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\" />\n\t\t\t\t\t\t\t<line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\n\t\t<span class=\"message\">{{ notification.message }}</span>\n\n\t\t<button class=\"close\" (click)=\"dismiss(notification.id)\" type=\"button\">\u00D7</button>\n\t</div>\n\t}\n</div>\n\n\n", styles: [".notification-container{position:fixed;pointer-events:none;display:flex;gap:var(--su-notification-container-gap, 1.2rem);width:var(--su-notification-width, max-content);max-width:var(--su-notification-max-width, min(100% - 2rem, 300px));z-index:999999}.notification-container.top-right{align-items:flex-end;flex-direction:column;top:var(--su-notification-container-position, 1rem);right:var(--su-notification-container-position, 1rem)}.notification-container.top-left{align-items:flex-start;flex-direction:column;top:var(--su-notification-container-position, 1rem);left:var(--su-notification-container-position, 1rem)}.notification-container.bottom-right{align-items:flex-end;flex-direction:column-reverse;bottom:var(--su-notification-container-position, 1rem);right:var(--su-notification-container-position, 1rem)}.notification-container.bottom-left{align-items:flex-start;flex-direction:column-reverse;bottom:var(--su-notification-container-position, 1rem);left:var(--su-notification-container-position, 1rem)}.notification-container.top-center{align-items:center;flex-direction:column;top:var(--su-notification-container-position, 1rem);left:50%;translate:-50% 0}.notification-container.bottom-center{align-items:center;flex-direction:column-reverse;bottom:var(--su-notification-container-position, 1rem);left:50%;translate:-50% 0}.notification{position:relative;pointer-events:auto;background-color:var(--su-notification-background-color, #fff);color:var(--su-notification-text-color, #333);padding-block:var(--su-notification-padding-block, 1rem);padding-inline:var(--su-notification-padding-inline, 1.25rem);box-shadow:0 4px 8px var(--su-notification-box-shadow, rgba(0, 0, 0, .15));display:flex;align-items:center;gap:1rem;transition:transform .2s ease,opacity .2s ease}.notification.success{border-left:4px solid var(--su-notification-success-border-color, #4caf50)}.notification.info{border-left:4px solid var(--su-notification-info-border-color, #2196f3)}.notification.warning{border-left:4px solid var(--su-notification-warning-border-color, #ff9800)}.notification.error{border-left:4px solid var(--su-notification-error-border-color, #f44336)}.notification.custom{border-left:4px solid var(--su-notification-custom-border-color, #9c27b0)}.notification .icon-container{display:flex;align-items:center;justify-content:center;width:var(--su-notification-icon-width, 24px);height:var(--su-notification-icon-height, var(--su-notification-icon-width, 24px));color:var(--su-notification-icon-color, currentColor)}.notification .icon-container .icon{width:100%;height:100%}.notification .message{flex:1}.notification .close{position:absolute;width:var(--su-notification-close-btn-size, 20px);height:var(--su-notification-close-btn-size, 20px);top:calc(var(--su-notification-close-btn-size, 20px) * -.5);right:calc(var(--su-notification-close-btn-size, 20px) * -.5);background:var(--su-notification-close-btn-background-color, var(--su-notification-background-color, #fff));color:var(--su-notification-close-btn-text-color, var(--su-notification-text-color, #333));border:1px solid var(--su-notification-close-btn-border-color, rgba(0, 0, 0, 0));border-radius:var(--su-notification-close-btn-border-radius, 50%);box-shadow:0 4px 8px var(--su-notification-box-shadow, rgba(0, 0, 0, .15));font-size:var(--su-notification-close-btn-font-size, 1rem);display:flex;justify-content:center;align-items:center;line-height:1;cursor:pointer}.notification .close:hover{background:var(--su-notification-close-btn-hover-background, rgba(51, 51, 51, .5));color:var(--su-notification-close-btn-hover-color, #fff)}\n"] }]
139
138
  }] });
140
139
 
141
- describe('SuNotificationService', () => {
142
- it('should add a notification when show() is called', () => {
143
- const service = new SuNotificationService();
144
- const options = {
145
- message: 'Hello World',
146
- type: 'success',
147
- duration: 2000,
148
- };
149
- const id = service.show(options);
150
- const notifications = service.notifications();
151
- expect(notifications.length).toBe(1);
152
- expect(notifications[0].id).toBe(id);
153
- expect(notifications[0].message).toBe('Hello World');
154
- expect(notifications[0].type).toBe('success');
155
- });
156
- it('should allow multiple notifications', () => {
157
- const service = new SuNotificationService();
158
- service.show({ message: 'First', type: 'info' });
159
- service.show({ message: 'Second', type: 'error' });
160
- const notifications = service.notifications();
161
- expect(notifications.length).toBe(2);
162
- expect(notifications.map((n) => n.message)).toEqual(['First', 'Second']);
163
- });
164
- it('should dismiss a notification by id', () => {
165
- const service = new SuNotificationService();
166
- const id = service.show({ message: 'To be removed', type: 'warning' });
167
- service.dismiss(id);
168
- const notifications = service.notifications();
169
- expect(notifications.find((n) => n.id === id)).toBeUndefined();
170
- });
171
- it('should clear all notifications', () => {
172
- const service = new SuNotificationService();
173
- service.show({ message: 'One', type: 'info' });
174
- service.show({ message: 'Two', type: 'error' });
175
- service.clearAll();
176
- expect(service.notifications().length).toBe(0);
177
- });
178
- it('should auto dismiss notification after duration', async () => {
179
- vi.useFakeTimers();
180
- const service = new SuNotificationService();
181
- const id = service.show({
182
- message: 'Auto close',
183
- type: 'info',
184
- duration: 1000,
185
- });
186
- // Initially present
187
- expect(service.notifications().find((n) => n.id === id)).toBeDefined();
188
- // Fast forward time
189
- vi.advanceTimersByTime(1000);
190
- // Should be removed
191
- expect(service.notifications().find((n) => n.id === id)).toBeUndefined();
192
- vi.useRealTimers();
193
- });
194
- });
195
-
196
140
  /*
197
141
  * Public API Surface of notifications
198
142
  */
@@ -1 +1 @@
1
- {"version":3,"file":"su-labs-notifications.mjs","sources":["../../../../projects/su-labs/notifications/src/lib/notification.service.ts","../../../../projects/su-labs/notifications/src/lib/notification.component.ts","../../../../projects/su-labs/notifications/src/lib/notification.component.html","../../../../projects/su-labs/notifications/src/lib/notification.service.spec.ts","../../../../projects/su-labs/notifications/src/public-api.ts","../../../../projects/su-labs/notifications/src/su-labs-notifications.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport {\n SuNotification,\n SuNotificationOptions,\n SuNotificationPosition,\n} from './notification.model';\n\n/**\n * Service for managing notifications.\n *\n * Provides methods to show, dismiss, and clear notifications.\n * Notifications are reactive signals, making them easy to bind in templates.\n */\n@Injectable({ providedIn: 'root' })\nexport class SuNotificationService {\n /**\n * Internal signal holding the list of notifications.\n */\n private _notifications = signal<SuNotification[]>([]);\n\n /**\n * Read-only access to the notifications list.\n * Can be used in templates for reactive updates.\n */\n notifications = this._notifications.asReadonly();\n\n /**\n * Default position where notifications will appear on the screen.\n * Can be configured via `configure` method.\n * @default 'top-right'\n */\n position: SuNotificationPosition = 'top-right';\n\n /**\n * Configure the notification service.\n * @param cfg Configuration object\n * @param cfg.position Optional position to display notifications.\n */\n configure(cfg: { position?: SuNotificationPosition }): void {\n if (cfg.position) this.position = cfg.position;\n }\n\n /**\n * Show a new notification.\n * @param options Options to configure the notification.\n * @returns The unique ID of the notification.\n */\n show(options: SuNotificationOptions): string {\n const id = crypto.randomUUID();\n const notification: SuNotification = {\n id,\n type: options.type,\n message: options.message,\n duration: options.duration ?? 3000,\n autoClose: options.autoClose ?? true,\n cssClass: options.cssClass,\n icon: options.icon ?? true,\n };\n\n this._notifications.update((list) => [...list, notification]);\n\n if (notification.autoClose) {\n setTimeout(() => this.dismiss(id), notification.duration);\n }\n\n return id;\n }\n\n /**\n * Dismiss a specific notification by its ID.\n * @param id ID of the notification to remove.\n */\n dismiss(id: string): void {\n this._notifications.update((list) => list.filter((n) => n.id !== id));\n }\n\n /**\n * Clear all notifications immediately.\n */\n clearAll(): void {\n this._notifications.set([]);\n }\n}\n","import { Component, inject } from '@angular/core';\nimport { SuNotificationService } from './notification.service';\nimport { CommonModule } from '@angular/common';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Component to display notifications on the screen.\n *\n * Uses `SuNotificationService` to manage and render notifications.\n */\n@Component({\n selector: 'su-lib-notifications',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n})\nexport class SuNotificationComponent {\n /** Injected notification service */\n service = inject(SuNotificationService);\n\n /** Read-only signal of the current notifications */\n notifications = this.service.notifications;\n\n /** Angular sanitizer to safely render inline SVG strings */\n private sanitizer = inject(DomSanitizer);\n\n /**\n * Dismiss a notification by its ID.\n * Delegates to the service.\n * @param id ID of the notification to dismiss\n */\n dismiss(id: string): void {\n this.service.dismiss(id);\n }\n\n /**\n * Checks if the provided `icon` value should be rendered as an image (`<img>`).\n *\n * Determines whether the `icon` is a string pointing to an image file:\n * - Local or relative paths (starting with `/`)\n * - URLs (starting with `http`)\n * - File paths ending with `.png`, `.jpg`, or `.svg`\n *\n * Inline SVG strings (e.g., `<svg>...</svg>`) are **not** treated as images and\n * should be rendered with `[innerHTML]`.\n *\n * @param icon The icon value from the notification (boolean or string)\n * @returns `true` if the icon is an image path or URL, `false` for inline SVGs or `false`\n */\n isImage(icon: string | boolean): boolean {\n return (\n typeof icon === 'string' &&\n (icon.endsWith('.png') ||\n icon.endsWith('.jpg') ||\n icon.endsWith('.svg') ||\n icon.startsWith('http') ||\n icon.startsWith('/'))\n );\n }\n\n /**\n * Sanitizes an inline SVG string so it can be safely rendered with [innerHTML].\n *\n * @param icon Inline SVG string\n * @returns SafeHtml object that can be bound to [innerHTML]\n */\n getSanitizedIcon(icon: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(icon);\n }\n}\n","<div class=\"notification-container\" [ngClass]=\"[service.position]\">\n\t@for (notification of notifications(); track notification.id) {\n\t<div class=\"notification\" [ngClass]=\"[notification.type, notification.cssClass]\">\n\n\t\t<div class=\"icon-container\">\n\t\t\t@if (notification.icon) {\n\t\t\t\t@if (isImage(notification.icon!)) {\n\t\t\t\t\t<img [src]=\"notification.icon\" alt=\"icon\" />\n\t\t\t\t} @else if (typeof notification.icon === 'string') {\n\t\t\t\t\t<span [innerHTML]=\"getSanitizedIcon(notification.icon)\"></span>\n\t\t\t\t}\n\t\t\t<!-- if icon === true, render default SVG via switch -->\n\t\t\t\t@else {\n\t\t\t\t\t@switch (notification.type) {\n\t\t\t\t\t@case('success') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M20 6L9 17l-5-5\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('info') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"8\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('warning') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"17\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('error') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t<line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\" />\n\t\t\t\t\t\t\t<line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\n\t\t<span class=\"message\">{{ notification.message }}</span>\n\n\t\t<button class=\"close\" (click)=\"dismiss(notification.id)\" type=\"button\">×</button>\n\t</div>\n\t}\n</div>\n\n\n","import { describe, it, expect, vi } from 'vitest';\nimport { SuNotificationService } from './notification.service';\nimport { SuNotificationOptions } from './notification.model';\n\ndescribe('SuNotificationService', () => {\n it('should add a notification when show() is called', () => {\n const service = new SuNotificationService();\n const options: SuNotificationOptions = {\n message: 'Hello World',\n type: 'success',\n duration: 2000,\n };\n\n const id = service.show(options);\n const notifications = service.notifications();\n\n expect(notifications.length).toBe(1);\n expect(notifications[0].id).toBe(id);\n expect(notifications[0].message).toBe('Hello World');\n expect(notifications[0].type).toBe('success');\n });\n\n it('should allow multiple notifications', () => {\n const service = new SuNotificationService();\n service.show({ message: 'First', type: 'info' });\n service.show({ message: 'Second', type: 'error' });\n\n const notifications = service.notifications();\n expect(notifications.length).toBe(2);\n expect(notifications.map((n) => n.message)).toEqual(['First', 'Second']);\n });\n\n it('should dismiss a notification by id', () => {\n const service = new SuNotificationService();\n const id = service.show({ message: 'To be removed', type: 'warning' });\n\n service.dismiss(id);\n\n const notifications = service.notifications();\n expect(notifications.find((n) => n.id === id)).toBeUndefined();\n });\n\n it('should clear all notifications', () => {\n const service = new SuNotificationService();\n service.show({ message: 'One', type: 'info' });\n service.show({ message: 'Two', type: 'error' });\n\n service.clearAll();\n\n expect(service.notifications().length).toBe(0);\n });\n\n it('should auto dismiss notification after duration', async () => {\n vi.useFakeTimers();\n const service = new SuNotificationService();\n const id = service.show({\n message: 'Auto close',\n type: 'info',\n duration: 1000,\n });\n\n // Initially present\n expect(service.notifications().find((n) => n.id === id)).toBeDefined();\n\n // Fast forward time\n vi.advanceTimersByTime(1000);\n\n // Should be removed\n expect(service.notifications().find((n) => n.id === id)).toBeUndefined();\n vi.useRealTimers();\n });\n});\n","/*\n * Public API Surface of notifications\n */\n\nexport * from './lib/notification.component';\nexport * from './lib/notification.service';\nexport * from './lib/notification.service.spec';\nexport * from './lib/notification.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAOA;;;;;AAKG;MAEU,qBAAqB,CAAA;AAChC;;AAEG;AACK,IAAA,cAAc,GAAG,MAAM,CAAmB,EAAE,0DAAC;AAErD;;;AAGG;AACH,IAAA,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;AAEhD;;;;AAIG;IACH,QAAQ,GAA2B,WAAW;AAE9C;;;;AAIG;AACH,IAAA,SAAS,CAAC,GAA0C,EAAA;QAClD,IAAI,GAAG,CAAC,QAAQ;AAAE,YAAA,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAGhD;;;;AAIG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;AACjC,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE;AAC9B,QAAA,MAAM,YAAY,GAAmB;YACnC,EAAE;YACF,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;AACxB,YAAA,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;AAClC,YAAA,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI;YACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC1B,YAAA,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;SAC3B;AAED,QAAA,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,YAAY,CAAC,CAAC;AAE7D,QAAA,IAAI,YAAY,CAAC,SAAS,EAAE;AAC1B,YAAA,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC;;AAG3D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AAC;;QAG5B,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE;QACxE,EAAE,CAAC,aAAa,EAAE;AACpB,KAAC,CAAC;AACJ,CAAC,CAAC;;ACvEF;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"su-labs-notifications.mjs","sources":["../../../../projects/su-labs/notifications/src/lib/notification.service.ts","../../../../projects/su-labs/notifications/src/lib/notification.component.ts","../../../../projects/su-labs/notifications/src/lib/notification.component.html","../../../../projects/su-labs/notifications/src/public-api.ts","../../../../projects/su-labs/notifications/src/su-labs-notifications.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport {\n SuNotification,\n SuNotificationOptions,\n SuNotificationPosition,\n} from './notification.model';\n\n/**\n * Service for managing notifications.\n *\n * Provides methods to show, dismiss, and clear notifications.\n * Notifications are reactive signals, making them easy to bind in templates.\n */\n@Injectable({ providedIn: 'root' })\nexport class SuNotificationService {\n /**\n * Internal signal holding the list of notifications.\n */\n private _notifications = signal<SuNotification[]>([]);\n\n /**\n * Read-only access to the notifications list.\n * Can be used in templates for reactive updates.\n */\n notifications = this._notifications.asReadonly();\n\n /**\n * Default position where notifications will appear on the screen.\n * Can be configured via `configure` method.\n * @default 'top-right'\n */\n position: SuNotificationPosition = 'top-right';\n\n /**\n * Configure the notification service.\n * @param cfg Configuration object\n * @param cfg.position Optional position to display notifications.\n */\n configure(cfg: { position?: SuNotificationPosition }): void {\n if (cfg.position) this.position = cfg.position;\n }\n\n /**\n * Show a new notification.\n * @param options Options to configure the notification.\n * @returns The unique ID of the notification.\n */\n show(options: SuNotificationOptions): string {\n const id = crypto.randomUUID();\n const notification: SuNotification = {\n id,\n type: options.type,\n message: options.message,\n duration: options.duration ?? 3000,\n autoClose: options.autoClose ?? true,\n cssClass: options.cssClass,\n icon: options.icon ?? true,\n };\n\n this._notifications.update((list) => [...list, notification]);\n\n if (notification.autoClose) {\n setTimeout(() => this.dismiss(id), notification.duration);\n }\n\n return id;\n }\n\n /**\n * Dismiss a specific notification by its ID.\n * @param id ID of the notification to remove.\n */\n dismiss(id: string): void {\n this._notifications.update((list) => list.filter((n) => n.id !== id));\n }\n\n /**\n * Clear all notifications immediately.\n */\n clearAll(): void {\n this._notifications.set([]);\n }\n}\n","import { Component, inject } from '@angular/core';\nimport { SuNotificationService } from './notification.service';\nimport { CommonModule } from '@angular/common';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Component to display notifications on the screen.\n *\n * Uses `SuNotificationService` to manage and render notifications.\n */\n@Component({\n selector: 'su-lib-notifications',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n})\nexport class SuNotificationComponent {\n /** Injected notification service */\n service = inject(SuNotificationService);\n\n /** Read-only signal of the current notifications */\n notifications = this.service.notifications;\n\n /** Angular sanitizer to safely render inline SVG strings */\n private sanitizer = inject(DomSanitizer);\n\n /**\n * Dismiss a notification by its ID.\n * Delegates to the service.\n * @param id ID of the notification to dismiss\n */\n dismiss(id: string): void {\n this.service.dismiss(id);\n }\n\n /**\n * Checks if the provided `icon` value should be rendered as an image (`<img>`).\n *\n * Determines whether the `icon` is a string pointing to an image file:\n * - Local or relative paths (starting with `/`)\n * - URLs (starting with `http`)\n * - File paths ending with `.png`, `.jpg`, or `.svg`\n *\n * Inline SVG strings (e.g., `<svg>...</svg>`) are **not** treated as images and\n * should be rendered with `[innerHTML]`.\n *\n * @param icon The icon value from the notification (boolean or string)\n * @returns `true` if the icon is an image path or URL, `false` for inline SVGs or `false`\n */\n isImage(icon: string | boolean): boolean {\n return (\n typeof icon === 'string' &&\n (icon.endsWith('.png') ||\n icon.endsWith('.jpg') ||\n icon.endsWith('.svg') ||\n icon.startsWith('http') ||\n icon.startsWith('/'))\n );\n }\n\n /**\n * Sanitizes an inline SVG string so it can be safely rendered with [innerHTML].\n *\n * @param icon Inline SVG string\n * @returns SafeHtml object that can be bound to [innerHTML]\n */\n getSanitizedIcon(icon: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(icon);\n }\n}\n","<div class=\"notification-container\" [ngClass]=\"[service.position]\">\n\t@for (notification of notifications(); track notification.id) {\n\t<div class=\"notification\" [ngClass]=\"[notification.type, notification.cssClass]\">\n\n\t\t<div class=\"icon-container\">\n\t\t\t@if (notification.icon) {\n\t\t\t\t@if (isImage(notification.icon!)) {\n\t\t\t\t\t<img [src]=\"notification.icon\" alt=\"icon\" />\n\t\t\t\t} @else if (typeof notification.icon === 'string') {\n\t\t\t\t\t<span [innerHTML]=\"getSanitizedIcon(notification.icon)\"></span>\n\t\t\t\t}\n\t\t\t<!-- if icon === true, render default SVG via switch -->\n\t\t\t\t@else {\n\t\t\t\t\t@switch (notification.type) {\n\t\t\t\t\t@case('success') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M20 6L9 17l-5-5\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('info') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"8\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('warning') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\" />\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"17\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t}\n\t\t\t\t\t@case('error') {\n\t\t\t\t\t\t<svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t<line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\" />\n\t\t\t\t\t\t\t<line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\n\t\t<span class=\"message\">{{ notification.message }}</span>\n\n\t\t<button class=\"close\" (click)=\"dismiss(notification.id)\" type=\"button\">×</button>\n\t</div>\n\t}\n</div>\n\n\n","/*\n * Public API Surface of notifications\n */\n\nexport * from './lib/notification.component';\nexport * from './lib/notification.service';\nexport * from './lib/notification.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAOA;;;;;AAKG;MAEU,qBAAqB,CAAA;AAChC;;AAEG;AACK,IAAA,cAAc,GAAG,MAAM,CAAmB,EAAE,0DA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,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjBpC,ilFAyDA,EAAA,MAAA,EAAA,CAAA,ohHAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED5CY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,UAAA,EACpB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,ilFAAA,EAAA,MAAA,EAAA,CAAA,ohHAAA,CAAA,EAAA;;;AEbzB;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@su-labs/notifications",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
+ "keywords": [
5
+ "angular",
6
+ "notifications",
7
+ "toast",
8
+ "reactive",
9
+ "signals",
10
+ "alerts",
11
+ "ui",
12
+ "ux",
13
+ "messages",
14
+ "popup",
15
+ "service",
16
+ "customizable",
17
+ "snack-bar",
18
+ "library"
19
+ ],
20
+ "homepage": "https://github.com/Greezaaa/settings-utils-lib/tree/main/projects/su-labs/font-size#readme",
21
+ "author": {
22
+ "name": "Yevheniy Alekseyev",
23
+ "email": "yev.alekseyev@gmail.com",
24
+ "url": "https://github.com/Greezaaa"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/Greezaaa/settings-utils-lib.git",
29
+ "directory": "projects/su-labs/font-size"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/Greezaaa/settings-utils-lib/issues"
33
+ },
4
34
  "peerDependencies": {
5
35
  "@angular/common": "^20.1.0",
6
36
  "@angular/core": "^20.1.0"
@@ -9,6 +39,7 @@
9
39
  "tslib": "^2.3.0"
10
40
  },
11
41
  "sideEffects": false,
42
+ "license": "MIT",
12
43
  "module": "fesm2022/su-labs-notifications.mjs",
13
44
  "typings": "index.d.ts",
14
45
  "exports": {