@ngx-formly/material 6.0.0-next.6 → 6.0.0-next.7

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 +4 -3
  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 +5 -5
  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 +4 -4
  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 +7 -4
  19. package/esm2020/native-select/native-select.module.mjs +4 -4
  20. package/esm2020/native-select/native-select.type.mjs +4 -4
  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 +4 -4
  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 +12 -12
  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 +7 -7
  40. package/fesm2015/ngx-formly-material-input.mjs.map +1 -1
  41. package/fesm2015/ngx-formly-material-multicheckbox.mjs +10 -7
  42. package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -1
  43. package/fesm2015/ngx-formly-material-native-select.mjs +7 -7
  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 +7 -7
  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 +12 -12
  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 +7 -7
  63. package/fesm2020/ngx-formly-material-input.mjs.map +1 -1
  64. package/fesm2020/ngx-formly-material-multicheckbox.mjs +10 -7
  65. package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -1
  66. package/fesm2020/ngx-formly-material-native-select.mjs +7 -7
  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 +7 -7
  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
@@ -4,17 +4,17 @@ import { FormlyModule } from '@ngx-formly/core';
4
4
  import { ReactiveFormsModule } from '@angular/forms';
5
5
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
6
6
  import { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
7
- import { FormlyToggleTypeComponent } from './toggle.type';
7
+ import { FormlyFieldToggle } from './toggle.type';
8
8
  import * as i0 from "@angular/core";
9
9
  import * as i1 from "@ngx-formly/core";
10
10
  export class FormlyMatToggleModule {
11
11
  }
12
- FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyToggleTypeComponent], imports: [CommonModule,
12
+ FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
+ FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyFieldToggle], imports: [CommonModule,
14
14
  ReactiveFormsModule,
15
15
  MatSlideToggleModule,
16
16
  FormlyMatFormFieldModule, i1.FormlyModule] });
17
- FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, imports: [[
17
+ FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatToggleModule, imports: [[
18
18
  CommonModule,
19
19
  ReactiveFormsModule,
20
20
  MatSlideToggleModule,
@@ -23,16 +23,16 @@ FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
23
23
  types: [
24
24
  {
25
25
  name: 'toggle',
26
- component: FormlyToggleTypeComponent,
26
+ component: FormlyFieldToggle,
27
27
  wrappers: ['form-field'],
28
28
  },
29
29
  ],
30
30
  }),
31
31
  ]] });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
33
33
  type: NgModule,
34
34
  args: [{
35
- declarations: [FormlyToggleTypeComponent],
35
+ declarations: [FormlyFieldToggle],
36
36
  imports: [
37
37
  CommonModule,
38
38
  ReactiveFormsModule,
@@ -42,7 +42,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
42
42
  types: [
43
43
  {
44
44
  name: 'toggle',
45
- component: FormlyToggleTypeComponent,
45
+ component: FormlyFieldToggle,
46
46
  wrappers: ['form-field'],
47
47
  },
48
48
  ],
@@ -50,4 +50,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
50
50
  ],
51
51
  }]
52
52
  }] });
53
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9tYXRlcmlhbC90b2dnbGUvc3JjL3RvZ2dsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRTNFL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ZUZvcm1zTW9kdWxlLFxuICAgIE1hdFNsaWRlVG9nZ2xlTW9kdWxlLFxuICAgIEZvcm1seU1hdEZvcm1GaWVsZE1vZHVsZSxcbiAgICBGb3JtbHlNb2R1bGUuZm9yQ2hpbGQoe1xuICAgICAgdHlwZXM6IFtcbiAgICAgICAge1xuICAgICAgICAgIG5hbWU6ICd0b2dnbGUnLFxuICAgICAgICAgIGNvbXBvbmVudDogRm9ybWx5RmllbGRUb2dnbGUsXG4gICAgICAgICAgd3JhcHBlcnM6IFsnZm9ybS1maWVsZCddLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9KSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgRm9ybWx5TWF0VG9nZ2xlTW9kdWxlIHt9XG4iXX0=
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
5
5
  import * as i1 from "@angular/material/slide-toggle";
