@angular/cdk 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/_adev_assets/cdk_drag_drop.json +13 -12
- package/_adev_assets/cdk_testing.json +9 -9
- package/_adev_assets/cdk_testing_protractor.json +1 -1
- package/_adev_assets/cdk_testing_selenium_webdriver.json +1 -1
- package/_adev_assets/cdk_testing_testbed.json +1 -1
- package/fesm2022/_a11y-module-chunk.mjs +755 -869
- package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
- package/fesm2022/_activedescendant-key-manager-chunk.mjs +8 -8
- package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_array-chunk.mjs +1 -1
- package/fesm2022/_array-chunk.mjs.map +1 -1
- package/fesm2022/_breakpoints-observer-chunk.mjs +149 -152
- package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
- package/fesm2022/_css-pixel-value-chunk.mjs +4 -5
- package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -1
- package/fesm2022/_data-source-chunk.mjs +2 -8
- package/fesm2022/_data-source-chunk.mjs.map +1 -1
- package/fesm2022/_directionality-chunk.mjs +54 -54
- package/fesm2022/_directionality-chunk.mjs.map +1 -1
- package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs +25 -36
- package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -1
- package/fesm2022/_element-chunk.mjs +6 -17
- package/fesm2022/_element-chunk.mjs.map +1 -1
- package/fesm2022/_fake-event-detection-chunk.mjs +3 -17
- package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -1
- package/fesm2022/_focus-key-manager-chunk.mjs +10 -14
- package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_focus-monitor-chunk.mjs +376 -566
- package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
- package/fesm2022/_id-generator-chunk.mjs +36 -27
- package/fesm2022/_id-generator-chunk.mjs.map +1 -1
- package/fesm2022/_keycodes-chunk.mjs +9 -9
- package/fesm2022/_keycodes-chunk.mjs.map +1 -1
- package/fesm2022/_list-key-manager-chunk.mjs +248 -336
- package/fesm2022/_list-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_overlay-module-chunk.mjs +2534 -2948
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/_passive-listeners-chunk.mjs +10 -22
- package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
- package/fesm2022/_platform-chunk.mjs +42 -65
- package/fesm2022/_platform-chunk.mjs.map +1 -1
- package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs +78 -134
- package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -1
- package/fesm2022/_scrolling-chunk.mjs +44 -85
- package/fesm2022/_scrolling-chunk.mjs.map +1 -1
- package/fesm2022/_selection-model-chunk.mjs +138 -209
- package/fesm2022/_selection-model-chunk.mjs.map +1 -1
- package/fesm2022/_shadow-dom-chunk.mjs +21 -35
- package/fesm2022/_shadow-dom-chunk.mjs.map +1 -1
- package/fesm2022/_style-loader-chunk.mjs +50 -37
- package/fesm2022/_style-loader-chunk.mjs.map +1 -1
- package/fesm2022/_test-environment-chunk.mjs +2 -14
- package/fesm2022/_test-environment-chunk.mjs.map +1 -1
- package/fesm2022/_tree-key-manager-chunk.mjs +229 -308
- package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_typeahead-chunk.mjs +52 -74
- package/fesm2022/_typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs +43 -40
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
- package/fesm2022/a11y.mjs +351 -449
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +254 -192
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +121 -64
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -2
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +208 -186
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/coercion-private.mjs +4 -8
- package/fesm2022/coercion-private.mjs.map +1 -1
- package/fesm2022/coercion.mjs +11 -29
- package/fesm2022/coercion.mjs.map +1 -1
- package/fesm2022/dialog.mjs +660 -808
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +3347 -4286
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/keycodes.mjs +4 -8
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/layout.mjs +44 -26
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/listbox.mjs +841 -895
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +1942 -1858
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers-private.mjs +88 -106
- package/fesm2022/observers-private.mjs.map +1 -1
- package/fesm2022/observers.mjs +262 -184
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +72 -68
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +43 -54
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs +402 -560
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +38 -10
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +1323 -1400
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +758 -590
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +2327 -2319
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/testing-selenium-webdriver.mjs +252 -325
- package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
- package/fesm2022/testing-testbed.mjs +592 -709
- package/fesm2022/testing-testbed.mjs.map +1 -1
- package/fesm2022/testing.mjs +368 -889
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs +459 -388
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +1483 -1731
- package/fesm2022/tree.mjs.map +1 -1
- package/overlay/_index.scss +28 -0
- package/overlay-prebuilt.css +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_overlay-module-chunk.d.ts +59 -7
- package/types/_portal-directives-chunk.d.ts +2 -18
- package/types/accordion.d.ts +3 -1
- package/types/dialog.d.ts +1 -1
- package/types/overlay.d.ts +6 -2
- package/types/portal.d.ts +1 -1
package/fesm2022/text-field.mjs
CHANGED
|
@@ -7,426 +7,497 @@ import { coerceElement, coerceNumberProperty } from './_element-chunk.mjs';
|
|
|
7
7
|
import { auditTime } from 'rxjs/operators';
|
|
8
8
|
import '@angular/common';
|
|
9
9
|
|
|
10
|
-
/** Component used to load the structural styles of the text field. */
|
|
11
10
|
class _CdkTextFieldStyleLoader {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "20.2.0-next.2",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: _CdkTextFieldStyleLoader,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
18
|
+
});
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
20
|
+
minVersion: "14.0.0",
|
|
21
|
+
version: "20.2.0-next.2",
|
|
22
|
+
type: _CdkTextFieldStyleLoader,
|
|
23
|
+
isStandalone: true,
|
|
24
|
+
selector: "ng-component",
|
|
25
|
+
host: {
|
|
26
|
+
attributes: {
|
|
27
|
+
"cdk-text-field-style-loader": ""
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
ngImport: i0,
|
|
31
|
+
template: '',
|
|
32
|
+
isInline: true,
|
|
33
|
+
styles: ["textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"],
|
|
34
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
35
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
36
|
+
});
|
|
14
37
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
39
|
+
minVersion: "12.0.0",
|
|
40
|
+
version: "20.2.0-next.2",
|
|
41
|
+
ngImport: i0,
|
|
42
|
+
type: _CdkTextFieldStyleLoader,
|
|
43
|
+
decorators: [{
|
|
44
|
+
type: Component,
|
|
45
|
+
args: [{
|
|
46
|
+
template: '',
|
|
47
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
48
|
+
encapsulation: ViewEncapsulation.None,
|
|
49
|
+
host: {
|
|
50
|
+
'cdk-text-field-style-loader': ''
|
|
51
|
+
},
|
|
52
|
+
styles: ["textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"]
|
|
53
|
+
}]
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
19
56
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* An injectable service that can be used to monitor the autofill state of an input.
|
|
24
|
-
* Based on the following blog post:
|
|
25
|
-
* https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
|
|
26
|
-
*/
|
|
57
|
+
const listenerOptions = {
|
|
58
|
+
passive: true
|
|
59
|
+
};
|
|
27
60
|
class AutofillMonitor {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
this._styleLoader.load(_CdkTextFieldStyleLoader);
|
|
39
|
-
const element = coerceElement(elementOrRef);
|
|
40
|
-
const info = this._monitoredElements.get(element);
|
|
41
|
-
if (info) {
|
|
42
|
-
return info.subject;
|
|
43
|
-
}
|
|
44
|
-
const subject = new Subject();
|
|
45
|
-
const cssClass = 'cdk-text-field-autofilled';
|
|
46
|
-
const listener = (event) => {
|
|
47
|
-
// Animation events fire on initial element render, we check for the presence of the autofill
|
|
48
|
-
// CSS class to make sure this is a real change in state, not just the initial render before
|
|
49
|
-
// we fire off events.
|
|
50
|
-
if (event.animationName === 'cdk-text-field-autofill-start' &&
|
|
51
|
-
!element.classList.contains(cssClass)) {
|
|
52
|
-
element.classList.add(cssClass);
|
|
53
|
-
this._ngZone.run(() => subject.next({ target: event.target, isAutofilled: true }));
|
|
54
|
-
}
|
|
55
|
-
else if (event.animationName === 'cdk-text-field-autofill-end' &&
|
|
56
|
-
element.classList.contains(cssClass)) {
|
|
57
|
-
element.classList.remove(cssClass);
|
|
58
|
-
this._ngZone.run(() => subject.next({ target: event.target, isAutofilled: false }));
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const unlisten = this._ngZone.runOutsideAngular(() => {
|
|
62
|
-
element.classList.add('cdk-text-field-autofill-monitored');
|
|
63
|
-
return this._renderer.listen(element, 'animationstart', listener, listenerOptions);
|
|
64
|
-
});
|
|
65
|
-
this._monitoredElements.set(element, { subject, unlisten });
|
|
66
|
-
return subject;
|
|
61
|
+
_platform = inject(Platform);
|
|
62
|
+
_ngZone = inject(NgZone);
|
|
63
|
+
_renderer = inject(RendererFactory2).createRenderer(null, null);
|
|
64
|
+
_styleLoader = inject(_CdkPrivateStyleLoader);
|
|
65
|
+
_monitoredElements = new Map();
|
|
66
|
+
constructor() {}
|
|
67
|
+
monitor(elementOrRef) {
|
|
68
|
+
if (!this._platform.isBrowser) {
|
|
69
|
+
return EMPTY;
|
|
67
70
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
info.subject.complete();
|
|
74
|
-
element.classList.remove('cdk-text-field-autofill-monitored');
|
|
75
|
-
element.classList.remove('cdk-text-field-autofilled');
|
|
76
|
-
this._monitoredElements.delete(element);
|
|
77
|
-
}
|
|
71
|
+
this._styleLoader.load(_CdkTextFieldStyleLoader);
|
|
72
|
+
const element = coerceElement(elementOrRef);
|
|
73
|
+
const info = this._monitoredElements.get(element);
|
|
74
|
+
if (info) {
|
|
75
|
+
return info.subject;
|
|
78
76
|
}
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const subject = new Subject();
|
|
78
|
+
const cssClass = 'cdk-text-field-autofilled';
|
|
79
|
+
const listener = event => {
|
|
80
|
+
if (event.animationName === 'cdk-text-field-autofill-start' && !element.classList.contains(cssClass)) {
|
|
81
|
+
element.classList.add(cssClass);
|
|
82
|
+
this._ngZone.run(() => subject.next({
|
|
83
|
+
target: event.target,
|
|
84
|
+
isAutofilled: true
|
|
85
|
+
}));
|
|
86
|
+
} else if (event.animationName === 'cdk-text-field-autofill-end' && element.classList.contains(cssClass)) {
|
|
87
|
+
element.classList.remove(cssClass);
|
|
88
|
+
this._ngZone.run(() => subject.next({
|
|
89
|
+
target: event.target,
|
|
90
|
+
isAutofilled: false
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const unlisten = this._ngZone.runOutsideAngular(() => {
|
|
95
|
+
element.classList.add('cdk-text-field-autofill-monitored');
|
|
96
|
+
return this._renderer.listen(element, 'animationstart', listener, listenerOptions);
|
|
97
|
+
});
|
|
98
|
+
this._monitoredElements.set(element, {
|
|
99
|
+
subject,
|
|
100
|
+
unlisten
|
|
101
|
+
});
|
|
102
|
+
return subject;
|
|
103
|
+
}
|
|
104
|
+
stopMonitoring(elementOrRef) {
|
|
105
|
+
const element = coerceElement(elementOrRef);
|
|
106
|
+
const info = this._monitoredElements.get(element);
|
|
107
|
+
if (info) {
|
|
108
|
+
info.unlisten();
|
|
109
|
+
info.subject.complete();
|
|
110
|
+
element.classList.remove('cdk-text-field-autofill-monitored');
|
|
111
|
+
element.classList.remove('cdk-text-field-autofilled');
|
|
112
|
+
this._monitoredElements.delete(element);
|
|
81
113
|
}
|
|
82
|
-
|
|
83
|
-
|
|
114
|
+
}
|
|
115
|
+
ngOnDestroy() {
|
|
116
|
+
this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));
|
|
117
|
+
}
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
119
|
+
minVersion: "12.0.0",
|
|
120
|
+
version: "20.2.0-next.2",
|
|
121
|
+
ngImport: i0,
|
|
122
|
+
type: AutofillMonitor,
|
|
123
|
+
deps: [],
|
|
124
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
125
|
+
});
|
|
126
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
127
|
+
minVersion: "12.0.0",
|
|
128
|
+
version: "20.2.0-next.2",
|
|
129
|
+
ngImport: i0,
|
|
130
|
+
type: AutofillMonitor,
|
|
131
|
+
providedIn: 'root'
|
|
132
|
+
});
|
|
84
133
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
135
|
+
minVersion: "12.0.0",
|
|
136
|
+
version: "20.2.0-next.2",
|
|
137
|
+
ngImport: i0,
|
|
138
|
+
type: AutofillMonitor,
|
|
139
|
+
decorators: [{
|
|
140
|
+
type: Injectable,
|
|
141
|
+
args: [{
|
|
142
|
+
providedIn: 'root'
|
|
143
|
+
}]
|
|
144
|
+
}],
|
|
145
|
+
ctorParameters: () => []
|
|
146
|
+
});
|
|
90
147
|
class CdkAutofill {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
148
|
+
_elementRef = inject(ElementRef);
|
|
149
|
+
_autofillMonitor = inject(AutofillMonitor);
|
|
150
|
+
cdkAutofill = new EventEmitter();
|
|
151
|
+
constructor() {}
|
|
152
|
+
ngOnInit() {
|
|
153
|
+
this._autofillMonitor.monitor(this._elementRef).subscribe(event => this.cdkAutofill.emit(event));
|
|
154
|
+
}
|
|
155
|
+
ngOnDestroy() {
|
|
156
|
+
this._autofillMonitor.stopMonitoring(this._elementRef);
|
|
157
|
+
}
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
159
|
+
minVersion: "12.0.0",
|
|
160
|
+
version: "20.2.0-next.2",
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
type: CdkAutofill,
|
|
163
|
+
deps: [],
|
|
164
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
165
|
+
});
|
|
166
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
167
|
+
minVersion: "14.0.0",
|
|
168
|
+
version: "20.2.0-next.2",
|
|
169
|
+
type: CdkAutofill,
|
|
170
|
+
isStandalone: true,
|
|
171
|
+
selector: "[cdkAutofill]",
|
|
172
|
+
outputs: {
|
|
173
|
+
cdkAutofill: "cdkAutofill"
|
|
174
|
+
},
|
|
175
|
+
ngImport: i0
|
|
176
|
+
});
|
|
106
177
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
179
|
+
minVersion: "12.0.0",
|
|
180
|
+
version: "20.2.0-next.2",
|
|
181
|
+
ngImport: i0,
|
|
182
|
+
type: CdkAutofill,
|
|
183
|
+
decorators: [{
|
|
184
|
+
type: Directive,
|
|
185
|
+
args: [{
|
|
186
|
+
selector: '[cdkAutofill]'
|
|
187
|
+
}]
|
|
188
|
+
}],
|
|
189
|
+
ctorParameters: () => [],
|
|
190
|
+
propDecorators: {
|
|
191
|
+
cdkAutofill: [{
|
|
192
|
+
type: Output
|
|
193
|
+
}]
|
|
194
|
+
}
|
|
195
|
+
});
|
|
115
196
|
|
|
116
|
-
/** Directive to automatically resize a textarea to fit its content. */
|
|
117
197
|
class CdkTextareaAutosize {
|
|
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
|
-
|
|
198
|
+
_elementRef = inject(ElementRef);
|
|
199
|
+
_platform = inject(Platform);
|
|
200
|
+
_ngZone = inject(NgZone);
|
|
201
|
+
_renderer = inject(Renderer2);
|
|
202
|
+
_resizeEvents = new Subject();
|
|
203
|
+
_previousValue;
|
|
204
|
+
_initialHeight;
|
|
205
|
+
_destroyed = new Subject();
|
|
206
|
+
_listenerCleanups;
|
|
207
|
+
_minRows;
|
|
208
|
+
_maxRows;
|
|
209
|
+
_enabled = true;
|
|
210
|
+
_previousMinRows = -1;
|
|
211
|
+
_textareaElement;
|
|
212
|
+
get minRows() {
|
|
213
|
+
return this._minRows;
|
|
214
|
+
}
|
|
215
|
+
set minRows(value) {
|
|
216
|
+
this._minRows = coerceNumberProperty(value);
|
|
217
|
+
this._setMinHeight();
|
|
218
|
+
}
|
|
219
|
+
get maxRows() {
|
|
220
|
+
return this._maxRows;
|
|
221
|
+
}
|
|
222
|
+
set maxRows(value) {
|
|
223
|
+
this._maxRows = coerceNumberProperty(value);
|
|
224
|
+
this._setMaxHeight();
|
|
225
|
+
}
|
|
226
|
+
get enabled() {
|
|
227
|
+
return this._enabled;
|
|
228
|
+
}
|
|
229
|
+
set enabled(value) {
|
|
230
|
+
if (this._enabled !== value) {
|
|
231
|
+
(this._enabled = value) ? this.resizeToFitContent(true) : this.reset();
|
|
149
232
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
233
|
+
}
|
|
234
|
+
get placeholder() {
|
|
235
|
+
return this._textareaElement.placeholder;
|
|
236
|
+
}
|
|
237
|
+
set placeholder(value) {
|
|
238
|
+
this._cachedPlaceholderHeight = undefined;
|
|
239
|
+
if (value) {
|
|
240
|
+
this._textareaElement.setAttribute('placeholder', value);
|
|
241
|
+
} else {
|
|
242
|
+
this._textareaElement.removeAttribute('placeholder');
|
|
153
243
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
244
|
+
this._cacheTextareaPlaceholderHeight();
|
|
245
|
+
}
|
|
246
|
+
_cachedLineHeight;
|
|
247
|
+
_cachedPlaceholderHeight;
|
|
248
|
+
_document = inject(DOCUMENT);
|
|
249
|
+
_hasFocus;
|
|
250
|
+
_isViewInited = false;
|
|
251
|
+
constructor() {
|
|
252
|
+
const styleLoader = inject(_CdkPrivateStyleLoader);
|
|
253
|
+
styleLoader.load(_CdkTextFieldStyleLoader);
|
|
254
|
+
this._textareaElement = this._elementRef.nativeElement;
|
|
255
|
+
}
|
|
256
|
+
_setMinHeight() {
|
|
257
|
+
const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;
|
|
258
|
+
if (minHeight) {
|
|
259
|
+
this._textareaElement.style.minHeight = minHeight;
|
|
157
260
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
261
|
+
}
|
|
262
|
+
_setMaxHeight() {
|
|
263
|
+
const maxHeight = this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;
|
|
264
|
+
if (maxHeight) {
|
|
265
|
+
this._textareaElement.style.maxHeight = maxHeight;
|
|
164
266
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
_cachedLineHeight;
|
|
180
|
-
/** Cached height of a textarea with only the placeholder. */
|
|
181
|
-
_cachedPlaceholderHeight;
|
|
182
|
-
/** Used to reference correct document/window */
|
|
183
|
-
_document = inject(DOCUMENT);
|
|
184
|
-
_hasFocus;
|
|
185
|
-
_isViewInited = false;
|
|
186
|
-
constructor() {
|
|
187
|
-
const styleLoader = inject(_CdkPrivateStyleLoader);
|
|
188
|
-
styleLoader.load(_CdkTextFieldStyleLoader);
|
|
189
|
-
this._textareaElement = this._elementRef.nativeElement;
|
|
190
|
-
}
|
|
191
|
-
/** Sets the minimum height of the textarea as determined by minRows. */
|
|
192
|
-
_setMinHeight() {
|
|
193
|
-
const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;
|
|
194
|
-
if (minHeight) {
|
|
195
|
-
this._textareaElement.style.minHeight = minHeight;
|
|
196
|
-
}
|
|
267
|
+
}
|
|
268
|
+
ngAfterViewInit() {
|
|
269
|
+
if (this._platform.isBrowser) {
|
|
270
|
+
this._initialHeight = this._textareaElement.style.height;
|
|
271
|
+
this.resizeToFitContent();
|
|
272
|
+
this._ngZone.runOutsideAngular(() => {
|
|
273
|
+
this._listenerCleanups = [this._renderer.listen('window', 'resize', () => this._resizeEvents.next()), this._renderer.listen(this._textareaElement, 'focus', this._handleFocusEvent), this._renderer.listen(this._textareaElement, 'blur', this._handleFocusEvent)];
|
|
274
|
+
this._resizeEvents.pipe(auditTime(16)).subscribe(() => {
|
|
275
|
+
this._cachedLineHeight = this._cachedPlaceholderHeight = undefined;
|
|
276
|
+
this.resizeToFitContent(true);
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
this._isViewInited = true;
|
|
280
|
+
this.resizeToFitContent(true);
|
|
197
281
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
282
|
+
}
|
|
283
|
+
ngOnDestroy() {
|
|
284
|
+
this._listenerCleanups?.forEach(cleanup => cleanup());
|
|
285
|
+
this._resizeEvents.complete();
|
|
286
|
+
this._destroyed.next();
|
|
287
|
+
this._destroyed.complete();
|
|
288
|
+
}
|
|
289
|
+
_cacheTextareaLineHeight() {
|
|
290
|
+
if (this._cachedLineHeight) {
|
|
291
|
+
return;
|
|
204
292
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
293
|
+
const textareaClone = this._textareaElement.cloneNode(false);
|
|
294
|
+
const cloneStyles = textareaClone.style;
|
|
295
|
+
textareaClone.rows = 1;
|
|
296
|
+
cloneStyles.position = 'absolute';
|
|
297
|
+
cloneStyles.visibility = 'hidden';
|
|
298
|
+
cloneStyles.border = 'none';
|
|
299
|
+
cloneStyles.padding = '0';
|
|
300
|
+
cloneStyles.height = '';
|
|
301
|
+
cloneStyles.minHeight = '';
|
|
302
|
+
cloneStyles.maxHeight = '';
|
|
303
|
+
cloneStyles.top = cloneStyles.bottom = cloneStyles.left = cloneStyles.right = 'auto';
|
|
304
|
+
cloneStyles.overflow = 'hidden';
|
|
305
|
+
this._textareaElement.parentNode.appendChild(textareaClone);
|
|
306
|
+
this._cachedLineHeight = textareaClone.clientHeight;
|
|
307
|
+
textareaClone.remove();
|
|
308
|
+
this._setMinHeight();
|
|
309
|
+
this._setMaxHeight();
|
|
310
|
+
}
|
|
311
|
+
_measureScrollHeight() {
|
|
312
|
+
const element = this._textareaElement;
|
|
313
|
+
const previousMargin = element.style.marginBottom || '';
|
|
314
|
+
const isFirefox = this._platform.FIREFOX;
|
|
315
|
+
const needsMarginFiller = isFirefox && this._hasFocus;
|
|
316
|
+
const measuringClass = isFirefox ? 'cdk-textarea-autosize-measuring-firefox' : 'cdk-textarea-autosize-measuring';
|
|
317
|
+
if (needsMarginFiller) {
|
|
318
|
+
element.style.marginBottom = `${element.clientHeight}px`;
|
|
226
319
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
320
|
+
element.classList.add(measuringClass);
|
|
321
|
+
const scrollHeight = element.scrollHeight - 4;
|
|
322
|
+
element.classList.remove(measuringClass);
|
|
323
|
+
if (needsMarginFiller) {
|
|
324
|
+
element.style.marginBottom = previousMargin;
|
|
232
325
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
* textarea does not ever change.
|
|
239
|
-
*/
|
|
240
|
-
_cacheTextareaLineHeight() {
|
|
241
|
-
if (this._cachedLineHeight) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
// Use a clone element because we have to override some styles.
|
|
245
|
-
const textareaClone = this._textareaElement.cloneNode(false);
|
|
246
|
-
const cloneStyles = textareaClone.style;
|
|
247
|
-
textareaClone.rows = 1;
|
|
248
|
-
// Use `position: absolute` so that this doesn't cause a browser layout and use
|
|
249
|
-
// `visibility: hidden` so that nothing is rendered. Clear any other styles that
|
|
250
|
-
// would affect the height.
|
|
251
|
-
cloneStyles.position = 'absolute';
|
|
252
|
-
cloneStyles.visibility = 'hidden';
|
|
253
|
-
cloneStyles.border = 'none';
|
|
254
|
-
cloneStyles.padding = '0';
|
|
255
|
-
cloneStyles.height = '';
|
|
256
|
-
cloneStyles.minHeight = '';
|
|
257
|
-
cloneStyles.maxHeight = '';
|
|
258
|
-
// App styles might be messing with the height through the positioning properties.
|
|
259
|
-
cloneStyles.top = cloneStyles.bottom = cloneStyles.left = cloneStyles.right = 'auto';
|
|
260
|
-
// In Firefox it happens that textarea elements are always bigger than the specified amount
|
|
261
|
-
// of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.
|
|
262
|
-
// As a workaround that removes the extra space for the scrollbar, we can just set overflow
|
|
263
|
-
// to hidden. This ensures that there is no invalid calculation of the line height.
|
|
264
|
-
// See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654
|
|
265
|
-
cloneStyles.overflow = 'hidden';
|
|
266
|
-
this._textareaElement.parentNode.appendChild(textareaClone);
|
|
267
|
-
this._cachedLineHeight = textareaClone.clientHeight;
|
|
268
|
-
textareaClone.remove();
|
|
269
|
-
// Min and max heights have to be re-calculated if the cached line height changes
|
|
270
|
-
this._setMinHeight();
|
|
271
|
-
this._setMaxHeight();
|
|
326
|
+
return scrollHeight;
|
|
327
|
+
}
|
|
328
|
+
_cacheTextareaPlaceholderHeight() {
|
|
329
|
+
if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {
|
|
330
|
+
return;
|
|
272
331
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
const isFirefox = this._platform.FIREFOX;
|
|
277
|
-
const needsMarginFiller = isFirefox && this._hasFocus;
|
|
278
|
-
const measuringClass = isFirefox
|
|
279
|
-
? 'cdk-textarea-autosize-measuring-firefox'
|
|
280
|
-
: 'cdk-textarea-autosize-measuring';
|
|
281
|
-
// In some cases the page might move around while we're measuring the `textarea` on Firefox. We
|
|
282
|
-
// work around it by assigning a temporary margin with the same height as the `textarea` so that
|
|
283
|
-
// it occupies the same amount of space. See #23233.
|
|
284
|
-
if (needsMarginFiller) {
|
|
285
|
-
element.style.marginBottom = `${element.clientHeight}px`;
|
|
286
|
-
}
|
|
287
|
-
// Reset the textarea height to auto in order to shrink back to its default size.
|
|
288
|
-
// Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.
|
|
289
|
-
element.classList.add(measuringClass);
|
|
290
|
-
// The measuring class includes a 2px padding to workaround an issue with Chrome,
|
|
291
|
-
// so we account for that extra space here by subtracting 4 (2px top + 2px bottom).
|
|
292
|
-
const scrollHeight = element.scrollHeight - 4;
|
|
293
|
-
element.classList.remove(measuringClass);
|
|
294
|
-
if (needsMarginFiller) {
|
|
295
|
-
element.style.marginBottom = previousMargin;
|
|
296
|
-
}
|
|
297
|
-
return scrollHeight;
|
|
332
|
+
if (!this.placeholder) {
|
|
333
|
+
this._cachedPlaceholderHeight = 0;
|
|
334
|
+
return;
|
|
298
335
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
this._textareaElement.value = value;
|
|
336
|
+
const value = this._textareaElement.value;
|
|
337
|
+
this._textareaElement.value = this._textareaElement.placeholder;
|
|
338
|
+
this._cachedPlaceholderHeight = this._measureScrollHeight();
|
|
339
|
+
this._textareaElement.value = value;
|
|
340
|
+
}
|
|
341
|
+
_handleFocusEvent = event => {
|
|
342
|
+
this._hasFocus = event.type === 'focus';
|
|
343
|
+
};
|
|
344
|
+
ngDoCheck() {
|
|
345
|
+
if (this._platform.isBrowser) {
|
|
346
|
+
this.resizeToFitContent();
|
|
311
347
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
ngDoCheck() {
|
|
317
|
-
if (this._platform.isBrowser) {
|
|
318
|
-
this.resizeToFitContent();
|
|
319
|
-
}
|
|
348
|
+
}
|
|
349
|
+
resizeToFitContent(force = false) {
|
|
350
|
+
if (!this._enabled) {
|
|
351
|
+
return;
|
|
320
352
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
*/
|
|
326
|
-
resizeToFitContent(force = false) {
|
|
327
|
-
// If autosizing is disabled, just skip everything else
|
|
328
|
-
if (!this._enabled) {
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
this._cacheTextareaLineHeight();
|
|
332
|
-
this._cacheTextareaPlaceholderHeight();
|
|
333
|
-
// If we haven't determined the line-height yet, we know we're still hidden and there's no point
|
|
334
|
-
// in checking the height of the textarea.
|
|
335
|
-
if (!this._cachedLineHeight) {
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
const textarea = this._elementRef.nativeElement;
|
|
339
|
-
const value = textarea.value;
|
|
340
|
-
// Only resize if the value or minRows have changed since these calculations can be expensive.
|
|
341
|
-
if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
const scrollHeight = this._measureScrollHeight();
|
|
345
|
-
const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);
|
|
346
|
-
// Use the scrollHeight to know how large the textarea *would* be if fit its entire value.
|
|
347
|
-
textarea.style.height = `${height}px`;
|
|
348
|
-
this._ngZone.runOutsideAngular(() => {
|
|
349
|
-
if (typeof requestAnimationFrame !== 'undefined') {
|
|
350
|
-
requestAnimationFrame(() => this._scrollToCaretPosition(textarea));
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
setTimeout(() => this._scrollToCaretPosition(textarea));
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
this._previousValue = value;
|
|
357
|
-
this._previousMinRows = this._minRows;
|
|
353
|
+
this._cacheTextareaLineHeight();
|
|
354
|
+
this._cacheTextareaPlaceholderHeight();
|
|
355
|
+
if (!this._cachedLineHeight) {
|
|
356
|
+
return;
|
|
358
357
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
// Do not try to change the textarea, if the initialHeight has not been determined yet
|
|
364
|
-
// This might potentially remove styles when reset() is called before ngAfterViewInit
|
|
365
|
-
if (this._initialHeight !== undefined) {
|
|
366
|
-
this._textareaElement.style.height = this._initialHeight;
|
|
367
|
-
}
|
|
358
|
+
const textarea = this._elementRef.nativeElement;
|
|
359
|
+
const value = textarea.value;
|
|
360
|
+
if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {
|
|
361
|
+
return;
|
|
368
362
|
}
|
|
369
|
-
|
|
370
|
-
|
|
363
|
+
const scrollHeight = this._measureScrollHeight();
|
|
364
|
+
const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);
|
|
365
|
+
textarea.style.height = `${height}px`;
|
|
366
|
+
this._ngZone.runOutsideAngular(() => {
|
|
367
|
+
if (typeof requestAnimationFrame !== 'undefined') {
|
|
368
|
+
requestAnimationFrame(() => this._scrollToCaretPosition(textarea));
|
|
369
|
+
} else {
|
|
370
|
+
setTimeout(() => this._scrollToCaretPosition(textarea));
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
this._previousValue = value;
|
|
374
|
+
this._previousMinRows = this._minRows;
|
|
375
|
+
}
|
|
376
|
+
reset() {
|
|
377
|
+
if (this._initialHeight !== undefined) {
|
|
378
|
+
this._textareaElement.style.height = this._initialHeight;
|
|
371
379
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
// between the time we requested the animation frame and when it was executed.
|
|
382
|
-
// Also note that we have to assert that the textarea is focused before we set the
|
|
383
|
-
// selection range. Setting the selection range on a non-focused textarea will cause
|
|
384
|
-
// it to receive focus on IE and Edge.
|
|
385
|
-
if (!this._destroyed.isStopped && this._hasFocus) {
|
|
386
|
-
textarea.setSelectionRange(selectionStart, selectionEnd);
|
|
387
|
-
}
|
|
380
|
+
}
|
|
381
|
+
_noopInputHandler() {}
|
|
382
|
+
_scrollToCaretPosition(textarea) {
|
|
383
|
+
const {
|
|
384
|
+
selectionStart,
|
|
385
|
+
selectionEnd
|
|
386
|
+
} = textarea;
|
|
387
|
+
if (!this._destroyed.isStopped && this._hasFocus) {
|
|
388
|
+
textarea.setSelectionRange(selectionStart, selectionEnd);
|
|
388
389
|
}
|
|
389
|
-
|
|
390
|
-
|
|
390
|
+
}
|
|
391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
392
|
+
minVersion: "12.0.0",
|
|
393
|
+
version: "20.2.0-next.2",
|
|
394
|
+
ngImport: i0,
|
|
395
|
+
type: CdkTextareaAutosize,
|
|
396
|
+
deps: [],
|
|
397
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
398
|
+
});
|
|
399
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
400
|
+
minVersion: "16.1.0",
|
|
401
|
+
version: "20.2.0-next.2",
|
|
402
|
+
type: CdkTextareaAutosize,
|
|
403
|
+
isStandalone: true,
|
|
404
|
+
selector: "textarea[cdkTextareaAutosize]",
|
|
405
|
+
inputs: {
|
|
406
|
+
minRows: ["cdkAutosizeMinRows", "minRows"],
|
|
407
|
+
maxRows: ["cdkAutosizeMaxRows", "maxRows"],
|
|
408
|
+
enabled: ["cdkTextareaAutosize", "enabled", booleanAttribute],
|
|
409
|
+
placeholder: "placeholder"
|
|
410
|
+
},
|
|
411
|
+
host: {
|
|
412
|
+
attributes: {
|
|
413
|
+
"rows": "1"
|
|
414
|
+
},
|
|
415
|
+
listeners: {
|
|
416
|
+
"input": "_noopInputHandler()"
|
|
417
|
+
},
|
|
418
|
+
classAttribute: "cdk-textarea-autosize"
|
|
419
|
+
},
|
|
420
|
+
exportAs: ["cdkTextareaAutosize"],
|
|
421
|
+
ngImport: i0
|
|
422
|
+
});
|
|
391
423
|
}
|
|
392
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
424
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
425
|
+
minVersion: "12.0.0",
|
|
426
|
+
version: "20.2.0-next.2",
|
|
427
|
+
ngImport: i0,
|
|
428
|
+
type: CdkTextareaAutosize,
|
|
429
|
+
decorators: [{
|
|
430
|
+
type: Directive,
|
|
431
|
+
args: [{
|
|
432
|
+
selector: 'textarea[cdkTextareaAutosize]',
|
|
433
|
+
exportAs: 'cdkTextareaAutosize',
|
|
434
|
+
host: {
|
|
435
|
+
'class': 'cdk-textarea-autosize',
|
|
436
|
+
'rows': '1',
|
|
437
|
+
'(input)': '_noopInputHandler()'
|
|
438
|
+
}
|
|
439
|
+
}]
|
|
440
|
+
}],
|
|
441
|
+
ctorParameters: () => [],
|
|
442
|
+
propDecorators: {
|
|
443
|
+
minRows: [{
|
|
444
|
+
type: Input,
|
|
445
|
+
args: ['cdkAutosizeMinRows']
|
|
446
|
+
}],
|
|
447
|
+
maxRows: [{
|
|
448
|
+
type: Input,
|
|
449
|
+
args: ['cdkAutosizeMaxRows']
|
|
450
|
+
}],
|
|
451
|
+
enabled: [{
|
|
452
|
+
type: Input,
|
|
453
|
+
args: [{
|
|
454
|
+
alias: 'cdkTextareaAutosize',
|
|
455
|
+
transform: booleanAttribute
|
|
456
|
+
}]
|
|
457
|
+
}],
|
|
458
|
+
placeholder: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}]
|
|
461
|
+
}
|
|
462
|
+
});
|
|
417
463
|
|
|
418
464
|
class TextFieldModule {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
465
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
466
|
+
minVersion: "12.0.0",
|
|
467
|
+
version: "20.2.0-next.2",
|
|
468
|
+
ngImport: i0,
|
|
469
|
+
type: TextFieldModule,
|
|
470
|
+
deps: [],
|
|
471
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
472
|
+
});
|
|
473
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
474
|
+
minVersion: "14.0.0",
|
|
475
|
+
version: "20.2.0-next.2",
|
|
476
|
+
ngImport: i0,
|
|
477
|
+
type: TextFieldModule,
|
|
478
|
+
imports: [CdkAutofill, CdkTextareaAutosize],
|
|
479
|
+
exports: [CdkAutofill, CdkTextareaAutosize]
|
|
480
|
+
});
|
|
481
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
482
|
+
minVersion: "12.0.0",
|
|
483
|
+
version: "20.2.0-next.2",
|
|
484
|
+
ngImport: i0,
|
|
485
|
+
type: TextFieldModule
|
|
486
|
+
});
|
|
422
487
|
}
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
489
|
+
minVersion: "12.0.0",
|
|
490
|
+
version: "20.2.0-next.2",
|
|
491
|
+
ngImport: i0,
|
|
492
|
+
type: TextFieldModule,
|
|
493
|
+
decorators: [{
|
|
494
|
+
type: NgModule,
|
|
495
|
+
args: [{
|
|
496
|
+
imports: [CdkAutofill, CdkTextareaAutosize],
|
|
497
|
+
exports: [CdkAutofill, CdkTextareaAutosize]
|
|
498
|
+
}]
|
|
499
|
+
}]
|
|
500
|
+
});
|
|
430
501
|
|
|
431
502
|
export { AutofillMonitor, CdkAutofill, CdkTextareaAutosize, TextFieldModule };
|
|
432
503
|
//# sourceMappingURL=text-field.mjs.map
|