@ng-forge/dynamic-forms-material 1.3.0-next.1 → 1.3.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs +118 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +112 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +96 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +137 -29
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +316 -62
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +253 -107
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +179 -65
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +168 -27
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +253 -56
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +157 -27
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +206 -51
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +134 -29
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs +64 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +7 -11
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material.mjs +241 -260
- package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +17 -17
- package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +23 -16
- package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +87 -81
- package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +27 -21
- package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +68 -40
- package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +54 -42
- package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +35 -24
- package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +30 -19
- package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +56 -38
- package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +33 -22
- package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +47 -34
- package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +29 -23
- package/types/ng-forge-dynamic-forms-material-shared.d.ts +56 -64
- package/types/ng-forge-dynamic-forms-material.d.ts +211 -238
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs +0 -26
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs.map +0 -1
|
@@ -1,35 +1,65 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { FormField } from
|
|
4
|
-
import { MatFormField, MatLabel,
|
|
5
|
-
import {
|
|
6
|
-
import { MatHint } from
|
|
7
|
-
import * as i1 from
|
|
8
|
-
import {
|
|
9
|
-
import { AsyncPipe } from
|
|
10
|
-
import { MATERIAL_CONFIG } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
3
|
+
import { FormField } from "@angular/forms/signals";
|
|
4
|
+
import { MatError, MatFormField, MatLabel, MatPrefix, MatSuffix } from "@angular/material/form-field";
|
|
5
|
+
import { MatOption, MatSelect } from "@angular/material/select";
|
|
6
|
+
import { MatHint } from "@angular/material/input";
|
|
7
|
+
import * as i1 from "@ng-forge/dynamic-forms/integration";
|
|
8
|
+
import { DfAddonSlot, DynamicTextPipe, NgForgeAddons, NgForgeControl, NgForgeFieldHost, injectNgForgeAddons, injectNgForgeField } from "@ng-forge/dynamic-forms/integration";
|
|
9
|
+
import { AsyncPipe } from "@angular/common";
|
|
10
|
+
import { MATERIAL_CONFIG } from "@ng-forge/dynamic-forms-material/shared";
|
|
11
|
+
var MatSelectFieldComponent = class MatSelectFieldComponent {
|
|
12
|
+
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
13
|
+
ngf = injectNgForgeField();
|
|
14
|
+
ngfa = injectNgForgeAddons();
|
|
15
|
+
options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
16
|
+
fieldInputs = input(...ngDevMode ? [void 0, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []);
|
|
17
|
+
props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
|
|
18
|
+
appearance = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? "outline", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
|
|
19
|
+
subscriptSizing = computed(() => this.props()?.subscriptSizing ?? this.materialConfig?.subscriptSizing ?? "dynamic", ...ngDevMode ? [{ debugName: "subscriptSizing" }] : /* istanbul ignore next */ []);
|
|
20
|
+
floatLabel = computed(() => this.props()?.floatLabel ?? this.materialConfig?.floatLabel ?? "auto", ...ngDevMode ? [{ debugName: "floatLabel" }] : /* istanbul ignore next */ []);
|
|
21
|
+
hideRequiredMarker = computed(() => this.props()?.hideRequiredMarker ?? this.materialConfig?.hideRequiredMarker ?? false, ...ngDevMode ? [{ debugName: "hideRequiredMarker" }] : /* istanbul ignore next */ []);
|
|
22
|
+
defaultCompare = Object.is;
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
24
|
+
minVersion: "12.0.0",
|
|
25
|
+
version: "22.2.5",
|
|
26
|
+
ngImport: i0,
|
|
27
|
+
type: MatSelectFieldComponent,
|
|
28
|
+
deps: [],
|
|
29
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
30
|
+
});
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
32
|
+
minVersion: "17.0.0",
|
|
33
|
+
version: "22.2.5",
|
|
34
|
+
type: MatSelectFieldComponent,
|
|
35
|
+
isStandalone: true,
|
|
36
|
+
selector: "df-mat-select",
|
|
37
|
+
inputs: {
|
|
38
|
+
options: {
|
|
39
|
+
classPropertyName: "options",
|
|
40
|
+
publicName: "options",
|
|
41
|
+
isSignal: true,
|
|
42
|
+
isRequired: false,
|
|
43
|
+
transformFunction: null
|
|
44
|
+
},
|
|
45
|
+
fieldInputs: {
|
|
46
|
+
classPropertyName: "fieldInputs",
|
|
47
|
+
publicName: "fieldInputs",
|
|
48
|
+
isSignal: true,
|
|
49
|
+
isRequired: false,
|
|
50
|
+
transformFunction: null
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
classPropertyName: "props",
|
|
54
|
+
publicName: "props",
|
|
55
|
+
isSignal: true,
|
|
56
|
+
isRequired: false,
|
|
57
|
+
transformFunction: null
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
hostDirectives: [{ directive: i1.NgForgeFieldHost }, { directive: i1.NgForgeAddons }],
|
|
61
|
+
ngImport: i0,
|
|
62
|
+
template: `
|
|
33
63
|
@let selectId = ngf.key() + '-select';
|
|
34
64
|
|
|
35
65
|
<mat-form-field
|
|
@@ -83,25 +113,163 @@ class MatSelectFieldComponent {
|
|
|
83
113
|
<mat-hint [id]="ngf.hintId()">{{ hint | dynamicText | async }}</mat-hint>
|
|
84
114
|
}
|
|
85
115
|
</mat-form-field>
|
|
86
|
-
`,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
`,
|
|
117
|
+
isInline: true,
|
|
118
|
+
styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n", "mat-form-field{width:100%}\n"],
|
|
119
|
+
dependencies: [
|
|
120
|
+
{
|
|
121
|
+
kind: "component",
|
|
122
|
+
type: MatFormField,
|
|
123
|
+
selector: "mat-form-field",
|
|
124
|
+
inputs: [
|
|
125
|
+
"hideRequiredMarker",
|
|
126
|
+
"color",
|
|
127
|
+
"floatLabel",
|
|
128
|
+
"appearance",
|
|
129
|
+
"subscriptSizing",
|
|
130
|
+
"hintLabel"
|
|
131
|
+
],
|
|
132
|
+
exportAs: ["matFormField"]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
kind: "directive",
|
|
136
|
+
type: MatLabel,
|
|
137
|
+
selector: "mat-label"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
kind: "component",
|
|
141
|
+
type: MatSelect,
|
|
142
|
+
selector: "mat-select",
|
|
143
|
+
inputs: [
|
|
144
|
+
"aria-describedby",
|
|
145
|
+
"panelClass",
|
|
146
|
+
"disabled",
|
|
147
|
+
"disableRipple",
|
|
148
|
+
"tabIndex",
|
|
149
|
+
"hideSingleSelectionIndicator",
|
|
150
|
+
"placeholder",
|
|
151
|
+
"required",
|
|
152
|
+
"multiple",
|
|
153
|
+
"disableOptionCentering",
|
|
154
|
+
"compareWith",
|
|
155
|
+
"value",
|
|
156
|
+
"aria-label",
|
|
157
|
+
"aria-labelledby",
|
|
158
|
+
"errorStateMatcher",
|
|
159
|
+
"typeaheadDebounceInterval",
|
|
160
|
+
"sortComparator",
|
|
161
|
+
"id",
|
|
162
|
+
"panelWidth",
|
|
163
|
+
"canSelectNullableOptions"
|
|
164
|
+
],
|
|
165
|
+
outputs: [
|
|
166
|
+
"openedChange",
|
|
167
|
+
"opened",
|
|
168
|
+
"closed",
|
|
169
|
+
"selectionChange",
|
|
170
|
+
"valueChange"
|
|
171
|
+
],
|
|
172
|
+
exportAs: ["matSelect"]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
kind: "component",
|
|
176
|
+
type: MatOption,
|
|
177
|
+
selector: "mat-option",
|
|
178
|
+
inputs: [
|
|
179
|
+
"value",
|
|
180
|
+
"id",
|
|
181
|
+
"disabled"
|
|
182
|
+
],
|
|
183
|
+
outputs: ["onSelectionChange"],
|
|
184
|
+
exportAs: ["matOption"]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
kind: "directive",
|
|
188
|
+
type: MatHint,
|
|
189
|
+
selector: "mat-hint",
|
|
190
|
+
inputs: ["align", "id"]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
kind: "directive",
|
|
194
|
+
type: FormField,
|
|
195
|
+
selector: "[formField]",
|
|
196
|
+
inputs: ["formField"],
|
|
197
|
+
exportAs: ["formField"]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
kind: "directive",
|
|
201
|
+
type: MatError,
|
|
202
|
+
selector: "mat-error, [matError]",
|
|
203
|
+
inputs: ["id"]
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
kind: "directive",
|
|
207
|
+
type: MatPrefix,
|
|
208
|
+
selector: "[matPrefix], [matIconPrefix], [matTextPrefix]",
|
|
209
|
+
inputs: ["matTextPrefix"]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
kind: "directive",
|
|
213
|
+
type: MatSuffix,
|
|
214
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
215
|
+
inputs: ["matTextSuffix"]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
kind: "directive",
|
|
219
|
+
type: NgForgeControl,
|
|
220
|
+
selector: "[ngForgeControl]",
|
|
221
|
+
inputs: ["ngForgeControl"]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
kind: "component",
|
|
225
|
+
type: DfAddonSlot,
|
|
226
|
+
selector: "df-addon-slot",
|
|
227
|
+
inputs: [
|
|
228
|
+
"addon",
|
|
229
|
+
"fieldInputs",
|
|
230
|
+
"hidden"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
kind: "pipe",
|
|
235
|
+
type: DynamicTextPipe,
|
|
236
|
+
name: "dynamicText"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
kind: "pipe",
|
|
240
|
+
type: AsyncPipe,
|
|
241
|
+
name: "async"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
248
|
+
minVersion: "12.0.0",
|
|
249
|
+
version: "22.2.5",
|
|
250
|
+
ngImport: i0,
|
|
251
|
+
type: MatSelectFieldComponent,
|
|
252
|
+
decorators: [{
|
|
253
|
+
type: Component,
|
|
254
|
+
args: [{
|
|
255
|
+
selector: "df-mat-select",
|
|
256
|
+
imports: [
|
|
257
|
+
MatFormField,
|
|
258
|
+
MatLabel,
|
|
259
|
+
MatSelect,
|
|
260
|
+
MatOption,
|
|
261
|
+
MatHint,
|
|
262
|
+
FormField,
|
|
263
|
+
MatError,
|
|
264
|
+
MatPrefix,
|
|
265
|
+
MatSuffix,
|
|
266
|
+
DynamicTextPipe,
|
|
267
|
+
AsyncPipe,
|
|
268
|
+
NgForgeControl,
|
|
269
|
+
DfAddonSlot
|
|
270
|
+
],
|
|
271
|
+
hostDirectives: [NgForgeFieldHost, NgForgeAddons],
|
|
272
|
+
template: `
|
|
105
273
|
@let selectId = ngf.key() + '-select';
|
|
106
274
|
|
|
107
275
|
<mat-form-field
|
|
@@ -155,9 +323,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
155
323
|
<mat-hint [id]="ngf.hintId()">{{ hint | dynamicText | async }}</mat-hint>
|
|
156
324
|
}
|
|
157
325
|
</mat-form-field>
|
|
158
|
-
`,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
326
|
+
`,
|
|
327
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
328
|
+
styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n", "mat-form-field{width:100%}\n"]
|
|
329
|
+
}]
|
|
330
|
+
}],
|
|
331
|
+
propDecorators: {
|
|
332
|
+
options: [{
|
|
333
|
+
type: i0.Input,
|
|
334
|
+
args: [{
|
|
335
|
+
isSignal: true,
|
|
336
|
+
alias: "options",
|
|
337
|
+
required: false
|
|
338
|
+
}]
|
|
339
|
+
}],
|
|
340
|
+
fieldInputs: [{
|
|
341
|
+
type: i0.Input,
|
|
342
|
+
args: [{
|
|
343
|
+
isSignal: true,
|
|
344
|
+
alias: "fieldInputs",
|
|
345
|
+
required: false
|
|
346
|
+
}]
|
|
347
|
+
}],
|
|
348
|
+
props: [{
|
|
349
|
+
type: i0.Input,
|
|
350
|
+
args: [{
|
|
351
|
+
isSignal: true,
|
|
352
|
+
alias: "props",
|
|
353
|
+
required: false
|
|
354
|
+
}]
|
|
355
|
+
}]
|
|
356
|
+
}
|
|
357
|
+
});
|
|
162
358
|
export { MatSelectFieldComponent };
|
|
163
|
-
|
|
359
|
+
|
|
360
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-select.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-select.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-select.mjs","names":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/fields/select/mat-select.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { MatError, MatFormField, MatLabel, MatPrefix, MatSuffix } from '@angular/material/form-field';\nimport { MatOption, MatSelect } from '@angular/material/select';\nimport { MatHint } from '@angular/material/input';\nimport { FieldOption, ValueType } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport {\n DfAddonSlot,\n injectNgForgeAddons,\n injectNgForgeField,\n NgForgeAddons,\n NgForgeControl,\n NgForgeFieldHost,\n WrapperFieldInputs,\n} from '@ng-forge/dynamic-forms/integration';\nimport { MatSelectProps } from './mat-select.type';\nimport { AsyncPipe } from '@angular/common';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material/shared';\n\n@Component({\n selector: 'df-mat-select',\n imports: [\n MatFormField,\n MatLabel,\n MatSelect,\n MatOption,\n MatHint,\n FormField,\n MatError,\n MatPrefix,\n MatSuffix,\n DynamicTextPipe,\n AsyncPipe,\n NgForgeControl,\n DfAddonSlot,\n ],\n hostDirectives: [NgForgeFieldHost, NgForgeAddons],\n template: `\n @let selectId = ngf.key() + '-select';\n\n <mat-form-field\n [appearance]=\"appearance()\"\n [subscriptSizing]=\"subscriptSizing()\"\n [floatLabel]=\"floatLabel()\"\n [hideRequiredMarker]=\"hideRequiredMarker()\"\n >\n @if (ngf.label(); as label) {\n <mat-label>{{ label | dynamicText | async }}</mat-label>\n }\n\n @for (a of ngfa.prefixAddons(); track $index) {\n <df-addon-slot\n matPrefix\n [class.df-mat-addon-text]=\"a.type === 'text'\"\n [addon]=\"a\"\n [fieldInputs]=\"fieldInputs()\"\n [hidden]=\"ngfa.hiddenSignalCache().get(a)\"\n (click)=\"$event.stopPropagation()\"\n />\n }\n <mat-select\n ngForgeControl\n [id]=\"selectId\"\n [formField]=\"ngf.field()\"\n [placeholder]=\"(ngf.placeholder() | dynamicText | async) ?? ''\"\n [multiple]=\"props()?.multiple || false\"\n [compareWith]=\"props()?.compareWith || defaultCompare\"\n >\n @for (option of options(); track option.value) {\n <mat-option [value]=\"option.value\" [disabled]=\"option.disabled || false\">\n {{ option.label | dynamicText | async }}\n </mat-option>\n }\n </mat-select>\n @for (a of ngfa.suffixAddons(); track $index) {\n <df-addon-slot\n matSuffix\n [class.df-mat-addon-text]=\"a.type === 'text'\"\n [addon]=\"a\"\n [fieldInputs]=\"fieldInputs()\"\n [hidden]=\"ngfa.hiddenSignalCache().get(a)\"\n (click)=\"$event.stopPropagation()\"\n />\n }\n\n @if (ngf.errorsToDisplay()[0]; as error) {\n <mat-error [id]=\"ngf.errorId()\">{{ error.message }}</mat-error>\n } @else if (props()?.hint; as hint) {\n <mat-hint [id]=\"ngf.hintId()\">{{ hint | dynamicText | async }}</mat-hint>\n }\n </mat-form-field>\n `,\n styleUrl: '../../styles/_form-field.scss',\n styles: [\n `\n mat-form-field {\n width: 100%;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class MatSelectFieldComponent {\n private materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n\n protected readonly ngf = injectNgForgeField<ValueType>();\n protected readonly ngfa = injectNgForgeAddons();\n\n readonly options = input<FieldOption<ValueType>[]>([]);\n /**\n * Wrapper-style host bag pushed by `DfFieldOutlet`. Declared at the\n * component level so `setInputIfDeclared` (which uses\n * `reflectComponentType`) can write it.\n */\n readonly fieldInputs = input<WrapperFieldInputs | undefined>();\n readonly props = input<MatSelectProps>();\n\n readonly appearance = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n\n readonly subscriptSizing = computed(() => this.props()?.subscriptSizing ?? this.materialConfig?.subscriptSizing ?? 'dynamic');\n\n readonly floatLabel = computed(() => this.props()?.floatLabel ?? this.materialConfig?.floatLabel ?? 'auto');\n\n readonly hideRequiredMarker = computed(() => this.props()?.hideRequiredMarker ?? this.materialConfig?.hideRequiredMarker ?? false);\n\n defaultCompare = Object.is;\n}\n"],"mappings":";;;;;;;;;;AAuGA,IAAqB,0BAArB,MAAqB,wBAAuB;CAClC,iBAAiB,OAAO,iBAAiB,EAAE,UAAU,KAAI,CAAE;CAEhD,MAAM,mBAAkB;CACxB,OAAO,oBAAmB;CAE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MAAA;IAAA,MACT;IAAS,UAAA;IAAA,QAAA,CAAA,eAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAGT;IAAc,UAAA;IAAA,QAAA,CAAA,gBAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MACd;IAAW,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAHX;IAAe,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MACf;IAAS,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAsEQ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAnF3C,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,SAChB;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GAAA,gBACe,CAAC,kBAAkB,aAAa;GAAC,UACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDT,iBASgB,wBAAwB;GAAM,QAAA,CAAA,s4CAAA,8BAAA;EAAA,CAAA"}
|
|
@@ -1,20 +1,48 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { FormField } from
|
|
4
|
-
import { MatSlider, MatSliderThumb } from
|
|
5
|
-
import * as i1 from
|
|
6
|
-
import {
|
|
7
|
-
import { MatError } from
|
|
8
|
-
import { AsyncPipe } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
3
|
+
import { FormField } from "@angular/forms/signals";
|
|
4
|
+
import { MatSlider, MatSliderThumb } from "@angular/material/slider";
|
|
5
|
+
import * as i1 from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
import { DynamicTextPipe, NgForgeControl, NgForgeFieldHost, injectNgForgeField } from "@ng-forge/dynamic-forms/integration";
|
|
7
|
+
import { MatError } from "@angular/material/input";
|
|
8
|
+
import { AsyncPipe } from "@angular/common";
|
|
9
|
+
var MatSliderFieldComponent = class MatSliderFieldComponent {
|
|
10
|
+
ngf = injectNgForgeField();
|
|
11
|
+
step = input(...ngDevMode ? [void 0, { debugName: "step" }] : /* istanbul ignore next */ []);
|
|
12
|
+
props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
14
|
+
minVersion: "12.0.0",
|
|
15
|
+
version: "22.2.5",
|
|
16
|
+
ngImport: i0,
|
|
17
|
+
type: MatSliderFieldComponent,
|
|
18
|
+
deps: [],
|
|
19
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
20
|
+
});
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
22
|
+
minVersion: "17.0.0",
|
|
23
|
+
version: "22.2.5",
|
|
24
|
+
type: MatSliderFieldComponent,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "df-mat-slider",
|
|
27
|
+
inputs: {
|
|
28
|
+
step: {
|
|
29
|
+
classPropertyName: "step",
|
|
30
|
+
publicName: "step",
|
|
31
|
+
isSignal: true,
|
|
32
|
+
isRequired: false,
|
|
33
|
+
transformFunction: null
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
classPropertyName: "props",
|
|
37
|
+
publicName: "props",
|
|
38
|
+
isSignal: true,
|
|
39
|
+
isRequired: false,
|
|
40
|
+
transformFunction: null
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
hostDirectives: [{ directive: i1.NgForgeFieldHost }],
|
|
44
|
+
ngImport: i0,
|
|
45
|
+
template: `
|
|
18
46
|
@let f = ngf.field();
|
|
19
47
|
@let inputId = ngf.key() + '-input';
|
|
20
48
|
|
|
@@ -39,11 +67,92 @@ class MatSliderFieldComponent {
|
|
|
39
67
|
} @else if (props()?.hint; as hint) {
|
|
40
68
|
<div class="mat-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</div>
|
|
41
69
|
}
|
|
42
|
-
`,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
70
|
+
`,
|
|
71
|
+
isInline: true,
|
|
72
|
+
styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n", ".slider-container{width:100%}\n"],
|
|
73
|
+
dependencies: [
|
|
74
|
+
{
|
|
75
|
+
kind: "component",
|
|
76
|
+
type: MatSlider,
|
|
77
|
+
selector: "mat-slider",
|
|
78
|
+
inputs: [
|
|
79
|
+
"disabled",
|
|
80
|
+
"discrete",
|
|
81
|
+
"showTickMarks",
|
|
82
|
+
"min",
|
|
83
|
+
"color",
|
|
84
|
+
"disableRipple",
|
|
85
|
+
"max",
|
|
86
|
+
"step",
|
|
87
|
+
"displayWith"
|
|
88
|
+
],
|
|
89
|
+
exportAs: ["matSlider"]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
kind: "directive",
|
|
93
|
+
type: MatSliderThumb,
|
|
94
|
+
selector: "input[matSliderThumb]",
|
|
95
|
+
inputs: ["value"],
|
|
96
|
+
outputs: [
|
|
97
|
+
"valueChange",
|
|
98
|
+
"dragStart",
|
|
99
|
+
"dragEnd"
|
|
100
|
+
],
|
|
101
|
+
exportAs: ["matSliderThumb"]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
kind: "directive",
|
|
105
|
+
type: MatError,
|
|
106
|
+
selector: "mat-error, [matError]",
|
|
107
|
+
inputs: ["id"]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
kind: "directive",
|
|
111
|
+
type: FormField,
|
|
112
|
+
selector: "[formField]",
|
|
113
|
+
inputs: ["formField"],
|
|
114
|
+
exportAs: ["formField"]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
kind: "directive",
|
|
118
|
+
type: NgForgeControl,
|
|
119
|
+
selector: "[ngForgeControl]",
|
|
120
|
+
inputs: ["ngForgeControl"]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
kind: "pipe",
|
|
124
|
+
type: DynamicTextPipe,
|
|
125
|
+
name: "dynamicText"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
kind: "pipe",
|
|
129
|
+
type: AsyncPipe,
|
|
130
|
+
name: "async"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
137
|
+
minVersion: "12.0.0",
|
|
138
|
+
version: "22.2.5",
|
|
139
|
+
ngImport: i0,
|
|
140
|
+
type: MatSliderFieldComponent,
|
|
141
|
+
decorators: [{
|
|
142
|
+
type: Component,
|
|
143
|
+
args: [{
|
|
144
|
+
selector: "df-mat-slider",
|
|
145
|
+
imports: [
|
|
146
|
+
MatSlider,
|
|
147
|
+
MatSliderThumb,
|
|
148
|
+
MatError,
|
|
149
|
+
DynamicTextPipe,
|
|
150
|
+
AsyncPipe,
|
|
151
|
+
FormField,
|
|
152
|
+
NgForgeControl
|
|
153
|
+
],
|
|
154
|
+
hostDirectives: [NgForgeFieldHost],
|
|
155
|
+
template: `
|
|
47
156
|
@let f = ngf.field();
|
|
48
157
|
@let inputId = ngf.key() + '-input';
|
|
49
158
|
|
|
@@ -68,9 +177,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
68
177
|
} @else if (props()?.hint; as hint) {
|
|
69
178
|
<div class="mat-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</div>
|
|
70
179
|
}
|
|
71
|
-
`,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
180
|
+
`,
|
|
181
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
182
|
+
styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n", ".slider-container{width:100%}\n"]
|
|
183
|
+
}]
|
|
184
|
+
}],
|
|
185
|
+
propDecorators: {
|
|
186
|
+
step: [{
|
|
187
|
+
type: i0.Input,
|
|
188
|
+
args: [{
|
|
189
|
+
isSignal: true,
|
|
190
|
+
alias: "step",
|
|
191
|
+
required: false
|
|
192
|
+
}]
|
|
193
|
+
}],
|
|
194
|
+
props: [{
|
|
195
|
+
type: i0.Input,
|
|
196
|
+
args: [{
|
|
197
|
+
isSignal: true,
|
|
198
|
+
alias: "props",
|
|
199
|
+
required: false
|
|
200
|
+
}]
|
|
201
|
+
}]
|
|
202
|
+
}
|
|
203
|
+
});
|
|
75
204
|
export { MatSliderFieldComponent };
|
|
76
|
-
|
|
205
|
+
|
|
206
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-slider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-slider.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-slider.mjs","names":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/fields/slider/mat-slider.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { MatSlider, MatSliderThumb } from '@angular/material/slider';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { NgForgeControl, injectNgForgeField, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';\nimport { MatSliderProps } from './mat-slider.type';\nimport { MatError } from '@angular/material/input';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'df-mat-slider',\n imports: [MatSlider, MatSliderThumb, MatError, DynamicTextPipe, AsyncPipe, FormField, NgForgeControl],\n hostDirectives: [NgForgeFieldHost],\n template: `\n @let f = ngf.field();\n @let inputId = ngf.key() + '-input';\n\n @if (ngf.label(); as label) {\n <label class=\"slider-label\" [for]=\"inputId\">{{ label | dynamicText | async }}</label>\n }\n\n <mat-slider\n [min]=\"f().min?.() ?? 0\"\n [max]=\"f().max?.() ?? 100\"\n [step]=\"step() ?? props()?.step ?? 1\"\n [discrete]=\"props()?.thumbLabel || props()?.showThumbLabel\"\n [showTickMarks]=\"props()?.tickInterval !== undefined\"\n [color]=\"props()?.color || 'primary'\"\n class=\"slider-container\"\n >\n <input matSliderThumb ngForgeControl [id]=\"inputId\" [formField]=\"f\" [attr.tabindex]=\"ngf.tabIndex()\" />\n </mat-slider>\n\n @if (ngf.errorsToDisplay()[0]; as error) {\n <mat-error [id]=\"ngf.errorId()\">{{ error.message }}</mat-error>\n } @else if (props()?.hint; as hint) {\n <div class=\"mat-hint\" [id]=\"ngf.hintId()\">{{ hint | dynamicText | async }}</div>\n }\n `,\n styleUrl: '../../styles/_form-field.scss',\n styles: [\n `\n .slider-container {\n width: 100%;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class MatSliderFieldComponent {\n protected readonly ngf = injectNgForgeField<number>();\n\n readonly step = input<number>();\n\n readonly props = input<MatSliderProps>();\n}\n"],"mappings":";;;;;;;;AAiDA,IAAqB,0BAArB,MAAqB,wBAAuB;CACv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