@ng-forge/dynamic-forms-bootstrap 0.9.0-next.9 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { FormEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, FieldComponent, DynamicText, FormEventConstructor, ArrayItemContext, CheckedFieldComponent, ValidationMessages, FieldMeta, ValueFieldComponent, ValueType, FieldOption, FieldTypeDefinition, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
1
+ import * as _ng_forge_dynamic_forms from '@ng-forge/dynamic-forms';
2
+ import { FormEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, CheckedFieldComponent, ValueFieldComponent, BaseAddon, DynamicValue, AddonActionPreset, RegisteredActionRef, AddonActionHandler, TextAddon, TemplateAddon, WrapperFieldInputs, ValueType, FieldOption, FieldTypeDefinition, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
2
3
  import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
- import { ButtonField, EventArgs, CheckboxField, DatepickerField, DatepickerProps, InputMeta, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, TextareaMeta, ToggleField } from '@ng-forge/dynamic-forms/integration';
4
+ import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField } from '@ng-forge/dynamic-forms/integration';
4
5
  import * as _angular_core from '@angular/core';
5
- import { InjectionToken, Provider } from '@angular/core';
6
- import { FieldTree } from '@angular/forms/signals';
6
+ import { InjectionToken, Provider, WritableSignal } from '@angular/core';
7
7
 
8
8
  interface BsButtonProps {
9
9
  variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
@@ -14,7 +14,6 @@ interface BsButtonProps {
14
14
  type?: 'button' | 'submit' | 'reset';
15
15
  }
16
16
  type BsButtonField<TEvent extends FormEvent> = ButtonField<BsButtonProps, TEvent>;
17
- type BsButtonComponent<TEvent extends FormEvent> = FieldComponent<BsButtonField<TEvent>>;
18
17
  /**
19
18
  * Specific button field types with preconfigured events
20
19
  */
@@ -111,33 +110,17 @@ type ShiftArrayItemButtonField = Omit<BsButtonField<ShiftArrayItemEvent>, 'event
111
110
  arrayKey: string;
112
111
  };
113
112
 
114
- declare class BsButtonFieldComponent<TEvent extends FormEvent> implements BsButtonComponent<TEvent> {
115
- private readonly eventBus;
116
- private readonly arrayContext;
117
- readonly key: _angular_core.InputSignal<string>;
118
- readonly label: _angular_core.InputSignal<DynamicText>;
119
- readonly disabled: _angular_core.InputSignal<boolean>;
120
- readonly hidden: _angular_core.InputSignal<boolean>;
121
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
122
- readonly className: _angular_core.InputSignal<string>;
123
- /** Event to dispatch on click. Optional for submit buttons (native form submit handles it). */
124
- readonly event: _angular_core.InputSignal<FormEventConstructor<TEvent> | undefined>;
125
- readonly eventArgs: _angular_core.InputSignal<EventArgs | undefined>;
113
+ declare class BsButtonFieldComponent<TEvent extends FormEvent> {
114
+ protected readonly action: _ng_forge_dynamic_forms_integration.NgForgeAction<TEvent>;
126
115
  readonly props: _angular_core.InputSignal<BsButtonProps | undefined>;
127
- readonly eventContext: _angular_core.InputSignal<ArrayItemContext | undefined>;
128
- /** Resolved button type - defaults to 'button' if not specified in props */
116
+ /** Resolved button type — defaults to 'button' unless overridden via props. */
129
117
  readonly buttonType: _angular_core.Signal<"button" | "submit" | "reset">;
130
118
  readonly buttonTestId: _angular_core.Signal<string>;
131
119
  readonly buttonClasses: _angular_core.Signal<string>;
132
- /**
133
- * Handle button click.
134
- * - For submit buttons (type="submit"): do nothing, native form submit handles it
135
- * - For other buttons: dispatch the configured event via EventBus
136
- */
120
+ /** Submit buttons let the native form handle submission; other buttons dispatch via the directive. */
137
121
  onClick(): void;
138
- private dispatchEvent;
139
122
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsButtonFieldComponent<any>, never>;
140
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsButtonFieldComponent<any>, "df-bs-button", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "event": { "alias": "event"; "required": false; "isSignal": true; }; "eventArgs": { "alias": "eventArgs"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "eventContext": { "alias": "eventContext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
123
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsButtonFieldComponent<any>, "df-bs-button", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeActionHost; inputs: {}; outputs: {}; }]>;
141
124
  }
142
125
 
143
126
  interface BsCheckboxProps {
@@ -148,31 +131,14 @@ interface BsCheckboxProps {
148
131
  hint?: DynamicText;
149
132
  }
150
133
  type BsCheckboxField = CheckboxField<BsCheckboxProps>;
134
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
151
135
  type BsCheckboxComponent = CheckedFieldComponent<BsCheckboxField>;
152
136
 
153
- declare class BsCheckboxFieldComponent implements BsCheckboxComponent {
154
- private readonly elementRef;
155
- readonly field: _angular_core.InputSignal<FieldTree<boolean>>;
156
- readonly key: _angular_core.InputSignal<string>;
157
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
158
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
159
- readonly className: _angular_core.InputSignal<string>;
160
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
137
+ declare class BsCheckboxFieldComponent {
138
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<boolean>;
161
139
  readonly props: _angular_core.InputSignal<BsCheckboxProps | undefined>;
162
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
163
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
164
- readonly meta: _angular_core.InputSignal<FieldMeta | undefined>;
165
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
166
- readonly showErrors: _angular_core.Signal<boolean>;
167
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
168
- constructor();
169
- protected readonly hintId: _angular_core.Signal<string>;
170
- protected readonly errorId: _angular_core.Signal<string>;
171
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
172
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
173
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
174
140
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsCheckboxFieldComponent, never>;
175
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsCheckboxFieldComponent, "df-bs-checkbox", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
141
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsCheckboxFieldComponent, "df-bs-checkbox", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
176
142
  }
177
143
 
178
144
  interface BsDatepickerProps extends DatepickerProps {
@@ -188,36 +154,132 @@ interface BsDatepickerProps extends DatepickerProps {
188
154
  showWeekNumbers?: boolean;
189
155
  }
190
156
  type BsDatepickerField = DatepickerField<BsDatepickerProps>;
157
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
191
158
  type BsDatepickerComponent = ValueFieldComponent<BsDatepickerField>;
192
159
 
193
- declare class BsDatepickerFieldComponent implements BsDatepickerComponent {
194
- private readonly elementRef;
195
- readonly field: _angular_core.InputSignal<FieldTree<string | Date>>;
196
- readonly key: _angular_core.InputSignal<string>;
197
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
198
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
199
- readonly className: _angular_core.InputSignal<string>;
200
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
160
+ declare class BsDatepickerFieldComponent {
161
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
201
162
  readonly minDate: _angular_core.InputSignal<string | Date | null>;
202
163
  readonly maxDate: _angular_core.InputSignal<string | Date | null>;
203
164
  readonly startAt: _angular_core.InputSignal<Date | null>;
204
165
  readonly props: _angular_core.InputSignal<BsDatepickerProps | undefined>;
205
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
206
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
207
- readonly meta: _angular_core.InputSignal<InputMeta | undefined>;
208
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
209
- readonly showErrors: _angular_core.Signal<boolean>;
210
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
211
- constructor();
212
166
  readonly minAsString: _angular_core.Signal<string | null>;
213
167
  readonly maxAsString: _angular_core.Signal<string | null>;
214
- protected readonly hintId: _angular_core.Signal<string>;
215
- protected readonly errorId: _angular_core.Signal<string>;
216
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
217
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
218
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
219
168
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsDatepickerFieldComponent, never>;
220
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsDatepickerFieldComponent, "df-bs-datepicker", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
169
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsDatepickerFieldComponent, "df-bs-datepicker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
170
+ }
171
+
172
+ /**
173
+ * Decorative icon addon for Bootstrap fields.
174
+ *
175
+ * Renders `<i class="bi bi-{icon}">` (Bootstrap Icons). The `icon` string is the
176
+ * bare suffix — e.g., `'search'` produces `<i class="bi bi-search">`.
177
+ *
178
+ * Add `ariaLabel` for icons that convey meaning (search, error, success);
179
+ * leave it omitted for purely decorative icons (will be `aria-hidden="true"`).
180
+ */
181
+ interface BsIconAddon extends BaseAddon {
182
+ readonly kind: 'bs-icon';
183
+ /** Bootstrap Icons name without the `bi-` prefix (e.g., `'search'`, `'x'`). */
184
+ readonly icon: string;
185
+ /** Accessible label for icons that convey meaning. */
186
+ readonly ariaLabel?: DynamicText;
187
+ }
188
+ /**
189
+ * Common shape of every `bs-button` addon — properties that don't
190
+ * participate in either XOR axis.
191
+ */
192
+ interface BsButtonBase extends BaseAddon {
193
+ readonly kind: 'bs-button';
194
+ /** Bootstrap button variant (mapped to `btn-outline-{severity}`). */
195
+ readonly severity?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
196
+ /** Reactive loading state — swaps the button content for a spinner. */
197
+ readonly loading?: DynamicValue<boolean>;
198
+ }
199
+ /**
200
+ * Click axis — XOR enforced at type level so configurations that combine
201
+ * two click handlers (e.g., `preset` AND `actionRef`) are rejected by
202
+ * TypeScript. The four shapes:
203
+ *
204
+ * - `Preset` — built-in preset action.
205
+ * - `ActionRef` — typed reference to a handler registered via `provideAddonActions(...)`.
206
+ * - `Action` — inline handler (code-only; dropped from JSON-derived configs).
207
+ * - `None` — decorative button with no handler.
208
+ */
209
+ type BsButtonClickPreset = {
210
+ /** Built-in preset action (e.g., `'clear'`, `'toggle-password-visibility'`). JSON-safe. */
211
+ readonly preset: AddonActionPreset;
212
+ readonly actionRef?: never;
213
+ readonly action?: never;
214
+ };
215
+ /**
216
+ * Value type for the `actionRef` slot. When no actions have been registered
217
+ * via `provideAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
218
+ * which would make this variant uninhabitable. Fall back to `string` so the
219
+ * variant stays usable; once the user augments `DynamicFormActionRegistry`,
220
+ * autocomplete tightens to the registered keys.
221
+ */
222
+ type BsButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
223
+ type BsButtonClickActionRef = {
224
+ readonly preset?: never;
225
+ /** Reference to a handler registered via `provideAddonActions(...)`. JSON-safe. */
226
+ readonly actionRef: BsButtonActionRef;
227
+ readonly action?: never;
228
+ };
229
+ type BsButtonClickAction = {
230
+ readonly preset?: never;
231
+ readonly actionRef?: never;
232
+ /** Inline handler — code-only; dropped from JSON-derived configs. Matches the generic `AddonActionHandler` shape used by `provideAddonActions(...)`. */
233
+ readonly action: AddonActionHandler;
234
+ };
235
+ type BsButtonClickNone = {
236
+ readonly preset?: never;
237
+ readonly actionRef?: never;
238
+ readonly action?: never;
239
+ };
240
+ type BsButtonClick = BsButtonClickPreset | BsButtonClickActionRef | BsButtonClickAction | BsButtonClickNone;
241
+ /**
242
+ * Content axis — XOR enforced at type level so an icon-only button is
243
+ * forced to declare `ariaLabel`.
244
+ */
245
+ type BsButtonContentIconOnly = {
246
+ readonly icon: string;
247
+ readonly label?: never;
248
+ /** REQUIRED: icon-only buttons must carry an accessible label. */
249
+ readonly ariaLabel: DynamicText;
250
+ };
251
+ type BsButtonContentLabeled = {
252
+ readonly icon?: string;
253
+ readonly label: DynamicText;
254
+ readonly ariaLabel?: DynamicText;
255
+ };
256
+ type BsButtonContentDecorative = {
257
+ readonly icon?: never;
258
+ readonly label?: never;
259
+ readonly ariaLabel?: DynamicText;
260
+ };
261
+ type BsButtonContent = BsButtonContentIconOnly | BsButtonContentLabeled | BsButtonContentDecorative;
262
+ /**
263
+ * Interactive button addon for Bootstrap fields.
264
+ *
265
+ * Renders `<button class="btn btn-outline-{severity}">` with optional icon,
266
+ * label, severity, and reactive loading state.
267
+ *
268
+ * Type-level guarantees:
269
+ *
270
+ * - **Content axis (XOR):** `IconOnly` (icon + required ariaLabel) |
271
+ * `Labeled` (label, icon optional) | `Decorative` (neither).
272
+ * - **Click axis (XOR):** exactly one of `preset` / `actionRef` / `action`,
273
+ * or none.
274
+ */
275
+ type BsButtonAddon = BsButtonBase & BsButtonContent & BsButtonClick;
276
+ /** Union of all Bootstrap-shipped addon kinds. */
277
+ type BsAddon = BsIconAddon | BsButtonAddon;
278
+ declare module '@ng-forge/dynamic-forms' {
279
+ interface DynamicFormAddonRegistry {
280
+ 'bs-icon': BsIconAddon;
281
+ 'bs-button': BsButtonAddon;
282
+ }
221
283
  }
222
284
 
223
285
  interface BsInputProps extends InputProps {
@@ -229,40 +291,60 @@ interface BsInputProps extends InputProps {
229
291
  plaintext?: boolean;
230
292
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
231
293
  }
232
- type BsInputField = InputField<BsInputProps>;
294
+ /**
295
+ * Module-augmentable seam for adding custom addon kinds to `bs-input` at
296
+ * the type level. Pair with `withCustomAddon(...)` for the runtime side:
297
+ *
298
+ * ```ts
299
+ * declare module '@ng-forge/dynamic-forms-bootstrap' {
300
+ * interface BsAddonExtensions {
301
+ * 'my-rating': MyRatingAddon;
302
+ * }
303
+ * }
304
+ * ```
305
+ *
306
+ * Empty by default — the extension lookup resolves to `never` and contributes
307
+ * nothing to the union.
308
+ */
309
+ interface BsAddonExtensions {
310
+ }
311
+ type BsAddonExtension = BsAddonExtensions[keyof BsAddonExtensions];
312
+ /**
313
+ * Addon kinds accepted by `bs-input`.
314
+ *
315
+ * Bootstrap-specific kinds (`bs-icon`, `bs-button`) plus the universal `text`
316
+ * and `template` kinds. `component` is permitted at runtime via the broader
317
+ * `BaseAddon` union (and dropped in JSON-derived configs by the validator)
318
+ * but excluded here so the IDE narrows tightly to declarative shapes.
319
+ *
320
+ * To extend with custom kinds, augment `BsAddonExtensions`.
321
+ */
322
+ type BsInputAddon = BsIconAddon | BsButtonAddon | TextAddon | TemplateAddon | BsAddonExtension;
323
+ type BsInputField = InputField<BsInputProps> & {
324
+ addons?: ReadonlyArray<BsInputAddon>;
325
+ };
326
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
233
327
  type BsInputComponent = ValueFieldComponent<BsInputField>;
234
328
 
235
- declare class BsInputFieldComponent implements BsInputComponent {
329
+ declare class BsInputFieldComponent {
236
330
  private bootstrapConfig;
237
- private readonly elementRef;
238
- readonly field: _angular_core.InputSignal<FieldTree<string>>;
239
- readonly key: _angular_core.InputSignal<string>;
240
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
241
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
242
- readonly className: _angular_core.InputSignal<string>;
243
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
331
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
332
+ protected readonly ngfa: _ng_forge_dynamic_forms_integration.TypedNgForgeAddons<BsInputAddon>;
244
333
  readonly props: _angular_core.InputSignal<BsInputProps | undefined>;
245
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
246
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
247
- readonly meta: _angular_core.InputSignal<InputMeta | undefined>;
248
- constructor();
249
- readonly effectiveSize: _angular_core.Signal<"sm" | "lg" | undefined>;
250
- readonly effectiveFloatingLabel: _angular_core.Signal<boolean>;
251
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
252
- readonly showErrors: _angular_core.Signal<boolean>;
253
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
254
- /** Unique ID for the hint element, used for aria-describedby */
255
- protected readonly hintId: _angular_core.Signal<string>;
256
- /** Base ID for error elements, used for aria-describedby */
257
- protected readonly errorId: _angular_core.Signal<string>;
258
- /** aria-invalid: true when field is invalid AND touched, false otherwise */
259
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
260
- /** aria-required: true if field is required, null otherwise (to remove attribute) */
261
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
262
- /** aria-describedby: links to hint and error messages for screen readers */
263
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
334
+ /**
335
+ * Wrapper-style host bag pushed by `DfFieldOutlet`. Declared at the
336
+ * component level so `setInputIfDeclared` (which uses
337
+ * `reflectComponentType`) can write it.
338
+ */
339
+ readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
340
+ /** Per-instance type override populated by `toggle-password-visibility` preset. */
341
+ private readonly typeOverride;
342
+ readonly size: _angular_core.Signal<"sm" | "lg" | undefined>;
343
+ readonly floatingLabel: _angular_core.Signal<boolean>;
344
+ /** Override (set by `toggle-password-visibility` preset) wins over `props().type`. */
345
+ protected readonly type: _angular_core.Signal<string>;
264
346
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsInputFieldComponent, never>;
265
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsInputFieldComponent, "df-bs-input", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
347
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsInputFieldComponent, "df-bs-input", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; "fieldInputs": { "alias": "fieldInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }, { directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddons; inputs: {}; outputs: {}; }]>;
266
348
  }
267
349
 
268
350
  interface BsMultiCheckboxProps {
@@ -272,36 +354,20 @@ interface BsMultiCheckboxProps {
272
354
  hint?: DynamicText;
273
355
  }
274
356
  type BsMultiCheckboxField<T> = MultiCheckboxField<T, BsMultiCheckboxProps>;
357
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
275
358
  type BsMultiCheckboxComponent = ValueFieldComponent<BsMultiCheckboxField<ValueType>>;
276
359
 
277
- declare class BsMultiCheckboxFieldComponent implements BsMultiCheckboxComponent {
278
- private readonly elementRef;
279
- readonly field: _angular_core.InputSignal<FieldTree<ValueType[]>>;
280
- readonly key: _angular_core.InputSignal<string>;
281
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
282
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
283
- readonly className: _angular_core.InputSignal<string>;
284
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
360
+ declare class BsMultiCheckboxFieldComponent {
361
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType[]>;
285
362
  readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
286
363
  readonly props: _angular_core.InputSignal<BsMultiCheckboxProps | undefined>;
287
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
288
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
289
- readonly meta: _angular_core.InputSignal<FieldMeta | undefined>;
290
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
291
- readonly showErrors: _angular_core.Signal<boolean>;
292
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
293
364
  /** Computed map of checked option values for O(1) lookup in template */
294
365
  readonly checkedValuesMap: _angular_core.Signal<Record<string, boolean>>;
295
366
  valueViewModel: _angular_core.WritableSignal<FieldOption<ValueType>[]>;
296
367
  constructor();
297
368
  onCheckboxChange(option: FieldOption<ValueType>, event: Event): void;
298
- protected readonly hintId: _angular_core.Signal<string>;
299
- protected readonly errorId: _angular_core.Signal<string>;
300
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
301
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
302
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
303
369
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsMultiCheckboxFieldComponent, never>;
304
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsMultiCheckboxFieldComponent, "df-bs-multi-checkbox", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
370
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsMultiCheckboxFieldComponent, "df-bs-multi-checkbox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
305
371
  }
306
372
 
307
373
  interface BsRadioProps {
@@ -312,32 +378,15 @@ interface BsRadioProps {
312
378
  hint?: DynamicText;
313
379
  }
314
380
  type BsRadioField<T> = RadioField<T, BsRadioProps>;
381
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
315
382
  type BsRadioComponent = ValueFieldComponent<BsRadioField<ValueType>>;
316
383
 
317
- declare class BsRadioFieldComponent implements BsRadioComponent {
318
- private readonly elementRef;
319
- readonly field: _angular_core.InputSignal<FieldTree<ValueType>>;
320
- readonly key: _angular_core.InputSignal<string>;
321
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
322
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
323
- readonly className: _angular_core.InputSignal<string>;
324
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
384
+ declare class BsRadioFieldComponent {
385
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType>;
325
386
  readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
326
387
  readonly props: _angular_core.InputSignal<BsRadioProps | undefined>;
327
- readonly meta: _angular_core.InputSignal<FieldMeta | undefined>;
328
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
329
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
330
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
331
- readonly showErrors: _angular_core.Signal<boolean>;
332
- constructor();
333
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
334
- protected readonly hintId: _angular_core.Signal<string>;
335
- protected readonly errorId: _angular_core.Signal<string>;
336
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
337
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
338
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
339
388
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsRadioFieldComponent, never>;
340
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsRadioFieldComponent, "df-bs-radio", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
389
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsRadioFieldComponent, "df-bs-radio", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
341
390
  }
342
391
 
343
392
  /**
@@ -356,34 +405,17 @@ interface BsSelectProps extends SelectProps {
356
405
  }
357
406
  type BsSelectField<T> = SelectField<T, BsSelectProps>;
358
407
  /** Bootstrap select only supports string values due to native HTML select limitations */
408
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
359
409
  type BsSelectComponent = ValueFieldComponent<BsSelectField<string>>;
360
410
 
361
- declare class BsSelectFieldComponent implements BsSelectComponent {
362
- private readonly elementRef;
363
- readonly field: _angular_core.InputSignal<FieldTree<string>>;
364
- readonly key: _angular_core.InputSignal<string>;
365
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
366
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
367
- readonly className: _angular_core.InputSignal<string>;
368
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
411
+ declare class BsSelectFieldComponent {
412
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
369
413
  readonly options: _angular_core.InputSignal<FieldOption<string>[]>;
370
414
  readonly props: _angular_core.InputSignal<BsSelectProps | undefined>;
371
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
372
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
373
- readonly meta: _angular_core.InputSignal<FieldMeta | undefined>;
374
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
375
- readonly showErrors: _angular_core.Signal<boolean>;
376
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
377
- constructor();
378
415
  defaultCompare: (value1: any, value2: any) => boolean;
379
416
  protected isSelected(optionValue: string, fieldValue: string | string[] | null): boolean;
380
- protected readonly hintId: _angular_core.Signal<string>;
381
- protected readonly errorId: _angular_core.Signal<string>;
382
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
383
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
384
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
385
417
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSelectFieldComponent, never>;
386
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSelectFieldComponent, "df-bs-select", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
418
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSelectFieldComponent, "df-bs-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
387
419
  }
388
420
 
389
421
  interface BsSliderProps {
@@ -408,34 +440,17 @@ interface BsSliderProps {
408
440
  step?: number;
409
441
  }
410
442
  type BsSliderField = SliderField<BsSliderProps>;
443
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
411
444
  type BsSliderComponent = ValueFieldComponent<BsSliderField>;
412
445
 
413
- declare class BsSliderFieldComponent implements BsSliderComponent {
414
- private readonly elementRef;
415
- readonly field: _angular_core.InputSignal<FieldTree<number>>;
416
- readonly key: _angular_core.InputSignal<string>;
417
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
418
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
419
- readonly className: _angular_core.InputSignal<string>;
420
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
446
+ declare class BsSliderFieldComponent {
447
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<number>;
421
448
  readonly min: _angular_core.InputSignal<number>;
422
449
  readonly max: _angular_core.InputSignal<number>;
423
450
  readonly step: _angular_core.InputSignal<number | undefined>;
424
451
  readonly props: _angular_core.InputSignal<BsSliderProps | undefined>;
425
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
426
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
427
- readonly meta: _angular_core.InputSignal<InputMeta | undefined>;
428
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
429
- readonly showErrors: _angular_core.Signal<boolean>;
430
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
431
- constructor();
432
- protected readonly hintId: _angular_core.Signal<string>;
433
- protected readonly errorId: _angular_core.Signal<string>;
434
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
435
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
436
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
437
452
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSliderFieldComponent, never>;
438
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSliderFieldComponent, "df-bs-slider", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
453
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSliderFieldComponent, "df-bs-slider", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
439
454
  }
440
455
 
441
456
  interface BsTextareaProps extends TextareaProps {
@@ -446,47 +461,14 @@ interface BsTextareaProps extends TextareaProps {
446
461
  invalidFeedback?: DynamicText;
447
462
  }
448
463
  type BsTextareaField = TextareaField<BsTextareaProps>;
464
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
449
465
  type BsTextareaComponent = ValueFieldComponent<BsTextareaField>;
450
466
 
451
- declare class BsTextareaFieldComponent implements BsTextareaComponent {
452
- private readonly elementRef;
453
- readonly field: _angular_core.InputSignal<FieldTree<string>>;
454
- readonly key: _angular_core.InputSignal<string>;
455
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
456
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
457
- readonly className: _angular_core.InputSignal<string>;
458
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
467
+ declare class BsTextareaFieldComponent {
468
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
459
469
  readonly props: _angular_core.InputSignal<BsTextareaProps | undefined>;
460
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
461
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
462
- readonly meta: _angular_core.InputSignal<TextareaMeta | undefined>;
463
- /**
464
- * Reference to the native textarea element.
465
- * Used to imperatively sync the readonly attribute since Angular Signal Forms'
466
- * [field] directive doesn't sync FieldState.readonly() to the DOM.
467
- */
468
- private readonly textareaRef;
469
- /**
470
- * Computed signal that extracts the readonly state from the field.
471
- */
472
- private readonly isReadonly;
473
- /**
474
- * Workaround: Angular Signal Forms' [field] directive does NOT sync the readonly
475
- * attribute to the DOM. This effect imperatively sets/removes the readonly attribute
476
- * on the native textarea element whenever the readonly state changes.
477
- */
478
- private readonly syncReadonlyToDom;
479
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
480
- readonly showErrors: _angular_core.Signal<boolean>;
481
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
482
- constructor();
483
- protected readonly hintId: _angular_core.Signal<string>;
484
- protected readonly errorId: _angular_core.Signal<string>;
485
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
486
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
487
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
488
470
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTextareaFieldComponent, never>;
489
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTextareaFieldComponent, "df-bs-textarea", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
471
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTextareaFieldComponent, "df-bs-textarea", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
490
472
  }
491
473
 
492
474
  interface BsToggleProps {
@@ -496,31 +478,14 @@ interface BsToggleProps {
496
478
  hint?: DynamicText;
497
479
  }
498
480
  type BsToggleField = ToggleField<BsToggleProps>;
481
+ /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
499
482
  type BsToggleComponent = CheckedFieldComponent<BsToggleField>;
500
483
 
501
- declare class BsToggleFieldComponent implements BsToggleComponent {
502
- private readonly elementRef;
503
- readonly field: _angular_core.InputSignal<FieldTree<boolean>>;
504
- readonly key: _angular_core.InputSignal<string>;
505
- readonly label: _angular_core.InputSignal<DynamicText | undefined>;
506
- readonly placeholder: _angular_core.InputSignal<DynamicText | undefined>;
507
- readonly className: _angular_core.InputSignal<string>;
508
- readonly tabIndex: _angular_core.InputSignal<number | undefined>;
484
+ declare class BsToggleFieldComponent {
485
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<boolean>;
509
486
  readonly props: _angular_core.InputSignal<BsToggleProps | undefined>;
510
- readonly validationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
511
- readonly defaultValidationMessages: _angular_core.InputSignal<ValidationMessages | undefined>;
512
- readonly meta: _angular_core.InputSignal<FieldMeta | undefined>;
513
- readonly resolvedErrors: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
514
- readonly showErrors: _angular_core.Signal<boolean>;
515
- readonly errorsToDisplay: _angular_core.Signal<_ng_forge_dynamic_forms_integration.ResolvedError[]>;
516
- constructor();
517
- protected readonly hintId: _angular_core.Signal<string>;
518
- protected readonly errorId: _angular_core.Signal<string>;
519
- protected readonly ariaInvalid: _angular_core.Signal<boolean>;
520
- protected readonly ariaRequired: _angular_core.Signal<true | null>;
521
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
522
487
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsToggleFieldComponent, never>;
523
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsToggleFieldComponent, "df-bs-toggle", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
488
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsToggleFieldComponent, "df-bs-toggle", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
524
489
  }
525
490
 
526
491
  declare const BOOTSTRAP_FIELD_TYPES: FieldTypeDefinition[];
@@ -707,19 +672,28 @@ type BootstrapConfigFeature = {
707
672
  ɵkind: 'bootstrap-config';
708
673
  ɵproviders: Provider[];
709
674
  };
710
- type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapConfigFeature];
711
675
  /**
712
- * Provides Bootstrap field types for the dynamic form system.
713
- * Use with provideDynamicForm(...withBootstrapFields())
676
+ * Default `withBootstrapFields()` shape — field defs + the auto-included
677
+ * addons feature so `bs-icon` / `bs-button` work out of the box.
678
+ */
679
+ type BootstrapFieldsWithAddons = [...BootstrapFieldTypes, BootstrapAddonsFeature];
680
+ type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapAddonsFeature, BootstrapConfigFeature];
681
+ /**
682
+ * Provides Bootstrap field type definitions for the dynamic form system,
683
+ * with Bootstrap-shipped addon kinds (`bs-icon`, `bs-button`) auto-included
684
+ * so addons work out of the box.
685
+ *
686
+ * If you want addons WITHOUT the field types (rare — e.g., adding addons to
687
+ * a form that uses custom fields), call `withBootstrapAddons()` standalone.
714
688
  *
715
689
  * @param config - Optional global configuration for Bootstrap form fields
716
690
  *
717
691
  * @example
718
692
  * ```typescript
719
- * // Application-level setup
693
+ * // Application-level setup — addons (bs-icon, bs-button) ship in automatically
720
694
  * import { ApplicationConfig } from '@angular/core';
721
- * import { provideDynamicForm } from '@ng-forge/dynamic-form';
722
- * import { withBootstrapFields } from '@ng-forge/dynamic-form-bootstrap';
695
+ * import { provideDynamicForm } from '@ng-forge/dynamic-forms';
696
+ * import { withBootstrapFields } from '@ng-forge/dynamic-forms-bootstrap';
723
697
  *
724
698
  * export const appConfig: ApplicationConfig = {
725
699
  * providers: [
@@ -743,11 +717,94 @@ type BootstrapFieldsWithConfig = [...BootstrapFieldTypes, BootstrapConfigFeature
743
717
  * };
744
718
  * ```
745
719
  *
746
- * @returns Array of field type definitions and optionally a config feature
720
+ * @returns Tuple of field type definitions, the addons feature, and
721
+ * optionally a config feature.
747
722
  */
748
- declare function withBootstrapFields(): BootstrapFieldTypes;
723
+ declare function withBootstrapFields(): BootstrapFieldsWithAddons;
749
724
  declare function withBootstrapFields(config: BootstrapConfig): BootstrapFieldsWithConfig;
750
- declare function withBootstrapFields(config: BootstrapConfig | undefined): BootstrapFieldTypes | BootstrapFieldsWithConfig;
725
+ declare function withBootstrapFields(config: BootstrapConfig | undefined): BootstrapFieldsWithAddons | BootstrapFieldsWithConfig;
726
+ /**
727
+ * Feature kind discriminant for the Bootstrap addons feature. Matches core's
728
+ * `'addons'` kind so providers flow through the standard addon-kind pipeline
729
+ * in `provideDynamicForm`.
730
+ */
731
+ type BootstrapAddonsFeature = {
732
+ ɵkind: 'addons';
733
+ ɵproviders: Provider[];
734
+ };
735
+ /**
736
+ * Register Bootstrap-shipped addon kinds (`bs-icon`, `bs-button`) standalone.
737
+ *
738
+ * **Most users don't need this** — `withBootstrapFields()` auto-includes
739
+ * these kinds. Call `withBootstrapAddons()` directly only when you want
740
+ * Bootstrap addon kinds without the Bootstrap field types (e.g., a custom
741
+ * field set that wants to render `bs-icon` prefixes), or when you're
742
+ * stitching addons through a different DI scope.
743
+ *
744
+ * @example
745
+ * ```typescript
746
+ * // Custom field types + Bootstrap addon kinds.
747
+ * provideDynamicForm(
748
+ * ...myCustomFields(),
749
+ * withBootstrapAddons(),
750
+ * );
751
+ * ```
752
+ *
753
+ * Adapter authors who need to override a kind with a customised renderer
754
+ * should call `withCustomAddon(...)` directly instead.
755
+ */
756
+ declare function withBootstrapAddons(): BootstrapAddonsFeature;
757
+
758
+ /**
759
+ * Renderer for the `bs-icon` addon kind.
760
+ *
761
+ * Outputs `<i class="bi bi-{icon}">`. The host is set `aria-hidden="true"`
762
+ * by default; if the addon supplies an `ariaLabel`, it is applied so the
763
+ * icon is announced by screen readers.
764
+ */
765
+ declare class BsIconAddonComponent {
766
+ readonly addon: _angular_core.InputSignal<BsIconAddon>;
767
+ /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every kind must declare it. */
768
+ readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
769
+ protected readonly iconClass: _angular_core.Signal<string>;
770
+ protected readonly ariaLabel: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
771
+ protected readonly hasAriaLabel: _angular_core.Signal<boolean>;
772
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsIconAddonComponent, never>;
773
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsIconAddonComponent, "df-bs-icon-addon", never, { "addon": { "alias": "addon"; "required": true; "isSignal": true; }; "fieldInputs": { "alias": "fieldInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
774
+ }
775
+
776
+ /**
777
+ * Renderer for the `bs-button` addon kind.
778
+ *
779
+ * Renders a Bootstrap `btn-outline-{severity}` button. Click dispatch
780
+ * (preset / actionRef / action precedence, multi-set warning, `disabled` /
781
+ * `loading` resolution) lives on `NgForgeAddonAction`; this component
782
+ * focuses on the visual layer.
783
+ */
784
+ declare class BsButtonAddonComponent {
785
+ protected readonly action: _ng_forge_dynamic_forms_integration.TypedNgForgeAddonAction<BsButtonAddon>;
786
+ /** Re-exposed for template binding — same signal stored on the directive. */
787
+ protected readonly addon: _angular_core.Signal<BsButtonAddon>;
788
+ protected readonly label: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
789
+ protected readonly ariaLabel: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
790
+ protected readonly iconClass: _angular_core.Signal<string>;
791
+ protected readonly buttonClass: _angular_core.Signal<string>;
792
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsButtonAddonComponent, never>;
793
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsButtonAddonComponent, "df-bs-button-addon", never, {}, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddonAction; inputs: {}; outputs: {}; }]>;
794
+ }
795
+
796
+ /**
797
+ * Per-field writable signal that overrides the input's `type` attribute.
798
+ *
799
+ * Provided at the `bs-input` field component level. The button addon's
800
+ * `'toggle-password-visibility'` preset writes to it; the field component
801
+ * reads it to compute its effective `type`.
802
+ *
803
+ * Optional from a button's perspective — when the button is hosted inside a
804
+ * field that doesn't provide this token (e.g., textarea or a future
805
+ * non-input field), the toggle preset is a no-op.
806
+ */
807
+ declare const BS_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
751
808
 
752
- export { BOOTSTRAP_CONFIG, BOOTSTRAP_FIELD_TYPES, BsButtonFieldComponent, BsCheckboxFieldComponent, BsDatepickerFieldComponent, BsField, BsInputFieldComponent, BsMultiCheckboxFieldComponent, BsRadioFieldComponent, BsSelectFieldComponent, BsSliderFieldComponent, BsTextareaFieldComponent, BsToggleFieldComponent, withBootstrapFields };
753
- export type { AddArrayItemButtonField, BootstrapConfig, BsButtonField, BsButtonProps, BsCheckboxComponent, BsCheckboxField, BsCheckboxProps, BsDatepickerComponent, BsDatepickerField, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsInputComponent, BsInputField, BsInputProps, BsMultiCheckboxComponent, BsMultiCheckboxField, BsMultiCheckboxProps, BsNextButtonField, BsPreviousButtonField, BsRadioComponent, BsRadioField, BsRadioProps, BsSelectComponent, BsSelectField, BsSelectProps, BsSliderComponent, BsSliderField, BsSliderProps, BsSubmitButtonField, BsTextareaComponent, BsTextareaField, BsTextareaProps, BsToggleComponent, BsToggleField, BsToggleProps, InsertArrayItemButtonField, PopArrayItemButtonField, PrependArrayItemButtonField, RemoveArrayItemButtonField, ShiftArrayItemButtonField };
809
+ export { BOOTSTRAP_CONFIG, BOOTSTRAP_FIELD_TYPES, BS_INPUT_TYPE_OVERRIDE, BsButtonAddonComponent, BsButtonFieldComponent, BsCheckboxFieldComponent, BsDatepickerFieldComponent, BsField, BsIconAddonComponent, BsInputFieldComponent, BsMultiCheckboxFieldComponent, BsRadioFieldComponent, BsSelectFieldComponent, BsSliderFieldComponent, BsTextareaFieldComponent, BsToggleFieldComponent, withBootstrapAddons, withBootstrapFields };
810
+ export type { AddArrayItemButtonField, BootstrapConfig, BsAddon, BsAddonExtensions, BsButtonAddon, BsButtonField, BsButtonProps, BsCheckboxComponent, BsCheckboxField, BsCheckboxProps, BsDatepickerComponent, BsDatepickerField, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsIconAddon, BsInputAddon, BsInputComponent, BsInputField, BsInputProps, BsMultiCheckboxComponent, BsMultiCheckboxField, BsMultiCheckboxProps, BsNextButtonField, BsPreviousButtonField, BsRadioComponent, BsRadioField, BsRadioProps, BsSelectComponent, BsSelectField, BsSelectProps, BsSliderComponent, BsSliderField, BsSliderProps, BsSubmitButtonField, BsTextareaComponent, BsTextareaField, BsTextareaProps, BsToggleComponent, BsToggleField, BsToggleProps, InsertArrayItemButtonField, PopArrayItemButtonField, PrependArrayItemButtonField, RemoveArrayItemButtonField, ShiftArrayItemButtonField };