@ng-forge/dynamic-forms-material 1.3.0-next.1 → 1.3.0-next.3
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.
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs +118 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +112 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +96 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +137 -29
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +316 -62
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +253 -107
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +179 -65
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +168 -27
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +253 -56
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +157 -27
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +206 -51
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +134 -29
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs +64 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +7 -11
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material.mjs +241 -260
- package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +17 -17
- package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +23 -16
- package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +87 -81
- package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +27 -21
- package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +68 -40
- package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +54 -42
- package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +35 -24
- package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +30 -19
- package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +56 -38
- package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +33 -22
- package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +47 -34
- package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +29 -23
- package/types/ng-forge-dynamic-forms-material-shared.d.ts +56 -64
- package/types/ng-forge-dynamic-forms-material.d.ts +211 -238
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs +0 -26
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs.map +0 -1
|
@@ -1,302 +1,278 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField,
|
|
3
|
-
import { ThemePalette } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { MatButtonFieldComponent as MatButtonFieldComponent$1 } from
|
|
8
|
-
import { MatCheckboxFieldComponent as MatCheckboxFieldComponent$1 } from
|
|
9
|
-
import { MatDatepickerFieldComponent as MatDatepickerFieldComponent$1 } from
|
|
10
|
-
import { MatInputFieldComponent as MatInputFieldComponent$1 } from
|
|
11
|
-
import { MatMultiCheckboxFieldComponent as MatMultiCheckboxFieldComponent$1 } from
|
|
12
|
-
import { MatRadioFieldComponent as MatRadioFieldComponent$1 } from
|
|
13
|
-
import { MatSelectFieldComponent as MatSelectFieldComponent$1 } from
|
|
14
|
-
import { MatSliderFieldComponent as MatSliderFieldComponent$1 } from
|
|
15
|
-
import { MatTextareaFieldComponent as MatTextareaFieldComponent$1 } from
|
|
16
|
-
import { MatToggleFieldComponent as MatToggleFieldComponent$1 } from
|
|
17
|
-
import { MatIconAddonComponent as MatIconAddonComponent$1 } from
|
|
18
|
-
import { MatButtonAddonComponent as MatButtonAddonComponent$1 } from
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
hint?: DynamicText;
|
|
40
|
+
appearance?: MatFormFieldAppearance;
|
|
41
|
+
disableRipple?: boolean;
|
|
42
|
+
subscriptSizing?: SubscriptSizing;
|
|
43
|
+
floatLabel?: FloatLabelType;
|
|
44
|
+
hideRequiredMarker?: boolean;
|
|
45
|
+
hint?: DynamicText;
|
|
51
46
|
}
|
|
52
47
|
/**
|
|
53
48
|
* Module-augmentable seam for adding custom addon types to `mat-input` at
|
|
54
49
|
* the type level. Pair with `withCustomAddon(...)` for the runtime side:
|
|
55
50
|
*/
|
|
56
|
-
interface MatAddonExtensions {
|
|
57
|
-
}
|
|
51
|
+
interface MatAddonExtensions {}
|
|
58
52
|
type MatAddonExtension = MatAddonExtensions[keyof MatAddonExtensions];
|
|
59
53
|
/** Addon types accepted by `mat-input`. */
|
|
60
|
-
type MatInputAddon = MatIconAddon | MatButtonAddon | TextAddon | TemplateAddon | MatAddonExtension;
|
|
54
|
+
type MatInputAddon = MatIconAddon$1 | MatButtonAddon$1 | TextAddon | TemplateAddon | MatAddonExtension;
|
|
61
55
|
type MatInputField = InputField<MatInputProps> & {
|
|
62
|
-
|
|
56
|
+
addons?: ReadonlyArray<MatInputAddon>;
|
|
63
57
|
};
|
|
64
|
-
|
|
65
58
|
interface MatMultiCheckboxProps {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
disableRipple?: boolean;
|
|
60
|
+
hint?: DynamicText;
|
|
61
|
+
labelPosition?: 'before' | 'after';
|
|
62
|
+
color?: ThemePalette;
|
|
70
63
|
}
|
|
71
64
|
type MatMultiCheckboxField<T> = MultiCheckboxField<T, MatMultiCheckboxProps>;
|
|
72
|
-
|
|
73
65
|
interface MatRadioProps {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
disableRipple?: boolean;
|
|
67
|
+
color?: ThemePalette;
|
|
68
|
+
labelPosition?: 'before' | 'after';
|
|
69
|
+
hint?: DynamicText;
|
|
78
70
|
}
|
|
79
71
|
type MatRadioField<T> = RadioField<T, MatRadioProps>;
|
|
80
|
-
|
|
81
72
|
interface MatSelectProps extends SelectProps {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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;
|
|
90
81
|
}
|
|
91
82
|
type MatSelectField<T> = SelectField<T, MatSelectProps>;
|
|
92
|
-
|
|
93
83
|
interface MatSliderProps {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
84
|
+
hint?: DynamicText;
|
|
85
|
+
color?: 'primary' | 'accent' | 'warn';
|
|
86
|
+
appearance?: MatFormFieldAppearance;
|
|
87
|
+
thumbLabel?: boolean;
|
|
88
|
+
showThumbLabel?: boolean;
|
|
89
|
+
tickInterval?: number | 'auto';
|
|
90
|
+
step?: number;
|
|
101
91
|
}
|
|
102
92
|
type MatSliderField = SliderField<MatSliderProps>;
|
|
103
|
-
|
|
104
93
|
interface MatButtonProps {
|
|
105
|
-
|
|
106
|
-
|
|
94
|
+
color?: 'primary' | 'accent' | 'warn';
|
|
95
|
+
type?: 'button' | 'submit' | 'reset';
|
|
107
96
|
}
|
|
108
97
|
type MatButtonField<TEvent extends FormEvent> = ButtonField<MatButtonProps, TEvent>;
|
|
109
98
|
/** Specific button field types with preconfigured events */
|
|
110
99
|
/** Submit button field - automatically disabled when form is invalid */
|
|
111
100
|
type MatSubmitButtonField = Omit<MatButtonField<FormSubmitEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
112
|
-
|
|
101
|
+
type: 'submit';
|
|
113
102
|
};
|
|
114
103
|
/** Next page button field - with preconfigured NextPageEvent */
|
|
115
104
|
type MatNextButtonField = Omit<MatButtonField<NextPageEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
116
|
-
|
|
105
|
+
type: 'next';
|
|
117
106
|
};
|
|
118
107
|
/** Previous page button field - with preconfigured PreviousPageEvent */
|
|
119
108
|
type MatPreviousButtonField = Omit<MatButtonField<PreviousPageEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
120
|
-
|
|
109
|
+
type: 'previous';
|
|
121
110
|
};
|
|
122
111
|
/** Add array item button field - dispatches AppendArrayItemEvent */
|
|
123
112
|
type MatAddArrayItemButtonField = Omit<MatButtonField<AppendArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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[];
|
|
137
126
|
};
|
|
138
127
|
/** Prepend array item button field - dispatches PrependArrayItemEvent (adds at beginning) */
|
|
139
128
|
type MatPrependArrayItemButtonField = Omit<MatButtonField<PrependArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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[];
|
|
153
142
|
};
|
|
154
143
|
/** Insert array item button field - dispatches InsertArrayItemEvent (adds at specific index) */
|
|
155
144
|
type MatInsertArrayItemButtonField = Omit<MatButtonField<InsertArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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[];
|
|
171
160
|
};
|
|
172
161
|
/** Remove array item button field - dispatches RemoveAtIndexEvent or PopArrayItemEvent */
|
|
173
162
|
type MatRemoveArrayItemButtonField = Omit<MatButtonField<RemoveAtIndexEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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;
|
|
181
170
|
};
|
|
182
171
|
/** Pop array item button field - dispatches PopArrayItemEvent (removes last item) */
|
|
183
172
|
type MatPopArrayItemButtonField = Omit<MatButtonField<PopArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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;
|
|
190
179
|
};
|
|
191
180
|
/** Shift array item button field - dispatches ShiftArrayItemEvent (removes first item) */
|
|
192
181
|
type MatShiftArrayItemButtonField = Omit<MatButtonField<ShiftArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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;
|
|
199
188
|
};
|
|
200
|
-
|
|
201
189
|
interface MatTextareaProps extends TextareaProps {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
190
|
+
hint?: DynamicText;
|
|
191
|
+
appearance?: MatFormFieldAppearance;
|
|
192
|
+
subscriptSizing?: SubscriptSizing;
|
|
193
|
+
floatLabel?: FloatLabelType;
|
|
194
|
+
hideRequiredMarker?: boolean;
|
|
195
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
208
196
|
}
|
|
209
197
|
type MatTextareaField = TextareaField<MatTextareaProps>;
|
|
210
|
-
|
|
211
198
|
interface MatToggleProps {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
199
|
+
hint?: DynamicText;
|
|
200
|
+
appearance?: MatFormFieldAppearance;
|
|
201
|
+
color?: ThemePalette;
|
|
202
|
+
labelPosition?: 'before' | 'after';
|
|
203
|
+
disableRipple?: boolean;
|
|
204
|
+
hideIcon?: boolean;
|
|
218
205
|
}
|
|
219
206
|
type MatToggleField = ToggleField<MatToggleProps>;
|
|
220
|
-
|
|
221
207
|
/**
|
|
222
208
|
* Material Design field type definitions
|
|
223
209
|
* Follows the FieldTypeDefinition interface for proper registry integration
|
|
224
210
|
*/
|
|
225
|
-
declare const MATERIAL_FIELD_TYPES: FieldTypeDefinition[];
|
|
226
|
-
|
|
211
|
+
export declare const MATERIAL_FIELD_TYPES: FieldTypeDefinition[];
|
|
227
212
|
/**
|
|
228
213
|
* Material Design field type constants
|
|
229
214
|
* Based on available field components in the /fields folder
|
|
230
215
|
*/
|
|
231
|
-
declare const MatField: {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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";
|
|
251
236
|
};
|
|
252
237
|
type MatFieldType = (typeof MatField)[keyof typeof MatField];
|
|
253
|
-
|
|
254
238
|
/** Material-specific props that can be set at form level and cascade to all fields. */
|
|
255
|
-
type MatFormProps = MaterialConfig;
|
|
239
|
+
type MatFormProps = MaterialConfig$1;
|
|
256
240
|
/** Material-specific FormConfig with type-safe defaultProps. */
|
|
257
241
|
type MatFormConfig<TFields extends NarrowFields | RegisteredFieldTypes[] = RegisteredFieldTypes[], TValue = InferFormValue<TFields extends readonly RegisteredFieldTypes[] ? TFields : RegisteredFieldTypes[]>> = FormConfig<TFields, TValue, MatFormProps>;
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Module augmentation for @ng-forge/dynamic-form
|
|
261
|
-
* This file augments the FieldRegistryLeaves interface to include
|
|
262
|
-
* all Material Design field types provided by this library.
|
|
263
|
-
*/
|
|
264
|
-
|
|
265
242
|
declare module '@ng-forge/dynamic-forms' {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
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
|
+
}
|
|
293
270
|
}
|
|
294
|
-
|
|
295
271
|
/** Field type definitions for Material Design components. */
|
|
296
272
|
type MaterialFieldTypes = FieldTypeDefinition[];
|
|
297
273
|
type MaterialConfigFeature = {
|
|
298
|
-
|
|
299
|
-
|
|
274
|
+
ɵkind: 'material-config';
|
|
275
|
+
ɵproviders: Provider[];
|
|
300
276
|
};
|
|
301
277
|
/**
|
|
302
278
|
* Default `withMaterialFields()` shape — field defs + the auto-included
|
|
@@ -313,45 +289,42 @@ type MaterialFieldsWithConfig = [...MaterialFieldTypes, MaterialAddonsFeature, W
|
|
|
313
289
|
* @returns Tuple of field type definitions, the addons feature, and
|
|
314
290
|
* optionally a config feature.
|
|
315
291
|
*/
|
|
316
|
-
declare function withMaterialFields(): MaterialFieldsWithAddons;
|
|
317
|
-
declare function withMaterialFields(config: MaterialConfig): MaterialFieldsWithConfig;
|
|
318
|
-
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;
|
|
319
295
|
/**
|
|
320
296
|
* Feature type discriminant for the Material addons feature. Matches core's
|
|
321
297
|
* `'addons'` type so providers flow through the standard addon-type pipeline
|
|
322
298
|
* in `provideDynamicForm`.
|
|
323
299
|
*/
|
|
324
300
|
type MaterialAddonsFeature = {
|
|
325
|
-
|
|
326
|
-
|
|
301
|
+
ɵkind: 'addons';
|
|
302
|
+
ɵproviders: Provider[];
|
|
327
303
|
};
|
|
328
304
|
/** Register Material-shipped addon types (`mat-icon`, `mat-button`) standalone. */
|
|
329
|
-
declare function withMaterialAddons(): MaterialAddonsFeature;
|
|
330
|
-
|
|
305
|
+
export declare function withMaterialAddons(): MaterialAddonsFeature;
|
|
331
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. */
|
|
332
|
-
type MatButtonFieldComponent<TEvent extends FormEvent> = MatButtonFieldComponent$1<TEvent>;
|
|
307
|
+
export type MatButtonFieldComponent<TEvent extends FormEvent> = MatButtonFieldComponent$1<TEvent>;
|
|
333
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. */
|
|
334
|
-
type MatCheckboxFieldComponent = MatCheckboxFieldComponent$1;
|
|
309
|
+
export type MatCheckboxFieldComponent = MatCheckboxFieldComponent$1;
|
|
335
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. */
|
|
336
|
-
type MatDatepickerFieldComponent = MatDatepickerFieldComponent$1;
|
|
311
|
+
export type MatDatepickerFieldComponent = MatDatepickerFieldComponent$1;
|
|
337
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. */
|
|
338
|
-
type MatInputFieldComponent = MatInputFieldComponent$1;
|
|
313
|
+
export type MatInputFieldComponent = MatInputFieldComponent$1;
|
|
339
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. */
|
|
340
|
-
type MatMultiCheckboxFieldComponent = MatMultiCheckboxFieldComponent$1;
|
|
315
|
+
export type MatMultiCheckboxFieldComponent = MatMultiCheckboxFieldComponent$1;
|
|
341
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. */
|
|
342
|
-
type MatRadioFieldComponent = MatRadioFieldComponent$1;
|
|
317
|
+
export type MatRadioFieldComponent = MatRadioFieldComponent$1;
|
|
343
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. */
|
|
344
|
-
type MatSelectFieldComponent = MatSelectFieldComponent$1;
|
|
319
|
+
export type MatSelectFieldComponent = MatSelectFieldComponent$1;
|
|
345
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. */
|
|
346
|
-
type MatSliderFieldComponent = MatSliderFieldComponent$1;
|
|
321
|
+
export type MatSliderFieldComponent = MatSliderFieldComponent$1;
|
|
347
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. */
|
|
348
|
-
type MatTextareaFieldComponent = MatTextareaFieldComponent$1;
|
|
323
|
+
export type MatTextareaFieldComponent = MatTextareaFieldComponent$1;
|
|
349
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. */
|
|
350
|
-
type MatToggleFieldComponent = MatToggleFieldComponent$1;
|
|
325
|
+
export type MatToggleFieldComponent = MatToggleFieldComponent$1;
|
|
351
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. */
|
|
352
|
-
type MatIconAddonComponent = MatIconAddonComponent$1;
|
|
327
|
+
export type MatIconAddonComponent = MatIconAddonComponent$1;
|
|
353
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. */
|
|
354
|
-
type MatButtonAddonComponent = MatButtonAddonComponent$1;
|
|
355
|
-
|
|
356
|
-
export { MATERIAL_FIELD_TYPES, MatField, withMaterialAddons, withMaterialFields };
|
|
357
|
-
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 };
|
package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs
DELETED
|
@@ -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
|
package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs.map
DELETED
|
@@ -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"]}
|