@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.
Files changed (91) hide show
  1. package/README.md +11 -9
  2. package/checkbox/checkbox.type.d.ts +2 -1
  3. package/datepicker/datepicker.module.d.ts +1 -1
  4. package/datepicker/datepicker.type.d.ts +9 -4
  5. package/datepicker/public_api.d.ts +1 -0
  6. package/esm2020/checkbox/checkbox.module.mjs +4 -4
  7. package/esm2020/checkbox/checkbox.type.mjs +4 -4
  8. package/esm2020/datepicker/datepicker.module.mjs +9 -9
  9. package/esm2020/datepicker/datepicker.type.mjs +29 -13
  10. package/esm2020/datepicker/public_api.mjs +2 -1
  11. package/esm2020/form-field/field.type.mjs +6 -6
  12. package/esm2020/form-field/form-field.module.mjs +4 -4
  13. package/esm2020/form-field/form-field.wrapper.mjs +5 -5
  14. package/esm2020/input/input.module.mjs +4 -4
  15. package/esm2020/input/input.type.mjs +5 -5
  16. package/esm2020/lib/ui-material.module.mjs +4 -4
  17. package/esm2020/multicheckbox/multicheckbox.module.mjs +4 -4
  18. package/esm2020/multicheckbox/multicheckbox.type.mjs +9 -6
  19. package/esm2020/native-select/native-select.module.mjs +4 -4
  20. package/esm2020/native-select/native-select.type.mjs +5 -5
  21. package/esm2020/radio/radio.module.mjs +4 -4
  22. package/esm2020/radio/radio.type.mjs +4 -4
  23. package/esm2020/select/select.module.mjs +4 -4
  24. package/esm2020/select/select.type.mjs +5 -5
  25. package/esm2020/slider/public_api.mjs +2 -1
  26. package/esm2020/slider/slider.module.mjs +9 -9
  27. package/esm2020/slider/slider.type.mjs +5 -5
  28. package/esm2020/textarea/textarea.module.mjs +4 -4
  29. package/esm2020/textarea/textarea.type.mjs +5 -5
  30. package/esm2020/toggle/public_api.mjs +2 -1
  31. package/esm2020/toggle/toggle.module.mjs +9 -9
  32. package/esm2020/toggle/toggle.type.mjs +5 -5
  33. package/fesm2015/ngx-formly-material-checkbox.mjs +7 -7
  34. package/fesm2015/ngx-formly-material-checkbox.mjs.map +1 -1
  35. package/fesm2015/ngx-formly-material-datepicker.mjs +39 -22
  36. package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -1
  37. package/fesm2015/ngx-formly-material-form-field.mjs +16 -14
  38. package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -1
  39. package/fesm2015/ngx-formly-material-input.mjs +8 -8
  40. package/fesm2015/ngx-formly-material-input.mjs.map +1 -1
  41. package/fesm2015/ngx-formly-material-multicheckbox.mjs +12 -9
  42. package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -1
  43. package/fesm2015/ngx-formly-material-native-select.mjs +8 -8
  44. package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -1
  45. package/fesm2015/ngx-formly-material-radio.mjs +7 -7
  46. package/fesm2015/ngx-formly-material-radio.mjs.map +1 -1
  47. package/fesm2015/ngx-formly-material-select.mjs +8 -8
  48. package/fesm2015/ngx-formly-material-select.mjs.map +1 -1
  49. package/fesm2015/ngx-formly-material-slider.mjs +12 -12
  50. package/fesm2015/ngx-formly-material-slider.mjs.map +1 -1
  51. package/fesm2015/ngx-formly-material-textarea.mjs +8 -8
  52. package/fesm2015/ngx-formly-material-textarea.mjs.map +1 -1
  53. package/fesm2015/ngx-formly-material-toggle.mjs +12 -12
  54. package/fesm2015/ngx-formly-material-toggle.mjs.map +1 -1
  55. package/fesm2015/ngx-formly-material.mjs +4 -4
  56. package/fesm2020/ngx-formly-material-checkbox.mjs +7 -7
  57. package/fesm2020/ngx-formly-material-checkbox.mjs.map +1 -1
  58. package/fesm2020/ngx-formly-material-datepicker.mjs +37 -22
  59. package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -1
  60. package/fesm2020/ngx-formly-material-form-field.mjs +14 -14
  61. package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -1
  62. package/fesm2020/ngx-formly-material-input.mjs +8 -8
  63. package/fesm2020/ngx-formly-material-input.mjs.map +1 -1
  64. package/fesm2020/ngx-formly-material-multicheckbox.mjs +12 -9
  65. package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -1
  66. package/fesm2020/ngx-formly-material-native-select.mjs +8 -8
  67. package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -1
  68. package/fesm2020/ngx-formly-material-radio.mjs +7 -7
  69. package/fesm2020/ngx-formly-material-radio.mjs.map +1 -1
  70. package/fesm2020/ngx-formly-material-select.mjs +8 -8
  71. package/fesm2020/ngx-formly-material-select.mjs.map +1 -1
  72. package/fesm2020/ngx-formly-material-slider.mjs +12 -12
  73. package/fesm2020/ngx-formly-material-slider.mjs.map +1 -1
  74. package/fesm2020/ngx-formly-material-textarea.mjs +8 -8
  75. package/fesm2020/ngx-formly-material-textarea.mjs.map +1 -1
  76. package/fesm2020/ngx-formly-material-toggle.mjs +12 -12
  77. package/fesm2020/ngx-formly-material-toggle.mjs.map +1 -1
  78. package/fesm2020/ngx-formly-material.mjs +4 -4
  79. package/input/input.type.d.ts +2 -1
  80. package/multicheckbox/multicheckbox.type.d.ts +2 -1
  81. package/native-select/native-select.type.d.ts +2 -1
  82. package/package.json +2 -2
  83. package/radio/radio.type.d.ts +2 -1
  84. package/select/select.type.d.ts +5 -4
  85. package/slider/public_api.d.ts +1 -0
  86. package/slider/slider.module.d.ts +1 -1
  87. package/slider/slider.type.d.ts +4 -3
  88. package/textarea/textarea.type.d.ts +2 -1
  89. package/toggle/public_api.d.ts +1 -0
  90. package/toggle/toggle.module.d.ts +1 -1
  91. package/toggle/toggle.type.d.ts +4 -3
