@angular/material 21.0.0-next.9 → 21.0.0-rc.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.
- package/core/tokens/_classes.scss +1 -1
- package/core/tokens/m2/_md-sys-color.scss +17 -17
- package/fesm2022/_animation-chunk.mjs +10 -16
- package/fesm2022/_animation-chunk.mjs.map +1 -1
- package/fesm2022/_date-formats-chunk.mjs +68 -164
- package/fesm2022/_date-formats-chunk.mjs.map +1 -1
- package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_error-options-chunk.mjs +56 -19
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs +24 -31
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs +1224 -1017
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs +243 -187
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs +350 -575
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_input-harness-chunk.mjs +56 -107
- package/fesm2022/_input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs +59 -19
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs +83 -43
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs +348 -311
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs +23 -39
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs +36 -10
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs +71 -134
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs +504 -600
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs +120 -138
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs +36 -10
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs +37 -10
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs +810 -888
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs +62 -86
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +965 -1126
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs +38 -54
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +321 -272
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs +10 -24
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +349 -344
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-testing.mjs +60 -94
- package/fesm2022/button-testing.mjs.map +1 -1
- package/fesm2022/button-toggle-testing.mjs +76 -125
- package/fesm2022/button-toggle-testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +752 -662
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +263 -158
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs +19 -33
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs +576 -272
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs +71 -123
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +515 -477
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs +201 -344
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +2552 -2289
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs +14 -28
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +357 -328
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs +15 -25
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +4826 -4563
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs +93 -129
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +810 -829
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs +10 -11
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +119 -43
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs +74 -130
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +703 -515
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field-testing-control.mjs +16 -33
- package/fesm2022/form-field-testing-control.mjs.map +1 -1
- package/fesm2022/form-field-testing.mjs +118 -179
- package/fesm2022/form-field-testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +36 -10
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs +65 -113
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +559 -494
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs +148 -127
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +325 -351
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs +59 -99
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs +457 -520
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs +251 -434
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs +1522 -1204
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs +0 -5
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +159 -228
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +1338 -1343
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs +55 -79
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +381 -309
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs +12 -21
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +224 -169
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs +13 -23
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +235 -160
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs +133 -208
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +712 -679
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs +83 -117
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs +1116 -1246
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs +54 -120
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +1078 -995
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs +57 -92
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +369 -279
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs +90 -138
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +1651 -1716
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs +40 -87
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +763 -714
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs +45 -66
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +419 -344
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs +78 -154
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +790 -498
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs +120 -213
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs +1026 -684
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs +125 -197
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2351 -2028
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs +113 -172
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +1019 -826
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +16 -27
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +163 -78
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs +41 -52
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +36 -10
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +86 -162
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +638 -466
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/types/expansion.d.ts +4 -2
- package/types/menu-testing.d.ts +2 -0
- package/types/select.d.ts +1 -1
- package/types/timepicker.d.ts +1 -0
package/fesm2022/input.mjs
CHANGED
|
@@ -20,539 +20,476 @@ import './_animation-chunk.mjs';
|
|
|
20
20
|
import '@angular/cdk/layout';
|
|
21
21
|
import '@angular/cdk/observers';
|
|
22
22
|
|
|
23
|
-
/** @docs-private */
|
|
24
23
|
function getMatInputUnsupportedTypeError(type) {
|
|
25
|
-
|
|
24
|
+
return Error(`Input type "${type}" isn't supported by matInput.`);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
const MAT_INPUT_INVALID_TYPES = [
|
|
30
|
-
'button',
|
|
31
|
-
'checkbox',
|
|
32
|
-
'file',
|
|
33
|
-
'hidden',
|
|
34
|
-
'image',
|
|
35
|
-
'radio',
|
|
36
|
-
'range',
|
|
37
|
-
'reset',
|
|
38
|
-
'submit',
|
|
39
|
-
];
|
|
40
|
-
/** Injection token that can be used to provide the default options for the input. */
|
|
27
|
+
const MAT_INPUT_INVALID_TYPES = ['button', 'checkbox', 'file', 'hidden', 'image', 'radio', 'range', 'reset', 'submit'];
|
|
41
28
|
const MAT_INPUT_CONFIG = new InjectionToken('MAT_INPUT_CONFIG');
|
|
42
29
|
class MatInput {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this.
|
|
189
|
-
}
|
|
190
|
-
_readonly = false;
|
|
191
|
-
/** Whether the input should remain interactive when it is disabled. */
|
|
192
|
-
disabledInteractive;
|
|
193
|
-
/** Whether the input is in an error state. */
|
|
194
|
-
get errorState() {
|
|
195
|
-
return this._errorStateTracker.errorState;
|
|
196
|
-
}
|
|
197
|
-
set errorState(value) {
|
|
198
|
-
this._errorStateTracker.errorState = value;
|
|
199
|
-
}
|
|
200
|
-
_neverEmptyInputTypes = [
|
|
201
|
-
'date',
|
|
202
|
-
'datetime',
|
|
203
|
-
'datetime-local',
|
|
204
|
-
'month',
|
|
205
|
-
'time',
|
|
206
|
-
'week',
|
|
207
|
-
].filter(t => getSupportedInputTypes().has(t));
|
|
208
|
-
constructor() {
|
|
209
|
-
const parentForm = inject(NgForm, { optional: true });
|
|
210
|
-
const parentFormGroup = inject(FormGroupDirective, { optional: true });
|
|
211
|
-
const defaultErrorStateMatcher = inject(ErrorStateMatcher);
|
|
212
|
-
const accessor = inject(MAT_INPUT_VALUE_ACCESSOR, { optional: true, self: true });
|
|
213
|
-
const element = this._elementRef.nativeElement;
|
|
214
|
-
const nodeName = element.nodeName.toLowerCase();
|
|
215
|
-
if (accessor) {
|
|
216
|
-
if (isSignal(accessor.value)) {
|
|
217
|
-
this._signalBasedValueAccessor = accessor;
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
this._inputValueAccessor = accessor;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
// If no input value accessor was explicitly specified, use the element as the input value
|
|
225
|
-
// accessor.
|
|
226
|
-
this._inputValueAccessor = element;
|
|
227
|
-
}
|
|
228
|
-
this._previousNativeValue = this.value;
|
|
229
|
-
// Force setter to be called in case id was not specified.
|
|
230
|
-
this.id = this.id;
|
|
231
|
-
// On some versions of iOS the caret gets stuck in the wrong place when holding down the delete
|
|
232
|
-
// key. In order to get around this we need to "jiggle" the caret loose. Since this bug only
|
|
233
|
-
// exists on iOS, we only bother to install the listener on iOS.
|
|
234
|
-
if (this._platform.IOS) {
|
|
235
|
-
this._ngZone.runOutsideAngular(() => {
|
|
236
|
-
this._cleanupIosKeyup = this._renderer.listen(element, 'keyup', this._iOSKeyupListener);
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
this._errorStateTracker = new _ErrorStateTracker(defaultErrorStateMatcher, this.ngControl, parentFormGroup, parentForm, this.stateChanges);
|
|
240
|
-
this._isServer = !this._platform.isBrowser;
|
|
241
|
-
this._isNativeSelect = nodeName === 'select';
|
|
242
|
-
this._isTextarea = nodeName === 'textarea';
|
|
243
|
-
this._isInFormField = !!this._formField;
|
|
244
|
-
this.disabledInteractive = this._config?.disabledInteractive || false;
|
|
245
|
-
if (this._isNativeSelect) {
|
|
246
|
-
this.controlType = element.multiple
|
|
247
|
-
? 'mat-native-select-multiple'
|
|
248
|
-
: 'mat-native-select';
|
|
249
|
-
}
|
|
250
|
-
if (this._signalBasedValueAccessor) {
|
|
251
|
-
effect(() => {
|
|
252
|
-
// Read the value so the effect can register the dependency.
|
|
253
|
-
this._signalBasedValueAccessor.value();
|
|
254
|
-
this.stateChanges.next();
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
ngAfterViewInit() {
|
|
259
|
-
if (this._platform.isBrowser) {
|
|
260
|
-
this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {
|
|
261
|
-
this.autofilled = event.isAutofilled;
|
|
262
|
-
this.stateChanges.next();
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
ngOnChanges() {
|
|
30
|
+
_elementRef = inject(ElementRef);
|
|
31
|
+
_platform = inject(Platform);
|
|
32
|
+
ngControl = inject(NgControl, {
|
|
33
|
+
optional: true,
|
|
34
|
+
self: true
|
|
35
|
+
});
|
|
36
|
+
_autofillMonitor = inject(AutofillMonitor);
|
|
37
|
+
_ngZone = inject(NgZone);
|
|
38
|
+
_formField = inject(MAT_FORM_FIELD, {
|
|
39
|
+
optional: true
|
|
40
|
+
});
|
|
41
|
+
_renderer = inject(Renderer2);
|
|
42
|
+
_uid = inject(_IdGenerator).getId('mat-input-');
|
|
43
|
+
_previousNativeValue;
|
|
44
|
+
_inputValueAccessor;
|
|
45
|
+
_signalBasedValueAccessor;
|
|
46
|
+
_previousPlaceholder;
|
|
47
|
+
_errorStateTracker;
|
|
48
|
+
_config = inject(MAT_INPUT_CONFIG, {
|
|
49
|
+
optional: true
|
|
50
|
+
});
|
|
51
|
+
_cleanupIosKeyup;
|
|
52
|
+
_cleanupWebkitWheel;
|
|
53
|
+
_isServer;
|
|
54
|
+
_isNativeSelect;
|
|
55
|
+
_isTextarea;
|
|
56
|
+
_isInFormField;
|
|
57
|
+
focused = false;
|
|
58
|
+
stateChanges = new Subject();
|
|
59
|
+
controlType = 'mat-input';
|
|
60
|
+
autofilled = false;
|
|
61
|
+
get disabled() {
|
|
62
|
+
return this._disabled;
|
|
63
|
+
}
|
|
64
|
+
set disabled(value) {
|
|
65
|
+
this._disabled = coerceBooleanProperty(value);
|
|
66
|
+
if (this.focused) {
|
|
67
|
+
this.focused = false;
|
|
68
|
+
this.stateChanges.next();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
_disabled = false;
|
|
72
|
+
get id() {
|
|
73
|
+
return this._id;
|
|
74
|
+
}
|
|
75
|
+
set id(value) {
|
|
76
|
+
this._id = value || this._uid;
|
|
77
|
+
}
|
|
78
|
+
_id;
|
|
79
|
+
placeholder;
|
|
80
|
+
name;
|
|
81
|
+
get required() {
|
|
82
|
+
return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
|
|
83
|
+
}
|
|
84
|
+
set required(value) {
|
|
85
|
+
this._required = coerceBooleanProperty(value);
|
|
86
|
+
}
|
|
87
|
+
_required;
|
|
88
|
+
get type() {
|
|
89
|
+
return this._type;
|
|
90
|
+
}
|
|
91
|
+
set type(value) {
|
|
92
|
+
this._type = value || 'text';
|
|
93
|
+
this._validateType();
|
|
94
|
+
if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {
|
|
95
|
+
this._elementRef.nativeElement.type = this._type;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
_type = 'text';
|
|
99
|
+
get errorStateMatcher() {
|
|
100
|
+
return this._errorStateTracker.matcher;
|
|
101
|
+
}
|
|
102
|
+
set errorStateMatcher(value) {
|
|
103
|
+
this._errorStateTracker.matcher = value;
|
|
104
|
+
}
|
|
105
|
+
userAriaDescribedBy;
|
|
106
|
+
get value() {
|
|
107
|
+
return this._signalBasedValueAccessor ? this._signalBasedValueAccessor.value() : this._inputValueAccessor.value;
|
|
108
|
+
}
|
|
109
|
+
set value(value) {
|
|
110
|
+
if (value !== this.value) {
|
|
111
|
+
if (this._signalBasedValueAccessor) {
|
|
112
|
+
this._signalBasedValueAccessor.value.set(value);
|
|
113
|
+
} else {
|
|
114
|
+
this._inputValueAccessor.value = value;
|
|
115
|
+
}
|
|
116
|
+
this.stateChanges.next();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
get readonly() {
|
|
120
|
+
return this._readonly;
|
|
121
|
+
}
|
|
122
|
+
set readonly(value) {
|
|
123
|
+
this._readonly = coerceBooleanProperty(value);
|
|
124
|
+
}
|
|
125
|
+
_readonly = false;
|
|
126
|
+
disabledInteractive;
|
|
127
|
+
get errorState() {
|
|
128
|
+
return this._errorStateTracker.errorState;
|
|
129
|
+
}
|
|
130
|
+
set errorState(value) {
|
|
131
|
+
this._errorStateTracker.errorState = value;
|
|
132
|
+
}
|
|
133
|
+
_neverEmptyInputTypes = ['date', 'datetime', 'datetime-local', 'month', 'time', 'week'].filter(t => getSupportedInputTypes().has(t));
|
|
134
|
+
constructor() {
|
|
135
|
+
const parentForm = inject(NgForm, {
|
|
136
|
+
optional: true
|
|
137
|
+
});
|
|
138
|
+
const parentFormGroup = inject(FormGroupDirective, {
|
|
139
|
+
optional: true
|
|
140
|
+
});
|
|
141
|
+
const defaultErrorStateMatcher = inject(ErrorStateMatcher);
|
|
142
|
+
const accessor = inject(MAT_INPUT_VALUE_ACCESSOR, {
|
|
143
|
+
optional: true,
|
|
144
|
+
self: true
|
|
145
|
+
});
|
|
146
|
+
const element = this._elementRef.nativeElement;
|
|
147
|
+
const nodeName = element.nodeName.toLowerCase();
|
|
148
|
+
if (accessor) {
|
|
149
|
+
if (isSignal(accessor.value)) {
|
|
150
|
+
this._signalBasedValueAccessor = accessor;
|
|
151
|
+
} else {
|
|
152
|
+
this._inputValueAccessor = accessor;
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
this._inputValueAccessor = element;
|
|
156
|
+
}
|
|
157
|
+
this._previousNativeValue = this.value;
|
|
158
|
+
this.id = this.id;
|
|
159
|
+
if (this._platform.IOS) {
|
|
160
|
+
this._ngZone.runOutsideAngular(() => {
|
|
161
|
+
this._cleanupIosKeyup = this._renderer.listen(element, 'keyup', this._iOSKeyupListener);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
this._errorStateTracker = new _ErrorStateTracker(defaultErrorStateMatcher, this.ngControl, parentFormGroup, parentForm, this.stateChanges);
|
|
165
|
+
this._isServer = !this._platform.isBrowser;
|
|
166
|
+
this._isNativeSelect = nodeName === 'select';
|
|
167
|
+
this._isTextarea = nodeName === 'textarea';
|
|
168
|
+
this._isInFormField = !!this._formField;
|
|
169
|
+
this.disabledInteractive = this._config?.disabledInteractive || false;
|
|
170
|
+
if (this._isNativeSelect) {
|
|
171
|
+
this.controlType = element.multiple ? 'mat-native-select-multiple' : 'mat-native-select';
|
|
172
|
+
}
|
|
173
|
+
if (this._signalBasedValueAccessor) {
|
|
174
|
+
effect(() => {
|
|
175
|
+
this._signalBasedValueAccessor.value();
|
|
267
176
|
this.stateChanges.next();
|
|
177
|
+
});
|
|
268
178
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
this._cleanupIosKeyup?.();
|
|
275
|
-
this._cleanupWebkitWheel?.();
|
|
276
|
-
}
|
|
277
|
-
ngDoCheck() {
|
|
278
|
-
if (this.ngControl) {
|
|
279
|
-
// We need to re-evaluate this on every change detection cycle, because there are some
|
|
280
|
-
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
|
281
|
-
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
|
282
|
-
this.updateErrorState();
|
|
283
|
-
// Since the input isn't a `ControlValueAccessor`, we don't have a good way of knowing when
|
|
284
|
-
// the disabled state has changed. We can't use the `ngControl.statusChanges`, because it
|
|
285
|
-
// won't fire if the input is disabled with `emitEvents = false`, despite the input becoming
|
|
286
|
-
// disabled.
|
|
287
|
-
if (this.ngControl.disabled !== null && this.ngControl.disabled !== this.disabled) {
|
|
288
|
-
this.disabled = this.ngControl.disabled;
|
|
289
|
-
this.stateChanges.next();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
// We need to dirty-check the native element's value, because there are some cases where
|
|
293
|
-
// we won't be notified when it changes (e.g. the consumer isn't using forms or they're
|
|
294
|
-
// updating the value using `emitEvent: false`).
|
|
295
|
-
this._dirtyCheckNativeValue();
|
|
296
|
-
// We need to dirty-check and set the placeholder attribute ourselves, because whether it's
|
|
297
|
-
// present or not depends on a query which is prone to "changed after checked" errors.
|
|
298
|
-
this._dirtyCheckPlaceholder();
|
|
299
|
-
}
|
|
300
|
-
/** Focuses the input. */
|
|
301
|
-
focus(options) {
|
|
302
|
-
this._elementRef.nativeElement.focus(options);
|
|
303
|
-
}
|
|
304
|
-
/** Refreshes the error state of the input. */
|
|
305
|
-
updateErrorState() {
|
|
306
|
-
this._errorStateTracker.updateErrorState();
|
|
307
|
-
}
|
|
308
|
-
/** Callback for the cases where the focused state of the input changes. */
|
|
309
|
-
_focusChanged(isFocused) {
|
|
310
|
-
if (isFocused === this.focused) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
if (!this._isNativeSelect && isFocused && this.disabled && this.disabledInteractive) {
|
|
314
|
-
const element = this._elementRef.nativeElement;
|
|
315
|
-
// Focusing an input that has text will cause all the text to be selected. Clear it since
|
|
316
|
-
// the user won't be able to change it. This is based on the internal implementation.
|
|
317
|
-
if (element.type === 'number') {
|
|
318
|
-
// setSelectionRange doesn't work on number inputs so it needs to be set briefly to text.
|
|
319
|
-
element.type = 'text';
|
|
320
|
-
element.setSelectionRange(0, 0);
|
|
321
|
-
element.type = 'number';
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
324
|
-
element.setSelectionRange(0, 0);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
this.focused = isFocused;
|
|
179
|
+
}
|
|
180
|
+
ngAfterViewInit() {
|
|
181
|
+
if (this._platform.isBrowser) {
|
|
182
|
+
this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {
|
|
183
|
+
this.autofilled = event.isAutofilled;
|
|
328
184
|
this.stateChanges.next();
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
ngOnChanges() {
|
|
189
|
+
this.stateChanges.next();
|
|
190
|
+
}
|
|
191
|
+
ngOnDestroy() {
|
|
192
|
+
this.stateChanges.complete();
|
|
193
|
+
if (this._platform.isBrowser) {
|
|
194
|
+
this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);
|
|
195
|
+
}
|
|
196
|
+
this._cleanupIosKeyup?.();
|
|
197
|
+
this._cleanupWebkitWheel?.();
|
|
198
|
+
}
|
|
199
|
+
ngDoCheck() {
|
|
200
|
+
if (this.ngControl) {
|
|
201
|
+
this.updateErrorState();
|
|
202
|
+
if (this.ngControl.disabled !== null && this.ngControl.disabled !== this.disabled) {
|
|
203
|
+
this.disabled = this.ngControl.disabled;
|
|
204
|
+
this.stateChanges.next();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
this._dirtyCheckNativeValue();
|
|
208
|
+
this._dirtyCheckPlaceholder();
|
|
209
|
+
}
|
|
210
|
+
focus(options) {
|
|
211
|
+
this._elementRef.nativeElement.focus(options);
|
|
212
|
+
}
|
|
213
|
+
updateErrorState() {
|
|
214
|
+
this._errorStateTracker.updateErrorState();
|
|
215
|
+
}
|
|
216
|
+
_focusChanged(isFocused) {
|
|
217
|
+
if (isFocused === this.focused) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
if (!this._isNativeSelect && isFocused && this.disabled && this.disabledInteractive) {
|
|
221
|
+
const element = this._elementRef.nativeElement;
|
|
222
|
+
if (element.type === 'number') {
|
|
223
|
+
element.type = 'text';
|
|
224
|
+
element.setSelectionRange(0, 0);
|
|
225
|
+
element.type = 'number';
|
|
226
|
+
} else {
|
|
227
|
+
element.setSelectionRange(0, 0);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
this.focused = isFocused;
|
|
231
|
+
this.stateChanges.next();
|
|
232
|
+
}
|
|
233
|
+
_onInput() {}
|
|
234
|
+
_dirtyCheckNativeValue() {
|
|
235
|
+
const newValue = this._elementRef.nativeElement.value;
|
|
236
|
+
if (this._previousNativeValue !== newValue) {
|
|
237
|
+
this._previousNativeValue = newValue;
|
|
238
|
+
this.stateChanges.next();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
_dirtyCheckPlaceholder() {
|
|
242
|
+
const placeholder = this._getPlaceholder();
|
|
243
|
+
if (placeholder !== this._previousPlaceholder) {
|
|
244
|
+
const element = this._elementRef.nativeElement;
|
|
245
|
+
this._previousPlaceholder = placeholder;
|
|
246
|
+
placeholder ? element.setAttribute('placeholder', placeholder) : element.removeAttribute('placeholder');
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
_getPlaceholder() {
|
|
250
|
+
return this.placeholder || null;
|
|
251
|
+
}
|
|
252
|
+
_validateType() {
|
|
253
|
+
if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
254
|
+
throw getMatInputUnsupportedTypeError(this._type);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
_isNeverEmpty() {
|
|
258
|
+
return this._neverEmptyInputTypes.indexOf(this._type) > -1;
|
|
259
|
+
}
|
|
260
|
+
_isBadInput() {
|
|
261
|
+
let validity = this._elementRef.nativeElement.validity;
|
|
262
|
+
return validity && validity.badInput;
|
|
263
|
+
}
|
|
264
|
+
get empty() {
|
|
265
|
+
return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() && !this.autofilled;
|
|
266
|
+
}
|
|
267
|
+
get shouldLabelFloat() {
|
|
268
|
+
if (this._isNativeSelect) {
|
|
269
|
+
const selectElement = this._elementRef.nativeElement;
|
|
270
|
+
const firstOption = selectElement.options[0];
|
|
271
|
+
return this.focused || selectElement.multiple || !this.empty || !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);
|
|
272
|
+
} else {
|
|
273
|
+
return this.focused && !this.disabled || !this.empty;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
get describedByIds() {
|
|
277
|
+
const element = this._elementRef.nativeElement;
|
|
278
|
+
const existingDescribedBy = element.getAttribute('aria-describedby');
|
|
279
|
+
return existingDescribedBy?.split(' ') || [];
|
|
280
|
+
}
|
|
281
|
+
setDescribedByIds(ids) {
|
|
282
|
+
const element = this._elementRef.nativeElement;
|
|
283
|
+
if (ids.length) {
|
|
284
|
+
element.setAttribute('aria-describedby', ids.join(' '));
|
|
285
|
+
} else {
|
|
286
|
+
element.removeAttribute('aria-describedby');
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
onContainerClick() {
|
|
290
|
+
if (!this.focused) {
|
|
291
|
+
this.focus();
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
_isInlineSelect() {
|
|
295
|
+
const element = this._elementRef.nativeElement;
|
|
296
|
+
return this._isNativeSelect && (element.multiple || element.size > 1);
|
|
297
|
+
}
|
|
298
|
+
_iOSKeyupListener = event => {
|
|
299
|
+
const el = event.target;
|
|
300
|
+
if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {
|
|
301
|
+
el.setSelectionRange(1, 1);
|
|
302
|
+
el.setSelectionRange(0, 0);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
_getReadonlyAttribute() {
|
|
306
|
+
if (this._isNativeSelect) {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
if (this.readonly || this.disabled && this.disabledInteractive) {
|
|
310
|
+
return 'true';
|
|
311
|
+
}
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
315
|
+
minVersion: "12.0.0",
|
|
316
|
+
version: "20.2.0-next.2",
|
|
317
|
+
ngImport: i0,
|
|
318
|
+
type: MatInput,
|
|
319
|
+
deps: [],
|
|
320
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
321
|
+
});
|
|
322
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
323
|
+
minVersion: "16.1.0",
|
|
324
|
+
version: "20.2.0-next.2",
|
|
325
|
+
type: MatInput,
|
|
326
|
+
isStandalone: true,
|
|
327
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]",
|
|
328
|
+
inputs: {
|
|
329
|
+
disabled: "disabled",
|
|
330
|
+
id: "id",
|
|
331
|
+
placeholder: "placeholder",
|
|
332
|
+
name: "name",
|
|
333
|
+
required: "required",
|
|
334
|
+
type: "type",
|
|
335
|
+
errorStateMatcher: "errorStateMatcher",
|
|
336
|
+
userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"],
|
|
337
|
+
value: "value",
|
|
338
|
+
readonly: "readonly",
|
|
339
|
+
disabledInteractive: ["disabledInteractive", "disabledInteractive", booleanAttribute]
|
|
340
|
+
},
|
|
341
|
+
host: {
|
|
342
|
+
listeners: {
|
|
343
|
+
"focus": "_focusChanged(true)",
|
|
344
|
+
"blur": "_focusChanged(false)",
|
|
345
|
+
"input": "_onInput()"
|
|
346
|
+
},
|
|
347
|
+
properties: {
|
|
348
|
+
"class.mat-input-server": "_isServer",
|
|
349
|
+
"class.mat-mdc-form-field-textarea-control": "_isInFormField && _isTextarea",
|
|
350
|
+
"class.mat-mdc-form-field-input-control": "_isInFormField",
|
|
351
|
+
"class.mat-mdc-input-disabled-interactive": "disabledInteractive",
|
|
352
|
+
"class.mdc-text-field__input": "_isInFormField",
|
|
353
|
+
"class.mat-mdc-native-select-inline": "_isInlineSelect()",
|
|
354
|
+
"id": "id",
|
|
355
|
+
"disabled": "disabled && !disabledInteractive",
|
|
356
|
+
"required": "required",
|
|
357
|
+
"attr.name": "name || null",
|
|
358
|
+
"attr.readonly": "_getReadonlyAttribute()",
|
|
359
|
+
"attr.aria-disabled": "disabled && disabledInteractive ? \"true\" : null",
|
|
360
|
+
"attr.aria-invalid": "(empty && required) ? null : errorState",
|
|
361
|
+
"attr.aria-required": "required",
|
|
362
|
+
"attr.id": "id"
|
|
363
|
+
},
|
|
364
|
+
classAttribute: "mat-mdc-input-element"
|
|
365
|
+
},
|
|
366
|
+
providers: [{
|
|
367
|
+
provide: MatFormFieldControl,
|
|
368
|
+
useExisting: MatInput
|
|
369
|
+
}],
|
|
370
|
+
exportAs: ["matInput"],
|
|
371
|
+
usesOnChanges: true,
|
|
372
|
+
ngImport: i0
|
|
373
|
+
});
|
|
479
374
|
}
|
|
480
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
375
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
376
|
+
minVersion: "12.0.0",
|
|
377
|
+
version: "20.2.0-next.2",
|
|
378
|
+
ngImport: i0,
|
|
379
|
+
type: MatInput,
|
|
380
|
+
decorators: [{
|
|
381
|
+
type: Directive,
|
|
382
|
+
args: [{
|
|
383
|
+
selector: `input[matInput], textarea[matInput], select[matNativeControl],
|
|
484
384
|
input[matNativeControl], textarea[matNativeControl]`,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
385
|
+
exportAs: 'matInput',
|
|
386
|
+
host: {
|
|
387
|
+
'class': 'mat-mdc-input-element',
|
|
388
|
+
'[class.mat-input-server]': '_isServer',
|
|
389
|
+
'[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',
|
|
390
|
+
'[class.mat-mdc-form-field-input-control]': '_isInFormField',
|
|
391
|
+
'[class.mat-mdc-input-disabled-interactive]': 'disabledInteractive',
|
|
392
|
+
'[class.mdc-text-field__input]': '_isInFormField',
|
|
393
|
+
'[class.mat-mdc-native-select-inline]': '_isInlineSelect()',
|
|
394
|
+
'[id]': 'id',
|
|
395
|
+
'[disabled]': 'disabled && !disabledInteractive',
|
|
396
|
+
'[required]': 'required',
|
|
397
|
+
'[attr.name]': 'name || null',
|
|
398
|
+
'[attr.readonly]': '_getReadonlyAttribute()',
|
|
399
|
+
'[attr.aria-disabled]': 'disabled && disabledInteractive ? "true" : null',
|
|
400
|
+
'[attr.aria-invalid]': '(empty && required) ? null : errorState',
|
|
401
|
+
'[attr.aria-required]': 'required',
|
|
402
|
+
'[attr.id]': 'id',
|
|
403
|
+
'(focus)': '_focusChanged(true)',
|
|
404
|
+
'(blur)': '_focusChanged(false)',
|
|
405
|
+
'(input)': '_onInput()'
|
|
406
|
+
},
|
|
407
|
+
providers: [{
|
|
408
|
+
provide: MatFormFieldControl,
|
|
409
|
+
useExisting: MatInput
|
|
410
|
+
}]
|
|
411
|
+
}]
|
|
412
|
+
}],
|
|
413
|
+
ctorParameters: () => [],
|
|
414
|
+
propDecorators: {
|
|
415
|
+
disabled: [{
|
|
416
|
+
type: Input
|
|
417
|
+
}],
|
|
418
|
+
id: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}],
|
|
421
|
+
placeholder: [{
|
|
422
|
+
type: Input
|
|
423
|
+
}],
|
|
424
|
+
name: [{
|
|
425
|
+
type: Input
|
|
426
|
+
}],
|
|
427
|
+
required: [{
|
|
428
|
+
type: Input
|
|
429
|
+
}],
|
|
430
|
+
type: [{
|
|
431
|
+
type: Input
|
|
432
|
+
}],
|
|
433
|
+
errorStateMatcher: [{
|
|
434
|
+
type: Input
|
|
435
|
+
}],
|
|
436
|
+
userAriaDescribedBy: [{
|
|
437
|
+
type: Input,
|
|
438
|
+
args: ['aria-describedby']
|
|
439
|
+
}],
|
|
440
|
+
value: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}],
|
|
443
|
+
readonly: [{
|
|
444
|
+
type: Input
|
|
445
|
+
}],
|
|
446
|
+
disabledInteractive: [{
|
|
447
|
+
type: Input,
|
|
448
|
+
args: [{
|
|
449
|
+
transform: booleanAttribute
|
|
450
|
+
}]
|
|
451
|
+
}]
|
|
452
|
+
}
|
|
453
|
+
});
|
|
543
454
|
|
|
544
455
|
class MatInputModule {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
457
|
+
minVersion: "12.0.0",
|
|
458
|
+
version: "20.2.0-next.2",
|
|
459
|
+
ngImport: i0,
|
|
460
|
+
type: MatInputModule,
|
|
461
|
+
deps: [],
|
|
462
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
463
|
+
});
|
|
464
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
465
|
+
minVersion: "14.0.0",
|
|
466
|
+
version: "20.2.0-next.2",
|
|
467
|
+
ngImport: i0,
|
|
468
|
+
type: MatInputModule,
|
|
469
|
+
imports: [MatFormFieldModule, MatInput],
|
|
470
|
+
exports: [MatInput, MatFormFieldModule, TextFieldModule, BidiModule]
|
|
471
|
+
});
|
|
472
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
473
|
+
minVersion: "12.0.0",
|
|
474
|
+
version: "20.2.0-next.2",
|
|
475
|
+
ngImport: i0,
|
|
476
|
+
type: MatInputModule,
|
|
477
|
+
imports: [MatFormFieldModule, MatFormFieldModule, TextFieldModule, BidiModule]
|
|
478
|
+
});
|
|
548
479
|
}
|
|
549
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
481
|
+
minVersion: "12.0.0",
|
|
482
|
+
version: "20.2.0-next.2",
|
|
483
|
+
ngImport: i0,
|
|
484
|
+
type: MatInputModule,
|
|
485
|
+
decorators: [{
|
|
486
|
+
type: NgModule,
|
|
487
|
+
args: [{
|
|
488
|
+
imports: [MatFormFieldModule, MatInput],
|
|
489
|
+
exports: [MatInput, MatFormFieldModule, TextFieldModule, BidiModule]
|
|
490
|
+
}]
|
|
491
|
+
}]
|
|
492
|
+
});
|
|
556
493
|
|
|
557
494
|
export { MAT_INPUT_CONFIG, MAT_INPUT_VALUE_ACCESSOR, MatInput, MatInputModule, getMatInputUnsupportedTypeError };
|
|
558
495
|
//# sourceMappingURL=input.mjs.map
|