ngx-com 0.0.19 → 0.0.21
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/fesm2022/ngx-com-components-alert.mjs +346 -0
- package/fesm2022/ngx-com-components-alert.mjs.map +1 -0
- package/fesm2022/ngx-com-components-button.mjs +1 -1
- package/fesm2022/ngx-com-components-button.mjs.map +1 -1
- package/fesm2022/ngx-com-components-calendar.mjs +29 -36
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-card.mjs +1 -1
- package/fesm2022/ngx-com-components-card.mjs.map +1 -1
- package/fesm2022/ngx-com-components-carousel.mjs +708 -0
- package/fesm2022/ngx-com-components-carousel.mjs.map +1 -0
- package/fesm2022/ngx-com-components-checkbox.mjs +17 -8
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-com-components-code-block.mjs +158 -0
- package/fesm2022/ngx-com-components-code-block.mjs.map +1 -0
- package/fesm2022/ngx-com-components-collapsible.mjs +1 -1
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -1
- package/fesm2022/ngx-com-components-confirm.mjs +3 -3
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dialog.mjs +703 -0
- package/fesm2022/ngx-com-components-dialog.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown.mjs +36 -31
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +48 -8
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +1 -1
- package/fesm2022/ngx-com-components-item.mjs.map +1 -1
- package/fesm2022/ngx-com-components-paginator.mjs +3 -3
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -1
- package/fesm2022/ngx-com-components-radio.mjs +16 -9
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -1
- package/fesm2022/ngx-com-components-separator.mjs +102 -0
- package/fesm2022/ngx-com-components-separator.mjs.map +1 -0
- package/fesm2022/ngx-com-components-switch.mjs +258 -0
- package/fesm2022/ngx-com-components-switch.mjs.map +1 -0
- package/fesm2022/ngx-com-components-table.mjs +631 -0
- package/fesm2022/ngx-com-components-table.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tabs.mjs +2 -2
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-com-components-toast.mjs +783 -0
- package/fesm2022/ngx-com-components-toast.mjs.map +1 -0
- package/package.json +33 -1
- package/types/ngx-com-components-alert.d.ts +166 -0
- package/types/ngx-com-components-carousel.d.ts +281 -0
- package/types/ngx-com-components-checkbox.d.ts +7 -2
- package/types/ngx-com-components-code-block.d.ts +66 -0
- package/types/ngx-com-components-confirm.d.ts +2 -2
- package/types/ngx-com-components-dialog.d.ts +264 -0
- package/types/ngx-com-components-dropdown.d.ts +8 -5
- package/types/ngx-com-components-form-field.d.ts +19 -3
- package/types/ngx-com-components-radio.d.ts +5 -3
- package/types/ngx-com-components-separator.d.ts +75 -0
- package/types/ngx-com-components-switch.d.ts +110 -0
- package/types/ngx-com-components-table.d.ts +377 -0
- package/types/ngx-com-components-toast.d.ts +217 -0
|
@@ -0,0 +1,783 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, computed, ChangeDetectionStrategy, Component, InjectionToken, inject, Injector, DestroyRef, PLATFORM_ID, signal, Injectable } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
5
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { ComIcon } from 'ngx-com/components/icon';
|
|
8
|
+
import { cva } from 'class-variance-authority';
|
|
9
|
+
import { mergeClasses } from 'ngx-com/utils';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Reference to an active toast notification.
|
|
13
|
+
* Returned by `ComToastService` methods for programmatic control.
|
|
14
|
+
*/
|
|
15
|
+
class ComToastRef {
|
|
16
|
+
dismissSubject = new Subject();
|
|
17
|
+
actionSubject = new Subject();
|
|
18
|
+
dismissFn;
|
|
19
|
+
dismissed = false;
|
|
20
|
+
constructor(dismissFn) {
|
|
21
|
+
this.dismissFn = dismissFn;
|
|
22
|
+
}
|
|
23
|
+
/** Programmatically dismiss the toast. */
|
|
24
|
+
dismiss() {
|
|
25
|
+
if (!this.dismissed) {
|
|
26
|
+
this.dismissFn();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Emits once when the toast is dismissed (for any reason). */
|
|
30
|
+
afterDismissed() {
|
|
31
|
+
return this.dismissSubject.asObservable();
|
|
32
|
+
}
|
|
33
|
+
/** Emits when the action button is clicked. */
|
|
34
|
+
afterAction() {
|
|
35
|
+
return this.actionSubject.asObservable();
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
_notifyDismissed(event) {
|
|
39
|
+
if (this.dismissed)
|
|
40
|
+
return;
|
|
41
|
+
this.dismissed = true;
|
|
42
|
+
this.dismissSubject.next(event);
|
|
43
|
+
this.dismissSubject.complete();
|
|
44
|
+
this.actionSubject.complete();
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
_notifyAction() {
|
|
48
|
+
this.actionSubject.next();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* CVA variants for an individual toast card.
|
|
54
|
+
*
|
|
55
|
+
* @tokens `--color-success`, `--color-success-foreground`,
|
|
56
|
+
* `--color-warn`, `--color-warn-foreground`,
|
|
57
|
+
* `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
58
|
+
* `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
59
|
+
* `--color-border`, `--shadow-lg`, `--radius-card`
|
|
60
|
+
*/
|
|
61
|
+
const toastVariants = cva([
|
|
62
|
+
'flex',
|
|
63
|
+
'w-full',
|
|
64
|
+
'max-w-sm',
|
|
65
|
+
'items-start',
|
|
66
|
+
'gap-3',
|
|
67
|
+
'rounded-card',
|
|
68
|
+
'border',
|
|
69
|
+
'p-4',
|
|
70
|
+
'shadow-lg',
|
|
71
|
+
'pointer-events-auto',
|
|
72
|
+
'relative',
|
|
73
|
+
'overflow-hidden',
|
|
74
|
+
], {
|
|
75
|
+
variants: {
|
|
76
|
+
type: {
|
|
77
|
+
success: 'bg-success text-success-foreground border-success',
|
|
78
|
+
warn: 'bg-warn-subtle text-warn-subtle-foreground border-warn',
|
|
79
|
+
error: 'bg-warn text-warn-foreground border-warn',
|
|
80
|
+
info: 'bg-primary-subtle text-primary-subtle-foreground border-primary',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
defaultVariants: {
|
|
84
|
+
type: 'info',
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* CVA variants for the toast container positioning.
|
|
89
|
+
*/
|
|
90
|
+
const toastContainerVariants = cva([
|
|
91
|
+
'flex',
|
|
92
|
+
'gap-3',
|
|
93
|
+
'pointer-events-none',
|
|
94
|
+
'max-h-screen',
|
|
95
|
+
'p-4',
|
|
96
|
+
], {
|
|
97
|
+
variants: {
|
|
98
|
+
position: {
|
|
99
|
+
'top-right': 'flex-col items-end',
|
|
100
|
+
'top-left': 'flex-col items-start',
|
|
101
|
+
'top-center': 'flex-col items-center',
|
|
102
|
+
'bottom-right': 'flex-col-reverse items-end',
|
|
103
|
+
'bottom-left': 'flex-col-reverse items-start',
|
|
104
|
+
'bottom-center': 'flex-col-reverse items-center',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
defaultVariants: {
|
|
108
|
+
position: 'bottom-right',
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
/**
|
|
112
|
+
* CVA variants for the toast progress bar.
|
|
113
|
+
*/
|
|
114
|
+
const toastProgressVariants = cva([
|
|
115
|
+
'absolute',
|
|
116
|
+
'bottom-0',
|
|
117
|
+
'left-0',
|
|
118
|
+
'h-0.5',
|
|
119
|
+
'rounded-full',
|
|
120
|
+
], {
|
|
121
|
+
variants: {
|
|
122
|
+
type: {
|
|
123
|
+
success: 'bg-success-foreground/30',
|
|
124
|
+
warn: 'bg-warn-subtle-foreground/30',
|
|
125
|
+
error: 'bg-warn-foreground/30',
|
|
126
|
+
info: 'bg-primary-subtle-foreground/30',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
defaultVariants: {
|
|
130
|
+
type: 'info',
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* CVA variants for the toast close button.
|
|
135
|
+
*
|
|
136
|
+
* @tokens `--color-ring`, `--radius-card`
|
|
137
|
+
*/
|
|
138
|
+
const toastCloseButtonVariants = cva([
|
|
139
|
+
'shrink-0',
|
|
140
|
+
'rounded-card',
|
|
141
|
+
'p-0.5',
|
|
142
|
+
'transition-colors',
|
|
143
|
+
'outline-none',
|
|
144
|
+
'focus-visible:outline-2',
|
|
145
|
+
'focus-visible:outline-offset-2',
|
|
146
|
+
'focus-visible:outline-[--color-ring]',
|
|
147
|
+
], {
|
|
148
|
+
variants: {
|
|
149
|
+
type: {
|
|
150
|
+
success: 'text-success-foreground/70 hover:text-success-foreground',
|
|
151
|
+
warn: 'text-warn-subtle-foreground/70 hover:text-warn-subtle-foreground',
|
|
152
|
+
error: 'text-warn-foreground/70 hover:text-warn-foreground',
|
|
153
|
+
info: 'text-primary-subtle-foreground/70 hover:text-primary-subtle-foreground',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
defaultVariants: {
|
|
157
|
+
type: 'info',
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
let toastIdCounter = 0;
|
|
162
|
+
/**
|
|
163
|
+
* Generate a unique ID for a toast notification.
|
|
164
|
+
*/
|
|
165
|
+
function generateToastId() {
|
|
166
|
+
return ++toastIdCounter;
|
|
167
|
+
}
|
|
168
|
+
/** Default Lucide icon names per toast type. */
|
|
169
|
+
const DEFAULT_TOAST_ICONS = {
|
|
170
|
+
success: 'circle-check',
|
|
171
|
+
warn: 'triangle-alert',
|
|
172
|
+
error: 'circle-x',
|
|
173
|
+
info: 'info',
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Internal toast notification component rendered inside the container.
|
|
178
|
+
*
|
|
179
|
+
* @internal Not exported in public API
|
|
180
|
+
*
|
|
181
|
+
* @tokens `--color-success`, `--color-success-foreground`,
|
|
182
|
+
* `--color-warn`, `--color-warn-foreground`,
|
|
183
|
+
* `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
184
|
+
* `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
185
|
+
* `--color-border`, `--shadow-lg`, `--radius-card`, `--color-ring`
|
|
186
|
+
*/
|
|
187
|
+
class ComToastComponent {
|
|
188
|
+
/** The toast state, set by the container. */
|
|
189
|
+
state = input.required(...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
190
|
+
/** Emitted when the toast should be dismissed. */
|
|
191
|
+
onDismiss = output();
|
|
192
|
+
/** Emitted when the action button is clicked. */
|
|
193
|
+
onAction = output();
|
|
194
|
+
/** Emitted when the mouse enters the toast. */
|
|
195
|
+
mouseEnter = output();
|
|
196
|
+
/** Emitted when the mouse leaves the toast. */
|
|
197
|
+
mouseLeave = output();
|
|
198
|
+
/** Emitted when the exit animation completes. */
|
|
199
|
+
animationDone = output();
|
|
200
|
+
/** Resolved icon name. */
|
|
201
|
+
resolvedIcon = computed(() => this.state().data.icon ?? DEFAULT_TOAST_ICONS[this.state().type] ?? 'info', ...(ngDevMode ? [{ debugName: "resolvedIcon" }] : []));
|
|
202
|
+
/** ARIA role based on toast type. */
|
|
203
|
+
ariaRole = computed(() => this.state().type === 'error' ? 'alert' : 'status', ...(ngDevMode ? [{ debugName: "ariaRole" }] : []));
|
|
204
|
+
/** ARIA live region politeness. */
|
|
205
|
+
ariaLive = computed(() => this.state().type === 'error' ? 'assertive' : 'polite', ...(ngDevMode ? [{ debugName: "ariaLive" }] : []));
|
|
206
|
+
/** Computed toast card classes. */
|
|
207
|
+
toastClasses = computed(() => mergeClasses(toastVariants({ type: this.state().type }), this.state().visible
|
|
208
|
+
? 'animate-in fade-in-0 slide-in-from-bottom-2'
|
|
209
|
+
: 'animate-out fade-out-0 slide-out-to-right-full'), ...(ngDevMode ? [{ debugName: "toastClasses" }] : []));
|
|
210
|
+
/** Computed progress bar classes. */
|
|
211
|
+
progressClasses = computed(() => mergeClasses(toastProgressVariants({ type: this.state().type })), ...(ngDevMode ? [{ debugName: "progressClasses" }] : []));
|
|
212
|
+
/** Computed close button classes. */
|
|
213
|
+
closeButtonClasses = computed(() => mergeClasses(toastCloseButtonVariants({ type: this.state().type })), ...(ngDevMode ? [{ debugName: "closeButtonClasses" }] : []));
|
|
214
|
+
/** Template context for custom templates. */
|
|
215
|
+
templateContext = computed(() => ({
|
|
216
|
+
$implicit: this.state().data,
|
|
217
|
+
dismiss: () => this.onDismiss.emit(this.state().id),
|
|
218
|
+
action: () => this.onAction.emit(this.state().id),
|
|
219
|
+
}), ...(ngDevMode ? [{ debugName: "templateContext" }] : []));
|
|
220
|
+
onAnimationEnd() {
|
|
221
|
+
if (!this.state().visible) {
|
|
222
|
+
this.animationDone.emit(this.state().id);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ComToastComponent, isStandalone: true, selector: "com-toast", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onDismiss: "onDismiss", onAction: "onAction", mouseEnter: "mouseEnter", mouseLeave: "mouseLeave", animationDone: "animationDone" }, ngImport: i0, template: `
|
|
227
|
+
<div
|
|
228
|
+
[class]="toastClasses()"
|
|
229
|
+
[attr.role]="ariaRole()"
|
|
230
|
+
[attr.aria-live]="ariaLive()"
|
|
231
|
+
[attr.data-state]="state().visible ? 'open' : 'closed'"
|
|
232
|
+
(animationend)="onAnimationEnd()"
|
|
233
|
+
>
|
|
234
|
+
@if (state().data.customTemplate) {
|
|
235
|
+
<ng-container
|
|
236
|
+
[ngTemplateOutlet]="state().data.customTemplate!"
|
|
237
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
238
|
+
/>
|
|
239
|
+
} @else {
|
|
240
|
+
<com-icon
|
|
241
|
+
[name]="resolvedIcon()"
|
|
242
|
+
size="md"
|
|
243
|
+
class="mt-0.5 shrink-0"
|
|
244
|
+
aria-hidden="true"
|
|
245
|
+
/>
|
|
246
|
+
<div class="flex-1 min-w-0">
|
|
247
|
+
@if (state().data.title) {
|
|
248
|
+
<p class="text-sm font-semibold">{{ state().data.title }}</p>
|
|
249
|
+
}
|
|
250
|
+
<p class="text-sm" [class.mt-1]="state().data.title">
|
|
251
|
+
{{ state().data.message }}
|
|
252
|
+
</p>
|
|
253
|
+
@if (state().data.action) {
|
|
254
|
+
<button
|
|
255
|
+
type="button"
|
|
256
|
+
class="mt-2 text-sm font-medium underline underline-offset-4
|
|
257
|
+
outline-none
|
|
258
|
+
focus-visible:outline-2
|
|
259
|
+
focus-visible:outline-offset-2
|
|
260
|
+
focus-visible:outline-[--color-ring]"
|
|
261
|
+
(click)="onAction.emit(state().id)"
|
|
262
|
+
>
|
|
263
|
+
{{ state().data.action!.label }}
|
|
264
|
+
</button>
|
|
265
|
+
}
|
|
266
|
+
</div>
|
|
267
|
+
@if (state().showClose) {
|
|
268
|
+
<button
|
|
269
|
+
type="button"
|
|
270
|
+
[class]="closeButtonClasses()"
|
|
271
|
+
aria-label="Dismiss notification"
|
|
272
|
+
(click)="onDismiss.emit(state().id)"
|
|
273
|
+
>
|
|
274
|
+
<com-icon name="x" size="sm" aria-hidden="true" />
|
|
275
|
+
</button>
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
@if (state().showProgress && state().duration > 0) {
|
|
279
|
+
<div
|
|
280
|
+
[class]="progressClasses()"
|
|
281
|
+
[style.width.%]="state().remainingPercent"
|
|
282
|
+
></div>
|
|
283
|
+
}
|
|
284
|
+
</div>
|
|
285
|
+
`, isInline: true, styles: [":host{display:contents}[data-state=open]{--tw-enter-opacity: 0;--tw-enter-translate-x: 0;--tw-enter-translate-y: 0}[data-state=closed]{--tw-exit-opacity: 0;--tw-exit-translate-x: 0;--tw-exit-translate-y: 0}@media(prefers-reduced-motion:reduce){[data-state=open],[data-state=closed]{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ComIcon, selector: "com-icon", inputs: ["name", "img", "color", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
286
|
+
}
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastComponent, decorators: [{
|
|
288
|
+
type: Component,
|
|
289
|
+
args: [{ selector: 'com-toast', template: `
|
|
290
|
+
<div
|
|
291
|
+
[class]="toastClasses()"
|
|
292
|
+
[attr.role]="ariaRole()"
|
|
293
|
+
[attr.aria-live]="ariaLive()"
|
|
294
|
+
[attr.data-state]="state().visible ? 'open' : 'closed'"
|
|
295
|
+
(animationend)="onAnimationEnd()"
|
|
296
|
+
>
|
|
297
|
+
@if (state().data.customTemplate) {
|
|
298
|
+
<ng-container
|
|
299
|
+
[ngTemplateOutlet]="state().data.customTemplate!"
|
|
300
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
301
|
+
/>
|
|
302
|
+
} @else {
|
|
303
|
+
<com-icon
|
|
304
|
+
[name]="resolvedIcon()"
|
|
305
|
+
size="md"
|
|
306
|
+
class="mt-0.5 shrink-0"
|
|
307
|
+
aria-hidden="true"
|
|
308
|
+
/>
|
|
309
|
+
<div class="flex-1 min-w-0">
|
|
310
|
+
@if (state().data.title) {
|
|
311
|
+
<p class="text-sm font-semibold">{{ state().data.title }}</p>
|
|
312
|
+
}
|
|
313
|
+
<p class="text-sm" [class.mt-1]="state().data.title">
|
|
314
|
+
{{ state().data.message }}
|
|
315
|
+
</p>
|
|
316
|
+
@if (state().data.action) {
|
|
317
|
+
<button
|
|
318
|
+
type="button"
|
|
319
|
+
class="mt-2 text-sm font-medium underline underline-offset-4
|
|
320
|
+
outline-none
|
|
321
|
+
focus-visible:outline-2
|
|
322
|
+
focus-visible:outline-offset-2
|
|
323
|
+
focus-visible:outline-[--color-ring]"
|
|
324
|
+
(click)="onAction.emit(state().id)"
|
|
325
|
+
>
|
|
326
|
+
{{ state().data.action!.label }}
|
|
327
|
+
</button>
|
|
328
|
+
}
|
|
329
|
+
</div>
|
|
330
|
+
@if (state().showClose) {
|
|
331
|
+
<button
|
|
332
|
+
type="button"
|
|
333
|
+
[class]="closeButtonClasses()"
|
|
334
|
+
aria-label="Dismiss notification"
|
|
335
|
+
(click)="onDismiss.emit(state().id)"
|
|
336
|
+
>
|
|
337
|
+
<com-icon name="x" size="sm" aria-hidden="true" />
|
|
338
|
+
</button>
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
@if (state().showProgress && state().duration > 0) {
|
|
342
|
+
<div
|
|
343
|
+
[class]="progressClasses()"
|
|
344
|
+
[style.width.%]="state().remainingPercent"
|
|
345
|
+
></div>
|
|
346
|
+
}
|
|
347
|
+
</div>
|
|
348
|
+
`, imports: [NgTemplateOutlet, ComIcon], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}[data-state=open]{--tw-enter-opacity: 0;--tw-enter-translate-x: 0;--tw-enter-translate-y: 0}[data-state=closed]{--tw-exit-opacity: 0;--tw-exit-translate-x: 0;--tw-exit-translate-y: 0}@media(prefers-reduced-motion:reduce){[data-state=open],[data-state=closed]{animation:none}}\n"] }]
|
|
349
|
+
}], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], onDismiss: [{ type: i0.Output, args: ["onDismiss"] }], onAction: [{ type: i0.Output, args: ["onAction"] }], mouseEnter: [{ type: i0.Output, args: ["mouseEnter"] }], mouseLeave: [{ type: i0.Output, args: ["mouseLeave"] }], animationDone: [{ type: i0.Output, args: ["animationDone"] }] } });
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Injection token for global toast configuration.
|
|
353
|
+
*/
|
|
354
|
+
const COM_TOAST_CONFIG = new InjectionToken('COM_TOAST_CONFIG');
|
|
355
|
+
/**
|
|
356
|
+
* Injection token for internal container communication.
|
|
357
|
+
* @internal
|
|
358
|
+
*/
|
|
359
|
+
const COM_TOAST_CONTAINER_DATA = new InjectionToken('COM_TOAST_CONTAINER_DATA');
|
|
360
|
+
/**
|
|
361
|
+
* Provides global toast configuration.
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* bootstrapApplication(AppComponent, {
|
|
366
|
+
* providers: [
|
|
367
|
+
* provideComToastConfig({ position: 'top-center', duration: 3000 }),
|
|
368
|
+
* ],
|
|
369
|
+
* });
|
|
370
|
+
* ```
|
|
371
|
+
*/
|
|
372
|
+
function provideComToastConfig(config) {
|
|
373
|
+
return { provide: COM_TOAST_CONFIG, useValue: config };
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Internal toast container component that manages positioning and stacking.
|
|
378
|
+
*
|
|
379
|
+
* @internal Not exported in public API
|
|
380
|
+
*
|
|
381
|
+
* @tokens `--color-success`, `--color-success-foreground`,
|
|
382
|
+
* `--color-warn`, `--color-warn-foreground`,
|
|
383
|
+
* `--color-warn-subtle`, `--color-warn-subtle-foreground`,
|
|
384
|
+
* `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
385
|
+
* `--color-border`, `--shadow-lg`, `--radius-card`
|
|
386
|
+
*/
|
|
387
|
+
class ComToastContainerComponent {
|
|
388
|
+
containerData = inject(COM_TOAST_CONTAINER_DATA);
|
|
389
|
+
/** Active toast states, read from the service's signal. */
|
|
390
|
+
toasts = computed(() => this.containerData.toasts(), ...(ngDevMode ? [{ debugName: "toasts" }] : []));
|
|
391
|
+
/** Computed container positioning classes. */
|
|
392
|
+
containerClasses = computed(() => mergeClasses(toastContainerVariants({ position: this.containerData.position() })), ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
393
|
+
onEscapeKey() {
|
|
394
|
+
this.containerData.onDismissLatest();
|
|
395
|
+
}
|
|
396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
397
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ComToastContainerComponent, isStandalone: true, selector: "com-toast-container", host: { attributes: { "tabindex": "-1" }, listeners: { "keydown.escape": "onEscapeKey()" } }, ngImport: i0, template: `
|
|
398
|
+
<div
|
|
399
|
+
[class]="containerClasses()"
|
|
400
|
+
role="region"
|
|
401
|
+
aria-label="Notifications"
|
|
402
|
+
>
|
|
403
|
+
@for (toast of toasts(); track toast.id) {
|
|
404
|
+
<com-toast
|
|
405
|
+
[state]="toast"
|
|
406
|
+
(onDismiss)="containerData.onDismiss($event)"
|
|
407
|
+
(onAction)="containerData.onAction($event)"
|
|
408
|
+
(mouseEnter)="containerData.onMouseEnter(toast.id)"
|
|
409
|
+
(mouseLeave)="containerData.onMouseLeave(toast.id)"
|
|
410
|
+
(animationDone)="containerData.onAnimationDone($event)"
|
|
411
|
+
/>
|
|
412
|
+
}
|
|
413
|
+
</div>
|
|
414
|
+
`, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: ComToastComponent, selector: "com-toast", inputs: ["state"], outputs: ["onDismiss", "onAction", "mouseEnter", "mouseLeave", "animationDone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
415
|
+
}
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastContainerComponent, decorators: [{
|
|
417
|
+
type: Component,
|
|
418
|
+
args: [{ selector: 'com-toast-container', host: {
|
|
419
|
+
'(keydown.escape)': 'onEscapeKey()',
|
|
420
|
+
tabindex: '-1',
|
|
421
|
+
}, template: `
|
|
422
|
+
<div
|
|
423
|
+
[class]="containerClasses()"
|
|
424
|
+
role="region"
|
|
425
|
+
aria-label="Notifications"
|
|
426
|
+
>
|
|
427
|
+
@for (toast of toasts(); track toast.id) {
|
|
428
|
+
<com-toast
|
|
429
|
+
[state]="toast"
|
|
430
|
+
(onDismiss)="containerData.onDismiss($event)"
|
|
431
|
+
(onAction)="containerData.onAction($event)"
|
|
432
|
+
(mouseEnter)="containerData.onMouseEnter(toast.id)"
|
|
433
|
+
(mouseLeave)="containerData.onMouseLeave(toast.id)"
|
|
434
|
+
(animationDone)="containerData.onAnimationDone($event)"
|
|
435
|
+
/>
|
|
436
|
+
}
|
|
437
|
+
</div>
|
|
438
|
+
`, imports: [ComToastComponent], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
|
|
439
|
+
}] });
|
|
440
|
+
|
|
441
|
+
/** Default durations by toast type. */
|
|
442
|
+
const DEFAULT_DURATION = {
|
|
443
|
+
success: 5000,
|
|
444
|
+
warn: 5000,
|
|
445
|
+
error: 0,
|
|
446
|
+
info: 5000,
|
|
447
|
+
};
|
|
448
|
+
/** Fallback timeout for exit animation removal when animationend doesn't fire. */
|
|
449
|
+
const ANIMATION_FALLBACK_MS = 200;
|
|
450
|
+
/**
|
|
451
|
+
* Service for creating toast notifications imperatively.
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* ```typescript
|
|
455
|
+
* const toast = inject(ComToastService);
|
|
456
|
+
* toast.success('File uploaded successfully.');
|
|
457
|
+
* toast.error('Failed to save.', 'Error');
|
|
458
|
+
*
|
|
459
|
+
* const ref = toast.show({ type: 'info', message: 'Item deleted.', action: { label: 'Undo' } });
|
|
460
|
+
* ref.afterAction().subscribe(() => undoDelete());
|
|
461
|
+
* ```
|
|
462
|
+
*/
|
|
463
|
+
class ComToastService {
|
|
464
|
+
overlay = inject(Overlay);
|
|
465
|
+
injector = inject(Injector);
|
|
466
|
+
destroyRef = inject(DestroyRef);
|
|
467
|
+
platformId = inject(PLATFORM_ID);
|
|
468
|
+
document = inject(DOCUMENT);
|
|
469
|
+
globalConfig = inject(COM_TOAST_CONFIG, { optional: true });
|
|
470
|
+
overlayRef = null;
|
|
471
|
+
toasts = signal([], ...(ngDevMode ? [{ debugName: "toasts" }] : []));
|
|
472
|
+
position;
|
|
473
|
+
timers = new Map();
|
|
474
|
+
refs = new Map();
|
|
475
|
+
animationFallbacks = new Map();
|
|
476
|
+
dismissReasons = new Map();
|
|
477
|
+
rafHandle = null;
|
|
478
|
+
config;
|
|
479
|
+
constructor() {
|
|
480
|
+
this.config = {
|
|
481
|
+
position: 'bottom-right',
|
|
482
|
+
duration: 5000,
|
|
483
|
+
maxVisible: 5,
|
|
484
|
+
pauseOnHover: true,
|
|
485
|
+
showProgress: true,
|
|
486
|
+
showClose: true,
|
|
487
|
+
...this.globalConfig,
|
|
488
|
+
};
|
|
489
|
+
this.position = signal(this.config.position, ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
490
|
+
this.destroyRef.onDestroy(() => this.dispose());
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Show a toast notification with full configuration.
|
|
494
|
+
*/
|
|
495
|
+
show(data) {
|
|
496
|
+
this.ensureContainer();
|
|
497
|
+
const id = generateToastId();
|
|
498
|
+
const type = data.type ?? 'info';
|
|
499
|
+
const duration = data.duration ?? DEFAULT_DURATION[type] ?? this.config.duration;
|
|
500
|
+
const showProgress = data.showProgress ?? this.config.showProgress;
|
|
501
|
+
const showClose = data.showClose ?? this.config.showClose;
|
|
502
|
+
const ref = new ComToastRef(() => this.dismiss(id, 'manual'));
|
|
503
|
+
this.refs.set(id, ref);
|
|
504
|
+
const state = {
|
|
505
|
+
id,
|
|
506
|
+
data,
|
|
507
|
+
type,
|
|
508
|
+
duration,
|
|
509
|
+
showProgress,
|
|
510
|
+
showClose,
|
|
511
|
+
visible: true,
|
|
512
|
+
remainingPercent: 100,
|
|
513
|
+
};
|
|
514
|
+
this.toasts.update((list) => [...list, state]);
|
|
515
|
+
this.enforceMaxVisible();
|
|
516
|
+
if (duration > 0) {
|
|
517
|
+
this.startTimer(id, duration);
|
|
518
|
+
}
|
|
519
|
+
return ref;
|
|
520
|
+
}
|
|
521
|
+
/** Show a success toast. */
|
|
522
|
+
success(message, title) {
|
|
523
|
+
return this.showByType('success', message, title);
|
|
524
|
+
}
|
|
525
|
+
/** Show a warning toast. */
|
|
526
|
+
warn(message, title) {
|
|
527
|
+
return this.showByType('warn', message, title);
|
|
528
|
+
}
|
|
529
|
+
/** Show an error toast. */
|
|
530
|
+
error(message, title) {
|
|
531
|
+
return this.showByType('error', message, title);
|
|
532
|
+
}
|
|
533
|
+
/** Show an info toast. */
|
|
534
|
+
info(message, title) {
|
|
535
|
+
return this.showByType('info', message, title);
|
|
536
|
+
}
|
|
537
|
+
/** Dismiss all active toasts. */
|
|
538
|
+
dismissAll() {
|
|
539
|
+
for (const toast of this.toasts()) {
|
|
540
|
+
this.dismiss(toast.id, 'manual');
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
// ─── Private ───
|
|
544
|
+
showByType(type, message, title) {
|
|
545
|
+
const data = { type, message };
|
|
546
|
+
if (title !== undefined)
|
|
547
|
+
data.title = title;
|
|
548
|
+
return this.show(data);
|
|
549
|
+
}
|
|
550
|
+
ensureContainer() {
|
|
551
|
+
if (this.overlayRef || !isPlatformBrowser(this.platformId))
|
|
552
|
+
return;
|
|
553
|
+
const positionStrategy = this.buildPositionStrategy(this.config.position);
|
|
554
|
+
const containerData = {
|
|
555
|
+
toasts: this.toasts.asReadonly(),
|
|
556
|
+
position: this.position.asReadonly(),
|
|
557
|
+
onMouseEnter: (id) => this.pauseTimer(id),
|
|
558
|
+
onMouseLeave: (id) => this.resumeTimer(id),
|
|
559
|
+
onDismiss: (id) => this.dismiss(id, 'manual'),
|
|
560
|
+
onAction: (id) => this.handleAction(id),
|
|
561
|
+
onDismissLatest: () => this.dismissLatest(),
|
|
562
|
+
onAnimationDone: (id) => this.removeToast(id),
|
|
563
|
+
};
|
|
564
|
+
const containerInjector = Injector.create({
|
|
565
|
+
providers: [{ provide: COM_TOAST_CONTAINER_DATA, useValue: containerData }],
|
|
566
|
+
parent: this.injector,
|
|
567
|
+
});
|
|
568
|
+
this.overlayRef = this.overlay.create({
|
|
569
|
+
positionStrategy,
|
|
570
|
+
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
571
|
+
hasBackdrop: false,
|
|
572
|
+
panelClass: 'com-toast-overlay',
|
|
573
|
+
disposeOnNavigation: false,
|
|
574
|
+
});
|
|
575
|
+
const portal = new ComponentPortal(ComToastContainerComponent, null, containerInjector);
|
|
576
|
+
this.overlayRef.attach(portal);
|
|
577
|
+
}
|
|
578
|
+
buildPositionStrategy(position) {
|
|
579
|
+
const strategy = this.overlay.position().global();
|
|
580
|
+
switch (position) {
|
|
581
|
+
case 'top-right':
|
|
582
|
+
return strategy.top('0').right('0');
|
|
583
|
+
case 'top-left':
|
|
584
|
+
return strategy.top('0').left('0');
|
|
585
|
+
case 'top-center':
|
|
586
|
+
return strategy.top('0').centerHorizontally();
|
|
587
|
+
case 'bottom-right':
|
|
588
|
+
return strategy.bottom('0').right('0');
|
|
589
|
+
case 'bottom-left':
|
|
590
|
+
return strategy.bottom('0').left('0');
|
|
591
|
+
case 'bottom-center':
|
|
592
|
+
return strategy.bottom('0').centerHorizontally();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
dismiss(id, reason) {
|
|
596
|
+
this.clearTimer(id);
|
|
597
|
+
this.dismissReasons.set(id, reason);
|
|
598
|
+
// Trigger exit animation
|
|
599
|
+
this.updateToast(id, { visible: false });
|
|
600
|
+
// Set fallback timeout in case animationend doesn't fire
|
|
601
|
+
const fallback = setTimeout(() => this.removeToast(id), ANIMATION_FALLBACK_MS);
|
|
602
|
+
this.animationFallbacks.set(id, fallback);
|
|
603
|
+
}
|
|
604
|
+
removeToast(id) {
|
|
605
|
+
// Clear animation fallback
|
|
606
|
+
const fallback = this.animationFallbacks.get(id);
|
|
607
|
+
if (fallback) {
|
|
608
|
+
clearTimeout(fallback);
|
|
609
|
+
this.animationFallbacks.delete(id);
|
|
610
|
+
}
|
|
611
|
+
// Check if toast still exists (may have been removed already)
|
|
612
|
+
if (!this.toasts().some((t) => t.id === id))
|
|
613
|
+
return;
|
|
614
|
+
this.toasts.update((list) => list.filter((t) => t.id !== id));
|
|
615
|
+
const reason = this.dismissReasons.get(id) ?? 'auto';
|
|
616
|
+
this.dismissReasons.delete(id);
|
|
617
|
+
const ref = this.refs.get(id);
|
|
618
|
+
if (ref) {
|
|
619
|
+
ref._notifyDismissed({ reason });
|
|
620
|
+
this.refs.delete(id);
|
|
621
|
+
}
|
|
622
|
+
if (this.toasts().length === 0) {
|
|
623
|
+
this.disposeOverlay();
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
handleAction(id) {
|
|
627
|
+
const ref = this.refs.get(id);
|
|
628
|
+
if (ref) {
|
|
629
|
+
ref._notifyAction();
|
|
630
|
+
}
|
|
631
|
+
this.dismiss(id, 'action');
|
|
632
|
+
}
|
|
633
|
+
dismissLatest() {
|
|
634
|
+
const visible = this.toasts().filter((t) => t.visible);
|
|
635
|
+
const latest = visible[visible.length - 1];
|
|
636
|
+
if (latest) {
|
|
637
|
+
this.dismiss(latest.id, 'manual');
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
enforceMaxVisible() {
|
|
641
|
+
const currentToasts = this.toasts();
|
|
642
|
+
const visibleCount = currentToasts.filter((t) => t.visible).length;
|
|
643
|
+
if (visibleCount > this.config.maxVisible) {
|
|
644
|
+
const oldest = currentToasts.find((t) => t.visible);
|
|
645
|
+
if (oldest) {
|
|
646
|
+
this.dismiss(oldest.id, 'limit');
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
// ─── Timer (rAF) ───
|
|
651
|
+
startTimer(id, duration) {
|
|
652
|
+
const now = this.now();
|
|
653
|
+
this.timers.set(id, {
|
|
654
|
+
startTime: now,
|
|
655
|
+
elapsed: 0,
|
|
656
|
+
duration,
|
|
657
|
+
paused: false,
|
|
658
|
+
pausedAt: 0,
|
|
659
|
+
});
|
|
660
|
+
this.ensureRafLoop();
|
|
661
|
+
}
|
|
662
|
+
ensureRafLoop() {
|
|
663
|
+
if (this.rafHandle !== null)
|
|
664
|
+
return;
|
|
665
|
+
const win = this.document.defaultView;
|
|
666
|
+
if (!win)
|
|
667
|
+
return;
|
|
668
|
+
const tick = () => {
|
|
669
|
+
const now = this.now();
|
|
670
|
+
let needsUpdate = false;
|
|
671
|
+
for (const [id, timer] of this.timers) {
|
|
672
|
+
if (timer.paused)
|
|
673
|
+
continue;
|
|
674
|
+
const elapsed = timer.elapsed + (now - timer.startTime);
|
|
675
|
+
const remaining = Math.max(0, 100 - (elapsed / timer.duration) * 100);
|
|
676
|
+
const rounded = Math.round(remaining);
|
|
677
|
+
// Find current state to compare
|
|
678
|
+
const toast = this.toasts().find((t) => t.id === id);
|
|
679
|
+
if (!toast || !toast.visible) {
|
|
680
|
+
this.clearTimer(id);
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
if (Math.round(toast.remainingPercent) !== rounded) {
|
|
684
|
+
needsUpdate = true;
|
|
685
|
+
}
|
|
686
|
+
if (remaining <= 0) {
|
|
687
|
+
this.clearTimer(id);
|
|
688
|
+
this.dismiss(id, 'auto');
|
|
689
|
+
needsUpdate = true;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
// Batch-update all progress values in a single signal write
|
|
693
|
+
if (needsUpdate) {
|
|
694
|
+
const now2 = this.now();
|
|
695
|
+
this.toasts.update((list) => list.map((t) => {
|
|
696
|
+
const timer = this.timers.get(t.id);
|
|
697
|
+
if (!timer || timer.paused)
|
|
698
|
+
return t;
|
|
699
|
+
const elapsed = timer.elapsed + (now2 - timer.startTime);
|
|
700
|
+
const remaining = Math.max(0, 100 - (elapsed / timer.duration) * 100);
|
|
701
|
+
return { ...t, remainingPercent: remaining };
|
|
702
|
+
}));
|
|
703
|
+
}
|
|
704
|
+
// Continue loop if there are active timers
|
|
705
|
+
if (this.timers.size > 0) {
|
|
706
|
+
this.rafHandle = win.requestAnimationFrame(tick);
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
this.rafHandle = null;
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
this.rafHandle = win.requestAnimationFrame(tick);
|
|
713
|
+
}
|
|
714
|
+
pauseTimer(id) {
|
|
715
|
+
if (!this.config.pauseOnHover)
|
|
716
|
+
return;
|
|
717
|
+
const timer = this.timers.get(id);
|
|
718
|
+
if (!timer || timer.paused)
|
|
719
|
+
return;
|
|
720
|
+
const now = this.now();
|
|
721
|
+
timer.elapsed += now - timer.startTime;
|
|
722
|
+
timer.paused = true;
|
|
723
|
+
timer.pausedAt = now;
|
|
724
|
+
}
|
|
725
|
+
resumeTimer(id) {
|
|
726
|
+
if (!this.config.pauseOnHover)
|
|
727
|
+
return;
|
|
728
|
+
const timer = this.timers.get(id);
|
|
729
|
+
if (!timer || !timer.paused)
|
|
730
|
+
return;
|
|
731
|
+
timer.paused = false;
|
|
732
|
+
timer.startTime = this.now();
|
|
733
|
+
}
|
|
734
|
+
clearTimer(id) {
|
|
735
|
+
this.timers.delete(id);
|
|
736
|
+
}
|
|
737
|
+
now() {
|
|
738
|
+
return this.document.defaultView?.performance.now() ?? Date.now();
|
|
739
|
+
}
|
|
740
|
+
// ─── Helpers ───
|
|
741
|
+
updateToast(id, patch) {
|
|
742
|
+
this.toasts.update((list) => list.map((t) => (t.id === id ? { ...t, ...patch } : t)));
|
|
743
|
+
}
|
|
744
|
+
disposeOverlay() {
|
|
745
|
+
if (this.overlayRef) {
|
|
746
|
+
this.overlayRef.dispose();
|
|
747
|
+
this.overlayRef = null;
|
|
748
|
+
}
|
|
749
|
+
const win = this.document.defaultView;
|
|
750
|
+
if (this.rafHandle !== null && win) {
|
|
751
|
+
win.cancelAnimationFrame(this.rafHandle);
|
|
752
|
+
this.rafHandle = null;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
dispose() {
|
|
756
|
+
for (const id of this.timers.keys()) {
|
|
757
|
+
this.clearTimer(id);
|
|
758
|
+
}
|
|
759
|
+
for (const [, fallback] of this.animationFallbacks) {
|
|
760
|
+
clearTimeout(fallback);
|
|
761
|
+
}
|
|
762
|
+
this.animationFallbacks.clear();
|
|
763
|
+
this.dismissReasons.clear();
|
|
764
|
+
this.refs.clear();
|
|
765
|
+
this.disposeOverlay();
|
|
766
|
+
}
|
|
767
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
768
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastService, providedIn: 'root' });
|
|
769
|
+
}
|
|
770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComToastService, decorators: [{
|
|
771
|
+
type: Injectable,
|
|
772
|
+
args: [{ providedIn: 'root' }]
|
|
773
|
+
}], ctorParameters: () => [] });
|
|
774
|
+
|
|
775
|
+
// Public API for the toast notification system
|
|
776
|
+
// Service
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Generated bundle index. Do not edit.
|
|
780
|
+
*/
|
|
781
|
+
|
|
782
|
+
export { COM_TOAST_CONFIG, ComToastRef, ComToastService, provideComToastConfig, toastCloseButtonVariants, toastContainerVariants, toastProgressVariants, toastVariants };
|
|
783
|
+
//# sourceMappingURL=ngx-com-components-toast.mjs.map
|