@ngx-formly/material 7.0.0-next.0 → 7.0.1

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.
@@ -62,7 +62,7 @@ export class FormlyFieldSelect extends FieldType {
62
62
  return this.selectAllValue.value;
63
63
  }
64
64
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
65
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyFieldSelect, selector: "formly-field-mat-select", viewQueries: [{ propertyName: "select", first: true, predicate: MatSelect, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
65
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormlyFieldSelect, selector: "formly-field-mat-select", viewQueries: [{ propertyName: "select", first: true, predicate: MatSelect, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
66
66
  <ng-template #selectAll let-selectOptions="selectOptions">
67
67
  <mat-option (click)="toggleSelectAll(selectOptions)">
68
68
  <mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
@@ -88,24 +88,27 @@ export class FormlyFieldSelect extends FieldType {
88
88
  [typeaheadDebounceInterval]="props.typeaheadDebounceInterval"
89
89
  [panelClass]="props.panelClass"
90
90
  >
91
- <ng-container *ngIf="props.options | formlySelectOptions: field | async as selectOptions">
92
- <ng-container
93
- *ngIf="props.multiple && props.selectAllOption"
94
- [ngTemplateOutlet]="selectAll"
95
- [ngTemplateOutletContext]="{ selectOptions: selectOptions }"
96
- >
97
- </ng-container>
98
- <ng-container *ngFor="let item of selectOptions">
99
- <mat-optgroup *ngIf="item.group" [label]="item.label">
100
- <mat-option *ngFor="let child of item.group" [value]="child.value" [disabled]="child.disabled">
101
- {{ child.label }}
102
- </mat-option>
103
- </mat-optgroup>
104
- <mat-option *ngIf="!item.group" [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
105
- </ng-container>
106
- </ng-container>
91
+ @if (props.options | formlySelectOptions: field | async; as selectOptions) {
92
+ @if (props.multiple && props.selectAllOption) {
93
+ <ng-container [ngTemplateOutlet]="selectAll" [ngTemplateOutletContext]="{ selectOptions: selectOptions }">
94
+ </ng-container>
95
+ }
96
+ @for (item of selectOptions; track $index) {
97
+ @if (item.group) {
98
+ <mat-optgroup [label]="item.label">
99
+ @for (child of item.group; track $index) {
100
+ <mat-option [value]="child.value" [disabled]="child.disabled">
101
+ {{ child.label }}
102
+ </mat-option>
103
+ }
104
+ </mat-optgroup>
105
+ } @else {
106
+ <mat-option [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
107
+ }
108
+ }
109
+ }
107
110
  </mat-select>
108
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i4.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: i5.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
111
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i4.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: i5.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
109
112
  }
110
113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldSelect, decorators: [{
111
114
  type: Component,
@@ -137,22 +140,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
137
140
  [typeaheadDebounceInterval]="props.typeaheadDebounceInterval"
138
141
  [panelClass]="props.panelClass"
139
142
  >
140
- <ng-container *ngIf="props.options | formlySelectOptions: field | async as selectOptions">
141
- <ng-container
142
- *ngIf="props.multiple && props.selectAllOption"
143
- [ngTemplateOutlet]="selectAll"
144
- [ngTemplateOutletContext]="{ selectOptions: selectOptions }"
145
- >
146
- </ng-container>
147
- <ng-container *ngFor="let item of selectOptions">
148
- <mat-optgroup *ngIf="item.group" [label]="item.label">
149
- <mat-option *ngFor="let child of item.group" [value]="child.value" [disabled]="child.disabled">
150
- {{ child.label }}
151
- </mat-option>
152
- </mat-optgroup>
153
- <mat-option *ngIf="!item.group" [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
154
- </ng-container>
155
- </ng-container>
143
+ @if (props.options | formlySelectOptions: field | async; as selectOptions) {
144
+ @if (props.multiple && props.selectAllOption) {
145
+ <ng-container [ngTemplateOutlet]="selectAll" [ngTemplateOutletContext]="{ selectOptions: selectOptions }">
146
+ </ng-container>
147
+ }
148
+ @for (item of selectOptions; track $index) {
149
+ @if (item.group) {
150
+ <mat-optgroup [label]="item.label">
151
+ @for (child of item.group; track $index) {
152
+ <mat-option [value]="child.value" [disabled]="child.disabled">
153
+ {{ child.label }}
154
+ </mat-option>
155
+ }
156
+ </mat-optgroup>
157
+ } @else {
158
+ <mat-option [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
159
+ }
160
+ }
161
+ }
156
162
  </mat-select>
157
163
  `,
158
164
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -161,4 +167,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
161
167
  type: ViewChild,
162
168
  args: [MatSelect, { static: true }]
163
169
  }] } });
164
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LnR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvdWkvbWF0ZXJpYWwvc2VsZWN0L3NyYy9zZWxlY3QudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFRLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNwRixPQUFPLEVBQUUsU0FBUyxFQUFtQixNQUFNLDBCQUEwQixDQUFDO0FBQ3RFLE9BQU8sRUFBc0MsUUFBUSxJQUFJLE9BQU8sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQzNGLE9BQU8sRUFBRSxTQUFTLEVBQW9CLE1BQU0saUNBQWlDLENBQUM7Ozs7Ozs7O0FBZ0U5RSxNQUFNLE9BQU8saUJBQWtCLFNBQVEsU0FBdUM7SUFoRDlFOztRQXdEVyxtQkFBYyxHQUFHO1lBQ3hCLEtBQUssRUFBRTtnQkFDTCxXQUFXLENBQUMsRUFBTyxFQUFFLEVBQU87b0JBQzFCLE9BQU8sRUFBRSxLQUFLLEVBQUUsQ0FBQzt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sZWRieSddKSB7XG4gICAgICByZXR1cm4gdGhpcy5wcm9wcy5hdHRyaWJ1dGVzWydhcmlhLWxhYmVsbGVkYnknXSBhcyBzdHJpbmc7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuZm9ybUZpZWxkPy5fbGFiZWxJZDtcbiAgfVxuXG4gIF9nZXRBcmlhTGFiZWwoKSB7XG4gICAgcmV0dXJuIHRoaXMucHJvcHMuYXR0cmlidXRlcz8uWydhcmlhLWxhYmVsJ10gYXMgc3RyaW5nO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRTZWxlY3RBbGxWYWx1ZShvcHRpb25zOiBhbnlbXSkge1xuICAgIGlmICghdGhpcy5zZWxlY3RBbGxWYWx1ZSB8fCBvcHRpb25zICE9PSB0aGlzLnNlbGVjdEFsbFZhbHVlLm9wdGlvbnMpIHtcbiAgICAgIGNvbnN0IGZsYXRPcHRpb25zOiBhbnlbXSA9IFtdO1xuICAgICAgb3B0aW9ucy5mb3JFYWNoKChvKSA9PiAoby5ncm91cCA/IGZsYXRPcHRpb25zLnB1c2goLi4uby5ncm91cCkgOiBmbGF0T3B0aW9ucy5wdXNoKG8pKSk7XG5cbiAgICAgIHRoaXMuc2VsZWN0QWxsVmFsdWUgPSB7XG4gICAgICAgIG9wdGlvbnMsXG4gICAgICAgIHZhbHVlOiBmbGF0T3B0aW9ucy5maWx0ZXIoKG8pID0+ICFvLmRpc2FibGVkKS5tYXAoKG8pID0+IG8udmFsdWUpLFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy5zZWxlY3RBbGxWYWx1ZS52YWx1ZTtcbiAgfVxufVxuIl19
@@ -1,15 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { ViewChild, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
3
  import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
4
- import * as i4 from '@angular/material/checkbox';
4
+ import * as i3 from '@angular/material/checkbox';
5
5
  import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';
6
6
  import * as i1 from '@angular/cdk/a11y';
7
- import * as i2 from '@angular/common';
8
- import { CommonModule } from '@angular/common';
9
- import * as i3 from '@angular/forms';
7
+ import * as i2 from '@angular/forms';
10
8
  import { ReactiveFormsModule } from '@angular/forms';
11
- import * as i5 from '@ngx-formly/core';
9
+ import * as i4 from '@ngx-formly/core';
12
10
  import { FormlyModule } from '@ngx-formly/core';
11
+ import { CommonModule } from '@angular/common';
13
12
 
14
13
  class FormlyFieldCheckbox extends FieldType {
15
14
  constructor(renderer, focusMonitor) {
@@ -63,7 +62,7 @@ class FormlyFieldCheckbox extends FieldType {
63
62
  }
64
63
  }
65
64
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldCheckbox, deps: [{ token: i0.Renderer2 }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
66
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyFieldCheckbox, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
65
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormlyFieldCheckbox, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
67
66
  <mat-checkbox
68
67
  [formControl]="formControl"
69
68
  [id]="id"
@@ -75,14 +74,11 @@ class FormlyFieldCheckbox extends FieldType {
75
74
  [labelPosition]="props.labelPosition"
76
75
  >
77
76
  {{ props.label }}
78
- <span
79
- *ngIf="props.required && props.hideRequiredMarker !== true"
80
- aria-hidden="true"
81
- class="mat-form-field-required-marker mat-mdc-form-field-required-marker"
82
- >*</span
83
- >
77
+ @if (props.required && props.hideRequiredMarker !== true) {
78
+ <span aria-hidden="true" class="mat-form-field-required-marker mat-mdc-form-field-required-marker">*</span>
79
+ }
84
80
  </mat-checkbox>
85
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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", "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 }); }
86
82
  }
87
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
88
84
  type: Component,
@@ -100,12 +96,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
100
96
  [labelPosition]="props.labelPosition"
101
97
  >
102
98
  {{ props.label }}
103
- <span
104
- *ngIf="props.required && props.hideRequiredMarker !== true"
105
- aria-hidden="true"
106
- class="mat-form-field-required-marker mat-mdc-form-field-required-marker"
107
- >*</span
108
- >
99
+ @if (props.required && props.hideRequiredMarker !== true) {
100
+ <span aria-hidden="true" class="mat-form-field-required-marker mat-mdc-form-field-required-marker">*</span>
101
+ }
109
102
  </mat-checkbox>
110
103
  `,
111
104
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -136,7 +129,7 @@ class FormlyMatCheckboxModule {
136
129
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
137
130
  ReactiveFormsModule,
138
131
  MatCheckboxModule,
139
- FormlyMatFormFieldModule, i5.FormlyModule] }); }
132
+ FormlyMatFormFieldModule, i4.FormlyModule] }); }
140
133
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyMatCheckboxModule, imports: [CommonModule,
141
134
  ReactiveFormsModule,
142
135
  MatCheckboxModule,
@@ -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 <span\n *ngIf=\"props.required && props.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\"\n >*</span\n >\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\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":";;;;;;;;;;;;;AAgDM,MAAO,mBACX,SAAQ,SAAyC,CAAA;IAejD,WACU,CAAA,QAAmB,EACnB,YAA0B,EAAA;AAElC,QAAA,KAAK,EAAE;QAHC,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAY,CAAA,YAAA,GAAZ,YAAY;AAbb,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kB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,IAAI,EAAE,SAAS;AACf,gBAAA,OAAO,EAAE,UAAU;AACpB,aAAA;AACF,SAAA;KACF;AACH;;MCMa,uBAAuB,CAAA;+GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAvB,uBAAuB,EAAA,YAAA,EAAA,CAXnB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,YAAY;YACZ,mBAAmB;YAEnB,iBAAiB;YAEjB,wBAAwB,EAAAA,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,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;;;;"}
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})\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":";;;;;;;;;;;;AA6CM,MAAO,mBACX,SAAQ,SAAyC,CAAA;IAejD,WACU,CAAA,QAAmB,EACnB,YAA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,YAAA;AACE,gBAAA,IAAI,EAAE,SAAS;AACf,gBAAA,OAAO,EAAE,UAAU;AACpB,aAAA;AACF,SAAA;KACF;AACH;;MCMa,uBAAuB,CAAA;+GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAvB,uBAAuB,EAAA,YAAA,EAAA,CAXnB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,YAAY;YACZ,mBAAmB;YAEnB,iBAAiB;YAEjB,wBAAwB,EAAAA,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,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;;;;"}
@@ -37,7 +37,7 @@ class FormlyWrapperFormField extends FieldWrapper {
37
37
  this.focusMonitor.stopMonitoring(this.elementRef);
38
38
  }
39
39
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", 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: "14.0.0", version: "18.2.13", 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
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormlyWrapperFormField, 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"
@@ -47,54 +47,74 @@ class FormlyWrapperFormField extends FieldWrapper {
47
47
  [color]="props.color ?? 'primary'"
48
48
  >
49
49
  <ng-container #fieldComponent></ng-container>
50
- <mat-label *ngIf="props.label && props.hideLabel !== true">
51
- {{ props.label }}
52
- <span
53
- *ngIf="props.required && props.hideRequiredMarker !== true"
54
- aria-hidden="true"
55
- class="mat-form-field-required-marker mat-mdc-form-field-required-marker"
56
- >*</span
57
- >
58
- </mat-label>
50
+ @if (props.label && props.hideLabel !== true) {
51
+ <mat-label>
52
+ {{ props.label }}
53
+ @if (props.required && props.hideRequiredMarker !== true) {
54
+ <span aria-hidden="true" class="mat-form-field-required-marker mat-mdc-form-field-required-marker">*</span>
55
+ }
56
+ </mat-label>
57
+ }
59
58
 
60
- <ng-container matTextPrefix *ngIf="props.textPrefix">
61
- <ng-container [ngTemplateOutlet]="props.textPrefix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
62
- </ng-container>
59
+ @if (props.textPrefix) {
60
+ <ng-container
61
+ matTextPrefix
62
+ [ngTemplateOutlet]="props.textPrefix"
63
+ [ngTemplateOutletContext]="{ field: field }"
64
+ ></ng-container>
65
+ }
63
66
 
64
- <ng-container matPrefix *ngIf="props.prefix">
65
- <ng-container [ngTemplateOutlet]="props.prefix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
66
- </ng-container>
67
+ @if (props.prefix) {
68
+ <ng-container
69
+ matPrefix
70
+ [ngTemplateOutlet]="props.prefix"
71
+ [ngTemplateOutletContext]="{ field: field }"
72
+ ></ng-container>
73
+ }
67
74
 
68
- <ng-container matTextSuffix *ngIf="props.textSuffix">
69
- <ng-container [ngTemplateOutlet]="props.textSuffix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
70
- </ng-container>
75
+ @if (props.textSuffix) {
76
+ <ng-container
77
+ matTextSuffix
78
+ [ngTemplateOutlet]="props.textSuffix"
79
+ [ngTemplateOutletContext]="{ field: field }"
80
+ ></ng-container>
81
+ }
71
82
 
72
- <ng-container matSuffix *ngIf="props.suffix">
73
- <ng-container [ngTemplateOutlet]="props.suffix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
74
- </ng-container>
83
+ @if (props.suffix) {
84
+ <ng-container
85
+ matSuffix
86
+ [ngTemplateOutlet]="props.suffix"
87
+ [ngTemplateOutletContext]="{ field: field }"
88
+ ></ng-container>
89
+ }
75
90
 
76
91
  <mat-error>
77
92
  <formly-validation-message [field]="field"></formly-validation-message>
78
93
  </mat-error>
79
94
 
80
- <mat-hint *ngIf="props.description || props.hintStart as hint">
81
- <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hint }">
82
- </ng-container>
83
- </mat-hint>
95
+ @if (props.description || props.hintStart; as hint) {
96
+ <mat-hint>
97
+ <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hint }">
98
+ </ng-container>
99
+ </mat-hint>
100
+ }
84
101
 
