@ng-forge/dynamic-forms-bootstrap 1.3.0-next.2 → 1.3.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs +56 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs +64 -37
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs +92 -34
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs +94 -49
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs +97 -23
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs +169 -40
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs +180 -88
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs +143 -66
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs +326 -61
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs +123 -33
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs +161 -30
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs +97 -23
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs +97 -23
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs +100 -41
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs +238 -251
- package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.d.ts +18 -18
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.d.ts +24 -17
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-button.d.ts +94 -88
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.d.ts +24 -18
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.d.ts +49 -28
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-input.d.ts +51 -37
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.d.ts +34 -23
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-radio.d.ts +30 -19
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-select.d.ts +36 -24
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-slider.d.ts +56 -35
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-textarea.d.ts +24 -18
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-toggle.d.ts +23 -17
- package/types/ng-forge-dynamic-forms-bootstrap-shared.d.ts +78 -71
- package/types/ng-forge-dynamic-forms-bootstrap.d.ts +225 -250
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs +0 -25
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs.map +0 -1
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { FormField } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import {
|
|
6
|
-
import { AsyncPipe } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
3
|
+
import { FormField } from "@angular/forms/signals";
|
|
4
|
+
import * as i1 from "@ng-forge/dynamic-forms/integration";
|
|
5
|
+
import { DynamicTextPipe, NgForgeControl, NgForgeFieldHost, injectNgForgeField } from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
import { AsyncPipe } from "@angular/common";
|
|
7
|
+
var BsToggleFieldComponent = class BsToggleFieldComponent {
|
|
8
|
+
ngf = injectNgForgeField();
|
|
9
|
+
props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
|
+
minVersion: "12.0.0",
|
|
12
|
+
version: "22.2.5",
|
|
13
|
+
ngImport: i0,
|
|
14
|
+
type: BsToggleFieldComponent,
|
|
15
|
+
deps: [],
|
|
16
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
17
|
+
});
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
19
|
+
minVersion: "17.0.0",
|
|
20
|
+
version: "22.2.5",
|
|
21
|
+
type: BsToggleFieldComponent,
|
|
22
|
+
isStandalone: true,
|
|
23
|
+
selector: "df-bs-toggle",
|
|
24
|
+
inputs: { props: {
|
|
25
|
+
classPropertyName: "props",
|
|
26
|
+
publicName: "props",
|
|
27
|
+
isSignal: true,
|
|
28
|
+
isRequired: false,
|
|
29
|
+
transformFunction: null
|
|
30
|
+
} },
|
|
31
|
+
hostDirectives: [{ directive: i1.NgForgeFieldHost }],
|
|
32
|
+
ngImport: i0,
|
|
33
|
+
template: `
|
|
14
34
|
@let f = ngf.field(); @let inputId = ngf.key() + '-input';
|
|
15
35
|
|
|
16
36
|
<div
|
|
@@ -40,11 +60,54 @@ class BsToggleFieldComponent {
|
|
|
40
60
|
} @else if (props()?.hint; as hint) {
|
|
41
61
|
<div class="form-text" [id]="ngf.hintId()" [attr.hidden]="f().hidden() || null">{{ hint | dynamicText | async }}</div>
|
|
42
62
|
}
|
|
43
|
-
`,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
`,
|
|
64
|
+
isInline: true,
|
|
65
|
+
styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.form-switch-sm .form-check-input{width:1.75rem;height:1rem;font-size:.875rem}.form-switch-lg .form-check-input{width:3rem;height:1.75rem;font-size:1.125rem}\n"],
|
|
66
|
+
dependencies: [
|
|
67
|
+
{
|
|
68
|
+
kind: "directive",
|
|
69
|
+
type: FormField,
|
|
70
|
+
selector: "[formField]",
|
|
71
|
+
inputs: ["formField"],
|
|
72
|
+
exportAs: ["formField"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "directive",
|
|
76
|
+
type: NgForgeControl,
|
|
77
|
+
selector: "[ngForgeControl]",
|
|
78
|
+
inputs: ["ngForgeControl"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
kind: "pipe",
|
|
82
|
+
type: DynamicTextPipe,
|
|
83
|
+
name: "dynamicText"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
kind: "pipe",
|
|
87
|
+
type: AsyncPipe,
|
|
88
|
+
name: "async"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
95
|
+
minVersion: "12.0.0",
|
|
96
|
+
version: "22.2.5",
|
|
97
|
+
ngImport: i0,
|
|
98
|
+
type: BsToggleFieldComponent,
|
|
99
|
+
decorators: [{
|
|
100
|
+
type: Component,
|
|
101
|
+
args: [{
|
|
102
|
+
selector: "df-bs-toggle",
|
|
103
|
+
imports: [
|
|
104
|
+
FormField,
|
|
105
|
+
DynamicTextPipe,
|
|
106
|
+
AsyncPipe,
|
|
107
|
+
NgForgeControl
|
|
108
|
+
],
|
|
109
|
+
hostDirectives: [NgForgeFieldHost],
|
|
110
|
+
template: `
|
|
48
111
|
@let f = ngf.field(); @let inputId = ngf.key() + '-input';
|
|
49
112
|
|
|
50
113
|
<div
|
|
@@ -74,9 +137,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
74
137
|
} @else if (props()?.hint; as hint) {
|
|
75
138
|
<div class="form-text" [id]="ngf.hintId()" [attr.hidden]="f().hidden() || null">{{ hint | dynamicText | async }}</div>
|
|
76
139
|
}
|
|
77
|
-
`,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
140
|
+
`,
|
|
141
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
142
|
+
styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.form-switch-sm .form-check-input{width:1.75rem;height:1rem;font-size:.875rem}.form-switch-lg .form-check-input{width:3rem;height:1.75rem;font-size:1.125rem}\n"]
|
|
143
|
+
}]
|
|
144
|
+
}],
|
|
145
|
+
propDecorators: { props: [{
|
|
146
|
+
type: i0.Input,
|
|
147
|
+
args: [{
|
|
148
|
+
isSignal: true,
|
|
149
|
+
alias: "props",
|
|
150
|
+
required: false
|
|
151
|
+
}]
|
|
152
|
+
}] }
|
|
153
|
+
});
|
|
81
154
|
export { BsToggleFieldComponent };
|
|
82
|
-
|
|
155
|
+
|
|
156
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/fields/toggle/bs-toggle.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { NgForgeControl, injectNgForgeField, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';\nimport { BsToggleProps } from './bs-toggle.type';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'df-bs-toggle',\n imports: [FormField, DynamicTextPipe, AsyncPipe, NgForgeControl],\n styleUrl: '../../styles/_form-field.scss',\n hostDirectives: [NgForgeFieldHost],\n template: `\n @let f = ngf.field(); @let inputId = ngf.key() + '-input';\n\n <div\n class=\"form-check form-switch\"\n [class.form-check-inline]=\"props()?.inline\"\n [class.form-check-reverse]=\"props()?.reverse\"\n [class.form-switch-sm]=\"props()?.size === 'sm'\"\n [class.form-switch-lg]=\"props()?.size === 'lg'\"\n [attr.hidden]=\"f().hidden() || null\"\n >\n <input\n ngForgeControl\n type=\"checkbox\"\n [formField]=\"f\"\n [id]=\"inputId\"\n class=\"form-check-input\"\n [class.is-invalid]=\"f().invalid() && f().touched()\"\n [attr.tabindex]=\"ngf.tabIndex()\"\n />\n <label [for]=\"inputId\" class=\"form-check-label\">\n {{ ngf.label() | dynamicText | async }}\n </label>\n </div>\n\n @if (ngf.errorsToDisplay()[0]; as error) {\n <div class=\"invalid-feedback d-block\" [id]=\"ngf.errorId()\" role=\"alert\">{{ error.message }}</div>\n } @else if (props()?.hint; as hint) {\n <div class=\"form-text\" [id]=\"ngf.hintId()\" [attr.hidden]=\"f().hidden() || null\">{{ hint | dynamicText | async }}</div>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Custom size variants for switches */\n .form-switch-sm .form-check-input {\n width: 1.75rem;\n height: 1rem;\n font-size: 0.875rem;\n }\n\n .form-switch-lg .form-check-input {\n width: 3rem;\n height: 1.75rem;\n font-size: 1.125rem;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class BsToggleFieldComponent {\n protected readonly ngf = injectNgForgeField<boolean>();\n\n readonly props = input<BsToggleProps>();\n}\n"],"mappings":";;;;;;AAqEA,IAAqB,yBAArB,MAAqB,uBAAs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NAAA;EAAA,CAAA"}
|
|
@@ -1,44 +1,103 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { explicitEffect } from
|
|
4
|
-
import { runPresetAction } from
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, ElementRef, InjectionToken, inject, input } from "@angular/core";
|
|
3
|
+
import { explicitEffect } from "ngxtension/explicit-effect";
|
|
4
|
+
import { runPresetAction } from "@ng-forge/dynamic-forms/integration";
|
|
5
|
+
const BOOTSTRAP_CONFIG = new InjectionToken("BOOTSTRAP_CONFIG");
|
|
6
|
+
const BS_INPUT_TYPE_OVERRIDE = new InjectionToken("BS_INPUT_TYPE_OVERRIDE");
|
|
7
|
+
var InputConstraintsDirective = class InputConstraintsDirective {
|
|
8
|
+
dfMin = input(...ngDevMode ? [void 0, { debugName: "dfMin" }] : /* istanbul ignore next */ []);
|
|
9
|
+
dfMax = input(...ngDevMode ? [void 0, { debugName: "dfMax" }] : /* istanbul ignore next */ []);
|
|
10
|
+
dfStep = input(...ngDevMode ? [void 0, { debugName: "dfStep" }] : /* istanbul ignore next */ []);
|
|
11
|
+
element = inject(ElementRef);
|
|
12
|
+
minEffect = explicitEffect([this.dfMin], ([value]) => this.reflectAttribute("min", value));
|
|
13
|
+
maxEffect = explicitEffect([this.dfMax], ([value]) => this.reflectAttribute("max", value));
|
|
14
|
+
stepEffect = explicitEffect([this.dfStep], ([value]) => this.reflectAttribute("step", value));
|
|
15
|
+
reflectAttribute(name, value) {
|
|
16
|
+
if (value === null || value === void 0) {
|
|
17
|
+
this.element.nativeElement.removeAttribute(name);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.element.nativeElement.setAttribute(name, String(value));
|
|
21
|
+
}
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.5",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: InputConstraintsDirective,
|
|
27
|
+
deps: [],
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
29
|
+
});
|
|
30
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
31
|
+
minVersion: "17.1.0",
|
|
32
|
+
version: "22.2.5",
|
|
33
|
+
type: InputConstraintsDirective,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "[dfBsInputConstraints]",
|
|
36
|
+
inputs: {
|
|
37
|
+
dfMin: {
|
|
38
|
+
classPropertyName: "dfMin",
|
|
39
|
+
publicName: "dfMin",
|
|
40
|
+
isSignal: true,
|
|
41
|
+
isRequired: false,
|
|
42
|
+
transformFunction: null
|
|
43
|
+
},
|
|
44
|
+
dfMax: {
|
|
45
|
+
classPropertyName: "dfMax",
|
|
46
|
+
publicName: "dfMax",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: false,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
},
|
|
51
|
+
dfStep: {
|
|
52
|
+
classPropertyName: "dfStep",
|
|
53
|
+
publicName: "dfStep",
|
|
54
|
+
isSignal: true,
|
|
55
|
+
isRequired: false,
|
|
56
|
+
transformFunction: null
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
ngImport: i0
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
63
|
+
minVersion: "12.0.0",
|
|
64
|
+
version: "22.2.5",
|
|
65
|
+
ngImport: i0,
|
|
66
|
+
type: InputConstraintsDirective,
|
|
67
|
+
decorators: [{
|
|
68
|
+
type: Directive,
|
|
69
|
+
args: [{ selector: "[dfBsInputConstraints]" }]
|
|
70
|
+
}],
|
|
71
|
+
propDecorators: {
|
|
72
|
+
dfMin: [{
|
|
73
|
+
type: i0.Input,
|
|
74
|
+
args: [{
|
|
75
|
+
isSignal: true,
|
|
76
|
+
alias: "dfMin",
|
|
77
|
+
required: false
|
|
78
|
+
}]
|
|
79
|
+
}],
|
|
80
|
+
dfMax: [{
|
|
81
|
+
type: i0.Input,
|
|
82
|
+
args: [{
|
|
83
|
+
isSignal: true,
|
|
84
|
+
alias: "dfMax",
|
|
85
|
+
required: false
|
|
86
|
+
}]
|
|
87
|
+
}],
|
|
88
|
+
dfStep: [{
|
|
89
|
+
type: i0.Input,
|
|
90
|
+
args: [{
|
|
91
|
+
isSignal: true,
|
|
92
|
+
alias: "dfStep",
|
|
93
|
+
required: false
|
|
94
|
+
}]
|
|
95
|
+
}]
|
|
96
|
+
}
|
|
97
|
+
});
|
|
38
98
|
function runBsPresetAction(preset, context, collaborators) {
|
|
39
|
-
|
|
99
|
+
return runPresetAction(preset, context, collaborators, "Bootstrap", "bs-input");
|
|
40
100
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
101
|
export { BOOTSTRAP_CONFIG, BS_INPUT_TYPE_OVERRIDE, InputConstraintsDirective, runBsPresetAction };
|
|
44
|
-
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-shared.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-shared.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-shared.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/shared/bootstrap-config.token.ts","../../../../packages/dynamic-forms-bootstrap/shared/input-type-override.token.ts","../../../../packages/dynamic-forms-bootstrap/shared/input-constraints.directive.ts","../../../../packages/dynamic-forms-bootstrap/shared/preset-actions.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { BootstrapConfig } from './bootstrap-config';\n\n/** Global configuration for Bootstrap form fields. */\nexport const BOOTSTRAP_CONFIG = new InjectionToken<BootstrapConfig>('BOOTSTRAP_CONFIG');\n","import { InjectionToken, type WritableSignal } from '@angular/core';\n\n/** Per-field writable signal that overrides the input's `type` attribute. */\nexport const BS_INPUT_TYPE_OVERRIDE = new InjectionToken<WritableSignal<string | undefined>>('BS_INPUT_TYPE_OVERRIDE');\n","import { Directive, ElementRef, inject, input } from '@angular/core';\nimport { explicitEffect } from 'ngxtension/explicit-effect';\n\n/** Declaratively reflects min, max, and step signal inputs to a native form control. */\n@Directive({\n selector: '[dfBsInputConstraints]',\n})\nexport class InputConstraintsDirective {\n readonly dfMin = input<number | string | null | undefined>();\n readonly dfMax = input<number | string | null | undefined>();\n readonly dfStep = input<number | string | null | undefined>();\n\n private readonly element = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n private readonly minEffect = explicitEffect([this.dfMin], ([value]) => this.reflectAttribute('min', value));\n private readonly maxEffect = explicitEffect([this.dfMax], ([value]) => this.reflectAttribute('max', value));\n private readonly stepEffect = explicitEffect([this.dfStep], ([value]) => this.reflectAttribute('step', value));\n\n private reflectAttribute(name: 'min' | 'max' | 'step', value: number | string | null | undefined): void {\n if (value === null || value === undefined) {\n this.element.nativeElement.removeAttribute(name);\n return;\n }\n this.element.nativeElement.setAttribute(name, String(value));\n }\n}\n","import type { AddonActionContext, AddonActionPreset } from '@ng-forge/dynamic-forms';\nimport { runPresetAction, type PresetCollaborators } from '@ng-forge/dynamic-forms/integration';\n\nexport type { PresetCollaborators };\n\n/** Bootstrap adapter binding for the shared preset runner. */\nexport function runBsPresetAction(\n preset: AddonActionPreset,\n context: AddonActionContext,\n collaborators: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