mn-angular-lib 1.0.62 → 1.0.64

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Provider, TemplateRef, OnInit, OnChanges, EventEmitter, ElementRef, Type, ComponentRef, AfterViewInit, OnDestroy, ChangeDetectorRef, QueryList, ViewContainerRef, DoCheck, SimpleChanges, PipeTransform } from '@angular/core';
2
+ import { InjectionToken, Provider, TemplateRef, OnInit, OnChanges, EventEmitter, ElementRef, OnDestroy, DoCheck, Type, ComponentRef, AfterViewInit, QueryList, ViewContainerRef, SimpleChanges, Signal, PipeTransform } from '@angular/core';
3
3
  export { TemplateRef, Type } from '@angular/core';
4
4
  import * as tailwind_variants from 'tailwind-variants';
5
5
  import { VariantProps } from 'tailwind-variants';
@@ -7,9 +7,9 @@ import * as rxjs from 'rxjs';
7
7
  import { Observable, BehaviorSubject, Subject } from 'rxjs';
8
8
  import * as mn_angular_lib from 'mn-angular-lib';
9
9
  import * as _angular_forms from '@angular/forms';
10
- import { ValidationErrors, NgControl, AbstractControl, FormGroup, FormBuilder } from '@angular/forms';
10
+ import { ValidationErrors, NgControl, AbstractControl, ValidatorFn, AsyncValidatorFn, FormGroup } from '@angular/forms';
11
11
  import { SafeHtml } from '@angular/platform-browser';
12
- import { HttpClient, HttpStatusCode, HttpHeaders, HttpErrorResponse, HttpResponse, HttpParams } from '@angular/common/http';
12
+ import { HttpStatusCode, HttpHeaders, HttpErrorResponse, HttpClient, HttpResponse, HttpParams } from '@angular/common/http';
13
13
 
