@nova-design-system/nova-angular-19 3.14.0 → 3.16.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.
Files changed (22) hide show
  1. package/dist/nova-components/fesm2022/nova-components.mjs +1268 -44
  2. package/dist/nova-components/fesm2022/nova-components.mjs.map +1 -1
  3. package/dist/nova-components/lib/components/datatable.utils/flex-render/context.d.ts +3 -0
  4. package/dist/nova-components/lib/components/datatable.utils/flex-render/flags.d.ts +40 -0
  5. package/dist/nova-components/lib/components/datatable.utils/flex-render/flex-render-component-ref.d.ts +39 -0
  6. package/dist/nova-components/lib/components/datatable.utils/flex-render/flex-render-component.d.ts +60 -0
  7. package/dist/nova-components/lib/components/datatable.utils/flex-render/view.d.ts +49 -0
  8. package/dist/nova-components/lib/components/datatable.utils/flex-render.d.ts +26 -0
  9. package/dist/nova-components/lib/components/datatable.utils/index.d.ts +6 -0
  10. package/dist/nova-components/lib/components/datatable.utils/lazy-signal-initializer.d.ts +5 -0
  11. package/dist/nova-components/lib/components/datatable.utils/proxy.d.ts +3 -0
  12. package/dist/nova-components/lib/components/index.d.ts +1 -0
  13. package/dist/nova-components/lib/components/nv-datatable.component.d.ts +46 -0
  14. package/dist/nova-components/lib/nova-components.module.d.ts +4 -3
  15. package/dist/nova-components/lib/providers/index.d.ts +2 -0
  16. package/dist/nova-components/lib/providers/notification-service.component.d.ts +56 -0
  17. package/dist/nova-components/lib/providers/notification.service.d.ts +116 -0
  18. package/dist/nova-components/lib/stencil-generated/component-value-accessors.d.ts +8 -1
  19. package/dist/nova-components/lib/stencil-generated/components.d.ts +13 -22
  20. package/dist/nova-components/lib/stencil-generated/index.d.ts +1 -1
  21. package/dist/nova-components/public-api.d.ts +2 -0
  22. package/package.json +6 -3
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const FlexRenderComponentProps: InjectionToken<{}>;
3
+ export declare function injectFlexRenderContext<T extends NonNullable<unknown>>(): T;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Flags used to manage and optimize the rendering lifecycle of content of the cell,
3
+ * while using FlexRenderDirective.
4
+ */
5
+ export declare enum FlexRenderFlags {
6
+ /**
7
+ * Indicates that the view is being created for the first time or will be cleared during the next update phase.
8
+ * This is the initial state and will transition after the first ngDoCheck.
9
+ */
10
+ ViewFirstRender = 1,
11
+ /**
12
+ * Represents a state where the view is not dirty, meaning no changes require rendering updates.
13
+ */
14
+ Pristine = 2,
15
+ /**
16
+ * Indicates the `content` property has been modified or the view requires a complete re-render.
17
+ * When this flag is enabled, the view will be cleared and recreated from scratch.
18
+ */
19
+ ContentChanged = 4,
20
+ /**
21
+ * Indicates that the `props` property reference has changed.
22
+ * When this flag is enabled, the view context is updated based on the type of the content.
23
+ *
24
+ * For Component view, inputs will be updated and view will be marked as dirty.
25
+ * For TemplateRef and primitive values, view will be marked as dirty
26
+ */
27
+ PropsReferenceChanged = 8,
28
+ /**
29
+ * Indicates that the current rendered view needs to be checked for changes.
30
+ */
31
+ DirtyCheck = 16,
32
+ /**
33
+ * Indicates that a signal within the `content(props)` result has changed
34
+ */
35
+ DirtySignal = 32,
36
+ /**
37
+ * Indicates that the first render effect has been checked at least one time.
38
+ */
39
+ RenderEffectChecked = 64
40
+ }
@@ -0,0 +1,39 @@
1
+ import { ComponentRef, Injector, OutputEmitterRef } from '@angular/core';
2
+ import { FlexRenderComponent } from './flex-render-component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FlexRenderComponentFactory {
5
+ #private;
6
+ createComponent<T>(flexRenderComponent: FlexRenderComponent<T>, componentInjector: Injector): FlexRenderComponentRef<T>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlexRenderComponentFactory, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<FlexRenderComponentFactory>;
9
+ }
10
+ export declare class FlexRenderComponentRef<T> {
11
+ #private;
12
+ readonly componentRef: ComponentRef<T>;
13
+ readonly componentInjector: Injector;
14
+ constructor(componentRef: ComponentRef<T>, componentData: FlexRenderComponent<T>, componentInjector: Injector);
15
+ get component(): import("@angular/core").Type<T>;
16
+ get inputs(): {};
17
+ get outputs(): {};
18
+ /**
19
+ * Get component input and output diff by the given item
20
+ */
21
+ diff(item: FlexRenderComponent<T>): {
22
+ inputDiff: import("@angular/core").KeyValueChanges<string, unknown> | null;
23
+ outputDiff: import("@angular/core").KeyValueChanges<string, ((value: unknown) => void) | null | undefined> | null;
24
+ };
25
+ /**
26
+ *
27
+ * @param compare Whether the current ref component instance is the same as the given one
28
+ */
29
+ eqType(compare: FlexRenderComponent<T>): boolean;
30
+ /**
31
+ * Tries to update current component refs input by the new given content component.
32
+ */
33
+ update(content: FlexRenderComponent<T>): void;
34
+ markAsDirty(): void;
35
+ setInputs(inputs: Record<string, unknown>): void;
36
+ setInput(key: string, value: unknown): void;
37
+ setOutputs(outputs: Record<string, OutputEmitterRef<unknown>['emit'] | null | undefined>): void;
38
+ setOutput(outputName: string, emit: OutputEmitterRef<unknown>['emit'] | undefined | null): void;
39
+ }
@@ -0,0 +1,60 @@
1
+ import { ComponentMirror, Injector, InputSignal, OutputEmitterRef, Type } from '@angular/core';
2
+ type Inputs<T> = {
3
+ [K in keyof T as T[K] extends InputSignal<infer R> ? K : never]?: T[K] extends InputSignal<infer R> ? R : never;
4
+ };
5
+ type Outputs<T> = {
6
+ [K in keyof T as T[K] extends OutputEmitterRef<infer R> ? K : never]?: T[K] extends OutputEmitterRef<infer R> ? OutputEmitterRef<R>['emit'] : never;
7
+ };
8
+ type OptionalKeys<T, K = keyof T> = K extends keyof T ? T[K] extends Required<T>[K] ? undefined extends T[K] ? K : never : K : never;
9
+ interface FlexRenderRequiredOptions<TInputs extends Record<string, any>, TOutputs extends Record<string, any>> {
10
+ /**
11
+ * Component instance inputs. They will be set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput)
12
+ */
13
+ inputs: TInputs;
14
+ /**
15
+ * Component instance outputs.
16
+ */
17
+ outputs?: TOutputs;
18
+ /**
19
+ * Optional {@link Injector} that will be used when rendering the component
20
+ */
21
+ injector?: Injector;
22
+ }
23
+ interface FlexRenderOptions<TInputs extends Record<string, any>, TOutputs extends Record<string, any>> {
24
+ /**
25
+ * Component instance inputs. They will be set via [componentRef.setInput API](https://angular.dev/api/core/ComponentRef#setInput)
26
+ */
27
+ inputs?: TInputs;
28
+ /**
29
+ * Component instance outputs.
30
+ */
31
+ outputs?: TOutputs;
32
+ /**
33
+ * Optional {@link Injector} that will be used when rendering the component
34
+ */
35
+ injector?: Injector;
36
+ }
37
+ /**
38
+ * Helper function to create a [@link FlexRenderComponent] instance, with better type-safety.
39
+ *
40
+ * - options object must be passed when the given component instance contains at least one required signal input.
41
+ * - options/inputs is typed with the given component inputs
42
+ * - options/outputs is typed with the given component outputs
43
+ */
44
+ export declare function flexRenderComponent<TComponent = any, TInputs extends Inputs<TComponent> = Inputs<TComponent>, TOutputs extends Outputs<TComponent> = Outputs<TComponent>>(component: Type<TComponent>, ...options: OptionalKeys<TInputs> extends never ? [FlexRenderOptions<TInputs, TOutputs>?] : [FlexRenderRequiredOptions<TInputs, TOutputs>]): FlexRenderComponent<TComponent>;
45
+ /**
46
+ * Wrapper class for a component that will be used as content for {@link FlexRenderDirective}
47
+ *
48
+ * Prefer {@link flexRenderComponent} helper for better type-safety
49
+ */
50
+ export declare class FlexRenderComponent<TComponent = any> {
51
+ readonly component: Type<TComponent>;
52
+ readonly inputs?: Inputs<TComponent> | undefined;
53
+ readonly injector?: Injector | undefined;
54
+ readonly outputs?: Outputs<TComponent> | undefined;
55
+ readonly mirror: ComponentMirror<TComponent>;
56
+ readonly allowedInputNames: string[];
57
+ readonly allowedOutputNames: string[];
58
+ constructor(component: Type<TComponent>, inputs?: Inputs<TComponent> | undefined, injector?: Injector | undefined, outputs?: Outputs<TComponent> | undefined);
59
+ }
60
+ export {};
@@ -0,0 +1,49 @@
1
+ import { FlexRenderComponentRef } from './flex-render-component-ref';
2
+ import { EmbeddedViewRef, TemplateRef, Type } from '@angular/core';
3
+ import type { FlexRenderContent } from '../flex-render';
4
+ import { FlexRenderComponent } from './flex-render-component';
5
+ export type FlexRenderTypedContent = {
6
+ kind: 'null';
7
+ } | {
8
+ kind: 'primitive';
9
+ content: string | number | Record<string, any>;
10
+ } | {
11
+ kind: 'flexRenderComponent';
12
+ content: FlexRenderComponent<unknown>;
13
+ } | {
14
+ kind: 'templateRef';
15
+ content: TemplateRef<unknown>;
16
+ } | {
17
+ kind: 'component';
18
+ content: Type<unknown>;
19
+ };
20
+ export declare function mapToFlexRenderTypedContent(content: FlexRenderContent<any>): FlexRenderTypedContent;
21
+ export declare abstract class FlexRenderView<TView extends FlexRenderComponentRef<any> | EmbeddedViewRef<unknown> | null> {
22
+ #private;
23
+ readonly view: TView;
24
+ protected constructor(initialContent: Exclude<FlexRenderTypedContent, {
25
+ kind: 'null';
26
+ }>, view: TView);
27
+ get previousContent(): FlexRenderTypedContent;
28
+ get content(): FlexRenderTypedContent;
29
+ set content(content: FlexRenderTypedContent);
30
+ abstract updateProps(props: Record<string, any>): void;
31
+ abstract dirtyCheck(): void;
32
+ abstract onDestroy(callback: Function): void;
33
+ }
34
+ export declare class FlexRenderTemplateView extends FlexRenderView<EmbeddedViewRef<unknown>> {
35
+ constructor(initialContent: Extract<FlexRenderTypedContent, {
36
+ kind: 'primitive' | 'templateRef';
37
+ }>, view: EmbeddedViewRef<unknown>);
38
+ updateProps(props: Record<string, any>): void;
39
+ dirtyCheck(): void;
40
+ onDestroy(callback: Function): void;
41
+ }
42
+ export declare class FlexRenderComponentView extends FlexRenderView<FlexRenderComponentRef<unknown>> {
43
+ constructor(initialContent: Extract<FlexRenderTypedContent, {
44
+ kind: 'component' | 'flexRenderComponent';
45
+ }>, view: FlexRenderComponentRef<unknown>);
46
+ updateProps(props: Record<string, any>): void;
47
+ dirtyCheck(): void;
48
+ onDestroy(callback: Function): void;
49
+ }
@@ -0,0 +1,26 @@
1
+ import { DoCheck, Injector, OnChanges, SimpleChanges, TemplateRef, Type, ViewContainerRef } from '@angular/core';
2
+ import { FlexRenderFlags } from './flex-render/flags';
3
+ import { FlexRenderComponent } from './flex-render/flex-render-component';
4
+ import { FlexRenderView } from './flex-render/view';
5
+ import * as i0 from "@angular/core";
6
+ export { injectFlexRenderContext, type FlexRenderComponentProps, } from './flex-render/context';
7
+ export type FlexRenderContent<TProps extends NonNullable<unknown>> = string | number | Type<TProps> | FlexRenderComponent<TProps> | TemplateRef<{
8
+ $implicit: TProps;
9
+ }> | null | Record<any, any> | undefined;
10
+ export declare class FlexRenderDirective<TProps extends NonNullable<unknown>> implements OnChanges, DoCheck {
11
+ #private;
12
+ private readonly viewContainerRef;
13
+ private readonly templateRef;
14
+ content: number | string | ((props: TProps) => FlexRenderContent<TProps>) | null | undefined;
15
+ props: TProps;
16
+ injector: Injector;
17
+ renderFlags: FlexRenderFlags;
18
+ renderView: FlexRenderView<any> | null;
19
+ constructor(viewContainerRef: ViewContainerRef, templateRef: TemplateRef<any>);
20
+ ngOnChanges(changes: SimpleChanges): void;
21
+ ngDoCheck(): void;
22
+ update(): void;
23
+ render(): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlexRenderDirective<any>, never>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FlexRenderDirective<any>, "[flexRender]", never, { "content": { "alias": "flexRender"; "required": true; }; "props": { "alias": "flexRenderProps"; "required": true; }; "injector": { "alias": "flexRenderInjector"; "required": false; }; }, {}, never, never, true, never>;
26
+ }
@@ -0,0 +1,6 @@
1
+ import { type Signal } from '@angular/core';
2
+ import { RowData, TableOptions, type Table } from '@tanstack/table-core';
3
+ export * from '@tanstack/table-core';
4
+ export { type FlexRenderContent, FlexRenderDirective, FlexRenderDirective as FlexRender, injectFlexRenderContext, type FlexRenderComponentProps, } from './flex-render';
5
+ export { FlexRenderComponent, flexRenderComponent, } from './flex-render/flex-render-component';
6
+ export declare function createAngularTable<TData extends RowData>(options: () => TableOptions<TData>): Table<TData> & Signal<Table<TData>>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Implementation from @tanstack/angular-query
3
+ * {@link https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/util/lazy-init/lazy-init.ts}
4
+ */
5
+ export declare function lazyInit<T extends object>(initializer: () => T): T;
@@ -0,0 +1,3 @@
1
+ import { type Signal } from '@angular/core';
2
+ import { type Table } from '@tanstack/table-core';
3
+ export declare function proxifyTable<T>(tableSignal: Signal<Table<T>>): Table<T> & Signal<Table<T>>;
@@ -0,0 +1 @@
1
+ export * from './nv-datatable.component';
@@ -0,0 +1,46 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { type FlexRenderComponent, type ColumnDef, type CellContext } from './datatable.utils';
3
+ import * as i0 from "@angular/core";
4
+ export type { CellContext as NvDatatableCellContext };
5
+ export { flexRenderComponent as nvDatatableRenderComponent } from './datatable.utils';
6
+ /** Type definition for a datatable row. */
7
+ export type NvDatatableRow = Record<string, string | number | boolean | null | undefined | typeof Date>;
8
+ /** Parameters for custom cell rendering function. */
9
+ export interface NvTableRenderCellParams<T extends NvDatatableRow, V> {
10
+ value: V;
11
+ row: T;
12
+ field: keyof T;
13
+ rowIndex: number;
14
+ }
15
+ /** Column definition for NvDatatable. */
16
+ export interface NvDatatableColumn<T extends NvDatatableRow> {
17
+ field: keyof T;
18
+ headerName?: string;
19
+ width?: number;
20
+ resizable?: boolean;
21
+ hidden?: boolean;
22
+ /**
23
+ * Custom cell renderer function that can return either a string or Angular TemplateRef.
24
+ * Use `$implicit` in your template to receive the CellContext.
25
+ */
26
+ renderCell?: (context: CellContext<T, unknown>) => string | FlexRenderComponent | TemplateRef<{
27
+ $implicit: CellContext<T, unknown>;
28
+ }>;
29
+ }
30
+ /**
31
+ * Nova Datatable built on TanStack Table (Angular).
32
+ */
33
+ export declare class NvDatatable<T extends NvDatatableRow = NvDatatableRow> {
34
+ /** Column definitions */
35
+ columns: import("@angular/core").InputSignal<NvDatatableColumn<T>[]>;
36
+ /** Row data */
37
+ rows: import("@angular/core").InputSignal<T[]>;
38
+ /** Computed table columns with proper typing and filtering. */
39
+ tableColumns: import("@angular/core").Signal<ColumnDef<T>[]>;
40
+ /** TanStack table instance with Signals */
41
+ private tableInstance;
42
+ /** Public getter for table instance. */
43
+ table(): import("@tanstack/table-core").Table<T>;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<NvDatatable<any>, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<NvDatatable<any>, "nv-datatable", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
46
+ }
@@ -1,13 +1,14 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./stencil-generated/components";
3
- import * as i2 from "./stencil-generated/component-value-accessors";
3
+ import * as i2 from "./components/nv-datatable.component";
4
+ import * as i3 from "./stencil-generated/component-value-accessors";
4
5
  export declare class NovaComponentsModule {
5
6
  static ɵfac: i0.ɵɵFactoryDeclaration<NovaComponentsModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<NovaComponentsModule, [typeof i1.NvAccordion, typeof i1.NvAccordionItem, typeof i1.NvAlert, typeof i1.NvAvatar, typeof i1.NvBadge, typeof i1.NvBreadcrumb, typeof i1.NvBreadcrumbs, typeof i1.NvButton, typeof i1.NvButtongroup, typeof i1.NvCalendar, typeof i1.NvCol, typeof i1.NvDatagrid, typeof i1.NvDatagridcolumn, typeof i1.NvDialog, typeof i1.NvDialogfooter, typeof i1.NvDialogheader, typeof i1.NvFieldcheckbox, typeof i1.NvFielddate, typeof i1.NvFielddaterange, typeof i1.NvFielddropdown, typeof i1.NvFielddropdownitem, typeof i1.NvFielddropdownitemcheck, typeof i1.NvFieldmultiselect, typeof i1.NvFieldnumber, typeof i1.NvFieldpassword, typeof i1.NvFieldradio, typeof i1.NvFieldselect, typeof i1.NvFieldslider, typeof i1.NvFieldtext, typeof i1.NvFieldtextarea, typeof i1.NvFieldtime, typeof i1.NvIcon, typeof i1.NvIconbutton, typeof i1.NvLoader, typeof i1.NvMenu, typeof i1.NvMenuitem, typeof i1.NvNotification, typeof i1.NvPopover, typeof i1.NvRow, typeof i1.NvStack, typeof i1.NvTable, typeof i1.NvTablecolumn, typeof i1.NvToggle, typeof i1.NvTogglebutton, typeof i1.NvTogglebuttongroup, typeof i1.NvTooltip], never, [typeof i1.NvAccordion, typeof i1.NvAccordionItem, typeof i1.NvAlert, typeof i1.NvAvatar, typeof i1.NvBadge, typeof i1.NvBreadcrumb, typeof i1.NvBreadcrumbs, typeof i1.NvButton, typeof i1.NvButtongroup, typeof i1.NvCalendar, typeof i1.NvCol, typeof i1.NvDatagrid, typeof i1.NvDatagridcolumn, typeof i1.NvDialog, typeof i1.NvDialogfooter, typeof i1.NvDialogheader, typeof i1.NvFieldcheckbox, typeof i1.NvFielddate, typeof i1.NvFielddaterange, typeof i1.NvFielddropdown, typeof i1.NvFielddropdownitem, typeof i1.NvFielddropdownitemcheck, typeof i1.NvFieldmultiselect, typeof i1.NvFieldnumber, typeof i1.NvFieldpassword, typeof i1.NvFieldradio, typeof i1.NvFieldselect, typeof i1.NvFieldslider, typeof i1.NvFieldtext, typeof i1.NvFieldtextarea, typeof i1.NvFieldtime, typeof i1.NvIcon, typeof i1.NvIconbutton, typeof i1.NvLoader, typeof i1.NvMenu, typeof i1.NvMenuitem, typeof i1.NvNotification, typeof i1.NvPopover, typeof i1.NvRow, typeof i1.NvStack, typeof i1.NvTable, typeof i1.NvTablecolumn, typeof i1.NvToggle, typeof i1.NvTogglebutton, typeof i1.NvTogglebuttongroup, typeof i1.NvTooltip]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NovaComponentsModule, [typeof i1.NvAccordion, typeof i1.NvAccordionItem, typeof i1.NvAlert, typeof i1.NvAvatar, typeof i1.NvBadge, typeof i1.NvBreadcrumb, typeof i1.NvBreadcrumbs, typeof i1.NvButton, typeof i1.NvButtongroup, typeof i1.NvCalendar, typeof i1.NvCol, typeof i1.NvDatagrid, typeof i1.NvDatagridcolumn, typeof i1.NvDialog, typeof i1.NvDialogfooter, typeof i1.NvDialogheader, typeof i1.NvFieldcheckbox, typeof i1.NvFielddate, typeof i1.NvFielddaterange, typeof i1.NvFielddropdown, typeof i1.NvFielddropdownitem, typeof i1.NvFielddropdownitemcheck, typeof i1.NvFieldmultiselect, typeof i1.NvFieldnumber, typeof i1.NvFieldpassword, typeof i1.NvFieldradio, typeof i1.NvFieldselect, typeof i1.NvFieldslider, typeof i1.NvFieldtext, typeof i1.NvFieldtextarea, typeof i1.NvFieldtime, typeof i1.NvIcon, typeof i1.NvIconbutton, typeof i1.NvLoader, typeof i1.NvMenu, typeof i1.NvMenuitem, typeof i1.NvNotification, typeof i1.NvNotificationcontainer, typeof i1.NvPopover, typeof i1.NvRow, typeof i1.NvStack, typeof i1.NvTable, typeof i1.NvToggle, typeof i1.NvTogglebutton, typeof i1.NvTogglebuttongroup, typeof i1.NvTooltip], [typeof i2.NvDatatable], [typeof i1.NvAccordion, typeof i1.NvAccordionItem, typeof i1.NvAlert, typeof i1.NvAvatar, typeof i1.NvBadge, typeof i1.NvBreadcrumb, typeof i1.NvBreadcrumbs, typeof i1.NvButton, typeof i1.NvButtongroup, typeof i1.NvCalendar, typeof i1.NvCol, typeof i1.NvDatagrid, typeof i1.NvDatagridcolumn, typeof i1.NvDialog, typeof i1.NvDialogfooter, typeof i1.NvDialogheader, typeof i1.NvFieldcheckbox, typeof i1.NvFielddate, typeof i1.NvFielddaterange, typeof i1.NvFielddropdown, typeof i1.NvFielddropdownitem, typeof i1.NvFielddropdownitemcheck, typeof i1.NvFieldmultiselect, typeof i1.NvFieldnumber, typeof i1.NvFieldpassword, typeof i1.NvFieldradio, typeof i1.NvFieldselect, typeof i1.NvFieldslider, typeof i1.NvFieldtext, typeof i1.NvFieldtextarea, typeof i1.NvFieldtime, typeof i1.NvIcon, typeof i1.NvIconbutton, typeof i1.NvLoader, typeof i1.NvMenu, typeof i1.NvMenuitem, typeof i1.NvNotification, typeof i1.NvNotificationcontainer, typeof i1.NvPopover, typeof i1.NvRow, typeof i1.NvStack, typeof i1.NvTable, typeof i1.NvToggle, typeof i1.NvTogglebutton, typeof i1.NvTogglebuttongroup, typeof i1.NvTooltip, typeof i2.NvDatatable]>;
7
8
  static ɵinj: i0.ɵɵInjectorDeclaration<NovaComponentsModule>;
8
9
  }