6
6
  import * as i2 from "@angular/forms";
7
7
  import * as i3 from "@ngx-formly/core";
8
- export class FormlyToggleTypeComponent extends FieldType {
8
+ export class FormlyFieldToggle extends FieldType {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  this.defaultOptions = {
@@ -21,8 +21,8 @@ export class FormlyToggleTypeComponent extends FieldType {
21
21
  super.onContainerClick(event);
22
22
  }
23
23
  }
24
- FormlyToggleTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyToggleTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
- 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: `
24
+ FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component });
25
+ FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: FormlyFieldToggle, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
26
26
  <mat-slide-toggle
27
27
  [id]="id"
28
28
  [formControl]="formControl"
@@ -35,7 +35,7 @@ FormlyToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
35
35
  {{ to.label }}
36
36
  </mat-slide-toggle>
37
37
  `, isInline: true, components: [{ type: i1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i1.MatSlideToggleRequiredValidator, selector: "mat-slide-toggle[required][formControlName], mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyToggleTypeComponent, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyFieldToggle, decorators: [{
39
39
  type: Component,
40
40
  args: [{
41
41
  selector: 'formly-field-mat-toggle',
@@ -58,4 +58,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
58
58
  type: ViewChild,
59
59
  args: [MatSlideToggle, { static: true }]
60
60
  }] } });
61
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLnR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvdWkvbWF0ZXJpYWwvdG9nZ2xlL3NyYy90b2dnbGUudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM5RSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDNUQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGdDQUFnQyxDQUFDOzs7OztBQW1CaEUsTUFBTSxPQUFPLHlCQUEwQixTQUFRLFNBQVM7SUFqQnhEOztRQW1CRSxtQkFBYyxHQUFHO1lBQ2YsZUFBZSxFQUFFO2dCQUNmLGtCQUFrQixFQUFFLElBQUk7Z0JBQ3hCLFVBQVUsRUFBRSxRQUFpQjtnQkFDN0IsU0FBUyxFQUFFLElBQUk7YUFDaEI7U0FDRixDQUFDO0tBTUg7SUFKQyxnQkFBZ0IsQ0FBQyxLQUFpQjtRQUNoQyxJQUFJLENBQUMsV0FBVyxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ3pCLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUNoQyxDQUFDOztzSEFiVSx5QkFBeUI7MEdBQXpCLHlCQUF5Qiw0R0FDekIsY0FBYyxxRkFoQmY7Ozs7Ozs7Ozs7OztHQVlUOzJGQUdVLHlCQUF5QjtrQkFqQnJDLFNBQVM7bUJ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HZvaWQge1xuICAgIHRoaXMuc2xpZGVUb2dnbGUuZm9jdXMoKTtcbiAgICBzdXBlci5vbkNvbnRhaW5lckNsaWNrKGV2ZW50KTtcbiAgfVxufVxuIl19
@@ -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.1.2", 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.1.2", 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.1.2", 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.1.2", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
117
+ FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", 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.1.2", 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.1.2", 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,4BAA4B,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,UAAU,EAAE,QAAiB;gBAC7B,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,QAAiB;aACzB;SACF,CAAC;KAKD;IAED,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;IAED,eAAe;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW;gBACjF,IAAI,WAAW,EAAE;oBACf,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC5C;qBAAM;oBACL,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,IAAI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,mBAAmB;YAEnB,iBAAiB;YAEjB,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,UAAU;wBAChB,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,UAAU;qBACpB;iBACF;aACF,CAAC;SACH;2FAEU,uBAAuB;kBAxBnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,iBAAiB;wBAEjB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,UAAU;oCAChB,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;gCACD;oCACE,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,UAAU;iCACpB;6BACF;yBACF,CAAC;qBACH;iBACF;;;ACjCD;;;;;;"}
1
+ {"version":3,"file":"ngx-formly-material-checkbox.mjs","sources":["../../../../src/ui/material/checkbox/src/checkbox.type.ts","../../../../src/ui/material/checkbox/src/checkbox.module.ts","../../../../src/ui/material/checkbox/src/ngx-formly-material-checkbox.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n ChangeDetectionStrategy,\n Renderer2,\n AfterViewChecked,\n OnDestroy,\n AfterViewInit,\n} from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'formly-field-mat-checkbox',\n template: `\n <mat-checkbox\n [formControl]=\"formControl\"\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [indeterminate]=\"to.indeterminate && formControl.value == null\"\n [color]=\"to.color\"\n [labelPosition]=\"to.align || to.labelPosition\"\n >\n {{ to.label }}\n <span\n *ngIf=\"to.required && to.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker\"\n >*</span\n >\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldCheckbox\n extends FieldType<FieldTypeConfig>\n implements AfterViewInit, AfterViewChecked, OnDestroy\n{\n @ViewChild(MatCheckbox, { static: true }) checkbox!: MatCheckbox;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n indeterminate: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n align: 'start', // start or end\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n private _required!: boolean;\n constructor(private renderer: Renderer2, private focusMonitor: FocusMonitor) {\n super();\n }\n\n onContainerClick(event: MouseEvent): void {\n this.checkbox.focus();\n super.onContainerClick(event);\n }\n\n ngAfterViewInit() {\n if (this.checkbox) {\n this.focusMonitor.monitor(this.checkbox._inputElement, true).subscribe((focusOrigin) => {\n if (focusOrigin) {\n this.to.focus && this.to.focus(this.field);\n } else {\n this.to.blur && this.to.blur(this.field);\n }\n });\n }\n }\n\n ngAfterViewChecked() {\n if (this.required !== this._required && this.checkbox && this.checkbox._inputElement) {\n this._required = this.required;\n const inputElement = this.checkbox._inputElement.nativeElement;\n if (this.required) {\n this.renderer.setAttribute(inputElement, 'required', 'required');\n } else {\n this.renderer.removeAttribute(inputElement, 'required');\n }\n }\n }\n\n ngOnDestroy() {\n if (this.checkbox) {\n this.focusMonitor.stopMonitoring(this.checkbox._inputElement);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n }),\n ],\n})\nexport class FormlyMatCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAqCa,4BACH,SAA0B;IAgBlC,YAAoB,QAAmB,EAAU,YAA0B;QACzE,KAAK,EAAE,CAAC;QADU,aAAQ,GAAR,QAAQ,CAAW;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAZ3E,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,aAAa,EAAE,IAAI;gBACnB,UAAU,EAAE,QAAiB;gBAC7B,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,QAAiB;aACzB;SACF,CAAC;KAKD;IAED,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;IAED,eAAe;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW;gBACjF,IAAI,WAAW,EAAE;oBACf,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC5C;qBAAM;oBACL,IAAI,CAAC,EAAE,CAAC,IAAI,I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AAY;YACZ,mBAAmB;YAEnB,iBAAiB;YAEjB,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,UAAU;wBAChB,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,UAAU;qBACpB;iBACF;aACF,CAAC;SACH;2FAEU,uBAAuB;kBAxBnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,iBAAiB;wBAEjB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,UAAU;oCAChB,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;gCACD;oCACE,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,UAAU;iCACpB;6BACF;yBACF,CAAC;qBACH;iBACF;;;ACjCD;;;;;;"}
@@ -11,7 +11,7 @@ import { MatInputModule } from '@angular/material/input';
11
11
  import * as i1 from '@angular/material/datepicker';
12
12
  import { MatDatepickerModule } from '@angular/material/datepicker';
13
13
 
14
- class FormlyDatepickerTypeComponent extends FieldType {
14
+ class FormlyFieldDatepicker extends FieldType {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.defaultOptions = {
@@ -36,8 +36,8 @@ class FormlyDatepickerTypeComponent extends FieldType {
36
36
  this.to[this.to.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;
37
37
  }
38
38
  }
39
- FormlyDatepickerTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyDatepickerTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
40
- 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: `
39
+ FormlyFieldDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyFieldDatepicker, deps: null, target: i0.ɵɵFactoryTarget.Component });
40
+ FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: FormlyFieldDatepicker, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
41
41
  <input
42
42
  matInput
43
43
  [id]="id"
@@ -74,7 +74,7 @@ FormlyDatepickerTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
74
74
  >
75
75
  </mat-datepicker>
76
76
  `, 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 });
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyDatepickerTypeComponent, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
78
78
  type: Component,
79
79
  args: [{
80
80
  selector: 'formly-field-mat-datepicker',
@@ -124,13 +124,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
124
124
 
125
125
  class FormlyMatDatepickerModule {
126
126
  }
127
- FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
128
- FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyDatepickerTypeComponent], imports: [CommonModule,
127
+ FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
128
+ FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
129
129
  ReactiveFormsModule,
130
130
  MatInputModule,
131
131
  MatDatepickerModule,
132
132
  FormlyMatFormFieldModule, i4.FormlyModule] });
133
- FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
133
+ FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
134
134
  CommonModule,
135
135
  ReactiveFormsModule,
136
136
  MatInputModule,
@@ -140,16 +140,16 @@ FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0
140
140
  types: [
141
141
  {
142
142
  name: 'datepicker',
143
- component: FormlyDatepickerTypeComponent,
143
+ component: FormlyFieldDatepicker,
144
144
  wrappers: ['form-field'],
145
145
  },
146
146
  ],
147
147
  }),
