@ngx-formly/material 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +26 -19
  2. package/checkbox/index.d.ts +52 -5
  3. package/datepicker/index.d.ts +73 -5
  4. package/fesm2022/ngx-formly-material-checkbox.mjs +7 -7
  5. package/fesm2022/ngx-formly-material-checkbox.mjs.map +1 -1
  6. package/fesm2022/ngx-formly-material-datepicker.mjs +7 -7
  7. package/fesm2022/ngx-formly-material-datepicker.mjs.map +1 -1
  8. package/fesm2022/ngx-formly-material-form-field.mjs +10 -10
  9. package/fesm2022/ngx-formly-material-form-field.mjs.map +1 -1
  10. package/fesm2022/ngx-formly-material-input.mjs +7 -7
  11. package/fesm2022/ngx-formly-material-multicheckbox.mjs +7 -7
  12. package/fesm2022/ngx-formly-material-multicheckbox.mjs.map +1 -1
  13. package/fesm2022/ngx-formly-material-native-select.mjs +7 -7
  14. package/fesm2022/ngx-formly-material-radio.mjs +7 -7
  15. package/fesm2022/ngx-formly-material-radio.mjs.map +1 -1
  16. package/fesm2022/ngx-formly-material-select.mjs +7 -7
  17. package/fesm2022/ngx-formly-material-select.mjs.map +1 -1
  18. package/fesm2022/ngx-formly-material-slider.mjs +7 -7
  19. package/fesm2022/ngx-formly-material-textarea.mjs +7 -7
  20. package/fesm2022/ngx-formly-material-toggle.mjs +7 -7
  21. package/fesm2022/ngx-formly-material-toggle.mjs.map +1 -1
  22. package/fesm2022/ngx-formly-material.mjs +4 -4
  23. package/form-field/index.d.ts +84 -5
  24. package/index.d.ts +20 -5
  25. package/input/index.d.ts +31 -5
  26. package/multicheckbox/index.d.ts +44 -5
  27. package/native-select/index.d.ts +32 -5
  28. package/package.json +7 -7
  29. package/radio/index.d.ts +45 -5
  30. package/select/index.d.ts +54 -5
  31. package/slider/index.d.ts +43 -5
  32. package/textarea/index.d.ts +39 -5
  33. package/toggle/index.d.ts +41 -5
  34. package/checkbox/checkbox.config.d.ts +0 -2
  35. package/checkbox/checkbox.module.d.ts +0 -12
  36. package/checkbox/checkbox.type.d.ts +0 -36
  37. package/checkbox/public_api.d.ts +0 -3
  38. package/datepicker/datepicker.config.d.ts +0 -2
  39. package/datepicker/datepicker.module.d.ts +0 -13
  40. package/datepicker/datepicker.type.d.ts +0 -56
  41. package/datepicker/public_api.d.ts +0 -3
  42. package/form-field/field.type.d.ts +0 -37
  43. package/form-field/form-field.config.d.ts +0 -2
  44. package/form-field/form-field.module.d.ts +0 -11
  45. package/form-field/form-field.wrapper.d.ts +0 -38
  46. package/form-field/public_api.d.ts +0 -4
  47. package/input/input.config.d.ts +0 -2
  48. package/input/input.module.d.ts +0 -12
  49. package/input/input.type.d.ts +0 -15
  50. package/input/public_api.d.ts +0 -3
  51. package/lib/material.config.d.ts +0 -1
  52. package/lib/ui-material.d.ts +0 -3
  53. package/lib/ui-material.module.d.ts +0 -13
  54. package/multicheckbox/multicheckbox.config.d.ts +0 -2
  55. package/multicheckbox/multicheckbox.module.d.ts +0 -13
  56. package/multicheckbox/multicheckbox.type.d.ts +0 -27
  57. package/multicheckbox/public_api.d.ts +0 -3
  58. package/native-select/native-select.config.d.ts +0 -2
  59. package/native-select/native-select.module.d.ts +0 -13
  60. package/native-select/native-select.type.d.ts +0 -15
  61. package/native-select/public_api.d.ts +0 -3
  62. package/public_api.d.ts +0 -1
  63. package/radio/public_api.d.ts +0 -3
  64. package/radio/radio.config.d.ts +0 -2
  65. package/radio/radio.module.d.ts +0 -13
  66. package/radio/radio.type.d.ts +0 -28
  67. package/select/public_api.d.ts +0 -3
  68. package/select/select.config.d.ts +0 -2
  69. package/select/select.module.d.ts +0 -14
  70. package/select/select.type.d.ts +0 -36
  71. package/slider/public_api.d.ts +0 -3
  72. package/slider/slider.config.d.ts +0 -2
  73. package/slider/slider.module.d.ts +0 -13
  74. package/slider/slider.type.d.ts +0 -26
  75. package/textarea/public_api.d.ts +0 -3
  76. package/textarea/textarea.config.d.ts +0 -2
  77. package/textarea/textarea.module.d.ts +0 -12
  78. package/textarea/textarea.type.d.ts +0 -23
  79. package/toggle/public_api.d.ts +0 -3
  80. package/toggle/toggle.config.d.ts +0 -2
  81. package/toggle/toggle.module.d.ts +0 -12
  82. package/toggle/toggle.type.d.ts +0 -25
package/README.md CHANGED
@@ -55,25 +55,32 @@ Formly is a dynamic (JSON powered) form library for Angular that brings unmatche
55
55
 
56
56
  #### **Which Version to use?**
57
57
 