14
14
  declare const mnAlertVariants: tailwind_variants.TVReturnType<{
15
15
  kind: {
@@ -57,7 +57,7 @@ declare const mnAlertVariants: tailwind_variants.TVReturnType<{
57
57
  type MnAlertVariants = VariantProps<typeof mnAlertVariants>;
58
58
 
59
59
  type MnAlertId = string;
60
- interface MnAlert {
60
+ type MnAlert = {
61
61
  id: MnAlertId;
62
62
  title: string;
63
63
  subTitle?: string;
@@ -67,32 +67,22 @@ interface MnAlert {
67
67
  meta?: Record<string, unknown>;
68
68
  kind: MnAlertKind;
69
69
  variant?: MnAlertVariants['variant'];
70
- }
70
+ };
71
71
 
72
72
  type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';
73
- interface MnAlertConfig {
73
+ type MnAlertConfig = {
74
74
  durations?: Partial<Record<MnAlertKind, number | null>>;
75
75
  cssClasses?: Partial<Record<MnAlertKind, string>>;
76
76
  icons?: Partial<Record<MnAlertKind, unknown>>;
77
77
  fallbackDuration?: number | null;
78
78
  finalize?: (a: MnAlert) => MnAlert;
79
- }
79
+ };
80
80
  declare const MN_ALERT_CONFIG: InjectionToken<MnAlertConfig>;
81
81
  declare const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig>;
82
82
 
83
83
  declare function provideMnAlerts(config?: MnAlertConfig): Provider;
84
84
 
85
- declare class MnAlertStore {
86
- private readonly _alerts$;
87
- readonly alerts$: rxjs.Observable<MnAlert[]>;
88
- show(partial: Omit<MnAlert, 'id'>): MnAlertId;
89
- dismiss(id: MnAlertId): void;
90
- clear(): void;
91
- static ɵfac: i0.ɵɵFactoryDeclaration<MnAlertStore, never>;
92
- static ɵprov: i0.ɵɵInjectableDeclaration<MnAlertStore>;
93
- }
94
-
95
- interface MnShowInput {
85
+ type MnShowInput = {
96
86
  title: string;
97
87
  subTitle?: string;
98
88
  duration?: number;
@@ -101,13 +91,13 @@ interface MnShowInput {
101
91
  meta?: Record<string, unknown>;
102
92
  kind: MnAlertKind;
103
93
  variant?: MnAlertVariants['variant'];
104
- }
94
+ };
105
95
  declare class MnAlertService {
106
96
  private readonly store;
107
97
  private readonly cfg;
108
98
  private readonly userDurations?;
109
99
  private readonly hasUserDurations;
110
- constructor(store: MnAlertStore, cfg: MnAlertConfig | null);
100
+ constructor();
111
101
  show(input: MnShowInput): MnAlertId;
112
102
  success(title: string, subTitle?: string, extra?: Partial<MnShowInput>): string;
113
103
  info(title: string, subTitle?: string, extra?: Partial<MnShowInput>): string;
@@ -116,15 +106,25 @@ declare class MnAlertService {
116
106
  dismiss(id: MnAlertId): void;
117
107
  clear(): void;
118
108
  private kind;
119
- static ɵfac: i0.ɵɵFactoryDeclaration<MnAlertService, [null, { optional: true; }]>;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnAlertService, never>;
120
110
  static ɵprov: i0.ɵɵInjectableDeclaration<MnAlertService>;
121
111
  }
122
112
 
123
- interface MnAlertTemplateContext {
113
+ declare class MnAlertStore {
114
+ private readonly _alerts$;
115
+ readonly alerts$: rxjs.Observable<MnAlert[]>;
116
+ show(partial: Omit<MnAlert, 'id'>): MnAlertId;
117
+ dismiss(id: MnAlertId): void;
118
+ clear(): void;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnAlertStore, never>;
120
+ static ɵprov: i0.ɵɵInjectableDeclaration<MnAlertStore>;
121
+ }
122
+
123
+ type MnAlertTemplateContext = {
124
124
  $implicit: MnAlert;
125
125
  alert: MnAlert;
126
126
  dismiss: () => void;
127
- }
127
+ };
128
128
  declare class MnAlertOutletComponent {
129
129
  template?: TemplateRef<MnAlertTemplateContext>;
130
130
  private store;
@@ -217,12 +217,12 @@ declare const mnBadgeVariants: tailwind_variants.TVReturnType<{
217
217
  }, undefined, "inline-flex items-center rounded-md border font-semibold", unknown, unknown, undefined>>;
218
218
  type MnBadgeVariants = VariantProps<typeof mnBadgeVariants>;
219
219
 
220
- interface MnBadgeTypes {
220
+ type MnBadgeTypes = {
221
221
  size: MnBadgeVariants['size'];
222
222
  variant: MnBadgeVariants['variant'];
223
223
  color: MnBadgeVariants['color'];
224
224
  wrap: MnBadgeVariants['wrap'];
225
- }
225
+ };
226
226
 
227
227
  declare class MnBadge {
228
228
  data: Partial<MnBadgeTypes>;
@@ -351,14 +351,14 @@ declare const mnButtonVariants: tailwind_variants.TVReturnType<{
351
351
  }, undefined, "inline-flex items-center justify-center hover:cursor-pointer transition-all duration-300 ease-in-out", unknown, unknown, undefined>>;
352
352
  type MnButtonVariants = VariantProps<typeof mnButtonVariants>;
353
353
 
354
- interface MnButtonTypes {
354
+ type MnButtonTypes = {
355
355
  size: MnButtonVariants['size'];
356
356
  variant: MnButtonVariants['variant'];
357
357
  borderRadius: MnButtonVariants['borderRadius'];
358
358
  color: MnButtonVariants['color'];
359
359
  disabled?: MnButtonVariants['disabled'];
360
360
  wrap?: MnButtonVariants['wrap'];
361
- }
361
+ };
362
362
 
363
363
  declare class MnButton {
364
364
  data: Partial<MnButtonTypes>;
@@ -451,21 +451,38 @@ declare const mnInputFieldVariants: tailwind_variants.TVReturnType<{
451
451
  }, undefined, "bg-base-100 border-1 border-base-300 placeholder-base-content/50 text-base-content text-sm outline-none focus:ring-1 focus:ring-primary", unknown, unknown, undefined>>;
452
452
  type MnInputVariants = VariantProps<typeof mnInputFieldVariants>;
453
453
 
454
+ type MnImageType = {
455
+ id: number;
456
+ url: string;
457
+ alt?: string;
458
+ };
459
+
460
+ /**
461
+ * Known shapes of Angular validator error argument objects.
462
+ * Covers built-in validators (minlength, maxlength, min, max, pattern)
463
+ * and the library's custom validators (mnMin, mnMax).
464
+ */
465
+ type MnValidationErrorArgs = {
466
+ /** Produced by Validators.minLength / Validators.maxLength */
467
+ requiredLength?: number;
468
+ actualLength?: number;
469
+ /** Produced by Validators.min / Validators.max */
470
+ min?: number | string;
471
+ max?: number | string;
472
+ actual?: number | string;
473
+ /** Produced by Validators.pattern */
474
+ requiredPattern?: string;
475
+ actualValue?: unknown;
476
+ };
477
+ type MnErrorMessageFn = (args: MnValidationErrorArgs, errors: ValidationErrors) => string;
478
+
454
479
  /**
455
480
  * Supported input types for the MnInputField component.
456
481
  * Includes standard text inputs, specialized inputs (email, tel, url),
457
482
  * and date/time inputs.
458
483
  */
459
484
  type MnInputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'date' | 'time' | 'datetime-local';
460
- /**
461
- * Error message definition: either a static string or a function that generates
462
- * a dynamic message based on validation error arguments.
463
- *
464
- * @param args - The error-specific arguments (e.g., { requiredLength: 5 } for minlength)
465
- * @param errors - All validation errors present on the control
466
- * @returns The error message string to display
467
- */
468
- type MnErrorMessageData = string | ((args: any, errors: ValidationErrors) => string);
485
+ type MnErrorMessageData = string | MnErrorMessageFn;
469
486
  /**
470
487
  * Map of error keys to error message definitions.
471
488
  * Keys correspond to Angular validator error keys (e.g., 'required', 'email', 'minlength')
@@ -476,7 +493,7 @@ type MnErrorMessagesData = Partial<Record<string, MnErrorMessageData>>;
476
493
  * Base properties for all MnInputField variants.
477
494
  * Contains common UI, styling, and error handling configuration.
478
495
  */
479
- interface MnInputBaseProps {
496
+ type MnInputBaseProps = {
480
497
  /** Unique identifier for the input element (required for accessibility) */
481
498
  id: string;
482
499
  /** Name attribute for the input element (used in form submission) */
@@ -533,12 +550,12 @@ interface MnInputBaseProps {
533
550
  * Default: false (backwards compatible - show single error)
534
551
  */
535
552
  showAllErrors?: boolean;
536
- }
553
+ };
537
554
  /**
538
555
  * Configuration for MnInputField resolved from MnConfigService.
539
556
  * Contains UI properties that can ONLY be set via configuration.
540
557
  */
541
- interface MnInputFieldUIConfig {
558
+ type MnInputFieldUIConfig = {
542
559
  /** Label text displayed above the input field */
543
560
  label?: string;
544
561
  /** Placeholder text shown inside the input when empty */
@@ -550,25 +567,25 @@ interface MnInputFieldUIConfig {
550
567
  * These override built-in error messages but are overridden by props.errorMessages.
551
568
  */
552
569
  errorMessages?: Record<string, string>;
553
- }
570
+ };
554
571
  /**
555
572
  * Properties for standard input fields (text, email, password, tel, url, number, search).
556
573
  * Excludes date/time input types which have additional properties.
557
574
  */
558
- interface MnInputFieldProps extends MnInputBaseProps {
575
+ type MnInputFieldProps = {
559
576
  type: Exclude<MnInputType, 'date' | 'time' | 'datetime-local'>;
560
- }
577
+ } & MnInputBaseProps;
561
578
  /**
562
579
  * Properties for date/time input fields.
563
580
  * Includes additional date range validation properties.
564
581
  */
565
- interface MnInputDateTimeProps extends MnInputBaseProps {
582
+ type MnInputDateTimeProps = {
566
583
  type: Extract<MnInputType, 'date' | 'time' | 'datetime-local'>;
567
584
  /** Minimum allowed date/time value (ISO 8601 format) */
568
585
  startDate?: string;
569
586
  /** Maximum allowed date/time value (ISO 8601 format) */
570
587
  endDate?: string;
571
- }
588
+ } & MnInputBaseProps;
572
589
  /**
573
590
  * Union type of all possible input field property configurations.
574
591
  * Use this type when accepting props in components or functions.
@@ -608,7 +625,7 @@ declare const MN_INPUT_FIELD_CONFIG: InjectionToken<MnInputFieldUIConfig>;
608
625
  * ```
609
626
  */
610
627
  declare class MnInputField implements OnInit {
611
- ngControl: NgControl;
628
+ ngControl: NgControl | null;
612
629
  /** Resolved UI configuration for the input field */
613
630
  protected uiConfig: MnInputFieldUIConfig;
614
631
  private readonly el;
@@ -637,9 +654,8 @@ declare class MnInputField implements OnInit {
637
654
  * Constructor - Registers this component as the ControlValueAccessor
638
655
  * for the injected NgControl (FormControl).
639
656
  *
640
- * @param ngControl - Angular's NgControl (injected via Dependency Injection)
641
657
  */
642
- constructor(ngControl: NgControl);
658
+ constructor();
643
659
  ngOnInit(): void;
644
660
  /**
645
661
  * Focuses the input element.
@@ -663,13 +679,13 @@ declare class MnInputField implements OnInit {
663
679
  *
664
680
  * @param fn - Callback function to notify Angular Forms of changes
665
681
  */
666
- registerOnChange(fn: any): void;
682
+ registerOnChange(fn: (val: unknown) => void): void;
667
683
  /**
668
684
  * Registers a callback function to be called when the input is touched/blurred.
669
685
  *
670
686
  * @param fn - Callback function to notify Angular Forms of touch events
671
687
  */
672
- registerOnTouched(fn: any): void;
688
+ registerOnTouched(fn: () => void): void;
673
689
  /**
674
690
  * Sets the disabled state of the input element.
675
691
  *
@@ -760,7 +776,7 @@ declare class MnInputField implements OnInit {
760
776
  * Returns the variant classes for styling the input element.
761
777
  */
762
778
  get inputClasses(): string;
763
- static ɵfac: i0.ɵɵFactoryDeclaration<MnInputField, [{ optional: true; self: true; }]>;
779
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnInputField, never>;
764
780
  static ɵcmp: i0.ɵɵComponentDeclaration<MnInputField, "mn-lib-input-field", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
765
781
  }
766
782
 
@@ -804,7 +820,7 @@ type MnDomAttrs = {
804
820
  *
805
821
  * @template TOut - The output type after parsing (e.g., string | null, number | null)
806
822
  */
807
- interface MnInputAdapter<TOut = string | null> {
823
+ type MnInputAdapter<TOut = string | null> = {
808
824
  /**
809
825
  * Parses the raw string value from the input element into the typed value
810
826
  * that will be sent to the FormControl.
@@ -876,7 +892,7 @@ interface MnInputAdapter<TOut = string | null> {
876
892
  * Applies a mask to the raw input value.
877
893
  */
878
894
  applyMask?(value: string, mask: string): string;
879
- }
895
+ };
880
896
  /**
881
897
  * Default adapter for text-based input types.
882
898
  * Used for: text, email, password, search, tel, url
@@ -932,18 +948,18 @@ declare const numberAdapter: MnInputAdapter<number | null>;
932
948
  * pickAdapter('date') // => dateTimeAdapter
933
949
  * pickAdapter('number') // => numberAdapter
934
950
  */
935
- declare function pickAdapter(type: MnInputType): MnInputAdapter<any>;
951
+ declare function pickAdapter(type: MnInputType): MnInputAdapter<string | null | number>;
936
952
 
937
- interface MnDualHorizontalImageTypes {
953
+ type MnDualHorizontalImageTypes = {
938
954
  id: string;
939
955
  url: string;
940
956
  alt?: string;
941
- }
957
+ };
942
958
 
943
- interface MnDualHorizontalImageConfig {
959
+ type MnDualHorizontalImageConfig = {
944
960
  images?: MnDualHorizontalImageTypes[];
945
961
  noImagesFound?: string;
946
- }
962
+ };
947
963
  declare const MN_LIB_DUAL_HORIZONTAL_IMAGE: InjectionToken<MnDualHorizontalImageConfig>;
948
964
  declare class MnDualHorizontalImage {
949
965
  protected readonly componentConfig: MnDualHorizontalImageConfig;
@@ -1023,13 +1039,7 @@ declare const mnInformationCardVariants: tailwind_variants.TVReturnType<{
1023
1039
  }, undefined, "", unknown, unknown, undefined>>;
1024
1040
  type MnInformationCardVariants = VariantProps<typeof mnInformationCardVariants>;
1025
1041
 
1026
- interface MnImageType {
1027
- id: number;
1028
- url: string;
1029
- alt?: string;
1030
- }
1031
-
1032
- interface MnInformationCardBaseData {
1042
+ type MnInformationCardBaseData = {
1033
1043
  id: number;
1034
1044
  bottomBorder?: MnInformationCardVariants['bottomBorder'];
1035
1045
  shadow?: MnInformationCardVariants['shadow'];
@@ -1037,7 +1047,7 @@ interface MnInformationCardBaseData {
1037
1047
  borderRadius: MnInformationCardVariants['borderRadius'];
1038
1048
  title: string;
1039
1049
  description: string;
1040
- }
1050
+ };
1041
1051
  type MnInformationCardData<TExtra = unknown> = MnInformationCardBaseData & TExtra;
1042
1052
 
1043
1053
  declare class MnInformationCard<TExtra = unknown> {
@@ -1137,15 +1147,7 @@ declare const mnTextareaVariants: tailwind_variants.TVReturnType<{
1137
1147
  }, undefined, "bg-base-100 border-1 border-base-300 placeholder-base-content/50 text-base-content text-sm outline-none focus:ring-1 focus:ring-primary", unknown, unknown, undefined>>;
1138
1148
  type MnTextareaVariants = VariantProps<typeof mnTextareaVariants>;
1139
1149
 
1140
- /**
1141
- * Error message definition: either a static string or a function that generates
1142
- * a dynamic message based on validation error arguments.
1143
- *
1144
- * @param args - The error-specific arguments (e.g., { requiredLength: 5 } for minlength)
1145
- * @param errors - All validation errors present on the control
1146
- * @returns The error message string to display
1147
- */
1148
- type MnTextareaErrorMessageData = string | ((args: any, errors: ValidationErrors) => string);
1150
+ type MnTextareaErrorMessageData = string | MnErrorMessageFn;
1149
1151
  /**
1150
1152
  * Map of error keys to error message definitions.
1151
1153
  * Keys correspond to Angular validator error keys (e.g., 'required', 'minlength')
@@ -1156,7 +1158,7 @@ type MnTextareaErrorMessagesData = Partial<Record<string, MnTextareaErrorMessage
1156
1158
  * Properties for the MnTextarea component.
1157
1159
  * Contains UI, styling, and error handling configuration.
1158
1160
  */
1159
- interface MnTextareaProps {
1161
+ type MnTextareaProps = {
1160
1162
  /** Unique identifier for the textarea element (required for accessibility) */
1161
1163
  id: string;
1162
1164
  /** Name attribute for the textarea element (used in form submission) */
@@ -1212,12 +1214,12 @@ interface MnTextareaProps {
1212
1214
  * Default: false
1213
1215
  */
1214
1216
  showAllErrors?: boolean;
1215
- }
1217
+ };
1216
1218
  /**
1217
1219
  * Configuration for MnTextarea resolved from MnConfigService.
1218
1220
  * Contains UI properties that can ONLY be set via configuration.
1219
1221
  */
1220
- interface MnTextareaUIConfig {
1222
+ type MnTextareaUIConfig = {
1221
1223
  /** Label text displayed above the textarea */
1222
1224
  label?: string;
1223
1225
  /** Placeholder text shown inside the textarea when empty */
@@ -1229,7 +1231,7 @@ interface MnTextareaUIConfig {
1229
1231
  * These override built-in error messages but are overridden by props.errorMessages.
1230
1232
  */
1231
1233
  errorMessages?: Record<string, string>;
1232
- }
1234
+ };
1233
1235
 
1234
1236
  declare const MN_TEXTAREA_CONFIG: InjectionToken<MnTextareaUIConfig>;
1235
1237
  /**
@@ -1264,7 +1266,7 @@ declare const MN_TEXTAREA_CONFIG: InjectionToken<MnTextareaUIConfig>;
1264
1266
  * ```
1265
1267
  */
1266
1268
  declare class MnTextarea implements OnInit {
1267
- ngControl: NgControl;
1269
+ ngControl: NgControl | null;
1268
1270
  /** Resolved UI configuration for the textarea */
1269
1271
  protected uiConfig: MnTextareaUIConfig;
1270
1272
  private readonly el;
@@ -1293,9 +1295,8 @@ declare class MnTextarea implements OnInit {
1293
1295
  * Constructor - Registers this component as the ControlValueAccessor
1294
1296
  * for the injected NgControl (FormControl).
1295
1297
  *
1296
- * @param ngControl - Angular's NgControl (injected via Dependency Injection)
1297
1298
  */
1298
- constructor(ngControl: NgControl);
1299
+ constructor();
1299
1300
  ngOnInit(): void;
1300
1301
  /**
1301
1302
  * Focuses the textarea element.
@@ -1313,13 +1314,13 @@ declare class MnTextarea implements OnInit {
1313
1314
  *
1314
1315
  * @param fn - Callback function to notify Angular Forms of changes
1315
1316
  */
1316
- registerOnChange(fn: any): void;
1317
+ registerOnChange(fn: (val: unknown) => void): void;
1317
1318
  /**
1318
1319
  * Registers a callback function to be called when the textarea is touched/blurred.
1319
1320
  *
1320
1321
  * @param fn - Callback function to notify Angular Forms of touch events
1321
1322
  */
1322
- registerOnTouched(fn: any): void;
1323
+ registerOnTouched(fn: () => void): void;
1323
1324
  /**
1324
1325
  * Sets the disabled state of the textarea element.
1325
1326
  *
@@ -1386,7 +1387,7 @@ declare class MnTextarea implements OnInit {
1386
1387
  * Returns the variant classes for styling the textarea element.
1387
1388
  */
1388
1389
  get textareaClasses(): string;
1389
- static ɵfac: i0.ɵɵFactoryDeclaration<MnTextarea, [{ optional: true; self: true; }]>;
1390
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnTextarea, never>;
1390
1391
  static ɵcmp: i0.ɵɵComponentDeclaration<MnTextarea, "mn-lib-textarea", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
1391
1392
  }
1392
1393
 
@@ -1470,9 +1471,9 @@ declare const mnCheckboxWrapperVariants: tailwind_variants.TVReturnType<{
1470
1471
  type MnCheckboxVariants = VariantProps<typeof mnCheckboxVariants>;
1471
1472
  type MnCheckboxWrapperVariants = VariantProps<typeof mnCheckboxWrapperVariants>;
1472
1473
 
1473
- type MnCheckboxErrorMessageData = string | ((args: any, errors: ValidationErrors) => string);
1474
+ type MnCheckboxErrorMessageData = string | MnErrorMessageFn;
1474
1475
  type MnCheckboxErrorMessagesData = Partial<Record<string, MnCheckboxErrorMessageData>>;
1475
- interface MnCheckboxProps {
1476
+ type MnCheckboxProps = {
1476
1477
  /** Unique identifier for the checkbox element (required for accessibility) */
1477
1478
  id: string;
1478
1479
  /** Name attribute for the checkbox element (used in form submission) */
@@ -1497,8 +1498,8 @@ interface MnCheckboxProps {
1497
1498
  useBuiltInErrorMessages?: boolean;
1498
1499
  /** Whether to display all validation errors or just the first/priority error (default: false) */
1499
1500
  showAllErrors?: boolean;
1500
- }
1501
- interface MnCheckboxUIConfig {
1501
+ };
1502
+ type MnCheckboxUIConfig = {
1502
1503
  /** Label text displayed next to the checkbox */
1503
1504
  label?: string;
1504
1505
  /** ARIA label for screen readers (falls back to label if not provided) */
@@ -1508,11 +1509,11 @@ interface MnCheckboxUIConfig {
1508
1509
  * These override built-in error messages but are overridden by props.errorMessages.
1509
1510
  */
1510
1511
  errorMessages?: Record<string, string>;
1511
- }
1512
+ };
1512
1513
 
1513
1514
  declare const MN_CHECKBOX_CONFIG: InjectionToken<MnCheckboxUIConfig>;
1514
1515
  declare class MnCheckbox implements OnInit, OnChanges {
1515
- ngControl: NgControl;
1516
+ ngControl: NgControl | null;
1516
1517
  protected uiConfig: MnCheckboxUIConfig;
1517
1518
  props: MnCheckboxProps;
1518
1519
  /** Direct checked binding for non-form usage */
@@ -1529,14 +1530,14 @@ declare class MnCheckbox implements OnInit, OnChanges {
1529
1530
  private onChange;
1530
1531
  private onTouched;
1531
1532
  private readonly builtInErrorMessages;
1532
- constructor(ngControl: NgControl);
1533
+ constructor();
1533
1534
  ngOnInit(): void;
1534
1535
  private resolveConfig;
1535
1536
  writeValue(val: unknown): void;
1536
1537
  /** Sync value from checked input when not using forms */
1537
1538
  ngOnChanges(): void;
1538
- registerOnChange(fn: any): void;
1539
- registerOnTouched(fn: any): void;
1539
+ registerOnChange(fn: (val: unknown) => void): void;
1540
+ registerOnTouched(fn: () => void): void;
1540
1541
  setDisabledState(isDisabled: boolean): void;
1541
1542
  handleChange(checked: boolean): void;
1542
1543
  handleBlur(): void;
@@ -1551,7 +1552,7 @@ declare class MnCheckbox implements OnInit, OnChanges {
1551
1552
  get resolvedName(): string | null;
1552
1553
  get checkboxClasses(): string;
1553
1554
  get wrapperClasses(): string;
1554
- static ɵfac: i0.ɵɵFactoryDeclaration<MnCheckbox, [{ optional: true; self: true; }]>;
1555
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnCheckbox, never>;
1555
1556
  static ɵcmp: i0.ɵɵComponentDeclaration<MnCheckbox, "mn-lib-checkbox", never, { "props": { "alias": "props"; "required": true; }; "checked": { "alias": "checked"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, true, never>;
1556
1557
  }
1557
1558
 
@@ -1636,7 +1637,7 @@ declare const mnDatetimeVariants: tailwind_variants.TVReturnType<{
1636
1637
  }, undefined, "bg-base-100 border-1 border-base-300 placeholder-base-content/50 cursor-pointer text-base-content text-sm", unknown, unknown, undefined>>;
1637
1638
  type MnDatetimeVariants = VariantProps<typeof mnDatetimeVariants>;
1638
1639
 
1639
- type MnDatetimeErrorMessageData = string | ((args: any, errors: ValidationErrors) => string);
1640
+ type MnDatetimeErrorMessageData = string | MnErrorMessageFn;
1640
1641
  type MnDatetimeErrorMessagesData = Partial<Record<string, MnDatetimeErrorMessageData>>;
1641
1642
  /**
1642
1643
  * Supported datetime input modes.
@@ -1645,7 +1646,7 @@ type MnDatetimeErrorMessagesData = Partial<Record<string, MnDatetimeErrorMessage
1645
1646
  * - 'datetime-local': Date and time combined (YYYY-MM-DDTHH:mm)
1646
1647
  */
1647
1648
  type MnDatetimeMode = 'date' | 'time' | 'datetime-local';
1648
- interface MnDatetimeProps {
1649
+ type MnDatetimeProps = {
1649
1650
  /** Unique identifier for the datetime element (required for accessibility) */
1650
1651
  id: string;
1651
1652
  /** Name attribute for the datetime element (used in form submission) */
@@ -1682,8 +1683,8 @@ interface MnDatetimeProps {
1682
1683
  useBuiltInErrorMessages?: boolean;
1683
1684
  /** Whether to display all validation errors or just the first/priority error (default: false) */
1684
1685
  showAllErrors?: boolean;
1685
- }
1686
- interface MnDatetimeUIConfig {
1686
+ };
1687
+ type MnDatetimeUIConfig = {
1687
1688
  /** Label text displayed above the datetime field */
1688
1689
  label?: string;
1689
1690
  /** Placeholder text shown inside the datetime field when empty */
@@ -1695,11 +1696,11 @@ interface MnDatetimeUIConfig {
1695
1696
  * These override built-in error messages but are overridden by props.errorMessages.
1696
1697
  */
1697
1698
  errorMessages?: Record<string, string>;
1698
- }
1699
+ };
1699
1700
 
1700
1701
  declare const MN_DATETIME_CONFIG: InjectionToken<MnDatetimeUIConfig>;
1701
1702
  declare class MnDatetime implements OnInit {
1702
- ngControl: NgControl;
1703
+ ngControl: NgControl | null;
1703
1704
  protected uiConfig: MnDatetimeUIConfig;
1704
1705
  props: MnDatetimeProps;
1705
1706
  private readonly configService;
@@ -1712,12 +1713,12 @@ declare class MnDatetime implements OnInit {
1712
1713
  private onChange;
1713
1714
  private onTouched;
1714
1715
  private readonly builtInErrorMessages;
1715
- constructor(ngControl: NgControl);
1716
+ constructor();
1716
1717
  ngOnInit(): void;
1717
1718
  private resolveConfig;
1718
1719
  writeValue(val: unknown): void;
1719
- registerOnChange(fn: any): void;
1720
- registerOnTouched(fn: any): void;
1720
+ registerOnChange(fn: (val: unknown) => void): void;
1721
+ registerOnTouched(fn: () => void): void;
1721
1722
  setDisabledState(isDisabled: boolean): void;
1722
1723
  handleInput(raw: string): void;
1723
1724
  handleBlur(): void;
@@ -1732,7 +1733,7 @@ declare class MnDatetime implements OnInit {
1732
1733
  get resolvedName(): string | null;
1733
1734
  get resolvedMode(): MnDatetimeMode;
1734
1735
  get inputClasses(): string;
1735
- static ɵfac: i0.ɵɵFactoryDeclaration<MnDatetime, [{ optional: true; self: true; }]>;
1736
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnDatetime, never>;
1736
1737
  static ɵcmp: i0.ɵɵComponentDeclaration<MnDatetime, "mn-lib-datetime", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
1737
1738
  }
1738
1739
 
@@ -1808,17 +1809,17 @@ declare const mnMultiSelectVariants: tailwind_variants.TVReturnType<{
1808
1809
  }, undefined, "bg-base-100 border-1 border-base-300 text-base-content text-sm cursor-pointer", unknown, unknown, undefined>>;
1809
1810
  type MnMultiSelectVariants = VariantProps<typeof mnMultiSelectVariants>;
1810
1811
 
1811
- type MnMultiSelectErrorMessageData = string | ((args: any, errors: ValidationErrors) => string);
1812
+ type MnMultiSelectErrorMessageData = string | MnErrorMessageFn;
1812
1813
  type MnMultiSelectErrorMessagesData = Partial<Record<string, MnMultiSelectErrorMessageData>>;
1813
- interface MnMultiSelectOption<TValue = unknown> {
1814
+ type MnMultiSelectOption<TValue = unknown> = {
1814
1815
  /** Display label for the option */
1815
1816
  label: string;
1816
1817
  /** Value associated with the option */
1817
1818
  value: TValue;
1818
1819
  /** Whether the option is disabled */
1819
1820
  disabled?: boolean;
1820
- }
1821
- interface MnMultiSelectProps<TValue = unknown> {
1821
+ };
1822
+ type MnMultiSelectProps<TValue = unknown> = {
1822
1823
  /** Unique identifier for the multi-select element (required for accessibility) */
1823
1824
  id: string;
1824
1825
  /** Name attribute for the multi-select element (used in form submission) */
@@ -1853,8 +1854,8 @@ interface MnMultiSelectProps<TValue = unknown> {
1853
1854
  useBuiltInErrorMessages?: boolean;
1854
1855
  /** Whether to display all validation errors or just the first/priority error (default: false) */
1855
1856
  showAllErrors?: boolean;
1856
- }
1857
- interface MnMultiSelectUIConfig {
1857
+ };
1858
+ type MnMultiSelectUIConfig = {
1858
1859
  /** Label text displayed above the multi-select */
1859
1860
  label?: string;
1860
1861
  /** Placeholder text shown when no options are selected */
@@ -1868,11 +1869,11 @@ interface MnMultiSelectUIConfig {
1868
1869
  errorMessages?: Record<string, string>;
1869
1870
  /** Text shown when no options match the search filter */
1870
1871
  noOptionsFound?: string;
1871
- }
1872
+ };
1872
1873
 
1873
1874
  declare const MN_MULTI_SELECT_CONFIG: InjectionToken<MnMultiSelectUIConfig>;
1874
1875
  declare class MnMultiSelect implements OnInit {
1875
- ngControl: NgControl;
1876
+ ngControl: NgControl | null;
1876
1877
  protected uiConfig: MnMultiSelectUIConfig;
1877
1878
  props: MnMultiSelectProps;
1878
1879
  private readonly configService;
@@ -1897,12 +1898,12 @@ declare class MnMultiSelect implements OnInit {
1897
1898
  private onChange;
1898
1899
  private onTouched;
1899
1900
  private readonly builtInErrorMessages;
1900
- constructor(ngControl: NgControl);
1901
+ constructor();
1901
1902
  ngOnInit(): void;
1902
1903
  private resolveConfig;
1903
1904
  writeValue(val: unknown): void;
1904
- registerOnChange(fn: any): void;
1905
- registerOnTouched(fn: any): void;
1905
+ registerOnChange(fn: (val: unknown) => void): void;
1906
+ registerOnTouched(fn: () => void): void;
1906
1907
  setDisabledState(isDisabled: boolean): void;
1907
1908
  toggle(): void;
1908
1909
  /** Calculates the fixed position for the dropdown based on the trigger element */
@@ -1928,7 +1929,7 @@ declare class MnMultiSelect implements OnInit {
1928
1929
  get resolvedId(): string;
1929
1930
  get resolvedName(): string | null;
1930
1931
  get triggerClasses(): string;
1931
- static ɵfac: i0.ɵɵFactoryDeclaration<MnMultiSelect, [{ optional: true; self: true; }]>;
1932
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnMultiSelect, never>;
1932
1933
  static ɵcmp: i0.ɵɵComponentDeclaration<MnMultiSelect, "mn-lib-multi-select", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
1933
1934
  }
1934
1935
 
@@ -2004,17 +2005,17 @@ declare const mnSelectVariants: tailwind_variants.TVReturnType<{
2004
2005
  }, undefined, "bg-base-100 border-1 border-base-300 text-base-content text-sm cursor-pointer hover:bg-base-200 transition-colors duration-300", unknown, unknown, undefined>>;
2005
2006
  type MnSelectVariants = VariantProps<typeof mnSelectVariants>;
2006
2007
 
2007
- type MnSelectErrorMessageData = string | ((args: any, errors: ValidationErrors) => string);
2008
+ type MnSelectErrorMessageData = string | MnErrorMessageFn;
2008
2009
  type MnSelectErrorMessagesData = Partial<Record<string, MnSelectErrorMessageData>>;
2009
- interface MnSelectOption<TValue = unknown> {
2010
+ type MnSelectOption<TValue = unknown> = {
2010
2011
  /** Display label for the option */
2011
2012
  label: string;
2012
2013
  /** Value associated with the option */
2013
2014
  value: TValue;
2014
2015
  /** Whether the option is disabled */
2015
2016
  disabled?: boolean;
2016
- }
2017
- interface MnSelectProps<TValue = unknown> {
2017
+ };
2018
+ type MnSelectProps<TValue = unknown> = {
2018
2019
  /** Unique identifier for the select element (required for accessibility) */
2019
2020
  id: string;
2020
2021
  /** Name attribute for the select element (used in form submission) */
@@ -2043,8 +2044,8 @@ interface MnSelectProps<TValue = unknown> {
2043
2044
  useBuiltInErrorMessages?: boolean;
2044
2045
  /** Whether to display all validation errors or just the first/priority error (default: false) */
2045
2046
  showAllErrors?: boolean;
2046
- }
2047
- interface MnSelectUIConfig {
2047
+ };
2048
+ type MnSelectUIConfig = {
2048
2049
  /** Label text displayed above the select */
2049
2050
  label?: string;
2050
2051
  /** Placeholder text shown when no option is selected */
@@ -2056,11 +2057,11 @@ interface MnSelectUIConfig {
2056
2057
  * These override built-in error messages but are overridden by props.errorMessages.
2057
2058
  */
2058
2059
  errorMessages?: Record<string, string>;
2059
- }
2060
+ };
2060
2061
 
2061
2062
  declare const MN_SELECT_CONFIG: InjectionToken<MnSelectUIConfig>;
2062
2063
  declare class MnSelect implements OnInit {
2063
- ngControl: NgControl;
2064
+ ngControl: NgControl | null;
2064
2065
  props: MnSelectProps;
2065
2066
  /** Currently selected value */
2066
2067
  selectedValue: unknown;
@@ -2072,7 +2073,7 @@ declare class MnSelect implements OnInit {
2072
2073
  private readonly lang;
2073
2074
  private readonly destroyRef;
2074
2075
  private readonly builtInErrorMessages;
2075
- constructor(ngControl: NgControl);
2076
+ constructor();
2076
2077
  get selectedOption(): MnSelectOption | undefined;
2077
2078
  get control(): _angular_forms.AbstractControl<any, any, any> | null;
2078
2079
  get showError(): boolean;
@@ -2083,8 +2084,8 @@ declare class MnSelect implements OnInit {
2083
2084
  get selectClasses(): string;
2084
2085
  ngOnInit(): void;
2085
2086
  writeValue(val: unknown): void;
2086
- registerOnChange(fn: any): void;
2087
- registerOnTouched(fn: any): void;
2087
+ registerOnChange(fn: (val: unknown) => void): void;
2088
+ registerOnTouched(fn: () => void): void;
2088
2089
  setDisabledState(isDisabled: boolean): void;
2089
2090
  /** Returns the index of an option, used as the <option> value attribute */
2090
2091
  optionIndex(option: MnSelectOption): string;
@@ -2098,57 +2099,57 @@ declare class MnSelect implements OnInit {
2098
2099
  private resolveConfig;
2099
2100
  private pickErrorKey;
2100
2101
  private resolveErrorMessageForKey;
2101
- static ɵfac: i0.ɵɵFactoryDeclaration<MnSelect, [{ optional: true; self: true; }]>;
2102
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnSelect, never>;
2102
2103
  static ɵcmp: i0.ɵɵComponentDeclaration<MnSelect, "mn-lib-select", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
2103
2104
  }
2104
2105
 
2105
- interface PaginationStrategy {
2106
+ type PaginationStrategy = {
2106
2107
  hasMoreRows: boolean;
2107
2108
  loadMore: () => Promise<void>;
2108
2109
  reset?: () => void;
2109
- }
2110
- interface CursorPaginationStrategy extends PaginationStrategy {
2110
+ };
2111
+ type CursorPaginationStrategy = {
2111
2112
  endCursor?: string;
2112
- }
2113
- interface OffsetPaginationStrategy extends PaginationStrategy {
2113
+ } & PaginationStrategy;
2114
+ type OffsetPaginationStrategy = {
2114
2115
  currentPage: number;
2115
2116
  pageSize: number;
2116
2117
  totalItems?: number;
2117
- }
2118
+ } & PaginationStrategy;
2118
2119
  declare enum ColumnSortType {
2119
2120
  ALPHABETICAL = "ALPHABETICAL",
2120
2121
  NUMERICAL = "NUMERICAL",
2121
2122
  DATE = "DATE",
2122
2123
  NONE = "NONE"
2123
2124
  }
2124
- interface SortState {
2125
+ type SortState = {
2125
2126
  columnKey: string;
2126
2127
  direction: 'asc' | 'desc';
2127
- }
2128
- interface TableAppearance {
2128
+ };
2129
+ type TableAppearance = {
2129
2130
  striped?: boolean;
2130
2131
  hover?: boolean;
2131
2132
  compact?: boolean;
2132
2133
  bordered?: boolean;
2133
- }
2134
+ };
2134
2135
  type ColumnFilterType = 'text' | 'select';
2135
- interface ColumnFilterOption {
2136
+ type ColumnFilterOption = {
2136
2137
  label: string;
2137
2138
  value: string;
2138
- }
2139
- interface ColumnDefinition<T> {
2139
+ };
2140
+ type ColumnDefinition<T> = {
2140
2141
  key: string;
2141
- header: string | TemplateRef<any>;
2142
+ header: string | TemplateRef<unknown>;
2142
2143
  /** Translation key for the column header. When set, mn-table resolves it via MnLanguageService and keeps it updated on locale change. */
2143
2144
  headerKey?: string;
2144
- cell: ((row: T) => string) | TemplateRef<any>;
2145
+ cell: ((row: T) => string) | TemplateRef<unknown>;
2145
2146
  /** Alternative cell renderer shown below the given breakpoint. When set, `cell` is hidden below this breakpoint and `cellSm` is shown instead. */
2146
2147
  cellSm?: {
2147
2148
  below: 'sm' | 'md' | 'lg';
2148
- cell: ((row: T) => string) | TemplateRef<any>;
2149
+ cell: ((row: T) => string) | TemplateRef<unknown>;
2149
2150
  };
2150
2151
  sortType?: ColumnSortType;
2151
- getRawValueToSort?: (row: T) => any;
2152
+ getRawValueToSort?: (row: T) => unknown;
2152
2153
  width?: string;
2153
2154
  align?: 'left' | 'center' | 'right';
2154
2155
  hiddenBelow?: 'sm' | 'md' | 'lg';
@@ -2170,15 +2171,15 @@ interface ColumnDefinition<T> {
2170
2171
  filterMaxLength?: number;
2171
2172
  /** Custom filter function. Receives the row and the current filter value. */
2172
2173
  filterFn?: (row: T, filterValue: string) => boolean;
2173
- }
2174
- interface TableDataSource<T> {
2174
+ };
2175
+ type TableDataSource<T> = {
2175
2176
  dataRows: BehaviorSubject<T[]>;
2176
2177
  columns: ColumnDefinition<T>[];
2177
2178
  getID: (row: T) => string;
2178
2179
  emptyMessage: string;
2179
2180
  /** Translation key for the empty message. When set, mn-table resolves it via MnLanguageService. */
2180
2181
  emptyMessageKey?: string;
2181
- emptyTemplate?: TemplateRef<any>;
2182
+ emptyTemplate?: TemplateRef<unknown>;
2182
2183
  isDataLoading: boolean;
2183
2184
  canSearch: boolean;
2184
2185
  searchPlaceholder?: string;
@@ -2225,18 +2226,166 @@ interface TableDataSource<T> {
2225
2226
  onRowClick?: (row: T) => void;
2226
2227
  appearance?: TableAppearance;
2227
2228
  /** Template rendered on the left side of the toolbar (before the search field). */
2228
- toolbarLeftTemplate?: TemplateRef<any>;
2229
+ toolbarLeftTemplate?: TemplateRef<unknown>;
2229
2230
  /** Template rendered on the right side of the toolbar (after the search field). */
2230
- toolbarRightTemplate?: TemplateRef<any>;
2231
+ toolbarRightTemplate?: TemplateRef<unknown>;
2231
2232
  labels?: TableLabels;
2232
- }
2233
- interface TableLabels {
2233
+ };
2234
+ type TableLabels = {
2234
2235
  loadMore?: string;
2235
2236
  /** Translation key for the "Load more" button label. */
2236
2237
  loadMoreKey?: string;
2237
2238
  rowsPerPage?: string;
2238
2239
  /** Translation key for the "Rows per page" label. */
2239
2240
  rowsPerPageKey?: string;
2241
+ };
2242
+
2243
+ /** Map of column key to its current filter value. */
2244
+ type ColumnFilterState = Record<string, string | undefined>;
2245
+ declare class MnTable<T = object> implements OnInit, OnDestroy, DoCheck {
2246
+ dataSource: TableDataSource<T>;
2247
+ sortChange: EventEmitter<SortState | null>;
2248
+ selectionChange: EventEmitter<T[]>;
2249
+ rowClick: EventEmitter<T>;
2250
+ filteredItems: T[];
2251
+ paginatedItems: T[];
2252
+ searchValue: string;
2253
+ loadingMoreRows: boolean;
2254
+ currentSort: SortState | null;
2255
+ selectedIds: Set<string>;
2256
+ currentPage: number;
2257
+ pageSize: number;
2258
+ /** Per-column filter values keyed by column key. */
2259
+ columnFilters: ColumnFilterState;
2260
+ private cdr;
2261
+ private lang;
2262
+ private dataSubscription?;
2263
+ private searchSubject;
2264
+ private searchSubscription?;
2265
+ private langSubscription?;
2266
+ /** Tracks the previous toolbar left template reference for change detection. */
2267
+ private previousToolbarLeftTemplate?;
2268
+ /**
2269
+ * Checks for changes to dataSource properties that are not covered
2270
+ * by Angular's default change detection (e.g. toolbarLeftTemplate).
2271
+ */
2272
+ ngDoCheck(): void;
2273
+ get showLoadMore(): boolean;
2274
+ ngOnDestroy(): void;
2275
+ get isPaginated(): boolean;
2276
+ /** Whether any column has filtering enabled. */
2277
+ get hasColumnFilters(): boolean;
2278
+ /** Updates a column filter value and re-applies filtering. */
2279
+ onColumnFilter(columnKey: string, value: string): void;
2280
+ sort(column: ColumnDefinition<T>): void;
2281
+ getSortIcon(column: ColumnDefinition<T>): string;
2282
+ isSortable(column: ColumnDefinition<T>): boolean;
2283
+ isSelected(row: T): boolean;
2284
+ toggleRow(row: T): void;
2285
+ toggleAll(): void;
2286
+ get allSelected(): boolean;
2287
+ get hasSelection(): boolean;
2288
+ get isMultiSelect(): boolean;
2289
+ onRowClick(row: T): void;
2290
+ /** Whether the table delegates pagination to the consumer (server-side). */
2291
+ get isServerPaginated(): boolean;
2292
+ /** Whether the table delegates search to the consumer (server-side). */
2293
+ get isServerSearched(): boolean;
2294
+ /** Total number of items, accounting for server-side pagination. */
2295
+ get totalItemCount(): number;
2296
+ get totalPages(): number;
2297
+ ngOnInit(): void;
2298
+ /**
2299
+ * Resolves all translation keys (headerKey, filterPlaceholderKey, emptyMessageKey, etc.)
2300
+ * into their corresponding display strings using MnLanguageService.
2301
+ */
2302
+ private resolveTranslationKeys;
2303
+ onSearch(searchString: string): void;
2304
+ loadMoreRows(): void;
2305
+ get resolvedPageSizeOptions(): number[];
2306
+ /** Page-size options formatted for mn-select. */
2307
+ get pageSizeSelectOptions(): MnSelectOption<number>[];
2308
+ /** Filter options formatted for mn-select for a given column. */
2309
+ getFilterSelectOptions(column: ColumnDefinition<T>): MnSelectOption<string>[];
2310
+ goToPage(page: number): void;
2311
+ onPageSizeChange(newSize: number): void;
2312
+ get visiblePages(): number[];
2313
+ private applyPagination;
2314
+ isTemplateRef(value: unknown): value is TemplateRef<unknown>;
2315
+ getCellValue(column: ColumnDefinition<T>, row: T): string;
2316
+ /** Returns the small-screen cell value for a column with cellSm defined. */
2317
+ getCellSmValue(column: ColumnDefinition<T>, row: T): string;
2318
+ trackByID: (_index: number, row: T) => string;
2319
+ trackByKey: (_index: number, column: ColumnDefinition<T>) => string;
2320
+ readonly tableClasses = "w-full border-collapse overflow-y-hidden";
2321
+ get totalColumnCount(): number;
2322
+ get skeletonRows(): number[];
2323
+ private applyFilterAndSort;
2324
+ private applySorting;
2325
+ private processLoadedRows;
2326
+ private validateDataSource;
2327
+ private emitSelection;
2328
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnTable<any>, never>;
2329
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnTable<any>, "mn-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; }, { "sortChange": "sortChange"; "selectionChange": "selectionChange"; "rowClick": "rowClick"; }, never, never, true, never>;
2330
+ }
2331
+
2332
+ /**
2333
+ * Attribute directive that applies responsive-hiding classes to table cells/headers.
2334
+ * Hides the element by default and shows it as `table-cell` at the specified breakpoint.
2335
+ *
2336
+ * Uses a static class map so Tailwind CSS can detect the full class names at build time.
2337
+ *
2338
+ * Usage: `<td [mnHiddenBelow]="column.hiddenBelow">`
2339
+ */
2340
+ declare class MnHiddenBelowDirective implements OnChanges {
2341
+ /** The breakpoint below which the element is hidden. */
2342
+ mnHiddenBelow: 'sm' | 'md' | 'lg' | undefined;
2343
+ private readonly el;
2344
+ private readonly renderer;
2345
+ private appliedClasses;
2346
+ /** Static mapping of breakpoints to their full Tailwind class names. */
2347
+ private readonly classMap;
2348
+ ngOnChanges(): void;
2349
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnHiddenBelowDirective, never>;
2350
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnHiddenBelowDirective, "[mnHiddenBelow]", never, { "mnHiddenBelow": { "alias": "mnHiddenBelow"; "required": false; }; }, {}, never, never, true, never>;
2351
+ }
2352
+
2353
+ /**
2354
+ * Attribute directive that hides an element below the given breakpoint and shows it at/above.
2355
+ * Uses `hidden` + `{bp}:inline` so the element is invisible on small screens.
2356
+ *
2357
+ * Usage: `<span [mnShowAbove]="'sm'">`
2358
+ */
2359
+ declare class MnShowAboveDirective implements OnChanges {
2360
+ /** The breakpoint at/above which the element becomes visible. */
2361
+ mnShowAbove: 'sm' | 'md' | 'lg' | undefined;
2362
+ private readonly el;
2363
+ private readonly renderer;
2364
+ private appliedClasses;
2365
+ /** Static mapping of breakpoints to their full Tailwind class names. */
2366
+ private readonly classMap;
2367
+ ngOnChanges(): void;
2368
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnShowAboveDirective, never>;
2369
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnShowAboveDirective, "[mnShowAbove]", never, { "mnShowAbove": { "alias": "mnShowAbove"; "required": false; }; }, {}, never, never, true, never>;
2370
+ }
2371
+
2372
+ /**
2373
+ * Attribute directive that shows an element below the given breakpoint and hides it at/above.
2374
+ * Uses `inline` by default + `{bp}:hidden` so the element is only visible on small screens.
2375
+ *
2376
+ * Usage: `<span [mnShowBelow]="'sm'">`
2377
+ */
2378
+ declare class MnShowBelowDirective implements OnChanges {
2379
+ /** The breakpoint below which the element is visible. */
2380
+ mnShowBelow: 'sm' | 'md' | 'lg' | undefined;
2381
+ private readonly el;
2382
+ private readonly renderer;
2383
+ private appliedClasses;
2384
+ /** Static mapping of breakpoints to their full Tailwind class names. */
2385
+ private readonly classMap;
2386
+ ngOnChanges(): void;
2387
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnShowBelowDirective, never>;
2388
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnShowBelowDirective, "[mnShowBelow]", never, { "mnShowBelow": { "alias": "mnShowBelow"; "required": false; }; }, {}, never, never, true, never>;
2240
2389
  }
2241
2390
 
2242
2391
  declare enum ModalKind {
@@ -2367,65 +2516,65 @@ type ModalInputMap = Record<string, unknown>;
2367
2516
  * A condition function that receives the current form values and returns
2368
2517
  * whether the field should be visible.
2369
2518
  */
2370
- type FieldVisibilityCondition<TModel = any> = (formValue: Partial<TModel>) => boolean;
2519
+ type FieldVisibilityCondition<TModel = unknown> = (formValue: Partial<TModel>) => boolean;
2371
2520
  /**
2372
2521
  * A condition function that receives the current form values and returns
2373
2522
  * whether the field should be required.
2374
2523
  */
2375
- type FieldRequiredCondition<TModel = any> = (formValue: Partial<TModel>) => boolean;
2524
+ type FieldRequiredCondition<TModel = unknown> = (formValue: Partial<TModel>) => boolean;
2376
2525
  /**
2377
2526
  * A form-level validator that receives the entire form value
2378
2527
  * and returns an error map or null.
2379
2528
  */
2380
- type FormValidator<TModel = any> = (formValue: Partial<TModel>) => Record<string, string> | null;
2529
+ type FormValidator<TModel = unknown> = (formValue: Partial<TModel>) => Record<string, string> | null;
2381
2530
  /**
2382
2531
  * A data source that asynchronously loads options for select/multi-select fields.
2383
2532
  * Can optionally depend on other field values to reload.
2384
2533
  */
2385
- interface FieldDataSource<TValue = unknown, TModel = any> {
2534
+ type FieldDataSource<TValue = unknown, TModel = unknown> = {
2386
2535
  /** Load options, optionally based on current form values */
2387
2536
  load(formValue?: Partial<TModel>): Promise<SelectOption<TValue>[]> | SelectOption<TValue>[];
2388
2537
  /** Keys of other fields that trigger a reload when their value changes */
2389
- dependsOn?: (keyof TModel)[];
2390
- }
2391
- interface ValidationResult {
2538
+ dependsOn?: KeyOf<TModel>[];
2539
+ };
2540
+ type ValidationResult = {
2392
2541
  status: ValidationStatus;
2393
2542
  code?: ValidationCode;
2394
2543
  message?: string;
2395
- }
2396
- interface StepValidator {
2544
+ };
2545
+ type StepValidator = {
2397
2546
  validate(): Promise<ValidationResult> | ValidationResult;
2398
- }
2399
- interface FieldValidator {
2547
+ };
2548
+ type FieldValidator = {
2400
2549
  validate(value: unknown): Promise<ValidationResult> | ValidationResult;
2401
- }
2402
- interface StepGuard {
2550
+ };
2551
+ type StepGuard = {
2403
2552
  canEnter(): Promise<boolean> | boolean;
2404
2553
  canExit(): Promise<boolean> | boolean;
2405
- }
2406
- interface ModalCloseEvent<TResult = unknown> {
2554
+ };
2555
+ type ModalCloseEvent<TResult = unknown> = {
2407
2556
  reason: ModalCloseReason;
2408
2557
  result?: TResult;
2409
- }
2410
- interface ModalRef<TResult = unknown> {
2558
+ };
2559
+ type ModalRef<TResult = unknown> = {
2411
2560
  afterClosed$: Observable<ModalCloseEvent<TResult>>;
2412
2561
  close(result?: TResult): void;
2413
2562
  dismiss(reason: ModalCloseReason): void;
2414
2563
  update(config: Partial<BaseModalConfig<TResult>>): void;
2415
- }
2416
- interface ModalResultHandler<TResult = unknown> {
2564
+ };
2565
+ type ModalResultHandler<TResult = unknown> = {
2417
2566
  handle(result: TResult): Promise<void> | void;
2418
- }
2419
- interface WizardStepChangeEvent {
2567
+ };
2568
+ type WizardStepChangeEvent = {
2420
2569
  previousStepId?: ModalStepId;
2421
2570
  currentStepId: ModalStepId;
2422
2571
  direction: NavigationDirection;
2423
- }
2424
- interface WizardStepChangeHandler {
2572
+ };
2573
+ type WizardStepChangeHandler = {
2425
2574
  handle(event: WizardStepChangeEvent): Promise<void> | void;
2426
- }
2575
+ };
2427
2576
  type StepBodyConfig = Type<unknown> | TemplateRef<unknown> | string;
2428
- interface WizardStepConfig<TModel = any> {
2577
+ type WizardStepConfig<TModel = unknown> = {
2429
2578
  id: ModalStepId;
2430
2579
  title: string;
2431
2580
  state?: StepState;
@@ -2434,7 +2583,7 @@ interface WizardStepConfig<TModel = any> {
2434
2583
  rows?: FormRow<TModel>[];
2435
2584
  fieldGroups?: FormFieldGroup<TModel>[];
2436
2585
  formValidators?: FormValidator<TModel>[];
2437
- groupValidators?: any[];
2586
+ groupValidators?: ValidatorFn[];
2438
2587
  initialValue?: Partial<TModel>;
2439
2588
  guard?: StepGuard;
2440
2589
  validators?: StepValidator[];
@@ -2445,25 +2594,26 @@ interface WizardStepConfig<TModel = any> {
2445
2594
  /** Whether to hide the 'Back' button on this step */
2446
2595
  hideBack?: boolean;
2447
2596
  /** Condition to show/hide this entire step based on aggregated wizard data */
2448
- visible?: (aggregatedData: Record<ModalStepId, Record<string, any>>) => boolean;
2449
- }
2450
- interface WizardResult {
2597
+ visible?: (aggregatedData: Record<ModalStepId, Record<string, unknown>>) => boolean;
2598
+ };
2599
+ type WizardResult = {
2451
2600
  status: ModalCloseReason;
2452
2601
  visitedStepIds: ModalStepId[];
2453
- payload?: Record<ModalStepId, Record<string, any>>;
2454
- }
2455
- interface SelectOption<TValue = unknown> {
2602
+ payload?: Record<ModalStepId, Record<string, unknown>>;
2603
+ };
2604
+ type KeyOf<T> = unknown extends T ? string : keyof T & string;
2605
+ type SelectOption<TValue = unknown> = {
2456
2606
  label: string;
2457
2607
  value: TValue;
2458
2608
  state?: OptionState;
2459
- }
2460
- interface TextFieldConfig<TModel = unknown> {
2609
+ };
2610
+ type TextFieldConfig<TModel = unknown> = {
2461
2611
  kind: FieldKind.TEXT;
2462
- key: keyof TModel;
2612
+ key: KeyOf<TModel>;
2463
2613
  label: string;
2464
2614
  appearance?: FieldAppearance;
2465
- validators?: any[];
2466
- asyncValidators?: any[];
2615
+ validators?: ValidatorFn[];
2616
+ asyncValidators?: AsyncValidatorFn[];
2467
2617
  placeholder?: string;
2468
2618
  /** Whether this field is read-only (display only) */
2469
2619
  readOnly?: boolean;
@@ -2481,13 +2631,13 @@ interface TextFieldConfig<TModel = unknown> {
2481
2631
  autoFocus?: boolean;
2482
2632
  /** When to update the form control value and run validation */
2483
2633
  updateOn?: 'change' | 'blur' | 'submit';
2484
- }
2485
- interface NumberFieldConfig<TModel = unknown> {
2634
+ };
2635
+ type NumberFieldConfig<TModel = unknown> = {
2486
2636
  kind: FieldKind.NUMBER;
2487
- key: keyof TModel;
2637
+ key: KeyOf<TModel>;
2488
2638
  label: string;
2489
- validators?: any[];
2490
- asyncValidators?: any[];
2639
+ validators?: ValidatorFn[];
2640
+ asyncValidators?: AsyncValidatorFn[];
2491
2641
  placeholder?: string;
2492
2642
  min?: number;
2493
2643
  max?: number;
@@ -2499,15 +2649,15 @@ interface NumberFieldConfig<TModel = unknown> {
2499
2649
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2500
2650
  autoFocus?: boolean;
2501
2651
  updateOn?: 'change' | 'blur' | 'submit';
2502
- }
2503
- interface SelectFieldConfig<TModel = unknown, TValue = unknown> {
2652
+ };
2653
+ type SelectFieldConfig<TModel = unknown, TValue = unknown> = {
2504
2654
  kind: FieldKind.SELECT;
2505
- key: keyof TModel;
2655
+ key: KeyOf<TModel>;
2506
2656
  label: string;
2507
2657
  options: SelectOption<TValue>[];
2508
2658
  selectionMode?: SelectionMode;
2509
- validators?: any[];
2510
- asyncValidators?: any[];
2659
+ validators?: ValidatorFn[];
2660
+ asyncValidators?: AsyncValidatorFn[];
2511
2661
  readOnly?: boolean;
2512
2662
  disabled?: boolean;
2513
2663
  visible?: FieldVisibilityCondition<TModel>;
@@ -2517,14 +2667,14 @@ interface SelectFieldConfig<TModel = unknown, TValue = unknown> {
2517
2667
  updateOn?: 'change' | 'blur' | 'submit';
2518
2668
  /** Async data source for loading options dynamically */
2519
2669
  dataSource?: FieldDataSource<TValue, TModel>;
2520
- }
2521
- interface CheckboxFieldConfig<TModel = unknown> {
2670
+ };
2671
+ type CheckboxFieldConfig<TModel = unknown> = {
2522
2672
  kind: FieldKind.CHECKBOX;
2523
- key: keyof TModel;
2673
+ key: KeyOf<TModel>;
2524
2674
  label: string;
2525
2675
  defaultValue?: boolean;
2526
- validators?: any[];
2527
- asyncValidators?: any[];
2676
+ validators?: ValidatorFn[];
2677
+ asyncValidators?: AsyncValidatorFn[];
2528
2678
  readOnly?: boolean;
2529
2679
  disabled?: boolean;
2530
2680
  visible?: FieldVisibilityCondition<TModel>;
@@ -2532,14 +2682,14 @@ interface CheckboxFieldConfig<TModel = unknown> {
2532
2682
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2533
2683
  autoFocus?: boolean;
2534
2684
  updateOn?: 'change' | 'blur' | 'submit';
2535
- }
2536
- interface DateFieldConfig<TModel = unknown> {
2685
+ };
2686
+ type DateFieldConfig<TModel = unknown> = {
2537
2687
  kind: FieldKind.DATE;
2538
- key: keyof TModel;
2688
+ key: KeyOf<TModel>;
2539
2689
  label: string;
2540
2690
  placeholder?: string;
2541
- validators?: any[];
2542
- asyncValidators?: any[];
2691
+ validators?: ValidatorFn[];
2692
+ asyncValidators?: AsyncValidatorFn[];
2543
2693
  minDate?: string;
2544
2694
  maxDate?: string;
2545
2695
  readOnly?: boolean;
@@ -2549,14 +2699,14 @@ interface DateFieldConfig<TModel = unknown> {
2549
2699
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2550
2700
  autoFocus?: boolean;
2551
2701
  updateOn?: 'change' | 'blur' | 'submit';
2552
- }
2553
- interface TextareaFieldConfig<TModel = unknown> {
2702
+ };
2703
+ type TextareaFieldConfig<TModel = unknown> = {
2554
2704
  kind: FieldKind.TEXTAREA;
2555
- key: keyof TModel;
2705
+ key: KeyOf<TModel>;
2556
2706
  label: string;
2557
2707
  placeholder?: string;
2558
- validators?: any[];
2559
- asyncValidators?: any[];
2708
+ validators?: ValidatorFn[];
2709
+ asyncValidators?: AsyncValidatorFn[];
2560
2710
  rows?: number;
2561
2711
  readOnly?: boolean;
2562
2712
  disabled?: boolean;
@@ -2565,14 +2715,14 @@ interface TextareaFieldConfig<TModel = unknown> {
2565
2715
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2566
2716
  autoFocus?: boolean;
2567
2717
  updateOn?: 'change' | 'blur' | 'submit';
2568
- }
2569
- interface DatetimeFieldConfig<TModel = unknown> {
2718
+ };
2719
+ type DatetimeFieldConfig<TModel = unknown> = {
2570
2720
  kind: FieldKind.DATETIME;
2571
- key: keyof TModel;
2721
+ key: KeyOf<TModel>;
2572
2722
  label: string;
2573
2723
  placeholder?: string;
2574
- validators?: any[];
2575
- asyncValidators?: any[];
2724
+ validators?: ValidatorFn[];
2725
+ asyncValidators?: AsyncValidatorFn[];
2576
2726
  mode?: 'date' | 'time' | 'datetime-local';
2577
2727
  min?: string;
2578
2728
  max?: string;
@@ -2584,14 +2734,14 @@ interface DatetimeFieldConfig<TModel = unknown> {
2584
2734
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2585
2735
  autoFocus?: boolean;
2586
2736
  updateOn?: 'change' | 'blur' | 'submit';
2587
- }
2588
- interface MultiSelectFieldConfig<TModel = unknown, TValue = unknown> {
2737
+ };
2738
+ type MultiSelectFieldConfig<TModel = unknown, TValue = unknown> = {
2589
2739
  kind: FieldKind.MULTI_SELECT;
2590
- key: keyof TModel;
2740
+ key: KeyOf<TModel>;
2591
2741
  label: string;
2592
2742
  options: SelectOption<TValue>[];
2593
- validators?: any[];
2594
- asyncValidators?: any[];
2743
+ validators?: ValidatorFn[];
2744
+ asyncValidators?: AsyncValidatorFn[];
2595
2745
  searchable?: boolean;
2596
2746
  searchPlaceholder?: string;
2597
2747
  maxSelections?: number;
@@ -2604,14 +2754,14 @@ interface MultiSelectFieldConfig<TModel = unknown, TValue = unknown> {
2604
2754
  updateOn?: 'change' | 'blur' | 'submit';
2605
2755
  /** Async data source for loading options dynamically */
2606
2756
  dataSource?: FieldDataSource<TValue, TModel>;
2607
- }
2608
- interface PasswordFieldConfig<TModel = unknown> {
2757
+ };
2758
+ type PasswordFieldConfig<TModel = unknown> = {
2609
2759
  kind: FieldKind.PASSWORD;
2610
- key: keyof TModel;
2760
+ key: KeyOf<TModel>;
2611
2761
  label: string;
2612
2762
  placeholder?: string;
2613
- validators?: any[];
2614
- asyncValidators?: any[];
2763
+ validators?: ValidatorFn[];
2764
+ asyncValidators?: AsyncValidatorFn[];
2615
2765
  readOnly?: boolean;
2616
2766
  disabled?: boolean;
2617
2767
  visible?: FieldVisibilityCondition<TModel>;
@@ -2619,17 +2769,17 @@ interface PasswordFieldConfig<TModel = unknown> {
2619
2769
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2620
2770
  autoFocus?: boolean;
2621
2771
  updateOn?: 'change' | 'blur' | 'submit';
2622
- }
2623
- interface MultiSelectTableFieldConfig<TModel = unknown, TRow = any> {
2772
+ };
2773
+ type MultiSelectTableFieldConfig<TModel = unknown, TRow = unknown> = {
2624
2774
  kind: FieldKind.MULTI_SELECT_TABLE;
2625
- key: keyof TModel;
2775
+ key: KeyOf<TModel>;
2626
2776
  label: string;
2627
2777
  /** The TableDataSource that powers the mn-table. selectionMode will be forced to 'multi'. */
2628
2778
  tableDataSource: TableDataSource<TRow>;
2629
2779
  /** Function to extract the value stored in the form from a selected row (default: getID) */
2630
2780
  getRowValue?: (row: TRow) => unknown;
2631
- validators?: any[];
2632
- asyncValidators?: any[];
2781
+ validators?: ValidatorFn[];
2782
+ asyncValidators?: AsyncValidatorFn[];
2633
2783
  readOnly?: boolean;
2634
2784
  disabled?: boolean;
2635
2785
  visible?: FieldVisibilityCondition<TModel>;
@@ -2637,17 +2787,17 @@ interface MultiSelectTableFieldConfig<TModel = unknown, TRow = any> {
2637
2787
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2638
2788
  autoFocus?: boolean;
2639
2789
  updateOn?: 'change' | 'blur' | 'submit';
2640
- }
2641
- interface SingleSelectTableFieldConfig<TModel = unknown, TRow = any> {
2790
+ };
2791
+ type SingleSelectTableFieldConfig<TModel = unknown, TRow = unknown> = {
2642
2792
  kind: FieldKind.SINGLE_SELECT_TABLE;
2643
- key: keyof TModel;
2793
+ key: KeyOf<TModel>;
2644
2794
  label: string;
2645
2795
  /** The TableDataSource that powers the mn-table. selectionMode will be forced to 'single'. */
2646
2796
  tableDataSource: TableDataSource<TRow>;
2647
2797
  /** Function to extract the value stored in the form from a selected row (default: getID) */
2648
2798
  getRowValue?: (row: TRow) => unknown;
2649
- validators?: any[];
2650
- asyncValidators?: any[];
2799
+ validators?: ValidatorFn[];
2800
+ asyncValidators?: AsyncValidatorFn[];
2651
2801
  readOnly?: boolean;
2652
2802
  disabled?: boolean;
2653
2803
  visible?: FieldVisibilityCondition<TModel>;
@@ -2655,17 +2805,17 @@ interface SingleSelectTableFieldConfig<TModel = unknown, TRow = any> {
2655
2805
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2656
2806
  autoFocus?: boolean;
2657
2807
  updateOn?: 'change' | 'blur' | 'submit';
2658
- }
2659
- interface ColorFieldConfig<TModel = unknown> {
2808
+ };
2809
+ type ColorFieldConfig<TModel = unknown> = {
2660
2810
  kind: FieldKind.COLOR;
2661
- key: keyof TModel;
2811
+ key: KeyOf<TModel>;
2662
2812
  label: string;
2663
2813
  /** Default color value (hex string, e.g., '#ff0000') */
2664
2814
  defaultValue?: string;
2665
2815
  /** Predefined color swatches to show */
2666
2816
  swatches?: string[];
2667
- validators?: any[];
2668
- asyncValidators?: any[];
2817
+ validators?: ValidatorFn[];
2818
+ asyncValidators?: AsyncValidatorFn[];
2669
2819
  readOnly?: boolean;
2670
2820
  disabled?: boolean;
2671
2821
  visible?: FieldVisibilityCondition<TModel>;
@@ -2673,10 +2823,10 @@ interface ColorFieldConfig<TModel = unknown> {
2673
2823
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2674
2824
  autoFocus?: boolean;
2675
2825
  updateOn?: 'change' | 'blur' | 'submit';
2676
- }
2677
- interface RatingFieldConfig<TModel = unknown> {
2826
+ };
2827
+ type RatingFieldConfig<TModel = unknown> = {
2678
2828
  kind: FieldKind.RATING;
2679
- key: keyof TModel;
2829
+ key: KeyOf<TModel>;
2680
2830
  label: string;
2681
2831
  /** Maximum rating value (default: 5) */
2682
2832
  max?: number;
@@ -2684,8 +2834,8 @@ interface RatingFieldConfig<TModel = unknown> {
2684
2834
  icon?: 'star' | 'heart' | 'circle';
2685
2835
  /** Allow half-star ratings (default: false) */
2686
2836
  allowHalf?: boolean;
2687
- validators?: any[];
2688
- asyncValidators?: any[];
2837
+ validators?: ValidatorFn[];
2838
+ asyncValidators?: AsyncValidatorFn[];
2689
2839
  readOnly?: boolean;
2690
2840
  disabled?: boolean;
2691
2841
  visible?: FieldVisibilityCondition<TModel>;
@@ -2693,10 +2843,10 @@ interface RatingFieldConfig<TModel = unknown> {
2693
2843
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2694
2844
  autoFocus?: boolean;
2695
2845
  updateOn?: 'change' | 'blur' | 'submit';
2696
- }
2697
- interface SliderFieldConfig<TModel = unknown> {
2846
+ };
2847
+ type SliderFieldConfig<TModel = unknown> = {
2698
2848
  kind: FieldKind.SLIDER;
2699
- key: keyof TModel;
2849
+ key: KeyOf<TModel>;
2700
2850
  label: string;
2701
2851
  /** Minimum value (default: 0) */
2702
2852
  min?: number;
@@ -2708,8 +2858,8 @@ interface SliderFieldConfig<TModel = unknown> {
2708
2858
  showValue?: boolean;
2709
2859
  /** Unit label displayed after the value (e.g., '%', 'px') */
2710
2860
  unit?: string;
2711
- validators?: any[];
2712
- asyncValidators?: any[];
2861
+ validators?: ValidatorFn[];
2862
+ asyncValidators?: AsyncValidatorFn[];
2713
2863
  readOnly?: boolean;
2714
2864
  disabled?: boolean;
2715
2865
  visible?: FieldVisibilityCondition<TModel>;
@@ -2717,10 +2867,10 @@ interface SliderFieldConfig<TModel = unknown> {
2717
2867
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2718
2868
  autoFocus?: boolean;
2719
2869
  updateOn?: 'change' | 'blur' | 'submit';
2720
- }
2721
- interface FileFieldConfig<TModel = unknown> {
2870
+ };
2871
+ type FileFieldConfig<TModel = unknown> = {
2722
2872
  kind: FieldKind.FILE;
2723
- key: keyof TModel;
2873
+ key: KeyOf<TModel>;
2724
2874
  label: string;
2725
2875
  /** Accepted file types (e.g., '.pdf,.jpg,image/*') */
2726
2876
  accept?: string;
@@ -2730,8 +2880,8 @@ interface FileFieldConfig<TModel = unknown> {
2730
2880
  maxSize?: number;
2731
2881
  /** Maximum number of files (when multiple is true) */
2732
2882
  maxFiles?: number;
2733
- validators?: any[];
2734
- asyncValidators?: any[];
2883
+ validators?: ValidatorFn[];
2884
+ asyncValidators?: AsyncValidatorFn[];
2735
2885
  readOnly?: boolean;
2736
2886
  disabled?: boolean;
2737
2887
  visible?: FieldVisibilityCondition<TModel>;
@@ -2739,35 +2889,35 @@ interface FileFieldConfig<TModel = unknown> {
2739
2889
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2740
2890
  autoFocus?: boolean;
2741
2891
  updateOn?: 'change' | 'blur' | 'submit';
2742
- }
2743
- interface CustomFieldConfig<TModel = unknown> {
2892
+ };
2893
+ type CustomFieldConfig<TModel = unknown> = {
2744
2894
  kind: FieldKind.CUSTOM;
2745
- key: keyof TModel;
2895
+ key: KeyOf<TModel>;
2746
2896
  component: Type<unknown>;
2747
2897
  inputs?: ModalInputMap;
2748
2898
  label?: string;
2749
- validators?: any[];
2750
- asyncValidators?: any[];
2899
+ validators?: ValidatorFn[];
2900
+ asyncValidators?: AsyncValidatorFn[];
2751
2901
  visible?: FieldVisibilityCondition<TModel>;
2752
2902
  /** Condition to dynamically mark this field as required based on other field values */
2753
2903
  conditionallyRequired?: FieldRequiredCondition<TModel>;
2754
2904
  autoFocus?: boolean;
2755
2905
  updateOn?: 'change' | 'blur' | 'submit';
2756
- }
2757
- type FormFieldConfig<TModel = unknown> = TextFieldConfig<TModel> | NumberFieldConfig<TModel> | SelectFieldConfig<TModel> | CheckboxFieldConfig<TModel> | DateFieldConfig<TModel> | TextareaFieldConfig<TModel> | DatetimeFieldConfig<TModel> | MultiSelectFieldConfig<TModel> | MultiSelectTableFieldConfig<TModel> | SingleSelectTableFieldConfig<TModel> | PasswordFieldConfig<TModel> | FileFieldConfig<TModel> | ColorFieldConfig<TModel> | RatingFieldConfig<TModel> | SliderFieldConfig<TModel> | CustomFieldConfig<TModel>;
2758
- interface AnimationOptions {
2906
+ };
2907
+ 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>;
2908
+ type AnimationOptions = {
2759
2909
  type: 'slide' | 'fade' | 'zoom';
2760
2910
  duration?: number;
2761
- }
2762
- interface FormRowField<TModel = unknown> {
2911
+ };
2912
+ type FormRowField<TModel = unknown> = {
2763
2913
  field: FormFieldConfig<TModel>;
2764
2914
  span?: number;
2765
- }
2766
- interface FormRow<TModel = unknown> {
2915
+ };
2916
+ type FormRow<TModel = unknown> = {
2767
2917
  columns?: number;
2768
2918
  fields: FormRowField<TModel>[];
2769
- }
2770
- interface FormFieldGroup<TModel = unknown> {
2919
+ };
2920
+ type FormFieldGroup<TModel = unknown> = {
2771
2921
  /** Section header title */
2772
2922
  title: string;
2773
2923
  /** Optional description below the section header */
@@ -2778,18 +2928,18 @@ interface FormFieldGroup<TModel = unknown> {
2778
2928
  rows?: FormRow<TModel>[];
2779
2929
  /** Condition to show/hide this entire group based on form values */
2780
2930
  visible?: FieldVisibilityCondition<TModel>;
2781
- }
2782
- interface ConfirmationActionConfig<TResult = unknown> {
2931
+ };
2932
+ type ConfirmationActionConfig<TResult = unknown> = {
2783
2933
  label: string;
2784
2934
  style?: ActionStyle;
2785
2935
  handler?: ModalResultHandler<TResult>;
2786
- }
2787
- interface CancellationActionConfig {
2936
+ };
2937
+ type CancellationActionConfig = {
2788
2938
  label: string;
2789
2939
  style?: ActionStyle;
2790
2940
  reason?: ModalCloseReason;
2791
- }
2792
- interface ModalFooterAction<TResult = unknown> {
2941
+ };
2942
+ type ModalFooterAction<TResult = unknown> = {
2793
2943
  label: string;
2794
2944
  style?: ActionStyle;
2795
2945
  /** Position in the footer: 'left' or 'right' (default: 'right') */
@@ -2802,8 +2952,8 @@ interface ModalFooterAction<TResult = unknown> {
2802
2952
  handler?: (modalRef: ModalRef<TResult>) => Promise<void> | void;
2803
2953
  /** Whether the button is disabled */
2804
2954
  disabled?: boolean;
2805
- }
2806
- interface ModalPollingConfig<TResult = unknown> {
2955
+ };
2956
+ type ModalPollingConfig<TResult = unknown> = {
2807
2957
  /** Polling interval in milliseconds */
2808
2958
  interval: number;
2809
2959
  /** Function called on each poll tick */
@@ -2812,8 +2962,8 @@ interface ModalPollingConfig<TResult = unknown> {
2812
2962
  autoStart?: boolean;
2813
2963
  /** Maximum number of poll attempts (undefined = unlimited) */
2814
2964
  maxAttempts?: number;
2815
- }
2816
- interface ModalI18nLabels {
2965
+ };
2966
+ type ModalI18nLabels = {
2817
2967
  /** Submit button label (default: 'Submit') */
2818
2968
  submit?: string;
2819
2969
  /** Cancel button label (default: 'Cancel') */
@@ -2838,9 +2988,9 @@ interface ModalI18nLabels {
2838
2988
  fileUploadPrompt?: string;
2839
2989
  /** Confirm button label (default: 'Confirm') */
2840
2990
  confirm?: string;
2841
- }
2842
- type ModalCancelHandler<TResult = unknown> = (reason: ModalCloseReason) => Promise<void> | void;
2843
- interface BaseModalConfig<TResult = unknown> {
2991
+ };
2992
+ type ModalCancelHandler<_TResult = unknown> = (reason: ModalCloseReason) => Promise<void> | void;
2993
+ type BaseModalConfig<TResult = unknown> = {
2844
2994
  kind: ModalKind;
2845
2995
  title?: string;
2846
2996
  subtitle?: string;
@@ -2873,9 +3023,9 @@ interface BaseModalConfig<TResult = unknown> {
2873
3023
  template?: TemplateRef<unknown>;
2874
3024
  /** Inputs for the custom component */
2875
3025
  inputs?: ModalInputMap;
2876
- }
2877
- type WizardBeforeCompleteValidator<TResult = any> = (payload: Record<ModalStepId, Record<string, any>>) => Promise<Partial<Record<keyof TResult, string>> | null> | Partial<Record<keyof TResult, string>> | null;
2878
- interface WizardModalConfig<TResult = WizardResult> extends BaseModalConfig<TResult> {
3026
+ };
3027
+ 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;
3028
+ type WizardModalConfig<TResult = WizardResult> = {
2879
3029
  kind: ModalKind.WIZARD;
2880
3030
  steps: WizardStepConfig[];
2881
3031
  startStepId?: ModalStepId;
@@ -2886,10 +3036,10 @@ interface WizardModalConfig<TResult = WizardResult> extends BaseModalConfig<TRes
2886
3036
  onBeforeComplete?: WizardBeforeCompleteValidator<TResult>[];
2887
3037
  /** Global initial values for all steps */
2888
3038
  initialValue?: Partial<TResult>;
2889
- }
2890
- interface FormModalConfig<TModel = unknown, TResult = TModel> extends BaseModalConfig<TResult> {
3039
+ } & BaseModalConfig<TResult>;
3040
+ type FormModalConfig<TModel = unknown, TResult = TModel> = {
2891
3041
  kind: ModalKind.FORM;
2892
- body?: any;
3042
+ body?: StepBodyConfig;
2893
3043
  fields: FormFieldConfig<TModel>[];
2894
3044
  rows?: FormRow<TModel>[];
2895
3045
  layout?: FormLayoutMode;
@@ -2899,56 +3049,61 @@ interface FormModalConfig<TModel = unknown, TResult = TModel> extends BaseModalC
2899
3049
  /** Form-level validators for cross-field validation */
2900
3050
  formValidators?: FormValidator<TModel>[];
2901
3051
  /** Angular FormGroup-level validators (e.g., Validators.required on the group) */
2902
- groupValidators?: any[];
3052
+ groupValidators?: ValidatorFn[];
2903
3053
  /** Field groups with section headers */
2904
3054
  fieldGroups?: FormFieldGroup<TModel>[];
2905
- }
2906
- interface ConfirmationModalConfig<TResult = boolean> extends BaseModalConfig<TResult> {
3055
+ } & BaseModalConfig<TResult>;
3056
+ type ConfirmationModalConfig<TResult = boolean> = {
2907
3057
  kind: ModalKind.CONFIRMATION;
2908
3058
  message: string;
2909
3059
  tone?: ConfirmationTone;
2910
3060
  confirm?: ConfirmationActionConfig<TResult>;
2911
3061
  cancel?: CancellationActionConfig;
2912
- body?: any;
2913
- fields?: FormFieldConfig<any>[];
2914
- rows?: FormRow<any>[];
2915
- fieldGroups?: FormFieldGroup<any>[];
2916
- formValidators?: FormValidator<any>[];
2917
- groupValidators?: any[];
2918
- initialValue?: Partial<any>;
2919
- }
2920
- interface CustomModalConfig<TResult = unknown> extends BaseModalConfig<TResult> {
3062
+ body?: StepBodyConfig;
3063
+ fields?: FormFieldConfig<unknown>[];
3064
+ rows?: FormRow<unknown>[];
3065
+ fieldGroups?: FormFieldGroup<unknown>[];
3066
+ formValidators?: FormValidator<unknown>[];
3067
+ groupValidators?: ValidatorFn[];
3068
+ initialValue?: Partial<unknown>;
3069
+ } & BaseModalConfig<TResult>;
3070
+ type CustomModalConfig<TResult = unknown> = {
2921
3071
  kind: ModalKind.CUSTOM;
2922
3072
  onComplete?: ModalResultHandler<TResult>;
2923
- }
2924
- type ModalConfig<TResult = any> = WizardModalConfig<TResult> | FormModalConfig<any, TResult> | ConfirmationModalConfig<TResult> | CustomModalConfig<TResult>;
3073
+ } & BaseModalConfig<TResult>;
3074
+ type ModalConfig<TResult = unknown, TModel = unknown> = WizardModalConfig<TResult> | FormModalConfig<TModel, TResult> | ConfirmationModalConfig<TResult> | CustomModalConfig<TResult>;
2925
3075
 
2926
3076
  /**
2927
3077
  * Shared interface for configurations that support form layouts.
2928
3078
  */
2929
- interface FormContainerConfig<TModel = any> {
3079
+ type FormContainerConfig<TModel = unknown> = {
2930
3080
  fields?: FormFieldConfig<TModel>[];
2931
3081
  rows?: FormRow<TModel>[];
2932
3082
  fieldGroups?: FormFieldGroup<TModel>[];
2933
3083
  formValidators?: FormValidator<TModel>[];
2934
- groupValidators?: any[];
3084
+ groupValidators?: ValidatorFn[];
2935
3085
  initialValue?: Partial<TModel>;
2936
- body?: any;
2937
- }
3086
+ body?: StepBodyConfig;
3087
+ };
3088
+ /**
3089
+ * A self-referential type so that field-group builder methods can be chained.
3090
+ * e.g. g.field(...).field(...).field(...)
3091
+ */
3092
+ type ChainableGroupBuilder<TModel> = FormLayoutBuilder<TModel, ChainableGroupBuilder<TModel>>;
2938
3093
  /**
2939
3094
  * A builder class that provides form layout capabilities (fields, rows, groups).
2940
3095
  * This can be used as a delegate to avoid code duplication between FormModalBuilder and StepBuilder.
2941
3096
  */
2942
- declare class FormLayoutBuilder<TModel = any, TParent = any> {
3097
+ declare class FormLayoutBuilder<TModel = unknown, TParent = unknown> {
2943
3098
  private readonly config;
2944
- private readonly parent;
3099
+ private parent;
2945
3100
  private currentRow;
2946
3101
  private currentRowColumns;
2947
3102
  constructor(config: FormContainerConfig<TModel>, parent: TParent);
2948
3103
  /**
2949
3104
  * Add a custom body/content to the form/step.
2950
3105
  */
2951
- body(body: any): TParent;
3106
+ body(body: StepBodyConfig): TParent;
2952
3107
  /**
2953
3108
  * Add a field as a full-width row (single column).
2954
3109
  */
@@ -2982,11 +3137,11 @@ declare class FormLayoutBuilder<TModel = any, TParent = any> {
2982
3137
  /**
2983
3138
  * Add a field group using a functional builder.
2984
3139
  */
2985
- fieldGroup(title: string, buildFn: (group: FormLayoutBuilder<TModel, any>) => void): TParent;
3140
+ fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): TParent;
2986
3141
  /**
2987
3142
  * Add a field group with title, description, and a functional builder.
2988
3143
  */
2989
- fieldGroup(title: string, description: string, buildFn: (group: FormLayoutBuilder<TModel, any>) => void): TParent;
3144
+ fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): TParent;
2990
3145
  private processFieldGroup;
2991
3146
  /**
2992
3147
  * Add form-level validators for cross-field validation.
@@ -2995,7 +3150,7 @@ declare class FormLayoutBuilder<TModel = any, TParent = any> {
2995
3150
  /**
2996
3151
  * Add Angular FormGroup-level validators.
2997
3152
  */
2998
- groupValidators(validators: any[]): TParent;
3153
+ groupValidators(validators: ValidatorFn[]): TParent;
2999
3154
  /**
3000
3155
  * Set initial value for fields.
3001
3156
  */
@@ -3016,11 +3171,11 @@ declare class FormLayoutBuilder<TModel = any, TParent = any> {
3016
3171
  /**
3017
3172
  * A builder for adding validation rules to a field fluently.
3018
3173
  */
3019
- declare class FieldValidatorBuilder<TModel = any, TParent = any> {
3174
+ declare class FieldValidatorBuilder<TModel = unknown, TParent = unknown> {
3020
3175
  private field;
3021
3176
  private parent;
3022
3177
  constructor(field: FormFieldConfig<TModel>, parent: TParent);
3023
- required(message?: string): this;
3178
+ required(_message?: string): this;
3024
3179
  minLength(length: number): this;
3025
3180
  maxLength(length: number): this;
3026
3181
  pattern(pattern: string | RegExp): this;
@@ -3030,90 +3185,43 @@ declare class FieldValidatorBuilder<TModel = any, TParent = any> {
3030
3185
  /**
3031
3186
  * Add a custom validator.
3032
3187
  */
3033
- custom(validator: any): this;
3188
+ custom(validator: ValidatorFn): this;
3034
3189
  /**
3035
3190
  * Return to the parent builder.
3036
3191
  */
3037
3192
  done(): TParent;
3038
3193
  }
3039
3194
 
3040
- declare class StepBuilder<TModel = any> {
3195
+ declare class StepBuilder<TModel = unknown> {
3041
3196
  private config;
3042
3197
  private layoutBuilder;
3043
3198
  constructor(id: string, title: string);
3044
- body(body: any): this;
3199
+ body(body: StepBodyConfig): this;
3045
3200
  state(state: StepState): this;
3046
3201
  guard(guard: StepGuard): this;
3047
3202
  validators(validators: StepValidator[]): this;
3048
- /**
3049
- * Add a field to this step. This is the single API for all field types.
3050
- *
3051
- * @example
3052
- * s.field({ kind: FieldKind.TEXT, key: 'email', label: 'Email', validators: [Validators.required] })
3053
- * s.field({ kind: FieldKind.SELECT, key: 'role', label: 'Role', options: [...] })
3054
- */
3055
3203
  field(field: FormFieldConfig<TModel>): this;
3056
- /**
3057
- * Start a new row with the specified number of columns.
3058
- * All subsequent `addToRow()` calls will add fields to this row.
3059
- */
3060
3204
  row(columns?: number): this;
3061
- /**
3062
- * Add a field to the current row started by `row()`.
3063
- */
3064
3205
  addToRow(field: FormFieldConfig<TModel>, span?: number): this;
3065
- /**
3066
- * Declarative way to add a row.
3067
- */
3068
3206
  addRow(columns: number, buildFn: (row: {
3069
3207
  add: (field: FormFieldConfig<TModel>, span?: number) => void;
3070
3208
  }) => void): this;
3071
- /**
3072
- * Add a field group with a section header.
3073
- */
3074
3209
  fieldGroup(group: FormFieldGroup<TModel>): this;
3075
- /**
3076
- * Add a field group using a functional builder.
3077
- */
3078
- fieldGroup(title: string, buildFn: (group: FormLayoutBuilder<TModel, any>) => void): this;
3079
- /**
3080
- * Add a field group with title, description, and a functional builder.
3081
- */
3082
- fieldGroup(title: string, description: string, buildFn: (group: FormLayoutBuilder<TModel, any>) => void): this;
3083
- /**
3084
- * Add form-level validators for cross-field validation within this step.
3085
- */
3210
+ fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
3211
+ fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
3086
3212
  formValidators(validators: FormValidator<TModel>[]): this;
3087
- /**
3088
- * Add Angular FormGroup-level validators for this step.
3089
- */
3090
- groupValidators(validators: any[]): this;
3091
- /**
3092
- * Set initial values for fields in this step.
3093
- */
3213
+ groupValidators(validators: ValidatorFn[]): this;
3094
3214
  initialValue(value: Partial<TModel>): this;
3095
- /**
3096
- * Set a visibility condition for this step based on aggregated wizard data.
3097
- */
3098
- visible(condition: (aggregatedData: Record<ModalStepId, Record<string, any>>) => boolean): this;
3099
- /**
3100
- * Set a custom label for the 'Next' button on this step.
3101
- */
3215
+ visible(condition: (aggregatedData: Record<ModalStepId, Record<string, unknown>>) => boolean): this;
3102
3216
  nextLabel(label: string): this;
3103
- /**
3104
- * Set a custom label for the 'Back' button on this step.
3105
- */
3106
3217
  backLabel(label: string): this;
3107
- /**
3108
- * Hide the 'Back' button on this step.
3109
- */
3110
3218
  hideBack(hide?: boolean): this;
3111
3219
  build(): WizardStepConfig<TModel>;
3112
3220
  }
3113
3221
 
3114
- declare abstract class BaseModalBuilder<TConfig extends BaseModalConfig<TResult>, TResult = unknown> {
3222
+ declare abstract class BaseModalBuilder<TConfig extends BaseModalConfig<TResult> & FormContainerConfig<TModel>, TResult = unknown, TModel = unknown> {
3115
3223
  protected config: TConfig;
3116
- protected layoutBuilder: FormLayoutBuilder<any, this>;
3224
+ protected layoutBuilder: FormLayoutBuilder<TModel, this>;
3117
3225
  protected constructor(initialConfig: TConfig);
3118
3226
  title(title: string): this;
3119
3227
  subtitle(subtitle: string): this;
@@ -3140,15 +3248,15 @@ declare abstract class BaseModalBuilder<TConfig extends BaseModalConfig<TResult>
3140
3248
  /**
3141
3249
  * Add a custom body/content to the modal.
3142
3250
  */
3143
- body(body: any): this;
3251
+ body(body: StepBodyConfig): this;
3144
3252
  /**
3145
3253
  * Add a field.
3146
3254
  */
3147
- field(field: FormFieldConfig<any>): this;
3255
+ field(field: FormFieldConfig<TModel>): this;
3148
3256
  /**
3149
3257
  * Add a field with a fluent validation builder.
3150
3258
  */
3151
- fieldWithValidators(field: FormFieldConfig<any>): FieldValidatorBuilder<any, this>;
3259
+ fieldWithValidators(field: FormFieldConfig<TModel>): FieldValidatorBuilder<TModel, this>;
3152
3260
  /**
3153
3261
  * Start a new row.
3154
3262
  */
@@ -3156,19 +3264,20 @@ declare abstract class BaseModalBuilder<TConfig extends BaseModalConfig<TResult>
3156
3264
  /**
3157
3265
  * Add a field to the current row.
3158
3266
  */
3159
- addToRow(field: FormFieldConfig<any>, span?: number): this;
3267
+ addToRow(field: FormFieldConfig<TModel>, span?: number): this;
3160
3268
  /**
3161
3269
  * Declarative way to add a row.
3162
3270
  */
3163
3271
  addRow(columns: number, buildFn: (row: {
3164
- add: (field: FormFieldConfig<any>, span?: number) => void;
3272
+ add: (field: FormFieldConfig<TModel>, span?: number) => void;
3165
3273
  }) => void): this;
3166
3274
  /**
3167
3275
  * Add a field group.
3168
3276
  */
3169
- fieldGroup(group: FormFieldGroup<any>): this;
3170
- fieldGroup(title: string, buildFn: (group: FormLayoutBuilder<any, any>) => void): this;
3171
- fieldGroup(title: string, description: string, buildFn: (group: FormLayoutBuilder<any, any>) => void): this;
3277
+ fieldGroup(group: FormFieldGroup<TModel>): this;
3278
+ fieldGroup(title: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
3279
+ fieldGroup(title: string, description: string, buildFn: (group: ChainableGroupBuilder<TModel>) => void): this;
3280
+ groupValidators(validators: ValidatorFn[]): this;
3172
3281
  build(): Readonly<TConfig>;
3173
3282
  }
3174
3283
 
@@ -3184,18 +3293,8 @@ declare class WizardModalBuilder<TResult = WizardResult> extends BaseModalBuilde
3184
3293
  * Use step-level body text instead.
3185
3294
  */
3186
3295
  description(_description: string): this;
3187
- body(body: any): this;
3188
- field(field: FormFieldConfig<any>): this;
3189
- row(columns?: number): this;
3190
- addToRow(field: FormFieldConfig<any>, span?: number): this;
3191
- addRow(columns: number, buildFn: (row: {
3192
- add: (field: FormFieldConfig<any>, span?: number) => void;
3193
- }) => void): this;
3194
- fieldGroup(group: FormFieldGroup<any>): this;
3195
- fieldGroup(title: string, buildFn: (group: FormLayoutBuilder<any, any>) => void): this;
3196
- fieldGroup(title: string, description: string, buildFn: (group: FormLayoutBuilder<any, any>) => void): this;
3197
- step<TStepModel = any>(step: WizardStepConfig<TStepModel> | ((builder: StepBuilder<TStepModel>) => void)): this;
3198
- addStep<TStepModel = any>(title: string, buildFn: (builder: StepBuilder<TStepModel>) => void, id?: ModalStepId): this;
3296
+ step<TStepModel = unknown>(step: WizardStepConfig<TStepModel> | ((builder: StepBuilder<TStepModel>) => void)): this;
3297
+ addStep<TStepModel = unknown>(title: string, buildFn: (builder: StepBuilder<TStepModel>) => void, id?: ModalStepId): this;
3199
3298
  startAt(stepId: ModalStepId): this;
3200
3299
  flow(mode: WizardFlowMode): this;
3201
3300
  onStepChange(handler: WizardStepChangeHandler): this;
@@ -3203,34 +3302,20 @@ declare class WizardModalBuilder<TResult = WizardResult> extends BaseModalBuilde
3203
3302
  onBeforeComplete(validators: WizardBeforeCompleteValidator<TResult>[]): this;
3204
3303
  }
3205
3304
 
3206
- declare class FormModalBuilder<TModel = unknown, TResult = TModel> extends BaseModalBuilder<FormModalConfig<TModel, TResult>, TResult> {
3305
+ declare class FormModalBuilder<TModel = unknown, TResult = TModel> extends BaseModalBuilder<FormModalConfig<TModel, TResult>, TResult, TModel> {
3207
3306
  constructor();
3208
- body(body: any): this;
3307
+ /**
3308
+ * Override to also accept table field configs with a concrete TRow (BehaviorSubject is invariant,
3309
+ * so TableDataSource<TeamMember> is not assignable to TableDataSource<unknown>).
3310
+ */
3209
3311
  field(field: FormFieldConfig<TModel>): this;
3210
- row(columns?: number): this;
3211
- addToRow(field: FormFieldConfig<TModel>, span?: number): this;
3212
- addRow(columns: number, buildFn: (row: {
3213
- add: (field: FormFieldConfig<TModel>, span?: number) => void;
3214
- }) => void): this;
3312
+ field<TRow>(field: MultiSelectTableFieldConfig<TModel, TRow> | SingleSelectTableFieldConfig<TModel, TRow>): this;
3215
3313
  layout(mode: FormLayoutMode): this;
3216
3314
  initialValue(value: Partial<TModel>): this;
3217
3315
  submitMode(mode: SubmitMode): this;
3218
3316
  onComplete(handler: ModalResultHandler<TResult>): this;
3219
3317
  formValidators(validators: FormValidator<TModel>[]): this;
3220
- groupValidators(validators: any[]): this;
3221
- /**
3222
- * Add a field group with a section header.
3223
- * Groups visually separate fields with a title and optional description.
3224
- */
3225
- fieldGroup(group: FormFieldGroup<TModel>): this;
3226
- /**
3227
- * Add a field group using a functional builder.
3228
- */
3229
- fieldGroup(title: string, buildFn: (group: FormLayoutBuilder<TModel, any>) => void): this;
3230
- /**
3231
- * Add a field group with title, description, and a functional builder.
3232
- */
3233
- fieldGroup(title: string, description: string, buildFn: (group: FormLayoutBuilder<TModel, any>) => void): this;
3318
+ groupValidators(validators: ValidatorFn[]): this;
3234
3319
  build(): Readonly<FormModalConfig<TModel, TResult>>;
3235
3320
  }
3236
3321
 
@@ -3240,19 +3325,9 @@ declare class ConfirmationModalBuilder<TResult = boolean> extends BaseModalBuild
3240
3325
  tone(tone: ConfirmationTone): this;
3241
3326
  confirmAction(action: ConfirmationActionConfig<TResult>): this;
3242
3327
  cancelAction(action: CancellationActionConfig): this;
3243
- body(body: any): this;
3244
- field(field: FormFieldConfig<any>): this;
3245
- row(columns?: number): this;
3246
- addToRow(field: FormFieldConfig<any>, span?: number): this;
3247
- addRow(columns: number, buildFn: (row: {
3248
- add: (field: FormFieldConfig<any>, span?: number) => void;
3249
- }) => void): this;
3250
- fieldGroup(group: FormFieldGroup<any>): this;
3251
- fieldGroup(title: string, buildFn: (group: FormLayoutBuilder<any, any>) => void): this;
3252
- fieldGroup(title: string, description: string, buildFn: (group: FormLayoutBuilder<any, any>) => void): this;
3253
- initialValue(value: Partial<any>): this;
3254
- formValidators(validators: FormValidator<any>[]): this;
3255
- groupValidators(validators: any[]): this;
3328
+ initialValue(value: Partial<unknown>): this;
3329
+ formValidators(validators: FormValidator<unknown>[]): this;
3330
+ groupValidators(validators: ValidatorFn[]): this;
3256
3331
  build(): Readonly<ConfirmationModalConfig<TResult>>;
3257
3332
  }
3258
3333
 
@@ -3262,23 +3337,23 @@ declare class CustomModalBuilder<TResult = unknown> extends BaseModalBuilder<Cus
3262
3337
  }
3263
3338
 
3264
3339
  declare class ModalBuilder {
3265
- static wizard<TResult = any>(): WizardModalBuilder<TResult>;
3340
+ static wizard<TResult = WizardResult>(): WizardModalBuilder<TResult>;
3266
3341
  static form<TModel = unknown, TResult = TModel>(): FormModalBuilder<TModel, TResult>;
3267
3342
  static confirmation<TResult = boolean>(): ConfirmationModalBuilder<TResult>;
3268
3343
  static custom<TResult = unknown>(): CustomModalBuilder<TResult>;
3269
3344
  }
3270
3345
 
3271
- declare class MnModalRef<TResult = any> implements ModalRef<TResult> {
3346
+ declare class MnModalRef<TResult = unknown> implements ModalRef<TResult> {
3272
3347
  private componentRef;
3273
3348
  private config;
3274
3349
  private readonly closeSubject;
3275
3350
  readonly afterClosed$: Observable<ModalCloseEvent<TResult>>;
3276
- constructor(componentRef: ComponentRef<any>, config: BaseModalConfig<TResult>);
3351
+ constructor(componentRef: ComponentRef<unknown>, config: BaseModalConfig<TResult>);
3277
3352
  close(result?: TResult): void;
3278
3353
  dismiss(reason: ModalCloseReason): void;
3279
3354
  private animateAndDestroy;
3280
3355
  update(config: Partial<BaseModalConfig<TResult>>): void;
3281
- get component(): any;
3356
+ get component(): unknown;
3282
3357
  private destroy;
3283
3358
  }
3284
3359
 
@@ -3286,12 +3361,12 @@ declare class MnModalService {
3286
3361
  private readonly appRef;
3287
3362
  private readonly injector;
3288
3363
  private readonly modalStack;
3289
- open<TResult = any>(config: ModalConfig<TResult>): MnModalRef<TResult>;
3364
+ open<TResult = unknown, TModel = unknown>(config: ModalConfig<TResult, TModel>): MnModalRef<TResult>;
3290
3365
  static ɵfac: i0.ɵɵFactoryDeclaration<MnModalService, never>;
3291
3366
  static ɵprov: i0.ɵɵInjectableDeclaration<MnModalService>;
3292
3367
  }
3293
3368
 
3294
- declare class MnModalShellComponent<TResult = any> implements OnInit, AfterViewInit, OnDestroy {
3369
+ declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterViewInit, OnDestroy {
3295
3370
  private el;
3296
3371
  private cdr;
3297
3372
  config: ModalConfig<TResult>;
@@ -3303,21 +3378,19 @@ declare class MnModalShellComponent<TResult = any> implements OnInit, AfterViewI
3303
3378
  private focusTrapListener;
3304
3379
  private pollingTimer;
3305
3380
  private pollAttempts;
3306
- constructor(el: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
3307
3381
  ngOnInit(): void;
3308
3382
  ngAfterViewInit(): void;
3309
3383
  ngOnDestroy(): void;
3310
3384
  private setupFocusTrap;
3311
3385
  private removeFocusTrap;
3312
- asWizard(config: any): any;
3313
- asForm(config: any): any;
3314
- asConfirmation(config: any): any;
3315
- asCustom(config: any): any;
3316
- asAny(val: any): any;
3386
+ asWizard(config: ModalConfig<TResult>): WizardModalConfig;
3387
+ asForm(config: ModalConfig<TResult>): FormModalConfig;
3388
+ asConfirmation(config: ModalConfig<TResult>): ConfirmationModalConfig;
3389
+ asCustom(config: ModalConfig<TResult>): CustomModalConfig;
3317
3390
  get hostClasses(): string;
3318
3391
  /** Triggers the closing animation. Deferred to avoid NG0100 when called during a CD cycle. */
3319
3392
  startClosing(): Promise<void>;
3320
- onEscapeKey(event: any): void;
3393
+ onEscapeKey(event: Event): void;
3321
3394
  onBackdropClick(): void;
3322
3395
  onCloseButtonClick(): void;
3323
3396
  private handleClose;
@@ -3339,7 +3412,50 @@ declare class MnModalShellComponent<TResult = any> implements OnInit, AfterViewI
3339
3412
  static ɵcmp: i0.ɵɵComponentDeclaration<MnModalShellComponent<any>, "mn-modal-shell", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
3340
3413
  }
3341
3414
 
3342
- declare class MnFormBodyComponent<TModel = any, TResult = TModel> implements OnInit, OnDestroy, AfterViewInit {
3415
+ /**
3416
+ * A structural "view" over the {@link FormFieldConfig} discriminated union that
3417
+ * exposes every member-specific property as optional. The template and several
3418
+ * helpers need to read properties that only exist on some union members (e.g.
3419
+ * `placeholder`, `swatches`, `mode`, `dataSource`, `validators`). Casting the
3420
+ * field to this view keeps that access type-checked without resorting to `any`.
3421
+ */
3422
+ type FormFieldView<TModel> = FormFieldConfig<TModel> & {
3423
+ label?: string;
3424
+ placeholder?: string;
3425
+ validators?: ValidatorFn[];
3426
+ asyncValidators?: ValidatorFn[];
3427
+ updateOn?: 'change' | 'blur' | 'submit';
3428
+ options?: SelectOption[];
3429
+ dataSource?: FieldDataSource;
3430
+ disabled?: boolean;
3431
+ readOnly?: boolean;
3432
+ visible?: FieldVisibilityCondition<TModel>;
3433
+ conditionallyRequired?: FieldRequiredCondition<TModel>;
3434
+ autoFocus?: boolean;
3435
+ defaultValue?: unknown;
3436
+ mask?: string;
3437
+ autocomplete?: string;
3438
+ minDate?: string;
3439
+ maxDate?: string;
3440
+ mode?: 'date' | 'time' | 'datetime-local';
3441
+ min?: number | string;
3442
+ max?: number | string;
3443
+ step?: number;
3444
+ rows?: number;
3445
+ searchable?: boolean;
3446
+ searchPlaceholder?: string;
3447
+ maxSelections?: number;
3448
+ swatches?: string[];
3449
+ showValue?: boolean;
3450
+ unit?: string;
3451
+ accept?: string;
3452
+ multiple?: boolean;
3453
+ maxSize: number;
3454
+ maxFiles?: number;
3455
+ component: Type<unknown>;
3456
+ inputs?: ModalInputMap;
3457
+ };
3458
+ declare class MnFormBodyComponent<TModel = unknown, TResult = TModel> implements OnInit, OnDestroy, AfterViewInit {
3343
3459
  private fb;
3344
3460
  config: FormModalConfig<TModel, TResult>;
3345
3461
  modalRef: MnModalRef<TResult>;
@@ -3365,13 +3481,12 @@ declare class MnFormBodyComponent<TModel = any, TResult = TModel> implements OnI
3365
3481
  /** Dynamic options loaded from data sources */
3366
3482
  fieldOptions: Record<string, SelectOption[]>;
3367
3483
  private valueChangesSubscription?;
3368
- constructor(fb: FormBuilder);
3369
- asField(field: any): any;
3370
- asKey(key: any): string;
3371
- asAny(val: any): any;
3372
- hasRequiredValidator(field: any): boolean;
3484
+ asField(field: FormFieldConfig<TModel>): FormFieldView<TModel>;
3485
+ asKey(key: keyof TModel | string): string;
3486
+ asAny(val: unknown): any;
3487
+ hasRequiredValidator(field: FormFieldConfig<TModel>): boolean;
3373
3488
  /** Store table data sources keyed by field key for template access */
3374
- tableDataSources: Record<string, any>;
3489
+ tableDataSources: Record<string, TableDataSource<unknown>>;
3375
3490
  private languageService;
3376
3491
  private static readonly DEFAULT_LABELS;
3377
3492
  private resolveLabel;
@@ -3405,14 +3520,14 @@ declare class MnFormBodyComponent<TModel = any, TResult = TModel> implements OnI
3405
3520
  private updateVisibility;
3406
3521
  /**
3407
3522
  * Builds the full validator array for a field, including conditionallyRequired.
3408
- * @param fieldAny The field configuration.
3523
+ * @param field The field configuration view.
3409
3524
  * @param formValue The current form values.
3410
3525
  * @returns Array of validators to apply.
3411
3526
  */
3412
3527
  private buildValidators;
3413
3528
  /**
3414
3529
  * Updates the conditionallyRequired state for a single field and adjusts validators.
3415
- * @param fieldAny The field configuration.
3530
+ * @param field The field configuration view.
3416
3531
  * @param formValue The current form values.
3417
3532
  */
3418
3533
  private updateConditionallyRequired;
@@ -3426,10 +3541,10 @@ declare class MnFormBodyComponent<TModel = any, TResult = TModel> implements OnI
3426
3541
  getFieldOptions(field: FormFieldConfig<TModel>): SelectOption[];
3427
3542
  /** Convert SelectOption[] to MnSelectOption[] for mn-lib-select */
3428
3543
  getSelectOptions(field: FormFieldConfig<TModel>): MnSelectOption[];
3429
- getSelectProps(field: FormFieldConfig<TModel>): any;
3544
+ getSelectProps(field: FormFieldConfig<TModel>): MnSelectProps;
3430
3545
  private loadFieldOptions;
3431
3546
  private initializeTableFields;
3432
- onTableSelectionChange(field: FormFieldConfig<TModel>, selectedRows: any[]): void;
3547
+ onTableSelectionChange(field: FormFieldConfig<TModel>, selectedRows: unknown[]): void;
3433
3548
  getRatingRange(field: FormFieldConfig<TModel>): number[];
3434
3549
  setRating(field: FormFieldConfig<TModel>, value: number): void;
3435
3550
  getRatingValue(field: FormFieldConfig<TModel>): number;
@@ -3477,19 +3592,17 @@ declare class MnWizardBodyComponent implements OnInit, AfterViewInit, OnDestroy
3477
3592
  completing: string;
3478
3593
  };
3479
3594
  /** Pre-built form configs keyed by step id — only for steps that have fields */
3480
- stepFormConfigs: Record<ModalStepId, FormModalConfig<any, any>>;
3595
+ stepFormConfigs: Record<ModalStepId, FormModalConfig<unknown, unknown>>;
3481
3596
  private statusSubscription?;
3482
3597
  private formBodiesSubscription?;
3483
- constructor(cdr: ChangeDetectorRef);
3484
3598
  ngOnInit(): void;
3485
3599
  ngAfterViewInit(): void;
3486
3600
  ngOnDestroy(): void;
3487
- asAny(val: any): any;
3488
3601
  isTextBody(step: WizardStepConfig): boolean;
3489
3602
  /** Get visible steps (filtered by visibility condition) */
3490
3603
  get visibleSteps(): WizardStepConfig[];
3491
3604
  isStepVisible(step: WizardStepConfig): boolean;
3492
- get currentStep(): WizardStepConfig<any> | undefined;
3605
+ get currentStep(): WizardStepConfig<unknown> | undefined;
3493
3606
  get currentVisibleIndex(): number;
3494
3607
  get currentStepIndex(): number;
3495
3608
  get canGoBack(): boolean;
@@ -3512,12 +3625,12 @@ declare class MnWizardBodyComponent implements OnInit, AfterViewInit, OnDestroy
3512
3625
  * Maps a footer action's ActionStyle to mnButton data props.
3513
3626
  * @param action The footer action configuration.
3514
3627
  */
3515
- getFooterActionButtonData(action: ModalFooterAction<any>): any;
3628
+ getFooterActionButtonData(action: ModalFooterAction<unknown>): Partial<MnButtonTypes>;
3516
3629
  /**
3517
3630
  * Handles a custom footer action click.
3518
3631
  * @param action The footer action configuration.
3519
3632
  */
3520
- handleFooterAction(action: ModalFooterAction<any>): Promise<void>;
3633
+ handleFooterAction(action: ModalFooterAction<unknown>): Promise<void>;
3521
3634
  private notifyStepChange;
3522
3635
  static ɵfac: i0.ɵɵFactoryDeclaration<MnWizardBodyComponent, never>;
3523
3636
  static ɵcmp: i0.ɵɵComponentDeclaration<MnWizardBodyComponent, "mn-wizard-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
@@ -3531,7 +3644,6 @@ declare class MnConfirmationBodyComponent<TResult = boolean> implements OnInit {
3531
3644
  confirmButtonStatus: string;
3532
3645
  hasFormFields: boolean;
3533
3646
  private languageService;
3534
- constructor(cdr: ChangeDetectorRef);
3535
3647
  ngOnInit(): void;
3536
3648
  onFormStatusChange(status: string): void;
3537
3649
  confirm(): Promise<void>;
@@ -3539,180 +3651,30 @@ declare class MnConfirmationBodyComponent<TResult = boolean> implements OnInit {
3539
3651
  private resolveLabel;
3540
3652
  get confirmLabel(): string;
3541
3653
  get cancelLabel(): string;
3542
- get confirmStyle(): ActionStyle;
3543
- get cancelStyle(): ActionStyle;
3544
- get toneClass(): string;
3545
- getButtonColor(style: ActionStyle): 'primary' | 'secondary' | 'danger' | 'warning' | 'success';
3546
- getButtonVariant(style: ActionStyle): 'fill' | 'outline' | 'text';
3547
- asAny(val: any): any;
3548
- get isConfirmDisabled(): boolean;
3549
- asField(field: any): any;
3550
- static ɵfac: i0.ɵɵFactoryDeclaration<MnConfirmationBodyComponent<any>, never>;
3551
- static ɵcmp: i0.ɵɵComponentDeclaration<MnConfirmationBodyComponent<any>, "mn-confirmation-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
3552
- }
3553
-
3554
- declare class MnCustomBodyHostComponent implements OnInit {
3555
- config: CustomModalConfig;
3556
- modalRef: MnModalRef<unknown>;
3557
- container: ViewContainerRef;
3558
- private componentRef?;
3559
- ngOnInit(): void;
3560
- private loadContent;
3561
- attachComponent(component: any): void;
3562
- attachTemplate(template: TemplateRef<unknown>): void;
3563
- static ɵfac: i0.ɵɵFactoryDeclaration<MnCustomBodyHostComponent, never>;
3564
- static ɵcmp: i0.ɵɵComponentDeclaration<MnCustomBodyHostComponent, "mn-custom-body-host", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
3565
- }
3566
-
3567
- /** Map of column key to its current filter value. */
3568
- type ColumnFilterState = Record<string, string | undefined>;
3569
- declare class MnTable<T = any> implements OnInit, OnDestroy, DoCheck {
3570
- dataSource: TableDataSource<T>;
3571
- sortChange: EventEmitter<SortState | null>;
3572
- selectionChange: EventEmitter<T[]>;
3573
- rowClick: EventEmitter<T>;
3574
- filteredItems: T[];
3575
- paginatedItems: T[];
3576
- searchValue: string;
3577
- loadingMoreRows: boolean;
3578
- currentSort: SortState | null;
3579
- selectedIds: Set<string>;
3580
- currentPage: number;
3581
- pageSize: number;
3582
- /** Per-column filter values keyed by column key. */
3583
- columnFilters: ColumnFilterState;
3584
- private cdr;
3585
- private lang;
3586
- private dataSubscription?;
3587
- private searchSubject;
3588
- private searchSubscription?;
3589
- private langSubscription?;
3590
- /** Tracks the previous toolbar left template reference for change detection. */
3591
- private previousToolbarLeftTemplate?;
3592
- /**
3593
- * Checks for changes to dataSource properties that are not covered
3594
- * by Angular's default change detection (e.g. toolbarLeftTemplate).
3595
- */
3596
- ngDoCheck(): void;
3597
- get showLoadMore(): boolean;
3598
- ngOnDestroy(): void;
3599
- get isPaginated(): boolean;
3600
- /** Whether any column has filtering enabled. */
3601
- get hasColumnFilters(): boolean;
3602
- /** Updates a column filter value and re-applies filtering. */
3603
- onColumnFilter(columnKey: string, value: string): void;
3604
- sort(column: ColumnDefinition<T>): void;
3605
- getSortIcon(column: ColumnDefinition<T>): string;
3606
- isSortable(column: ColumnDefinition<T>): boolean;
3607
- isSelected(row: T): boolean;
3608
- toggleRow(row: T): void;
3609
- toggleAll(): void;
3610
- get allSelected(): boolean;
3611
- get hasSelection(): boolean;
3612
- get isMultiSelect(): boolean;
3613
- onRowClick(row: T): void;
3614
- /** Whether the table delegates pagination to the consumer (server-side). */
3615
- get isServerPaginated(): boolean;
3616
- /** Whether the table delegates search to the consumer (server-side). */
3617
- get isServerSearched(): boolean;
3618
- /** Total number of items, accounting for server-side pagination. */
3619
- get totalItemCount(): number;
3620
- get totalPages(): number;
3621
- ngOnInit(): void;
3622
- /**
3623
- * Resolves all translation keys (headerKey, filterPlaceholderKey, emptyMessageKey, etc.)
3624
- * into their corresponding display strings using MnLanguageService.
3625
- */
3626
- private resolveTranslationKeys;
3627
- onSearch(searchString: string): void;
3628
- loadMoreRows(): void;
3629
- get resolvedPageSizeOptions(): number[];
3630
- /** Page-size options formatted for mn-select. */
3631
- get pageSizeSelectOptions(): MnSelectOption<number>[];
3632
- /** Filter options formatted for mn-select for a given column. */
3633
- getFilterSelectOptions(column: ColumnDefinition<T>): MnSelectOption<string>[];
3634
- goToPage(page: number): void;
3635
- onPageSizeChange(newSize: number): void;
3636
- get visiblePages(): number[];
3637
- private applyPagination;
3638
- isTemplateRef(value: any): value is TemplateRef<any>;
3639
- getCellValue(column: ColumnDefinition<T>, row: T): string;
3640
- /** Returns the small-screen cell value for a column with cellSm defined. */
3641
- getCellSmValue(column: ColumnDefinition<T>, row: T): string;
3642
- trackByID: (_index: number, row: T) => string;
3643
- trackByKey: (_index: number, column: ColumnDefinition<T>) => string;
3644
- get tableClasses(): string;
3645
- get totalColumnCount(): number;
3646
- get skeletonRows(): number[];
3647
- private applyFilterAndSort;
3648
- private applySorting;
3649
- private processLoadedRows;
3650
- private validateDataSource;
3651
- private emitSelection;
3652
- static ɵfac: i0.ɵɵFactoryDeclaration<MnTable<any>, never>;
3653
- static ɵcmp: i0.ɵɵComponentDeclaration<MnTable<any>, "mn-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; }, { "sortChange": "sortChange"; "selectionChange": "selectionChange"; "rowClick": "rowClick"; }, never, never, true, never>;
3654
- }
3655
-
3656
- /**
3657
- * Attribute directive that applies responsive-hiding classes to table cells/headers.
3658
- * Hides the element by default and shows it as `table-cell` at the specified breakpoint.
3659
- *
3660
- * Uses a static class map so Tailwind CSS can detect the full class names at build time.
3661
- *
3662
- * Usage: `<td [mnHiddenBelow]="column.hiddenBelow">`
3663
- */
3664
- declare class MnHiddenBelowDirective implements OnChanges {
3665
- /** The breakpoint below which the element is hidden. */
3666
- mnHiddenBelow: 'sm' | 'md' | 'lg' | undefined;
3667
- private readonly el;
3668
- private readonly renderer;
3669
- private appliedClasses;
3670
- /** Static mapping of breakpoints to their full Tailwind class names. */
3671
- private readonly classMap;
3672
- ngOnChanges(): void;
3673
- static ɵfac: i0.ɵɵFactoryDeclaration<MnHiddenBelowDirective, never>;
3674
- static ɵdir: i0.ɵɵDirectiveDeclaration<MnHiddenBelowDirective, "[mnHiddenBelow]", never, { "mnHiddenBelow": { "alias": "mnHiddenBelow"; "required": false; }; }, {}, never, never, true, never>;
3675
- }
3676
-
3677
- /**
3678
- * Attribute directive that hides an element below the given breakpoint and shows it at/above.
3679
- * Uses `hidden` + `{bp}:inline` so the element is invisible on small screens.
3680
- *
3681
- * Usage: `<span [mnShowAbove]="'sm'">`
3682
- */
3683
- declare class MnShowAboveDirective implements OnChanges {
3684
- /** The breakpoint at/above which the element becomes visible. */
3685
- mnShowAbove: 'sm' | 'md' | 'lg' | undefined;
3686
- private readonly el;
3687
- private readonly renderer;
3688
- private appliedClasses;
3689
- /** Static mapping of breakpoints to their full Tailwind class names. */
3690
- private readonly classMap;
3691
- ngOnChanges(): void;
3692
- static ɵfac: i0.ɵɵFactoryDeclaration<MnShowAboveDirective, never>;
3693
- static ɵdir: i0.ɵɵDirectiveDeclaration<MnShowAboveDirective, "[mnShowAbove]", never, { "mnShowAbove": { "alias": "mnShowAbove"; "required": false; }; }, {}, never, never, true, never>;
3694
- }
3695
-
3696
- /**
3697
- * Attribute directive that shows an element below the given breakpoint and hides it at/above.
3698
- * Uses `inline` by default + `{bp}:hidden` so the element is only visible on small screens.
3699
- *
3700
- * Usage: `<span [mnShowBelow]="'sm'">`
3701
- */
3702
- declare class MnShowBelowDirective implements OnChanges {
3703
- /** The breakpoint below which the element is visible. */
3704
- mnShowBelow: 'sm' | 'md' | 'lg' | undefined;
3705
- private readonly el;
3706
- private readonly renderer;
3707
- private appliedClasses;
3708
- /** Static mapping of breakpoints to their full Tailwind class names. */
3709
- private readonly classMap;
3710
- ngOnChanges(): void;
3711
- static ɵfac: i0.ɵɵFactoryDeclaration<MnShowBelowDirective, never>;
3712
- static ɵdir: i0.ɵɵDirectiveDeclaration<MnShowBelowDirective, "[mnShowBelow]", never, { "mnShowBelow": { "alias": "mnShowBelow"; "required": false; }; }, {}, never, never, true, never>;
3654
+ get confirmStyle(): ActionStyle;
3655
+ get cancelStyle(): ActionStyle;
3656
+ get toneClass(): string;
3657
+ getButtonColor(style: ActionStyle): 'primary' | 'secondary' | 'danger' | 'warning' | 'success';
3658
+ getButtonVariant(style: ActionStyle): 'fill' | 'outline' | 'text';
3659
+ get isConfirmDisabled(): boolean;
3660
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnConfirmationBodyComponent<any>, never>;
3661
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnConfirmationBodyComponent<any>, "mn-confirmation-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
3662
+ }
3663
+
3664
+ declare class MnCustomBodyHostComponent implements OnInit {
3665
+ config: CustomModalConfig;
3666
+ modalRef: MnModalRef<unknown>;
3667
+ container: ViewContainerRef;
3668
+ private componentRef?;
3669
+ ngOnInit(): void;
3670
+ private loadContent;
3671
+ attachComponent(component: Type<unknown>): void;
3672
+ attachTemplate(template: TemplateRef<unknown>): void;
3673
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnCustomBodyHostComponent, never>;
3674
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnCustomBodyHostComponent, "mn-custom-body-host", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; }, {}, never, never, true, never>;
3713
3675
  }
3714
3676
 
3715
- interface ListAppearance {
3677
+ type ListAppearance = {
3716
3678
  /** Show a divider between items. Defaults to true. */
3717
3679
  dividers?: boolean;
3718
3680
  /** Highlight item on hover. Defaults to true. */
@@ -3721,14 +3683,14 @@ interface ListAppearance {
3721
3683
  compact?: boolean;
3722
3684
  /** Show a border around the list. */
3723
3685
  bordered?: boolean;
3724
- }
3725
- interface ListDataSource<T> {
3686
+ };
3687
+ type ListDataSource<T> = {
3726
3688
  dataRows: BehaviorSubject<T[]>;
3727
3689
  getID: (row: T) => string;
3728
3690
  /** Template used to render each list item. Receives the item as `$implicit` and `data`. */
3729
- itemTemplate: TemplateRef<any>;
3691
+ itemTemplate: TemplateRef<unknown>;
3730
3692
  emptyMessage: string;
3731
- emptyTemplate?: TemplateRef<any>;
3693
+ emptyTemplate?: TemplateRef<unknown>;
3732
3694
  isDataLoading: boolean;
3733
3695
  canSearch: boolean;
3734
3696
  searchPlaceholder?: string;
@@ -3769,15 +3731,15 @@ interface ListDataSource<T> {
3769
3731
  initialSelectedIds?: string[];
3770
3732
  onItemClick?: (item: T) => void;
3771
3733
  appearance?: ListAppearance;
3772
- toolbarTemplate?: TemplateRef<any>;
3734
+ toolbarTemplate?: TemplateRef<unknown>;
3773
3735
  labels?: ListLabels;
3774
- }
3775
- interface ListLabels {
3736
+ };
3737
+ type ListLabels = {
3776
3738
  loadMore?: string;
3777
3739
  rowsPerPage?: string;
3778
- }
3740
+ };
3779
3741
 
3780
- declare class MnList<T = any> implements OnInit, OnDestroy, DoCheck {
3742
+ declare class MnList<T = unknown> implements OnInit, OnDestroy, DoCheck {
3781
3743
  dataSource: ListDataSource<T>;
3782
3744
  selectionChange: EventEmitter<T[]>;
3783
3745
  itemClick: EventEmitter<T>;
@@ -3836,7 +3798,7 @@ declare class MnList<T = any> implements OnInit, OnDestroy, DoCheck {
3836
3798
  * `primaryColor` is used for the left border accent; `secondaryColor` for the
3837
3799
  * background fill. Both should be valid CSS colour values.
3838
3800
  */
3839
- interface ColorPreset {
3801
+ type ColorPreset = {
3840
3802
  /** Unique identifier. */
3841
3803
  id: string;
3842
3804
  /** Human-readable colour name (e.g. "Blue"). */
@@ -3845,7 +3807,7 @@ interface ColorPreset {
3845
3807
  primaryColor: string;
3846
3808
  /** Background fill colour (e.g. "#dbeafe"). */
3847
3809
  secondaryColor: string;
3848
- }
3810
+ };
3849
3811
 
3850
3812
  /**
3851
3813
  * Represents a single calendar event.
@@ -3854,7 +3816,7 @@ interface ColorPreset {
3854
3816
  * Layout properties (`column`, `width`, `continued`, `continuedEnd`) are
3855
3817
  * computed by {@link CalendarEventLayoutService} and should not be set manually.
3856
3818
  */
3857
- interface CalendarEvent {
3819
+ type CalendarEvent = {
3858
3820
  /** Unique identifier for the event. */
3859
3821
  id: string;
3860
3822
  /** Display title. */
@@ -3868,9 +3830,9 @@ interface CalendarEvent {
3868
3830
  /** Colour scheme used for rendering. */
3869
3831
  color: ColorPreset;
3870
3832
  /** Optional custom component type to render this event (overrides the default renderer). */
3871
- component?: Type<any>;
3833
+ component?: Type<unknown>;
3872
3834
  /** Arbitrary payload attached to the event (passed through to custom renderers). */
3873
- data?: any;
3835
+ data?: unknown;
3874
3836
  /** Zero-based column index within overlapping event groups. */
3875
3837
  column?: number;
3876
3838
  /** Number of sub-columns this event spans. */
@@ -3879,44 +3841,44 @@ interface CalendarEvent {
3879
3841
  continued?: boolean;
3880
3842
  /** `true` when this segment continues into the next day (multi-day events). */
3881
3843
  continuedEnd?: boolean;
3882
- }
3844
+ };
3883
3845
  /**
3884
3846
  * Represents a button displayed in the calendar toolbar's top-right area.
3885
3847
  */
3886
- interface CalendarButton {
3848
+ type CalendarButton = {
3887
3849
  /** Display label for the button. */
3888
3850
  label: string;
3889
3851
  /** Button styling configuration passed to the mnButton directive. */
3890
3852
  buttonData?: Partial<MnButtonTypes>;
3891
3853
  /** Callback invoked when the button is clicked. */
3892
3854
  onClick: () => void;
3893
- }
3855
+ };
3894
3856
  /**
3895
3857
  * Represents the "current time" indicator rendered as a line in week/day views.
3896
3858
  */
3897
- interface CurrentTimeCalendarEvent {
3859
+ type CurrentTimeCalendarEvent = {
3898
3860
  id: 'current-time';
3899
3861
  title: string;
3900
3862
  startTime: Date;
3901
3863
  endTime: Date;
3902
3864
  column: number;
3903
3865
  width: number;
3904
- }
3866
+ };
3905
3867
 
3906
3868
  /**
3907
3869
  * Contract for pluggable event renderer components.
3908
3870
  *
3909
3871
  * Any component that implements this interface can be used as a custom
3910
3872
  * event template inside the calendar. Pass the component type via
3911
- * `[CalendarEventComponent]` on `<app-calendar-view>`.
3873
+ * `[CalendarEventComponent]` on `<mn-calendar-view>`.
3912
3874
  *
3913
3875
  * The calendar will set the `event` property after creating the component
3914
3876
  * dynamically via `ViewContainerRef.createComponent()`.
3915
3877
  */
3916
- interface CalendarEventData {
3878
+ type CalendarEventData = {
3917
3879
  /** The calendar event to render. Set by the calendar after component creation. */
3918
3880
  event: CalendarEvent;
3919
- }
3881
+ };
3920
3882
 
3921
3883
  /**
3922
3884
  * Available calendar view modes.
@@ -3928,14 +3890,14 @@ declare enum CalendarView {
3928
3890
  }
3929
3891
  /**
3930
3892
  * Configuration for the calendar component.
3931
- * All properties are optional sensible defaults are provided.
3893
+ * All properties are optional — sensible defaults are provided.
3932
3894
  * Can be supplied via the `CALENDAR_CONFIG` injection token or through
3933
3895
  * the `provideMnComponentConfig` helper using component name `'mn-calendar'`.
3934
3896
  */
3935
- interface CalendarConfig {
3936
- /** First visible hour in week/day views (023). Default: `7`. */
3897
+ type CalendarConfig = {
3898
+ /** First visible hour in week/day views (0–23). Default: `7`. */
3937
3899
  startHour: number;
3938
- /** Last visible hour in week/day views (124, exclusive). Default: `22`. */
3900
+ /** Last visible hour in week/day views (1–24, exclusive). Default: `22`. */
3939
3901
  endHour: number;
3940
3902
  /** BCP 47 locale tag used for date/time formatting (e.g. `'en-US'`, `'nl-NL'`). Default: `'en-US'`. */
3941
3903
  locale: string;
@@ -3953,7 +3915,7 @@ interface CalendarConfig {
3953
3915
  longDayNames: string[];
3954
3916
  /** Screen-width breakpoint (px) below which only day view is shown. Default: `768`. */
3955
3917
  mobileBreakpoint: number;
3956
- }
3918
+ };
3957
3919
  /** Default calendar configuration values. */
3958
3920
  declare const DEFAULT_CALENDAR_CONFIG: CalendarConfig;
3959
3921
  /**
@@ -4002,10 +3964,10 @@ declare const MN_CALENDAR_COMPONENT_NAME = "mn-calendar";
4002
3964
  * Provider helper that wires the calendar into the `mn-config` system.
4003
3965
  *
4004
3966
  * Add this to the `providers` array of the component (or module) that hosts
4005
- * `<app-calendar-view>`. It reads defaults and overrides from `mn-config.json5`
3967
+ * `<mn-calendar-view>`. It reads defaults and overrides from `mn-config.json5`
4006
3968
  * under the key `"mn-calendar"` and provides them via {@link MN_CALENDAR_CONFIG}.
4007
3969
  *
4008
- * @param initial optional partial defaults merged before config-file values.
3970
+ * @param initial — optional partial defaults merged before config-file values.
4009
3971
  */
4010
3972
  declare function provideMnCalendarConfig(initial?: Partial<CalendarConfig>): i0.Provider;
4011
3973
  /**
@@ -4015,34 +3977,34 @@ declare function resolveCalendarConfig(partial?: Partial<CalendarConfig>): Calen
4015
3977
  /**
4016
3978
  * Represents a half-hour row in the week/day time grid.
4017
3979
  */
4018
- interface HourRow {
4019
- /** The hour value (e.g. 7, 8, ). */
3980
+ type HourRow = {
3981
+ /** The hour value (e.g. 7, 8, …). */
4020
3982
  hour: number;
4021
3983
  /** CSS grid row start (1-based). */
4022
3984
  topRow: number;
4023
3985
  /** CSS grid row end (1-based, exclusive). */
4024
3986
  bottomRow: number;
4025
- }
3987
+ };
4026
3988
  /**
4027
3989
  * Represents a single day column in the week view header.
4028
3990
  */
4029
- interface ColumnDay {
3991
+ type ColumnDay = {
4030
3992
  /** The date this column represents. */
4031
3993
  date: Date;
4032
3994
  /** Abbreviated day name (e.g. "Mon"). */
4033
3995
  dayName: string;
4034
- /** Day-of-month number (131). */
3996
+ /** Day-of-month number (1–31). */
4035
3997
  dayNumber: number;
4036
3998
  /** Whether this column is today. */
4037
3999
  isToday: boolean;
4038
- }
4000
+ };
4039
4001
  /**
4040
4002
  * Represents a single cell in the month grid.
4041
4003
  */
4042
- interface MonthItem {
4004
+ type MonthItem = {
4043
4005
  /** The date this cell represents. */
4044
4006
  date: Date;
4045
- /** Day-of-month number (131). */
4007
+ /** Day-of-month number (1–31). */
4046
4008
  dayNumber: number;
4047
4009
  /** Whether this date belongs to the currently focused month. */
4048
4010
  isCurrentMonth: boolean;
@@ -4050,45 +4012,7 @@ interface MonthItem {
4050
4012
  isToday: boolean;
4051
4013
  /** Events occurring on this date. */
4052
4014
  events: CalendarEvent[];
4053
- }
4054
-
4055
- /**
4056
- * Abstraction for date/time formatting used by calendar components.
4057
- *
4058
- * The library ships a default implementation ({@link DefaultCalendarDateFormatter})
4059
- * that uses `Intl.DateTimeFormat`. Consumers can provide their own implementation
4060
- * (e.g. wrapping `@ngx-translate`) via the {@link CALENDAR_DATE_FORMATTER} token.
4061
- *
4062
- * Locale-independent settings (day names, view labels, "Today" label) have been
4063
- * moved to {@link CalendarConfig} so they can be configured declaratively.
4064
- */
4065
- interface CalendarDateFormatter {
4066
- /** Formats an hour + minute pair (e.g. `9, 0` → `"09:00 AM"`). */
4067
- formatTimeI(hour: number, minute: number): Promise<string>;
4068
- /** Formats the time portion of a Date. Returns `''` for `undefined`. */
4069
- formatTime(date: Date | undefined): Promise<string>;
4070
- /** Formats a full date-time string as an Observable. */
4071
- formatDateTime(date: Date): Observable<string>;
4072
- /** Formats a date-only string as an Observable. */
4073
- formatDate(date: Date): Observable<string>;
4074
- /** Formats a Date as `YYYY-MM-DD` for `<input type="date">`. */
4075
- formatDateForFormControl(date: Date): string;
4076
- /** Returns `true` when both dates fall on the same calendar day. */
4077
- isSameDay(date1: Date, date2: Date): boolean;
4078
- /** Formats a Date as "Month Year" (e.g. "January 2026"). */
4079
- formatMonthName(date: Date): Promise<string>;
4080
- }
4081
- /**
4082
- * Injection token for the calendar date formatter.
4083
- *
4084
- * @example
4085
- * ```ts
4086
- * providers: [
4087
- * { provide: CALENDAR_DATE_FORMATTER, useClass: MyCustomFormatter }
4088
- * ]
4089
- * ```
4090
- */
4091
- declare const CALENDAR_DATE_FORMATTER: InjectionToken<CalendarDateFormatter>;
4015
+ };
4092
4016
 
4093
4017
  /**
4094
4018
  * Main calendar orchestrator component.
@@ -4104,14 +4028,14 @@ declare const CALENDAR_DATE_FORMATTER: InjectionToken<CalendarDateFormatter>;
4104
4028
  *
4105
4029
  * @example
4106
4030
  * ```html
4107
- * <app-calendar-view
4031
+ * <mn-calendar-view
4108
4032
  * [showButton]="true"
4109
4033
  * [buttonTitle]="'New Event'"
4110
4034
  * [NewCalendarItemsEvent]="eventsEmitter"
4111
4035
  * (RequestNewCalendarItemsEvent)="loadEvents($event)"
4112
4036
  * (CalendarItemClickedEvent)="onEventClick($event)"
4113
4037
  * (ButtonClickedEvent)="openModal()">
4114
- * </app-calendar-view>
4038
+ * </mn-calendar-view>
4115
4039
  * ```
4116
4040
  */
4117
4041
  declare class CalendarViewComponent implements OnInit, OnDestroy {
@@ -4152,7 +4076,7 @@ declare class CalendarViewComponent implements OnInit, OnDestroy {
4152
4076
  private readonly mnConfigRef;
4153
4077
  private readonly destroyRef;
4154
4078
  private readonly lang;
4155
- constructor(formatter: CalendarDateFormatter | null, mnConfig: CalendarConfig | null, legacyConfig: CalendarConfig | null);
4079
+ constructor();
4156
4080
  onResize(): void;
4157
4081
  ngOnInit(): void;
4158
4082
  ngOnDestroy(): void;
@@ -4168,7 +4092,7 @@ declare class CalendarViewComponent implements OnInit, OnDestroy {
4168
4092
  onDateInputChange(event: Event): void;
4169
4093
  /** Handles the mn-lib-datetime ngModel change. */
4170
4094
  onDateStringChange(value: string): void;
4171
- /** Handles a day click from the month view switches to day view. */
4095
+ /** Handles a day click from the month view — switches to day view. */
4172
4096
  onMonthDayClick(date: Date): void;
4173
4097
  /** Forwards a child event click to the parent output. */
4174
4098
  onEventClick(event: CalendarEvent): void;
@@ -4181,64 +4105,14 @@ declare class CalendarViewComponent implements OnInit, OnDestroy {
4181
4105
  private checkMobileView;
4182
4106
  private setFocusDay;
4183
4107
  private updateDateInput;
4184
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarViewComponent, [{ optional: true; }, { optional: true; }, { optional: true; }]>;
4185
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarViewComponent, "app-calendar-view", never, { "showButton": { "alias": "showButton"; "required": false; }; "buttonTitle": { "alias": "buttonTitle"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "CalendarEventComponent": { "alias": "CalendarEventComponent"; "required": false; }; "NewCalendarItemsEvent": { "alias": "NewCalendarItemsEvent"; "required": false; }; }, { "RequestNewCalendarItemsEvent": "RequestNewCalendarItemsEvent"; "CalendarItemClickedEvent": "CalendarItemClickedEvent"; "ButtonClickedEvent": "ButtonClickedEvent"; }, never, never, true, never>;
4186
- }
4187
-
4188
- /**
4189
- * Service that computes the visual layout of calendar events within a
4190
- * time-grid (week or day view).
4191
- *
4192
- * Responsibilities:
4193
- * - Splitting multi-day events into per-day segments.
4194
- * - Assigning non-overlapping column indices to concurrent events.
4195
- * - Computing the width (column span) each event should occupy.
4196
- *
4197
- * This service is stateless — all state is passed via method parameters.
4198
- * Provide it per-component (not root) so each view gets its own instance.
4199
- */
4200
- declare class CalendarEventLayoutService {
4201
- /**
4202
- * Returns `true` when two time ranges overlap (exclusive boundaries).
4203
- */
4204
- eventsOverlap(startA: Date, endA: Date, startB: Date, endB: Date): boolean;
4205
- /**
4206
- * Returns all events whose time range overlaps the given `[start, end)` window.
4207
- */
4208
- getAllEventsOnSpecificTime(events: CalendarEvent[], start: Date, end: Date): CalendarEvent[];
4209
- /**
4210
- * Splits multi-day events into per-day segments that fit within the
4211
- * visible hour range (`startHour`–`endHour`) and date range.
4212
- *
4213
- * Single-day events are shallow-copied as-is. Multi-day events produce
4214
- * one segment per day with `continued` / `continuedEnd` flags set.
4215
- */
4216
- calculateMultiDayEvents(events: CalendarEvent[], startHour: number, endHour: number, rangeStart: Date, rangeEnd: Date): CalendarEvent[];
4217
- /**
4218
- * Assigns a zero-based `column` index to each event so that overlapping
4219
- * events occupy different columns.
4220
- *
4221
- * Events are processed in start-time order (longest duration first for ties).
4222
- * Each event gets the earliest column not already occupied by an overlapping event.
4223
- */
4224
- assignColumnsToEvents(events: CalendarEvent[]): void;
4225
- /**
4226
- * Assigns a `width` (column span) to each event, expanding it to fill
4227
- * unused columns to its right within the overlapping group.
4228
- */
4229
- assignWidthsToEvents(events: CalendarEvent[], scanStart: Date, scanEnd: Date): void;
4230
- /** Finds the lowest column index not occupied by any overlapping event. */
4231
- private findEarliestPossibleColumn;
4232
- /** Computes the maximum width an event can span without overlapping a neighbour to its right. */
4233
- private findBiggestPossibleWidth;
4234
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventLayoutService, never>;
4235
- static ɵprov: i0.ɵɵInjectableDeclaration<CalendarEventLayoutService>;
4108
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarViewComponent, never>;
4109
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarViewComponent, "mn-calendar-view", never, { "showButton": { "alias": "showButton"; "required": false; }; "buttonTitle": { "alias": "buttonTitle"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "CalendarEventComponent": { "alias": "CalendarEventComponent"; "required": false; }; "NewCalendarItemsEvent": { "alias": "NewCalendarItemsEvent"; "required": false; }; }, { "RequestNewCalendarItemsEvent": "RequestNewCalendarItemsEvent"; "CalendarItemClickedEvent": "CalendarItemClickedEvent"; "ButtonClickedEvent": "ButtonClickedEvent"; }, never, never, true, never>;
4236
4110
  }
4237
4111
 
4238
4112
  /** Extended hour row with a pre-resolved display label. */
4239
- interface DisplayHourRow$1 extends HourRow {
4113
+ type DisplayHourRow$1 = {
4240
4114
  hourLabel: string;
4241
- }
4115
+ } & HourRow;
4242
4116
  /**
4243
4117
  * Week grid view showing 7 day columns with half-hour time slots.
4244
4118
  *
@@ -4273,7 +4147,7 @@ declare class CalendarWeekComponent implements OnInit, OnDestroy {
4273
4147
  private formatter;
4274
4148
  private resolvedConfig;
4275
4149
  private currentTimeInterval?;
4276
- constructor(layoutService: CalendarEventLayoutService, cdr: ChangeDetectorRef);
4150
+ constructor();
4277
4151
  ngOnInit(): void;
4278
4152
  ngOnDestroy(): void;
4279
4153
  /** Returns the CSS `grid-row` value for an event based on its start/end times. */
@@ -4291,7 +4165,7 @@ declare class CalendarWeekComponent implements OnInit, OnDestroy {
4291
4165
  /** trackBy for events. */
4292
4166
  trackByEvent(_index: number, event: CalendarEvent): string;
4293
4167
  private buildHourRows;
4294
- /** Builds the 7 day columns for the current week (MondaySunday). */
4168
+ /** Builds the 7 day columns for the current week (Monday–Sunday). */
4295
4169
  private buildColumns;
4296
4170
  /** Filters, splits, and lays out events for the current week. */
4297
4171
  private refreshEvents;
@@ -4300,13 +4174,13 @@ declare class CalendarWeekComponent implements OnInit, OnDestroy {
4300
4174
  /** Updates the current-time red line position. */
4301
4175
  private updateCurrentTime;
4302
4176
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarWeekComponent, never>;
4303
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarWeekComponent, "app-calendar-week", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; "calendarEventComponent": { "alias": "calendarEventComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4177
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarWeekComponent, "mn-calendar-week", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; "calendarEventComponent": { "alias": "calendarEventComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4304
4178
  }
4305
4179
 
4306
4180
  /** Extended hour row with a pre-resolved display label. */
4307
- interface DisplayHourRow extends HourRow {
4181
+ type DisplayHourRow = {
4308
4182
  hourLabel: string;
4309
- }
4183
+ } & HourRow;
4310
4184
  /**
4311
4185
  * Day grid view showing a single day with half-hour time slots.
4312
4186
  *
@@ -4340,7 +4214,7 @@ declare class CalendarDayComponent implements OnInit, OnDestroy {
4340
4214
  private formatter;
4341
4215
  private resolvedConfig;
4342
4216
  private currentTimeInterval?;
4343
- constructor(layoutService: CalendarEventLayoutService, cdr: ChangeDetectorRef);
4217
+ constructor();
4344
4218
  ngOnInit(): void;
4345
4219
  ngOnDestroy(): void;
4346
4220
  /** Returns the CSS `grid-row` value for an event. */
@@ -4361,11 +4235,11 @@ declare class CalendarDayComponent implements OnInit, OnDestroy {
4361
4235
  /** Updates the current-time red line position. */
4362
4236
  private updateCurrentTime;
4363
4237
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarDayComponent, never>;
4364
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarDayComponent, "app-calendar-day", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; "calendarEventComponent": { "alias": "calendarEventComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4238
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarDayComponent, "mn-calendar-day", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; "calendarEventComponent": { "alias": "calendarEventComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4365
4239
  }
4366
4240
 
4367
4241
  /**
4368
- * Month grid view showing a 7×6 grid of day cells.
4242
+ * Month grid view showing a 7×6 grid of day cells.
4369
4243
  *
4370
4244
  * Each cell displays the day number and up to 3 coloured dots representing
4371
4245
  * events on that day. Clicking a cell emits `dayClicked`.
@@ -4397,11 +4271,11 @@ declare class CalendarMonthComponent implements OnInit, OnDestroy {
4397
4271
  trackByMonthItem(_index: number, item: MonthItem): number;
4398
4272
  /** trackBy for event dots. */
4399
4273
  trackByEventDot(_index: number, event: CalendarEvent): string;
4400
- /** Builds the 42-cell month grid (6 rows × 7 columns). */
4274
+ /** Builds the 42-cell month grid (6 rows × 7 columns). */
4401
4275
  private buildMonth;
4402
4276
  private createMonthItem;
4403
4277
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarMonthComponent, never>;
4404
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarMonthComponent, "app-calendar-month", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "dayClicked": "dayClicked"; }, never, never, true, never>;
4278
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarMonthComponent, "mn-calendar-month", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "dayClicked": "dayClicked"; }, never, never, true, never>;
4405
4279
  }
4406
4280
 
4407
4281
  /**
@@ -4429,7 +4303,7 @@ declare class CalendarEventComponent implements AfterViewInit, OnChanges {
4429
4303
  /** Creates the event component dynamically and sets its `event` property. */
4430
4304
  private renderComponent;
4431
4305
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventComponent, never>;
4432
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventComponent, "app-calendar-event", never, { "event": { "alias": "event"; "required": false; }; "customComponent": { "alias": "customComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4306
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventComponent, "mn-calendar-event", never, { "event": { "alias": "event"; "required": false; }; "customComponent": { "alias": "customComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4433
4307
  }
4434
4308
 
4435
4309
  /**
@@ -4444,10 +4318,10 @@ declare class CalendarEventDefaultComponent implements CalendarEventData, OnInit
4444
4318
  event: CalendarEvent;
4445
4319
  formattedTime: string;
4446
4320
  private formatter;
4447
- constructor(formatter: CalendarDateFormatter | null, cdr: ChangeDetectorRef);
4321
+ constructor();
4448
4322
  ngOnInit(): Promise<void>;
4449
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventDefaultComponent, [{ optional: true; }, null]>;
4450
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventDefaultComponent, "app-calendar-event-default", never, {}, {}, never, never, true, never>;
4323
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventDefaultComponent, never>;
4324
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventDefaultComponent, "mn-calendar-event-default", never, {}, {}, never, never, true, never>;
4451
4325
  }
4452
4326
 
4453
4327
  /**
@@ -4473,7 +4347,7 @@ declare class UpcomingEventsComponent implements OnInit, OnChanges, OnDestroy {
4473
4347
  /** trackBy for upcoming event rows. */
4474
4348
  trackByEvent(_index: number, event: CalendarEvent): string;
4475
4349
  static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingEventsComponent, never>;
4476
- static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingEventsComponent, "app-upcoming-events", never, { "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4350
+ static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingEventsComponent, "mn-upcoming-events", never, { "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4477
4351
  }
4478
4352
 
4479
4353
  /**
@@ -4487,12 +4361,50 @@ declare class UpcomingEventRowComponent implements OnInit {
4487
4361
  eventClicked: EventEmitter<CalendarEvent>;
4488
4362
  formattedDate: string;
4489
4363
  private formatter;
4490
- constructor(formatter: CalendarDateFormatter | null);
4364
+ constructor();
4491
4365
  ngOnInit(): Promise<void>;
4492
- static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingEventRowComponent, [{ optional: true; }]>;
4493
- static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingEventRowComponent, "app-upcoming-event-row", never, { "event": { "alias": "event"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4366
+ static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingEventRowComponent, never>;
4367
+ static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingEventRowComponent, "mn-upcoming-event-row", never, { "event": { "alias": "event"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
4494
4368
  }
4495
4369
 
4370
+ /**
4371
+ * Abstraction for date/time formatting used by calendar components.
4372
+ *
4373
+ * The library ships a default implementation ({@link DefaultCalendarDateFormatter})
4374
+ * that uses `Intl.DateTimeFormat`. Consumers can provide their own implementation
4375
+ * (e.g. wrapping `@ngx-translate`) via the {@link CALENDAR_DATE_FORMATTER} token.
4376
+ *
4377
+ * Locale-independent settings (day names, view labels, "Today" label) have been
4378
+ * moved to {@link CalendarConfig} so they can be configured declaratively.
4379
+ */
4380
+ type CalendarDateFormatter = {
4381
+ /** Formats an hour + minute pair (e.g. `9, 0` → `"09:00 AM"`). */
4382
+ formatTimeI(hour: number, minute: number): Promise<string>;
4383
+ /** Formats the time portion of a Date. Returns `''` for `undefined`. */
4384
+ formatTime(date: Date | undefined): Promise<string>;
4385
+ /** Formats a full date-time string as an Observable. */
4386
+ formatDateTime(date: Date): Observable<string>;
4387
+ /** Formats a date-only string as an Observable. */
4388
+ formatDate(date: Date): Observable<string>;
4389
+ /** Formats a Date as `YYYY-MM-DD` for `<input type="date">`. */
4390
+ formatDateForFormControl(date: Date): string;
4391
+ /** Returns `true` when both dates fall on the same calendar day. */
4392
+ isSameDay(date1: Date, date2: Date): boolean;
4393
+ /** Formats a Date as "Month Year" (e.g. "January 2026"). */
4394
+ formatMonthName(date: Date): Promise<string>;
4395
+ };
4396
+ /**
4397
+ * Injection token for the calendar date formatter.
4398
+ *
4399
+ * @example
4400
+ * ```ts
4401
+ * providers: [
4402
+ * { provide: CALENDAR_DATE_FORMATTER, useClass: MyCustomFormatter }
4403
+ * ]
4404
+ * ```
4405
+ */
4406
+ declare const CALENDAR_DATE_FORMATTER: InjectionToken<CalendarDateFormatter>;
4407
+
4496
4408
  /**
4497
4409
  * Default implementation of {@link CalendarDateFormatter} that uses the
4498
4410
  * browser's `Intl.DateTimeFormat` API for locale-aware formatting.
@@ -4506,7 +4418,7 @@ declare class UpcomingEventRowComponent implements OnInit {
4506
4418
  */
4507
4419
  declare class DefaultCalendarDateFormatter implements CalendarDateFormatter {
4508
4420
  private readonly locale;
4509
- constructor(config?: CalendarConfig | null);
4421
+ constructor();
4510
4422
  /** Formats an hour and minute pair into a locale time string (e.g. "09:00 AM"). */
4511
4423
  formatTimeI(hour: number, minute: number): Promise<string>;
4512
4424
  /** Formats the time portion of a Date (e.g. "2:30 PM"). Returns empty string for undefined. */
@@ -4521,10 +4433,60 @@ declare class DefaultCalendarDateFormatter implements CalendarDateFormatter {
4521
4433
  isSameDay(date1: Date, date2: Date): boolean;
4522
4434
  /** Formats a Date as "Month Year" (e.g. "January 2026"). */
4523
4435
  formatMonthName(date: Date): Promise<string>;
4524
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultCalendarDateFormatter, [{ optional: true; }]>;
4436
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultCalendarDateFormatter, never>;
4525
4437
  static ɵprov: i0.ɵɵInjectableDeclaration<DefaultCalendarDateFormatter>;
4526
4438
  }
4527
4439
 
4440
+ /**
4441
+ * Service that computes the visual layout of calendar events within a
4442
+ * time-grid (week or day view).
4443
+ *
4444
+ * Responsibilities:
4445
+ * - Splitting multi-day events into per-day segments.
4446
+ * - Assigning non-overlapping column indices to concurrent events.
4447
+ * - Computing the width (column span) each event should occupy.
4448
+ *
4449
+ * This service is stateless — all state is passed via method parameters.
4450
+ * Provide it per-component (not root) so each view gets its own instance.
4451
+ */
4452
+ declare class CalendarEventLayoutService {
4453
+ /**
4454
+ * Returns `true` when two time ranges overlap (exclusive boundaries).
4455
+ */
4456
+ eventsOverlap(startA: Date, endA: Date, startB: Date, endB: Date): boolean;
4457
+ /**
4458
+ * Returns all events whose time range overlaps the given `[start, end)` window.
4459
+ */
4460
+ getAllEventsOnSpecificTime(events: CalendarEvent[], start: Date, end: Date): CalendarEvent[];
4461
+ /**
4462
+ * Splits multi-day events into per-day segments that fit within the
4463
+ * visible hour range (`startHour`–`endHour`) and date range.
4464
+ *
4465
+ * Single-day events are shallow-copied as-is. Multi-day events produce
4466
+ * one segment per day with `continued` / `continuedEnd` flags set.
4467
+ */
4468
+ calculateMultiDayEvents(events: CalendarEvent[], startHour: number, endHour: number, rangeStart: Date, rangeEnd: Date): CalendarEvent[];
4469
+ /**
4470
+ * Assigns a zero-based `column` index to each event so that overlapping
4471
+ * events occupy different columns.
4472
+ *
4473
+ * Events are processed in start-time order (longest duration first for ties).
4474
+ * Each event gets the earliest column not already occupied by an overlapping event.
4475
+ */
4476
+ assignColumnsToEvents(events: CalendarEvent[]): void;
4477
+ /**
4478
+ * Assigns a `width` (column span) to each event, expanding it to fill
4479
+ * unused columns to its right within the overlapping group.
4480
+ */
4481
+ assignWidthsToEvents(events: CalendarEvent[], scanStart: Date, scanEnd: Date): void;
4482
+ /** Finds the lowest column index not occupied by any overlapping event. */
4483
+ private findEarliestPossibleColumn;
4484
+ /** Computes the maximum width an event can span without overlapping a neighbour to its right. */
4485
+ private findBiggestPossibleWidth;
4486
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventLayoutService, never>;
4487
+ static ɵprov: i0.ɵɵInjectableDeclaration<CalendarEventLayoutService>;
4488
+ }
4489
+
4528
4490
  /**
4529
4491
  * Static utility methods for calendar grid positioning.
4530
4492
  */
@@ -4549,25 +4511,25 @@ declare class CalendarUtility {
4549
4511
  /**
4550
4512
  * Configuration for a single tab item.
4551
4513
  */
4552
- interface MnTabItem {
4514
+ type MnTabItem = {
4553
4515
  /** Translation key or label text for the tab. */
4554
4516
  label: string;
4555
4517
  /** Callback invoked when this tab becomes active. */
4556
4518
  onClick?: () => void;
4557
4519
  /** Callback invoked when this tab is deactivated. */
4558
4520
  onDeactivate?: () => void;
4559
- /** Optional notification count shown as a badge on the tab. Hidden when 0 or absent. */
4560
- badge?: number;
4561
- }
4521
+ /** Optional notification count shown as a badge on the tab. Accepts a plain number or a Signal<number>. Hidden when 0 or absent. */
4522
+ badge?: number | Signal<number>;
4523
+ };
4562
4524
  /**
4563
4525
  * Data source configuration for the mn-tab component.
4564
4526
  */
4565
- interface MnTabDataSource {
4527
+ type MnTabDataSource = {
4566
4528
  /** List of tab items to display. */
4567
4529
  items: MnTabItem[];
4568
4530
  /** Index of the tab that should be active by default. */
4569
4531
  defaultActive: number;
4570
- }
4532
+ };
4571
4533
 
4572
4534
  /**
4573
4535
  * Tab component that renders a horizontal tab bar.
@@ -4592,6 +4554,11 @@ declare class MnTabComponent implements OnInit {
4592
4554
  currentActive?: MnTabItem;
4593
4555
  /** Initializes the default active tab based on the data source configuration. */
4594
4556
  ngOnInit(): void;
4557
+ /**
4558
+ * Returns the resolved badge value for a tab item, supporting both plain numbers and Signal<number>.
4559
+ * @param item - The tab item whose badge to resolve.
4560
+ */
4561
+ getBadge(item: MnTabItem): number | undefined;
4595
4562
  /**
4596
4563
  * Sets the given tab item as active, invoking deactivate/activate callbacks.
4597
4564
  * @param item - The tab item to activate.
@@ -4634,11 +4601,11 @@ declare const mnIconVariants: tailwind_variants.TVReturnType<{
4634
4601
  }, undefined, "inline-flex shrink-0", unknown, unknown, undefined>>;
4635
4602
  type MnIconVariants = VariantProps<typeof mnIconVariants>;
4636
4603
 
4637
- interface MnIconTypes {
4604
+ type MnIconTypes = {
4638
4605
  name: string;
4639
4606
  size: number;
4640
4607
  color: MnIconVariants['color'];
4641
- }
4608
+ };
4642
4609
 
4643
4610
  declare class MnIcon implements OnChanges, OnInit {
4644
4611
  data: Partial<MnIconTypes>;
@@ -4665,13 +4632,13 @@ declare class MnIconAttributes {
4665
4632
  /**
4666
4633
  * Types for mn-lib configuration.
4667
4634
  */
4668
- interface MnConfigSettings {
4635
+ type MnConfigSettings = {
4669
4636
  /** Application or library version. */
4670
4637
  version?: string;
4671
4638
  /** Application or library name. */
4672
4639
  name?: string;
4673
- }
4674
- interface MnConfigFile {
4640
+ };
4641
+ type MnConfigFile = {
4675
4642
  /**
4676
4643
  * General settings such as version and name.
4677
4644
  */
@@ -4685,8 +4652,8 @@ interface MnConfigFile {
4685
4652
  * component-name keys (component override objects) and keys starting with '#'
4686
4653
  * representing instance-id overrides.
4687
4654
  */
4688
- overrides: unknown;
4689
- }
4655
+ overrides: Record<string, unknown>;
4656
+ };
4690
4657
 
4691
4658
  declare class MnConfigService {
4692
4659
  private readonly http;
@@ -4697,7 +4664,6 @@ declare class MnConfigService {
4697
4664
  private _configVersion;
4698
4665
  readonly configVersion: i0.Signal<number>;
4699
4666
  private readonly lang;
4700
- constructor(http: HttpClient);
4701
4667
  /** General settings from the config file (version, name, etc.). */
4702
4668
  get settings(): Readonly<MnConfigSettings>;
4703
4669
  /**
@@ -4710,12 +4676,12 @@ declare class MnConfigService {
4710
4676
  * Used for live preview scenarios where config is pushed via postMessage.
4711
4677
  * Optionally re-bootstraps the language service if a `language` section is present.
4712
4678
  */
4713
- loadFromObject(config: Record<string, any>, bootstrapLanguage?: boolean): Promise<void>;
4679
+ loadFromObject(config: Record<string, unknown>, bootstrapLanguage?: boolean): Promise<void>;
4714
4680
  /**
4715
4681
  * Resolve a configuration object for a component, optionally scoped to a section path
4716
4682
  * and optionally overridden by an instance id.
4717
4683
  */
4718
- resolve<T extends object = any>(componentName: string, sectionPath?: string[], instanceId?: string): T;
4684
+ resolve<T extends object = Record<string, unknown>>(componentName: string, sectionPath?: string[], instanceId?: string): T;
4719
4685
  /**
4720
4686
  * Walk the overrides nested object using the provided section path and return the leaf node.
4721
4687
  * If any segment is missing or the current node is not a plain object, returns undefined.
@@ -4730,7 +4696,7 @@ declare class MnConfigService {
4730
4696
  * Deep merge two plain-object trees. Arrays and non-plain values are replaced by the patch.
4731
4697
  * Does not mutate inputs; returns a new object.
4732
4698
  */
4733
- deepMerge<A extends Record<string, any>, B extends Record<string, any>>(base: A, patch: B): A & B;
4699
+ deepMerge<A extends Record<string, unknown>, B extends Record<string, unknown>>(base: A, patch: B): A & B;
4734
4700
  static ɵfac: i0.ɵɵFactoryDeclaration<MnConfigService, never>;
4735
4701
  static ɵprov: i0.ɵɵInjectableDeclaration<MnConfigService>;
4736
4702
  }
@@ -4787,7 +4753,7 @@ declare class MnInstanceDirective {
4787
4753
  * and retry information — so consumers can log, display, or act on
4788
4754
  * failures without inspecting the raw HTTP response.
4789
4755
  */
4790
- interface ApiError {
4756
+ type ApiError = {
4791
4757
  status: HttpStatusCode | null;
4792
4758
  message: string;
4793
4759
  details?: unknown;
@@ -4798,7 +4764,7 @@ interface ApiError {
4798
4764
  original: HttpErrorResponse | Error;
4799
4765
  retryable: boolean;
4800
4766
  timestamp: string;
4801
- }
4767
+ };
4802
4768
  /**
4803
4769
  * Metadata associated with an API result.
4804
4770
  *
@@ -4806,11 +4772,11 @@ interface ApiError {
4806
4772
  * transport-level details such as the HTTP status code, response
4807
4773
  * headers, and the final URL after any redirects.
4808
4774
  */
4809
- interface ResultMeta {
4775
+ type ResultMeta = {
4810
4776
  statusCode?: number;
4811
4777
  headers?: HttpHeaders;
4812
4778
  url?: string;
4813
- }
4779
+ };
4814
4780
  /**
4815
4781
  * Represents a successful API result containing the response data.
4816
4782
  *
@@ -4819,22 +4785,22 @@ interface ResultMeta {
4819
4785
  *
4820
4786
  * @template T The type of the response data.
4821
4787
  */
4822
- interface SuccessResult<T> {
4788
+ type SuccessResult<T> = {
4823
4789
  ok: true;
4824
4790
  data: T;
4825
4791
  meta?: ResultMeta;
4826
- }
4792
+ };
4827
4793
  /**
4828
4794
  * Represents a failed API result containing the structured error.
4829
4795
  *
4830
4796
  * Discriminated by `ok: false`. Use `result.ok` to narrow the union
4831
4797
  * before accessing `error`.
4832
4798
  */
4833
- interface FailureResult {
4799
+ type FailureResult = {
4834
4800
  ok: false;
4835
4801
  error: ApiError;
4836
4802
  meta?: ResultMeta;
4837
- }
4803
+ };
4838
4804
  /**
4839
4805
  * A discriminated union representing either a successful or failed API result.
4840
4806
  *
@@ -4872,9 +4838,9 @@ type QueryParams = Record<string, QueryValue>;
4872
4838
  * Passed to the `CrudService` constructor to define which API
4873
4839
  * resource the service operates on.
4874
4840
  */
4875
- interface CrudConfig {
4841
+ type CrudConfig = {
4876
4842
  endpoint: string;
4877
- }
4843
+ };
4878
4844
  /**
4879
4845
  * Abstract base class for CRUD services.
4880
4846
  * Provides standard HTTP operations with typed `Result<T>` responses.
@@ -5146,10 +5112,10 @@ declare abstract class MnHttpService {
5146
5112
  * Example in mn-config.json5:
5147
5113
  * label: { $translate: "form.email.label" }
5148
5114
  */
5149
- interface MnTranslatable {
5115
+ type MnTranslatable = {
5150
5116
  $translate: string;
5151
5117
  params?: Record<string, string | number>;
5152
- }
5118
+ };
5153
5119
  /**
5154
5120
  * A config value that is either a plain value or a translatable marker.
5155
5121
  */
@@ -5166,7 +5132,7 @@ type MnTranslations = Record<string, MnTranslationMap>;
5166
5132
  /**
5167
5133
  * Configuration for the language provider.
5168
5134
  */
5169
- interface MnLanguageConfig {
5135
+ type MnLanguageConfig = {
5170
5136
  /** URL pattern for loading translation files. Use `{locale}` as placeholder. e.g. "assets/i18n/{locale}.json" */
5171
5137
  urlPattern: string;
5172
5138
  /** The default/fallback locale. */
@@ -5181,7 +5147,7 @@ interface MnLanguageConfig {
5181
5147
  domainLocaleMap?: Record<string, string>;
5182
5148
  /** Whether to enable debug logging. */
5183
5149
  debug?: boolean;
5184
- }
5150
+ };
5185
5151
  /**
5186
5152
  * Type guard: checks whether a value is a translatable marker object.
5187
5153
  */
@@ -5189,13 +5155,13 @@ declare function isTranslatable(value: unknown): value is MnTranslatable;
5189
5155
 
5190
5156
  declare class MnLanguageService {
5191
5157
  private readonly http;
5158
+ private readonly appRef;
5192
5159
  private _translations;
5193
5160
  private _locale$;
5194
5161
  private _urlPattern;
5195
5162
  private _debug;
5196
5163
  /** Observable of the current active locale. */
5197
5164
  readonly locale$: Observable<string>;
5198
- constructor(http: HttpClient);
5199
5165
  /** Current active locale. */
5200
5166
  get locale(): string;
5201
5167
  /**
@@ -5269,17 +5235,16 @@ declare function provideMnLanguage(config: MnLanguageConfig): Provider[];
5269
5235
  */
5270
5236
  declare class MnTranslatePipe implements PipeTransform {
5271
5237
  private readonly lang;
5272
- constructor(lang: MnLanguageService);
5273
5238
  transform(key: string, params?: Record<string, string | number>): string;
5274
5239
  static ɵfac: i0.ɵɵFactoryDeclaration<MnTranslatePipe, never>;
5275
5240
  static ɵpipe: i0.ɵɵPipeDeclaration<MnTranslatePipe, "mnTranslate", true>;
5276
5241
  }
5277
5242
 
5278
- interface MnPreviewMessage {
5243
+ type MnPreviewMessage = {
5279
5244
  type: 'mn-config-update' | 'mn-translations-update';
5280
- config?: Record<string, any>;
5245
+ config?: Record<string, unknown>;
5281
5246
  translations?: Record<string, Record<string, string>>;
5282
- }
5247
+ };
5283
5248
  /**
5284
5249
  * Enable live preview mode. Listens for postMessage events from
5285
5250
  * Mn Web Manager and hot-swaps config/translations at runtime.
@@ -5293,4 +5258,4 @@ interface MnPreviewMessage {
5293
5258
  declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
5294
5259
 
5295
5260
  export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFormBodyComponent, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnShowAboveDirective, MnShowBelowDirective, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
5296
- export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DatetimeFieldConfig, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, HourRow, ListAppearance, ListDataSource, ListLabels, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessagesData, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPreviewMessage, MnQueryParams, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnShowInput, MnTabDataSource, MnTabItem, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };
5261
+ export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DatetimeFieldConfig, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, HourRow, ListAppearance, ListDataSource, ListLabels, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPreviewMessage, MnQueryParams, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnShowInput, MnTabDataSource, MnTabItem, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, MnValidationErrorArgs, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };