@ng-forge/dynamic-forms-bootstrap 0.3.0 → 0.3.1
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/README.md
CHANGED
|
@@ -80,8 +80,9 @@ class BsButtonFieldComponent {
|
|
|
80
80
|
}
|
|
81
81
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
82
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: BsButtonFieldComponent, isStandalone: true, selector: "df-bs-button", inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, event: { classPropertyName: "event", publicName: "event", isSignal: true, isRequired: false, transformFunction: null }, eventArgs: { classPropertyName: "eventArgs", publicName: "eventArgs", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, eventContext: { classPropertyName: "eventContext", publicName: "eventContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "hidden": "hidden()" } }, ngImport: i0, template: `
|
|
83
|
+
@let buttonId = key() + '-button';
|
|
83
84
|
<button
|
|
84
|
-
[id]="
|
|
85
|
+
[id]="buttonId"
|
|
85
86
|
[type]="buttonType()"
|
|
86
87
|
[disabled]="disabled()"
|
|
87
88
|
[class]="buttonClasses()"
|
|
@@ -101,8 +102,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
101
102
|
'[class]': 'className()',
|
|
102
103
|
'[hidden]': 'hidden()',
|
|
103
104
|
}, template: `
|
|
105
|
+
@let buttonId = key() + '-button';
|
|
104
106
|
<button
|
|
105
|
-
[id]="
|
|
107
|
+
[id]="buttonId"
|
|
106
108
|
[type]="buttonType()"
|
|
107
109
|
[disabled]="disabled()"
|
|
108
110
|
[class]="buttonClasses()"
|
|
@@ -174,8 +176,7 @@ class BsCheckboxFieldComponent {
|
|
|
174
176
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
175
177
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
178
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsCheckboxFieldComponent, isStandalone: true, selector: "df-bs-checkbox", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()", "id": "`${key()}`", "attr.data-testid": "key()", "attr.hidden": "field()().hidden() || null" } }, viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["checkboxInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
177
|
-
@let f = field();
|
|
178
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
179
|
+
@let f = field(); @let checkboxId = key() + '-checkbox'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
179
180
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
180
181
|
|
|
181
182
|
<div
|
|
@@ -189,7 +190,7 @@ class BsCheckboxFieldComponent {
|
|
|
189
190
|
#checkboxInput
|
|
190
191
|
type="checkbox"
|
|
191
192
|
[formField]="f"
|
|
192
|
-
[id]="
|
|
193
|
+
[id]="checkboxId"
|
|
193
194
|
class="form-check-input"
|
|
194
195
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
195
196
|
[attr.tabindex]="tabIndex()"
|
|
@@ -197,7 +198,7 @@ class BsCheckboxFieldComponent {
|
|
|
197
198
|
[attr.aria-required]="ariaRequired"
|
|
198
199
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
199
200
|
/>
|
|
200
|
-
<label [for]="
|
|
201
|
+
<label [for]="checkboxId" class="form-check-label">
|
|
201
202
|
{{ label() | dynamicText | async }}
|
|
202
203
|
</label>
|
|
203
204
|
</div>
|
|
@@ -215,8 +216,7 @@ class BsCheckboxFieldComponent {
|
|
|
215
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsCheckboxFieldComponent, decorators: [{
|
|
216
217
|
type: Component,
|
|
217
218
|
args: [{ selector: 'df-bs-checkbox', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
218
|
-
@let f = field();
|
|
219
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
219
|
+
@let f = field(); @let checkboxId = key() + '-checkbox'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
220
220
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
221
221
|
|
|
222
222
|
<div
|
|
@@ -230,7 +230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
230
230
|
#checkboxInput
|
|
231
231
|
type="checkbox"
|
|
232
232
|
[formField]="f"
|
|
233
|
-
[id]="
|
|
233
|
+
[id]="checkboxId"
|
|
234
234
|
class="form-check-input"
|
|
235
235
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
236
236
|
[attr.tabindex]="tabIndex()"
|
|
@@ -238,7 +238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
238
238
|
[attr.aria-required]="ariaRequired"
|
|
239
239
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
240
240
|
/>
|
|
241
|
-
<label [for]="
|
|
241
|
+
<label [for]="checkboxId" class="form-check-label">
|
|
242
242
|
{{ label() | dynamicText | async }}
|
|
243
243
|
</label>
|
|
244
244
|
</div>
|
|
@@ -365,14 +365,14 @@ class BsDatepickerFieldComponent {
|
|
|
365
365
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsDatepickerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
366
366
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsDatepickerFieldComponent, isStandalone: true, selector: "df-bs-datepicker", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
367
367
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
368
|
-
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
368
|
+
@let ariaDescribedBy = this.ariaDescribedBy(); @let inputId = key() + '-input';
|
|
369
369
|
@if (p?.floatingLabel) {
|
|
370
370
|
<!-- Floating label variant -->
|
|
371
371
|
<div class="form-floating mb-3">
|
|
372
372
|
<input
|
|
373
373
|
dfBsInputConstraints
|
|
374
374
|
[formField]="f"
|
|
375
|
-
[id]="
|
|
375
|
+
[id]="inputId"
|
|
376
376
|
type="date"
|
|
377
377
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
378
378
|
[dfMin]="minAsString()"
|
|
@@ -388,7 +388,7 @@ class BsDatepickerFieldComponent {
|
|
|
388
388
|
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
389
389
|
/>
|
|
390
390
|
@if (label()) {
|
|
391
|
-
<label [for]="
|
|
391
|
+
<label [for]="inputId">{{ label() | dynamicText | async }}</label>
|
|
392
392
|
}
|
|
393
393
|
@if (p?.validFeedback && f().valid() && f().touched()) {
|
|
394
394
|
<div class="valid-feedback d-block">
|
|
@@ -403,13 +403,13 @@ class BsDatepickerFieldComponent {
|
|
|
403
403
|
<!-- Standard variant -->
|
|
404
404
|
<div class="mb-3">
|
|
405
405
|
@if (label()) {
|
|
406
|
-
<label [for]="
|
|
406
|
+
<label [for]="inputId" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
<input
|
|
410
410
|
dfBsInputConstraints
|
|
411
411
|
[formField]="f"
|
|
412
|
-
[id]="
|
|
412
|
+
[id]="inputId"
|
|
413
413
|
type="date"
|
|
414
414
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
415
415
|
[dfMin]="minAsString()"
|
|
@@ -446,14 +446,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
446
446
|
type: Component,
|
|
447
447
|
args: [{ selector: 'df-bs-datepicker', imports: [FormField, DynamicTextPipe, AsyncPipe, InputConstraintsDirective], template: `
|
|
448
448
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
449
|
-
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
449
|
+
@let ariaDescribedBy = this.ariaDescribedBy(); @let inputId = key() + '-input';
|
|
450
450
|
@if (p?.floatingLabel) {
|
|
451
451
|
<!-- Floating label variant -->
|
|
452
452
|
<div class="form-floating mb-3">
|
|
453
453
|
<input
|
|
454
454
|
dfBsInputConstraints
|
|
455
455
|
[formField]="f"
|
|
456
|
-
[id]="
|
|
456
|
+
[id]="inputId"
|
|
457
457
|
type="date"
|
|
458
458
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
459
459
|
[dfMin]="minAsString()"
|
|
@@ -469,7 +469,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
469
469
|
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
470
470
|
/>
|
|
471
471
|
@if (label()) {
|
|
472
|
-
<label [for]="
|
|
472
|
+
<label [for]="inputId">{{ label() | dynamicText | async }}</label>
|
|
473
473
|
}
|
|
474
474
|
@if (p?.validFeedback && f().valid() && f().touched()) {
|
|
475
475
|
<div class="valid-feedback d-block">
|
|
@@ -484,13 +484,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
484
484
|
<!-- Standard variant -->
|
|
485
485
|
<div class="mb-3">
|
|
486
486
|
@if (label()) {
|
|
487
|
-
<label [for]="
|
|
487
|
+
<label [for]="inputId" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
<input
|
|
491
491
|
dfBsInputConstraints
|
|
492
492
|
[formField]="f"
|
|
493
|
-
[id]="
|
|
493
|
+
[id]="inputId"
|
|
494
494
|
type="date"
|
|
495
495
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
496
496
|
[dfMin]="minAsString()"
|
|
@@ -642,6 +642,7 @@ class BsInputFieldComponent {
|
|
|
642
642
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsInputFieldComponent, isStandalone: true, selector: "df-bs-input", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
643
643
|
@let f = field(); @let p = props(); @let effectiveSize = this.effectiveSize();
|
|
644
644
|
@let effectiveFloatingLabel = this.effectiveFloatingLabel();
|
|
645
|
+
@let inputId = key() + '-input';
|
|
645
646
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
646
647
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
647
648
|
@if (effectiveFloatingLabel) {
|
|
@@ -650,7 +651,7 @@ class BsInputFieldComponent {
|
|
|
650
651
|
<input
|
|
651
652
|
#inputRef
|
|
652
653
|
[formField]="f"
|
|
653
|
-
[id]="
|
|
654
|
+
[id]="inputId"
|
|
654
655
|
[type]="p?.type ?? 'text'"
|
|
655
656
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
656
657
|
[attr.tabindex]="tabIndex()"
|
|
@@ -665,7 +666,7 @@ class BsInputFieldComponent {
|
|
|
665
666
|
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
666
667
|
/>
|
|
667
668
|
@if (label()) {
|
|
668
|
-
<label [for]="
|
|
669
|
+
<label [for]="inputId">{{ label() | dynamicText | async }}</label>
|
|
669
670
|
}
|
|
670
671
|
@if (p?.validFeedback && f().valid() && f().touched()) {
|
|
671
672
|
<div class="valid-feedback d-block">
|
|
@@ -680,12 +681,12 @@ class BsInputFieldComponent {
|
|
|
680
681
|
<!-- Standard variant -->
|
|
681
682
|
<div class="mb-3">
|
|
682
683
|
@if (label()) {
|
|
683
|
-
<label [for]="
|
|
684
|
+
<label [for]="inputId" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
684
685
|
}
|
|
685
686
|
<input
|
|
686
687
|
#inputRef
|
|
687
688
|
[formField]="f"
|
|
688
|
-
[id]="
|
|
689
|
+
[id]="inputId"
|
|
689
690
|
[type]="p?.type ?? 'text'"
|
|
690
691
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
691
692
|
[attr.tabindex]="tabIndex()"
|
|
@@ -721,6 +722,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
721
722
|
args: [{ selector: 'df-bs-input', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
722
723
|
@let f = field(); @let p = props(); @let effectiveSize = this.effectiveSize();
|
|
723
724
|
@let effectiveFloatingLabel = this.effectiveFloatingLabel();
|
|
725
|
+
@let inputId = key() + '-input';
|
|
724
726
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
725
727
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
726
728
|
@if (effectiveFloatingLabel) {
|
|
@@ -729,7 +731,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
729
731
|
<input
|
|
730
732
|
#inputRef
|
|
731
733
|
[formField]="f"
|
|
732
|
-
[id]="
|
|
734
|
+
[id]="inputId"
|
|
733
735
|
[type]="p?.type ?? 'text'"
|
|
734
736
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
735
737
|
[attr.tabindex]="tabIndex()"
|
|
@@ -744,7 +746,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
744
746
|
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
745
747
|
/>
|
|
746
748
|
@if (label()) {
|
|
747
|
-
<label [for]="
|
|
749
|
+
<label [for]="inputId">{{ label() | dynamicText | async }}</label>
|
|
748
750
|
}
|
|
749
751
|
@if (p?.validFeedback && f().valid() && f().touched()) {
|
|
750
752
|
<div class="valid-feedback d-block">
|
|
@@ -759,12 +761,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
759
761
|
<!-- Standard variant -->
|
|
760
762
|
<div class="mb-3">
|
|
761
763
|
@if (label()) {
|
|
762
|
-
<label [for]="
|
|
764
|
+
<label [for]="inputId" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
763
765
|
}
|
|
764
766
|
<input
|
|
765
767
|
#inputRef
|
|
766
768
|
[formField]="f"
|
|
767
|
-
[id]="
|
|
769
|
+
[id]="inputId"
|
|
768
770
|
[type]="p?.type ?? 'text'"
|
|
769
771
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
770
772
|
[attr.tabindex]="tabIndex()"
|
|
@@ -1278,17 +1280,16 @@ class BsSelectFieldComponent {
|
|
|
1278
1280
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1279
1281
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1280
1282
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsSelectFieldComponent, isStandalone: true, selector: "df-bs-select", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1281
|
-
@let f = field();
|
|
1282
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1283
|
+
@let f = field(); @let selectId = key() + '-select'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1283
1284
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1284
1285
|
|
|
1285
1286
|
<div class="mb-3">
|
|
1286
1287
|
@if (label(); as label) {
|
|
1287
|
-
<label [for]="
|
|
1288
|
+
<label [for]="selectId" class="form-label">{{ label | dynamicText | async }}</label>
|
|
1288
1289
|
}
|
|
1289
1290
|
<select
|
|
1290
1291
|
[formField]="f"
|
|
1291
|
-
[id]="
|
|
1292
|
+
[id]="selectId"
|
|
1292
1293
|
class="form-select"
|
|
1293
1294
|
[class.form-select-sm]="props()?.size === 'sm'"
|
|
1294
1295
|
[class.form-select-lg]="props()?.size === 'lg'"
|
|
@@ -1321,17 +1322,16 @@ class BsSelectFieldComponent {
|
|
|
1321
1322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSelectFieldComponent, decorators: [{
|
|
1322
1323
|
type: Component,
|
|
1323
1324
|
args: [{ selector: 'df-bs-select', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1324
|
-
@let f = field();
|
|
1325
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1325
|
+
@let f = field(); @let selectId = key() + '-select'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1326
1326
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1327
1327
|
|
|
1328
1328
|
<div class="mb-3">
|
|
1329
1329
|
@if (label(); as label) {
|
|
1330
|
-
<label [for]="
|
|
1330
|
+
<label [for]="selectId" class="form-label">{{ label | dynamicText | async }}</label>
|
|
1331
1331
|
}
|
|
1332
1332
|
<select
|
|
1333
1333
|
[formField]="f"
|
|
1334
|
-
[id]="
|
|
1334
|
+
[id]="selectId"
|
|
1335
1335
|
class="form-select"
|
|
1336
1336
|
[class.form-select-sm]="props()?.size === 'sm'"
|
|
1337
1337
|
[class.form-select-lg]="props()?.size === 'lg'"
|
|
@@ -1418,13 +1418,12 @@ class BsSliderFieldComponent {
|
|
|
1418
1418
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1419
1419
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSliderFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1420
1420
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsSliderFieldComponent, isStandalone: true, selector: "df-bs-slider", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()", "id": "`${key()}`", "attr.data-testid": "key()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1421
|
-
@let f = field();
|
|
1422
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1421
|
+
@let f = field(); @let inputId = key() + '-input'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1423
1422
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1424
1423
|
|
|
1425
1424
|
<div class="mb-3">
|
|
1426
1425
|
@if (label(); as label) {
|
|
1427
|
-
<label [for]="
|
|
1426
|
+
<label [for]="inputId" class="form-label">
|
|
1428
1427
|
{{ label | dynamicText | async }}
|
|
1429
1428
|
@if (props()?.showValue) {
|
|
1430
1429
|
<span class="ms-2 badge bg-secondary"> {{ props()?.valuePrefix }}{{ f().value() }}{{ props()?.valueSuffix }} </span>
|
|
@@ -1436,7 +1435,7 @@ class BsSliderFieldComponent {
|
|
|
1436
1435
|
type="range"
|
|
1437
1436
|
dfBsInputConstraints
|
|
1438
1437
|
[formField]="f"
|
|
1439
|
-
[id]="
|
|
1438
|
+
[id]="inputId"
|
|
1440
1439
|
[dfMin]="props()?.min ?? min()"
|
|
1441
1440
|
[dfMax]="props()?.max ?? max()"
|
|
1442
1441
|
[dfStep]="props()?.step ?? step()"
|
|
@@ -1461,13 +1460,12 @@ class BsSliderFieldComponent {
|
|
|
1461
1460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSliderFieldComponent, decorators: [{
|
|
1462
1461
|
type: Component,
|
|
1463
1462
|
args: [{ selector: 'df-bs-slider', imports: [FormField, DynamicTextPipe, AsyncPipe, InputConstraintsDirective], template: `
|
|
1464
|
-
@let f = field();
|
|
1465
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1463
|
+
@let f = field(); @let inputId = key() + '-input'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1466
1464
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1467
1465
|
|
|
1468
1466
|
<div class="mb-3">
|
|
1469
1467
|
@if (label(); as label) {
|
|
1470
|
-
<label [for]="
|
|
1468
|
+
<label [for]="inputId" class="form-label">
|
|
1471
1469
|
{{ label | dynamicText | async }}
|
|
1472
1470
|
@if (props()?.showValue) {
|
|
1473
1471
|
<span class="ms-2 badge bg-secondary"> {{ props()?.valuePrefix }}{{ f().value() }}{{ props()?.valueSuffix }} </span>
|
|
@@ -1479,7 +1477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1479
1477
|
type="range"
|
|
1480
1478
|
dfBsInputConstraints
|
|
1481
1479
|
[formField]="f"
|
|
1482
|
-
[id]="
|
|
1480
|
+
[id]="inputId"
|
|
1483
1481
|
[dfMin]="props()?.min ?? min()"
|
|
1484
1482
|
[dfMax]="props()?.max ?? max()"
|
|
1485
1483
|
[dfStep]="props()?.step ?? step()"
|
|
@@ -1556,13 +1554,13 @@ class BsTextareaFieldComponent {
|
|
|
1556
1554
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsTextareaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1557
1555
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsTextareaFieldComponent, isStandalone: true, selector: "df-bs-textarea", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1558
1556
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1559
|
-
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1557
|
+
@let ariaDescribedBy = this.ariaDescribedBy(); @let textareaId = key() + '-textarea';
|
|
1560
1558
|
@if (p?.floatingLabel) {
|
|
1561
1559
|
<!-- Floating label variant -->
|
|
1562
1560
|
<div class="form-floating mb-3">
|
|
1563
1561
|
<textarea
|
|
1564
1562
|
[formField]="f"
|
|
1565
|
-
[id]="
|
|
1563
|
+
[id]="textareaId"
|
|
1566
1564
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1567
1565
|
[attr.tabindex]="tabIndex()"
|
|
1568
1566
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -1576,7 +1574,7 @@ class BsTextareaFieldComponent {
|
|
|
1576
1574
|
></textarea>
|
|
1577
1575
|
|
|
1578
1576
|
@if (label()) {
|
|
1579
|
-
<label [for]="
|
|
1577
|
+
<label [for]="textareaId">{{ label() | dynamicText | async }}</label>
|
|
1580
1578
|
}
|
|
1581
1579
|
@if (p?.validFeedback && f().valid() && f().touched()) {
|
|
1582
1580
|
<div class="valid-feedback d-block">
|
|
@@ -1591,12 +1589,12 @@ class BsTextareaFieldComponent {
|
|
|
1591
1589
|
<!-- Standard variant -->
|
|
1592
1590
|
<div class="mb-3">
|
|
1593
1591
|
@if (label()) {
|
|
1594
|
-
<label [for]="
|
|
1592
|
+
<label [for]="textareaId" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
1595
1593
|
}
|
|
1596
1594
|
|
|
1597
1595
|
<textarea
|
|
1598
1596
|
[formField]="f"
|
|
1599
|
-
[id]="
|
|
1597
|
+
[id]="textareaId"
|
|
1600
1598
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1601
1599
|
[attr.tabindex]="tabIndex()"
|
|
1602
1600
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -1630,13 +1628,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1630
1628
|
type: Component,
|
|
1631
1629
|
args: [{ selector: 'df-bs-textarea', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1632
1630
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1633
|
-
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1631
|
+
@let ariaDescribedBy = this.ariaDescribedBy(); @let textareaId = key() + '-textarea';
|
|
1634
1632
|
@if (p?.floatingLabel) {
|
|
1635
1633
|
<!-- Floating label variant -->
|
|
1636
1634
|
<div class="form-floating mb-3">
|
|
1637
1635
|
<textarea
|
|
1638
1636
|
[formField]="f"
|
|
1639
|
-
[id]="
|
|
1637
|
+
[id]="textareaId"
|
|
1640
1638
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1641
1639
|
[attr.tabindex]="tabIndex()"
|
|
1642
1640
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -1650,7 +1648,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1650
1648
|
></textarea>
|
|
1651
1649
|
|
|
1652
1650
|
@if (label()) {
|
|
1653
|
-
<label [for]="
|
|
1651
|
+
<label [for]="textareaId">{{ label() | dynamicText | async }}</label>
|
|
1654
1652
|
}
|
|
1655
1653
|
@if (p?.validFeedback && f().valid() && f().touched()) {
|
|
1656
1654
|
<div class="valid-feedback d-block">
|
|
@@ -1665,12 +1663,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1665
1663
|
<!-- Standard variant -->
|
|
1666
1664
|
<div class="mb-3">
|
|
1667
1665
|
@if (label()) {
|
|
1668
|
-
<label [for]="
|
|
1666
|
+
<label [for]="textareaId" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
1669
1667
|
}
|
|
1670
1668
|
|
|
1671
1669
|
<textarea
|
|
1672
1670
|
[formField]="f"
|
|
1673
|
-
[id]="
|
|
1671
|
+
[id]="textareaId"
|
|
1674
1672
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1675
1673
|
[attr.tabindex]="tabIndex()"
|
|
1676
1674
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -1754,8 +1752,7 @@ class BsToggleFieldComponent {
|
|
|
1754
1752
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1755
1753
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsToggleFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1756
1754
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsToggleFieldComponent, isStandalone: true, selector: "df-bs-toggle", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()", "id": "`${key()}`", "attr.data-testid": "key()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1757
|
-
@let f = field();
|
|
1758
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1755
|
+
@let f = field(); @let inputId = key() + '-input'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1759
1756
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1760
1757
|
|
|
1761
1758
|
<div
|
|
@@ -1769,7 +1766,7 @@ class BsToggleFieldComponent {
|
|
|
1769
1766
|
<input
|
|
1770
1767
|
type="checkbox"
|
|
1771
1768
|
[formField]="f"
|
|
1772
|
-
[id]="
|
|
1769
|
+
[id]="inputId"
|
|
1773
1770
|
class="form-check-input"
|
|
1774
1771
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1775
1772
|
[attr.tabindex]="tabIndex()"
|
|
@@ -1777,7 +1774,7 @@ class BsToggleFieldComponent {
|
|
|
1777
1774
|
[attr.aria-required]="ariaRequired"
|
|
1778
1775
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
1779
1776
|
/>
|
|
1780
|
-
<label [for]="
|
|
1777
|
+
<label [for]="inputId" class="form-check-label">
|
|
1781
1778
|
{{ label() | dynamicText | async }}
|
|
1782
1779
|
</label>
|
|
1783
1780
|
</div>
|
|
@@ -1795,8 +1792,7 @@ class BsToggleFieldComponent {
|
|
|
1795
1792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsToggleFieldComponent, decorators: [{
|
|
1796
1793
|
type: Component,
|
|
1797
1794
|
args: [{ selector: 'df-bs-toggle', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1798
|
-
@let f = field();
|
|
1799
|
-
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1795
|
+
@let f = field(); @let inputId = key() + '-input'; @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1800
1796
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1801
1797
|
|
|
1802
1798
|
<div
|
|
@@ -1810,7 +1806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1810
1806
|
<input
|
|
1811
1807
|
type="checkbox"
|
|
1812
1808
|
[formField]="f"
|
|
1813
|
-
[id]="
|
|
1809
|
+
[id]="inputId"
|
|
1814
1810
|
class="form-check-input"
|
|
1815
1811
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1816
1812
|
[attr.tabindex]="tabIndex()"
|
|
@@ -1818,7 +1814,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1818
1814
|
[attr.aria-required]="ariaRequired"
|
|
1819
1815
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
1820
1816
|
/>
|
|
1821
|
-
<label [for]="
|
|
1817
|
+
<label [for]="inputId" class="form-check-label">
|
|
1822
1818
|
{{ label() | dynamicText | async }}
|
|
1823
1819
|
</label>
|
|
1824
1820
|
</div>
|