@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-textarea.mjs","sources":["../../../../src/ui/material/textarea/src/textarea.type.ts","../../../../src/ui/material/textarea/src/textarea.config.ts","../../../../src/ui/material/textarea/src/textarea.module.ts"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-textarea.mjs","names":[],"sources":["../../../../src/ui/material/textarea/src/textarea.type.ts","../../../../src/ui/material/textarea/src/textarea.config.ts","../../../../src/ui/material/textarea/src/textarea.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';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\n\ninterface TextAreaProps extends FormlyFieldProps {\n autosize?: boolean;\n autosizeMinRows?: number;\n autosizeMaxRows?: number;\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n@Component({\n selector: 'formly-field-mat-textarea',\n template: `\n <textarea\n matInput\n [id]=\"id\"\n [name]=\"field.name\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n [formControl]=\"formControl\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [cols]=\"props.cols\"\n [rows]=\"props.rows\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"props.placeholder\"\n [tabindex]=\"props.tabindex\"\n [cdkTextareaAutosize]=\"props.autosize\"\n [cdkAutosizeMinRows]=\"props.autosizeMinRows\"\n [cdkAutosizeMaxRows]=\"props.autosizeMaxRows\"\n [class.cdk-textarea-autosize]=\"props.autosize\"\n ></textarea>\n `,\n providers: [\n // fix for https://github.com/ngx-formly/ngx-formly/issues/1688\n // rely on formControl value instead of elementRef which return empty value in Firefox.\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\n cols: 1,\n rows: 1,\n },\n };\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldTextArea } from './textarea.type';\n\nexport function withFormlyFieldTextArea(): ConfigOption {\n return {\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\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';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { FormlyFieldTextArea } from './textarea.type';\nimport { withFormlyFieldTextArea } from './textarea.config';\n\n@NgModule({\n declarations: [FormlyFieldTextArea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldTextArea()),\n ],\n})\nexport class FormlyMatTextAreaModule {}\n"],"mappings":";;;;;;;;;;;AA6CA,IAAa,sBAAb,MAAa,4BAA4B,UAAyC;CA9BlF,cAAA;;EA+BW,KAAA,iBAAiB,EACxB,OAAO;GACL,MAAM;GACN,MAAM;EACP,EACF;CACF;CAPY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA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gB,0BAAuB;CACrC,OAAO,EACL,OAAO,CACL;EACE,MAAM;EACN,WAAW;EACX,UAAU,CAAC,YAAY;CACxB,CACF,EACF;AACH;ACSA,IAAa,0BAAb,MAAa,wBAAuB;CAAvB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAuB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAvB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAuB,cAAA,CAVnB,mBAAmB;GAAA,SAAA;IAEhC;IACA;IACA;IAEA;IAAwB,GAAA;GAAA;EAAA,CAAA;CAAA;CAIf;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAuB,SAAA;IARhC;IACA;IACA;IAEA;IACA,aAAa,SAAS,wBAAuB,CAAE;GAAC;EAAA,CAAA;CAAA;;AAGvC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAXnC,MAAA;EAAS,MAAA,CAAA;GACR,cAAc,CAAC,mBAAmB;GAClC,SAAS;IACP;IACA;IACA;IAEA;IACA,aAAa,SAAS,wBAAuB,CAAE;GAChD;EACF,CAAA"}
|
|
@@ -1,31 +1,53 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { FieldType, FormlyMatFormFieldModule } from
|
|
4
|
-
import * as i2 from
|
|
5
|
-
import { MatSlideToggle, MatSlideToggleModule } from
|
|
6
|
-
import * as i1 from
|
|
7
|
-
import { ReactiveFormsModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import { FormlyModule } from
|
|
10
|
-
import { CommonModule } from
|
|
11
|
-
|
|
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, ViewChild } from "@angular/core";
|
|
3
|
+
import { FieldType, FormlyMatFormFieldModule } from "@ngx-formly/material/form-field";
|
|
4
|
+
import * as i2 from "@angular/material/slide-toggle";
|
|
5
|
+
import { MatSlideToggle, MatSlideToggleModule } from "@angular/material/slide-toggle";
|
|
6
|
+
import * as i1 from "@angular/forms";
|
|
7
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
8
|
+
import * as i3 from "@ngx-formly/core";
|
|
9
|
+
import { FormlyModule } from "@ngx-formly/core";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
var FormlyFieldToggle = class FormlyFieldToggle extends FieldType {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.defaultOptions = { props: {
|
|
15
|
+
hideFieldUnderline: true,
|
|
16
|
+
floatLabel: "always",
|
|
17
|
+
hideLabel: true
|
|
18
|
+
} };
|
|
19
|
+
}
|
|
20
|
+
onContainerClick(event) {
|
|
21
|
+
this.slideToggle.focus();
|
|
22
|
+
super.onContainerClick(event);
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
26
|
+
minVersion: "12.0.0",
|
|
27
|
+
version: "22.2.2",
|
|
28
|
+
ngImport: i0,
|
|
29
|
+
type: FormlyFieldToggle,
|
|
30
|
+
deps: null,
|
|
31
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
static {
|
|
35
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
36
|
+
minVersion: "17.0.0",
|
|
37
|
+
version: "22.2.2",
|
|
38
|
+
type: FormlyFieldToggle,
|
|
39
|
+
isStandalone: false,
|
|
40
|
+
selector: "formly-field-mat-toggle",
|
|
41
|
+
viewQueries: [{
|
|
42
|
+
propertyName: "slideToggle",
|
|
43
|
+
first: true,
|
|
44
|
+
predicate: MatSlideToggle,
|
|
45
|
+
descendants: true,
|
|
46
|
+
static: true
|
|
47
|
+
}],
|
|
48
|
+
usesInheritance: true,
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
template: `
|
|
29
51
|
<mat-slide-toggle
|
|
30
52
|
[id]="id"
|
|
31
53
|
[name]="field.name"
|
|
@@ -36,15 +58,82 @@ class FormlyFieldToggle extends FieldType {
|
|
|
36
58
|
[required]="required"
|
|
37
59
|
[labelPosition]="props.labelPosition"
|
|
38
60
|
>
|
|
39
|
-
|
|
61
|
+
@if (props.allowHtml) {
|
|
62
|
+
<span [innerHTML]="props.label"></span>
|
|
63
|
+
} @else {
|
|
64
|
+
{{ props.label }}
|
|
65
|
+
}
|
|
40
66
|
</mat-slide-toggle>
|
|
41
|
-
`,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
`,
|
|
68
|
+
isInline: true,
|
|
69
|
+
dependencies: [
|
|
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: "component",
|
|
95
|
+
type: i2.MatSlideToggle,
|
|
96
|
+
selector: "mat-slide-toggle",
|
|
97
|
+
inputs: [
|
|
98
|
+
"name",
|
|
99
|
+
"id",
|
|
100
|
+
"labelPosition",
|
|
101
|
+
"aria-label",
|
|
102
|
+
"aria-labelledby",
|
|
103
|
+
"aria-describedby",
|
|
104
|
+
"required",
|
|
105
|
+
"color",
|
|
106
|
+
"disabled",
|
|
107
|
+
"fullWidth",
|
|
108
|
+
"disableRipple",
|
|
109
|
+
"tabIndex",
|
|
110
|
+
"checked",
|
|
111
|
+
"hideIcon",
|
|
112
|
+
"disabledInteractive"
|
|
113
|
+
],
|
|
114
|
+
outputs: ["change", "toggleChange"],
|
|
115
|
+
exportAs: ["matSlideToggle"]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
kind: "directive",
|
|
119
|
+
type: i3.LegacyFormlyAttributes,
|
|
120
|
+
selector: "[formlyAttributes]"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
128
|
+
minVersion: "12.0.0",
|
|
129
|
+
version: "22.2.2",
|
|
130
|
+
ngImport: i0,
|
|
131
|
+
type: FormlyFieldToggle,
|
|
132
|
+
decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
args: [{
|
|
135
|
+
selector: "formly-field-mat-toggle",
|
|
136
|
+
template: `
|
|
48
137
|
<mat-slide-toggle
|
|
49
138
|
[id]="id"
|
|
50
139
|
[name]="field.name"
|
|
@@ -55,58 +144,91 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
55
144
|
[required]="required"
|
|
56
145
|
[labelPosition]="props.labelPosition"
|
|
57
146
|
>
|
|
58
|
-
|
|
147
|
+
@if (props.allowHtml) {
|
|
148
|
+
<span [innerHTML]="props.label"></span>
|
|
149
|
+
} @else {
|
|
150
|
+
{{ props.label }}
|
|
151
|
+
}
|
|
59
152
|
</mat-slide-toggle>
|
|
60
153
|
`,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
154
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
155
|
+
standalone: false
|
|
156
|
+
}]
|
|
157
|
+
}],
|
|
158
|
+
propDecorators: { slideToggle: [{
|
|
159
|
+
type: ViewChild,
|
|
160
|
+
args: [MatSlideToggle, { static: true }]
|
|
161
|
+
}] }
|
|
162
|
+
});
|
|
69
163
|
function withFormlyFieldToggle() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
wrappers: ['form-field'],
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
};
|
|
164
|
+
return { types: [{
|
|
165
|
+
name: "toggle",
|
|
166
|
+
component: FormlyFieldToggle,
|
|
167
|
+
wrappers: ["form-field"]
|
|
168
|
+
}] };
|
|
79
169
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
170
|
+
var FormlyMatToggleModule = class FormlyMatToggleModule {
|
|
171
|
+
static {
|
|
172
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
173
|
+
minVersion: "12.0.0",
|
|
174
|
+
version: "22.2.2",
|
|
175
|
+
ngImport: i0,
|
|
176
|
+
type: FormlyMatToggleModule,
|
|
177
|
+
deps: [],
|
|
178
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
static {
|
|
182
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
183
|
+
minVersion: "14.0.0",
|
|
184
|
+
version: "22.2.2",
|
|
185
|
+
ngImport: i0,
|
|
186
|
+
type: FormlyMatToggleModule,
|
|
187
|
+
declarations: [FormlyFieldToggle],
|
|
188
|
+
imports: [
|
|
189
|
+
CommonModule,
|
|
190
|
+
ReactiveFormsModule,
|
|
191
|
+
MatSlideToggleModule,
|
|
192
|
+
FormlyMatFormFieldModule,
|
|
193
|
+
i3.FormlyModule
|
|
194
|
+
]
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
static {
|
|
198
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
199
|
+
minVersion: "12.0.0",
|
|
200
|
+
version: "22.2.2",
|
|
201
|
+
ngImport: i0,
|
|
202
|
+
type: FormlyMatToggleModule,
|
|
203
|
+
imports: [
|
|
204
|
+
CommonModule,
|
|
205
|
+
ReactiveFormsModule,
|
|
206
|
+
MatSlideToggleModule,
|
|
207
|
+
FormlyMatFormFieldModule,
|
|
208
|
+
FormlyModule.forChild(withFormlyFieldToggle())
|
|
209
|
+
]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
214
|
+
minVersion: "12.0.0",
|
|
215
|
+
version: "22.2.2",
|
|
216
|
+
ngImport: i0,
|
|
217
|
+
type: FormlyMatToggleModule,
|
|
218
|
+
decorators: [{
|
|
219
|
+
type: NgModule,
|
|
220
|
+
args: [{
|
|
221
|
+
declarations: [FormlyFieldToggle],
|
|
222
|
+
imports: [
|
|
223
|
+
CommonModule,
|
|
224
|
+
ReactiveFormsModule,
|
|
225
|
+
MatSlideToggleModule,
|
|
226
|
+
FormlyMatFormFieldModule,
|
|
227
|
+
FormlyModule.forChild(withFormlyFieldToggle())
|
|
228
|
+
]
|
|
229
|
+
}]
|
|
230
|
+
}]
|
|
231
|
+
});
|
|
111
232
|
export { FormlyFieldToggle, FormlyMatToggleModule, withFormlyFieldToggle };
|
|
112
|
-
|
|
233
|
+
|
|
234
|
+
//# sourceMappingURL=ngx-formly-material-toggle.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-toggle.mjs","sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.config.ts","../../../../src/ui/material/toggle/src/toggle.module.ts"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-toggle.mjs","names":[],"sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.config.ts","../../../../src/ui/material/toggle/src/toggle.module.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\n\ninterface ToggleProps extends FormlyFieldProps {\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyToggleFieldConfig extends FormlyFieldConfig<ToggleProps> {\n type: 'toggle' | Type<FormlyFieldToggle>;\n}\n\n@Component({\n selector: 'formly-field-mat-toggle',\n template: `\n <mat-slide-toggle\n [id]=\"id\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [color]=\"props.color\"\n [tabIndex]=\"props.tabindex\"\n [required]=\"required\"\n [labelPosition]=\"props.labelPosition\"\n >\n @if (props.allowHtml) {\n <span [innerHTML]=\"props.label\"></span>\n } @else {\n {{ props.label }}\n }\n </mat-slide-toggle>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldToggle extends FieldType<FieldTypeConfig<ToggleProps>> {\n @ViewChild(MatSlideToggle, { static: true }) slideToggle!: MatSlideToggle;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n },\n };\n\n override onContainerClick(event: MouseEvent): void {\n this.slideToggle.focus();\n super.onContainerClick(event);\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldToggle } from './toggle.type';\n\nexport function withFormlyFieldToggle(): ConfigOption {\n return {\n types: [\n {\n name: 'toggle',\n component: FormlyFieldToggle,\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 { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlyFieldToggle } from './toggle.type';\nimport { withFormlyFieldToggle } from './toggle.config';\n\n@NgModule({\n declarations: [FormlyFieldToggle],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSlideToggleModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldToggle()),\n ],\n})\nexport class FormlyMatToggleModule {}\n"],"mappings":";;;;;;;;;;AAoCA,IAAa,oBAAb,MAAa,0BAA0B,UAAuC;CAvB9E,cAAA;;EAyBW,KAAA,iBAAiB,EACxB,OAAO;GACL,oBAAoB;GACpB,YAAY;GACZ,WAAW;EACZ,EACF;CAMF;CAJU,iBAAiB,OAAiB;EACzC,KAAK,YAAY,MAAK;EACtB,MAAM,iBAAiB,KAAK;CAC9B;CAbW;EAAA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A,CAAA,gBAAgB,EAAE,QAAQ,KAAI,CAAE;;;AClC7C,SAAgB,wBAAqB;CACnC,OAAO,EACL,OAAO,CACL;EACE,MAAM;EACN,WAAW;EACX,UAAU,CAAC,YAAY;CACxB,CACF,EACF;AACH;ACOA,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,CATjB,iBAAiB;GAAA,SAAA;IAE9B;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;IAP9B;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;EAVjC,MAAA;EAAS,MAAA,CAAA;GACR,cAAc,CAAC,iBAAiB;GAChC,SAAS;IACP;IACA;IACA;IACA;IACA,aAAa,SAAS,sBAAqB,CAAE;GAC9C;EACF,CAAA"}
|
|
@@ -1,65 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { NgModule } from '@angular/core';
|
|
11
|
-
|
|
1
|
+
import { FieldType, FormlyMatFormFieldModule, withFormlyFormField } from "@ngx-formly/material/form-field";
|
|
2
|
+
import { FormlyMatInputModule, withFormlyFieldInput } from "@ngx-formly/material/input";
|
|
3
|
+
import { FormlyMatTextAreaModule, withFormlyFieldTextArea } from "@ngx-formly/material/textarea";
|
|
4
|
+
import { FormlyMatRadioModule, withFormlyFieldRadio } from "@ngx-formly/material/radio";
|
|
5
|
+
import { FormlyMatCheckboxModule, withFormlyFieldCheckbox } from "@ngx-formly/material/checkbox";
|
|
6
|
+
import { FormlyMatMultiCheckboxModule, withFormlyFieldMultiCheckbox } from "@ngx-formly/material/multicheckbox";
|
|
7
|
+
import { FormlyMatSelectModule, withFormlyFieldSelect } from "@ngx-formly/material/select";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import { NgModule } from "@angular/core";
|
|
12
10
|
function withFormlyMaterial() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
class FormlyMaterialModule {
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
26
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, imports: [FormlyMatFormFieldModule,
|
|
27
|
-
FormlyMatInputModule,
|
|
28
|
-
FormlyMatTextAreaModule,
|
|
29
|
-
FormlyMatRadioModule,
|
|
30
|
-
FormlyMatCheckboxModule,
|
|
31
|
-
FormlyMatMultiCheckboxModule,
|
|
32
|
-
FormlyMatSelectModule] }); }
|
|
33
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyMaterialModule, imports: [FormlyMatFormFieldModule,
|
|
34
|
-
FormlyMatInputModule,
|
|
35
|
-
FormlyMatTextAreaModule,
|
|
36
|
-
FormlyMatRadioModule,
|
|
37
|
-
FormlyMatCheckboxModule,
|
|
38
|
-
FormlyMatMultiCheckboxModule,
|
|
39
|
-
FormlyMatSelectModule] }); }
|
|
11
|
+
return [
|
|
12
|
+
withFormlyFormField(),
|
|
13
|
+
withFormlyFieldInput(),
|
|
14
|
+
withFormlyFieldTextArea(),
|
|
15
|
+
withFormlyFieldRadio(),
|
|
16
|
+
withFormlyFieldCheckbox(),
|
|
17
|
+
withFormlyFieldMultiCheckbox(),
|
|
18
|
+
withFormlyFieldSelect()
|
|
19
|
+
];
|
|
40
20
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
21
|
+
var FormlyMaterialModule = class FormlyMaterialModule {
|
|
22
|
+
static {
|
|
23
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
24
|
+
minVersion: "12.0.0",
|
|
25
|
+
version: "22.2.2",
|
|
26
|
+
ngImport: i0,
|
|
27
|
+
type: FormlyMaterialModule,
|
|
28
|
+
deps: [],
|
|
29
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
static {
|
|
33
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
34
|
+
minVersion: "14.0.0",
|
|
35
|
+
version: "22.2.2",
|
|
36
|
+
ngImport: i0,
|
|
37
|
+
type: FormlyMaterialModule,
|
|
38
|
+
imports: [
|
|
39
|
+
FormlyMatFormFieldModule,
|
|
40
|
+
FormlyMatInputModule,
|
|
41
|
+
FormlyMatTextAreaModule,
|
|
42
|
+
FormlyMatRadioModule,
|
|
43
|
+
FormlyMatCheckboxModule,
|
|
44
|
+
FormlyMatMultiCheckboxModule,
|
|
45
|
+
FormlyMatSelectModule
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
51
|
+
minVersion: "12.0.0",
|
|
52
|
+
version: "22.2.2",
|
|
53
|
+
ngImport: i0,
|
|
54
|
+
type: FormlyMaterialModule,
|
|
55
|
+
imports: [
|
|
56
|
+
FormlyMatFormFieldModule,
|
|
57
|
+
FormlyMatInputModule,
|
|
58
|
+
FormlyMatTextAreaModule,
|
|
59
|
+
FormlyMatRadioModule,
|
|
60
|
+
FormlyMatCheckboxModule,
|
|
61
|
+
FormlyMatMultiCheckboxModule,
|
|
62
|
+
FormlyMatSelectModule
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
68
|
+
minVersion: "12.0.0",
|
|
69
|
+
version: "22.2.2",
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
type: FormlyMaterialModule,
|
|
72
|
+
decorators: [{
|
|
73
|
+
type: NgModule,
|
|
74
|
+
args: [{ imports: [
|
|
75
|
+
FormlyMatFormFieldModule,
|
|
76
|
+
FormlyMatInputModule,
|
|
77
|
+
FormlyMatTextAreaModule,
|
|
78
|
+
FormlyMatRadioModule,
|
|
79
|
+
FormlyMatCheckboxModule,
|
|
80
|
+
FormlyMatMultiCheckboxModule,
|
|
81
|
+
FormlyMatSelectModule
|
|
82
|
+
] }]
|
|
83
|
+
}]
|
|
84
|
+
});
|
|
85
|
+
export { FieldType, FormlyMaterialModule, withFormlyMaterial };
|
|
63
86
|
|
|
64
|
-
|
|
65
|
-
//# sourceMappingURL=ngx-formly-material.mjs.map
|
|
87
|
+
//# sourceMappingURL=ngx-formly-material.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material.mjs","sources":["../../../../src/ui/material/src/lib/material.config.ts","../../../../src/ui/material/src/lib/ui-material.module.ts"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material.mjs","names":[],"sources":["../../../../src/ui/material/src/lib/material.config.ts","../../../../src/ui/material/src/lib/ui-material.module.ts"],"sourcesContent":["import { ConfigOption } from '@ngx-formly/core';\nimport { withFormlyFormField } from '@ngx-formly/material/form-field';\nimport { withFormlyFieldInput } from '@ngx-formly/material/input';\nimport { withFormlyFieldTextArea } from '@ngx-formly/material/textarea';\nimport { withFormlyFieldRadio } from '@ngx-formly/material/radio';\nimport { withFormlyFieldCheckbox } from '@ngx-formly/material/checkbox';\nimport { withFormlyFieldMultiCheckbox } from '@ngx-formly/material/multicheckbox';\nimport { withFormlyFieldSelect } from '@ngx-formly/material/select';\n\nexport function withFormlyMaterial(): ConfigOption[] {\n return [\n withFormlyFormField(),\n withFormlyFieldInput(),\n withFormlyFieldTextArea(),\n withFormlyFieldRadio(),\n withFormlyFieldCheckbox(),\n withFormlyFieldMultiCheckbox(),\n withFormlyFieldSelect(),\n ];\n}\n","import { NgModule } from '@angular/core';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { FormlyMatInputModule } from '@ngx-formly/material/input';\nimport { FormlyMatTextAreaModule } from '@ngx-formly/material/textarea';\nimport { FormlyMatRadioModule } from '@ngx-formly/material/radio';\nimport { FormlyMatCheckboxModule } from '@ngx-formly/material/checkbox';\nimport { FormlyMatMultiCheckboxModule } from '@ngx-formly/material/multicheckbox';\nimport { FormlyMatSelectModule } from '@ngx-formly/material/select';\n\n@NgModule({\n imports: [\n FormlyMatFormFieldModule,\n FormlyMatInputModule,\n FormlyMatTextAreaModule,\n FormlyMatRadioModule,\n FormlyMatCheckboxModule,\n FormlyMatMultiCheckboxModule,\n FormlyMatSelectModule,\n ],\n})\nexport class FormlyMaterialModule {}\n"],"mappings":";;;;;;;;;AASA,SAAgB,qBAAkB;CAChC,OAAO;EACL,oBAAmB;EACnB,qBAAoB;EACpB,wBAAuB;EACvB,qBAAoB;EACpB,wBAAuB;EACvB,6BAA4B;EAC5B,sBAAqB;CACtB;AACH;ACEA,IAAa,uBAAb,MAAa,qBAAoB;CAApB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,SAAA;IAT7B;IACA;IACA;IACA;IACA;IACA;IACA;GAAqB;EAAA,CAAA;CAAA;CAGZ;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,SAAA;IAT7B;IACA;IACA;IACA;IACA;IACA;IACA;GAAqB;EAAA,CAAA;CAAA;;AAGZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAXhC,MAAA;EAAS,MAAA,CAAA,EACR,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngx-formly/material",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.0-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2.0.0"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@ngx-formly/core": "
|
|
10
|
-
"@angular/material": ">=
|
|
9
|
+
"@ngx-formly/core": "11.1.0-rc.0",
|
|
10
|
+
"@angular/material": ">=22.0.0"
|
|
11
11
|
},
|
|
12
12
|
"module": "fesm2022/ngx-formly-material.mjs",
|
|
13
13
|
"typings": "types/ngx-formly-material.d.ts",
|