mn-angular-lib 2.0.34 → 2.0.36

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 (52) hide show
  1. package/fesm2022/mn-angular-lib-alert.mjs +515 -527
  2. package/fesm2022/mn-angular-lib-alert.mjs.map +1 -1
  3. package/fesm2022/mn-angular-lib-bottom-sheet.mjs +264 -357
  4. package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -1
  5. package/fesm2022/mn-angular-lib-button.mjs +819 -382
  6. package/fesm2022/mn-angular-lib-button.mjs.map +1 -1
  7. package/fesm2022/mn-angular-lib-calendar-core.mjs +240 -365
  8. package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -1
  9. package/fesm2022/mn-angular-lib-calendar.mjs +1691 -1545
  10. package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
  11. package/fesm2022/mn-angular-lib-collection.mjs +2367 -2796
  12. package/fesm2022/mn-angular-lib-collection.mjs.map +1 -1
  13. package/fesm2022/mn-angular-lib-core.mjs +693 -1241
  14. package/fesm2022/mn-angular-lib-core.mjs.map +1 -1
  15. package/fesm2022/mn-angular-lib-display.mjs +679 -712
  16. package/fesm2022/mn-angular-lib-display.mjs.map +1 -1
  17. package/fesm2022/mn-angular-lib-forms.mjs +3671 -4647
  18. package/fesm2022/mn-angular-lib-forms.mjs.map +1 -1
  19. package/fesm2022/mn-angular-lib-keyboard.mjs +221 -190
  20. package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -1
  21. package/fesm2022/mn-angular-lib-modal-core.mjs +711 -896
  22. package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
  23. package/fesm2022/mn-angular-lib-modal-ui.mjs +2089 -2035
  24. package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
  25. package/fesm2022/mn-angular-lib-modal.mjs +76 -121
  26. package/fesm2022/mn-angular-lib-modal.mjs.map +1 -1
  27. package/fesm2022/mn-angular-lib-rich-text-editor.mjs +289 -277
  28. package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -1
  29. package/fesm2022/mn-angular-lib-segmented.mjs +189 -241
  30. package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -1
  31. package/fesm2022/mn-angular-lib-tab.mjs +409 -642
  32. package/fesm2022/mn-angular-lib-tab.mjs.map +1 -1
  33. package/fesm2022/mn-angular-lib.mjs +16 -29
  34. package/package.json +1 -1
  35. package/types/mn-angular-lib-alert.d.ts +239 -241
  36. package/types/mn-angular-lib-bottom-sheet.d.ts +190 -150
  37. package/types/mn-angular-lib-button.d.ts +319 -317
  38. package/types/mn-angular-lib-calendar-core.d.ts +199 -209
  39. package/types/mn-angular-lib-calendar.d.ts +656 -511
  40. package/types/mn-angular-lib-collection.d.ts +1649 -1585
  41. package/types/mn-angular-lib-core.d.ts +524 -535
  42. package/types/mn-angular-lib-display.d.ts +946 -886
  43. package/types/mn-angular-lib-forms.d.ts +3012 -3013
  44. package/types/mn-angular-lib-keyboard.d.ts +125 -85
  45. package/types/mn-angular-lib-modal-core.d.ts +978 -994
  46. package/types/mn-angular-lib-modal-ui.d.ts +541 -493
  47. package/types/mn-angular-lib-modal.d.ts +24 -27
  48. package/types/mn-angular-lib-rich-text-editor.d.ts +131 -98
  49. package/types/mn-angular-lib-segmented.d.ts +354 -341
  50. package/types/mn-angular-lib-tab.d.ts +345 -336
  51. package/types/mn-angular-lib.d.ts +16 -16
  52. package/fesm2022/mn-angular-lib.mjs.map +0 -1
