@ng-forge/dynamic-forms-bootstrap 1.3.0-next.2 → 1.3.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs +56 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs +64 -37
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs +92 -34
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs +94 -49
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs +97 -23
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs +169 -40
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs +180 -88
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs +143 -66
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs +326 -61
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs +123 -33
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs +161 -30
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs +97 -23
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs +97 -23
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs +100 -41
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs +238 -251
- package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.d.ts +18 -18
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.d.ts +24 -17
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-button.d.ts +94 -88
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.d.ts +24 -18
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.d.ts +49 -28
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-input.d.ts +51 -37
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.d.ts +34 -23
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-radio.d.ts +30 -19
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-select.d.ts +36 -24
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-slider.d.ts +56 -35
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-textarea.d.ts +24 -18
- package/types/ng-forge-dynamic-forms-bootstrap-lazy-toggle.d.ts +23 -17
- package/types/ng-forge-dynamic-forms-bootstrap-shared.d.ts +78 -71
- package/types/ng-forge-dynamic-forms-bootstrap.d.ts +225 -250
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs +0 -25
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs.map +0 -1
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { FormField } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import {
|
|
6
|
-
import { AsyncPipe } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
3
|
+
import { FormField } from "@angular/forms/signals";
|
|
4
|
+
import * as i1 from "@ng-forge/dynamic-forms/integration";
|
|
5
|
+
import { DynamicTextPipe, NgForgeControl, NgForgeFieldHost, injectNgForgeField } from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
import { AsyncPipe } from "@angular/common";
|
|
7
|
+
var BsCheckboxFieldComponent = class BsCheckboxFieldComponent {
|
|
8
|
+
ngf = injectNgForgeField();
|
|
9
|
+
props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
|
+
minVersion: "12.0.0",
|
|
12
|
+
version: "22.2.5",
|
|
13
|
+
ngImport: i0,
|
|
14
|
+
type: BsCheckboxFieldComponent,
|
|
15
|
+
deps: [],
|
|
16
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
17
|
+
});
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
19
|
+
minVersion: "17.0.0",
|
|
20
|
+
version: "22.2.5",
|
|
21
|
+
type: BsCheckboxFieldComponent,
|
|
22
|
+
isStandalone: true,
|
|
23
|
+
selector: "df-bs-checkbox",
|
|
24
|
+
inputs: { props: {
|
|
25
|
+
classPropertyName: "props",
|
|
26
|
+
publicName: "props",
|
|
27
|
+
isSignal: true,
|
|
28
|
+
isRequired: false,
|
|
29
|
+
transformFunction: null
|
|
30
|
+
} },
|
|
31
|
+
hostDirectives: [{ directive: i1.NgForgeFieldHost }],
|
|
32
|
+
ngImport: i0,
|
|
33
|
+
template: `
|
|
14
34
|
@let f = ngf.field(); @let checkboxId = ngf.key() + '-checkbox';
|
|
15
35
|
|
|
16
36
|
<div
|
|
@@ -40,11 +60,54 @@ class BsCheckboxFieldComponent {
|
|
|
40
60
|
} @else if (props()?.hint; as hint) {
|
|
41
61
|
<div class="form-text" [id]="ngf.hintId()" [attr.hidden]="f().hidden() || null">{{ hint | dynamicText | async }}</div>
|
|
42
62
|
}
|
|
43
|
-
`,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
`,
|
|
64
|
+
isInline: true,
|
|
65
|
+
styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"],
|
|
66
|
+
dependencies: [
|
|
67
|
+
{
|
|
68
|
+
kind: "directive",
|
|
69
|
+
type: FormField,
|
|
70
|
+
selector: "[formField]",
|
|
71
|
+
inputs: ["formField"],
|
|
72
|
+
exportAs: ["formField"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "directive",
|
|
76
|
+
type: NgForgeControl,
|
|
77
|
+
selector: "[ngForgeControl]",
|
|
78
|
+
inputs: ["ngForgeControl"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
kind: "pipe",
|
|
82
|
+
type: DynamicTextPipe,
|
|
83
|
+
name: "dynamicText"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
kind: "pipe",
|
|
87
|
+
type: AsyncPipe,
|
|
88
|
+
name: "async"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
95
|
+
minVersion: "12.0.0",
|
|
96
|
+
version: "22.2.5",
|
|
97
|
+
ngImport: i0,
|
|
98
|
+
type: BsCheckboxFieldComponent,
|
|
99
|
+
decorators: [{
|
|
100
|
+
type: Component,
|
|
101
|
+
args: [{
|
|
102
|
+
selector: "df-bs-checkbox",
|
|
103
|
+
imports: [
|
|
104
|
+
FormField,
|
|
105
|
+
DynamicTextPipe,
|
|
106
|
+
AsyncPipe,
|
|
107
|
+
NgForgeControl
|
|
108
|
+
],
|
|
109
|
+
hostDirectives: [NgForgeFieldHost],
|
|
110
|
+
template: `
|
|
48
111
|
@let f = ngf.field(); @let checkboxId = ngf.key() + '-checkbox';
|
|
49
112
|
|
|
50
113
|
<div
|
|
@@ -74,9 +137,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
74
137
|
} @else if (props()?.hint; as hint) {
|
|
75
138
|
<div class="form-text" [id]="ngf.hintId()" [attr.hidden]="f().hidden() || null">{{ hint | dynamicText | async }}</div>
|
|
76
139
|
}
|
|
77
|
-
`,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
140
|
+
`,
|
|
141
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
142
|
+
styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"]
|
|
143
|
+
}]
|
|
144
|
+
}],
|
|
145
|
+
propDecorators: { props: [{
|
|
146
|
+
type: i0.Input,
|
|
147
|
+
args: [{
|
|
148
|
+
isSignal: true,
|
|
149
|
+
alias: "props",
|
|
150
|
+
required: false
|
|
151
|
+
}]
|
|
152
|
+
}] }
|
|
153
|
+
});
|
|
81
154
|
export { BsCheckboxFieldComponent };
|
|
82
|
-
|
|
155
|
+
|
|
156
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/fields/checkbox/bs-checkbox.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { NgForgeControl, injectNgForgeField, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';\nimport { BsCheckboxProps } from './bs-checkbox.type';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'df-bs-checkbox',\n imports: [FormField, DynamicTextPipe, AsyncPipe, NgForgeControl],\n styleUrl: '../../styles/_form-field.scss',\n hostDirectives: [NgForgeFieldHost],\n template: `\n @let f = ngf.field(); @let checkboxId = ngf.key() + '-checkbox';\n\n <div\n class=\"form-check\"\n [class.form-switch]=\"props()?.switch\"\n [class.form-check-inline]=\"props()?.inline\"\n [class.form-check-reverse]=\"props()?.reverse\"\n [attr.hidden]=\"f().hidden() || null\"\n >\n <input\n ngForgeControl\n type=\"checkbox\"\n [formField]=\"f\"\n [id]=\"checkboxId\"\n [indeterminate]=\"props()?.indeterminate ?? false\"\n class=\"form-check-input\"\n [class.is-invalid]=\"f().invalid() && f().touched()\"\n [attr.tabindex]=\"ngf.tabIndex()\"\n />\n <label [for]=\"checkboxId\" class=\"form-check-label\">\n {{ ngf.label() | dynamicText | async }}\n </label>\n </div>\n\n @if (ngf.errorsToDisplay()[0]; as error) {\n <div class=\"invalid-feedback d-block\" [id]=\"ngf.errorId()\" role=\"alert\">{{ error.message }}</div>\n } @else if (props()?.hint; as hint) {\n <div class=\"form-text\" [id]=\"ngf.hintId()\" [attr.hidden]=\"f().hidden() || null\">{{ hint | dynamicText | async }}</div>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class BsCheckboxFieldComponent {\n protected readonly ngf = injectNgForgeField<boolean>();\n\n readonly props = input<BsCheckboxProps>();\n}\n"],"mappings":";;;;;;AAwDA,IAAqB,2BAArB,MAAqB,yBAAwB;CACxB,MAAM,mBAAkB;CAElC,QAAQ,MAAwB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAHtB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,OAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,iBAAA,CAAA;EAAA,UAAA;EAAA,UA5CjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BT,UAAA;EAAA,QAAA,CAAA,gjBAAA,+DAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAjCS;IAAS,UAAA;IAAA,QAAA,CAAA,WAAA;IAAA,UAAA,CAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAA8B;IAAc,UAAA;IAAA,QAAA,CAAA,gBAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAA1C;IAAe,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA+C5B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EAjD5C,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,SACjB;IAAC;IAAW;IAAiB;IAAW;GAAc;GAAC,gBAEhD,CAAC,gBAAgB;GAAC,UACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BT,iBAYgB,wBAAwB;GAAM,QAAA,CAAA,gjBAAA,+DAAA;EAAA,CAAA"}
|
|
@@ -1,33 +1,71 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { FormField } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import {
|
|
6
|
-
import { AsyncPipe } from
|
|
7
|
-
import { InputConstraintsDirective } from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
3
|
+
import { FormField } from "@angular/forms/signals";
|
|
4
|
+
import * as i1 from "@ng-forge/dynamic-forms/integration";
|
|
5
|
+
import { DynamicTextPipe, NgForgeControl, NgForgeFieldHost, injectNgForgeField } from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
import { AsyncPipe } from "@angular/common";
|
|
7
|
+
import { InputConstraintsDirective } from "@ng-forge/dynamic-forms-bootstrap/shared";
|
|
8
|
+
var BsDatepickerFieldComponent = class BsDatepickerFieldComponent {
|
|
9
|
+
ngf = injectNgForgeField();
|
|
10
|
+
minDate = input(null, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
|
|
11
|
+
maxDate = input(null, ...ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []);
|
|
12
|
+
startAt = input(null, ...ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []);
|
|
13
|
+
props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
|
|
14
|
+
minAsString = computed(() => {
|
|
15
|
+
const min = this.minDate();
|
|
16
|
+
return min instanceof Date ? min.toISOString().split("T")[0] : min;
|
|
17
|
+
}, ...ngDevMode ? [{ debugName: "minAsString" }] : /* istanbul ignore next */ []);
|
|
18
|
+
maxAsString = computed(() => {
|
|
19
|
+
const max = this.maxDate();
|
|
20
|
+
return max instanceof Date ? max.toISOString().split("T")[0] : max;
|
|
21
|
+
}, ...ngDevMode ? [{ debugName: "maxAsString" }] : /* istanbul ignore next */ []);
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.5",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: BsDatepickerFieldComponent,
|
|
27
|
+
deps: [],
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
29
|
+
});
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
|
+
minVersion: "17.0.0",
|
|
32
|
+
version: "22.2.5",
|
|
33
|
+
type: BsDatepickerFieldComponent,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "df-bs-datepicker",
|
|
36
|
+
inputs: {
|
|
37
|
+
minDate: {
|
|
38
|
+
classPropertyName: "minDate",
|
|
39
|
+
publicName: "minDate",
|
|
40
|
+
isSignal: true,
|
|
41
|
+
isRequired: false,
|
|
42
|
+
transformFunction: null
|
|
43
|
+
},
|
|
44
|
+
maxDate: {
|
|
45
|
+
classPropertyName: "maxDate",
|
|
46
|
+
publicName: "maxDate",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: false,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
},
|
|
51
|
+
startAt: {
|
|
52
|
+
classPropertyName: "startAt",
|
|
53
|
+
publicName: "startAt",
|
|
54
|
+
isSignal: true,
|
|
55
|
+
isRequired: false,
|
|
56
|
+
transformFunction: null
|
|
57
|
+
},
|
|
58
|
+
props: {
|
|
59
|
+
classPropertyName: "props",
|
|
60
|
+
publicName: "props",
|
|
61
|
+
isSignal: true,
|
|
62
|
+
isRequired: false,
|
|
63
|
+
transformFunction: null
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
hostDirectives: [{ directive: i1.NgForgeFieldHost }],
|
|
67
|
+
ngImport: i0,
|
|
68
|
+
template: `
|
|
31
69
|
@let f = ngf.field(); @let p = props(); @let inputId = ngf.key() + '-input';
|
|
32
70
|
@if (p?.floatingLabel) {
|
|
33
71
|
<!-- Floating label variant -->
|
|
@@ -96,11 +134,65 @@ class BsDatepickerFieldComponent {
|
|
|
96
134
|
}
|
|
97
135
|
</div>
|
|
98
136
|
}
|
|
99
|
-
`,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
137
|
+
`,
|
|
138
|
+
isInline: true,
|
|
139
|
+
styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"],
|
|
140
|
+
dependencies: [
|
|
141
|
+
{
|
|
142
|
+
kind: "directive",
|
|
143
|
+
type: FormField,
|
|
144
|
+
selector: "[formField]",
|
|
145
|
+
inputs: ["formField"],
|
|
146
|
+
exportAs: ["formField"]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
kind: "directive",
|
|
150
|
+
type: InputConstraintsDirective,
|
|
151
|
+
selector: "[dfBsInputConstraints]",
|
|
152
|
+
inputs: [
|
|
153
|
+
"dfMin",
|
|
154
|
+
"dfMax",
|
|
155
|
+
"dfStep"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
kind: "directive",
|
|
160
|
+
type: NgForgeControl,
|
|
161
|
+
selector: "[ngForgeControl]",
|
|
162
|
+
inputs: ["ngForgeControl"]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
kind: "pipe",
|
|
166
|
+
type: DynamicTextPipe,
|
|
167
|
+
name: "dynamicText"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
kind: "pipe",
|
|
171
|
+
type: AsyncPipe,
|
|
172
|
+
name: "async"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
179
|
+
minVersion: "12.0.0",
|
|
180
|
+
version: "22.2.5",
|
|
181
|
+
ngImport: i0,
|
|
182
|
+
type: BsDatepickerFieldComponent,
|
|
183
|
+
decorators: [{
|
|
184
|
+
type: Component,
|
|
185
|
+
args: [{
|
|
186
|
+
selector: "df-bs-datepicker",
|
|
187
|
+
imports: [
|
|
188
|
+
FormField,
|
|
189
|
+
DynamicTextPipe,
|
|
190
|
+
AsyncPipe,
|
|
191
|
+
InputConstraintsDirective,
|
|
192
|
+
NgForgeControl
|
|
193
|
+
],
|
|
194
|
+
hostDirectives: [NgForgeFieldHost],
|
|
195
|
+
template: `
|
|
104
196
|
@let f = ngf.field(); @let p = props(); @let inputId = ngf.key() + '-input';
|
|
105
197
|
@if (p?.floatingLabel) {
|
|
106
198
|
<!-- Floating label variant -->
|
|
@@ -169,9 +261,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
169
261
|
}
|
|
170
262
|
</div>
|
|
171
263
|
}
|
|
172
|
-
`,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
264
|
+
`,
|
|
265
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
266
|
+
styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"]
|
|
267
|
+
}]
|
|
268
|
+
}],
|
|
269
|
+
propDecorators: {
|
|
270
|
+
minDate: [{
|
|
271
|
+
type: i0.Input,
|
|
272
|
+
args: [{
|
|
273
|
+
isSignal: true,
|
|
274
|
+
alias: "minDate",
|
|
275
|
+
required: false
|
|
276
|
+
}]
|
|
277
|
+
}],
|
|
278
|
+
maxDate: [{
|
|
279
|
+
type: i0.Input,
|
|
280
|
+
args: [{
|
|
281
|
+
isSignal: true,
|
|
282
|
+
alias: "maxDate",
|
|
283
|
+
required: false
|
|
284
|
+
}]
|
|
285
|
+
}],
|
|
286
|
+
startAt: [{
|
|
287
|
+
type: i0.Input,
|
|
288
|
+
args: [{
|
|
289
|
+
isSignal: true,
|
|
290
|
+
alias: "startAt",
|
|
291
|
+
required: false
|
|
292
|
+
}]
|
|
293
|
+
}],
|
|
294
|
+
props: [{
|
|
295
|
+
type: i0.Input,
|
|
296
|
+
args: [{
|
|
297
|
+
isSignal: true,
|
|
298
|
+
alias: "props",
|
|
299
|
+
required: false
|
|
300
|
+
}]
|
|
301
|
+
}]
|
|
302
|
+
}
|
|
303
|
+
});
|
|
176
304
|
export { BsDatepickerFieldComponent };
|
|
177
|
-
|
|
305
|
+
|
|
306
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/fields/datepicker/bs-datepicker.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { NgForgeControl, injectNgForgeField, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';\nimport { BsDatepickerProps } from './bs-datepicker.type';\nimport { AsyncPipe } from '@angular/common';\nimport { InputConstraintsDirective } from '@ng-forge/dynamic-forms-bootstrap/shared';\n\n@Component({\n selector: 'df-bs-datepicker',\n imports: [FormField, DynamicTextPipe, AsyncPipe, InputConstraintsDirective, NgForgeControl],\n styleUrl: '../../styles/_form-field.scss',\n hostDirectives: [NgForgeFieldHost],\n template: `\n @let f = ngf.field(); @let p = props(); @let inputId = ngf.key() + '-input';\n @if (p?.floatingLabel) {\n <!-- Floating label variant -->\n <div class=\"form-floating mb-3\">\n <input\n ngForgeControl\n dfBsInputConstraints\n [formField]=\"f\"\n [id]=\"inputId\"\n type=\"date\"\n [placeholder]=\"(ngf.placeholder() | dynamicText | async) ?? ''\"\n [dfMin]=\"minAsString()\"\n [dfMax]=\"maxAsString()\"\n [attr.tabindex]=\"ngf.tabIndex()\"\n class=\"form-control\"\n [class.form-control-sm]=\"p?.size === 'sm'\"\n [class.form-control-lg]=\"p?.size === 'lg'\"\n [class.is-invalid]=\"f().invalid() && f().touched()\"\n [class.is-valid]=\"f().valid() && f().touched() && p?.validFeedback\"\n />\n @if (ngf.label()) {\n <label [for]=\"inputId\">{{ ngf.label() | dynamicText | async }}</label>\n }\n @if (p?.validFeedback && f().valid() && f().touched()) {\n <div class=\"valid-feedback d-block\">\n {{ p?.validFeedback | dynamicText | async }}\n </div>\n }\n @if (ngf.errorsToDisplay()[0]; as error) {\n <div class=\"invalid-feedback d-block\" [id]=\"ngf.errorId()\" role=\"alert\">{{ error.message }}</div>\n }\n </div>\n } @else {\n <!-- Standard variant -->\n <div class=\"mb-3\">\n @if (ngf.label()) {\n <label [for]=\"inputId\" class=\"form-label\">{{ ngf.label() | dynamicText | async }}</label>\n }\n\n <input\n ngForgeControl\n dfBsInputConstraints\n [formField]=\"f\"\n [id]=\"inputId\"\n type=\"date\"\n [placeholder]=\"(ngf.placeholder() | dynamicText | async) ?? ''\"\n [dfMin]=\"minAsString()\"\n [dfMax]=\"maxAsString()\"\n [attr.tabindex]=\"ngf.tabIndex()\"\n class=\"form-control\"\n [class.form-control-sm]=\"p?.size === 'sm'\"\n [class.form-control-lg]=\"p?.size === 'lg'\"\n [class.is-invalid]=\"f().invalid() && f().touched()\"\n [class.is-valid]=\"f().valid() && f().touched() && p?.validFeedback\"\n />\n\n @if (p?.validFeedback && f().valid() && f().touched()) {\n <div class=\"valid-feedback d-block\">\n {{ p?.validFeedback | dynamicText | async }}\n </div>\n }\n @if (ngf.errorsToDisplay()[0]; as error) {\n <div class=\"invalid-feedback d-block\" [id]=\"ngf.errorId()\" role=\"alert\">{{ error.message }}</div>\n } @else if (p?.hint) {\n <div class=\"form-text\" [id]=\"ngf.hintId()\">{{ p?.hint | dynamicText | async }}</div>\n }\n </div>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n :host([hidden]) {\n display: none !important;\n }\n `,\n ],\n})\nexport default class BsDatepickerFieldComponent {\n protected readonly ngf = injectNgForgeField<string>();\n\n readonly minDate = input<Date | string | null>(null);\n readonly maxDate = input<Date | string | null>(null);\n readonly startAt = input<Date | null>(null);\n readonly props = input<BsDatepickerProps>();\n\n // Helper methods to convert Date to string for HTML attributes\n readonly minAsString = computed(() => {\n const min = this.minDate();\n return min instanceof Date ? min.toISOString().split('T')[0] : min;\n });\n\n readonly maxAsString = computed(() => {\n const max = this.maxDate();\n return max instanceof Date ? max.toISOString().split('T')[0] : max;\n });\n}\n"],"mappings":";;;;;;;AA4FA,IAAqB,6BAArB,MAAqB,2BAA0B;CAC1B,MAAM,mBAAkB;CAElC,UAAU,MAA4B,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC3C,UAAU,MAA4B,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC3C,UAAU,MAAmB,MAAK,GAAA,YAAA,CAAA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