@ng-forge/dynamic-forms-bootstrap 1.2.0-next.6 → 1.2.0-next.7

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 (43) hide show
  1. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs +77 -0
  2. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map +1 -0
  3. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs +35 -0
  4. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map +1 -0
  5. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs +74 -0
  6. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map +1 -0
  7. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs +82 -0
  8. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs.map +1 -0
  9. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs +177 -0
  10. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs.map +1 -0
  11. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs +339 -0
  12. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs.map +1 -0
  13. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs +141 -0
  14. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs.map +1 -0
  15. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs +184 -0
  16. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs.map +1 -0
  17. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs +102 -0
  18. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs.map +1 -0
  19. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs +93 -0
  20. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs.map +1 -0
  21. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs +150 -0
  22. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs.map +1 -0
  23. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs +82 -0
  24. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs.map +1 -0
  25. package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs +44 -0
  26. package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs.map +1 -0
  27. package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs +37 -138
  28. package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs.map +1 -1
  29. package/package.json +55 -3
  30. package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.d.ts +19 -0
  31. package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.d.ts +18 -0
  32. package/types/ng-forge-dynamic-forms-bootstrap-lazy-button.d.ts +121 -0
  33. package/types/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.d.ts +23 -0
  34. package/types/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.d.ts +33 -0
  35. package/types/ng-forge-dynamic-forms-bootstrap-lazy-input.d.ts +51 -0
  36. package/types/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.d.ts +28 -0
  37. package/types/ng-forge-dynamic-forms-bootstrap-lazy-radio.d.ts +24 -0
  38. package/types/ng-forge-dynamic-forms-bootstrap-lazy-select.d.ts +33 -0
  39. package/types/ng-forge-dynamic-forms-bootstrap-lazy-slider.d.ts +40 -0
  40. package/types/ng-forge-dynamic-forms-bootstrap-lazy-textarea.d.ts +23 -0
  41. package/types/ng-forge-dynamic-forms-bootstrap-lazy-toggle.d.ts +22 -0
  42. package/types/ng-forge-dynamic-forms-bootstrap-shared.d.ts +100 -0
  43. package/types/ng-forge-dynamic-forms-bootstrap.d.ts +7 -136