@@ -1,146 +1,152 @@
1
- import * as i0 from '@angular/core';
2
- import { OnInit, AfterViewInit, OnDestroy, EventEmitter, QueryList, Type, ElementRef, ViewContainerRef, TemplateRef } from '@angular/core';
3
- import * as _lucide_angular from '@lucide/angular';
4
- import { LucideIconData } from '@lucide/angular';
5
- import { ModalConfig, MnModalRef, ModalKind, WizardModalConfig, FormModalConfig, ConfirmationModalConfig, CustomModalConfig, ModalFooterAction, ActionStyle, FormRow, FormFieldGroup, FieldKind, ModalCloseReason, SelectOption, FormFieldConfig, FieldDataSource, FieldVisibilityCondition, FieldRequiredCondition, ModalInputMap, WizardResult, ModalStepId, WizardStepConfig } from 'mn-angular-lib/modal-core';
6
- import { MnButtonTypes } from 'mn-angular-lib/button';
7
- import { FormGroup, ValidatorFn } from '@angular/forms';
8
- import { MnInputField, MnTextarea, MnSelectOption, MnSelectProps } from 'mn-angular-lib/forms';
9
- import { TableDataSource } from 'mn-angular-lib/collection';
10
-
11
- declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterViewInit, OnDestroy {
12
- /** Lucide icons the template renders. */
13
- protected readonly icons: Record<"X", _lucide_angular.LucideIconData>;
14
- private readonly lang;
15
- /**
16
- * Accessible name for this control. Resolved through the conventional
17
- * `mnModal.close` key so an app can translate it, falling back to English when the
18
- * key is not defined rather than leaking the raw key into the UI.
19
- */
20
- get closeModalLabel(): string;
21
- private el;
22
- private cdr;
23
- config: ModalConfig<TResult>;
24
- modalRef: MnModalRef<TResult>;
25
- isClosing: boolean;
26
- /**
27
- * Whether another modal is stacked on top of this one. Set imperatively by
28
- * `MnModalService` on the already-rendered shell below the newly opened one, so it must
29
- * be a signal: mutating a plain field there changes the host `[class]` after the view was
30
- * checked (NG0100 ExpressionChangedAfterItHasBeenChecked) and does not schedule change
31
- * detection in a zoneless app. A signal write both notifies the host binding and schedules CD.
32
- */
33
- readonly isStacked: i0.WritableSignal<boolean>;
34
- readonly ModalKind: typeof ModalKind;
35
- /** The rendered wizard body, when this modal is a wizard — used to read the active step title. */
36
- private readonly wizardBody;
37
- /** Tailwind's `sm` breakpoint — below this the modal presents as a bottom sheet. */
38
- private static readonly SHEET_MAX_WIDTH;
39
- /**
40
- * Title of the wizard's current step, or undefined for non-wizard modals.
41
- * The template appends it to the modal title on small screens, where the
42
- * step labels under the progress circles are hidden.
43
- */
44
- readonly wizardStepTitle: i0.Signal<string | undefined>;
45
- private previouslyFocusedElement;
46
- private focusTrapListener;
47
- private pollingTimer;
48
- private pollAttempts;
49
- /** Upper bound for the close wait if no animation/transition end event fires
50
- * (e.g. an animation was suppressed). Must stay longer than the slowest close
51
- * path so it never preempts. */
52
- private static readonly CLOSE_FALLBACK_MS;
53
- /** Live match of the sheet breakpoint, so the modal switches between the centered dialog
54
- * and the bottom sheet when the viewport crosses it (e.g. an orientation change). */
55
- readonly isNarrow: i0.WritableSignal<boolean>;
56
- /** The bottom sheet presenting this modal on mobile, absent on the desktop dialog path. */
57
- private readonly bottomSheet;
58
- /** Optional native haptic engine. Absent on the web — every call is null-guarded. */
59
- private haptics;
60
- private sheetMedia;
61
- private sheetMediaListener;
62
- /** Whether this modal is allowed to present as a bottom sheet on small screens (default: true). */
63
- get isMobileSheet(): boolean;
64
- /** Whether the modal should currently render as a bottom sheet (mobile) rather than the
65
- * centered dialog (desktop). */
66
- get showMobileSheet(): boolean;
67
- get hostClasses(): string;
68
- private setupFocusTrap;
69
- private removeFocusTrap;
70
- asWizard(config: ModalConfig<TResult>): WizardModalConfig;
71
- asForm(config: ModalConfig<TResult>): FormModalConfig;
72
- asConfirmation(config: ModalConfig<TResult>): ConfirmationModalConfig;
73
- asCustom(config: ModalConfig<TResult>): CustomModalConfig;
74
- /** Whether the modal can be dismissed at all (drives the sheet's swipe/backdrop arming). */
75
- get canClose(): boolean;
76
- ngOnInit(): void;
77
- ngOnDestroy(): void;
78
- /**
79
- * Triggers the closing animation and resolves once it has actually finished.
80
- *
81
- * Deferred via setTimeout to avoid NG0100 when called during a CD cycle. On mobile the
82
- * exit is owned by the bottom sheet, so we delegate to its `startClosing()` (idempotent
83
- * with a swipe-dismiss already in flight); on desktop we wait for the dialog container's
84
- * `animationend`/`transitionend`. A fallback timeout guarantees resolution if no event
85
- * fires, and we short-circuit under reduced motion (the CSS collapses to instant).
86
- */
87
- startClosing(): Promise<void>;
88
- private prefersReducedMotion;
89
- /**
90
- * Closes the modal on Escape, through the same close guard as every other way out, so a
91
- * modal that may not close (`CloseMode.DISABLED`) stays open and a guarded one asks first.
92
- * @param event The keydown.
93
- */
94
- onEscapeKey(event: Event): void;
95
- /**
96
- * Whether this Escape is this modal's to act on. On unless the modal opted out with
97
- * `KeyboardMode.DISABLED`; it used to be off unless every builder opted in, which no app did,
98
- * so no modal anywhere closed on Escape. Every open shell hears the same document keydown, so
99
- * only the top one acts (one press closes one modal), and an Escape something inside the modal
100
- * already took, or an open dropdown in it is about to take, is left to that.
101
- * @param event The keydown.
102
- * @returns True when the modal should close.
103
- */
104
- private closesOnEscape;
105
- onBackdropClick(): void;
106
- onCloseButtonClick(): void;
107
- /**
108
- * Guard consulted by the bottom sheet before it commits a swipe/flick/backdrop dismissal.
109
- * Mirrors the DISABLED/GUARDED rules of {@link handleClose} so a swipe cannot escape a
110
- * modal that a button close could not. Bound as a field so the template passes it directly.
111
- */
112
- readonly sheetDismissGuard: () => Promise<boolean>;
113
- /**
114
- * Handles the sheet's `(dismiss)` — emitted only after its guard passed and its exit
115
- * animation finished. Dismisses the modal (no re-guard) with a confirming haptic.
116
- */
117
- onSheetDismiss(): void;
118
- ngAfterViewInit(): void;
119
- /** Tracks the sheet breakpoint through `matchMedia` so the dialog/sheet fork re-renders
120
- * when the viewport crosses it. */
121
- private startWatchingViewport;
122
- /** Tears down the breakpoint listener. Idempotent. */
123
- private stopWatchingViewport;
124
- /** Attempts to dismiss the modal. Resolves true if it was actually dismissed,
125
- * false if blocked by a DISABLED close mode or a rejected close guard. */
126
- private handleClose;
127
- get showBackdrop(): boolean;
128
- get containerSizeClass(): string;
129
- get containerHeightStyle(): string | null;
130
- get showCloseButton(): boolean;
131
- get hasCustomFooterActions(): boolean;
132
- get leftFooterActions(): ModalFooterAction<TResult>[];
133
- get rightFooterActions(): ModalFooterAction<TResult>[];
134
- onFooterAction(action: ModalFooterAction<TResult>): Promise<void>;
135
- getActionButtonColor(style?: ActionStyle): 'primary' | 'secondary' | 'danger' | 'warning' | 'success';
136
- getActionButtonVariant(style?: ActionStyle): 'fill' | 'outline' | 'text';
137
- private startPollingIfConfigured;
138
- private startPolling;
139
- private stopPolling;
140
- static ɵfac: i0.ɵɵFactoryDeclaration<MnModalShellComponent<any>, never>;
141
- static ɵcmp: i0.ɵɵComponentDeclaration<MnModalShellComponent<any>, "mn-modal-shell", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
1
+ import * as i0 from "@angular/core";
2
+ import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, TemplateRef, Type, ViewContainerRef } from "@angular/core";
3
+ import { ActionStyle, ConfirmationModalConfig, CustomModalConfig, FieldDataSource, FieldKind, FieldRequiredCondition, FieldVisibilityCondition, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, MnModalRef, ModalCloseReason, ModalConfig, ModalFooterAction, ModalInputMap, ModalKind, ModalStepId, SelectOption, WizardModalConfig, WizardResult, WizardStepConfig } from "mn-angular-lib/modal-core";
4
+ import { MnButtonTypes } from "mn-angular-lib/button";
5
+ import { FormGroup, ValidatorFn } from "@angular/forms";
6
+ import { MnInputField, MnSelectOption, MnSelectProps, MnTextarea } from "mn-angular-lib/forms";
7
+ import { TableDataSource } from "mn-angular-lib/collection";
8
+ import { LucideIconData } from "@lucide/angular";
9
+ export declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterViewInit, OnDestroy {
10
+ /** Lucide icons the template renders. */
11
+ protected readonly icons: Record<"X", import("@lucide/angular").LucideIconData>;
12
+ private readonly lang;
13
+ /**
14
+ * Accessible name for this control. Resolved through the conventional
15
+ * `mnModal.close` key so an app can translate it, falling back to English when the
16
+ * key is not defined rather than leaking the raw key into the UI.
17
+ */
18
+ get closeModalLabel(): string;
19
+ private el;
20
+ private cdr;
21
+ config: ModalConfig<TResult>;
22
+ modalRef: MnModalRef<TResult>;
23
+ isClosing: boolean;
24
+ /**
25
+ * Whether another modal is stacked on top of this one. Set imperatively by
26
+ * `MnModalService` on the already-rendered shell below the newly opened one, so it must
27
+ * be a signal: mutating a plain field there changes the host `[class]` after the view was
28
+ * checked (NG0100 ExpressionChangedAfterItHasBeenChecked) and does not schedule change
29
+ * detection in a zoneless app. A signal write both notifies the host binding and schedules CD.
30
+ */
31
+ readonly isStacked: import("@angular/core").WritableSignal<boolean>;
32
+ readonly ModalKind: typeof ModalKind;
33
+ /** The rendered wizard body, when this modal is a wizard — used to read the active step title. */
34
+ private readonly wizardBody;
35
+ /** Tailwind's `sm` breakpoint — below this the modal presents as a bottom sheet. */
36
+ private static readonly SHEET_MAX_WIDTH;
37
+ /**
38
+ * Title of the wizard's current step, or undefined for non-wizard modals.
39
+ * The template appends it to the modal title on small screens, where the
40
+ * step labels under the progress circles are hidden.
41
+ */
42
+ readonly wizardStepTitle: import("@angular/core").Signal<string | undefined>;
43
+ private previouslyFocusedElement;
44
+ private focusTrapListener;
45
+ private pollingTimer;
46
+ private pollAttempts;
47
+ /** Upper bound for the close wait if no animation/transition end event fires
48
+ * (e.g. an animation was suppressed). Must stay longer than the slowest close
49
+ * path so it never preempts. */
50
+ private static readonly CLOSE_FALLBACK_MS;
51
+ /** Live match of the sheet breakpoint, so the modal switches between the centered dialog
52
+ * and the bottom sheet when the viewport crosses it (e.g. an orientation change). */
53
+ readonly isNarrow: import("@angular/core").WritableSignal<boolean>;
54
+ /** The bottom sheet presenting this modal on mobile, absent on the desktop dialog path. */
55
+ private readonly bottomSheet;
56
+ /** Optional native haptic engine. Absent on the web — every call is null-guarded. */
57
+ private haptics;
58
+ private sheetMedia;
59
+ private sheetMediaListener;
60
+ /** Whether this modal is allowed to present as a bottom sheet on small screens (default: true). */
61
+ get isMobileSheet(): boolean;
62
+ /** Whether the modal should currently render as a bottom sheet (mobile) rather than the
63
+ * centered dialog (desktop). */
64
+ get showMobileSheet(): boolean;
65
+ get hostClasses(): string;
66
+ private setupFocusTrap;
67
+ private removeFocusTrap;
68
+ asWizard(config: ModalConfig<TResult>): WizardModalConfig;
69
+ asForm(config: ModalConfig<TResult>): FormModalConfig;
70
+ asConfirmation(config: ModalConfig<TResult>): ConfirmationModalConfig;
71
+ asCustom(config: ModalConfig<TResult>): CustomModalConfig;
72
+ /** Whether the modal can be dismissed at all (drives the sheet's swipe/backdrop arming). */
73
+ get canClose(): boolean;
74
+ ngOnInit(): void;
75
+ ngOnDestroy(): void;
76
+ /**
77
+ * Triggers the closing animation and resolves once it has actually finished.
78
+ *
79
+ * Deferred via setTimeout to avoid NG0100 when called during a CD cycle. On mobile the
80
+ * exit is owned by the bottom sheet, so we delegate to its `startClosing()` (idempotent
81
+ * with a swipe-dismiss already in flight); on desktop we wait for the dialog container's
82
+ * `animationend`/`transitionend`. A fallback timeout guarantees resolution if no event
83
+ * fires, and we short-circuit under reduced motion (the CSS collapses to instant).
84
+ */
85
+ startClosing(): Promise<void>;
86
+ private prefersReducedMotion;
87
+ /**
88
+ * Closes the modal on Escape, through the same close guard as every other way out, so a
89
+ * modal that may not close (`CloseMode.DISABLED`) stays open and a guarded one asks first.
90
+ * @param event The keydown.
91
+ */
92
+ onEscapeKey(event: Event): void;
93
+ /**
94
+ * Whether this Escape is this modal's to act on. On unless the modal opted out with
95
+ * `KeyboardMode.DISABLED`; it used to be off unless every builder opted in, which no app did,
96
+ * so no modal anywhere closed on Escape. Every open shell hears the same document keydown, so
97
+ * only the top one acts (one press closes one modal), and an Escape something inside the modal
98
+ * already took, or an open dropdown in it is about to take, is left to that.
99
+ * @param event The keydown.
100
+ * @returns True when the modal should close.
101
+ */
102
+ private closesOnEscape;
103
+ onBackdropClick(): void;
104
+ onCloseButtonClick(): void;
105
+ /**
106
+ * Guard consulted by the bottom sheet before it commits a swipe/flick/backdrop dismissal.
107
+ * Mirrors the DISABLED/GUARDED rules of {@link handleClose} so a swipe cannot escape a
108
+ * modal that a button close could not. Bound as a field so the template passes it directly.
109
+ */
110
+ readonly sheetDismissGuard: () => Promise<boolean>;
111
+ /**
112
+ * Handles the sheet's `(dismiss)` — emitted only after its guard passed and its exit
113
+ * animation finished. Dismisses the modal (no re-guard) with a confirming haptic.
114
+ */
115
+ onSheetDismiss(): void;
116
+ ngAfterViewInit(): void;
117
+ /** Tracks the sheet breakpoint through `matchMedia` so the dialog/sheet fork re-renders
118
+ * when the viewport crosses it. */
119
+ private startWatchingViewport;
120
+ /** Tears down the breakpoint listener. Idempotent. */
121
+ private stopWatchingViewport;
122
+ /** Attempts to dismiss the modal. Resolves true if it was actually dismissed,
123
+ * false if blocked by a DISABLED close mode or a rejected close guard. */
124
+ private handleClose;
125
+ get showBackdrop(): boolean;
126
+ get containerSizeClass(): string;
127
+ get containerHeightStyle(): string | null;
128
+ get showCloseButton(): boolean;
129
+ get hasCustomFooterActions(): boolean;
130
+ get leftFooterActions(): ModalFooterAction<TResult>[];
131
+ get rightFooterActions(): ModalFooterAction<TResult>[];
132
+ onFooterAction(action: ModalFooterAction<TResult>): Promise<void>;
133
+ getActionButtonColor(style?: ActionStyle): 'primary' | 'secondary' | 'danger' | 'warning' | 'success';
134
+ getActionButtonVariant(style?: ActionStyle): 'fill' | 'outline' | 'text';
135
+ private startPollingIfConfigured;
136
+ private startPolling;
137
+ private stopPolling;
138
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnModalShellComponent<any>, never>;
139
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnModalShellComponent<any>, "mn-modal-shell", never, {
140
+ "config": {
141
+ "alias": "config";
142
+ "required": false;
143
+ };
144
+ "modalRef": {
145
+ "alias": "modalRef";
146
+ "required": false;
147
+ };
148
+ }, {}, never, never, true, never>;
142
149
  }
