@nova-design-system/nova-angular-18 3.12.0 → 3.14.0-beta.0
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 +44 -137
- package/dist/nova-components/esm2022/lib/nova-components.module.mjs +2 -2
- package/dist/nova-components/esm2022/lib/providers/index.mjs +3 -0
- package/dist/nova-components/esm2022/lib/providers/notification-service.component.mjs +183 -0
- package/dist/nova-components/esm2022/lib/providers/notification.service.mjs +134 -0
- package/dist/nova-components/esm2022/lib/stencil-generated/component-value-accessors.mjs +37 -1
- package/dist/nova-components/esm2022/lib/stencil-generated/components.mjs +58 -4
- package/dist/nova-components/esm2022/lib/stencil-generated/index.mjs +3 -1
- package/dist/nova-components/esm2022/public-api.mjs +2 -1
- package/dist/nova-components/fesm2022/nova-components.mjs +409 -8
- package/dist/nova-components/fesm2022/nova-components.mjs.map +1 -1
- package/dist/nova-components/lib/nova-components.module.d.ts +2 -2
- package/dist/nova-components/lib/providers/index.d.ts +2 -0
- package/dist/nova-components/lib/providers/notification-service.component.d.ts +56 -0
- package/dist/nova-components/lib/providers/notification.service.d.ts +116 -0
- package/dist/nova-components/lib/stencil-generated/component-value-accessors.d.ts +7 -0
- package/dist/nova-components/lib/stencil-generated/components.d.ts +27 -3
- package/dist/nova-components/lib/stencil-generated/index.d.ts +1 -1
- package/dist/nova-components/public-api.d.ts +1 -0
- package/package.json +4 -3
|
@@ -36,6 +36,8 @@ export const DIRECTIVES = [
|
|
|
36
36
|
d.NvLoader,
|
|
37
37
|
d.NvMenu,
|
|
38
38
|
d.NvMenuitem,
|
|
39
|
+
d.NvNotification,
|
|
40
|
+
d.NvNotificationcontainer,
|
|
39
41
|
d.NvPopover,
|
|
40
42
|
d.NvRow,
|
|
41
43
|
d.NvStack,
|
|
@@ -46,4 +48,4 @@ export const DIRECTIVES = [
|
|
|
46
48
|
d.NvTogglebuttongroup,
|
|
47
49
|
d.NvTooltip
|
|
48
50
|
];
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9ub3ZhLWNvbXBvbmVudHMvc3JjL2xpYi9zdGVuY2lsLWdlbmVyYXRlZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssQ0FBQyxNQUFNLGNBQWMsQ0FBQztBQUVsQyxNQUFNLENBQUMsTUFBTSxVQUFVLEdBQUc7SUFDeEIsQ0FBQyxDQUFDLFdBQVc7SUFDYixDQUFDLENBQUMsZUFBZTtJQUNqQixDQUFDLENBQUMsT0FBTztJQUNULENBQUMsQ0FBQyxRQUFRO0lBQ1YsQ0FBQyxDQUFDLE9BQU87SUFDVCxDQUFDLENBQUMsWUFBWTtJQUNkLENBQUMsQ0FBQyxhQUFhO0lBQ2YsQ0FBQyxDQUFDLFFBQVE7SUFDVixDQUFDLENBQUMsYUFBYTtJQUNmLENBQUMsQ0FBQyxVQUFVO0lBQ1osQ0FBQyxDQUFDLEtBQUs7SUFDUCxDQUFDLENBQUMsVUFBVTtJQUNaLENBQUMsQ0FBQyxnQkFBZ0I7SUFDbEIsQ0FBQyxDQUFDLFFBQVE7SUFDVixDQUFDLENBQUMsY0FBYztJQUNoQixDQUFDLENBQUMsY0FBYztJQUNoQixDQUFDLENBQUMsZUFBZTtJQUNqQixDQUFDLENBQUMsV0FBVztJQUNiLENBQUMsQ0FBQyxnQkFBZ0I7SUFDbEIsQ0FBQyxDQUFDLGVBQWU7SUFDakIsQ0FBQyxDQUFDLG1CQUFtQjtJQUNyQixDQUFDLENBQUMsd0JBQXdCO0lBQzFCLENBQUMsQ0FBQyxrQkFBa0I7SUFDcEIsQ0FBQyxDQUFDLGFBQWE7SUFDZixDQUFDLENBQUMsZUFBZTtJQUNqQixDQUFDLENBQUMsWUFBWTtJQUNkLENBQUMsQ0FBQyxhQUFhO0lBQ2YsQ0FBQyxDQUFDLGFBQWE7SUFDZixDQUFDLENBQUMsV0FBVztJQUNiLENBQUMsQ0FBQyxlQUFlO0lBQ2pCLENBQUMsQ0FBQyxXQUFXO0lBQ2IsQ0FBQyxDQUFDLE1BQU07SUFDUixDQUFDLENBQUMsWUFBWTtJQUNkLENBQUMsQ0FBQyxRQUFRO0lBQ1YsQ0FBQyxDQUFDLE1BQU07SUFDUixDQUFDLENBQUMsVUFBVTtJQUNaLENBQUMsQ0FBQyxjQUFjO0lBQ2hCLENBQUMsQ0FBQyx1QkFBdUI7SUFDekIsQ0FBQyxDQUFDLFNBQVM7SUFDWCxDQUFDLENBQUMsS0FBSztJQUNQLENBQUMsQ0FBQyxPQUFPO0lBQ1QsQ0FBQyxDQUFDLE9BQU87SUFDVCxDQUFDLENBQUMsYUFBYTtJQUNmLENBQUMsQ0FBQyxRQUFRO0lBQ1YsQ0FBQyxDQUFDLGNBQWM7SUFDaEIsQ0FBQyxDQUFDLG1CQUFtQjtJQUNyQixDQUFDLENBQUMsU0FBUztDQUNaLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbmltcG9ydCAqIGFzIGQgZnJvbSAnLi9jb21wb25lbnRzJztcblxuZXhwb3J0IGNvbnN0IERJUkVDVElWRVMgPSBbXG4gIGQuTnZBY2NvcmRpb24sXG4gIGQuTnZBY2NvcmRpb25JdGVtLFxuICBkLk52QWxlcnQsXG4gIGQuTnZBdmF0YXIsXG4gIGQuTnZCYWRnZSxcbiAgZC5OdkJyZWFkY3J1bWIsXG4gIGQuTnZCcmVhZGNydW1icyxcbiAgZC5OdkJ1dHRvbixcbiAgZC5OdkJ1dHRvbmdyb3VwLFxuICBkLk52Q2FsZW5kYXIsXG4gIGQuTnZDb2wsXG4gIGQuTnZEYXRhZ3JpZCxcbiAgZC5OdkRhdGFncmlkY29sdW1uLFxuICBkLk52RGlhbG9nLFxuICBkLk52RGlhbG9nZm9vdGVyLFxuICBkLk52RGlhbG9naGVhZGVyLFxuICBkLk52RmllbGRjaGVja2JveCxcbiAgZC5OdkZpZWxkZGF0ZSxcbiAgZC5OdkZpZWxkZGF0ZXJhbmdlLFxuICBkLk52RmllbGRkcm9wZG93bixcbiAgZC5OdkZpZWxkZHJvcGRvd25pdGVtLFxuICBkLk52RmllbGRkcm9wZG93bml0ZW1jaGVjayxcbiAgZC5OdkZpZWxkbXVsdGlzZWxlY3QsXG4gIGQuTnZGaWVsZG51bWJlcixcbiAgZC5OdkZpZWxkcGFzc3dvcmQsXG4gIGQuTnZGaWVsZHJhZGlvLFxuICBkLk52RmllbGRzZWxlY3QsXG4gIGQuTnZGaWVsZHNsaWRlcixcbiAgZC5OdkZpZWxkdGV4dCxcbiAgZC5OdkZpZWxkdGV4dGFyZWEsXG4gIGQuTnZGaWVsZHRpbWUsXG4gIGQuTnZJY29uLFxuICBkLk52SWNvbmJ1dHRvbixcbiAgZC5OdkxvYWRlcixcbiAgZC5Odk1lbnUsXG4gIGQuTnZNZW51aXRlbSxcbiAgZC5Odk5vdGlmaWNhdGlvbixcbiAgZC5Odk5vdGlmaWNhdGlvbmNvbnRhaW5lcixcbiAgZC5OdlBvcG92ZXIsXG4gIGQuTnZSb3csXG4gIGQuTnZTdGFjayxcbiAgZC5OdlRhYmxlLFxuICBkLk52VGFibGVjb2x1bW4sXG4gIGQuTnZUb2dnbGUsXG4gIGQuTnZUb2dnbGVidXR0b24sXG4gIGQuTnZUb2dnbGVidXR0b25ncm91cCxcbiAgZC5OdlRvb2x0aXBcbl07XG4iXX0=
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
export * from './lib/nova-components.module';
|
|
5
5
|
export * from './lib/stencil-generated/components';
|
|
6
6
|
export * from './lib/stencil-generated/component-value-accessors';
|
|
7
|
+
export * from './lib/providers';
|
|
7
8
|
export * from '@nova-design-system/nova-webcomponents/constants';
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25vdmEtY29tcG9uZW50cy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLG1EQUFtRCxDQUFDO0FBQ2xFLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxrREFBa0QsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbm92YS1jb21wb25lbnRzXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbm92YS1jb21wb25lbnRzLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zdGVuY2lsLWdlbmVyYXRlZC9jb21wb25lbnRzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3N0ZW5jaWwtZ2VuZXJhdGVkL2NvbXBvbmVudC12YWx1ZS1hY2Nlc3NvcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcHJvdmlkZXJzJztcbmV4cG9ydCAqIGZyb20gJ0Bub3ZhLWRlc2lnbi1zeXN0ZW0vbm92YS13ZWJjb21wb25lbnRzL2NvbnN0YW50cyc7XG4iXX0=
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, HostListener, Directive, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, HostListener, Directive, APP_INITIALIZER, NgModule, Injectable, ElementRef, ViewChildren, Input, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import { defineCustomElements } from '@nova-design-system/nova-webcomponents/loader';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
|
-
import { fromEvent } from 'rxjs';
|
|
5
|
+
import { fromEvent, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
+
import * as i2 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
7
9
|
export * from '@nova-design-system/nova-webcomponents/constants';
|
|
8
10
|
|
|
9
11
|
/* eslint-disable */
|
|
@@ -301,11 +303,11 @@ let NvCalendar = class NvCalendar {
|
|
|
301
303
|
proxyOutputs(this, this.el, ['singleDateChange', 'rangeDateChange', 'valueChanged']);
|
|
302
304
|
}
|
|
303
305
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvCalendar, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
304
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvCalendar, selector: "nv-calendar", inputs: { dateFormat: "dateFormat", disabledDates: "disabledDates", firstDayOfWeek: "firstDayOfWeek", locale: "locale", max: "max", min: "min", numberOfCalendars: "numberOfCalendars", rangeValue: "rangeValue", selectionType: "selectionType", shortcuts: "shortcuts", shortcutsPlacement: "shortcutsPlacement", showActions: "showActions", showWeekNumbers: "showWeekNumbers", singleValue: "singleValue", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
306
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvCalendar, selector: "nv-calendar", inputs: { cancelLabel: "cancelLabel", dateFormat: "dateFormat", disabledDates: "disabledDates", firstDayOfWeek: "firstDayOfWeek", locale: "locale", max: "max", min: "min", numberOfCalendars: "numberOfCalendars", primaryLabel: "primaryLabel", rangeValue: "rangeValue", selectionType: "selectionType", shortcuts: "shortcuts", shortcutsPlacement: "shortcutsPlacement", showActions: "showActions", showWeekNumbers: "showWeekNumbers", singleValue: "singleValue", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
305
307
|
};
|
|
306
308
|
NvCalendar = __decorate([
|
|
307
309
|
ProxyCmp({
|
|
308
|
-
inputs: ['dateFormat', 'disabledDates', 'firstDayOfWeek', 'locale', 'max', 'min', 'numberOfCalendars', 'rangeValue', 'selectionType', 'shortcuts', 'shortcutsPlacement', 'showActions', 'showWeekNumbers', 'singleValue', 'value'],
|
|
310
|
+
inputs: ['cancelLabel', 'dateFormat', 'disabledDates', 'firstDayOfWeek', 'locale', 'max', 'min', 'numberOfCalendars', 'primaryLabel', 'rangeValue', 'selectionType', 'shortcuts', 'shortcutsPlacement', 'showActions', 'showWeekNumbers', 'singleValue', 'value'],
|
|
309
311
|
methods: ['clear']
|
|
310
312
|
})
|
|
311
313
|
], NvCalendar);
|
|
@@ -316,7 +318,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
316
318
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
317
319
|
template: '<ng-content></ng-content>',
|
|
318
320
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
319
|
-
inputs: ['dateFormat', 'disabledDates', 'firstDayOfWeek', 'locale', 'max', 'min', 'numberOfCalendars', 'rangeValue', 'selectionType', 'shortcuts', 'shortcutsPlacement', 'showActions', 'showWeekNumbers', 'singleValue', 'value'],
|
|
321
|
+
inputs: ['cancelLabel', 'dateFormat', 'disabledDates', 'firstDayOfWeek', 'locale', 'max', 'min', 'numberOfCalendars', 'primaryLabel', 'rangeValue', 'selectionType', 'shortcuts', 'shortcutsPlacement', 'showActions', 'showWeekNumbers', 'singleValue', 'value'],
|
|
320
322
|
standalone: false
|
|
321
323
|
}]
|
|
322
324
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
@@ -996,6 +998,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
996
998
|
standalone: false
|
|
997
999
|
}]
|
|
998
1000
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
1001
|
+
let NvNotification = class NvNotification {
|
|
1002
|
+
constructor(c, r, z) {
|
|
1003
|
+
this.z = z;
|
|
1004
|
+
c.detach();
|
|
1005
|
+
this.el = r.nativeElement;
|
|
1006
|
+
proxyOutputs(this, this.el, ['hiddenChanged']);
|
|
1007
|
+
}
|
|
1008
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvNotification, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1009
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvNotification, selector: "nv-notification", inputs: { dismissible: "dismissible", emphasis: "emphasis", feedback: "feedback", heading: "heading", hidden: "hidden", icon: "icon", initiallyHidden: "initiallyHidden", message: "message", uid: "uid" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1010
|
+
};
|
|
1011
|
+
NvNotification = __decorate([
|
|
1012
|
+
ProxyCmp({
|
|
1013
|
+
inputs: ['dismissible', 'emphasis', 'feedback', 'heading', 'hidden', 'icon', 'initiallyHidden', 'message', 'uid'],
|
|
1014
|
+
methods: ['dismiss', 'show']
|
|
1015
|
+
})
|
|
1016
|
+
], NvNotification);
|
|
1017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvNotification, decorators: [{
|
|
1018
|
+
type: Component,
|
|
1019
|
+
args: [{
|
|
1020
|
+
selector: 'nv-notification',
|
|
1021
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1022
|
+
template: '<ng-content></ng-content>',
|
|
1023
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1024
|
+
inputs: ['dismissible', 'emphasis', 'feedback', 'heading', 'hidden', 'icon', 'initiallyHidden', 'message', 'uid'],
|
|
1025
|
+
standalone: false
|
|
1026
|
+
}]
|
|
1027
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
1028
|
+
let NvNotificationcontainer = class NvNotificationcontainer {
|
|
1029
|
+
constructor(c, r, z) {
|
|
1030
|
+
this.z = z;
|
|
1031
|
+
c.detach();
|
|
1032
|
+
this.el = r.nativeElement;
|
|
1033
|
+
}
|
|
1034
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvNotificationcontainer, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1035
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvNotificationcontainer, selector: "nv-notificationcontainer", inputs: { position: "position" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1036
|
+
};
|
|
1037
|
+
NvNotificationcontainer = __decorate([
|
|
1038
|
+
ProxyCmp({
|
|
1039
|
+
inputs: ['position']
|
|
1040
|
+
})
|
|
1041
|
+
], NvNotificationcontainer);
|
|
1042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvNotificationcontainer, decorators: [{
|
|
1043
|
+
type: Component,
|
|
1044
|
+
args: [{
|
|
1045
|
+
selector: 'nv-notificationcontainer',
|
|
1046
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1047
|
+
template: '<ng-content></ng-content>',
|
|
1048
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1049
|
+
inputs: ['position'],
|
|
1050
|
+
standalone: false
|
|
1051
|
+
}]
|
|
1052
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
999
1053
|
let NvPopover = class NvPopover {
|
|
1000
1054
|
constructor(c, r, z) {
|
|
1001
1055
|
this.z = z;
|
|
@@ -1264,6 +1318,8 @@ const DIRECTIVES = [
|
|
|
1264
1318
|
NvLoader,
|
|
1265
1319
|
NvMenu,
|
|
1266
1320
|
NvMenuitem,
|
|
1321
|
+
NvNotification,
|
|
1322
|
+
NvNotificationcontainer,
|
|
1267
1323
|
NvPopover,
|
|
1268
1324
|
NvRow,
|
|
1269
1325
|
NvStack,
|
|
@@ -1874,6 +1930,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1874
1930
|
type: HostListener,
|
|
1875
1931
|
args: ['valueChanged', ['$event']]
|
|
1876
1932
|
}] } });
|
|
1933
|
+
class NvNotificationValueAccessor extends ValueAccessor {
|
|
1934
|
+
constructor(el) {
|
|
1935
|
+
super(el);
|
|
1936
|
+
}
|
|
1937
|
+
handleHiddenChanged(event) {
|
|
1938
|
+
this.handleChangeEvent(event.target.hidden);
|
|
1939
|
+
}
|
|
1940
|
+
writeValue(value) {
|
|
1941
|
+
this.el.nativeElement.hidden = this.lastValue = value;
|
|
1942
|
+
}
|
|
1943
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvNotificationValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1944
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: NvNotificationValueAccessor, selector: "nv-notification", host: { listeners: { "hiddenChanged": "handleHiddenChanged($event)" } }, providers: [
|
|
1945
|
+
{
|
|
1946
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1947
|
+
useExisting: NvNotificationValueAccessor,
|
|
1948
|
+
multi: true,
|
|
1949
|
+
},
|
|
1950
|
+
], usesInheritance: true, ngImport: i0 }); }
|
|
1951
|
+
}
|
|
1952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvNotificationValueAccessor, decorators: [{
|
|
1953
|
+
type: Directive,
|
|
1954
|
+
args: [{
|
|
1955
|
+
selector: 'nv-notification',
|
|
1956
|
+
providers: [
|
|
1957
|
+
{
|
|
1958
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1959
|
+
useExisting: NvNotificationValueAccessor,
|
|
1960
|
+
multi: true,
|
|
1961
|
+
},
|
|
1962
|
+
],
|
|
1963
|
+
}]
|
|
1964
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { handleHiddenChanged: [{
|
|
1965
|
+
type: HostListener,
|
|
1966
|
+
args: ['hiddenChanged', ['$event']]
|
|
1967
|
+
}] } });
|
|
1877
1968
|
class NvPopoverValueAccessor extends ValueAccessor {
|
|
1878
1969
|
constructor(el) {
|
|
1879
1970
|
super(el);
|
|
@@ -1996,6 +2087,7 @@ const VALUE_ACCESSORS = [
|
|
|
1996
2087
|
NvFieldsliderValueAccessor,
|
|
1997
2088
|
NvFieldtextValueAccessor,
|
|
1998
2089
|
NvFieldtextareaValueAccessor,
|
|
2090
|
+
NvNotificationValueAccessor,
|
|
1999
2091
|
NvPopoverValueAccessor,
|
|
2000
2092
|
NvToggleValueAccessor,
|
|
2001
2093
|
NvTogglebuttongroupValueAccessor,
|
|
@@ -2015,7 +2107,7 @@ function provideNovaComponents() {
|
|
|
2015
2107
|
}
|
|
2016
2108
|
class NovaComponentsModule {
|
|
2017
2109
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2018
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, declarations: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvPopover, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip], exports: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvPopover, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip] }); }
|
|
2110
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, declarations: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationcontainer, NvPopover, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip], exports: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationcontainer, NvPopover, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip] }); }
|
|
2019
2111
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, providers: [provideNovaComponents()] }); }
|
|
2020
2112
|
}
|
|
2021
2113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, decorators: [{
|
|
@@ -2028,7 +2120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2028
2120
|
}] });
|
|
2029
2121
|
class NovaComponentsValueAccessorModule {
|
|
2030
2122
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2031
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule, declarations: [NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor], exports: [NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor] }); }
|
|
2123
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule, declarations: [NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvNotificationValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor], exports: [NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvNotificationValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor] }); }
|
|
2032
2124
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule }); }
|
|
2033
2125
|
}
|
|
2034
2126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule, decorators: [{
|
|
@@ -2039,6 +2131,315 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2039
2131
|
}]
|
|
2040
2132
|
}] });
|
|
2041
2133
|
|
|
2134
|
+
/**
|
|
2135
|
+
* Utility function to generate unique IDs.
|
|
2136
|
+
*
|
|
2137
|
+
* @returns {string} A unique identifier string
|
|
2138
|
+
*/
|
|
2139
|
+
const generateId = () => {
|
|
2140
|
+
return `notification-${Date.now()}-${Math.random()
|
|
2141
|
+
.toString(36)
|
|
2142
|
+
.substr(2, 9)}`;
|
|
2143
|
+
};
|
|
2144
|
+
/**
|
|
2145
|
+
* Angular service for managing notifications.
|
|
2146
|
+
*/
|
|
2147
|
+
class NotificationService {
|
|
2148
|
+
/**
|
|
2149
|
+
* Current array of notifications.
|
|
2150
|
+
*
|
|
2151
|
+
* @returns {Notification[]} Array of active notifications
|
|
2152
|
+
*/
|
|
2153
|
+
get notifications() {
|
|
2154
|
+
return this._notifications.value;
|
|
2155
|
+
}
|
|
2156
|
+
constructor() {
|
|
2157
|
+
this._notifications = new BehaviorSubject([]);
|
|
2158
|
+
/**
|
|
2159
|
+
* Observable stream of active notifications.
|
|
2160
|
+
*/
|
|
2161
|
+
this.notifications$ = this._notifications.asObservable();
|
|
2162
|
+
// keep track of all notification refs
|
|
2163
|
+
this.elRefs = new Map();
|
|
2164
|
+
this._config = {
|
|
2165
|
+
position: 'top-right',
|
|
2166
|
+
maxNotifications: 50,
|
|
2167
|
+
className: '',
|
|
2168
|
+
};
|
|
2169
|
+
}
|
|
2170
|
+
/**
|
|
2171
|
+
* Configure the notification service.
|
|
2172
|
+
*
|
|
2173
|
+
* @param {NotificationServiceConfig} config Configuration options
|
|
2174
|
+
*/
|
|
2175
|
+
configure(config) {
|
|
2176
|
+
Object.assign(this._config, config);
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* Get the current configuration.
|
|
2180
|
+
*
|
|
2181
|
+
* @returns {Required<NotificationServiceConfig>} Current configuration
|
|
2182
|
+
*/
|
|
2183
|
+
get config() {
|
|
2184
|
+
return { ...this._config };
|
|
2185
|
+
}
|
|
2186
|
+
registerRef(id, el) {
|
|
2187
|
+
this.elRefs.set(id, el);
|
|
2188
|
+
}
|
|
2189
|
+
unregisterRef(id) {
|
|
2190
|
+
this.elRefs.delete(id);
|
|
2191
|
+
}
|
|
2192
|
+
clearRefs() {
|
|
2193
|
+
this.elRefs.clear();
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Show a new notification.
|
|
2197
|
+
*
|
|
2198
|
+
* @param {NotificationOptions} options The notification options
|
|
2199
|
+
* @returns {string} The notification ID
|
|
2200
|
+
*/
|
|
2201
|
+
show(options) {
|
|
2202
|
+
const id = options.id || generateId();
|
|
2203
|
+
const notification = {
|
|
2204
|
+
id,
|
|
2205
|
+
heading: options.heading,
|
|
2206
|
+
message: options.message,
|
|
2207
|
+
dismissible: options.dismissible ?? true,
|
|
2208
|
+
emphasis: options.emphasis ?? 'medium',
|
|
2209
|
+
feedback: options.feedback ?? 'information',
|
|
2210
|
+
icon: options.icon,
|
|
2211
|
+
actions: options.actions ?? [],
|
|
2212
|
+
actionSlot: options.actionSlot,
|
|
2213
|
+
createdAt: Date.now(),
|
|
2214
|
+
};
|
|
2215
|
+
const currentNotifications = this._notifications.value;
|
|
2216
|
+
// Remove oldest notifications if we exceed max
|
|
2217
|
+
const newNotifications = [notification, ...currentNotifications];
|
|
2218
|
+
if (newNotifications.length > this._config.maxNotifications) {
|
|
2219
|
+
this._notifications.next(newNotifications.slice(0, this._config.maxNotifications));
|
|
2220
|
+
}
|
|
2221
|
+
else {
|
|
2222
|
+
this._notifications.next(newNotifications);
|
|
2223
|
+
}
|
|
2224
|
+
setTimeout(() => {
|
|
2225
|
+
const ref = this.elRefs.get(id);
|
|
2226
|
+
ref?.show();
|
|
2227
|
+
}, 0);
|
|
2228
|
+
return id;
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* Dismiss a specific notification by ID. This will remove the notification
|
|
2232
|
+
* after the animation completes.
|
|
2233
|
+
*
|
|
2234
|
+
* @param {string} id The notification ID to dismiss
|
|
2235
|
+
*/
|
|
2236
|
+
dismiss(id) {
|
|
2237
|
+
this.elRefs.get(id)?.dismiss?.();
|
|
2238
|
+
}
|
|
2239
|
+
/**
|
|
2240
|
+
* Immediately remove a specific notification by ID.
|
|
2241
|
+
*
|
|
2242
|
+
* @param {string} id The notification ID to dismiss
|
|
2243
|
+
*/
|
|
2244
|
+
remove(id) {
|
|
2245
|
+
const currentNotifications = this._notifications.value;
|
|
2246
|
+
const filteredNotifications = currentNotifications.filter((notification) => notification.id !== id);
|
|
2247
|
+
this._notifications.next(filteredNotifications);
|
|
2248
|
+
}
|
|
2249
|
+
/**
|
|
2250
|
+
* Immediately remove all active notifications.
|
|
2251
|
+
*/
|
|
2252
|
+
removeAll() {
|
|
2253
|
+
this._notifications.next([]);
|
|
2254
|
+
}
|
|
2255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2256
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
|
|
2257
|
+
}
|
|
2258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NotificationService, decorators: [{
|
|
2259
|
+
type: Injectable,
|
|
2260
|
+
args: [{
|
|
2261
|
+
providedIn: 'root',
|
|
2262
|
+
}]
|
|
2263
|
+
}], ctorParameters: () => [] });
|
|
2264
|
+
|
|
2265
|
+
/**
|
|
2266
|
+
* Angular component that renders the notification container with active notifications.
|
|
2267
|
+
*/
|
|
2268
|
+
class NotificationServiceComponent {
|
|
2269
|
+
constructor(notificationService) {
|
|
2270
|
+
this.notificationService = notificationService;
|
|
2271
|
+
/**
|
|
2272
|
+
* Array of active notifications.
|
|
2273
|
+
*/
|
|
2274
|
+
this.notifications = [];
|
|
2275
|
+
}
|
|
2276
|
+
/**
|
|
2277
|
+
* Component initialization.
|
|
2278
|
+
*/
|
|
2279
|
+
ngOnInit() {
|
|
2280
|
+
// Use service config if no input provided
|
|
2281
|
+
this.position ??= this.notificationService.config.position;
|
|
2282
|
+
this.className ??= this.notificationService.config.className;
|
|
2283
|
+
// Subscribe to notification changes
|
|
2284
|
+
this.subscription = this.notificationService.notifications$.subscribe((list) => (this.notifications = list));
|
|
2285
|
+
}
|
|
2286
|
+
/**
|
|
2287
|
+
* Synchronize notification elements/refs with the service.
|
|
2288
|
+
*/
|
|
2289
|
+
ngAfterViewInit() {
|
|
2290
|
+
const sync = () => {
|
|
2291
|
+
this.notificationService.clearRefs();
|
|
2292
|
+
for (const elRef of this.notificationEls.toArray()) {
|
|
2293
|
+
const el = elRef.nativeElement;
|
|
2294
|
+
const id = el.getAttribute('data-id');
|
|
2295
|
+
if (id)
|
|
2296
|
+
this.notificationService.registerRef(id, el);
|
|
2297
|
+
}
|
|
2298
|
+
};
|
|
2299
|
+
sync();
|
|
2300
|
+
this.notificationEls.changes.subscribe(sync);
|
|
2301
|
+
}
|
|
2302
|
+
/**
|
|
2303
|
+
* Component cleanup.
|
|
2304
|
+
*/
|
|
2305
|
+
ngOnDestroy() {
|
|
2306
|
+
this.subscription?.unsubscribe();
|
|
2307
|
+
this.notificationService.clearRefs();
|
|
2308
|
+
}
|
|
2309
|
+
/**
|
|
2310
|
+
* Track function for ngFor to optimize rendering.
|
|
2311
|
+
*
|
|
2312
|
+
* @param {number} index The index of the item
|
|
2313
|
+
* @param {Notification} notification The notification item
|
|
2314
|
+
* @returns {string} The notification ID
|
|
2315
|
+
*/
|
|
2316
|
+
trackByNotificationId(index, notification) {
|
|
2317
|
+
return notification.id;
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Handle notification hidden state change.
|
|
2321
|
+
*
|
|
2322
|
+
* @param {CustomEvent<boolean>} event The hidden changed event
|
|
2323
|
+
* @param {string} id The notification ID
|
|
2324
|
+
*/
|
|
2325
|
+
handleHiddenChanged(event, id) {
|
|
2326
|
+
if (event.detail && id) {
|
|
2327
|
+
this.notificationService.remove(id);
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NotificationServiceComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2331
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NotificationServiceComponent, isStandalone: true, selector: "nv-notification-service", inputs: { position: "position", className: "className" }, viewQueries: [{ propertyName: "notificationEls", predicate: ["notificationEl"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
2332
|
+
<nv-notificationcontainer
|
|
2333
|
+
[position]="position"
|
|
2334
|
+
[class]="className"
|
|
2335
|
+
data-testid="notification-container"
|
|
2336
|
+
>
|
|
2337
|
+
<nv-notification
|
|
2338
|
+
*ngFor="
|
|
2339
|
+
let notification of notifications;
|
|
2340
|
+
trackBy: trackByNotificationId
|
|
2341
|
+
"
|
|
2342
|
+
#notificationEl
|
|
2343
|
+
[attr.data-id]="notification.id"
|
|
2344
|
+
[heading]="notification.heading"
|
|
2345
|
+
[message]="notification.message"
|
|
2346
|
+
[dismissible]="notification.dismissible"
|
|
2347
|
+
[emphasis]="notification.emphasis"
|
|
2348
|
+
[feedback]="notification.feedback"
|
|
2349
|
+
[icon]="notification.icon"
|
|
2350
|
+
[initiallyHidden]="true"
|
|
2351
|
+
(hiddenChanged)="handleHiddenChanged($event, notification.id)"
|
|
2352
|
+
>
|
|
2353
|
+
<!-- Actions slot content for the custom element -->
|
|
2354
|
+
<div
|
|
2355
|
+
slot="actions"
|
|
2356
|
+
class="flex gap-2"
|
|
2357
|
+
*ngIf="notification.actions?.length || notification.actionSlot"
|
|
2358
|
+
>
|
|
2359
|
+
<!-- Config-driven actions -->
|
|
2360
|
+
<nv-button
|
|
2361
|
+
*ngFor="let action of notification.actions"
|
|
2362
|
+
emphasis="low"
|
|
2363
|
+
size="sm"
|
|
2364
|
+
(click)="action.onClick()"
|
|
2365
|
+
>
|
|
2366
|
+
{{ action.label }}
|
|
2367
|
+
</nv-button>
|
|
2368
|
+
|
|
2369
|
+
<!-- Component-driven actions -->
|
|
2370
|
+
<ng-container
|
|
2371
|
+
*ngIf="notification.actionSlot"
|
|
2372
|
+
[ngComponentOutlet]="notification.actionSlot"
|
|
2373
|
+
></ng-container>
|
|
2374
|
+
</div>
|
|
2375
|
+
</nv-notification>
|
|
2376
|
+
</nv-notificationcontainer>
|
|
2377
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
2378
|
+
}
|
|
2379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NotificationServiceComponent, decorators: [{
|
|
2380
|
+
type: Component,
|
|
2381
|
+
args: [{
|
|
2382
|
+
selector: 'nv-notification-service',
|
|
2383
|
+
standalone: true,
|
|
2384
|
+
imports: [CommonModule],
|
|
2385
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
2386
|
+
template: `
|
|
2387
|
+
<nv-notificationcontainer
|
|
2388
|
+
[position]="position"
|
|
2389
|
+
[class]="className"
|
|
2390
|
+
data-testid="notification-container"
|
|
2391
|
+
>
|
|
2392
|
+
<nv-notification
|
|
2393
|
+
*ngFor="
|
|
2394
|
+
let notification of notifications;
|
|
2395
|
+
trackBy: trackByNotificationId
|
|
2396
|
+
"
|
|
2397
|
+
#notificationEl
|
|
2398
|
+
[attr.data-id]="notification.id"
|
|
2399
|
+
[heading]="notification.heading"
|
|
2400
|
+
[message]="notification.message"
|
|
2401
|
+
[dismissible]="notification.dismissible"
|
|
2402
|
+
[emphasis]="notification.emphasis"
|
|
2403
|
+
[feedback]="notification.feedback"
|
|
2404
|
+
[icon]="notification.icon"
|
|
2405
|
+
[initiallyHidden]="true"
|
|
2406
|
+
(hiddenChanged)="handleHiddenChanged($event, notification.id)"
|
|
2407
|
+
>
|
|
2408
|
+
<!-- Actions slot content for the custom element -->
|
|
2409
|
+
<div
|
|
2410
|
+
slot="actions"
|
|
2411
|
+
class="flex gap-2"
|
|
2412
|
+
*ngIf="notification.actions?.length || notification.actionSlot"
|
|
2413
|
+
>
|
|
2414
|
+
<!-- Config-driven actions -->
|
|
2415
|
+
<nv-button
|
|
2416
|
+
*ngFor="let action of notification.actions"
|
|
2417
|
+
emphasis="low"
|
|
2418
|
+
size="sm"
|
|
2419
|
+
(click)="action.onClick()"
|
|
2420
|
+
>
|
|
2421
|
+
{{ action.label }}
|
|
2422
|
+
</nv-button>
|
|
2423
|
+
|
|
2424
|
+
<!-- Component-driven actions -->
|
|
2425
|
+
<ng-container
|
|
2426
|
+
*ngIf="notification.actionSlot"
|
|
2427
|
+
[ngComponentOutlet]="notification.actionSlot"
|
|
2428
|
+
></ng-container>
|
|
2429
|
+
</div>
|
|
2430
|
+
</nv-notification>
|
|
2431
|
+
</nv-notificationcontainer>
|
|
2432
|
+
`,
|
|
2433
|
+
}]
|
|
2434
|
+
}], ctorParameters: () => [{ type: NotificationService }], propDecorators: { position: [{
|
|
2435
|
+
type: Input
|
|
2436
|
+
}], className: [{
|
|
2437
|
+
type: Input
|
|
2438
|
+
}], notificationEls: [{
|
|
2439
|
+
type: ViewChildren,
|
|
2440
|
+
args: ['notificationEl', { read: ElementRef }]
|
|
2441
|
+
}] } });
|
|
2442
|
+
|
|
2042
2443
|
/*
|
|
2043
2444
|
* Public API Surface of nova-components
|
|
2044
2445
|
*/
|
|
@@ -2047,5 +2448,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2047
2448
|
* Generated bundle index. Do not edit.
|
|
2048
2449
|
*/
|
|
2049
2450
|
|
|
2050
|
-
export { NovaComponentsModule, NovaComponentsValueAccessorModule, NvAccordion, NvAccordionItem, NvAlert, NvAlertValueAccessor, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCalendarValueAccessor, NvCol, NvDatagrid, NvDatagridValueAccessor, NvDatagridcolumn, NvDialog, NvDialogValueAccessor, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFieldcheckboxValueAccessor, NvFielddate, NvFielddateValueAccessor, NvFielddaterange, NvFielddaterangeValueAccessor, NvFielddropdown, NvFielddropdownValueAccessor, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldmultiselectValueAccessor, NvFieldnumber, NvFieldnumberValueAccessor, NvFieldpassword, NvFieldpasswordValueAccessor, NvFieldradio, NvFieldradioValueAccessor, NvFieldselect, NvFieldselectValueAccessor, NvFieldslider, NvFieldsliderValueAccessor, NvFieldtext, NvFieldtextValueAccessor, NvFieldtextarea, NvFieldtextareaValueAccessor, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvPopover, NvPopoverValueAccessor, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvToggleValueAccessor, NvTogglebutton, NvTogglebuttongroup, NvTogglebuttongroupValueAccessor, NvTooltip, VALUE_ACCESSORS, provideNovaComponents };
|
|
2451
|
+
export { NotificationService, NotificationServiceComponent, NovaComponentsModule, NovaComponentsValueAccessorModule, NvAccordion, NvAccordionItem, NvAlert, NvAlertValueAccessor, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCalendarValueAccessor, NvCol, NvDatagrid, NvDatagridValueAccessor, NvDatagridcolumn, NvDialog, NvDialogValueAccessor, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFieldcheckboxValueAccessor, NvFielddate, NvFielddateValueAccessor, NvFielddaterange, NvFielddaterangeValueAccessor, NvFielddropdown, NvFielddropdownValueAccessor, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldmultiselectValueAccessor, NvFieldnumber, NvFieldnumberValueAccessor, NvFieldpassword, NvFieldpasswordValueAccessor, NvFieldradio, NvFieldradioValueAccessor, NvFieldselect, NvFieldselectValueAccessor, NvFieldslider, NvFieldsliderValueAccessor, NvFieldtext, NvFieldtextValueAccessor, NvFieldtextarea, NvFieldtextareaValueAccessor, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationValueAccessor, NvNotificationcontainer, NvPopover, NvPopoverValueAccessor, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvToggleValueAccessor, NvTogglebutton, NvTogglebuttongroup, NvTogglebuttongroupValueAccessor, NvTooltip, VALUE_ACCESSORS, provideNovaComponents };
|
|
2051
2452
|
//# sourceMappingURL=nova-components.mjs.map
|