@ng-forge/dynamic-forms-material 1.3.0-next.2 → 1.3.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs +118 -33
  2. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -1
  3. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +112 -33
  4. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -1
  5. package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +96 -33
  6. package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -1
  7. package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +137 -29
  8. package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -1
  9. package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +316 -62
  10. package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -1
  11. package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +253 -107
  12. package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -1
  13. package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +179 -65
  14. package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -1
  15. package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +168 -27
  16. package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -1
  17. package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +253 -56
  18. package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -1
  19. package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +157 -27
  20. package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -1
  21. package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +206 -51
  22. package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -1
  23. package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +134 -29
  24. package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -1
  25. package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs +64 -0
  26. package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs.map +1 -0
  27. package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +7 -11
  28. package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -1
  29. package/fesm2022/ng-forge-dynamic-forms-material.mjs +241 -260
  30. package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +17 -17
  33. package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +23 -16
  34. package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +87 -81
  35. package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +27 -21
  36. package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +68 -40
  37. package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +54 -41
  38. package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +35 -24
  39. package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +30 -19
  40. package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +56 -38
  41. package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +33 -22
  42. package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +47 -34
  43. package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +29 -23
  44. package/types/ng-forge-dynamic-forms-material-shared.d.ts +56 -64
  45. package/types/ng-forge-dynamic-forms-material.d.ts +211 -237
  46. package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs +0 -26
  47. package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs.map +0 -1