85
- <mat-hint *ngIf="props.hintEnd as hintEnd" align="end">
86
- <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hintEnd }">
87
- </ng-container>
88
- </mat-hint>
102
+ @if (props.hintEnd; as hintEnd) {
103
+ <mat-hint align="end">
104
+ <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hintEnd }">
105
+ </ng-container>
106
+ </mat-hint>
107
+ }
89
108
  </mat-form-field>
90
109
 
91
110
  <ng-template #stringOrTemplate let-content="content">
92
- <ng-container *ngIf="!content.createEmbeddedView; else template">{{ content }}</ng-container>
93
- <ng-template #template>
111
+ @if (!content.createEmbeddedView) {
112
+ <ng-container>{{ content }}</ng-container>
113
+ } @else {
94
114
  <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ field: field }"></ng-container>
95
- </ng-template>
115
+ }
96
116
  </ng-template>
97
- `, 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 }); }
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 }); }
98
118
  }
99
119
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
100
120
  type: Component,
@@ -108,52 +128,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
108
128
  [color]="props.color ?? 'primary'"
109
129
  >
110
130
  <ng-container #fieldComponent></ng-container>
111
- <mat-label *ngIf="props.label && props.hideLabel !== true">
112
- {{ props.label }}
113
- <span
114
- *ngIf="props.required && props.hideRequiredMarker !== true"
115
- aria-hidden="true"
116
- class="mat-form-field-required-marker mat-mdc-form-field-required-marker"
117
- >*</span
118
- >
119
- </mat-label>
131
+ @if (props.label && props.hideLabel !== true) {
132
+ <mat-label>
133
+ {{ props.label }}
134
+ @if (props.required && props.hideRequiredMarker !== true) {
135
+ <span aria-hidden="true" class="mat-form-field-required-marker mat-mdc-form-field-required-marker">*</span>
136
+ }
137
+ </mat-label>
138
+ }
120
139
 
121
- <ng-container matTextPrefix *ngIf="props.textPrefix">
122
- <ng-container [ngTemplateOutlet]="props.textPrefix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
123
- </ng-container>
140
+ @if (props.textPrefix) {
141
+ <ng-container
142
+ matTextPrefix
143
+ [ngTemplateOutlet]="props.textPrefix"
144
+ [ngTemplateOutletContext]="{ field: field }"
145
+ ></ng-container>
146
+ }
124
147
 
125
- <ng-container matPrefix *ngIf="props.prefix">
126
- <ng-container [ngTemplateOutlet]="props.prefix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
127
- </ng-container>
148
+ @if (props.prefix) {
149
+ <ng-container
150
+ matPrefix
151
+ [ngTemplateOutlet]="props.prefix"
152
+ [ngTemplateOutletContext]="{ field: field }"
153
+ ></ng-container>
154
+ }
128
155
 
129
- <ng-container matTextSuffix *ngIf="props.textSuffix">
130
- <ng-container [ngTemplateOutlet]="props.textSuffix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
131
- </ng-container>
156
+ @if (props.textSuffix) {
157
+ <ng-container
158
+ matTextSuffix
159
+ [ngTemplateOutlet]="props.textSuffix"
160
+ [ngTemplateOutletContext]="{ field: field }"
161
+ ></ng-container>
162
+ }
132
163
 
133
- <ng-container matSuffix *ngIf="props.suffix">
134
- <ng-container [ngTemplateOutlet]="props.suffix" [ngTemplateOutletContext]="{ field: field }"></ng-container>
135
- </ng-container>
164
+ @if (props.suffix) {
165
+ <ng-container
166
+ matSuffix
167
+ [ngTemplateOutlet]="props.suffix"
168
+ [ngTemplateOutletContext]="{ field: field }"
169
+ ></ng-container>
170
+ }
136
171
 
137
172
  <mat-error>
138
173
  <formly-validation-message [field]="field"></formly-validation-message>
139
174
  </mat-error>
140
175
 
141
- <mat-hint *ngIf="props.description || props.hintStart as hint">
142
- <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hint }">
143
- </ng-container>
144
- </mat-hint>
176
+ @if (props.description || props.hintStart; as hint) {
177
+ <mat-hint>
178
+ <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hint }">
179
+ </ng-container>
180
+ </mat-hint>
181
+ }
145
182
 
146
- <mat-hint *ngIf="props.hintEnd as hintEnd" align="end">
147
- <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hintEnd }">
148
- </ng-container>
149
- </mat-hint>
183
+ @if (props.hintEnd; as hintEnd) {
184
+ <mat-hint align="end">
185
+ <ng-container [ngTemplateOutlet]="stringOrTemplate" [ngTemplateOutletContext]="{ content: hintEnd }">
186
+ </ng-container>
187
+ </mat-hint>
188
+ }
150
189
  </mat-form-field>
151
190
 
152
191
  <ng-template #stringOrTemplate let-content="content">
153
- <ng-container *ngIf="!content.createEmbeddedView; else template">{{ content }}</ng-container>
154
- <ng-template #template>
192
+ @if (!content.createEmbeddedView) {
193
+ <ng-container>{{ content }}</ng-container>
194
+ } @else {
155
195
  <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{ field: field }"></ng-container>
156
- </ng-template>
196
+ }
157
197
  </ng-template>
158
198
  `, encapsulation: ViewEncapsulation.None, styles: ["formly-wrapper-mat-form-field .mat-mdc-form-field,formly-wrapper-mat-form-field .mat-form-field{width:100%}\n"] }]
