ngx-kit 7.1.0 → 7.3.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 (73) hide show
  1. package/angle-selector/README.md +34 -34
  2. package/box-shadow/README.md +33 -33
  3. package/color-picker/README.md +52 -52
  4. package/{shared → core}/README.md +117 -117
  5. package/data-table/README.md +120 -120
  6. package/date-picker/README.md +74 -74
  7. package/dialog/README.md +122 -92
  8. package/drag-resize/README.md +53 -55
  9. package/fesm2022/ngx-kit-angle-selector.mjs +9 -26
  10. package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
  11. package/fesm2022/ngx-kit-box-shadow.mjs +330 -356
  12. package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
  13. package/fesm2022/ngx-kit-color-picker.mjs +132 -272
  14. package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
  15. package/fesm2022/{ngx-kit-shared.mjs → ngx-kit-core.mjs} +908 -277
  16. package/fesm2022/ngx-kit-core.mjs.map +1 -0
  17. package/fesm2022/ngx-kit-data-table.mjs +1 -1
  18. package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
  19. package/fesm2022/ngx-kit-date-picker.mjs +34 -22
  20. package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
  21. package/fesm2022/ngx-kit-dialog.mjs +430 -331
  22. package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
  23. package/fesm2022/ngx-kit-drag-resize.mjs +193 -140
  24. package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -1
  25. package/fesm2022/ngx-kit-drawer-menu.mjs +3 -3
  26. package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
  27. package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
  28. package/fesm2022/ngx-kit-form-field.mjs +9 -3
  29. package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
  30. package/fesm2022/ngx-kit-gallery.mjs +3 -3
  31. package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
  32. package/fesm2022/ngx-kit-gradient-picker.mjs +20 -38
  33. package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
  34. package/fesm2022/ngx-kit-grid-layout.mjs +32 -30
  35. package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -1
  36. package/fesm2022/ngx-kit-image-editor.mjs +3 -3
  37. package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
  38. package/fesm2022/ngx-kit-menu.mjs +1 -1
  39. package/fesm2022/ngx-kit-menu.mjs.map +1 -1
  40. package/fesm2022/ngx-kit-message.mjs +2 -2
  41. package/fesm2022/ngx-kit-message.mjs.map +1 -1
  42. package/fesm2022/ngx-kit-notify.mjs +1 -1
  43. package/fesm2022/ngx-kit-notify.mjs.map +1 -1
  44. package/fesm2022/ngx-kit-time-picker.mjs +1 -1
  45. package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
  46. package/fesm2022/ngx-kit-virtual-scroll.mjs +2 -2
  47. package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -1
  48. package/gallery/README.md +71 -71
  49. package/gradient-picker/README.md +41 -41
  50. package/grid-layout/README.md +64 -64
  51. package/image-editor/README.md +44 -44
  52. package/menu/README.md +85 -85
  53. package/message/README.md +70 -70
  54. package/notify/README.md +56 -56
  55. package/package.json +5 -9
  56. package/time-picker/README.md +89 -89
  57. package/types/ngx-kit-angle-selector.d.ts +13 -16
  58. package/types/ngx-kit-box-shadow.d.ts +37 -95
  59. package/types/ngx-kit-color-picker.d.ts +61 -58
  60. package/types/{ngx-kit-shared.d.ts → ngx-kit-core.d.ts} +194 -34
  61. package/types/ngx-kit-data-table.d.ts +2 -2
  62. package/types/ngx-kit-date-picker.d.ts +15 -12
  63. package/types/ngx-kit-dialog.d.ts +208 -107
  64. package/types/ngx-kit-drag-resize.d.ts +74 -47
  65. package/types/ngx-kit-form-field.d.ts +26 -23
  66. package/types/ngx-kit-gradient-picker.d.ts +4 -7
  67. package/types/ngx-kit-menu.d.ts +1 -1
  68. package/types/ngx-kit-time-picker.d.ts +1 -1
  69. package/virtual-scroll/README.md +199 -199
  70. package/fesm2022/ngx-kit-shared.mjs.map +0 -1
  71. package/fesm2022/ngx-kit-webflow.mjs +0 -709
  72. package/fesm2022/ngx-kit-webflow.mjs.map +0 -1
  73. package/types/ngx-kit-webflow.d.ts +0 -286
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { TemplateRef, InjectionToken, Type, EventEmitter, ElementRef, OnInit, Provider, ViewContainerRef, Renderer2 } from '@angular/core';
3
3
  import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
