@angular/cdk 22.2.0-next.4 → 22.2.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_a11y-module-chunk.mjs +22 -22
- package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
- package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_array-chunk.mjs.map +1 -1
- package/fesm2022/_breakpoints-observer-chunk.mjs +6 -6
- package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
- package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -1
- package/fesm2022/_data-source-chunk.mjs.map +1 -1
- package/fesm2022/_directionality-chunk.mjs +3 -3
- package/fesm2022/_directionality-chunk.mjs.map +1 -1
- package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -1
- package/fesm2022/_element-chunk.mjs.map +1 -1
- package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -1
- package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_focus-monitor-chunk.mjs +9 -9
- package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
- package/fesm2022/_id-generator-chunk.mjs +3 -3
- package/fesm2022/_id-generator-chunk.mjs.map +1 -1
- package/fesm2022/_keycodes-chunk.mjs.map +1 -1
- package/fesm2022/_list-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_overlay-module-chunk.mjs +42 -35
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
- package/fesm2022/_platform-chunk.mjs +3 -3
- package/fesm2022/_platform-chunk.mjs.map +1 -1
- package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -1
- package/fesm2022/_scrolling-chunk.mjs.map +1 -1
- package/fesm2022/_selection-model-chunk.mjs.map +1 -1
- package/fesm2022/_shadow-dom-chunk.mjs.map +1 -1
- package/fesm2022/_style-loader-chunk.mjs +3 -3
- package/fesm2022/_style-loader-chunk.mjs.map +1 -1
- package/fesm2022/_test-environment-chunk.mjs.map +1 -1
- package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -1
- package/fesm2022/_typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
- package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
- package/fesm2022/a11y.mjs +9 -9
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +10 -10
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +7 -7
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +10 -10
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/coercion-private.mjs.map +1 -1
- package/fesm2022/coercion.mjs.map +1 -1
- package/fesm2022/dialog.mjs +10 -10
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +31 -31
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/layout.mjs +4 -4
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/listbox.mjs +10 -10
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +49 -49
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers-private.mjs +3 -3
- package/fesm2022/observers-private.mjs.map +1 -1
- package/fesm2022/observers.mjs +13 -13
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +4 -4
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +4 -4
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs +10 -10
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs +3 -3
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +35 -35
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +22 -22
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +73 -73
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
- package/fesm2022/testing-testbed.mjs +9 -3
- package/fesm2022/testing-testbed.mjs.map +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs +16 -16
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_overlay-module-chunk.d.ts +3 -1
- package/types/overlay.d.ts +1 -1
- package/types/testing-testbed.d.ts +8 -6
package/fesm2022/a11y.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/aria-describer/aria-reference.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/aria-describer/aria-describer.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/key-manager/noop-tree-key-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/configurable-focus-trap.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/event-listener-inert-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/focus-trap-inert-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/focus-trap-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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 {Service, 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/** ID prefix used for each created message element. */\nconst CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n\n/** Attribute given to each host element that is described by a message element. */\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@Service()\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() {\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 {Service} 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@Service()\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 {Service, 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@Service()\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() {\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 create(\n element: HTMLElement,\n config: ConfigurableFocusTrapConfig = {defer: false},\n ): ConfigurableFocusTrap {\n return new ConfigurableFocusTrap(\n element,\n this._checker,\n this._ngZone,\n this._document,\n this._focusTrapManager,\n this._inertStrategy,\n config,\n this._injector,\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,YAAY,GAAG,GAAG;SAMR,mBAAmB,CAAC,EAAW,EAAE,IAAsB,EA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A,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACvC,EAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,EAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE5C,EAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;EAC5B,cAAc;AAEL,EAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAE7C,EAAA,WAAA,GAAA;AACE,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,yBAAyB,EAAE;AAAC,MAAA,QAAQ,EAAE;AAAI,KAAC,CAAC;IAGzE,IAAI,CAAC,cAAc,GAAG,aAAa,IAAI,IAAI,mCAAmC,EAAE;AAClF,EAAA;AAUA,EAAA,MAAM,CACJ,OAAoB,EACpB,MAAA,GAAsC;AAAC,IAAA,KAAK,EAAE;AAAK,GAAC,EAAA;AAEpD,IAAA,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,MAAM,EACN,IAAI,CAAC,SAAS,CACf;AACH,EAAA;;;;;UAvCW,4BAA4B;AAAA,IAAA,IAAA,EAAA,EAAA;AAAA,IAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA;AAAA,GAAA,CAAA;;;;;UAA5B;AAA4B,GAAA,CAAA;;;;;;QAA5B,4BAA4B;AAAA,EAAA,UAAA,EAAA,CAAA;UADxC;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"a11y.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/aria-describer/aria-reference.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/aria-describer/aria-describer.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/key-manager/noop-tree-key-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/configurable-focus-trap.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/event-listener-inert-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/focus-trap-inert-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/a11y/focus-trap/focus-trap-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/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 {Service, 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/** ID prefix used for each created message element. */\nconst CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n\n/** Attribute given to each host element that is described by a message element. */\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@Service()\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() {\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 {Service} 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@Service()\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 {Service, 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@Service()\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() {\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 create(\n element: HTMLElement,\n config: ConfigurableFocusTrapConfig = {defer: false},\n ): ConfigurableFocusTrap {\n return new ConfigurableFocusTrap(\n element,\n this._checker,\n this._ngZone,\n this._document,\n this._focusTrapManager,\n this._inertStrategy,\n config,\n this._injector,\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,YAAY,GAAG,GAAG;SAMR,mBAAmB,CAAC,EAAW,EAAE,IAAsB,EAAE,EAAU,EAAA;AACjF,EAAA,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC;AACzC,EAAA,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;AACd,EAAA,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;AACpD,IAAA;AACF,EAAA;AACA,EAAA,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;EAEZ,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC/C;SAMgB,sBAAsB,CAAC,EAAW,EAAE,IAAsB,EAAE,EAAU,EAAA;AACpF,EAAA,MAAM,GAAG,GAAG,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC;AACzC,EAAA,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;EACd,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC;EAEjD,IAAI,WAAW,CAAC,MAAM,EAAE;IACtB,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACvD,EAAA,CA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A,IAAA,IAAA,EAAA,EAAA;AAAA,IAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA;AAAA,GAAA,CAAA;;;;;UAA5B;AAA4B,GAAA,CAAA;;;;;;QAA5B,4BAA4B;AAAA,EAAA,UAAA,EAAA,CAAA;UADxC;;;;;"}
|
package/fesm2022/accordion.mjs
CHANGED
|
@@ -27,7 +27,7 @@ class CdkAccordion {
|
|
|
27
27
|
}
|
|
28
28
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "22.2.0-next.
|
|
30
|
+
version: "22.2.0-next.5",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: CdkAccordion,
|
|
33
33
|
deps: [],
|
|
@@ -35,7 +35,7 @@ class CdkAccordion {
|
|
|
35
35
|
});
|
|
36
36
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
37
37
|
minVersion: "16.1.0",
|
|
38
|
-
version: "22.2.0-next.
|
|
38
|
+
version: "22.2.0-next.5",
|
|
39
39
|
type: CdkAccordion,
|
|
40
40
|
isStandalone: true,
|
|
41
41
|
selector: "cdk-accordion, [cdkAccordion]",
|
|
@@ -53,7 +53,7 @@ class CdkAccordion {
|
|
|
53
53
|
}
|
|
54
54
|
i0.ɵɵngDeclareClassMetadata({
|
|
55
55
|
minVersion: "12.0.0",
|
|
56
|
-
version: "22.2.0-next.
|
|
56
|
+
version: "22.2.0-next.5",
|
|
57
57
|
ngImport: i0,
|
|
58
58
|
type: CdkAccordion,
|
|
59
59
|
decorators: [{
|
|
@@ -160,7 +160,7 @@ class CdkAccordionItem {
|
|
|
160
160
|
}
|
|
161
161
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
162
162
|
minVersion: "12.0.0",
|
|
163
|
-
version: "22.2.0-next.
|
|
163
|
+
version: "22.2.0-next.5",
|
|
164
164
|
ngImport: i0,
|
|
165
165
|
type: CdkAccordionItem,
|
|
166
166
|
deps: [],
|
|
@@ -168,7 +168,7 @@ class CdkAccordionItem {
|
|
|
168
168
|
});
|
|
169
169
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
170
170
|
minVersion: "16.1.0",
|
|
171
|
-
version: "22.2.0-next.
|
|
171
|
+
version: "22.2.0-next.5",
|
|
172
172
|
type: CdkAccordionItem,
|
|
173
173
|
isStandalone: true,
|
|
174
174
|
selector: "cdk-accordion-item, [cdkAccordionItem]",
|
|
@@ -192,7 +192,7 @@ class CdkAccordionItem {
|
|
|
192
192
|
}
|
|
193
193
|
i0.ɵɵngDeclareClassMetadata({
|
|
194
194
|
minVersion: "12.0.0",
|
|
195
|
-
version: "22.2.0-next.
|
|
195
|
+
version: "22.2.0-next.5",
|
|
196
196
|
ngImport: i0,
|
|
197
197
|
type: CdkAccordionItem,
|
|
198
198
|
decorators: [{
|
|
@@ -237,7 +237,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
237
237
|
class CdkAccordionModule {
|
|
238
238
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
239
239
|
minVersion: "12.0.0",
|
|
240
|
-
version: "22.2.0-next.
|
|
240
|
+
version: "22.2.0-next.5",
|
|
241
241
|
ngImport: i0,
|
|
242
242
|
type: CdkAccordionModule,
|
|
243
243
|
deps: [],
|
|
@@ -245,7 +245,7 @@ class CdkAccordionModule {
|
|
|
245
245
|
});
|
|
246
246
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
247
247
|
minVersion: "14.0.0",
|
|
248
|
-
version: "22.2.0-next.
|
|
248
|
+
version: "22.2.0-next.5",
|
|
249
249
|
ngImport: i0,
|
|
250
250
|
type: CdkAccordionModule,
|
|
251
251
|
imports: [CdkAccordion, CdkAccordionItem],
|
|
@@ -253,14 +253,14 @@ class CdkAccordionModule {
|
|
|
253
253
|
});
|
|
254
254
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
255
255
|
minVersion: "12.0.0",
|
|
256
|
-
version: "22.2.0-next.
|
|
256
|
+
version: "22.2.0-next.5",
|
|
257
257
|
ngImport: i0,
|
|
258
258
|
type: CdkAccordionModule
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
i0.ɵɵngDeclareClassMetadata({
|
|
262
262
|
minVersion: "12.0.0",
|
|
263
|
-
version: "22.2.0-next.
|
|
263
|
+
version: "22.2.0-next.5",
|
|
264
264
|
ngImport: i0,
|
|
265
265
|
type: CdkAccordionModule,
|
|
266
266
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-item.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {Subject} from 'rxjs';\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges<this>>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-');\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input({transform: booleanAttribute}) multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n if (this.multi) {\n this._openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items. */\n closeAll(): void {\n this._openCloseAllActions.next(false);\n }\n\n ngOnChanges(changes: SimpleChanges<this>) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._openCloseAllActions.complete();\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 {\n Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n ChangeDetectorRef,\n booleanAttribute,\n inject,\n OnInit,\n signal,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {UniqueSelectionDispatcher} from '../collections';\nimport {CDK_ACCORDION, CdkAccordion} from './accordion';\nimport {Subscription} from 'rxjs';\n\n/**\n * A basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n {provide: CDK_ACCORDION, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnInit, OnDestroy {\n accordion = inject<CdkAccordion>(CDK_ACCORDION, {optional: true, skipSelf: true})!;\n private _changeDetectorRef = inject(ChangeDetectorRef);\n protected _expansionDispatcher = inject(UniqueSelectionDispatcher);\n\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() readonly destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() readonly expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-child-');\n\n /** Whether the AccordionItem is expanded. */\n @Input({transform: booleanAttribute})\n get expanded(): boolean {\n return this._expanded;\n }\n set expanded(expanded: boolean) {\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input({transform: booleanAttribute})\n get disabled() {\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n ngOnInit() {\n this._removeUniqueSelectionListener = this._expansionDispatcher.listen(\n (id: string, accordionId: string) => {\n if (\n this.accordion &&\n !this.accordion.multi &&\n this.accordion.id === accordionId &&\n this.id !== id\n ) {\n this.expanded = false;\n }\n },\n );\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\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 {NgModule} from '@angular/core';\nimport {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n@NgModule({\n imports: [CdkAccordion, CdkAccordionItem],\n exports: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\n"],"names":[],"mappings":";;;;;;MA0Ba,aAAa,GAAG,IAAI,cAAc,CAAe,cAAc;MAU/D,YAAY,CAAA;AAEd,EAAA,aAAa,GAAG,IAAI,OAAO,EAAuB;AAGlD,EAAA,oBAAoB,GAAqB,IAAI,OAAO,EAAW;EAG/D,EAAE,GAAW,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;AAG5B,EAAA,KAAK,GAAY,KAAK;AAG5D,EAAA,OAAO,GAAA;IACL,IAAI,IAAI,CAAC,KAAK,EAAE;AACd,MAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;AACtC,IAAA;AACF,EAAA;AAGA,EAAA,QAAQ,GAAA;AACN,IAAA,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version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-item.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/accordion/accordion-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {Subject} from 'rxjs';\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges<this>>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-');\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input({transform: booleanAttribute}) multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n if (this.multi) {\n this._openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items. */\n closeAll(): void {\n this._openCloseAllActions.next(false);\n }\n\n ngOnChanges(changes: SimpleChanges<this>) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._openCloseAllActions.complete();\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 {\n Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n ChangeDetectorRef,\n booleanAttribute,\n inject,\n OnInit,\n signal,\n} from '@angular/core';\nimport {_IdGenerator} from '../a11y';\nimport {UniqueSelectionDispatcher} from '../collections';\nimport {CDK_ACCORDION, CdkAccordion} from './accordion';\nimport {Subscription} from 'rxjs';\n\n/**\n * A basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n // registering to the same accordion.\n {provide: CDK_ACCORDION, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnInit, OnDestroy {\n accordion = inject<CdkAccordion>(CDK_ACCORDION, {optional: true, skipSelf: true})!;\n private _changeDetectorRef = inject(ChangeDetectorRef);\n protected _expansionDispatcher = inject(UniqueSelectionDispatcher);\n\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() readonly destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() readonly expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = inject(_IdGenerator).getId('cdk-accordion-child-');\n\n /** Whether the AccordionItem is expanded. */\n @Input({transform: booleanAttribute})\n get expanded(): boolean {\n return this._expanded;\n }\n set expanded(expanded: boolean) {\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input({transform: booleanAttribute})\n get disabled() {\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n ngOnInit() {\n this._removeUniqueSelectionListener = this._expansionDispatcher.listen(\n (id: string, accordionId: string) => {\n if (\n this.accordion &&\n !this.accordion.multi &&\n this.accordion.id === accordionId &&\n this.id !== id\n ) {\n this.expanded = false;\n }\n },\n );\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\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 {NgModule} from '@angular/core';\nimport {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n@NgModule({\n imports: [CdkAccordion, CdkAccordionItem],\n exports: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\n"],"names":[],"mappings":";;;;;;MA0Ba,aAAa,GAAG,IAAI,cAAc,CAAe,cAAc;MAU/D,YAAY,CAAA;AAEd,EAAA,aAAa,GAAG,IAAI,OAAO,EAAuB;AAGlD,EAAA,oBAAoB,GAAqB,IAAI,OAAO,EAAW;EAG/D,EAAE,GAAW,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;AAG5B,EAAA,KAAK,GAAY,KAAK;AAG5D,EAAA,OAAO,GAAA;IACL,IAAI,IAAI,CAAC,KAAK,EAAE;AACd,MAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;AACtC,IAAA;AACF,EAAA;AAGA,EAAA,QAAQ,GAAA;AACN,IAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC;AACvC,EAAA;EAEA,WAAW,CAAC,OAA4B,EAAA;AACtC,IAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;AAClC,EAAA;AAEA,EAAA,WAAW,GAAA;AACT,IAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;AAC7B,IAAA,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;AACtC,EAAA;;;;;U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AAA,SAAS,EAAE,CAGT;AAAC,QAAA,OAAO,EAAE,aAAa;AAAE,QAAA,QAAQ,EAAE;OAAU;KAEhD;;;;YASE;;;YAEA;;;YAEA;;;YAOA;;;YAMA,KAAK;aAAC;AAAC,QAAA,SAAS,EAAE;OAAiB;;;YA8BnC,KAAK;aAAC;AAAC,QAAA,SAAS,EAAE;OAAiB;;;;;MC7EzB,kBAAkB,CAAA;;;;;UAAlB,kBAAkB;AAAA,IAAA,IAAA,EAAA,EAAA;AAAA,IAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA;AAAA,GAAA,CAAA;AAAlB,EAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA;AAAA,IAAA,UAAA,EAAA,QAAA;AAAA,IAAA,OAAA,EAAA,eAAA;AAAA,IAAA,QAAA,EAAA,EAAA;AAAA,IAAA,IAAA,EAAA,kBAAkB;cAHnB,YAAY,EAAE,gBAAgB,CAAA;AAAA,IAAA,OAAA,EAAA,CAC9B,YAAY,EAAE,gBAAgB;AAAA,GAAA,CAAA;;;;;UAE7B;AAAkB,GAAA,CAAA;;;;;;QAAlB,kBAAkB;AAAA,EAAA,UAAA,EAAA,CAAA;UAJ9B,QAAQ;AAAC,IAAA,IAAA,EAAA,CAAA;AACR,MAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AACzC,MAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB;KACzC;;;;"}
|
package/fesm2022/bidi.mjs
CHANGED
|
@@ -32,7 +32,7 @@ class Dir {
|
|
|
32
32
|
}
|
|
33
33
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
34
34
|
minVersion: "12.0.0",
|
|
35
|
-
version: "22.2.0-next.
|
|
35
|
+
version: "22.2.0-next.5",
|
|
36
36
|
ngImport: i0,
|
|
37
37
|
type: Dir,
|
|
38
38
|
deps: [],
|
|
@@ -40,7 +40,7 @@ class Dir {
|
|
|
40
40
|
});
|
|
41
41
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
42
42
|
minVersion: "14.0.0",
|
|
43
|
-
version: "22.2.0-next.
|
|
43
|
+
version: "22.2.0-next.5",
|
|
44
44
|
type: Dir,
|
|
45
45
|
isStandalone: true,
|
|
46
46
|
selector: "[dir]",
|
|
@@ -65,7 +65,7 @@ class Dir {
|
|
|
65
65
|
}
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({
|
|
67
67
|
minVersion: "12.0.0",
|
|
68
|
-
version: "22.2.0-next.
|
|
68
|
+
version: "22.2.0-next.5",
|
|
69
69
|
ngImport: i0,
|
|
70
70
|
type: Dir,
|
|
71
71
|
decorators: [{
|
|
@@ -96,7 +96,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
96
96
|
class BidiModule {
|
|
97
97
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
98
98
|
minVersion: "12.0.0",
|
|
99
|
-
version: "22.2.0-next.
|
|
99
|
+
version: "22.2.0-next.5",
|
|
100
100
|
ngImport: i0,
|
|
101
101
|
type: BidiModule,
|
|
102
102
|
deps: [],
|
|
@@ -104,7 +104,7 @@ class BidiModule {
|
|
|
104
104
|
});
|
|
105
105
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
106
106
|
minVersion: "14.0.0",
|
|
107
|
-
version: "22.2.0-next.
|
|
107
|
+
version: "22.2.0-next.5",
|
|
108
108
|
ngImport: i0,
|
|
109
109
|
type: BidiModule,
|
|
110
110
|
imports: [Dir],
|
|
@@ -112,14 +112,14 @@ class BidiModule {
|
|
|
112
112
|
});
|
|
113
113
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
114
114
|
minVersion: "12.0.0",
|
|
115
|
-
version: "22.2.0-next.
|
|
115
|
+
version: "22.2.0-next.5",
|
|
116
116
|
ngImport: i0,
|
|
117
117
|
type: BidiModule
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
i0.ɵɵngDeclareClassMetadata({
|
|
121
121
|
minVersion: "12.0.0",
|
|
122
|
-
version: "22.2.0-next.
|
|
122
|
+
version: "22.2.0-next.5",
|
|
123
123
|
ngImport: i0,
|
|
124
124
|
type: BidiModule,
|
|
125
125
|
decorators: [{
|
package/fesm2022/bidi.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/bidi/dir.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/bidi/bidi-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AfterContentInit,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n signal,\n} from '@angular/core';\n\nimport {Direction, Directionality, _resolveDirectionality} from './directionality';\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n@Directive({\n selector: '[dir]',\n providers: [{provide: Directionality, useExisting: Dir}],\n host: {'[attr.dir]': '_rawDir'},\n exportAs: 'dir',\n})\nexport class Dir implements Directionality, AfterContentInit, OnDestroy {\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Direction as passed in by the consumer. */\n _rawDir: string = '';\n\n /** Event emitted when the direction changes. */\n @Output('dirChange') readonly change = new EventEmitter<Direction>();\n\n /** @docs-private */\n @Input()\n get dir(): Direction {\n return this.valueSignal();\n }\n set dir(value: Direction | 'auto') {\n const previousValue = this.valueSignal();\n\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this.valueSignal.set(_resolveDirectionality(value));\n this._rawDir = value;\n\n if (previousValue !== this.valueSignal() && this._isInitialized) {\n this.change.emit(this.valueSignal());\n }\n }\n\n /** Current layout direction of the element. */\n get value(): Direction {\n return this.dir;\n }\n\n readonly valueSignal = signal<Direction>('ltr');\n\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n@NgModule({\n imports: [Dir],\n exports: [Dir],\n})\nexport class BidiModule {}\n"],"names":[],"mappings":";;;;;MAgCa,GAAG,CAAA;AAEN,EAAA,cAAc,GAAY,KAAK;AAGvC,EAAA,OAAO,GAAW,EAAE;AAGU,EAAA,MAAM,GAAG,IAAI,YAAY,EAAa;AAGpE,EAAA,IACI,GAAG,GAAA;AACL,IAAA,OAAO,IAAI,CAAC,WAAW,EAAE;AAC3B,EAAA;EACA,IAAI,GAAG,CAAC,KAAyB,EAAA;AAC/B,IAAA,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE;IAKxC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,CAAC,OAAO,GAAG,KAAK;IAEpB,IAAI,aAAa,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE;MAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AACtC,IAAA;AACF,EAAA;AAGA,EAAA,IAAI,KAAK,GAAA;IACP,OAAO,IAAI,CAAC,GAAG;AACjB,EAAA;EAES,WAAW,GAAG,MAAM,CAAY,KAAK;;WAAC;AAG/C,EAAA,kBAAkB,GAAA;IAChB,IAAI,CAAC,cAAc,GAAG,IAAI;AAC5B,EAAA;AAEA,EAAA,WAAW,GAAA;AACT,IAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;AACxB,E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,QAAQ;AAAC,IAAA,IAAA,EAAA,CAAA;MACR,OAAO,EAAE,CAAC,GAAG,CAAC;MACd,OAAO,EAAE,CAAC,GAAG;KACd
|
|
1
|
+
{"version":3,"file":"bidi.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/bidi/dir.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/bidi/bidi-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AfterContentInit,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n signal,\n} from '@angular/core';\n\nimport {Direction, Directionality, _resolveDirectionality} from './directionality';\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n@Directive({\n selector: '[dir]',\n providers: [{provide: Directionality, useExisting: Dir}],\n host: {'[attr.dir]': '_rawDir'},\n exportAs: 'dir',\n})\nexport class Dir implements Directionality, AfterContentInit, OnDestroy {\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Direction as passed in by the consumer. */\n _rawDir: string = '';\n\n /** Event emitted when the direction changes. */\n @Output('dirChange') readonly change = new EventEmitter<Direction>();\n\n /** @docs-private */\n @Input()\n get dir(): Direction {\n return this.valueSignal();\n }\n set dir(value: Direction | 'auto') {\n const previousValue = this.valueSignal();\n\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this.valueSignal.set(_resolveDirectionality(value));\n this._rawDir = value;\n\n if (previousValue !== this.valueSignal() && this._isInitialized) {\n this.change.emit(this.valueSignal());\n }\n }\n\n /** Current layout direction of the element. */\n get value(): Direction {\n return this.dir;\n }\n\n readonly valueSignal = signal<Direction>('ltr');\n\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n@NgModule({\n imports: [Dir],\n exports: [Dir],\n})\nexport class BidiModule {}\n"],"names":[],"mappings":";;;;;MAgCa,GAAG,CAAA;AAEN,EAAA,cAAc,GAAY,KAAK;AAGvC,EAAA,OAAO,GAAW,EAAE;AAGU,EAAA,MAAM,GAAG,IAAI,YAAY,EAAa;AAGpE,EAAA,IACI,GAAG,GAAA;AACL,IAAA,OAAO,IAAI,CAAC,WAAW,EAAE;AAC3B,EAAA;EACA,IAAI,GAAG,CAAC,KAAyB,EAAA;AAC/B,IAAA,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE;IAKxC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,CAAC,OAAO,GAAG,KAAK;IAEpB,IAAI,aAAa,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE;MAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AACtC,IAAA;AACF,EAAA;AAGA,EAAA,IAAI,KAAK,GAAA;IACP,OAAO,IAAI,CAAC,GAAG;AACjB,EAAA;EAES,WAAW,GAAG,MAAM,CAAY,KAAK;;WAAC;AAG/C,EAAA,kBAAkB,GAAA;IAChB,IAAI,CAAC,cAAc,GAAG,IAAI;AAC5B,EAAA;AAEA,EAAA,WAAW,GAAA;AACT,IAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;AACxB,EAAA;;;;;UA3CW,GAAG;AAAA,IAAA,IAAA,EAAA,EAAA;AAAA,IAAA,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G,CAAC;MACd,OAAO,EAAE,CAAC,GAAG;KACd;;;;"}
|
package/fesm2022/cdk.mjs
CHANGED
package/fesm2022/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/version.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 {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('22.2.0-next.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/version.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 {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('22.2.0-next.5');\n"],"names":[],"mappings":";;MAWa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;"}
|
package/fesm2022/clipboard.mjs
CHANGED
|
@@ -54,7 +54,7 @@ class Clipboard {
|
|
|
54
54
|
}
|
|
55
55
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
56
|
minVersion: "12.0.0",
|
|
57
|
-
version: "22.2.0-next.
|
|
57
|
+
version: "22.2.0-next.5",
|
|
58
58
|
ngImport: i0,
|
|
59
59
|
type: Clipboard,
|
|
60
60
|
deps: [],
|
|
@@ -62,14 +62,14 @@ class Clipboard {
|
|
|
62
62
|
});
|
|
63
63
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
64
64
|
minVersion: "22.0.0",
|
|
65
|
-
version: "22.2.0-next.
|
|
65
|
+
version: "22.2.0-next.5",
|
|
66
66
|
ngImport: i0,
|
|
67
67
|
type: Clipboard
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
i0.ɵɵngDeclareClassMetadata({
|
|
71
71
|
minVersion: "12.0.0",
|
|
72
|
-
version: "22.2.0-next.
|
|
72
|
+
version: "22.2.0-next.5",
|
|
73
73
|
ngImport: i0,
|
|
74
74
|
type: Clipboard,
|
|
75
75
|
decorators: [{
|
|
@@ -127,7 +127,7 @@ class CdkCopyToClipboard {
|
|
|
127
127
|
}
|
|
128
128
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
129
129
|
minVersion: "12.0.0",
|
|
130
|
-
version: "22.2.0-next.
|
|
130
|
+
version: "22.2.0-next.5",
|
|
131
131
|
ngImport: i0,
|
|
132
132
|
type: CdkCopyToClipboard,
|
|
133
133
|
deps: [],
|
|
@@ -135,7 +135,7 @@ class CdkCopyToClipboard {
|
|
|
135
135
|
});
|
|
136
136
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
137
137
|
minVersion: "14.0.0",
|
|
138
|
-
version: "22.2.0-next.
|
|
138
|
+
version: "22.2.0-next.5",
|
|
139
139
|
type: CdkCopyToClipboard,
|
|
140
140
|
isStandalone: true,
|
|
141
141
|
selector: "[cdkCopyToClipboard]",
|
|
@@ -156,7 +156,7 @@ class CdkCopyToClipboard {
|
|
|
156
156
|
}
|
|
157
157
|
i0.ɵɵngDeclareClassMetadata({
|
|
158
158
|
minVersion: "12.0.0",
|
|
159
|
-
version: "22.2.0-next.
|
|
159
|
+
version: "22.2.0-next.5",
|
|
160
160
|
ngImport: i0,
|
|
161
161
|
type: CdkCopyToClipboard,
|
|
162
162
|
decorators: [{
|
|
@@ -188,7 +188,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
188
188
|
class ClipboardModule {
|
|
189
189
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
190
190
|
minVersion: "12.0.0",
|
|
191
|
-
version: "22.2.0-next.
|
|
191
|
+
version: "22.2.0-next.5",
|
|
192
192
|
ngImport: i0,
|
|
193
193
|
type: ClipboardModule,
|
|
194
194
|
deps: [],
|
|
@@ -196,7 +196,7 @@ class ClipboardModule {
|
|
|
196
196
|
});
|
|
197
197
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
198
198
|
minVersion: "14.0.0",
|
|
199
|
-
version: "22.2.0-next.
|
|
199
|
+
version: "22.2.0-next.5",
|
|
200
200
|
ngImport: i0,
|
|
201
201
|
type: ClipboardModule,
|
|
202
202
|
imports: [CdkCopyToClipboard],
|
|
@@ -204,14 +204,14 @@ class ClipboardModule {
|
|
|
204
204
|
});
|
|
205
205
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
206
206
|
minVersion: "12.0.0",
|
|
207
|
-
version: "22.2.0-next.
|
|
207
|
+
version: "22.2.0-next.5",
|
|
208
208
|
ngImport: i0,
|
|
209
209
|
type: ClipboardModule
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
i0.ɵɵngDeclareClassMetadata({
|
|
213
213
|
minVersion: "12.0.0",
|
|
214
|
-
version: "22.2.0-next.
|
|
214
|
+
version: "22.2.0-next.5",
|
|
215
215
|
ngImport: i0,
|
|
216
216
|
type: ClipboardModule,
|
|
217
217
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/pending-copy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/copy-to-clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/clipboard-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a re-layout. This re-layout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * re-layout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement | undefined;\n\n constructor(\n text: string,\n private readonly _document: Document,\n ) {\n const textarea = (this._textarea = this._document.createElement('textarea'));\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).\n textarea.readOnly = true;\n // The element needs to be inserted into the fullscreen container, if the page\n // is in fullscreen mode, otherwise the browser won't execute the copy command.\n (this._document.fullscreenElement || this._document.body).appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try {\n // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n textarea.remove();\n this._textarea = undefined;\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 {Service, inject, DOCUMENT} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n/**\n * A service for copying text to the clipboard.\n */\n@Service()\nexport class Clipboard {\n private readonly _document = inject(DOCUMENT);\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\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 {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken<CdkCopyToClipboardConfig>(\n 'CDK_COPY_TO_CLIPBOARD_CONFIG',\n);\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n },\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n private _clipboard = inject(Clipboard);\n private _ngZone = inject(NgZone);\n\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content. Attempts\n * are cappted out at 50.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') readonly copied = new EventEmitter<boolean>();\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed = false;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor() {\n const config = inject(CDK_COPY_TO_CLIPBOARD_CONFIG, {optional: true});\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n // Avoid triggering an infinite loop if a large number of attempts is passed in.\n attempts = Math.min(attempts, 50);\n\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n imports: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {}\n"],"names":[],"mappings":";;;MAqBa,WAAW,CAAA;EAKH,SAAA;EA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;UAAf,eAAe;IAAA,OAAA,EAAA,CAHhB,kBAAkB,CAAA;IAAA,OAAA,EAAA,CAClB,kBAAkB;AAAA,GAAA,CAAA;;;;;UAEjB;AAAe,GAAA,CAAA;;;;;;QAAf,eAAe;AAAA,EAAA,UAAA,EAAA,CAAA;UAJ3B,QAAQ;AAAC,IAAA,IAAA,EAAA,CAAA;MACR,OAAO,EAAE,CAAC,kBAAkB,CAAC;MAC7B,OAAO,EAAE,CAAC,kBAAkB;KAC7B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"clipboard.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/pending-copy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/copy-to-clipboard.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/clipboard/clipboard-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a re-layout. This re-layout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * re-layout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement | undefined;\n\n constructor(\n text: string,\n private readonly _document: Document,\n ) {\n const textarea = (this._textarea = this._document.createElement('textarea'));\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).\n textarea.readOnly = true;\n // The element needs to be inserted into the fullscreen container, if the page\n // is in fullscreen mode, otherwise the browser won't execute the copy command.\n (this._document.fullscreenElement || this._document.body).appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try {\n // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n textarea.remove();\n this._textarea = undefined;\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 {Service, inject, DOCUMENT} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n/**\n * A service for copying text to the clipboard.\n */\n@Service()\nexport class Clipboard {\n private readonly _document = inject(DOCUMENT);\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\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 {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken<CdkCopyToClipboardConfig>(\n 'CDK_COPY_TO_CLIPBOARD_CONFIG',\n);\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n },\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n private _clipboard = inject(Clipboard);\n private _ngZone = inject(NgZone);\n\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content. Attempts\n * are cappted out at 50.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') readonly copied = new EventEmitter<boolean>();\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed = false;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor() {\n const config = inject(CDK_COPY_TO_CLIPBOARD_CONFIG, {optional: true});\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n // Avoid triggering an infinite loop if a large number of attempts is passed in.\n attempts = Math.min(attempts, 50);\n\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n imports: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {}\n"],"names":[],"mappings":";;;MAqBa,WAAW,CAAA;EAKH,SAAA;EAJX,SAAS;AAEjB,EAAA,WAAA,CACE,IAAY,EACK,SAAmB,EAAA;IAAnB,IAAA,CAAA,SAAS,GAAT,SAAS;AAE1B,IAAA,MAAM,QAAQ,GAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAE;AAC5E,IAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK;IAK7B,MAAM,CAAC,QAAQ,GAAG,OAAO;AACzB,IAAA,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG;IACjC,MAAM,CAAC,IAAI,GAAG,QAAQ;AACtB,IAAA,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,MA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cesContent":["/**\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 {Observable, isObservable, of as observableOf} from 'rxjs';\n\n/**\n * Given either an Observable or non-Observable value, returns either the original\n * Observable, or wraps it in an Observable that emits the non-Observable value.\n */\nexport function coerceObservable<T>(data: T | Observable<T>): Observable<T> {\n if (!isObservable(data)) {\n return observableOf(data);\n }\n return data;\n}\n"],"names":["observableOf"],"mappings":";;AAaM,SAAU,gBAAgB,CAAI,IAAuB,EAAA;AACzD,EAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;IACvB,OAAOA,EAAY,CAAC,IAAI,CAAC;AAC3B,EAAA;AACA,EAAA,OAAO,IAAI;AACb
|
|
1
|
+
{"version":3,"file":"coercion-private.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/coercion/private/observable.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 */\nimport {Observable, isObservable, of as observableOf} from 'rxjs';\n\n/**\n * Given either an Observable or non-Observable value, returns either the original\n * Observable, or wraps it in an Observable that emits the non-Observable value.\n */\nexport function coerceObservable<T>(data: T | Observable<T>): Observable<T> {\n if (!isObservable(data)) {\n return observableOf(data);\n }\n return data;\n}\n"],"names":["observableOf"],"mappings":";;AAaM,SAAU,gBAAgB,CAAI,IAAuB,EAAA;AACzD,EAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;IACvB,OAAOA,EAAY,CAAC,IAAI,CAAC;AAC3B,EAAA;AACA,EAAA,OAAO,IAAI;AACb;;"}
|