@ng-forge/dynamic-forms-bootstrap 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AsyncPipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, input, computed, ChangeDetectionStrategy, Component, viewChild, effect, ElementRef, Directive, InjectionToken, linkedSignal, model, isSignal } from '@angular/core';
|
|
4
|
-
import { EventBus, ARRAY_CONTEXT, resolveTokens, DynamicTextPipe, buildBaseInputs, FIELD_SIGNAL_CONTEXT, resolveSubmitButtonDisabled, resolveNextButtonDisabled, NextPageEvent, PreviousPageEvent,
|
|
3
|
+
import { inject, input, computed, ChangeDetectionStrategy, Component, viewChild, effect, ElementRef, Directive, InjectionToken, afterRenderEffect, linkedSignal, model, isSignal } from '@angular/core';
|
|
4
|
+
import { EventBus, ARRAY_CONTEXT, resolveTokens, DynamicTextPipe, buildBaseInputs, FIELD_SIGNAL_CONTEXT, resolveSubmitButtonDisabled, resolveNextButtonDisabled, NextPageEvent, PreviousPageEvent, DynamicFormLogger, AddArrayItemEvent, RemoveArrayItemEvent } from '@ng-forge/dynamic-forms';
|
|
5
5
|
import { Field } from '@angular/forms/signals';
|
|
6
|
-
import { createResolvedErrorsSignal, shouldShowErrors, valueFieldMapper, optionsFieldMapper, checkboxFieldMapper, datepickerFieldMapper } from '@ng-forge/dynamic-forms/integration';
|
|
6
|
+
import { createResolvedErrorsSignal, shouldShowErrors, isEqual, valueFieldMapper, optionsFieldMapper, checkboxFieldMapper, datepickerFieldMapper } from '@ng-forge/dynamic-forms/integration';
|
|
7
7
|
import { explicitEffect } from 'ngxtension/explicit-effect';
|
|
8
8
|
|
|
9
9
|
class BsButtonFieldComponent {
|
|
@@ -78,8 +78,8 @@ class BsButtonFieldComponent {
|
|
|
78
78
|
this.eventBus.dispatch(event);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
82
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", 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
83
|
<button
|
|
84
84
|
[id]="key()"
|
|
85
85
|
[type]="buttonType()"
|
|
@@ -93,7 +93,7 @@ class BsButtonFieldComponent {
|
|
|
93
93
|
</button>
|
|
94
94
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n"], dependencies: [{ kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsButtonFieldComponent, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
98
|
args: [{ selector: 'df-bs-button', imports: [DynamicTextPipe, AsyncPipe], host: {
|
|
99
99
|
'[id]': '`${key()}`',
|
|
@@ -169,8 +169,8 @@ class BsCheckboxFieldComponent {
|
|
|
169
169
|
});
|
|
170
170
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
171
171
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
173
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, 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: `
|
|
174
174
|
@let f = field();
|
|
175
175
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
176
176
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -210,7 +210,7 @@ class BsCheckboxFieldComponent {
|
|
|
210
210
|
}
|
|
211
211
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
212
212
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsCheckboxFieldComponent, decorators: [{
|
|
214
214
|
type: Component,
|
|
215
215
|
args: [{ selector: 'df-bs-checkbox', imports: [Field, DynamicTextPipe, AsyncPipe], template: `
|
|
216
216
|
@let f = field();
|
|
@@ -298,10 +298,10 @@ class InputConstraintsDirective {
|
|
|
298
298
|
nativeElement.removeAttribute('step');
|
|
299
299
|
}
|
|
300
300
|
});
|
|
301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
302
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
301
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputConstraintsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
302
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: InputConstraintsDirective, isStandalone: true, selector: "[dfBsInputConstraints]", inputs: { dfMin: { classPropertyName: "dfMin", publicName: "dfMin", isSignal: true, isRequired: false, transformFunction: null }, dfMax: { classPropertyName: "dfMax", publicName: "dfMax", isSignal: true, isRequired: false, transformFunction: null }, dfStep: { classPropertyName: "dfStep", publicName: "dfStep", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
303
303
|
}
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputConstraintsDirective, decorators: [{
|
|
305
305
|
type: Directive,
|
|
306
306
|
args: [{
|
|
307
307
|
selector: '[dfBsInputConstraints]',
|
|
@@ -356,8 +356,8 @@ class BsDatepickerFieldComponent {
|
|
|
356
356
|
});
|
|
357
357
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
358
358
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
359
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
360
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDatepickerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
360
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
361
361
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
362
362
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
363
363
|
@if (p?.floatingLabel) {
|
|
@@ -436,7 +436,7 @@ class BsDatepickerFieldComponent {
|
|
|
436
436
|
}
|
|
437
437
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "directive", type: InputConstraintsDirective, selector: "[dfBsInputConstraints]", inputs: ["dfMin", "dfMax", "dfStep"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
438
438
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDatepickerFieldComponent, decorators: [{
|
|
440
440
|
type: Component,
|
|
441
441
|
args: [{ selector: 'df-bs-datepicker', imports: [Field, DynamicTextPipe, AsyncPipe, InputConstraintsDirective], template: `
|
|
442
442
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
@@ -555,6 +555,38 @@ class BsInputFieldComponent {
|
|
|
555
555
|
bootstrapConfig = inject(BOOTSTRAP_CONFIG, { optional: true });
|
|
556
556
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
557
557
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
558
|
+
/**
|
|
559
|
+
* Reference to the native input element.
|
|
560
|
+
* Used to imperatively sync the readonly attribute since Angular Signal Forms'
|
|
561
|
+
* [field] directive doesn't sync FieldState.readonly() to the DOM.
|
|
562
|
+
*/
|
|
563
|
+
inputRef = viewChild('inputRef', ...(ngDevMode ? [{ debugName: "inputRef" }] : []));
|
|
564
|
+
/**
|
|
565
|
+
* Computed signal that extracts the readonly state from the field.
|
|
566
|
+
* Used by the effect to reactively sync the readonly attribute to the DOM.
|
|
567
|
+
*/
|
|
568
|
+
isReadonly = computed(() => this.field()().readonly(), ...(ngDevMode ? [{ debugName: "isReadonly" }] : []));
|
|
569
|
+
/**
|
|
570
|
+
* Workaround: Angular Signal Forms' [field] directive does NOT sync the readonly
|
|
571
|
+
* attribute to the DOM. This effect imperatively sets/removes the readonly attribute
|
|
572
|
+
* on the native input element whenever the readonly state changes.
|
|
573
|
+
*
|
|
574
|
+
* Uses afterRenderEffect to ensure DOM is ready before manipulating attributes.
|
|
575
|
+
*/
|
|
576
|
+
syncReadonlyToDom = afterRenderEffect({
|
|
577
|
+
write: () => {
|
|
578
|
+
const inputRef = this.inputRef();
|
|
579
|
+
const isReadonly = this.isReadonly();
|
|
580
|
+
if (inputRef?.nativeElement) {
|
|
581
|
+
if (isReadonly) {
|
|
582
|
+
inputRef.nativeElement.setAttribute('readonly', '');
|
|
583
|
+
}
|
|
584
|
+
else {
|
|
585
|
+
inputRef.nativeElement.removeAttribute('readonly');
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
});
|
|
558
590
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
559
591
|
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
560
592
|
className = input('', ...(ngDevMode ? [{ debugName: "className" }] : []));
|
|
@@ -595,8 +627,8 @@ class BsInputFieldComponent {
|
|
|
595
627
|
});
|
|
596
628
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
597
629
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
599
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
630
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsInputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
631
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, 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: `
|
|
600
632
|
@let f = field(); @let p = props(); @let effectiveSize = this.effectiveSize();
|
|
601
633
|
@let effectiveFloatingLabel = this.effectiveFloatingLabel();
|
|
602
634
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
@@ -604,116 +636,23 @@ class BsInputFieldComponent {
|
|
|
604
636
|
@if (effectiveFloatingLabel) {
|
|
605
637
|
<!-- Floating label variant -->
|
|
606
638
|
<div class="form-floating mb-3">
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
/>
|
|
625
|
-
}
|
|
626
|
-
@case ('password') {
|
|
627
|
-
<input
|
|
628
|
-
type="password"
|
|
629
|
-
[field]="f"
|
|
630
|
-
[id]="key()"
|
|
631
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
632
|
-
[attr.tabindex]="tabIndex()"
|
|
633
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
634
|
-
[attr.aria-required]="ariaRequired"
|
|
635
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
636
|
-
class="form-control"
|
|
637
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
638
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
639
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
640
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
641
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
642
|
-
/>
|
|
643
|
-
}
|
|
644
|
-
@case ('number') {
|
|
645
|
-
<input
|
|
646
|
-
type="number"
|
|
647
|
-
[field]="f"
|
|
648
|
-
[id]="key()"
|
|
649
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
650
|
-
[attr.tabindex]="tabIndex()"
|
|
651
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
652
|
-
[attr.aria-required]="ariaRequired"
|
|
653
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
654
|
-
class="form-control"
|
|
655
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
656
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
657
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
658
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
659
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
660
|
-
/>
|
|
661
|
-
}
|
|
662
|
-
@case ('tel') {
|
|
663
|
-
<input
|
|
664
|
-
type="tel"
|
|
665
|
-
[field]="f"
|
|
666
|
-
[id]="key()"
|
|
667
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
668
|
-
[attr.tabindex]="tabIndex()"
|
|
669
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
670
|
-
[attr.aria-required]="ariaRequired"
|
|
671
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
672
|
-
class="form-control"
|
|
673
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
674
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
675
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
676
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
677
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
678
|
-
/>
|
|
679
|
-
}
|
|
680
|
-
@case ('url') {
|
|
681
|
-
<input
|
|
682
|
-
type="url"
|
|
683
|
-
[field]="f"
|
|
684
|
-
[id]="key()"
|
|
685
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
686
|
-
[attr.tabindex]="tabIndex()"
|
|
687
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
688
|
-
[attr.aria-required]="ariaRequired"
|
|
689
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
690
|
-
class="form-control"
|
|
691
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
692
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
693
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
694
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
695
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
696
|
-
/>
|
|
697
|
-
}
|
|
698
|
-
@default {
|
|
699
|
-
<input
|
|
700
|
-
type="text"
|
|
701
|
-
[field]="f"
|
|
702
|
-
[id]="key()"
|
|
703
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
704
|
-
[attr.tabindex]="tabIndex()"
|
|
705
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
706
|
-
[attr.aria-required]="ariaRequired"
|
|
707
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
708
|
-
class="form-control"
|
|
709
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
710
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
711
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
712
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
713
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
714
|
-
/>
|
|
715
|
-
}
|
|
716
|
-
}
|
|
639
|
+
<input
|
|
640
|
+
#inputRef
|
|
641
|
+
[type]="p?.type ?? 'text'"
|
|
642
|
+
[field]="f"
|
|
643
|
+
[id]="key()"
|
|
644
|
+
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
645
|
+
[attr.tabindex]="tabIndex()"
|
|
646
|
+
[attr.aria-invalid]="ariaInvalid"
|
|
647
|
+
[attr.aria-required]="ariaRequired"
|
|
648
|
+
[attr.aria-describedby]="ariaDescribedBy"
|
|
649
|
+
class="form-control"
|
|
650
|
+
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
651
|
+
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
652
|
+
[class.form-control-plaintext]="p?.plaintext"
|
|
653
|
+
[class.is-invalid]="f().invalid() && f().touched()"
|
|
654
|
+
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
655
|
+
/>
|
|
717
656
|
@if (label()) {
|
|
718
657
|
<label [for]="key()">{{ label() | dynamicText | async }}</label>
|
|
719
658
|
}
|
|
@@ -732,116 +671,23 @@ class BsInputFieldComponent {
|
|
|
732
671
|
@if (label()) {
|
|
733
672
|
<label [for]="key()" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
734
673
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
/>
|
|
753
|
-
}
|
|
754
|
-
@case ('password') {
|
|
755
|
-
<input
|
|
756
|
-
type="password"
|
|
757
|
-
[field]="f"
|
|
758
|
-
[id]="key()"
|
|
759
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
760
|
-
[attr.tabindex]="tabIndex()"
|
|
761
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
762
|
-
[attr.aria-required]="ariaRequired"
|
|
763
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
764
|
-
class="form-control"
|
|
765
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
766
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
767
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
768
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
769
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
770
|
-
/>
|
|
771
|
-
}
|
|
772
|
-
@case ('number') {
|
|
773
|
-
<input
|
|
774
|
-
type="number"
|
|
775
|
-
[field]="f"
|
|
776
|
-
[id]="key()"
|
|
777
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
778
|
-
[attr.tabindex]="tabIndex()"
|
|
779
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
780
|
-
[attr.aria-required]="ariaRequired"
|
|
781
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
782
|
-
class="form-control"
|
|
783
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
784
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
785
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
786
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
787
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
788
|
-
/>
|
|
789
|
-
}
|
|
790
|
-
@case ('tel') {
|
|
791
|
-
<input
|
|
792
|
-
type="tel"
|
|
793
|
-
[field]="f"
|
|
794
|
-
[id]="key()"
|
|
795
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
796
|
-
[attr.tabindex]="tabIndex()"
|
|
797
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
798
|
-
[attr.aria-required]="ariaRequired"
|
|
799
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
800
|
-
class="form-control"
|
|
801
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
802
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
803
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
804
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
805
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
806
|
-
/>
|
|
807
|
-
}
|
|
808
|
-
@case ('url') {
|
|
809
|
-
<input
|
|
810
|
-
type="url"
|
|
811
|
-
[field]="f"
|
|
812
|
-
[id]="key()"
|
|
813
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
814
|
-
[attr.tabindex]="tabIndex()"
|
|
815
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
816
|
-
[attr.aria-required]="ariaRequired"
|
|
817
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
818
|
-
class="form-control"
|
|
819
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
820
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
821
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
822
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
823
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
824
|
-
/>
|
|
825
|
-
}
|
|
826
|
-
@default {
|
|
827
|
-
<input
|
|
828
|
-
type="text"
|
|
829
|
-
[field]="f"
|
|
830
|
-
[id]="key()"
|
|
831
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
832
|
-
[attr.tabindex]="tabIndex()"
|
|
833
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
834
|
-
[attr.aria-required]="ariaRequired"
|
|
835
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
836
|
-
class="form-control"
|
|
837
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
838
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
839
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
840
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
841
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
842
|
-
/>
|
|
843
|
-
}
|
|
844
|
-
}
|
|
674
|
+
<input
|
|
675
|
+
#inputRef
|
|
676
|
+
[type]="p?.type ?? 'text'"
|
|
677
|
+
[field]="f"
|
|
678
|
+
[id]="key()"
|
|
679
|
+
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
680
|
+
[attr.tabindex]="tabIndex()"
|
|
681
|
+
[attr.aria-invalid]="ariaInvalid"
|
|
682
|
+
[attr.aria-required]="ariaRequired"
|
|
683
|
+
[attr.aria-describedby]="ariaDescribedBy"
|
|
684
|
+
class="form-control"
|
|
685
|
+
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
686
|
+
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
687
|
+
[class.form-control-plaintext]="p?.plaintext"
|
|
688
|
+
[class.is-invalid]="f().invalid() && f().touched()"
|
|
689
|
+
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
690
|
+
/>
|
|
845
691
|
@if (p?.helpText) {
|
|
846
692
|
<div class="form-text" [id]="helpTextId()">
|
|
847
693
|
{{ p?.helpText | dynamicText | async }}
|
|
@@ -859,7 +705,7 @@ class BsInputFieldComponent {
|
|
|
859
705
|
}
|
|
860
706
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
861
707
|
}
|
|
862
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsInputFieldComponent, decorators: [{
|
|
863
709
|
type: Component,
|
|
864
710
|
args: [{ selector: 'df-bs-input', imports: [Field, DynamicTextPipe, AsyncPipe], template: `
|
|
865
711
|
@let f = field(); @let p = props(); @let effectiveSize = this.effectiveSize();
|
|
@@ -869,116 +715,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
869
715
|
@if (effectiveFloatingLabel) {
|
|
870
716
|
<!-- Floating label variant -->
|
|
871
717
|
<div class="form-floating mb-3">
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
/>
|
|
890
|
-
}
|
|
891
|
-
@case ('password') {
|
|
892
|
-
<input
|
|
893
|
-
type="password"
|
|
894
|
-
[field]="f"
|
|
895
|
-
[id]="key()"
|
|
896
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
897
|
-
[attr.tabindex]="tabIndex()"
|
|
898
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
899
|
-
[attr.aria-required]="ariaRequired"
|
|
900
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
901
|
-
class="form-control"
|
|
902
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
903
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
904
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
905
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
906
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
907
|
-
/>
|
|
908
|
-
}
|
|
909
|
-
@case ('number') {
|
|
910
|
-
<input
|
|
911
|
-
type="number"
|
|
912
|
-
[field]="f"
|
|
913
|
-
[id]="key()"
|
|
914
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
915
|
-
[attr.tabindex]="tabIndex()"
|
|
916
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
917
|
-
[attr.aria-required]="ariaRequired"
|
|
918
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
919
|
-
class="form-control"
|
|
920
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
921
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
922
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
923
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
924
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
925
|
-
/>
|
|
926
|
-
}
|
|
927
|
-
@case ('tel') {
|
|
928
|
-
<input
|
|
929
|
-
type="tel"
|
|
930
|
-
[field]="f"
|
|
931
|
-
[id]="key()"
|
|
932
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
933
|
-
[attr.tabindex]="tabIndex()"
|
|
934
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
935
|
-
[attr.aria-required]="ariaRequired"
|
|
936
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
937
|
-
class="form-control"
|
|
938
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
939
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
940
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
941
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
942
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
943
|
-
/>
|
|
944
|
-
}
|
|
945
|
-
@case ('url') {
|
|
946
|
-
<input
|
|
947
|
-
type="url"
|
|
948
|
-
[field]="f"
|
|
949
|
-
[id]="key()"
|
|
950
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
951
|
-
[attr.tabindex]="tabIndex()"
|
|
952
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
953
|
-
[attr.aria-required]="ariaRequired"
|
|
954
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
955
|
-
class="form-control"
|
|
956
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
957
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
958
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
959
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
960
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
961
|
-
/>
|
|
962
|
-
}
|
|
963
|
-
@default {
|
|
964
|
-
<input
|
|
965
|
-
type="text"
|
|
966
|
-
[field]="f"
|
|
967
|
-
[id]="key()"
|
|
968
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
969
|
-
[attr.tabindex]="tabIndex()"
|
|
970
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
971
|
-
[attr.aria-required]="ariaRequired"
|
|
972
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
973
|
-
class="form-control"
|
|
974
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
975
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
976
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
977
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
978
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
979
|
-
/>
|
|
980
|
-
}
|
|
981
|
-
}
|
|
718
|
+
<input
|
|
719
|
+
#inputRef
|
|
720
|
+
[type]="p?.type ?? 'text'"
|
|
721
|
+
[field]="f"
|
|
722
|
+
[id]="key()"
|
|
723
|
+
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
724
|
+
[attr.tabindex]="tabIndex()"
|
|
725
|
+
[attr.aria-invalid]="ariaInvalid"
|
|
726
|
+
[attr.aria-required]="ariaRequired"
|
|
727
|
+
[attr.aria-describedby]="ariaDescribedBy"
|
|
728
|
+
class="form-control"
|
|
729
|
+
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
730
|
+
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
731
|
+
[class.form-control-plaintext]="p?.plaintext"
|
|
732
|
+
[class.is-invalid]="f().invalid() && f().touched()"
|
|
733
|
+
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
734
|
+
/>
|
|
982
735
|
@if (label()) {
|
|
983
736
|
<label [for]="key()">{{ label() | dynamicText | async }}</label>
|
|
984
737
|
}
|
|
@@ -997,116 +750,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
997
750
|
@if (label()) {
|
|
998
751
|
<label [for]="key()" class="form-label">{{ label() | dynamicText | async }}</label>
|
|
999
752
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
/>
|
|
1018
|
-
}
|
|
1019
|
-
@case ('password') {
|
|
1020
|
-
<input
|
|
1021
|
-
type="password"
|
|
1022
|
-
[field]="f"
|
|
1023
|
-
[id]="key()"
|
|
1024
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1025
|
-
[attr.tabindex]="tabIndex()"
|
|
1026
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
1027
|
-
[attr.aria-required]="ariaRequired"
|
|
1028
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
1029
|
-
class="form-control"
|
|
1030
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
1031
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
1032
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
1033
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1034
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
1035
|
-
/>
|
|
1036
|
-
}
|
|
1037
|
-
@case ('number') {
|
|
1038
|
-
<input
|
|
1039
|
-
type="number"
|
|
1040
|
-
[field]="f"
|
|
1041
|
-
[id]="key()"
|
|
1042
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1043
|
-
[attr.tabindex]="tabIndex()"
|
|
1044
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
1045
|
-
[attr.aria-required]="ariaRequired"
|
|
1046
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
1047
|
-
class="form-control"
|
|
1048
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
1049
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
1050
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
1051
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1052
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
1053
|
-
/>
|
|
1054
|
-
}
|
|
1055
|
-
@case ('tel') {
|
|
1056
|
-
<input
|
|
1057
|
-
type="tel"
|
|
1058
|
-
[field]="f"
|
|
1059
|
-
[id]="key()"
|
|
1060
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1061
|
-
[attr.tabindex]="tabIndex()"
|
|
1062
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
1063
|
-
[attr.aria-required]="ariaRequired"
|
|
1064
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
1065
|
-
class="form-control"
|
|
1066
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
1067
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
1068
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
1069
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1070
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
1071
|
-
/>
|
|
1072
|
-
}
|
|
1073
|
-
@case ('url') {
|
|
1074
|
-
<input
|
|
1075
|
-
type="url"
|
|
1076
|
-
[field]="f"
|
|
1077
|
-
[id]="key()"
|
|
1078
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1079
|
-
[attr.tabindex]="tabIndex()"
|
|
1080
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
1081
|
-
[attr.aria-required]="ariaRequired"
|
|
1082
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
1083
|
-
class="form-control"
|
|
1084
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
1085
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
1086
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
1087
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1088
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
1089
|
-
/>
|
|
1090
|
-
}
|
|
1091
|
-
@default {
|
|
1092
|
-
<input
|
|
1093
|
-
type="text"
|
|
1094
|
-
[field]="f"
|
|
1095
|
-
[id]="key()"
|
|
1096
|
-
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1097
|
-
[attr.tabindex]="tabIndex()"
|
|
1098
|
-
[attr.aria-invalid]="ariaInvalid"
|
|
1099
|
-
[attr.aria-required]="ariaRequired"
|
|
1100
|
-
[attr.aria-describedby]="ariaDescribedBy"
|
|
1101
|
-
class="form-control"
|
|
1102
|
-
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
1103
|
-
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
1104
|
-
[class.form-control-plaintext]="p?.plaintext"
|
|
1105
|
-
[class.is-invalid]="f().invalid() && f().touched()"
|
|
1106
|
-
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
1107
|
-
/>
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
753
|
+
<input
|
|
754
|
+
#inputRef
|
|
755
|
+
[type]="p?.type ?? 'text'"
|
|
756
|
+
[field]="f"
|
|
757
|
+
[id]="key()"
|
|
758
|
+
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
759
|
+
[attr.tabindex]="tabIndex()"
|
|
760
|
+
[attr.aria-invalid]="ariaInvalid"
|
|
761
|
+
[attr.aria-required]="ariaRequired"
|
|
762
|
+
[attr.aria-describedby]="ariaDescribedBy"
|
|
763
|
+
class="form-control"
|
|
764
|
+
[class.form-control-sm]="effectiveSize === 'sm'"
|
|
765
|
+
[class.form-control-lg]="effectiveSize === 'lg'"
|
|
766
|
+
[class.form-control-plaintext]="p?.plaintext"
|
|
767
|
+
[class.is-invalid]="f().invalid() && f().touched()"
|
|
768
|
+
[class.is-valid]="f().valid() && f().touched() && p?.validFeedback"
|
|
769
|
+
/>
|
|
1110
770
|
@if (p?.helpText) {
|
|
1111
771
|
<div class="form-text" [id]="helpTextId()">
|
|
1112
772
|
{{ p?.helpText | dynamicText | async }}
|
|
@@ -1128,41 +788,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
1128
788
|
'[class]': 'className()',
|
|
1129
789
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
1130
790
|
}, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
1131
|
-
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
|
|
791
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
|
|
1132
792
|
|
|
1133
793
|
var bsInput_component = /*#__PURE__*/Object.freeze({
|
|
1134
794
|
__proto__: null,
|
|
1135
795
|
default: BsInputFieldComponent
|
|
1136
796
|
});
|
|
1137
797
|
|
|
1138
|
-
/**
|
|
1139
|
-
* Performs a deep equality comparison between two values
|
|
1140
|
-
*/
|
|
1141
|
-
function isEqual(a, b) {
|
|
1142
|
-
if (a === b)
|
|
1143
|
-
return true;
|
|
1144
|
-
if (a == null || b == null)
|
|
1145
|
-
return false;
|
|
1146
|
-
if (typeof a !== typeof b)
|
|
1147
|
-
return false;
|
|
1148
|
-
if (a instanceof Date && b instanceof Date) {
|
|
1149
|
-
return a.getTime() === b.getTime();
|
|
1150
|
-
}
|
|
1151
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
1152
|
-
if (a.length !== b.length)
|
|
1153
|
-
return false;
|
|
1154
|
-
return a.every((item, index) => isEqual(item, b[index]));
|
|
1155
|
-
}
|
|
1156
|
-
if (typeof a === 'object' && typeof b === 'object') {
|
|
1157
|
-
const keysA = Object.keys(a);
|
|
1158
|
-
const keysB = Object.keys(b);
|
|
1159
|
-
if (keysA.length !== keysB.length)
|
|
1160
|
-
return false;
|
|
1161
|
-
return keysA.every((key) => keysB.includes(key) && isEqual(a[key], b[key]));
|
|
1162
|
-
}
|
|
1163
|
-
return Object.is(a, b);
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
798
|
class BsMultiCheckboxFieldComponent {
|
|
1167
799
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1168
800
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
@@ -1233,8 +865,8 @@ class BsMultiCheckboxFieldComponent {
|
|
|
1233
865
|
});
|
|
1234
866
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1235
867
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1236
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1237
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
868
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsMultiCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
869
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsMultiCheckboxFieldComponent, isStandalone: true, selector: "df-bs-multi-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 }, 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 } }, host: { properties: { "class": "className() || \"\"", "id": "`${key()}`", "attr.data-testid": "key()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1238
870
|
@let f = field();
|
|
1239
871
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1240
872
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1280,7 +912,7 @@ class BsMultiCheckboxFieldComponent {
|
|
|
1280
912
|
}
|
|
1281
913
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host{display:block}.checkbox-group{margin-bottom:.5rem}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1282
914
|
}
|
|
1283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsMultiCheckboxFieldComponent, decorators: [{
|
|
1284
916
|
type: Component,
|
|
1285
917
|
args: [{ selector: 'df-bs-multi-checkbox', imports: [DynamicTextPipe, AsyncPipe], template: `
|
|
1286
918
|
@let f = field();
|
|
@@ -1360,8 +992,8 @@ class BsRadioGroupComponent {
|
|
|
1360
992
|
this.value.set(newValue);
|
|
1361
993
|
}
|
|
1362
994
|
}
|
|
1363
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1364
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
995
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
996
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsRadioGroupComponent, isStandalone: true, selector: "df-bs-radio-group", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, properties: { classPropertyName: "properties", publicName: "properties", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: `
|
|
1365
997
|
@let props = properties();
|
|
1366
998
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1367
999
|
@if (props?.buttonGroup) {
|
|
@@ -1411,7 +1043,7 @@ class BsRadioGroupComponent {
|
|
|
1411
1043
|
}
|
|
1412
1044
|
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1413
1045
|
}
|
|
1414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsRadioGroupComponent, decorators: [{
|
|
1415
1047
|
type: Component,
|
|
1416
1048
|
args: [{ selector: 'df-bs-radio-group', imports: [DynamicTextPipe, AsyncPipe], template: `
|
|
1417
1049
|
@let props = properties();
|
|
@@ -1501,8 +1133,8 @@ class BsRadioFieldComponent {
|
|
|
1501
1133
|
});
|
|
1502
1134
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1503
1135
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1504
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1505
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsRadioFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsRadioFieldComponent, isStandalone: true, selector: "df-bs-radio", 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 } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1506
1138
|
@let f = field();
|
|
1507
1139
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1508
1140
|
|
|
@@ -1528,7 +1160,7 @@ class BsRadioFieldComponent {
|
|
|
1528
1160
|
</div>
|
|
1529
1161
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: BsRadioGroupComponent, selector: "df-bs-radio-group", inputs: ["value", "disabled", "readonly", "name", "label", "options", "properties", "ariaDescribedBy"], outputs: ["valueChange"] }, { kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1530
1162
|
}
|
|
1531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsRadioFieldComponent, decorators: [{
|
|
1532
1164
|
type: Component,
|
|
1533
1165
|
args: [{ selector: 'df-bs-radio', imports: [BsRadioGroupComponent, Field, DynamicTextPipe, AsyncPipe], template: `
|
|
1534
1166
|
@let f = field();
|
|
@@ -1612,8 +1244,8 @@ class BsSelectFieldComponent {
|
|
|
1612
1244
|
});
|
|
1613
1245
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1614
1246
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1615
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1616
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1247
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1248
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1617
1249
|
@let f = field();
|
|
1618
1250
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1619
1251
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1654,7 +1286,7 @@ class BsSelectFieldComponent {
|
|
|
1654
1286
|
</div>
|
|
1655
1287
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1656
1288
|
}
|
|
1657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSelectFieldComponent, decorators: [{
|
|
1658
1290
|
type: Component,
|
|
1659
1291
|
args: [{ selector: 'df-bs-select', imports: [Field, DynamicTextPipe, AsyncPipe], template: `
|
|
1660
1292
|
@let f = field();
|
|
@@ -1747,8 +1379,8 @@ class BsSliderFieldComponent {
|
|
|
1747
1379
|
});
|
|
1748
1380
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1749
1381
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1750
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1751
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1382
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSliderFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1383
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, host: { properties: { "class": "className()", "id": "`${key()}`", "attr.data-testid": "key()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1752
1384
|
@let f = field();
|
|
1753
1385
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1754
1386
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1789,7 +1421,7 @@ class BsSliderFieldComponent {
|
|
|
1789
1421
|
</div>
|
|
1790
1422
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "directive", type: InputConstraintsDirective, selector: "[dfBsInputConstraints]", inputs: ["dfMin", "dfMax", "dfStep"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1791
1423
|
}
|
|
1792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSliderFieldComponent, decorators: [{
|
|
1793
1425
|
type: Component,
|
|
1794
1426
|
args: [{ selector: 'df-bs-slider', imports: [Field, DynamicTextPipe, AsyncPipe, InputConstraintsDirective], template: `
|
|
1795
1427
|
@let f = field();
|
|
@@ -1879,8 +1511,8 @@ class BsTextareaFieldComponent {
|
|
|
1879
1511
|
});
|
|
1880
1512
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1881
1513
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1882
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1883
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTextareaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, host: { properties: { "id": "`${key()}`", "attr.data-testid": "key()", "class": "className()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
1884
1516
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1885
1517
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1886
1518
|
@if (p?.floatingLabel) {
|
|
@@ -1954,7 +1586,7 @@ class BsTextareaFieldComponent {
|
|
|
1954
1586
|
}
|
|
1955
1587
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1956
1588
|
}
|
|
1957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsTextareaFieldComponent, decorators: [{
|
|
1958
1590
|
type: Component,
|
|
1959
1591
|
args: [{ selector: 'df-bs-textarea', imports: [Field, DynamicTextPipe, AsyncPipe], template: `
|
|
1960
1592
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
@@ -2077,8 +1709,8 @@ class BsToggleFieldComponent {
|
|
|
2077
1709
|
});
|
|
2078
1710
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
2079
1711
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
2080
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
2081
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1712
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsToggleFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1713
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 } }, host: { properties: { "class": "className()", "id": "`${key()}`", "attr.data-testid": "key()", "attr.hidden": "field()().hidden() || null" } }, ngImport: i0, template: `
|
|
2082
1714
|
@let f = field();
|
|
2083
1715
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
2084
1716
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -2118,7 +1750,7 @@ class BsToggleFieldComponent {
|
|
|
2118
1750
|
}
|
|
2119
1751
|
`, isInline: true, styles: [":host{--df-bs-field-gap: .5rem;--df-bs-label-font-weight: 500;--df-bs-label-color: inherit;--df-bs-hint-color: var(--bs-secondary-color, #6c757d);--df-bs-hint-font-size: .875rem;--df-bs-error-color: var(--bs-danger, #dc3545);--df-bs-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-bs-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-bs-label-font-weight);color:var(--df-bs-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-bs-hint-color);font-size:var(--df-bs-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}\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"], dependencies: [{ kind: "directive", type: Field, selector: "[field]", inputs: ["field"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2120
1752
|
}
|
|
2121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsToggleFieldComponent, decorators: [{
|
|
2122
1754
|
type: Component,
|
|
2123
1755
|
args: [{ selector: 'df-bs-toggle', imports: [Field, DynamicTextPipe, AsyncPipe], template: `
|
|
2124
1756
|
@let f = field();
|
|
@@ -2350,7 +1982,7 @@ function addArrayItemButtonFieldMapper(fieldDef) {
|
|
|
2350
1982
|
// Try to get array context (available when inside an array)
|
|
2351
1983
|
// Use optional injection so it doesn't fail when outside an array
|
|
2352
1984
|
const arrayContext = inject(ARRAY_CONTEXT, { optional: true });
|
|
2353
|
-
const logger = inject(
|
|
1985
|
+
const logger = inject(DynamicFormLogger);
|
|
2354
1986
|
// Determine the target array key
|
|
2355
1987
|
// Priority: explicit arrayKey from fieldDef > arrayKey from context
|
|
2356
1988
|
const targetArrayKey = fieldDef.arrayKey ?? arrayContext?.arrayKey;
|
|
@@ -2406,7 +2038,7 @@ function removeArrayItemButtonFieldMapper(fieldDef) {
|
|
|
2406
2038
|
// Try to get array context (available when inside an array)
|
|
2407
2039
|
// Use optional injection so it doesn't fail when outside an array
|
|
2408
2040
|
const arrayContext = inject(ARRAY_CONTEXT, { optional: true });
|
|
2409
|
-
const logger = inject(
|
|
2041
|
+
const logger = inject(DynamicFormLogger);
|
|
2410
2042
|
// Determine the target array key
|
|
2411
2043
|
// Priority: explicit arrayKey from fieldDef > arrayKey from context
|
|
2412
2044
|
const targetArrayKey = fieldDef.arrayKey ?? arrayContext?.arrayKey;
|