143
-
144
150
  /**
145
151
  * A structural "view" over the {@link FormFieldConfig} discriminated union that
146
152
  * exposes every member-specific property as optional. The template and several
@@ -149,361 +155,403 @@ declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterV
149
155
  * field to this view keeps that access type-checked without resorting to `any`.
150
156
  */
151
157
  type FormFieldView<TModel> = FormFieldConfig<TModel> & {
152
- label?: string;
153
- placeholder?: string;
154
- validators?: ValidatorFn[];
155
- asyncValidators?: ValidatorFn[];
156
- updateOn?: 'change' | 'blur' | 'submit';
157
- options?: SelectOption[];
158
- dataSource?: FieldDataSource;
159
- disabled?: boolean;
160
- readOnly?: boolean;
161
- visible?: FieldVisibilityCondition<TModel>;
162
- conditionallyRequired?: FieldRequiredCondition<TModel>;
163
- autoFocus?: boolean;
164
- defaultValue?: unknown;
165
- mask?: string;
166
- autocomplete?: string;
167
- minDate?: string;
168
- maxDate?: string;
169
- mode?: 'date' | 'time' | 'datetime-local';
170
- min?: number | string;
171
- max?: number | string;
172
- step?: number;
173
- /** A number field's fixed decimals (NumberFieldConfig.decimals). */
174
- decimals?: number;
175
- rows?: number;
176
- searchable?: boolean;
177
- searchPlaceholder?: string;
178
- maxSelections?: number;
179
- collapseThreshold?: number;
180
- collapsePlaceholder?: string;
181
- allSelectedPlaceholder?: string;
182
- swatches?: string[];
183
- showValue?: boolean;
184
- unit?: string;
185
- accept?: string;
186
- multiple?: boolean;
187
- displayMode?: 'dropzone' | 'thumbnail' | 'list' | 'compact';
188
- dropzoneHint?: string;
189
- dropActiveHint?: string;
190
- replaceLabel?: string;
191
- removeLabel?: string;
192
- currentUrl?: string | null;
193
- currentUrls?: string[] | null;
194
- onClear?: () => void;
195
- maxSize: number;
196
- maxFiles?: number;
197
- component: Type<unknown>;
198
- inputs?: ModalInputMap;
158
+ label?: string;
159
+ placeholder?: string;
160
+ validators?: ValidatorFn[];
161
+ asyncValidators?: ValidatorFn[];
162
+ updateOn?: 'change' | 'blur' | 'submit';
163
+ options?: SelectOption[];
164
+ dataSource?: FieldDataSource;
165
+ disabled?: boolean;
166
+ readOnly?: boolean;
167
+ visible?: FieldVisibilityCondition<TModel>;
168
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
169
+ autoFocus?: boolean;
170
+ defaultValue?: unknown;
171
+ mask?: string;
172
+ autocomplete?: string;
173
+ minDate?: string;
174
+ maxDate?: string;
175
+ mode?: 'date' | 'time' | 'datetime-local';
176
+ min?: number | string;
177
+ max?: number | string;
178
+ step?: number;
179
+ /** A number field's fixed decimals (NumberFieldConfig.decimals). */
180
+ decimals?: number;
181
+ rows?: number;
182
+ searchable?: boolean;
183
+ searchPlaceholder?: string;
184
+ maxSelections?: number;
185
+ collapseThreshold?: number;
186
+ collapsePlaceholder?: string;
187
+ allSelectedPlaceholder?: string;
188
+ swatches?: string[];
189
+ showValue?: boolean;
190
+ unit?: string;
191
+ accept?: string;
192
+ multiple?: boolean;
193
+ displayMode?: 'dropzone' | 'thumbnail' | 'list' | 'compact';
194
+ dropzoneHint?: string;
195
+ dropActiveHint?: string;
196
+ replaceLabel?: string;
197
+ removeLabel?: string;
198
+ currentUrl?: string | null;
199
+ currentUrls?: string[] | null;
200
+ onClear?: () => void;
201
+ maxSize: number;
202
+ maxFiles?: number;
203
+ component: Type<unknown>;
204
+ inputs?: ModalInputMap;
199
205
  };