159
199
  }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.FocusMonitor }], propDecorators: { formField: [{
@@ -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 <mat-label *ngIf=\"props.label && props.hideLabel !== true\">\n {{ props.label }}\n <span\n *ngIf=\"props.required && props.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\"\n >*</span\n >\n </mat-label>\n\n <ng-container matTextPrefix *ngIf=\"props.textPrefix\">\n <ng-container [ngTemplateOutlet]=\"props.textPrefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <ng-container matPrefix *ngIf=\"props.prefix\">\n <ng-container [ngTemplateOutlet]=\"props.prefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <ng-container matTextSuffix *ngIf=\"props.textSuffix\">\n <ng-container [ngTemplateOutlet]=\"props.textSuffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-container>\n\n <ng-container matSuffix *ngIf=\"props.suffix\">\n <ng-container [ngTemplateOutlet]=\"props.suffix\" [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=\"props.description || props.hintStart as hint\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hint }\">\n </ng-container>\n </mat-hint>\n\n <mat-hint *ngIf=\"props.hintEnd as hintEnd\" align=\"end\">\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: hintEnd }\">\n </ng-container>\n </mat-hint>\n </mat-form-field>\n\n <ng-template #stringOrTemplate let-content=\"content\">\n <ng-container *ngIf=\"!content.createEmbeddedView; else template\">{{ content }}</ng-container>\n <ng-template #template>\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\n </ng-template>\n </ng-template>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperFormField\n extends FieldWrapper<MatFormlyFieldConfig>\n implements OnInit, OnDestroy, AfterViewInit\n{\n @ViewChild(MatFormField, { static: true }) formField!: MatFormField;\n\n constructor(\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":";;;;;;;;;;;;AAyGM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CACU,QAAmB,EACnB,UAAsB,EACtB,YAA0B,EAAA;AAElC,QAAA,KAAK,EAAE;QAJC,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAU,CAAA,UAAA,GAAV,UAAU;QACV,IAAY,CAAA,YAAA,GAAZ,YAAY;;IAKtB,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;;AAE5B,SAAC,CAAC;;IAGJ,eAAe,GAA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B;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})\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":";;;;;;;;;;;;AA6HM,MAAO,sBACX,SAAQ,YAAkC,CAAA;AAK1C,IAAA,WAAA,CACU,QAAm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