mn-angular-lib 2.0.34 → 2.0.35

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,794 +1,790 @@
1
- import { Type, TemplateRef, InjectionToken, ComponentRef } from '@angular/core';
2
- export { TemplateRef, Type } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
- import { ValidatorFn, AsyncValidatorFn } from '@angular/forms';
5
- import { LucideIconData } from '@lucide/angular';
6
- export { LucideIconData } from '@lucide/angular';
7
- import { TableDataSource } from 'mn-angular-lib/collection';
8
-
9
- declare enum ModalKind {
10
- WIZARD = "wizard",
11
- FORM = "form",
12
- CONFIRMATION = "confirmation",
13
- CUSTOM = "custom"
1
+ import { ComponentRef, InjectionToken, TemplateRef, Type } from "@angular/core";
2
+ import { Observable } from "rxjs";
3
+ import { AsyncValidatorFn, ValidatorFn } from "@angular/forms";
4
+ import { LucideIconData, LucideIconData as LucideIconData$1 } from "@lucide/angular";
5
+ import { TableDataSource } from "mn-angular-lib/collection";
6
+ export declare enum ModalKind {
7
+ WIZARD = "wizard",
8
+ FORM = "form",
9
+ CONFIRMATION = "confirmation",
10
+ CUSTOM = "custom"
14
11
  }
15
- declare enum ModalSize {
16
- SM = "sm",
17
- MD = "md",
18
- LG = "lg",
19
- XL = "xl",
20
- FULL = "full"
12
+ export declare enum ModalSize {
13
+ SM = "sm",
14
+ MD = "md",
15
+ LG = "lg",
16
+ XL = "xl",
17
+ FULL = "full"
21
18
  }
22
- declare enum CloseMode {
23
- ALLOWED = "allowed",
24
- GUARDED = "guarded",
25
- DISABLED = "disabled"
19
+ export declare enum CloseMode {
20
+ ALLOWED = "allowed",
21
+ GUARDED = "guarded",
22
+ DISABLED = "disabled"
26
23
  }
27
- declare enum BackdropMode {
28
- HIDE = "hide",
29
- STATIC = "static",
30
- CLOSABLE = "closable"
24
+ export declare enum BackdropMode {
25
+ HIDE = "hide",
26
+ STATIC = "static",
27
+ CLOSABLE = "closable"
31
28
  }
32
- declare enum KeyboardMode {
33
- ENABLED = "enabled",
34
- DISABLED = "disabled"
29
+ export declare enum KeyboardMode {
30
+ ENABLED = "enabled",
31
+ DISABLED = "disabled"
35
32
  }
36
- declare enum ModalIntent {
37
- NEUTRAL = "neutral",
38
- INFO = "info",
39
- SUCCESS = "success",
40
- WARNING = "warning",
41
- DANGER = "danger"
33
+ export declare enum ModalIntent {
34
+ NEUTRAL = "neutral",
35
+ INFO = "info",
36
+ SUCCESS = "success",
37
+ WARNING = "warning",
38
+ DANGER = "danger"
42
39
  }
43
- declare enum WizardFlowMode {
44
- LINEAR = "linear",
45
- FREE = "free"
40
+ export declare enum WizardFlowMode {
41
+ LINEAR = "linear",
42
+ FREE = "free"
46
43
  }
47
- declare enum FormLayoutMode {
48
- SINGLE_COLUMN = "single-column",
49
- TWO_COLUMN = "two-column",
50
- INLINE = "inline"
44
+ export declare enum FormLayoutMode {
45
+ SINGLE_COLUMN = "single-column",
46
+ TWO_COLUMN = "two-column",
47
+ INLINE = "inline"
51
48
  }
52
- declare enum SubmitMode {
53
- ONCE = "once",
54
- RETRYABLE = "retryable"
49
+ export declare enum SubmitMode {
50
+ ONCE = "once",
51
+ RETRYABLE = "retryable"
55
52
  }
56
- declare enum ConfirmationTone {
57
- DEFAULT = "default",
58
- WARNING = "warning",
59
- DANGER = "danger"
53
+ export declare enum ConfirmationTone {
54
+ DEFAULT = "default",
55
+ WARNING = "warning",
56
+ DANGER = "danger"
60
57
  }
61
- declare enum FieldKind {
62
- TEXT = "text",
63
- NUMBER = "number",
64
- SELECT = "select",
65
- CHECKBOX = "checkbox",
66
- DATE = "date",
67
- TEXTAREA = "textarea",
68
- DATETIME = "datetime",
69
- MULTI_SELECT = "multi-select",
70
- MULTI_SELECT_TABLE = "multi-select-table",
71
- SINGLE_SELECT_TABLE = "single-select-table",
72
- PASSWORD = "password",
73
- FILE = "file",
74
- COLOR = "color",
75
- RATING = "rating",
76
- SLIDER = "slider",
77
- CUSTOM = "custom"
58
+ export declare enum FieldKind {
59
+ TEXT = "text",
60
+ NUMBER = "number",
61
+ SELECT = "select",
62
+ CHECKBOX = "checkbox",
63
+ DATE = "date",
64
+ TEXTAREA = "textarea",
65
+ DATETIME = "datetime",
66
+ MULTI_SELECT = "multi-select",
67
+ MULTI_SELECT_TABLE = "multi-select-table",
68
+ SINGLE_SELECT_TABLE = "single-select-table",
69
+ PASSWORD = "password",
70
+ FILE = "file",
71
+ COLOR = "color",
72
+ RATING = "rating",
73
+ SLIDER = "slider",
74
+ CUSTOM = "custom"
78
75
  }
79
- declare enum FieldAppearance {
80
- OUTLINE = "outline",
81
- FILLED = "filled",
82
- GHOST = "ghost"
76
+ export declare enum FieldAppearance {
77
+ OUTLINE = "outline",
78
+ FILLED = "filled",
79
+ GHOST = "ghost"
83
80
  }
84
- declare enum SelectionMode {
85
- SINGLE = "single",
86
- MULTIPLE = "multiple"
81
+ export declare enum SelectionMode {
82
+ SINGLE = "single",
83
+ MULTIPLE = "multiple"
87
84
  }
88
- declare enum OptionState {
89
- ENABLED = "enabled",
90
- DISABLED = "disabled"
85
+ export declare enum OptionState {
86
+ ENABLED = "enabled",
87
+ DISABLED = "disabled"
91
88
  }
92
- declare enum ActionStyle {
93
- PRIMARY = "primary",
94
- SECONDARY = "secondary",
95
- DANGER = "danger",
96
- GHOST = "ghost"
89
+ export declare enum ActionStyle {
90
+ PRIMARY = "primary",
91
+ SECONDARY = "secondary",
92
+ DANGER = "danger",
93
+ GHOST = "ghost"
97
94
  }
98
- declare enum StepState {
99
- PENDING = "pending",
100
- ACTIVE = "active",
101
- COMPLETE = "complete",
102
- DISABLED = "disabled",
103
- HIDDEN = "hidden"
95
+ export declare enum StepState {
96
+ PENDING = "pending",
97
+ ACTIVE = "active",
98
+ COMPLETE = "complete",
99
+ DISABLED = "disabled",
100
+ HIDDEN = "hidden"
104
101
  }
105
- declare enum NavigationDirection {
106
- FORWARD = "forward",
107
- BACKWARD = "backward",
108
- DIRECT = "direct"
102
+ export declare enum NavigationDirection {
103
+ FORWARD = "forward",
104
+ BACKWARD = "backward",
105
+ DIRECT = "direct"
109
106
  }
110
- declare enum ModalCloseReason {
111
- COMPLETED = "completed",
112
- CANCELLED = "cancelled",
113
- DISMISSED = "dismissed",
114
- BACKDROP = "backdrop",
115
- ESCAPE = "escape",
116
- PROGRAMMATIC = "programmatic",
117
- GUARD_REJECTED = "guard_rejected"
107
+ export declare enum ModalCloseReason {
108
+ COMPLETED = "completed",
109
+ CANCELLED = "cancelled",
110
+ DISMISSED = "dismissed",
111
+ BACKDROP = "backdrop",
112
+ ESCAPE = "escape",
113
+ PROGRAMMATIC = "programmatic",
114
+ GUARD_REJECTED = "guard_rejected"
118
115
  }
119
- declare enum ValidationStatus {
120
- VALID = "valid",
121
- INVALID = "invalid",
122
- PENDING = "pending"
116
+ export declare enum ValidationStatus {
117
+ VALID = "valid",
118
+ INVALID = "invalid",
119
+ PENDING = "pending"
123
120
  }
124
- declare enum ValidationCode {
125
- REQUIRED = "required",
126
- MIN = "min",
127
- MAX = "max",
128
- PATTERN = "pattern",
129
- CUSTOM = "custom"
121
+ export declare enum ValidationCode {
122
+ REQUIRED = "required",
123
+ MIN = "min",
124
+ MAX = "max",
125
+ PATTERN = "pattern",
126
+ CUSTOM = "custom"
130
127
  }
131
- type ModalStepId = string;
132
- type ModalInputMap = Record<string, unknown>;
128
+ export type ModalStepId = string;
129
+ export type ModalInputMap = Record<string, unknown>;
133
130
  /**
134
131
  * A condition function that receives the current form values and returns
135
132
  * whether the field should be visible.
136
133
  */
137
- type FieldVisibilityCondition<TModel = unknown> = (formValue: Partial<TModel>) => boolean;
134
+ export type FieldVisibilityCondition<TModel = unknown> = (formValue: Partial<TModel>) => boolean;
138
135
  /**
139
136
  * A condition function that receives the current form values and returns
140
137
  * whether the field should be required.
141
138
  */
142
- type FieldRequiredCondition<TModel = unknown> = (formValue: Partial<TModel>) => boolean;
139
+ export type FieldRequiredCondition<TModel = unknown> = (formValue: Partial<TModel>) => boolean;
143
140
  /**
144
141
  * A form-level validator that receives the entire form value
145
142
  * and returns an error map or null.
146
143
  */
147
- type FormValidator<TModel = unknown> = (formValue: Partial<TModel>) => Record<string, string> | null;
144
+ export type FormValidator<TModel = unknown> = (formValue: Partial<TModel>) => Record<string, string> | null;
148
145
  /**
149
146
  * A data source that asynchronously loads options for select/multi-select fields.
150
147
  * Can optionally depend on other field values to reload.
151
148
  */
152
- type FieldDataSource<TValue = unknown, TModel = unknown> = {
153
- /** Load options, optionally based on current form values */
154
- load(formValue?: Partial<TModel>): Promise<SelectOption<TValue>[]> | SelectOption<TValue>[];
155
- /** Keys of other fields that trigger a reload when their value changes */
156
- dependsOn?: KeyOf<TModel>[];
149
+ export type FieldDataSource<TValue = unknown, TModel = unknown> = {
150
+ /** Load options, optionally based on current form values */
151
+ load(formValue?: Partial<TModel>): Promise<SelectOption<TValue>[]> | SelectOption<TValue>[];
152
+ /** Keys of other fields that trigger a reload when their value changes */
153
+ dependsOn?: KeyOf<TModel>[];
157
154
  };
158
- type ValidationResult = {
159
- status: ValidationStatus;
160
- code?: ValidationCode;
161
- message?: string;
155
+ export type ValidationResult = {
156
+ status: ValidationStatus;
157
+ code?: ValidationCode;
158
+ message?: string;
162
159
  };
163
- type StepValidator = {
164
- validate(): Promise<ValidationResult> | ValidationResult;
160
+ export type StepValidator = {
161
+ validate(): Promise<ValidationResult> | ValidationResult;
165
162
  };
166
- type FieldValidator = {
167
- validate(value: unknown): Promise<ValidationResult> | ValidationResult;
163
+ export type FieldValidator = {
164
+ validate(value: unknown): Promise<ValidationResult> | ValidationResult;
168
165
  };
169
- type StepGuard = {
170
- canEnter(): Promise<boolean> | boolean;
171
- canExit(): Promise<boolean> | boolean;
166
+ export type StepGuard = {
167
+ canEnter(): Promise<boolean> | boolean;
168
+ canExit(): Promise<boolean> | boolean;
172
169
  };
173
- type ModalCloseEvent<TResult = unknown> = {
174
- reason: ModalCloseReason;
175
- result?: TResult;
170
+ export type ModalCloseEvent<TResult = unknown> = {
171
+ reason: ModalCloseReason;
172
+ result?: TResult;
176
173
  };
177
- type ModalRef<TResult = unknown> = {
178
- afterClosed$: Observable<ModalCloseEvent<TResult>>;
179
- close(result?: TResult): void;
180
- dismiss(reason: ModalCloseReason): void;
181
- update(config: Partial<BaseModalConfig<TResult>>): void;
174
+ export type ModalRef<TResult = unknown> = {
175
+ afterClosed$: Observable<ModalCloseEvent<TResult>>;
176
+ close(result?: TResult): void;
177
+ dismiss(reason: ModalCloseReason): void;
178
+ update(config: Partial<BaseModalConfig<TResult>>): void;
182
179
  };
183
- type ModalResultHandler<TResult = unknown> = {
184
- handle(result: TResult): Promise<void> | void;
180
+ export type ModalResultHandler<TResult = unknown> = {
181
+ handle(result: TResult): Promise<void> | void;
185
182
  };
186
- type WizardStepChangeEvent = {
187
- previousStepId?: ModalStepId;
188
- currentStepId: ModalStepId;
189
- direction: NavigationDirection;
183
+ export type WizardStepChangeEvent = {
184
+ previousStepId?: ModalStepId;
185
+ currentStepId: ModalStepId;
186
+ direction: NavigationDirection;
190
187
  };
191
- type WizardStepChangeHandler = {
192
- handle(event: WizardStepChangeEvent): Promise<void> | void;
188
+ export type WizardStepChangeHandler = {
189
+ handle(event: WizardStepChangeEvent): Promise<void> | void;
193
190
  };
194
- type StepBodyConfig = Type<unknown> | TemplateRef<unknown> | string;
195
- type WizardStepConfig<TModel = unknown> = {
196
- id: ModalStepId;
197
- title: string;
198
- state?: StepState;
199
- body?: StepBodyConfig;
200
- /**
201
- * Inputs passed to the step {@link body} when it is a component or template
202
- * (ignored for a plain-string body). Each key is assigned to the matching
203
- * `@Input()` on the rendered component; a `modalRef` property, if present, is
204
- * populated automatically. Mirrors {@link CustomModalConfig.inputs} but scoped
205
- * to a single wizard step.
206
- */
207
- bodyInputs?: ModalInputMap;
208
- fields?: FormFieldConfig<TModel>[];
209
- rows?: FormRow<TModel>[];
210
- fieldGroups?: FormFieldGroup<TModel>[];
211
- formValidators?: FormValidator<TModel>[];
212
- groupValidators?: ValidatorFn[];
213
- initialValue?: Partial<TModel>;
214
- guard?: StepGuard;
215
- validators?: StepValidator[];
216
- /** Custom label for the 'Next' button on this step */
217
- nextLabel?: string;
218
- /** Custom label for the 'Back' button on this step */
219
- backLabel?: string;
220
- /** Whether to hide the 'Back' button on this step */
221
- hideBack?: boolean;
222
- /** Condition to show/hide this entire step based on aggregated wizard data */
223
- visible?: (aggregatedData: Record<ModalStepId, Record<string, unknown>>) => boolean;
191
+ export type StepBodyConfig = Type<unknown> | TemplateRef<unknown> | string;
192
+ export type WizardStepConfig<TModel = unknown> = {
193
+ id: ModalStepId;
194
+ title: string;
195
+ state?: StepState;
196
+ body?: StepBodyConfig;
197
+ /**
198
+ * Inputs passed to the step {@link body} when it is a component or template
199
+ * (ignored for a plain-string body). Each key is assigned to the matching
200
+ * `@Input()` on the rendered component; a `modalRef` property, if present, is
201
+ * populated automatically. Mirrors {@link CustomModalConfig.inputs} but scoped
202
+ * to a single wizard step.
203
+ */
204
+ bodyInputs?: ModalInputMap;
205
+ fields?: FormFieldConfig<TModel>[];
206
+ rows?: FormRow<TModel>[];
207
+ fieldGroups?: FormFieldGroup<TModel>[];
208
+ formValidators?: FormValidator<TModel>[];
209
+ groupValidators?: ValidatorFn[];
210
+ initialValue?: Partial<TModel>;
211
+ guard?: StepGuard;
212
+ validators?: StepValidator[];
213
+ /** Custom label for the 'Next' button on this step */
214
+ nextLabel?: string;
215
+ /** Custom label for the 'Back' button on this step */
216
+ backLabel?: string;
217
+ /** Whether to hide the 'Back' button on this step */
218
+ hideBack?: boolean;
219
+ /** Condition to show/hide this entire step based on aggregated wizard data */
220
+ visible?: (aggregatedData: Record<ModalStepId, Record<string, unknown>>) => boolean;
224
221
  };
225
- type WizardResult = {
226
- status: ModalCloseReason;
227
- visitedStepIds: ModalStepId[];
228
- payload?: Record<ModalStepId, Record<string, unknown>>;
222
+ export type WizardResult = {
223
+ status: ModalCloseReason;
224
+ visitedStepIds: ModalStepId[];
225
+ payload?: Record<ModalStepId, Record<string, unknown>>;
229
226
  };
230
227
  type KeyOf<T> = unknown extends T ? string : keyof T & string;
231
- type SelectOption<TValue = unknown> = {
232
- label: string;
233
- value: TValue;
234
- state?: OptionState;
228
+ export type SelectOption<TValue = unknown> = {
229
+ label: string;
230
+ value: TValue;
231
+ state?: OptionState;
235
232
  };
236
- type TextFieldConfig<TModel = unknown> = {
237
- kind: FieldKind.TEXT;
238
- key: KeyOf<TModel>;
239
- label: string;
240
- appearance?: FieldAppearance;
241
- validators?: ValidatorFn[];
242
- asyncValidators?: AsyncValidatorFn[];
243
- placeholder?: string;
244
- /** Whether this field is read-only (display only) */
245
- readOnly?: boolean;
246
- /** Whether this field is disabled */
247
- disabled?: boolean;
248
- /** Condition to show/hide this field based on other field values */
249
- visible?: FieldVisibilityCondition<TModel>;
250
- /** Condition to dynamically mark this field as required based on other field values */
251
- conditionallyRequired?: FieldRequiredCondition<TModel>;
252
- /** Input mask (e.g., '(000) 000-0000') */
253
- mask?: string;
254
- /** Autocomplete attribute */
255
- autocomplete?: string;
256
- /** Whether to focus this field when the modal opens */
257
- autoFocus?: boolean;
258
- /** When to update the form control value and run validation */
259
- updateOn?: 'change' | 'blur' | 'submit';
233
+ export type TextFieldConfig<TModel = unknown> = {
234
+ kind: FieldKind.TEXT;
235
+ key: KeyOf<TModel>;
236
+ label: string;
237
+ appearance?: FieldAppearance;
238
+ validators?: ValidatorFn[];
239
+ asyncValidators?: AsyncValidatorFn[];
240
+ placeholder?: string;
241
+ /** Whether this field is read-only (display only) */
242
+ readOnly?: boolean;
243
+ /** Whether this field is disabled */
244
+ disabled?: boolean;
245
+ /** Condition to show/hide this field based on other field values */
246
+ visible?: FieldVisibilityCondition<TModel>;
247
+ /** Condition to dynamically mark this field as required based on other field values */
248
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
249
+ /** Input mask (e.g., '(000) 000-0000') */
250
+ mask?: string;
251
+ /** Autocomplete attribute */
252
+ autocomplete?: string;
253
+ /** Whether to focus this field when the modal opens */
254
+ autoFocus?: boolean;
255
+ /** When to update the form control value and run validation */
256
+ updateOn?: 'change' | 'blur' | 'submit';
260
257
  };
261
- type NumberFieldConfig<TModel = unknown> = {
262
- kind: FieldKind.NUMBER;
263
- key: KeyOf<TModel>;
264
- label: string;
265
- validators?: ValidatorFn[];
266
- asyncValidators?: AsyncValidatorFn[];
267
- placeholder?: string;
268
- min?: number;
269
- max?: number;
270
- step?: number;
271
- /** Fixed decimals shown, such as 2 for an amount ("90,50", not "90,5"). The value stays a number. */
272
- decimals?: number;
273
- readOnly?: boolean;
274
- disabled?: boolean;
275
- visible?: FieldVisibilityCondition<TModel>;
276
- /** Condition to dynamically mark this field as required based on other field values */
277
- conditionallyRequired?: FieldRequiredCondition<TModel>;
278
- autoFocus?: boolean;
279
- updateOn?: 'change' | 'blur' | 'submit';
258
+ export type NumberFieldConfig<TModel = unknown> = {
259
+ kind: FieldKind.NUMBER;
260
+ key: KeyOf<TModel>;
261
+ label: string;
262
+ validators?: ValidatorFn[];
263
+ asyncValidators?: AsyncValidatorFn[];
264
+ placeholder?: string;
265
+ min?: number;
266
+ max?: number;
267
+ step?: number;
268
+ /** Fixed decimals shown, such as 2 for an amount ("90,50", not "90,5"). The value stays a number. */
269
+ decimals?: number;
270
+ readOnly?: boolean;
271
+ disabled?: boolean;
272
+ visible?: FieldVisibilityCondition<TModel>;
273
+ /** Condition to dynamically mark this field as required based on other field values */
274
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
275
+ autoFocus?: boolean;
276
+ updateOn?: 'change' | 'blur' | 'submit';
280
277
  };
281
- type SelectFieldConfig<TModel = unknown, TValue = unknown> = {
282
- kind: FieldKind.SELECT;
283
- key: KeyOf<TModel>;
284
- label: string;
285
- options: SelectOption<TValue>[];
286
- selectionMode?: SelectionMode;
287
- validators?: ValidatorFn[];
288
- asyncValidators?: AsyncValidatorFn[];
289
- readOnly?: boolean;
290
- disabled?: boolean;
291
- visible?: FieldVisibilityCondition<TModel>;
292
- /** Condition to dynamically mark this field as required based on other field values */
293
- conditionallyRequired?: FieldRequiredCondition<TModel>;
294
- autoFocus?: boolean;
295
- updateOn?: 'change' | 'blur' | 'submit';
296
- /** Async data source for loading options dynamically */
297
- dataSource?: FieldDataSource<TValue, TModel>;
278
+ export type SelectFieldConfig<TModel = unknown, TValue = unknown> = {
279
+ kind: FieldKind.SELECT;
280
+ key: KeyOf<TModel>;
281
+ label: string;
282
+ options: SelectOption<TValue>[];
283
+ selectionMode?: SelectionMode;
284
+ validators?: ValidatorFn[];
285
+ asyncValidators?: AsyncValidatorFn[];
286
+ readOnly?: boolean;
287
+ disabled?: boolean;
288
+ visible?: FieldVisibilityCondition<TModel>;
289
+ /** Condition to dynamically mark this field as required based on other field values */
290
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
291
+ autoFocus?: boolean;
292
+ updateOn?: 'change' | 'blur' | 'submit';
293
+ /** Async data source for loading options dynamically */
294
+ dataSource?: FieldDataSource<TValue, TModel>;
298
295
  };
299
- type CheckboxFieldConfig<TModel = unknown> = {
300
- kind: FieldKind.CHECKBOX;
301
- key: KeyOf<TModel>;
302
- label: string;
303
- defaultValue?: boolean;
304
- validators?: ValidatorFn[];
305
- asyncValidators?: AsyncValidatorFn[];
306
- readOnly?: boolean;
307
- disabled?: boolean;
308
- visible?: FieldVisibilityCondition<TModel>;
309
- /** Condition to dynamically mark this field as required based on other field values */
310
- conditionallyRequired?: FieldRequiredCondition<TModel>;
311
- autoFocus?: boolean;
312
- updateOn?: 'change' | 'blur' | 'submit';
296
+ export type CheckboxFieldConfig<TModel = unknown> = {
297
+ kind: FieldKind.CHECKBOX;
298
+ key: KeyOf<TModel>;
299
+ label: string;
300
+ defaultValue?: boolean;
301
+ validators?: ValidatorFn[];
302
+ asyncValidators?: AsyncValidatorFn[];
303
+ readOnly?: boolean;
304
+ disabled?: boolean;
305
+ visible?: FieldVisibilityCondition<TModel>;
306
+ /** Condition to dynamically mark this field as required based on other field values */
307
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
308
+ autoFocus?: boolean;
309
+ updateOn?: 'change' | 'blur' | 'submit';
313
310
  };
314
- type DateFieldConfig<TModel = unknown> = {
315
- kind: FieldKind.DATE;
316
- key: KeyOf<TModel>;
317
- label: string;
318
- placeholder?: string;
319
- validators?: ValidatorFn[];
320
- asyncValidators?: AsyncValidatorFn[];
321
- minDate?: string;
322
- maxDate?: string;
323
- readOnly?: boolean;
324
- disabled?: boolean;
325
- visible?: FieldVisibilityCondition<TModel>;
326
- /** Condition to dynamically mark this field as required based on other field values */
327
- conditionallyRequired?: FieldRequiredCondition<TModel>;
328
- autoFocus?: boolean;
329
- updateOn?: 'change' | 'blur' | 'submit';
311
+ export type DateFieldConfig<TModel = unknown> = {
312
+ kind: FieldKind.DATE;
313
+ key: KeyOf<TModel>;
314
+ label: string;
315
+ placeholder?: string;
316
+ validators?: ValidatorFn[];
317
+ asyncValidators?: AsyncValidatorFn[];
318
+ minDate?: string;
319
+ maxDate?: string;
320
+ readOnly?: boolean;
321
+ disabled?: boolean;
322
+ visible?: FieldVisibilityCondition<TModel>;
323
+ /** Condition to dynamically mark this field as required based on other field values */
324
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
325
+ autoFocus?: boolean;
326
+ updateOn?: 'change' | 'blur' | 'submit';
330
327
  };
331
- type TextareaFieldConfig<TModel = unknown> = {
332
- kind: FieldKind.TEXTAREA;
333
- key: KeyOf<TModel>;
334
- label: string;
335
- placeholder?: string;
336
- validators?: ValidatorFn[];
337
- asyncValidators?: AsyncValidatorFn[];
338
- rows?: number;
339
- readOnly?: boolean;
340
- disabled?: boolean;
341
- visible?: FieldVisibilityCondition<TModel>;
342
- /** Condition to dynamically mark this field as required based on other field values */
343
- conditionallyRequired?: FieldRequiredCondition<TModel>;
344
- autoFocus?: boolean;
345
- updateOn?: 'change' | 'blur' | 'submit';
328
+ export type TextareaFieldConfig<TModel = unknown> = {
329
+ kind: FieldKind.TEXTAREA;
330
+ key: KeyOf<TModel>;
331
+ label: string;
332
+ placeholder?: string;
333
+ validators?: ValidatorFn[];
334
+ asyncValidators?: AsyncValidatorFn[];
335
+ rows?: number;
336
+ readOnly?: boolean;
337
+ disabled?: boolean;
338
+ visible?: FieldVisibilityCondition<TModel>;
339
+ /** Condition to dynamically mark this field as required based on other field values */
340
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
341
+ autoFocus?: boolean;
342
+ updateOn?: 'change' | 'blur' | 'submit';
346
343
  };
347
- type DatetimeFieldConfig<TModel = unknown> = {
348
- kind: FieldKind.DATETIME;
349
- key: KeyOf<TModel>;
350
- label: string;
351
- placeholder?: string;
352
- validators?: ValidatorFn[];
353
- asyncValidators?: AsyncValidatorFn[];
354
- mode?: 'date' | 'time' | 'datetime-local';
355
- min?: string;
356
- max?: string;
357
- step?: number;
358
- readOnly?: boolean;
359
- disabled?: boolean;
360
- visible?: FieldVisibilityCondition<TModel>;
361
- /** Condition to dynamically mark this field as required based on other field values */
362
- conditionallyRequired?: FieldRequiredCondition<TModel>;
363
- autoFocus?: boolean;
364
- updateOn?: 'change' | 'blur' | 'submit';
344
+ export type DatetimeFieldConfig<TModel = unknown> = {
345
+ kind: FieldKind.DATETIME;
346
+ key: KeyOf<TModel>;
347
+ label: string;
348
+ placeholder?: string;
349
+ validators?: ValidatorFn[];
350
+ asyncValidators?: AsyncValidatorFn[];
351
+ mode?: 'date' | 'time' | 'datetime-local';
352
+ min?: string;
353
+ max?: string;
354
+ step?: number;
355
+ readOnly?: boolean;
356
+ disabled?: boolean;
357
+ visible?: FieldVisibilityCondition<TModel>;
358
+ /** Condition to dynamically mark this field as required based on other field values */
359
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
360
+ autoFocus?: boolean;
361
+ updateOn?: 'change' | 'blur' | 'submit';
365
362
  };
366
- type MultiSelectFieldConfig<TModel = unknown, TValue = unknown> = {
367
- kind: FieldKind.MULTI_SELECT;
368
- key: KeyOf<TModel>;
369
- label: string;
370
- options: SelectOption<TValue>[];
371
- validators?: ValidatorFn[];
372
- asyncValidators?: AsyncValidatorFn[];
373
- /** Placeholder shown in the trigger while nothing is selected. */
374
- placeholder?: string;
375
- searchable?: boolean;
376
- searchPlaceholder?: string;
377
- maxSelections?: number;
378
- /**
379
- * Forwarded to the underlying multi-select: once more than this many options are selected the
380
- * trigger collapses to a summary instead of rendering every chip.
381
- */
382
- collapseThreshold?: number;
383
- /** Forwarded summary text for the collapsed trigger; `{count}` is interpolated. */
384
- collapsePlaceholder?: string;
385
- /** Forwarded summary text shown when every option is selected. */
386
- allSelectedPlaceholder?: string;
387
- readOnly?: boolean;
388
- disabled?: boolean;
389
- visible?: FieldVisibilityCondition<TModel>;
390
- /** Condition to dynamically mark this field as required based on other field values */
391
- conditionallyRequired?: FieldRequiredCondition<TModel>;
392
- autoFocus?: boolean;
393
- updateOn?: 'change' | 'blur' | 'submit';
394
- /** Async data source for loading options dynamically */
395
- dataSource?: FieldDataSource<TValue, TModel>;
363
+ export type MultiSelectFieldConfig<TModel = unknown, TValue = unknown> = {
364
+ kind: FieldKind.MULTI_SELECT;
365
+ key: KeyOf<TModel>;
366
+ label: string;
367
+ options: SelectOption<TValue>[];
368
+ validators?: ValidatorFn[];
369
+ asyncValidators?: AsyncValidatorFn[];
370
+ /** Placeholder shown in the trigger while nothing is selected. */
371
+ placeholder?: string;
372
+ searchable?: boolean;
373
+ searchPlaceholder?: string;
374
+ maxSelections?: number;
375
+ /**
376
+ * Forwarded to the underlying multi-select: once more than this many options are selected the
377
+ * trigger collapses to a summary instead of rendering every chip.
378
+ */
379
+ collapseThreshold?: number;
380
+ /** Forwarded summary text for the collapsed trigger; `{count}` is interpolated. */
381
+ collapsePlaceholder?: string;
382
+ /** Forwarded summary text shown when every option is selected. */
383
+ allSelectedPlaceholder?: string;
384
+ readOnly?: boolean;
385
+ disabled?: boolean;
386
+ visible?: FieldVisibilityCondition<TModel>;
387
+ /** Condition to dynamically mark this field as required based on other field values */
388
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
389
+ autoFocus?: boolean;
390
+ updateOn?: 'change' | 'blur' | 'submit';
391
+ /** Async data source for loading options dynamically */
392
+ dataSource?: FieldDataSource<TValue, TModel>;
396
393
  };
397
- type PasswordFieldConfig<TModel = unknown> = {
398
- kind: FieldKind.PASSWORD;
399
- key: KeyOf<TModel>;
400
- label: string;
401
- placeholder?: string;
402
- validators?: ValidatorFn[];
403
- asyncValidators?: AsyncValidatorFn[];
404
- readOnly?: boolean;
405
- disabled?: boolean;
406
- visible?: FieldVisibilityCondition<TModel>;
407
- /** Condition to dynamically mark this field as required based on other field values */
408
- conditionallyRequired?: FieldRequiredCondition<TModel>;
409
- autoFocus?: boolean;
410
- updateOn?: 'change' | 'blur' | 'submit';
394
+ export type PasswordFieldConfig<TModel = unknown> = {
395
+ kind: FieldKind.PASSWORD;
396
+ key: KeyOf<TModel>;
397
+ label: string;
398
+ placeholder?: string;
399
+ validators?: ValidatorFn[];
400
+ asyncValidators?: AsyncValidatorFn[];
401
+ readOnly?: boolean;
402
+ disabled?: boolean;
403
+ visible?: FieldVisibilityCondition<TModel>;
404
+ /** Condition to dynamically mark this field as required based on other field values */
405
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
406
+ autoFocus?: boolean;
407
+ updateOn?: 'change' | 'blur' | 'submit';
411
408
  };
412
- type MultiSelectTableFieldConfig<TModel = unknown, TRow = unknown> = {
413
- kind: FieldKind.MULTI_SELECT_TABLE;
414
- key: KeyOf<TModel>;
415
- label: string;
416
- /** The TableDataSource that powers the mn-table. selectionMode will be forced to 'multi'. */
417
- tableDataSource: TableDataSource<TRow>;
418
- /** Function to extract the value stored in the form from a selected row (default: getID) */
419
- getRowValue?: (row: TRow) => unknown;
420
- validators?: ValidatorFn[];
421
- asyncValidators?: AsyncValidatorFn[];
422
- readOnly?: boolean;
423
- disabled?: boolean;
424
- visible?: FieldVisibilityCondition<TModel>;
425
- /** Condition to dynamically mark this field as required based on other field values */
426
- conditionallyRequired?: FieldRequiredCondition<TModel>;
427
- autoFocus?: boolean;
428
- updateOn?: 'change' | 'blur' | 'submit';
409
+ export type MultiSelectTableFieldConfig<TModel = unknown, TRow = unknown> = {
410
+ kind: FieldKind.MULTI_SELECT_TABLE;
411
+ key: KeyOf<TModel>;
412
+ label: string;
413
+ /** The TableDataSource that powers the mn-table. selectionMode will be forced to 'multi'. */
414
+ tableDataSource: TableDataSource<TRow>;
415
+ /** Function to extract the value stored in the form from a selected row (default: getID) */
416
+ getRowValue?: (row: TRow) => unknown;
417
+ validators?: ValidatorFn[];
418
+ asyncValidators?: AsyncValidatorFn[];
419
+ readOnly?: boolean;
420
+ disabled?: boolean;
421
+ visible?: FieldVisibilityCondition<TModel>;
422
+ /** Condition to dynamically mark this field as required based on other field values */
423
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
424
+ autoFocus?: boolean;
425
+ updateOn?: 'change' | 'blur' | 'submit';
429
426
  };
430
- type SingleSelectTableFieldConfig<TModel = unknown, TRow = unknown> = {
431
- kind: FieldKind.SINGLE_SELECT_TABLE;
432
- key: KeyOf<TModel>;
433
- label: string;
434
- /** The TableDataSource that powers the mn-table. selectionMode will be forced to 'single'. */
435
- tableDataSource: TableDataSource<TRow>;
436
- /** Function to extract the value stored in the form from a selected row (default: getID) */
437
- getRowValue?: (row: TRow) => unknown;
438
- validators?: ValidatorFn[];
439
- asyncValidators?: AsyncValidatorFn[];
440
- readOnly?: boolean;
441
- disabled?: boolean;
442
- visible?: FieldVisibilityCondition<TModel>;
443
- /** Condition to dynamically mark this field as required based on other field values */
444
- conditionallyRequired?: FieldRequiredCondition<TModel>;
445
- autoFocus?: boolean;
446
- updateOn?: 'change' | 'blur' | 'submit';
427
+ export type SingleSelectTableFieldConfig<TModel = unknown, TRow = unknown> = {
428
+ kind: FieldKind.SINGLE_SELECT_TABLE;
429
+ key: KeyOf<TModel>;
430
+ label: string;
431
+ /** The TableDataSource that powers the mn-table. selectionMode will be forced to 'single'. */
432
+ tableDataSource: TableDataSource<TRow>;
433
+ /** Function to extract the value stored in the form from a selected row (default: getID) */
434
+ getRowValue?: (row: TRow) => unknown;
435
+ validators?: ValidatorFn[];
436
+ asyncValidators?: AsyncValidatorFn[];
437
+ readOnly?: boolean;
438
+ disabled?: boolean;
439
+ visible?: FieldVisibilityCondition<TModel>;
440
+ /** Condition to dynamically mark this field as required based on other field values */
441
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
442
+ autoFocus?: boolean;
443
+ updateOn?: 'change' | 'blur' | 'submit';
447
444
  };
448
- type ColorFieldConfig<TModel = unknown> = {
449
- kind: FieldKind.COLOR;
450
- key: KeyOf<TModel>;
451
- label: string;
452
- /** Default color value (hex string, e.g., '#ff0000') */
453
- defaultValue?: string;
454
- /** Predefined color swatches to show */
455
- swatches?: string[];
456
- validators?: ValidatorFn[];
457
- asyncValidators?: AsyncValidatorFn[];
458
- readOnly?: boolean;
459
- disabled?: boolean;
460
- visible?: FieldVisibilityCondition<TModel>;
461
- /** Condition to dynamically mark this field as required based on other field values */
462
- conditionallyRequired?: FieldRequiredCondition<TModel>;
463
- autoFocus?: boolean;
464
- updateOn?: 'change' | 'blur' | 'submit';
445
+ export type ColorFieldConfig<TModel = unknown> = {
446
+ kind: FieldKind.COLOR;
447
+ key: KeyOf<TModel>;
448
+ label: string;
449
+ /** Default color value (hex string, e.g., '#ff0000') */
450
+ defaultValue?: string;
451
+ /** Predefined color swatches to show */
452
+ swatches?: string[];
453
+ validators?: ValidatorFn[];
454
+ asyncValidators?: AsyncValidatorFn[];
455
+ readOnly?: boolean;
456
+ disabled?: boolean;
457
+ visible?: FieldVisibilityCondition<TModel>;
458
+ /** Condition to dynamically mark this field as required based on other field values */
459
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
460
+ autoFocus?: boolean;
461
+ updateOn?: 'change' | 'blur' | 'submit';
465
462
  };
466
- type RatingFieldConfig<TModel = unknown> = {
467
- kind: FieldKind.RATING;
468
- key: KeyOf<TModel>;
469
- label: string;
470
- /** Maximum rating value (default: 5) */
471
- max?: number;
472
- /** Icon to use for rating (default: 'star') */
473
- icon?: 'star' | 'heart' | 'circle';
474
- /** Allow half-star ratings (default: false) */
475
- allowHalf?: boolean;
476
- validators?: ValidatorFn[];
477
- asyncValidators?: AsyncValidatorFn[];
478
- readOnly?: boolean;
479
- disabled?: boolean;
480
- visible?: FieldVisibilityCondition<TModel>;
481
- /** Condition to dynamically mark this field as required based on other field values */
482
- conditionallyRequired?: FieldRequiredCondition<TModel>;
483
- autoFocus?: boolean;
484
- updateOn?: 'change' | 'blur' | 'submit';
463
+ export type RatingFieldConfig<TModel = unknown> = {
464
+ kind: FieldKind.RATING;
465
+ key: KeyOf<TModel>;
466
+ label: string;
467
+ /** Maximum rating value (default: 5) */
468
+ max?: number;
469
+ /** Icon to use for rating (default: 'star') */
470
+ icon?: 'star' | 'heart' | 'circle';
471
+ /** Allow half-star ratings (default: false) */
472
+ allowHalf?: boolean;
473
+ validators?: ValidatorFn[];
474
+ asyncValidators?: AsyncValidatorFn[];
475
+ readOnly?: boolean;
476
+ disabled?: boolean;
477
+ visible?: FieldVisibilityCondition<TModel>;
478
+ /** Condition to dynamically mark this field as required based on other field values */
479
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
480
+ autoFocus?: boolean;
481
+ updateOn?: 'change' | 'blur' | 'submit';
485
482
  };
486
- type SliderFieldConfig<TModel = unknown> = {
487
- kind: FieldKind.SLIDER;
488
- key: KeyOf<TModel>;
489
- label: string;
490
- /** Minimum value (default: 0) */
491
- min?: number;
492
- /** Maximum value (default: 100) */
493
- max?: number;
494
- /** Step increment (default: 1) */
495
- step?: number;
496
- /** Whether to show the current value label (default: true) */
497
- showValue?: boolean;
498
- /** Unit label displayed after the value (e.g., '%', 'px') */
499
- unit?: string;
500
- validators?: ValidatorFn[];
501
- asyncValidators?: AsyncValidatorFn[];
502
- readOnly?: boolean;
503
- disabled?: boolean;
504
- visible?: FieldVisibilityCondition<TModel>;
505
- /** Condition to dynamically mark this field as required based on other field values */
506
- conditionallyRequired?: FieldRequiredCondition<TModel>;
507
- autoFocus?: boolean;
508
- updateOn?: 'change' | 'blur' | 'submit';
483
+ export type SliderFieldConfig<TModel = unknown> = {
484
+ kind: FieldKind.SLIDER;
485
+ key: KeyOf<TModel>;
486
+ label: string;
487
+ /** Minimum value (default: 0) */
488
+ min?: number;
489
+ /** Maximum value (default: 100) */
490
+ max?: number;
491
+ /** Step increment (default: 1) */
492
+ step?: number;
493
+ /** Whether to show the current value label (default: true) */
494
+ showValue?: boolean;
495
+ /** Unit label displayed after the value (e.g., '%', 'px') */
496
+ unit?: string;
497
+ validators?: ValidatorFn[];
498
+ asyncValidators?: AsyncValidatorFn[];
499
+ readOnly?: boolean;
500
+ disabled?: boolean;
501
+ visible?: FieldVisibilityCondition<TModel>;
502
+ /** Condition to dynamically mark this field as required based on other field values */
503
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
504
+ autoFocus?: boolean;
505
+ updateOn?: 'change' | 'blur' | 'submit';
509
506
  };
510
- type FileFieldConfig<TModel = unknown> = {
511
- kind: FieldKind.FILE;
512
- key: KeyOf<TModel>;
513
- label: string;
514
- /** Accepted file types (e.g., '.pdf,.jpg,image/*') */
515
- accept?: string;
516
- /** Allow multiple file selection */
517
- multiple?: boolean;
518
- /** Maximum file size in bytes */
519
- maxSize?: number;
520
- /** Maximum number of files (when multiple is true) */
521
- maxFiles?: number;
522
- /** How the selection is displayed (default: 'dropzone') */
523
- displayMode?: 'dropzone' | 'thumbnail' | 'list' | 'compact';
524
- /** Hint shown inside the empty dropzone */
525
- dropzoneHint?: string;
526
- /** Hint shown inside the dropzone while files are dragged over it */
527
- dropActiveHint?: string;
528
- /** Label for the "choose/replace file" affordance */
529
- replaceLabel?: string;
530
- /** Accessible label for the per-file remove button */
531
- removeLabel?: string;
532
- /** URL of an already-saved image to preview when no new file is selected (single mode) */
533
- currentUrl?: string | null;
534
- /** URLs of already-saved images to preview when nothing is selected (multiple mode) */
535
- currentUrls?: string[] | null;
536
- /**
537
- * Called when the user removes an already-saved image (`currentUrl`/`currentUrls`).
538
- * The form value stays null; use this to record the removal intent (e.g. to send
539
- * a "clear image" instruction to the API on submit).
540
- */
541
- onClear?: () => void;
542
- validators?: ValidatorFn[];
543
- asyncValidators?: AsyncValidatorFn[];
544
- readOnly?: boolean;
545
- disabled?: boolean;
546
- visible?: FieldVisibilityCondition<TModel>;
547
- /** Condition to dynamically mark this field as required based on other field values */
548
- conditionallyRequired?: FieldRequiredCondition<TModel>;
549
- autoFocus?: boolean;
550
- updateOn?: 'change' | 'blur' | 'submit';
507
+ export type FileFieldConfig<TModel = unknown> = {
508
+ kind: FieldKind.FILE;
509
+ key: KeyOf<TModel>;
510
+ label: string;
511
+ /** Accepted file types (e.g., '.pdf,.jpg,image/*') */
512
+ accept?: string;
513
+ /** Allow multiple file selection */
514
+ multiple?: boolean;
515
+ /** Maximum file size in bytes */
516
+ maxSize?: number;
517
+ /** Maximum number of files (when multiple is true) */
518
+ maxFiles?: number;
519
+ /** How the selection is displayed (default: 'dropzone') */
520
+ displayMode?: 'dropzone' | 'thumbnail' | 'list' | 'compact';
521
+ /** Hint shown inside the empty dropzone */
522
+ dropzoneHint?: string;
523
+ /** Hint shown inside the dropzone while files are dragged over it */
524
+ dropActiveHint?: string;
525
+ /** Label for the "choose/replace file" affordance */
526
+ replaceLabel?: string;
527
+ /** Accessible label for the per-file remove button */
528
+ removeLabel?: string;
529
+ /** URL of an already-saved image to preview when no new file is selected (single mode) */
530
+ currentUrl?: string | null;
531
+ /** URLs of already-saved images to preview when nothing is selected (multiple mode) */
532
+ currentUrls?: string[] | null;
533
+ /**
534
+ * Called when the user removes an already-saved image (`currentUrl`/`currentUrls`).
535
+ * The form value stays null; use this to record the removal intent (e.g. to send
536
+ * a "clear image" instruction to the API on submit).
537
+ */
538
+ onClear?: () => void;
539
+ validators?: ValidatorFn[];
540
+ asyncValidators?: AsyncValidatorFn[];
541
+ readOnly?: boolean;
542
+ disabled?: boolean;
543
+ visible?: FieldVisibilityCondition<TModel>;
544
+ /** Condition to dynamically mark this field as required based on other field values */
545
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
546
+ autoFocus?: boolean;
547
+ updateOn?: 'change' | 'blur' | 'submit';
551
548
  };
552
- type CustomFieldConfig<TModel = unknown> = {
553
- kind: FieldKind.CUSTOM;
554
- key: KeyOf<TModel>;
555
- component: Type<unknown>;
556
- inputs?: ModalInputMap;
557
- label?: string;
558
- validators?: ValidatorFn[];
559
- asyncValidators?: AsyncValidatorFn[];
560
- visible?: FieldVisibilityCondition<TModel>;
561
- /** Condition to dynamically mark this field as required based on other field values */
562
- conditionallyRequired?: FieldRequiredCondition<TModel>;
563
- autoFocus?: boolean;
564
- updateOn?: 'change' | 'blur' | 'submit';
549
+ export type CustomFieldConfig<TModel = unknown> = {
550
+ kind: FieldKind.CUSTOM;
551
+ key: KeyOf<TModel>;
552
+ component: Type<unknown>;
553
+ inputs?: ModalInputMap;
554
+ label?: string;
555
+ validators?: ValidatorFn[];
556
+ asyncValidators?: AsyncValidatorFn[];
557
+ visible?: FieldVisibilityCondition<TModel>;
558
+ /** Condition to dynamically mark this field as required based on other field values */
559
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
560
+ autoFocus?: boolean;
561
+ updateOn?: 'change' | 'blur' | 'submit';
565
562
  };
566
- type FormFieldConfig<TModel = unknown> = TextFieldConfig<TModel> | NumberFieldConfig<TModel> | SelectFieldConfig<TModel> | CheckboxFieldConfig<TModel> | DateFieldConfig<TModel> | TextareaFieldConfig<TModel> | DatetimeFieldConfig<TModel> | MultiSelectFieldConfig<TModel> | MultiSelectTableFieldConfig<TModel, unknown> | SingleSelectTableFieldConfig<TModel, unknown> | PasswordFieldConfig<TModel> | FileFieldConfig<TModel> | ColorFieldConfig<TModel> | RatingFieldConfig<TModel> | SliderFieldConfig<TModel> | CustomFieldConfig<TModel>;
567
- type AnimationOptions = {
568
- type: 'slide' | 'fade' | 'zoom';
569
- duration?: number;
563
+ export type FormFieldConfig<TModel = unknown> = TextFieldConfig<TModel> | NumberFieldConfig<TModel> | SelectFieldConfig<TModel> | CheckboxFieldConfig<TModel> | DateFieldConfig<TModel> | TextareaFieldConfig<TModel> | DatetimeFieldConfig<TModel> | MultiSelectFieldConfig<TModel> | MultiSelectTableFieldConfig<TModel, unknown> | SingleSelectTableFieldConfig<TModel, unknown> | PasswordFieldConfig<TModel> | FileFieldConfig<TModel> | ColorFieldConfig<TModel> | RatingFieldConfig<TModel> | SliderFieldConfig<TModel> | CustomFieldConfig<TModel>;
564
+ export type AnimationOptions = {
565
+ type: 'slide' | 'fade' | 'zoom';
566
+ duration?: number;
570
567
  };
571
- type FormRowField<TModel = unknown> = {
572
- field: FormFieldConfig<TModel>;
573
- span?: number;
568
+ export type FormRowField<TModel = unknown> = {
569
+ field: FormFieldConfig<TModel>;
570
+ span?: number;
574
571
  };
575
- type FormRow<TModel = unknown> = {
576
- columns?: number;
577
- fields: FormRowField<TModel>[];
572
+ export type FormRow<TModel = unknown> = {
573
+ columns?: number;
574
+ fields: FormRowField<TModel>[];
578
575
  };
579
- type FormFieldGroup<TModel = unknown> = {
580
- /** Section header title */
581
- title: string;
582
- /** Optional description below the section header */
583
- description?: string;
584
- /** Fields in this group */
585
- fields: FormFieldConfig<TModel>[];
586
- /** Optional rows layout for this group */
587
- rows?: FormRow<TModel>[];
588
- /** Condition to show/hide this entire group based on form values */
589
- visible?: FieldVisibilityCondition<TModel>;
576
+ export type FormFieldGroup<TModel = unknown> = {
577
+ /** Section header title */
578
+ title: string;
579
+ /** Optional description below the section header */
580
+ description?: string;
581
+ /** Fields in this group */
582
+ fields: FormFieldConfig<TModel>[];
583
+ /** Optional rows layout for this group */
584
+ rows?: FormRow<TModel>[];
585
+ /** Condition to show/hide this entire group based on form values */
586
+ visible?: FieldVisibilityCondition<TModel>;
590
587
  };
591
- type ConfirmationActionConfig<TResult = unknown> = {
592
- label: string;
593
- style?: ActionStyle;
594
- handler?: ModalResultHandler<TResult>;
595
- /**
596
- * Overrides the default leading icon for this action button. Pass a Lucide icon's
597
- * static data (e.g. `LucideTrash2.icon`). Only rendered when the modal's
598
- * `showActionIcons` is not explicitly `false`.
599
- */
600
- icon?: LucideIconData;
588
+ export type ConfirmationActionConfig<TResult = unknown> = {
589
+ label: string;
590
+ style?: ActionStyle;
591
+ handler?: ModalResultHandler<TResult>;
592
+ /**
593
+ * Overrides the default leading icon for this action button. Pass a Lucide icon's
594
+ * static data (e.g. `LucideTrash2.icon`). Only rendered when the modal's
595
+ * `showActionIcons` is not explicitly `false`.
596
+ */
597
+ icon?: LucideIconData;
601
598
  };
602
- type CancellationActionConfig = {
603
- label: string;
604
- style?: ActionStyle;
605
- reason?: ModalCloseReason;
606
- /**
607
- * Overrides the default leading icon for this action button. Pass a Lucide icon's
608
- * static data (e.g. `LucideX.icon`). Only rendered when the modal's
609
- * `showActionIcons` is not explicitly `false`.
610
- */
611
- icon?: LucideIconData;
599
+ export type CancellationActionConfig = {
600
+ label: string;
601
+ style?: ActionStyle;
602
+ reason?: ModalCloseReason;
603
+ /**
604
+ * Overrides the default leading icon for this action button. Pass a Lucide icon's
605
+ * static data (e.g. `LucideX.icon`). Only rendered when the modal's
606
+ * `showActionIcons` is not explicitly `false`.
607
+ */
608
+ icon?: LucideIconData;
612
609
  };
613
- type ModalFooterAction<TResult = unknown> = {
614
- label: string;
615
- style?: ActionStyle;
616
- /** Position in the footer: 'left' or 'right' (default: 'right') */
617
- position?: 'left' | 'right';
618
- /** Whether this action closes the modal */
619
- closesModal?: boolean;
620
- /** Close reason when this action closes the modal */
621
- closeReason?: ModalCloseReason;
622
- /** Handler called when the action is clicked */
623
- handler?: (modalRef: ModalRef<TResult>) => Promise<void> | void;
624
- /** Whether the button is disabled */
625
- disabled?: boolean;
626
- /**
627
- * Overrides the default leading icon for this action button. Pass a Lucide icon's
628
- * static data (e.g. `LucideCheck.icon`). Defaults are derived from `style` when
629
- * omitted. Only rendered when the modal's `showActionIcons` is not explicitly `false`.
630
- */
631
- icon?: LucideIconData;
632
- /**
633
- * Where the icon sits: before the label (default) or after it. `'end'` is for a step forward
634
- * ("Volgende" with `MN_MODAL_ACTION_ICONS.next`), drawn the way a wizard's own next button is.
635
- */
636
- iconPosition?: 'start' | 'end';
610
+ export type ModalFooterAction<TResult = unknown> = {
611
+ label: string;
612
+ style?: ActionStyle;
613
+ /** Position in the footer: 'left' or 'right' (default: 'right') */
614
+ position?: 'left' | 'right';
615
+ /** Whether this action closes the modal */
616
+ closesModal?: boolean;
617
+ /** Close reason when this action closes the modal */
618
+ closeReason?: ModalCloseReason;
619
+ /** Handler called when the action is clicked */
620
+ handler?: (modalRef: ModalRef<TResult>) => Promise<void> | void;
621
+ /** Whether the button is disabled */
622
+ disabled?: boolean;
623
+ /**
624
+ * Overrides the default leading icon for this action button. Pass a Lucide icon's
625
+ * static data (e.g. `LucideCheck.icon`). Defaults are derived from `style` when
626
+ * omitted. Only rendered when the modal's `showActionIcons` is not explicitly `false`.
627
+ */
628
+ icon?: LucideIconData;
629
+ /**
630
+ * Where the icon sits: before the label (default) or after it. `'end'` is for a step forward
631
+ * ("Volgende" with `MN_MODAL_ACTION_ICONS.next`), drawn the way a wizard's own next button is.
632
+ */
633
+ iconPosition?: 'start' | 'end';
637
634
  };
638
- type ModalPollingConfig<TResult = unknown> = {
639
- /** Polling interval in milliseconds */
640
- interval: number;
641
- /** Function called on each poll tick */
642
- onPoll: (modalRef: ModalRef<TResult>) => Promise<boolean | void> | boolean | void;
643
- /** Whether to start polling immediately (default: true) */
644
- autoStart?: boolean;
645
- /** Maximum number of poll attempts (undefined = unlimited) */
646
- maxAttempts?: number;
635
+ export type ModalPollingConfig<TResult = unknown> = {
636
+ /** Polling interval in milliseconds */
637
+ interval: number;
638
+ /** Function called on each poll tick */
639
+ onPoll: (modalRef: ModalRef<TResult>) => Promise<boolean | void> | boolean | void;
640
+ /** Whether to start polling immediately (default: true) */
641
+ autoStart?: boolean;
642
+ /** Maximum number of poll attempts (undefined = unlimited) */
643
+ maxAttempts?: number;
647
644
  };
648
- type ModalI18nLabels = {
649
- /** Submit button label (default: 'Submit') */
650
- submit?: string;
651
- /** Cancel button label (default: 'Cancel') */
652
- cancel?: string;
653
- /** Next button label for wizard (default: 'Next') */
654
- next?: string;
655
- /** Back button label for wizard (default: 'Back') */
656
- back?: string;
657
- /** Close button label (default: 'Close') */
658
- close?: string;
659
- /** Complete button label for wizard (default: 'Complete') */
660
- complete?: string;
661
- /** Submitting state label (default: 'Submitting...') */
662
- submitting?: string;
663
- /** Completing state label (default: 'Completing...') */
664
- completing?: string;
665
- /** Loading label (default: 'Loading...') */
666
- loading?: string;
667
- /** Select placeholder (default: 'Select...') */
668
- selectPlaceholder?: string;
669
- /** File upload prompt (default: 'Click or drag files here') */
670
- fileUploadPrompt?: string;
671
- /** Confirm button label (default: 'Confirm') */
672
- confirm?: string;
645
+ export type ModalI18nLabels = {
646
+ /** Submit button label (default: 'Submit') */
647
+ submit?: string;
648
+ /** Cancel button label (default: 'Cancel') */
649
+ cancel?: string;
650
+ /** Next button label for wizard (default: 'Next') */
651
+ next?: string;
652
+ /** Back button label for wizard (default: 'Back') */
653
+ back?: string;
654
+ /** Close button label (default: 'Close') */
655
+ close?: string;
656
+ /** Complete button label for wizard (default: 'Complete') */
657
+ complete?: string;
658
+ /** Submitting state label (default: 'Submitting...') */
659
+ submitting?: string;
660
+ /** Completing state label (default: 'Completing...') */
661
+ completing?: string;
662
+ /** Loading label (default: 'Loading...') */
663
+ loading?: string;
664
+ /** Select placeholder (default: 'Select...') */
665
+ selectPlaceholder?: string;
666
+ /** File upload prompt (default: 'Click or drag files here') */
667
+ fileUploadPrompt?: string;
668
+ /** Confirm button label (default: 'Confirm') */
669
+ confirm?: string;
673
670
  };
674
- type ModalCancelHandler<_TResult = unknown> = (reason: ModalCloseReason) => Promise<void> | void;
675
- type BaseModalConfig<TResult = unknown> = {
676
- kind: ModalKind;
677
- title?: string;
678
- subtitle?: string;
679
- description?: string;
680
- /** Width of the modal (uses ModalSize enum) */
681
- sizeWidth?: ModalSize;
682
- /** Height of the modal (uses ModalSize enum) */
683
- sizeHeight?: ModalSize;
684
- closeMode?: CloseMode;
685
- closeGuard?: () => Promise<boolean> | boolean;
686
- backdrop?: BackdropMode;
687
- /**
688
- * Whether Escape closes the modal. Closes by default (unset or `ENABLED`); `DISABLED` opts out.
689
- * Only the top modal of a stack reacts, and the close goes through `closeMode`/`closeGuard`.
690
- */
691
- keyboard?: KeyboardMode;
692
- intent?: ModalIntent;
693
- resultType?: TResult;
694
- /** Custom footer actions (overrides default footer) */
695
- footerActions?: ModalFooterAction<TResult>[];
696
- /** Whether modal action buttons render their icons. Defaults to true. */
697
- showActionIcons?: boolean;
698
- /** Polling configuration for periodic async operations */
699
- polling?: ModalPollingConfig<TResult>;
700
- /** Handler called when the modal is cancelled or dismissed */
701
- readOnly?: boolean;
702
- disabled?: boolean;
703
- onCancel?: ModalCancelHandler<TResult>;
704
- /** i18n labels for buttons and UI text */
705
- i18n?: ModalI18nLabels;
706
- /** Animation configuration */
707
- animation?: AnimationOptions | AnimationOptions['type'];
708
- /**
709
- * Whether the modal renders as a bottom sheet on small screens (< 640px).
710
- * Defaults to true. Set to false to keep it a centered dialog on mobile.
711
- */
712
- mobileBottomSheet?: boolean;
713
- /** Custom component to render in the modal body */
714
- component?: Type<unknown>;
715
- /** Custom template to render in the modal body */
716
- template?: TemplateRef<unknown>;
717
- /** Inputs for the custom component */
718
- inputs?: ModalInputMap;
671
+ export type ModalCancelHandler<_TResult = unknown> = (reason: ModalCloseReason) => Promise<void> | void;
672
+ export type BaseModalConfig<TResult = unknown> = {
673
+ kind: ModalKind;
674
+ title?: string;
675
+ subtitle?: string;
676
+ description?: string;
677
+ /** Width of the modal (uses ModalSize enum) */
678
+ sizeWidth?: ModalSize;
679
+ /** Height of the modal (uses ModalSize enum) */
680
+ sizeHeight?: ModalSize;
681
+ closeMode?: CloseMode;
682
+ closeGuard?: () => Promise<boolean> | boolean;
683
+ backdrop?: BackdropMode;
684
+ /**
685
+ * Whether Escape closes the modal. Closes by default (unset or `ENABLED`); `DISABLED` opts out.
686
+ * Only the top modal of a stack reacts, and the close goes through `closeMode`/`closeGuard`.
687
+ */
688
+ keyboard?: KeyboardMode;
689
+ intent?: ModalIntent;
690
+ resultType?: TResult;
691
+ /** Custom footer actions (overrides default footer) */
692
+ footerActions?: ModalFooterAction<TResult>[];
693
+ /** Whether modal action buttons render their icons. Defaults to true. */
694
+ showActionIcons?: boolean;
695
+ /** Polling configuration for periodic async operations */
696
+ polling?: ModalPollingConfig<TResult>;
697
+ /** Handler called when the modal is cancelled or dismissed */
698
+ readOnly?: boolean;
699
+ disabled?: boolean;
700
+ onCancel?: ModalCancelHandler<TResult>;
701
+ /** i18n labels for buttons and UI text */
702
+ i18n?: ModalI18nLabels;
703
+ /** Animation configuration */
704
+ animation?: AnimationOptions | AnimationOptions['type'];
705
+ /**
706
+ * Whether the modal renders as a bottom sheet on small screens (< 640px).
707
+ * Defaults to true. Set to false to keep it a centered dialog on mobile.
708
+ */
709
+ mobileBottomSheet?: boolean;
710
+ /** Custom component to render in the modal body */
711
+ component?: Type<unknown>;
712
+ /** Custom template to render in the modal body */
713
+ template?: TemplateRef<unknown>;
714
+ /** Inputs for the custom component */
715
+ inputs?: ModalInputMap;
719
716
  };
720
- type WizardBeforeCompleteValidator<TResult = unknown> = (payload: Record<ModalStepId, Record<string, unknown>>) => Promise<Partial<Record<keyof TResult & string, string>> | null> | Partial<Record<keyof TResult & string, string>> | null;
721
- type WizardModalConfig<TResult = WizardResult> = {
722
- kind: ModalKind.WIZARD;
723
- steps: WizardStepConfig[];
724
- startStepId?: ModalStepId;
725
- flow?: WizardFlowMode;
726
- onStepChange?: WizardStepChangeHandler;
727
- onComplete?: ModalResultHandler<TResult>;
728
- /** Cross-step validators run before wizard completion */
729
- onBeforeComplete?: WizardBeforeCompleteValidator<TResult>[];
730
- /** Global initial values for all steps */
731
- initialValue?: Partial<TResult>;
717
+ export type WizardBeforeCompleteValidator<TResult = unknown> = (payload: Record<ModalStepId, Record<string, unknown>>) => Promise<Partial<Record<keyof TResult & string, string>> | null> | Partial<Record<keyof TResult & string, string>> | null;
718
+ export type WizardModalConfig<TResult = WizardResult> = {
719
+ kind: ModalKind.WIZARD;
720
+ steps: WizardStepConfig[];
721
+ startStepId?: ModalStepId;
722
+ flow?: WizardFlowMode;
723
+ onStepChange?: WizardStepChangeHandler;
724
+ onComplete?: ModalResultHandler<TResult>;
725
+ /** Cross-step validators run before wizard completion */
726
+ onBeforeComplete?: WizardBeforeCompleteValidator<TResult>[];
727
+ /** Global initial values for all steps */
728
+ initialValue?: Partial<TResult>;
732
729
  } & BaseModalConfig<TResult>;
733
- type FormModalConfig<TModel = unknown, TResult = TModel> = {
734
- kind: ModalKind.FORM;
735
- body?: StepBodyConfig;
736
- fields: FormFieldConfig<TModel>[];
737
- rows?: FormRow<TModel>[];
738
- layout?: FormLayoutMode;
739
- initialValue?: Partial<TModel>;
740
- submitMode?: SubmitMode;
741
- onComplete?: ModalResultHandler<TResult>;
742
- /** Form-level validators for cross-field validation */
743
- formValidators?: FormValidator<TModel>[];
744
- /** Angular FormGroup-level validators (e.g., Validators.required on the group) */
745
- groupValidators?: ValidatorFn[];
746
- /** Field groups with section headers */
747
- fieldGroups?: FormFieldGroup<TModel>[];
730
+ export type FormModalConfig<TModel = unknown, TResult = TModel> = {
731
+ kind: ModalKind.FORM;
732
+ body?: StepBodyConfig;
733
+ fields: FormFieldConfig<TModel>[];
734
+ rows?: FormRow<TModel>[];
735
+ layout?: FormLayoutMode;
736
+ initialValue?: Partial<TModel>;
737
+ submitMode?: SubmitMode;
738
+ onComplete?: ModalResultHandler<TResult>;
739
+ /** Form-level validators for cross-field validation */
740
+ formValidators?: FormValidator<TModel>[];
741
+ /** Angular FormGroup-level validators (e.g., Validators.required on the group) */
742
+ groupValidators?: ValidatorFn[];
743
+ /** Field groups with section headers */
744
+ fieldGroups?: FormFieldGroup<TModel>[];
748
745
  } & BaseModalConfig<TResult>;
749
- type ConfirmationModalConfig<TResult = boolean> = {
750
- kind: ModalKind.CONFIRMATION;
751
- message: string;
752
- tone?: ConfirmationTone;
753
- confirm?: ConfirmationActionConfig<TResult>;
754
- cancel?: CancellationActionConfig;
755
- body?: StepBodyConfig;
756
- fields?: FormFieldConfig<unknown>[];
757
- rows?: FormRow<unknown>[];
758
- fieldGroups?: FormFieldGroup<unknown>[];
759
- formValidators?: FormValidator<unknown>[];
760
- groupValidators?: ValidatorFn[];
761
- initialValue?: Partial<unknown>;
746
+ export type ConfirmationModalConfig<TResult = boolean> = {
747
+ kind: ModalKind.CONFIRMATION;
748
+ message: string;
749
+ tone?: ConfirmationTone;
750
+ confirm?: ConfirmationActionConfig<TResult>;
751
+ cancel?: CancellationActionConfig;
752
+ body?: StepBodyConfig;
753
+ fields?: FormFieldConfig<unknown>[];
754
+ rows?: FormRow<unknown>[];
755
+ fieldGroups?: FormFieldGroup<unknown>[];
756
+ formValidators?: FormValidator<unknown>[];
757
+ groupValidators?: ValidatorFn[];
758
+ initialValue?: Partial<unknown>;
762
759
  } & BaseModalConfig<TResult>;
763
- type CustomModalConfig<TResult = unknown> = {
764
- kind: ModalKind.CUSTOM;
765
- onComplete?: ModalResultHandler<TResult>;
760
+ export type CustomModalConfig<TResult = unknown> = {
761
+ kind: ModalKind.CUSTOM;
762
+ onComplete?: ModalResultHandler<TResult>;
766
763
  } & BaseModalConfig<TResult>;
767
- type ModalConfig<TResult = unknown, TModel = unknown> = WizardModalConfig<TResult> | FormModalConfig<TModel, TResult> | ConfirmationModalConfig<TResult> | CustomModalConfig<TResult>;
768
-
764
+ export type ModalConfig<TResult = unknown, TModel = unknown> = WizardModalConfig<TResult> | FormModalConfig<TModel, TResult> | ConfirmationModalConfig<TResult> | CustomModalConfig<TResult>;
769
765
  /**
770
766
  * Default leading-icon size (px) for modal action buttons, matching the standard
771
767
  * (`md`) button. Small (`sm`) buttons use {@link MODAL_ACTION_ICON_SIZE_SM}.
772
768
  */
773
- declare const MODAL_ACTION_ICON_SIZE = 18;
769
+ export declare const MODAL_ACTION_ICON_SIZE = 18;
774
770
  /** Leading-icon size (px) for `sm`-sized modal action buttons. */
775
- declare const MODAL_ACTION_ICON_SIZE_SM = 16;
771
+ export declare const MODAL_ACTION_ICON_SIZE_SM = 16;
776
772
  /**
777
773
  * The canonical Lucide icon data used as defaults across all modal action buttons.
778
774
  * Each value is a Lucide icon's static `.icon` data, rendered via the dynamic
779
775
  * `svg[lucideIcon]` directive so no icon has to be registered in `MN_ICON_MAP`.
780
776
  */
781
- declare const MN_MODAL_ACTION_ICONS: {
782
- /** Affirmative action (confirm / submit / complete). */
783
- readonly confirm: LucideIconData;
784
- /** Destructive action (danger style). */
785
- readonly danger: LucideIconData;
786
- /** Cancel / dismiss / close action. */
787
- readonly cancel: LucideIconData;
788
- /** Wizard forward navigation (rendered trailing). */
789
- readonly next: LucideIconData;
790
- /** Wizard backward navigation. */
791
- readonly back: LucideIconData;
777
+ export declare const MN_MODAL_ACTION_ICONS: {
778
+ /** Affirmative action (confirm / submit / complete). */
779
+ readonly confirm: LucideIconData$1;
780
+ /** Destructive action (danger style). */
781
+ readonly danger: LucideIconData$1;
782
+ /** Cancel / dismiss / close action. */
783
+ readonly cancel: LucideIconData$1;
784
+ /** Wizard forward navigation (rendered trailing). */
785
+ readonly next: LucideIconData$1;
786
+ /** Wizard backward navigation. */
787
+ readonly back: LucideIconData$1;
792
788
  };
793
789
  /**
794
790
  * Resolves the default action-button icon from its {@link ActionStyle}. Used by
@@ -797,14 +793,13 @@ declare const MN_MODAL_ACTION_ICONS: {
797
793
  * @param style The action's style, if any.
798
794
  * @returns The Lucide icon data to render.
799
795
  */
800
- declare function defaultIconForStyle(style?: ActionStyle): LucideIconData;
801
-
796
+ export declare function defaultIconForStyle(style?: ActionStyle): LucideIconData$1;
802
797
  /**
803
798
  * Intensity of a haptic impact. Mirrors the three impact weights exposed by most
804
799
  * native haptic engines (e.g. Capacitor Haptics `ImpactStyle`) without binding the
805
800
  * library to any particular implementation.
806
801
  */
807
- type MnHapticStyle = 'light' | 'medium' | 'heavy';
802
+ export type MnHapticStyle = 'light' | 'medium' | 'heavy';
808
803
  /**
809
804
  * Abstraction over a native haptic feedback engine.
810
805
  *
@@ -813,12 +808,12 @@ type MnHapticStyle = 'light' | 'medium' | 'heavy';
813
808
  * native shell provide an implementation of this handler through {@link MN_HAPTICS};
814
809
  * when no handler is provided the modal simply skips haptic feedback.
815
810
  */
816
- type MnHapticsHandler = {
817
- /**
818
- * Triggers a transient impact-style haptic.
819
- * @param style Intensity of the impact.
820
- */
821
- impact(style: MnHapticStyle): void;
811
+ export type MnHapticsHandler = {
812
+ /**
813
+ * Triggers a transient impact-style haptic.
814
+ * @param style Intensity of the impact.
815
+ */
816
+ impact(style: MnHapticStyle): void;
822
817
  };
823
818
  /**
824
819
  * Optional DI token used by the bottom sheet to emit haptic feedback on native
@@ -826,19 +821,18 @@ type MnHapticsHandler = {
826
821
  * at the application root to enable it; leave unprovided on the web (the modal injects it
827
822
  * with `{ optional: true }` and no-ops when absent).
828
823
  */
829
- declare const MN_HAPTICS: InjectionToken<MnHapticsHandler>;
830
-
824
+ export declare const MN_HAPTICS: InjectionToken<MnHapticsHandler>;
831
825
  /**
832
826
  * Shared interface for configurations that support form layouts.
833
827
  */
834
828
  type FormContainerConfig<TModel = unknown> = {
835
- fields?: FormFieldConfig<TModel>[];
836
- rows?: FormRow<TModel>[];
837
- fieldGroups?: FormFieldGroup<TModel>[];
838
- formValidators?: FormValidator<TModel>[];
839
- groupValidators?: ValidatorFn[];
840
- initialValue?: Partial<TModel>;
841
- body?: StepBodyConfig;
829
+ fields?: FormFieldConfig<TModel>[];
830
+ rows?: FormRow<TModel>[];
831
+ fieldGroups?: FormFieldGroup<TModel>[];
832
+ formValidators?: FormValidator<TModel>[];
833
+ groupValidators?: ValidatorFn[];
834
+ initialValue?: Partial<TModel>;
835
+ body?: StepBodyConfig;
842
836
  };
843
837
  /**
844
838
  * A self-referential type so that field-group builder methods can be chained.
@@ -850,292 +844,282 @@ type ChainableGroupBuilder<TModel> = FormLayoutBuilder<TModel, ChainableGroupBui
850
844
  * This can be used as a delegate to avoid code duplication between FormModalBuilder and StepBuilder.
851
845
  */
852
846
  declare class FormLayoutBuilder<TModel = unknown, TParent = unknown> {
853
- private readonly config;
854
- private parent;
855
- private currentRow;
856
- private currentRowColumns;
857
- constructor(config: FormContainerConfig<TModel>, parent: TParent);
858
- /**
859
- * Add a custom body/content to the form/step.
860
- */
861
- body(body: StepBodyConfig): TParent;
862
- /**
863
- * Add a field as a full-width row (single column).
864
- */
865
- field(field: FormFieldConfig<TModel>): TParent;
866
- /**
867
- * Start a new row with the specified number of columns.
868
- * All subsequent `addToRow()` calls will add fields to this row.
869
- */
870
- row(columns?: number): TParent;
871
- /**
872
- * Add a field to the current row started by `row()`.
873
- * @param field - The field configuration
874
- * @param span - How many columns this field should span (default: 1)
875
- */
876
- addToRow(field: FormFieldConfig<TModel>, span?: number): TParent;
877
- /**
878
- * Declarative way to add a row.
879
- * @example
880
- * .addRow(2, row => {
881
- * row.add({ kind: FieldKind.TEXT, key: 'first', ... });
882
- * row.add({ kind: FieldKind.TEXT, key: 'last', ... });
883
- * })
884
- */
885
- addRow(columns: number, buildFn: (row: {
886
- add: (field: FormFieldConfig<TModel>, span?: number) => void;
887
- }) => void): TParent;
888
- /**
889
- * Add a field group with a section header.
890
- */
891
- fieldGroup(group: FormFieldGroup<TModel>): TParent;
892
- /**
893
- * Add a field group using a functional builder.
894
- */
895
- fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): TParent;
896
- /**
897
- * Add a field group with title, description, and a functional builder.
898
- */
899
- fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): TParent;
900
- private processFieldGroup;
901
- /**
902
- * Add form-level validators for cross-field validation.
903
- */
904
- formValidators(validators: FormValidator<TModel>[]): TParent;
905
- /**
906
- * Add Angular FormGroup-level validators.
907
- */
908
- groupValidators(validators: ValidatorFn[]): TParent;
909
- /**
910
- * Set initial value for fields.
911
- */
912
- initialValue(value: Partial<TModel>): TParent;
913
- /**
914
- * Set the field to be focused when the form initializes.
915
- */
916
- focus(key: keyof TModel): TParent;
917
- /**
918
- * Wraps a field with a fluent API for validation.
919
- */
920
- fieldWithValidators(field: FormFieldConfig<TModel>): FieldValidatorBuilder<TModel, TParent>;
921
- /**
922
- * Flushes any pending fields in the current row to the configuration.
923
- */
924
- flushCurrentRow(): void;
847
+ private readonly config;
848
+ private parent;
849
+ private currentRow;
850
+ private currentRowColumns;
851
+ constructor(config: FormContainerConfig<TModel>, parent: TParent);
852
+ /**
853
+ * Add a custom body/content to the form/step.
854
+ */
855
+ body(body: StepBodyConfig): TParent;
856
+ /**
857
+ * Add a field as a full-width row (single column).
858
+ */
859
+ field(field: FormFieldConfig<TModel>): TParent;
860
+ /**
861
+ * Start a new row with the specified number of columns.
862
+ * All subsequent `addToRow()` calls will add fields to this row.
863
+ */
864
+ row(columns?: number): TParent;
865
+ /**
866
+ * Add a field to the current row started by `row()`.
867
+ * @param field - The field configuration
868
+ * @param span - How many columns this field should span (default: 1)
869
+ */
870
+ addToRow(field: FormFieldConfig<TModel>, span?: number): TParent;
871
+ /**
872
+ * Declarative way to add a row.
873
+ * @example
874
+ * .addRow(2, row => {
875
+ * row.add({ kind: FieldKind.TEXT, key: 'first', ... });
876
+ * row.add({ kind: FieldKind.TEXT, key: 'last', ... });
877
+ * })
878
+ */
879
+ addRow(columns: number, buildFn: (row: {
880
+ add: (field: FormFieldConfig<TModel>, span?: number) => void;
881
+ }) => void): TParent;
882
+ /**
883
+ * Add a field group with a section header.
884
+ */
885
+ fieldGroup(group: FormFieldGroup<TModel>): TParent;
886
+ /**
887
+ * Add a field group using a functional builder.
888
+ */
889
+ fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): TParent;
890
+ /**
891
+ * Add a field group with title, description, and a functional builder.
892
+ */
893
+ fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): TParent;
894
+ private processFieldGroup;
895
+ /**
896
+ * Add form-level validators for cross-field validation.
897
+ */
898
+ formValidators(validators: FormValidator<TModel>[]): TParent;
899
+ /**
900
+ * Add Angular FormGroup-level validators.
901
+ */
902
+ groupValidators(validators: ValidatorFn[]): TParent;
903
+ /**
904
+ * Set initial value for fields.
905
+ */
906
+ initialValue(value: Partial<TModel>): TParent;
907
+ /**
908
+ * Set the field to be focused when the form initializes.
909
+ */
910
+ focus(key: keyof TModel): TParent;
911
+ /**
912
+ * Wraps a field with a fluent API for validation.
913
+ */
914
+ fieldWithValidators(field: FormFieldConfig<TModel>): FieldValidatorBuilder<TModel, TParent>;
915
+ /**
916
+ * Flushes any pending fields in the current row to the configuration.
917
+ */
918
+ flushCurrentRow(): void;
925
919
  }
926
920
  /**
927
921
  * A builder for adding validation rules to a field fluently.
928
922
  */
929
923
  declare class FieldValidatorBuilder<TModel = unknown, TParent = unknown> {
930
- private field;
931
- private parent;
932
- constructor(field: FormFieldConfig<TModel>, parent: TParent);
933
- required(_message?: string): this;
934
- minLength(length: number): this;
935
- maxLength(length: number): this;
936
- pattern(pattern: string | RegExp): this;
937
- email(): this;
938
- min(value: number): this;
939
- max(value: number): this;
940
- /**
941
- * Add a custom validator.
942
- */
943
- custom(validator: ValidatorFn): this;
944
- /**
945
- * Return to the parent builder.
946
- */
947
- done(): TParent;
924
+ private field;
925
+ private parent;
926
+ constructor(field: FormFieldConfig<TModel>, parent: TParent);
927
+ required(_message?: string): this;
928
+ minLength(length: number): this;
929
+ maxLength(length: number): this;
930
+ pattern(pattern: string | RegExp): this;
931
+ email(): this;
932
+ min(value: number): this;
933
+ max(value: number): this;
934
+ /**
935
+ * Add a custom validator.
936
+ */
937
+ custom(validator: ValidatorFn): this;
938
+ /**
939
+ * Return to the parent builder.
940
+ */
941
+ done(): TParent;
948
942
  }
949
-
950
- declare class StepBuilder<TModel = unknown> {
951
- private config;
952
- private layoutBuilder;
953
- constructor(id: string, title: string);
954
- /**
955
- * Set the step body. Accepts plain text, a component, or a template.
956
- * @param body The step body content (string, component `Type`, or `TemplateRef`).
957
- * @param inputs Optional inputs for a component/template body (ignored for text).
958
- */
959
- body(body: StepBodyConfig, inputs?: ModalInputMap): this;
960
- state(state: StepState): this;
961
- guard(guard: StepGuard): this;
962
- validators(validators: StepValidator[]): this;
963
- field(field: FormFieldConfig<TModel>): this;
964
- row(columns?: number): this;
965
- addToRow(field: FormFieldConfig<TModel>, span?: number): this;
966
- addRow(columns: number, buildFn: (row: {
967
- add: (field: FormFieldConfig<TModel>, span?: number) => void;
968
- }) => void): this;
969
- fieldGroup(group: FormFieldGroup<TModel>): this;
970
- fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
971
- fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
972
- formValidators(validators: FormValidator<TModel>[]): this;
973
- groupValidators(validators: ValidatorFn[]): this;
974
- initialValue(value: Partial<TModel>): this;
975
- visible(condition: (aggregatedData: Record<ModalStepId, Record<string, unknown>>) => boolean): this;
976
- nextLabel(label: string): this;
977
- backLabel(label: string): this;
978
- hideBack(hide?: boolean): this;
979
- build(): WizardStepConfig<TModel>;
943
+ export declare class StepBuilder<TModel = unknown> {
944
+ private config;
945
+ private layoutBuilder;
946
+ constructor(id: string, title: string);
947
+ /**
948
+ * Set the step body. Accepts plain text, a component, or a template.
949
+ * @param body The step body content (string, component `Type`, or `TemplateRef`).
950
+ * @param inputs Optional inputs for a component/template body (ignored for text).
951
+ */
952
+ body(body: StepBodyConfig, inputs?: ModalInputMap): this;
953
+ state(state: StepState): this;
954
+ guard(guard: StepGuard): this;
955
+ validators(validators: StepValidator[]): this;
956
+ field(field: FormFieldConfig<TModel>): this;
957
+ row(columns?: number): this;
958
+ addToRow(field: FormFieldConfig<TModel>, span?: number): this;
959
+ addRow(columns: number, buildFn: (row: {
960
+ add: (field: FormFieldConfig<TModel>, span?: number) => void;
961
+ }) => void): this;
962
+ fieldGroup(group: FormFieldGroup<TModel>): this;
963
+ fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
964
+ fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
965
+ formValidators(validators: FormValidator<TModel>[]): this;
966
+ groupValidators(validators: ValidatorFn[]): this;
967
+ initialValue(value: Partial<TModel>): this;
968
+ visible(condition: (aggregatedData: Record<ModalStepId, Record<string, unknown>>) => boolean): this;
969
+ nextLabel(label: string): this;
970
+ backLabel(label: string): this;
971
+ hideBack(hide?: boolean): this;
972
+ build(): WizardStepConfig<TModel>;
980
973
  }
981
-
982
- declare abstract class BaseModalBuilder<TConfig extends BaseModalConfig<TResult> & FormContainerConfig<TModel>, TResult = unknown, TModel = unknown> {
983
- protected config: TConfig;
984
- protected layoutBuilder: FormLayoutBuilder<TModel, this>;
985
- protected constructor(initialConfig: TConfig);
986
- title(title: string): this;
987
- subtitle(subtitle: string): this;
988
- description(description: string): this;
989
- closeGuard(guard: () => Promise<boolean> | boolean): this;
990
- /** Set the width of the modal */
991
- sizeWidth(size: ModalSize): this;
992
- /** Set the height of the modal */
993
- sizeHeight(size: ModalSize): this;
994
- closeMode(mode: CloseMode): this;
995
- backdrop(mode: BackdropMode): this;
996
- keyboard(mode: KeyboardMode): this;
997
- intent(intent: ModalIntent): this;
998
- readOnly(readOnly?: boolean): this;
999
- disabled(disabled?: boolean): this;
1000
- footerActions(actions: ModalFooterAction<TResult>[]): this;
1001
- polling(config: ModalPollingConfig<TResult>): this;
1002
- onCancel(handler: ModalCancelHandler<TResult>): this;
1003
- i18n(labels: ModalI18nLabels): this;
1004
- component(component: Type<unknown>): this;
1005
- template(template: TemplateRef<unknown>): this;
1006
- inputs(inputs: ModalInputMap): this;
1007
- animation(animation: AnimationOptions | AnimationOptions['type']): this;
1008
- /**
1009
- * Control whether the modal renders as a bottom sheet on small screens (< 640px).
1010
- * Enabled by default; pass `false` to keep a centered dialog on mobile.
1011
- */
1012
- mobileBottomSheet(enabled?: boolean): this;
1013
- /**
1014
- * Add a custom body/content to the modal.
1015
- */
1016
- body(body: StepBodyConfig): this;
1017
- /**
1018
- * Add a field.
1019
- */
1020
- field(field: FormFieldConfig<TModel>): this;
1021
- /**
1022
- * Add a field with a fluent validation builder.
1023
- */
1024
- fieldWithValidators(field: FormFieldConfig<TModel>): FieldValidatorBuilder<TModel, this>;
1025
- /**
1026
- * Start a new row.
1027
- */
1028
- row(columns?: number): this;
1029
- /**
1030
- * Add a field to the current row.
1031
- */
1032
- addToRow(field: FormFieldConfig<TModel>, span?: number): this;
1033
- /**
1034
- * Declarative way to add a row.
1035
- */
1036
- addRow(columns: number, buildFn: (row: {
1037
- add: (field: FormFieldConfig<TModel>, span?: number) => void;
1038
- }) => void): this;
1039
- /**
1040
- * Add a field group.
1041
- */
1042
- fieldGroup(group: FormFieldGroup<TModel>): this;
1043
- fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
1044
- fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
1045
- groupValidators(validators: ValidatorFn[]): this;
1046
- build(): Readonly<TConfig>;
974
+ export declare abstract class BaseModalBuilder<TConfig extends BaseModalConfig<TResult> & FormContainerConfig<TModel>, TResult = unknown, TModel = unknown> {
975
+ protected config: TConfig;
976
+ protected layoutBuilder: FormLayoutBuilder<TModel, this>;
977
+ protected constructor(initialConfig: TConfig);
978
+ title(title: string): this;
979
+ subtitle(subtitle: string): this;
980
+ description(description: string): this;
981
+ closeGuard(guard: () => Promise<boolean> | boolean): this;
982
+ /** Set the width of the modal */
983
+ sizeWidth(size: ModalSize): this;
984
+ /** Set the height of the modal */
985
+ sizeHeight(size: ModalSize): this;
986
+ closeMode(mode: CloseMode): this;
987
+ backdrop(mode: BackdropMode): this;
988
+ keyboard(mode: KeyboardMode): this;
989
+ intent(intent: ModalIntent): this;
990
+ readOnly(readOnly?: boolean): this;
991
+ disabled(disabled?: boolean): this;
992
+ footerActions(actions: ModalFooterAction<TResult>[]): this;
993
+ polling(config: ModalPollingConfig<TResult>): this;
994
+ onCancel(handler: ModalCancelHandler<TResult>): this;
995
+ i18n(labels: ModalI18nLabels): this;
996
+ component(component: Type<unknown>): this;
997
+ template(template: TemplateRef<unknown>): this;
998
+ inputs(inputs: ModalInputMap): this;
999
+ animation(animation: AnimationOptions | AnimationOptions['type']): this;
1000
+ /**
1001
+ * Control whether the modal renders as a bottom sheet on small screens (< 640px).
1002
+ * Enabled by default; pass `false` to keep a centered dialog on mobile.
1003
+ */
1004
+ mobileBottomSheet(enabled?: boolean): this;
1005
+ /**
1006
+ * Add a custom body/content to the modal.
1007
+ */
1008
+ body(body: StepBodyConfig): this;
1009
+ /**
1010
+ * Add a field.
1011
+ */
1012
+ field(field: FormFieldConfig<TModel>): this;
1013
+ /**
1014
+ * Add a field with a fluent validation builder.
1015
+ */
1016
+ fieldWithValidators(field: FormFieldConfig<TModel>): FieldValidatorBuilder<TModel, this>;
1017
+ /**
1018
+ * Start a new row.
1019
+ */
1020
+ row(columns?: number): this;
1021
+ /**
1022
+ * Add a field to the current row.
1023
+ */
1024
+ addToRow(field: FormFieldConfig<TModel>, span?: number): this;
1025
+ /**
1026
+ * Declarative way to add a row.
1027
+ */
1028
+ addRow(columns: number, buildFn: (row: {
1029
+ add: (field: FormFieldConfig<TModel>, span?: number) => void;
1030
+ }) => void): this;
1031
+ /**
1032
+ * Add a field group.
1033
+ */
1034
+ fieldGroup(group: FormFieldGroup<TModel>): this;
1035
+ fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
1036
+ fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
1037
+ groupValidators(validators: ValidatorFn[]): this;
1038
+ build(): Readonly<TConfig>;
1047
1039
  }
1048
-
1049
- declare class WizardModalBuilder<TResult = WizardResult> extends BaseModalBuilder<WizardModalConfig<TResult>, TResult> {
1050
- constructor();
1051
- /**
1052
- * Set initial values for the entire wizard.
1053
- * Note: This will be merged with individual step initial values.
1054
- */
1055
- initialValue(value: Partial<TResult>): this;
1056
- /**
1057
- * Description is not supported for wizard modals.
1058
- * Use step-level body text instead.
1059
- */
1060
- description(_description: string): this;
1061
- step<TStepModel = unknown>(step: WizardStepConfig<TStepModel> | ((builder: StepBuilder<TStepModel>) => void)): this;
1062
- addStep<TStepModel = unknown>(title: string, buildFn: (builder: StepBuilder<TStepModel>) => void, id?: ModalStepId): this;
1063
- startAt(stepId: ModalStepId): this;
1064
- flow(mode: WizardFlowMode): this;
1065
- onStepChange(handler: WizardStepChangeHandler): this;
1066
- onComplete(handler: ModalResultHandler<TResult>): this;
1067
- onBeforeComplete(validators: WizardBeforeCompleteValidator<TResult>[]): this;
1040
+ export declare class WizardModalBuilder<TResult = WizardResult> extends BaseModalBuilder<WizardModalConfig<TResult>, TResult> {
1041
+ constructor();
1042
+ /**
1043
+ * Set initial values for the entire wizard.
1044
+ * Note: This will be merged with individual step initial values.
1045
+ */
1046
+ initialValue(value: Partial<TResult>): this;
1047
+ /**
1048
+ * Description is not supported for wizard modals.
1049
+ * Use step-level body text instead.
1050
+ */
1051
+ description(_description: string): this;
1052
+ step<TStepModel = unknown>(step: WizardStepConfig<TStepModel> | ((builder: StepBuilder<TStepModel>) => void)): this;
1053
+ addStep<TStepModel = unknown>(title: string, buildFn: (builder: StepBuilder<TStepModel>) => void, id?: ModalStepId): this;
1054
+ startAt(stepId: ModalStepId): this;
1055
+ flow(mode: WizardFlowMode): this;
1056
+ onStepChange(handler: WizardStepChangeHandler): this;
1057
+ onComplete(handler: ModalResultHandler<TResult>): this;
1058
+ onBeforeComplete(validators: WizardBeforeCompleteValidator<TResult>[]): this;
1068
1059
  }
1069
-
1070
- declare class FormModalBuilder<TModel = unknown, TResult = TModel> extends BaseModalBuilder<FormModalConfig<TModel, TResult>, TResult, TModel> {
1071
- constructor();
1072
- /**
1073
- * Override to also accept table field configs with a concrete TRow (BehaviorSubject is invariant,
1074
- * so TableDataSource<TeamMember> is not assignable to TableDataSource<unknown>).
1075
- */
1076
- field(field: FormFieldConfig<TModel>): this;
1077
- field<TRow>(field: MultiSelectTableFieldConfig<TModel, TRow> | SingleSelectTableFieldConfig<TModel, TRow>): this;
1078
- layout(mode: FormLayoutMode): this;
1079
- initialValue(value: Partial<TModel>): this;
1080
- submitMode(mode: SubmitMode): this;
1081
- onComplete(handler: ModalResultHandler<TResult>): this;
1082
- formValidators(validators: FormValidator<TModel>[]): this;
1083
- groupValidators(validators: ValidatorFn[]): this;
1084
- build(): Readonly<FormModalConfig<TModel, TResult>>;
1060
+ export declare class FormModalBuilder<TModel = unknown, TResult = TModel> extends BaseModalBuilder<FormModalConfig<TModel, TResult>, TResult, TModel> {
1061
+ constructor();
1062
+ /**
1063
+ * Override to also accept table field configs with a concrete TRow (BehaviorSubject is invariant,
1064
+ * so TableDataSource<TeamMember> is not assignable to TableDataSource<unknown>).
1065
+ */
1066
+ field(field: FormFieldConfig<TModel>): this;
1067
+ field<TRow>(field: MultiSelectTableFieldConfig<TModel, TRow> | SingleSelectTableFieldConfig<TModel, TRow>): this;
1068
+ layout(mode: FormLayoutMode): this;
1069
+ initialValue(value: Partial<TModel>): this;
1070
+ submitMode(mode: SubmitMode): this;
1071
+ onComplete(handler: ModalResultHandler<TResult>): this;
1072
+ formValidators(validators: FormValidator<TModel>[]): this;
1073
+ groupValidators(validators: ValidatorFn[]): this;
1074
+ build(): Readonly<FormModalConfig<TModel, TResult>>;
1085
1075
  }
1086
-
1087
- declare class ConfirmationModalBuilder<TResult = boolean> extends BaseModalBuilder<ConfirmationModalConfig<TResult>, TResult> {
1088
- constructor();
1089
- message(text: string): this;
1090
- tone(tone: ConfirmationTone): this;
1091
- confirmAction(action: ConfirmationActionConfig<TResult>): this;
1092
- cancelAction(action: CancellationActionConfig): this;
1093
- initialValue(value: Partial<unknown>): this;
1094
- formValidators(validators: FormValidator<unknown>[]): this;
1095
- groupValidators(validators: ValidatorFn[]): this;
1096
- build(): Readonly<ConfirmationModalConfig<TResult>>;
1076
+ export declare class ConfirmationModalBuilder<TResult = boolean> extends BaseModalBuilder<ConfirmationModalConfig<TResult>, TResult> {
1077
+ constructor();
1078
+ message(text: string): this;
1079
+ tone(tone: ConfirmationTone): this;
1080
+ confirmAction(action: ConfirmationActionConfig<TResult>): this;
1081
+ cancelAction(action: CancellationActionConfig): this;
1082
+ initialValue(value: Partial<unknown>): this;
1083
+ formValidators(validators: FormValidator<unknown>[]): this;
1084
+ groupValidators(validators: ValidatorFn[]): this;
1085
+ build(): Readonly<ConfirmationModalConfig<TResult>>;
1097
1086
  }
1098
-
1099
- declare class CustomModalBuilder<TResult = unknown> extends BaseModalBuilder<CustomModalConfig<TResult>, TResult> {
1100
- constructor();
1101
- onComplete(handler: ModalResultHandler<TResult>): this;
1087
+ export declare class CustomModalBuilder<TResult = unknown> extends BaseModalBuilder<CustomModalConfig<TResult>, TResult> {
1088
+ constructor();
1089
+ onComplete(handler: ModalResultHandler<TResult>): this;
1102
1090
  }
1103
-
1104
- declare class ModalBuilder {
1105
- static wizard<TResult = WizardResult>(): WizardModalBuilder<TResult>;
1106
- static form<TModel = unknown, TResult = TModel>(): FormModalBuilder<TModel, TResult>;
1107
- static confirmation<TResult = boolean>(): ConfirmationModalBuilder<TResult>;
1108
- static custom<TResult = unknown>(): CustomModalBuilder<TResult>;
1091
+ export declare class ModalBuilder {
1092
+ static wizard<TResult = WizardResult>(): WizardModalBuilder<TResult>;
1093
+ static form<TModel = unknown, TResult = TModel>(): FormModalBuilder<TModel, TResult>;
1094
+ static confirmation<TResult = boolean>(): ConfirmationModalBuilder<TResult>;
1095
+ static custom<TResult = unknown>(): CustomModalBuilder<TResult>;
1109
1096
  }
1110
-
1111
- declare class MnModalRef<TResult = unknown> implements ModalRef<TResult> {
1112
- private componentRef;
1113
- private config;
1114
- private readonly closeSubject;
1115
- readonly afterClosed$: Observable<ModalCloseEvent<TResult>>;
1116
- /** Whether close() or dismiss() has run, so a shell that finishes loading afterwards is never shown. */
1117
- private closeRequested;
1118
- /**
1119
- * @param componentRef The rendered modal shell, or null while `MnModalService` is still
1120
- * loading the modal components (`mn-angular-lib/modal-ui`); it is attached with {@link attach}.
1121
- * @param config The modal's mutable working config, shared with the shell.
1122
- */
1123
- constructor(componentRef: ComponentRef<unknown> | null, config: BaseModalConfig<TResult>);
1124
- close(result?: TResult): void;
1125
- dismiss(reason: ModalCloseReason): void;
1126
- private animateAndDestroy;
1127
- update(config: Partial<BaseModalConfig<TResult>>): void;
1128
- /** The rendered shell component, or undefined while the modal components are still loading. */
1129
- get component(): unknown;
1130
- /** Whether close() or dismiss() has been called. */
1131
- get isCloseRequested(): boolean;
1132
- /**
1133
- * Attaches the rendered shell once `MnModalService` has loaded the modal components.
1134
- * @param componentRef The created shell.
1135
- */
1136
- attach(componentRef: ComponentRef<unknown>): void;
1137
- private destroy;
1097
+ export declare class MnModalRef<TResult = unknown> implements ModalRef<TResult> {
1098
+ private componentRef;
1099
+ private config;
1100
+ private readonly closeSubject;
1101
+ readonly afterClosed$: Observable<ModalCloseEvent<TResult>>;
1102
+ /** Whether close() or dismiss() has run, so a shell that finishes loading afterwards is never shown. */
1103
+ private closeRequested;
1104
+ /**
1105
+ * @param componentRef The rendered modal shell, or null while `MnModalService` is still
1106
+ * loading the modal components (`mn-angular-lib/modal-ui`); it is attached with {@link attach}.
1107
+ * @param config The modal's mutable working config, shared with the shell.
1108
+ */
1109
+ constructor(componentRef: ComponentRef<unknown> | null, config: BaseModalConfig<TResult>);
1110
+ close(result?: TResult): void;
1111
+ dismiss(reason: ModalCloseReason): void;
1112
+ private animateAndDestroy;
1113
+ update(config: Partial<BaseModalConfig<TResult>>): void;
1114
+ /** The rendered shell component, or undefined while the modal components are still loading. */
1115
+ get component(): unknown;
1116
+ /** Whether close() or dismiss() has been called. */
1117
+ get isCloseRequested(): boolean;
1118
+ /**
1119
+ * Attaches the rendered shell once `MnModalService` has loaded the modal components.
1120
+ * @param componentRef The created shell.
1121
+ */
1122
+ attach(componentRef: ComponentRef<unknown>): void;
1123
+ private destroy;
1138
1124
  }
1139
-
1140
- export { ActionStyle, BackdropMode, BaseModalBuilder, CloseMode, ConfirmationModalBuilder, ConfirmationTone, CustomModalBuilder, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_HAPTICS, MN_MODAL_ACTION_ICONS, MODAL_ACTION_ICON_SIZE, MODAL_ACTION_ICON_SIZE_SM, MnModalRef, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, defaultIconForStyle };
1141
- export type { AnimationOptions, BaseModalConfig, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ConfirmationActionConfig, ConfirmationModalConfig, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DatetimeFieldConfig, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, MnHapticStyle, MnHapticsHandler, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, PasswordFieldConfig, RatingFieldConfig, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, StepBodyConfig, StepGuard, StepValidator, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };
1125
+ export { type LucideIconData, TemplateRef, Type };