9
10
  export declare class NovaComponentsValueAccessorModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<NovaComponentsValueAccessorModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<NovaComponentsValueAccessorModule, never, [typeof i2.NvAlertValueAccessor, typeof i2.NvCalendarValueAccessor, typeof i2.NvDatagridValueAccessor, typeof i2.NvDialogValueAccessor, typeof i2.NvFieldcheckboxValueAccessor, typeof i2.NvFielddateValueAccessor, typeof i2.NvFielddaterangeValueAccessor, typeof i2.NvFielddropdownValueAccessor, typeof i2.NvFieldmultiselectValueAccessor, typeof i2.NvFieldnumberValueAccessor, typeof i2.NvFieldpasswordValueAccessor, typeof i2.NvFieldradioValueAccessor, typeof i2.NvFieldselectValueAccessor, typeof i2.NvFieldsliderValueAccessor, typeof i2.NvFieldtextValueAccessor, typeof i2.NvFieldtextareaValueAccessor, typeof i2.NvNotificationValueAccessor, typeof i2.NvPopoverValueAccessor, typeof i2.NvToggleValueAccessor, typeof i2.NvTogglebuttongroupValueAccessor], [typeof i2.NvAlertValueAccessor, typeof i2.NvCalendarValueAccessor, typeof i2.NvDatagridValueAccessor, typeof i2.NvDialogValueAccessor, typeof i2.NvFieldcheckboxValueAccessor, typeof i2.NvFielddateValueAccessor, typeof i2.NvFielddaterangeValueAccessor, typeof i2.NvFielddropdownValueAccessor, typeof i2.NvFieldmultiselectValueAccessor, typeof i2.NvFieldnumberValueAccessor, typeof i2.NvFieldpasswordValueAccessor, typeof i2.NvFieldradioValueAccessor, typeof i2.NvFieldselectValueAccessor, typeof i2.NvFieldsliderValueAccessor, typeof i2.NvFieldtextValueAccessor, typeof i2.NvFieldtextareaValueAccessor, typeof i2.NvNotificationValueAccessor, typeof i2.NvPopoverValueAccessor, typeof i2.NvToggleValueAccessor, typeof i2.NvTogglebuttongroupValueAccessor]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NovaComponentsValueAccessorModule, never, [typeof i3.NvAccordionValueAccessor, typeof i3.NvAlertValueAccessor, typeof i3.NvCalendarValueAccessor, typeof i3.NvDatagridValueAccessor, typeof i3.NvDialogValueAccessor, typeof i3.NvFieldcheckboxValueAccessor, typeof i3.NvFielddateValueAccessor, typeof i3.NvFielddaterangeValueAccessor, typeof i3.NvFielddropdownValueAccessor, typeof i3.NvFieldmultiselectValueAccessor, typeof i3.NvFieldnumberValueAccessor, typeof i3.NvFieldpasswordValueAccessor, typeof i3.NvFieldradioValueAccessor, typeof i3.NvFieldselectValueAccessor, typeof i3.NvFieldsliderValueAccessor, typeof i3.NvFieldtextValueAccessor, typeof i3.NvFieldtextareaValueAccessor, typeof i3.NvNotificationValueAccessor, typeof i3.NvPopoverValueAccessor, typeof i3.NvToggleValueAccessor, typeof i3.NvTogglebuttongroupValueAccessor], [typeof i3.NvAccordionValueAccessor, typeof i3.NvAlertValueAccessor, typeof i3.NvCalendarValueAccessor, typeof i3.NvDatagridValueAccessor, typeof i3.NvDialogValueAccessor, typeof i3.NvFieldcheckboxValueAccessor, typeof i3.NvFielddateValueAccessor, typeof i3.NvFielddaterangeValueAccessor, typeof i3.NvFielddropdownValueAccessor, typeof i3.NvFieldmultiselectValueAccessor, typeof i3.NvFieldnumberValueAccessor, typeof i3.NvFieldpasswordValueAccessor, typeof i3.NvFieldradioValueAccessor, typeof i3.NvFieldselectValueAccessor, typeof i3.NvFieldsliderValueAccessor, typeof i3.NvFieldtextValueAccessor, typeof i3.NvFieldtextareaValueAccessor, typeof i3.NvNotificationValueAccessor, typeof i3.NvPopoverValueAccessor, typeof i3.NvToggleValueAccessor, typeof i3.NvTogglebuttongroupValueAccessor]>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<NovaComponentsValueAccessorModule>;