148
148
  ]] });
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
150
150
  type: NgModule,
151
151
  args: [{
152
- declarations: [FormlyDatepickerTypeComponent],
152
+ declarations: [FormlyFieldDatepicker],
153
153
  imports: [
154
154
  CommonModule,
155
155
  ReactiveFormsModule,
@@ -160,7 +160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
160
160
  types: [
161
161
  {
162
162
  name: 'datepicker',
163
- component: FormlyDatepickerTypeComponent,
163
+ component: FormlyFieldDatepicker,
164
164
  wrappers: ['form-field'],
165
165
  },
166
166
  ],
@@ -173,5 +173,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
173
173
  * Generated bundle index. Do not edit.
174
174
  */
175
175
 
176
- export { FormlyMatDatepickerModule };
176
+ export { FormlyFieldDatepicker, FormlyMatDatepickerModule };
177
177
  //# 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,sCAAsC,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;o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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, TemplateRef } from '@angular/core';\nimport { FieldTypeConfig } 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 {\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 { 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":[],"mappings":";;;;;;;;;;;;;MA6Ca,8BAA8B,SAA0B;IAzCrE;;QA4C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,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,yBAAyB;kBApBrC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBAEnB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,YAAY;oCAClB,SAAS,EAAE,qBAAqB;oCAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC9BD;;;;;;"}
@@ -37,8 +37,8 @@ class FormlyWrapperFormField extends FieldWrapper {
37
37
  this.focusMonitor.stopMonitoring(this.elementRef);
38
38
  }
39
39
  }
40
- FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyWrapperFormField, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
41
- FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FormlyWrapperFormField, selector: "formly-wrapper-mat-form-field", viewQueries: [{ propertyName: "formField", first: true, predicate: MatFormField, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
40
+ FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", 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.1.2", 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%}formly-wrapper-mat-form-field .mat-form-field-underline,formly-wrapper-mat-form-field .mat-form-field-subscript-wrapper{position:static}\n"], components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatLabel, selector: "mat-label" }, { type: i2.MatPrefix, selector: "[matPrefix]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
89
+ `, isInline: true, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}\n"], components: [{ type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatLabel, selector: "mat-label" }, { type: i2.MatPrefix, selector: "[matPrefix]" }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
91
91
  type: Component,
92
92
  args: [{ selector: 'formly-wrapper-mat-form-field', template: `
93
93
  <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->
@@ -137,7 +137,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
137
137
  <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ field: field }"></ng-container>
138
138
  </ng-template>
139
139
  </ng-template>
140
- `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}formly-wrapper-mat-form-field .mat-form-field-underline,formly-wrapper-mat-form-field .mat-form-field-subscript-wrapper{position:static}\n"] }]
140
+ `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["formly-wrapper-mat-form-field .mat-form-field{width:100%}\n"] }]
141
141
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.FocusMonitor }]; }, propDecorators: { formField: [{
142
142
  type: ViewChild,
143
143
  args: [MatFormField, { static: true }]
@@ -145,11 +145,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
145
145
 
146
146
  class FormlyMatFormFieldModule {
147
147
  }
148
- FormlyMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
149
- FormlyMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule,
148
+ FormlyMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
149
+ FormlyMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", 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.0.3", ngImport: i0, type: FormlyMatFormFieldModule, imports: [[
152
+ FormlyMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", 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.0.3", ngImport: i0, type: FormlyMatFormFieldModule, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatFormFieldModule, decorators: [{
166
166
  type: NgModule,
167
167
  args: [{
168
168
  declarations: [FormlyWrapperFormField],
@@ -250,10 +250,12 @@ class FieldType extends FieldType$1 {
250
250
  return this.shouldLabelFloat;
251
251
  }
252
252
  get value() {
253
- return this.formControl.value;
253
+ var _a;
254
+ return (_a = this.formControl) === null || _a === void 0 ? void 0 : _a.value;
254
255
  }
255
256
  set value(value) {
256
- this.formControl.patchValue(value);
257
+ var _a;
258
+ (_a = this.formControl) === null || _a === void 0 ? void 0 : _a.patchValue(value);
257
259
  }
258
260
  get ngControl() {
259
261
  return this.formControl;
@@ -289,9 +291,9 @@ class FieldType extends FieldType$1 {
289
291
  }
290
292
  }
291
293
  }
292
- FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive });
293
- FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: FieldType, viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true }, { propertyName: "_controls", predicate: MatFormFieldControl, descendants: true }], usesInheritance: true, ngImport: i0 });
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FieldType, decorators: [{
294
+ FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive });
295
+ FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.2", type: FieldType, viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true }, { propertyName: "_controls", predicate: MatFormFieldControl, descendants: true }], usesInheritance: true, ngImport: i0 });
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FieldType, decorators: [{
295
297
  type: Directive
296
298
  }], propDecorators: { matPrefix: [{
297
299
  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,+BACH,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,CAAC,MAAM;YAChE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBAC/B,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;aAC1B;SACF,CAAC,CAAC;KACJ;IAED,eAAe;;QAEb,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC,kBAAkB,KAAK,IAAI,EAAE;YAClF,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,CA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T,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 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,+BACH,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,CAAC,MAAM;YAChE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBAC/B,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;aAC1B;SACF,CAAC,CAAC;KACJ;IAED,eAAe;;QAEb,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC,kBAAkB,KAAK,IAAI,EAAE;YA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,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;;;;;;"}
@@ -15,8 +15,8 @@ class FormlyFieldInput extends FieldType {
15
15
  return this.to.type || 'text';
16
16
  }
17
17
  }
18
- FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
19
- FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: FormlyFieldInput, selector: "formly-field-mat-input", usesInheritance: true, ngImport: i0, template: `
18
+ FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
19
+ FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: FormlyFieldInput, selector: "formly-field-mat-input", usesInheritance: true, ngImport: i0, template: `
20
20
  <input
21
21
  *ngIf="type !== 'number'; else numberTmp"
22
22
  matInput
@@ -45,7 +45,7 @@ FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
45
45
  />
46
46
  </ng-template>
47
47
  `, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyFieldInput, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyFieldInput, decorators: [{
49
49
  type: Component,
50
50
  args: [{
51
51
  selector: 'formly-field-mat-input',
@@ -84,12 +84,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
84
84
 
85
85
  class FormlyMatInputModule {
86
86
  }
87
- FormlyMatInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
88
- FormlyMatInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
87
+ FormlyMatInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
88
+ FormlyMatInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
89
89
  ReactiveFormsModule,
90
90
  MatInputModule,
91
91
  FormlyMatFormFieldModule, i4.FormlyModule] });
92
- FormlyMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatInputModule, imports: [[
92
+ FormlyMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatInputModule, imports: [[
93
93
  CommonModule,
94
94
  ReactiveFormsModule,
95
95
  MatInputModule,
@@ -123,7 +123,7 @@ FormlyMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
123
123
  ],
124
124
  }),
125
125
  ]] });
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: FormlyMatInputModule, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: FormlyMatInputModule, decorators: [{
127
127
  type: NgModule,
128
128
  args: [{
129
129
  declarations: [FormlyFieldInput],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-material-input.mjs","sources":["../../../../src/ui/material/input/src/input.type.ts","../../../../src/ui/material/input/src/input.module.ts","../../../../src/ui/material/input/src/ngx-formly-material-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-input',\n template: `\n <input\n *ngIf=\"type !== 'number'; else numberTmp\"\n matInput\n [id]=\"id\"\n [type]=\"type || 'text'\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [placeholder]=\"to.placeholder\"\n />\n <ng-template #numberTmp>\n <input\n matInput\n [id]=\"id\"\n type=\"number\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [placeholder]=\"to.placeholder\"\n />\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldInput extends FieldType implements OnInit {\n get type() {\n return this.to.type || 'text';\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 { FormlyFieldInput } from './input.type';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number',\n },\n },\n },\n ],\n }),\n ],\n})\nexport class FormlyMatInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAoCa,yBAAyB,SAAS;IAC7C,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,MAAM,CAAC;KAC/B;;6GAHU,gBAAgB;iGAAhB,gBAAgB,q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;gCACD,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;gCACpC;oCACE,IAAI,EAAE,QAAQ;oCACd,OAAO,EAAE,OAAO;oCAChB,cAAc,EAAE;wCACd,eAAe,EAAE;4CACf,IAAI,EAAE,QAAQ;yCACf;qCACF;iCACF;gCACD;oCACE,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,OAAO;oCAChB,cAAc,EAAE;wCACd,eAAe,EAAE;4CACf,IAAI,EAAE,QAAQ;yCACf;qCACF;iCACF;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC/CD;;;;;;"}
1
+ {"version":3,"file":"ngx-formly-material-input.mjs","sources":["../../../../src/ui/material/input/src/input.type.ts","../../../../src/ui/material/input/src/input.module.ts","../../../../src/ui/material/input/src/ngx-formly-material-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { FieldTypeConfig } from '@ngx-formly/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-input',\n template: `\n <input\n *ngIf=\"type !== 'number'; else numberTmp\"\n matInput\n [id]=\"id\"\n [type]=\"type || 'text'\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [placeholder]=\"to.placeholder\"\n />\n <ng-template #numberTmp>\n <input\n matInput\n [id]=\"id\"\n type=\"number\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [placeholder]=\"to.placeholder\"\n />\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig> implements OnInit {\n get type() {\n return this.to.type || 'text';\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 { FormlyFieldInput } from './input.type';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number',\n },\n },\n },\n ],\n }),\n ],\n})\nexport class FormlyMatInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqCa,yBAAyB,SAA0B;IAC9D,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,MAAM,CAAC;KAC/B;;6GAHU,gBAAgB;iGAAhB,gBAAgB,qFA/BjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT;2FAGU,gBAAgB;kBAjC5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;;MCYY,oBAAoB;;iHAApB,oBAAoB;kHAApB,oBAAoB,iBArChB,gBAAgB,aAE7B,YAAY;QACZ,mBAAmB;QACnB,cAAc;QAEd,wBAAwB;kHA+Bf,oBAAoB,YApCtB;YACP,YAAY;YACZ,mBAAmB;YACnB,cAAc;YAEd,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,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