58
- | Angular version | Formly version |
59
- | --------------- | ---------------------- |
60
- | Angular >= 19 | `@ngx-formly/core@8.x` |
61
- | Angular >= 18 | `@ngx-formly/core@7.x` |
62
- | Angular >= 13 | `@ngx-formly/core@6.x` |
63
- | Angular >= 7 | `@ngx-formly/core@5.x` |
64
- | Angular >= 6 | `@ngx-formly/core@4.x` |
65
- | Angular >= 5 | `@ngx-formly/core@3.x` |
66
- | Angular >= 4 | `@ngx-formly/core@2.x` |
67
- | Angular >= 2 | `ng-formly@1.x` |
68
-
69
- #### Upgrading to v8
70
-
71
- Formly v8 requires Angular 19 or newer. Upgrade Angular first, then update all
72
- `@ngx-formly/*` packages used by your application together to v8.
73
- The Material, PrimeNG, and NG-ZORRO integrations require version 19 or newer of
74
- their respective UI libraries. Applications staying on Angular 18 should use Formly v7.
75
-
76
- See the [changelog](CHANGELOG.md) for the full list of changes.
58
+ | Angular version | Formly version | Migration |
59
+ | --------------- | -------------------- | ---------------------------------- |
60
+ | Angular >= 20 | `@ngx-formly/core@9.x` | [Upgrade to v9](UPGRADE-9.0.md) |
61
+ | Angular >= 19 | `@ngx-formly/core@8.x` | [Upgrade to v8](UPGRADE-8.0.md) |
62
+ | Angular >= 18 | `@ngx-formly/core@7.x` | [Upgrade to v7](UPGRADE-7.0.md) |
63
+ | Angular >= 13 | `@ngx-formly/core@6.x` | [Upgrade to v6](UPGRADE-6.0.md) |
64
+ | Angular >= 7 | `@ngx-formly/core@5.x` | [Upgrade to v5](UPGRADE-5.0.md) |
65
+ | Angular >= 6 | `@ngx-formly/core@4.x` | |
66
+ | Angular >= 5 | `@ngx-formly/core@3.x` | |
67
+ | Angular >= 4 | `@ngx-formly/core@2.x` | [Upgrade to v2](UPGRADE-2.0.md) |
68
+ | Angular >= 2 | `ng-formly@1.x` | |
69
+
70
+ #### Upgrading to v9
71
+
72
+ Formly v9 requires Angular 20 or newer. Upgrade Angular first, then update all
73
+ `@ngx-formly/*` packages used by your application together to v9.
74
+ The Material, PrimeNG, and NG-ZORRO integrations require version 20 or newer of
75
+ their respective UI libraries. Kendo requires version 19.1 or newer, and NativeScript
76
+ requires `@nativescript/angular` 20 or newer. Applications staying on Angular 19 should
77
+ use Formly v8; applications staying on Angular 18 should use Formly v7.
78
+
79
+ PrimeNG datepicker fields no longer accept `monthNavigator`, `yearNavigator`, or
80
+ `yearRange`, which PrimeNG 20 removed. Replace `@primeng/themes` imports with
81
+ `@primeuix/themes` when configuring a PrimeNG theme.
82
+
83
+ See the [v9 upgrade guide](UPGRADE-9.0.md) for migration steps and the [changelog](CHANGELOG.md) for the full list of changes.
77
84
 
78
85
  ## Core Team
79
86
 
