@ngx-formly/material 6.0.0-next.7 → 6.0.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 +4 -3
- package/checkbox/checkbox.type.d.ts +13 -6
- package/checkbox/public_api.d.ts +1 -1
- package/datepicker/datepicker.type.d.ts +40 -7
- package/datepicker/public_api.d.ts +1 -1
- package/esm2020/checkbox/checkbox.module.mjs +5 -5
- package/esm2020/checkbox/checkbox.type.mjs +20 -20
- package/esm2020/checkbox/public_api.mjs +1 -1
- package/esm2020/datepicker/datepicker.module.mjs +5 -5
- package/esm2020/datepicker/datepicker.type.mjs +92 -58
- package/esm2020/datepicker/public_api.mjs +1 -1
- package/esm2020/form-field/field.type.mjs +27 -34
- package/esm2020/form-field/form-field.module.mjs +5 -5
- package/esm2020/form-field/form-field.wrapper.mjs +32 -32
- package/esm2020/form-field/public_api.mjs +1 -1
- package/esm2020/input/input.module.mjs +9 -9
- package/esm2020/input/input.type.mjs +22 -22
- package/esm2020/input/public_api.mjs +1 -1
- package/esm2020/lib/ui-material.module.mjs +5 -5
- package/esm2020/multicheckbox/multicheckbox.module.mjs +5 -5
- package/esm2020/multicheckbox/multicheckbox.type.mjs +20 -20
- package/esm2020/multicheckbox/public_api.mjs +1 -1
- package/esm2020/native-select/native-select.module.mjs +5 -5
- package/esm2020/native-select/native-select.type.mjs +35 -59
- package/esm2020/native-select/public_api.mjs +1 -1
- package/esm2020/radio/public_api.mjs +1 -1
- package/esm2020/radio/radio.module.mjs +5 -5
- package/esm2020/radio/radio.type.mjs +18 -18
- package/esm2020/select/public_api.mjs +1 -1
- package/esm2020/select/select.module.mjs +5 -5
- package/esm2020/select/select.type.mjs +30 -31
- package/esm2020/slider/public_api.mjs +1 -1
- package/esm2020/slider/slider.module.mjs +5 -5
- package/esm2020/slider/slider.type.mjs +31 -31
- package/esm2020/textarea/public_api.mjs +1 -1
- package/esm2020/textarea/textarea.module.mjs +5 -5
- package/esm2020/textarea/textarea.type.mjs +26 -26
- package/esm2020/toggle/public_api.mjs +1 -1
- package/esm2020/toggle/toggle.module.mjs +5 -5
- package/esm2020/toggle/toggle.type.mjs +15 -15
- package/fesm2015/ngx-formly-material-checkbox.mjs +23 -23
- package/fesm2015/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-datepicker.mjs +97 -62
- package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-form-field.mjs +61 -68
- package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-input.mjs +29 -29
- package/fesm2015/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-multicheckbox.mjs +22 -22
- package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-native-select.mjs +38 -62
- package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-radio.mjs +21 -21
- package/fesm2015/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-select.mjs +33 -34
- package/fesm2015/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-slider.mjs +34 -34
- package/fesm2015/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-textarea.mjs +29 -29
- package/fesm2015/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-toggle.mjs +18 -18
- package/fesm2015/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2015/ngx-formly-material.mjs +4 -4
- package/fesm2015/ngx-formly-material.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-checkbox.mjs +23 -23
- package/fesm2020/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-datepicker.mjs +95 -62
- package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-form-field.mjs +60 -67
- package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-input.mjs +29 -29
- package/fesm2020/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-multicheckbox.mjs +22 -22
- package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-native-select.mjs +38 -62
- package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-radio.mjs +21 -21
- package/fesm2020/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-select.mjs +33 -34
- package/fesm2020/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-slider.mjs +34 -34
- package/fesm2020/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-textarea.mjs +29 -29
- package/fesm2020/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-toggle.mjs +18 -18
- package/fesm2020/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2020/ngx-formly-material.mjs +4 -4
- package/fesm2020/ngx-formly-material.mjs.map +1 -1
- package/form-field/field.type.d.ts +9 -12
- package/form-field/form-field.wrapper.d.ts +4 -8
- package/form-field/public_api.d.ts +1 -1
- package/input/input.type.d.ts +10 -4
- package/input/public_api.d.ts +1 -1
- package/multicheckbox/multicheckbox.type.d.ts +12 -6
- package/multicheckbox/public_api.d.ts +1 -1
- package/native-select/native-select.type.d.ts +11 -8
- package/native-select/public_api.d.ts +1 -1
- package/package.json +2 -2
- package/radio/public_api.d.ts +1 -1
- package/radio/radio.type.d.ts +12 -6
- package/select/public_api.d.ts +1 -1
- package/select/select.type.d.ts +18 -6
- package/slider/public_api.d.ts +1 -1
- package/slider/slider.type.d.ts +20 -5
- package/textarea/public_api.d.ts +1 -1
- package/textarea/textarea.type.d.ts +14 -5
- package/toggle/public_api.d.ts +1 -1
- package/toggle/toggle.type.d.ts +12 -4
|
@@ -18,8 +18,7 @@ class FormlyFieldSelect extends FieldType {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
this.defaultOptions = {
|
|
21
|
-
|
|
22
|
-
options: [],
|
|
21
|
+
props: {
|
|
23
22
|
compareWith(o1, o2) {
|
|
24
23
|
return o1 === o2;
|
|
25
24
|
},
|
|
@@ -39,18 +38,18 @@ class FormlyFieldSelect extends FieldType {
|
|
|
39
38
|
}
|
|
40
39
|
change($event) {
|
|
41
40
|
var _a, _b;
|
|
42
|
-
(_b = (_a = this.
|
|
41
|
+
(_b = (_a = this.props).change) === null || _b === void 0 ? void 0 : _b.call(_a, this.field, $event);
|
|
43
42
|
}
|
|
44
43
|
_getAriaLabelledby() {
|
|
45
44
|
var _a, _b;
|
|
46
|
-
if ((_a = this.
|
|
47
|
-
return this.
|
|
45
|
+
if ((_a = this.props.attributes) === null || _a === void 0 ? void 0 : _a['aria-labelledby']) {
|
|
46
|
+
return this.props.attributes['aria-labelledby'];
|
|
48
47
|
}
|
|
49
48
|
return (_b = this.formField) === null || _b === void 0 ? void 0 : _b._labelId;
|
|
50
49
|
}
|
|
51
50
|
_getAriaLabel() {
|
|
52
51
|
var _a;
|
|
53
|
-
return (_a = this.
|
|
52
|
+
return (_a = this.props.attributes) === null || _a === void 0 ? void 0 : _a['aria-label'];
|
|
54
53
|
}
|
|
55
54
|
getSelectAllValue(options) {
|
|
56
55
|
if (!this.selectAllValue || options !== this.selectAllValue.options) {
|
|
@@ -64,13 +63,13 @@ class FormlyFieldSelect extends FieldType {
|
|
|
64
63
|
return this.selectAllValue.value;
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
68
|
-
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
66
|
+
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldSelect, selector: "formly-field-mat-select", usesInheritance: true, ngImport: i0, template: `
|
|
69
68
|
<ng-template #selectAll let-selectOptions="selectOptions">
|
|
70
69
|
<mat-option (click)="toggleSelectAll(selectOptions)">
|
|
71
70
|
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
|
|
72
71
|
</mat-pseudo-checkbox>
|
|
73
|
-
{{
|
|
72
|
+
{{ props.selectAllOption }}
|
|
74
73
|
</mat-option>
|
|
75
74
|
</ng-template>
|
|
76
75
|
|
|
@@ -78,21 +77,21 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
78
77
|
[id]="id"
|
|
79
78
|
[formControl]="formControl"
|
|
80
79
|
[formlyAttributes]="field"
|
|
81
|
-
[placeholder]="
|
|
82
|
-
[tabIndex]="
|
|
83
|
-
[required]="
|
|
84
|
-
[compareWith]="
|
|
85
|
-
[multiple]="
|
|
80
|
+
[placeholder]="props.placeholder"
|
|
81
|
+
[tabIndex]="props.tabindex"
|
|
82
|
+
[required]="required"
|
|
83
|
+
[compareWith]="props.compareWith"
|
|
84
|
+
[multiple]="props.multiple"
|
|
86
85
|
(selectionChange)="change($event)"
|
|
87
86
|
[errorStateMatcher]="errorStateMatcher"
|
|
88
87
|
[aria-label]="_getAriaLabel()"
|
|
89
88
|
[aria-labelledby]="_getAriaLabelledby()"
|
|
90
|
-
[disableOptionCentering]="
|
|
91
|
-
[typeaheadDebounceInterval]="
|
|
89
|
+
[disableOptionCentering]="props.disableOptionCentering"
|
|
90
|
+
[typeaheadDebounceInterval]="props.typeaheadDebounceInterval"
|
|
92
91
|
>
|
|
93
|
-
<ng-container *ngIf="
|
|
92
|
+
<ng-container *ngIf="props.options | formlySelectOptions: field | async as selectOptions">
|
|
94
93
|
<ng-container
|
|
95
|
-
*ngIf="
|
|
94
|
+
*ngIf="props.multiple && props.selectAllOption"
|
|
96
95
|
[ngTemplateOutlet]="selectAll"
|
|
97
96
|
[ngTemplateOutletContext]="{ selectOptions: selectOptions }"
|
|
98
97
|
>
|
|
@@ -107,8 +106,8 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
107
106
|
</ng-container>
|
|
108
107
|
</ng-container>
|
|
109
108
|
</mat-select>
|
|
110
|
-
`, isInline: true, components: [{ type: i1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i1.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "formlySelectOptions": i6
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
109
|
+
`, isInline: true, components: [{ type: i1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i1.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "formlySelectOptions": i6.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
112
111
|
type: Component,
|
|
113
112
|
args: [{
|
|
114
113
|
selector: 'formly-field-mat-select',
|
|
@@ -117,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
117
116
|
<mat-option (click)="toggleSelectAll(selectOptions)">
|
|
118
117
|
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
|
|
119
118
|
</mat-pseudo-checkbox>
|
|
120
|
-
{{
|
|
119
|
+
{{ props.selectAllOption }}
|
|
121
120
|
</mat-option>
|
|
122
121
|
</ng-template>
|
|
123
122
|
|
|
@@ -125,21 +124,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
125
124
|
[id]="id"
|
|
126
125
|
[formControl]="formControl"
|
|
127
126
|
[formlyAttributes]="field"
|
|
128
|
-
[placeholder]="
|
|
129
|
-
[tabIndex]="
|
|
130
|
-
[required]="
|
|
131
|
-
[compareWith]="
|
|
132
|
-
[multiple]="
|
|
127
|
+
[placeholder]="props.placeholder"
|
|
128
|
+
[tabIndex]="props.tabindex"
|
|
129
|
+
[required]="required"
|
|
130
|
+
[compareWith]="props.compareWith"
|
|
131
|
+
[multiple]="props.multiple"
|
|
133
132
|
(selectionChange)="change($event)"
|
|
134
133
|
[errorStateMatcher]="errorStateMatcher"
|
|
135
134
|
[aria-label]="_getAriaLabel()"
|
|
136
135
|
[aria-labelledby]="_getAriaLabelledby()"
|
|
137
|
-
[disableOptionCentering]="
|
|
138
|
-
[typeaheadDebounceInterval]="
|
|
136
|
+
[disableOptionCentering]="props.disableOptionCentering"
|
|
137
|
+
[typeaheadDebounceInterval]="props.typeaheadDebounceInterval"
|
|
139
138
|
>
|
|
140
|
-
<ng-container *ngIf="
|
|
139
|
+
<ng-container *ngIf="props.options | formlySelectOptions: field | async as selectOptions">
|
|
141
140
|
<ng-container
|
|
142
|
-
*ngIf="
|
|
141
|
+
*ngIf="props.multiple && props.selectAllOption"
|
|
143
142
|
[ngTemplateOutlet]="selectAll"
|
|
144
143
|
[ngTemplateOutletContext]="{ selectOptions: selectOptions }"
|
|
145
144
|
>
|
|
@@ -161,14 +160,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
161
160
|
|
|
162
161
|
class FormlyMatSelectModule {
|
|
163
162
|
}
|
|
164
|
-
FormlyMatSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
165
|
-
FormlyMatSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
163
|
+
FormlyMatSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
164
|
+
FormlyMatSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
166
165
|
ReactiveFormsModule,
|
|
167
166
|
MatSelectModule,
|
|
168
167
|
MatPseudoCheckboxModule,
|
|
169
168
|
FormlyMatFormFieldModule,
|
|
170
169
|
FormlySelectModule, i4.FormlyModule] });
|
|
171
|
-
FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
170
|
+
FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSelectModule, imports: [[
|
|
172
171
|
CommonModule,
|
|
173
172
|
ReactiveFormsModule,
|
|
174
173
|
MatSelectModule,
|
|
@@ -186,7 +185,7 @@ FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
186
185
|
],
|
|
187
186
|
}),
|
|
188
187
|
]] });
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSelectModule, decorators: [{
|
|
190
189
|
type: NgModule,
|
|
191
190
|
args: [{
|
|
192
191
|
declarations: [FormlyFieldSelect],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-select.mjs","sources":["../../../../src/ui/material/select/src/select.type.ts","../../../../src/ui/material/select/src/select.module.ts","../../../../src/ui/material/select/src/ngx-formly-material-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { MatSelectChange } from '@angular/material/select';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-select',\n template: `\n <ng-template #selectAll let-selectOptions=\"selectOptions\">\n <mat-option (click)=\"toggleSelectAll(selectOptions)\">\n <mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"getSelectAllState(selectOptions)\">\n </mat-pseudo-checkbox>\n {{ to.selectAllOption }}\n </mat-option>\n </ng-template>\n\n <mat-select\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"to.placeholder\"\n [tabIndex]=\"to.tabindex\"\n [required]=\"to.required\"\n [compareWith]=\"to.compareWith\"\n [multiple]=\"to.multiple\"\n (selectionChange)=\"change($event)\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [aria-label]=\"_getAriaLabel()\"\n [aria-labelledby]=\"_getAriaLabelledby()\"\n [disableOptionCentering]=\"to.disableOptionCentering\"\n [typeaheadDebounceInterval]=\"to.typeaheadDebounceInterval\"\n >\n <ng-container *ngIf=\"to.options | formlySelectOptions: field | async as selectOptions\">\n <ng-container\n *ngIf=\"to.multiple && to.selectAllOption\"\n [ngTemplateOutlet]=\"selectAll\"\n [ngTemplateOutletContext]=\"{ selectOptions: selectOptions }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let item of selectOptions\">\n <mat-optgroup *ngIf=\"item.group\" [label]=\"item.label\">\n <mat-option *ngFor=\"let child of item.group\" [value]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </mat-option>\n </mat-optgroup>\n <mat-option *ngIf=\"!item.group\" [value]=\"item.value\" [disabled]=\"item.disabled\">{{ item.label }}</mat-option>\n </ng-container>\n </ng-container>\n </mat-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig> {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n private selectAllValue!: { options: any; value: any[] };\n\n getSelectAllState(options: any[]) {\n if (this.empty || this.value.length === 0) {\n return null;\n }\n\n return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';\n }\n\n toggleSelectAll(options: any[]) {\n const selectAllValue = this.getSelectAllValue(options);\n this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);\n this.formControl.markAsDirty();\n }\n\n change($event: MatSelectChange) {\n this.to.change?.(this.field, $event);\n }\n\n _getAriaLabelledby() {\n if (this.to.attributes?.['aria-labelledby']) {\n return this.to.attributes['aria-labelledby'] as string;\n }\n\n return this.formField?._labelId;\n }\n\n _getAriaLabel() {\n return this.to.attributes?.['aria-label'] as string;\n }\n\n private getSelectAllValue(options: any[]) {\n if (!this.selectAllValue || options !== this.selectAllValue.options) {\n const flatOptions: any[] = [];\n options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));\n\n this.selectAllValue = {\n options,\n value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),\n };\n }\n\n return this.selectAllValue.value;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { FormlyFieldSelect } from './select.type';\nimport { MatPseudoCheckboxModule } from '@angular/material/core';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatPseudoCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n }),\n ],\n})\nexport class FormlyMatSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoDa,0BAA0B,SAA0B;IA/CjE;;QAgDE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,OAAO,EAAE,EAAE;gBACX,WAAW,CAAC,EAAO,EAAE,EAAO;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;aACF;SACF,CAAC;KA+CH;IA3CC,iBAAiB,CAAC,OAAc;QAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACzC,OAAO,IAAI,CAAC;SACb;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;KACnG;IAED,eAAe,CAAC,OAAc;QAC5B,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,GAAG,cAAc,GAAG,EAAE,CAAC,CAAC;QAC5G,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;KAChC;IAED,MAAM,CAAC,MAAuB;;QAC5B,MAAA,MAAA,IAAI,CAAC,EAAE,EAAC,MAAM,mDAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC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jBY,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,iBArBjB,iBAAiB,aAE9B,YAAY;QACZ,mBAAmB;QACnB,eAAe;QACf,uBAAuB;QAEvB,wBAAwB;QACxB,kBAAkB;mHAaT,qBAAqB,YApBvB;YACP,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,uBAAuB;YAEvB,wBAAwB;YACxB,kBAAkB;YAClB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;oBACD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;iBACpC;aACF,CAAC;SACH;2FAEU,qBAAqB;kBAtBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,uBAAuB;wBAEvB,wBAAwB;wBACxB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,QAAQ;oCACd,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;gCACD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;6BACpC;yBACF,CAAC;qBACH;iBACF;;;ACjCD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-select.mjs","sources":["../../../../src/ui/material/select/src/select.type.ts","../../../../src/ui/material/select/src/select.module.ts","../../../../src/ui/material/select/src/ngx-formly-material-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { MatSelectChange } from '@angular/material/select';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n selectAllOption?: string;\n disableOptionCentering?: boolean;\n typeaheadDebounceInterval?: number;\n compareWith?: (o1: any, o2: any) => boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-mat-select',\n template: `\n <ng-template #selectAll let-selectOptions=\"selectOptions\">\n <mat-option (click)=\"toggleSelectAll(selectOptions)\">\n <mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"getSelectAllState(selectOptions)\">\n </mat-pseudo-checkbox>\n {{ props.selectAllOption }}\n </mat-option>\n </ng-template>\n\n <mat-select\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"props.placeholder\"\n [tabIndex]=\"props.tabindex\"\n [required]=\"required\"\n [compareWith]=\"props.compareWith\"\n [multiple]=\"props.multiple\"\n (selectionChange)=\"change($event)\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [aria-label]=\"_getAriaLabel()\"\n [aria-labelledby]=\"_getAriaLabelledby()\"\n [disableOptionCentering]=\"props.disableOptionCentering\"\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\n >\n <ng-container *ngIf=\"props.options | formlySelectOptions: field | async as selectOptions\">\n <ng-container\n *ngIf=\"props.multiple && props.selectAllOption\"\n [ngTemplateOutlet]=\"selectAll\"\n [ngTemplateOutletContext]=\"{ selectOptions: selectOptions }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let item of selectOptions\">\n <mat-optgroup *ngIf=\"item.group\" [label]=\"item.label\">\n <mat-option *ngFor=\"let child of item.group\" [value]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </mat-option>\n </mat-optgroup>\n <mat-option *ngIf=\"!item.group\" [value]=\"item.value\" [disabled]=\"item.disabled\">{{ item.label }}</mat-option>\n </ng-container>\n </ng-container>\n </mat-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n private selectAllValue!: { options: any; value: any[] };\n\n getSelectAllState(options: any[]) {\n if (this.empty || this.value.length === 0) {\n return null;\n }\n\n return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';\n }\n\n toggleSelectAll(options: any[]) {\n const selectAllValue = this.getSelectAllValue(options);\n this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);\n this.formControl.markAsDirty();\n }\n\n change($event: MatSelectChange) {\n this.props.change?.(this.field, $event);\n }\n\n _getAriaLabelledby() {\n if (this.props.attributes?.['aria-labelledby']) {\n return this.props.attributes['aria-labelledby'] as string;\n }\n\n return this.formField?._labelId;\n }\n\n _getAriaLabel() {\n return this.props.attributes?.['aria-label'] as string;\n }\n\n private getSelectAllValue(options: any[]) {\n if (!this.selectAllValue || options !== this.selectAllValue.options) {\n const flatOptions: any[] = [];\n options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));\n\n this.selectAllValue = {\n options,\n value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),\n };\n }\n\n return this.selectAllValue.value;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { FormlyFieldSelect } from './select.type';\nimport { MatPseudoCheckboxModule } from '@angular/material/core';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatPseudoCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n }),\n ],\n})\nexport class FormlyMatSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;AAiEM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AA/C9E,IAAA,WAAA,GAAA;;QAgDW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;AACF,aAAA;SACF,CAAC;KA+CH;AA3CC,IAAA,iBAAiB,CAAC,OAAc,EAAA;QAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACzC,YAAA,OAAO,IAAI,CAAC;AACb,SAAA;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;KACnG;AAED,IAAA,eAAe,CAAC,OAAc,EAAA;QAC5B,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AACvD,QAAA,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,GAAG,cAAc,GAAG,EAAE,CAAC,CAAC;AAC5G,QAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;KAChC;AAED,IAAA,MAAM,CAAC,MAAuB,EAAA;;AAC5B,QAAA,CAAA,EAAA,GAAA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kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;ACjCD;;AAEG;;;;"}
|
|
@@ -13,7 +13,7 @@ class FormlyFieldSlider extends FieldType {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.defaultOptions = {
|
|
16
|
-
|
|
16
|
+
props: {
|
|
17
17
|
hideFieldUnderline: true,
|
|
18
18
|
floatLabel: 'always',
|
|
19
19
|
thumbLabel: false,
|
|
@@ -25,30 +25,30 @@ class FormlyFieldSlider extends FieldType {
|
|
|
25
25
|
super.onContainerClick(event);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
29
|
-
FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
28
|
+
FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldSlider, selector: "formly-field-mat-slider", viewQueries: [{ propertyName: "slider", first: true, predicate: MatSlider, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
30
30
|
<mat-slider
|
|
31
31
|
[id]="id"
|
|
32
32
|
[style.width]="'100%'"
|
|
33
33
|
[formControl]="formControl"
|
|
34
34
|
[formlyAttributes]="field"
|
|
35
|
-
[tabIndex]="
|
|
36
|
-
[color]="
|
|
37
|
-
[displayWith]="
|
|
38
|
-
[invert]="
|
|
39
|
-
[max]="
|
|
40
|
-
[min]="
|
|
41
|
-
[step]="
|
|
42
|
-
[thumbLabel]="
|
|
43
|
-
[tickInterval]="
|
|
44
|
-
[valueText]="
|
|
45
|
-
[vertical]="
|
|
46
|
-
(input)="
|
|
47
|
-
(change)="
|
|
35
|
+
[tabIndex]="props.tabindex"
|
|
36
|
+
[color]="props.color"
|
|
37
|
+
[displayWith]="props.displayWith"
|
|
38
|
+
[invert]="props.invert"
|
|
39
|
+
[max]="props.max"
|
|
40
|
+
[min]="props.min"
|
|
41
|
+
[step]="props.step"
|
|
42
|
+
[thumbLabel]="props.thumbLabel"
|
|
43
|
+
[tickInterval]="props.tickInterval"
|
|
44
|
+
[valueText]="props.valueText"
|
|
45
|
+
[vertical]="props.vertical"
|
|
46
|
+
(input)="props.input && props.input(field, $event)"
|
|
47
|
+
(change)="props.change && props.change(field, $event)"
|
|
48
48
|
>
|
|
49
49
|
</mat-slider>
|
|
50
50
|
`, isInline: true, components: [{ type: i1.MatSlider, selector: "mat-slider", inputs: ["disabled", "color", "tabIndex", "invert", "max", "min", "step", "thumbLabel", "tickInterval", "value", "displayWith", "valueText", "vertical"], outputs: ["change", "input", "valueChange"], exportAs: ["matSlider"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldSlider, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: 'formly-field-mat-slider',
|
|
@@ -58,19 +58,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
58
58
|
[style.width]="'100%'"
|
|
59
59
|
[formControl]="formControl"
|
|
60
60
|
[formlyAttributes]="field"
|
|
61
|
-
[tabIndex]="
|
|
62
|
-
[color]="
|
|
63
|
-
[displayWith]="
|
|
64
|
-
[invert]="
|
|
65
|
-
[max]="
|
|
66
|
-
[min]="
|
|
67
|
-
[step]="
|
|
68
|
-
[thumbLabel]="
|
|
69
|
-
[tickInterval]="
|
|
70
|
-
[valueText]="
|
|
71
|
-
[vertical]="
|
|
72
|
-
(input)="
|
|
73
|
-
(change)="
|
|
61
|
+
[tabIndex]="props.tabindex"
|
|
62
|
+
[color]="props.color"
|
|
63
|
+
[displayWith]="props.displayWith"
|
|
64
|
+
[invert]="props.invert"
|
|
65
|
+
[max]="props.max"
|
|
66
|
+
[min]="props.min"
|
|
67
|
+
[step]="props.step"
|
|
68
|
+
[thumbLabel]="props.thumbLabel"
|
|
69
|
+
[tickInterval]="props.tickInterval"
|
|
70
|
+
[valueText]="props.valueText"
|
|
71
|
+
[vertical]="props.vertical"
|
|
72
|
+
(input)="props.input && props.input(field, $event)"
|
|
73
|
+
(change)="props.change && props.change(field, $event)"
|
|
74
74
|
>
|
|
75
75
|
</mat-slider>
|
|
76
76
|
`,
|
|
@@ -83,12 +83,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
83
83
|
|
|
84
84
|
class FormlyMatSliderModule {
|
|
85
85
|
}
|
|
86
|
-
FormlyMatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
87
|
-
FormlyMatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
86
|
+
FormlyMatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
87
|
+
FormlyMatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
|
|
88
88
|
ReactiveFormsModule,
|
|
89
89
|
MatSliderModule,
|
|
90
90
|
FormlyMatFormFieldModule, i3.FormlyModule] });
|
|
91
|
-
FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
91
|
+
FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSliderModule, imports: [[
|
|
92
92
|
CommonModule,
|
|
93
93
|
ReactiveFormsModule,
|
|
94
94
|
MatSliderModule,
|
|
@@ -103,7 +103,7 @@ FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
103
103
|
],
|
|
104
104
|
}),
|
|
105
105
|
]] });
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatSliderModule, decorators: [{
|
|
107
107
|
type: NgModule,
|
|
108
108
|
args: [{
|
|
109
109
|
declarations: [FormlyFieldSlider],
|
|
@@ -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.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatSlider } from '@angular/material/slider';\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.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 { MatSlider, MatSliderChange } from '@angular/material/slider';\n\ninterface SliderProps extends FormlyFieldProps {\n displayWith?: (value: number) => string | number;\n invert?: boolean;\n thumbLabel?: boolean;\n tickInterval?: number;\n valueText?: string;\n vertical?: boolean;\n input?: (field: FormlyFieldConfig<SliderProps>, $event: MatSliderChange) => void;\n change?: (field: FormlyFieldConfig<SliderProps>, $event: MatSliderChange) => 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 [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [color]=\"props.color\"\n [displayWith]=\"props.displayWith\"\n [invert]=\"props.invert\"\n [max]=\"props.max\"\n [min]=\"props.min\"\n [step]=\"props.step\"\n [thumbLabel]=\"props.thumbLabel\"\n [tickInterval]=\"props.tickInterval\"\n [valueText]=\"props.valueText\"\n [vertical]=\"props.vertical\"\n (input)=\"props.input && props.input(field, $event)\"\n (change)=\"props.change && props.change(field, $event)\"\n >\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig<SliderProps>> {\n @ViewChild(MatSlider, { static: true }) slider!: MatSlider;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n thumbLabel: false,\n },\n };\n\n override onContainerClick(event: MouseEvent): void {\n this.slider.focus();\n super.onContainerClick(event);\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';\n\nimport { FormlyFieldSlider } from './slider.type';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSliderModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA8CM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AA1B9E,IAAA,WAAA,GAAA;;QA4BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,UAAU,EAAE,KAAK;AAClB,aAAA;SACF,CAAC;KAMH;AAJU,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AACpB,QAAA,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;;+GAbU,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MA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;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -14,15 +14,15 @@ class FormlyFieldTextArea extends FieldType {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.defaultOptions = {
|
|
17
|
-
|
|
17
|
+
props: {
|
|
18
18
|
cols: 1,
|
|
19
19
|
rows: 1,
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
25
|
-
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
24
|
+
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldTextArea, selector: "formly-field-mat-textarea", providers: [
|
|
26
26
|
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
27
27
|
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
28
28
|
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
@@ -30,23 +30,23 @@ FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
30
30
|
<textarea
|
|
31
31
|
matInput
|
|
32
32
|
[id]="id"
|
|
33
|
-
[readonly]="
|
|
34
|
-
[required]="
|
|
33
|
+
[readonly]="props.readonly"
|
|
34
|
+
[required]="required"
|
|
35
35
|
[formControl]="formControl"
|
|
36
36
|
[errorStateMatcher]="errorStateMatcher"
|
|
37
|
-
[cols]="
|
|
38
|
-
[rows]="
|
|
37
|
+
[cols]="props.cols"
|
|
38
|
+
[rows]="props.rows"
|
|
39
39
|
[formlyAttributes]="field"
|
|
40
|
-
[placeholder]="
|
|
41
|
-
[tabindex]="
|
|
42
|
-
[cdkTextareaAutosize]="
|
|
43
|
-
[cdkAutosizeMinRows]="
|
|
44
|
-
[cdkAutosizeMaxRows]="
|
|
45
|
-
[class.cdk-textarea-autosize]="
|
|
40
|
+
[placeholder]="props.placeholder"
|
|
41
|
+
[tabindex]="props.tabindex"
|
|
42
|
+
[cdkTextareaAutosize]="props.autosize"
|
|
43
|
+
[cdkAutosizeMinRows]="props.autosizeMinRows"
|
|
44
|
+
[cdkAutosizeMaxRows]="props.autosizeMaxRows"
|
|
45
|
+
[class.cdk-textarea-autosize]="props.autosize"
|
|
46
46
|
>
|
|
47
47
|
</textarea>
|
|
48
|
-
`, isInline: true, directives: [{ type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
48
|
+
`, isInline: true, directives: [{ type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{
|
|
52
52
|
selector: 'formly-field-mat-textarea',
|
|
@@ -54,19 +54,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
54
54
|
<textarea
|
|
55
55
|
matInput
|
|
56
56
|
[id]="id"
|
|
57
|
-
[readonly]="
|
|
58
|
-
[required]="
|
|
57
|
+
[readonly]="props.readonly"
|
|
58
|
+
[required]="required"
|
|
59
59
|
[formControl]="formControl"
|
|
60
60
|
[errorStateMatcher]="errorStateMatcher"
|
|
61
|
-
[cols]="
|
|
62
|
-
[rows]="
|
|
61
|
+
[cols]="props.cols"
|
|
62
|
+
[rows]="props.rows"
|
|
63
63
|
[formlyAttributes]="field"
|
|
64
|
-
[placeholder]="
|
|
65
|
-
[tabindex]="
|
|
66
|
-
[cdkTextareaAutosize]="
|
|
67
|
-
[cdkAutosizeMinRows]="
|
|
68
|
-
[cdkAutosizeMaxRows]="
|
|
69
|
-
[class.cdk-textarea-autosize]="
|
|
64
|
+
[placeholder]="props.placeholder"
|
|
65
|
+
[tabindex]="props.tabindex"
|
|
66
|
+
[cdkTextareaAutosize]="props.autosize"
|
|
67
|
+
[cdkAutosizeMinRows]="props.autosizeMinRows"
|
|
68
|
+
[cdkAutosizeMaxRows]="props.autosizeMaxRows"
|
|
69
|
+
[class.cdk-textarea-autosize]="props.autosize"
|
|
70
70
|
>
|
|
71
71
|
</textarea>
|
|
72
72
|
`,
|
|
@@ -81,12 +81,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
81
81
|
|
|
82
82
|
class FormlyMatTextAreaModule {
|
|
83
83
|
}
|
|
84
|
-
FormlyMatTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
85
|
-
FormlyMatTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
84
|
+
FormlyMatTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
85
|
+
FormlyMatTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
|
|
86
86
|
ReactiveFormsModule,
|
|
87
87
|
MatInputModule,
|
|
88
88
|
FormlyMatFormFieldModule, i4.FormlyModule] });
|
|
89
|
-
FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
89
|
+
FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatTextAreaModule, imports: [[
|
|
90
90
|
CommonModule,
|
|
91
91
|
ReactiveFormsModule,
|
|
92
92
|
MatInputModule,
|
|
@@ -101,7 +101,7 @@ FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
101
101
|
],
|
|
102
102
|
}),
|
|
103
103
|
]] });
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatTextAreaModule, decorators: [{
|
|
105
105
|
type: NgModule,
|
|
106
106
|
args: [{
|
|
107
107
|
declarations: [FormlyFieldTextArea],
|
|
@@ -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.module.ts","../../../../src/ui/material/textarea/src/ngx-formly-material-textarea.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy,
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-textarea.mjs","sources":["../../../../src/ui/material/textarea/src/textarea.type.ts","../../../../src/ui/material/textarea/src/textarea.module.ts","../../../../src/ui/material/textarea/src/ngx-formly-material-textarea.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 [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 >\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})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\n cols: 1,\n rows: 1,\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';\n\n@NgModule({\n declarations: [FormlyFieldTextArea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA4CM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA7BlF,IAAA,WAAA,GAAA;;QA8BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,CAAC;AACR,aAAA;SACF,CAAC;KACH;;iHAPY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,EAPnB,QAAA,EAAA,2BAAA,EAAA,SAAA,EAAA;;;AAGT,QAAA,EAAE,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,mBAAmB,EAAE;KACxE,EAxBS,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;AAmBT,EAAA,C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mB;wBACnB,cAAc;wBAEd,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -13,7 +13,7 @@ class FormlyFieldToggle extends FieldType {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.defaultOptions = {
|
|
16
|
-
|
|
16
|
+
props: {
|
|
17
17
|
hideFieldUnderline: true,
|
|
18
18
|
floatLabel: 'always',
|
|
19
19
|
hideLabel: true,
|
|
@@ -25,21 +25,21 @@ class FormlyFieldToggle extends FieldType {
|
|
|
25
25
|
super.onContainerClick(event);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
29
|
-
FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
28
|
+
FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldToggle, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
30
30
|
<mat-slide-toggle
|
|
31
31
|
[id]="id"
|
|
32
32
|
[formControl]="formControl"
|
|
33
33
|
[formlyAttributes]="field"
|
|
34
|
-
[color]="
|
|
35
|
-
[tabIndex]="
|
|
36
|
-
[required]="
|
|
37
|
-
[labelPosition]="
|
|
34
|
+
[color]="props.color"
|
|
35
|
+
[tabIndex]="props.tabindex"
|
|
36
|
+
[required]="required"
|
|
37
|
+
[labelPosition]="props.labelPosition"
|
|
38
38
|
>
|
|
39
|
-
{{
|
|
39
|
+
{{ props.label }}
|
|
40
40
|
</mat-slide-toggle>
|
|
41
41
|
`, isInline: true, components: [{ type: i1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i1.MatSlideToggleRequiredValidator, selector: "mat-slide-toggle[required][formControlName], mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldToggle, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{
|
|
45
45
|
selector: 'formly-field-mat-toggle',
|
|
@@ -48,12 +48,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
48
48
|
[id]="id"
|
|
49
49
|
[formControl]="formControl"
|
|
50
50
|
[formlyAttributes]="field"
|
|
51
|
-
[color]="
|
|
52
|
-
[tabIndex]="
|
|
53
|
-
[required]="
|
|
54
|
-
[labelPosition]="
|
|
51
|
+
[color]="props.color"
|
|
52
|
+
[tabIndex]="props.tabindex"
|
|
53
|
+
[required]="required"
|
|
54
|
+
[labelPosition]="props.labelPosition"
|
|
55
55
|
>
|
|
56
|
-
{{
|
|
56
|
+
{{ props.label }}
|
|
57
57
|
</mat-slide-toggle>
|
|
58
58
|
`,
|
|
59
59
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -65,12 +65,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
65
65
|
|
|
66
66
|
class FormlyMatToggleModule {
|
|
67
67
|
}
|
|
68
|
-
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
69
|
-
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
68
|
+
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
69
|
+
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyFieldToggle], imports: [CommonModule,
|
|
70
70
|
ReactiveFormsModule,
|
|
71
71
|
MatSlideToggleModule,
|
|
72
72
|
FormlyMatFormFieldModule, i3.FormlyModule] });
|
|
73
|
-
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
73
|
+
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatToggleModule, imports: [[
|
|
74
74
|
CommonModule,
|
|
75
75
|
ReactiveFormsModule,
|
|
76
76
|
MatSlideToggleModule,
|
|
@@ -85,7 +85,7 @@ FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
85
85
|
],
|
|
86
86
|
}),
|
|
87
87
|
]] });
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
|
|
89
89
|
type: NgModule,
|
|
90
90
|
args: [{
|
|
91
91
|
declarations: [FormlyFieldToggle],
|