@angular/cdk 22.0.0-next.3 → 22.0.0-next.5
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/fesm2022/_a11y-module-chunk.mjs +23 -25
- package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
- package/fesm2022/_breakpoints-observer-chunk.mjs +7 -9
- package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
- package/fesm2022/_directionality-chunk.mjs +3 -3
- package/fesm2022/_directionality-chunk.mjs.map +1 -1
- package/fesm2022/_focus-monitor-chunk.mjs +9 -11
- package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
- package/fesm2022/_id-generator-chunk.mjs +3 -3
- package/fesm2022/_overlay-module-chunk.mjs +41 -53
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/_platform-chunk.mjs +4 -6
- package/fesm2022/_platform-chunk.mjs.map +1 -1
- package/fesm2022/_style-loader-chunk.mjs +3 -3
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
- package/fesm2022/a11y.mjs +9 -9
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +10 -12
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +7 -7
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +11 -13
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/dialog.mjs +11 -13
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +33 -37
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/layout.mjs +4 -4
- package/fesm2022/listbox.mjs +12 -12
- package/fesm2022/menu.mjs +49 -49
- package/fesm2022/observers-private.mjs +3 -3
- package/fesm2022/observers.mjs +14 -18
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +6 -10
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +4 -4
- package/fesm2022/portal.mjs +11 -15
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +3 -3
- package/fesm2022/scrolling.mjs +41 -53
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +24 -34
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +83 -107
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/text-field.mjs +17 -21
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +30 -42
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_a11y-module-chunk.d.ts +4 -5
- package/types/_bidi-module-chunk.d.ts +1 -1
- package/types/_focus-monitor-chunk.d.ts +1 -2
- package/types/_overlay-module-chunk.d.ts +1 -4
- package/types/_platform-chunk.d.ts +0 -2
- package/types/_portal-directives-chunk.d.ts +1 -2
- package/types/_scrolling-module-chunk.d.ts +3 -7
- package/types/a11y.d.ts +4 -4
- package/types/accordion.d.ts +0 -1
- package/types/clipboard.d.ts +1 -2
- package/types/dialog.d.ts +1 -2
- package/types/drag-drop.d.ts +6 -8
- package/types/layout.d.ts +1 -2
- package/types/observers.d.ts +0 -2
- package/types/overlay.d.ts +0 -4
- package/types/scrolling.d.ts +1 -1
- package/types/stepper.d.ts +1 -6
- package/types/table.d.ts +10 -19
- package/types/text-field.d.ts +1 -3
- package/types/tree.d.ts +2 -7
package/fesm2022/text-field.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import '@angular/common';
|
|
|
10
10
|
class _CdkTextFieldStyleLoader {
|
|
11
11
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
12
|
minVersion: "12.0.0",
|
|
13
|
-
version: "22.0.0-next.
|
|
13
|
+
version: "22.0.0-next.6",
|
|
14
14
|
ngImport: i0,
|
|
15
15
|
type: _CdkTextFieldStyleLoader,
|
|
16
16
|
deps: [],
|
|
@@ -18,7 +18,7 @@ class _CdkTextFieldStyleLoader {
|
|
|
18
18
|
});
|
|
19
19
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
20
20
|
minVersion: "14.0.0",
|
|
21
|
-
version: "22.0.0-next.
|
|
21
|
+
version: "22.0.0-next.6",
|
|
22
22
|
type: _CdkTextFieldStyleLoader,
|
|
23
23
|
isStandalone: true,
|
|
24
24
|
selector: "ng-component",
|
|
@@ -37,7 +37,7 @@ class _CdkTextFieldStyleLoader {
|
|
|
37
37
|
}
|
|
38
38
|
i0.ɵɵngDeclareClassMetadata({
|
|
39
39
|
minVersion: "12.0.0",
|
|
40
|
-
version: "22.0.0-next.
|
|
40
|
+
version: "22.0.0-next.6",
|
|
41
41
|
ngImport: i0,
|
|
42
42
|
type: _CdkTextFieldStyleLoader,
|
|
43
43
|
decorators: [{
|
|
@@ -63,7 +63,6 @@ class AutofillMonitor {
|
|
|
63
63
|
_renderer = inject(RendererFactory2).createRenderer(null, null);
|
|
64
64
|
_styleLoader = inject(_CdkPrivateStyleLoader);
|
|
65
65
|
_monitoredElements = new Map();
|
|
66
|
-
constructor() {}
|
|
67
66
|
monitor(elementOrRef) {
|
|
68
67
|
if (!this._platform.isBrowser) {
|
|
69
68
|
return EMPTY;
|
|
@@ -117,7 +116,7 @@ class AutofillMonitor {
|
|
|
117
116
|
}
|
|
118
117
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
119
118
|
minVersion: "12.0.0",
|
|
120
|
-
version: "22.0.0-next.
|
|
119
|
+
version: "22.0.0-next.6",
|
|
121
120
|
ngImport: i0,
|
|
122
121
|
type: AutofillMonitor,
|
|
123
122
|
deps: [],
|
|
@@ -125,7 +124,7 @@ class AutofillMonitor {
|
|
|
125
124
|
});
|
|
126
125
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
127
126
|
minVersion: "12.0.0",
|
|
128
|
-
version: "22.0.0-next.
|
|
127
|
+
version: "22.0.0-next.6",
|
|
129
128
|
ngImport: i0,
|
|
130
129
|
type: AutofillMonitor,
|
|
131
130
|
providedIn: 'root'
|
|
@@ -133,7 +132,7 @@ class AutofillMonitor {
|
|
|
133
132
|
}
|
|
134
133
|
i0.ɵɵngDeclareClassMetadata({
|
|
135
134
|
minVersion: "12.0.0",
|
|
136
|
-
version: "22.0.0-next.
|
|
135
|
+
version: "22.0.0-next.6",
|
|
137
136
|
ngImport: i0,
|
|
138
137
|
type: AutofillMonitor,
|
|
139
138
|
decorators: [{
|
|
@@ -141,14 +140,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
141
140
|
args: [{
|
|
142
141
|
providedIn: 'root'
|
|
143
142
|
}]
|
|
144
|
-
}]
|
|
145
|
-
ctorParameters: () => []
|
|
143
|
+
}]
|
|
146
144
|
});
|
|
147
145
|
class CdkAutofill {
|
|
148
146
|
_elementRef = inject(ElementRef);
|
|
149
147
|
_autofillMonitor = inject(AutofillMonitor);
|
|
150
148
|
cdkAutofill = new EventEmitter();
|
|
151
|
-
constructor() {}
|
|
152
149
|
ngOnInit() {
|
|
153
150
|
this._autofillMonitor.monitor(this._elementRef).subscribe(event => this.cdkAutofill.emit(event));
|
|
154
151
|
}
|
|
@@ -157,7 +154,7 @@ class CdkAutofill {
|
|
|
157
154
|
}
|
|
158
155
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
159
156
|
minVersion: "12.0.0",
|
|
160
|
-
version: "22.0.0-next.
|
|
157
|
+
version: "22.0.0-next.6",
|
|
161
158
|
ngImport: i0,
|
|
162
159
|
type: CdkAutofill,
|
|
163
160
|
deps: [],
|
|
@@ -165,7 +162,7 @@ class CdkAutofill {
|
|
|
165
162
|
});
|
|
166
163
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
167
164
|
minVersion: "14.0.0",
|
|
168
|
-
version: "22.0.0-next.
|
|
165
|
+
version: "22.0.0-next.6",
|
|
169
166
|
type: CdkAutofill,
|
|
170
167
|
isStandalone: true,
|
|
171
168
|
selector: "[cdkAutofill]",
|
|
@@ -177,7 +174,7 @@ class CdkAutofill {
|
|
|
177
174
|
}
|
|
178
175
|
i0.ɵɵngDeclareClassMetadata({
|
|
179
176
|
minVersion: "12.0.0",
|
|
180
|
-
version: "22.0.0-next.
|
|
177
|
+
version: "22.0.0-next.6",
|
|
181
178
|
ngImport: i0,
|
|
182
179
|
type: CdkAutofill,
|
|
183
180
|
decorators: [{
|
|
@@ -186,7 +183,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
186
183
|
selector: '[cdkAutofill]'
|
|
187
184
|
}]
|
|
188
185
|
}],
|
|
189
|
-
ctorParameters: () => [],
|
|
190
186
|
propDecorators: {
|
|
191
187
|
cdkAutofill: [{
|
|
192
188
|
type: Output
|
|
@@ -390,7 +386,7 @@ class CdkTextareaAutosize {
|
|
|
390
386
|
}
|
|
391
387
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
392
388
|
minVersion: "12.0.0",
|
|
393
|
-
version: "22.0.0-next.
|
|
389
|
+
version: "22.0.0-next.6",
|
|
394
390
|
ngImport: i0,
|
|
395
391
|
type: CdkTextareaAutosize,
|
|
396
392
|
deps: [],
|
|
@@ -398,7 +394,7 @@ class CdkTextareaAutosize {
|
|
|
398
394
|
});
|
|
399
395
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
400
396
|
minVersion: "16.1.0",
|
|
401
|
-
version: "22.0.0-next.
|
|
397
|
+
version: "22.0.0-next.6",
|
|
402
398
|
type: CdkTextareaAutosize,
|
|
403
399
|
isStandalone: true,
|
|
404
400
|
selector: "textarea[cdkTextareaAutosize]",
|
|
@@ -423,7 +419,7 @@ class CdkTextareaAutosize {
|
|
|
423
419
|
}
|
|
424
420
|
i0.ɵɵngDeclareClassMetadata({
|
|
425
421
|
minVersion: "12.0.0",
|
|
426
|
-
version: "22.0.0-next.
|
|
422
|
+
version: "22.0.0-next.6",
|
|
427
423
|
ngImport: i0,
|
|
428
424
|
type: CdkTextareaAutosize,
|
|
429
425
|
decorators: [{
|
|
@@ -464,7 +460,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
464
460
|
class TextFieldModule {
|
|
465
461
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
466
462
|
minVersion: "12.0.0",
|
|
467
|
-
version: "22.0.0-next.
|
|
463
|
+
version: "22.0.0-next.6",
|
|
468
464
|
ngImport: i0,
|
|
469
465
|
type: TextFieldModule,
|
|
470
466
|
deps: [],
|
|
@@ -472,7 +468,7 @@ class TextFieldModule {
|
|
|
472
468
|
});
|
|
473
469
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
474
470
|
minVersion: "14.0.0",
|
|
475
|
-
version: "22.0.0-next.
|
|
471
|
+
version: "22.0.0-next.6",
|
|
476
472
|
ngImport: i0,
|
|
477
473
|
type: TextFieldModule,
|
|
478
474
|
imports: [CdkAutofill, CdkTextareaAutosize],
|
|
@@ -480,14 +476,14 @@ class TextFieldModule {
|
|
|
480
476
|
});
|
|
481
477
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
482
478
|
minVersion: "12.0.0",
|
|
483
|
-
version: "22.0.0-next.
|
|
479
|
+
version: "22.0.0-next.6",
|
|
484
480
|
ngImport: i0,
|
|
485
481
|
type: TextFieldModule
|
|
486
482
|
});
|
|
487
483
|
}
|
|
488
484
|
i0.ɵɵngDeclareClassMetadata({
|
|
489
485
|
minVersion: "12.0.0",
|
|
490
|
-
version: "22.0.0-next.
|
|
486
|
+
version: "22.0.0-next.6",
|
|
491
487
|
ngImport: i0,
|
|
492
488
|
type: TextFieldModule,
|
|
493
489
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/text-field-style-loader.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/autofill.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/autosize.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n/** Component used to load the structural styles of the text field. */\n@Component({\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: 'text-field-prebuilt.css',\n host: {'cdk-text-field-style-loader': ''},\n})\nexport class _CdkTextFieldStyleLoader {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Platform} from '../platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n RendererFactory2,\n} from '@angular/core';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {coerceElement} from '../coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n readonly subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = {passive: true};\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(RendererFactory2).createRenderer(null, null);\n\n private _styleLoader = inject(_CdkPrivateStyleLoader);\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n this._styleLoader.load(_CdkTextFieldStyleLoader);\n\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject;\n }\n\n const subject = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = (event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (\n event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)\n ) {\n element.classList.add(cssClass);\n this._ngZone.run(() => subject.next({target: event.target as Element, isAutofilled: true}));\n } else if (\n event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)\n ) {\n element.classList.remove(cssClass);\n this._ngZone.run(() =>\n subject.next({target: event.target as Element, isAutofilled: false}),\n );\n }\n };\n\n const unlisten = this._ngZone.runOutsideAngular(() => {\n element.classList.add('cdk-text-field-autofill-monitored');\n return this._renderer.listen(element, 'animationstart', listener, listenerOptions);\n });\n\n this._monitoredElements.set(element, {subject, unlisten});\n return subject;\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _autofillMonitor = inject(AutofillMonitor);\n\n /** Emits when the autofill state of the element changes. */\n @Output() readonly cdkAutofill = new EventEmitter<AutofillEvent>();\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NumberInput, coerceNumberProperty} from '../coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n booleanAttribute,\n inject,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {Platform} from '../platform';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {auditTime} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(Renderer2);\n private _resizeEvents = new Subject<void>();\n\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | undefined;\n private readonly _destroyed = new Subject<void>();\n private _listenerCleanups: (() => void)[] | undefined;\n\n private _minRows!: number;\n private _maxRows!: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number {\n return this._minRows;\n }\n set minRows(value: NumberInput) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number {\n return this._maxRows;\n }\n set maxRows(value: NumberInput) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input({alias: 'cdkTextareaAutosize', transform: booleanAttribute})\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: boolean) {\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n @Input()\n get placeholder(): string {\n return this._textareaElement.placeholder;\n }\n set placeholder(value: string) {\n this._cachedPlaceholderHeight = undefined;\n\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n } else {\n this._textareaElement.removeAttribute('placeholder');\n }\n\n this._cacheTextareaPlaceholderHeight();\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight?: number;\n /** Cached height of a textarea with only the placeholder. */\n private _cachedPlaceholderHeight?: number;\n\n /** Used to reference correct document/window */\n protected _document = inject(DOCUMENT);\n\n private _hasFocus = false;\n\n private _isViewInited = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_CdkTextFieldStyleLoader);\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight =\n this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight =\n this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n this._listenerCleanups = [\n this._renderer.listen('window', 'resize', () => this._resizeEvents.next()),\n this._renderer.listen(this._textareaElement, 'focus', this._handleFocusEvent),\n this._renderer.listen(this._textareaElement, 'blur', this._handleFocusEvent),\n ];\n this._resizeEvents.pipe(auditTime(16)).subscribe(() => {\n // Clear the cached heights since the styles can change\n // when the window is resized (e.g. by media queries).\n this._cachedLineHeight = this._cachedPlaceholderHeight = undefined;\n this.resizeToFitContent(true);\n });\n });\n\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n\n ngOnDestroy() {\n this._listenerCleanups?.forEach(cleanup => cleanup());\n this._resizeEvents.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n const textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n const cloneStyles = textareaClone.style;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n cloneStyles.position = 'absolute';\n cloneStyles.visibility = 'hidden';\n cloneStyles.border = 'none';\n cloneStyles.padding = '0';\n cloneStyles.height = '';\n cloneStyles.minHeight = '';\n cloneStyles.maxHeight = '';\n\n // App styles might be messing with the height through the positioning properties.\n cloneStyles.top = cloneStyles.bottom = cloneStyles.left = cloneStyles.right = 'auto';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n cloneStyles.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n private _measureScrollHeight(): number {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n\n // In some cases the page might move around while we're measuring the `textarea`. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233 and #23834.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n\n return scrollHeight;\n }\n\n private _cacheTextareaPlaceholderHeight(): void {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n\n const value = this._textareaElement.value;\n\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n\n /** Handles `focus` and `blur` events. */\n private _handleFocusEvent = (event: FocusEvent) => {\n this._hasFocus = event.type === 'focus';\n };\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n } else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n imports: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["_CdkTextFieldStyleLoader","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","template","host","listenerOptions","passive","AutofillMonitor","_platform","inject","Platform","_ngZone","NgZone","_renderer","RendererFactory2","createRenderer","_styleLoader","_CdkPrivateStyleLoader","_monitoredElements","Map","constructor","monitor","elementOrRef","isBrowser","EMPTY","load","element","coerceElement","info","get","subject","Subject","cssClass","listener","event","animationName","classList","contains","add","run","next","isAutofilled","remove","unlisten","runOutsideAngular","listen","set","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","Injectable","ɵprov","ɵɵngDeclareInjectable","ngImport","providedIn","CdkAutofill","_elementRef","ElementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","isStandalone","selector","outputs","Output","CdkTextareaAutosize","Renderer2","_resizeEvents","_previousValue","_initialHeight","_destroyed","_listenerCleanups","_minRows","_maxRows","_enabled","_previousMinRows","_textareaElement","minRows","value","coerceNumberProperty","_setMinHeight","maxRows","_setMaxHeight","enabled","resizeToFitContent","reset","placeholder","_cachedPlaceholderHeight","undefined","setAttribute","removeAttribute","_cacheTextareaPlaceholderHeight","_cachedLineHeight","_document","DOCUMENT","_hasFocus","_isViewInited","styleLoader","nativeElement","minHeight","style","maxHeight","ngAfterViewInit","height","_handleFocusEvent","pipe","auditTime","cleanup","_cacheTextareaLineHeight","textareaClone","cloneNode","cloneStyles","rows","position","visibility","border","padding","top","bottom","left","right","overflow","parentNode","appendChild","clientHeight","_measureScrollHeight","previousMargin","marginBottom","isFirefox","FIREFOX","needsMarginFiller","measuringClass","scrollHeight","ngDoCheck","force","textarea","Math","max","requestAnimationFrame","_scrollToCaretPosition","setTimeout","_noopInputHandler","selectionStart","selectionEnd","isStopped","setSelectionRange","ɵdir","ɵɵngDeclareDirective","booleanAttribute","attributes","listeners","classAttribute","exportAs","Input","alias","transform","TextFieldModule","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","imports"],"mappings":";;;;;;;;;MAkBaA,wBAAwB,CAAA;;;;;UAAxBA,wBAAwB;AAAAC,IAAAA,IAAA,EAAA,EAA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;cAHhBzG,WAAW,EAAEc,mBAAmB,CAAA;AAAA+F,IAAAA,OAAA,EAAA,CAChC7G,WAAW,EAAEc,mBAAmB;AAAA,GAAA,CAAA;;;;;UAE/B2F;AAAe,GAAA,CAAA;;;;;;QAAfA,eAAe;AAAAlK,EAAAA,UAAA,EAAA,CAAA;UAJ3BmK,QAAQ;AAAClK,IAAAA,IAAA,EAAA,CAAA;AACRsK,MAAAA,OAAO,EAAE,CAAC9G,WAAW,EAAEc,mBAAmB,CAAC;AAC3C+F,MAAAA,OAAO,EAAE,CAAC7G,WAAW,EAAEc,mBAAmB;KAC3C;;;;;;"}
|
|
1
|
+
{"version":3,"file":"text-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/text-field-style-loader.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/autofill.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/autosize.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n/** Component used to load the structural styles of the text field. */\n@Component({\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: 'text-field-prebuilt.css',\n host: {'cdk-text-field-style-loader': ''},\n})\nexport class _CdkTextFieldStyleLoader {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Platform} from '../platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n RendererFactory2,\n} from '@angular/core';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {coerceElement} from '../coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n readonly subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = {passive: true};\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(RendererFactory2).createRenderer(null, null);\n\n private _styleLoader = inject(_CdkPrivateStyleLoader);\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n this._styleLoader.load(_CdkTextFieldStyleLoader);\n\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject;\n }\n\n const subject = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = (event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (\n event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)\n ) {\n element.classList.add(cssClass);\n this._ngZone.run(() => subject.next({target: event.target as Element, isAutofilled: true}));\n } else if (\n event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)\n ) {\n element.classList.remove(cssClass);\n this._ngZone.run(() =>\n subject.next({target: event.target as Element, isAutofilled: false}),\n );\n }\n };\n\n const unlisten = this._ngZone.runOutsideAngular(() => {\n element.classList.add('cdk-text-field-autofill-monitored');\n return this._renderer.listen(element, 'animationstart', listener, listenerOptions);\n });\n\n this._monitoredElements.set(element, {subject, unlisten});\n return subject;\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _autofillMonitor = inject(AutofillMonitor);\n\n /** Emits when the autofill state of the element changes. */\n @Output() readonly cdkAutofill = new EventEmitter<AutofillEvent>();\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NumberInput, coerceNumberProperty} from '../coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n booleanAttribute,\n inject,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {Platform} from '../platform';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {auditTime} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(Renderer2);\n private _resizeEvents = new Subject<void>();\n\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | undefined;\n private readonly _destroyed = new Subject<void>();\n private _listenerCleanups: (() => void)[] | undefined;\n\n private _minRows!: number;\n private _maxRows!: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number {\n return this._minRows;\n }\n set minRows(value: NumberInput) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number {\n return this._maxRows;\n }\n set maxRows(value: NumberInput) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input({alias: 'cdkTextareaAutosize', transform: booleanAttribute})\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: boolean) {\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n @Input()\n get placeholder(): string {\n return this._textareaElement.placeholder;\n }\n set placeholder(value: string) {\n this._cachedPlaceholderHeight = undefined;\n\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n } else {\n this._textareaElement.removeAttribute('placeholder');\n }\n\n this._cacheTextareaPlaceholderHeight();\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight?: number;\n /** Cached height of a textarea with only the placeholder. */\n private _cachedPlaceholderHeight?: number;\n\n /** Used to reference correct document/window */\n protected _document = inject(DOCUMENT);\n\n private _hasFocus = false;\n\n private _isViewInited = false;\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_CdkTextFieldStyleLoader);\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight =\n this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight =\n this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n this._listenerCleanups = [\n this._renderer.listen('window', 'resize', () => this._resizeEvents.next()),\n this._renderer.listen(this._textareaElement, 'focus', this._handleFocusEvent),\n this._renderer.listen(this._textareaElement, 'blur', this._handleFocusEvent),\n ];\n this._resizeEvents.pipe(auditTime(16)).subscribe(() => {\n // Clear the cached heights since the styles can change\n // when the window is resized (e.g. by media queries).\n this._cachedLineHeight = this._cachedPlaceholderHeight = undefined;\n this.resizeToFitContent(true);\n });\n });\n\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n\n ngOnDestroy() {\n this._listenerCleanups?.forEach(cleanup => cleanup());\n this._resizeEvents.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n const textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n const cloneStyles = textareaClone.style;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n cloneStyles.position = 'absolute';\n cloneStyles.visibility = 'hidden';\n cloneStyles.border = 'none';\n cloneStyles.padding = '0';\n cloneStyles.height = '';\n cloneStyles.minHeight = '';\n cloneStyles.maxHeight = '';\n\n // App styles might be messing with the height through the positioning properties.\n cloneStyles.top = cloneStyles.bottom = cloneStyles.left = cloneStyles.right = 'auto';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n cloneStyles.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n private _measureScrollHeight(): number {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n\n // In some cases the page might move around while we're measuring the `textarea`. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233 and #23834.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n\n return scrollHeight;\n }\n\n private _cacheTextareaPlaceholderHeight(): void {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n\n const value = this._textareaElement.value;\n\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n\n /** Handles `focus` and `blur` events. */\n private _handleFocusEvent = (event: FocusEvent) => {\n this._hasFocus = event.type === 'focus';\n };\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n } else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n imports: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["_CdkTextFieldStyleLoader","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","template","host","listenerOptions","passive","AutofillMonitor","_platform","inject","Platform","_ngZone","NgZone","_renderer","RendererFactory2","createRenderer","_styleLoader","_CdkPrivateStyleLoader","_monitoredElements","Map","monitor","elementOrRef","isBrowser","EMPTY","load","element","coerceElement","info","get","subject","Subject","cssClass","listener","event","animationName","classList","contains","add","run","next","isAutofilled","remove","unlisten","runOutsideAngular","listen","set","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","Injectable","ɵprov","ɵɵngDeclareInjectable","ngImport","providedIn","CdkAutofill","_elementRef","ElementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","isStandalone","selector","outputs","Output","CdkTextareaAutosize","Renderer2","_resizeEvents","_previousValue","_initialHeight","_destroyed","_listenerCleanups","_minRows","_maxRows","_enabled","_previousMinRows","_textareaElement","minRows","value","coerceNumberProperty","_setMinHeight","maxRows","_setMaxHeight","enabled","resizeToFitContent","reset","placeholder","_cachedPlaceholderHeight","undefined","setAttribute","removeAttribute","_cacheTextareaPlaceholderHeight","_cachedLineHeight","_document","DOCUMENT","_hasFocus","_isViewInited","constructor","styleLoader","nativeElement","minHeight","style","maxHeight","ngAfterViewInit","height","_handleFocusEvent","pipe","auditTime","cleanup","_cacheTextareaLineHeight","textareaClone","cloneNode","cloneStyles","rows","position","visibility","border","padding","top","bottom","left","right","overflow","parentNode","appendChild","clientHeight","_measureScrollHeight","previousMargin","marginBottom","isFirefox","FIREFOX","needsMarginFiller","measuringClass","scrollHeight","ngDoCheck","force","textarea","Math","max","requestAnimationFrame","_scrollToCaretPosition","setTimeout","_noopInputHandler","selectionStart","selectionEnd","isStopped","setSelectionRange","ɵdir","ɵɵngDeclareDirective","booleanAttribute","attributes","listeners","classAttribute","exportAs","Input","alias","transform","TextFieldModule","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","imports"],"mappings":";;;;;;;;;MAkBaA,wBAAwB,CAAA;;;;;UAAxBA,wBAAwB;AAAAC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;AAAxB,EAAA,OAAAC,IAAA,GAAAH,EAAA,CAAAI,oBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAC,IAAAA,IAAA,EAAAV,wBAAwB;;;;;;;;;cANzB,EAAE;AAAAW,IAAAA,QAAA,EAAA,IAAA;IAAAC,MAAA,EAAA,CAAA,2sBAAA,CAAA;AAAAC,IAAAA,eAAA,EAAAV,EAAA,CAAAW,uBAAA,CAAAC,MAAA;AAAAC,IAAAA,aAAA,EAAAb,EAAA,CAAAc,iBAAA,CAAAC;AAAA,GAAA,CAAA;;;;;;QAMDlB,wBAAwB;AAAAmB,EAAAA,UAAA,EAAA,CAAA;UAPpCd,SAAS;AACEe,IAAAA,IAAA,EAAA,CAAA;AAAAC,MAAAA,QAAA,EAAA,EAAE;MAAAR,eAAA,EACKC,uBAAuB,CAACC,MAAM;MAAAC,aAAA,EAChCC,iBAAiB,CAACC,IAAI;AAAAI,MA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;aAAC,oBAAoB;;;YAU1BA,KAAK;AAAC9J,MAAAA,IAAA,EAAA,CAAA;AAAC+J,QAAAA,KAAK,EAAE,qBAAqB;AAAEC,QAAAA,SAAS,EAAEP;OAAiB;;;YAYjEK;;;;;MCpFUG,eAAe,CAAA;;;;;UAAfA,eAAe;AAAApL,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAkL;AAAA,GAAA,CAAA;AAAf,EAAA,OAAAC,IAAA,GAAApL,EAAA,CAAAqL,mBAAA,CAAA;AAAAhL,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAgE,IAAAA,QAAA,EAAAtE,EAAA;AAAAO,IAAAA,IAAA,EAAA2K,eAAe;cAHhB1G,WAAW,EAAEc,mBAAmB,CAAA;AAAAgG,IAAAA,OAAA,EAAA,CAChC9G,WAAW,EAAEc,mBAAmB;AAAA,GAAA,CAAA;;;;;UAE/B4F;AAAe,GAAA,CAAA;;;;;;QAAfA,eAAe;AAAAlK,EAAAA,UAAA,EAAA,CAAA;UAJ3BmK,QAAQ;AAAClK,IAAAA,IAAA,EAAA,CAAA;AACRsK,MAAAA,OAAO,EAAE,CAAC/G,WAAW,EAAEc,mBAAmB,CAAC;AAC3CgG,MAAAA,OAAO,EAAE,CAAC9G,WAAW,EAAEc,mBAAmB;KAC3C;;;;;;"}
|
package/fesm2022/tree.mjs
CHANGED
|
@@ -3,10 +3,10 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { InjectionToken, inject, ViewContainerRef, Directive, TemplateRef, IterableDiffers, ChangeDetectorRef, ElementRef, EventEmitter, booleanAttribute, numberAttribute, ContentChildren, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, Output, NgModule } from '@angular/core';
|
|
4
4
|
import { take, filter, takeUntil, startWith, tap, switchMap, map, reduce, concatMap, distinctUntilChanged } from 'rxjs/operators';
|
|
5
5
|
import { isObservable, Subject, BehaviorSubject, of, combineLatest, EMPTY, concat } from 'rxjs';
|
|
6
|
-
import { TREE_KEY_MANAGER } from './_tree-key-manager-chunk.mjs';
|
|
7
6
|
import { Directionality } from './_directionality-chunk.mjs';
|
|
8
|
-
import {
|
|
7
|
+
import { TREE_KEY_MANAGER } from './_tree-key-manager-chunk.mjs';
|
|
9
8
|
import { coerceObservable } from './coercion-private.mjs';
|
|
9
|
+
import { isDataSource } from './_data-source-chunk.mjs';
|
|
10
10
|
import './_typeahead-chunk.mjs';
|
|
11
11
|
import './_keycodes-chunk.mjs';
|
|
12
12
|
|
|
@@ -121,10 +121,9 @@ class CdkTreeNodeOutlet {
|
|
|
121
121
|
_node = inject(CDK_TREE_NODE_OUTLET_NODE, {
|
|
122
122
|
optional: true
|
|
123
123
|
});
|
|
124
|
-
constructor() {}
|
|
125
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
126
125
|
minVersion: "12.0.0",
|
|
127
|
-
version: "22.0.0-next.
|
|
126
|
+
version: "22.0.0-next.6",
|
|
128
127
|
ngImport: i0,
|
|
129
128
|
type: CdkTreeNodeOutlet,
|
|
130
129
|
deps: [],
|
|
@@ -132,7 +131,7 @@ class CdkTreeNodeOutlet {
|
|
|
132
131
|
});
|
|
133
132
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
134
133
|
minVersion: "14.0.0",
|
|
135
|
-
version: "22.0.0-next.
|
|
134
|
+
version: "22.0.0-next.6",
|
|
136
135
|
type: CdkTreeNodeOutlet,
|
|
137
136
|
isStandalone: true,
|
|
138
137
|
selector: "[cdkTreeNodeOutlet]",
|
|
@@ -141,7 +140,7 @@ class CdkTreeNodeOutlet {
|
|
|
141
140
|
}
|
|
142
141
|
i0.ɵɵngDeclareClassMetadata({
|
|
143
142
|
minVersion: "12.0.0",
|
|
144
|
-
version: "22.0.0-next.
|
|
143
|
+
version: "22.0.0-next.6",
|
|
145
144
|
ngImport: i0,
|
|
146
145
|
type: CdkTreeNodeOutlet,
|
|
147
146
|
decorators: [{
|
|
@@ -149,8 +148,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
149
148
|
args: [{
|
|
150
149
|
selector: '[cdkTreeNodeOutlet]'
|
|
151
150
|
}]
|
|
152
|
-
}]
|
|
153
|
-
ctorParameters: () => []
|
|
151
|
+
}]
|
|
154
152
|
});
|
|
155
153
|
|
|
156
154
|
class CdkTreeNodeOutletContext {
|
|
@@ -165,10 +163,9 @@ class CdkTreeNodeOutletContext {
|
|
|
165
163
|
class CdkTreeNodeDef {
|
|
166
164
|
template = inject(TemplateRef);
|
|
167
165
|
when;
|
|
168
|
-
constructor() {}
|
|
169
166
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
170
167
|
minVersion: "12.0.0",
|
|
171
|
-
version: "22.0.0-next.
|
|
168
|
+
version: "22.0.0-next.6",
|
|
172
169
|
ngImport: i0,
|
|
173
170
|
type: CdkTreeNodeDef,
|
|
174
171
|
deps: [],
|
|
@@ -176,7 +173,7 @@ class CdkTreeNodeDef {
|
|
|
176
173
|
});
|
|
177
174
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
178
175
|
minVersion: "14.0.0",
|
|
179
|
-
version: "22.0.0-next.
|
|
176
|
+
version: "22.0.0-next.6",
|
|
180
177
|
type: CdkTreeNodeDef,
|
|
181
178
|
isStandalone: true,
|
|
182
179
|
selector: "[cdkTreeNodeDef]",
|
|
@@ -188,7 +185,7 @@ class CdkTreeNodeDef {
|
|
|
188
185
|
}
|
|
189
186
|
i0.ɵɵngDeclareClassMetadata({
|
|
190
187
|
minVersion: "12.0.0",
|
|
191
|
-
version: "22.0.0-next.
|
|
188
|
+
version: "22.0.0-next.6",
|
|
192
189
|
ngImport: i0,
|
|
193
190
|
type: CdkTreeNodeDef,
|
|
194
191
|
decorators: [{
|
|
@@ -200,8 +197,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
200
197
|
alias: 'cdkTreeNodeDefWhen'
|
|
201
198
|
}]
|
|
202
199
|
}]
|
|
203
|
-
}]
|
|
204
|
-
ctorParameters: () => []
|
|
200
|
+
}]
|
|
205
201
|
});
|
|
206
202
|
|
|
207
203
|
function getTreeNoValidDataSourceError() {
|
|
@@ -260,7 +256,6 @@ class CdkTree {
|
|
|
260
256
|
_keyManagerFactory = inject(TREE_KEY_MANAGER);
|
|
261
257
|
_keyManager;
|
|
262
258
|
_viewInit = false;
|
|
263
|
-
constructor() {}
|
|
264
259
|
ngAfterContentInit() {
|
|
265
260
|
this._initializeKeyManager();
|
|
266
261
|
}
|
|
@@ -821,7 +816,7 @@ class CdkTree {
|
|
|
821
816
|
}
|
|
822
817
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
823
818
|
minVersion: "12.0.0",
|
|
824
|
-
version: "22.0.0-next.
|
|
819
|
+
version: "22.0.0-next.6",
|
|
825
820
|
ngImport: i0,
|
|
826
821
|
type: CdkTree,
|
|
827
822
|
deps: [],
|
|
@@ -829,7 +824,7 @@ class CdkTree {
|
|
|
829
824
|
});
|
|
830
825
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
831
826
|
minVersion: "14.0.0",
|
|
832
|
-
version: "22.0.0-next.
|
|
827
|
+
version: "22.0.0-next.6",
|
|
833
828
|
type: CdkTree,
|
|
834
829
|
isStandalone: true,
|
|
835
830
|
selector: "cdk-tree",
|
|
@@ -877,7 +872,7 @@ class CdkTree {
|
|
|
877
872
|
}
|
|
878
873
|
i0.ɵɵngDeclareClassMetadata({
|
|
879
874
|
minVersion: "12.0.0",
|
|
880
|
-
version: "22.0.0-next.
|
|
875
|
+
version: "22.0.0-next.6",
|
|
881
876
|
ngImport: i0,
|
|
882
877
|
type: CdkTree,
|
|
883
878
|
decorators: [{
|
|
@@ -896,7 +891,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
896
891
|
imports: [CdkTreeNodeOutlet]
|
|
897
892
|
}]
|
|
898
893
|
}],
|
|
899
|
-
ctorParameters: () => [],
|
|
900
894
|
propDecorators: {
|
|
901
895
|
dataSource: [{
|
|
902
896
|
type: Input
|
|
@@ -1094,7 +1088,7 @@ class CdkTreeNode {
|
|
|
1094
1088
|
}
|
|
1095
1089
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1096
1090
|
minVersion: "12.0.0",
|
|
1097
|
-
version: "22.0.0-next.
|
|
1091
|
+
version: "22.0.0-next.6",
|
|
1098
1092
|
ngImport: i0,
|
|
1099
1093
|
type: CdkTreeNode,
|
|
1100
1094
|
deps: [],
|
|
@@ -1102,7 +1096,7 @@ class CdkTreeNode {
|
|
|
1102
1096
|
});
|
|
1103
1097
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1104
1098
|
minVersion: "16.1.0",
|
|
1105
|
-
version: "22.0.0-next.
|
|
1099
|
+
version: "22.0.0-next.6",
|
|
1106
1100
|
type: CdkTreeNode,
|
|
1107
1101
|
isStandalone: true,
|
|
1108
1102
|
selector: "cdk-tree-node",
|
|
@@ -1140,7 +1134,7 @@ class CdkTreeNode {
|
|
|
1140
1134
|
}
|
|
1141
1135
|
i0.ɵɵngDeclareClassMetadata({
|
|
1142
1136
|
minVersion: "12.0.0",
|
|
1143
|
-
version: "22.0.0-next.
|
|
1137
|
+
version: "22.0.0-next.6",
|
|
1144
1138
|
ngImport: i0,
|
|
1145
1139
|
type: CdkTreeNode,
|
|
1146
1140
|
decorators: [{
|
|
@@ -1221,9 +1215,6 @@ class CdkNestedTreeNode extends CdkTreeNode {
|
|
|
1221
1215
|
_dataDiffer;
|
|
1222
1216
|
_children;
|
|
1223
1217
|
nodeOutlet;
|
|
1224
|
-
constructor() {
|
|
1225
|
-
super();
|
|
1226
|
-
}
|
|
1227
1218
|
ngAfterContentInit() {
|
|
1228
1219
|
this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);
|
|
1229
1220
|
this._tree._getDirectChildren(this.data).pipe(takeUntil(this._destroyed)).subscribe(result => this.updateChildrenNodes(result));
|
|
@@ -1258,15 +1249,15 @@ class CdkNestedTreeNode extends CdkTreeNode {
|
|
|
1258
1249
|
}
|
|
1259
1250
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1260
1251
|
minVersion: "12.0.0",
|
|
1261
|
-
version: "22.0.0-next.
|
|
1252
|
+
version: "22.0.0-next.6",
|
|
1262
1253
|
ngImport: i0,
|
|
1263
1254
|
type: CdkNestedTreeNode,
|
|
1264
|
-
deps:
|
|
1255
|
+
deps: null,
|
|
1265
1256
|
target: i0.ɵɵFactoryTarget.Directive
|
|
1266
1257
|
});
|
|
1267
1258
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1268
1259
|
minVersion: "14.0.0",
|
|
1269
|
-
version: "22.0.0-next.
|
|
1260
|
+
version: "22.0.0-next.6",
|
|
1270
1261
|
type: CdkNestedTreeNode,
|
|
1271
1262
|
isStandalone: true,
|
|
1272
1263
|
selector: "cdk-nested-tree-node",
|
|
@@ -1292,7 +1283,7 @@ class CdkNestedTreeNode extends CdkTreeNode {
|
|
|
1292
1283
|
}
|
|
1293
1284
|
i0.ɵɵngDeclareClassMetadata({
|
|
1294
1285
|
minVersion: "12.0.0",
|
|
1295
|
-
version: "22.0.0-next.
|
|
1286
|
+
version: "22.0.0-next.6",
|
|
1296
1287
|
ngImport: i0,
|
|
1297
1288
|
type: CdkNestedTreeNode,
|
|
1298
1289
|
decorators: [{
|
|
@@ -1312,7 +1303,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1312
1303
|
}
|
|
1313
1304
|
}]
|
|
1314
1305
|
}],
|
|
1315
|
-
ctorParameters: () => [],
|
|
1316
1306
|
propDecorators: {
|
|
1317
1307
|
nodeOutlet: [{
|
|
1318
1308
|
type: ContentChildren,
|
|
@@ -1391,7 +1381,7 @@ class CdkTreeNodePadding {
|
|
|
1391
1381
|
}
|
|
1392
1382
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1393
1383
|
minVersion: "12.0.0",
|
|
1394
|
-
version: "22.0.0-next.
|
|
1384
|
+
version: "22.0.0-next.6",
|
|
1395
1385
|
ngImport: i0,
|
|
1396
1386
|
type: CdkTreeNodePadding,
|
|
1397
1387
|
deps: [],
|
|
@@ -1399,7 +1389,7 @@ class CdkTreeNodePadding {
|
|
|
1399
1389
|
});
|
|
1400
1390
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1401
1391
|
minVersion: "16.1.0",
|
|
1402
|
-
version: "22.0.0-next.
|
|
1392
|
+
version: "22.0.0-next.6",
|
|
1403
1393
|
type: CdkTreeNodePadding,
|
|
1404
1394
|
isStandalone: true,
|
|
1405
1395
|
selector: "[cdkTreeNodePadding]",
|
|
@@ -1412,7 +1402,7 @@ class CdkTreeNodePadding {
|
|
|
1412
1402
|
}
|
|
1413
1403
|
i0.ɵɵngDeclareClassMetadata({
|
|
1414
1404
|
minVersion: "12.0.0",
|
|
1415
|
-
version: "22.0.0-next.
|
|
1405
|
+
version: "22.0.0-next.6",
|
|
1416
1406
|
ngImport: i0,
|
|
1417
1407
|
type: CdkTreeNodePadding,
|
|
1418
1408
|
decorators: [{
|
|
@@ -1441,14 +1431,13 @@ class CdkTreeNodeToggle {
|
|
|
1441
1431
|
_tree = inject(CdkTree);
|
|
1442
1432
|
_treeNode = inject(CdkTreeNode);
|
|
1443
1433
|
recursive = false;
|
|
1444
|
-
constructor() {}
|
|
1445
1434
|
_toggle() {
|
|
1446
1435
|
this.recursive ? this._tree.toggleDescendants(this._treeNode.data) : this._tree.toggle(this._treeNode.data);
|
|
1447
1436
|
this._tree._keyManager.focusItem(this._treeNode);
|
|
1448
1437
|
}
|
|
1449
1438
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1450
1439
|
minVersion: "12.0.0",
|
|
1451
|
-
version: "22.0.0-next.
|
|
1440
|
+
version: "22.0.0-next.6",
|
|
1452
1441
|
ngImport: i0,
|
|
1453
1442
|
type: CdkTreeNodeToggle,
|
|
1454
1443
|
deps: [],
|
|
@@ -1456,7 +1445,7 @@ class CdkTreeNodeToggle {
|
|
|
1456
1445
|
});
|
|
1457
1446
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1458
1447
|
minVersion: "16.1.0",
|
|
1459
|
-
version: "22.0.0-next.
|
|
1448
|
+
version: "22.0.0-next.6",
|
|
1460
1449
|
type: CdkTreeNodeToggle,
|
|
1461
1450
|
isStandalone: true,
|
|
1462
1451
|
selector: "[cdkTreeNodeToggle]",
|
|
@@ -1478,7 +1467,7 @@ class CdkTreeNodeToggle {
|
|
|
1478
1467
|
}
|
|
1479
1468
|
i0.ɵɵngDeclareClassMetadata({
|
|
1480
1469
|
minVersion: "12.0.0",
|
|
1481
|
-
version: "22.0.0-next.
|
|
1470
|
+
version: "22.0.0-next.6",
|
|
1482
1471
|
ngImport: i0,
|
|
1483
1472
|
type: CdkTreeNodeToggle,
|
|
1484
1473
|
decorators: [{
|
|
@@ -1493,7 +1482,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1493
1482
|
}
|
|
1494
1483
|
}]
|
|
1495
1484
|
}],
|
|
1496
|
-
ctorParameters: () => [],
|
|
1497
1485
|
propDecorators: {
|
|
1498
1486
|
recursive: [{
|
|
1499
1487
|
type: Input,
|
|
@@ -1509,7 +1497,7 @@ const EXPORTED_DECLARATIONS = [CdkNestedTreeNode, CdkTreeNodeDef, CdkTreeNodePad
|
|
|
1509
1497
|
class CdkTreeModule {
|
|
1510
1498
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1511
1499
|
minVersion: "12.0.0",
|
|
1512
|
-
version: "22.0.0-next.
|
|
1500
|
+
version: "22.0.0-next.6",
|
|
1513
1501
|
ngImport: i0,
|
|
1514
1502
|
type: CdkTreeModule,
|
|
1515
1503
|
deps: [],
|
|
@@ -1517,7 +1505,7 @@ class CdkTreeModule {
|
|
|
1517
1505
|
});
|
|
1518
1506
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1519
1507
|
minVersion: "14.0.0",
|
|
1520
|
-
version: "22.0.0-next.
|
|
1508
|
+
version: "22.0.0-next.6",
|
|
1521
1509
|
ngImport: i0,
|
|
1522
1510
|
type: CdkTreeModule,
|
|
1523
1511
|
imports: [CdkNestedTreeNode, CdkTreeNodeDef, CdkTreeNodePadding, CdkTreeNodeToggle, CdkTree, CdkTreeNode, CdkTreeNodeOutlet],
|
|
@@ -1525,14 +1513,14 @@ class CdkTreeModule {
|
|
|
1525
1513
|
});
|
|
1526
1514
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
1527
1515
|
minVersion: "12.0.0",
|
|
1528
|
-
version: "22.0.0-next.
|
|
1516
|
+
version: "22.0.0-next.6",
|
|
1529
1517
|
ngImport: i0,
|
|
1530
1518
|
type: CdkTreeModule
|
|
1531
1519
|
});
|
|
1532
1520
|
}
|
|
1533
1521
|
i0.ɵɵngDeclareClassMetadata({
|
|
1534
1522
|
minVersion: "12.0.0",
|
|
1535
|
-
version: "22.0.0-next.
|
|
1523
|
+
version: "22.0.0-next.6",
|
|
1536
1524
|
ngImport: i0,
|
|
1537
1525
|
type: CdkTreeModule,
|
|
1538
1526
|
decorators: [{
|