@@ -1,301 +1,278 @@
1
- import { DynamicText, TextAddon, TemplateAddon, ValueType, FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
2
- import { CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, ButtonField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition, WrapperTypeDefinition } from '@ng-forge/dynamic-forms/integration';
3
- import { ThemePalette } from '@angular/material/core';
4
- import { MatFormFieldAppearance, SubscriptSizing, FloatLabelType } from '@angular/material/form-field';
5
- import { MatIconAddon, MatButtonAddon, MaterialConfig } from '@ng-forge/dynamic-forms-material/shared';
6
- export { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE, MatAddon, MatButtonAddon, MatIconAddon, MaterialConfig } from '@ng-forge/dynamic-forms-material/shared';
7
- import { MatButtonFieldComponent as MatButtonFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/button';
8
- import { MatCheckboxFieldComponent as MatCheckboxFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/checkbox';
9
- import { MatDatepickerFieldComponent as MatDatepickerFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/datepicker';
10
- import { MatInputFieldComponent as MatInputFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/input';
11
- import { MatMultiCheckboxFieldComponent as MatMultiCheckboxFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/multi-checkbox';
12
- import { MatRadioFieldComponent as MatRadioFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/radio';
13
- import { MatSelectFieldComponent as MatSelectFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/select';
14
- import { MatSliderFieldComponent as MatSliderFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/slider';
15
- import { MatTextareaFieldComponent as MatTextareaFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/textarea';
16
- import { MatToggleFieldComponent as MatToggleFieldComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/toggle';
17
- import { MatIconAddonComponent as MatIconAddonComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/addon-icon';
18
- import { MatButtonAddonComponent as MatButtonAddonComponent$1 } from '@ng-forge/dynamic-forms-material/lazy/addon-button';
19
- import { Provider } from '@angular/core';
20
-
1
+ import { AppendArrayItemEvent, ArrayAllowedChildren, DynamicText, FormConfig, FormEvent, FormSubmitEvent, InferFormValue, InsertArrayItemEvent, NarrowFields, NextPageEvent, PopArrayItemEvent, PrependArrayItemEvent, PreviousPageEvent, RegisteredFieldTypes, RemoveAtIndexEvent, ShiftArrayItemEvent, TemplateAddon, TextAddon, ValueType } from "@ng-forge/dynamic-forms";
2
+ import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, FieldTypeDefinition, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, WrapperTypeDefinition } from "@ng-forge/dynamic-forms/integration";
3
+ import { ThemePalette } from "@angular/material/core";
4
+ import { Provider } from "@angular/core";
5
+ import { FloatLabelType, MatFormFieldAppearance, SubscriptSizing } from "@angular/material/form-field";
6
+ import { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE, MatAddon, MatButtonAddon, MatButtonAddon as MatButtonAddon$1, MatIconAddon, MatIconAddon as MatIconAddon$1, MaterialConfig, MaterialConfig as MaterialConfig$1 } from "@ng-forge/dynamic-forms-material/shared";
7
+ import { MatButtonFieldComponent as MatButtonFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/button";
8
+ import { MatCheckboxFieldComponent as MatCheckboxFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/checkbox";
9
+ import { MatDatepickerFieldComponent as MatDatepickerFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/datepicker";
10
+ import { MatInputFieldComponent as MatInputFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/input";
11
+ import { MatMultiCheckboxFieldComponent as MatMultiCheckboxFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/multi-checkbox";
12
+ import { MatRadioFieldComponent as MatRadioFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/radio";
13
+ import { MatSelectFieldComponent as MatSelectFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/select";
14
+ import { MatSliderFieldComponent as MatSliderFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/slider";
15
+ import { MatTextareaFieldComponent as MatTextareaFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/textarea";
16
+ import { MatToggleFieldComponent as MatToggleFieldComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/toggle";
17
+ import { MatIconAddonComponent as MatIconAddonComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/addon-icon";
18
+ import { MatButtonAddonComponent as MatButtonAddonComponent$1 } from "@ng-forge/dynamic-forms-material/lazy/addon-button";
21
19
  interface MatCheckboxProps {
22
- color?: ThemePalette;
23
- disableRipple?: boolean;
24
- labelPosition?: 'before' | 'after';
25
- hint?: DynamicText;
26
- indeterminate?: boolean;
20
+ color?: ThemePalette;
21
+ disableRipple?: boolean;
22
+ labelPosition?: 'before' | 'after';
23
+ hint?: DynamicText;
24
+ indeterminate?: boolean;
27
25
  }
28
26
  type MatCheckboxField = CheckboxField<MatCheckboxProps>;
29
-
30
27
  interface MatDatepickerProps extends DatepickerProps {
31
- appearance?: MatFormFieldAppearance;
32
- color?: 'primary' | 'accent' | 'warn';
33
- disableRipple?: boolean;
34
- subscriptSizing?: SubscriptSizing;
35
- floatLabel?: FloatLabelType;
36
- hideRequiredMarker?: boolean;
37
- startView?: 'month' | 'year' | 'multi-year';
38
- touchUi?: boolean;
39
- hint?: DynamicText;
28
+ appearance?: MatFormFieldAppearance;
29
+ color?: 'primary' | 'accent' | 'warn';
30
+ disableRipple?: boolean;
31
+ subscriptSizing?: SubscriptSizing;
32
+ floatLabel?: FloatLabelType;
33
+ hideRequiredMarker?: boolean;
34
+ startView?: 'month' | 'year' | 'multi-year';
35
+ touchUi?: boolean;
36
+ hint?: DynamicText;
40
37
  }
41
38
  type MatDatepickerField = DatepickerField<MatDatepickerProps>;
42
-
43
39
  interface MatInputProps extends InputProps {
44
- appearance?: MatFormFieldAppearance;
45
- disableRipple?: boolean;
46
- subscriptSizing?: SubscriptSizing;
47
- floatLabel?: FloatLabelType;
48
- hideRequiredMarker?: boolean;
49
- hint?: DynamicText;
40
+ appearance?: MatFormFieldAppearance;
41
+ disableRipple?: boolean;
42
+ subscriptSizing?: SubscriptSizing;
43
+ floatLabel?: FloatLabelType;
44
+ hideRequiredMarker?: boolean;
45
+ hint?: DynamicText;
50
46
  }
51
47
  /**
52
48
  * Module-augmentable seam for adding custom addon types to `mat-input` at
53
49
  * the type level. Pair with `withCustomAddon(...)` for the runtime side:
54
50
  */
55
- interface MatAddonExtensions {
56
- }
51
+ interface MatAddonExtensions {}
57
52
  type MatAddonExtension = MatAddonExtensions[keyof MatAddonExtensions];
58
53
  /** Addon types accepted by `mat-input`. */
59
- type MatInputAddon = MatIconAddon | MatButtonAddon | TextAddon | TemplateAddon | MatAddonExtension;
54
+ type MatInputAddon = MatIconAddon$1 | MatButtonAddon$1 | TextAddon | TemplateAddon | MatAddonExtension;
60
55
  type MatInputField = InputField<MatInputProps> & {
61
- addons?: ReadonlyArray<MatInputAddon>;
56
+ addons?: ReadonlyArray<MatInputAddon>;
62
57
  };
63
-
64
58
  interface MatMultiCheckboxProps {
65
- disableRipple?: boolean;
66
- hint?: DynamicText;
67
- labelPosition?: 'before' | 'after';
68
- color?: ThemePalette;
59
+ disableRipple?: boolean;
60
+ hint?: DynamicText;
61
+ labelPosition?: 'before' | 'after';
62
+ color?: ThemePalette;
69
63
  }
70
64
  type MatMultiCheckboxField<T> = MultiCheckboxField<T, MatMultiCheckboxProps>;
71
-
72
65
  interface MatRadioProps {
73
- disableRipple?: boolean;
74
- color?: ThemePalette;
75
- labelPosition?: 'before' | 'after';
76
- hint?: DynamicText;
66
+ disableRipple?: boolean;
67
+ color?: ThemePalette;
68
+ labelPosition?: 'before' | 'after';
69
+ hint?: DynamicText;
77
70
  }
78
71
  type MatRadioField<T> = RadioField<T, MatRadioProps>;
79
-
80
72
  interface MatSelectProps extends SelectProps {
81
- appearance?: MatFormFieldAppearance;
82
- multiple?: boolean;
83
- panelMaxHeight?: string;
84
- subscriptSizing?: SubscriptSizing;
85
- floatLabel?: FloatLabelType;
86
- hideRequiredMarker?: boolean;
87
- compareWith?: (o1: ValueType, o2: ValueType) => boolean;
88
- hint?: DynamicText;
73
+ appearance?: MatFormFieldAppearance;
74
+ multiple?: boolean;
75
+ panelMaxHeight?: string;
76
+ subscriptSizing?: SubscriptSizing;
77
+ floatLabel?: FloatLabelType;
78
+ hideRequiredMarker?: boolean;
79
+ compareWith?: (o1: ValueType, o2: ValueType) => boolean;
80
+ hint?: DynamicText;
89
81
  }
90
82
  type MatSelectField<T> = SelectField<T, MatSelectProps>;
91
-
92
83
  interface MatSliderProps {
93
- hint?: DynamicText;
94
- color?: 'primary' | 'accent' | 'warn';
95
- appearance?: MatFormFieldAppearance;
96
- thumbLabel?: boolean;
97
- showThumbLabel?: boolean;
98
- tickInterval?: number | 'auto';
99
- step?: number;
84
+ hint?: DynamicText;
85
+ color?: 'primary' | 'accent' | 'warn';
86
+ appearance?: MatFormFieldAppearance;
87
+ thumbLabel?: boolean;
88
+ showThumbLabel?: boolean;
89
+ tickInterval?: number | 'auto';
90
+ step?: number;
100
91
  }
101
92
  type MatSliderField = SliderField<MatSliderProps>;
102
-
103
93
  interface MatButtonProps {
104
- color?: 'primary' | 'accent' | 'warn';
105
- type?: 'button' | 'submit' | 'reset';
94
+ color?: 'primary' | 'accent' | 'warn';
95
+ type?: 'button' | 'submit' | 'reset';
106
96
  }
107
97
  type MatButtonField<TEvent extends FormEvent> = ButtonField<MatButtonProps, TEvent>;
108
98
  /** Specific button field types with preconfigured events */
109
99
  /** Submit button field - automatically disabled when form is invalid */
110
100
  type MatSubmitButtonField = Omit<MatButtonField<FormSubmitEvent>, 'event' | 'type' | 'eventArgs'> & {
111
- type: 'submit';
101
+ type: 'submit';
112
102
  };
113
103
  /** Next page button field - with preconfigured NextPageEvent */
114
104
  type MatNextButtonField = Omit<MatButtonField<NextPageEvent>, 'event' | 'type' | 'eventArgs'> & {
115
- type: 'next';
105
+ type: 'next';
116
106
  };
117
107
  /** Previous page button field - with preconfigured PreviousPageEvent */
118
108
  type MatPreviousButtonField = Omit<MatButtonField<PreviousPageEvent>, 'event' | 'type' | 'eventArgs'> & {
119
- type: 'previous';
109
+ type: 'previous';
120
110
  };
121
111
  /** Add array item button field - dispatches AppendArrayItemEvent */
122
112
  type MatAddArrayItemButtonField = Omit<MatButtonField<AppendArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
123
- type: 'add-array-item' | 'addArrayItem';
124
- /**
125
- * The key of the array field to add items to.
126
- * Required when the button is placed outside the array.
127
- * When inside an array, this is automatically determined from context.
128
- */
129
- arrayKey?: string;
130
- /**
131
- * Template for the new array item. REQUIRED.
132
- * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
133
- * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
134
- */
135
- template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
113
+ type: 'add-array-item' | 'addArrayItem';
114
+ /**
115
+ * The key of the array field to add items to.
116
+ * Required when the button is placed outside the array.
117
+ * When inside an array, this is automatically determined from context.
118
+ */
119
+ arrayKey?: string;
120
+ /**
121
+ * Template for the new array item. REQUIRED.
122
+ * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
123
+ * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
124
+ */
125
+ template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
136
126
  };
137
127
  /** Prepend array item button field - dispatches PrependArrayItemEvent (adds at beginning) */
138
128
  type MatPrependArrayItemButtonField = Omit<MatButtonField<PrependArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
139
- type: 'prepend-array-item' | 'prependArrayItem';
140
- /**
141
- * The key of the array field to prepend items to.
142
- * Required when the button is placed outside the array.
143
- * When inside an array, this is automatically determined from context.
144
- */
145
- arrayKey?: string;
146
- /**
147
- * Template for the new array item. REQUIRED.
148
- * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
149
- * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
150
- */
151
- template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
129
+ type: 'prepend-array-item' | 'prependArrayItem';
130
+ /**
131
+ * The key of the array field to prepend items to.
132
+ * Required when the button is placed outside the array.
133
+ * When inside an array, this is automatically determined from context.
134
+ */
135
+ arrayKey?: string;
136
+ /**
137
+ * Template for the new array item. REQUIRED.
138
+ * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
139
+ * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
140
+ */
141
+ template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
152
142
  };
153
143
  /** Insert array item button field - dispatches InsertArrayItemEvent (adds at specific index) */
154
144
  type MatInsertArrayItemButtonField = Omit<MatButtonField<InsertArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
155
- type: 'insert-array-item' | 'insertArrayItem';
156
- /**
157
- * The key of the array field to insert items into.
158
- * Required when the button is placed outside the array.
159
- * When inside an array, this is automatically determined from context.
160
- */
161
- arrayKey?: string;
162
- /** The index at which to insert the new item. */
163
- index: number;
164
- /**
165
- * Template for the new array item. REQUIRED.
166
- * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
167
- * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
168
- */
169
- template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
145
+ type: 'insert-array-item' | 'insertArrayItem';
146
+ /**
147
+ * The key of the array field to insert items into.
148
+ * Required when the button is placed outside the array.
149
+ * When inside an array, this is automatically determined from context.
150
+ */
151
+ arrayKey?: string;
152
+ /** The index at which to insert the new item. */
153
+ index: number;
154
+ /**
155
+ * Template for the new array item. REQUIRED.
156
+ * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
157
+ * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
158
+ */
159
+ template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
170
160
  };
171
161
  /** Remove array item button field - dispatches RemoveAtIndexEvent or PopArrayItemEvent */
172
162
  type MatRemoveArrayItemButtonField = Omit<MatButtonField<RemoveAtIndexEvent>, 'event' | 'type' | 'eventArgs'> & {
173
- type: 'remove-array-item' | 'removeArrayItem';
174
- /**
175
- * The key of the array field to remove items from.
176
- * Required when the button is placed outside the array.
177
- * When inside an array, this is automatically determined from context.
178
- */
179
- arrayKey?: string;
163
+ type: 'remove-array-item' | 'removeArrayItem';
164
+ /**
165
+ * The key of the array field to remove items from.
166
+ * Required when the button is placed outside the array.
167
+ * When inside an array, this is automatically determined from context.
168
+ */
169
+ arrayKey?: string;
180
170
  };
181
171
  /** Pop array item button field - dispatches PopArrayItemEvent (removes last item) */
182
172
  type MatPopArrayItemButtonField = Omit<MatButtonField<PopArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
183
- type: 'pop-array-item' | 'popArrayItem';
184
- /**
185
- * The key of the array field to remove the last item from.
186
- * REQUIRED - must specify which array to pop from.
187
- */
188
- arrayKey: string;
173
+ type: 'pop-array-item' | 'popArrayItem';
174
+ /**
175
+ * The key of the array field to remove the last item from.
176
+ * REQUIRED - must specify which array to pop from.
177
+ */
178
+ arrayKey: string;
189
179
  };
190
180
  /** Shift array item button field - dispatches ShiftArrayItemEvent (removes first item) */
191
181
  type MatShiftArrayItemButtonField = Omit<MatButtonField<ShiftArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
192
- type: 'shift-array-item' | 'shiftArrayItem';
193
- /**
194
- * The key of the array field to remove the first item from.
195
- * REQUIRED - must specify which array to shift from.
196
- */
197
- arrayKey: string;
182
+ type: 'shift-array-item' | 'shiftArrayItem';
183
+ /**
184
+ * The key of the array field to remove the first item from.
185
+ * REQUIRED - must specify which array to shift from.
186
+ */
187
+ arrayKey: string;
198
188
  };
199
-
200
189
  interface MatTextareaProps extends TextareaProps {
201
- hint?: DynamicText;
202
- appearance?: MatFormFieldAppearance;
203
- subscriptSizing?: SubscriptSizing;
204
- floatLabel?: FloatLabelType;
205
- hideRequiredMarker?: boolean;
206
- resize?: 'none' | 'both' | 'horizontal' | 'vertical';
190
+ hint?: DynamicText;
191
+ appearance?: MatFormFieldAppearance;
192
+ subscriptSizing?: SubscriptSizing;
193
+ floatLabel?: FloatLabelType;
194
+ hideRequiredMarker?: boolean;
195
+ resize?: 'none' | 'both' | 'horizontal' | 'vertical';
207
196
  }
208
197
  type MatTextareaField = TextareaField<MatTextareaProps>;
209
-
210
198
  interface MatToggleProps {
211
- hint?: DynamicText;
212
- appearance?: MatFormFieldAppearance;
213
- color?: ThemePalette;
214
- labelPosition?: 'before' | 'after';
215
- disableRipple?: boolean;
216
- hideIcon?: boolean;
199
+ hint?: DynamicText;
200
+ appearance?: MatFormFieldAppearance;
201
+ color?: ThemePalette;
202
+ labelPosition?: 'before' | 'after';
203
+ disableRipple?: boolean;
204
+ hideIcon?: boolean;
217
205
  }
218
206
  type MatToggleField = ToggleField<MatToggleProps>;
219
-
220
207
  /**
221
208
  * Material Design field type definitions
222
209
  * Follows the FieldTypeDefinition interface for proper registry integration
223
210
  */
224
- declare const MATERIAL_FIELD_TYPES: FieldTypeDefinition[];
225
-
211
+ export declare const MATERIAL_FIELD_TYPES: FieldTypeDefinition[];
226
212
  /**
227
213
  * Material Design field type constants
228
214
  * Based on available field components in the /fields folder
229
215
  */
230
- declare const MatField: {
231
- readonly Input: "input";
232
- readonly Select: "select";
233
- readonly Checkbox: "checkbox";
234
- readonly Button: "button";
235
- readonly Submit: "submit";
236
- readonly Next: "next";
237
- readonly Previous: "previous";
238
- readonly AddArrayItem: "add-array-item";
239
- readonly PrependArrayItem: "prepend-array-item";
240
- readonly InsertArrayItem: "insert-array-item";
241
- readonly RemoveArrayItem: "remove-array-item";
242
- readonly PopArrayItem: "pop-array-item";
243
- readonly ShiftArrayItem: "shift-array-item";
244
- readonly Textarea: "textarea";
245
- readonly Radio: "radio";
246
- readonly MultiCheckbox: "multi-checkbox";
247
- readonly Datepicker: "datepicker";
248
- readonly Slider: "slider";
249
- readonly Toggle: "toggle";
216
+ export declare const MatField: {
217
+ readonly Input: "input";
218
+ readonly Select: "select";
219
+ readonly Checkbox: "checkbox";
220
+ readonly Button: "button";
221
+ readonly Submit: "submit";
222
+ readonly Next: "next";
223
+ readonly Previous: "previous";
224
+ readonly AddArrayItem: "add-array-item";
225
+ readonly PrependArrayItem: "prepend-array-item";
226
+ readonly InsertArrayItem: "insert-array-item";
227
+ readonly RemoveArrayItem: "remove-array-item";
228
+ readonly PopArrayItem: "pop-array-item";
229
+ readonly ShiftArrayItem: "shift-array-item";
230
+ readonly Textarea: "textarea";
231
+ readonly Radio: "radio";
232
+ readonly MultiCheckbox: "multi-checkbox";
233
+ readonly Datepicker: "datepicker";
234
+ readonly Slider: "slider";
235
+ readonly Toggle: "toggle";
250
236
  };
251
237
  type MatFieldType = (typeof MatField)[keyof typeof MatField];
252
-
253
238
  /** Material-specific props that can be set at form level and cascade to all fields. */
254
- type MatFormProps = MaterialConfig;
239
+ type MatFormProps = MaterialConfig$1;
255
240
  /** Material-specific FormConfig with type-safe defaultProps. */
256
241
  type MatFormConfig<TFields extends NarrowFields | RegisteredFieldTypes[] = RegisteredFieldTypes[], TValue = InferFormValue<TFields extends readonly RegisteredFieldTypes[] ? TFields : RegisteredFieldTypes[]>> = FormConfig<TFields, TValue, MatFormProps>;
257
-
258
- /**
259
- * Module augmentation for @ng-forge/dynamic-form
260
- * This file augments the FieldRegistryLeaves interface to include
261
- * all Material Design field types provided by this library.
262
- */
263
-
264
242
  declare module '@ng-forge/dynamic-forms' {
265
- interface FieldRegistryLeaves {
266
- input: MatInputField;
267
- select: MatSelectField<unknown>;
268
- checkbox: MatCheckboxField;
269
- button: MatButtonField<FormEvent>;
270
- submit: MatSubmitButtonField;
271
- next: MatNextButtonField;
272
- previous: MatPreviousButtonField;
273
- addArrayItem: MatAddArrayItemButtonField;
274
- 'add-array-item': MatAddArrayItemButtonField;
275
- prependArrayItem: MatPrependArrayItemButtonField;
276
- 'prepend-array-item': MatPrependArrayItemButtonField;
277
- insertArrayItem: MatInsertArrayItemButtonField;
278
- 'insert-array-item': MatInsertArrayItemButtonField;
279
- removeArrayItem: MatRemoveArrayItemButtonField;
280
- 'remove-array-item': MatRemoveArrayItemButtonField;
281
- popArrayItem: MatPopArrayItemButtonField;
282
- 'pop-array-item': MatPopArrayItemButtonField;
283
- shiftArrayItem: MatShiftArrayItemButtonField;
284
- 'shift-array-item': MatShiftArrayItemButtonField;
285
- textarea: MatTextareaField;
286
- radio: MatRadioField<unknown>;
287
- 'multi-checkbox': MatMultiCheckboxField<unknown>;
288
- datepicker: MatDatepickerField;
289
- slider: MatSliderField;
290
- toggle: MatToggleField;
291
- }
243
+ interface FieldRegistryLeaves {
244
+ input: MatInputField;
245
+ select: MatSelectField<unknown>;
246
+ checkbox: MatCheckboxField;
247
+ button: MatButtonField<FormEvent>;
248
+ submit: MatSubmitButtonField;
249
+ next: MatNextButtonField;
250
+ previous: MatPreviousButtonField;
251
+ addArrayItem: MatAddArrayItemButtonField;
252
+ 'add-array-item': MatAddArrayItemButtonField;
253
+ prependArrayItem: MatPrependArrayItemButtonField;
254
+ 'prepend-array-item': MatPrependArrayItemButtonField;
255
+ insertArrayItem: MatInsertArrayItemButtonField;
256
+ 'insert-array-item': MatInsertArrayItemButtonField;
257
+ removeArrayItem: MatRemoveArrayItemButtonField;
258
+ 'remove-array-item': MatRemoveArrayItemButtonField;
259
+ popArrayItem: MatPopArrayItemButtonField;
260
+ 'pop-array-item': MatPopArrayItemButtonField;
261
+ shiftArrayItem: MatShiftArrayItemButtonField;
262
+ 'shift-array-item': MatShiftArrayItemButtonField;
263
+ textarea: MatTextareaField;
264
+ radio: MatRadioField<unknown>;
265
+ 'multi-checkbox': MatMultiCheckboxField<unknown>;
266
+ datepicker: MatDatepickerField;
267
+ slider: MatSliderField;
268
+ toggle: MatToggleField;
269
+ }
292
270
  }
293
-
294
271
  /** Field type definitions for Material Design components. */
295
272
  type MaterialFieldTypes = FieldTypeDefinition[];
296
273
  type MaterialConfigFeature = {
297
- ɵkind: 'material-config';
298
- ɵproviders: Provider[];
274
+ ɵkind: 'material-config';
275
+ ɵproviders: Provider[];
299
276
  };
300
277
  /**
301
278
  * Default `withMaterialFields()` shape — field defs + the auto-included
@@ -312,45 +289,42 @@ type MaterialFieldsWithConfig = [...MaterialFieldTypes, MaterialAddonsFeature, W
312
289
  * @returns Tuple of field type definitions, the addons feature, and
313
290
  * optionally a config feature.
314
291
  */
315
- declare function withMaterialFields(): MaterialFieldsWithAddons;
316
- declare function withMaterialFields(config: MaterialConfig): MaterialFieldsWithConfig;
317
- declare function withMaterialFields(config: MaterialConfig | undefined): MaterialFieldsWithAddons | MaterialFieldsWithConfig;
292
+ export declare function withMaterialFields(): MaterialFieldsWithAddons;
293
+ export declare function withMaterialFields(config: MaterialConfig$1): MaterialFieldsWithConfig;
294
+ export declare function withMaterialFields(config: MaterialConfig$1 | undefined): MaterialFieldsWithAddons | MaterialFieldsWithConfig;
318
295
  /**
319
296
  * Feature type discriminant for the Material addons feature. Matches core's
320
297
  * `'addons'` type so providers flow through the standard addon-type pipeline
321
298
  * in `provideDynamicForm`.
322
299
  */
323
300
  type MaterialAddonsFeature = {
324
- ɵkind: 'addons';
325
- ɵproviders: Provider[];
301
+ ɵkind: 'addons';
302
+ ɵproviders: Provider[];
326
303
  };
327
304
  /** Register Material-shipped addon types (`mat-icon`, `mat-button`) standalone. */
328
- declare function withMaterialAddons(): MaterialAddonsFeature;
329
-
305
+ export declare function withMaterialAddons(): MaterialAddonsFeature;
330
306
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/button`. Import it from there to use the class as a value. */
331
- type MatButtonFieldComponent<TEvent extends FormEvent> = MatButtonFieldComponent$1<TEvent>;
307
+ export type MatButtonFieldComponent<TEvent extends FormEvent> = MatButtonFieldComponent$1<TEvent>;
332
308
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/checkbox`. Import it from there to use the class as a value. */
333
- type MatCheckboxFieldComponent = MatCheckboxFieldComponent$1;
309
+ export type MatCheckboxFieldComponent = MatCheckboxFieldComponent$1;
334
310
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/datepicker`. Import it from there to use the class as a value. */
335
- type MatDatepickerFieldComponent = MatDatepickerFieldComponent$1;
311
+ export type MatDatepickerFieldComponent = MatDatepickerFieldComponent$1;
336
312
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/input`. Import it from there to use the class as a value. */
337
- type MatInputFieldComponent = MatInputFieldComponent$1;
313
+ export type MatInputFieldComponent = MatInputFieldComponent$1;
338
314
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/multi-checkbox`. Import it from there to use the class as a value. */
339
- type MatMultiCheckboxFieldComponent = MatMultiCheckboxFieldComponent$1;
315
+ export type MatMultiCheckboxFieldComponent = MatMultiCheckboxFieldComponent$1;
340
316
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/radio`. Import it from there to use the class as a value. */
341
- type MatRadioFieldComponent = MatRadioFieldComponent$1;
317
+ export type MatRadioFieldComponent = MatRadioFieldComponent$1;
342
318
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/select`. Import it from there to use the class as a value. */
343
- type MatSelectFieldComponent = MatSelectFieldComponent$1;
319
+ export type MatSelectFieldComponent = MatSelectFieldComponent$1;
344
320
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/slider`. Import it from there to use the class as a value. */
345
- type MatSliderFieldComponent = MatSliderFieldComponent$1;
321
+ export type MatSliderFieldComponent = MatSliderFieldComponent$1;
346
322
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/textarea`. Import it from there to use the class as a value. */
347
- type MatTextareaFieldComponent = MatTextareaFieldComponent$1;
323
+ export type MatTextareaFieldComponent = MatTextareaFieldComponent$1;
348
324
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/toggle`. Import it from there to use the class as a value. */
349
- type MatToggleFieldComponent = MatToggleFieldComponent$1;
325
+ export type MatToggleFieldComponent = MatToggleFieldComponent$1;
350
326
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/addon-icon`. Import it from there to use the class as a value. */
351
- type MatIconAddonComponent = MatIconAddonComponent$1;
327
+ export type MatIconAddonComponent = MatIconAddonComponent$1;
352
328
  /** Class type of the component in `@ng-forge/dynamic-forms-material/lazy/addon-button`. Import it from there to use the class as a value. */
353
- type MatButtonAddonComponent = MatButtonAddonComponent$1;
354
-
355
- export { MATERIAL_FIELD_TYPES, MatField, withMaterialAddons, withMaterialFields };
356
- export type { MatAddArrayItemButtonField, MatAddonExtensions, MatButtonAddonComponent, MatButtonField, MatButtonFieldComponent, MatButtonProps, MatCheckboxField, MatCheckboxFieldComponent, MatCheckboxProps, MatDatepickerField, MatDatepickerFieldComponent, MatDatepickerProps, MatFieldType, MatFormConfig, MatFormProps, MatIconAddonComponent, MatInputAddon, MatInputField, MatInputFieldComponent, MatInputProps, MatInsertArrayItemButtonField, MatMultiCheckboxField, MatMultiCheckboxFieldComponent, MatMultiCheckboxProps, MatNextButtonField, MatPopArrayItemButtonField, MatPrependArrayItemButtonField, MatPreviousButtonField, MatRadioField, MatRadioFieldComponent, MatRadioProps, MatRemoveArrayItemButtonField, MatSelectField, MatSelectFieldComponent, MatSelectProps, MatShiftArrayItemButtonField, MatSliderField, MatSliderFieldComponent, MatSliderProps, MatSubmitButtonField, MatTextareaField, MatTextareaFieldComponent, MatTextareaProps, MatToggleField, MatToggleFieldComponent, MatToggleProps };
329
+ export type MatButtonAddonComponent = MatButtonAddonComponent$1;
330
+ export { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE, type MatAddArrayItemButtonField, type MatAddon, type MatAddonExtensions, type MatButtonAddon, type MatButtonField, type MatButtonProps, type MatCheckboxField, type MatCheckboxProps, type MatDatepickerField, type MatDatepickerProps, type MatFieldType, type MatFormConfig, type MatFormProps, type MatIconAddon, type MatInputAddon, type MatInputField, type MatInputProps, type MatInsertArrayItemButtonField, type MatMultiCheckboxField, type MatMultiCheckboxProps, type MatNextButtonField, type MatPopArrayItemButtonField, type MatPrependArrayItemButtonField, type MatPreviousButtonField, type MatRadioField, type MatRadioProps, type MatRemoveArrayItemButtonField, type MatSelectField, type MatSelectProps, type MatShiftArrayItemButtonField, type MatSliderField, type MatSliderProps, type MatSubmitButtonField, type MatTextareaField, type MatTextareaProps, type MatToggleField, type MatToggleProps, type MaterialConfig };
@@ -1,26 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { MatError } from '@angular/material/form-field';
4
- import { FieldErrorsWrapperBase, provideFieldErrorDisplay } from '@ng-forge/dynamic-forms/integration';
5
-
6
- class MatFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {
7
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: MatFieldErrorsWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: MatFieldErrorsWrapperComponent, isStandalone: true, selector: "df-mat-field-errors", providers: [provideFieldErrorDisplay(() => MatFieldErrorsWrapperComponent)], usesInheritance: true, ngImport: i0, template: `
9
- <ng-container #fieldComponent></ng-container>
10
- @if (ngf.errorsToDisplay()[0]; as error) {
11
- <mat-error class="df-mat-field-error" role="alert" [id]="ngf.errorId()">{{ error.message }}</mat-error>
12
- }
13
- `, isInline: true, styles: [".df-mat-field-error{display:block;color:var(--df-error-color, var(--mat-form-field-error-text-color, #f44336));font-family:var(--mat-form-field-subscript-text-font, inherit);font-size:var(--df-error-font-size, var(--mat-form-field-subscript-text-size, 12px));font-weight:var(--mat-form-field-subscript-text-weight, 400);line-height:var(--mat-form-field-subscript-text-line-height, 20px);letter-spacing:var(--mat-form-field-subscript-text-tracking, .0333333333em);margin-top:var(--df-field-gap, .5rem);padding-inline-start:var(--df-mat-error-inset, 16px)}\n"], dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14
- }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: MatFieldErrorsWrapperComponent, decorators: [{
16
- type: Component,
17
- args: [{ selector: 'df-mat-field-errors', imports: [MatError], template: `
18
- <ng-container #fieldComponent></ng-container>
19
- @if (ngf.errorsToDisplay()[0]; as error) {
20
- <mat-error class="df-mat-field-error" role="alert" [id]="ngf.errorId()">{{ error.message }}</mat-error>
21
- }
22
- `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideFieldErrorDisplay(() => MatFieldErrorsWrapperComponent)], styles: [".df-mat-field-error{display:block;color:var(--df-error-color, var(--mat-form-field-error-text-color, #f44336));font-family:var(--mat-form-field-subscript-text-font, inherit);font-size:var(--df-error-font-size, var(--mat-form-field-subscript-text-size, 12px));font-weight:var(--mat-form-field-subscript-text-weight, 400);line-height:var(--mat-form-field-subscript-text-line-height, 20px);letter-spacing:var(--mat-form-field-subscript-text-tracking, .0333333333em);margin-top:var(--df-field-gap, .5rem);padding-inline-start:var(--df-mat-error-inset, 16px)}\n"] }]
23
- }] });
24
-
25
- export { MatFieldErrorsWrapperComponent, MatFieldErrorsWrapperComponent as default };
26
- //# sourceMappingURL=ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs","mappings":";;;;;AAkBc;;;;;;;AALX;;;;AAPS","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/wrappers/field-errors/mat-field-errors-wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { MatError } from '@angular/material/form-field';\nimport { FieldErrorsWrapperBase, provideFieldErrorDisplay } from '@ng-forge/dynamic-forms/integration';\n\n/** Material rendering of a validation message for the wrapped field. Replaces the core default. */\n@Component({\n selector: 'df-mat-field-errors',\n imports: [MatError],\n template: `\n <ng-container #fieldComponent></ng-container>\n @if (ngf.errorsToDisplay()[0]; as error) {\n <mat-error class=\"df-mat-field-error\" role=\"alert\" [id]=\"ngf.errorId()\">{{ error.message }}</mat-error>\n }\n `,\n styleUrl: './mat-field-errors-wrapper.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideFieldErrorDisplay(() => MatFieldErrorsWrapperComponent)],\n})\nexport default class MatFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {}\n\nexport { MatFieldErrorsWrapperComponent };\n"]}