@ngx-formly/material 6.0.0-next.5 → 6.0.0-next.8
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 +11 -9
- package/checkbox/checkbox.type.d.ts +2 -1
- package/datepicker/datepicker.module.d.ts +1 -1
- package/datepicker/datepicker.type.d.ts +9 -4
- package/datepicker/public_api.d.ts +1 -0
- package/esm2020/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/checkbox/checkbox.type.mjs +4 -4
- package/esm2020/datepicker/datepicker.module.mjs +9 -9
- package/esm2020/datepicker/datepicker.type.mjs +29 -13
- package/esm2020/datepicker/public_api.mjs +2 -1
- package/esm2020/form-field/field.type.mjs +6 -6
- package/esm2020/form-field/form-field.module.mjs +4 -4
- package/esm2020/form-field/form-field.wrapper.mjs +5 -5
- package/esm2020/input/input.module.mjs +4 -4
- package/esm2020/input/input.type.mjs +5 -5
- package/esm2020/lib/ui-material.module.mjs +4 -4
- package/esm2020/multicheckbox/multicheckbox.module.mjs +4 -4
- package/esm2020/multicheckbox/multicheckbox.type.mjs +9 -6
- package/esm2020/native-select/native-select.module.mjs +4 -4
- package/esm2020/native-select/native-select.type.mjs +5 -5
- package/esm2020/radio/radio.module.mjs +4 -4
- package/esm2020/radio/radio.type.mjs +4 -4
- package/esm2020/select/select.module.mjs +4 -4
- package/esm2020/select/select.type.mjs +5 -5
- package/esm2020/slider/public_api.mjs +2 -1
- package/esm2020/slider/slider.module.mjs +9 -9
- package/esm2020/slider/slider.type.mjs +5 -5
- package/esm2020/textarea/textarea.module.mjs +4 -4
- package/esm2020/textarea/textarea.type.mjs +5 -5
- package/esm2020/toggle/public_api.mjs +2 -1
- package/esm2020/toggle/toggle.module.mjs +9 -9
- package/esm2020/toggle/toggle.type.mjs +5 -5
- package/fesm2015/ngx-formly-material-checkbox.mjs +7 -7
- package/fesm2015/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-datepicker.mjs +39 -22
- package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-form-field.mjs +16 -14
- package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-input.mjs +8 -8
- package/fesm2015/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-multicheckbox.mjs +12 -9
- package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-native-select.mjs +8 -8
- package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-radio.mjs +7 -7
- package/fesm2015/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-select.mjs +8 -8
- package/fesm2015/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-slider.mjs +12 -12
- package/fesm2015/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-textarea.mjs +8 -8
- package/fesm2015/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-toggle.mjs +12 -12
- package/fesm2015/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2015/ngx-formly-material.mjs +4 -4
- package/fesm2020/ngx-formly-material-checkbox.mjs +7 -7
- package/fesm2020/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-datepicker.mjs +37 -22
- package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-form-field.mjs +14 -14
- package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-input.mjs +8 -8
- package/fesm2020/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-multicheckbox.mjs +12 -9
- package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-native-select.mjs +8 -8
- package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-radio.mjs +7 -7
- package/fesm2020/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-select.mjs +8 -8
- package/fesm2020/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-slider.mjs +12 -12
- package/fesm2020/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-textarea.mjs +8 -8
- package/fesm2020/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-toggle.mjs +12 -12
- package/fesm2020/ngx-formly-material-toggle.mjs.map +1 -1
- package/fesm2020/ngx-formly-material.mjs +4 -4
- package/input/input.type.d.ts +2 -1
- package/multicheckbox/multicheckbox.type.d.ts +2 -1
- package/native-select/native-select.type.d.ts +2 -1
- package/package.json +2 -2
- package/radio/radio.type.d.ts +2 -1
- package/select/select.type.d.ts +5 -4
- package/slider/public_api.d.ts +1 -0
- package/slider/slider.module.d.ts +1 -1
- package/slider/slider.type.d.ts +4 -3
- package/textarea/textarea.type.d.ts +2 -1
- package/toggle/public_api.d.ts +1 -0
- package/toggle/toggle.module.d.ts +1 -1
- package/toggle/toggle.type.d.ts +4 -3
|
@@ -17,8 +17,8 @@ export class FormlyFieldTextArea extends FieldType {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
21
|
-
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
20
|
+
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyFieldTextArea, selector: "formly-field-mat-textarea", providers: [
|
|
22
22
|
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
23
23
|
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
24
24
|
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
@@ -41,8 +41,8 @@ FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
41
41
|
[class.cdk-textarea-autosize]="to.autosize"
|
|
42
42
|
>
|
|
43
43
|
</textarea>
|
|
44
|
-
`, 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 });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
44
|
+
`, 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 });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{
|
|
48
48
|
selector: 'formly-field-mat-textarea',
|
|
@@ -74,4 +74,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
74
74
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
75
75
|
}]
|
|
76
76
|
}] });
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dGFyZWEudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2Vz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QXV0b3NpemVNYXhSb3dzXT1cInRvLmF1dG9zaXplTWF4Um93c1wiXG4gICAgICBbY2xhc3MuY2RrLXRleHRhcmVhLWF1dG9zaXplXT1cInRvLmF1dG9zaXplXCJcbiAgICA+XG4gICAgPC90ZXh0YXJlYT5cbiAgYCxcbiAgcHJvdmlkZXJzOiBbXG4gICAgLy8gZml4IGZvciBodHRwczovL2dpdGh1Yi5jb20vbmd4LWZvcm1seS9uZ3gtZm9ybWx5L2lzc3Vlcy8xNjg4XG4gICAgLy8gcmVseSBvbiBmb3JtQ29udHJvbCB2YWx1ZSBpbnN0ZWFkIG9mIGVsZW1lbnRSZWYgd2hpY2ggcmV0dXJuIGVtcHR5IHZhbHVlIGluIEZpcmVmb3guXG4gICAgeyBwcm92aWRlOiBNQVRfSU5QVVRfVkFMVUVfQUNDRVNTT1IsIHVzZUV4aXN0aW5nOiBGb3JtbHlGaWVsZFRleHRBcmVhIH0sXG4gIF0sXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxufSlcbmV4cG9ydCBjbGFzcyBGb3JtbHlGaWVsZFRleHRBcmVhIGV4dGVuZHMgRmllbGRUeXBlPEZpZWxkVHlwZUNvbmZpZz4gaW1wbGVtZW50cyBPbkluaXQge1xuICBkZWZhdWx0T3B0aW9ucyA9IHtcbiAgICB0ZW1wbGF0ZU9wdGlvbnM6IHtcbiAgICAgIGNvbHM6IDEsXG4gICAgICByb3dzOiAxLFxuICAgIH0sXG4gIH07XG59XG4iXX0=
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { FormlyMatToggleModule } from './toggle.module';
|
|
2
|
-
|
|
2
|
+
export { FormlyFieldToggle } from './toggle.type';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9tYXRlcmlhbC90b2dnbGUvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDeEQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZUFBZSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgRm9ybWx5TWF0VG9nZ2xlTW9kdWxlIH0gZnJvbSAnLi90b2dnbGUubW9kdWxlJztcbmV4cG9ydCB7IEZvcm1seUZpZWxkVG9nZ2xlIH0gZnJvbSAnLi90b2dnbGUudHlwZSc7XG4iXX0=
|
|
@@ -4,17 +4,17 @@ import { FormlyModule } from '@ngx-formly/core';
|
|
|
4
4
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
6
6
|
import { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
7
|
-
import {
|
|
7
|
+
import { FormlyFieldToggle } from './toggle.type';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@ngx-formly/core";
|
|
10
10
|
export class FormlyMatToggleModule {
|
|
11
11
|
}
|
|
12
|
-
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
13
|
-
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
12
|
+
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
+
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyFieldToggle], imports: [CommonModule,
|
|
14
14
|
ReactiveFormsModule,
|
|
15
15
|
MatSlideToggleModule,
|
|
16
16
|
FormlyMatFormFieldModule, i1.FormlyModule] });
|
|
17
|
-
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
17
|
+
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, imports: [[
|
|
18
18
|
CommonModule,
|
|
19
19
|
ReactiveFormsModule,
|
|
20
20
|
MatSlideToggleModule,
|
|
@@ -23,16 +23,16 @@ FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
23
23
|
types: [
|
|
24
24
|
{
|
|
25
25
|
name: 'toggle',
|
|
26
|
-
component:
|
|
26
|
+
component: FormlyFieldToggle,
|
|
27
27
|
wrappers: ['form-field'],
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
}),
|
|
31
31
|
]] });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
|
|
33
33
|
type: NgModule,
|
|
34
34
|
args: [{
|
|
35
|
-
declarations: [
|
|
35
|
+
declarations: [FormlyFieldToggle],
|
|
36
36
|
imports: [
|
|
37
37
|
CommonModule,
|
|
38
38
|
ReactiveFormsModule,
|
|
@@ -42,7 +42,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
42
42
|
types: [
|
|
43
43
|
{
|
|
44
44
|
name: 'toggle',
|
|
45
|
-
component:
|
|
45
|
+
component: FormlyFieldToggle,
|
|
46
46
|
wrappers: ['form-field'],
|
|
47
47
|
},
|
|
48
48
|
],
|
|
@@ -50,4 +50,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
50
50
|
],
|
|
51
51
|
}]
|
|
52
52
|
}] });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9tYXRlcmlhbC90b2dnbGUvc3JjL3RvZ2dsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRTNFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7O0FBb0JsRCxNQUFNLE9BQU8scUJBQXFCOztrSEFBckIscUJBQXFCO21IQUFyQixxQkFBcUIsaUJBakJqQixpQkFBaUIsYUFFOUIsWUFBWTtRQUNaLG1CQUFtQjtRQUNuQixvQkFBb0I7UUFDcEIsd0JBQXdCO21IQVlmLHFCQUFxQixZQWhCdkI7WUFDUCxZQUFZO1lBQ1osbUJBQW1CO1lBQ25CLG9CQUFvQjtZQUNwQix3QkFBd0I7WUFDeEIsWUFBWSxDQUFDLFFBQVEsQ0FBQztnQkFDcEI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bmltcG9ydCB7IEZvcm1seUZpZWxkVG9nZ2xlIH0gZnJvbSAnLi90b2dnbGUudHlwZSc7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW0Zvcm1seUZpZWxkVG9nZ2xlXSxcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZSxcbiAgICBSZWFjdGl2ZUZvcm1zTW9kdWxlLFxuICAgIE1hdFNsaWRlVG9nZ2xlTW9kdWxlLFxuICAgIEZvcm1seU1hdEZvcm1GaWVsZE1vZHVsZSxcbiAgICBGb3JtbHlNb2R1bGUuZm9yQ2hpbGQoe1xuICAgICAgdHlwZXM6IFtcbiAgICAgICAge1xuICAgICAgICAgIG5hbWU6ICd0b2dnbGUnLFxuICAgICAgICAgIGNvbXBvbmVudDogRm9ybWx5RmllbGRUb2dnbGUsXG4gICAgICAgICAgd3JhcHBlcnM6IFsnZm9ybS1maWVsZCddLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9KSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgRm9ybWx5TWF0VG9nZ2xlTW9kdWxlIHt9XG4iXX0=
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
import * as i1 from "@angular/material/slide-toggle";
|
|
6
6
|
import * as i2 from "@angular/forms";
|
|
7
7
|
import * as i3 from "@ngx-formly/core";
|
|
8
|
-
export class
|
|
8
|
+
export class FormlyFieldToggle extends FieldType {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.defaultOptions = {
|
|
@@ -21,8 +21,8 @@ export class FormlyToggleTypeComponent extends FieldType {
|
|
|
21
21
|
super.onContainerClick(event);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyFieldToggle, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
26
26
|
<mat-slide-toggle
|
|
27
27
|
[id]="id"
|
|
28
28
|
[formControl]="formControl"
|
|
@@ -35,7 +35,7 @@ FormlyToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
35
35
|
{{ to.label }}
|
|
36
36
|
</mat-slide-toggle>
|
|
37
37
|
`, 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 });
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldToggle, decorators: [{
|
|
39
39
|
type: Component,
|
|
40
40
|
args: [{
|
|
41
41
|
selector: 'formly-field-mat-toggle',
|
|
@@ -58,4 +58,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
58
58
|
type: ViewChild,
|
|
59
59
|
args: [MatSlideToggle, { static: true }]
|
|
60
60
|
}] } });
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLnR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvdWkvbWF0ZXJpYWwvdG9nZ2xlL3NyYy90b2dnbGUudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUU5RSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDNUQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGdDQUFnQyxDQUFDOzs7OztBQW1CaEUsTUFBTSxPQUFPLGlCQUFrQixTQUFRLFNBQTBCO0lBakJqRTs7UUFtQkUsbUJBQWMsR0FBRztZQUNmLGVBQWUsRUFBRTtnQkFDZixrQkFBa0IsRUFBRSxJQUFJO2dCQUN4QixVQUFVLEVBQUUsUUFBaUI7Z0JBQzdCLFNBQVMsRUFBRSxJQUFJO2FBQ2hCO1NBQ0YsQ0FBQztLQU1IO0lBSkMsZ0JBQWdCLENBQUMsS0FBaUI7UUFDaEMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUN6QixLQUFLLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDaEMsQ0FBQzs7OEdBYlUsaUJBQWlCO2tHQUFqQixpQkFBaUIsNE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BbbGFiZWxQb3NpdGlvbl09XCJ0by5sYWJlbFBvc2l0aW9uXCJcbiAgICA+XG4gICAgICB7eyB0by5sYWJlbCB9fVxuICAgIDwvbWF0LXNsaWRlLXRvZ2dsZT5cbiAgYCxcbiAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXG59KVxuZXhwb3J0IGNsYXNzIEZvcm1seUZpZWxkVG9nZ2xlIGV4dGVuZHMgRmllbGRUeXBlPEZpZWxkVHlwZUNvbmZpZz4ge1xuICBAVmlld0NoaWxkKE1hdFNsaWRlVG9nZ2xlLCB7IHN0YXRpYzogdHJ1ZSB9KSBzbGlkZVRvZ2dsZSE6IE1hdFNsaWRlVG9nZ2xlO1xuICBkZWZhdWx0T3B0aW9ucyA9IHtcbiAgICB0ZW1wbGF0ZU9wdGlvbnM6IHtcbiAgICAgIGhpZGVGaWVsZFVuZGVybGluZTogdHJ1ZSxcbiAgICAgIGZsb2F0TGFiZWw6ICdhbHdheXMnIGFzIGNvbnN0LFxuICAgICAgaGlkZUxhYmVsOiB0cnVlLFxuICAgIH0sXG4gIH07XG5cbiAgb25Db250YWluZXJDbGljayhldmVudDogTW91c2VFdmVudCk6IHZvaWQge1xuICAgIHRoaXMuc2xpZGVUb2dnbGUuZm9jdXMoKTtcbiAgICBzdXBlci5vbkNvbnRhaW5lckNsaWNrKGV2ZW50KTtcbiAgfVxufVxuIl19
|
|
@@ -61,8 +61,8 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
65
|
-
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
64
|
+
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldCheckbox, deps: [{ token: i0.Renderer2 }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyFieldCheckbox, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
66
66
|
<mat-checkbox
|
|
67
67
|
[formControl]="formControl"
|
|
68
68
|
[id]="id"
|
|
@@ -81,7 +81,7 @@ FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
81
81
|
>
|
|
82
82
|
</mat-checkbox>
|
|
83
83
|
`, isInline: true, components: [{ type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
|
|
85
85
|
type: Component,
|
|
86
86
|
args: [{
|
|
87
87
|
selector: 'formly-field-mat-checkbox',
|
|
@@ -113,12 +113,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
113
113
|
|
|
114
114
|
class FormlyMatCheckboxModule {
|
|
115
115
|
}
|
|
116
|
-
FormlyMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
117
|
-
FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
116
|
+
FormlyMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
117
|
+
FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
|
|
118
118
|
ReactiveFormsModule,
|
|
119
119
|
MatCheckboxModule,
|
|
120
120
|
FormlyMatFormFieldModule, i4.FormlyModule] });
|
|
121
|
-
FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
121
|
+
FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatCheckboxModule, imports: [[
|
|
122
122
|
CommonModule,
|
|
123
123
|
ReactiveFormsModule,
|
|
124
124
|
MatCheckboxModule,
|
|
@@ -137,7 +137,7 @@ FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
137
137
|
],
|
|
138
138
|
}),
|
|
139
139
|
]] });
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatCheckboxModule, decorators: [{
|
|
141
141
|
type: NgModule,
|
|
142
142
|
args: [{
|
|
143
143
|
declarations: [FormlyFieldCheckbox],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-checkbox.mjs","sources":["../../../../src/ui/material/checkbox/src/checkbox.type.ts","../../../../src/ui/material/checkbox/src/checkbox.module.ts","../../../../src/ui/material/checkbox/src/ngx-formly-material-checkbox.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n ChangeDetectionStrategy,\n Renderer2,\n AfterViewChecked,\n OnDestroy,\n AfterViewInit,\n} from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'formly-field-mat-checkbox',\n template: `\n <mat-checkbox\n [formControl]=\"formControl\"\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [indeterminate]=\"to.indeterminate && formControl.value == null\"\n [color]=\"to.color\"\n [labelPosition]=\"to.align || to.labelPosition\"\n >\n {{ to.label }}\n <span\n *ngIf=\"to.required && to.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker\"\n >*</span\n >\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldCheckbox
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-checkbox.mjs","sources":["../../../../src/ui/material/checkbox/src/checkbox.type.ts","../../../../src/ui/material/checkbox/src/checkbox.module.ts","../../../../src/ui/material/checkbox/src/ngx-formly-material-checkbox.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n ChangeDetectionStrategy,\n Renderer2,\n AfterViewChecked,\n OnDestroy,\n AfterViewInit,\n} from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'formly-field-mat-checkbox',\n template: `\n <mat-checkbox\n [formControl]=\"formControl\"\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [indeterminate]=\"to.indeterminate && formControl.value == null\"\n [color]=\"to.color\"\n [labelPosition]=\"to.align || to.labelPosition\"\n >\n {{ to.label }}\n <span\n *ngIf=\"to.required && to.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker\"\n >*</span\n >\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldCheckbox\n extends FieldType<FieldTypeConfig>\n implements AfterViewInit, AfterViewChecked, OnDestroy\n{\n @ViewChild(MatCheckbox, { static: true }) checkbox!: MatCheckbox;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n indeterminate: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n align: 'start', // start or end\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n private _required!: boolean;\n constructor(private renderer: Renderer2, private focusMonitor: FocusMonitor) {\n super();\n }\n\n onContainerClick(event: MouseEvent): void {\n this.checkbox.focus();\n super.onContainerClick(event);\n }\n\n ngAfterViewInit() {\n if (this.checkbox) {\n this.focusMonitor.monitor(this.checkbox._inputElement, true).subscribe((focusOrigin) => {\n if (focusOrigin) {\n this.to.focus && this.to.focus(this.field);\n } else {\n this.to.blur && this.to.blur(this.field);\n }\n });\n }\n }\n\n ngAfterViewChecked() {\n if (this.required !== this._required && this.checkbox && this.checkbox._inputElement) {\n this._required = this.required;\n const inputElement = this.checkbox._inputElement.nativeElement;\n if (this.required) {\n this.renderer.setAttribute(inputElement, 'required', 'required');\n } else {\n this.renderer.removeAttribute(inputElement, 'required');\n }\n }\n }\n\n ngOnDestroy() {\n if (this.checkbox) {\n this.focusMonitor.stopMonitoring(this.checkbox._inputElement);\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 { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n }),\n ],\n})\nexport class FormlyMatCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAqCa,4BACH,SAA0B;IAgBlC,YAAoB,QAAmB,EAAU,YAA0B;QACzE,KAAK,EAAE,CAAC;QADU,aAAQ,GAAR,QAAQ,CAAW;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAZ3E,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,aAAa,EAAE,IAAI;gBACnB,UAAU,EAAE,QAAiB;gBAC7B,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,QAAiB;aACzB;SACF,CAAC;KAKD;IAED,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;IAED,eAAe;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW;gBACjF,IAAI,WAAW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,EAAE;;;MCP7B,uBAAuB;;oHAAvB,uBAAuB;qHAAvB,uBAAuB,iBAvBnB,mBAAmB,aAEhC,YAAY;QACZ,mBAAmB;QAEnB,iBAAiB;QAEjB,wBAAwB;qHAgBf,uBAAuB,YAtBzB;YACP,YAAY;YACZ,mBAAmB;YAEnB,iBAAiB;YAEjB,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,UAAU;wBAChB,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,UAAU;qBACpB;iBACF;aACF,CAAC;SACH;2FAEU,uBAAuB;kBAxBnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,iBAAiB;wBAEjB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,UAAU;oCAChB,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;gCACD;oCACE,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,UAAU;iCACpB;6BACF;yBACF,CAAC;qBACH;iBACF;;;ACjCD;;;;;;"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as
|
|
5
|
-
import { FormlyModule } from '@ngx-formly/core';
|
|
6
|
-
import * as
|
|
4
|
+
import * as i1 from '@ngx-formly/core';
|
|
5
|
+
import { ɵobserve, FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import * as i4 from '@angular/forms';
|
|
7
7
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i3 from '@angular/material/input';
|
|
10
10
|
import { MatInputModule } from '@angular/material/input';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i2 from '@angular/material/datepicker';
|
|
12
12
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
13
13
|
|
|
14
|
-
class
|
|
15
|
-
constructor() {
|
|
16
|
-
super(
|
|
14
|
+
class FormlyFieldDatepicker extends FieldType {
|
|
15
|
+
constructor(config) {
|
|
16
|
+
super();
|
|
17
|
+
this.config = config;
|
|
17
18
|
this.defaultOptions = {
|
|
18
19
|
templateOptions: {
|
|
19
20
|
datepickerOptions: {
|
|
@@ -34,10 +35,26 @@ class FormlyDatepickerTypeComponent extends FieldType {
|
|
|
34
35
|
ngAfterViewInit() {
|
|
35
36
|
super.ngAfterViewInit();
|
|
36
37
|
this.to[this.to.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;
|
|
38
|
+
// temporary fix for https://github.com/angular/components/issues/16761
|
|
39
|
+
if (this.config.getValidatorMessage('matDatepickerParse')) {
|
|
40
|
+
this.fieldErrorsObserver = ɵobserve(this.field, ['formControl', 'errors'], ({ currentValue }) => {
|
|
41
|
+
var _a;
|
|
42
|
+
if (currentValue.required && currentValue.matDatepickerParse) {
|
|
43
|
+
const errors = Object.keys(currentValue)
|
|
44
|
+
.sort((prop) => (prop === 'matDatepickerParse' ? -1 : 0))
|
|
45
|
+
.reduce((errors, prop) => (Object.assign(Object.assign({}, errors), { [prop]: currentValue[prop] })), {});
|
|
46
|
+
(_a = this.fieldErrorsObserver) === null || _a === void 0 ? void 0 : _a.setValue(errors);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
ngOnDestroy() {
|
|
52
|
+
var _a;
|
|
53
|
+
(_a = this.fieldErrorsObserver) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
37
54
|
}
|
|
38
55
|
}
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
FormlyFieldDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldDatepicker, deps: [{ token: i1.FormlyConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyFieldDatepicker, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
41
58
|
<input
|
|
42
59
|
matInput
|
|
43
60
|
[id]="id"
|
|
@@ -73,8 +90,8 @@ FormlyDatepickerTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
73
90
|
(yearSelected)="to.datepickerOptions.yearSelected(field, $event, picker)"
|
|
74
91
|
>
|
|
75
92
|
</mat-datepicker>
|
|
76
|
-
`, isInline: true, components: [{ type:
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
93
|
+
`, isInline: true, components: [{ type: i2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i3.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: i4.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: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
|
|
78
95
|
type: Component,
|
|
79
96
|
args: [{
|
|
80
97
|
selector: 'formly-field-mat-datepicker',
|
|
@@ -117,20 +134,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
117
134
|
`,
|
|
118
135
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
119
136
|
}]
|
|
120
|
-
}], propDecorators: { datepickerToggle: [{
|
|
137
|
+
}], ctorParameters: function () { return [{ type: i1.FormlyConfig }]; }, propDecorators: { datepickerToggle: [{
|
|
121
138
|
type: ViewChild,
|
|
122
139
|
args: ['datepickerToggle', { static: true }]
|
|
123
140
|
}] } });
|
|
124
141
|
|
|
125
142
|
class FormlyMatDatepickerModule {
|
|
126
143
|
}
|
|
127
|
-
FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
128
|
-
FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
144
|
+
FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
145
|
+
FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
|
|
129
146
|
ReactiveFormsModule,
|
|
130
147
|
MatInputModule,
|
|
131
148
|
MatDatepickerModule,
|
|
132
|
-
FormlyMatFormFieldModule,
|
|
133
|
-
FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
149
|
+
FormlyMatFormFieldModule, i1.FormlyModule] });
|
|
150
|
+
FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
|
|
134
151
|
CommonModule,
|
|
135
152
|
ReactiveFormsModule,
|
|
136
153
|
MatInputModule,
|
|
@@ -140,16 +157,16 @@ FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0
|
|
|
140
157
|
types: [
|
|
141
158
|
{
|
|
142
159
|
name: 'datepicker',
|
|
143
|
-
component:
|
|
160
|
+
component: FormlyFieldDatepicker,
|
|
144
161
|
wrappers: ['form-field'],
|
|
145
162
|
},
|
|
146
163
|
],
|
|
147
164
|
}),
|
|
148
165
|
]] });
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
|
|
150
167
|
type: NgModule,
|
|
151
168
|
args: [{
|
|
152
|
-
declarations: [
|
|
169
|
+
declarations: [FormlyFieldDatepicker],
|
|
153
170
|
imports: [
|
|
154
171
|
CommonModule,
|
|
155
172
|
ReactiveFormsModule,
|
|
@@ -160,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
160
177
|
types: [
|
|
161
178
|
{
|
|
162
179
|
name: 'datepicker',
|
|
163
|
-
component:
|
|
180
|
+
component: FormlyFieldDatepicker,
|
|
164
181
|
wrappers: ['form-field'],
|
|
165
182
|
},
|
|
166
183
|
],
|
|
@@ -173,5 +190,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
173
190
|
* Generated bundle index. Do not edit.
|
|
174
191
|
*/
|
|
175
192
|
|
|
176
|
-
export { FormlyMatDatepickerModule };
|
|
193
|
+
export { FormlyFieldDatepicker, FormlyMatDatepickerModule };
|
|
177
194
|
//# sourceMappingURL=ngx-formly-material-datepicker.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-datepicker.mjs","sources":["../../../../src/ui/material/datepicker/src/datepicker.type.ts","../../../../src/ui/material/datepicker/src/datepicker.module.ts","../../../../src/ui/material/datepicker/src/ngx-formly-material-datepicker.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, AfterViewInit, TemplateRef } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-datepicker',\n template: `\n <input\n matInput\n [id]=\"id\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"to.datepickerOptions.filter\"\n [max]=\"to.datepickerOptions.max\"\n [min]=\"to.datepickerOptions.min\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"to.placeholder\"\n [tabindex]=\"to.tabindex\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n (dateInput)=\"to.datepickerOptions.dateInput(field, $event)\"\n (dateChange)=\"to.datepickerOptions.dateChange(field, $event)\"\n />\n <ng-template #datepickerToggle>\n <mat-datepicker-toggle (click)=\"detectChanges()\" [disabled]=\"to.disabled\" [for]=\"picker\"></mat-datepicker-toggle>\n </ng-template>\n <mat-datepicker\n #picker\n [color]=\"to.color\"\n [dateClass]=\"to.datepickerOptions.dateClass\"\n [disabled]=\"to.datepickerOptions.disabled\"\n [opened]=\"to.datepickerOptions.opened\"\n [panelClass]=\"to.datepickerOptions.panelClass\"\n [startAt]=\"to.datepickerOptions.startAt\"\n [startView]=\"to.datepickerOptions.startView\"\n [touchUi]=\"to.datepickerOptions.touchUi\"\n [calendarHeaderComponent]=\"to.datepickerOptions.calendarHeaderComponent\"\n (monthSelected)=\"to.datepickerOptions.monthSelected(field, $event, picker)\"\n (yearSelected)=\"to.datepickerOptions.yearSelected(field, $event, picker)\"\n >\n </mat-datepicker>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-datepicker.mjs","sources":["../../../../src/ui/material/datepicker/src/datepicker.type.ts","../../../../src/ui/material/datepicker/src/datepicker.module.ts","../../../../src/ui/material/datepicker/src/ngx-formly-material-datepicker.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, AfterViewInit, OnDestroy, TemplateRef } from '@angular/core';\nimport { FieldTypeConfig, FormlyConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-datepicker',\n template: `\n <input\n matInput\n [id]=\"id\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"to.datepickerOptions.filter\"\n [max]=\"to.datepickerOptions.max\"\n [min]=\"to.datepickerOptions.min\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"to.placeholder\"\n [tabindex]=\"to.tabindex\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n (dateInput)=\"to.datepickerOptions.dateInput(field, $event)\"\n (dateChange)=\"to.datepickerOptions.dateChange(field, $event)\"\n />\n <ng-template #datepickerToggle>\n <mat-datepicker-toggle (click)=\"detectChanges()\" [disabled]=\"to.disabled\" [for]=\"picker\"></mat-datepicker-toggle>\n </ng-template>\n <mat-datepicker\n #picker\n [color]=\"to.color\"\n [dateClass]=\"to.datepickerOptions.dateClass\"\n [disabled]=\"to.datepickerOptions.disabled\"\n [opened]=\"to.datepickerOptions.opened\"\n [panelClass]=\"to.datepickerOptions.panelClass\"\n [startAt]=\"to.datepickerOptions.startAt\"\n [startView]=\"to.datepickerOptions.startView\"\n [touchUi]=\"to.datepickerOptions.touchUi\"\n [calendarHeaderComponent]=\"to.datepickerOptions.calendarHeaderComponent\"\n (monthSelected)=\"to.datepickerOptions.monthSelected(field, $event, picker)\"\n (yearSelected)=\"to.datepickerOptions.yearSelected(field, $event, picker)\"\n >\n </mat-datepicker>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldDatepicker extends FieldType<FieldTypeConfig> implements AfterViewInit, OnDestroy {\n @ViewChild('datepickerToggle', { static: true }) datepickerToggle!: TemplateRef<any>;\n\n defaultOptions = {\n templateOptions: {\n datepickerOptions: {\n startView: 'month',\n datepickerTogglePosition: 'suffix',\n dateInput: () => {},\n dateChange: () => {},\n monthSelected: () => {},\n yearSelected: () => {},\n },\n },\n };\n private fieldErrorsObserver!: ReturnType<typeof observe>;\n\n constructor(private config: FormlyConfig) {\n super();\n }\n\n detectChanges() {\n this.options.detectChanges?.(this.field);\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.to[this.to.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;\n\n // temporary fix for https://github.com/angular/components/issues/16761\n if (this.config.getValidatorMessage('matDatepickerParse')) {\n this.fieldErrorsObserver = observe<any>(this.field, ['formControl', 'errors'], ({ currentValue }) => {\n if (currentValue.required && currentValue.matDatepickerParse) {\n const errors = Object.keys(currentValue)\n .sort((prop) => (prop === 'matDatepickerParse' ? -1 : 0))\n .reduce((errors, prop) => ({ ...errors, [prop]: currentValue[prop] }), {});\n\n this.fieldErrorsObserver?.setValue(errors);\n }\n });\n }\n }\n\n ngOnDestroy() {\n this.fieldErrorsObserver?.unsubscribe();\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';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { FormlyFieldDatepicker } from './datepicker.type';\n\n@NgModule({\n declarations: [FormlyFieldDatepicker],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDatepickerModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'datepicker',\n component: FormlyFieldDatepicker,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatDatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe"],"mappings":";;;;;;;;;;;;;MA6Ca,8BAA8B,SAA0B;IAiBnE,YAAoB,MAAoB;QACtC,KAAK,EAAE,CAAC;QADU,WAAM,GAAN,MAAM,CAAc;QAdxC,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,iBAAiB,EAAE;oBACjB,SAAS,EAAE,OAAO;oBAClB,wBAAwB,EAAE,QAAQ;oBAClC,SAAS,EAAE,SAAQ;oBACnB,UAAU,EAAE,SAAQ;oBACpB,aAAa,EAAE,SAAQ;oBACvB,YAAY,EAAE,SAAQ;iBACvB;aACF;SACF,CAAC;KAKD;IAED,aAAa;;QACX,MAAA,MAAA,IAAI,CAAC,OAAO,EAAC,aAAa,mDAAG,IAAI,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,eAAe;QACb,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,EAA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yBAAyB;uHAAzB,yBAAyB,iBAnBrB,qBAAqB,aAElC,YAAY;QACZ,mBAAmB;QACnB,cAAc;QACd,mBAAmB;QAEnB,wBAAwB;uHAYf,yBAAyB,YAlB3B;YACP,YAAY;YACZ,mBAAmB;YACnB,cAAc;YACd,mBAAmB;YAEnB,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,YAAY;wBAClB,SAAS,EAAE,qBAAqB;wBAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,yBAAyB;kBApBrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBAEnB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,YAAY;oCAClB,SAAS,EAAE,qBAAqB;oCAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC9BD;;;;;;"}
|
|
@@ -37,8 +37,8 @@ class FormlyWrapperFormField extends FieldWrapper {
|
|
|
37
37
|
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
41
|
-
FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
40
|
+
FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyWrapperFormField, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
+
FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyWrapperFormField, selector: "formly-wrapper-mat-form-field", viewQueries: [{ propertyName: "formField", first: true, predicate: MatFormField, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
42
42
|
<!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->
|
|
43
43
|
<mat-form-field
|
|
44
44
|
[hideRequiredMarker]="true"
|
|
@@ -86,8 +86,8 @@ FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
86
86
|
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ field: field }"></ng-container>
|
|
87
87
|
</ng-template>
|
|
88
88
|
</ng-template>
|
|
89
|
-
`, isInline: true, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
89
|
+
`, isInline: true, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}\n"], components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatLabel, selector: "mat-label" }, { type: i2.MatPrefix, selector: "[matPrefix]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
|
91
91
|
type: Component,
|
|
92
92
|
args: [{ selector: 'formly-wrapper-mat-form-field', template: `
|
|
93
93
|
<!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->
|
|
@@ -137,7 +137,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
137
137
|
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ field: field }"></ng-container>
|
|
138
138
|
</ng-template>
|
|
139
139
|
</ng-template>
|
|
140
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}
|
|
140
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}\n"] }]
|
|
141
141
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.FocusMonitor }]; }, propDecorators: { formField: [{
|
|
142
142
|
type: ViewChild,
|
|
143
143
|
args: [MatFormField, { static: true }]
|
|
@@ -145,11 +145,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
145
145
|
|
|
146
146
|
class FormlyMatFormFieldModule {
|
|
147
147
|
}
|
|
148
|
-
FormlyMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
149
|
-
FormlyMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
148
|
+
FormlyMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
149
|
+
FormlyMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule,
|
|
150
150
|
ReactiveFormsModule,
|
|
151
151
|
MatFormFieldModule, i3.FormlyModule] });
|
|
152
|
-
FormlyMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
152
|
+
FormlyMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatFormFieldModule, imports: [[
|
|
153
153
|
CommonModule,
|
|
154
154
|
ReactiveFormsModule,
|
|
155
155
|
MatFormFieldModule,
|
|
@@ -162,7 +162,7 @@ FormlyMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0"
|
|
|
162
162
|
],
|
|
163
163
|
}),
|
|
164
164
|
]] });
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatFormFieldModule, decorators: [{
|
|
166
166
|
type: NgModule,
|
|
167
167
|
args: [{
|
|
168
168
|
declarations: [FormlyWrapperFormField],
|
|
@@ -250,10 +250,12 @@ class FieldType extends FieldType$1 {
|
|
|
250
250
|
return this.shouldLabelFloat;
|
|
251
251
|
}
|
|
252
252
|
get value() {
|
|
253
|
-
|
|
253
|
+
var _a;
|
|
254
|
+
return (_a = this.formControl) === null || _a === void 0 ? void 0 : _a.value;
|
|
254
255
|
}
|
|
255
256
|
set value(value) {
|
|
256
|
-
|
|
257
|
+
var _a;
|
|
258
|
+
(_a = this.formControl) === null || _a === void 0 ? void 0 : _a.patchValue(value);
|
|
257
259
|
}
|
|
258
260
|
get ngControl() {
|
|
259
261
|
return this.formControl;
|
|
@@ -289,9 +291,9 @@ class FieldType extends FieldType$1 {
|
|
|
289
291
|
}
|
|
290
292
|
}
|
|
291
293
|
}
|
|
292
|
-
FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
293
|
-
FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
294
|
+
FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
295
|
+
FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FieldType, viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true }, { propertyName: "_controls", predicate: MatFormFieldControl, descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FieldType, decorators: [{
|
|
295
297
|
type: Directive
|
|
296
298
|
}], propDecorators: { matPrefix: [{
|
|
297
299
|
type: ViewChild,
|