@ng-forge/dynamic-forms-bootstrap 0.2.0 → 0.3.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,
|
|
3
|
+
import { inject, input, computed, ChangeDetectionStrategy, Component, ElementRef, viewChild, effect, Directive, InjectionToken, afterRenderEffect, linkedSignal, model, isSignal } from '@angular/core';
|
|
4
4
|
import { EventBus, ARRAY_CONTEXT, resolveTokens, DynamicTextPipe, buildBaseInputs, FIELD_SIGNAL_CONTEXT, resolveSubmitButtonDisabled, resolveNextButtonDisabled, NextPageEvent, PreviousPageEvent, DynamicFormLogger, AddArrayItemEvent, RemoveArrayItemEvent } from '@ng-forge/dynamic-forms';
|
|
5
|
-
import {
|
|
6
|
-
import { createResolvedErrorsSignal, shouldShowErrors, isEqual, valueFieldMapper, optionsFieldMapper, checkboxFieldMapper, datepickerFieldMapper } from '@ng-forge/dynamic-forms/integration';
|
|
5
|
+
import { FormField } from '@angular/forms/signals';
|
|
6
|
+
import { createResolvedErrorsSignal, shouldShowErrors, setupMetaTracking, 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.8", ngImport: i0, type: BsButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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
83
|
<button
|
|
84
84
|
[id]="key()"
|
|
85
85
|
[type]="buttonType()"
|
|
@@ -91,9 +91,9 @@ class BsButtonFieldComponent {
|
|
|
91
91
|
>
|
|
92
92
|
{{ label() | dynamicText | async }}
|
|
93
93
|
</button>
|
|
94
|
-
`, isInline: true, styles: [":host{--df-
|
|
94
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){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 });
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsButtonFieldComponent, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
98
|
args: [{ selector: 'df-bs-button', imports: [DynamicTextPipe, AsyncPipe], host: {
|
|
99
99
|
'[id]': '`${key()}`',
|
|
@@ -112,7 +112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
112
112
|
>
|
|
113
113
|
{{ label() | dynamicText | async }}
|
|
114
114
|
</button>
|
|
115
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-
|
|
115
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n"] }]
|
|
116
116
|
}], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], event: [{ type: i0.Input, args: [{ isSignal: true, alias: "event", required: false }] }], eventArgs: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventArgs", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], eventContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventContext", required: false }] }] } });
|
|
117
117
|
|
|
118
118
|
var bsButton_component = /*#__PURE__*/Object.freeze({
|
|
@@ -123,6 +123,7 @@ var bsButton_component = /*#__PURE__*/Object.freeze({
|
|
|
123
123
|
// Public API - component
|
|
124
124
|
|
|
125
125
|
class BsCheckboxFieldComponent {
|
|
126
|
+
elementRef = inject((ElementRef));
|
|
126
127
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
127
128
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
128
129
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -132,11 +133,13 @@ class BsCheckboxFieldComponent {
|
|
|
132
133
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
133
134
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
134
135
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
136
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
135
137
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
136
138
|
showErrors = shouldShowErrors(this.field);
|
|
137
139
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
138
140
|
checkboxInput = viewChild('checkboxInput', ...(ngDevMode ? [{ debugName: "checkboxInput" }] : []));
|
|
139
141
|
constructor() {
|
|
142
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input[type="checkbox"]' });
|
|
140
143
|
// Handle indeterminate state
|
|
141
144
|
effect(() => {
|
|
142
145
|
const indeterminate = this.props()?.indeterminate;
|
|
@@ -169,8 +172,8 @@ class BsCheckboxFieldComponent {
|
|
|
169
172
|
});
|
|
170
173
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
171
174
|
}, ...(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.
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
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: `
|
|
174
177
|
@let f = field();
|
|
175
178
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
176
179
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -185,7 +188,7 @@ class BsCheckboxFieldComponent {
|
|
|
185
188
|
<input
|
|
186
189
|
#checkboxInput
|
|
187
190
|
type="checkbox"
|
|
188
|
-
[
|
|
191
|
+
[formField]="f"
|
|
189
192
|
[id]="key()"
|
|
190
193
|
class="form-check-input"
|
|
191
194
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
@@ -193,7 +196,6 @@ class BsCheckboxFieldComponent {
|
|
|
193
196
|
[attr.aria-invalid]="ariaInvalid"
|
|
194
197
|
[attr.aria-required]="ariaRequired"
|
|
195
198
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
196
|
-
[attr.hidden]="f().hidden() || null"
|
|
197
199
|
/>
|
|
198
200
|
<label [for]="key()" class="form-check-label">
|
|
199
201
|
{{ label() | dynamicText | async }}
|
|
@@ -208,11 +210,11 @@ class BsCheckboxFieldComponent {
|
|
|
208
210
|
@for (error of errorsToDisplay(); track error.kind; let i = $index) {
|
|
209
211
|
<div class="invalid-feedback d-block" [id]="errorId() + '-' + i" role="alert">{{ error.message }}</div>
|
|
210
212
|
}
|
|
211
|
-
`, isInline: true, styles: [":host{--df-
|
|
213
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
212
214
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsCheckboxFieldComponent, decorators: [{
|
|
214
216
|
type: Component,
|
|
215
|
-
args: [{ selector: 'df-bs-checkbox', imports: [
|
|
217
|
+
args: [{ selector: 'df-bs-checkbox', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
216
218
|
@let f = field();
|
|
217
219
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
218
220
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -227,7 +229,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
227
229
|
<input
|
|
228
230
|
#checkboxInput
|
|
229
231
|
type="checkbox"
|
|
230
|
-
[
|
|
232
|
+
[formField]="f"
|
|
231
233
|
[id]="key()"
|
|
232
234
|
class="form-check-input"
|
|
233
235
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
@@ -235,7 +237,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
235
237
|
[attr.aria-invalid]="ariaInvalid"
|
|
236
238
|
[attr.aria-required]="ariaRequired"
|
|
237
239
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
238
|
-
[attr.hidden]="f().hidden() || null"
|
|
239
240
|
/>
|
|
240
241
|
<label [for]="key()" class="form-check-label">
|
|
241
242
|
{{ label() | dynamicText | async }}
|
|
@@ -255,8 +256,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
255
256
|
'[id]': '`${key()}`',
|
|
256
257
|
'[attr.data-testid]': 'key()',
|
|
257
258
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
258
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-
|
|
259
|
-
}], ctorParameters: () => [], 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 }] }], checkboxInput: [{ type: i0.ViewChild, args: ['checkboxInput', { isSignal: true }] }] } });
|
|
259
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"] }]
|
|
260
|
+
}], ctorParameters: () => [], 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], checkboxInput: [{ type: i0.ViewChild, args: ['checkboxInput', { isSignal: true }] }] } });
|
|
260
261
|
|
|
261
262
|
var bsCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
262
263
|
__proto__: null,
|
|
@@ -298,10 +299,10 @@ class InputConstraintsDirective {
|
|
|
298
299
|
nativeElement.removeAttribute('step');
|
|
299
300
|
}
|
|
300
301
|
});
|
|
301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
302
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
302
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InputConstraintsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
303
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.8", 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
304
|
}
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InputConstraintsDirective, decorators: [{
|
|
305
306
|
type: Directive,
|
|
306
307
|
args: [{
|
|
307
308
|
selector: '[dfBsInputConstraints]',
|
|
@@ -309,6 +310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
309
310
|
}], propDecorators: { dfMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "dfMin", required: false }] }], dfMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "dfMax", required: false }] }], dfStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "dfStep", required: false }] }] } });
|
|
310
311
|
|
|
311
312
|
class BsDatepickerFieldComponent {
|
|
313
|
+
elementRef = inject((ElementRef));
|
|
312
314
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
313
315
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
314
316
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -321,9 +323,13 @@ class BsDatepickerFieldComponent {
|
|
|
321
323
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
322
324
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
323
325
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
326
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
324
327
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
325
328
|
showErrors = shouldShowErrors(this.field);
|
|
326
329
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
330
|
+
constructor() {
|
|
331
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });
|
|
332
|
+
}
|
|
327
333
|
// Helper methods to convert Date to string for HTML attributes
|
|
328
334
|
minAsString = computed(() => {
|
|
329
335
|
const min = this.minDate();
|
|
@@ -356,8 +362,8 @@ class BsDatepickerFieldComponent {
|
|
|
356
362
|
});
|
|
357
363
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
358
364
|
}, ...(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.
|
|
365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsDatepickerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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: `
|
|
361
367
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
362
368
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
363
369
|
@if (p?.floatingLabel) {
|
|
@@ -365,7 +371,7 @@ class BsDatepickerFieldComponent {
|
|
|
365
371
|
<div class="form-floating mb-3">
|
|
366
372
|
<input
|
|
367
373
|
dfBsInputConstraints
|
|
368
|
-
[
|
|
374
|
+
[formField]="f"
|
|
369
375
|
[id]="key()"
|
|
370
376
|
type="date"
|
|
371
377
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
@@ -402,7 +408,7 @@ class BsDatepickerFieldComponent {
|
|
|
402
408
|
|
|
403
409
|
<input
|
|
404
410
|
dfBsInputConstraints
|
|
405
|
-
[
|
|
411
|
+
[formField]="f"
|
|
406
412
|
[id]="key()"
|
|
407
413
|
type="date"
|
|
408
414
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
@@ -434,11 +440,11 @@ class BsDatepickerFieldComponent {
|
|
|
434
440
|
}
|
|
435
441
|
</div>
|
|
436
442
|
}
|
|
437
|
-
`, isInline: true, styles: [":host{--df-
|
|
443
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { 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
444
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsDatepickerFieldComponent, decorators: [{
|
|
440
446
|
type: Component,
|
|
441
|
-
args: [{ selector: 'df-bs-datepicker', imports: [
|
|
447
|
+
args: [{ selector: 'df-bs-datepicker', imports: [FormField, DynamicTextPipe, AsyncPipe, InputConstraintsDirective], template: `
|
|
442
448
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
443
449
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
444
450
|
@if (p?.floatingLabel) {
|
|
@@ -446,7 +452,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
446
452
|
<div class="form-floating mb-3">
|
|
447
453
|
<input
|
|
448
454
|
dfBsInputConstraints
|
|
449
|
-
[
|
|
455
|
+
[formField]="f"
|
|
450
456
|
[id]="key()"
|
|
451
457
|
type="date"
|
|
452
458
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
@@ -483,7 +489,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
483
489
|
|
|
484
490
|
<input
|
|
485
491
|
dfBsInputConstraints
|
|
486
|
-
[
|
|
492
|
+
[formField]="f"
|
|
487
493
|
[id]="key()"
|
|
488
494
|
type="date"
|
|
489
495
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
@@ -520,8 +526,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
520
526
|
'[attr.data-testid]': 'key()',
|
|
521
527
|
'[class]': 'className()',
|
|
522
528
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
523
|
-
}, styles: [":host{--df-
|
|
524
|
-
}], 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 }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", 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 }] }] } });
|
|
529
|
+
}, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
530
|
+
}], ctorParameters: () => [], 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 }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }] } });
|
|
525
531
|
|
|
526
532
|
var bsDatepicker_component = /*#__PURE__*/Object.freeze({
|
|
527
533
|
__proto__: null,
|
|
@@ -553,8 +559,17 @@ const BOOTSTRAP_CONFIG = new InjectionToken('BOOTSTRAP_CONFIG');
|
|
|
553
559
|
|
|
554
560
|
class BsInputFieldComponent {
|
|
555
561
|
bootstrapConfig = inject(BOOTSTRAP_CONFIG, { optional: true });
|
|
562
|
+
elementRef = inject((ElementRef));
|
|
556
563
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
557
564
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
565
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
566
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
|
|
567
|
+
className = input('', ...(ngDevMode ? [{ debugName: "className" }] : []));
|
|
568
|
+
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : []));
|
|
569
|
+
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
570
|
+
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
571
|
+
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
572
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
558
573
|
/**
|
|
559
574
|
* Reference to the native input element.
|
|
560
575
|
* Used to imperatively sync the readonly attribute since Angular Signal Forms'
|
|
@@ -587,13 +602,9 @@ class BsInputFieldComponent {
|
|
|
587
602
|
}
|
|
588
603
|
},
|
|
589
604
|
});
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : []));
|
|
594
|
-
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
595
|
-
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
596
|
-
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
605
|
+
constructor() {
|
|
606
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });
|
|
607
|
+
}
|
|
597
608
|
effectiveSize = computed(() => this.props()?.size ?? this.bootstrapConfig?.size, ...(ngDevMode ? [{ debugName: "effectiveSize" }] : []));
|
|
598
609
|
effectiveFloatingLabel = computed(() => this.props()?.floatingLabel ?? this.bootstrapConfig?.floatingLabel ?? false, ...(ngDevMode ? [{ debugName: "effectiveFloatingLabel" }] : []));
|
|
599
610
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
@@ -627,8 +638,8 @@ class BsInputFieldComponent {
|
|
|
627
638
|
});
|
|
628
639
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
629
640
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
630
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
631
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsInputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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: `
|
|
632
643
|
@let f = field(); @let p = props(); @let effectiveSize = this.effectiveSize();
|
|
633
644
|
@let effectiveFloatingLabel = this.effectiveFloatingLabel();
|
|
634
645
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
@@ -638,9 +649,9 @@ class BsInputFieldComponent {
|
|
|
638
649
|
<div class="form-floating mb-3">
|
|
639
650
|
<input
|
|
640
651
|
#inputRef
|
|
641
|
-
[
|
|
642
|
-
[field]="f"
|
|
652
|
+
[formField]="f"
|
|
643
653
|
[id]="key()"
|
|
654
|
+
[type]="p?.type ?? 'text'"
|
|
644
655
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
645
656
|
[attr.tabindex]="tabIndex()"
|
|
646
657
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -673,9 +684,9 @@ class BsInputFieldComponent {
|
|
|
673
684
|
}
|
|
674
685
|
<input
|
|
675
686
|
#inputRef
|
|
676
|
-
[
|
|
677
|
-
[field]="f"
|
|
687
|
+
[formField]="f"
|
|
678
688
|
[id]="key()"
|
|
689
|
+
[type]="p?.type ?? 'text'"
|
|
679
690
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
680
691
|
[attr.tabindex]="tabIndex()"
|
|
681
692
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -703,11 +714,11 @@ class BsInputFieldComponent {
|
|
|
703
714
|
}
|
|
704
715
|
</div>
|
|
705
716
|
}
|
|
706
|
-
`, isInline: true, styles: [":host{--df-
|
|
717
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
707
718
|
}
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsInputFieldComponent, decorators: [{
|
|
709
720
|
type: Component,
|
|
710
|
-
args: [{ selector: 'df-bs-input', imports: [
|
|
721
|
+
args: [{ selector: 'df-bs-input', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
711
722
|
@let f = field(); @let p = props(); @let effectiveSize = this.effectiveSize();
|
|
712
723
|
@let effectiveFloatingLabel = this.effectiveFloatingLabel();
|
|
713
724
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
@@ -717,9 +728,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
717
728
|
<div class="form-floating mb-3">
|
|
718
729
|
<input
|
|
719
730
|
#inputRef
|
|
720
|
-
[
|
|
721
|
-
[field]="f"
|
|
731
|
+
[formField]="f"
|
|
722
732
|
[id]="key()"
|
|
733
|
+
[type]="p?.type ?? 'text'"
|
|
723
734
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
724
735
|
[attr.tabindex]="tabIndex()"
|
|
725
736
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -752,9 +763,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
752
763
|
}
|
|
753
764
|
<input
|
|
754
765
|
#inputRef
|
|
755
|
-
[
|
|
756
|
-
[field]="f"
|
|
766
|
+
[formField]="f"
|
|
757
767
|
[id]="key()"
|
|
768
|
+
[type]="p?.type ?? 'text'"
|
|
758
769
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
759
770
|
[attr.tabindex]="tabIndex()"
|
|
760
771
|
[attr.aria-invalid]="ariaInvalid"
|
|
@@ -787,8 +798,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
787
798
|
'[attr.data-testid]': 'key()',
|
|
788
799
|
'[class]': 'className()',
|
|
789
800
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
790
|
-
}, styles: [":host{--df-
|
|
791
|
-
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }],
|
|
801
|
+
}, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
802
|
+
}], ctorParameters: () => [], 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }] } });
|
|
792
803
|
|
|
793
804
|
var bsInput_component = /*#__PURE__*/Object.freeze({
|
|
794
805
|
__proto__: null,
|
|
@@ -796,6 +807,7 @@ var bsInput_component = /*#__PURE__*/Object.freeze({
|
|
|
796
807
|
});
|
|
797
808
|
|
|
798
809
|
class BsMultiCheckboxFieldComponent {
|
|
810
|
+
elementRef = inject((ElementRef));
|
|
799
811
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
800
812
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
801
813
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -806,6 +818,7 @@ class BsMultiCheckboxFieldComponent {
|
|
|
806
818
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
807
819
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
808
820
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
821
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
809
822
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
810
823
|
showErrors = shouldShowErrors(this.field);
|
|
811
824
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
@@ -814,6 +827,7 @@ class BsMultiCheckboxFieldComponent {
|
|
|
814
827
|
return this.options().filter((option) => currentValues.includes(option.value));
|
|
815
828
|
}, { ...(ngDevMode ? { debugName: "valueViewModel" } : {}), equal: isEqual });
|
|
816
829
|
constructor() {
|
|
830
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input[type="checkbox"]', dependents: [this.options] });
|
|
817
831
|
explicitEffect([this.valueViewModel], ([selectedOptions]) => {
|
|
818
832
|
const selectedValues = selectedOptions.map((option) => option.value);
|
|
819
833
|
if (!isEqual(selectedValues, this.field()().value())) {
|
|
@@ -865,8 +879,8 @@ class BsMultiCheckboxFieldComponent {
|
|
|
865
879
|
});
|
|
866
880
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
867
881
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
868
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
869
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
882
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsMultiCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
883
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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 }, 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: `
|
|
870
884
|
@let f = field();
|
|
871
885
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
872
886
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -910,9 +924,9 @@ class BsMultiCheckboxFieldComponent {
|
|
|
910
924
|
@for (error of errorsToDisplay(); track error.kind; let i = $index) {
|
|
911
925
|
<div class="invalid-feedback d-block" [id]="errorId() + '-' + i" role="alert">{{ error.message }}</div>
|
|
912
926
|
}
|
|
913
|
-
`, isInline: true, styles: [":host{--df-
|
|
927
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\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 });
|
|
914
928
|
}
|
|
915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsMultiCheckboxFieldComponent, decorators: [{
|
|
916
930
|
type: Component,
|
|
917
931
|
args: [{ selector: 'df-bs-multi-checkbox', imports: [DynamicTextPipe, AsyncPipe], template: `
|
|
918
932
|
@let f = field();
|
|
@@ -963,8 +977,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
963
977
|
'[id]': '`${key()}`',
|
|
964
978
|
'[attr.data-testid]': 'key()',
|
|
965
979
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
966
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-
|
|
967
|
-
}], ctorParameters: () => [], 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 }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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 }] }] } });
|
|
980
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}.checkbox-group{margin-bottom:.5rem}:host([hidden]){display:none!important}\n"] }]
|
|
981
|
+
}], ctorParameters: () => [], 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 }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }] } });
|
|
968
982
|
|
|
969
983
|
var bsMultiCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
970
984
|
__proto__: null,
|
|
@@ -972,8 +986,9 @@ var bsMultiCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
|
972
986
|
});
|
|
973
987
|
|
|
974
988
|
class BsRadioGroupComponent {
|
|
975
|
-
|
|
976
|
-
|
|
989
|
+
elementRef = inject((ElementRef));
|
|
990
|
+
// Value model - FormField directive binds form value to this
|
|
991
|
+
value = model(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
977
992
|
// Optional FormValueControl properties - Field directive will bind these
|
|
978
993
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
979
994
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
@@ -982,8 +997,12 @@ class BsRadioGroupComponent {
|
|
|
982
997
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
983
998
|
options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
984
999
|
properties = input(...(ngDevMode ? [undefined, { debugName: "properties" }] : []));
|
|
1000
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
985
1001
|
// Accessibility - this will be provided by parent component through input
|
|
986
1002
|
ariaDescribedBy = input(null, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1003
|
+
constructor() {
|
|
1004
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input[type="radio"]', dependents: [this.options] });
|
|
1005
|
+
}
|
|
987
1006
|
/**
|
|
988
1007
|
* Handle radio button change event
|
|
989
1008
|
*/
|
|
@@ -992,8 +1011,8 @@ class BsRadioGroupComponent {
|
|
|
992
1011
|
this.value.set(newValue);
|
|
993
1012
|
}
|
|
994
1013
|
}
|
|
995
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
996
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1014
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1015
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: BsRadioGroupComponent, isStandalone: true, selector: "df-bs-radio-group", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, 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 }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: `
|
|
997
1016
|
@let props = properties();
|
|
998
1017
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
999
1018
|
@if (props?.buttonGroup) {
|
|
@@ -1043,7 +1062,7 @@ class BsRadioGroupComponent {
|
|
|
1043
1062
|
}
|
|
1044
1063
|
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1045
1064
|
}
|
|
1046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsRadioGroupComponent, decorators: [{
|
|
1047
1066
|
type: Component,
|
|
1048
1067
|
args: [{ selector: 'df-bs-radio-group', imports: [DynamicTextPipe, AsyncPipe], template: `
|
|
1049
1068
|
@let props = properties();
|
|
@@ -1094,9 +1113,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1094
1113
|
}
|
|
1095
1114
|
}
|
|
1096
1115
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}\n"] }]
|
|
1097
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required:
|
|
1116
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], properties: [{ type: i0.Input, args: [{ isSignal: true, alias: "properties", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }] } });
|
|
1098
1117
|
|
|
1099
1118
|
class BsRadioFieldComponent {
|
|
1119
|
+
elementRef = inject((ElementRef));
|
|
1100
1120
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1101
1121
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
1102
1122
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -1105,10 +1125,17 @@ class BsRadioFieldComponent {
|
|
|
1105
1125
|
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : []));
|
|
1106
1126
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
1107
1127
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
1128
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
1108
1129
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
1109
1130
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
1110
1131
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
1111
1132
|
showErrors = shouldShowErrors(this.field);
|
|
1133
|
+
constructor() {
|
|
1134
|
+
setupMetaTracking(this.elementRef, this.meta, {
|
|
1135
|
+
selector: 'input[type="radio"]',
|
|
1136
|
+
dependents: [this.options],
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1112
1139
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
1113
1140
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
1114
1141
|
// Accessibility
|
|
@@ -1133,8 +1160,8 @@ class BsRadioFieldComponent {
|
|
|
1133
1160
|
});
|
|
1134
1161
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1135
1162
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1136
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsRadioFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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 }, meta: { classPropertyName: "meta", publicName: "meta", 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: `
|
|
1138
1165
|
@let f = field();
|
|
1139
1166
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1140
1167
|
|
|
@@ -1144,7 +1171,7 @@ class BsRadioFieldComponent {
|
|
|
1144
1171
|
}
|
|
1145
1172
|
|
|
1146
1173
|
<df-bs-radio-group
|
|
1147
|
-
[
|
|
1174
|
+
[formField]="$any(f)"
|
|
1148
1175
|
[label]="label()"
|
|
1149
1176
|
[options]="options()"
|
|
1150
1177
|
[properties]="props()"
|
|
@@ -1158,11 +1185,11 @@ class BsRadioFieldComponent {
|
|
|
1158
1185
|
<div class="invalid-feedback d-block" [id]="errorId() + '-' + i" role="alert">{{ error.message }}</div>
|
|
1159
1186
|
}
|
|
1160
1187
|
</div>
|
|
1161
|
-
`, isInline: true, styles: [":host{--df-
|
|
1188
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\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", "meta", "ariaDescribedBy"], outputs: ["valueChange"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1162
1189
|
}
|
|
1163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsRadioFieldComponent, decorators: [{
|
|
1164
1191
|
type: Component,
|
|
1165
|
-
args: [{ selector: 'df-bs-radio', imports: [BsRadioGroupComponent,
|
|
1192
|
+
args: [{ selector: 'df-bs-radio', imports: [BsRadioGroupComponent, FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1166
1193
|
@let f = field();
|
|
1167
1194
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1168
1195
|
|
|
@@ -1172,7 +1199,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1172
1199
|
}
|
|
1173
1200
|
|
|
1174
1201
|
<df-bs-radio-group
|
|
1175
|
-
[
|
|
1202
|
+
[formField]="$any(f)"
|
|
1176
1203
|
[label]="label()"
|
|
1177
1204
|
[options]="options()"
|
|
1178
1205
|
[properties]="props()"
|
|
@@ -1191,8 +1218,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1191
1218
|
'[attr.data-testid]': 'key()',
|
|
1192
1219
|
'[class]': 'className()',
|
|
1193
1220
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
1194
|
-
}, styles: [":host{--df-
|
|
1195
|
-
}], 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 }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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 }] }] } });
|
|
1221
|
+
}, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"] }]
|
|
1222
|
+
}], ctorParameters: () => [], 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 }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
|
|
1196
1223
|
|
|
1197
1224
|
var bsRadio_component = /*#__PURE__*/Object.freeze({
|
|
1198
1225
|
__proto__: null,
|
|
@@ -1200,6 +1227,7 @@ var bsRadio_component = /*#__PURE__*/Object.freeze({
|
|
|
1200
1227
|
});
|
|
1201
1228
|
|
|
1202
1229
|
class BsSelectFieldComponent {
|
|
1230
|
+
elementRef = inject((ElementRef));
|
|
1203
1231
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1204
1232
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
1205
1233
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -1210,9 +1238,13 @@ class BsSelectFieldComponent {
|
|
|
1210
1238
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
1211
1239
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
1212
1240
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
1241
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
1213
1242
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
1214
1243
|
showErrors = shouldShowErrors(this.field);
|
|
1215
1244
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
1245
|
+
constructor() {
|
|
1246
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'select' });
|
|
1247
|
+
}
|
|
1216
1248
|
defaultCompare = Object.is;
|
|
1217
1249
|
isSelected(optionValue, fieldValue) {
|
|
1218
1250
|
const compareWith = this.props()?.compareWith || this.defaultCompare;
|
|
@@ -1244,8 +1276,8 @@ class BsSelectFieldComponent {
|
|
|
1244
1276
|
});
|
|
1245
1277
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1246
1278
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1247
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1248
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1280
|
+
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: `
|
|
1249
1281
|
@let f = field();
|
|
1250
1282
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1251
1283
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1255,7 +1287,7 @@ class BsSelectFieldComponent {
|
|
|
1255
1287
|
<label [for]="key()" class="form-label">{{ label | dynamicText | async }}</label>
|
|
1256
1288
|
}
|
|
1257
1289
|
<select
|
|
1258
|
-
[
|
|
1290
|
+
[formField]="f"
|
|
1259
1291
|
[id]="key()"
|
|
1260
1292
|
class="form-select"
|
|
1261
1293
|
[class.form-select-sm]="props()?.size === 'sm'"
|
|
@@ -1284,11 +1316,11 @@ class BsSelectFieldComponent {
|
|
|
1284
1316
|
<div class="invalid-feedback d-block" [id]="errorId() + '-' + i" role="alert">{{ error.message }}</div>
|
|
1285
1317
|
}
|
|
1286
1318
|
</div>
|
|
1287
|
-
`, isInline: true, styles: [":host{--df-
|
|
1319
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1288
1320
|
}
|
|
1289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSelectFieldComponent, decorators: [{
|
|
1290
1322
|
type: Component,
|
|
1291
|
-
args: [{ selector: 'df-bs-select', imports: [
|
|
1323
|
+
args: [{ selector: 'df-bs-select', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1292
1324
|
@let f = field();
|
|
1293
1325
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1294
1326
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1298,7 +1330,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1298
1330
|
<label [for]="key()" class="form-label">{{ label | dynamicText | async }}</label>
|
|
1299
1331
|
}
|
|
1300
1332
|
<select
|
|
1301
|
-
[
|
|
1333
|
+
[formField]="f"
|
|
1302
1334
|
[id]="key()"
|
|
1303
1335
|
class="form-select"
|
|
1304
1336
|
[class.form-select-sm]="props()?.size === 'sm'"
|
|
@@ -1332,8 +1364,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1332
1364
|
'[attr.data-testid]': 'key()',
|
|
1333
1365
|
'[class]': 'className()',
|
|
1334
1366
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
1335
|
-
}, styles: [":host{--df-
|
|
1336
|
-
}], 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 }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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 }] }] } });
|
|
1367
|
+
}, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
1368
|
+
}], ctorParameters: () => [], 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 }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }] } });
|
|
1337
1369
|
|
|
1338
1370
|
var bsSelect_component = /*#__PURE__*/Object.freeze({
|
|
1339
1371
|
__proto__: null,
|
|
@@ -1341,6 +1373,7 @@ var bsSelect_component = /*#__PURE__*/Object.freeze({
|
|
|
1341
1373
|
});
|
|
1342
1374
|
|
|
1343
1375
|
class BsSliderFieldComponent {
|
|
1376
|
+
elementRef = inject((ElementRef));
|
|
1344
1377
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1345
1378
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
1346
1379
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -1353,9 +1386,13 @@ class BsSliderFieldComponent {
|
|
|
1353
1386
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
1354
1387
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
1355
1388
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
1389
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
1356
1390
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
1357
1391
|
showErrors = shouldShowErrors(this.field);
|
|
1358
1392
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
1393
|
+
constructor() {
|
|
1394
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });
|
|
1395
|
+
}
|
|
1359
1396
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
1360
1397
|
// Accessibility
|
|
1361
1398
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -1379,8 +1416,8 @@ class BsSliderFieldComponent {
|
|
|
1379
1416
|
});
|
|
1380
1417
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1381
1418
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1382
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1383
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSliderFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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: `
|
|
1384
1421
|
@let f = field();
|
|
1385
1422
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1386
1423
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1398,7 +1435,7 @@ class BsSliderFieldComponent {
|
|
|
1398
1435
|
<input
|
|
1399
1436
|
type="range"
|
|
1400
1437
|
dfBsInputConstraints
|
|
1401
|
-
[
|
|
1438
|
+
[formField]="f"
|
|
1402
1439
|
[id]="key()"
|
|
1403
1440
|
[dfMin]="props()?.min ?? min()"
|
|
1404
1441
|
[dfMax]="props()?.max ?? max()"
|
|
@@ -1419,11 +1456,11 @@ class BsSliderFieldComponent {
|
|
|
1419
1456
|
<div class="invalid-feedback d-block" [id]="errorId() + '-' + i" role="alert">{{ error.message }}</div>
|
|
1420
1457
|
}
|
|
1421
1458
|
</div>
|
|
1422
|
-
`, isInline: true, styles: [":host{--df-
|
|
1459
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { 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 });
|
|
1423
1460
|
}
|
|
1424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsSliderFieldComponent, decorators: [{
|
|
1425
1462
|
type: Component,
|
|
1426
|
-
args: [{ selector: 'df-bs-slider', imports: [
|
|
1463
|
+
args: [{ selector: 'df-bs-slider', imports: [FormField, DynamicTextPipe, AsyncPipe, InputConstraintsDirective], template: `
|
|
1427
1464
|
@let f = field();
|
|
1428
1465
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1429
1466
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1441,7 +1478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1441
1478
|
<input
|
|
1442
1479
|
type="range"
|
|
1443
1480
|
dfBsInputConstraints
|
|
1444
|
-
[
|
|
1481
|
+
[formField]="f"
|
|
1445
1482
|
[id]="key()"
|
|
1446
1483
|
[dfMin]="props()?.min ?? min()"
|
|
1447
1484
|
[dfMax]="props()?.max ?? max()"
|
|
@@ -1467,8 +1504,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1467
1504
|
'[id]': '`${key()}`',
|
|
1468
1505
|
'[attr.data-testid]': 'key()',
|
|
1469
1506
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
1470
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-
|
|
1471
|
-
}], 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 }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", 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 }] }] } });
|
|
1507
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"] }]
|
|
1508
|
+
}], ctorParameters: () => [], 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 }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }] } });
|
|
1472
1509
|
|
|
1473
1510
|
var bsSlider_component = /*#__PURE__*/Object.freeze({
|
|
1474
1511
|
__proto__: null,
|
|
@@ -1476,6 +1513,7 @@ var bsSlider_component = /*#__PURE__*/Object.freeze({
|
|
|
1476
1513
|
});
|
|
1477
1514
|
|
|
1478
1515
|
class BsTextareaFieldComponent {
|
|
1516
|
+
elementRef = inject((ElementRef));
|
|
1479
1517
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1480
1518
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
1481
1519
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -1485,9 +1523,13 @@ class BsTextareaFieldComponent {
|
|
|
1485
1523
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
1486
1524
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
1487
1525
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
1526
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
1488
1527
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
1489
1528
|
showErrors = shouldShowErrors(this.field);
|
|
1490
1529
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
1530
|
+
constructor() {
|
|
1531
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'textarea' });
|
|
1532
|
+
}
|
|
1491
1533
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
1492
1534
|
// Accessibility
|
|
1493
1535
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -1511,18 +1553,17 @@ class BsTextareaFieldComponent {
|
|
|
1511
1553
|
});
|
|
1512
1554
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1513
1555
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1514
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1515
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1556
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsTextareaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1557
|
+
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: `
|
|
1516
1558
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1517
1559
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1518
1560
|
@if (p?.floatingLabel) {
|
|
1519
1561
|
<!-- Floating label variant -->
|
|
1520
1562
|
<div class="form-floating mb-3">
|
|
1521
1563
|
<textarea
|
|
1522
|
-
[
|
|
1564
|
+
[formField]="f"
|
|
1523
1565
|
[id]="key()"
|
|
1524
1566
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1525
|
-
[rows]="p?.rows || 4"
|
|
1526
1567
|
[attr.tabindex]="tabIndex()"
|
|
1527
1568
|
[attr.aria-invalid]="ariaInvalid"
|
|
1528
1569
|
[attr.aria-required]="ariaRequired"
|
|
@@ -1554,10 +1595,9 @@ class BsTextareaFieldComponent {
|
|
|
1554
1595
|
}
|
|
1555
1596
|
|
|
1556
1597
|
<textarea
|
|
1557
|
-
[
|
|
1598
|
+
[formField]="f"
|
|
1558
1599
|
[id]="key()"
|
|
1559
1600
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1560
|
-
[rows]="p?.rows || 4"
|
|
1561
1601
|
[attr.tabindex]="tabIndex()"
|
|
1562
1602
|
[attr.aria-invalid]="ariaInvalid"
|
|
1563
1603
|
[attr.aria-required]="ariaRequired"
|
|
@@ -1584,21 +1624,20 @@ class BsTextareaFieldComponent {
|
|
|
1584
1624
|
}
|
|
1585
1625
|
</div>
|
|
1586
1626
|
}
|
|
1587
|
-
`, isInline: true, styles: [":host{--df-
|
|
1627
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1588
1628
|
}
|
|
1589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsTextareaFieldComponent, decorators: [{
|
|
1590
1630
|
type: Component,
|
|
1591
|
-
args: [{ selector: 'df-bs-textarea', imports: [
|
|
1631
|
+
args: [{ selector: 'df-bs-textarea', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1592
1632
|
@let f = field(); @let p = props(); @let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1593
1633
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
1594
1634
|
@if (p?.floatingLabel) {
|
|
1595
1635
|
<!-- Floating label variant -->
|
|
1596
1636
|
<div class="form-floating mb-3">
|
|
1597
1637
|
<textarea
|
|
1598
|
-
[
|
|
1638
|
+
[formField]="f"
|
|
1599
1639
|
[id]="key()"
|
|
1600
1640
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1601
|
-
[rows]="p?.rows || 4"
|
|
1602
1641
|
[attr.tabindex]="tabIndex()"
|
|
1603
1642
|
[attr.aria-invalid]="ariaInvalid"
|
|
1604
1643
|
[attr.aria-required]="ariaRequired"
|
|
@@ -1630,10 +1669,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1630
1669
|
}
|
|
1631
1670
|
|
|
1632
1671
|
<textarea
|
|
1633
|
-
[
|
|
1672
|
+
[formField]="f"
|
|
1634
1673
|
[id]="key()"
|
|
1635
1674
|
[placeholder]="(placeholder() | dynamicText | async) ?? ''"
|
|
1636
|
-
[rows]="p?.rows || 4"
|
|
1637
1675
|
[attr.tabindex]="tabIndex()"
|
|
1638
1676
|
[attr.aria-invalid]="ariaInvalid"
|
|
1639
1677
|
[attr.aria-required]="ariaRequired"
|
|
@@ -1665,8 +1703,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1665
1703
|
'[attr.data-testid]': 'key()',
|
|
1666
1704
|
'[class]': 'className()',
|
|
1667
1705
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
1668
|
-
}, styles: [":host{--df-
|
|
1669
|
-
}], 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 }] }] } });
|
|
1706
|
+
}, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
1707
|
+
}], ctorParameters: () => [], 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }] } });
|
|
1670
1708
|
|
|
1671
1709
|
var bsTextarea_component = /*#__PURE__*/Object.freeze({
|
|
1672
1710
|
__proto__: null,
|
|
@@ -1674,6 +1712,7 @@ var bsTextarea_component = /*#__PURE__*/Object.freeze({
|
|
|
1674
1712
|
});
|
|
1675
1713
|
|
|
1676
1714
|
class BsToggleFieldComponent {
|
|
1715
|
+
elementRef = inject((ElementRef));
|
|
1677
1716
|
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
1678
1717
|
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
|
|
1679
1718
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -1683,9 +1722,13 @@ class BsToggleFieldComponent {
|
|
|
1683
1722
|
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : []));
|
|
1684
1723
|
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : []));
|
|
1685
1724
|
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : []));
|
|
1725
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
1686
1726
|
resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
|
|
1687
1727
|
showErrors = shouldShowErrors(this.field);
|
|
1688
1728
|
errorsToDisplay = computed(() => (this.showErrors() ? this.resolvedErrors() : []), ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : []));
|
|
1729
|
+
constructor() {
|
|
1730
|
+
setupMetaTracking(this.elementRef, this.meta, { selector: 'input[type="checkbox"]' });
|
|
1731
|
+
}
|
|
1689
1732
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
1690
1733
|
// Accessibility
|
|
1691
1734
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -1709,8 +1752,8 @@ class BsToggleFieldComponent {
|
|
|
1709
1752
|
});
|
|
1710
1753
|
return ids.length > 0 ? ids.join(' ') : null;
|
|
1711
1754
|
}, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : []));
|
|
1712
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1713
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsToggleFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1756
|
+
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: `
|
|
1714
1757
|
@let f = field();
|
|
1715
1758
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1716
1759
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1725,7 +1768,7 @@ class BsToggleFieldComponent {
|
|
|
1725
1768
|
>
|
|
1726
1769
|
<input
|
|
1727
1770
|
type="checkbox"
|
|
1728
|
-
[
|
|
1771
|
+
[formField]="f"
|
|
1729
1772
|
[id]="key()"
|
|
1730
1773
|
class="form-check-input"
|
|
1731
1774
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
@@ -1733,7 +1776,6 @@ class BsToggleFieldComponent {
|
|
|
1733
1776
|
[attr.aria-invalid]="ariaInvalid"
|
|
1734
1777
|
[attr.aria-required]="ariaRequired"
|
|
1735
1778
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
1736
|
-
[attr.hidden]="f().hidden() || null"
|
|
1737
1779
|
/>
|
|
1738
1780
|
<label [for]="key()" class="form-check-label">
|
|
1739
1781
|
{{ label() | dynamicText | async }}
|
|
@@ -1748,11 +1790,11 @@ class BsToggleFieldComponent {
|
|
|
1748
1790
|
@for (error of errorsToDisplay(); track error.kind; let i = $index) {
|
|
1749
1791
|
<div class="invalid-feedback d-block" [id]="errorId() + '-' + i" role="alert">{{ error.message }}</div>
|
|
1750
1792
|
}
|
|
1751
|
-
`, isInline: true, styles: [":host{--df-
|
|
1793
|
+
`, isInline: true, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.form-switch-sm .form-check-input{width:1.75rem;height:1rem;font-size:.875rem}.form-switch-lg .form-check-input{width:3rem;height:1.75rem;font-size:1.125rem}\n"], dependencies: [{ kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1752
1794
|
}
|
|
1753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: BsToggleFieldComponent, decorators: [{
|
|
1754
1796
|
type: Component,
|
|
1755
|
-
args: [{ selector: 'df-bs-toggle', imports: [
|
|
1797
|
+
args: [{ selector: 'df-bs-toggle', imports: [FormField, DynamicTextPipe, AsyncPipe], template: `
|
|
1756
1798
|
@let f = field();
|
|
1757
1799
|
@let ariaInvalid = this.ariaInvalid(); @let ariaRequired = this.ariaRequired();
|
|
1758
1800
|
@let ariaDescribedBy = this.ariaDescribedBy();
|
|
@@ -1767,7 +1809,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1767
1809
|
>
|
|
1768
1810
|
<input
|
|
1769
1811
|
type="checkbox"
|
|
1770
|
-
[
|
|
1812
|
+
[formField]="f"
|
|
1771
1813
|
[id]="key()"
|
|
1772
1814
|
class="form-check-input"
|
|
1773
1815
|
[class.is-invalid]="f().invalid() && f().touched()"
|
|
@@ -1775,7 +1817,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1775
1817
|
[attr.aria-invalid]="ariaInvalid"
|
|
1776
1818
|
[attr.aria-required]="ariaRequired"
|
|
1777
1819
|
[attr.aria-describedby]="ariaDescribedBy"
|
|
1778
|
-
[attr.hidden]="f().hidden() || null"
|
|
1779
1820
|
/>
|
|
1780
1821
|
<label [for]="key()" class="form-check-label">
|
|
1781
1822
|
{{ label() | dynamicText | async }}
|
|
@@ -1795,8 +1836,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1795
1836
|
'[id]': '`${key()}`',
|
|
1796
1837
|
'[attr.data-testid]': 'key()',
|
|
1797
1838
|
'[attr.hidden]': 'field()().hidden() || null',
|
|
1798
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-
|
|
1799
|
-
}], 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 }] }] } });
|
|
1839
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--df-field-gap: .5rem;--df-label-font-weight: 500;--df-label-color: inherit;--df-hint-color: var(--bs-secondary-color, #6c757d);--df-hint-font-size: .875rem;--df-error-color: var(--bs-danger, #dc3545);--df-error-font-size: .875rem}.df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap);width:100%;margin-bottom:1rem}.df-bs-label{font-weight:var(--df-label-font-weight);color:var(--df-label-color);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color);font-size:var(--df-hint-font-size);margin-top:.25rem}.df-bs-field:has(.df-bs-hint){margin-bottom:.5rem}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.form-switch-sm .form-check-input{width:1.75rem;height:1rem;font-size:.875rem}.form-switch-lg .form-check-input{width:3rem;height:1.75rem;font-size:1.125rem}\n"] }]
|
|
1840
|
+
}], ctorParameters: () => [], 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 }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }] } });
|
|
1800
1841
|
|
|
1801
1842
|
var bsToggle_component = /*#__PURE__*/Object.freeze({
|
|
1802
1843
|
__proto__: null,
|
|
@@ -2087,6 +2128,7 @@ const BOOTSTRAP_FIELD_TYPES = [
|
|
|
2087
2128
|
name: BsField.Input,
|
|
2088
2129
|
loadComponent: () => Promise.resolve().then(function () { return bsInput_component; }),
|
|
2089
2130
|
mapper: valueFieldMapper,
|
|
2131
|
+
propsToMeta: ['type'],
|
|
2090
2132
|
},
|
|
2091
2133
|
{
|
|
2092
2134
|
name: BsField.Select,
|
|
@@ -2138,6 +2180,7 @@ const BOOTSTRAP_FIELD_TYPES = [
|
|
|
2138
2180
|
name: BsField.Textarea,
|
|
2139
2181
|
loadComponent: () => Promise.resolve().then(function () { return bsTextarea_component; }),
|
|
2140
2182
|
mapper: valueFieldMapper,
|
|
2183
|
+
propsToMeta: ['rows'],
|
|
2141
2184
|
},
|
|
2142
2185
|
{
|
|
2143
2186
|
name: BsField.Radio,
|