@ngx-formly/material 6.0.0-next.8 → 6.0.0-next.9
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/esm2020/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/checkbox/checkbox.type.mjs +5 -4
- package/esm2020/datepicker/datepicker.module.mjs +4 -4
- package/esm2020/datepicker/datepicker.type.mjs +7 -7
- package/esm2020/form-field/field.type.mjs +14 -19
- package/esm2020/form-field/form-field.module.mjs +4 -4
- package/esm2020/form-field/form-field.wrapper.mjs +7 -7
- package/esm2020/input/input.module.mjs +4 -4
- package/esm2020/input/input.type.mjs +8 -8
- package/esm2020/lib/ui-material.module.mjs +4 -4
- package/esm2020/multicheckbox/multicheckbox.module.mjs +4 -4
- package/esm2020/multicheckbox/multicheckbox.type.mjs +4 -5
- package/esm2020/native-select/native-select.module.mjs +4 -4
- package/esm2020/native-select/native-select.type.mjs +6 -14
- package/esm2020/radio/radio.module.mjs +4 -4
- package/esm2020/radio/radio.type.mjs +7 -7
- package/esm2020/select/select.module.mjs +4 -4
- package/esm2020/select/select.type.mjs +6 -7
- package/esm2020/slider/slider.module.mjs +4 -4
- package/esm2020/slider/slider.type.mjs +4 -4
- package/esm2020/textarea/textarea.module.mjs +4 -4
- package/esm2020/textarea/textarea.type.mjs +6 -6
- package/esm2020/toggle/toggle.module.mjs +4 -4
- package/esm2020/toggle/toggle.type.mjs +6 -6
- package/fesm2015/ngx-formly-material-checkbox.mjs +8 -7
- package/fesm2015/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-datepicker.mjs +10 -10
- package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-form-field.mjs +22 -27
- package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-input.mjs +11 -11
- package/fesm2015/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-multicheckbox.mjs +7 -8
- package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-native-select.mjs +9 -17
- package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-radio.mjs +10 -10
- package/fesm2015/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-select.mjs +9 -10
- package/fesm2015/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-slider.mjs +7 -7
- package/fesm2015/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-textarea.mjs +9 -9
- package/fesm2015/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-material-toggle.mjs +9 -9
- 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 +8 -7
- package/fesm2020/ngx-formly-material-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-datepicker.mjs +10 -10
- package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-form-field.mjs +22 -27
- package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-input.mjs +11 -11
- package/fesm2020/ngx-formly-material-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-multicheckbox.mjs +7 -8
- package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-native-select.mjs +9 -17
- package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-radio.mjs +10 -10
- package/fesm2020/ngx-formly-material-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-select.mjs +9 -10
- package/fesm2020/ngx-formly-material-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-slider.mjs +7 -7
- package/fesm2020/ngx-formly-material-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-textarea.mjs +9 -9
- package/fesm2020/ngx-formly-material-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-material-toggle.mjs +9 -9
- 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 +4 -7
- package/form-field/form-field.wrapper.d.ts +0 -1
- package/input/input.type.d.ts +1 -2
- package/multicheckbox/multicheckbox.type.d.ts +0 -1
- package/native-select/native-select.type.d.ts +0 -5
- package/package.json +2 -2
- package/radio/radio.type.d.ts +0 -1
- package/select/select.type.d.ts +1 -2
- package/textarea/textarea.type.d.ts +1 -2
|
@@ -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 } from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\n\n@Component({\n selector: 'formly-field-mat-textarea',\n template: `\n <textarea\n matInput\n [id]=\"id\"\n [readonly]=\"to.readonly\"\n [required]=\"required\"\n [formControl]=\"formControl\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [cols]=\"to.cols\"\n [rows]=\"to.rows\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"to.placeholder\"\n [tabindex]=\"to.tabindex\"\n [cdkTextareaAutosize]=\"to.autosize\"\n [cdkAutosizeMinRows]=\"to.autosizeMinRows\"\n [cdkAutosizeMaxRows]=\"to.autosizeMaxRows\"\n [class.cdk-textarea-autosize]=\"to.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> {\n override defaultOptions = {\n templateOptions: {\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":";;;;;;;;;;;;AAkCM,MAAO,mBAAoB,SAAQ,SAA0B,CAAA;AA7BnE,IAAA,WAAA,GAAA;;QA8BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,eAAe,EAAE;AACf,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,CAAC;AACR,aAAA;SACF,CAAC;KACH;;gHAPY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA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AC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;2FAEU,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAnBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;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;;;;"}
|
|
@@ -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.2.
|
|
29
|
-
FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.
|
|
28
|
+
FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", 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
34
|
[color]="to.color"
|
|
35
35
|
[tabIndex]="to.tabindex"
|
|
36
|
-
[required]="
|
|
36
|
+
[required]="required"
|
|
37
37
|
[labelPosition]="to.labelPosition"
|
|
38
38
|
>
|
|
39
39
|
{{ to.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.2.
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldToggle, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{
|
|
45
45
|
selector: 'formly-field-mat-toggle',
|
|
@@ -50,7 +50,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
50
50
|
[formlyAttributes]="field"
|
|
51
51
|
[color]="to.color"
|
|
52
52
|
[tabIndex]="to.tabindex"
|
|
53
|
-
[required]="
|
|
53
|
+
[required]="required"
|
|
54
54
|
[labelPosition]="to.labelPosition"
|
|
55
55
|
>
|
|
56
56
|
{{ to.label }}
|
|
@@ -65,12 +65,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
65
65
|
|
|
66
66
|
class FormlyMatToggleModule {
|
|
67
67
|
}
|
|
68
|
-
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
69
|
-
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.
|
|
68
|
+
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
69
|
+
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", 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.2.
|
|
73
|
+
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", 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.2.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
|
|
89
89
|
type: NgModule,
|
|
90
90
|
args: [{
|
|
91
91
|
declarations: [FormlyFieldToggle],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-toggle.mjs","sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.module.ts","../../../../src/ui/material/toggle/src/ngx-formly-material-toggle.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\n\n@Component({\n selector: 'formly-field-mat-toggle',\n template: `\n <mat-slide-toggle\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [color]=\"to.color\"\n [tabIndex]=\"to.tabindex\"\n [required]=\"
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-toggle.mjs","sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.module.ts","../../../../src/ui/material/toggle/src/ngx-formly-material-toggle.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\n\n@Component({\n selector: 'formly-field-mat-toggle',\n template: `\n <mat-slide-toggle\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [color]=\"to.color\"\n [tabIndex]=\"to.tabindex\"\n [required]=\"required\"\n [labelPosition]=\"to.labelPosition\"\n >\n {{ to.label }}\n </mat-slide-toggle>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldToggle extends FieldType<FieldTypeConfig> {\n @ViewChild(MatSlideToggle, { static: true }) slideToggle!: MatSlideToggle;\n override defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n },\n };\n\n override onContainerClick(event: MouseEvent): void {\n this.slideToggle.focus();\n super.onContainerClick(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlyFieldToggle } from './toggle.type';\n\n@NgModule({\n declarations: [FormlyFieldToggle],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSlideToggleModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'toggle',\n component: FormlyFieldToggle,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAsBM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAjBjE,IAAA,WAAA,GAAA;;QAmBW,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,eAAe,EAAE;AACf,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,SAAS,EAAE,IAAI;AAChB,aAAA;SACF,CAAC;KAMH;AAJU,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;AACzB,QAAA,KAAK,CAAC,gBAAgB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oBAAA;AACE,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;2FAEU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,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;;;;"}
|
|
@@ -11,15 +11,15 @@ import { FormlyMatSelectModule } from '@ngx-formly/material/select';
|
|
|
11
11
|
|
|
12
12
|
class FormlyMaterialModule {
|
|
13
13
|
}
|
|
14
|
-
FormlyMaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
15
|
-
FormlyMaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.
|
|
14
|
+
FormlyMaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15
|
+
FormlyMaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMaterialModule, imports: [FormlyMatFormFieldModule,
|
|
16
16
|
FormlyMatInputModule,
|
|
17
17
|
FormlyMatTextAreaModule,
|
|
18
18
|
FormlyMatRadioModule,
|
|
19
19
|
FormlyMatCheckboxModule,
|
|
20
20
|
FormlyMatMultiCheckboxModule,
|
|
21
21
|
FormlyMatSelectModule] });
|
|
22
|
-
FormlyMaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.
|
|
22
|
+
FormlyMaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMaterialModule, imports: [[
|
|
23
23
|
FormlyMatFormFieldModule,
|
|
24
24
|
FormlyMatInputModule,
|
|
25
25
|
FormlyMatTextAreaModule,
|
|
@@ -28,7 +28,7 @@ FormlyMaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
28
28
|
FormlyMatMultiCheckboxModule,
|
|
29
29
|
FormlyMatSelectModule,
|
|
30
30
|
]] });
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMaterialModule, decorators: [{
|
|
32
32
|
type: NgModule,
|
|
33
33
|
args: [{
|
|
34
34
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material.mjs","sources":["../../../../src/ui/material/src/lib/ui-material.module.ts","../../../../src/ui/material/src/public_api.ts","../../../../src/ui/material/src/ngx-formly-material.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { FormlyMatInputModule } from '@ngx-formly/material/input';\nimport { FormlyMatTextAreaModule } from '@ngx-formly/material/textarea';\nimport { FormlyMatRadioModule } from '@ngx-formly/material/radio';\nimport { FormlyMatCheckboxModule } from '@ngx-formly/material/checkbox';\nimport { FormlyMatMultiCheckboxModule } from '@ngx-formly/material/multicheckbox';\nimport { FormlyMatSelectModule } from '@ngx-formly/material/select';\n\n@NgModule({\n imports: [\n FormlyMatFormFieldModule,\n FormlyMatInputModule,\n FormlyMatTextAreaModule,\n FormlyMatRadioModule,\n FormlyMatCheckboxModule,\n FormlyMatMultiCheckboxModule,\n FormlyMatSelectModule,\n ],\n})\nexport class FormlyMaterialModule {}\n","/*\n * Public API Surface of material\n */\n\nexport * from './lib/ui-material';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAqBa,oBAAoB;;iHAApB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"ngx-formly-material.mjs","sources":["../../../../src/ui/material/src/lib/ui-material.module.ts","../../../../src/ui/material/src/public_api.ts","../../../../src/ui/material/src/ngx-formly-material.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { FormlyMatInputModule } from '@ngx-formly/material/input';\nimport { FormlyMatTextAreaModule } from '@ngx-formly/material/textarea';\nimport { FormlyMatRadioModule } from '@ngx-formly/material/radio';\nimport { FormlyMatCheckboxModule } from '@ngx-formly/material/checkbox';\nimport { FormlyMatMultiCheckboxModule } from '@ngx-formly/material/multicheckbox';\nimport { FormlyMatSelectModule } from '@ngx-formly/material/select';\n\n@NgModule({\n imports: [\n FormlyMatFormFieldModule,\n FormlyMatInputModule,\n FormlyMatTextAreaModule,\n FormlyMatRadioModule,\n FormlyMatCheckboxModule,\n FormlyMatMultiCheckboxModule,\n FormlyMatSelectModule,\n ],\n})\nexport class FormlyMaterialModule {}\n","/*\n * Public API Surface of material\n */\n\nexport * from './lib/ui-material';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAqBa,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAT7B,wBAAwB;QACxB,oBAAoB;QACpB,uBAAuB;QACvB,oBAAoB;QACpB,uBAAuB;QACvB,4BAA4B;QAC5B,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAGZ,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAVtB,OAAA,EAAA,CAAA;YACP,wBAAwB;YACxB,oBAAoB;YACpB,uBAAuB;YACvB,oBAAoB;YACpB,uBAAuB;YACvB,4BAA4B;YAC5B,qBAAqB;SACtB,CAAA,EAAA,CAAA,CAAA;2FAEU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,oBAAoB;wBACpB,uBAAuB;wBACvB,oBAAoB;wBACpB,uBAAuB;wBACvB,4BAA4B;wBAC5B,qBAAqB;AACtB,qBAAA;iBACF,CAAA;;;ACpBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -56,13 +56,14 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
ngOnDestroy() {
|
|
59
|
+
super.ngOnDestroy();
|
|
59
60
|
if (this.checkbox) {
|
|
60
61
|
this.focusMonitor.stopMonitoring(this.checkbox._inputElement);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
65
|
-
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.
|
|
65
|
+
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldCheckbox, deps: [{ token: i0.Renderer2 }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldCheckbox, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
66
67
|
<mat-checkbox
|
|
67
68
|
[formControl]="formControl"
|
|
68
69
|
[id]="id"
|
|
@@ -81,7 +82,7 @@ FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
81
82
|
>
|
|
82
83
|
</mat-checkbox>
|
|
83
84
|
`, 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.2.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
|
|
85
86
|
type: Component,
|
|
86
87
|
args: [{
|
|
87
88
|
selector: 'formly-field-mat-checkbox',
|
|
@@ -113,12 +114,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
113
114
|
|
|
114
115
|
class FormlyMatCheckboxModule {
|
|
115
116
|
}
|
|
116
|
-
FormlyMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
117
|
-
FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.
|
|
117
|
+
FormlyMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
118
|
+
FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
|
|
118
119
|
ReactiveFormsModule,
|
|
119
120
|
MatCheckboxModule,
|
|
120
121
|
FormlyMatFormFieldModule, i4.FormlyModule] });
|
|
121
|
-
FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.
|
|
122
|
+
FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, imports: [[
|
|
122
123
|
CommonModule,
|
|
123
124
|
ReactiveFormsModule,
|
|
124
125
|
MatCheckboxModule,
|
|
@@ -137,7 +138,7 @@ FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
137
138
|
],
|
|
138
139
|
}),
|
|
139
140
|
]] });
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, decorators: [{
|
|
141
142
|
type: NgModule,
|
|
142
143
|
args: [{
|
|
143
144
|
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 { 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":";;;;;;;;;;;;;
|
|
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 override 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 override 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 override ngOnDestroy() {\n super.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":["i1"],"mappings":";;;;;;;;;;;;;AAqCM,MAAO,mBACX,SAAQ,SAA0B,CAAA;IAgBlC,WAAoB,CAAA,QAAmB,EAAU,YAA0B,EAAA;AACzE,QAAA,KAAK,EAAE,CAAC;QADU,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAAU,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;AAZlE,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,eAAe,EAAE;AACf,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,aAAa,EAAE,IAAI;AACnB,g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
@@ -32,7 +32,6 @@ class FormlyFieldDatepicker extends FieldType {
|
|
|
32
32
|
this.options.detectChanges?.(this.field);
|
|
33
33
|
}
|
|
34
34
|
ngAfterViewInit() {
|
|
35
|
-
super.ngAfterViewInit();
|
|
36
35
|
this.to[this.to.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;
|
|
37
36
|
// temporary fix for https://github.com/angular/components/issues/16761
|
|
38
37
|
if (this.config.getValidatorMessage('matDatepickerParse')) {
|
|
@@ -47,11 +46,12 @@ class FormlyFieldDatepicker extends FieldType {
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
ngOnDestroy() {
|
|
49
|
+
super.ngOnDestroy();
|
|
50
50
|
this.fieldErrorsObserver?.unsubscribe();
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
FormlyFieldDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
54
|
-
FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.
|
|
53
|
+
FormlyFieldDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldDatepicker, deps: [{ token: i1.FormlyConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
+
FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldDatepicker, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
55
55
|
<input
|
|
56
56
|
matInput
|
|
57
57
|
[id]="id"
|
|
@@ -65,7 +65,7 @@ FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
65
65
|
[placeholder]="to.placeholder"
|
|
66
66
|
[tabindex]="to.tabindex"
|
|
67
67
|
[readonly]="to.readonly"
|
|
68
|
-
[required]="
|
|
68
|
+
[required]="required"
|
|
69
69
|
(dateInput)="to.datepickerOptions.dateInput(field, $event)"
|
|
70
70
|
(dateChange)="to.datepickerOptions.dateChange(field, $event)"
|
|
71
71
|
/>
|
|
@@ -88,7 +88,7 @@ FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
88
88
|
>
|
|
89
89
|
</mat-datepicker>
|
|
90
90
|
`, 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 });
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{
|
|
94
94
|
selector: 'formly-field-mat-datepicker',
|
|
@@ -106,7 +106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
106
106
|
[placeholder]="to.placeholder"
|
|
107
107
|
[tabindex]="to.tabindex"
|
|
108
108
|
[readonly]="to.readonly"
|
|
109
|
-
[required]="
|
|
109
|
+
[required]="required"
|
|
110
110
|
(dateInput)="to.datepickerOptions.dateInput(field, $event)"
|
|
111
111
|
(dateChange)="to.datepickerOptions.dateChange(field, $event)"
|
|
112
112
|
/>
|
|
@@ -138,13 +138,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
138
138
|
|
|
139
139
|
class FormlyMatDatepickerModule {
|
|
140
140
|
}
|
|
141
|
-
FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
142
|
-
FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.
|
|
141
|
+
FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
142
|
+
FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
|
|
143
143
|
ReactiveFormsModule,
|
|
144
144
|
MatInputModule,
|
|
145
145
|
MatDatepickerModule,
|
|
146
146
|
FormlyMatFormFieldModule, i1.FormlyModule] });
|
|
147
|
-
FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.
|
|
147
|
+
FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
|
|
148
148
|
CommonModule,
|
|
149
149
|
ReactiveFormsModule,
|
|
150
150
|
MatInputModule,
|
|
@@ -160,7 +160,7 @@ FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0
|
|
|
160
160
|
],
|
|
161
161
|
}),
|
|
162
162
|
]] });
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
|
|
164
164
|
type: NgModule,
|
|
165
165
|
args: [{
|
|
166
166
|
declarations: [FormlyFieldDatepicker],
|
|
@@ -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, 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]=\"
|
|
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]=\"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 override 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 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 override ngOnDestroy() {\n super.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":";;;;;;;;;;;;;AA6CM,MAAO,qBAAsB,SAAQ,SAA0B,CAAA;AAiBnE,IAAA,WAAA,CAAoB,MAAoB,EAAA;AACtC,QAAA,KAAK,EAAE,CAAC;QADU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAc;AAd/B,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,eAAe,EAAE;AACf,gBAAA,iBAAiB,EAAE;AACjB,oBAAA,SAAS,EAAE,OAAO;AAClB,oBAAA,wBAAwB,EAAE,QAAQ;AAClC,oBAAA,SAAS,EAAE,MAAK,GAAG;AACnB,oBAAA,UAAU,EAAE,MAAK,GAAG;AACpB,oBAAA,aAAa,EAAE,MAAK,GAAG;AACvB,oBAAA,YAAY,EAAE,MAAK,GAAG;AACvB,iBAAA;AACF,aAAA;SACF,CAAC;KAKD;IAED,aAAa,GAAA;QACX,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;;QAGpF,IAAI,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,EAAE;YACzD,IAAI,CAAC,mBAAmB,GAAGA,QAAO,CAAM,IAAI,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,KAAI;AAClG,gBAAA,IAAI,YAAY,CAAC,QAAQ,IAAI,Y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KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,YAAY;AAClB,wBAAA,SAAS,EAAE,qBAAqB;wBAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBApBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBAEnB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,YAAY;AAClB,oCAAA,SAAS,EAAE,qBAAqB;oCAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component,
|
|
2
|
+
import { Component, ViewEncapsulation, ViewChild, NgModule, Type, Directive, ViewChildren } from '@angular/core';
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3 from '@ngx-formly/core';
|
|
@@ -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.2.
|
|
41
|
-
FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.
|
|
40
|
+
FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", 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.6", 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%}\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"] }],
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
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"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", 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.2.3", ngImpor
|
|
|
137
137
|
<ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ field: field }"></ng-container>
|
|
138
138
|
</ng-template>
|
|
139
139
|
</ng-template>
|
|
140
|
-
`,
|
|
140
|
+
`, 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.2.3", ngImpor
|
|
|
145
145
|
|
|
146
146
|
class FormlyMatFormFieldModule {
|
|
147
147
|
}
|
|
148
|
-
FormlyMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
149
|
-
FormlyMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.
|
|
148
|
+
FormlyMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
149
|
+
FormlyMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", 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.2.
|
|
152
|
+
FormlyMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", 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.2.
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatFormFieldModule, decorators: [{
|
|
166
166
|
type: NgModule,
|
|
167
167
|
args: [{
|
|
168
168
|
declarations: [FormlyWrapperFormField],
|
|
@@ -189,24 +189,19 @@ class FieldType extends FieldType$1 {
|
|
|
189
189
|
this.stateChanges = new Subject();
|
|
190
190
|
this._errorState = false;
|
|
191
191
|
}
|
|
192
|
-
set
|
|
193
|
-
if (
|
|
194
|
-
this.
|
|
192
|
+
set matPrefix(prefix) {
|
|
193
|
+
if (prefix) {
|
|
194
|
+
this.to.prefix = prefix;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this.
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
ngAfterViewInit() {
|
|
203
|
-
if (this.matPrefix) {
|
|
204
|
-
this.to.prefix = this.matPrefix;
|
|
205
|
-
}
|
|
206
|
-
if (this.matSuffix) {
|
|
207
|
-
this.to.prefix = this.matSuffix;
|
|
197
|
+
set matSuffix(suffix) {
|
|
198
|
+
if (suffix) {
|
|
199
|
+
this.to.suffix = suffix;
|
|
208
200
|
}
|
|
209
201
|
}
|
|
202
|
+
set _controls(controls) {
|
|
203
|
+
this.attachControl(controls.length === 1 ? controls.first : this);
|
|
204
|
+
}
|
|
210
205
|
ngOnDestroy() {
|
|
211
206
|
delete this.formField?._control;
|
|
212
207
|
this.stateChanges.complete();
|
|
@@ -286,9 +281,9 @@ class FieldType extends FieldType$1 {
|
|
|
286
281
|
}
|
|
287
282
|
}
|
|
288
283
|
}
|
|
289
|
-
FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
290
|
-
FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
284
|
+
FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
285
|
+
FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", 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 });
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FieldType, decorators: [{
|
|
292
287
|
type: Directive
|
|
293
288
|
}], propDecorators: { matPrefix: [{
|
|
294
289
|
type: ViewChild,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-material-form-field.mjs","sources":["../../../../src/ui/material/form-field/src/form-field.wrapper.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.ts","../../../../src/ui/material/form-field/src/ngx-formly-material-form-field.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewChild,\n OnInit,\n OnDestroy,\n Renderer2,\n AfterViewInit,\n ElementRef,\n ViewEncapsulation,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FormlyFieldConfig as CoreFieldConfig,\n FormlyTemplateOptions,\n FieldWrapper,\n} from '@ngx-formly/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field/form-field';\nimport { ThemePalette } from '@angular/material/core';\n\ninterface MatFormlyFieldConfig extends FormlyFieldConfig {\n _formField?: FormlyWrapperFormField;\n}\n\nexport interface FormlyFieldConfig extends CoreFieldConfig {\n templateOptions?: MatFormlyTemplateOptions;\n}\n\ninterface MatFormlyTemplateOptions extends FormlyTemplateOptions {\n prefix?: TemplateRef<any>;\n suffix?: TemplateRef<any>;\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n hideFieldUnderline?: boolean;\n floatLabel?: FloatLabelType;\n appearance?: MatFormFieldAppearance;\n color?: ThemePalette;\n hintStart?: TemplateRef<any> | string;\n hintEnd?: TemplateRef<any> | string;\n}\n\n@Component({\n selector: 'formly-wrapper-mat-form-field',\n template: `\n <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->\n <mat-form-field\n [hideRequiredMarker]=\"true\"\n [floatLabel]=\"to.floatLabel\"\n [appearance]=\"to.appearance\"\n [color]=\"to.color\"\n >\n <ng-container #fieldComponent></ng-container>\n <mat-label *ngIf=\"to.label && to.hideLabel !== true\">\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-label>\n\n <ng-container matPrefix *ngIf=\"to._matPrefix\">\n <ng-container [ngTemplateOutlet]=\"to._matPrefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <ng-container matSuffix *ngIf=\"to._matSuffix\">\n <ng-container [ngTemplateOutlet]=\"to._matSuffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n <mat-hint *ngIf=\"to.description || to.hintStart as hint\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n\n <mat-hint *ngIf=\"to.hintEnd as hintEnd\" align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n <ng-container *ngIf=\"!content.createEmbeddedView; else template\">{{ content }}</ng-container>\n <ng-template #template>\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n field!: MatFormlyFieldConfig;\n\n constructor(private renderer: Renderer2, private elementRef: ElementRef, private focusMonitor: FocusMonitor) {\n super();\n }\n\n ngOnInit() {\n defineHiddenProp(this.field, '_formField', this.formField);\n this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {\n if (!origin && this.field.focus) {\n this.field.focus = false;\n }\n });\n }\n\n ngAfterViewInit() {\n // temporary fix for https://github.com/angular/material2/issues/7891\n if (this.formField.appearance !== 'outline' && this.to.hideFieldUnderline === true) {\n const underlineElement = this.formField._elementRef.nativeElement.querySelector('.mat-form-field-underline');\n underlineElement && this.renderer.removeChild(underlineElement.parentNode, underlineElement);\n }\n }\n\n ngOnDestroy() {\n delete this.field._formField;\n this.focusMonitor.stopMonitoring(this.elementRef);\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 { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n }),\n ],\n})\nexport class FormlyMatFormFieldModule {}\n","import {\n OnInit,\n OnDestroy,\n AfterViewInit,\n TemplateRef,\n ViewChild,\n Type,\n Directive,\n ViewChildren,\n QueryList,\n} from '@angular/core';\nimport { FieldType as CoreFieldType, ɵobserve as observe } from '@ngx-formly/core';\nimport { Subject } from 'rxjs';\nimport { MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { FormlyFieldConfig } from './form-field.wrapper';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig>\n extends CoreFieldType<F>\n implements OnInit, AfterViewInit, OnDestroy, MatFormFieldControl<any>\n{\n @ViewChild('matPrefix') matPrefix!: TemplateRef<any>;\n @ViewChild('matSuffix') matSuffix!: TemplateRef<any>;\n\n formFieldControl!: MatFormFieldControl<any>;\n @ViewChildren(MatFormFieldControl) set _controls(controls: QueryList<MatFormFieldControl<any>>) {\n if (controls.length === 1 && !this.formFieldControl) {\n this.formFieldControl = controls.first;\n }\n }\n\n errorStateMatcher: ErrorStateMatcher = { isErrorState: () => this.field && this.showError };\n stateChanges = new Subject<void>();\n _errorState = false;\n\n ngOnInit() {\n observe(this, ['formFieldControl'], ({ currentValue }) => {\n this.attachControl(currentValue || this);\n });\n }\n\n ngAfterViewInit() {\n if (this.matPrefix) {\n this.to.prefix = this.matPrefix;\n }\n if (this.matSuffix) {\n this.to.prefix = this.matSuffix;\n }\n }\n\n ngOnDestroy() {\n delete (this.formField as any)?._control;\n this.stateChanges.complete();\n }\n\n setDescribedByIds(ids: string[]): void {}\n onContainerClick(event: MouseEvent): void {\n this.field.focus = true;\n this.stateChanges.next();\n }\n\n get errorState() {\n const showError = this.options!.showError!(this);\n if (showError !== this._errorState) {\n this._errorState = showError;\n this.stateChanges.next();\n }\n\n return showError;\n }\n\n get controlType() {\n if (this.to.type) {\n return this.to.type;\n }\n\n if (<any>this.field.type instanceof Type) {\n return this.field.type!.constructor.name;\n }\n\n return this.field.type!;\n }\n get focused() {\n return !!this.field.focus && !this.disabled;\n }\n get disabled() {\n return !!this.to.disabled;\n }\n get required() {\n return !!this.to.required;\n }\n get placeholder() {\n return this.to.placeholder || '';\n }\n get shouldPlaceholderFloat() {\n return this.shouldLabelFloat;\n }\n get value() {\n return this.formControl?.value;\n }\n set value(value) {\n this.formControl?.patchValue(value);\n }\n get ngControl() {\n return this.formControl as any;\n }\n get empty() {\n return this.value == null || this.value === '';\n }\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n get formField(): MatFormField {\n return (this.field as any)?.['_formField'];\n }\n\n private attachControl(control: MatFormFieldControl<any>) {\n if (this.formField && control !== this.formField._control) {\n this.formField._control = control;\n\n // temporary fix for https://github.com/angular/material2/issues/6728\n if (control?.ngControl?.valueAccessor?.hasOwnProperty('_formField')) {\n (control.ngControl.valueAccessor as any)['_formField'] = this.formField;\n }\n\n ['Prefix', 'Suffix'].forEach((type) =>\n observe<TemplateRef<any>>(\n this.field,\n ['templateOptions', type.toLowerCase()],\n ({ currentValue }) =>\n currentValue &&\n Promise.resolve().then(() => {\n this.field.templateOptions![`_mat${type}`] = currentValue;\n this.options.detectChanges!(this.field);\n }),\n ),\n );\n\n // https://github.com/angular/components/issues/16209\n const setDescribedByIds = control.setDescribedByIds.bind(control);\n control.setDescribedByIds = (ids: string[]) => {\n setTimeout(() => setDescribedByIds(ids));\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","CoreFieldType","observe"],"mappings":";;;;;;;;;;;;MAmGa,sBACX,SAAQ,YAAkC;IAM1C,YAAoB,QAAmB,EAAU,UAAsB,EAAU,YAA0B;QACzG,KAAK,EAAE,CAAC;QADU,aAAQ,GAAR,QAAQ,CAAW;QAAU,eAAU,GAAV,UAAU,CAAY;QAAU,iBAAY,GAAZ,YAAY,CAAc;KAE1G;IAED,QAAQ;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,C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AC,OAAO,CAAC,aAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACzC,CAAC,CACL,CACF,CAAC;;YAGF,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClE,OAAO,CAAC,iBAAiB,GAAG,CAAC,GAAa;gBACxC,UAAU,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;aAC1C,CAAC;SACH;KACF;;sGA/HmB,SAAS;0FAAT,SAAS,0OAQf,mBAAmB;2FARb,SAAS;kBAD9B,SAAS;8BAKgB,SAAS;sBAAhC,SAAS;uBAAC,WAAW;gBACE,SAAS;sBAAhC,SAAS;uBAAC,WAAW;gBAGiB,SAAS;sBAA/C,YAAY;uBAAC,mBAAmB;;;AC1BnC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-form-field.mjs","sources":["../../../../src/ui/material/form-field/src/form-field.wrapper.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.ts","../../../../src/ui/material/form-field/src/ngx-formly-material-form-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n Renderer2,\n AfterViewInit,\n ElementRef,\n ViewEncapsulation,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FormlyFieldConfig as CoreFieldConfig,\n FormlyTemplateOptions,\n FieldWrapper,\n} from '@ngx-formly/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field/form-field';\nimport { ThemePalette } from '@angular/material/core';\n\ninterface MatFormlyFieldConfig extends FormlyFieldConfig {\n _formField?: FormlyWrapperFormField;\n}\n\nexport interface FormlyFieldConfig extends CoreFieldConfig {\n templateOptions?: MatFormlyTemplateOptions;\n}\n\ninterface MatFormlyTemplateOptions extends FormlyTemplateOptions {\n prefix?: TemplateRef<any>;\n suffix?: TemplateRef<any>;\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n hideFieldUnderline?: boolean;\n floatLabel?: FloatLabelType;\n appearance?: MatFormFieldAppearance;\n color?: ThemePalette;\n hintStart?: TemplateRef<any> | string;\n hintEnd?: TemplateRef<any> | string;\n}\n\n@Component({\n selector: 'formly-wrapper-mat-form-field',\n template: `\n <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->\n <mat-form-field\n [hideRequiredMarker]=\"true\"\n [floatLabel]=\"to.floatLabel\"\n [appearance]=\"to.appearance\"\n [color]=\"to.color\"\n >\n <ng-container #fieldComponent></ng-container>\n <mat-label *ngIf=\"to.label && to.hideLabel !== true\">\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-label>\n\n <ng-container matPrefix *ngIf=\"to._matPrefix\">\n <ng-container [ngTemplateOutlet]=\"to._matPrefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <ng-container matSuffix *ngIf=\"to._matSuffix\">\n <ng-container [ngTemplateOutlet]=\"to._matSuffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n <mat-hint *ngIf=\"to.description || to.hintStart as hint\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n\n <mat-hint *ngIf=\"to.hintEnd as hintEnd\" align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n <ng-container *ngIf=\"!content.createEmbeddedView; else template\">{{ content }}</ng-container>\n <ng-template #template>\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-template>\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(private renderer: Renderer2, private elementRef: ElementRef, private focusMonitor: FocusMonitor) {\n super();\n }\n\n ngOnInit() {\n defineHiddenProp(this.field, '_formField', this.formField);\n this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {\n if (!origin && this.field.focus) {\n this.field.focus = false;\n }\n });\n }\n\n ngAfterViewInit() {\n // temporary fix for https://github.com/angular/material2/issues/7891\n if (this.formField.appearance !== 'outline' && this.to.hideFieldUnderline === true) {\n const underlineElement = this.formField._elementRef.nativeElement.querySelector('.mat-form-field-underline');\n underlineElement && this.renderer.removeChild(underlineElement.parentNode, underlineElement);\n }\n }\n\n ngOnDestroy() {\n delete this.field._formField;\n this.focusMonitor.stopMonitoring(this.elementRef);\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 { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n }),\n ],\n})\nexport class FormlyMatFormFieldModule {}\n","import { OnDestroy, TemplateRef, ViewChild, Type, Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FieldType as CoreFieldType, ɵobserve as observe } from '@ngx-formly/core';\nimport { Subject } from 'rxjs';\nimport { MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { FormlyFieldConfig } from './form-field.wrapper';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig>\n extends CoreFieldType<F>\n implements OnDestroy, MatFormFieldControl<any>\n{\n @ViewChild('matPrefix') set matPrefix(prefix: TemplateRef<any>) {\n if (prefix) {\n this.to.prefix = prefix;\n }\n }\n @ViewChild('matSuffix') set matSuffix(suffix: TemplateRef<any>) {\n if (suffix) {\n this.to.suffix = suffix;\n }\n }\n\n @ViewChildren(MatFormFieldControl) set _controls(controls: QueryList<MatFormFieldControl<any>>) {\n this.attachControl(controls.length === 1 ? controls.first : this);\n }\n\n errorStateMatcher: ErrorStateMatcher = { isErrorState: () => this.field && this.showError };\n stateChanges = new Subject<void>();\n _errorState = false;\n\n ngOnDestroy() {\n delete (this.formField as any)?._control;\n this.stateChanges.complete();\n }\n\n setDescribedByIds(ids: string[]): void {}\n onContainerClick(event: MouseEvent): void {\n this.field.focus = true;\n this.stateChanges.next();\n }\n\n get errorState() {\n const showError = this.options!.showError!(this);\n if (showError !== this._errorState) {\n this._errorState = showError;\n this.stateChanges.next();\n }\n\n return showError;\n }\n\n get controlType() {\n if (this.to.type) {\n return this.to.type;\n }\n\n if (<any>this.field.type instanceof Type) {\n return this.field.type!.constructor.name;\n }\n\n return this.field.type!;\n }\n get focused() {\n return !!this.field.focus && !this.disabled;\n }\n get disabled() {\n return !!this.to.disabled;\n }\n get required() {\n return !!this.to.required;\n }\n get placeholder() {\n return this.to.placeholder || '';\n }\n get shouldPlaceholderFloat() {\n return this.shouldLabelFloat;\n }\n get value() {\n return this.formControl?.value;\n }\n set value(value) {\n this.formControl?.patchValue(value);\n }\n get ngControl() {\n return this.formControl as any;\n }\n get empty() {\n return this.value == null || this.value === '';\n }\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n get formField(): MatFormField {\n return (this.field as any)?.['_formField'];\n }\n\n private attachControl(control: MatFormFieldControl<any>) {\n if (this.formField && control !== this.formField._control) {\n this.formField._control = control;\n\n // temporary fix for https://github.com/angular/material2/issues/6728\n if (control?.ngControl?.valueAccessor?.hasOwnProperty('_formField')) {\n (control.ngControl.valueAccessor as any)['_formField'] = this.formField;\n }\n\n ['Prefix', 'Suffix'].forEach((type) =>\n observe<TemplateRef<any>>(\n this.field,\n ['templateOptions', type.toLowerCase()],\n ({ currentValue }) =>\n currentValue &&\n Promise.resolve().then(() => {\n this.field.templateOptions![`_mat${type}`] = currentValue;\n this.options.detectChanges!(this.field);\n }),\n ),\n );\n\n // https://github.com/angular/components/issues/16209\n const setDescribedByIds = control.setDescribedByIds.bind(control);\n control.setDescribedByIds = (ids: string[]) => {\n setTimeout(() => setDescribedByIds(ids));\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType","observe"],"mappings":";;;;;;;;;;;;AAiGM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CAAoB,QAAmB,EAAU,UAAsB,EAAU,YAA0B,EAAA;AACzG,QAAA,KAAK,EAAE,CAAC;QADU,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAAU,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAAU,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;KAE1G;IAED,QAAQ,GAAA;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;AAC3D,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;YACpE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AAC/B,gBAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KA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