@ng-forge/dynamic-forms-bootstrap 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.
Files changed (47) hide show
  1. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs +56 -0
  2. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs.map +1 -0
  3. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs +64 -37
  4. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map +1 -1
  5. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs +92 -34
  6. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map +1 -1
  7. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs +94 -49
  8. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map +1 -1
  9. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs +97 -23
  10. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs.map +1 -1
  11. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs +169 -40
  12. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs.map +1 -1
  13. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs +180 -88
  14. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs.map +1 -1
  15. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs +143 -66
  16. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs.map +1 -1
  17. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs +326 -61
  18. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs.map +1 -1
  19. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs +123 -33
  20. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs.map +1 -1
  21. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs +161 -30
  22. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs.map +1 -1
  23. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs +97 -23
  24. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs.map +1 -1
  25. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs +97 -23
  26. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs.map +1 -1
  27. package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs +100 -41
  28. package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs.map +1 -1
  29. package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs +238 -251
  30. package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.d.ts +18 -18
  33. package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.d.ts +24 -17
  34. package/types/ng-forge-dynamic-forms-bootstrap-lazy-button.d.ts +94 -88
  35. package/types/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.d.ts +24 -18
  36. package/types/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.d.ts +49 -28
  37. package/types/ng-forge-dynamic-forms-bootstrap-lazy-input.d.ts +51 -38
  38. package/types/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.d.ts +34 -23
  39. package/types/ng-forge-dynamic-forms-bootstrap-lazy-radio.d.ts +30 -19
  40. package/types/ng-forge-dynamic-forms-bootstrap-lazy-select.d.ts +36 -24
  41. package/types/ng-forge-dynamic-forms-bootstrap-lazy-slider.d.ts +56 -35
  42. package/types/ng-forge-dynamic-forms-bootstrap-lazy-textarea.d.ts +24 -18
  43. package/types/ng-forge-dynamic-forms-bootstrap-lazy-toggle.d.ts +23 -17
  44. package/types/ng-forge-dynamic-forms-bootstrap-shared.d.ts +78 -71
  45. package/types/ng-forge-dynamic-forms-bootstrap.d.ts +225 -251
  46. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs +0 -25
  47. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs.map +0 -1