@@ -9,7 +9,7 @@ import * as i1 from '@angular/material/slider';
9
9
  import { MatSlider, MatSliderModule } from '@angular/material/slider';
10
10
  import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
11
11
 
12
- class FormlySliderTypeComponent extends FieldType {
12
+ class FormlyFieldSlider extends FieldType {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.defaultOptions = {
@@ -25,8 +25,8 @@ class FormlySliderTypeComponent extends FieldType {
25
25
  super.onContainerClick(event);
26
26
  }
27
27
  }
28
- FormlySliderTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlySliderTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29
- FormlySliderTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FormlySliderTypeComponent, selector: "formly-field-mat-slider", viewQueries: [{ propertyName: "slider", first: true, predicate: MatSlider, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
28
+ FormlyFieldSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
29
+ FormlyFieldSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyFieldSlider, selector: "formly-field-mat-slider", viewQueries: [{ propertyName: "slider", first: true, predicate: MatSlider, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
30
30
  <mat-slider
31
31
  [id]="id"
32
32
  [style.width]="'100%'"
@@ -48,7 +48,7 @@ FormlySliderTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
48
48
  >
49
49
  </mat-slider>
50
50
  `, isInline: true, components: [{ type: i1.MatSlider, selector: "mat-slider", inputs: ["disabled", "color", "tabIndex", "invert", "max", "min", "step", "thumbLabel", "tickInterval", "value", "displayWith", "valueText", "vertical"], outputs: ["change", "input", "valueChange"], exportAs: ["matSlider"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlySliderTypeComponent, decorators: [{
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldSlider, decorators: [{
52
52
  type: Component,
53
53
  args: [{
54
54
  selector: 'formly-field-mat-slider',
@@ -83,12 +83,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
83
83
 
84
84
  class FormlyMatSliderModule {
85
85
  }
86
- FormlyMatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
87
- FormlyMatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatSliderModule, declarations: [FormlySliderTypeComponent], imports: [CommonModule,
86
+ FormlyMatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
87
+ FormlyMatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatSliderModule, declarations: [FormlyFieldSlider], imports: [CommonModule,
88
88
  ReactiveFormsModule,
89
89
  MatSliderModule,
90
90
  FormlyMatFormFieldModule, i3.FormlyModule] });
91
- FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatSliderModule, imports: [[
91
+ FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatSliderModule, imports: [[
92
92
  CommonModule,
93
93
  ReactiveFormsModule,
94
94
  MatSliderModule,
@@ -97,16 +97,16 @@ FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
97
97
  types: [
98
98
  {
99
99
  name: 'slider',
100
- component: FormlySliderTypeComponent,
100
+ component: FormlyFieldSlider,
101
101
  wrappers: ['form-field'],
102
102
  },
103
103
  ],
104
104
  }),
105
105
  ]] });
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatSliderModule, decorators: [{
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatSliderModule, decorators: [{
107
107
  type: NgModule,
108
108
  args: [{
109
- declarations: [FormlySliderTypeComponent],
109
+ declarations: [FormlyFieldSlider],
110
110
  imports: [
111
111
  CommonModule,
112
112
  ReactiveFormsModule,
@@ -116,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
116
116
  types: [
117
117
  {
118
118
  name: 'slider',
119
- component: FormlySliderTypeComponent,
119
+ component: FormlyFieldSlider,
120
120
  wrappers: ['form-field'],
121
121
  },
122
122
  ],
@@ -129,5 +129,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
129
129
  * Generated bundle index. Do not edit.
130
130
  */
131
131
 
132
- export { FormlyMatSliderModule };
132
+ export { FormlyFieldSlider, FormlyMatSliderModule };
133
133
  //# sourceMappingURL=ngx-formly-material-slider.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatSlider } from '@angular/material/slider';\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [color]=\"to.color\"\n [displayWith]=\"to.displayWith\"\n [invert]=\"to.invert\"\n [max]=\"to.max\"\n [min]=\"to.min\"\n [step]=\"to.step\"\n [thumbLabel]=\"to.thumbLabel\"\n [tickInterval]=\"to.tickInterval\"\n [valueText]=\"to.valueText\"\n [vertical]=\"to.vertical\"\n (input)=\"to.input && to.input(field, $event)\"\n (change)=\"to.change && to.change(field, $event)\"\n >\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlySliderTypeComponent extends FieldType {\n @ViewChild(MatSlider, { static: true }) slider!: MatSlider;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n thumbLabel: false,\n },\n };\n\n onContainerClick(event: MouseEvent): void {\n this.slider.focus();\n super.onContainerClick(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlySliderTypeComponent } from './slider.type';\n\n@NgModule({\n declarations: [FormlySliderTypeComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSliderModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlySliderTypeComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MA8Ba,kCAAkC,SAAS;IA1BxD;;QA4BE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;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AAC;qBACH;iBACF;;;AC1BD;;;;;;"}
1
+ {"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatSlider } from '@angular/material/slider';\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [color]=\"to.color\"\n [displayWith]=\"to.displayWith\"\n [invert]=\"to.invert\"\n [max]=\"to.max\"\n [min]=\"to.min\"\n [step]=\"to.step\"\n [thumbLabel]=\"to.thumbLabel\"\n [tickInterval]=\"to.tickInterval\"\n [valueText]=\"to.valueText\"\n [vertical]=\"to.vertical\"\n (input)=\"to.input && to.input(field, $event)\"\n (change)=\"to.change && to.change(field, $event)\"\n >\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSlider extends FieldType<FieldTypeConfig> {\n @ViewChild(MatSlider, { static: true }) slider!: MatSlider;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n thumbLabel: false,\n },\n };\n\n onContainerClick(event: MouseEvent): void {\n this.slider.focus();\n super.onContainerClick(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlyFieldSlider } from './slider.type';\n\n@NgModule({\n declarations: [FormlyFieldSlider],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSliderModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlyFieldSlider,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MA+Ba,0BAA0B,SAA0B;IA1BjE;;QA4BE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,QAAiB;gBAC7B,UAAU,EAAE,KAAK;aAClB;SACF,CAAC;KAMH;IAJC,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;;8GAbU,iBAAiB;kGAAjB,iBAAiB,uGACjB,SAAS,qFAzBV;;;;;;;;;;;;;;;;;;;;;GAqBT;2FAGU,iBAAiB;kBA1B7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;GAqBT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BAEyC,MAAM;sBAA7C,SAAS;uBAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCL3B,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,iBAjBjB,iBAAiB,aAE9B,YAAY;QACZ,mBAAmB;QACnB,eAAe;QACf,wBAAwB;mHAYf,qBAAqB,YAhBvB;YACP,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,qBAAqB;kBAlBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,QAAQ;oCACd,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC1BD;;;;;;"}
@@ -21,8 +21,8 @@ class FormlyFieldTextArea extends FieldType {
21
21
  };
22
22
  }
23
23
  }
24
- FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
- FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FormlyFieldTextArea, selector: "formly-field-mat-textarea", providers: [
24
+ FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
+ FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FormlyFieldTextArea, selector: "formly-field-mat-textarea", providers: [
26
26
  // fix for https://github.com/ngx-formly/ngx-formly/issues/1688
27
27
  // rely on formControl value instead of elementRef which return empty value in Firefox.
28
28
  { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
@@ -45,8 +45,8 @@ FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
45
45
  [class.cdk-textarea-autosize]="to.autosize"
46
46
  >
47
47
  </textarea>
48
- `, isInline: true, directives: [{ type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
48
+ `, isInline: true, directives: [{ type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
50
50
  type: Component,
51
51
  args: [{
52
52
  selector: 'formly-field-mat-textarea',
@@ -81,12 +81,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
81
81
 
82
82
  class FormlyMatTextAreaModule {
83
83
  }
84
- FormlyMatTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
85
- FormlyMatTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
84
+ FormlyMatTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
85
+ FormlyMatTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
86
86
  ReactiveFormsModule,
87
87
  MatInputModule,
88
88
  FormlyMatFormFieldModule, i4.FormlyModule] });
89
- FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatTextAreaModule, imports: [[
89
+ FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatTextAreaModule, imports: [[
90
90
  CommonModule,
91
91
  ReactiveFormsModule,
92
92
  MatInputModule,
@@ -101,7 +101,7 @@ FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
101
101
  ],
102
102
  }),
103
103
  ]] });
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatTextAreaModule, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatTextAreaModule, decorators: [{
105
105
  type: NgModule,
106
106
  args: [{
107
107
  declarations: [FormlyFieldTextArea],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-material-textarea.mjs","sources":["../../../../src/ui/material/textarea/src/textarea.type.ts","../../../../src/ui/material/textarea/src/textarea.module.ts","../../../../src/ui/material/textarea/src/ngx-formly-material-textarea.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/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]=\"to.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 implements OnInit {\n 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":[],"mappings":";;;;;;;;;;;;MAiCa,4BAA4B,SAAS;IA7BlD;;QA8BE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,CAAC;aACR;SACF,CAAC;KACH;;gHAPY,mBAAmB;oGAAnB,mBAAmB,oDAPnB;;;QAGT,EAAE,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,mBAAmB,EAAE;KACxE,iDAxBS;;;;;;;;;;;;;;;;;;;GAmBT;2FAQU,mBAAmB;kBA7B/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;GAmBT;oBACD,SAAS,EAAE;;;wBAGT,EAAE,OAAO,EAAE,wBAAwB,EAAE,WAAW,qBAAqB,EAAE;qBACxE;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;;MCHY,uBAAuB;;oHAAvB,uBAAuB;qHAAvB,uBAAuB,iBAlBnB,mBAAmB,aAEhC,YAAY;QACZ,mBAAmB;QACnB,cAAc;QAEd,wBAAwB;qHAYf,uBAAuB,YAjBzB;YACP,YAAY;YACZ,mBAAmB;YACnB,cAAc;YAEd,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;iBACF;aACF,CAAC;SACH;2FAEU,uBAAuB;kBAnBnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,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;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC5BD;;;;;;"}
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, OnInit } 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]=\"to.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> implements OnInit {\n 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":[],"mappings":";;;;;;;;;;;;MAkCa,4BAA4B,SAA0B;IA7BnE;;QA8BE,mB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}
@@ -9,7 +9,7 @@ import * as i1 from '@angular/material/slide-toggle';
9
9
  import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
10
10
  import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
11
11
 
12
- class FormlyToggleTypeComponent extends FieldType {
12
+ class FormlyFieldToggle extends FieldType {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.defaultOptions = {
@@ -25,8 +25,8 @@ class FormlyToggleTypeComponent extends FieldType {
25
25
  super.onContainerClick(event);
26
26
  }
27
27
  }
28
- FormlyToggleTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyToggleTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29
- FormlyToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FormlyToggleTypeComponent, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
28
+ FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component });
29
+ 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: `
30
30
  <mat-slide-toggle
31
31
  [id]="id"
32
32
  [formControl]="formControl"
@@ -39,7 +39,7 @@ FormlyToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
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.0.3", ngImport: i0, type: FormlyToggleTypeComponent, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldToggle, decorators: [{
43
43
  type: Component,
44
44
  args: [{
45
45
  selector: 'formly-field-mat-toggle',
@@ -65,12 +65,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
65
65
 
66
66
  class FormlyMatToggleModule {
67
67
  }
68
- FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
69
- FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyToggleTypeComponent], imports: [CommonModule,
68
+ FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
69
+ FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", 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.0.3", ngImport: i0, type: FormlyMatToggleModule, imports: [[
73
+ FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, imports: [[
74
74
  CommonModule,
75
75
  ReactiveFormsModule,
76
76
  MatSlideToggleModule,
@@ -79,16 +79,16 @@ FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
79
79
  types: [
80
80
  {
81
81
  name: 'toggle',
82
- component: FormlyToggleTypeComponent,
82
+ component: FormlyFieldToggle,
83
83
  wrappers: ['form-field'],
84
84
  },
85
85
  ],
86
86
  }),
87
87
  ]] });
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
89
89
  type: NgModule,
90
90
  args: [{
91
- declarations: [FormlyToggleTypeComponent],
91
+ declarations: [FormlyFieldToggle],
92
92
  imports: [
93
93
  CommonModule,
94
94
  ReactiveFormsModule,
@@ -98,7 +98,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
98
98
  types: [
99
99
  {
100
100
  name: 'toggle',
101
- component: FormlyToggleTypeComponent,
101
+ component: FormlyFieldToggle,
102
102
  wrappers: ['form-field'],
103
103
  },
104
104
  ],
@@ -111,5 +111,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
111
111
  * Generated bundle index. Do not edit.
112
112
  */
113
113
 
114
- export { FormlyMatToggleModule };
114
+ export { FormlyFieldToggle, FormlyMatToggleModule };
115
115
  //# sourceMappingURL=ngx-formly-material-toggle.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-material-toggle.mjs","sources":["../../../../src/ui/material/toggle/src/toggle.type.ts","../../../../src/ui/material/toggle/src/toggle.module.ts","../../../../src/ui/material/toggle/src/ngx-formly-material-toggle.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/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]=\"to.required\"\n [labelPosition]=\"to.labelPosition\"\n >\n {{ to.label }}\n </mat-slide-toggle>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyToggleTypeComponent extends FieldType {\n @ViewChild(MatSlideToggle, { static: true }) slideToggle!: MatSlideToggle;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n },\n };\n\n 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 { FormlyToggleTypeComponent } from './toggle.type';\n\n@NgModule({\n declarations: [FormlyToggleTypeComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSlideToggleModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'toggle',\n component: FormlyToggleTypeComponent,\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":[],"mappings":";;;;;;;;;;;MAqBa,kCAAkC,SAAS;IAjBxD;;QAmBE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,QAAiB;gBAC7B,SAAS,EAAE,IAAI;aAChB;SACF,CAAC;KAMH;IAJC,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;;sHAbU,yBAAyB;0GAAzB,yBAAyB,4GACzB,cAAc,qFAhBf;;;;;;;;;;;;GAYT;2FAGU,yBAAyB;kBAjBrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE;;;;;;;;;;;;GAYT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BAE8C,WAAW;sBAAvD,SAAS;uBAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCKhC,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,iBAjBjB,yBAAyB,aAEtC,YAAY;QACZ,mBAAmB;QACnB,oBAAoB;QACpB,wBAAwB;mHAYf,qBAAqB,YAhBvB;YACP,YAAY;YACZ,mBAAmB;YACnB,oBAAoB;YACpB,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,yBAAyB;wBACpC,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,qBAAqB;kBAlBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,QAAQ;oCACd,SAAS,EAAE,yBAAyB;oCACpC,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC1BD;;;;;;"}
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]=\"to.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 defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n },\n };\n\n 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":[],"mappings":";;;;;;;;;;;MAsBa,0BAA0B,SAA0B;IAjBjE;;QAmBE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,QAAiB;gBAC7B,SAAS,EAAE,IAAI;aAChB;SACF,CAAC;KAMH;IAJC,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;;8GAbU,iBAAiB;kGAAjB,iBAAiB,4GACjB,cAAc,qFAhBf;;;;;;;;;;;;GAYT;2FAGU,iBAAiB;kBAjB7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE;;;;;;;;;;;;GAYT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BAE8C,WAAW;sBAAvD,SAAS;uBAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCIhC,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,iBAjBjB,iBAAiB,aAE9B,YAAY;QACZ,mBAAmB;QACnB,oBAAoB;QACpB,wBAAwB;mHAYf,qBAAqB,YAhBvB;YACP,YAAY;YACZ,mBAAmB;YACnB,oBAAoB;YACpB,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,qBAAqB;kBAlBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,QAAQ;oCACd,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC1BD;;;;;;"}
@@ -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.0.3", ngImport: i0, type: FormlyMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15
- FormlyMaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMaterialModule, imports: [FormlyMatFormFieldModule,
14
+ FormlyMaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15
+ FormlyMaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", 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.0.3", ngImport: i0, type: FormlyMaterialModule, imports: [[
22
+ FormlyMaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", 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.0.3", ngImport: i0, type: FormlyMaterialModule, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMaterialModule, decorators: [{
32
32
  type: NgModule,
33
33
  args: [{
34
34
  imports: [
@@ -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.0.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.0.3", type: FormlyFieldCheckbox, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
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.0.3", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
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.0.3", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
117
- FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
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.0.3", ngImport: i0, type: FormlyMatCheckboxModule, imports: [[
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.0.3", ngImport: i0, type: FormlyMatCheckboxModule, decorators: [{
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 extends FieldType implements AfterViewInit, AfterViewChecked, OnDestroy {\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":";;;;;;;;;;;;;MAoCa,mBAAoB,SAAQ,SAAS;IAchD,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,U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,SAAS;oCACf,OAAO,EAAE,UAAU;iCACpB;6BACF;yBACF,CAAC;qBACH;iBACF;;;ACjCD;;;;;;"}
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,mBACX,SAAQ,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,EAA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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 i4 from '@ngx-formly/core';
5
- import { FormlyModule } from '@ngx-formly/core';
6
- import * as i3 from '@angular/forms';
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 i2 from '@angular/material/input';
9
+ import * as i3 from '@angular/material/input';
10
10
  import { MatInputModule } from '@angular/material/input';
11
- import * as i1 from '@angular/material/datepicker';
11
+ import * as i2 from '@angular/material/datepicker';
12
12
  import { MatDatepickerModule } from '@angular/material/datepicker';
13
13
 
14
- class FormlyDatepickerTypeComponent extends FieldType {
15
- constructor() {
16
- super(...arguments);
14
+ class FormlyFieldDatepicker extends FieldType {
15
+ constructor(config) {
16
+ super();
17
+ this.config = config;
17
18
  this.defaultOptions = {
18
19
  templateOptions: {
19
20
  datepickerOptions: {
@@ -33,10 +34,24 @@ class FormlyDatepickerTypeComponent extends FieldType {
33
34
  ngAfterViewInit() {
34
35
  super.ngAfterViewInit();
35
36
  this.to[this.to.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;
37
+ // temporary fix for https://github.com/angular/components/issues/16761
38
+ if (this.config.getValidatorMessage('matDatepickerParse')) {
39
+ this.fieldErrorsObserver = ɵobserve(this.field, ['formControl', 'errors'], ({ currentValue }) => {
40
+ if (currentValue.required && currentValue.matDatepickerParse) {
41
+ const errors = Object.keys(currentValue)
42
+ .sort((prop) => (prop === 'matDatepickerParse' ? -1 : 0))
43
+ .reduce((errors, prop) => ({ ...errors, [prop]: currentValue[prop] }), {});
44
+ this.fieldErrorsObserver?.setValue(errors);
45
+ }
46
+ });
47
+ }
48
+ }
49
+ ngOnDestroy() {
50
+ this.fieldErrorsObserver?.unsubscribe();
36
51
  }
37
52
  }
38
- FormlyDatepickerTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyDatepickerTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
39
- FormlyDatepickerTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FormlyDatepickerTypeComponent, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
53
+ FormlyFieldDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyFieldDatepicker, deps: [{ token: i1.FormlyConfig }], target: i0.ɵɵFactoryTarget.Component });
54
+ 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: `
40
55
  <input
41
56
  matInput
42
57
  [id]="id"
@@ -72,8 +87,8 @@ FormlyDatepickerTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
72
87
  (yearSelected)="to.datepickerOptions.yearSelected(field, $event, picker)"
73
88
  >
74
89
  </mat-datepicker>
75
- `, isInline: true, components: [{ type: i1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i2.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: i3.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: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyDatepickerTypeComponent, decorators: [{
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.3", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
77
92
  type: Component,
78
93
  args: [{
79
94
  selector: 'formly-field-mat-datepicker',
@@ -116,20 +131,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
116
131
  `,
117
132
  changeDetection: ChangeDetectionStrategy.OnPush,
118
133
  }]
119
- }], propDecorators: { datepickerToggle: [{
134
+ }], ctorParameters: function () { return [{ type: i1.FormlyConfig }]; }, propDecorators: { datepickerToggle: [{
120
135
  type: ViewChild,
121
136
  args: ['datepickerToggle', { static: true }]
122
137
  }] } });
123
138
 
124
139
  class FormlyMatDatepickerModule {
125
140
  }
126
- FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
127
- FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyDatepickerTypeComponent], imports: [CommonModule,
141
+ FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
142
+ FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
128
143
  ReactiveFormsModule,
129
144
  MatInputModule,
130
145
  MatDatepickerModule,
131
- FormlyMatFormFieldModule, i4.FormlyModule] });
132
- FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
146
+ FormlyMatFormFieldModule, i1.FormlyModule] });
147
+ FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
133
148
  CommonModule,
134
149
  ReactiveFormsModule,
135
150
  MatInputModule,
@@ -139,16 +154,16 @@ FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0
139
154
  types: [
140
155
  {
141
156
  name: 'datepicker',
142
- component: FormlyDatepickerTypeComponent,
157
+ component: FormlyFieldDatepicker,
143
158
  wrappers: ['form-field'],
144
159
  },
145
160
  ],
146
161
  }),
147
162
  ]] });
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
149
164
  type: NgModule,
150
165
  args: [{
151
- declarations: [FormlyDatepickerTypeComponent],
166
+ declarations: [FormlyFieldDatepicker],
152
167
  imports: [
153
168
  CommonModule,
154
169
  ReactiveFormsModule,
@@ -159,7 +174,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
159
174
  types: [
160
175
  {
161
176
  name: 'datepicker',
162
- component: FormlyDatepickerTypeComponent,
177
+ component: FormlyFieldDatepicker,
163
178
  wrappers: ['form-field'],
164
179
  },
165
180
  ],
@@ -172,5 +187,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
172
187
  * Generated bundle index. Do not edit.
173
188
  */
174
189
 
175
- export { FormlyMatDatepickerModule };
190
+ export { FormlyFieldDatepicker, FormlyMatDatepickerModule };
176
191
  //# 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 FormlyDatepickerTypeComponent extends FieldType implements AfterViewInit {\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\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}\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 { FormlyDatepickerTypeComponent } from './datepicker.type';\n\n@NgModule({\n declarations: [FormlyDatepickerTypeComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDatepickerModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'datepicker',\n component: FormlyDatepickerTypeComponent,\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":[],"mappings":";;;;;;;;;;;;;MA4Ca,6BAA8B,SAAQ,SAAS;IAzC5D;;QA4CE,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;KAUH;IARC,aAAa;QACX,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,eAAe;QACb,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;KACrF;;0HAvBU,6BAA6B;8GAA7B,6BAA6B,8NAvC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCT;2FAGU,6BAA6B;kBAzCzC,SAAS;mBAAC;oBACT,QAAQ,EAAE,6BAA6B;oBACvC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BAEkD,gBAAgB;sBAAhE,SAAS;uBAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCdpC,yBAAyB;;sHAAzB,yBAAyB;uHAAzB,yBAAyB,iBAnBrB,6BAA6B,aAE1C,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,6BAA6B;wBACxC,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,yBAAyB;kBApBrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,6BAA6B,CAAC;oBAC7C,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,6BAA6B;oCACxC,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC9BD;;;;;;"}
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,qBAAsB,SAAQ,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,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,eAAe;QACb,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,CA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