@angular/cdk 21.0.0-next.1 → 21.0.0-next.10
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 +7 -7
- package/_adev_assets/cdk_testing.json +6 -16
- package/fesm2022/{a11y-module.mjs → _a11y-module-chunk.mjs} +8 -16
- package/fesm2022/_a11y-module-chunk.mjs.map +1 -0
- package/fesm2022/{activedescendant-key-manager.mjs → _activedescendant-key-manager-chunk.mjs} +2 -2
- package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -0
- package/fesm2022/{array.mjs → _array-chunk.mjs} +1 -1
- package/fesm2022/_array-chunk.mjs.map +1 -0
- package/fesm2022/{breakpoints-observer.mjs → _breakpoints-observer-chunk.mjs} +3 -3
- package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -0
- package/fesm2022/{css-pixel-value.mjs → _css-pixel-value-chunk.mjs} +1 -1
- package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -0
- package/fesm2022/{data-source.mjs → _data-source-chunk.mjs} +1 -1
- package/fesm2022/_data-source-chunk.mjs.map +1 -0
- package/fesm2022/{directionality.mjs → _directionality-chunk.mjs} +2 -10
- package/fesm2022/_directionality-chunk.mjs.map +1 -0
- package/fesm2022/{dispose-view-repeater-strategy.mjs → _dispose-view-repeater-strategy-chunk.mjs} +2 -2
- package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -0
- package/fesm2022/{element.mjs → _element-chunk.mjs} +1 -1
- package/fesm2022/_element-chunk.mjs.map +1 -0
- package/fesm2022/{fake-event-detection.mjs → _fake-event-detection-chunk.mjs} +1 -1
- package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -0
- package/fesm2022/{focus-key-manager.mjs → _focus-key-manager-chunk.mjs} +2 -2
- package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -0
- package/fesm2022/{focus-monitor.mjs → _focus-monitor-chunk.mjs} +7 -7
- package/fesm2022/_focus-monitor-chunk.mjs.map +1 -0
- package/fesm2022/{id-generator.mjs → _id-generator-chunk.mjs} +1 -1
- package/fesm2022/_id-generator-chunk.mjs.map +1 -0
- package/fesm2022/{keycodes2.mjs → _keycodes-chunk.mjs} +1 -1
- package/fesm2022/_keycodes-chunk.mjs.map +1 -0
- package/fesm2022/{list-key-manager.mjs → _list-key-manager-chunk.mjs} +3 -3
- package/fesm2022/_list-key-manager-chunk.mjs.map +1 -0
- package/fesm2022/{overlay-module.mjs → _overlay-module-chunk.mjs} +73 -48
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -0
- package/fesm2022/{passive-listeners.mjs → _passive-listeners-chunk.mjs} +1 -1
- package/fesm2022/_passive-listeners-chunk.mjs.map +1 -0
- package/fesm2022/{platform2.mjs → _platform-chunk.mjs} +1 -1
- package/fesm2022/_platform-chunk.mjs.map +1 -0
- package/fesm2022/{recycle-view-repeater-strategy.mjs → _recycle-view-repeater-strategy-chunk.mjs} +2 -2
- package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -0
- package/fesm2022/{scrolling2.mjs → _scrolling-chunk.mjs} +2 -2
- package/fesm2022/_scrolling-chunk.mjs.map +1 -0
- package/fesm2022/{selection-model.mjs → _selection-model-chunk.mjs} +1 -1
- package/fesm2022/_selection-model-chunk.mjs.map +1 -0
- package/fesm2022/{shadow-dom.mjs → _shadow-dom-chunk.mjs} +1 -1
- package/fesm2022/_shadow-dom-chunk.mjs.map +1 -0
- package/fesm2022/{style-loader.mjs → _style-loader-chunk.mjs} +1 -1
- package/fesm2022/_style-loader-chunk.mjs.map +1 -0
- package/fesm2022/{test-environment.mjs → _test-environment-chunk.mjs} +1 -1
- package/fesm2022/_test-environment-chunk.mjs.map +1 -0
- package/fesm2022/{tree-key-manager.mjs → _tree-key-manager-chunk.mjs} +5 -22
- package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -0
- package/fesm2022/{typeahead.mjs → _typeahead-chunk.mjs} +2 -2
- package/fesm2022/_typeahead-chunk.mjs.map +1 -0
- package/fesm2022/{unique-selection-dispatcher.mjs → _unique-selection-dispatcher-chunk.mjs} +1 -1
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -0
- package/fesm2022/a11y.mjs +22 -40
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +2 -2
- package/fesm2022/bidi.mjs +2 -2
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/{coercion/private.mjs → coercion-private.mjs} +1 -1
- package/fesm2022/coercion-private.mjs.map +1 -0
- package/fesm2022/coercion.mjs +3 -3
- package/fesm2022/collections.mjs +5 -5
- package/fesm2022/dialog.mjs +20 -20
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +17 -21
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/keycodes.mjs +1 -1
- package/fesm2022/layout.mjs +3 -3
- package/fesm2022/listbox.mjs +9 -9
- package/fesm2022/menu.mjs +24 -26
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{observers/private.mjs → observers-private.mjs} +1 -1
- package/fesm2022/observers-private.mjs.map +1 -0
- package/fesm2022/observers.mjs +1 -1
- package/fesm2022/overlay.mjs +15 -15
- package/fesm2022/platform.mjs +5 -5
- package/fesm2022/portal.mjs +4 -57
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +1 -1
- package/fesm2022/scrolling.mjs +10 -12
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +7 -7
- package/fesm2022/table.mjs +16 -10
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/{testing/selenium-webdriver.mjs → testing-selenium-webdriver.mjs} +2 -2
- package/fesm2022/testing-selenium-webdriver.mjs.map +1 -0
- package/fesm2022/{testing/testbed.mjs → testing-testbed.mjs} +3 -3
- package/fesm2022/testing-testbed.mjs.map +1 -0
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs +3 -7
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +7 -7
- package/package.json +35 -34
- package/schematics/ng-add/index.js +1 -1
- package/{a11y-module.d.d.ts → types/_a11y-module-chunk.d.ts} +3 -9
- package/{activedescendant-key-manager.d.d.ts → types/_activedescendant-key-manager-chunk.d.ts} +1 -1
- package/{focus-key-manager.d.d.ts → types/_focus-key-manager-chunk.d.ts} +2 -2
- package/{harness-environment.d.d.ts → types/_harness-environment-chunk.d.ts} +1 -2
- package/{overlay-module.d.d.ts → types/_overlay-module-chunk.d.ts} +40 -12
- package/{portal-directives.d.d.ts → types/_portal-directives-chunk.d.ts} +2 -18
- package/{scrolling-module.d.d.ts → types/_scrolling-module-chunk.d.ts} +3 -3
- package/{a11y/index.d.ts → types/a11y.d.ts} +10 -41
- package/{accordion/index.d.ts → types/accordion.d.ts} +1 -1
- package/{bidi/index.d.ts → types/bidi.d.ts} +1 -1
- package/{coercion/index.d.ts → types/coercion.d.ts} +1 -1
- package/{collections/index.d.ts → types/collections.d.ts} +7 -7
- package/{dialog/index.d.ts → types/dialog.d.ts} +13 -13
- package/{drag-drop/index.d.ts → types/drag-drop.d.ts} +11 -11
- package/{listbox/index.d.ts → types/listbox.d.ts} +3 -3
- package/{menu/index.d.ts → types/menu.d.ts} +15 -17
- package/{observers/index.d.ts → types/observers.d.ts} +1 -1
- package/{overlay/index.d.ts → types/overlay.d.ts} +11 -11
- package/{platform/index.d.ts → types/platform.d.ts} +1 -1
- package/{portal/index.d.ts → types/portal.d.ts} +2 -2
- package/{private/index.d.ts → types/private.d.ts} +1 -1
- package/{scrolling/index.d.ts → types/scrolling.d.ts} +4 -4
- package/{stepper/index.d.ts → types/stepper.d.ts} +4 -4
- package/{table/index.d.ts → types/table.d.ts} +8 -6
- package/{testing/selenium-webdriver/index.d.ts → types/testing-selenium-webdriver.d.ts} +1 -1
- package/{testing/testbed/index.d.ts → types/testing-testbed.d.ts} +1 -1
- package/{testing/index.d.ts → types/testing.d.ts} +1 -1
- package/{text-field/index.d.ts → types/text-field.d.ts} +1 -3
- package/{tree/index.d.ts → types/tree.d.ts} +3 -3
- package/fesm2022/a11y-module.mjs.map +0 -1
- package/fesm2022/activedescendant-key-manager.mjs.map +0 -1
- package/fesm2022/array.mjs.map +0 -1
- package/fesm2022/breakpoints-observer.mjs.map +0 -1
- package/fesm2022/coercion/private.mjs.map +0 -1
- package/fesm2022/css-pixel-value.mjs.map +0 -1
- package/fesm2022/data-source.mjs.map +0 -1
- package/fesm2022/directionality.mjs.map +0 -1
- package/fesm2022/dispose-view-repeater-strategy.mjs.map +0 -1
- package/fesm2022/element.mjs.map +0 -1
- package/fesm2022/fake-event-detection.mjs.map +0 -1
- package/fesm2022/focus-key-manager.mjs.map +0 -1
- package/fesm2022/focus-monitor.mjs.map +0 -1
- package/fesm2022/id-generator.mjs.map +0 -1
- package/fesm2022/keycodes2.mjs.map +0 -1
- package/fesm2022/list-key-manager.mjs.map +0 -1
- package/fesm2022/observers/private.mjs.map +0 -1
- package/fesm2022/overlay-module.mjs.map +0 -1
- package/fesm2022/passive-listeners.mjs.map +0 -1
- package/fesm2022/platform2.mjs.map +0 -1
- package/fesm2022/recycle-view-repeater-strategy.mjs.map +0 -1
- package/fesm2022/scrolling2.mjs.map +0 -1
- package/fesm2022/selection-model.mjs.map +0 -1
- package/fesm2022/shadow-dom.mjs.map +0 -1
- package/fesm2022/style-loader.mjs.map +0 -1
- package/fesm2022/test-environment.mjs.map +0 -1
- package/fesm2022/testing/selenium-webdriver.mjs.map +0 -1
- package/fesm2022/testing/testbed.mjs.map +0 -1
- package/fesm2022/tree-key-manager.mjs.map +0 -1
- package/fesm2022/typeahead.mjs.map +0 -1
- package/fesm2022/unique-selection-dispatcher.mjs.map +0 -1
- package/overlay/_index-deprecated.scss +0 -13
- /package/{bidi-module.d.d.ts → types/_bidi-module-chunk.d.ts} +0 -0
- /package/{data-source.d.d.ts → types/_data-source-chunk.d.ts} +0 -0
- /package/{focus-monitor.d.d.ts → types/_focus-monitor-chunk.d.ts} +0 -0
- /package/{list-key-manager.d.d.ts → types/_list-key-manager-chunk.d.ts} +0 -0
- /package/{number-property.d.d.ts → types/_number-property-chunk.d.ts} +0 -0
- /package/{platform.d.d.ts → types/_platform-chunk.d.ts} +0 -0
- /package/{selection-model.d.d.ts → types/_selection-model-chunk.d.ts} +0 -0
- /package/{style-loader.d.d.ts → types/_style-loader-chunk.d.ts} +0 -0
- /package/{tree-key-manager-strategy.d.d.ts → types/_tree-key-manager-strategy-chunk.d.ts} +0 -0
- /package/{unique-selection-dispatcher.d.d.ts → types/_unique-selection-dispatcher-chunk.d.ts} +0 -0
- /package/{view-repeater.d.d.ts → types/_view-repeater-chunk.d.ts} +0 -0
- /package/{index.d.ts → types/cdk.d.ts} +0 -0
- /package/{clipboard/index.d.ts → types/clipboard.d.ts} +0 -0
- /package/{coercion/private/index.d.ts → types/coercion-private.d.ts} +0 -0
- /package/{keycodes/index.d.ts → types/keycodes.d.ts} +0 -0
- /package/{layout/index.d.ts → types/layout.d.ts} +0 -0
- /package/{observers/private/index.d.ts → types/observers-private.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/text-field-style-loader.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autofill.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autosize.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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 /** Cached scroll top of a textarea */\n private _cachedScrollTop: number;\n\n /** Used to reference correct document/window */\n protected _document = inject(DOCUMENT);\n\n private _hasFocus: boolean;\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 = isFirefox && 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` on Firefox. 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.\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 this._cachedScrollTop = this._textareaElement.scrollTop;\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 textarea.scrollTop = this._cachedScrollTop;\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":[],"mappings":";;;;;;;;;AAUA;MAQa,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,IAAA,EAAA,wBAAwB,qIANzB,EAAE,EAAA,QAAA,EA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A;AACR,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;AAC3C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;AAC5C,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"text-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/text-field-style-loader.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autofill.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autosize.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/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: boolean;\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 = isFirefox && 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` on Firefox. 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.\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":[],"mappings":";;;;;;;;;AAUA;MAQa,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,IAAA,EAAA,wBAAwB,qIANzB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2mBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;kGAMD,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EACK,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAE/B,IAAA,EAAA,EAAC,6BAA6B,EAAE,EAAE,EAAC,EAAA,MAAA,EAAA,CAAA,2mBAAA,CAAA,EAAA;;;ACwB3C;AACA,MAAM,eAAe,GAAG,EAAC,OAAO,EAAE,IAAI,EAAC;AAEvC;;;;AAIG;MAEU,eAAe,CAAA;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,c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CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,WAAW,EAAE,mBAAmB,CAChC,EAAA,OAAA,EAAA,CAAA,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA;+GAE/B,eAAe,EAAA,CAAA;;kGAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;AAC3C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;AAC5C,iBAAA;;;;;"}
|
package/fesm2022/tree.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { SelectionModel } from './
|
|
1
|
+
import { SelectionModel } from './_selection-model-chunk.mjs';
|
|
2
2
|
import { isObservable, Subject, BehaviorSubject, of, combineLatest, EMPTY, concat } from 'rxjs';
|
|
3
3
|
import { take, filter, takeUntil, startWith, tap, switchMap, map, reduce, concatMap, distinctUntilChanged } from 'rxjs/operators';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, inject, ViewContainerRef, Directive, TemplateRef, IterableDiffers, ChangeDetectorRef, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, ContentChildren, EventEmitter, booleanAttribute, Output, numberAttribute, NgModule } from '@angular/core';
|
|
6
|
-
import { TREE_KEY_MANAGER } from './
|
|
7
|
-
import { Directionality } from './
|
|
8
|
-
import { isDataSource } from './
|
|
9
|
-
import { coerceObservable } from './coercion
|
|
10
|
-
import './
|
|
11
|
-
import './
|
|
6
|
+
import { TREE_KEY_MANAGER } from './_tree-key-manager-chunk.mjs';
|
|
7
|
+
import { Directionality } from './_directionality-chunk.mjs';
|
|
8
|
+
import { isDataSource } from './_data-source-chunk.mjs';
|
|
9
|
+
import { coerceObservable } from './coercion-private.mjs';
|
|
10
|
+
import './_typeahead-chunk.mjs';
|
|
11
|
+
import './_keycodes-chunk.mjs';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Base tree control. It has basic toggle/expand/collapse operations on a single data node.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cdk",
|
|
3
|
-
"version": "21.0.0-next.
|
|
3
|
+
"version": "21.0.0-next.10",
|
|
4
4
|
"description": "Angular Material Component Development Kit",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
23
|
"sass": "./_index.scss",
|
|
24
|
-
"types": "./
|
|
24
|
+
"types": "./types/cdk.d.ts",
|
|
25
25
|
"default": "./fesm2022/cdk.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./a11y-prebuilt.css": {
|
|
@@ -49,111 +49,111 @@
|
|
|
49
49
|
"default": "./package.json"
|
|
50
50
|
},
|
|
51
51
|
"./a11y": {
|
|
52
|
-
"types": "./a11y
|
|
52
|
+
"types": "./types/a11y.d.ts",
|
|
53
53
|
"default": "./fesm2022/a11y.mjs"
|
|
54
54
|
},
|
|
55
55
|
"./accordion": {
|
|
56
|
-
"types": "./accordion
|
|
56
|
+
"types": "./types/accordion.d.ts",
|
|
57
57
|
"default": "./fesm2022/accordion.mjs"
|
|
58
58
|
},
|
|
59
59
|
"./bidi": {
|
|
60
|
-
"types": "./bidi
|
|
60
|
+
"types": "./types/bidi.d.ts",
|
|
61
61
|
"default": "./fesm2022/bidi.mjs"
|
|
62
62
|
},
|
|
63
63
|
"./clipboard": {
|
|
64
|
-
"types": "./clipboard
|
|
64
|
+
"types": "./types/clipboard.d.ts",
|
|
65
65
|
"default": "./fesm2022/clipboard.mjs"
|
|
66
66
|
},
|
|
67
67
|
"./coercion": {
|
|
68
|
-
"types": "./coercion
|
|
68
|
+
"types": "./types/coercion.d.ts",
|
|
69
69
|
"default": "./fesm2022/coercion.mjs"
|
|
70
70
|
},
|
|
71
71
|
"./coercion/private": {
|
|
72
|
-
"types": "./coercion
|
|
73
|
-
"default": "./fesm2022/coercion
|
|
72
|
+
"types": "./types/coercion-private.d.ts",
|
|
73
|
+
"default": "./fesm2022/coercion-private.mjs"
|
|
74
74
|
},
|
|
75
75
|
"./collections": {
|
|
76
|
-
"types": "./collections
|
|
76
|
+
"types": "./types/collections.d.ts",
|
|
77
77
|
"default": "./fesm2022/collections.mjs"
|
|
78
78
|
},
|
|
79
79
|
"./dialog": {
|
|
80
|
-
"types": "./dialog
|
|
80
|
+
"types": "./types/dialog.d.ts",
|
|
81
81
|
"default": "./fesm2022/dialog.mjs"
|
|
82
82
|
},
|
|
83
83
|
"./drag-drop": {
|
|
84
|
-
"types": "./drag-drop
|
|
84
|
+
"types": "./types/drag-drop.d.ts",
|
|
85
85
|
"default": "./fesm2022/drag-drop.mjs"
|
|
86
86
|
},
|
|
87
87
|
"./keycodes": {
|
|
88
|
-
"types": "./keycodes
|
|
88
|
+
"types": "./types/keycodes.d.ts",
|
|
89
89
|
"default": "./fesm2022/keycodes.mjs"
|
|
90
90
|
},
|
|
91
91
|
"./layout": {
|
|
92
|
-
"types": "./layout
|
|
92
|
+
"types": "./types/layout.d.ts",
|
|
93
93
|
"default": "./fesm2022/layout.mjs"
|
|
94
94
|
},
|
|
95
95
|
"./listbox": {
|
|
96
|
-
"types": "./listbox
|
|
96
|
+
"types": "./types/listbox.d.ts",
|
|
97
97
|
"default": "./fesm2022/listbox.mjs"
|
|
98
98
|
},
|
|
99
99
|
"./menu": {
|
|
100
|
-
"types": "./menu
|
|
100
|
+
"types": "./types/menu.d.ts",
|
|
101
101
|
"default": "./fesm2022/menu.mjs"
|
|
102
102
|
},
|
|
103
103
|
"./observers": {
|
|
104
|
-
"types": "./observers
|
|
104
|
+
"types": "./types/observers.d.ts",
|
|
105
105
|
"default": "./fesm2022/observers.mjs"
|
|
106
106
|
},
|
|
107
107
|
"./observers/private": {
|
|
108
|
-
"types": "./observers
|
|
109
|
-
"default": "./fesm2022/observers
|
|
108
|
+
"types": "./types/observers-private.d.ts",
|
|
109
|
+
"default": "./fesm2022/observers-private.mjs"
|
|
110
110
|
},
|
|
111
111
|
"./overlay": {
|
|
112
|
-
"types": "./overlay
|
|
112
|
+
"types": "./types/overlay.d.ts",
|
|
113
113
|
"default": "./fesm2022/overlay.mjs"
|
|
114
114
|
},
|
|
115
115
|
"./platform": {
|
|
116
|
-
"types": "./platform
|
|
116
|
+
"types": "./types/platform.d.ts",
|
|
117
117
|
"default": "./fesm2022/platform.mjs"
|
|
118
118
|
},
|
|
119
119
|
"./portal": {
|
|
120
|
-
"types": "./portal
|
|
120
|
+
"types": "./types/portal.d.ts",
|
|
121
121
|
"default": "./fesm2022/portal.mjs"
|
|
122
122
|
},
|
|
123
123
|
"./private": {
|
|
124
|
-
"types": "./private
|
|
124
|
+
"types": "./types/private.d.ts",
|
|
125
125
|
"default": "./fesm2022/private.mjs"
|
|
126
126
|
},
|
|
127
127
|
"./scrolling": {
|
|
128
|
-
"types": "./scrolling
|
|
128
|
+
"types": "./types/scrolling.d.ts",
|
|
129
129
|
"default": "./fesm2022/scrolling.mjs"
|
|
130
130
|
},
|
|
131
131
|
"./stepper": {
|
|
132
|
-
"types": "./stepper
|
|
132
|
+
"types": "./types/stepper.d.ts",
|
|
133
133
|
"default": "./fesm2022/stepper.mjs"
|
|
134
134
|
},
|
|
135
135
|
"./table": {
|
|
136
|
-
"types": "./table
|
|
136
|
+
"types": "./types/table.d.ts",
|
|
137
137
|
"default": "./fesm2022/table.mjs"
|
|
138
138
|
},
|
|
139
139
|
"./testing": {
|
|
140
|
-
"types": "./testing
|
|
140
|
+
"types": "./types/testing.d.ts",
|
|
141
141
|
"default": "./fesm2022/testing.mjs"
|
|
142
142
|
},
|
|
143
143
|
"./testing/selenium-webdriver": {
|
|
144
|
-
"types": "./testing
|
|
145
|
-
"default": "./fesm2022/testing
|
|
144
|
+
"types": "./types/testing-selenium-webdriver.d.ts",
|
|
145
|
+
"default": "./fesm2022/testing-selenium-webdriver.mjs"
|
|
146
146
|
},
|
|
147
147
|
"./testing/testbed": {
|
|
148
|
-
"types": "./testing
|
|
149
|
-
"default": "./fesm2022/testing
|
|
148
|
+
"types": "./types/testing-testbed.d.ts",
|
|
149
|
+
"default": "./fesm2022/testing-testbed.mjs"
|
|
150
150
|
},
|
|
151
151
|
"./text-field": {
|
|
152
|
-
"types": "./text-field
|
|
152
|
+
"types": "./types/text-field.d.ts",
|
|
153
153
|
"default": "./fesm2022/text-field.mjs"
|
|
154
154
|
},
|
|
155
155
|
"./tree": {
|
|
156
|
-
"types": "./tree
|
|
156
|
+
"types": "./types/tree.d.ts",
|
|
157
157
|
"default": "./fesm2022/tree.mjs"
|
|
158
158
|
}
|
|
159
159
|
},
|
|
@@ -171,6 +171,7 @@
|
|
|
171
171
|
"migrations": "./schematics/migration.json",
|
|
172
172
|
"packageGroup": [
|
|
173
173
|
"@angular/material",
|
|
174
|
+
"@angular/aria",
|
|
174
175
|
"@angular/cdk",
|
|
175
176
|
"@angular/cdk-experimental",
|
|
176
177
|
"@angular/material-experimental",
|
|
@@ -181,6 +182,6 @@
|
|
|
181
182
|
},
|
|
182
183
|
"sideEffects": false,
|
|
183
184
|
"module": "./fesm2022/cdk.mjs",
|
|
184
|
-
"typings": "./
|
|
185
|
+
"typings": "./types/cdk.d.ts",
|
|
185
186
|
"type": "module"
|
|
186
187
|
}
|
|
@@ -26,6 +26,6 @@ function default_1() {
|
|
|
26
26
|
// In order to align the CDK version with other Angular dependencies that are setup by
|
|
27
27
|
// `@schematics/angular`, we use tilde instead of caret. This is default for Angular
|
|
28
28
|
// dependencies in new CLI projects.
|
|
29
|
-
return (0, utility_1.addDependency)('@angular/cdk', `~21.0.0-next.
|
|
29
|
+
return (0, utility_1.addDependency)('@angular/cdk', `~21.0.0-next.10`, { existing: utility_1.ExistingBehavior.Skip });
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgZone, Injector, OnDestroy, AfterContentInit, OnChanges, DoCheck, SimpleChanges, InjectionToken } from '@angular/core';
|
|
3
|
-
import { ObserversModule } from './observers
|
|
4
|
-
import { CdkMonitorFocus } from './
|
|
3
|
+
import { ObserversModule } from './observers.js';
|
|
4
|
+
import { CdkMonitorFocus } from './_focus-monitor-chunk.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Configuration for the isFocusable method.
|
|
@@ -206,12 +206,6 @@ declare class CdkTrapFocus implements OnDestroy, AfterContentInit, OnChanges, Do
|
|
|
206
206
|
/** Possible politeness levels. */
|
|
207
207
|
type AriaLivePoliteness = 'off' | 'polite' | 'assertive';
|
|
208
208
|
declare const LIVE_ANNOUNCER_ELEMENT_TOKEN: InjectionToken<HTMLElement | null>;
|
|
209
|
-
/**
|
|
210
|
-
* @docs-private
|
|
211
|
-
* @deprecated No longer used, will be removed.
|
|
212
|
-
* @breaking-change 21.0.0
|
|
213
|
-
*/
|
|
214
|
-
declare function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY(): null;
|
|
215
209
|
/** Object that can be used to configure the default options for the LiveAnnouncer. */
|
|
216
210
|
interface LiveAnnouncerDefaultOptions {
|
|
217
211
|
/** Default politeness for the announcements. */
|
|
@@ -310,5 +304,5 @@ declare class A11yModule {
|
|
|
310
304
|
static ɵinj: i0.ɵɵInjectorDeclaration<A11yModule>;
|
|
311
305
|
}
|
|
312
306
|
|
|
313
|
-
export { A11yModule, CdkAriaLive, CdkTrapFocus, FocusTrap, FocusTrapFactory, InteractivityChecker, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN,
|
|
307
|
+
export { A11yModule, CdkAriaLive, CdkTrapFocus, FocusTrap, FocusTrapFactory, InteractivityChecker, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LiveAnnouncer };
|
|
314
308
|
export type { AriaLivePoliteness, LiveAnnouncerDefaultOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListKeyManagerOption, ListKeyManager } from './
|
|
2
|
-
import { FocusOrigin } from './
|
|
1
|
+
import { ListKeyManagerOption, ListKeyManager } from './_list-key-manager-chunk.js';
|
|
2
|
+
import { FocusOrigin } from './_focus-monitor-chunk.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This is the interface for focusable items (used by the FocusKeyManager).
|
|
@@ -117,9 +117,8 @@ interface TestElement {
|
|
|
117
117
|
/**
|
|
118
118
|
* Sets the value of a `contenteditable` element.
|
|
119
119
|
* @param value Value to be set on the element.
|
|
120
|
-
* @breaking-change 16.0.0 Will become a required method.
|
|
121
120
|
*/
|
|
122
|
-
setContenteditableValue
|
|
121
|
+
setContenteditableValue(value: string): Promise<void>;
|
|
123
122
|
/** Gets the value for the given attribute from the element. */
|
|
124
123
|
getAttribute(name: string): Promise<string | null>;
|
|
125
124
|
/** Checks whether the element has the given class. */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, NgZone, EnvironmentInjector, Renderer2, ComponentRef, EmbeddedViewRef, ElementRef, Injector, OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
|
|
3
|
-
import { Direction, Directionality, BidiModule } from './
|
|
4
|
-
import { PortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from './
|
|
5
|
-
import { CdkScrollable, ScrollingModule } from './
|
|
3
|
+
import { Direction, Directionality, BidiModule } from './_bidi-module-chunk.js';
|
|
4
|
+
import { PortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from './_portal-directives-chunk.js';
|
|
5
|
+
import { CdkScrollable, ScrollingModule } from './_scrolling-module-chunk.js';
|
|
6
6
|
import { Location } from '@angular/common';
|
|
7
7
|
import { Subject, Observable } from 'rxjs';
|
|
8
|
-
import { ViewportRuler } from './scrolling
|
|
9
|
-
import { Platform } from './
|
|
10
|
-
import { _CdkPrivateStyleLoader } from './
|
|
8
|
+
import { ViewportRuler } from './scrolling.js';
|
|
9
|
+
import { Platform } from './_platform-chunk.js';
|
|
10
|
+
import { _CdkPrivateStyleLoader } from './_style-loader-chunk.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Service for dispatching events that land on the body to appropriate overlay ref,
|
|
@@ -276,6 +276,13 @@ declare class OverlayConfig {
|
|
|
276
276
|
type HorizontalConnectionPos = 'start' | 'center' | 'end';
|
|
277
277
|
/** Vertical dimension of a connection point on the perimeter of the origin or overlay element. */
|
|
278
278
|
type VerticalConnectionPos = 'top' | 'center' | 'bottom';
|
|
279
|
+
/** The distance between the overlay element and the viewport. */
|
|
280
|
+
type ViewportMargin = number | {
|
|
281
|
+
top?: number;
|
|
282
|
+
bottom?: number;
|
|
283
|
+
start?: number;
|
|
284
|
+
end?: number;
|
|
285
|
+
};
|
|
279
286
|
/** A connection point on the origin element. */
|
|
280
287
|
interface OriginConnectionPosition {
|
|
281
288
|
originX: HorizontalConnectionPos;
|
|
@@ -441,7 +448,7 @@ declare class FlexibleConnectedPositionStrategy implements PositionStrategy {
|
|
|
441
448
|
private _viewportRect;
|
|
442
449
|
/** Cached container dimensions */
|
|
443
450
|
private _containerRect;
|
|
444
|
-
/** Amount of space that must be maintained between the overlay and the edge of the viewport. */
|
|
451
|
+
/** Amount of space that must be maintained between the overlay and the right edge of the viewport. */
|
|
445
452
|
private _viewportMargin;
|
|
446
453
|
/** The Scrollable containers used to check scrollable view properties on position change. */
|
|
447
454
|
private _scrollables;
|
|
@@ -519,10 +526,11 @@ declare class FlexibleConnectedPositionStrategy implements PositionStrategy {
|
|
|
519
526
|
*/
|
|
520
527
|
withPositions(positions: ConnectedPosition[]): this;
|
|
521
528
|
/**
|
|
522
|
-
* Sets a minimum distance the overlay may be positioned
|
|
523
|
-
* @param margin Required margin between the overlay and the viewport
|
|
529
|
+
* Sets a minimum distance the overlay may be positioned from the bottom edge of the viewport.
|
|
530
|
+
* @param margin Required margin between the overlay and the viewport.
|
|
531
|
+
* It can be a number to be applied to all directions, or an object to supply different values for each direction.
|
|
524
532
|
*/
|
|
525
|
-
withViewportMargin(margin:
|
|
533
|
+
withViewportMargin(margin: ViewportMargin): this;
|
|
526
534
|
/** Sets whether the overlay's width and height can be constrained to fit within the viewport. */
|
|
527
535
|
withFlexibleDimensions(flexibleDimensions?: boolean): this;
|
|
528
536
|
/** Sets whether the overlay can grow after the initial open via flexible width/height. */
|
|
@@ -647,6 +655,26 @@ declare class FlexibleConnectedPositionStrategy implements PositionStrategy {
|
|
|
647
655
|
private _addPanelClasses;
|
|
648
656
|
/** Clears the classes that the position strategy has applied from the overlay panel. */
|
|
649
657
|
private _clearPanelClasses;
|
|
658
|
+
/**
|
|
659
|
+
* Returns either the _viewportMargin directly (if it is a number) or its 'start' value.
|
|
660
|
+
* @private
|
|
661
|
+
*/
|
|
662
|
+
private _getViewportMarginStart;
|
|
663
|
+
/**
|
|
664
|
+
* Returns either the _viewportMargin directly (if it is a number) or its 'end' value.
|
|
665
|
+
* @private
|
|
666
|
+
*/
|
|
667
|
+
private _getViewportMarginEnd;
|
|
668
|
+
/**
|
|
669
|
+
* Returns either the _viewportMargin directly (if it is a number) or its 'top' value.
|
|
670
|
+
* @private
|
|
671
|
+
*/
|
|
672
|
+
private _getViewportMarginTop;
|
|
673
|
+
/**
|
|
674
|
+
* Returns either the _viewportMargin directly (if it is a number) or its 'bottom' value.
|
|
675
|
+
* @private
|
|
676
|
+
*/
|
|
677
|
+
private _getViewportMarginBottom;
|
|
650
678
|
/** Returns the DOMRect of the current origin. */
|
|
651
679
|
private _getOriginRect;
|
|
652
680
|
}
|
|
@@ -726,7 +754,7 @@ declare class CdkConnectedOverlay implements OnDestroy, OnChanges {
|
|
|
726
754
|
/** The custom class to add to the overlay pane element. */
|
|
727
755
|
panelClass: string | string[];
|
|
728
756
|
/** Margin between the overlay and the viewport edges. */
|
|
729
|
-
viewportMargin:
|
|
757
|
+
viewportMargin: ViewportMargin;
|
|
730
758
|
/** Strategy to be used when handling scroll events while the overlay is open. */
|
|
731
759
|
scrollStrategy: ScrollStrategy;
|
|
732
760
|
/** Whether the overlay is open. */
|
|
@@ -798,4 +826,4 @@ declare class OverlayModule {
|
|
|
798
826
|
}
|
|
799
827
|
|
|
800
828
|
export { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayRef, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollingVisibility, createFlexibleConnectedPositionStrategy, validateHorizontalPosition, validateVerticalPosition };
|
|
801
|
-
export type { ConnectedPosition, FlexibleConnectedPositionStrategyOrigin, HorizontalConnectionPos, OriginConnectionPosition, OverlayConnectionPosition, OverlaySizeConfig, PositionStrategy, ScrollStrategy, VerticalConnectionPos };
|
|
829
|
+
export type { ConnectedPosition, FlexibleConnectedPositionStrategyOrigin, HorizontalConnectionPos, OriginConnectionPosition, OverlayConnectionPosition, OverlaySizeConfig, PositionStrategy, ScrollStrategy, VerticalConnectionPos, ViewportMargin };
|
|
@@ -131,14 +131,6 @@ declare class CdkPortal extends TemplatePortal {
|
|
|
131
131
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkPortal, never>;
|
|
132
132
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPortal, "[cdkPortal]", ["cdkPortal"], {}, {}, never, never, true, never>;
|
|
133
133
|
}
|
|
134
|
-
/**
|
|
135
|
-
* @deprecated Use `CdkPortal` instead.
|
|
136
|
-
* @breaking-change 9.0.0
|
|
137
|
-
*/
|
|
138
|
-
declare class TemplatePortalDirective extends CdkPortal {
|
|
139
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TemplatePortalDirective, never>;
|
|
140
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplatePortalDirective, "[cdk-portal], [portal]", ["cdkPortal"], {}, {}, never, never, true, never>;
|
|
141
|
-
}
|
|
142
134
|
/**
|
|
143
135
|
* Possible attached references to the CdkPortalOutlet.
|
|
144
136
|
*/
|
|
@@ -193,19 +185,11 @@ declare class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDest
|
|
|
193
185
|
static ɵfac: i0.ɵɵFactoryDeclaration<CdkPortalOutlet, never>;
|
|
194
186
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPortalOutlet, "[cdkPortalOutlet]", ["cdkPortalOutlet"], { "portal": { "alias": "cdkPortalOutlet"; "required": false; }; }, { "attached": "attached"; }, never, never, true, never>;
|
|
195
187
|
}
|
|
196
|
-
/**
|
|
197
|
-
* @deprecated Use `CdkPortalOutlet` instead.
|
|
198
|
-
* @breaking-change 9.0.0
|
|
199
|
-
*/
|
|
200
|
-
declare class PortalHostDirective extends CdkPortalOutlet {
|
|
201
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PortalHostDirective, never>;
|
|
202
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PortalHostDirective, "[cdkPortalHost], [portalHost]", ["cdkPortalHost"], { "portal": { "alias": "cdkPortalHost"; "required": false; }; }, {}, never, never, true, never>;
|
|
203
|
-
}
|
|
204
188
|
declare class PortalModule {
|
|
205
189
|
static ɵfac: i0.ɵɵFactoryDeclaration<PortalModule, never>;
|
|
206
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PortalModule, never, [typeof CdkPortal, typeof CdkPortalOutlet
|
|
190
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PortalModule, never, [typeof CdkPortal, typeof CdkPortalOutlet], [typeof CdkPortal, typeof CdkPortalOutlet]>;
|
|
207
191
|
static ɵinj: i0.ɵɵInjectorDeclaration<PortalModule>;
|
|
208
192
|
}
|
|
209
193
|
|
|
210
|
-
export { BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, Portal,
|
|
194
|
+
export { BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, Portal, PortalModule, TemplatePortal };
|
|
211
195
|
export type { CdkPortalOutletAttachedRef, ComponentType, PortalOutlet };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, ElementRef, OnInit, NgZone, InjectionToken, OnChanges, NgIterable, DoCheck, TrackByFunction, TemplateRef } from '@angular/core';
|
|
3
|
-
import { Directionality, BidiModule } from './
|
|
3
|
+
import { Directionality, BidiModule } from './_bidi-module-chunk.js';
|
|
4
4
|
import { Observable, Subscription, Subject } from 'rxjs';
|
|
5
|
-
import { ListRange, DataSource, CollectionViewer } from './
|
|
6
|
-
import { NumberInput } from './
|
|
5
|
+
import { ListRange, DataSource, CollectionViewer } from './_data-source-chunk.js';
|
|
6
|
+
import { NumberInput } from './_number-property-chunk.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* An item to be repeated by the VirtualScrollViewport
|