@@ -1,5 +1,52 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@ngx-formly/material/checkbox" />
5
- export * from './public_api';
1
+ import * as i6 from '@ngx-formly/core';
2
+ import { ConfigOption, FormlyFieldConfig, FieldTypeConfig } from '@ngx-formly/core';
3
+ import * as i0 from '@angular/core';
4
+ import { Type, AfterViewInit, AfterViewChecked, OnDestroy, Renderer2 } from '@angular/core';
5
+ import * as i5 from '@ngx-formly/material/form-field';
6
+ import { FormlyFieldProps, FieldType } from '@ngx-formly/material/form-field';
7
+ import * as i4 from '@angular/material/checkbox';
8
+ import { MatCheckbox } from '@angular/material/checkbox';
9
+ import { FocusMonitor } from '@angular/cdk/a11y';
10
+ import * as i2 from '@angular/common';
11
+ import * as i3 from '@angular/forms';
12
+
13
+ declare function withFormlyFieldCheckbox(): ConfigOption;
14
+
15
+ interface CheckboxProps extends FormlyFieldProps {
16
+ indeterminate?: boolean;
17
+ labelPosition?: 'before' | 'after';
18
+ }
19
+ interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {
20
+ type: 'checkbox' | Type<FormlyFieldCheckbox>;
21
+ }
22
+ declare class FormlyFieldCheckbox extends FieldType<FieldTypeConfig<CheckboxProps>> implements AfterViewInit, AfterViewChecked, OnDestroy {
23
+ private renderer;
24
+ private focusMonitor;
25
+ checkbox: MatCheckbox;
26
+ defaultOptions: {
27
+ props: {
28
+ hideFieldUnderline: boolean;
29
+ indeterminate: boolean;
30
+ floatLabel: "always";
31
+ hideLabel: boolean;
32
+ color: "accent";
33
+ };
34
+ };
35
+ private _required;
36
+ constructor(renderer: Renderer2, focusMonitor: FocusMonitor);
37
+ onContainerClick(event: MouseEvent): void;
38
+ ngAfterViewInit(): void;
39
+ ngAfterViewChecked(): void;
40
+ ngOnDestroy(): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFieldCheckbox, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormlyFieldCheckbox, "formly-field-mat-checkbox", never, {}, {}, never, never, false, never>;
43
+ }
44
+
45
+ declare class FormlyMatCheckboxModule {
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlyMatCheckboxModule, never>;
47
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyMatCheckboxModule, [typeof FormlyFieldCheckbox], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.MatCheckboxModule, typeof i5.FormlyMatFormFieldModule, typeof i6.FormlyModule], never>;
48
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormlyMatCheckboxModule>;
49
+ }
50
+
51
+ export { FormlyFieldCheckbox, FormlyMatCheckboxModule, withFormlyFieldCheckbox };
52
+ export type { FormlyCheckboxFieldConfig };
@@ -1,5 +1,73 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@ngx-formly/material/datepicker" />
5
- export * from './public_api';
1
+ import * as i7 from '@ngx-formly/core';
2
+ import { ConfigOption, FormlyFieldConfig, FieldTypeConfig, FormlyConfig } from '@ngx-formly/core';
3
+ import * as i0 from '@angular/core';
4
+ import { Type, AfterViewInit, OnDestroy, TemplateRef, ChangeDetectorRef } from '@angular/core';
5
+ import * as i6 from '@ngx-formly/material/form-field';
6
+ import { FormlyFieldProps, FieldType } from '@ngx-formly/material/form-field';
7
+ import { ComponentType } from '@angular/cdk/portal';
8
+ import * as i5 from '@angular/material/datepicker';
9
+ import { MatDatepicker, MatCalendarCellClassFunction } from '@angular/material/datepicker';
10
+ import * as i2 from '@angular/common';
11
+ import * as i3 from '@angular/forms';
12
+ import * as i4 from '@angular/material/input';
13
+
14
+ declare function withFormlyFieldDatepicker(): ConfigOption;
15
+
16
+ interface DatepickerProps extends FormlyFieldProps {
17
+ datepickerOptions?: Partial<{
18
+ touchUi: boolean;
19
+ opened: boolean;
20
+ disabled: boolean;
21
+ startView: 'month' | 'year' | 'multi-year';
22
+ datepickerTogglePosition: 'suffix' | 'prefix';
23
+ calendarHeaderComponent: ComponentType<any>;
24
+ filter: (date: any | null) => boolean;
25
+ min: any;
26
+ max: any;
27
+ dateInput: (field: FieldTypeConfig<DatepickerProps>, event: any) => void;
28
+ dateChange: (field: FieldTypeConfig<DatepickerProps>, event: any) => void;
29
+ monthSelected: (field: FieldTypeConfig<DatepickerProps>, event: any, picker: MatDatepicker<any>) => void;
30
+ yearSelected: (field: FieldTypeConfig<DatepickerProps>, event: any, picker: MatDatepicker<any>) => void;
31
+ dateClass: MatCalendarCellClassFunction<any>;
32
+ panelClass: string | string[];
33
+ startAt: any | null;
34
+ }>;
35
+ }
36
+ interface FormlyDatepickerFieldConfig extends FormlyFieldConfig<DatepickerProps> {
37
+ type: 'datepicker' | Type<FormlyFieldDatepicker>;
38
+ }
39
+ declare class FormlyFieldDatepicker extends FieldType<FieldTypeConfig<DatepickerProps>> implements AfterViewInit, OnDestroy {
40
+ private config;
41
+ private cdRef;
42
+ datepickerToggle: TemplateRef<any>;
43
+ defaultOptions: {
44
+ props: {
45
+ datepickerOptions: {
46
+ startView: "month";
47
+ datepickerTogglePosition: "suffix";
48
+ disabled: boolean;
49
+ opened: boolean;
50
+ dateInput: () => void;
51
+ dateChange: () => void;
52
+ monthSelected: () => void;
53
+ yearSelected: () => void;
54
+ };
55
+ };
56
+ };
57
+ private fieldErrorsObserver;
58
+ constructor(config: FormlyConfig, cdRef: ChangeDetectorRef);
59
+ detectChanges(): void;
60
+ ngAfterViewInit(): void;
61
+ ngOnDestroy(): void;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFieldDatepicker, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormlyFieldDatepicker, "formly-field-mat-datepicker", never, {}, {}, never, never, false, never>;
64
+ }
65
+
66
+ declare class FormlyMatDatepickerModule {
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlyMatDatepickerModule, never>;
68
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyMatDatepickerModule, [typeof FormlyFieldDatepicker], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.MatInputModule, typeof i5.MatDatepickerModule, typeof i6.FormlyMatFormFieldModule, typeof i7.FormlyModule], never>;
69
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormlyMatDatepickerModule>;
70
+ }
71
+
72
+ export { FormlyFieldDatepicker, FormlyMatDatepickerModule, withFormlyFieldDatepicker };
73
+ export type { FormlyDatepickerFieldConfig };
@@ -61,8 +61,8 @@ class FormlyFieldCheckbox extends FieldType {
61
61
  this.focusMonitor.stopMonitoring(this.checkbox._inputElement);
62
62
  }
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldCheckbox, deps: [{ token: i0.Renderer2 }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
65
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyFieldCheckbox, isStandalone: false, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyFieldCheckbox, deps: [{ token: i0.Renderer2 }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
65
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: FormlyFieldCheckbox, isStandalone: false, 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"
@@ -80,7 +80,7 @@ class FormlyFieldCheckbox extends FieldType {
80
80
  </mat-checkbox>
81
81
  `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
82
82
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
84
84
  type: Component,
85
85
  args: [{
86
86
  selector: 'formly-field-mat-checkbox',
@@ -126,18 +126,18 @@ function withFormlyFieldCheckbox() {
126
126
  }
127
127
 
128
128
  class FormlyMatCheckboxModule {
129
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
130
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
130
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
131
131
  ReactiveFormsModule,
132
132
  MatCheckboxModule,
133
133
  FormlyMatFormFieldModule, i4.FormlyModule] }); }
134
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatCheckboxModule, imports: [CommonModule,
134
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatCheckboxModule, imports: [CommonModule,
135
135
  ReactiveFormsModule,
136
136
  MatCheckboxModule,
137
137
  FormlyMatFormFieldModule,
138
138
  FormlyModule.forChild(withFormlyFieldCheckbox())] }); }
139
139
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatCheckboxModule, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", 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.config.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 Type,\n} from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\ninterface CheckboxProps extends FormlyFieldProps {\n indeterminate?: boolean;\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {\n type: 'checkbox' | Type<FormlyFieldCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-mat-checkbox',\n template: `\n <mat-checkbox\n [formControl]=\"formControl\"\n [id]=\"id\"\n [name]=\"field.name\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [indeterminate]=\"props.indeterminate && formControl.value == null\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n >\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\n }\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldCheckbox\n extends FieldType<FieldTypeConfig<CheckboxProps>>\n implements AfterViewInit, AfterViewChecked, OnDestroy\n{\n @ViewChild(MatCheckbox, { static: true }) checkbox!: MatCheckbox;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n indeterminate: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n private _required!: boolean;\n constructor(\n private renderer: Renderer2,\n private focusMonitor: FocusMonitor,\n ) {\n super();\n }\n\n override onContainerClick(event: MouseEvent): void {\n this.checkbox.focus();\n super.onContainerClick(event);\n }\n\n ngAfterViewInit() {\n if (this.checkbox) {\n this.focusMonitor.monitor(this.checkbox._inputElement, true).subscribe((focusOrigin) => {\n this.field.focus = !!focusOrigin;\n this.stateChanges.next();\n if (focusOrigin) {\n this.props.focus && this.props.focus(this.field);\n } else {\n this.props.blur && this.props.blur(this.field);\n }\n });\n }\n }\n\n ngAfterViewChecked() {\n if (this.required !== this._required && this.checkbox && this.checkbox._inputElement) {\n this._required = this.required;\n const inputElement = this.checkbox._inputElement.nativeElement;\n if (this.required) {\n this.renderer.setAttribute(inputElement, 'required', 'required');\n } else {\n this.renderer.removeAttribute(inputElement, 'required');\n }\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n if (this.checkbox) {\n this.focusMonitor.stopMonitoring(this.checkbox._inputElement);\n }\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\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","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';\nimport { withFormlyFieldCheckbox } from './checkbox.config';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class FormlyMatCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA8CM,MAAO,mBACX,SAAQ,SAAyC,CAAA;IAejD,WAAA,CACU,QAAmB,EACnB,YAA0B,EAAA;AAElC,QAAA,KAAK,EAAE;QAHC,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,YAAY,GAAZ,YAAY;AAbb,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,aAAa,EAAE,IAAI;AACnB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,QAAiB;AACzB,aAAA;SACF;IAQD;AAES,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;AACrB,QAAA,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAC/B;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,KAAI;gBACrF,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,WAAW;AAChC,gBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;gBACxB,IAAI,WAAW,EAAE;AACf,oBAAA,IAAI,CAAC,KAAK,CA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AAA,CAAA;;4FAGvC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAZnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,iBAAiB;wBAEjB,wBAAwB;AACxB,wBAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;AACjD,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-material-checkbox.mjs","sources":["../../../../src/ui/material/checkbox/src/checkbox.type.ts","../../../../src/ui/material/checkbox/src/checkbox.config.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 Type,\n} from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\ninterface CheckboxProps extends FormlyFieldProps {\n indeterminate?: boolean;\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {\n type: 'checkbox' | Type<FormlyFieldCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-mat-checkbox',\n template: `\n <mat-checkbox\n [formControl]=\"formControl\"\n [id]=\"id\"\n [name]=\"field.name\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [indeterminate]=\"props.indeterminate && formControl.value == null\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n >\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\n }\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldCheckbox\n extends FieldType<FieldTypeConfig<CheckboxProps>>\n implements AfterViewInit, AfterViewChecked, OnDestroy\n{\n @ViewChild(MatCheckbox, { static: true }) checkbox!: MatCheckbox;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n indeterminate: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n private _required!: boolean;\n constructor(\n private renderer: Renderer2,\n private focusMonitor: FocusMonitor,\n ) {\n super();\n }\n\n override onContainerClick(event: MouseEvent): void {\n this.checkbox.focus();\n super.onContainerClick(event);\n }\n\n ngAfterViewInit() {\n if (this.checkbox) {\n this.focusMonitor.monitor(this.checkbox._inputElement, true).subscribe((focusOrigin) => {\n this.field.focus = !!focusOrigin;\n this.stateChanges.next();\n if (focusOrigin) {\n this.props.focus && this.props.focus(this.field);\n } else {\n this.props.blur && this.props.blur(this.field);\n }\n });\n }\n }\n\n ngAfterViewChecked() {\n if (this.required !== this._required && this.checkbox && this.checkbox._inputElement) {\n this._required = this.required;\n const inputElement = this.checkbox._inputElement.nativeElement;\n if (this.required) {\n this.renderer.setAttribute(inputElement, 'required', 'required');\n } else {\n this.renderer.removeAttribute(inputElement, 'required');\n }\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n if (this.checkbox) {\n this.focusMonitor.stopMonitoring(this.checkbox._inputElement);\n }\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\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","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';\nimport { withFormlyFieldCheckbox } from './checkbox.config';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class FormlyMatCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA8CM,MAAO,mBACX,SAAQ,SAAyC,CAAA;IAejD,WAAA,CACU,QAAmB,EACnB,YAA0B,EAAA;AAElC,QAAA,KAAK,EAAE;QAHC,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,YAAY,GAAZ,YAAY;AAbb,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,aAAa,EAAE,IAAI;AACnB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,QAAiB;AACzB,aAAA;SACF;IAQD;AAES,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;AACrB,QAAA,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAC/B;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,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AA,EAAA,uBAAuB,YAThC,YAAY;YACZ,mBAAmB;YAEnB,iBAAiB;YAEjB,wBAAwB;AACxB,YAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGvC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAZnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,iBAAiB;wBAEjB,wBAAwB;AACxB,wBAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;AACjD,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -55,8 +55,8 @@ class FormlyFieldDatepicker extends FieldType {
55
55
  super.ngOnDestroy();
56
56
  this.fieldErrorsObserver?.unsubscribe();
57
57
  }
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldDatepicker, deps: [{ token: i1.FormlyConfig }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
59
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: FormlyFieldDatepicker, isStandalone: false, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyFieldDatepicker, deps: [{ token: i1.FormlyConfig }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
59
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.33", type: FormlyFieldDatepicker, isStandalone: false, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
60
60
  <input
61
61
  matInput
62
62
  [id]="id"
@@ -101,7 +101,7 @@ class FormlyFieldDatepicker extends FieldType {
101
101
  </mat-datepicker>
102
102
  `, isInline: true, dependencies: [{ kind: "directive", 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]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
103
103
  }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
105
105
  type: Component,
106
106
  args: [{
107
107
  selector: 'formly-field-mat-datepicker',
@@ -170,20 +170,20 @@ function withFormlyFieldDatepicker() {
170
170
  }
171
171
 
172
172
  class FormlyMatDatepickerModule {
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
174
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
173
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
174
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
175
175
  ReactiveFormsModule,
176
176
  MatInputModule,
177
177
  MatDatepickerModule,
178
178
  FormlyMatFormFieldModule, i1.FormlyModule] }); }
179
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatDatepickerModule, imports: [CommonModule,
179
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatDatepickerModule, imports: [CommonModule,
180
180
  ReactiveFormsModule,
181
181
  MatInputModule,
182
182
  MatDatepickerModule,
183
183
  FormlyMatFormFieldModule,
184
184
  FormlyModule.forChild(withFormlyFieldDatepicker())] }); }
185
185
  }
186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
187
187
  type: NgModule,
188
188
  args: [{
189
189
  declarations: [FormlyFieldDatepicker],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-material-datepicker.mjs","sources":["../../../../src/ui/material/datepicker/src/datepicker.type.ts","../../../../src/ui/material/datepicker/src/datepicker.config.ts","../../../../src/ui/material/datepicker/src/datepicker.module.ts","../../../../src/ui/material/datepicker/src/ngx-formly-material-datepicker.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewChild,\n AfterViewInit,\n OnDestroy,\n TemplateRef,\n ChangeDetectorRef,\n Type,\n} from '@angular/core';\nimport { FieldTypeConfig, FormlyConfig, FormlyFieldConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { MatCalendarCellClassFunction, MatDatepicker } from '@angular/material/datepicker';\n\ninterface DatepickerProps extends FormlyFieldProps {\n datepickerOptions?: Partial<{\n touchUi: boolean;\n opened: boolean;\n disabled: boolean;\n startView: 'month' | 'year' | 'multi-year';\n datepickerTogglePosition: 'suffix' | 'prefix';\n calendarHeaderComponent: ComponentType<any>;\n filter: (date: any | null) => boolean;\n min: any;\n max: any;\n dateInput: (field: FieldTypeConfig<DatepickerProps>, event: any) => void;\n dateChange: (field: FieldTypeConfig<DatepickerProps>, event: any) => void;\n\n monthSelected: (field: FieldTypeConfig<DatepickerProps>, event: any, picker: MatDatepicker<any>) => void;\n yearSelected: (field: FieldTypeConfig<DatepickerProps>, event: any, picker: MatDatepicker<any>) => void;\n\n dateClass: MatCalendarCellClassFunction<any>;\n panelClass: string | string[];\n startAt: any | null;\n }>;\n}\n\nexport interface FormlyDatepickerFieldConfig extends FormlyFieldConfig<DatepickerProps> {\n type: 'datepicker' | Type<FormlyFieldDatepicker>;\n}\n\n@Component({\n selector: 'formly-field-mat-datepicker',\n template: `\n <input\n matInput\n [id]=\"id\"\n [name]=\"field.name\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"props.datepickerOptions.filter\"\n [max]=\"props.datepickerOptions.max\"\n [min]=\"props.datepickerOptions.min\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"props.placeholder\"\n [tabindex]=\"props.tabindex\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n (dateInput)=\"props.datepickerOptions.dateInput(field, $event)\"\n (dateChange)=\"props.datepickerOptions.dateChange(field, $event)\"\n />\n <ng-template #datepickerToggle>\n <mat-datepicker-toggle\n (click)=\"detectChanges()\"\n [disabled]=\"props.disabled\"\n [for]=\"picker\"\n ></mat-datepicker-toggle>\n </ng-template>\n <mat-datepicker\n #picker\n [color]=\"props.color\"\n [dateClass]=\"props.datepickerOptions.dateClass\"\n [disabled]=\"props.datepickerOptions.disabled\"\n [opened]=\"props.datepickerOptions.opened\"\n [panelClass]=\"props.datepickerOptions.panelClass\"\n [startAt]=\"props.datepickerOptions.startAt\"\n [startView]=\"props.datepickerOptions.startView\"\n [touchUi]=\"props.datepickerOptions.touchUi\"\n [calendarHeaderComponent]=\"props.datepickerOptions.calendarHeaderComponent\"\n (monthSelected)=\"props.datepickerOptions.monthSelected(field, $event, picker)\"\n (yearSelected)=\"props.datepickerOptions.yearSelected(field, $event, picker)\"\n (opened)=\"props.datepickerOptions.opened = true\"\n (closed)=\"props.datepickerOptions.opened = false\"\n >\n </mat-datepicker>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldDatepicker\n extends FieldType<FieldTypeConfig<DatepickerProps>>\n implements AfterViewInit, OnDestroy\n{\n @ViewChild('datepickerToggle', { static: true }) datepickerToggle!: TemplateRef<any>;\n\n override defaultOptions = {\n props: {\n datepickerOptions: {\n startView: 'month' as const,\n datepickerTogglePosition: 'suffix' as const,\n disabled: false,\n opened: false,\n dateInput: () => {},\n dateChange: () => {},\n monthSelected: () => {},\n yearSelected: () => {},\n },\n },\n };\n private fieldErrorsObserver!: ReturnType<typeof observe>;\n\n constructor(\n private config: FormlyConfig,\n private cdRef: ChangeDetectorRef,\n ) {\n super();\n }\n\n detectChanges() {\n this.options.detectChanges?.(this.field);\n }\n\n ngAfterViewInit() {\n this.props[this.props.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;\n observe<boolean>(this.field, ['props', 'datepickerOptions', 'opened'], () => {\n this.cdRef.detectChanges();\n });\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 && currentValue.required && currentValue.matDatepickerParse) {\n const errors = Object.keys(currentValue)\n .sort((prop) => (prop === 'matDatepickerParse' ? -1 : 0))\n .reduce((errors, prop) => ({ ...errors, [prop]: currentValue[prop] }), {});\n\n this.fieldErrorsObserver?.setValue(errors);\n }\n });\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.fieldErrorsObserver?.unsubscribe();\n }\n}\n","import { FormlyFieldDatepicker } from './datepicker.type';\nimport { ConfigOption } from '@ngx-formly/core';\n\nexport function withFormlyFieldDatepicker(): ConfigOption {\n return {\n types: [\n {\n name: 'datepicker',\n component: FormlyFieldDatepicker,\n wrappers: ['form-field'],\n },\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';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { FormlyFieldDatepicker } from './datepicker.type';\nimport { withFormlyFieldDatepicker } from './datepicker.config';\n\n@NgModule({\n declarations: [FormlyFieldDatepicker],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDatepickerModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldDatepicker()),\n ],\n})\nexport class FormlyMatDatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe"],"mappings":";;;;;;;;;;;;;AA2FM,MAAO,qBACX,SAAQ,SAA2C,CAAA;IAqBnD,WAAA,CACU,MAAoB,EACpB,KAAwB,EAAA;AAEhC,QAAA,KAAK,EAAE;QAHC,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;AAlBN,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,iBAAiB,EAAE;AACjB,oBAAA,SAAS,EAAE,OAAgB;AAC3B,oBAAA,wBAAwB,EAAE,QAAiB;AAC3C,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,MAAM,EAAE,KAAK;AACb,oBAAA,SAAS,EAAE,MAAK,EAAE,CAAC;AACnB,oBAAA,UAAU,EAAE,MAAK,EAAE,CAAC;AACpB,oBAAA,aAAa,EAAE,MAAK,EAAE,CAAC;AACvB,oBAAA,YAAY,EAAE,MAAK,EAAE,CAAC;AACvB,iBAAA;AACF,aAAA;SACF;IAQD;IAEA,aAAa,GAAA;QACX,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1C;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,gBAAgB;AACzF,QAAAA,QAAO,CAAU,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,MAAK;AAC1E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AACE,gBAAA,IAAI,EAAE,YAAY;AAClB,gBAAA,SAAS,EAAE,qBAAqB;gBAChC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,aAAA;AACF,SAAA;KACF;AACH;;MCWa,yBAAyB,CAAA;+GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAzB,yBAAyB,EAAA,YAAA,EAAA,CAXrB,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAElC,YAAY;YACZ,mBAAmB;YACnB,cAAc;YACd,mBAAmB;YAEnB,wBAAwB,EAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YATlC,YAAY;YACZ,mBAAmB;YACnB,cAAc;YACd,mBAAmB;YAEnB,wBAAwB;AACxB,YAAA,YAAY,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGzC,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAZrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBAEnB,wBAAwB;AACxB,wBAAA,YAAY,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC;AACnD,qBAAA;AACF,iBAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-material-datepicker.mjs","sources":["../../../../src/ui/material/datepicker/src/datepicker.type.ts","../../../../src/ui/material/datepicker/src/datepicker.config.ts","../../../../src/ui/material/datepicker/src/datepicker.module.ts","../../../../src/ui/material/datepicker/src/ngx-formly-material-datepicker.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewChild,\n AfterViewInit,\n OnDestroy,\n TemplateRef,\n ChangeDetectorRef,\n Type,\n} from '@angular/core';\nimport { FieldTypeConfig, FormlyConfig, FormlyFieldConfig, ɵobserve as observe } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { MatCalendarCellClassFunction, MatDatepicker } from '@angular/material/datepicker';\n\ninterface DatepickerProps extends FormlyFieldProps {\n datepickerOptions?: Partial<{\n touchUi: boolean;\n opened: boolean;\n disabled: boolean;\n startView: 'month' | 'year' | 'multi-year';\n datepickerTogglePosition: 'suffix' | 'prefix';\n calendarHeaderComponent: ComponentType<any>;\n filter: (date: any | null) => boolean;\n min: any;\n max: any;\n dateInput: (field: FieldTypeConfig<DatepickerProps>, event: any) => void;\n dateChange: (field: FieldTypeConfig<DatepickerProps>, event: any) => void;\n\n monthSelected: (field: FieldTypeConfig<DatepickerProps>, event: any, picker: MatDatepicker<any>) => void;\n yearSelected: (field: FieldTypeConfig<DatepickerProps>, event: any, picker: MatDatepicker<any>) => void;\n\n dateClass: MatCalendarCellClassFunction<any>;\n panelClass: string | string[];\n startAt: any | null;\n }>;\n}\n\nexport interface FormlyDatepickerFieldConfig extends FormlyFieldConfig<DatepickerProps> {\n type: 'datepicker' | Type<FormlyFieldDatepicker>;\n}\n\n@Component({\n selector: 'formly-field-mat-datepicker',\n template: `\n <input\n matInput\n [id]=\"id\"\n [name]=\"field.name\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"props.datepickerOptions.filter\"\n [max]=\"props.datepickerOptions.max\"\n [min]=\"props.datepickerOptions.min\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"props.placeholder\"\n [tabindex]=\"props.tabindex\"\n [readonly]=\"props.readonly\"\n [required]=\"required\"\n (dateInput)=\"props.datepickerOptions.dateInput(field, $event)\"\n (dateChange)=\"props.datepickerOptions.dateChange(field, $event)\"\n />\n <ng-template #datepickerToggle>\n <mat-datepicker-toggle\n (click)=\"detectChanges()\"\n [disabled]=\"props.disabled\"\n [for]=\"picker\"\n ></mat-datepicker-toggle>\n </ng-template>\n <mat-datepicker\n #picker\n [color]=\"props.color\"\n [dateClass]=\"props.datepickerOptions.dateClass\"\n [disabled]=\"props.datepickerOptions.disabled\"\n [opened]=\"props.datepickerOptions.opened\"\n [panelClass]=\"props.datepickerOptions.panelClass\"\n [startAt]=\"props.datepickerOptions.startAt\"\n [startView]=\"props.datepickerOptions.startView\"\n [touchUi]=\"props.datepickerOptions.touchUi\"\n [calendarHeaderComponent]=\"props.datepickerOptions.calendarHeaderComponent\"\n (monthSelected)=\"props.datepickerOptions.monthSelected(field, $event, picker)\"\n (yearSelected)=\"props.datepickerOptions.yearSelected(field, $event, picker)\"\n (opened)=\"props.datepickerOptions.opened = true\"\n (closed)=\"props.datepickerOptions.opened = false\"\n >\n </mat-datepicker>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldDatepicker\n extends FieldType<FieldTypeConfig<DatepickerProps>>\n implements AfterViewInit, OnDestroy\n{\n @ViewChild('datepickerToggle', { static: true }) datepickerToggle!: TemplateRef<any>;\n\n override defaultOptions = {\n props: {\n datepickerOptions: {\n startView: 'month' as const,\n datepickerTogglePosition: 'suffix' as const,\n disabled: false,\n opened: false,\n dateInput: () => {},\n dateChange: () => {},\n monthSelected: () => {},\n yearSelected: () => {},\n },\n },\n };\n private fieldErrorsObserver!: ReturnType<typeof observe>;\n\n constructor(\n private config: FormlyConfig,\n private cdRef: ChangeDetectorRef,\n ) {\n super();\n }\n\n detectChanges() {\n this.options.detectChanges?.(this.field);\n }\n\n ngAfterViewInit() {\n this.props[this.props.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;\n observe<boolean>(this.field, ['props', 'datepickerOptions', 'opened'], () => {\n this.cdRef.detectChanges();\n });\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 && currentValue.required && currentValue.matDatepickerParse) {\n const errors = Object.keys(currentValue)\n .sort((prop) => (prop === 'matDatepickerParse' ? -1 : 0))\n .reduce((errors, prop) => ({ ...errors, [prop]: currentValue[prop] }), {});\n\n this.fieldErrorsObserver?.setValue(errors);\n }\n });\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.fieldErrorsObserver?.unsubscribe();\n }\n}\n","import { FormlyFieldDatepicker } from './datepicker.type';\nimport { ConfigOption } from '@ngx-formly/core';\n\nexport function withFormlyFieldDatepicker(): ConfigOption {\n return {\n types: [\n {\n name: 'datepicker',\n component: FormlyFieldDatepicker,\n wrappers: ['form-field'],\n },\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';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { FormlyFieldDatepicker } from './datepicker.type';\nimport { withFormlyFieldDatepicker } from './datepicker.config';\n\n@NgModule({\n declarations: [FormlyFieldDatepicker],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDatepickerModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild(withFormlyFieldDatepicker()),\n ],\n})\nexport class FormlyMatDatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe"],"mappings":";;;;;;;;;;;;;AA2FM,MAAO,qBACX,SAAQ,SAA2C,CAAA;IAqBnD,WAAA,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cAAc;YACd,mBAAmB;YAEnB,wBAAwB,EAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YATlC,YAAY;YACZ,mBAAmB;YACnB,cAAc;YACd,mBAAmB;YAEnB,wBAAwB;AACxB,YAAA,YAAY,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGzC,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAZrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,mBAAmB;wBAEnB,wBAAwB;AACxB,wBAAA,YAAY,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC;AACnD,qBAAA;AACF,iBAAA;;;ACvBD;;AAEG;;;;"}
@@ -36,8 +36,8 @@ class FormlyWrapperFormField extends FieldWrapper {
36
36
  delete this.field._formField;
37
37
  this.focusMonitor.stopMonitoring(this.elementRef);
38
38
  }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyWrapperFormField, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
40
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyWrapperFormField, isStandalone: false, selector: "formly-wrapper-mat-form-field", viewQueries: [{ propertyName: "formField", first: true, predicate: MatFormField, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyWrapperFormField, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
40
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: FormlyWrapperFormField, isStandalone: false, selector: "formly-wrapper-mat-form-field", viewQueries: [{ propertyName: "formField", first: true, predicate: MatFormField, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
41
41
  <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->
42
42
  <mat-form-field
43
43
  [hideRequiredMarker]="true"
@@ -116,7 +116,7 @@ class FormlyWrapperFormField extends FieldWrapper {
116
116
  </ng-template>
117
117
  `, isInline: true, styles: ["formly-wrapper-mat-form-field .mat-mdc-form-field,formly-wrapper-mat-form-field .mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.LegacyFormlyValidationMessage, selector: "formly-validation-message" }], encapsulation: i0.ViewEncapsulation.None }); }
118
118
  }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
120
120
  type: Component,
121
121
  args: [{ selector: 'formly-wrapper-mat-form-field', template: `
122
122
  <!-- fix https://github.com/angular/material2/pull/7083 by setting width to 100% -->
@@ -213,11 +213,11 @@ function withFormlyFormField() {
213
213
  }
214
214
 
215
215
  class FormlyMatFormFieldModule {
216
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
217
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, i4.FormlyModule] }); }
218
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatFormFieldModule, imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, FormlyModule.forChild(withFormlyFormField())] }); }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
217
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, i4.FormlyModule] }); }
218
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatFormFieldModule, imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, FormlyModule.forChild(withFormlyFormField())] }); }
219
219
  }
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyMatFormFieldModule, decorators: [{
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FormlyMatFormFieldModule, decorators: [{
221
221
  type: NgModule,
222
222
  args: [{
223
223
  declarations: [FormlyWrapperFormField],
@@ -341,10 +341,10 @@ class FieldType extends FieldType$1 {
341
341
  };
342
342
  }
343
343
  }
344
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
345
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FieldType, isStandalone: true, viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true }, { propertyName: "matTextPrefix", first: true, predicate: ["matTextPrefix"], descendants: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true }, { propertyName: "matTextSuffix", first: true, predicate: ["matTextSuffix"], descendants: true }, { propertyName: "_controls", predicate: MatFormFieldControl, descendants: true }], usesInheritance: true, ngImport: i0 }); }
344
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
345
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.33", type: FieldType, isStandalone: true, viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true }, { propertyName: "matTextPrefix", first: true, predicate: ["matTextPrefix"], descendants: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true }, { propertyName: "matTextSuffix", first: true, predicate: ["matTextSuffix"], descendants: true }, { propertyName: "_controls", predicate: MatFormFieldControl, descendants: true }], usesInheritance: true, ngImport: i0 }); }
346
346
  }