@@ -0,0 +1,23 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { CheckboxField } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText } from '@ng-forge/dynamic-forms';
5
+
6
+ interface BsCheckboxProps {
7
+ switch?: boolean;
8
+ inline?: boolean;
9
+ reverse?: boolean;
10
+ indeterminate?: boolean;
11
+ hint?: DynamicText;
12
+ }
13
+ type BsCheckboxField = CheckboxField<BsCheckboxProps>;
14
+
15
+ declare class BsCheckboxFieldComponent {
16
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<boolean>;
17
+ readonly props: i0.InputSignal<BsCheckboxProps | undefined>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<BsCheckboxFieldComponent, never>;
19
+ static ɵcmp: i0.ɵɵ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: {}; }]>;
20
+ }
21
+
22
+ export { BsCheckboxFieldComponent };
23
+ export type { BsCheckboxField, BsCheckboxProps };
@@ -0,0 +1,33 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { DatepickerField, DatepickerProps } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText } from '@ng-forge/dynamic-forms';
5
+
6
+ interface BsDatepickerProps extends DatepickerProps {
7
+ useNgBootstrap?: boolean;
8
+ size?: 'sm' | 'lg';
9
+ floatingLabel?: boolean;
10
+ hint?: DynamicText;
11
+ validFeedback?: DynamicText;
12
+ invalidFeedback?: DynamicText;
13
+ displayMonths?: number;
14
+ navigation?: 'select' | 'arrows' | 'none';
15
+ outsideDays?: 'visible' | 'collapsed' | 'hidden';
16
+ showWeekNumbers?: boolean;
17
+ }
18
+ type BsDatepickerField = DatepickerField<BsDatepickerProps>;
19
+
20
+ declare class BsDatepickerFieldComponent {
21
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
22
+ readonly minDate: _angular_core.InputSignal<string | Date | null>;
23
+ readonly maxDate: _angular_core.InputSignal<string | Date | null>;
24
+ readonly startAt: _angular_core.InputSignal<Date | null>;
25
+ readonly props: _angular_core.InputSignal<BsDatepickerProps | undefined>;
26
+ readonly minAsString: _angular_core.Signal<string | null>;
27
+ readonly maxAsString: _angular_core.Signal<string | null>;
28
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsDatepickerFieldComponent, never>;
29
+ 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: {}; }]>;
30
+ }
31
+
32
+ export { BsDatepickerFieldComponent };
33
+ export type { BsDatepickerField, BsDatepickerProps };
@@ -0,0 +1,51 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { InputField, InputProps, WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText, TextAddon, TemplateAddon } from '@ng-forge/dynamic-forms';
5
+ import { BsIconAddon, BsButtonAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';
6
+
7
+ interface BsInputProps extends InputProps {
8
+ size?: 'sm' | 'lg';
9
+ floatingLabel?: boolean;
10
+ hint?: DynamicText;
11
+ validFeedback?: DynamicText;
12
+ invalidFeedback?: DynamicText;
13
+ plaintext?: boolean;
14
+ type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
15
+ }
16
+ /**
17
+ * Module-augmentable seam for adding custom addon types to `bs-input` at
18
+ * the type level. Pair with `withCustomAddon(...)` for the runtime side:
19
+ */
20
+ interface BsAddonExtensions {
21
+ }
22
+ type BsAddonExtension = BsAddonExtensions[keyof BsAddonExtensions];
23
+ /** Addon types accepted by `bs-input`. */
24
+ type BsInputAddon = BsIconAddon | BsButtonAddon | TextAddon | TemplateAddon | BsAddonExtension;
25
+ type BsInputField = InputField<BsInputProps> & {
26
+ addons?: ReadonlyArray<BsInputAddon>;
27
+ };
28
+
29
+ declare class BsInputFieldComponent {
30
+ private bootstrapConfig;
31
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
32
+ protected readonly ngfa: _ng_forge_dynamic_forms_integration.TypedNgForgeAddons<BsInputAddon>;
33
+ readonly props: _angular_core.InputSignal<BsInputProps | undefined>;
34
+ /**
35
+ * Wrapper-style host bag pushed by `DfFieldOutlet`. Declared at the
36
+ * component level so `setInputIfDeclared` (which uses
37
+ * `reflectComponentType`) can write it.
38
+ */
39
+ readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
40
+ /** Per-instance type override populated by `toggle-password-visibility` preset. */
41
+ private readonly typeOverride;
42
+ readonly size: _angular_core.Signal<"sm" | "lg" | undefined>;
43
+ readonly floatingLabel: _angular_core.Signal<boolean>;
44
+ /** Override (set by `toggle-password-visibility` preset) wins over `props().type`. */
45
+ protected readonly type: _angular_core.Signal<string>;
46
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsInputFieldComponent, never>;
47
+ 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: {}; }]>;
48
+ }
49
+
50
+ export { BsInputFieldComponent };
51
+ export type { BsInputField, BsInputProps };
@@ -0,0 +1,28 @@
1
+ import { DynamicText, ValueType, FieldOption } from '@ng-forge/dynamic-forms';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { MultiCheckboxField } from '@ng-forge/dynamic-forms/integration';
4
+ import * as _angular_core from '@angular/core';
5
+
6
+ interface BsMultiCheckboxProps {
7
+ switch?: boolean;
8
+ inline?: boolean;
9
+ reverse?: boolean;
10
+ hint?: DynamicText;
11
+ }
12
+ type BsMultiCheckboxField<T> = MultiCheckboxField<T, BsMultiCheckboxProps>;
13
+
14
+ declare class BsMultiCheckboxFieldComponent {
15
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType[]>;
16
+ readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
17
+ readonly props: _angular_core.InputSignal<BsMultiCheckboxProps | undefined>;
18
+ /** Computed map of checked option values for O(1) lookup in template */
19
+ readonly checkedValuesMap: _angular_core.Signal<Record<string, boolean>>;
20
+ valueViewModel: _angular_core.WritableSignal<FieldOption<ValueType>[]>;
21
+ constructor();
22
+ onCheckboxChange(option: FieldOption<ValueType>, event: Event): void;
23
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsMultiCheckboxFieldComponent, never>;
24
+ 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: {}; }]>;
25
+ }
26
+
27
+ export { BsMultiCheckboxFieldComponent };
28
+ export type { BsMultiCheckboxField, BsMultiCheckboxProps };
@@ -0,0 +1,24 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { RadioField } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText, ValueType, FieldOption } from '@ng-forge/dynamic-forms';
5
+
6
+ interface BsRadioProps {
7
+ inline?: boolean;
8
+ reverse?: boolean;
9
+ buttonGroup?: boolean;
10
+ buttonSize?: 'sm' | 'lg';
11
+ hint?: DynamicText;
12
+ }
13
+ type BsRadioField<T> = RadioField<T, BsRadioProps>;
14
+
15
+ declare class BsRadioFieldComponent {
16
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType>;
17
+ readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
18
+ readonly props: _angular_core.InputSignal<BsRadioProps | undefined>;
19
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsRadioFieldComponent, never>;
20
+ 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: {}; }]>;
21
+ }
22
+
23
+ export { BsRadioFieldComponent };
24
+ export type { BsRadioField, BsRadioProps };
@@ -0,0 +1,33 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { SelectField, SelectProps } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText, FieldOption } from '@ng-forge/dynamic-forms';
5
+
6
+ /**
7
+ * Bootstrap select uses native HTML <select> which only supports string values.
8
+ * The compareWith function signature uses string to match this constraint.
9
+ */
10
+ interface BsSelectProps extends SelectProps {
11
+ multiple?: boolean;
12
+ size?: 'sm' | 'lg';
13
+ htmlSize?: number;
14
+ floatingLabel?: boolean;
15
+ hint?: DynamicText;
16
+ validFeedback?: DynamicText;
17
+ invalidFeedback?: DynamicText;
18
+ compareWith?: (o1: string, o2: string) => boolean;
19
+ }
20
+ type BsSelectField<T> = SelectField<T, BsSelectProps>;
21
+
22
+ declare class BsSelectFieldComponent {
23
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
24
+ readonly options: _angular_core.InputSignal<FieldOption<string>[]>;
25
+ readonly props: _angular_core.InputSignal<BsSelectProps | undefined>;
26
+ defaultCompare: (value1: any, value2: any) => boolean;
27
+ protected isSelected(optionValue: string, fieldValue: string | string[] | null): boolean;
28
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSelectFieldComponent, never>;
29
+ 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: {}; }]>;
30
+ }
31
+
32
+ export { BsSelectFieldComponent };
33
+ export type { BsSelectField, BsSelectProps };
@@ -0,0 +1,40 @@
1
+ import { DynamicText } from '@ng-forge/dynamic-forms';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { SliderField } from '@ng-forge/dynamic-forms/integration';
4
+ import * as _angular_core from '@angular/core';
5
+
6
+ interface BsSliderProps {
7
+ showValue?: boolean;
8
+ valuePrefix?: string;
9
+ valueSuffix?: string;
10
+ hint?: DynamicText;
11
+ /**
12
+ * Adapter-level override for the slider minimum.
13
+ * Field-level `minValue` (or the validator `min`) takes precedence.
14
+ */
15
+ min?: number;
16
+ /**
17
+ * Adapter-level override for the slider maximum.
18
+ * Field-level `maxValue` (or the validator `max`) takes precedence.
19
+ */
20
+ max?: number;
21
+ /**
22
+ * Adapter-level override for the slider step increment.
23
+ * Field-level `step` on `SliderField` takes precedence.
24
+ */
25
+ step?: number;
26
+ }
27
+ type BsSliderField = SliderField<BsSliderProps>;
28
+
29
+ declare class BsSliderFieldComponent {
30
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<number>;
31
+ readonly min: _angular_core.InputSignal<number>;
32
+ readonly max: _angular_core.InputSignal<number>;
33
+ readonly step: _angular_core.InputSignal<number | undefined>;
34
+ readonly props: _angular_core.InputSignal<BsSliderProps | undefined>;
35
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSliderFieldComponent, never>;
36
+ 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: {}; }]>;
37
+ }
38
+
39
+ export { BsSliderFieldComponent };
40
+ export type { BsSliderField, BsSliderProps };
@@ -0,0 +1,23 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { TextareaField, TextareaProps } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText } from '@ng-forge/dynamic-forms';
5
+
6
+ interface BsTextareaProps extends TextareaProps {
7
+ size?: 'sm' | 'lg';
8
+ floatingLabel?: boolean;
9
+ hint?: DynamicText;
10
+ validFeedback?: DynamicText;
11
+ invalidFeedback?: DynamicText;
12
+ }
13
+ type BsTextareaField = TextareaField<BsTextareaProps>;
14
+
15
+ declare class BsTextareaFieldComponent {
16
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
17
+ readonly props: i0.InputSignal<BsTextareaProps | undefined>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<BsTextareaFieldComponent, never>;
19
+ static ɵcmp: i0.ɵɵ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: {}; }]>;
20
+ }
21
+
22
+ export { BsTextareaFieldComponent };
23
+ export type { BsTextareaField, BsTextareaProps };
@@ -0,0 +1,22 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
3
+ import { ToggleField } from '@ng-forge/dynamic-forms/integration';
4
+ import { DynamicText } from '@ng-forge/dynamic-forms';
5
+
6
+ interface BsToggleProps {
7
+ size?: 'sm' | 'lg';
8
+ reverse?: boolean;
9
+ inline?: boolean;
10
+ hint?: DynamicText;
11
+ }
12
+ type BsToggleField = ToggleField<BsToggleProps>;
13
+
14
+ declare class BsToggleFieldComponent {
15
+ protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<boolean>;
16
+ readonly props: i0.InputSignal<BsToggleProps | undefined>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<BsToggleFieldComponent, never>;
18
+ static ɵcmp: i0.ɵɵ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: {}; }]>;
19
+ }
20
+
21
+ export { BsToggleFieldComponent };
22
+ export type { BsToggleField, BsToggleProps };
@@ -0,0 +1,100 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, WritableSignal } from '@angular/core';
3
+ import { AddonActionPreset, AddonActionContext, BaseAddon, DynamicText, DynamicValue, RegisteredActionRef } from '@ng-forge/dynamic-forms';
4
+ import { PresetCollaborators, AddonActionHandler } from '@ng-forge/dynamic-forms/integration';
5
+ export { PresetCollaborators } from '@ng-forge/dynamic-forms/integration';
6
+
7
+ /** Configuration options for Bootstrap form fields. */
8
+ interface BootstrapConfig {
9
+ /** Default size for form controls. */
10
+ size?: 'sm' | 'lg';
11
+ /** Whether to use floating labels by default for inputs. */
12
+ floatingLabel?: boolean;
13
+ /** Default variant for buttons. */
14
+ variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
15
+ /** Whether buttons should be outlined by default. */
16
+ outline?: boolean;
17
+ /** Whether buttons should be block-level by default. */
18
+ block?: boolean;
19
+ }
20
+
21
+ /** Global configuration for Bootstrap form fields. */
22
+ declare const BOOTSTRAP_CONFIG: InjectionToken<BootstrapConfig>;
23
+
24
+ /** Per-field writable signal that overrides the input's `type` attribute. */
25
+ declare const BS_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
26
+
27
+ /** Declaratively reflects min, max, and step signal inputs to a native form control. */
28
+ declare class InputConstraintsDirective {
29
+ readonly dfMin: _angular_core.InputSignal<string | number | null | undefined>;
30
+ readonly dfMax: _angular_core.InputSignal<string | number | null | undefined>;
31
+ readonly dfStep: _angular_core.InputSignal<string | number | null | undefined>;
32
+ private readonly element;
33
+ private readonly minEffect;
34
+ private readonly maxEffect;
35
+ private readonly stepEffect;
36
+ private reflectAttribute;
37
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputConstraintsDirective, never>;
38
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<InputConstraintsDirective, "[dfBsInputConstraints]", never, { "dfMin": { "alias": "dfMin"; "required": false; "isSignal": true; }; "dfMax": { "alias": "dfMax"; "required": false; "isSignal": true; }; "dfStep": { "alias": "dfStep"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
39
+ }
40
+
41
+ /** Bootstrap adapter binding for the shared preset runner. */
42
+ declare function runBsPresetAction(preset: AddonActionPreset, context: AddonActionContext, collaborators: PresetCollaborators): Promise<void>;
43
+
44
+ /** Decorative icon addon for Bootstrap fields. */
45
+ interface BsIconAddon extends BaseAddon {
46
+ readonly type: 'bs-icon';
47
+ /** Bootstrap Icons name without the `bi-` prefix (e.g., `'search'`, `'x'`). */
48
+ readonly icon: string;
49
+ /** Accessible label for icons that convey meaning. */
50
+ readonly ariaLabel?: DynamicText;
51
+ }
52
+ interface BsButtonBase extends BaseAddon {
53
+ readonly type: 'bs-button';
54
+ readonly severity?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
55
+ readonly loading?: DynamicValue<boolean>;
56
+ }
57
+ type BsButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
58
+ type BsButtonClick = {
59
+ readonly preset: AddonActionPreset;
60
+ readonly actionRef?: never;
61
+ readonly action?: never;
62
+ } | {
63
+ readonly preset?: never;
64
+ readonly actionRef: BsButtonActionRef;
65
+ readonly action?: never;
66
+ } | {
67
+ readonly preset?: never;
68
+ readonly actionRef?: never;
69
+ readonly action: AddonActionHandler;
70
+ } | {
71
+ readonly preset?: never;
72
+ readonly actionRef?: never;
73
+ readonly action?: never;
74
+ };
75
+ type BsButtonContent = {
76
+ readonly icon: string;
77
+ readonly label?: never;
78
+ readonly ariaLabel: DynamicText;
79
+ } | {
80
+ readonly icon?: string;
81
+ readonly label: DynamicText;
82
+ readonly ariaLabel?: DynamicText;
83
+ } | {
84
+ readonly icon?: never;
85
+ readonly label?: never;
86
+ readonly ariaLabel?: DynamicText;
87
+ };
88
+ /** Interactive button addon for Bootstrap fields. */
89
+ type BsButtonAddon = BsButtonBase & BsButtonContent & BsButtonClick;
90
+ /** Union of all Bootstrap-shipped addon types. */
91
+ type BsAddon = BsIconAddon | BsButtonAddon;
92
+ declare module '@ng-forge/dynamic-forms' {
93
+ interface DynamicFormAddonRegistry {
94
+ 'bs-icon': BsIconAddon;
95
+ 'bs-button': BsButtonAddon;
96
+ }
97
+ }
98
+
99
+ export { BOOTSTRAP_CONFIG, BS_INPUT_TYPE_OVERRIDE, InputConstraintsDirective, runBsPresetAction };
100
+ export type { BootstrapConfig, BsAddon, BsButtonAddon, BsIconAddon };
@@ -1,9 +1,11 @@
1
1
  import * as _ng_forge_dynamic_forms from '@ng-forge/dynamic-forms';
2
- import { FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, BaseAddon, DynamicValue, AddonActionPreset, RegisteredActionRef, TextAddon, TemplateAddon, ValueType, FieldOption, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
2
+ import { FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, TextAddon, TemplateAddon, ValueType, FieldOption, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
3
3
  import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
4
- import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, AddonActionHandler, InputField, InputProps, WrapperFieldInputs, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition, WrapperTypeDefinition } from '@ng-forge/dynamic-forms/integration';
4
+ import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, WrapperFieldInputs, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition, WrapperTypeDefinition } from '@ng-forge/dynamic-forms/integration';
5
5
  import * as _angular_core from '@angular/core';
6
- import { InjectionToken, Provider, WritableSignal } from '@angular/core';
6
+ import { Provider } from '@angular/core';
7
+ import { BsIconAddon, BsButtonAddon, BootstrapConfig } from '@ng-forge/dynamic-forms-bootstrap/shared';
8
+ export { BOOTSTRAP_CONFIG, BS_INPUT_TYPE_OVERRIDE, BootstrapConfig, BsAddon, BsButtonAddon, BsIconAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';
7
9
 
8
10
  interface BsButtonProps {
9
11
  variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
@@ -161,94 +163,6 @@ declare class BsDatepickerFieldComponent {
161
163
  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: {}; }]>;
162
164
  }
163
165
 
164
- /** Decorative icon addon for Bootstrap fields. */
165
- interface BsIconAddon extends BaseAddon {
166
- readonly type: 'bs-icon';
167
- /** Bootstrap Icons name without the `bi-` prefix (e.g., `'search'`, `'x'`). */
168
- readonly icon: string;
169
- /** Accessible label for icons that convey meaning. */
170
- readonly ariaLabel?: DynamicText;
171
- }
172
- /**
173
- * Common shape of every `bs-button` addon — properties that don't
174
- * participate in either XOR axis.
175
- */
176
- interface BsButtonBase extends BaseAddon {
177
- readonly type: 'bs-button';
178
- /** Bootstrap button variant (mapped to `btn-outline-{severity}`). */
179
- readonly severity?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
180
- /** Reactive loading state — swaps the button content for a spinner. */
181
- readonly loading?: DynamicValue<boolean>;
182
- }
183
- /**
184
- * Click axis — XOR enforced at type level so configurations that combine
185
- * two click handlers (e.g., `preset` AND `actionRef`) are rejected by
186
- * TypeScript. The four shapes:
187
- */
188
- type BsButtonClickPreset = {
189
- /** Built-in preset action (e.g., `'clear'`, `'toggle-password-visibility'`). JSON-safe. */
190
- readonly preset: AddonActionPreset;
191
- readonly actionRef?: never;
192
- readonly action?: never;
193
- };
194
- /**
195
- * Value type for the `actionRef` slot. When no actions have been registered
196
- * via `withAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
197
- * which would make this variant uninhabitable. Fall back to `string` so the
198
- * variant stays usable; once the user augments `DynamicFormActionRegistry`,
199
- * autocomplete tightens to the registered keys.
200
- */
201
- type BsButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
202
- type BsButtonClickActionRef = {
203
- readonly preset?: never;
204
- /** Reference to a handler registered via `withAddonActions(...)`. JSON-safe. */
205
- readonly actionRef: BsButtonActionRef;
206
- readonly action?: never;
207
- };
208
- type BsButtonClickAction = {
209
- readonly preset?: never;
210
- readonly actionRef?: never;
211
- /** Inline handler — code-only; dropped from JSON-derived configs. Matches the generic `AddonActionHandler` shape used by `withAddonActions(...)`. */
212
- readonly action: AddonActionHandler;
213
- };
214
- type BsButtonClickNone = {
215
- readonly preset?: never;
216
- readonly actionRef?: never;
217
- readonly action?: never;
218
- };
219
- type BsButtonClick = BsButtonClickPreset | BsButtonClickActionRef | BsButtonClickAction | BsButtonClickNone;
220
- /**
221
- * Content axis — XOR enforced at type level so an icon-only button is
222
- * forced to declare `ariaLabel`.
223
- */
224
- type BsButtonContentIconOnly = {
225
- readonly icon: string;
226
- readonly label?: never;
227
- /** REQUIRED: icon-only buttons must carry an accessible label. */
228
- readonly ariaLabel: DynamicText;
229
- };
230
- type BsButtonContentLabeled = {
231
- readonly icon?: string;
232
- readonly label: DynamicText;
233
- readonly ariaLabel?: DynamicText;
234
- };
235
- type BsButtonContentDecorative = {
236
- readonly icon?: never;
237
- readonly label?: never;
238
- readonly ariaLabel?: DynamicText;
239
- };
240
- type BsButtonContent = BsButtonContentIconOnly | BsButtonContentLabeled | BsButtonContentDecorative;
241
- /** Interactive button addon for Bootstrap fields. */
242
- type BsButtonAddon = BsButtonBase & BsButtonContent & BsButtonClick;
243
- /** Union of all Bootstrap-shipped addon types. */
244
- type BsAddon = BsIconAddon | BsButtonAddon;
245
- declare module '@ng-forge/dynamic-forms' {
246
- interface DynamicFormAddonRegistry {
247
- 'bs-icon': BsIconAddon;
248
- 'bs-button': BsButtonAddon;
249
- }
250
- }
251
-
252
166
  interface BsInputProps extends InputProps {
253
167
  size?: 'sm' | 'lg';
254
168
  floatingLabel?: boolean;
@@ -422,46 +336,6 @@ declare class BsToggleFieldComponent {
422
336
 
423
337
  declare const BOOTSTRAP_FIELD_TYPES: FieldTypeDefinition[];
424
338
 
425
- /** Configuration options for Bootstrap form fields. */
426
- interface BootstrapConfig {
427
- /**
428
- * Default size for form controls
429
- *
430
- * @default undefined
431
- */
432
- size?: 'sm' | 'lg';
433
- /**
434
- * Whether to use floating labels by default for inputs
435
- *
436
- * @default false
437
- */
438
- floatingLabel?: boolean;
439
- /**
440
- * Default variant for buttons
441
- *
442
- * @default 'primary'
443
- */
444
- variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link';
445
- /**
446
- * Whether buttons should be outlined by default
447
- *
448
- * @default false
449
- */
450
- outline?: boolean;
451
- /**
452
- * Whether buttons should be block-level by default
453
- *
454
- * @default false
455
- */
456
- block?: boolean;
457
- }
458
-
459
- /**
460
- * Injection token for Bootstrap form configuration.
461
- * Use this to provide global configuration for Bootstrap form fields.
462
- */
463
- declare const BOOTSTRAP_CONFIG: InjectionToken<BootstrapConfig>;
464
-
465
339
  /**
466
340
  * Bootstrap field type constants
467
341
  * Based on available field components in the /fields folder
@@ -591,8 +465,5 @@ declare class BsButtonAddonComponent {
591
465
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsButtonAddonComponent, "df-bs-button-addon", never, {}, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddonAction; inputs: {}; outputs: {}; }]>;
592
466
  }
593
467
 
594
- /** Per-field writable signal that overrides the input's `type` attribute. */
595
- declare const BS_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
596
-
597
- 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 };
598
- export type { BootstrapConfig, BsAddArrayItemButtonField, BsAddon, BsAddonExtensions, BsButtonAddon, BsButtonField, BsButtonProps, BsCheckboxField, BsCheckboxProps, BsDatepickerField, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsIconAddon, BsInputAddon, BsInputField, BsInputProps, BsInsertArrayItemButtonField, BsMultiCheckboxField, BsMultiCheckboxProps, BsNextButtonField, BsPopArrayItemButtonField, BsPrependArrayItemButtonField, BsPreviousButtonField, BsRadioField, BsRadioProps, BsRemoveArrayItemButtonField, BsSelectField, BsSelectProps, BsShiftArrayItemButtonField, BsSliderField, BsSliderProps, BsSubmitButtonField, BsTextareaField, BsTextareaProps, BsToggleField, BsToggleProps };
468
+ export { BOOTSTRAP_FIELD_TYPES, BsButtonAddonComponent, BsButtonFieldComponent, BsCheckboxFieldComponent, BsDatepickerFieldComponent, BsField, BsIconAddonComponent, BsInputFieldComponent, BsMultiCheckboxFieldComponent, BsRadioFieldComponent, BsSelectFieldComponent, BsSliderFieldComponent, BsTextareaFieldComponent, BsToggleFieldComponent, withBootstrapAddons, withBootstrapFields };
469
+ export type { BsAddArrayItemButtonField, BsAddonExtensions, BsButtonField, BsButtonProps, BsCheckboxField, BsCheckboxProps, BsDatepickerField, BsDatepickerProps, BsFieldType, BsFormConfig, BsFormProps, BsInputAddon, BsInputField, BsInputProps, BsInsertArrayItemButtonField, BsMultiCheckboxField, BsMultiCheckboxProps, BsNextButtonField, BsPopArrayItemButtonField, BsPrependArrayItemButtonField, BsPreviousButtonField, BsRadioField, BsRadioProps, BsRemoveArrayItemButtonField, BsSelectField, BsSelectProps, BsShiftArrayItemButtonField, BsSliderField, BsSliderProps, BsSubmitButtonField, BsTextareaField, BsTextareaProps, BsToggleField, BsToggleProps };