4
4
  import * as ngx_kit_date_picker from 'ngx-kit/date-picker';
5
- import { OverlayService } from 'ngx-kit/shared';
5
+ import { OverlayService } from 'ngx-kit/core';
6
6
 
7
7
  declare class NgxDatePickerConfig {
8
8
  previousButtonTemplate?: TemplateRef<any>;
@@ -28,6 +28,17 @@ interface CalendarDate {
28
28
  date?: Date;
29
29
  }
30
30
 
31
+ declare const DATE_ADAPTERS: InjectionToken<DateAdapterRegistration[]>;
32
+ interface DateAdapterRegistration {
33
+ locale: string;
34
+ useClass: Type<IDateAdapter>;
35
+ }
36
+ declare const DEFAULT_DATE_ADAPTERS: readonly DateAdapterRegistration[];
37
+ declare function getLocals(): string[];
38
+ type DateFormatPreset = 'full' | 'long' | 'medium' | 'short';
39
+ type DateFormat = string;
40
+ type FormatType = DateFormatPreset | DateFormat;
41
+
31
42
  interface IDateAdapter {
32
43
  get longMonths(): string[];
33
44
  get narrowDays(): string[];
@@ -73,19 +84,11 @@ interface IDateAdapter {
73
84
  */
74
85
  lastDateofLastMonth(year: number, month: number): number;
75
86
  getDate(date: CalendarDate): Date;
76
- formatDate(date: CalendarDate, format: string): string | null;
87
+ formatDate(date: CalendarDate, format: FormatType): string | null;
77
88
  getStartOf(date: Date | null, t: DatePickerView): Date | null;
78
89
  getLastOf(date: Date | null, t: DatePickerView): Date | null;
79
90
  }
80
91
 
81
- declare const DATE_ADAPTERS: InjectionToken<DateAdapterRegistration[]>;
82
- interface DateAdapterRegistration {
83
- locale: string;
84
- useClass: Type<IDateAdapter>;
85
- }
86
- declare const DEFAULT_DATE_ADAPTERS: readonly DateAdapterRegistration[];
87
- declare function getLocals(): string[];
88
-
89
92
  declare class DateAdapterRegistry {
90
93
  adapters: DateAdapterRegistration[];
91
94
  resolve(locale: string): ngx_kit_date_picker.IDateAdapter;
@@ -109,7 +112,7 @@ declare class NgxInputDatePicker implements ControlValueAccessor, Validator {
109
112
  /**
110
113
  * display format in input
111
114
  */
112
- displayFormat: string;
115
+ displayFormat: FormatType;
113
116
  private min;
114
117
  /** The minimum valid date. */
115
118
  set setMin(value: Date | null | undefined);
@@ -558,4 +561,4 @@ declare class NgxInputDateRangePicker implements ControlValueAccessor, Validator
558
561
  }
559
562
 
560
563
  export { DATE_ADAPTERS, DEFAULT_DATE_ADAPTERS, DateModel, DateViewDay, DateViewMonth, DateViewWeek, DateViewYear, NgxCalendarComponent, NgxDatePickerConfig, NgxDateRangePickerComponent, NgxInputDatePicker, NgxInputDatePickerComponent, NgxInputDateRangePicker, createDateRange, getLocals, isCompleteDateRange, isDateInPreviewRange, isDateInRange, normalizeDateRange, provideDateAdapters };
561
- export type { CalendarDate, CalendarDayColumn, CalendarEventChange, CalendarEventInteractionType, CalendarMonthEventSegment, CalendarTimedEvent, DateAdapterRegistration, IDateAdapter, MsEventViewer, MsEvents, NgxDateRange };
564
+ export type { CalendarDate, CalendarDayColumn, CalendarEventChange, CalendarEventInteractionType, CalendarMonthEventSegment, CalendarTimedEvent, DateAdapterRegistration, DateFormat, DateFormatPreset, FormatType, IDateAdapter, MsEventViewer, MsEvents, NgxDateRange };
@@ -1,140 +1,241 @@
1
- import * as i0 from '@angular/core';
2
- import { Injector, ElementRef, OnInit, AfterViewInit, OnDestroy, Type, ComponentRef, ApplicationRef, EnvironmentInjector, Renderer2, InjectionToken } from '@angular/core';
3
- import * as rxjs from 'rxjs';
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnInit, OnDestroy, Injector, EnvironmentProviders, Type, InjectionToken } from '@angular/core';
3
+ import * as ngx_kit_dialog from 'ngx-kit/dialog';
4
4
  import { Observable } from 'rxjs';
5
- import * as i5 from '@angular/common';
5
+ import { OverlayRef } from 'ngx-kit/core';
6
+ import * as i1 from 'ngx-kit/drag-resize';
6
7
 
8
+ type NgxDialogFooterAlign = 'start' | 'end' | 'center' | 'space-between' | 'space-around';
9
+ declare class NgxDialogFooter implements OnInit, OnDestroy {
10
+ readonly align: _angular_core.InputSignal<NgxDialogFooterAlign>;
11
+ private readonly el;
12
+ private readonly dialogRef;
13
+ ngOnInit(): void;
14
+ ngOnDestroy(): void;
15
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogFooter, never>;
16
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDialogFooter, "ngx-dialog-footer,[ngxDialogFooter]", ["ngxDialogFooter"], { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
17
+ }
18
+
19
+ type NgxDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
20
+ interface NgxDialogHeaderConfig {
21
+ enable?: boolean;
22
+ title?: string;
23
+ showCloseButton?: boolean;
24
+ showMaximizeButton?: boolean;
25
+ }
26
+ interface NgxDialogFooterConfig {
27
+ enable?: boolean;
28
+ /** Text for the auto-generated close button. Default: 'Close'. */
29
+ closeText?: string;
30
+ align?: NgxDialogFooterAlign;
31
+ }
32
+ /**
33
+ * BREAKING CHANGE from the previous version of this config:
34
+ * - `allowCloseOnOutsideClick` -> `closeOnOutsideClick` (naming now matches
35
+ * `ngx-kit/overlay`'s options, which this service is built directly on).
36
+ * - `header`/`footer` are now actually wired up (previously declared but
37
+ * unused) - set `enable: true` to get an automatic header/footer without
38
+ * having to place the `ngxDialogHeader`/`ngxDialogFooter` directives
39
+ * yourself inside the content component.
40
+ */
7
41
  declare class NgxDialogConfig<DataType = any> {
8
- /**
9
- * pass data to dialog
10
- */
11
- data?: DataType | any;
12
- /** close dialog on outside click
13
- * - default false */
14
- allowCloseOnOutsideClick?: boolean;
15
- /**
16
- * container class
17
- * - You can separate the list of classes with a space
18
- * - for example:"`my class one two three ...`"
19
- *
20
- * TODO: must set with public config setter
21
- */
22
- containerClass?: string | undefined;
23
- header?: {
24
- enable?: true;
25
- title?: '';
26
- showCloseButton?: true;
27
- };
28
- footer?: {
29
- enable?: true;
30
- };
42
+ /** Data made available to the content component (and to `ngx-dialog-panel`
43
+ * itself) via the `DIALOG_DATA` injection token. */
44
+ data?: DataType;
45
+ /** Named size preset - sets sensible min/max width bounds. Combine with
46
+ * `width`/`maxWidth`/... for full manual control. */
47
+ size?: NgxDialogSize;
31
48
  width?: string;
32
49
  minWidth?: string;
33
50
  maxWidth?: string;
34
51
  height?: string;
35
52
  minHeight?: string;
36
53
  maxHeight?: string;
37
- /** parent injector */
54
+ /** Extra class(es) on the dialog panel (the `ngx-dialog-panel` host). */
55
+ panelClass?: string | string[];
56
+ /** Extra class(es) on the backdrop element behind the panel. */
57
+ backdropClass?: string | string[];
58
+ header?: NgxDialogHeaderConfig;
59
+ footer?: NgxDialogFooterConfig;
60
+ /** Close when clicking outside the panel. Default: false (modal by default). */
61
+ closeOnOutsideClick?: boolean;
62
+ /** Close on Escape. Default: true. */
63
+ closeOnEscape?: boolean;
64
+ /** Shorthand for `closeOnOutsideClick: false, closeOnEscape: false` - the
65
+ * dialog can then only be closed programmatically (e.g. via its own
66
+ * buttons calling `dialogRef.close()`). */
67
+ disableClose?: boolean;
68
+ /** Synchronous guard consulted before Escape/outside-click would close the
69
+ * dialog - return `false` to block it (e.g. unsaved changes). Does not
70
+ * affect a programmatic `dialogRef.close()` call. */
71
+ beforeClose?: () => boolean;
72
+ /** Prevent the page behind the dialog from scrolling while it's open. Default: true. */
73
+ lockBodyScroll?: boolean;
74
+ /** Move focus into the dialog on open. Default: true. */
75
+ autoFocus?: boolean;
76
+ /** Restore focus to the previously focused element on close. Default: true. */
77
+ restoreFocus?: boolean;
78
+ /** Render via the native Popover API when supported. Default: true. */
79
+ usePopover?: boolean;
80
+ role?: 'dialog' | 'alertdialog';
81
+ ariaLabel?: string;
82
+ ariaLabelledby?: string;
83
+ ariaDescribedby?: string;
84
+ /** Entry animation for the panel. Default: 'zoom'. */
85
+ animation?: 'zoom' | 'fade' | 'slide-up' | 'none';
86
+ /** Parent injector for the content component (and `ngx-dialog-panel`
87
+ * itself). Defaults to the root injector. */
38
88
  injector?: Injector;
39
- constructor();
89
+ constructor(init?: Partial<NgxDialogConfig<DataType>>);
40
90
  }
41
91
 
42
- declare class NgxDialogRef {
43
- dialog?: ElementRef<HTMLElement>;
44
- header?: ElementRef<HTMLElement>;
45
- footer?: ElementRef<HTMLElement>;
46
- body?: ElementRef<HTMLElement>;
92
+ declare function provideNgxDialog(config?: NgxDialogConfig): EnvironmentProviders;
93
+
94
+ declare class NgxDialogRef<R = any> {
95
+ readonly id: string;
96
+ /** true from the moment `close()` is called, even before teardown finishes. */
97
+ readonly closing: _angular_core.WritableSignal<boolean>;
98
+ /** true once the dialog has been fully removed from the DOM. */
99
+ readonly closed: _angular_core.WritableSignal<boolean>;
47
100
  private readonly _afterClosed;
48
- afterClosed: Observable<any>;
49
- id?: string;
50
- close(result?: any): void;
101
+ /** Emits the result exactly once, after the dialog has been fully torn down. */
102
+ readonly afterClosed: Observable<R | undefined>;
103
+ /** @internal set by the layout directives; read by NgxDialogBody to size itself. */
104
+ readonly headerEl: _angular_core.WritableSignal<HTMLElement | null>;
105
+ /** @internal */
106
+ readonly footerEl: _angular_core.WritableSignal<HTMLElement | null>;
107
+ /** @internal */
108
+ readonly bodyEl: _angular_core.WritableSignal<HTMLElement | null>;
109
+ /** @internal the dialog panel's own host element. */
110
+ readonly panelEl: _angular_core.WritableSignal<HTMLElement | null>;
111
+ /** Optional synchronous guard - return `false` to prevent Escape/outside-click from closing. */
112
+ beforeClose?: () => boolean;
113
+ private overlayRef?;
114
+ private result;
115
+ /** @internal used by NgxDialogService right after creating the overlay. */
116
+ _attachOverlayRef(ref: OverlayRef<unknown>): void;
117
+ /** @internal used by the header/footer/body directives and the panel component. */
118
+ _setHeaderElement(el: HTMLElement | null): void;
119
+ /** @internal */
120
+ _setFooterElement(el: HTMLElement | null): void;
121
+ /** @internal */
122
+ _setBodyElement(el: HTMLElement | null): void;
123
+ /** @internal */
124
+ _setPanelElement(el: HTMLElement | null): void;
125
+ /** Closes the dialog and emits `result` on `afterClosed` once torn down. Idempotent. */
126
+ close(result?: R): void;
127
+ /** @internal called by NgxDialogService's `onClosed` callback once the overlay is fully torn down. */
128
+ _finalizeClose(): void;
51
129
  }
52
130
 
53
- declare class NgxDialogComponent implements OnInit, AfterViewInit, OnDestroy {
54
- config?: NgxDialogConfig;
55
- component: Type<any>;
56
- private readonly _onClose;
57
- onClose: rxjs.Observable<void>;
58
- ngxDialog?: ElementRef<HTMLElement>;
59
- _dialogRef: NgxDialogRef;
60
- private cd;
131
+ /**
132
+ * The dialog "panel" shell. It no longer owns the backdrop, centering,
133
+ * focus trap, Escape handling or outside-click handling - all of that now
134
+ * lives in `OverlayService`, which this component is rendered inside of.
135
+ * This is intentionally a thin, fully signal-driven shell: no
136
+ * `AfterViewInit`, no manual `ChangeDetectorRef.detectChanges()`, no
137
+ * imperative style writes. Angular schedules change detection automatically
138
+ * whenever a signal read from the template changes, including in zoneless
139
+ * apps.
140
+ */
141
+ declare class NgxDialogComponent {
142
+ protected readonly dialogRef: NgxDialogRef<any>;
143
+ protected readonly config: ngx_kit_dialog.NgxDialogConfig<any>;
144
+ protected readonly content: _angular_core.Type<any>;
145
+ protected readonly sizeClass: _angular_core.Signal<string>;
61
146
  constructor();
62
- ngOnInit(): void;
63
- ngAfterViewInit(): void;
64
- ngOnDestroy(): void;
65
- onOverlayClicked(evt: MouseEvent): void;
66
- onDialogClicked(evt: MouseEvent): void;
67
- close(): void;
68
- setStyle(): void;
69
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogComponent, never>;
70
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxDialogComponent, "ng-component", never, {}, {}, never, never, false, never>;
71
- }
72
-
73
- declare class NgxOverlayService {
74
- private appRef;
75
- private injector;
76
- private envInjector;
77
- dialogComponentRefs: ComponentRef<NgxDialogComponent>[];
78
- _defaultOptions: NgxDialogConfig | undefined;
79
- constructor(appRef: ApplicationRef, injector: Injector, envInjector: EnvironmentInjector);
80
- open(component: Type<any>, config?: NgxDialogConfig): NgxDialogRef;
81
- private _open;
82
- private removeDialogComponentFromBody;
83
- private appendDialogComponentToBody;
84
- closeAll(): void;
85
- private get getDialogId();
86
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxOverlayService, never>;
87
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxOverlayService>;
147
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogComponent, never>;
148
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxDialogComponent, "ngx-dialog-panel", never, {}, {}, never, never, true, never>;
88
149
  }
89
150
 
90
- declare class NgxDialogHeaderDirective implements OnInit {
91
- _el: ElementRef<HTMLElement>;
92
- private _document;
93
- showCloseButton: boolean;
94
- private _dialogRef;
95
- constructor(_el: ElementRef<HTMLElement>, _document: Document);
151
+ declare class NgxDialogHeader implements OnInit {
152
+ private config;
153
+ readonly showCloseButton: _angular_core.InputSignal<boolean>;
154
+ readonly showMaximizeButton: _angular_core.InputSignal<boolean>;
155
+ private readonly el;
156
+ private readonly document;
157
+ private readonly dialogRef;
158
+ private readonly drag;
159
+ private isMaximized;
96
160
  ngOnInit(): void;
97
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogHeaderDirective, never>;
98
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDialogHeaderDirective, "ngx-dialog-header,[ngxDialogHeader]", ["ngxDialogHeader"], { "showCloseButton": { "alias": "showCloseButton"; "required": false; }; }, {}, never, never, false, never>;
161
+ private fullScreen;
162
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogHeader, never>;
163
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDialogHeader, "ngx-dialog-header,[ngxDialogHeader]", ["ngxDialogHeader"], { "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "showMaximizeButton": { "alias": "showMaximizeButton"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgxDraggable; inputs: {}; outputs: {}; }]>;
99
164
  }
100
165
 
101
- declare class NgxDialogFooterDirective implements OnInit {
102
- _el: ElementRef<HTMLElement>;
103
- align: 'start' | 'end' | 'space-between' | 'center' | 'space-around';
104
- private _dialogRef;
105
- constructor(_el: ElementRef<HTMLElement>);
106
- ngOnInit(): void;
107
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogFooterDirective, never>;
108
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDialogFooterDirective, "ngx-dialog-footer,[ngxDialogFooter]", ["ngxDialogFooter"], { "align": { "alias": "align"; "required": false; }; }, {}, never, never, false, never>;
166
+ /**
167
+ * Why this can't be pure CSS flexbox: the header/body/footer elements are
168
+ * *grandchildren* of the dialog panel (panel -> `*ngComponentOutlet`'s host
169
+ * element -> header/body/footer), not direct children, because the content
170
+ * component that hosts them is arbitrary and we don't control its own host
171
+ * styling. `display:flex;flex-direction:column` on the panel therefore can't
172
+ * size the body against the header/footer through that extra layer, so we
173
+ * measure and set an explicit `max-height` instead, driven by a
174
+ * `ResizeObserver` on the panel (not a `window:resize` listener, so it also
175
+ * reacts to the dialog itself changing size, e.g. via `config.size`).
176
+ */
177
+ declare class NgxDialogBody {
178
+ private readonly el;
179
+ private readonly renderer;
180
+ private readonly dialogRef;
181
+ private readonly destroyRef;
182
+ constructor();
183
+ private recomputeHeight;
184
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogBody, never>;
185
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgxDialogBody, "ngx-dialog-body,[ngxDialogBody]", ["ngxDialogBody"], {}, {}, never, never, true, never>;
109
186
  }
110
187
 
111
- declare class NgxDialogBodyDirective implements AfterViewInit {
112
- _el: ElementRef<HTMLElement>;
113
- private _renderer;
114
- height?: number;
115
- private _dialogRef;
116
- constructor(_el: ElementRef<HTMLElement>, _renderer: Renderer2);
117
- ngAfterViewInit(): void;
118
- onWindowResize(ev?: Event): void;
119
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogBodyDirective, never>;
120
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDialogBodyDirective, "ngx-dialog-body,[ngxDialogBody]", ["ngxDialogBody"], {}, {}, never, never, false, never>;
188
+ declare class NgxDialogModule {
189
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogModule, never>;
190
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<NgxDialogModule, never, [typeof NgxDialogComponent, typeof NgxDialogHeader, typeof NgxDialogFooter, typeof NgxDialogBody], [typeof NgxDialogComponent, typeof NgxDialogHeader, typeof NgxDialogFooter, typeof NgxDialogBody]>;
191
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<NgxDialogModule>;
121
192
  }
122
193
 
123
- declare class NgxDialogModule {
124
- private readonly platformId;
125
- constructor(parentModule: NgxDialogModule | null, service: NgxOverlayService);
126
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxDialogModule, [{ optional: true; skipSelf: true; }, null]>;
127
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDialogModule, [typeof NgxDialogComponent, typeof NgxDialogHeaderDirective, typeof NgxDialogFooterDirective, typeof NgxDialogBodyDirective], [typeof i5.CommonModule], [typeof NgxDialogComponent, typeof NgxDialogHeaderDirective, typeof NgxDialogFooterDirective, typeof NgxDialogBodyDirective]>;
128
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxDialogModule>;
194
+ declare class NgxDialogService {
195
+ private readonly overlay;
196
+ private readonly injector;
197
+ private readonly _openRefs;
198
+ /** Every currently open dialog, oldest first. */
199
+ readonly openDialogs: _angular_core.Signal<NgxDialogRef<any>[]>;
200
+ /** How many dialogs are currently open. */
201
+ readonly openCount: _angular_core.Signal<number>;
202
+ readonly defaultConfig: NgxDialogConfig<any>;
203
+ /**
204
+ * Opens `content` inside a dialog panel and returns a ref you can use to
205
+ * close it and read the result back (`afterClosed`).
206
+ */
207
+ open<R = any, DataType = any>(content: Type<any>, config?: Partial<NgxDialogConfig<DataType>>): NgxDialogRef<R>;
208
+ /** Closes every currently open dialog (ignores `disableClose`/guards - use sparingly, e.g. on logout). */
209
+ closeAll(): void;
210
+ private applySizing;
211
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxDialogService, never>;
212
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgxDialogService>;
129
213
  }
130
214
 
215
+ /**
216
+ * Static convenience API over `NgxDialogService`, so you can call
217
+ * `Dialog.open(...)` from anywhere without injecting the service manually.
218
+ *
219
+ * SSR note: the instance backing this static class is process-wide, not
220
+ * per-request, so it is deliberately left unset on the server (see
221
+ * `provideNgxDialog()`). Inject `NgxDialogService` directly in SSR code paths.
222
+ */
131
223
  declare class Dialog {
132
224
  private static serviceInstance;
133
- static _setService(svc: NgxOverlayService): void;
134
- static open<DataType>(component: Type<any>, config?: NgxDialogConfig<DataType>): NgxDialogRef;
225
+ /** @internal set by `provideNgxDialog()`'s environment initializer. */
226
+ static _setService(svc: NgxDialogService): void;
227
+ private static get service();
228
+ static open<R = any, DataType = any>(component: Type<any>, config?: Partial<NgxDialogConfig<DataType>>): NgxDialogRef<R>;
229
+ static closeAll(): void;
135
230
  }
136
231
 
137
232
  declare const DIALOG_DATA: InjectionToken<any>;
138
- declare const DIALOG_REF: InjectionToken<NgxDialogRef>;
233
+ declare const DIALOG_REF: InjectionToken<NgxDialogRef<any>>;
234
+ /** The resolved config for the dialog currently being rendered. */
235
+ declare const NGX_DIALOG_DEFAULT_CONFIG: NgxDialogConfig<any>;
236
+ declare const NGX_DIALOG_CONFIG: InjectionToken<NgxDialogConfig<any>>;
237
+ /** The arbitrary content component passed to `open()`, projected via `*ngComponentOutlet`. */
238
+ declare const DIALOG_CONTENT: InjectionToken<Type<any>>;
139
239
 
140
- export { DIALOG_DATA, DIALOG_REF, Dialog, NgxDialogBodyDirective, NgxDialogComponent, NgxDialogConfig, NgxDialogFooterDirective, NgxDialogHeaderDirective, NgxDialogModule };
240
+ export { DIALOG_CONTENT, DIALOG_DATA, DIALOG_REF, Dialog, NGX_DIALOG_CONFIG, NGX_DIALOG_DEFAULT_CONFIG, NgxDialogBody, NgxDialogComponent, NgxDialogConfig, NgxDialogFooter, NgxDialogHeader, NgxDialogModule, NgxDialogService, provideNgxDialog };
241
+ export type { NgxDialogFooterAlign, NgxDialogFooterConfig, NgxDialogHeaderConfig, NgxDialogSize };