347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldType, decorators: [{
347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: FieldType, decorators: [{
348
348
  type: Directive
349
349
  }], propDecorators: { matPrefix: [{
350
350
  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.config.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.ts","../../../../src/ui/material/form-field/src/ngx-formly-material-form-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n Renderer2,\n AfterViewInit,\n ElementRef,\n ViewEncapsulation,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FormlyFieldConfig,\n FormlyFieldProps as CoreFormlyFieldProps,\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';\nimport { ThemePalette } from '@angular/material/core';\n\ninterface MatFormlyFieldConfig extends FormlyFieldConfig<FormlyFieldProps> {\n _formField?: FormlyWrapperFormField;\n}\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n prefix?: TemplateRef<any>;\n suffix?: TemplateRef<any>;\n textPrefix?: TemplateRef<any>;\n textSuffix?: TemplateRef<any>;\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n hideFieldUnderline?: boolean;\n floatLabel?: FloatLabelType;\n appearance?: MatFormFieldAppearance;\n subscriptSizing?: 'fixed' | 'dynamic';\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]=\"props.floatLabel\"\n [appearance]=\"props.appearance\"\n [subscriptSizing]=\"props.subscriptSizing\"\n [color]=\"props.color ?? 'primary'\"\n >\n <ng-container #fieldComponent></ng-container>\n @if (props.label && props.hideLabel !== true) {\n <mat-label>\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\n }\n </mat-label>\n }\n\n @if (props.textPrefix) {\n <ng-container\n matTextPrefix\n [ngTemplateOutlet]=\"props.textPrefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.prefix) {\n <ng-container\n matPrefix\n [ngTemplateOutlet]=\"props.prefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.textSuffix) {\n <ng-container\n matTextSuffix\n [ngTemplateOutlet]=\"props.textSuffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.suffix) {\n <ng-container\n matSuffix\n [ngTemplateOutlet]=\"props.suffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n @if (props.description || props.hintStart; as hint) {\n <mat-hint>\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n }\n\n @if (props.hintEnd; as hintEnd) {\n <mat-hint align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n @if (!content.createEmbeddedView) {\n <ng-container>{{ content }}</ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n }\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef,\n private focusMonitor: FocusMonitor,\n ) {\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.props.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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n };\n}\n","import { NgModule, NO_ERRORS_SCHEMA } 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';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, FormlyModule.forChild(withFormlyFormField())],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class FormlyMatFormFieldModule {}\n","import { OnDestroy, TemplateRef, ViewChild, Type, Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig, ɵ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 { FormlyFieldProps } from './form-field.wrapper';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig<FormlyFieldProps>>\n extends CoreFieldType<F>\n implements OnDestroy, MatFormFieldControl<any>\n{\n @ViewChild('matPrefix') set matPrefix(prefix: TemplateRef<any>) {\n if (prefix) {\n this.props.prefix = prefix;\n }\n }\n @ViewChild('matTextPrefix') set matTextPrefix(textPrefix: TemplateRef<any>) {\n if (textPrefix) {\n this.props.textPrefix = textPrefix;\n }\n }\n @ViewChild('matSuffix') set matSuffix(suffix: TemplateRef<any>) {\n if (suffix) {\n this.props.suffix = suffix;\n }\n }\n @ViewChild('matTextSuffix') set matTextSuffix(textSuffix: TemplateRef<any>) {\n if (textSuffix) {\n this.props.textSuffix = textSuffix;\n }\n }\n\n @ViewChildren(MatFormFieldControl) set _controls(controls: QueryList<MatFormFieldControl<any>>) {\n this.attachControl(controls.length === 1 ? controls.first : this);\n }\n\n errorStateMatcher: ErrorStateMatcher = { isErrorState: () => this.field && this.showError };\n stateChanges = new Subject<void>();\n _errorState = false;\n _focused = false;\n\n ngOnDestroy() {\n delete (this.formField as any)?._control;\n this.stateChanges.complete();\n }\n\n setDescribedByIds(_ids: string[]): void {}\n onContainerClick(_event: MouseEvent): void {\n this.field.focus = true;\n this.stateChanges.next();\n }\n\n get errorState() {\n const showError = this.options!.showError!(this);\n if (showError !== this._errorState) {\n this._errorState = showError;\n this.stateChanges.next();\n }\n\n return showError;\n }\n\n get controlType() {\n if (this.props.type) {\n return this.props.type;\n }\n\n const type = this.field.type!;\n return type instanceof Type ? type.prototype.constructor.name : type;\n }\n get focused() {\n const focused = !!this.field.focus && !this.disabled;\n if (focused !== this._focused) {\n this._focused = focused;\n this.stateChanges.next();\n }\n return focused;\n }\n get disabled() {\n return !!this.props.disabled;\n }\n get required() {\n return !!this.props.required;\n }\n get placeholder() {\n return this.props.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 const ngControl = control?.ngControl as any;\n if (ngControl?.valueAccessor?.hasOwnProperty('_formField')) {\n ngControl.valueAccessor['_formField'] = this.formField;\n }\n if (ngControl?.valueAccessor?.hasOwnProperty('_parentFormField')) {\n ngControl.valueAccessor['_parentFormField'] = this.formField;\n }\n\n ['prefix', 'suffix', 'textPrefix', 'textSuffix'].forEach((type) =>\n observe<TemplateRef<any>>(\n this.field,\n ['props', type],\n ({ currentValue }) =>\n currentValue &&\n Promise.resolve().then(() => {\n this.options.detectChanges!(this.field);\n }),\n ),\n );\n\n // https://github.com/angular/components/issues/16209\n const setDescribedByIds = control.setDescribedByIds.bind(control);\n control.setDescribedByIds = (ids: string[]) => {\n setTimeout(() => setDescribedByIds(ids));\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType","observe"],"mappings":";;;;;;;;;;;;AA8HM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CACU,QAAmB,EACnB,UAAsB,EACtB,YAA0B,EAAA;AAElC,QAAA,KA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AM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;AACjE,YAAA,OAAO,CAAC,iBAAiB,GAAG,CAAC,GAAa,KAAI;gBAC5C,UAAU,CAAC,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC1C,YAAA,CAAC;QACH;IACF;+GArIoB,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,gcAyBf,mBAAmB,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAzBb,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B;8BAK6B,SAAS,EAAA,CAAA;sBAApC,SAAS;uBAAC,WAAW;gBAKU,aAAa,EAAA,CAAA;sBAA5C,SAAS;uBAAC,eAAe;gBAKE,SAAS,EAAA,CAAA;sBAApC,SAAS;uBAAC,WAAW;gBAKU,aAAa,EAAA,CAAA;sBAA5C,SAAS;uBAAC,eAAe;gBAMa,SAAS,EAAA,CAAA;sBAA/C,YAAY;uBAAC,mBAAmB;;;ACjCnC;;AAEG;;;;"}
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.config.ts","../../../../src/ui/material/form-field/src/form-field.module.ts","../../../../src/ui/material/form-field/src/field.type.ts","../../../../src/ui/material/form-field/src/ngx-formly-material-form-field.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n Renderer2,\n AfterViewInit,\n ElementRef,\n ViewEncapsulation,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵdefineHiddenProp as defineHiddenProp,\n FormlyFieldConfig,\n FormlyFieldProps as CoreFormlyFieldProps,\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';\nimport { ThemePalette } from '@angular/material/core';\n\ninterface MatFormlyFieldConfig extends FormlyFieldConfig<FormlyFieldProps> {\n _formField?: FormlyWrapperFormField;\n}\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n prefix?: TemplateRef<any>;\n suffix?: TemplateRef<any>;\n textPrefix?: TemplateRef<any>;\n textSuffix?: TemplateRef<any>;\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n hideFieldUnderline?: boolean;\n floatLabel?: FloatLabelType;\n appearance?: MatFormFieldAppearance;\n subscriptSizing?: 'fixed' | 'dynamic';\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]=\"props.floatLabel\"\n [appearance]=\"props.appearance\"\n [subscriptSizing]=\"props.subscriptSizing\"\n [color]=\"props.color ?? 'primary'\"\n >\n <ng-container #fieldComponent></ng-container>\n @if (props.label && props.hideLabel !== true) {\n <mat-label>\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\n }\n </mat-label>\n }\n\n @if (props.textPrefix) {\n <ng-container\n matTextPrefix\n [ngTemplateOutlet]=\"props.textPrefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.prefix) {\n <ng-container\n matPrefix\n [ngTemplateOutlet]=\"props.prefix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.textSuffix) {\n <ng-container\n matTextSuffix\n [ngTemplateOutlet]=\"props.textSuffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n @if (props.suffix) {\n <ng-container\n matSuffix\n [ngTemplateOutlet]=\"props.suffix\"\n [ngTemplateOutletContext]=\"{ field: field }\"\n ></ng-container>\n }\n\n <mat-error>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </mat-error>\n\n @if (props.description || props.hintStart; as hint) {\n <mat-hint>\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n }\n\n @if (props.hintEnd; as hintEnd) {\n <mat-hint align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n @if (!content.createEmbeddedView) {\n <ng-container>{{ content }}</ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n }\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef,\n private focusMonitor: FocusMonitor,\n ) {\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.props.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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n };\n}\n","import { NgModule, NO_ERRORS_SCHEMA } 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';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, FormlyModule.forChild(withFormlyFormField())],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class FormlyMatFormFieldModule {}\n","import { OnDestroy, TemplateRef, ViewChild, Type, Directive, ViewChildren, QueryList } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig, ɵ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 { FormlyFieldProps } from './form-field.wrapper';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig<FormlyFieldProps>>\n extends CoreFieldType<F>\n implements OnDestroy, MatFormFieldControl<any>\n{\n @ViewChild('matPrefix') set matPrefix(prefix: TemplateRef<any>) {\n if (prefix) {\n this.props.prefix = prefix;\n }\n }\n @ViewChild('matTextPrefix') set matTextPrefix(textPrefix: TemplateRef<any>) {\n if (textPrefix) {\n this.props.textPrefix = textPrefix;\n }\n }\n @ViewChild('matSuffix') set matSuffix(suffix: TemplateRef<any>) {\n if (suffix) {\n this.props.suffix = suffix;\n }\n }\n @ViewChild('matTextSuffix') set matTextSuffix(textSuffix: TemplateRef<any>) {\n if (textSuffix) {\n this.props.textSuffix = textSuffix;\n }\n }\n\n @ViewChildren(MatFormFieldControl) set _controls(controls: QueryList<MatFormFieldControl<any>>) {\n this.attachControl(controls.length === 1 ? controls.first : this);\n }\n\n errorStateMatcher: ErrorStateMatcher = { isErrorState: () => this.field && this.showError };\n stateChanges = new Subject<void>();\n _errorState = false;\n _focused = false;\n\n ngOnDestroy() {\n delete (this.formField as any)?._control;\n this.stateChanges.complete();\n }\n\n setDescribedByIds(_ids: string[]): void {}\n onContainerClick(_event: MouseEvent): void {\n this.field.focus = true;\n this.stateChanges.next();\n }\n\n get errorState() {\n const showError = this.options!.showError!(this);\n if (showError !== this._errorState) {\n this._errorState = showError;\n this.stateChanges.next();\n }\n\n return showError;\n }\n\n get controlType() {\n if (this.props.type) {\n return this.props.type;\n }\n\n const type = this.field.type!;\n return type instanceof Type ? type.prototype.constructor.name : type;\n }\n get focused() {\n const focused = !!this.field.focus && !this.disabled;\n if (focused !== this._focused) {\n this._focused = focused;\n this.stateChanges.next();\n }\n return focused;\n }\n get disabled() {\n return !!this.props.disabled;\n }\n get required() {\n return !!this.props.required;\n }\n get placeholder() {\n return this.props.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 const ngControl = control?.ngControl as any;\n if (ngControl?.valueAccessor?.hasOwnProperty('_formField')) {\n ngControl.valueAccessor['_formField'] = this.formField;\n }\n if (ngControl?.valueAccessor?.hasOwnProperty('_parentFormField')) {\n ngControl.valueAccessor['_parentFormField'] = this.formField;\n }\n\n ['prefix', 'suffix', 'textPrefix', 'textSuffix'].forEach((type) =>\n observe<TemplateRef<any>>(\n this.field,\n ['props', type],\n ({ currentValue }) =>\n currentValue &&\n Promise.resolve().then(() => {\n this.options.detectChanges!(this.field);\n }),\n ),\n );\n\n // https://github.com/angular/components/issues/16209\n const setDescribedByIds = control.setDescribedByIds.bind(control);\n control.setDescribedByIds = (ids: string[]) => {\n setTimeout(() => setDescribedByIds(ids));\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["defineHiddenProp","i1","CoreFieldType","observe"],"mappings":";;;;;;;;;;;;AA8HM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CACU,QAAmB,EACnB,UAAsB,EACtB,YAA0B,EAAA;AAElC,QAAA,KAAK,EAAE;QAJC,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,YAAY,GAAZ,YAAY;IAGtB;IAEA,QAAQ,GAAA;QACNA,iBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;AAC1D,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;YACpE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AAC/B,gBAAA,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK;YAC1B;AACF,QAAA,CAAC,CAAC;IACJ;IAEA,eAAe,GAAA;;AAEb,QAAA,IAAI,IAAI,C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