13
14
  }
@@ -0,0 +1,2 @@
1
+ export * from './notification.service';
2
+ export * from './notification-service.component';
@@ -0,0 +1,56 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { NotificationService, type Notification } from './notification.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular component that renders the notification container with active notifications.
6
+ */
7
+ export declare class NotificationServiceComponent implements OnInit, OnDestroy {
8
+ private notificationService;
9
+ /**
10
+ * Position of the notification container on the screen.
11
+ */
12
+ position?: string;
13
+ /**
14
+ * Additional CSS class name for the notification container.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Array of active notifications.
19
+ */
20
+ notifications: Notification[];
21
+ /**
22
+ * References to the notification elements.
23
+ */
24
+ private notificationEls;
25
+ private subscription?;
26
+ constructor(notificationService: NotificationService);
27
+ /**
28
+ * Component initialization.
29
+ */
30
+ ngOnInit(): void;
31
+ /**
32
+ * Synchronize notification elements/refs with the service.
33
+ */
34
+ ngAfterViewInit(): void;
35
+ /**
36
+ * Component cleanup.
37
+ */
38
+ ngOnDestroy(): void;
39
+ /**
40
+ * Track function for ngFor to optimize rendering.
41
+ *
42
+ * @param {number} index The index of the item
43
+ * @param {Notification} notification The notification item
44
+ * @returns {string} The notification ID
45
+ */
46
+ trackByNotificationId(index: number, notification: Notification): string | undefined;
47
+ /**
48
+ * Handle notification hidden state change.
49
+ *
50
+ * @param {CustomEvent<boolean>} event The hidden changed event
51
+ * @param {string} id The notification ID
52
+ */
53
+ handleHiddenChanged(event: CustomEvent<boolean>, id?: string): void;
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationServiceComponent, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationServiceComponent, "nv-notification-service", never, { "position": { "alias": "position"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, never, true, never>;
56
+ }
@@ -0,0 +1,116 @@
1
+ import { type Type } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { NotificationEmphasis, FeedbackColors } from '@nova-design-system/nova-webcomponents';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Action callbacks for notifications. Will render buttons automatically.
7
+ */
8
+ export interface NotificationAction {
9
+ /** The label of the action. */
10
+ label: string;
11
+ /** The callback to execute when the action is clicked. */
12
+ onClick: () => void;
13
+ }
14
+ /**
15
+ * Options for creating a notification.
16
+ */
17
+ export interface NotificationOptions {
18
+ /** Unique identifier for the notification. If not provided, one will be generated. */
19
+ id?: string;
20
+ /** Short and concise text for the notification heading. */
21
+ heading?: string;
22
+ /** Main content of the notification. */
23
+ message?: string;
24
+ /** Whether the notification can be manually dismissed via close button. */
25
+ dismissible?: boolean;
26
+ /** Adjusts the emphasis to make the notification more or less visually
27
+ * prominent to users. Use this to draw attention to important actions or
28
+ * reduce focus on less critical ones */
29
+ emphasis?: `${NotificationEmphasis}`;
30
+ /** Type of the notification, used to determine the color and default icon. */
31
+ feedback?: `${FeedbackColors}`;
32
+ /** Custom icon name to override the default icon. */
33
+ icon?: string;
34
+ /** Notification actions */
35
+ actions?: NotificationAction[];
36
+ /** Custom components for the notification actions. */
37
+ actionSlot?: Type<unknown>;
38
+ }
39
+ /**
40
+ * A notification with all required fields populated.
41
+ */
42
+ export interface Notification extends NotificationOptions {
43
+ /** Timestamp when the notification was created. */
44
+ createdAt: number;
45
+ }
46
+ /**
47
+ * Configuration options for the NotificationService.
48
+ */
49
+ export interface NotificationServiceConfig {
50
+ /** Position of the notification container on the screen. */
51
+ position?: string;
52
+ /** Maximum number of notifications to display at once. */
53
+ maxNotifications?: number;
54
+ /** Additional CSS class name for the notification container. */
55
+ className?: string;
56
+ }
57
+ /**
58
+ * Angular service for managing notifications.
59
+ */
60
+ export declare class NotificationService {
61
+ private readonly _notifications;
62
+ private readonly _config;
63
+ /**
64
+ * Observable stream of active notifications.
65
+ */
66
+ readonly notifications$: Observable<Notification[]>;
67
+ /**
68
+ * Current array of notifications.
69
+ *
70
+ * @returns {Notification[]} Array of active notifications
71
+ */
72
+ get notifications(): Notification[];
73
+ constructor();
74
+ /**
75
+ * Configure the notification service.
76
+ *
77
+ * @param {NotificationServiceConfig} config Configuration options
78
+ */
79
+ configure(config: NotificationServiceConfig): void;
80
+ /**
81
+ * Get the current configuration.
82
+ *
83
+ * @returns {Required<NotificationServiceConfig>} Current configuration
84
+ */
85
+ get config(): Required<NotificationServiceConfig>;
86
+ private elRefs;
87
+ registerRef(id: string, el: HTMLNvNotificationElement): void;
88
+ unregisterRef(id: string): void;
89
+ clearRefs(): void;
90
+ /**
91
+ * Show a new notification.
92
+ *
93
+ * @param {NotificationOptions} options The notification options
94
+ * @returns {string} The notification ID
95
+ */
96
+ show(options: NotificationOptions): string;
97
+ /**
98
+ * Dismiss a specific notification by ID. This will remove the notification
99
+ * after the animation completes.
100
+ *
101
+ * @param {string} id The notification ID to dismiss
102
+ */
103
+ dismiss(id: string): void;
104
+ /**
105
+ * Immediately remove a specific notification by ID.
106
+ *
107
+ * @param {string} id The notification ID to dismiss
108
+ */
109
+ remove(id: string): void;
110
+ /**
111
+ * Immediately remove all active notifications.
112
+ */
113
+ removeAll(): void;
114
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
115
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
116
+ }
@@ -1,6 +1,13 @@
1
1
  import { ElementRef } from '@angular/core';
2
2
  import { ValueAccessor } from '../value-accessor';
3
3
  import * as i0 from "@angular/core";
4
+ export declare class NvAccordionValueAccessor extends ValueAccessor {
5
+ constructor(el: ElementRef);
6
+ handleOpenIndexesChanged(event: any): void;
7
+ writeValue(value: any): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NvAccordionValueAccessor, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NvAccordionValueAccessor, "nv-accordion", never, {}, {}, never, never, true, never>;
10
+ }
4
11
  export declare class NvAlertValueAccessor extends ValueAccessor {
5
12
  constructor(el: ElementRef);
6
13
  handleHiddenChanged(event: any): void;
@@ -141,4 +148,4 @@ export declare class NvTogglebuttongroupValueAccessor extends ValueAccessor {
141
148
  static ɵfac: i0.ɵɵFactoryDeclaration<NvTogglebuttongroupValueAccessor, never>;
142
149
  static ɵdir: i0.ɵɵDirectiveDeclaration<NvTogglebuttongroupValueAccessor, "nv-togglebuttongroup", never, {}, {}, never, never, true, never>;
143
150
  }
144
- export declare const VALUE_ACCESSORS: (typeof NvAlertValueAccessor | typeof NvCalendarValueAccessor | typeof NvDatagridValueAccessor | typeof NvDialogValueAccessor | typeof NvFieldcheckboxValueAccessor)[];
151
+ export declare const VALUE_ACCESSORS: (typeof NvAccordionValueAccessor | typeof NvAlertValueAccessor | typeof NvCalendarValueAccessor | typeof NvDatagridValueAccessor | typeof NvDialogValueAccessor | typeof NvFieldcheckboxValueAccessor)[];
@@ -10,11 +10,9 @@ export declare class NvAccordion {
10
10
  }
11
11
  export declare interface NvAccordion extends Components.NvAccordion {
12
12
  /**
13
- * Event emitted when an item's open state changes
13
+ * Event emitted when an item's open state changes @bind openIndexes
14
14
  */
15
- openChanged: EventEmitter<CustomEvent<{
16
- openIndexes: number[];
17
- }>>;
15
+ openIndexesChanged: EventEmitter<CustomEvent<number[]>>;
18
16
  }
19
17
  export declare class NvAccordionItem {
20
18
  protected z: NgZone;
@@ -512,7 +510,7 @@ export declare class NvNotification {
512
510
  protected el: HTMLNvNotificationElement;
513
511
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
514
512
  static ɵfac: i0.ɵɵFactoryDeclaration<NvNotification, never>;
515
- static ɵcmp: i0.ɵɵComponentDeclaration<NvNotification, "nv-notification", never, { "dismissible": { "alias": "dismissible"; "required": false; }; "emphasis": { "alias": "emphasis"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "message": { "alias": "message"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; }, {}, never, ["*"], false, never>;
513
+ static ɵcmp: i0.ɵɵComponentDeclaration<NvNotification, "nv-notification", never, { "dismissible": { "alias": "dismissible"; "required": false; }; "emphasis": { "alias": "emphasis"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "initiallyHidden": { "alias": "initiallyHidden"; "required": false; }; "message": { "alias": "message"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; }, {}, never, ["*"], false, never>;
516
514
  }
517
515
  export declare interface NvNotification extends Components.NvNotification {
518
516
  /**
@@ -521,6 +519,15 @@ export declare interface NvNotification extends Components.NvNotification {
521
519
  */
522
520
  hiddenChanged: EventEmitter<CustomEvent<boolean>>;
523
521
  }
522
+ export declare class NvNotificationcontainer {
523
+ protected z: NgZone;
524
+ protected el: HTMLNvNotificationcontainerElement;
525
+ constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
526
+ static ɵfac: i0.ɵɵFactoryDeclaration<NvNotificationcontainer, never>;
527
+ static ɵcmp: i0.ɵɵComponentDeclaration<NvNotificationcontainer, "nv-notificationcontainer", never, { "position": { "alias": "position"; "required": false; }; }, {}, never, ["*"], false, never>;
528
+ }
529
+ export declare interface NvNotificationcontainer extends Components.NvNotificationcontainer {
530
+ }
524
531
  export declare class NvPopover {
525
532
  protected z: NgZone;
526
533
  protected el: HTMLNvPopoverElement;
@@ -557,25 +564,9 @@ export declare class NvTable {
557
564
  protected el: HTMLNvTableElement;
558
565
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
559
566
  static ɵfac: i0.ɵɵFactoryDeclaration<NvTable, never>;
560
- static ɵcmp: i0.ɵɵComponentDeclaration<NvTable, "nv-table", never, { "columnsConfig": { "alias": "columnsConfig"; "required": false; }; "columnsConfigJson": { "alias": "columnsConfigJson"; "required": false; }; "data": { "alias": "data"; "required": false; }; "dataJson": { "alias": "dataJson"; "required": false; }; "fallbackValue": { "alias": "fallbackValue"; "required": false; }; "noColumnsNoDataMessage": { "alias": "noColumnsNoDataMessage"; "required": false; }; "noDataMessage": { "alias": "noDataMessage"; "required": false; }; }, {}, never, ["*"], false, never>;
567
+ static ɵcmp: i0.ɵɵComponentDeclaration<NvTable, "nv-table", never, {}, {}, never, ["*"], false, never>;
561
568
  }
562
569
  export declare interface NvTable extends Components.NvTable {
563
- /**
564
- * *************************************************************************
565
- */
566
- action: EventEmitter<CustomEvent<{
567
- keyAction: string; /** * Details of the action to be performed */
568
- details: any;
569
- }>>;
570
- }
571
- export declare class NvTablecolumn {
572
- protected z: NgZone;
573
- protected el: HTMLNvTablecolumnElement;
574
- constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
575
- static ɵfac: i0.ɵɵFactoryDeclaration<NvTablecolumn, never>;
576
- static ɵcmp: i0.ɵɵComponentDeclaration<NvTablecolumn, "nv-tablecolumn", never, { "header": { "alias": "header"; "required": false; }; "name": { "alias": "name"; "required": true; }; }, {}, never, ["*"], false, never>;
577
- }
578
- export declare interface NvTablecolumn extends Components.NvTablecolumn {
579
570
  }
580
571
  export declare class NvToggle {
581
572
  protected z: NgZone;
@@ -1,2 +1,2 @@
1
1
  import * as d from './components';
2
- export declare const DIRECTIVES: (typeof d.NvAccordion | typeof d.NvAccordionItem | typeof d.NvAlert | typeof d.NvAvatar | typeof d.NvBadge | typeof d.NvBreadcrumb | typeof d.NvBreadcrumbs | typeof d.NvButton | typeof d.NvButtongroup | typeof d.NvCalendar | typeof d.NvCol | typeof d.NvDatagrid | typeof d.NvDatagridcolumn | typeof d.NvDialog | typeof d.NvDialogfooter | typeof d.NvDialogheader | typeof d.NvFieldcheckbox | typeof d.NvFielddate | typeof d.NvFielddaterange | typeof d.NvFielddropdown | typeof d.NvFielddropdownitem | typeof d.NvFielddropdownitemcheck | typeof d.NvFieldmultiselect | typeof d.NvFieldnumber | typeof d.NvFieldpassword | typeof d.NvFieldradio | typeof d.NvFieldselect | typeof d.NvFieldslider | typeof d.NvFieldtext | typeof d.NvFieldtextarea | typeof d.NvFieldtime | typeof d.NvIcon | typeof d.NvIconbutton | typeof d.NvLoader | typeof d.NvMenu | typeof d.NvMenuitem | typeof d.NvNotification | typeof d.NvPopover | typeof d.NvRow | typeof d.NvStack | typeof d.NvTable | typeof d.NvTablecolumn | typeof d.NvToggle | typeof d.NvTogglebutton | typeof d.NvTogglebuttongroup | typeof d.NvTooltip)[];
2
+ export declare const DIRECTIVES: (typeof d.NvAccordion | typeof d.NvAccordionItem | typeof d.NvAlert | typeof d.NvAvatar | typeof d.NvBadge | typeof d.NvBreadcrumb | typeof d.NvBreadcrumbs | typeof d.NvButton | typeof d.NvButtongroup | typeof d.NvCalendar | typeof d.NvCol | typeof d.NvDatagrid | typeof d.NvDatagridcolumn | typeof d.NvDialog | typeof d.NvDialogfooter | typeof d.NvDialogheader | typeof d.NvFieldcheckbox | typeof d.NvFielddate | typeof d.NvFielddaterange | typeof d.NvFielddropdown | typeof d.NvFielddropdownitem | typeof d.NvFielddropdownitemcheck | typeof d.NvFieldmultiselect | typeof d.NvFieldnumber | typeof d.NvFieldpassword | typeof d.NvFieldradio | typeof d.NvFieldselect | typeof d.NvFieldslider | typeof d.NvFieldtext | typeof d.NvFieldtextarea | typeof d.NvFieldtime | typeof d.NvIcon | typeof d.NvIconbutton | typeof d.NvLoader | typeof d.NvMenu | typeof d.NvMenuitem | typeof d.NvNotification | typeof d.NvNotificationcontainer | typeof d.NvPopover | typeof d.NvRow | typeof d.NvStack | typeof d.NvTable | typeof d.NvToggle | typeof d.NvTogglebutton | typeof d.NvTogglebuttongroup | typeof d.NvTooltip)[];
@@ -1,4 +1,6 @@
1
1
  export * from './lib/nova-components.module';
2
2
  export * from './lib/stencil-generated/components';
3
3
  export * from './lib/stencil-generated/component-value-accessors';
4
+ export * from './lib/providers';
5
+ export * from './lib/components';
4
6
  export * from '@nova-design-system/nova-webcomponents/constants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nova-design-system/nova-angular-19",
3
- "version": "3.14.0",
3
+ "version": "3.16.0",
4
4
  "description": "Nova is a design system created by Elia Group to empower creators to efficiently build solutions that people love to use.",
5
5
  "author": "Elia Group",
6
6
  "homepage": "https://nova.eliagroup.io",
@@ -12,10 +12,12 @@
12
12
  "scripts": {
13
13
  "ng": "ng",
14
14
  "start": "ng serve",
15
- "build": "ng build",
15
+ "build": "npm run copy:providers && npm run copy:components && ng build",
16
16
  "watch": "ng build --watch --configuration development",
17
17
  "test": "ng test",
18
- "clean": "rimraf dist .angular projects/nova-components/src/lib/stencil-generated",
18
+ "copy:components": "shx mkdir -p projects/nova-components/src/lib/components && shx cp -r ../angular/projects/nova-components/src/lib/components/* projects/nova-components/src/lib/components",
19
+ "copy:providers": "shx mkdir -p projects/nova-components/src/lib/providers && shx cp -r ../angular/projects/nova-components/src/lib/providers/* projects/nova-components/src/lib/providers",
20
+ "clean": "rimraf dist .angular projects/nova-components/src/lib/stencil-generated projects/nova-components/src/lib/providers projects/nova-components/src/lib/components projects/nova-components/src/stories/generated",
19
21
  "storybook": "ng run nova-components:storybook",
20
22
  "storybook.build": "ng run nova-components:storybook.build",
21
23
  "typecheck": "tsc --emitDeclarationOnly false --noEmit"
@@ -51,6 +53,7 @@
51
53
  "@angular/platform-browser": "19.1.5",
52
54
  "@angular/platform-browser-dynamic": "19.1.5",
53
55
  "@angular/router": "19.1.5",
56
+ "@tanstack/angular-table": "8.21.3",
54
57
  "rxjs": "~7.8.0",
55
58
  "tslib": "^2.3.0",
56
59
  "zone.js": "0.15.0"