ngx-view-builder 0.1.3 → 0.1.4

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.
Files changed (22) hide show
  1. package/fesm2022/{ngx-view-builder-avatar-element-B8Nh4G0m.mjs → ngx-view-builder-avatar-element-C0EXsHCI.mjs} +2 -2
  2. package/fesm2022/{ngx-view-builder-avatar-element-B8Nh4G0m.mjs.map → ngx-view-builder-avatar-element-C0EXsHCI.mjs.map} +1 -1
  3. package/fesm2022/{ngx-view-builder-breadcrumbs-element-DZmo2VAq.mjs → ngx-view-builder-breadcrumbs-element-BihMIpWr.mjs} +2 -2
  4. package/fesm2022/{ngx-view-builder-breadcrumbs-element-BaJoW3s7.mjs.map → ngx-view-builder-breadcrumbs-element-BihMIpWr.mjs.map} +1 -1
  5. package/fesm2022/{ngx-view-builder-icon-element-Bu2EWVKX.mjs → ngx-view-builder-icon-element-CSKRNSAU.mjs} +2 -2
  6. package/fesm2022/{ngx-view-builder-icon-element-Bu2EWVKX.mjs.map → ngx-view-builder-icon-element-CSKRNSAU.mjs.map} +1 -1
  7. package/fesm2022/{ngx-view-builder-ngx-view-builder-_VdHLdIW.mjs → ngx-view-builder-ngx-view-builder-CYvIsFw-.mjs} +6 -6
  8. package/fesm2022/{ngx-view-builder-ngx-view-builder-_VdHLdIW.mjs.map → ngx-view-builder-ngx-view-builder-CYvIsFw-.mjs.map} +1 -1
  9. package/fesm2022/{ngx-view-builder-toast-element-B1DxJdDY.mjs → ngx-view-builder-toast-element-CclIxegL.mjs} +2 -2
  10. package/fesm2022/{ngx-view-builder-toast-element-DQ8mU1zc.mjs.map → ngx-view-builder-toast-element-CclIxegL.mjs.map} +1 -1
  11. package/fesm2022/ngx-view-builder.mjs +1 -1
  12. package/package.json +3 -1
  13. package/fesm2022/ngx-view-builder-avatar-element-B_Cx5xnx.mjs +0 -77
  14. package/fesm2022/ngx-view-builder-avatar-element-B_Cx5xnx.mjs.map +0 -1
  15. package/fesm2022/ngx-view-builder-breadcrumbs-element-BaJoW3s7.mjs +0 -249
  16. package/fesm2022/ngx-view-builder-breadcrumbs-element-DZmo2VAq.mjs.map +0 -1
  17. package/fesm2022/ngx-view-builder-icon-element-DFW1jVp8.mjs +0 -63
  18. package/fesm2022/ngx-view-builder-icon-element-DFW1jVp8.mjs.map +0 -1
  19. package/fesm2022/ngx-view-builder-ngx-view-builder-C9rZ5zQM.mjs +0 -90260
  20. package/fesm2022/ngx-view-builder-ngx-view-builder-C9rZ5zQM.mjs.map +0 -1
  21. package/fesm2022/ngx-view-builder-toast-element-B1DxJdDY.mjs.map +0 -1
  22. package/fesm2022/ngx-view-builder-toast-element-DQ8mU1zc.mjs +0 -188
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-view-builder-toast-element-B1DxJdDY.mjs","sources":["../../../projects/ngx-view-builder/src/lib/core/shared/elements/toast-element/toast-element.ts","../../../projects/ngx-view-builder/src/lib/core/shared/elements/toast-element/toast-element.html"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport {\r\n Component,\r\n computed,\r\n inject,\r\n input,\r\n OnDestroy,\r\n OnInit,\r\n signal,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\n\r\nimport { ElementWrapper } from '../../components/element-wrapper/element-wrapper';\r\n\r\nimport { StateService } from '../../services/state.service';\r\n\r\nimport { ToastModel } from '../../models/elements/toast.model';\r\n\r\nimport { DynamicTextPipe } from '../../pipes/dynamic-text.pipe';\r\n\r\nimport { ElementActionService } from '../../services/element-action.service';\r\n\r\nimport { NvbIcon } from '../../components/nvb-icon/nvb-icon';\r\nimport { UiTranslationService } from '../../services/ui-translation.service';\r\n\r\n@Component({\r\n selector: 'toast-element',\r\n\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n\r\n imports: [ElementWrapper, NgClass, DynamicTextPipe, NvbIcon],\r\n\r\n templateUrl: './toast-element.html',\r\n\r\n styleUrl: './toast-element.scss',\r\n})\r\nexport class ToastElement implements OnInit, OnDestroy {\r\n model = input.required<ToastModel>();\r\n\r\n visible = signal<boolean>(true);\r\n\r\n private elementActionService = inject(ElementActionService);\r\n private uiTranslationService = inject(UiTranslationService);\r\n\r\n private hideTimeoutId: ReturnType<typeof setTimeout> | null = null;\r\n private autoHideStartedAt = 0;\r\n private autoHideDelayMs = 0;\r\n private autoHideRemainingMs = 0;\r\n\r\n isEditor = computed(() => StateService.isEditor());\r\n\r\n shellClass = computed(() => {\r\n const position = this.resolvePosition();\r\n\r\n return {\r\n [`nvb-toast-shell--${position}`]: true,\r\n\r\n 'nvb-toast-shell--editor': this.isEditor(),\r\n };\r\n });\r\n\r\n variantClass = computed(() => `nvb-toast--${this.resolveVariant()}`);\r\n\r\n iconName = computed(() => {\r\n const configured = String(this.model()?.icon ?? '').trim();\r\n\r\n if (configured) {\r\n return configured;\r\n }\r\n\r\n switch (this.resolveVariant()) {\r\n case 'success':\r\n return 'check_circle';\r\n\r\n case 'warning':\r\n return 'warning';\r\n\r\n case 'error':\r\n return 'error';\r\n\r\n default:\r\n return 'info';\r\n }\r\n });\r\n\r\n showActionButton = computed(() => String(this.model()?.actionText ?? '').trim().length > 0);\r\n\r\n ngOnInit(): void {\r\n this.visible.set(Boolean(this.model()?.initiallyVisible ?? true));\r\n\r\n if (this.isEditor()) {\r\n this.visible.set(true);\r\n\r\n return;\r\n }\r\n\r\n this.scheduleAutoHide();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.clearAutoHide();\r\n }\r\n\r\n onToastClick(event: MouseEvent): void {\r\n event.stopPropagation();\r\n\r\n void this.runActions('click');\r\n }\r\n\r\n onActionClick(event: MouseEvent): void {\r\n event.preventDefault();\r\n\r\n event.stopPropagation();\r\n\r\n void this.runActions('action');\r\n }\r\n\r\n onDismissClick(event: MouseEvent): void {\r\n event.preventDefault();\r\n\r\n event.stopPropagation();\r\n\r\n this.visible.set(false);\r\n\r\n this.clearAutoHide();\r\n\r\n void this.runActions('dismiss');\r\n }\r\n\r\n pauseAutoHide(): void {\r\n if (this.isEditor() || this.hideTimeoutId === null) {\r\n return;\r\n }\r\n\r\n const elapsedMs = Date.now() - this.autoHideStartedAt;\r\n this.autoHideRemainingMs = Math.max(1000, this.autoHideDelayMs - elapsedMs);\r\n this.clearAutoHide();\r\n }\r\n\r\n resumeAutoHide(): void {\r\n if (this.isEditor() || !this.visible() || !this.model().autoHide || this.hideTimeoutId !== null) {\r\n return;\r\n }\r\n\r\n this.scheduleAutoHide(this.autoHideRemainingMs || this.resolveAutoHideDelayMs());\r\n }\r\n\r\n resolvedTitle(): string {\r\n const configured = String(this.model()?.title ?? '').trim();\r\n return configured === 'Notification'\r\n ? this.uiTranslationService.translate('toast.titleDefault', 'Notification')\r\n : configured;\r\n }\r\n\r\n resolvedDescription(): string {\r\n const configured = String(this.model()?.descriptionText ?? '').trim();\r\n return configured === 'Toast message'\r\n ? this.uiTranslationService.translate('toast.descriptionDefault', 'Toast message')\r\n : configured;\r\n }\r\n\r\n dismissLabel(): string {\r\n return this.uiTranslationService.translate('common.dismiss', 'Dismiss');\r\n }\r\n\r\n toastAriaLive(): 'assertive' | 'polite' {\r\n return this.resolveVariant() === 'info' ? 'polite' : 'assertive';\r\n }\r\n\r\n toastRole(): 'alert' | 'status' {\r\n return this.toastAriaLive() === 'assertive' ? 'alert' : 'status';\r\n }\r\n\r\n private scheduleAutoHide(delayMs = this.resolveAutoHideDelayMs()): void {\r\n this.clearAutoHide();\r\n\r\n if (!this.visible()) {\r\n return;\r\n }\r\n\r\n if (!this.model().autoHide) {\r\n return;\r\n }\r\n\r\n this.autoHideDelayMs = delayMs;\r\n this.autoHideRemainingMs = delayMs;\r\n this.autoHideStartedAt = Date.now();\r\n\r\n this.hideTimeoutId = setTimeout(() => {\r\n this.visible.set(false);\r\n this.hideTimeoutId = null;\r\n\r\n void this.runActions('autoHide');\r\n }, delayMs);\r\n }\r\n\r\n private clearAutoHide(): void {\r\n if (this.hideTimeoutId === null) {\r\n return;\r\n }\r\n\r\n clearTimeout(this.hideTimeoutId);\r\n\r\n this.hideTimeoutId = null;\r\n }\r\n\r\n private resolveAutoHideDelayMs(): number {\r\n const timeoutMs = Number(this.model()?.autoHideMs);\r\n\r\n if (Number.isFinite(timeoutMs) && timeoutMs >= 0) {\r\n return Math.floor(timeoutMs);\r\n }\r\n\r\n return 7000;\r\n }\r\n\r\n private async runActions(action: string): Promise<void> {\r\n const runtimeContext: Record<string, unknown> = {\r\n action,\r\n\r\n value: this.model().value,\r\n\r\n item: null,\r\n\r\n row: null,\r\n };\r\n\r\n const elementName = String(this.model().name ?? '').trim();\r\n\r\n if (elementName) {\r\n runtimeContext[elementName] = this.model().value;\r\n }\r\n\r\n await this.elementActionService.runActions(\r\n this.model(),\r\n\r\n this.model().events ?? [],\r\n\r\n 'click',\r\n\r\n runtimeContext,\r\n );\r\n }\r\n\r\n private resolveVariant(): 'error' | 'warning' | 'info' | 'success' {\r\n const variant = String(this.model()?.variant ?? 'info')\r\n .trim()\r\n\r\n .toLowerCase();\r\n\r\n if (variant === 'error' || variant === 'danger' || variant === 'risk') {\r\n return 'error';\r\n }\r\n\r\n if (variant === 'warning' || variant === 'warn') {\r\n return 'warning';\r\n }\r\n\r\n if (variant === 'success' || variant === 'ok') {\r\n return 'success';\r\n }\r\n\r\n if (variant === 'info' || variant === 'neutral') {\r\n return 'info';\r\n }\r\n\r\n return 'info';\r\n }\r\n\r\n private resolvePosition():\r\n | 'top-left'\r\n | 'top-center'\r\n | 'top-right'\r\n | 'bottom-left'\r\n | 'bottom-center'\r\n | 'bottom-right' {\r\n const position = String(this.model()?.position ?? 'top-right')\r\n .trim()\r\n\r\n .toLowerCase();\r\n\r\n if (\r\n position === 'top-left' ||\r\n position === 'top-center' ||\r\n position === 'top-right' ||\r\n position === 'bottom-left' ||\r\n position === 'bottom-center' ||\r\n position === 'bottom-right'\r\n ) {\r\n return position;\r\n }\r\n\r\n return 'top-right';\r\n }\r\n}\r\n","<element-wrapper [model]=\"model()\">\r\n @if (visible()) {\r\n <section class=\"nvb-toast-shell\" [ngClass]=\"shellClass()\" data-testid=\"toast-root\">\r\n <article\r\n class=\"nvb-toast\"\r\n [ngClass]=\"variantClass()\"\r\n [class.nvb-toast--no-icon]=\"!model().showIcon\"\r\n [attr.role]=\"toastRole()\"\r\n [attr.aria-live]=\"toastAriaLive()\"\r\n (click)=\"onToastClick($event)\"\r\n (mouseenter)=\"pauseAutoHide()\"\r\n (mouseleave)=\"resumeAutoHide()\"\r\n (focusin)=\"pauseAutoHide()\"\r\n (focusout)=\"resumeAutoHide()\"\r\n >\r\n @if (model().showIcon) {\r\n <span class=\"nvb-toast__media\" aria-hidden=\"true\">\r\n <nvb-icon class=\"nvb-toast__icon\" [name]=\"iconName()\"></nvb-icon>\r\n </span>\r\n }\r\n\r\n <div class=\"nvb-toast__content\">\r\n <h4 class=\"nvb-toast__title\">{{ resolvedTitle() | dynamicText: model() }}</h4>\r\n\r\n @if (resolvedDescription()) {\r\n <p class=\"nvb-toast__description\">\r\n {{ resolvedDescription() | dynamicText: model() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (showActionButton()) {\r\n <button type=\"button\" class=\"nvb-toast__action\" (click)=\"onActionClick($event)\">\r\n {{ model().actionText | dynamicText: model() }}\r\n </button>\r\n }\r\n\r\n @if (model().dismissible) {\r\n <button\r\n type=\"button\"\r\n class=\"nvb-toast__dismiss\"\r\n (click)=\"onDismissClick($event)\"\r\n [attr.aria-label]=\"dismissLabel()\"\r\n >\r\n <nvb-icon name=\"close\"></nvb-icon>\r\n </button>\r\n }\r\n </article>\r\n </section>\r\n }\r\n</element-wrapper>\r\n"],"names":[],"mappings":";;;;;MAoCa,YAAY,CAAA;AACvB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAc;AAEpC,IAAA,OAAO,GAAG,MAAM,CAAU,IAAI,8EAAC;AAEvB,IAAA,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACnD,IAAA,oBAAoB,GAAG,MAAM,CAAC,oBAAo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AC,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,00DAAA,EAAA,MAAA,EAAA,CAAA,spGAAA,CAAA,EAAA;;;;;"}
@@ -1,188 +0,0 @@
1
- import { NgClass } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, signal, inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { E as ElementActionService, U as UiTranslationService, S as StateService, a as ElementWrapper, N as NvbIcon, D as DynamicTextPipe } from './ngx-view-builder-ngx-view-builder-_VdHLdIW.mjs';
5
-
6
- class ToastElement {
7
- model = input.required(...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
8
- visible = signal(true, ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
9
- elementActionService = inject(ElementActionService);
10
- uiTranslationService = inject(UiTranslationService);
11
- hideTimeoutId = null;
12
- autoHideStartedAt = 0;
13
- autoHideDelayMs = 0;
14
- autoHideRemainingMs = 0;
15
- isEditor = computed(() => StateService.isEditor(), ...(ngDevMode ? [{ debugName: "isEditor" }] : /* istanbul ignore next */ []));
16
- shellClass = computed(() => {
17
- const position = this.resolvePosition();
18
- return {
19
- [`nvb-toast-shell--${position}`]: true,
20
- 'nvb-toast-shell--editor': this.isEditor(),
21
- };
22
- }, ...(ngDevMode ? [{ debugName: "shellClass" }] : /* istanbul ignore next */ []));
23
- variantClass = computed(() => `nvb-toast--${this.resolveVariant()}`, ...(ngDevMode ? [{ debugName: "variantClass" }] : /* istanbul ignore next */ []));
24
- iconName = computed(() => {
25
- const configured = String(this.model()?.icon ?? '').trim();
26
- if (configured) {
27
- return configured;
28
- }
29
- switch (this.resolveVariant()) {
30
- case 'success':
31
- return 'check_circle';
32
- case 'warning':
33
- return 'warning';
34
- case 'error':
35
- return 'error';
36
- default:
37
- return 'info';
38
- }
39
- }, ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
40
- showActionButton = computed(() => String(this.model()?.actionText ?? '').trim().length > 0, ...(ngDevMode ? [{ debugName: "showActionButton" }] : /* istanbul ignore next */ []));
41
- ngOnInit() {
42
- this.visible.set(Boolean(this.model()?.initiallyVisible ?? true));
43
- if (this.isEditor()) {
44
- this.visible.set(true);
45
- return;
46
- }
47
- this.scheduleAutoHide();
48
- }
49
- ngOnDestroy() {
50
- this.clearAutoHide();
51
- }
52
- onToastClick(event) {
53
- event.stopPropagation();
54
- void this.runActions('click');
55
- }
56
- onActionClick(event) {
57
- event.preventDefault();
58
- event.stopPropagation();
59
- void this.runActions('action');
60
- }
61
- onDismissClick(event) {
62
- event.preventDefault();
63
- event.stopPropagation();
64
- this.visible.set(false);
65
- this.clearAutoHide();
66
- void this.runActions('dismiss');
67
- }
68
- pauseAutoHide() {
69
- if (this.isEditor() || this.hideTimeoutId === null) {
70
- return;
71
- }
72
- const elapsedMs = Date.now() - this.autoHideStartedAt;
73
- this.autoHideRemainingMs = Math.max(1000, this.autoHideDelayMs - elapsedMs);
74
- this.clearAutoHide();
75
- }
76
- resumeAutoHide() {
77
- if (this.isEditor() || !this.visible() || !this.model().autoHide || this.hideTimeoutId !== null) {
78
- return;
79
- }
80
- this.scheduleAutoHide(this.autoHideRemainingMs || this.resolveAutoHideDelayMs());
81
- }
82
- resolvedTitle() {
83
- const configured = String(this.model()?.title ?? '').trim();
84
- return configured === 'Notification'
85
- ? this.uiTranslationService.translate('toast.titleDefault', 'Notification')
86
- : configured;
87
- }
88
- resolvedDescription() {
89
- const configured = String(this.model()?.descriptionText ?? '').trim();
90
- return configured === 'Toast message'
91
- ? this.uiTranslationService.translate('toast.descriptionDefault', 'Toast message')
92
- : configured;
93
- }
94
- dismissLabel() {
95
- return this.uiTranslationService.translate('common.dismiss', 'Dismiss');
96
- }
97
- toastAriaLive() {
98
- return this.resolveVariant() === 'info' ? 'polite' : 'assertive';
99
- }
100
- toastRole() {
101
- return this.toastAriaLive() === 'assertive' ? 'alert' : 'status';
102
- }
103
- scheduleAutoHide(delayMs = this.resolveAutoHideDelayMs()) {
104
- this.clearAutoHide();
105
- if (!this.visible()) {
106
- return;
107
- }
108
- if (!this.model().autoHide) {
109
- return;
110
- }
111
- this.autoHideDelayMs = delayMs;
112
- this.autoHideRemainingMs = delayMs;
113
- this.autoHideStartedAt = Date.now();
114
- this.hideTimeoutId = setTimeout(() => {
115
- this.visible.set(false);
116
- this.hideTimeoutId = null;
117
- void this.runActions('autoHide');
118
- }, delayMs);
119
- }
120
- clearAutoHide() {
121
- if (this.hideTimeoutId === null) {
122
- return;
123
- }
124
- clearTimeout(this.hideTimeoutId);
125
- this.hideTimeoutId = null;
126
- }
127
- resolveAutoHideDelayMs() {
128
- const timeoutMs = Number(this.model()?.autoHideMs);
129
- if (Number.isFinite(timeoutMs) && timeoutMs >= 0) {
130
- return Math.floor(timeoutMs);
131
- }
132
- return 7000;
133
- }
134
- async runActions(action) {
135
- const runtimeContext = {
136
- action,
137
- value: this.model().value,
138
- item: null,
139
- row: null,
140
- };
141
- const elementName = String(this.model().name ?? '').trim();
142
- if (elementName) {
143
- runtimeContext[elementName] = this.model().value;
144
- }
145
- await this.elementActionService.runActions(this.model(), this.model().events ?? [], 'click', runtimeContext);
146
- }
147
- resolveVariant() {
148
- const variant = String(this.model()?.variant ?? 'info')
149
- .trim()
150
- .toLowerCase();
151
- if (variant === 'error' || variant === 'danger' || variant === 'risk') {
152
- return 'error';
153
- }
154
- if (variant === 'warning' || variant === 'warn') {
155
- return 'warning';
156
- }
157
- if (variant === 'success' || variant === 'ok') {
158
- return 'success';
159
- }
160
- if (variant === 'info' || variant === 'neutral') {
161
- return 'info';
162
- }
163
- return 'info';
164
- }
165
- resolvePosition() {
166
- const position = String(this.model()?.position ?? 'top-right')
167
- .trim()
168
- .toLowerCase();
169
- if (position === 'top-left' ||
170
- position === 'top-center' ||
171
- position === 'top-right' ||
172
- position === 'bottom-left' ||
173
- position === 'bottom-center' ||
174
- position === 'bottom-right') {
175
- return position;
176
- }
177
- return 'top-right';
178
- }
179
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastElement, deps: [], target: i0.ɵɵFactoryTarget.Component });
180
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastElement, isStandalone: true, selector: "toast-element", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<element-wrapper [model]=\"model()\">\r\n @if (visible()) {\r\n <section class=\"nvb-toast-shell\" [ngClass]=\"shellClass()\" data-testid=\"toast-root\">\r\n <article\r\n class=\"nvb-toast\"\r\n [ngClass]=\"variantClass()\"\r\n [class.nvb-toast--no-icon]=\"!model().showIcon\"\r\n [attr.role]=\"toastRole()\"\r\n [attr.aria-live]=\"toastAriaLive()\"\r\n (click)=\"onToastClick($event)\"\r\n (mouseenter)=\"pauseAutoHide()\"\r\n (mouseleave)=\"resumeAutoHide()\"\r\n (focusin)=\"pauseAutoHide()\"\r\n (focusout)=\"resumeAutoHide()\"\r\n >\r\n @if (model().showIcon) {\r\n <span class=\"nvb-toast__media\" aria-hidden=\"true\">\r\n <nvb-icon class=\"nvb-toast__icon\" [name]=\"iconName()\"></nvb-icon>\r\n </span>\r\n }\r\n\r\n <div class=\"nvb-toast__content\">\r\n <h4 class=\"nvb-toast__title\">{{ resolvedTitle() | dynamicText: model() }}</h4>\r\n\r\n @if (resolvedDescription()) {\r\n <p class=\"nvb-toast__description\">\r\n {{ resolvedDescription() | dynamicText: model() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (showActionButton()) {\r\n <button type=\"button\" class=\"nvb-toast__action\" (click)=\"onActionClick($event)\">\r\n {{ model().actionText | dynamicText: model() }}\r\n </button>\r\n }\r\n\r\n @if (model().dismissible) {\r\n <button\r\n type=\"button\"\r\n class=\"nvb-toast__dismiss\"\r\n (click)=\"onDismissClick($event)\"\r\n [attr.aria-label]=\"dismissLabel()\"\r\n >\r\n <nvb-icon name=\"close\"></nvb-icon>\r\n </button>\r\n }\r\n </article>\r\n </section>\r\n }\r\n</element-wrapper>\r\n", styles: [":host{display:block;width:100%;font-family:var(--nvb-font-family)}.nvb-toast-shell{position:fixed;z-index:2147483500;width:min(360px,100vw - 32px);pointer-events:none;display:grid;gap:16px}.nvb-toast-shell--editor{position:relative;inset:auto;width:min(360px,100%);max-width:100%;margin-top:8px}.nvb-toast-shell--top-left{top:16px;left:16px}.nvb-toast-shell--top-center{top:16px;left:50%;transform:translate(-50%)}.nvb-toast-shell--top-right{top:16px;right:16px}.nvb-toast-shell--bottom-left{bottom:16px;left:16px}.nvb-toast-shell--bottom-center{bottom:16px;left:50%;transform:translate(-50%)}.nvb-toast-shell--bottom-right{bottom:16px;right:16px}.nvb-toast{--nvb-toast-icon-color: var(--color-primary-600);pointer-events:auto;position:relative;display:grid;grid-template-columns:20px minmax(0,1fr) 24px;gap:4px 12px;align-items:start;min-height:52px;padding:12px;border:1px solid var(--color-neutral-200);border-radius:var(--nvb-toast-radius, 4px);background:var(--color-neutral-000);color:var(--color-neutral-800);box-shadow:0 8px 16px color-mix(in oklab,var(--color-neutral-950) 14%,transparent),0 0 2px color-mix(in oklab,var(--color-neutral-950) 12%,transparent);overflow:hidden}.nvb-toast__media{grid-column:1;grid-row:1/span 2;width:20px;height:20px;margin-top:1px;display:inline-flex;align-items:center;justify-content:center;color:var(--nvb-toast-icon-color);flex:0 0 auto}.nvb-toast__icon{font-size:20px;line-height:1}.nvb-toast__content{grid-column:2;min-width:0;display:grid;gap:2px}.nvb-toast--no-icon .nvb-toast__content,.nvb-toast--no-icon .nvb-toast__action{grid-column:1/3}.nvb-toast__title{margin:0;font-size:14px;font-weight:600;line-height:20px;letter-spacing:0;color:var(--color-neutral-900)}.nvb-toast__description{margin:0;font-size:13px;line-height:18px;color:var(--color-neutral-600);overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.nvb-toast__action{grid-column:2;justify-self:start;min-height:22px;padding:0;border:0;border-radius:var(--nvb-button-radius, 4px);background:transparent;color:var(--color-primary-700);font:inherit;font-size:13px;line-height:20px;font-weight:600;cursor:pointer;white-space:nowrap}.nvb-toast__action:hover{color:var(--color-primary-800);text-decoration:underline;text-underline-offset:2px}.nvb-toast__action:focus-visible,.nvb-toast__dismiss:focus-visible{outline:0;box-shadow:var(--nvb-focus-ring)}.nvb-toast__dismiss{grid-column:3;grid-row:1;width:24px;height:24px;margin:-2px -2px 0 0;border:1px solid transparent;border-radius:var(--nvb-button-radius, 4px);background:transparent;color:var(--color-neutral-600);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .16s ease,color .16s ease}.nvb-toast__dismiss:hover{background:var(--color-neutral-100);color:var(--color-neutral-900)}.nvb-toast--info{--nvb-toast-icon-color: var(--color-primary-600)}.nvb-toast--success{--nvb-toast-icon-color: var(--color-success-700)}.nvb-toast--warning{--nvb-toast-icon-color: var(--color-warning-700)}.nvb-toast--error{--nvb-toast-icon-color: var(--color-risk-700)}@media(max-width:520px){.nvb-toast-shell{width:min(360px,100vw - 24px)}}\n"], dependencies: [{ kind: "component", type: ElementWrapper, selector: "element-wrapper", inputs: ["model", "controlIdInput", "labelForInput", "groupRole", "showTextWrapperInput"], exportAs: ["elementWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NvbIcon, selector: "nvb-icon", inputs: ["name", "svg", "ariaLabel"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
181
- }
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastElement, decorators: [{
183
- type: Component,
184
- args: [{ selector: 'toast-element', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ElementWrapper, NgClass, DynamicTextPipe, NvbIcon], template: "<element-wrapper [model]=\"model()\">\r\n @if (visible()) {\r\n <section class=\"nvb-toast-shell\" [ngClass]=\"shellClass()\" data-testid=\"toast-root\">\r\n <article\r\n class=\"nvb-toast\"\r\n [ngClass]=\"variantClass()\"\r\n [class.nvb-toast--no-icon]=\"!model().showIcon\"\r\n [attr.role]=\"toastRole()\"\r\n [attr.aria-live]=\"toastAriaLive()\"\r\n (click)=\"onToastClick($event)\"\r\n (mouseenter)=\"pauseAutoHide()\"\r\n (mouseleave)=\"resumeAutoHide()\"\r\n (focusin)=\"pauseAutoHide()\"\r\n (focusout)=\"resumeAutoHide()\"\r\n >\r\n @if (model().showIcon) {\r\n <span class=\"nvb-toast__media\" aria-hidden=\"true\">\r\n <nvb-icon class=\"nvb-toast__icon\" [name]=\"iconName()\"></nvb-icon>\r\n </span>\r\n }\r\n\r\n <div class=\"nvb-toast__content\">\r\n <h4 class=\"nvb-toast__title\">{{ resolvedTitle() | dynamicText: model() }}</h4>\r\n\r\n @if (resolvedDescription()) {\r\n <p class=\"nvb-toast__description\">\r\n {{ resolvedDescription() | dynamicText: model() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (showActionButton()) {\r\n <button type=\"button\" class=\"nvb-toast__action\" (click)=\"onActionClick($event)\">\r\n {{ model().actionText | dynamicText: model() }}\r\n </button>\r\n }\r\n\r\n @if (model().dismissible) {\r\n <button\r\n type=\"button\"\r\n class=\"nvb-toast__dismiss\"\r\n (click)=\"onDismissClick($event)\"\r\n [attr.aria-label]=\"dismissLabel()\"\r\n >\r\n <nvb-icon name=\"close\"></nvb-icon>\r\n </button>\r\n }\r\n </article>\r\n </section>\r\n }\r\n</element-wrapper>\r\n", styles: [":host{display:block;width:100%;font-family:var(--nvb-font-family)}.nvb-toast-shell{position:fixed;z-index:2147483500;width:min(360px,100vw - 32px);pointer-events:none;display:grid;gap:16px}.nvb-toast-shell--editor{position:relative;inset:auto;width:min(360px,100%);max-width:100%;margin-top:8px}.nvb-toast-shell--top-left{top:16px;left:16px}.nvb-toast-shell--top-center{top:16px;left:50%;transform:translate(-50%)}.nvb-toast-shell--top-right{top:16px;right:16px}.nvb-toast-shell--bottom-left{bottom:16px;left:16px}.nvb-toast-shell--bottom-center{bottom:16px;left:50%;transform:translate(-50%)}.nvb-toast-shell--bottom-right{bottom:16px;right:16px}.nvb-toast{--nvb-toast-icon-color: var(--color-primary-600);pointer-events:auto;position:relative;display:grid;grid-template-columns:20px minmax(0,1fr) 24px;gap:4px 12px;align-items:start;min-height:52px;padding:12px;border:1px solid var(--color-neutral-200);border-radius:var(--nvb-toast-radius, 4px);background:var(--color-neutral-000);color:var(--color-neutral-800);box-shadow:0 8px 16px color-mix(in oklab,var(--color-neutral-950) 14%,transparent),0 0 2px color-mix(in oklab,var(--color-neutral-950) 12%,transparent);overflow:hidden}.nvb-toast__media{grid-column:1;grid-row:1/span 2;width:20px;height:20px;margin-top:1px;display:inline-flex;align-items:center;justify-content:center;color:var(--nvb-toast-icon-color);flex:0 0 auto}.nvb-toast__icon{font-size:20px;line-height:1}.nvb-toast__content{grid-column:2;min-width:0;display:grid;gap:2px}.nvb-toast--no-icon .nvb-toast__content,.nvb-toast--no-icon .nvb-toast__action{grid-column:1/3}.nvb-toast__title{margin:0;font-size:14px;font-weight:600;line-height:20px;letter-spacing:0;color:var(--color-neutral-900)}.nvb-toast__description{margin:0;font-size:13px;line-height:18px;color:var(--color-neutral-600);overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.nvb-toast__action{grid-column:2;justify-self:start;min-height:22px;padding:0;border:0;border-radius:var(--nvb-button-radius, 4px);background:transparent;color:var(--color-primary-700);font:inherit;font-size:13px;line-height:20px;font-weight:600;cursor:pointer;white-space:nowrap}.nvb-toast__action:hover{color:var(--color-primary-800);text-decoration:underline;text-underline-offset:2px}.nvb-toast__action:focus-visible,.nvb-toast__dismiss:focus-visible{outline:0;box-shadow:var(--nvb-focus-ring)}.nvb-toast__dismiss{grid-column:3;grid-row:1;width:24px;height:24px;margin:-2px -2px 0 0;border:1px solid transparent;border-radius:var(--nvb-button-radius, 4px);background:transparent;color:var(--color-neutral-600);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .16s ease,color .16s ease}.nvb-toast__dismiss:hover{background:var(--color-neutral-100);color:var(--color-neutral-900)}.nvb-toast--info{--nvb-toast-icon-color: var(--color-primary-600)}.nvb-toast--success{--nvb-toast-icon-color: var(--color-success-700)}.nvb-toast--warning{--nvb-toast-icon-color: var(--color-warning-700)}.nvb-toast--error{--nvb-toast-icon-color: var(--color-risk-700)}@media(max-width:520px){.nvb-toast-shell{width:min(360px,100vw - 24px)}}\n"] }]
185
- }], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: true }] }] } });
186
-
187
- export { ToastElement };
188
- //# sourceMappingURL=ngx-view-builder-toast-element-DQ8mU1zc.mjs.map