200
- declare class MnFormBodyComponent<TModel = unknown, TResult = TModel> implements OnInit, OnDestroy, AfterViewInit {
201
- private fb;
202
- /**
203
- * Change detector used to announce state this component mutates outside an Angular
204
- * event handler — after an `await`, or from an RxJS subscription. Consuming apps run
205
- * zoneless, where such a write notifies nothing: the view is never marked dirty, so it
206
- * keeps rendering the stale value and `checkNoChanges` then reports it as NG0100
207
- * (e.g. the submit button staying disabled on "Submitting..." after a failed submit).
208
- * Every async mutation of {@link isSubmitting}, {@link fieldLoading}, {@link fieldOptions}
209
- * and {@link formErrors} must be followed by `markForCheck()`.
210
- */
211
- private readonly cdr;
212
- config: FormModalConfig<TModel, TResult>;
213
- modalRef: MnModalRef<TResult>;
214
- hideFooter: boolean;
215
- hideCustomBody: boolean;
216
- formStatusChange: EventEmitter<string>;
217
- inputFields?: QueryList<MnInputField>;
218
- textareas?: QueryList<MnTextarea>;
219
- form: FormGroup;
220
- rows: FormRow<TModel>[];
221
- fieldGroups: FormFieldGroup<TModel>[];
222
- isSubmitting: boolean;
223
- readonly FieldKind: typeof FieldKind;
224
- readonly ModalCloseReason: typeof ModalCloseReason;
225
- /** Cross-field validation errors: { fieldKey: errorMessage } */
226
- formErrors: Record<string, string>;
227
- /** Track which fields are currently visible (for conditional fields) */
228
- fieldVisibility: Record<string, boolean>;
229
- /** Track which fields are currently conditionally required */
230
- fieldConditionallyRequired: Record<string, boolean>;
231
- /** Track loading state per field for async data sources */
232
- fieldLoading: Record<string, boolean>;
233
- /** Dynamic options loaded from data sources */
234
- fieldOptions: Record<string, SelectOption[]>;
235
- private valueChangesSubscription?;
236
- asField(field: FormFieldConfig<TModel>): FormFieldView<TModel>;
237
- asKey(key: keyof TModel | string): string;
238
- asAny(val: unknown): any;
239
- hasRequiredValidator(field: FormFieldConfig<TModel>): boolean;
240
- /** Store table data sources keyed by field key for template access */
241
- tableDataSources: Record<string, TableDataSource<unknown>>;
242
- private languageService;
243
- private static readonly DEFAULT_LABELS;
244
- private resolveLabel;
245
- /** Resolved i18n labels with defaults, falling back to translated keys */
246
- get labels(): {
247
- submit: string;
248
- cancel: string;
249
- submitting: string;
250
- selectPlaceholder: string;
251
- loading: string;
252
- fileUploadPrompt: string;
253
- fieldRequired: string;
254
- loadingOptions: string;
255
- accepted: string;
256
- maxSize: string;
206
+ export declare class MnFormBodyComponent<TModel = unknown, TResult = TModel> implements OnInit, OnDestroy, AfterViewInit {
207
+ private fb;
208
+ /**
209
+ * Change detector used to announce state this component mutates outside an Angular
210
+ * event handler — after an `await`, or from an RxJS subscription. Consuming apps run
211
+ * zoneless, where such a write notifies nothing: the view is never marked dirty, so it
212
+ * keeps rendering the stale value and `checkNoChanges` then reports it as NG0100
213
+ * (e.g. the submit button staying disabled on "Submitting..." after a failed submit).
214
+ * Every async mutation of {@link isSubmitting}, {@link fieldLoading}, {@link fieldOptions}
215
+ * and {@link formErrors} must be followed by `markForCheck()`.
216
+ */
217
+ private readonly cdr;
218
+ config: FormModalConfig<TModel, TResult>;
219
+ modalRef: MnModalRef<TResult>;
220
+ hideFooter: boolean;
221
+ hideCustomBody: boolean;
222
+ formStatusChange: EventEmitter<string>;
223
+ inputFields?: QueryList<MnInputField>;
224
+ textareas?: QueryList<MnTextarea>;
225
+ form: FormGroup;
226
+ rows: FormRow<TModel>[];
227
+ fieldGroups: FormFieldGroup<TModel>[];
228
+ isSubmitting: boolean;
229
+ readonly FieldKind: typeof FieldKind;
230
+ readonly ModalCloseReason: typeof ModalCloseReason;
231
+ /** Cross-field validation errors: { fieldKey: errorMessage } */
232
+ formErrors: Record<string, string>;
233
+ /** Track which fields are currently visible (for conditional fields) */
234
+ fieldVisibility: Record<string, boolean>;
235
+ /** Track which fields are currently conditionally required */
236
+ fieldConditionallyRequired: Record<string, boolean>;
237
+ /** Track loading state per field for async data sources */
238
+ fieldLoading: Record<string, boolean>;
239
+ /** Dynamic options loaded from data sources */
240
+ fieldOptions: Record<string, SelectOption[]>;
241
+ private valueChangesSubscription?;
242
+ asField(field: FormFieldConfig<TModel>): FormFieldView<TModel>;
243
+ asKey(key: keyof TModel | string): string;
244
+ asAny(val: unknown): any;
245
+ hasRequiredValidator(field: FormFieldConfig<TModel>): boolean;
246
+ /** Store table data sources keyed by field key for template access */
247
+ tableDataSources: Record<string, TableDataSource<unknown>>;
248
+ private languageService;
249
+ private static readonly DEFAULT_LABELS;
250
+ private resolveLabel;
251
+ /** Resolved i18n labels with defaults, falling back to translated keys */
252
+ get labels(): {
253
+ submit: string;
254
+ cancel: string;
255
+ submitting: string;
256
+ selectPlaceholder: string;
257
+ loading: string;
258
+ fileUploadPrompt: string;
259
+ fieldRequired: string;
260
+ loadingOptions: string;
261
+ accepted: string;
262
+ maxSize: string;
263
+ };
264
+ ngOnInit(): void;
265
+ ngAfterViewInit(): void;
266
+ applyAutoFocus(): void;
267
+ ngOnDestroy(): void;
268
+ private initializeForm;
269
+ isFieldReadOnly(field: FormFieldConfig<TModel>): boolean;
270
+ isFieldDisabled(field: FormFieldConfig<TModel>): boolean;
271
+ /** Track which field groups are currently visible */
272
+ groupVisibility: Record<string, boolean>;
273
+ private buildRows;
274
+ private initializeGroupVisibility;
275
+ private updateGroupVisibility;
276
+ isGroupVisible(group: FormFieldGroup<TModel>): boolean;
277
+ private initializeVisibility;
278
+ private updateVisibility;
279
+ /**
280
+ * Builds the full validator array for a field, including conditionallyRequired.
281
+ * @param field The field configuration view.
282
+ * @param formValue The current form values.
283
+ * @returns Array of validators to apply.
284
+ */
285
+ private buildValidators;
286
+ /**
287
+ * Updates the conditionallyRequired state for a single field and adjusts validators.
288
+ * @param field The field configuration view.
289
+ * @param formValue The current form values.
290
+ */
291
+ private updateConditionallyRequired;
292
+ isFieldVisible(field: FormFieldConfig<TModel>): boolean;
293
+ private runFormValidators;
294
+ getFieldError(key: string): string | null;
295
+ get hasFormErrors(): boolean;
296
+ private initializeDataSources;
297
+ isFieldLoading(key: string): boolean;
298
+ /** Get options for a field — uses dataSource options if available, otherwise static options */
299
+ getFieldOptions(field: FormFieldConfig<TModel>): SelectOption[];
300
+ /** Convert SelectOption[] to MnSelectOption[] for mn-lib-select */
301
+ getSelectOptions(field: FormFieldConfig<TModel>): MnSelectOption[];
302
+ getSelectProps(field: FormFieldConfig<TModel>): MnSelectProps;
303
+ private loadFieldOptions;
304
+ private initializeTableFields;
305
+ onTableSelectionChange(field: FormFieldConfig<TModel>, selectedRows: unknown[]): void;
306
+ getRatingRange(field: FormFieldConfig<TModel>): number[];
307
+ setRating(field: FormFieldConfig<TModel>, value: number): void;
308
+ getRatingValue(field: FormFieldConfig<TModel>): number;
309
+ onSliderChange(field: FormFieldConfig<TModel>, event: Event): void;
310
+ getSliderValue(field: FormFieldConfig<TModel>): number;
311
+ onColorChange(field: FormFieldConfig<TModel>, event: Event): void;
312
+ setColorFromSwatch(field: FormFieldConfig<TModel>, color: string): void;
313
+ getColorValue(field: FormFieldConfig<TModel>): string;
314
+ private subscribeToValueChanges;
315
+ private previousFormValue;
316
+ private reloadDependentDataSources;
317
+ /**
318
+ * Invokes a FILE field's `onClear` callback when its existing image is removed.
319
+ * FILE fields render {@link MnFileInput}, which owns selection/validation and
320
+ * writes the value (`File | File[] | null`) straight to the form control.
321
+ * @param field The field whose existing image was cleared.
322
+ */
323
+ onFileCleared(field: FormFieldConfig<TModel>): void;
324
+ /** Icon size (px) for the footer action buttons. */
325
+ readonly actionIconSize = 18;
326
+ /** Whether action-button icons should render on this modal (defaults to true). */
327
+ get showActionIcons(): boolean;
328
+ /** The leading icon for the submit button, or null when icons are disabled. */
329
+ get submitIcon(): LucideIconData | null;
330
+ /** The leading icon for the cancel button, or null when icons are disabled. */
331
+ get cancelIcon(): LucideIconData | null;
332
+ submit(): Promise<void>;
333
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnFormBodyComponent<any, any>, never>;
334
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnFormBodyComponent<any, any>, "mn-form-body", never, {
335
+ "config": {
336
+ "alias": "config";
337
+ "required": false;
338
+ };
339
+ "modalRef": {
340
+ "alias": "modalRef";
341
+ "required": false;
342
+ };
343
+ "hideFooter": {
344
+ "alias": "hideFooter";
345
+ "required": false;
346
+ };
347
+ "hideCustomBody": {
348
+ "alias": "hideCustomBody";
349
+ "required": false;
257
350
  };
258
- ngOnInit(): void;
259
- ngAfterViewInit(): void;
260
- applyAutoFocus(): void;
261
- ngOnDestroy(): void;
262
- private initializeForm;
263
- isFieldReadOnly(field: FormFieldConfig<TModel>): boolean;
264
- isFieldDisabled(field: FormFieldConfig<TModel>): boolean;
265
- /** Track which field groups are currently visible */
266
- groupVisibility: Record<string, boolean>;
267
- private buildRows;
268
- private initializeGroupVisibility;
269
- private updateGroupVisibility;
270
- isGroupVisible(group: FormFieldGroup<TModel>): boolean;
271
- private initializeVisibility;
272
- private updateVisibility;
273
- /**
274
- * Builds the full validator array for a field, including conditionallyRequired.
275
- * @param field The field configuration view.
276
- * @param formValue The current form values.
277
- * @returns Array of validators to apply.
278
- */
279
- private buildValidators;
280
- /**
281
- * Updates the conditionallyRequired state for a single field and adjusts validators.
282
- * @param field The field configuration view.
283
- * @param formValue The current form values.
284
- */
285
- private updateConditionallyRequired;
286
- isFieldVisible(field: FormFieldConfig<TModel>): boolean;
287
- private runFormValidators;
288
- getFieldError(key: string): string | null;
289
- get hasFormErrors(): boolean;
290
- private initializeDataSources;
291
- isFieldLoading(key: string): boolean;
292
- /** Get options for a field — uses dataSource options if available, otherwise static options */
293
- getFieldOptions(field: FormFieldConfig<TModel>): SelectOption[];
294
- /** Convert SelectOption[] to MnSelectOption[] for mn-lib-select */
295
- getSelectOptions(field: FormFieldConfig<TModel>): MnSelectOption[];
296
- getSelectProps(field: FormFieldConfig<TModel>): MnSelectProps;
297
- private loadFieldOptions;
298
- private initializeTableFields;
299
- onTableSelectionChange(field: FormFieldConfig<TModel>, selectedRows: unknown[]): void;
300
- getRatingRange(field: FormFieldConfig<TModel>): number[];
301
- setRating(field: FormFieldConfig<TModel>, value: number): void;
302
- getRatingValue(field: FormFieldConfig<TModel>): number;
303
- onSliderChange(field: FormFieldConfig<TModel>, event: Event): void;
304
- getSliderValue(field: FormFieldConfig<TModel>): number;
305
- onColorChange(field: FormFieldConfig<TModel>, event: Event): void;
306
- setColorFromSwatch(field: FormFieldConfig<TModel>, color: string): void;
307
- getColorValue(field: FormFieldConfig<TModel>): string;
308
- private subscribeToValueChanges;
309
- private previousFormValue;
310
- private reloadDependentDataSources;
311
- /**
312
- * Invokes a FILE field's `onClear` callback when its existing image is removed.
313
- * FILE fields render {@link MnFileInput}, which owns selection/validation and
314
- * writes the value (`File | File[] | null`) straight to the form control.
315
- * @param field The field whose existing image was cleared.
316
- */
317
- onFileCleared(field: FormFieldConfig<TModel>): void;
318
- /** Icon size (px) for the footer action buttons. */
319
- readonly actionIconSize = 18;
320
- /** Whether action-button icons should render on this modal (defaults to true). */
321
- get showActionIcons(): boolean;
322
- /** The leading icon for the submit button, or null when icons are disabled. */
323
- get submitIcon(): LucideIconData | null;
324
- /** The leading icon for the cancel button, or null when icons are disabled. */
325
- get cancelIcon(): LucideIconData | null;
326
- submit(): Promise<void>;
327
- static ɵfac: i0.ɵɵFactoryDeclaration<MnFormBodyComponent<any, any>, never>;
328
- static ɵcmp: i0.ɵɵComponentDeclaration<MnFormBodyComponent<any, any>, "mn-form-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; "hideFooter": { "alias": "hideFooter"; "required": false; }; "hideCustomBody": { "alias": "hideCustomBody"; "required": false; }; }, { "formStatusChange": "formStatusChange"; }, never, never, true, never>;
351
+ }, {
352
+ "formStatusChange": "formStatusChange";
353
+ }, never, never, true, never>;
329
354
  }
330
-
331
- declare class MnWizardBodyComponent implements OnInit, AfterViewInit, OnDestroy {
332
- private cdr;
333
- config: WizardModalConfig;
334
- modalRef: MnModalRef<WizardResult>;
335
- formBodies: QueryList<MnFormBodyComponent>;
336
- stepWrappers: QueryList<ElementRef<HTMLElement>>;
337
- /**
338
- * The step body's scroll container. Every step renders into this one element
339
- * (inactive steps are hidden, not destroyed), so its scroll offset is shared —
340
- * without an explicit reset, arriving on a new step lands you wherever the
341
- * previous step was scrolled to. See {@link setCurrentStep}.
342
- */
343
- stepScroller?: ElementRef<HTMLElement>;
344
- currentStepId: ModalStepId;
345
- /**
346
- * Title of the currently active step, mirrored into a signal so the modal
347
- * shell can append it to the modal title on small screens (where the step
348
- * labels under the progress circles are hidden). A signal — not a getter —
349
- * because the shell lives outside this component's change-detection subtree,
350
- * so a plain field mutation here would not update the shell in a zoneless app.
351
- */
352
- readonly currentStepTitle: i0.WritableSignal<string | undefined>;
353
- visitedStepIds: ModalStepId[];
354
- isCurrentStepValid: boolean;
355
- isCompleting: boolean;
356
- wizardErrors: Record<string, string>;
357
- /**
358
- * Min-height (px) for the step container, sized to the tallest step so the
359
- * modal does not jump when navigating between steps. Monotonic — only grows.
360
- */
361
- measuredMinHeight: number;
362
- private languageService;
363
- private static readonly DEFAULT_LABELS;
364
- private resolveLabel;
365
- /** Resolved i18n labels with defaults, falling back to translated keys */
366
- get labels(): {
367
- next: string;
368
- back: string;
369
- close: string;
370
- complete: string;
371
- completing: string;
355
+ export declare class MnWizardBodyComponent implements OnInit, AfterViewInit, OnDestroy {
356
+ private cdr;
357
+ config: WizardModalConfig;
358
+ modalRef: MnModalRef<WizardResult>;
359
+ formBodies: QueryList<MnFormBodyComponent>;
360
+ stepWrappers: QueryList<ElementRef<HTMLElement>>;
361
+ /**
362
+ * The step body's scroll container. Every step renders into this one element
363
+ * (inactive steps are hidden, not destroyed), so its scroll offset is shared —
364
+ * without an explicit reset, arriving on a new step lands you wherever the
365
+ * previous step was scrolled to. See {@link setCurrentStep}.
366
+ */
367
+ stepScroller?: ElementRef<HTMLElement>;
368
+ currentStepId: ModalStepId;
369
+ /**
370
+ * Title of the currently active step, mirrored into a signal so the modal
371
+ * shell can append it to the modal title on small screens (where the step
372
+ * labels under the progress circles are hidden). A signal — not a getter —
373
+ * because the shell lives outside this component's change-detection subtree,
374
+ * so a plain field mutation here would not update the shell in a zoneless app.
375
+ */
376
+ readonly currentStepTitle: import("@angular/core").WritableSignal<string | undefined>;
377
+ visitedStepIds: ModalStepId[];
378
+ isCurrentStepValid: boolean;
379
+ isCompleting: boolean;
380
+ wizardErrors: Record<string, string>;
381
+ /**
382
+ * Min-height (px) for the step container, sized to the tallest step so the
383
+ * modal does not jump when navigating between steps. Monotonic — only grows.
384
+ */
385
+ measuredMinHeight: number;
386
+ private languageService;
387
+ private static readonly DEFAULT_LABELS;
388
+ private resolveLabel;
389
+ /** Resolved i18n labels with defaults, falling back to translated keys */
390
+ get labels(): {
391
+ next: string;
392
+ back: string;
393
+ close: string;
394
+ complete: string;
395
+ completing: string;
396
+ };
397
+ /** Pre-built form configs keyed by step id — only for steps that have fields */
398
+ stepFormConfigs: Record<ModalStepId, FormModalConfig<unknown, unknown>>;
399
+ /**
400
+ * Pre-built host configs keyed by step id — only for steps whose body is a
401
+ * component or template (not a plain string) and that have no form fields.
402
+ * Drives the `mn-custom-body-host` rendered for those steps.
403
+ */
404
+ stepBodyConfigs: Record<ModalStepId, CustomModalConfig>;
405
+ private statusSubscription?;
406
+ private formBodiesSubscription?;
407
+ ngOnInit(): void;
408
+ ngAfterViewInit(): void;
409
+ isTextBody(step: WizardStepConfig): boolean;
410
+ /**
411
+ * Builds the {@link CustomModalConfig} used to render a step whose body is a
412
+ * component or template. Returns `undefined` for steps with no body or a
413
+ * plain-string body (those render through their own template branches).
414
+ * @param step The wizard step to inspect.
415
+ */
416
+ private buildStepBodyConfig;
417
+ goToStep(step: WizardStepConfig): Promise<void>;
418
+ ngOnDestroy(): void;
419
+ /**
420
+ * Measures every step's natural height and records the tallest as
421
+ * {@link measuredMinHeight}. Monotonic: the value only ever grows, so a
422
+ * re-measure can never shrink the modal. Skipped when the modal has an
423
+ * explicit height or is full-size (those are already fixed-height).
424
+ */
425
+ private measureTallestStep;
426
+ /** Get visible steps (filtered by visibility condition) */
427
+ get visibleSteps(): WizardStepConfig[];
428
+ isStepVisible(step: WizardStepConfig): boolean;
429
+ get currentStep(): WizardStepConfig<unknown> | undefined;
430
+ get currentVisibleIndex(): number;
431
+ get currentStepIndex(): number;
432
+ get canGoBack(): boolean;
433
+ get canGoNext(): boolean;
434
+ get isLastStep(): boolean;
435
+ /** Icon size (px) for the wizard action buttons. */
436
+ readonly actionIconSize = 18;
437
+ /** Whether action-button icons should render on this wizard (defaults to true). */
438
+ get showActionIcons(): boolean;
439
+ /**
440
+ * The leading icon for the back button, or null when icons are disabled.
441
+ * Shows a back arrow when navigation is possible, otherwise a cross (the
442
+ * button acts as "Close" on the first step).
443
+ */
444
+ get backIcon(): LucideIconData | null;
445
+ /** The trailing icon for the next button, or null when icons are disabled. */
446
+ get nextIcon(): LucideIconData | null;
447
+ /** The leading icon for the complete button, or null when icons are disabled. */
448
+ get completeIcon(): LucideIconData | null;
449
+ /** Index of the current step for the progress line */
450
+ get currentProgressIndex(): number;
451
+ get isFreeFlow(): boolean;
452
+ canNavigateToStep(step: WizardStepConfig): boolean;
453
+ next(): Promise<void>;
454
+ /** Find the MnFormBodyComponent for the current step */
455
+ private getCurrentFormBody;
456
+ private trackCurrentStepValidity;
457
+ back(): Promise<void>;
458
+ /**
459
+ * Activates a step and mirrors its title into {@link currentStepTitle} so the
460
+ * shell can reflect the step name in the modal title on small screens.
461
+ * @param stepId Id of the step to make current.
462
+ */
463
+ private setCurrentStep;
464
+ complete(): Promise<void>;
465
+ /** Collect form data from all form-driven steps, namespaced by step ID */
466
+ private getAggregatedData;
467
+ /**
468
+ * Maps a footer action's ActionStyle to mnButton data props.
469
+ * @param action The footer action configuration.
470
+ */
471
+ getFooterActionButtonData(action: ModalFooterAction<unknown>): Partial<MnButtonTypes>;
472
+ /**
473
+ * Handles a custom footer action click.
474
+ * @param action The footer action configuration.
475
+ */
476
+ handleFooterAction(action: ModalFooterAction<unknown>): Promise<void>;
477
+ private notifyStepChange;
478
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnWizardBodyComponent, never>;
479
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnWizardBodyComponent, "mn-wizard-body", never, {
480
+ "config": {
481
+ "alias": "config";
482
+ "required": false;
372
483
  };
373
- /** Pre-built form configs keyed by step id — only for steps that have fields */
374
- stepFormConfigs: Record<ModalStepId, FormModalConfig<unknown, unknown>>;
375
- /**
376
- * Pre-built host configs keyed by step id — only for steps whose body is a
377
- * component or template (not a plain string) and that have no form fields.
378
- * Drives the `mn-custom-body-host` rendered for those steps.
379
- */
380
- stepBodyConfigs: Record<ModalStepId, CustomModalConfig>;
381
- private statusSubscription?;
382
- private formBodiesSubscription?;
383
- ngOnInit(): void;
384
- ngAfterViewInit(): void;
385
- isTextBody(step: WizardStepConfig): boolean;
386
- /**
387
- * Builds the {@link CustomModalConfig} used to render a step whose body is a
388
- * component or template. Returns `undefined` for steps with no body or a
389
- * plain-string body (those render through their own template branches).
390
- * @param step The wizard step to inspect.
391
- */
392
- private buildStepBodyConfig;
393
- goToStep(step: WizardStepConfig): Promise<void>;
394
- ngOnDestroy(): void;
395
- /**
396
- * Measures every step's natural height and records the tallest as
397
- * {@link measuredMinHeight}. Monotonic: the value only ever grows, so a
398
- * re-measure can never shrink the modal. Skipped when the modal has an
399
- * explicit height or is full-size (those are already fixed-height).
400
- */
401
- private measureTallestStep;
402
- /** Get visible steps (filtered by visibility condition) */
403
- get visibleSteps(): WizardStepConfig[];
404
- isStepVisible(step: WizardStepConfig): boolean;
405
- get currentStep(): WizardStepConfig<unknown> | undefined;
406
- get currentVisibleIndex(): number;
407
- get currentStepIndex(): number;
408
- get canGoBack(): boolean;
409
- get canGoNext(): boolean;
410
- get isLastStep(): boolean;
411
- /** Icon size (px) for the wizard action buttons. */
412
- readonly actionIconSize = 18;
413
- /** Whether action-button icons should render on this wizard (defaults to true). */
414
- get showActionIcons(): boolean;
415
- /**
416
- * The leading icon for the back button, or null when icons are disabled.
417
- * Shows a back arrow when navigation is possible, otherwise a cross (the
418
- * button acts as "Close" on the first step).
419
- */
420
- get backIcon(): LucideIconData | null;
421
- /** The trailing icon for the next button, or null when icons are disabled. */
422
- get nextIcon(): LucideIconData | null;
423
- /** The leading icon for the complete button, or null when icons are disabled. */
424
- get completeIcon(): LucideIconData | null;
425
- /** Index of the current step for the progress line */
426
- get currentProgressIndex(): number;
427
- get isFreeFlow(): boolean;
428
- canNavigateToStep(step: WizardStepConfig): boolean;
429
- next(): Promise<void>;
430
- /** Find the MnFormBodyComponent for the current step */
431
- private getCurrentFormBody;
432
- private trackCurrentStepValidity;
433
- back(): Promise<void>;
434
- /**
435
- * Activates a step and mirrors its title into {@link currentStepTitle} so the
436
- * shell can reflect the step name in the modal title on small screens.
437
- * @param stepId Id of the step to make current.
438
- */
439
- private setCurrentStep;
440
- complete(): Promise<void>;
441
- /** Collect form data from all form-driven steps, namespaced by step ID */
442
- private getAggregatedData;
443
- /**
444
- * Maps a footer action's ActionStyle to mnButton data props.
445
- * @param action The footer action configuration.
446
- */
447
- getFooterActionButtonData(action: ModalFooterAction<unknown>): Partial<MnButtonTypes>;
448
- /**
449
- * Handles a custom footer action click.
450
- * @param action The footer action configuration.
451
- */
452
- handleFooterAction(action: ModalFooterAction<unknown>): Promise<void>;
453
- private notifyStepChange;
454
- static ɵfac: i0.ɵɵFactoryDeclaration<MnWizardBodyComponent, never>;
455
- static ɵcmp: i0.ɵɵComponentDeclaration<MnWizardBodyComponent, "mn-wizard-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
484
+ "modalRef": {
485
+ "alias": "modalRef";
486
+ "required": false;
487
+ };
488
+ }, {}, never, never, true, never>;
456
489
  }
457
-
458
- declare class MnConfirmationBodyComponent<TResult = boolean> implements OnInit {
459
- /** Lucide icons the template renders. */
460
- protected readonly icons: Record<"CircleAlert" | "TriangleAlert", LucideIconData>;
461
- private cdr;
462
- config: ConfirmationModalConfig<TResult>;
463
- modalRef: MnModalRef<TResult>;
464
- formBody?: MnFormBodyComponent;
465
- confirmButtonStatus: string;
466
- hasFormFields: boolean;
467
- private languageService;
468
- ngOnInit(): void;
469
- onFormStatusChange(status: string): void;
470
- confirm(): Promise<void>;
471
- cancel(): void;
472
- private resolveLabel;
473
- get confirmLabel(): string;
474
- get cancelLabel(): string;
475
- get confirmStyle(): ActionStyle;
476
- get cancelStyle(): ActionStyle;
477
- get toneClass(): string;
478
- getButtonColor(style: ActionStyle): 'primary' | 'secondary' | 'danger' | 'warning' | 'success';
479
- getButtonVariant(style: ActionStyle): 'fill' | 'outline' | 'text';
480
- get isConfirmDisabled(): boolean;
481
- /** Icon size (px) for the action buttons. */
482
- readonly actionIconSize = 18;
483
- /** Whether action-button icons should render on this modal (defaults to true). */
484
- get showActionIcons(): boolean;
485
- /**
486
- * The leading icon for the confirm button, or null when icons are disabled.
487
- * Uses the per-action override, else defaults by style (DANGER → trash, else check).
488
- */
489
- get confirmIcon(): LucideIconData | null;
490
- /** The leading icon for the cancel button, or null when icons are disabled. */
491
- get cancelIcon(): LucideIconData | null;
492
- static ɵfac: i0.ɵɵFactoryDeclaration<MnConfirmationBodyComponent<any>, never>;
493
- static ɵcmp: i0.ɵɵComponentDeclaration<MnConfirmationBodyComponent<any>, "mn-confirmation-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
490
+ export declare class MnConfirmationBodyComponent<TResult = boolean> implements OnInit {
491
+ /** Lucide icons the template renders. */
492
+ protected readonly icons: Record<"CircleAlert" | "TriangleAlert", LucideIconData>;
493
+ private cdr;
494
+ config: ConfirmationModalConfig<TResult>;
495
+ modalRef: MnModalRef<TResult>;
496
+ formBody?: MnFormBodyComponent;
497
+ confirmButtonStatus: string;
498
+ hasFormFields: boolean;
499
+ private languageService;
500
+ ngOnInit(): void;
501
+ onFormStatusChange(status: string): void;
502
+ confirm(): Promise<void>;
503
+ cancel(): void;
504
+ private resolveLabel;
505
+ get confirmLabel(): string;
506
+ get cancelLabel(): string;
507
+ get confirmStyle(): ActionStyle;
508
+ get cancelStyle(): ActionStyle;
509
+ get toneClass(): string;
510
+ getButtonColor(style: ActionStyle): 'primary' | 'secondary' | 'danger' | 'warning' | 'success';
511
+ getButtonVariant(style: ActionStyle): 'fill' | 'outline' | 'text';
512
+ get isConfirmDisabled(): boolean;
513
+ /** Icon size (px) for the action buttons. */
514
+ readonly actionIconSize = 18;
515
+ /** Whether action-button icons should render on this modal (defaults to true). */
516
+ get showActionIcons(): boolean;
517
+ /**
518
+ * The leading icon for the confirm button, or null when icons are disabled.
519
+ * Uses the per-action override, else defaults by style (DANGER → trash, else check).
520
+ */
521
+ get confirmIcon(): LucideIconData | null;
522
+ /** The leading icon for the cancel button, or null when icons are disabled. */
523
+ get cancelIcon(): LucideIconData | null;
524
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnConfirmationBodyComponent<any>, never>;
525
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnConfirmationBodyComponent<any>, "mn-confirmation-body", never, {
526
+ "config": {
527
+ "alias": "config";
528
+ "required": false;
529
+ };
530
+ "modalRef": {
531
+ "alias": "modalRef";
532
+ "required": false;
533
+ };
534
+ }, {}, never, never, true, never>;
494
535
  }
495
-
496
- declare class MnCustomBodyHostComponent implements OnInit {
497
- config: CustomModalConfig;
498
- modalRef: MnModalRef<unknown>;
499
- container: ViewContainerRef;
500
- private componentRef?;
501
- ngOnInit(): void;
502
- private loadContent;
503
- attachComponent(component: Type<unknown>): void;
504
- attachTemplate(template: TemplateRef<unknown>): void;
505
- static ɵfac: i0.ɵɵFactoryDeclaration<MnCustomBodyHostComponent, never>;
506
- static ɵcmp: i0.ɵɵComponentDeclaration<MnCustomBodyHostComponent, "mn-custom-body-host", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
536
+ export declare class MnCustomBodyHostComponent implements OnInit {
537
+ config: CustomModalConfig;
538
+ modalRef: MnModalRef<unknown>;
539
+ container: ViewContainerRef;
540
+ private componentRef?;
541
+ ngOnInit(): void;
542
+ private loadContent;
543
+ attachComponent(component: Type<unknown>): void;
544
+ attachTemplate(template: TemplateRef<unknown>): void;
545
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnCustomBodyHostComponent, never>;
546
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnCustomBodyHostComponent, "mn-custom-body-host", never, {
547
+ "config": {
548
+ "alias": "config";
549
+ "required": false;
550
+ };
551
+ "modalRef": {
552
+ "alias": "modalRef";
553
+ "required": false;
554
+ };
555
+ }, {}, never, never, true, never>;
507
556
  }
508
-
509
- export { MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnFormBodyComponent, MnModalShellComponent, MnWizardBodyComponent };
557
+ export {};