@ngx-formly/material 10.0.1 → 11.1.0-rc.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.
- package/README.md +107 -177
- package/fesm2022/ngx-formly-material-checkbox.mjs +234 -127
- package/fesm2022/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-datepicker.mjs +264 -118
- package/fesm2022/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-form-field.mjs +440 -226
- package/fesm2022/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-input.mjs +199 -89
- package/fesm2022/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-multicheckbox.mjs +203 -106
- package/fesm2022/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-native-select.mjs +204 -73
- package/fesm2022/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-radio.mjs +247 -104
- package/fesm2022/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-select.mjs +318 -133
- package/fesm2022/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-slider.mjs +195 -85
- package/fesm2022/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-textarea.mjs +203 -86
- package/fesm2022/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-material-toggle.mjs +208 -86
- package/fesm2022/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2022/ngx-formly-material.mjs +84 -62
- package/fesm2022/ngx-formly-material.mjs.map +1 -1
- package/package.json +3 -3
- package/types/ngx-formly-material-checkbox.d.ts +41 -46
- package/types/ngx-formly-material-datepicker.d.ts +62 -67
- package/types/ngx-formly-material-form-field.d.ts +71 -77
- package/types/ngx-formly-material-input.d.ts +22 -28
- package/types/ngx-formly-material-multicheckbox.d.ts +33 -38
- package/types/ngx-formly-material-native-select.d.ts +23 -29
- package/types/ngx-formly-material-radio.d.ts +34 -39
- package/types/ngx-formly-material-select.d.ts +45 -48
- package/types/ngx-formly-material-slider.d.ts +32 -37
- package/types/ngx-formly-material-textarea.d.ts +28 -33
- package/types/ngx-formly-material-toggle.d.ts +30 -35
- package/types/ngx-formly-material.d.ts +16 -19
|
@@ -1,28 +1,43 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { ChangeDetectionStrategy, Component, NgModule } from
|
|
3
|
-
import { FieldType, FormlyMatFormFieldModule } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { ReactiveFormsModule } from
|
|
6
|
-
import * as i2 from
|
|
7
|
-
import { MatSliderModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import { FormlyModule } from
|
|
10
|
-
import { CommonModule } from
|
|
11
|
-
import { MatRippleModule } from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
|
|
3
|
+
import { FieldType, FormlyMatFormFieldModule } from "@ngx-formly/material/form-field";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
6
|
+
import * as i2 from "@angular/material/slider";
|
|
7
|
+
import { MatSliderModule } from "@angular/material/slider";
|
|
8
|
+
import * as i3 from "@ngx-formly/core";
|
|
9
|
+
import { FormlyModule } from "@ngx-formly/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { MatRippleModule } from "@angular/material/core";
|
|
12
|
+
var FormlyFieldSlider = class FormlyFieldSlider extends FieldType {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.defaultOptions = { props: {
|
|
16
|
+
hideFieldUnderline: true,
|
|
17
|
+
floatLabel: "always",
|
|
18
|
+
displayWith: (value) => `${value}`
|
|
19
|
+
} };
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.2",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: FormlyFieldSlider,
|
|
27
|
+
deps: null,
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static {
|
|
32
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
33
|
+
minVersion: "14.0.0",
|
|
34
|
+
version: "22.2.2",
|
|
35
|
+
type: FormlyFieldSlider,
|
|
36
|
+
isStandalone: false,
|
|
37
|
+
selector: "formly-field-mat-slider",
|
|
38
|
+
usesInheritance: true,
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
template: `
|
|
26
41
|
<mat-slider
|
|
27
42
|
[id]="id"
|
|
28
43
|
[style.width]="'100%'"
|
|
@@ -32,22 +47,89 @@ class FormlyFieldSlider extends FieldType {
|
|
|
32
47
|
[displayWith]="props.displayWith"
|
|
33
48
|
[max]="props.max"
|
|
34
49
|
[min]="props.min"
|
|
35
|
-
[step]="props.step"
|
|
50
|
+
[step]="props.step === 'any' ? 1 : props.step"
|
|
36
51
|
[discrete]="props.discrete"
|
|
37
52
|
[showTickMarks]="props.showTickMarks"
|
|
38
|
-
[step]="props.step"
|
|
53
|
+
[step]="props.step === 'any' ? 1 : props.step"
|
|
39
54
|
(input)="props.input && props.input(field, $event)"
|
|
40
55
|
(change)="props.change && props.change(field, $event)"
|
|
41
56
|
>
|
|
42
57
|
<input matSliderThumb [formControl]="formControl" [formlyAttributes]="field" />
|
|
43
58
|
</mat-slider>
|
|
44
|
-
`,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
`,
|
|
60
|
+
isInline: true,
|
|
61
|
+
dependencies: [
|
|
62
|
+
{
|
|
63
|
+
kind: "directive",
|
|
64
|
+
type: i1.DefaultValueAccessor,
|
|
65
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
kind: "directive",
|
|
69
|
+
type: i1.NgControlStatus,
|
|
70
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
kind: "directive",
|
|
74
|
+
type: i1.FormControlDirective,
|
|
75
|
+
selector: "[formControl]",
|
|
76
|
+
inputs: [
|
|
77
|
+
"formControl",
|
|
78
|
+
"disabled",
|
|
79
|
+
"ngModel"
|
|
80
|
+
],
|
|
81
|
+
outputs: ["ngModelChange"],
|
|
82
|
+
exportAs: ["ngForm"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
kind: "component",
|
|
86
|
+
type: i2.MatSlider,
|
|
87
|
+
selector: "mat-slider",
|
|
88
|
+
inputs: [
|
|
89
|
+
"disabled",
|
|
90
|
+
"discrete",
|
|
91
|
+
"showTickMarks",
|
|
92
|
+
"min",
|
|
93
|
+
"color",
|
|
94
|
+
"disableRipple",
|
|
95
|
+
"max",
|
|
96
|
+
"step",
|
|
97
|
+
"displayWith"
|
|
98
|
+
],
|
|
99
|
+
exportAs: ["matSlider"]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
kind: "directive",
|
|
103
|
+
type: i2.MatSliderThumb,
|
|
104
|
+
selector: "input[matSliderThumb]",
|
|
105
|
+
inputs: ["value"],
|
|
106
|
+
outputs: [
|
|
107
|
+
"valueChange",
|
|
108
|
+
"dragStart",
|
|
109
|
+
"dragEnd"
|
|
110
|
+
],
|
|
111
|
+
exportAs: ["matSliderThumb"]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
kind: "directive",
|
|
115
|
+
type: i3.LegacyFormlyAttributes,
|
|
116
|
+
selector: "[formlyAttributes]"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
124
|
+
minVersion: "12.0.0",
|
|
125
|
+
version: "22.2.2",
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
type: FormlyFieldSlider,
|
|
128
|
+
decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{
|
|
131
|
+
selector: "formly-field-mat-slider",
|
|
132
|
+
template: `
|
|
51
133
|
<mat-slider
|
|
52
134
|
[id]="id"
|
|
53
135
|
[style.width]="'100%'"
|
|
@@ -57,65 +139,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
57
139
|
[displayWith]="props.displayWith"
|
|
58
140
|
[max]="props.max"
|
|
59
141
|
[min]="props.min"
|
|
60
|
-
[step]="props.step"
|
|
142
|
+
[step]="props.step === 'any' ? 1 : props.step"
|
|
61
143
|
[discrete]="props.discrete"
|
|
62
144
|
[showTickMarks]="props.showTickMarks"
|
|
63
|
-
[step]="props.step"
|
|
145
|
+
[step]="props.step === 'any' ? 1 : props.step"
|
|
64
146
|
(input)="props.input && props.input(field, $event)"
|
|
65
147
|
(change)="props.change && props.change(field, $event)"
|
|
66
148
|
>
|
|
67
149
|
<input matSliderThumb [formControl]="formControl" [formlyAttributes]="field" />
|
|
68
150
|
</mat-slider>
|
|
69
151
|
`,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
152
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
153
|
+
standalone: false
|
|
154
|
+
}]
|
|
155
|
+
}]
|
|
156
|
+
});
|
|
75
157
|
function withFormlyFieldSlider() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
wrappers: ['form-field'],
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
};
|
|
158
|
+
return { types: [{
|
|
159
|
+
name: "slider",
|
|
160
|
+
component: FormlyFieldSlider,
|
|
161
|
+
wrappers: ["form-field"]
|
|
162
|
+
}] };
|
|
85
163
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
164
|
+
var FormlyMatSliderModule = class FormlyMatSliderModule {
|
|
165
|
+
static {
|
|
166
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
167
|
+
minVersion: "12.0.0",
|
|
168
|
+
version: "22.2.2",
|
|
169
|
+
ngImport: i0,
|
|
170
|
+
type: FormlyMatSliderModule,
|
|
171
|
+
deps: [],
|
|
172
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
static {
|
|
176
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
177
|
+
minVersion: "14.0.0",
|
|
178
|
+
version: "22.2.2",
|
|
179
|
+
ngImport: i0,
|
|
180
|
+
type: FormlyMatSliderModule,
|
|
181
|
+
declarations: [FormlyFieldSlider],
|
|
182
|
+
imports: [
|
|
183
|
+
CommonModule,
|
|
184
|
+
MatRippleModule,
|
|
185
|
+
ReactiveFormsModule,
|
|
186
|
+
MatSliderModule,
|
|
187
|
+
FormlyMatFormFieldModule,
|
|
188
|
+
i3.FormlyModule
|
|
189
|
+
]
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
static {
|
|
193
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
194
|
+
minVersion: "12.0.0",
|
|
195
|
+
version: "22.2.2",
|
|
196
|
+
ngImport: i0,
|
|
197
|
+
type: FormlyMatSliderModule,
|
|
198
|
+
imports: [
|
|
199
|
+
CommonModule,
|
|
200
|
+
MatRippleModule,
|
|
201
|
+
ReactiveFormsModule,
|
|
202
|
+
MatSliderModule,
|
|
203
|
+
FormlyMatFormFieldModule,
|
|
204
|
+
FormlyModule.forChild(withFormlyFieldSlider())
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
210
|
+
minVersion: "12.0.0",
|
|
211
|
+
version: "22.2.2",
|
|
212
|
+
ngImport: i0,
|
|
213
|
+
type: FormlyMatSliderModule,
|
|
214
|
+
decorators: [{
|
|
215
|
+
type: NgModule,
|
|
216
|
+
args: [{
|
|
217
|
+
declarations: [FormlyFieldSlider],
|
|
218
|
+
imports: [
|
|
219
|
+
CommonModule,
|
|
220
|
+
MatRippleModule,
|
|
221
|
+
ReactiveFormsModule,
|
|
222
|
+
MatSliderModule,
|
|
223
|
+
FormlyMatFormFieldModule,
|
|
224
|
+
FormlyModule.forChild(withFormlyFieldSlider())
|
|
225
|
+
]
|
|
226
|
+
}]
|
|
227
|
+
}]
|
|
228
|
+
});
|
|
120
229
|
export { FormlyFieldSlider, FormlyMatSliderModule, withFormlyFieldSlider };
|
|
121
|
-
|
|
230
|
+
|
|
231
|
+
//# sourceMappingURL=ngx-formly-material-slider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.config.ts","../../../../src/ui/material/slider/src/slider.module.ts"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-slider.mjs","names":[],"sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.config.ts","../../../../src/ui/material/slider/src/slider.module.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\n\ninterface SliderProps extends FormlyFieldProps {\n displayWith?: (value: number) => string;\n discrete?: boolean;\n showTickMarks?: boolean;\n\n input?: (field: FormlyFieldConfig<SliderProps>, $event: Event) => void;\n change?: (field: FormlyFieldConfig<SliderProps>, $event: Event) => void;\n}\n\nexport interface FormlySliderFieldConfig extends FormlyFieldConfig<SliderProps> {\n type: 'slider' | Type<FormlyFieldSlider>;\n}\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [color]=\"props.color\"\n [displayWith]=\"props.displayWith\"\n [max]=\"props.max\"\n [min]=\"props.min\"\n [step]=\"props.step === 'any' ? 1 : props.step\"\n [discrete]=\"props.discrete\"\n [showTickMarks]=\"props.showTickMarks\"\n [step]=\"props.step === 'any' ? 1 : props.step\"\n (input)=\"props.input && props.input(field, $event)\"\n (change)=\"props.change && props.change(field, $event)\"\n >\n <input matSliderThumb [formControl]=\"formControl\" [formlyAttributes]=\"field\" />\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SliderProps>> {\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n displayWith: (value: number) => `${value}`,\n },\n };\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSlider } from './slider.type';\n\nexport function withFormlyFieldSlider(): ConfigOption {\n return {\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field'],\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatRippleModule } from '@angular/material/core';\nimport { FormlyFieldSlider } from './slider.type';\nimport { withFormlyFieldSlider } from './slider.config';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n MatRippleModule,\n ReactiveFormsModule,\n MatSliderModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldSlider()),\n ],\n})\nexport class FormlyMatSliderModule {}\n"],"mappings":";;;;;;;;;;;AA0CA,IAAa,oBAAb,MAAa,0BAA0B,UAAuC;CAzB9E,cAAA;;EA0BW,KAAA,iBAAiB,EACxB,OAAO;GACL,oBAAoB;GACpB,YAAY;GACZ,cAAc,UAAkB,GAAG;EACpC,EACF;CACF;CARY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAjB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAiB,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UAvBlB;;;;;;;;;;;;;;;;;;;;GAmBT,UAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,eAAA;KAAA,UAAA,CAAA,QAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,UAAA,CAAA,WAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA,CAAA,OAAA;KAAA,SAAA;MAAA;MAAA;MAAA;KAAA;KAAA,UAAA,CAAA,gBAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAIU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAzB7B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;;;;;;;;;;;;;;;;;;;;GAoBV,iBAAiB,wBAAwB;GACzC,YAAY;EACb,CAAA;;;ACtCD,SAAgB,wBAAqB;CACnC,OAAO,EACL,OAAO,CACL;EACE,MAAM;EACN,WAAW;EACX,UAAU,CAAC,YAAY;CACxB,CACF,EACF;AACH;ACQA,IAAa,wBAAb,MAAa,sBAAqB;CAArB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAArB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,cAAA,CAVjB,iBAAiB;GAAA,SAAA;IAE9B;IACA;IACA;IACA;IACA;IAAwB,GAAA;GAAA;EAAA,CAAA;CAAA;CAIf;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,SAAA;IAR9B;IACA;IACA;IACA;IACA;IACA,aAAa,SAAS,sBAAqB,CAAE;GAAC;EAAA,CAAA;CAAA;;AAGrC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAXjC,MAAA;EAAS,MAAA,CAAA;GACR,cAAc,CAAC,iBAAiB;GAChC,SAAS;IACP;IACA;IACA;IACA;IACA;IACA,aAAa,SAAS,sBAAqB,CAAE;GAC9C;EACF,CAAA"}
|
|
@@ -1,31 +1,46 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { ChangeDetectionStrategy, Component, NgModule } from
|
|
3
|
-
import { FieldType, FormlyMatFormFieldModule } from
|
|
4
|
-
import * as i2 from
|
|
5
|
-
import { MAT_INPUT_VALUE_ACCESSOR, MatInputModule } from
|
|
6
|
-
import * as i1 from
|
|
7
|
-
import { ReactiveFormsModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import * as i4 from
|
|
10
|
-
import { FormlyModule } from
|
|
11
|
-
import { CommonModule } from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
|
|
3
|
+
import { FieldType, FormlyMatFormFieldModule } from "@ngx-formly/material/form-field";
|
|
4
|
+
import * as i2 from "@angular/material/input";
|
|
5
|
+
import { MAT_INPUT_VALUE_ACCESSOR, MatInputModule } from "@angular/material/input";
|
|
6
|
+
import * as i1 from "@angular/forms";
|
|
7
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
8
|
+
import * as i3 from "@angular/cdk/text-field";
|
|
9
|
+
import * as i4 from "@ngx-formly/core";
|
|
10
|
+
import { FormlyModule } from "@ngx-formly/core";
|
|
11
|
+
import { CommonModule } from "@angular/common";
|
|
12
|
+
var FormlyFieldTextArea = class FormlyFieldTextArea extends FieldType {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.defaultOptions = { props: {
|
|
16
|
+
cols: 1,
|
|
17
|
+
rows: 1
|
|
18
|
+
} };
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
22
|
+
minVersion: "12.0.0",
|
|
23
|
+
version: "22.2.2",
|
|
24
|
+
ngImport: i0,
|
|
25
|
+
type: FormlyFieldTextArea,
|
|
26
|
+
deps: null,
|
|
27
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
static {
|
|
31
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
32
|
+
minVersion: "14.0.0",
|
|
33
|
+
version: "22.2.2",
|
|
34
|
+
type: FormlyFieldTextArea,
|
|
35
|
+
isStandalone: false,
|
|
36
|
+
selector: "formly-field-mat-textarea",
|
|
37
|
+
providers: [{
|
|
38
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
|
39
|
+
useExisting: FormlyFieldTextArea
|
|
40
|
+
}],
|
|
41
|
+
usesInheritance: true,
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
template: `
|
|
29
44
|
<textarea
|
|
30
45
|
matInput
|
|
31
46
|
[id]="id"
|
|
@@ -44,13 +59,88 @@ class FormlyFieldTextArea extends FieldType {
|
|
|
44
59
|
[cdkAutosizeMaxRows]="props.autosizeMaxRows"
|
|
45
60
|
[class.cdk-textarea-autosize]="props.autosize"
|
|
46
61
|
></textarea>
|
|
47
|
-
`,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
`,
|
|
63
|
+
isInline: true,
|
|
64
|
+
dependencies: [
|
|
65
|
+
{
|
|
66
|
+
kind: "directive",
|
|
67
|
+
type: i1.DefaultValueAccessor,
|
|
68
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "directive",
|
|
72
|
+
type: i1.NgControlStatus,
|
|
73
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
kind: "directive",
|
|
77
|
+
type: i1.RequiredValidator,
|
|
78
|
+
selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
|
|
79
|
+
inputs: ["required"]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
kind: "directive",
|
|
83
|
+
type: i1.FormControlDirective,
|
|
84
|
+
selector: "[formControl]",
|
|
85
|
+
inputs: [
|
|
86
|
+
"formControl",
|
|
87
|
+
"disabled",
|
|
88
|
+
"ngModel"
|
|
89
|
+
],
|
|
90
|
+
outputs: ["ngModelChange"],
|
|
91
|
+
exportAs: ["ngForm"]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
kind: "directive",
|
|
95
|
+
type: i2.MatInput,
|
|
96
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
97
|
+
inputs: [
|
|
98
|
+
"disabled",
|
|
99
|
+
"id",
|
|
100
|
+
"placeholder",
|
|
101
|
+
"name",
|
|
102
|
+
"required",
|
|
103
|
+
"type",
|
|
104
|
+
"errorStateMatcher",
|
|
105
|
+
"aria-describedby",
|
|
106
|
+
"value",
|
|
107
|
+
"readonly",
|
|
108
|
+
"disabledInteractive"
|
|
109
|
+
],
|
|
110
|
+
exportAs: ["matInput"]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
kind: "directive",
|
|
114
|
+
type: i3.CdkTextareaAutosize,
|
|
115
|
+
selector: "textarea[cdkTextareaAutosize]",
|
|
116
|
+
inputs: [
|
|
117
|
+
"cdkAutosizeMinRows",
|
|
118
|
+
"cdkAutosizeMaxRows",
|
|
119
|
+
"cdkTextareaAutosize",
|
|
120
|
+
"placeholder"
|
|
121
|
+
],
|
|
122
|
+
exportAs: ["cdkTextareaAutosize"]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
kind: "directive",
|
|
126
|
+
type: i4.LegacyFormlyAttributes,
|
|
127
|
+
selector: "[formlyAttributes]"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
135
|
+
minVersion: "12.0.0",
|
|
136
|
+
version: "22.2.2",
|
|
137
|
+
ngImport: i0,
|
|
138
|
+
type: FormlyFieldTextArea,
|
|
139
|
+
decorators: [{
|
|
140
|
+
type: Component,
|
|
141
|
+
args: [{
|
|
142
|
+
selector: "formly-field-mat-textarea",
|
|
143
|
+
template: `
|
|
54
144
|
<textarea
|
|
55
145
|
matInput
|
|
56
146
|
[id]="id"
|
|
@@ -70,57 +160,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
70
160
|
[class.cdk-textarea-autosize]="props.autosize"
|
|
71
161
|
></textarea>
|
|
72
162
|
`,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
163
|
+
providers: [{
|
|
164
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
|
165
|
+
useExisting: FormlyFieldTextArea
|
|
166
|
+
}],
|
|
167
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
168
|
+
standalone: false
|
|
169
|
+
}]
|
|
170
|
+
}]
|
|
171
|
+
});
|
|
83
172
|
function withFormlyFieldTextArea() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
wrappers: ['form-field'],
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
};
|
|
173
|
+
return { types: [{
|
|
174
|
+
name: "textarea",
|
|
175
|
+
component: FormlyFieldTextArea,
|
|
176
|
+
wrappers: ["form-field"]
|
|
177
|
+
}] };
|
|
93
178
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
179
|
+
var FormlyMatTextAreaModule = class FormlyMatTextAreaModule {
|
|
180
|
+
static {
|
|
181
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
182
|
+
minVersion: "12.0.0",
|
|
183
|
+
version: "22.2.2",
|
|
184
|
+
ngImport: i0,
|
|
185
|
+
type: FormlyMatTextAreaModule,
|
|
186
|
+
deps: [],
|
|
187
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
static {
|
|
191
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
192
|
+
minVersion: "14.0.0",
|
|
193
|
+
version: "22.2.2",
|
|
194
|
+
ngImport: i0,
|
|
195
|
+
type: FormlyMatTextAreaModule,
|
|
196
|
+
declarations: [FormlyFieldTextArea],
|
|
197
|
+
imports: [
|
|
198
|
+
CommonModule,
|
|
199
|
+
ReactiveFormsModule,
|
|
200
|
+
MatInputModule,
|
|
201
|
+
FormlyMatFormFieldModule,
|
|
202
|
+
i4.FormlyModule
|
|
203
|
+
]
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
static {
|
|
207
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
208
|
+
minVersion: "12.0.0",
|
|
209
|
+
version: "22.2.2",
|
|
210
|
+
ngImport: i0,
|
|
211
|
+
type: FormlyMatTextAreaModule,
|
|
212
|
+
imports: [
|
|
213
|
+
CommonModule,
|
|
214
|
+
ReactiveFormsModule,
|
|
215
|
+
MatInputModule,
|
|
216
|
+
FormlyMatFormFieldModule,
|
|
217
|
+
FormlyModule.forChild(withFormlyFieldTextArea())
|
|
218
|
+
]
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
223
|
+
minVersion: "12.0.0",
|
|
224
|
+
version: "22.2.2",
|
|
225
|
+
ngImport: i0,
|
|
226
|
+
type: FormlyMatTextAreaModule,
|
|
227
|
+
decorators: [{
|
|
228
|
+
type: NgModule,
|
|
229
|
+
args: [{
|
|
230
|
+
declarations: [FormlyFieldTextArea],
|
|
231
|
+
imports: [
|
|
232
|
+
CommonModule,
|
|
233
|
+
ReactiveFormsModule,
|
|
234
|
+
MatInputModule,
|
|
235
|
+
FormlyMatFormFieldModule,
|
|
236
|
+
FormlyModule.forChild(withFormlyFieldTextArea())
|
|
237
|
+
]
|
|
238
|
+
}]
|
|
239
|
+
}]
|
|
240
|
+
});
|
|
125
241
|
export { FormlyFieldTextArea, FormlyMatTextAreaModule, withFormlyFieldTextArea };
|
|
126
|
-
|
|
242
|
+
|
|
243
|
+
//# sourceMappingURL=ngx-formly-material-textarea.mjs.map
|