@angular/cdk 21.0.0-next.5 → 21.0.0-next.6
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.mjs → _a11y-module-chunk.mjs} +6 -6
- 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} +1 -1
- 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} +11 -11
- 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} +3 -3
- 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 +20 -20
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +2 -2
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +2 -2
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.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/coercion.mjs.map +1 -1
- package/fesm2022/collections.mjs +5 -5
- package/fesm2022/dialog.mjs +19 -19
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +11 -11
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/keycodes.mjs +1 -1
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/layout.mjs +3 -3
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/listbox.mjs +9 -9
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +21 -21
- 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/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +15 -15
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +5 -5
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +1 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +7 -7
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +7 -7
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +8 -8
- 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/fesm2022/tree.mjs.map +1 -1
- package/package.json +34 -34
- package/schematics/ng-add/index.js +1 -1
- package/{a11y-module.d.d.ts → types/_a11y-module-chunk.d.ts} +2 -2
- 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/{overlay-module.d.d.ts → types/_overlay-module-chunk.d.ts} +6 -6
- package/{scrolling-module.d.d.ts → types/_scrolling-module-chunk.d.ts} +3 -3
- package/{a11y/index.d.ts → types/a11y.d.ts} +9 -9
- 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} +6 -6
- package/{listbox/index.d.ts → types/listbox.d.ts} +3 -3
- package/{menu/index.d.ts → types/menu.d.ts} +12 -12
- 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} +5 -5
- 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/{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/{harness-environment.d.d.ts → types/_harness-environment-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/{portal-directives.d.d.ts → types/_portal-directives-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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_recycle-view-repeater-strategy-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/collections/array-data-source.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/collections/view-repeater.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/collections/recycle-view-repeater-strategy.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 {Observable, isObservable, of as observableOf} from 'rxjs';\nimport {DataSource} from './data-source';\n\n/** DataSource wrapper for a native array. */\nexport class ArrayDataSource<T> extends DataSource<T> {\n constructor(private _data: readonly T[] | Observable<readonly T[]>) {\n super();\n }\n\n connect(): Observable<readonly T[]> {\n return isObservable(this._data) ? this._data : observableOf(this._data);\n }\n\n disconnect() {}\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 {\n InjectionToken,\n IterableChangeRecord,\n IterableChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * The context for an embedded view in the repeater's view container.\n *\n * @template T The type for the embedded view's $implicit property.\n */\nexport interface _ViewRepeaterItemContext<T> {\n $implicit?: T;\n}\n\n/**\n * The arguments needed to construct an embedded view for an item in a view\n * container.\n *\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemInsertArgs<C> {\n templateRef: TemplateRef<C>;\n context?: C;\n index?: number;\n}\n\n/**\n * A factory that derives the embedded view context for an item in a view\n * container.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport type _ViewRepeaterItemContextFactory<T, R, C extends _ViewRepeaterItemContext<T>> = (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n) => _ViewRepeaterItemInsertArgs<C>;\n\n/**\n * Extracts the value of an item from an `IterableChangeRecord`.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n */\nexport type _ViewRepeaterItemValueResolver<T, R> = (record: IterableChangeRecord<R>) => T;\n\n/** Indicates how a view was changed by a `_ViewRepeater`. */\nexport enum _ViewRepeaterOperation {\n /** The content of an existing view was replaced with another item. */\n REPLACED,\n /** A new view was created with `createEmbeddedView`. */\n INSERTED,\n /** The position of a view changed, but the content remains the same. */\n MOVED,\n /** A view was detached from the view container. */\n REMOVED,\n}\n\n/**\n * Meta data describing the state of a view after it was updated by a `_ViewRepeater`.\n *\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeaterItemChange<R, C> {\n /** The view's context after it was changed. */\n context?: C;\n /** Indicates how the view was changed. */\n operation: _ViewRepeaterOperation;\n /** The view's corresponding change record. */\n record: IterableChangeRecord<R>;\n}\n\n/**\n * Type for a callback to be executed after a view has changed.\n *\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport type _ViewRepeaterItemChanged<R, C> = (change: _ViewRepeaterItemChange<R, C>) => void;\n\n/**\n * Describes a strategy for rendering items in a `ViewContainerRef`.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ): void;\n\n detach(): void;\n}\n\n/**\n * Injection token for `_ViewRepeater`. This token is for use by Angular Material only.\n * @docs-private\n */\nexport const _VIEW_REPEATER_STRATEGY = new InjectionToken<\n _ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>\n>('_ViewRepeater');\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 {\n EmbeddedViewRef,\n IterableChangeRecord,\n IterableChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _ViewRepeater,\n _ViewRepeaterItemChanged,\n _ViewRepeaterItemContext,\n _ViewRepeaterItemContextFactory,\n _ViewRepeaterItemInsertArgs,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that caches views when they are removed from a\n * `ViewContainerRef`. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport class _RecycleViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n /**\n * The size of the cache used to store unused views.\n * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n */\n viewCacheSize: number = 20;\n\n /**\n * View cache that stores embedded view instances that have been previously stamped out,\n * but don't are not currently rendered. The view repeater will reuse these views rather than\n * creating brand new ones.\n *\n * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n */\n private _viewCache: EmbeddedViewRef<C>[] = [];\n\n /** Apply changes to the DOM. */\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n // Item added.\n const viewArgsFactory = () =>\n itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = this._insertView(\n viewArgsFactory,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = view ? _ViewRepeaterOperation.INSERTED : _ViewRepeaterOperation.REPLACED;\n } else if (currentIndex == null) {\n // Item removed.\n this._detachAndCacheView(adjustedPreviousIndex!, viewContainerRef);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n // Item moved.\n view = this._moveView(\n adjustedPreviousIndex!,\n currentIndex!,\n viewContainerRef,\n itemValueResolver(record),\n );\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {\n for (const view of this._viewCache) {\n view.destroy();\n }\n this._viewCache = [];\n }\n\n /**\n * Inserts a view for a new item, either from the cache or by creating a new\n * one. Returns `undefined` if the item was inserted into a cached view.\n */\n private _insertView(\n viewArgsFactory: () => _ViewRepeaterItemInsertArgs<C>,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> | undefined {\n const cachedView = this._insertViewFromCache(currentIndex!, viewContainerRef);\n if (cachedView) {\n cachedView.context.$implicit = value;\n return undefined;\n }\n\n const viewArgs = viewArgsFactory();\n return viewContainerRef.createEmbeddedView(\n viewArgs.templateRef,\n viewArgs.context,\n viewArgs.index,\n );\n }\n\n /** Detaches the view at the given index and inserts into the view cache. */\n private _detachAndCacheView(index: number, viewContainerRef: ViewContainerRef) {\n const detachedView = viewContainerRef.detach(index) as EmbeddedViewRef<C>;\n this._maybeCacheView(detachedView, viewContainerRef);\n }\n\n /** Moves view at the previous index to the current index. */\n private _moveView(\n adjustedPreviousIndex: number,\n currentIndex: number,\n viewContainerRef: ViewContainerRef,\n value: T,\n ): EmbeddedViewRef<C> {\n const view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view, currentIndex);\n view.context.$implicit = value;\n return view;\n }\n\n /**\n * Cache the given detached view. If the cache is full, the view will be\n * destroyed.\n */\n private _maybeCacheView(view: EmbeddedViewRef<C>, viewContainerRef: ViewContainerRef) {\n if (this._viewCache.length < this.viewCacheSize) {\n this._viewCache.push(view);\n } else {\n const index = viewContainerRef.indexOf(view);\n\n // The host component could remove views from the container outside of\n // the view repeater. It's unlikely this will occur, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n } else {\n viewContainerRef.remove(index);\n }\n }\n }\n\n /** Inserts a recycled view from the cache at the given index. */\n private _insertViewFromCache(\n index: number,\n viewContainerRef: ViewContainerRef,\n ): EmbeddedViewRef<C> | null {\n const cachedView = this._viewCache.pop();\n if (cachedView) {\n viewContainerRef.insert(cachedView, index);\n }\n return cachedView || null;\n }\n}\n"],"names":["observableOf"],"mappings":";;;;AAWA;AACM,MAAO,eAAmB,SAAQ,UAAa,CAAA;AAC/B,IAAA,KAAA;AAApB,IAAA,WAAA,CAAoB,KAA8C,EAAA;AAChE,QAAA,KAAK,EAAE;QADW,IAAK,CAAA,KAAA,GAAL,KAAK;;IAIzB,OAAO,GAAA;QACL,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,GAAGA,EAAY,CAAC,IAAI,CAAC,KAAK,CAAC;;AAGzE,IAAA,UAAU;AACX;;ACqCD;IACY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;;AAEhC,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;;AAER,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;;AAER,IAAA,sBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK;;AAEL,IAAA,sBAAA,CAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACT,CAAC,EATW,sBAAsB,KAAtB,sBAAsB,GASjC,EAAA,CAAA,CAAA;AA4CD;;;AAGG;MACU,uBAAuB,GAAG,IA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AC;;aACrB;YACL,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC;;;;;AAM5C,YAAA,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBAChB,IAAI,CAAC,OAAO,EAAE;;iBACT;AACL,gBAAA,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;IAM5B,oBAAoB,CAC1B,KAAa,EACb,gBAAkC,EAAA;QAElC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE;QACxC,IAAI,UAAU,EAAE;AACd,YAAA,gBAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC;;QAE5C,OAAO,UAAU,IAAI,IAAI;;AAE5B;;;;"}
|
|
@@ -31,7 +31,7 @@ function supportsScrollBehavior() {
|
|
|
31
31
|
return scrollBehaviorSupported;
|
|
32
32
|
}
|
|
33
33
|
// If the element can have a `scrollBehavior` style, we can be sure that it's supported.
|
|
34
|
-
if ('scrollBehavior' in document.documentElement.style) {
|
|
34
|
+
if (document.documentElement?.style && 'scrollBehavior' in document.documentElement.style) {
|
|
35
35
|
scrollBehaviorSupported = true;
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
@@ -96,4 +96,4 @@ function getRtlScrollAxisType() {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export { RtlScrollAxisType, getRtlScrollAxisType, supportsScrollBehavior };
|
|
99
|
-
//# sourceMappingURL=
|
|
99
|
+
//# sourceMappingURL=_scrolling-chunk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_scrolling-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/scrolling.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\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nexport enum RtlScrollAxisType {\n /**\n * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n * all the way right.\n */\n NORMAL,\n /**\n * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n NEGATED,\n /**\n * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n * all the way right.\n */\n INVERTED,\n}\n\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType: RtlScrollAxisType | undefined;\n\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported: boolean | undefined;\n\n/** Check whether the browser supports scroll behaviors. */\nexport function supportsScrollBehavior(): boolean {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if (document.documentElement?.style && 'scrollBehavior' in document.documentElement!.style) {\n scrollBehaviorSupported = true;\n } else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n const scrollToFunction: Function | undefined = Element.prototype.scrollTo;\n\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n } else {\n scrollBehaviorSupported = false;\n }\n }\n }\n\n return scrollBehaviorSupported;\n}\n\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nexport function getRtlScrollAxisType(): RtlScrollAxisType {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return RtlScrollAxisType.NORMAL;\n }\n\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n\n rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n }\n\n scrollContainer.remove();\n }\n return rtlScrollAxisType;\n}\n"],"names":[],"mappings":"AAQA;IACY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC3B;;;AAGG;AACH,IAAA,iBAAA,CAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN;;;AAGG;AACH,IAAA,iBAAA,CAAA,iBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP;;;AAGG;AACH,IAAA,iBAAA,CAAA,iBAAA,CAAA,UAAA,C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M;AAChC,QAAA,cAAc,CAAC,UAAU,GAAG,QAAQ;AACpC,QAAA,cAAc,CAAC,aAAa,GAAG,MAAM;AACrC,QAAA,cAAc,CAAC,QAAQ,GAAG,UAAU;QAEpC,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC7C,QAAA,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK;AAClC,QAAA,YAAY,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAA,YAAY,CAAC,MAAM,GAAG,KAAK;AAE3B,QAAA,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC;AACpC,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC;AAE1C,QAAA,iBAAiB,GAAG,iBAAiB,CAAC,MAAM;;;;AAK5C,QAAA,IAAI,eAAe,CAAC,UAAU,KAAK,CAAC,EAAE;;;;;AAKpC,YAAA,eAAe,CAAC,UAAU,GAAG,CAAC;YAC9B,iBAAiB;AACf,gBAAA,eAAe,CAAC,UAAU,KAAK,CAAC,GAAG,iBAAiB,CAAC,OAAO,GAAG,iBAAiB,CAAC,QAAQ;;QAG7F,eAAe,CAAC,MAAM,EAAE;;AAE1B,IAAA,OAAO,iBAAiB;AAC1B;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_selection-model-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/collections/selection-model.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 {Subject} from 'rxjs';\n\n/**\n * Class to be used to power selecting one or more options from a list.\n */\nexport class SelectionModel<T> {\n /** Currently-selected values. */\n private _selection = new Set<T>();\n\n /** Keeps track of the deselected options that haven't been emitted by the change event. */\n private _deselectedToEmit: T[] = [];\n\n /** Keeps track of the selected options that haven't been emitted by the change event. */\n private _selectedToEmit: T[] = [];\n\n /** Cache for the array value of the selected items. */\n private _selected: T[] | null;\n\n /** Selected values. */\n get selected(): T[] {\n if (!this._selected) {\n this._selected = Array.from(this._selection.values());\n }\n\n return this._selected;\n }\n\n /** Event emitted when the value has changed. */\n readonly changed = new Subject<SelectionChange<T>>();\n\n constructor(\n private _multiple = false,\n initiallySelectedValues?: T[],\n private _emitChanges = true,\n public compareWith?: (o1: T, o2: T) => boolean,\n ) {\n if (initiallySelectedValues && initiallySelectedValues.length) {\n if (_multiple) {\n initiallySelectedValues.forEach(value => this._markSelected(value));\n } else {\n this._markSelected(initiallySelectedValues[0]);\n }\n\n // Clear the array in order to avoid firing the change event for preselected values.\n this._selectedToEmit.length = 0;\n }\n }\n\n /**\n * Selects a value or an array of values.\n * @param values The values to select\n * @return Whether the selection changed as a result of this call\n */\n select(...values: T[]): boolean {\n this._verifyValueAssignment(values);\n values.forEach(value => this._markSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n\n /**\n * Deselects a value or an array of values.\n * @param values The values to deselect\n * @return Whether the selection changed as a result of this call\n */\n deselect(...values: T[]): boolean {\n this._verifyValueAssignment(values);\n values.forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n\n /**\n * Sets the selected values\n * @param values The new selected values\n * @return Whether the selection changed as a result of this call\n */\n setSelection(...values: T[]): boolean {\n this._verifyValueAssignment(values);\n const oldValues = this.selected;\n const newSelectedSet = new Set(values.map(value => this._getConcreteValue(value)));\n values.forEach(value => this._markSelected(value));\n oldValues\n .filter(value => !newSelectedSet.has(this._getConcreteValue(value, newSelectedSet)))\n .forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n\n /**\n * Toggles a value between selected and deselected.\n * @param value The value to toggle\n * @return Whether the selection changed as a result of this call\n */\n toggle(value: T): boolean {\n return this.isSelected(value) ? this.deselect(value) : this.select(value);\n }\n\n /**\n * Clears all of the selected values.\n * @param flushEvent Whether to flush the changes in an event.\n * If false, the changes to the selection will be flushed along with the next event.\n * @return Whether the selection changed as a result of this call\n */\n clear(flushEvent = true): boolean {\n this._unmarkAll();\n const changed = this._hasQueuedChanges();\n if (flushEvent) {\n this._emitChangeEvent();\n }\n return changed;\n }\n\n /**\n * Determines whether a value is selected.\n */\n isSelected(value: T): boolean {\n return this._selection.has(this._getConcreteValue(value));\n }\n\n /**\n * Determines whether the model does not have a value.\n */\n isEmpty(): boolean {\n return this._selection.size === 0;\n }\n\n /**\n * Determines whether the model has a value.\n */\n hasValue(): boolean {\n return !this.isEmpty();\n }\n\n /**\n * Sorts the selected values based on a predicate function.\n */\n sort(predicate?: (a: T, b: T) => number): void {\n if (this._multiple && this.selected) {\n this._selected!.sort(predicate);\n }\n }\n\n /**\n * Gets whether multiple values can be selected.\n */\n isMultipleSelection() {\n return this._multiple;\n }\n\n /** Emits a change event and clears the records of selected and deselected values. */\n private _emitChangeEvent() {\n // Clear the selected values so they can be re-cached.\n this._selected = null;\n\n if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n this.changed.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit,\n });\n\n this._deselectedToEmit = [];\n this._selectedToEmit = [];\n }\n }\n\n /** Selects a value. */\n private _markSelected(value: T) {\n value = this._getConcreteValue(value);\n if (!this.isSelected(value)) {\n if (!this._multiple) {\n this._unmarkAll();\n }\n\n if (!this.isSelected(value)) {\n this._selection.add(value);\n }\n\n if (this._emitChanges) {\n this._selectedToEmit.push(value);\n }\n }\n }\n\n /** Deselects a value. */\n private _unmarkSelected(value: T) {\n value = this._getConcreteValue(value);\n if (this.isSelected(value)) {\n this._selection.delete(value);\n\n if (this._emitChanges) {\n this._deselectedToEmit.push(value);\n }\n }\n }\n\n /** Clears out the selected values. */\n private _unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }\n\n /**\n * Verifies the value assignment and throws an error if the specified value array is\n * including multiple values while the selection model is not supporting multiple values.\n */\n private _verifyValueAssignment(values: T[]) {\n if (values.length > 1 && !this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMultipleValuesInSingleSelectionError();\n }\n }\n\n /** Whether there are queued up change to be emitted. */\n private _hasQueuedChanges() {\n return !!(this._deselectedToEmit.length || this._selectedToEmit.length);\n }\n\n /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */\n private _getConcreteValue(inputValue: T, selection?: Set<T>): T {\n if (!this.compareWith) {\n return inputValue;\n } else {\n selection = selection ?? this._selection;\n for (let selectedValue of selection) {\n if (this.compareWith!(inputValue, selectedValue)) {\n return selectedValue;\n }\n }\n return inputValue;\n }\n }\n}\n\n/**\n * Event emitted when the value of a MatSelectionModel has changed.\n * @docs-private\n */\nexport interface SelectionChange<T> {\n /** Model that dispatched the event. */\n source: SelectionModel<T>;\n /** Options that were added to the model. */\n added: T[];\n /** Options that were removed from the model. */\n removed: T[];\n}\n\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n * @docs-private\n */\nexport function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}\n"],"names":[],"mappings":";;AAUA;;AAEG;MACU,cAAc,CAAA;AA0Bf,IAAA,SAAA;AAEA,IAAA,YAAA;AACD,IAAA,WAAA;;AA3BD,IAAA,UAAU,GAAG,IAAI,GAAG,EAAK;;IAGzB,iBAAiB,GAAQ,EAAE;;IAG3B,eAAe,GAAQ,EAAE;;AAGzB,IAAA,SAAS;;AAGjB,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;;QAGvD,OAAO,IAAI,CAAC,SAAS;;;AAId,IAAA,OAAO,GAAG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AAeD;;;;AAIG;SACa,uCAAuC,GAAA;AACrD,IAAA,OAAO,KAAK,CAAC,yEAAyE,CAAC;AACzF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_shadow-dom-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/shadow-dom.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\nlet shadowDomIsSupported: boolean;\n\n/** Checks whether the user's browser support Shadow DOM. */\nexport function _supportsShadowDom(): boolean {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}\n\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nexport function _getShadowRoot(element: HTMLElement): ShadowRoot | null {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n\n return null;\n}\n\n/**\n * Gets the currently-focused element on the page while\n * also piercing through Shadow DOM boundaries.\n */\nexport function _getFocusedElementPierceShadowDom(): HTMLElement | null {\n let activeElement =\n typeof document !== 'undefined' && document\n ? (document.activeElement as HTMLElement | null)\n : null;\n\n while (activeElement && activeElement.shadowRoot) {\n const newActiveElement = activeElement.shadowRoot.activeElement as HTMLElement | null;\n if (newActiveElement === activeElement) {\n break;\n } else {\n activeElement = newActiveElement;\n }\n }\n\n return activeElement;\n}\n\n/** Gets the target of an event while accounting for Shadow DOM. */\nexport function _getEventTarget<T extends EventTarget>(event: Event): T | null {\n // If an event is bound outside the Shadow DOM, the `event.target` will\n // point to the shadow root so we have to use `composedPath` instead.\n return (event.composedPath ? event.composedPath()[0] : event.target) as T | null;\n}\n"],"names":[],"mappings":"AAQA,IAAI,oBAA6B;AAEjC;SACgB,kBAAkB,GAAA;AAChC,IAAA,IAAI,oBAAoB,IAAI,IAAI,EAAE;AAChC,QAAA,MAAM,IAAI,GAAG,OAAO,QAAQ,KAAK,WAAW,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI;AACnE,QAAA,oBAAoB,GAAG,CAAC,EAAE,IAAI,KAAM,IAAY,CAAC,gBAAgB,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;;AAG1F,IAAA,OAAO,oBAAoB;AAC7B;AAEA;AACM,SAAU,cAAc,CAAC,OAAoB,EAAA;IACjD,IAAI,kBAAkB,EAAE,EAAE;AACxB,QAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI;;;QAInE,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,IAAI,QAAQ,YAAY,UAAU,EAAE;AACrF,YAAA,OAAO,QAAQ;;;AAInB,IAAA,OAAO,IAAI;AACb;AAEA;;;AAGG;SACa,iCAAiC,GAAA;AAC/C,IAAA,IAAI,aAAa,GACf,OAAO,QAAQ,KAAK,WAAW,IAAI;UAC9B,QAAQ,CAAC;UACV,IAAI;AAEV,IAAA,OAAO,aAAa,IAAI,aAAa,CAAC,UAAU,EAAE;AAChD,QAAA,MAAM,gBAAgB,GAAG,aAAa,CAAC,UAAU,CAAC,aAAmC;AACrF,QAAA,IAAI,gBAAgB,KAAK,aAAa,EAAE;YACtC;;aACK;YACL,aAAa,GAAG,gBAAgB;;;AAIpC,IAAA,OAAO,aAAa;AACtB;AAEA;AACM,SAAU,eAAe,CAAwB,KAAY,EAAA;;;IAGjE,QAAQ,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM;AACrE;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_style-loader-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/private/style-loader.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 {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Type,\n} from '@angular/core';\n\n/** Apps in which we've loaded styles. */\nconst appsWithLoaders = new WeakMap<\n ApplicationRef,\n {\n /** Style loaders that have been added. */\n loaders: Set<Type<unknown>>;\n\n /** References to the instantiated loaders. */\n refs: ComponentRef<unknown>[];\n }\n>();\n\n/**\n * Service that loads structural styles dynamically\n * and ensures that they're only loaded once per app.\n */\n@Injectable({providedIn: 'root'})\nexport class _CdkPrivateStyleLoader {\n private _appRef: ApplicationRef | undefined;\n private _injector = inject(Injector);\n private _environmentInjector = inject(EnvironmentInjector);\n\n /**\n * Loads a set of styles.\n * @param loader Component which will be instantiated to load the styles.\n */\n load(loader: Type<unknown>): void {\n // Resolve the app ref lazily to avoid circular dependency errors if this is called too early.\n const appRef = (this._appRef = this._appRef || this._injector.get(ApplicationRef));\n let data = appsWithLoaders.get(appRef);\n\n // If we haven't loaded for this app before, we have to initialize it.\n if (!data) {\n data = {loaders: new Set(), refs: []};\n appsWithLoaders.set(appRef, data);\n\n // When the app is destroyed, we need to clean up all the related loaders.\n appRef.onDestroy(() => {\n appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());\n appsWithLoaders.delete(appRef);\n });\n }\n\n // If the loader hasn't been loaded before, we need to instatiate it.\n if (!data.loaders.has(loader)) {\n data.loaders.add(loader);\n data.refs.push(createComponent(loader, {environmentInjector: this._environmentInjector}));\n }\n }\n}\n"],"names":[],"mappings":";;;AAmBA;AACA,MAAM,eAAe,GAAG,IAAI,OAAO,EA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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADV,MAAM,EAAA,CAAA;;kGAClB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_test-environment-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/platform/features/test-environment.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\n/** Gets whether the code is currently running in a test environment. */\nexport function _isTestEnvironment(): boolean {\n // We can't use `declare const` because it causes conflicts inside Google with the real typings\n // for these symbols and we can't read them off the global object, because they don't appear to\n // be attached there for some runners like Jest.\n // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)\n return (\n // @ts-ignore\n (typeof __karma__ !== 'undefined' && !!__karma__) ||\n // @ts-ignore\n (typeof jasmine !== 'undefined' && !!jasmine) ||\n // @ts-ignore\n (typeof jest !== 'undefined' && !!jest) ||\n // @ts-ignore\n (typeof Mocha !== 'undefined' && !!Mocha)\n );\n}\n"],"names":[],"mappings":"AAQA;SACgB,kBAAkB,GAAA;;;;;IAKhC;;IAEE,CAAC,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,CAAC,SAAS;;SAE/C,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,CAAC,OAAO,CAAC;;SAE5C,OAAO,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC;;SAEtC,OAAO,KAAK,KAAK,WAAW,IAAI,CAAC,CAAC,KAAK,CAAC;AAE7C;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { QueryList, InjectionToken } from '@angular/core';
|
|
2
2
|
import { Subscription, isObservable, Subject, of } from 'rxjs';
|
|
3
3
|
import { take } from 'rxjs/operators';
|
|
4
|
-
import { Typeahead } from './
|
|
5
|
-
import { coerceObservable } from './coercion
|
|
4
|
+
import { Typeahead } from './_typeahead-chunk.mjs';
|
|
5
|
+
import { coerceObservable } from './coercion-private.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* This class manages keyboard events for trees. If you pass it a QueryList or other list of tree
|
|
@@ -340,4 +340,4 @@ const TREE_KEY_MANAGER = new InjectionToken('tree-key-manager', {
|
|
|
340
340
|
});
|
|
341
341
|
|
|
342
342
|
export { TREE_KEY_MANAGER, TreeKeyManager };
|
|
343
|
-
//# sourceMappingURL=
|
|
343
|
+
//# sourceMappingURL=_tree-key-manager-chunk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_tree-key-manager-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/key-manager/tree-key-manager.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 {InjectionToken, QueryList} from '@angular/core';\nimport {coerceObservable} from '../../coercion/private';\nimport {Observable, Subject, Subscription, isObservable, of as observableOf} from 'rxjs';\nimport {take} from 'rxjs/operators';\nimport {\n TreeKeyManagerFactory,\n TreeKeyManagerItem,\n TreeKeyManagerOptions,\n TreeKeyManagerStrategy,\n} from './tree-key-manager-strategy';\nimport {Typeahead} from './typeahead';\n\n/**\n * This class manages keyboard events for trees. If you pass it a QueryList or other list of tree\n * items, it will set the active item, focus, handle expansion and typeahead correctly when\n * keyboard events occur.\n */\nexport class TreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyManagerStrategy<T> {\n /** The index of the currently active (focused) item. */\n private _activeItemIndex = -1;\n /** The currently active (focused) item. */\n private _activeItem: T | null = null;\n /** Whether or not we activate the item when it's focused. */\n private _shouldActivationFollowFocus = false;\n /**\n * The orientation that the tree is laid out in. In `rtl` mode, the behavior of Left and\n * Right arrow are switched.\n */\n private _horizontalOrientation: 'ltr' | 'rtl' = 'ltr';\n\n /**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager.\n *\n * The default value for this doesn't skip any elements in order to keep tree items focusable\n * when disabled. This aligns with ARIA guidelines:\n * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols.\n */\n private _skipPredicateFn = (_item: T) => false;\n\n /** Function to determine equivalent items. */\n private _trackByFn: (item: T) => unknown = (item: T) => item;\n\n /** Synchronous cache of the items to manage. */\n private _items: T[] = [];\n\n private _typeahead?: Typeahead<T>;\n private _typeaheadSubscription = Subscription.EMPTY;\n\n private _hasInitialFocused = false;\n\n private _initializeFocus(): void {\n if (this._hasInitialFocused || this._items.length === 0) {\n return;\n }\n\n let activeIndex = 0;\n for (let i = 0; i < this._items.length; i++) {\n if (!this._skipPredicateFn(this._items[i]) && !this._isItemDisabled(this._items[i])) {\n activeIndex = i;\n break;\n }\n }\n\n const activeItem = this._items[activeIndex];\n\n // Use `makeFocusable` here, because we want the item to just be focusable, not actually\n // capture the focus since the user isn't interacting with it. See #29628.\n if (activeItem.makeFocusable) {\n this._activeItem?.unfocus();\n this._activeItemIndex = activeIndex;\n this._activeItem = activeItem;\n this._typeahead?.setCurrentSelectedItemIndex(activeIndex);\n activeItem.makeFocusable();\n } else {\n // Backwards compatibility for items that don't implement `makeFocusable`.\n this.focusItem(activeIndex);\n }\n\n this._hasInitialFocused = true;\n }\n\n /**\n *\n * @param items List of TreeKeyManager options. Can be synchronous or asynchronous.\n * @param config Optional configuration options. By default, use 'ltr' horizontal orientation. By\n * default, do not skip any nodes. By default, key manager only calls `focus` method when items\n * are focused and does not call `activate`. If `typeaheadDefaultInterval` is `true`, use a\n * default interval of 200ms.\n */\n constructor(items: Observable<T[]> | QueryList<T> | T[], config: TreeKeyManagerOptions<T>) {\n // We allow for the items to be an array or Observable because, in some cases, the consumer may\n // not have access to a QueryList of the items they want to manage (e.g. when the\n // items aren't being collected via `ViewChildren` or `ContentChildren`).\n if (items instanceof QueryList) {\n this._items = items.toArray();\n items.changes.subscribe((newItems: QueryList<T>) => {\n this._items = newItems.toArray();\n this._typeahead?.setItems(this._items);\n this._updateActiveItemIndex(this._items);\n this._initializeFocus();\n });\n } else if (isObservable(items)) {\n items.subscribe(newItems => {\n this._items = newItems;\n this._typeahead?.setItems(newItems);\n this._updateActiveItemIndex(newItems);\n this._initializeFocus();\n });\n } else {\n this._items = items;\n this._initializeFocus();\n }\n\n if (typeof config.shouldActivationFollowFocus === 'boolean') {\n this._shouldActivationFollowFocus = config.shouldActivationFollowFocus;\n }\n if (config.horizontalOrientation) {\n this._horizontalOrientation = config.horizontalOrientation;\n }\n if (config.skipPredicate) {\n this._skipPredicateFn = config.skipPredicate;\n }\n if (config.trackBy) {\n this._trackByFn = config.trackBy;\n }\n if (typeof config.typeAheadDebounceInterval !== 'undefined') {\n this._setTypeAhead(config.typeAheadDebounceInterval);\n }\n }\n\n /** Stream that emits any time the focused item changes. */\n readonly change = new Subject<T | null>();\n\n /** Cleans up the key manager. */\n destroy() {\n this._typeaheadSubscription.unsubscribe();\n this._typeahead?.destroy();\n this.change.complete();\n }\n\n /**\n * Handles a keyboard event on the tree.\n * @param event Keyboard event that represents the user interaction with the tree.\n */\n onKeydown(event: KeyboardEvent) {\n const key = event.key;\n\n switch (key) {\n case 'Tab':\n // Return early here, in order to allow Tab to actually tab out of the tree\n return;\n\n case 'ArrowDown':\n this._focusNextItem();\n break;\n\n case 'ArrowUp':\n this._focusPreviousItem();\n break;\n\n case 'ArrowRight':\n this._horizontalOrientation === 'rtl'\n ? this._collapseCurrentItem()\n : this._expandCurrentItem();\n break;\n\n case 'ArrowLeft':\n this._horizontalOrientation === 'rtl'\n ? this._expandCurrentItem()\n : this._collapseCurrentItem();\n break;\n\n case 'Home':\n this._focusFirstItem();\n break;\n\n case 'End':\n this._focusLastItem();\n break;\n\n case 'Enter':\n case ' ':\n this._activateCurrentItem();\n break;\n\n default:\n if (event.key === '*') {\n this._expandAllItemsAtCurrentItemLevel();\n break;\n }\n\n this._typeahead?.handleKey(event);\n // Return here, in order to avoid preventing the default action of non-navigational\n // keys or resetting the buffer of pressed letters.\n return;\n }\n\n // Reset the typeahead since the user has used a navigational key.\n this._typeahead?.reset();\n event.preventDefault();\n }\n\n /** Index of the currently active item. */\n getActiveItemIndex(): number | null {\n return this._activeItemIndex;\n }\n\n /** The currently active item. */\n getActiveItem(): T | null {\n return this._activeItem;\n }\n\n /** Focus the first available item. */\n private _focusFirstItem(): void {\n this.focusItem(this._findNextAvailableItemIndex(-1));\n }\n\n /** Focus the last available item. */\n private _focusLastItem(): void {\n this.focusItem(this._findPreviousAvailableItemIndex(this._items.length));\n }\n\n /** Focus the next available item. */\n private _focusNextItem(): void {\n this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex));\n }\n\n /** Focus the previous available item. */\n private _focusPreviousItem(): void {\n this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex));\n }\n\n /**\n * Focus the provided item by index.\n * @param index The index of the item to focus.\n * @param options Additional focusing options.\n */\n focusItem(index: number, options?: {emitChangeEvent?: boolean}): void;\n focusItem(item: T, options?: {emitChangeEvent?: boolean}): void;\n focusItem(itemOrIndex: number | T, options?: {emitChangeEvent?: boolean}): void;\n focusItem(itemOrIndex: number | T, options: {emitChangeEvent?: boolean} = {}) {\n // Set default options\n options.emitChangeEvent ??= true;\n\n let index =\n typeof itemOrIndex === 'number'\n ? itemOrIndex\n : this._items.findIndex(item => this._trackByFn(item) === this._trackByFn(itemOrIndex));\n if (index < 0 || index >= this._items.length) {\n return;\n }\n const activeItem = this._items[index];\n\n // If we're just setting the same item, don't re-call activate or focus\n if (\n this._activeItem !== null &&\n this._trackByFn(activeItem) === this._trackByFn(this._activeItem)\n ) {\n return;\n }\n\n const previousActiveItem = this._activeItem;\n this._activeItem = activeItem ?? null;\n this._activeItemIndex = index;\n this._typeahead?.setCurrentSelectedItemIndex(index);\n\n this._activeItem?.focus();\n previousActiveItem?.unfocus();\n\n if (options.emitChangeEvent) {\n this.change.next(this._activeItem);\n }\n\n if (this._shouldActivationFollowFocus) {\n this._activateCurrentItem();\n }\n }\n\n private _updateActiveItemIndex(newItems: T[]) {\n const activeItem = this._activeItem;\n if (!activeItem) {\n return;\n }\n\n const newIndex = newItems.findIndex(\n item => this._trackByFn(item) === this._trackByFn(activeItem),\n );\n\n if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n this._activeItemIndex = newIndex;\n this._typeahead?.setCurrentSelectedItemIndex(newIndex);\n }\n }\n\n private _setTypeAhead(debounceInterval: number | boolean) {\n this._typeahead = new Typeahead(this._items, {\n debounceInterval: typeof debounceInterval === 'number' ? debounceInterval : undefined,\n skipPredicate: item => this._skipPredicateFn(item),\n });\n\n this._typeaheadSubscription = this._typeahead.selectedItem.subscribe(item => {\n this.focusItem(item);\n });\n }\n\n private _findNextAvailableItemIndex(startingIndex: number) {\n for (let i = startingIndex + 1; i < this._items.length; i++) {\n if (!this._skipPredicateFn(this._items[i])) {\n return i;\n }\n }\n return startingIndex;\n }\n\n private _findPreviousAvailableItemIndex(startingIndex: number) {\n for (let i = startingIndex - 1; i >= 0; i--) {\n if (!this._skipPredicateFn(this._items[i])) {\n return i;\n }\n }\n return startingIndex;\n }\n\n /**\n * If the item is already expanded, we collapse the item. Otherwise, we will focus the parent.\n */\n private _collapseCurrentItem() {\n if (!this._activeItem) {\n return;\n }\n\n if (this._isCurrentItemExpanded()) {\n this._activeItem.collapse();\n } else {\n const parent = this._activeItem.getParent();\n if (!parent || this._skipPredicateFn(parent as T)) {\n return;\n }\n this.focusItem(parent as T);\n }\n }\n\n /**\n * If the item is already collapsed, we expand the item. Otherwise, we will focus the first child.\n */\n private _expandCurrentItem() {\n if (!this._activeItem) {\n return;\n }\n\n if (!this._isCurrentItemExpanded()) {\n this._activeItem.expand();\n } else {\n coerceObservable(this._activeItem.getChildren())\n .pipe(take(1))\n .subscribe(children => {\n const firstChild = children.find(child => !this._skipPredicateFn(child as T));\n if (!firstChild) {\n return;\n }\n this.focusItem(firstChild as T);\n });\n }\n }\n\n private _isCurrentItemExpanded() {\n if (!this._activeItem) {\n return false;\n }\n return typeof this._activeItem.isExpanded === 'boolean'\n ? this._activeItem.isExpanded\n : this._activeItem.isExpanded();\n }\n\n private _isItemDisabled(item: TreeKeyManagerItem) {\n return typeof item.isDisabled === 'boolean' ? item.isDisabled : item.isDisabled?.();\n }\n\n /** For all items that are the same level as the current item, we expand those items. */\n private _expandAllItemsAtCurrentItemLevel() {\n if (!this._activeItem) {\n return;\n }\n\n const parent = this._activeItem.getParent();\n let itemsToExpand;\n if (!parent) {\n itemsToExpand = observableOf(this._items.filter(item => item.getParent() === null));\n } else {\n itemsToExpand = coerceObservable(parent.getChildren());\n }\n\n itemsToExpand.pipe(take(1)).subscribe(items => {\n for (const item of items) {\n item.expand();\n }\n });\n }\n\n private _activateCurrentItem() {\n this._activeItem?.activate();\n }\n}\n\n/** Injection token that determines the key manager to use. */\nexport const TREE_KEY_MANAGER = new InjectionToken<TreeKeyManagerFactory<any>>('tree-key-manager', {\n providedIn: 'root',\n factory: () => (items, options) => new TreeKeyManager(items, options),\n});\n"],"names":["observableOf"],"mappings":";;;;;;AAoBA;;;;AAIG;MACU,cAAc,CAAA;;IAEjB,gBAAgB,GAAG,CAAC,CAAC;;IAErB,WAAW,GAAa,IAAI;;IAE5B,4BAA4B,GAAG,KAAK;AAC5C;;;AAGG;IACK,sBAAsB,GAAkB,KAAK;AAErD;;;;;;;AAOG;AACK,IAAA,gBAAgB,GAAG,CAAC,KAAQ,KAAK,KAAK;;AAGtC,IAAA,UAAU,GAAyB,CAAC,IAAO,KAAK,IAAI;;IAGpD,MAAM,GAAQ,EAAE;AAEhB,IAAA,UAAU;AACV,IAAA,sBAAsB,GAAG,YAAY,CAAC,KAAK;IAE3C,kB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CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,IAAG;AAC5C,YAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,IAAI,CAAC,MAAM,EAAE;;AAEjB,SAAC,CAAC;;IAGI,oBAAoB,GAAA;AAC1B,QAAA,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE;;AAE/B;AAED;MACa,gBAAgB,GAAG,IAAI,cAAc,CAA6B,kBAAkB,EAAE;AACjG,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;AACtE,CAAA;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
import { tap, debounceTime, filter, map } from 'rxjs/operators';
|
|
3
|
-
import { A, Z, ZERO, NINE } from './
|
|
3
|
+
import { A, Z, ZERO, NINE } from './_keycodes-chunk.mjs';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS = 200;
|
|
6
6
|
/**
|
|
@@ -85,4 +85,4 @@ class Typeahead {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export { Typeahead };
|
|
88
|
-
//# sourceMappingURL=
|
|
88
|
+
//# sourceMappingURL=_typeahead-chunk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_typeahead-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/key-manager/typeahead.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 {A, NINE, Z, ZERO} from '../../keycodes';\nimport {Subject, Observable} from 'rxjs';\nimport {debounceTime, filter, map, tap} from 'rxjs/operators';\n\nconst DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS = 200;\n\ninterface TypeaheadItem {\n getLabel?(): string;\n}\n\ninterface TypeaheadConfig<T> {\n debounceInterval?: number;\n skipPredicate?: (item: T) => boolean | undefined;\n}\n\n/**\n * Selects items based on keyboard inputs. Implements the typeahead functionality of\n * `role=\"listbox\"` or `role=\"tree\"` and other related roles.\n */\nexport class Typeahead<T extends TypeaheadItem> {\n private readonly _letterKeyStream = new Subject<string>();\n private _items: readonly T[] = [];\n private _selectedItemIndex = -1;\n\n /** Buffer for the letters that the user has pressed */\n private _pressedLetters: string[] = [];\n\n private _skipPredicateFn?: (item: T) => boolean | undefined;\n\n private readonly _selectedItem = new Subject<T>();\n readonly selectedItem: Observable<T> = this._selectedItem;\n\n constructor(initialItems: readonly T[], config?: TypeaheadConfig<T>) {\n const typeAheadInterval =\n typeof config?.debounceInterval === 'number'\n ? config.debounceInterval\n : DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS;\n\n if (config?.skipPredicate) {\n this._skipPredicateFn = config.skipPredicate;\n }\n\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n initialItems.length &&\n initialItems.some(item => typeof item.getLabel !== 'function')\n ) {\n throw new Error('KeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n\n this.setItems(initialItems);\n this._setupKeyHandler(typeAheadInterval);\n }\n\n destroy() {\n this._pressedLetters = [];\n this._letterKeyStream.complete();\n this._selectedItem.complete();\n }\n\n setCurrentSelectedItemIndex(index: number) {\n this._selectedItemIndex = index;\n }\n\n setItems(items: readonly T[]) {\n this._items = items;\n }\n\n handleKey(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n } else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n isTyping(): boolean {\n return this._pressedLetters.length > 0;\n }\n\n /** Resets the currently stored sequence of typed letters. */\n reset(): void {\n this._pressedLetters = [];\n }\n\n private _setupKeyHandler(typeAheadInterval: number) {\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._letterKeyStream\n .pipe(\n tap(letter => this._pressedLetters.push(letter)),\n debounceTime(typeAheadInterval),\n filter(() => this._pressedLetters.length > 0),\n map(() => this._pressedLetters.join('').toLocaleUpperCase()),\n )\n .subscribe(inputString => {\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (let i = 1; i < this._items.length + 1; i++) {\n const index = (this._selectedItemIndex + i) % this._items.length;\n const item = this._items[index];\n\n if (\n !this._skipPredicateFn?.(item) &&\n item.getLabel?.().toLocaleUpperCase().trim().indexOf(inputString) === 0\n ) {\n this._selectedItem.next(item);\n break;\n }\n }\n\n this._pressedLetters = [];\n });\n }\n}\n"],"names":[],"mappings":";;;;AAYA,MAAM,sCAAsC,GAAG,GAAG;AAWlD;;;AAGG;MACU,SAAS,CAAA;AACH,IAAA,gBAAgB,GAAG,IAAI,OAAO,EAAU;IACjD,MAAM,GAAiB,EAAE;IACzB,kBAAkB,GAAG,CAAC,CAAC;;IAGvB,eAAe,GAAa,EAAE;AAE9B,IAAA,gBAAgB;AAEP,IAAA,aAAa,GAAG,IAAI,OAAO,EAAK;AACxC,IAAA,YAAY,GAAkB,IAAI,CAAC,aAAa;IAEzD,WAAY,CAAA,YAA0B,EAAE,MAA2B,EAAA;AACjE,QAAA,MAAM,iBAAiB,GACrB,OAAO,MAAM,EAAE,gBAAgB,KAAK;cAChC,MAAM,CAAC;cACP,sCAAsC;AAE5C,QAAA,IAAI,MAAM,EAAE,aAAa,EAAE;AACzB,YAAA,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAA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a4f3c4e20/bin/src/cdk/collections/unique-selection-dispatcher.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 {Injectable, OnDestroy} from '@angular/core';\n\n// Users of the Dispatcher never need to see this type, but TypeScript requires it to be exported.\nexport type UniqueSelectionDispatcherListener = (id: string, name: string) => void;\n\n/**\n * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\n@Injectable({providedIn: 'root'})\nexport class UniqueSelectionDispatcher implements OnDestroy {\n private _listeners: UniqueSelectionDispatcherListener[] = [];\n\n /**\n * Notify other items that selection for the given name has been set.\n * @param id ID of the item.\n * @param name Name of the item.\n */\n notify(id: string, name: string) {\n for (let listener of this._listeners) {\n listener(id, name);\n }\n }\n\n /**\n * Listen for future changes to item selection.\n * @return Function used to deregister listener\n */\n listen(listener: UniqueSelectionDispatcherListener): () => void {\n this._listeners.push(listener);\n return () => {\n this._listeners = this._listeners.filter((registered: UniqueSelectionDispatcherListener) => {\n return listener !== registered;\n });\n };\n }\n\n ngOnDestroy() {\n this._listeners = [];\n }\n}\n"],"names":[],"mappings":";;;AAaA;;;;;;;;AAQG;MAEU,yBAAyB,CAAA;IAC5B,UAAU,GAAwC,EAAE;AAE5D;;;;AAIG;IACH,MAAM,CAAC,EAAU,EAAE,IAAY,EAAA;AAC7B,QAAA,KAAK,IAAI,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;AACpC,YAAA,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;;;AAItB;;;AAGG;AACH,IAAA,MAAM,CAAC,QAA2C,EAAA;AAChD,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC9B,QAAA,OAAO,MAAK;AACV,YAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAA6C,KAAI;gBACzF,OAAO,QAAQ,KAAK,UAAU;AAChC,aAAC,CAAC;AACJ,SAAC;;IAGH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;;8GA5BX,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADb,MAAM,EAAA,CAAA;;kGAClB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
package/fesm2022/a11y.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export { CdkMonitorFocus, FOCUS_MONITOR_DEFAULT_OPTIONS, FocusMonitor, FocusMonitorDetectionMode, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, InputModalityDetector } from './
|
|
2
|
-
import { FocusTrap, InteractivityChecker } from './
|
|
3
|
-
export { A11yModule, CdkAriaLive, CdkTrapFocus, FocusTrapFactory, HighContrastMode, HighContrastModeDetector, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LiveAnnouncer } from './
|
|
4
|
-
export { _IdGenerator } from './
|
|
1
|
+
export { CdkMonitorFocus, FOCUS_MONITOR_DEFAULT_OPTIONS, FocusMonitor, FocusMonitorDetectionMode, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, InputModalityDetector } from './_focus-monitor-chunk.mjs';
|
|
2
|
+
import { FocusTrap, InteractivityChecker } from './_a11y-module-chunk.mjs';
|
|
3
|
+
export { A11yModule, CdkAriaLive, CdkTrapFocus, FocusTrapFactory, HighContrastMode, HighContrastModeDetector, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LiveAnnouncer } from './_a11y-module-chunk.mjs';
|
|
4
|
+
export { _IdGenerator } from './_id-generator-chunk.mjs';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { inject, DOCUMENT, APP_ID, Injectable, InjectionToken, NgZone, Injector } from '@angular/core';
|
|
7
|
-
import { Platform } from './
|
|
8
|
-
import { _CdkPrivateStyleLoader } from './
|
|
7
|
+
import { Platform } from './_platform-chunk.mjs';
|
|
8
|
+
import { _CdkPrivateStyleLoader } from './_style-loader-chunk.mjs';
|
|
9
9
|
import { _VisuallyHiddenLoader } from './private.mjs';
|
|
10
|
-
export { ActiveDescendantKeyManager } from './
|
|
11
|
-
export { FocusKeyManager } from './
|
|
12
|
-
export { ListKeyManager } from './
|
|
10
|
+
export { ActiveDescendantKeyManager } from './_activedescendant-key-manager-chunk.mjs';
|
|
11
|
+
export { FocusKeyManager } from './_focus-key-manager-chunk.mjs';
|
|
12
|
+
export { ListKeyManager } from './_list-key-manager-chunk.mjs';
|
|
13
13
|
import { Subject } from 'rxjs';
|
|
14
|
-
import { TREE_KEY_MANAGER } from './
|
|
15
|
-
export { TreeKeyManager } from './
|
|
16
|
-
export { isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader } from './
|
|
14
|
+
import { TREE_KEY_MANAGER } from './_tree-key-manager-chunk.mjs';
|
|
15
|
+
export { TreeKeyManager } from './_tree-key-manager-chunk.mjs';
|
|
16
|
+
export { isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader } from './_fake-event-detection-chunk.mjs';
|
|
17
17
|
import 'rxjs/operators';
|
|
18
|
-
import './
|
|
19
|
-
import './
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
22
|
-
import './
|
|
23
|
-
import './
|
|
18
|
+
import './_keycodes-chunk.mjs';
|
|
19
|
+
import './_shadow-dom-chunk.mjs';
|
|
20
|
+
import './_passive-listeners-chunk.mjs';
|
|
21
|
+
import './_element-chunk.mjs';
|
|
22
|
+
import './_breakpoints-observer-chunk.mjs';
|
|
23
|
+
import './_array-chunk.mjs';
|
|
24
24
|
import './observers.mjs';
|
|
25
25
|
import '@angular/common';
|
|
26
|
-
import './
|
|
26
|
+
import './_typeahead-chunk.mjs';
|
|
27
27
|
import './keycodes.mjs';
|
|
28
|
-
import './coercion
|
|
28
|
+
import './coercion-private.mjs';
|
|
29
29
|
|
|
30
30
|
/** IDs are delimited by an empty space, as per the spec. */
|
|
31
31
|
const ID_DELIMITER = ' ';
|
package/fesm2022/a11y.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/aria-describer/aria-reference.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/aria-describer/aria-describer.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/key-manager/noop-tree-key-manager.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/configurable-focus-trap.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/event-listener-inert-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/focus-trap-inert-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/focus-trap-manager.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/configurable-focus-trap-factory.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\n/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function addAriaReferencedId(el: Element, attr: `aria-${string}`, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n id = id.trim();\n if (ids.some(existingId => existingId.trim() === id)) {\n return;\n }\n ids.push(id);\n\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function removeAriaReferencedId(el: Element, attr: `aria-${string}`, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n id = id.trim();\n const filteredIds = ids.filter(val => val !== id);\n\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n } else {\n el.removeAttribute(attr);\n }\n}\n\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function getAriaReferenceIds(el: Element, attr: string): string[] {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n const attrValue = el.getAttribute(attr);\n return attrValue?.match(/\\S+/g) ?? [];\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 {Injectable, OnDestroy, APP_ID, inject, DOCUMENT} from '@angular/core';\nimport {Platform} from '../../platform';\nimport {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from './aria-reference';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '../../private';\n\n/**\n * Interface used to register message elements and keep a count of how many registrations have\n * the same message and the reference to the message element used for the `aria-describedby`.\n */\nexport interface RegisteredMessage {\n /** The element containing the message. */\n messageElement: Element;\n\n /** The number of elements that reference this message element via `aria-describedby`. */\n referenceCount: number;\n}\n\n/**\n * ID used for the body container where all messages are appended.\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\nexport const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n\n/**\n * ID prefix used for each created message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nexport const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n\n/**\n * Attribute given to each host element that is described by a message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nexport const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\n@Injectable({providedIn: 'root'})\nexport class AriaDescriber implements OnDestroy {\n private _platform = inject(Platform);\n private _document = inject(DOCUMENT);\n\n /** Map of all registered message elements that have been placed into the document. */\n private _messageRegistry = new Map<string | Element, RegisteredMessage>();\n\n /** Container for all registered messages. */\n private _messagesContainer: HTMLElement | null = null;\n\n /** Unique ID for the service. */\n private readonly _id = `${nextId++}`;\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n this._id = inject(APP_ID) + '-' + nextId++;\n }\n\n /**\n * Adds to the host element an aria-describedby reference to a hidden element that contains\n * the message. If the same message has already been registered, then it will reuse the created\n * message element.\n */\n describe(hostElement: Element, message: string, role?: string): void;\n\n /**\n * Adds to the host element an aria-describedby reference to an already-existing message element.\n */\n describe(hostElement: Element, message: HTMLElement): void;\n\n describe(hostElement: Element, message: string | HTMLElement, role?: string): void {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n setMessageId(message, this._id);\n this._messageRegistry.set(key, {messageElement: message, referenceCount: 0});\n } else if (!this._messageRegistry.has(key)) {\n this._createMessageElement(message, role);\n }\n\n if (!this._isElementDescribedByMessage(hostElement, key)) {\n this._addMessageReference(hostElement, key);\n }\n }\n\n /** Removes the host element's aria-describedby reference to the message. */\n removeDescription(hostElement: Element, message: string, role?: string): void;\n\n /** Removes the host element's aria-describedby reference to the message element. */\n removeDescription(hostElement: Element, message: HTMLElement): void;\n\n removeDescription(hostElement: Element, message: string | HTMLElement, role?: string): void {\n if (!message || !this._isElementNode(hostElement)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (this._isElementDescribedByMessage(hostElement, key)) {\n this._removeMessageReference(hostElement, key);\n }\n\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n const registeredMessage = this._messageRegistry.get(key);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(key);\n }\n }\n\n if (this._messagesContainer?.childNodes.length === 0) {\n this._messagesContainer.remove();\n this._messagesContainer = null;\n }\n }\n\n /** Unregisters all created message elements and removes the message container. */\n ngOnDestroy() {\n const describedElements = this._document.querySelectorAll(\n `[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}=\"${this._id}\"]`,\n );\n\n for (let i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n this._messagesContainer?.remove();\n this._messagesContainer = null;\n this._messageRegistry.clear();\n }\n\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n private _createMessageElement(message: string, role?: string) {\n const messageElement = this._document.createElement('div');\n setMessageId(messageElement, this._id);\n messageElement.textContent = message;\n\n if (role) {\n messageElement.setAttribute('role', role);\n }\n\n this._createMessagesContainer();\n this._messagesContainer!.appendChild(messageElement);\n this._messageRegistry.set(getKey(message, role), {messageElement, referenceCount: 0});\n }\n\n /** Deletes the message element from the global messages container. */\n private _deleteMessageElement(key: string | Element) {\n this._messageRegistry.get(key)?.messageElement?.remove();\n this._messageRegistry.delete(key);\n }\n\n /** Creates the global container for all aria-describedby messages. */\n private _createMessagesContainer() {\n if (this._messagesContainer) {\n return;\n }\n\n const containerClassName = 'cdk-describedby-message-container';\n const serverContainers = this._document.querySelectorAll(\n `.${containerClassName}[platform=\"server\"]`,\n );\n\n for (let i = 0; i < serverContainers.length; i++) {\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n serverContainers[i].remove();\n }\n\n const messagesContainer = this._document.createElement('div');\n\n // We add `visibility: hidden` in order to prevent text in this container from\n // being searchable by the browser's Ctrl + F functionality.\n // Screen-readers will still read the description for elements with aria-describedby even\n // when the description element is not visible.\n messagesContainer.style.visibility = 'hidden';\n // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n // the description element doesn't impact page layout.\n messagesContainer.classList.add(containerClassName);\n messagesContainer.classList.add('cdk-visually-hidden');\n\n if (!this._platform.isBrowser) {\n messagesContainer.setAttribute('platform', 'server');\n }\n\n this._document.body.appendChild(messagesContainer);\n this._messagesContainer = messagesContainer;\n }\n\n /** Removes all cdk-describedby messages that are hosted through the element. */\n private _removeCdkDescribedByReferenceIds(element: Element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(\n id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0,\n );\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n }\n\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n private _addMessageReference(element: Element, key: string | Element) {\n const registeredMessage = this._messageRegistry.get(key)!;\n\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);\n registeredMessage.referenceCount++;\n }\n\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n private _removeMessageReference(element: Element, key: string | Element) {\n const registeredMessage = this._messageRegistry.get(key)!;\n registeredMessage.referenceCount--;\n\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n /** Returns true if the element has been described by the provided message ID. */\n private _isElementDescribedByMessage(element: Element, key: string | Element): boolean {\n const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n const registeredMessage = this._messageRegistry.get(key);\n const messageId = registeredMessage && registeredMessage.messageElement.id;\n\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n }\n\n /** Determines whether a message can be described on a particular element. */\n private _canBeDescribed(element: Element, message: string | HTMLElement | void): boolean {\n if (!this._isElementNode(element)) {\n return false;\n }\n\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n\n const trimmedMessage = message == null ? '' : `${message}`.trim();\n const ariaLabel = element.getAttribute('aria-label');\n\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false;\n }\n\n /** Checks whether a node is an Element node. */\n private _isElementNode(element: Node): element is Element {\n return element.nodeType === this._document.ELEMENT_NODE;\n }\n}\n\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message: string | Element, role?: string): string | Element {\n return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element: HTMLElement, serviceId: string) {\n if (!element.id) {\n element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;\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 {Subject} from 'rxjs';\nimport {TREE_KEY_MANAGER} from './tree-key-manager';\nimport {TreeKeyManagerItem, TreeKeyManagerStrategy} from './tree-key-manager-strategy';\nimport {Provider} from '@angular/core';\n\n// NoopTreeKeyManager is a \"noop\" implementation of TreeKeyMangerStrategy. Methods are noops. Does\n// not emit to streams.\n//\n// Used for applications built before TreeKeyManager to opt-out of TreeKeyManager and revert to\n// legacy behavior.\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n * - Tree does not respond to keyboard interaction\n * - Tree node allows tabindex to be set by Input binding\n * - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nexport class NoopTreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyManagerStrategy<T> {\n readonly _isNoopTreeKeyManager = true;\n\n // Provide change as required by TreeKeyManagerStrategy. NoopTreeKeyManager is a \"noop\"\n // implementation that does not emit to streams.\n readonly change = new Subject<T | null>();\n\n destroy() {\n this.change.complete();\n }\n\n onKeydown() {\n // noop\n }\n\n getActiveItemIndex() {\n // Always return null. NoopTreeKeyManager is a \"noop\" implementation that does not maintain\n // the active item.\n return null;\n }\n\n getActiveItem() {\n // Always return null. NoopTreeKeyManager is a \"noop\" implementation that does not maintain\n // the active item.\n return null;\n }\n\n focusItem() {\n // noop\n }\n}\n\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n * - Tree does not respond to keyboard interaction\n * - Tree node allows tabindex to be set by Input binding\n * - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nexport const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER: Provider = {\n provide: TREE_KEY_MANAGER,\n useFactory: () => () => new NoopTreeKeyManager(),\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 {Injector, NgZone} from '@angular/core';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\nimport {ConfigurableFocusTrapConfig} from './configurable-focus-trap-config';\nimport {FocusTrap} from './focus-trap';\nimport {FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {FocusTrapManager, ManagedFocusTrap} from './focus-trap-manager';\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class uses a strategy pattern that determines how it traps focus.\n * See FocusTrapInertStrategy.\n */\nexport class ConfigurableFocusTrap extends FocusTrap implements ManagedFocusTrap {\n /** Whether the FocusTrap is enabled. */\n override get enabled(): boolean {\n return this._enabled;\n }\n override set enabled(value: boolean) {\n this._enabled = value;\n if (this._enabled) {\n this._focusTrapManager.register(this);\n } else {\n this._focusTrapManager.deregister(this);\n }\n }\n\n constructor(\n _element: HTMLElement,\n _checker: InteractivityChecker,\n _ngZone: NgZone,\n _document: Document,\n private _focusTrapManager: FocusTrapManager,\n private _inertStrategy: FocusTrapInertStrategy,\n config: ConfigurableFocusTrapConfig,\n injector?: Injector,\n ) {\n super(_element, _checker, _ngZone, _document, config.defer, injector);\n this._focusTrapManager.register(this);\n }\n\n /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */\n override destroy() {\n this._focusTrapManager.deregister(this);\n super.destroy();\n }\n\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _enable() {\n this._inertStrategy.preventFocus(this);\n this.toggleAnchors(true);\n }\n\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _disable() {\n this._inertStrategy.allowFocus(this);\n this.toggleAnchors(false);\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 {FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {ConfigurableFocusTrap} from './configurable-focus-trap';\n\n/**\n * Lightweight FocusTrapInertStrategy that adds a document focus event\n * listener to redirect focus back inside the FocusTrap.\n */\nexport class EventListenerFocusTrapInertStrategy implements FocusTrapInertStrategy {\n /** Focus event handler. */\n private _listener: ((e: FocusEvent) => void) | null = null;\n\n /** Adds a document event listener that keeps focus inside the FocusTrap. */\n preventFocus(focusTrap: ConfigurableFocusTrap): void {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener!, true);\n }\n\n this._listener = (e: FocusEvent) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener!, true);\n });\n }\n\n /** Removes the event listener added in preventFocus. */\n allowFocus(focusTrap: ConfigurableFocusTrap): void {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener!, true);\n this._listener = null;\n }\n\n /**\n * Refocuses the first element in the FocusTrap if the focus event target was outside\n * the FocusTrap.\n *\n * This is an event listener callback. The event listener is added in runOutsideAngular,\n * so all this code runs outside Angular as well.\n */\n private _trapFocus(focusTrap: ConfigurableFocusTrap, event: FocusEvent) {\n const target = event.target as HTMLElement;\n const focusTrapRoot = focusTrap._element;\n\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (target && !focusTrapRoot.contains(target) && !target.closest?.('div.cdk-overlay-pane')) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\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 */\nimport {InjectionToken} from '@angular/core';\nimport {FocusTrap} from './focus-trap';\n\n/** The injection token used to specify the inert strategy. */\nexport const FOCUS_TRAP_INERT_STRATEGY = new InjectionToken<FocusTrapInertStrategy>(\n 'FOCUS_TRAP_INERT_STRATEGY',\n);\n\n/**\n * A strategy that dictates how FocusTrap should prevent elements\n * outside of the FocusTrap from being focused.\n */\nexport interface FocusTrapInertStrategy {\n /** Makes all elements outside focusTrap unfocusable. */\n preventFocus(focusTrap: FocusTrap): void;\n /** Reverts elements made unfocusable by preventFocus to their previous state. */\n allowFocus(focusTrap: FocusTrap): void;\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 {Injectable} from '@angular/core';\n\n/**\n * A FocusTrap managed by FocusTrapManager.\n * Implemented by ConfigurableFocusTrap to avoid circular dependency.\n */\nexport interface ManagedFocusTrap {\n _enable(): void;\n _disable(): void;\n focusInitialElementWhenReady(): Promise<boolean>;\n}\n\n/** Injectable that ensures only the most recently enabled FocusTrap is active. */\n@Injectable({providedIn: 'root'})\nexport class FocusTrapManager {\n // A stack of the FocusTraps on the page. Only the FocusTrap at the\n // top of the stack is active.\n private _focusTrapStack: ManagedFocusTrap[] = [];\n\n /**\n * Disables the FocusTrap at the top of the stack, and then pushes\n * the new FocusTrap onto the stack.\n */\n register(focusTrap: ManagedFocusTrap): void {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n\n let stack = this._focusTrapStack;\n\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n\n stack.push(focusTrap);\n focusTrap._enable();\n }\n\n /**\n * Removes the FocusTrap from the stack, and activates the\n * FocusTrap that is the new top of the stack.\n */\n deregister(focusTrap: ManagedFocusTrap): void {\n focusTrap._disable();\n\n const stack = this._focusTrapStack;\n\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\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 {Injectable, Injector, NgZone, inject, DOCUMENT} from '@angular/core';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\nimport {ConfigurableFocusTrap} from './configurable-focus-trap';\nimport {ConfigurableFocusTrapConfig} from './configurable-focus-trap-config';\nimport {EventListenerFocusTrapInertStrategy} from './event-listener-inert-strategy';\nimport {FOCUS_TRAP_INERT_STRATEGY, FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {FocusTrapManager} from './focus-trap-manager';\n\n/** Factory that allows easy instantiation of configurable focus traps. */\n@Injectable({providedIn: 'root'})\nexport class ConfigurableFocusTrapFactory {\n private _checker = inject(InteractivityChecker);\n private _ngZone = inject(NgZone);\n private _focusTrapManager = inject(FocusTrapManager);\n\n private _document = inject(DOCUMENT);\n private _inertStrategy: FocusTrapInertStrategy;\n\n private readonly _injector = inject(Injector);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const inertStrategy = inject(FOCUS_TRAP_INERT_STRATEGY, {optional: true});\n\n // TODO split up the strategies into different modules, similar to DateAdapter.\n this._inertStrategy = inertStrategy || new EventListenerFocusTrapInertStrategy();\n }\n\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param config The focus trap configuration.\n * @returns The created focus trap instance.\n */\n create(element: HTMLElement, config?: ConfigurableFocusTrapConfig): ConfigurableFocusTrap;\n\n /**\n * @deprecated Pass a config object instead of the `deferCaptureElements` flag.\n * @breaking-change 11.0.0\n */\n create(element: HTMLElement, deferCaptureElements: boolean): ConfigurableFocusTrap;\n\n create(\n element: HTMLElement,\n config: ConfigurableFocusTrapConfig | boolean = {defer: false},\n ): ConfigurableFocusTrap {\n let configObject: ConfigurableFocusTrapConfig;\n if (typeof config === 'boolean') {\n configObject = {defer: config};\n } else {\n configObject = config;\n }\n return new ConfigurableFocusTrap(\n element,\n this._checker,\n this._ngZone,\n this._document,\n this._focusTrapManager,\n this._inertStrategy,\n configObject,\n this._injector,\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;AACA,MAAM,YAAY,GAAG,GAAG;AAExB;;;AAGG;SACa,mBAAmB,CAAC,EAAW,EAAE,IAAsB,EAAE,EAAU,EAAA;IACjF,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC;AACzC,IAAA,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;AACd,IAAA,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;QACpD;;AAEF,IAAA,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;AAEZ,IAAA,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC/C;AAEA;;;AAGG;SACa,sBAAsB,CAAC,EAAW,EAAE,IAAsB,EAAE,EAAU,EAAA;IACpF,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC;AACzC,IAAA,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;AACd,IAAA,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC;AAEjD,IAAA,IAAI,WAAW,CA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,EAAC;;aACzB;YACL,YAAY,GAAG,MAAM;;AAEvB,QAAA,OAAO,IAAI,qBAAqB,CAC9B,OAAO,EACP,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,iBAAiB,EACtB,IAAI,CAAC,cAAc,EACnB,YAAY,EACZ,IAAI,CAAC,SAAS,CACf;;8GApDQ,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA5B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADhB,MAAM,EAAA,CAAA;;kGAClB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"a11y.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/aria-describer/aria-reference.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/aria-describer/aria-describer.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/key-manager/noop-tree-key-manager.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/configurable-focus-trap.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/event-listener-inert-strategy.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/focus-trap-inert-strategy.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/focus-trap-manager.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/cdk/a11y/focus-trap/configurable-focus-trap-factory.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\n/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function addAriaReferencedId(el: Element, attr: `aria-${string}`, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n id = id.trim();\n if (ids.some(existingId => existingId.trim() === id)) {\n return;\n }\n ids.push(id);\n\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function removeAriaReferencedId(el: Element, attr: `aria-${string}`, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n id = id.trim();\n const filteredIds = ids.filter(val => val !== id);\n\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n } else {\n el.removeAttribute(attr);\n }\n}\n\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function getAriaReferenceIds(el: Element, attr: string): string[] {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n const attrValue = el.getAttribute(attr);\n return attrValue?.match(/\\S+/g) ?? [];\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 {Injectable, OnDestroy, APP_ID, inject, DOCUMENT} from '@angular/core';\nimport {Platform} from '../../platform';\nimport {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from './aria-reference';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '../../private';\n\n/**\n * Interface used to register message elements and keep a count of how many registrations have\n * the same message and the reference to the message element used for the `aria-describedby`.\n */\nexport interface RegisteredMessage {\n /** The element containing the message. */\n messageElement: Element;\n\n /** The number of elements that reference this message element via `aria-describedby`. */\n referenceCount: number;\n}\n\n/**\n * ID used for the body container where all messages are appended.\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\nexport const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n\n/**\n * ID prefix used for each created message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nexport const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n\n/**\n * Attribute given to each host element that is described by a message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nexport const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\n@Injectable({providedIn: 'root'})\nexport class AriaDescriber implements OnDestroy {\n private _platform = inject(Platform);\n private _document = inject(DOCUMENT);\n\n /** Map of all registered message elements that have been placed into the document. */\n private _messageRegistry = new Map<string | Element, RegisteredMessage>();\n\n /** Container for all registered messages. */\n private _messagesContainer: HTMLElement | null = null;\n\n /** Unique ID for the service. */\n private readonly _id = `${nextId++}`;\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n this._id = inject(APP_ID) + '-' + nextId++;\n }\n\n /**\n * Adds to the host element an aria-describedby reference to a hidden element that contains\n * the message. If the same message has already been registered, then it will reuse the created\n * message element.\n */\n describe(hostElement: Element, message: string, role?: string): void;\n\n /**\n * Adds to the host element an aria-describedby reference to an already-existing message element.\n */\n describe(hostElement: Element, message: HTMLElement): void;\n\n describe(hostElement: Element, message: string | HTMLElement, role?: string): void {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n setMessageId(message, this._id);\n this._messageRegistry.set(key, {messageElement: message, referenceCount: 0});\n } else if (!this._messageRegistry.has(key)) {\n this._createMessageElement(message, role);\n }\n\n if (!this._isElementDescribedByMessage(hostElement, key)) {\n this._addMessageReference(hostElement, key);\n }\n }\n\n /** Removes the host element's aria-describedby reference to the message. */\n removeDescription(hostElement: Element, message: string, role?: string): void;\n\n /** Removes the host element's aria-describedby reference to the message element. */\n removeDescription(hostElement: Element, message: HTMLElement): void;\n\n removeDescription(hostElement: Element, message: string | HTMLElement, role?: string): void {\n if (!message || !this._isElementNode(hostElement)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (this._isElementDescribedByMessage(hostElement, key)) {\n this._removeMessageReference(hostElement, key);\n }\n\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n const registeredMessage = this._messageRegistry.get(key);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(key);\n }\n }\n\n if (this._messagesContainer?.childNodes.length === 0) {\n this._messagesContainer.remove();\n this._messagesContainer = null;\n }\n }\n\n /** Unregisters all created message elements and removes the message container. */\n ngOnDestroy() {\n const describedElements = this._document.querySelectorAll(\n `[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}=\"${this._id}\"]`,\n );\n\n for (let i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n this._messagesContainer?.remove();\n this._messagesContainer = null;\n this._messageRegistry.clear();\n }\n\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n private _createMessageElement(message: string, role?: string) {\n const messageElement = this._document.createElement('div');\n setMessageId(messageElement, this._id);\n messageElement.textContent = message;\n\n if (role) {\n messageElement.setAttribute('role', role);\n }\n\n this._createMessagesContainer();\n this._messagesContainer!.appendChild(messageElement);\n this._messageRegistry.set(getKey(message, role), {messageElement, referenceCount: 0});\n }\n\n /** Deletes the message element from the global messages container. */\n private _deleteMessageElement(key: string | Element) {\n this._messageRegistry.get(key)?.messageElement?.remove();\n this._messageRegistry.delete(key);\n }\n\n /** Creates the global container for all aria-describedby messages. */\n private _createMessagesContainer() {\n if (this._messagesContainer) {\n return;\n }\n\n const containerClassName = 'cdk-describedby-message-container';\n const serverContainers = this._document.querySelectorAll(\n `.${containerClassName}[platform=\"server\"]`,\n );\n\n for (let i = 0; i < serverContainers.length; i++) {\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n serverContainers[i].remove();\n }\n\n const messagesContainer = this._document.createElement('div');\n\n // We add `visibility: hidden` in order to prevent text in this container from\n // being searchable by the browser's Ctrl + F functionality.\n // Screen-readers will still read the description for elements with aria-describedby even\n // when the description element is not visible.\n messagesContainer.style.visibility = 'hidden';\n // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n // the description element doesn't impact page layout.\n messagesContainer.classList.add(containerClassName);\n messagesContainer.classList.add('cdk-visually-hidden');\n\n if (!this._platform.isBrowser) {\n messagesContainer.setAttribute('platform', 'server');\n }\n\n this._document.body.appendChild(messagesContainer);\n this._messagesContainer = messagesContainer;\n }\n\n /** Removes all cdk-describedby messages that are hosted through the element. */\n private _removeCdkDescribedByReferenceIds(element: Element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(\n id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0,\n );\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n }\n\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n private _addMessageReference(element: Element, key: string | Element) {\n const registeredMessage = this._messageRegistry.get(key)!;\n\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);\n registeredMessage.referenceCount++;\n }\n\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n private _removeMessageReference(element: Element, key: string | Element) {\n const registeredMessage = this._messageRegistry.get(key)!;\n registeredMessage.referenceCount--;\n\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n /** Returns true if the element has been described by the provided message ID. */\n private _isElementDescribedByMessage(element: Element, key: string | Element): boolean {\n const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n const registeredMessage = this._messageRegistry.get(key);\n const messageId = registeredMessage && registeredMessage.messageElement.id;\n\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n }\n\n /** Determines whether a message can be described on a particular element. */\n private _canBeDescribed(element: Element, message: string | HTMLElement | void): boolean {\n if (!this._isElementNode(element)) {\n return false;\n }\n\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n\n const trimmedMessage = message == null ? '' : `${message}`.trim();\n const ariaLabel = element.getAttribute('aria-label');\n\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false;\n }\n\n /** Checks whether a node is an Element node. */\n private _isElementNode(element: Node): element is Element {\n return element.nodeType === this._document.ELEMENT_NODE;\n }\n}\n\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message: string | Element, role?: string): string | Element {\n return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element: HTMLElement, serviceId: string) {\n if (!element.id) {\n element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;\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 {Subject} from 'rxjs';\nimport {TREE_KEY_MANAGER} from './tree-key-manager';\nimport {TreeKeyManagerItem, TreeKeyManagerStrategy} from './tree-key-manager-strategy';\nimport {Provider} from '@angular/core';\n\n// NoopTreeKeyManager is a \"noop\" implementation of TreeKeyMangerStrategy. Methods are noops. Does\n// not emit to streams.\n//\n// Used for applications built before TreeKeyManager to opt-out of TreeKeyManager and revert to\n// legacy behavior.\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n * - Tree does not respond to keyboard interaction\n * - Tree node allows tabindex to be set by Input binding\n * - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nexport class NoopTreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyManagerStrategy<T> {\n readonly _isNoopTreeKeyManager = true;\n\n // Provide change as required by TreeKeyManagerStrategy. NoopTreeKeyManager is a \"noop\"\n // implementation that does not emit to streams.\n readonly change = new Subject<T | null>();\n\n destroy() {\n this.change.complete();\n }\n\n onKeydown() {\n // noop\n }\n\n getActiveItemIndex() {\n // Always return null. NoopTreeKeyManager is a \"noop\" implementation that does not maintain\n // the active item.\n return null;\n }\n\n getActiveItem() {\n // Always return null. NoopTreeKeyManager is a \"noop\" implementation that does not maintain\n // the active item.\n return null;\n }\n\n focusItem() {\n // noop\n }\n}\n\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n * - Tree does not respond to keyboard interaction\n * - Tree node allows tabindex to be set by Input binding\n * - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nexport const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER: Provider = {\n provide: TREE_KEY_MANAGER,\n useFactory: () => () => new NoopTreeKeyManager(),\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 {Injector, NgZone} from '@angular/core';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\nimport {ConfigurableFocusTrapConfig} from './configurable-focus-trap-config';\nimport {FocusTrap} from './focus-trap';\nimport {FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {FocusTrapManager, ManagedFocusTrap} from './focus-trap-manager';\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class uses a strategy pattern that determines how it traps focus.\n * See FocusTrapInertStrategy.\n */\nexport class ConfigurableFocusTrap extends FocusTrap implements ManagedFocusTrap {\n /** Whether the FocusTrap is enabled. */\n override get enabled(): boolean {\n return this._enabled;\n }\n override set enabled(value: boolean) {\n this._enabled = value;\n if (this._enabled) {\n this._focusTrapManager.register(this);\n } else {\n this._focusTrapManager.deregister(this);\n }\n }\n\n constructor(\n _element: HTMLElement,\n _checker: InteractivityChecker,\n _ngZone: NgZone,\n _document: Document,\n private _focusTrapManager: FocusTrapManager,\n private _inertStrategy: FocusTrapInertStrategy,\n config: ConfigurableFocusTrapConfig,\n injector?: Injector,\n ) {\n super(_element, _checker, _ngZone, _document, config.defer, injector);\n this._focusTrapManager.register(this);\n }\n\n /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */\n override destroy() {\n this._focusTrapManager.deregister(this);\n super.destroy();\n }\n\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _enable() {\n this._inertStrategy.preventFocus(this);\n this.toggleAnchors(true);\n }\n\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _disable() {\n this._inertStrategy.allowFocus(this);\n this.toggleAnchors(false);\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 {FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {ConfigurableFocusTrap} from './configurable-focus-trap';\n\n/**\n * Lightweight FocusTrapInertStrategy that adds a document focus event\n * listener to redirect focus back inside the FocusTrap.\n */\nexport class EventListenerFocusTrapInertStrategy implements FocusTrapInertStrategy {\n /** Focus event handler. */\n private _listener: ((e: FocusEvent) => void) | null = null;\n\n /** Adds a document event listener that keeps focus inside the FocusTrap. */\n preventFocus(focusTrap: ConfigurableFocusTrap): void {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener!, true);\n }\n\n this._listener = (e: FocusEvent) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener!, true);\n });\n }\n\n /** Removes the event listener added in preventFocus. */\n allowFocus(focusTrap: ConfigurableFocusTrap): void {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener!, true);\n this._listener = null;\n }\n\n /**\n * Refocuses the first element in the FocusTrap if the focus event target was outside\n * the FocusTrap.\n *\n * This is an event listener callback. The event listener is added in runOutsideAngular,\n * so all this code runs outside Angular as well.\n */\n private _trapFocus(focusTrap: ConfigurableFocusTrap, event: FocusEvent) {\n const target = event.target as HTMLElement;\n const focusTrapRoot = focusTrap._element;\n\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (target && !focusTrapRoot.contains(target) && !target.closest?.('div.cdk-overlay-pane')) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\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 */\nimport {InjectionToken} from '@angular/core';\nimport {FocusTrap} from './focus-trap';\n\n/** The injection token used to specify the inert strategy. */\nexport const FOCUS_TRAP_INERT_STRATEGY = new InjectionToken<FocusTrapInertStrategy>(\n 'FOCUS_TRAP_INERT_STRATEGY',\n);\n\n/**\n * A strategy that dictates how FocusTrap should prevent elements\n * outside of the FocusTrap from being focused.\n */\nexport interface FocusTrapInertStrategy {\n /** Makes all elements outside focusTrap unfocusable. */\n preventFocus(focusTrap: FocusTrap): void;\n /** Reverts elements made unfocusable by preventFocus to their previous state. */\n allowFocus(focusTrap: FocusTrap): void;\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 {Injectable} from '@angular/core';\n\n/**\n * A FocusTrap managed by FocusTrapManager.\n * Implemented by ConfigurableFocusTrap to avoid circular dependency.\n */\nexport interface ManagedFocusTrap {\n _enable(): void;\n _disable(): void;\n focusInitialElementWhenReady(): Promise<boolean>;\n}\n\n/** Injectable that ensures only the most recently enabled FocusTrap is active. */\n@Injectable({providedIn: 'root'})\nexport class FocusTrapManager {\n // A stack of the FocusTraps on the page. Only the FocusTrap at the\n // top of the stack is active.\n private _focusTrapStack: ManagedFocusTrap[] = [];\n\n /**\n * Disables the FocusTrap at the top of the stack, and then pushes\n * the new FocusTrap onto the stack.\n */\n register(focusTrap: ManagedFocusTrap): void {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n\n let stack = this._focusTrapStack;\n\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n\n stack.push(focusTrap);\n focusTrap._enable();\n }\n\n /**\n * Removes the FocusTrap from the stack, and activates the\n * FocusTrap that is the new top of the stack.\n */\n deregister(focusTrap: ManagedFocusTrap): void {\n focusTrap._disable();\n\n const stack = this._focusTrapStack;\n\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\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 {Injectable, Injector, NgZone, inject, DOCUMENT} from '@angular/core';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\nimport {ConfigurableFocusTrap} from './configurable-focus-trap';\nimport {ConfigurableFocusTrapConfig} from './configurable-focus-trap-config';\nimport {EventListenerFocusTrapInertStrategy} from './event-listener-inert-strategy';\nimport {FOCUS_TRAP_INERT_STRATEGY, FocusTrapInertStrategy} from './focus-trap-inert-strategy';\nimport {FocusTrapManager} from './focus-trap-manager';\n\n/** Factory that allows easy instantiation of configurable focus traps. */\n@Injectable({providedIn: 'root'})\nexport class ConfigurableFocusTrapFactory {\n private _checker = inject(InteractivityChecker);\n private _ngZone = inject(NgZone);\n private _focusTrapManager = inject(FocusTrapManager);\n\n private _document = inject(DOCUMENT);\n private _inertStrategy: FocusTrapInertStrategy;\n\n private readonly _injector = inject(Injector);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const inertStrategy = inject(FOCUS_TRAP_INERT_STRATEGY, {optional: true});\n\n // TODO split up the strategies into different modules, similar to DateAdapter.\n this._inertStrategy = inertStrategy || new EventListenerFocusTrapInertStrategy();\n }\n\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param config The focus trap configuration.\n * @returns The created focus trap instance.\n */\n create(element: HTMLElement, config?: ConfigurableFocusTrapConfig): ConfigurableFocusTrap;\n\n /**\n * @deprecated Pass a config object instead of the `deferCaptureElements` flag.\n * @breaking-change 11.0.0\n */\n create(element: HTMLElement, deferCaptureElements: boolean): ConfigurableFocusTrap;\n\n create(\n element: HTMLElement,\n config: ConfigurableFocusTrapConfig | boolean = {defer: false},\n ): ConfigurableFocusTrap {\n let configObject: ConfigurableFocusTrapConfig;\n if (typeof config === 'boolean') {\n configObject = {defer: config};\n } else {\n configObject = config;\n }\n return new ConfigurableFocusTrap(\n element,\n this._checker,\n this._ngZone,\n this._document,\n this._focusTrapManager,\n this._inertStrategy,\n configObject,\n this._injector,\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;AACA,MAAM,YAAY,GAAG,GAAG;AAExB;;;AAGG;SACa,mBAAmB,CAAC,EAAW,EAAE,IAAsB,EAAE,EAAU,EAAA;IACjF,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC;AACzC,IAAA,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;AACd,IAAA,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;QACpD;;AAEF,IAAA,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;AAEZ,IAAA,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC/C;AAEA;;;AAGG;SACa,sBAAsB,CAAC,EAAW,EAAE,IAAsB,EAAE,EAAU,EAAA;IACpF,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC;AACzC,IAAA,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;AACd,IAAA,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC;AAEjD,IAAA,IAAI,W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E,MAAM,EAAC;;aACzB;YACL,YAAY,GAAG,MAAM;;AAEvB,QAAA,OAAO,IAAI,qBAAqB,CAC9B,OAAO,EACP,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,iBAAiB,EACtB,IAAI,CAAC,cAAc,EACnB,YAAY,EACZ,IAAI,CAAC,SAAS,CACf;;8GApDQ,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA5B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADhB,MAAM,EAAA,CAAA;;kGAClB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
|
package/fesm2022/accordion.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, booleanAttribute, Directive, Input, ChangeDetectorRef, EventEmitter, signal, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, Subscription } from 'rxjs';
|
|
4
|
-
import { _IdGenerator } from './
|
|
5
|
-
import { UniqueSelectionDispatcher } from './
|
|
4
|
+
import { _IdGenerator } from './_id-generator-chunk.mjs';
|
|
5
|
+
import { UniqueSelectionDispatcher } from './_unique-selection-dispatcher-chunk.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Injection token that can be used to reference instances of `CdkAccordion`. It serves
|