@@ -1,315 +1,292 @@
1
- import { FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, TextAddon, TemplateAddon, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
2
- import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition, WrapperTypeDefinition } from '@ng-forge/dynamic-forms/integration';
3
- import { BsIconAddon, BsButtonAddon, BootstrapConfig } from '@ng-forge/dynamic-forms-bootstrap/shared';
4
- export { BOOTSTRAP_CONFIG, BS_INPUT_TYPE_OVERRIDE, BootstrapConfig, BsAddon, BsButtonAddon, BsIconAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';
5
- import { BsButtonFieldComponent as BsButtonFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/button';
6
- import { BsCheckboxFieldComponent as BsCheckboxFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/checkbox';
7
- import { BsDatepickerFieldComponent as BsDatepickerFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/datepicker';
8
- import { BsInputFieldComponent as BsInputFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/input';
9
- import { BsMultiCheckboxFieldComponent as BsMultiCheckboxFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/multi-checkbox';
10
- import { BsRadioFieldComponent as BsRadioFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/radio';
11
- import { BsSelectFieldComponent as BsSelectFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/select';
12
- import { BsSliderFieldComponent as BsSliderFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/slider';
13
- import { BsTextareaFieldComponent as BsTextareaFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/textarea';
14
- import { BsToggleFieldComponent as BsToggleFieldComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/toggle';
15
- import { BsIconAddonComponent as BsIconAddonComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/addon-icon';
16
- import { BsButtonAddonComponent as BsButtonAddonComponent$1 } from '@ng-forge/dynamic-forms-bootstrap/lazy/addon-button';
17
- import { Provider } from '@angular/core';
18
-
1
+ import { AppendArrayItemEvent, ArrayAllowedChildren, DynamicText, FormConfig, FormEvent, FormSubmitEvent, InferFormValue, InsertArrayItemEvent, NarrowFields, NextPageEvent, PopArrayItemEvent, PrependArrayItemEvent, PreviousPageEvent, RegisteredFieldTypes, RemoveAtIndexEvent, ShiftArrayItemEvent, TemplateAddon, TextAddon } 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 { Provider } from "@angular/core";
4
+ import { BOOTSTRAP_CONFIG, BS_INPUT_TYPE_OVERRIDE, BootstrapConfig, BootstrapConfig as BootstrapConfig$1, BsAddon, BsButtonAddon, BsButtonAddon as BsButtonAddon$1, BsIconAddon, BsIconAddon as BsIconAddon$1 } from "@ng-forge/dynamic-forms-bootstrap/shared";
5
+ import { BsButtonFieldComponent as BsButtonFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/button";
6
+ import { BsCheckboxFieldComponent as BsCheckboxFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/checkbox";
7
+ import { BsDatepickerFieldComponent as BsDatepickerFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/datepicker";
8
+ import { BsInputFieldComponent as BsInputFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/input";
9
+ import { BsMultiCheckboxFieldComponent as BsMultiCheckboxFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/multi-checkbox";
10
+ import { BsRadioFieldComponent as BsRadioFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/radio";
11
+ import { BsSelectFieldComponent as BsSelectFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/select";
12
+ import { BsSliderFieldComponent as BsSliderFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/slider";
13
+ import { BsTextareaFieldComponent as BsTextareaFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/textarea";
14
+ import { BsToggleFieldComponent as BsToggleFieldComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/toggle";
15
+ import { BsIconAddonComponent as BsIconAddonComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/addon-icon";
16
+ import { BsButtonAddonComponent as BsButtonAddonComponent$1 } from "@ng-forge/dynamic-forms-bootstrap/lazy/addon-button";
19
17
  interface BsButtonProps {
20
- variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
21
- outline?: boolean;
22
- size?: 'sm' | 'lg';
23
- block?: boolean;
24
- active?: boolean;
25
- type?: 'button' | 'submit' | 'reset';
18
+ variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
19
+ outline?: boolean;
20
+ size?: 'sm' | 'lg';
21
+ block?: boolean;
22
+ active?: boolean;
23
+ type?: 'button' | 'submit' | 'reset';
26
24
  }
27
25
  type BsButtonField<TEvent extends FormEvent> = ButtonField<BsButtonProps, TEvent>;
28
26
  /** Specific button field types with preconfigured events */
29
27
  /** Submit button field - automatically disabled when form is invalid */
30
28
  type BsSubmitButtonField = Omit<BsButtonField<FormSubmitEvent>, 'event' | 'type' | 'eventArgs'> & {
31
- type: 'submit';
29
+ type: 'submit';
32
30
  };
33
31
  /** Next page button field - with preconfigured NextPageEvent */
34
32
  type BsNextButtonField = Omit<BsButtonField<NextPageEvent>, 'event' | 'type' | 'eventArgs'> & {
35
- type: 'next';
33
+ type: 'next';
36
34
  };
37
35
  /** Previous page button field - with preconfigured PreviousPageEvent */
38
36
  type BsPreviousButtonField = Omit<BsButtonField<PreviousPageEvent>, 'event' | 'type' | 'eventArgs'> & {
39
- type: 'previous';
37
+ type: 'previous';
40
38
  };
41
39
  /** Add array item button field - dispatches AppendArrayItemEvent */
42
40
  type BsAddArrayItemButtonField = Omit<BsButtonField<AppendArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
43
- type: 'add-array-item' | 'addArrayItem';
44
- /**
45
- * The key of the array field to add items to.
46
- * Required when the button is placed outside the array.
47
- * When inside an array, this is automatically determined from context.
48
- */
49
- arrayKey?: string;
50
- /**
51
- * Template for the new array item. REQUIRED.
52
- * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
53
- * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
54
- */
55
- template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
41
+ type: 'add-array-item' | 'addArrayItem';
42
+ /**
43
+ * The key of the array field to add items to.
44
+ * Required when the button is placed outside the array.
45
+ * When inside an array, this is automatically determined from context.
46
+ */
47
+ arrayKey?: string;
48
+ /**
49
+ * Template for the new array item. REQUIRED.
50
+ * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
51
+ * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
52
+ */
53
+ template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
56
54
  };
57
55
  /** Prepend array item button field - dispatches PrependArrayItemEvent (adds at beginning) */
58
56
  type BsPrependArrayItemButtonField = Omit<BsButtonField<PrependArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
59
- type: 'prepend-array-item' | 'prependArrayItem';
60
- /**
61
- * The key of the array field to prepend items to.
62
- * Required when the button is placed outside the array.
63
- * When inside an array, this is automatically determined from context.
64
- */
65
- arrayKey?: string;
66
- /**
67
- * Template for the new array item. REQUIRED.
68
- * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
69
- * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
70
- */
71
- template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
57
+ type: 'prepend-array-item' | 'prependArrayItem';
58
+ /**
59
+ * The key of the array field to prepend items to.
60
+ * Required when the button is placed outside the array.
61
+ * When inside an array, this is automatically determined from context.
62
+ */
63
+ arrayKey?: string;
64
+ /**
65
+ * Template for the new array item. REQUIRED.
66
+ * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
67
+ * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
68
+ */
69
+ template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
72
70
  };
73
71
  /** Insert array item button field - dispatches InsertArrayItemEvent (adds at specific index) */
74
72
  type BsInsertArrayItemButtonField = Omit<BsButtonField<InsertArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
75
- type: 'insert-array-item' | 'insertArrayItem';
76
- /**
77
- * The key of the array field to insert items into.
78
- * Required when the button is placed outside the array.
79
- * When inside an array, this is automatically determined from context.
80
- */
81
- arrayKey?: string;
82
- /** The index at which to insert the new item. */
83
- index: number;
84
- /**
85
- * Template for the new array item. REQUIRED.
86
- * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
87
- * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
88
- */
89
- template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
73
+ type: 'insert-array-item' | 'insertArrayItem';
74
+ /**
75
+ * The key of the array field to insert items into.
76
+ * Required when the button is placed outside the array.
77
+ * When inside an array, this is automatically determined from context.
78
+ */
79
+ arrayKey?: string;
80
+ /** The index at which to insert the new item. */
81
+ index: number;
82
+ /**
83
+ * Template for the new array item. REQUIRED.
84
+ * - Single field (ArrayAllowedChildren): Creates a primitive item (field's value is extracted directly)
85
+ * - Array of fields (ArrayAllowedChildren[]): Creates an object item (fields merged into object)
86
+ */
87
+ template: ArrayAllowedChildren | readonly ArrayAllowedChildren[];
90
88
  };
91
89
  /** Remove array item button field - dispatches RemoveAtIndexEvent or PopArrayItemEvent */
92
90
  type BsRemoveArrayItemButtonField = Omit<BsButtonField<RemoveAtIndexEvent>, 'event' | 'type' | 'eventArgs'> & {
93
- type: 'remove-array-item' | 'removeArrayItem';
94
- /**
95
- * The key of the array field to remove items from.
96
- * Required when the button is placed outside the array.
97
- * When inside an array, this is automatically determined from context.
98
- */
99
- arrayKey?: string;
91
+ type: 'remove-array-item' | 'removeArrayItem';
92
+ /**
93
+ * The key of the array field to remove items from.
94
+ * Required when the button is placed outside the array.
95
+ * When inside an array, this is automatically determined from context.
96
+ */
97
+ arrayKey?: string;
100
98
  };
101
99
  /** Pop array item button field - dispatches PopArrayItemEvent (removes last item) */
102
100
  type BsPopArrayItemButtonField = Omit<BsButtonField<PopArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
103
- type: 'pop-array-item' | 'popArrayItem';
104
- /**
105
- * The key of the array field to remove the last item from.
106
- * REQUIRED - must specify which array to pop from.
107
- */
108
- arrayKey: string;
101
+ type: 'pop-array-item' | 'popArrayItem';
102
+ /**
103
+ * The key of the array field to remove the last item from.
104
+ * REQUIRED - must specify which array to pop from.
105
+ */
106
+ arrayKey: string;
109
107
  };
110
108
  /** Shift array item button field - dispatches ShiftArrayItemEvent (removes first item) */
111
109
  type BsShiftArrayItemButtonField = Omit<BsButtonField<ShiftArrayItemEvent>, 'event' | 'type' | 'eventArgs'> & {
112
- type: 'shift-array-item' | 'shiftArrayItem';
113
- /**
114
- * The key of the array field to remove the first item from.
115
- * REQUIRED - must specify which array to shift from.
116
- */
117
- arrayKey: string;
110
+ type: 'shift-array-item' | 'shiftArrayItem';
111
+ /**
112
+ * The key of the array field to remove the first item from.
113
+ * REQUIRED - must specify which array to shift from.
114
+ */
115
+ arrayKey: string;
118
116
  };
119
-
120
117
  interface BsCheckboxProps {
121
- switch?: boolean;
122
- inline?: boolean;
123
- reverse?: boolean;
124
- indeterminate?: boolean;
125
- hint?: DynamicText;
118
+ switch?: boolean;
119
+ inline?: boolean;
120
+ reverse?: boolean;
121
+ indeterminate?: boolean;
122
+ hint?: DynamicText;
126
123
  }
127
124
  type BsCheckboxField = CheckboxField<BsCheckboxProps>;
128
-
129
125
  interface BsDatepickerProps extends DatepickerProps {
130
- useNgBootstrap?: boolean;
131
- size?: 'sm' | 'lg';
132
- floatingLabel?: boolean;
133
- hint?: DynamicText;
134
- validFeedback?: DynamicText;
135
- invalidFeedback?: DynamicText;
136
- displayMonths?: number;
137
- navigation?: 'select' | 'arrows' | 'none';
138
- outsideDays?: 'visible' | 'collapsed' | 'hidden';
139
- showWeekNumbers?: boolean;
126
+ useNgBootstrap?: boolean;
127
+ size?: 'sm' | 'lg';
128
+ floatingLabel?: boolean;
129
+ hint?: DynamicText;
130
+ validFeedback?: DynamicText;
131
+ invalidFeedback?: DynamicText;
132
+ displayMonths?: number;
133
+ navigation?: 'select' | 'arrows' | 'none';
134
+ outsideDays?: 'visible' | 'collapsed' | 'hidden';
135
+ showWeekNumbers?: boolean;
140
136
  }
141
137
  type BsDatepickerField = DatepickerField<BsDatepickerProps>;
142
-
143
138
  interface BsInputProps extends InputProps {
144
- size?: 'sm' | 'lg';
145
- floatingLabel?: boolean;
146
- hint?: DynamicText;
147
- validFeedback?: DynamicText;
148
- invalidFeedback?: DynamicText;
149
- plaintext?: boolean;
150
- type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
139
+ size?: 'sm' | 'lg';
140
+ floatingLabel?: boolean;
141
+ hint?: DynamicText;
142
+ validFeedback?: DynamicText;
143
+ invalidFeedback?: DynamicText;
144
+ plaintext?: boolean;
151
145
  }
152
146
  /**
153
147
  * Module-augmentable seam for adding custom addon types to `bs-input` at
154
148
  * the type level. Pair with `withCustomAddon(...)` for the runtime side:
155
149
  */
156
- interface BsAddonExtensions {
157
- }
150
+ interface BsAddonExtensions {}
158
151
  type BsAddonExtension = BsAddonExtensions[keyof BsAddonExtensions];
159
152
  /** Addon types accepted by `bs-input`. */
160
- type BsInputAddon = BsIconAddon | BsButtonAddon | TextAddon | TemplateAddon | BsAddonExtension;
153
+ type BsInputAddon = BsIconAddon$1 | BsButtonAddon$1 | TextAddon | TemplateAddon | BsAddonExtension;
161
154
  type BsInputField = InputField<BsInputProps> & {
162
- addons?: ReadonlyArray<BsInputAddon>;
155
+ addons?: ReadonlyArray<BsInputAddon>;
163
156
  };
164
-
165
157
  interface BsMultiCheckboxProps {
166
- switch?: boolean;
167
- inline?: boolean;
168
- reverse?: boolean;
169
- hint?: DynamicText;
158
+ switch?: boolean;
159
+ inline?: boolean;
160
+ reverse?: boolean;
161
+ hint?: DynamicText;
170
162
  }
171
163
  type BsMultiCheckboxField<T> = MultiCheckboxField<T, BsMultiCheckboxProps>;
172
-
173
164
  interface BsRadioProps {
174
- inline?: boolean;
175
- reverse?: boolean;
176
- buttonGroup?: boolean;
177
- buttonSize?: 'sm' | 'lg';
178
- hint?: DynamicText;
165
+ inline?: boolean;
166
+ reverse?: boolean;
167
+ buttonGroup?: boolean;
168
+ buttonSize?: 'sm' | 'lg';
169
+ hint?: DynamicText;
179
170
  }
180
171
  type BsRadioField<T> = RadioField<T, BsRadioProps>;
181
-
182
172
  /**
183
173
  * Bootstrap select uses native HTML <select> which only supports string values.
184
174
  * The compareWith function signature uses string to match this constraint.
185
175
  */
186
176
  interface BsSelectProps extends SelectProps {
187
- multiple?: boolean;
188
- size?: 'sm' | 'lg';
189
- htmlSize?: number;
190
- floatingLabel?: boolean;
191
- hint?: DynamicText;
192
- validFeedback?: DynamicText;
193
- invalidFeedback?: DynamicText;
194
- compareWith?: (o1: string, o2: string) => boolean;
177
+ multiple?: boolean;
178
+ size?: 'sm' | 'lg';
179
+ htmlSize?: number;
180
+ floatingLabel?: boolean;
181
+ hint?: DynamicText;
182
+ validFeedback?: DynamicText;
183
+ invalidFeedback?: DynamicText;
184
+ compareWith?: (o1: string, o2: string) => boolean;
195
185
  }
196
186
  type BsSelectField<T> = SelectField<T, BsSelectProps>;
197
-
187
+ /** Bootstrap select only supports string values due to native HTML select limitations */
198
188
  interface BsSliderProps {
199
- showValue?: boolean;
200
- valuePrefix?: string;
201
- valueSuffix?: string;
202
- hint?: DynamicText;
203
- /**
204
- * Adapter-level override for the slider minimum.
205
- * Field-level `minValue` (or the validator `min`) takes precedence.
206
- */
207
- min?: number;
208
- /**
209
- * Adapter-level override for the slider maximum.
210
- * Field-level `maxValue` (or the validator `max`) takes precedence.
211
- */
212
- max?: number;
213
- /**
214
- * Adapter-level override for the slider step increment.
215
- * Field-level `step` on `SliderField` takes precedence.
216
- */
217
- step?: number;
189
+ showValue?: boolean;
190
+ valuePrefix?: string;
191
+ valueSuffix?: string;
192
+ hint?: DynamicText;
193
+ /**
194
+ * Adapter-level override for the slider minimum.
195
+ * Field-level `minValue` (or the validator `min`) takes precedence.
196
+ */
197
+ min?: number;
198
+ /**
199
+ * Adapter-level override for the slider maximum.
200
+ * Field-level `maxValue` (or the validator `max`) takes precedence.
201
+ */
202
+ max?: number;
203
+ /**
204
+ * Adapter-level override for the slider step increment.
205
+ * Field-level `step` on `SliderField` takes precedence.
206
+ */
207
+ step?: number;
218
208
  }
219
209
  type BsSliderField = SliderField<BsSliderProps>;
220
-
221
210
  interface BsTextareaProps extends TextareaProps {
222
- size?: 'sm' | 'lg';
223
- floatingLabel?: boolean;
224
- hint?: DynamicText;
225
- validFeedback?: DynamicText;
226
- invalidFeedback?: DynamicText;
211
+ size?: 'sm' | 'lg';
212
+ floatingLabel?: boolean;
213
+ hint?: DynamicText;
214
+ validFeedback?: DynamicText;
215
+ invalidFeedback?: DynamicText;
227
216
  }
228
217
  type BsTextareaField = TextareaField<BsTextareaProps>;
229
-
230
218
  interface BsToggleProps {
231
- size?: 'sm' | 'lg';
232
- reverse?: boolean;
233
- inline?: boolean;
234
- hint?: DynamicText;
219
+ size?: 'sm' | 'lg';
220
+ reverse?: boolean;
221
+ inline?: boolean;
222
+ hint?: DynamicText;
235
223
  }
236
224
  type BsToggleField = ToggleField<BsToggleProps>;
237
-
238
- declare const BOOTSTRAP_FIELD_TYPES: FieldTypeDefinition[];
239
-
225
+ export declare const BOOTSTRAP_FIELD_TYPES: FieldTypeDefinition[];
240
226
  /**
241
227
  * Bootstrap field type constants
242
228
  * Based on available field components in the /fields folder
243
229
  */
244
- declare const BsField: {
245
- readonly Input: "input";
246
- readonly Select: "select";
247
- readonly Checkbox: "checkbox";
248
- readonly Button: "button";
249
- readonly Submit: "submit";
250
- readonly Next: "next";
251
- readonly Previous: "previous";
252
- readonly AddArrayItem: "add-array-item";
253
- readonly PrependArrayItem: "prepend-array-item";
254
- readonly InsertArrayItem: "insert-array-item";
255
- readonly RemoveArrayItem: "remove-array-item";
256
- readonly PopArrayItem: "pop-array-item";
257
- readonly ShiftArrayItem: "shift-array-item";
258
- readonly Textarea: "textarea";
259
- readonly Radio: "radio";
260
- readonly MultiCheckbox: "multi-checkbox";
261
- readonly Datepicker: "datepicker";
262
- readonly Slider: "slider";
263
- readonly Toggle: "toggle";
230
+ export declare const BsField: {
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";
264
250
  };
265
251
  type BsFieldType = (typeof BsField)[keyof typeof BsField];
266
-
267
252
  /** Bootstrap-specific props that can be set at form level and cascade to all fields. */
268
- type BsFormProps = BootstrapConfig;
253
+ type BsFormProps = BootstrapConfig$1;
269
254
  /** Bootstrap-specific FormConfig with type-safe defaultProps. */
270
255
  type BsFormConfig<TFields extends NarrowFields | RegisteredFieldTypes[] = RegisteredFieldTypes[], TValue = InferFormValue<TFields extends readonly RegisteredFieldTypes[] ? TFields : RegisteredFieldTypes[]>> = FormConfig<TFields, TValue, BsFormProps>;
271
-
272
- /**
273
- * Module augmentation for @ng-forge/dynamic-form
274
- * This file augments the FieldRegistryLeaves interface to include
275
- * all Bootstrap field types provided by this library.
276
- */
277
-
278
256
  declare module '@ng-forge/dynamic-forms' {
279
- interface FieldRegistryLeaves {
280
- input: BsInputField;
281
- select: BsSelectField<unknown>;
282
- checkbox: BsCheckboxField;
283
- button: BsButtonField<FormEvent>;
284
- submit: BsSubmitButtonField;
285
- next: BsNextButtonField;
286
- previous: BsPreviousButtonField;
287
- addArrayItem: BsAddArrayItemButtonField;
288
- 'add-array-item': BsAddArrayItemButtonField;
289
- prependArrayItem: BsPrependArrayItemButtonField;
290
- 'prepend-array-item': BsPrependArrayItemButtonField;
291
- insertArrayItem: BsInsertArrayItemButtonField;
292
- 'insert-array-item': BsInsertArrayItemButtonField;
293
- removeArrayItem: BsRemoveArrayItemButtonField;
294
- 'remove-array-item': BsRemoveArrayItemButtonField;
295
- popArrayItem: BsPopArrayItemButtonField;
296
- 'pop-array-item': BsPopArrayItemButtonField;
297
- shiftArrayItem: BsShiftArrayItemButtonField;
298
- 'shift-array-item': BsShiftArrayItemButtonField;
299
- textarea: BsTextareaField;
300
- radio: BsRadioField<unknown>;
301
- 'multi-checkbox': BsMultiCheckboxField<unknown>;
302
- datepicker: BsDatepickerField;
303
- slider: BsSliderField;
304
- toggle: BsToggleField;
305
- }
257
+ interface FieldRegistryLeaves {
258
+ input: BsInputField;
259
+ select: BsSelectField<unknown>;
260
+ checkbox: BsCheckboxField;
261
+ button: BsButtonField<FormEvent>;
262
+ submit: BsSubmitButtonField;
263
+ next: BsNextButtonField;
264
+ previous: BsPreviousButtonField;
265
+ addArrayItem: BsAddArrayItemButtonField;
266
+ 'add-array-item': BsAddArrayItemButtonField;
267
+ prependArrayItem: BsPrependArrayItemButtonField;
268
+ 'prepend-array-item': BsPrependArrayItemButtonField;
269
+ insertArrayItem: BsInsertArrayItemButtonField;
270
+ 'insert-array-item': BsInsertArrayItemButtonField;
271
+ removeArrayItem: BsRemoveArrayItemButtonField;
272
+ 'remove-array-item': BsRemoveArrayItemButtonField;
273
+ popArrayItem: BsPopArrayItemButtonField;
274
+ 'pop-array-item': BsPopArrayItemButtonField;
275
+ shiftArrayItem: BsShiftArrayItemButtonField;
276
+ 'shift-array-item': BsShiftArrayItemButtonField;
277
+ textarea: BsTextareaField;
278
+ radio: BsRadioField<unknown>;
279
+ 'multi-checkbox': BsMultiCheckboxField<unknown>;
280
+ datepicker: BsDatepickerField;
281
+ slider: BsSliderField;
282
+ toggle: BsToggleField;
283
+ }
306
284
  }
307
-
308
285
  /** Field type definitions for Bootstrap components. */
309
286
  type BootstrapFieldTypes = FieldTypeDefinition[];
310
287
  type BootstrapConfigFeature = {
311
- ɵkind: 'bootstrap-config';
312
- ɵproviders: Provider[];
288
+ ɵkind: 'bootstrap-config';
289
+ ɵproviders: Provider[];
313
290
  };
314
291
  /**
315
292
  * Default `withBootstrapFields()` shape — field defs + the auto-included
@@ -326,45 +303,42 @@ type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapAddonsFeature
326
303
  * @returns Tuple of field type definitions, the addons feature, and
327
304
  * optionally a config feature.
328
305
  */
329
- declare function withBootstrapFields(): BootstrapFieldsWithAddons;
330
- declare function withBootstrapFields(config: BootstrapConfig): BootstrapFieldsWithConfig;
331
- declare function withBootstrapFields(config: BootstrapConfig | undefined): BootstrapFieldsWithAddons | BootstrapFieldsWithConfig;
306
+ export declare function withBootstrapFields(): BootstrapFieldsWithAddons;
307
+ export declare function withBootstrapFields(config: BootstrapConfig$1): BootstrapFieldsWithConfig;
308
+ export declare function withBootstrapFields(config: BootstrapConfig$1 | undefined): BootstrapFieldsWithAddons | BootstrapFieldsWithConfig;
332
309
  /**
333
310
  * Feature type discriminant for the Bootstrap addons feature. Matches core's
334
311
  * `'addons'` type so providers flow through the standard addon-type pipeline
335
312
  * in `provideDynamicForm`.
336
313
  */
337
314
  type BootstrapAddonsFeature = {
338
- ɵkind: 'addons';
339
- ɵproviders: Provider[];
315
+ ɵkind: 'addons';
316
+ ɵproviders: Provider[];
340
317
  };
341
318
  /** Register Bootstrap-shipped addon types (`bs-icon`, `bs-button`) standalone. */
342
- declare function withBootstrapAddons(): BootstrapAddonsFeature;
343
-
319
+ export declare function withBootstrapAddons(): BootstrapAddonsFeature;
344
320
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/button`. Import it from there to use the class as a value. */
345
- type BsButtonFieldComponent<TEvent extends FormEvent> = BsButtonFieldComponent$1<TEvent>;
321
+ export type BsButtonFieldComponent<TEvent extends FormEvent> = BsButtonFieldComponent$1<TEvent>;
346
322
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/checkbox`. Import it from there to use the class as a value. */
347
- type BsCheckboxFieldComponent = BsCheckboxFieldComponent$1;
323
+ export type BsCheckboxFieldComponent = BsCheckboxFieldComponent$1;
348
324
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/datepicker`. Import it from there to use the class as a value. */
349
- type BsDatepickerFieldComponent = BsDatepickerFieldComponent$1;
325
+ export type BsDatepickerFieldComponent = BsDatepickerFieldComponent$1;
350
326
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/input`. Import it from there to use the class as a value. */
351
- type BsInputFieldComponent = BsInputFieldComponent$1;
327
+ export type BsInputFieldComponent = BsInputFieldComponent$1;
352
328
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/multi-checkbox`. Import it from there to use the class as a value. */
353
- type BsMultiCheckboxFieldComponent = BsMultiCheckboxFieldComponent$1;
329
+ export type BsMultiCheckboxFieldComponent = BsMultiCheckboxFieldComponent$1;
354
330
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/radio`. Import it from there to use the class as a value. */
355
- type BsRadioFieldComponent = BsRadioFieldComponent$1;
331
+ export type BsRadioFieldComponent = BsRadioFieldComponent$1;
356
332
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/select`. Import it from there to use the class as a value. */
357
- type BsSelectFieldComponent = BsSelectFieldComponent$1;
333
+ export type BsSelectFieldComponent = BsSelectFieldComponent$1;
358
334
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/slider`. Import it from there to use the class as a value. */
359
- type BsSliderFieldComponent = BsSliderFieldComponent$1;
335
+ export type BsSliderFieldComponent = BsSliderFieldComponent$1;
360
336
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/textarea`. Import it from there to use the class as a value. */
361
- type BsTextareaFieldComponent = BsTextareaFieldComponent$1;
337
+ export type BsTextareaFieldComponent = BsTextareaFieldComponent$1;
362
338
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/toggle`. Import it from there to use the class as a value. */
363
- type BsToggleFieldComponent = BsToggleFieldComponent$1;
339
+ export type BsToggleFieldComponent = BsToggleFieldComponent$1;
364
340
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/addon-icon`. Import it from there to use the class as a value. */
365
- type BsIconAddonComponent = BsIconAddonComponent$1;
341
+ export type BsIconAddonComponent = BsIconAddonComponent$1;
366
342
  /** Class type of the component in `@ng-forge/dynamic-forms-bootstrap/lazy/addon-button`. Import it from there to use the class as a value. */
367
- type BsButtonAddonComponent = BsButtonAddonComponent$1;
368
-
369
- export { BOOTSTRAP_FIELD_TYPES, BsField, withBootstrapAddons, withBootstrapFields };
370
- export type { BsAddArrayItemButtonField, BsAddonExtensions, BsButtonAddonComponent, BsButtonField, BsButtonFieldComponent, BsButtonProps, BsCheckboxField, BsCheckboxFieldComponent, BsCheckboxProps, BsDatepickerField, BsDatepickerFieldComponent, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsIconAddonComponent, BsInputAddon, BsInputField, BsInputFieldComponent, BsInputProps, BsInsertArrayItemButtonField, BsMultiCheckboxField, BsMultiCheckboxFieldComponent, BsMultiCheckboxProps, BsNextButtonField, BsPopArrayItemButtonField, BsPrependArrayItemButtonField, BsPreviousButtonField, BsRadioField, BsRadioFieldComponent, BsRadioProps, BsRemoveArrayItemButtonField, BsSelectField, BsSelectFieldComponent, BsSelectProps, BsShiftArrayItemButtonField, BsSliderField, BsSliderFieldComponent, BsSliderProps, BsSubmitButtonField, BsTextareaField, BsTextareaFieldComponent, BsTextareaProps, BsToggleField, BsToggleFieldComponent, BsToggleProps };
343
+ export type BsButtonAddonComponent = BsButtonAddonComponent$1;
344
+ export { BOOTSTRAP_CONFIG, BS_INPUT_TYPE_OVERRIDE, type BootstrapConfig, type BsAddArrayItemButtonField, type BsAddon, type BsAddonExtensions, type BsButtonAddon, type BsButtonField, type BsButtonProps, type BsCheckboxField, type BsCheckboxProps, type BsDatepickerField, type BsDatepickerProps, type BsFieldType, type BsFormConfig, type BsFormProps, type BsIconAddon, type BsInputAddon, type BsInputField, type BsInputProps, type BsInsertArrayItemButtonField, type BsMultiCheckboxField, type BsMultiCheckboxProps, type BsNextButtonField, type BsPopArrayItemButtonField, type BsPrependArrayItemButtonField, type BsPreviousButtonField, type BsRadioField, type BsRadioProps, type BsRemoveArrayItemButtonField, type BsSelectField, type BsSelectProps, type BsShiftArrayItemButtonField, type BsSliderField, type BsSliderProps, type BsSubmitButtonField, type BsTextareaField, type BsTextareaProps, type BsToggleField, type BsToggleProps };
@@ -1,25 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { FieldErrorsWrapperBase, provideFieldErrorDisplay } from '@ng-forge/dynamic-forms/integration';
4
-
5
- class BsFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsFieldErrorsWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: BsFieldErrorsWrapperComponent, isStandalone: true, selector: "df-bs-field-errors", providers: [provideFieldErrorDisplay(() => BsFieldErrorsWrapperComponent)], usesInheritance: true, ngImport: i0, template: `
8
- <ng-container #fieldComponent></ng-container>
9
- @if (ngf.errorsToDisplay()[0]; as error) {
10
- <div class="invalid-feedback d-block" role="alert" [id]="ngf.errorId()">{{ error.message }}</div>
11
- }
12
- `, isInline: true, styles: [".invalid-feedback{color:var(--df-error-color, var(--bs-form-invalid-color, var(--bs-danger, #dc3545)));font-size:var(--df-error-font-size, .875em)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13
- }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsFieldErrorsWrapperComponent, decorators: [{
15
- type: Component,
16
- args: [{ selector: 'df-bs-field-errors', template: `
17
- <ng-container #fieldComponent></ng-container>
18
- @if (ngf.errorsToDisplay()[0]; as error) {
19
- <div class="invalid-feedback d-block" role="alert" [id]="ngf.errorId()">{{ error.message }}</div>
20
- }
21
- `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideFieldErrorDisplay(() => BsFieldErrorsWrapperComponent)], styles: [".invalid-feedback{color:var(--df-error-color, var(--bs-form-invalid-color, var(--bs-danger, #dc3545)));font-size:var(--df-error-font-size, .875em)}\n"] }]
22
- }] });
23
-
24
- export { BsFieldErrorsWrapperComponent, BsFieldErrorsWrapperComponent as default };
25
- //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs","mappings":";;;;AAoBc;;;;;;;AALX;;;;AANS","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/wrappers/field-errors/bs-field-errors-wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FieldErrorsWrapperBase, provideFieldErrorDisplay } from '@ng-forge/dynamic-forms/integration';\n\n/**\n * Bootstrap rendering of a validation message for the wrapped field.\n * `d-block` is required — Bootstrap only reveals `.invalid-feedback` next to a\n * sibling `.is-invalid` control, which a container has none of.\n */\n@Component({\n selector: 'df-bs-field-errors',\n template: `\n <ng-container #fieldComponent></ng-container>\n @if (ngf.errorsToDisplay()[0]; as error) {\n <div class=\"invalid-feedback d-block\" role=\"alert\" [id]=\"ngf.errorId()\">{{ error.message }}</div>\n }\n `,\n styleUrl: './bs-field-errors-wrapper.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideFieldErrorDisplay(() => BsFieldErrorsWrapperComponent)],\n})\nexport default class BsFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {}\n\nexport { BsFieldErrorsWrapperComponent };\n"]}