@angular/cdk 21.0.0-rc.0 → 21.0.0-rc.2
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.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.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.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.map +1 -1
- package/fesm2022/_id-generator-chunk.mjs +3 -2
- 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 +50 -33
- package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
- package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
- 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.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.map +1 -1
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/coercion-private.mjs.map +1 -1
- package/fesm2022/coercion.mjs.map +1 -1
- package/fesm2022/dialog.mjs +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/keycodes.mjs.map +1 -1
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers-private.mjs.map +1 -1
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +1 -1
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
- package/fesm2022/testing-testbed.mjs.map +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/overlay/_index.scss +8 -1
- package/overlay-prebuilt.css +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_overlay-module-chunk.d.ts +16 -6
- package/types/a11y.d.ts +3 -1
- package/types/overlay.d.ts +11 -9
package/fesm2022/testing.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/change-detection.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/component-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/harness-environment.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/test-element.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/text-filtering.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 {BehaviorSubject, Subscription} from 'rxjs';\n\n/**\n * The status of the test harness auto change detection. If not diabled test harnesses will\n * automatically trigger change detection after every action (such as a click) and before every read\n * (such as getting the text of an element).\n */\nexport interface AutoChangeDetectionStatus {\n /** Whether auto change detection is disabled. */\n isDisabled: boolean;\n /**\n * An optional callback, if present it indicates that change detection should be run immediately,\n * while handling the status change. The callback should then be called as soon as change\n * detection is done.\n */\n onDetectChangesNow?: () => void;\n}\n\n/** Subject used to dispatch and listen for changes to the auto change detection status . */\nconst autoChangeDetectionSubject = new BehaviorSubject<AutoChangeDetectionStatus>({\n isDisabled: false,\n});\n\n/** The current subscription to `autoChangeDetectionSubject`. */\nlet autoChangeDetectionSubscription: Subscription | null;\n\n/**\n * The default handler for auto change detection status changes. This handler will be used if the\n * specific environment does not install its own.\n * @param status The new auto change detection status.\n */\nfunction defaultAutoChangeDetectionHandler(status: AutoChangeDetectionStatus) {\n status.onDetectChangesNow?.();\n}\n\n/**\n * Allows a test `HarnessEnvironment` to install its own handler for auto change detection status\n * changes.\n * @param handler The handler for the auto change detection status.\n */\nexport function handleAutoChangeDetectionStatus(\n handler: (status: AutoChangeDetectionStatus) => void,\n) {\n stopHandlingAutoChangeDetectionStatus();\n autoChangeDetectionSubscription = autoChangeDetectionSubject.subscribe(handler);\n}\n\n/** Allows a `HarnessEnvironment` to stop handling auto change detection status changes. */\nexport function stopHandlingAutoChangeDetectionStatus() {\n autoChangeDetectionSubscription?.unsubscribe();\n autoChangeDetectionSubscription = null;\n}\n\n/**\n * Batches together triggering of change detection over the duration of the given function.\n * @param fn The function to call with batched change detection.\n * @param triggerBeforeAndAfter Optionally trigger change detection once before and after the batch\n * operation. If false, change detection will not be triggered.\n * @return The result of the given function.\n */\nasync function batchChangeDetection<T>(fn: () => Promise<T>, triggerBeforeAndAfter: boolean) {\n // If change detection batching is already in progress, just run the function.\n if (autoChangeDetectionSubject.getValue().isDisabled) {\n return await fn();\n }\n\n // If nothing is handling change detection batching, install the default handler.\n if (!autoChangeDetectionSubscription) {\n handleAutoChangeDetectionStatus(defaultAutoChangeDetectionHandler);\n }\n\n if (triggerBeforeAndAfter) {\n await new Promise(resolve =>\n autoChangeDetectionSubject.next({\n isDisabled: true,\n onDetectChangesNow: resolve as () => void,\n }),\n );\n // The function passed in may throw (e.g. if the user wants to make an expectation of an error\n // being thrown. If this happens, we need to make sure we still re-enable change detection, so\n // we wrap it in a `finally` block.\n try {\n return await fn();\n } finally {\n await new Promise(resolve =>\n autoChangeDetectionSubject.next({\n isDisabled: false,\n onDetectChangesNow: resolve as () => void,\n }),\n );\n }\n } else {\n autoChangeDetectionSubject.next({isDisabled: true});\n // The function passed in may throw (e.g. if the user wants to make an expectation of an error\n // being thrown. If this happens, we need to make sure we still re-enable change detection, so\n // we wrap it in a `finally` block.\n try {\n return await fn();\n } finally {\n autoChangeDetectionSubject.next({isDisabled: false});\n }\n }\n}\n\n/**\n * Disables the harness system's auto change detection for the duration of the given function.\n * @param fn The function to disable auto change detection for.\n * @return The result of the given function.\n */\nexport async function manualChangeDetection<T>(fn: () => Promise<T>) {\n return batchChangeDetection(fn, false);\n}\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2, T3, T4, T5>(\n values: () => [\n T1 | PromiseLike<T1>,\n T2 | PromiseLike<T2>,\n T3 | PromiseLike<T3>,\n T4 | PromiseLike<T4>,\n T5 | PromiseLike<T5>,\n ],\n): Promise<[T1, T2, T3, T4, T5]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2, T3, T4>(\n values: () => [\n T1 | PromiseLike<T1>,\n T2 | PromiseLike<T2>,\n T3 | PromiseLike<T3>,\n T4 | PromiseLike<T4>,\n ],\n): Promise<[T1, T2, T3, T4]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2, T3>(\n values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>],\n): Promise<[T1, T2, T3]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2>(\n values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>],\n): Promise<[T1, T2]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport async function parallel<T>(values: () => Iterable<T | PromiseLike<T>>): Promise<T[]> {\n return batchChangeDetection(() => Promise.all(values()), true);\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 {parallel} from './change-detection';\nimport {TestElement} from './test-element';\n\n/**\n * An async function that returns a promise when called.\n * @deprecated This was just an alias for `() => Promise<T>`. Use that instead.\n * @breaking-change 21.0.0 Remove this alias.\n * @docs-private\n */\nexport type AsyncFactoryFn<T> = () => Promise<T>;\n\n/** An async function that takes an item and returns a boolean promise */\nexport type AsyncPredicate<T> = (item: T) => Promise<boolean>;\n\n/** An async function that takes an item and an option value and returns a boolean promise. */\nexport type AsyncOptionPredicate<T, O> = (item: T, option: O) => Promise<boolean>;\n\n/**\n * A query for a `ComponentHarness`, which is expressed as either a `ComponentHarnessConstructor` or\n * a `HarnessPredicate`.\n */\nexport type HarnessQuery<T extends ComponentHarness> =\n | ComponentHarnessConstructor<T>\n | HarnessPredicate<T>;\n\n/**\n * The result type obtained when searching using a particular list of queries. This type depends on\n * the particular items being queried.\n * - If one of the queries is for a `ComponentHarnessConstructor<C1>`, it means that the result\n * might be a harness of type `C1`\n * - If one of the queries is for a `HarnessPredicate<C2>`, it means that the result might be a\n * harness of type `C2`\n * - If one of the queries is for a `string`, it means that the result might be a `TestElement`.\n *\n * Since we don't know for sure which query will match, the result type if the union of the types\n * for all possible results.\n *\n * @usageNotes\n * ### Example\n *\n * The type:\n * ```ts\n * LocatorFnResult<[\n * ComponentHarnessConstructor<MyHarness>,\n * HarnessPredicate<MyOtherHarness>,\n * string\n * ]>\n * ```\n *\n * is equivalent to:\n *\n * ```ts\n * MyHarness | MyOtherHarness | TestElement\n * ```\n */\nexport type LocatorFnResult<T extends (HarnessQuery<any> | string)[]> = {\n [I in keyof T]: T[I] extends new (...args: any[]) => infer C // Map `ComponentHarnessConstructor<C>` to `C`.\n ? C\n : // Map `HarnessPredicate<C>` to `C`.\n T[I] extends {harnessType: new (...args: any[]) => infer C}\n ? C\n : // Map `string` to `TestElement`.\n T[I] extends string\n ? TestElement\n : // Map everything else to `never` (should not happen due to the type constraint on `T`).\n never;\n}[number];\n\n/**\n * Interface used to load ComponentHarness objects. This interface is used by test authors to\n * instantiate `ComponentHarness`es.\n */\nexport interface HarnessLoader {\n /**\n * Searches for an element with the given selector under the current instances's root element,\n * and returns a `HarnessLoader` rooted at the matching element. If multiple elements match the\n * selector, the first is used. If no elements match, an error is thrown.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A `HarnessLoader` rooted at the element matching the given selector.\n * @throws If a matching element can't be found.\n */\n getChildLoader(selector: string): Promise<HarnessLoader>;\n\n /**\n * Searches for all elements with the given selector under the current instances's root element,\n * and returns an array of `HarnessLoader`s, one for each matching element, rooted at that\n * element.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A list of `HarnessLoader`s, one for each matching element, rooted at that element.\n */\n getAllChildLoaders(selector: string): Promise<HarnessLoader[]>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a `ComponentHarness` for that instance. If multiple\n * matching components are found, a harness for the first one is returned. If no matching\n * component is found, an error is thrown.\n * @param query A query for a harness to create\n * @return An instance of the given harness type\n * @throws If a matching component instance can't be found.\n */\n getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a `ComponentHarness` for that instance. If multiple\n * matching components are found, a harness for the first one is returned. If no matching\n * component is found, null is returned.\n * @param query A query for a harness to create\n * @return An instance of the given harness type (or null if not found).\n */\n getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a `ComponentHarness` for the instance on the page\n * at the given index. If no matching component exists at that index, an error is thrown.\n * @param query A query for a harness to create\n * @param index The zero-indexed offset of the matching component instance to return\n * @return An instance of the given harness type.\n * @throws If a matching component instance can't be found at the given index.\n */\n getHarnessAtIndex<T extends ComponentHarness>(query: HarnessQuery<T>, index: number): Promise<T>;\n\n /**\n * Searches for all instances of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a list `ComponentHarness` for each instance.\n * @param query A query for a harness to create\n * @return A list instances of the given harness type.\n */\n getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;\n\n /**\n * Searches for all instances of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns the total count of all matching components.\n * @param query A query for a harness to create\n * @return An integer indicating the number of instances that were found.\n */\n countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a boolean indicating if any were found.\n * @param query A query for a harness to create\n * @return A boolean indicating if an instance was found.\n */\n hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean>;\n}\n\n/**\n * Interface used to create asynchronous locator functions used find elements and component\n * harnesses. This interface is used by `ComponentHarness` authors to create locator functions for\n * their `ComponentHarness` subclass.\n */\nexport interface LocatorFactory {\n /** Gets a locator factory rooted at the document root. */\n documentRootLocatorFactory(): LocatorFactory;\n\n /** The root element of this `LocatorFactory` as a `TestElement`. */\n rootElement: TestElement;\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `LocatorFactory`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorFor(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorFor('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorFor('span')() // Throws because the `Promise` rejects\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for\n * each query.\n */\n locatorFor<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>>;\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `LocatorFactory`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorForOptional(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorForOptional('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorForOptional('span')() // Gets `null`\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all\n * result types for each query or null.\n */\n locatorForOptional<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T> | null>;\n\n /**\n * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances\n * or elements under the root element of this `LocatorFactory`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` and\n * `IdIsD1Harness.hostSelector` is `'#d1'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * // Gets [DivHarness for #d1, TestElement for #d1, DivHarness for #d2, TestElement for #d2]\n * await lf.locatorForAll(DivHarness, 'div')()\n * // Gets [TestElement for #d1, TestElement for #d2]\n * await lf.locatorForAll('div', '#d1')()\n * // Gets [DivHarness for #d1, IdIsD1Harness for #d1, DivHarness for #d2]\n * await lf.locatorForAll(DivHarness, IdIsD1Harness)()\n * // Gets []\n * await lf.locatorForAll('span')()\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for all\n * elements and harnesses matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If an element matches more than\n * one `ComponentHarness` class, the locator gets an instance of each for the same element. If\n * an element matches multiple `string` selectors, only one `TestElement` instance is returned\n * for that element. The type that the `Promise` resolves to is an array where each element is\n * the union of all result types for each query.\n */\n locatorForAll<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>[]>;\n\n /** @return A `HarnessLoader` rooted at the root element of this `LocatorFactory`. */\n rootHarnessLoader(): Promise<HarnessLoader>;\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `LocatorFactory`.\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector.\n * @throws If no matching element is found for the given selector.\n */\n harnessLoaderFor(selector: string): Promise<HarnessLoader>;\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `LocatorFactory`\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector, or null if\n * no matching element is found.\n */\n harnessLoaderForOptional(selector: string): Promise<HarnessLoader | null>;\n\n /**\n * Gets a list of `HarnessLoader` instances, one for each matching element.\n * @param selector The selector for the root element.\n * @return A list of `HarnessLoader`, one rooted at each element matching the given selector.\n */\n harnessLoaderForAll(selector: string): Promise<HarnessLoader[]>;\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n forceStabilize(): Promise<void>;\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n waitForTasksOutsideAngular(): Promise<void>;\n}\n\n/**\n * Base class for component test harnesses that all component harness authors should extend. This\n * base component harness provides the basic ability to locate element and sub-component harnesses.\n */\nexport abstract class ComponentHarness {\n constructor(protected readonly locatorFactory: LocatorFactory) {}\n\n /** Gets a `Promise` for the `TestElement` representing the host element of the component. */\n async host(): Promise<TestElement> {\n return this.locatorFactory.rootElement;\n }\n\n /**\n * Gets a `LocatorFactory` for the document root element. This factory can be used to create\n * locators for elements that a component creates outside of its own root element. (e.g. by\n * appending to document.body).\n */\n protected documentRootLocatorFactory(): LocatorFactory {\n return this.locatorFactory.documentRootLocatorFactory();\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the host element of this `ComponentHarness`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await ch.locatorFor(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await ch.locatorFor('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await ch.locatorFor('span')() // Throws because the `Promise` rejects\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for\n * each query.\n */\n protected locatorFor<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>> {\n return this.locatorFactory.locatorFor(...queries);\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the host element of this `ComponentHarness`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await ch.locatorForOptional(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await ch.locatorForOptional('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await ch.locatorForOptional('span')() // Gets `null`\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all\n * result types for each query or null.\n */\n protected locatorForOptional<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T> | null> {\n return this.locatorFactory.locatorForOptional(...queries);\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances\n * or elements under the host element of this `ComponentHarness`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` and\n * `IdIsD1Harness.hostSelector` is `'#d1'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * // Gets [DivHarness for #d1, TestElement for #d1, DivHarness for #d2, TestElement for #d2]\n * await ch.locatorForAll(DivHarness, 'div')()\n * // Gets [TestElement for #d1, TestElement for #d2]\n * await ch.locatorForAll('div', '#d1')()\n * // Gets [DivHarness for #d1, IdIsD1Harness for #d1, DivHarness for #d2]\n * await ch.locatorForAll(DivHarness, IdIsD1Harness)()\n * // Gets []\n * await ch.locatorForAll('span')()\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for all\n * elements and harnesses matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If an element matches more than\n * one `ComponentHarness` class, the locator gets an instance of each for the same element. If\n * an element matches multiple `string` selectors, only one `TestElement` instance is returned\n * for that element. The type that the `Promise` resolves to is an array where each element is\n * the union of all result types for each query.\n */\n protected locatorForAll<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>[]> {\n return this.locatorFactory.locatorForAll(...queries);\n }\n\n /**\n * Flushes change detection and async tasks in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n protected async forceStabilize() {\n return this.locatorFactory.forceStabilize();\n }\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n protected async waitForTasksOutsideAngular() {\n return this.locatorFactory.waitForTasksOutsideAngular();\n }\n}\n\n/**\n * Base class for component harnesses that authors should extend if they anticipate that consumers\n * of the harness may want to access other harnesses within the `<ng-content>` of the component.\n */\nexport abstract class ContentContainerComponentHarness<S extends string = string>\n extends ComponentHarness\n implements HarnessLoader\n{\n /**\n * Gets a `HarnessLoader` that searches for harnesses under the first element matching the given\n * selector within the current harness's content.\n * @param selector The selector for an element in the component's content.\n * @returns A `HarnessLoader` that searches for harnesses under the given selector.\n */\n async getChildLoader(selector: S): Promise<HarnessLoader> {\n return (await this.getRootHarnessLoader()).getChildLoader(selector);\n }\n\n /**\n * Gets a list of `HarnessLoader` for each element matching the given selector under the current\n * harness's cotnent that searches for harnesses under that element.\n * @param selector The selector for elements in the component's content.\n * @returns A list of `HarnessLoader` for each element matching the given selector.\n */\n async getAllChildLoaders(selector: S): Promise<HarnessLoader[]> {\n return (await this.getRootHarnessLoader()).getAllChildLoaders(selector);\n }\n\n /**\n * Gets the first matching harness for the given query within the current harness's content.\n * @param query The harness query to search for.\n * @returns The first harness matching the given query.\n * @throws If no matching harness is found.\n */\n async getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T> {\n return (await this.getRootHarnessLoader()).getHarness(query);\n }\n\n /**\n * Gets the first matching harness for the given query within the current harness's content.\n * @param query The harness query to search for.\n * @returns The first harness matching the given query, or null if none is found.\n */\n async getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null> {\n return (await this.getRootHarnessLoader()).getHarnessOrNull(query);\n }\n\n /**\n * Gets a matching harness for the given query and index within the current harness's content.\n * @param query The harness query to search for.\n * @param index The zero-indexed offset of the component to find.\n * @returns The first harness matching the given query.\n * @throws If no matching harness is found.\n */\n async getHarnessAtIndex<T extends ComponentHarness>(\n query: HarnessQuery<T>,\n index: number,\n ): Promise<T> {\n return (await this.getRootHarnessLoader()).getHarnessAtIndex(query, index);\n }\n\n /**\n * Gets all matching harnesses for the given query within the current harness's content.\n * @param query The harness query to search for.\n * @returns The list of harness matching the given query.\n */\n async getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]> {\n return (await this.getRootHarnessLoader()).getAllHarnesses(query);\n }\n\n /**\n * Returns the number of matching harnesses for the given query within the current harness's\n * content.\n *\n * @param query The harness query to search for.\n * @returns The number of matching harnesses for the given query.\n */\n async countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number> {\n return (await this.getRootHarnessLoader()).countHarnesses(query);\n }\n\n /**\n * Checks whether there is a matching harnesses for the given query within the current harness's\n * content.\n *\n * @param query The harness query to search for.\n * @returns Whether there is matching harnesses for the given query.\n */\n async hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean> {\n return (await this.getRootHarnessLoader()).hasHarness(query);\n }\n\n /**\n * Gets the root harness loader from which to start\n * searching for content contained by this harness.\n */\n protected async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.locatorFactory.rootHarnessLoader();\n }\n}\n\n/**\n * Constructor for a ComponentHarness subclass. To be a valid ComponentHarnessConstructor, the\n * class must also have a static `hostSelector` property.\n */\nexport interface ComponentHarnessConstructor<T extends ComponentHarness> {\n new (locatorFactory: LocatorFactory): T;\n\n /**\n * `ComponentHarness` subclasses must specify a static `hostSelector` property that is used to\n * find the host element for the corresponding component. This property should match the selector\n * for the Angular component.\n */\n hostSelector: string;\n}\n\n/** A set of criteria that can be used to filter a list of `ComponentHarness` instances. */\nexport interface BaseHarnessFilters {\n /** Only find instances whose host element matches the given selector. */\n selector?: string;\n /** Only find instances that are nested under an element with the given selector. */\n ancestor?: string;\n}\n\n/**\n * A class used to associate a ComponentHarness class with predicate functions that can be used to\n * filter instances of the class to be matched.\n */\nexport class HarnessPredicate<T extends ComponentHarness> {\n private _predicates: AsyncPredicate<T>[] = [];\n private _descriptions: string[] = [];\n private _ancestor: string;\n\n constructor(\n public harnessType: ComponentHarnessConstructor<T>,\n options: BaseHarnessFilters,\n ) {\n this._addBaseOptions(options);\n }\n\n /**\n * Checks if the specified nullable string value matches the given pattern.\n * @param value The nullable string value to check, or a Promise resolving to the\n * nullable string value.\n * @param pattern The pattern the value is expected to match. If `pattern` is a string,\n * `value` is expected to match exactly. If `pattern` is a regex, a partial match is\n * allowed. If `pattern` is `null`, the value is expected to be `null`.\n * @return Whether the value matches the pattern.\n */\n static async stringMatches(\n value: string | null | Promise<string | null>,\n pattern: string | RegExp | null,\n ): Promise<boolean> {\n value = await value;\n if (pattern === null) {\n return value === null;\n } else if (value === null) {\n return false;\n }\n return typeof pattern === 'string' ? value === pattern : pattern.test(value);\n }\n\n /**\n * Adds a predicate function to be run against candidate harnesses.\n * @param description A description of this predicate that may be used in error messages.\n * @param predicate An async predicate function.\n * @return this (for method chaining).\n */\n add(description: string, predicate: AsyncPredicate<T>) {\n this._descriptions.push(description);\n this._predicates.push(predicate);\n return this;\n }\n\n /**\n * Adds a predicate function that depends on an option value to be run against candidate\n * harnesses. If the option value is undefined, the predicate will be ignored.\n * @param name The name of the option (may be used in error messages).\n * @param option The option value.\n * @param predicate The predicate function to run if the option value is not undefined.\n * @return this (for method chaining).\n */\n addOption<O>(name: string, option: O | undefined, predicate: AsyncOptionPredicate<T, O>) {\n if (option !== undefined) {\n this.add(`${name} = ${_valueAsString(option)}`, item => predicate(item, option));\n }\n return this;\n }\n\n /**\n * Filters a list of harnesses on this predicate.\n * @param harnesses The list of harnesses to filter.\n * @return A list of harnesses that satisfy this predicate.\n */\n async filter(harnesses: T[]): Promise<T[]> {\n if (harnesses.length === 0) {\n return [];\n }\n const results = await parallel(() => harnesses.map(h => this.evaluate(h)));\n return harnesses.filter((_, i) => results[i]);\n }\n\n /**\n * Evaluates whether the given harness satisfies this predicate.\n * @param harness The harness to check\n * @return A promise that resolves to true if the harness satisfies this predicate,\n * and resolves to false otherwise.\n */\n async evaluate(harness: T): Promise<boolean> {\n const results = await parallel(() => this._predicates.map(p => p(harness)));\n return results.reduce((combined, current) => combined && current, true);\n }\n\n /** Gets a description of this predicate for use in error messages. */\n getDescription() {\n return this._descriptions.join(', ');\n }\n\n /** Gets the selector used to find candidate elements. */\n getSelector() {\n // We don't have to go through the extra trouble if there are no ancestors.\n if (!this._ancestor) {\n return (this.harnessType.hostSelector || '').trim();\n }\n\n const [ancestors, ancestorPlaceholders] = _splitAndEscapeSelector(this._ancestor);\n const [selectors, selectorPlaceholders] = _splitAndEscapeSelector(\n this.harnessType.hostSelector || '',\n );\n const result: string[] = [];\n\n // We have to add the ancestor to each part of the host compound selector, otherwise we can get\n // incorrect results. E.g. `.ancestor .a, .ancestor .b` vs `.ancestor .a, .b`.\n ancestors.forEach(escapedAncestor => {\n const ancestor = _restoreSelector(escapedAncestor, ancestorPlaceholders);\n return selectors.forEach(escapedSelector =>\n result.push(`${ancestor} ${_restoreSelector(escapedSelector, selectorPlaceholders)}`),\n );\n });\n\n return result.join(', ');\n }\n\n /** Adds base options common to all harness types. */\n private _addBaseOptions(options: BaseHarnessFilters) {\n this._ancestor = options.ancestor || '';\n if (this._ancestor) {\n this._descriptions.push(`has ancestor matching selector \"${this._ancestor}\"`);\n }\n const selector = options.selector;\n if (selector !== undefined) {\n this.add(`host matches selector \"${selector}\"`, async item => {\n return (await item.host()).matchesSelector(selector);\n });\n }\n }\n}\n\n/** Represent a value as a string for the purpose of logging. */\nfunction _valueAsString(value: unknown) {\n if (value === undefined) {\n return 'undefined';\n }\n try {\n // `JSON.stringify` doesn't handle RegExp properly, so we need a custom replacer.\n // Use a character that is unlikely to appear in real strings to denote the start and end of\n // the regex. This allows us to strip out the extra quotes around the value added by\n // `JSON.stringify`. Also do custom escaping on `\"` characters to prevent `JSON.stringify`\n // from escaping them as if they were part of a string.\n const stringifiedValue = JSON.stringify(value, (_, v) =>\n v instanceof RegExp\n ? `◬MAT_RE_ESCAPE◬${v.toString().replace(/\"/g, '◬MAT_RE_ESCAPE◬')}◬MAT_RE_ESCAPE◬`\n : v,\n );\n // Strip out the extra quotes around regexes and put back the manually escaped `\"` characters.\n return stringifiedValue\n .replace(/\"◬MAT_RE_ESCAPE◬|◬MAT_RE_ESCAPE◬\"/g, '')\n .replace(/◬MAT_RE_ESCAPE◬/g, '\"');\n } catch {\n // `JSON.stringify` will throw if the object is cyclical,\n // in this case the best we can do is report the value as `{...}`.\n return '{...}';\n }\n}\n\n/**\n * Splits up a compound selector into its parts and escapes any quoted content. The quoted content\n * has to be escaped, because it can contain commas which will throw throw us off when trying to\n * split it.\n * @param selector Selector to be split.\n * @returns The escaped string where any quoted content is replaced with a placeholder. E.g.\n * `[foo=\"bar\"]` turns into `[foo=__cdkPlaceholder-0__]`. Use `_restoreSelector` to restore\n * the placeholders.\n */\nfunction _splitAndEscapeSelector(selector: string): [parts: string[], placeholders: string[]] {\n const placeholders: string[] = [];\n\n // Note that the regex doesn't account for nested quotes so something like `\"ab'cd'e\"` will be\n // considered as two blocks. It's a bit of an edge case, but if we find that it's a problem,\n // we can make it a bit smarter using a loop. Use this for now since it's more readable and\n // compact. More complete implementation:\n // https://github.com/angular/angular/blob/bd34bc9e89f18a/packages/compiler/src/shadow_css.ts#L655\n const result = selector.replace(/([\"'][^[\"']*[\"'])/g, (_, keep) => {\n const replaceBy = `__cdkPlaceholder-${placeholders.length}__`;\n placeholders.push(keep);\n return replaceBy;\n });\n\n return [result.split(',').map(part => part.trim()), placeholders];\n}\n\n/** Restores a selector whose content was escaped in `_splitAndEscapeSelector`. */\nfunction _restoreSelector(selector: string, placeholders: string[]): string {\n return selector.replace(/__cdkPlaceholder-(\\d+)__/g, (_, index) => placeholders[+index]);\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 {parallel} from './change-detection';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessLoader,\n HarnessPredicate,\n HarnessQuery,\n LocatorFactory,\n LocatorFnResult,\n} from './component-harness';\nimport {TestElement} from './test-element';\n\n/** Parsed form of the queries passed to the `locatorFor*` methods. */\ntype ParsedQueries<T extends ComponentHarness> = {\n /** The full list of queries, in their original order. */\n allQueries: (string | HarnessPredicate<T>)[];\n /**\n * A filtered view of `allQueries` containing only the queries that are looking for a\n * `ComponentHarness`\n */\n harnessQueries: HarnessPredicate<T>[];\n /**\n * A filtered view of `allQueries` containing only the queries that are looking for a\n * `TestElement`\n */\n elementQueries: string[];\n /** The set of all `ComponentHarness` subclasses represented in the original query list. */\n harnessTypes: Set<ComponentHarnessConstructor<T>>;\n};\n\n/**\n * Base harness environment class that can be extended to allow `ComponentHarness`es to be used in\n * different test environments (e.g. testbed, protractor, etc.). This class implements the\n * functionality of both a `HarnessLoader` and `LocatorFactory`. This class is generic on the raw\n * element type, `E`, used by the particular test environment.\n */\nexport abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFactory {\n /** The root element of this `HarnessEnvironment` as a `TestElement`. */\n get rootElement(): TestElement {\n this._rootElement = this._rootElement || this.createTestElement(this.rawRootElement);\n return this._rootElement;\n }\n set rootElement(element: TestElement) {\n this._rootElement = element;\n }\n private _rootElement: TestElement | undefined;\n\n protected constructor(\n /** The native root element of this `HarnessEnvironment`. */\n protected rawRootElement: E,\n ) {}\n\n /** Gets a locator factory rooted at the document root. */\n documentRootLocatorFactory(): LocatorFactory {\n return this.createEnvironment(this.getDocumentRoot());\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `HarnessEnvironment`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorFor(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorFor('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorFor('span')() // Throws because the `Promise` rejects\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for\n * each query.\n */\n locatorFor<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>> {\n return () =>\n _assertResultFound(\n this._getAllHarnessesAndTestElements(queries),\n _getDescriptionForLocatorForQueries(queries),\n );\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `HarnessEnvironmnet`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorForOptional(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorForOptional('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorForOptional('span')() // Gets `null`\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all\n * result types for each query or null.\n */\n locatorForOptional<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T> | null> {\n return async () => (await this._getAllHarnessesAndTestElements(queries))[0] || null;\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances\n * or elements under the root element of this `HarnessEnvironment`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` and\n * `IdIsD1Harness.hostSelector` is `'#d1'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * // Gets [DivHarness for #d1, TestElement for #d1, DivHarness for #d2, TestElement for #d2]\n * await lf.locatorForAll(DivHarness, 'div')()\n * // Gets [TestElement for #d1, TestElement for #d2]\n * await lf.locatorForAll('div', '#d1')()\n * // Gets [DivHarness for #d1, IdIsD1Harness for #d1, DivHarness for #d2]\n * await lf.locatorForAll(DivHarness, IdIsD1Harness)()\n * // Gets []\n * await lf.locatorForAll('span')()\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for all\n * elements and harnesses matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If an element matches more than\n * one `ComponentHarness` class, the locator gets an instance of each for the same element. If\n * an element matches multiple `string` selectors, only one `TestElement` instance is returned\n * for that element. The type that the `Promise` resolves to is an array where each element is\n * the union of all result types for each query.\n */\n locatorForAll<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>[]> {\n return () => this._getAllHarnessesAndTestElements(queries);\n }\n\n /** @return A `HarnessLoader` rooted at the root element of this `HarnessEnvironment`. */\n async rootHarnessLoader(): Promise<HarnessLoader> {\n return this;\n }\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `HarnessEnvironment`.\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector.\n * @throws If no matching element is found for the given selector.\n */\n async harnessLoaderFor(selector: string): Promise<HarnessLoader> {\n return this.createEnvironment(\n await _assertResultFound(this.getAllRawElements(selector), [\n _getDescriptionForHarnessLoaderQuery(selector),\n ]),\n );\n }\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `HarnessEnvironment`.\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector, or null if\n * no matching element is found.\n */\n async harnessLoaderForOptional(selector: string): Promise<HarnessLoader | null> {\n const elements = await this.getAllRawElements(selector);\n return elements[0] ? this.createEnvironment(elements[0]) : null;\n }\n\n /**\n * Gets a list of `HarnessLoader` instances, one for each matching element.\n * @param selector The selector for the root element.\n * @return A list of `HarnessLoader`, one rooted at each element matching the given selector.\n */\n async harnessLoaderForAll(selector: string): Promise<HarnessLoader[]> {\n const elements = await this.getAllRawElements(selector);\n return elements.map(element => this.createEnvironment(element));\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that instance. If\n * multiple matching components are found, a harness for the first one is returned. If no matching\n * component is found, an error is thrown.\n * @param query A query for a harness to create\n * @return An instance of the given harness type\n * @throws If a matching component instance can't be found.\n */\n getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T> {\n return this.locatorFor(query)();\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that instance. If\n * multiple matching components are found, a harness for the first one is returned. If no matching\n * component is found, null is returned.\n * @param query A query for a harness to create\n * @return An instance of the given harness type (or null if not found).\n */\n getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null> {\n return this.locatorForOptional(query)();\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type and index\n * under the `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that\n * instance. The index specifies the offset of the component to find. If no matching\n * component is found at that index, an error is thrown.\n * @param query A query for a harness to create\n * @param index The zero-indexed offset of the component to find\n * @return An instance of the given harness type\n * @throws If a matching component instance can't be found.\n */\n async getHarnessAtIndex<T extends ComponentHarness>(\n query: HarnessQuery<T>,\n offset: number,\n ): Promise<T> {\n if (offset < 0) {\n throw Error('Index must not be negative');\n }\n const harnesses = await this.locatorForAll(query)();\n if (offset >= harnesses.length) {\n throw Error(`No harness was located at index ${offset}`);\n }\n return harnesses[offset];\n }\n\n /**\n * Searches for all instances of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a list `ComponentHarness` for each instance.\n * @param query A query for a harness to create\n * @return A list instances of the given harness type.\n */\n getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]> {\n return this.locatorForAll(query)();\n }\n\n /**\n * Searches for all instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns the number that were found.\n * @param query A query for a harness to create\n * @return The number of instances that were found.\n */\n async countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number> {\n return (await this.locatorForAll(query)()).length;\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a boolean indicating if any were found.\n * @param query A query for a harness to create\n * @return A boolean indicating if an instance was found.\n */\n async hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean> {\n return (await this.locatorForOptional(query)()) !== null;\n }\n\n /**\n * Searches for an element with the given selector under the evironment's root element,\n * and returns a `HarnessLoader` rooted at the matching element. If multiple elements match the\n * selector, the first is used. If no elements match, an error is thrown.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A `HarnessLoader` rooted at the element matching the given selector.\n * @throws If a matching element can't be found.\n */\n async getChildLoader(selector: string): Promise<HarnessLoader> {\n return this.createEnvironment(\n await _assertResultFound(this.getAllRawElements(selector), [\n _getDescriptionForHarnessLoaderQuery(selector),\n ]),\n );\n }\n\n /**\n * Searches for all elements with the given selector under the environment's root element,\n * and returns an array of `HarnessLoader`s, one for each matching element, rooted at that\n * element.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A list of `HarnessLoader`s, one for each matching element, rooted at that element.\n */\n async getAllChildLoaders(selector: string): Promise<HarnessLoader[]> {\n return (await this.getAllRawElements(selector)).map(e => this.createEnvironment(e));\n }\n\n /** Creates a `ComponentHarness` for the given harness type with the given raw host element. */\n protected createComponentHarness<T extends ComponentHarness>(\n harnessType: ComponentHarnessConstructor<T>,\n element: E,\n ): T {\n return new harnessType(this.createEnvironment(element));\n }\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n * This is an abstrct method that must be implemented by subclasses.\n */\n abstract forceStabilize(): Promise<void>;\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n * This is an abstrct method that must be implemented by subclasses.\n */\n abstract waitForTasksOutsideAngular(): Promise<void>;\n\n /** Gets the root element for the document. */\n protected abstract getDocumentRoot(): E;\n\n /** Creates a `TestElement` from a raw element. */\n protected abstract createTestElement(element: E): TestElement;\n\n /** Creates a `HarnessEnvironment` rooted at the given raw element. */\n protected abstract createEnvironment(element: E): HarnessEnvironment<E>;\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected abstract getAllRawElements(selector: string): Promise<E[]>;\n\n /**\n * Matches the given raw elements with the given list of element and harness queries to produce a\n * list of matched harnesses and test elements.\n */\n private async _getAllHarnessesAndTestElements<T extends (HarnessQuery<any> | string)[]>(\n queries: T,\n ): Promise<LocatorFnResult<T>[]> {\n if (!queries.length) {\n throw Error('CDK Component harness query must contain at least one element.');\n }\n\n const {allQueries, harnessQueries, elementQueries, harnessTypes} = _parseQueries(queries);\n\n // Combine all of the queries into one large comma-delimited selector and use it to get all raw\n // elements matching any of the individual queries.\n const rawElements = await this.getAllRawElements(\n [...elementQueries, ...harnessQueries.map(predicate => predicate.getSelector())].join(','),\n );\n\n // If every query is searching for the same harness subclass, we know every result corresponds\n // to an instance of that subclass. Likewise, if every query is for a `TestElement`, we know\n // every result corresponds to a `TestElement`. Otherwise we need to verify which result was\n // found by which selector so it can be matched to the appropriate instance.\n const skipSelectorCheck =\n (elementQueries.length === 0 && harnessTypes.size === 1) || harnessQueries.length === 0;\n\n const perElementMatches = await parallel(() =>\n rawElements.map(async rawElement => {\n const testElement = this.createTestElement(rawElement);\n const allResultsForElement = await parallel(\n // For each query, get `null` if it doesn't match, or a `TestElement` or\n // `ComponentHarness` as appropriate if it does match. This gives us everything that\n // matches the current raw element, but it may contain duplicate entries (e.g.\n // multiple `TestElement` or multiple `ComponentHarness` of the same type).\n () =>\n allQueries.map(query =>\n this._getQueryResultForElement(query, rawElement, testElement, skipSelectorCheck),\n ),\n );\n return _removeDuplicateQueryResults(allResultsForElement);\n }),\n );\n return ([] as any).concat(...perElementMatches);\n }\n\n /**\n * Check whether the given query matches the given element, if it does return the matched\n * `TestElement` or `ComponentHarness`, if it does not, return null. In cases where the caller\n * knows for sure that the query matches the element's selector, `skipSelectorCheck` can be used\n * to skip verification and optimize performance.\n */\n private async _getQueryResultForElement<T extends ComponentHarness>(\n query: string | HarnessPredicate<T>,\n rawElement: E,\n testElement: TestElement,\n skipSelectorCheck: boolean = false,\n ): Promise<T | TestElement | null> {\n if (typeof query === 'string') {\n return skipSelectorCheck || (await testElement.matchesSelector(query)) ? testElement : null;\n }\n if (skipSelectorCheck || (await testElement.matchesSelector(query.getSelector()))) {\n const harness = this.createComponentHarness(query.harnessType, rawElement);\n return (await query.evaluate(harness)) ? harness : null;\n }\n return null;\n }\n}\n\n/**\n * Parses a list of queries in the format accepted by the `locatorFor*` methods into an easier to\n * work with format.\n */\nfunction _parseQueries<T extends (HarnessQuery<any> | string)[]>(\n queries: T,\n): ParsedQueries<LocatorFnResult<T> & ComponentHarness> {\n const allQueries = [];\n const harnessQueries = [];\n const elementQueries = [];\n const harnessTypes = new Set<\n ComponentHarnessConstructor<LocatorFnResult<T> & ComponentHarness>\n >();\n\n for (const query of queries) {\n if (typeof query === 'string') {\n allQueries.push(query);\n elementQueries.push(query);\n } else {\n const predicate = query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});\n allQueries.push(predicate);\n harnessQueries.push(predicate);\n harnessTypes.add(predicate.harnessType);\n }\n }\n\n return {allQueries, harnessQueries, elementQueries, harnessTypes};\n}\n\n/**\n * Removes duplicate query results for a particular element. (e.g. multiple `TestElement`\n * instances or multiple instances of the same `ComponentHarness` class.\n */\nasync function _removeDuplicateQueryResults<T extends (ComponentHarness | TestElement | null)[]>(\n results: T,\n): Promise<T> {\n let testElementMatched = false;\n let matchedHarnessTypes = new Set();\n const dedupedMatches = [];\n for (const result of results) {\n if (!result) {\n continue;\n }\n if (result instanceof ComponentHarness) {\n if (!matchedHarnessTypes.has(result.constructor)) {\n matchedHarnessTypes.add(result.constructor);\n dedupedMatches.push(result);\n }\n } else if (!testElementMatched) {\n testElementMatched = true;\n dedupedMatches.push(result);\n }\n }\n return dedupedMatches as T;\n}\n\n/** Verifies that there is at least one result in an array. */\nasync function _assertResultFound<T>(\n results: Promise<T[]>,\n queryDescriptions: string[],\n): Promise<T> {\n const result = (await results)[0];\n if (result == undefined) {\n throw Error(\n `Failed to find element matching one of the following queries:\\n` +\n queryDescriptions.map(desc => `(${desc})`).join(',\\n'),\n );\n }\n return result;\n}\n\n/** Gets a list of description strings from a list of queries. */\nfunction _getDescriptionForLocatorForQueries(queries: (string | HarnessQuery<any>)[]) {\n return queries.map(query =>\n typeof query === 'string'\n ? _getDescriptionForTestElementQuery(query)\n : _getDescriptionForComponentHarnessQuery(query),\n );\n}\n\n/** Gets a description string for a `ComponentHarness` query. */\nfunction _getDescriptionForComponentHarnessQuery(query: HarnessQuery<any>) {\n const harnessPredicate =\n query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});\n const {name, hostSelector} = harnessPredicate.harnessType;\n const description = `${name} with host element matching selector: \"${hostSelector}\"`;\n const constraints = harnessPredicate.getDescription();\n return (\n description +\n (constraints ? ` satisfying the constraints: ${harnessPredicate.getDescription()}` : '')\n );\n}\n\n/** Gets a description string for a `TestElement` query. */\nfunction _getDescriptionForTestElementQuery(selector: string) {\n return `TestElement for element matching selector: \"${selector}\"`;\n}\n\n/** Gets a description string for a `HarnessLoader` query. */\nfunction _getDescriptionForHarnessLoaderQuery(selector: string) {\n return `HarnessLoader for element matching selector: \"${selector}\"`;\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 {ElementDimensions} from './element-dimensions';\n\n/** Modifier keys that may be held while typing. */\nexport interface ModifierKeys {\n control?: boolean;\n alt?: boolean;\n shift?: boolean;\n meta?: boolean;\n}\n\n/** Data that can be attached to a custom event dispatched from a `TestElement`. */\nexport type EventData =\n | string\n | number\n | boolean\n | Function\n | undefined\n | null\n | EventData[]\n | {[key: string]: EventData};\n\n/** An enum of non-text keys that can be used with the `sendKeys` method. */\n// NOTE: This is a separate enum from `@angular/cdk/keycodes` because we don't necessarily want to\n// support every possible keyCode. We also can't rely on Protractor's `Key` because we don't want a\n// dependency on any particular testing framework here. Instead we'll just maintain this supported\n// list of keys and let individual concrete `HarnessEnvironment` classes map them to whatever key\n// representation is used in its respective testing framework.\n// tslint:disable-next-line:prefer-const-enum Seems like this causes some issues with System.js\nexport enum TestKey {\n BACKSPACE,\n TAB,\n ENTER,\n SHIFT,\n CONTROL,\n ALT,\n ESCAPE,\n PAGE_UP,\n PAGE_DOWN,\n END,\n HOME,\n LEFT_ARROW,\n UP_ARROW,\n RIGHT_ARROW,\n DOWN_ARROW,\n INSERT,\n DELETE,\n F1,\n F2,\n F3,\n F4,\n F5,\n F6,\n F7,\n F8,\n F9,\n F10,\n F11,\n F12,\n META,\n COMMA, // Commas are a common separator key.\n}\n\n/**\n * This acts as a common interface for DOM elements across both unit and e2e tests. It is the\n * interface through which the ComponentHarness interacts with the component's DOM.\n */\nexport interface TestElement {\n /** Blur the element. */\n blur(): Promise<void>;\n\n /** Clear the element's input (for input and textarea elements only). */\n clear(): Promise<void>;\n\n /**\n * Click the element at the default location for the current environment. If you need to guarantee\n * the element is clicked at a specific location, consider using `click('center')` or\n * `click(x, y)` instead.\n */\n click(modifiers?: ModifierKeys): Promise<void>;\n\n /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise<void>;\n\n /**\n * Click the element at the specified coordinates relative to the top-left of the element.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n\n /**\n * Right clicks on the element at the specified coordinates relative to the top-left of it.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n\n /** Focus the element. */\n focus(): Promise<void>;\n\n /** Get the computed value of the given CSS property for the element. */\n getCssValue(property: string): Promise<string>;\n\n /** Hovers the mouse over the element. */\n hover(): Promise<void>;\n\n /** Moves the mouse away from the element. */\n mouseAway(): Promise<void>;\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value. Note that some environments cannot\n * reproduce native browser behavior for keyboard shortcuts such as Tab, Ctrl + A, etc.\n * @throws An error if no keys have been specified.\n */\n sendKeys(...keys: (string | TestKey)[]): Promise<void>;\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input\n * events and attempts to add the string to the Element's value.\n * @throws An error if no keys have been specified.\n */\n sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n text(options?: TextOptions): Promise<string>;\n\n /**\n * Sets the value of a `contenteditable` element.\n * @param value Value to be set on the element.\n */\n setContenteditableValue(value: string): Promise<void>;\n\n /** Gets the value for the given attribute from the element. */\n getAttribute(name: string): Promise<string | null>;\n\n /** Checks whether the element has the given class. */\n hasClass(name: string): Promise<boolean>;\n\n /** Gets the dimensions of the element. */\n getDimensions(): Promise<ElementDimensions>;\n\n /** Gets the value of a property of an element. */\n getProperty<T = any>(name: string): Promise<T>;\n\n /** Checks whether this element matches the given selector. */\n matchesSelector(selector: string): Promise<boolean>;\n\n /** Checks whether the element is focused. */\n isFocused(): Promise<boolean>;\n\n /** Sets the value of a property of an input. */\n setInputValue(value: string): Promise<void>;\n\n // Note that ideally here we'd be selecting options based on their value, rather than their\n // index, but we're limited by `@angular/forms` which will modify the option value in some cases.\n // Since the value will be truncated, we can't rely on it to do the lookup in the DOM. See:\n // https://github.com/angular/angular/blob/main/packages/forms/src/directives/select_control_value_accessor.ts#L19\n /** Selects the options at the specified indexes inside of a native `select` element. */\n selectOptions(...optionIndexes: number[]): Promise<void>;\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void>;\n}\n\n/**\n * Options that affect the text returned by `TestElement.text`.\n */\nexport interface TextOptions {\n /** Optional selector for elements whose content should be excluded from the text string. */\n exclude?: string;\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\n/**\n * Gets text of element excluding certain selectors within the element.\n * @param element Element to get text from,\n * @param excludeSelector Selector identifying which elements to exclude,\n */\nexport function _getTextWithExcludedElements(element: Element, excludeSelector: string) {\n const clone = element.cloneNode(true) as Element;\n const exclusions = clone.querySelectorAll(excludeSelector);\n for (let i = 0; i < exclusions.length; i++) {\n exclusions[i].remove();\n }\n return (clone.textContent || '').trim();\n}\n"],"names":["autoChangeDetectionSubscription","handleAutoChangeDetectionStatus","handler","unsubscribe","defaultAutoChangeDetectionHandler","resolve","autoChangeDetectionSubject","next","isDisabled","locatorFactory","constructor","rootElement","documentRootLocatorFactory","_rootElement","element","harnessLoaderFor","selector","createEnvironment","_assertResultFound","getAllRawElements","harnessLoaderForOptional","elements","harnessLoaderForAll","Error","offset","harnesses","getAllHarnesses","query","locatorForAll","getAllChildLoaders","_getAllHarnessesAndTestElements","queries","rawElements","elementQueries","harnessQueries","map","predicate","getSelector","join","skipSelectorCheck","length","harnessTypes","size","perElementMatches","parallel","rawElement","testElement","createTestElement","allResultsForElement","TestKey","exclusions","clone","querySelectorAll","excludeSelector","textContent","trim"],"mappings":";;;;;I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,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAA;AACAA,EAAAA,OAAA,CAAAA;AAAAA,EAAAA,OAAA,CAAAA,OAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA;AACAA,EAAAA,OAAA,CAAAA,OAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAA;EACAA,OAAA,CAAAA,OAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAA;AACAA,EAAAA,OAAA,CAAAA,OAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAA;AA/BUA,EAAAA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,EAAA,CAAA,GAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBV,EAAA,MAAAC,UAAA,GAAAC,KAAA,CAAAC,gBAAA,CAAAC,eAAA,CAAA;;;;AAIF,EAAA,OAAA,CAAAF,KAAA,CAAAG,WAAA,IAAA,EAAA,EAAAC,IAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/change-detection.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/component-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/harness-environment.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/test-element.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/test-element-errors.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/testing/text-filtering.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 {BehaviorSubject, Subscription} from 'rxjs';\n\n/**\n * The status of the test harness auto change detection. If not diabled test harnesses will\n * automatically trigger change detection after every action (such as a click) and before every read\n * (such as getting the text of an element).\n */\nexport interface AutoChangeDetectionStatus {\n /** Whether auto change detection is disabled. */\n isDisabled: boolean;\n /**\n * An optional callback, if present it indicates that change detection should be run immediately,\n * while handling the status change. The callback should then be called as soon as change\n * detection is done.\n */\n onDetectChangesNow?: () => void;\n}\n\n/** Subject used to dispatch and listen for changes to the auto change detection status . */\nconst autoChangeDetectionSubject = new BehaviorSubject<AutoChangeDetectionStatus>({\n isDisabled: false,\n});\n\n/** The current subscription to `autoChangeDetectionSubject`. */\nlet autoChangeDetectionSubscription: Subscription | null;\n\n/**\n * The default handler for auto change detection status changes. This handler will be used if the\n * specific environment does not install its own.\n * @param status The new auto change detection status.\n */\nfunction defaultAutoChangeDetectionHandler(status: AutoChangeDetectionStatus) {\n status.onDetectChangesNow?.();\n}\n\n/**\n * Allows a test `HarnessEnvironment` to install its own handler for auto change detection status\n * changes.\n * @param handler The handler for the auto change detection status.\n */\nexport function handleAutoChangeDetectionStatus(\n handler: (status: AutoChangeDetectionStatus) => void,\n) {\n stopHandlingAutoChangeDetectionStatus();\n autoChangeDetectionSubscription = autoChangeDetectionSubject.subscribe(handler);\n}\n\n/** Allows a `HarnessEnvironment` to stop handling auto change detection status changes. */\nexport function stopHandlingAutoChangeDetectionStatus() {\n autoChangeDetectionSubscription?.unsubscribe();\n autoChangeDetectionSubscription = null;\n}\n\n/**\n * Batches together triggering of change detection over the duration of the given function.\n * @param fn The function to call with batched change detection.\n * @param triggerBeforeAndAfter Optionally trigger change detection once before and after the batch\n * operation. If false, change detection will not be triggered.\n * @return The result of the given function.\n */\nasync function batchChangeDetection<T>(fn: () => Promise<T>, triggerBeforeAndAfter: boolean) {\n // If change detection batching is already in progress, just run the function.\n if (autoChangeDetectionSubject.getValue().isDisabled) {\n return await fn();\n }\n\n // If nothing is handling change detection batching, install the default handler.\n if (!autoChangeDetectionSubscription) {\n handleAutoChangeDetectionStatus(defaultAutoChangeDetectionHandler);\n }\n\n if (triggerBeforeAndAfter) {\n await new Promise(resolve =>\n autoChangeDetectionSubject.next({\n isDisabled: true,\n onDetectChangesNow: resolve as () => void,\n }),\n );\n // The function passed in may throw (e.g. if the user wants to make an expectation of an error\n // being thrown. If this happens, we need to make sure we still re-enable change detection, so\n // we wrap it in a `finally` block.\n try {\n return await fn();\n } finally {\n await new Promise(resolve =>\n autoChangeDetectionSubject.next({\n isDisabled: false,\n onDetectChangesNow: resolve as () => void,\n }),\n );\n }\n } else {\n autoChangeDetectionSubject.next({isDisabled: true});\n // The function passed in may throw (e.g. if the user wants to make an expectation of an error\n // being thrown. If this happens, we need to make sure we still re-enable change detection, so\n // we wrap it in a `finally` block.\n try {\n return await fn();\n } finally {\n autoChangeDetectionSubject.next({isDisabled: false});\n }\n }\n}\n\n/**\n * Disables the harness system's auto change detection for the duration of the given function.\n * @param fn The function to disable auto change detection for.\n * @return The result of the given function.\n */\nexport async function manualChangeDetection<T>(fn: () => Promise<T>) {\n return batchChangeDetection(fn, false);\n}\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2, T3, T4, T5>(\n values: () => [\n T1 | PromiseLike<T1>,\n T2 | PromiseLike<T2>,\n T3 | PromiseLike<T3>,\n T4 | PromiseLike<T4>,\n T5 | PromiseLike<T5>,\n ],\n): Promise<[T1, T2, T3, T4, T5]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2, T3, T4>(\n values: () => [\n T1 | PromiseLike<T1>,\n T2 | PromiseLike<T2>,\n T3 | PromiseLike<T3>,\n T4 | PromiseLike<T4>,\n ],\n): Promise<[T1, T2, T3, T4]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2, T3>(\n values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>],\n): Promise<[T1, T2, T3]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T1, T2>(\n values: () => [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>],\n): Promise<[T1, T2]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport function parallel<T>(values: () => (T | PromiseLike<T>)[]): Promise<T[]>;\n\n/**\n * Resolves the given list of async values in parallel (i.e. via Promise.all) while batching change\n * detection over the entire operation such that change detection occurs exactly once before\n * resolving the values and once after.\n * @param values A getter for the async values to resolve in parallel with batched change detection.\n * @return The resolved values.\n */\nexport async function parallel<T>(values: () => Iterable<T | PromiseLike<T>>): Promise<T[]> {\n return batchChangeDetection(() => Promise.all(values()), true);\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 {parallel} from './change-detection';\nimport {TestElement} from './test-element';\n\n/**\n * An async function that returns a promise when called.\n * @deprecated This was just an alias for `() => Promise<T>`. Use that instead.\n * @breaking-change 21.0.0 Remove this alias.\n * @docs-private\n */\nexport type AsyncFactoryFn<T> = () => Promise<T>;\n\n/** An async function that takes an item and returns a boolean promise */\nexport type AsyncPredicate<T> = (item: T) => Promise<boolean>;\n\n/** An async function that takes an item and an option value and returns a boolean promise. */\nexport type AsyncOptionPredicate<T, O> = (item: T, option: O) => Promise<boolean>;\n\n/**\n * A query for a `ComponentHarness`, which is expressed as either a `ComponentHarnessConstructor` or\n * a `HarnessPredicate`.\n */\nexport type HarnessQuery<T extends ComponentHarness> =\n | ComponentHarnessConstructor<T>\n | HarnessPredicate<T>;\n\n/**\n * The result type obtained when searching using a particular list of queries. This type depends on\n * the particular items being queried.\n * - If one of the queries is for a `ComponentHarnessConstructor<C1>`, it means that the result\n * might be a harness of type `C1`\n * - If one of the queries is for a `HarnessPredicate<C2>`, it means that the result might be a\n * harness of type `C2`\n * - If one of the queries is for a `string`, it means that the result might be a `TestElement`.\n *\n * Since we don't know for sure which query will match, the result type if the union of the types\n * for all possible results.\n *\n * @usageNotes\n * ### Example\n *\n * The type:\n * ```ts\n * LocatorFnResult<[\n * ComponentHarnessConstructor<MyHarness>,\n * HarnessPredicate<MyOtherHarness>,\n * string\n * ]>\n * ```\n *\n * is equivalent to:\n *\n * ```ts\n * MyHarness | MyOtherHarness | TestElement\n * ```\n */\nexport type LocatorFnResult<T extends (HarnessQuery<any> | string)[]> = {\n [I in keyof T]: T[I] extends new (...args: any[]) => infer C // Map `ComponentHarnessConstructor<C>` to `C`.\n ? C\n : // Map `HarnessPredicate<C>` to `C`.\n T[I] extends {harnessType: new (...args: any[]) => infer C}\n ? C\n : // Map `string` to `TestElement`.\n T[I] extends string\n ? TestElement\n : // Map everything else to `never` (should not happen due to the type constraint on `T`).\n never;\n}[number];\n\n/**\n * Interface used to load ComponentHarness objects. This interface is used by test authors to\n * instantiate `ComponentHarness`es.\n */\nexport interface HarnessLoader {\n /**\n * Searches for an element with the given selector under the current instances's root element,\n * and returns a `HarnessLoader` rooted at the matching element. If multiple elements match the\n * selector, the first is used. If no elements match, an error is thrown.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A `HarnessLoader` rooted at the element matching the given selector.\n * @throws If a matching element can't be found.\n */\n getChildLoader(selector: string): Promise<HarnessLoader>;\n\n /**\n * Searches for all elements with the given selector under the current instances's root element,\n * and returns an array of `HarnessLoader`s, one for each matching element, rooted at that\n * element.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A list of `HarnessLoader`s, one for each matching element, rooted at that element.\n */\n getAllChildLoaders(selector: string): Promise<HarnessLoader[]>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a `ComponentHarness` for that instance. If multiple\n * matching components are found, a harness for the first one is returned. If no matching\n * component is found, an error is thrown.\n * @param query A query for a harness to create\n * @return An instance of the given harness type\n * @throws If a matching component instance can't be found.\n */\n getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a `ComponentHarness` for that instance. If multiple\n * matching components are found, a harness for the first one is returned. If no matching\n * component is found, null is returned.\n * @param query A query for a harness to create\n * @return An instance of the given harness type (or null if not found).\n */\n getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a `ComponentHarness` for the instance on the page\n * at the given index. If no matching component exists at that index, an error is thrown.\n * @param query A query for a harness to create\n * @param index The zero-indexed offset of the matching component instance to return\n * @return An instance of the given harness type.\n * @throws If a matching component instance can't be found at the given index.\n */\n getHarnessAtIndex<T extends ComponentHarness>(query: HarnessQuery<T>, index: number): Promise<T>;\n\n /**\n * Searches for all instances of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a list `ComponentHarness` for each instance.\n * @param query A query for a harness to create\n * @return A list instances of the given harness type.\n */\n getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]>;\n\n /**\n * Searches for all instances of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns the total count of all matching components.\n * @param query A query for a harness to create\n * @return An integer indicating the number of instances that were found.\n */\n countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number>;\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessLoader`'s root element, and returns a boolean indicating if any were found.\n * @param query A query for a harness to create\n * @return A boolean indicating if an instance was found.\n */\n hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean>;\n}\n\n/**\n * Interface used to create asynchronous locator functions used find elements and component\n * harnesses. This interface is used by `ComponentHarness` authors to create locator functions for\n * their `ComponentHarness` subclass.\n */\nexport interface LocatorFactory {\n /** Gets a locator factory rooted at the document root. */\n documentRootLocatorFactory(): LocatorFactory;\n\n /** The root element of this `LocatorFactory` as a `TestElement`. */\n rootElement: TestElement;\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `LocatorFactory`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorFor(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorFor('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorFor('span')() // Throws because the `Promise` rejects\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for\n * each query.\n */\n locatorFor<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>>;\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `LocatorFactory`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorForOptional(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorForOptional('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorForOptional('span')() // Gets `null`\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all\n * result types for each query or null.\n */\n locatorForOptional<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T> | null>;\n\n /**\n * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances\n * or elements under the root element of this `LocatorFactory`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` and\n * `IdIsD1Harness.hostSelector` is `'#d1'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * // Gets [DivHarness for #d1, TestElement for #d1, DivHarness for #d2, TestElement for #d2]\n * await lf.locatorForAll(DivHarness, 'div')()\n * // Gets [TestElement for #d1, TestElement for #d2]\n * await lf.locatorForAll('div', '#d1')()\n * // Gets [DivHarness for #d1, IdIsD1Harness for #d1, DivHarness for #d2]\n * await lf.locatorForAll(DivHarness, IdIsD1Harness)()\n * // Gets []\n * await lf.locatorForAll('span')()\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for all\n * elements and harnesses matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If an element matches more than\n * one `ComponentHarness` class, the locator gets an instance of each for the same element. If\n * an element matches multiple `string` selectors, only one `TestElement` instance is returned\n * for that element. The type that the `Promise` resolves to is an array where each element is\n * the union of all result types for each query.\n */\n locatorForAll<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>[]>;\n\n /** @return A `HarnessLoader` rooted at the root element of this `LocatorFactory`. */\n rootHarnessLoader(): Promise<HarnessLoader>;\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `LocatorFactory`.\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector.\n * @throws If no matching element is found for the given selector.\n */\n harnessLoaderFor(selector: string): Promise<HarnessLoader>;\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `LocatorFactory`\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector, or null if\n * no matching element is found.\n */\n harnessLoaderForOptional(selector: string): Promise<HarnessLoader | null>;\n\n /**\n * Gets a list of `HarnessLoader` instances, one for each matching element.\n * @param selector The selector for the root element.\n * @return A list of `HarnessLoader`, one rooted at each element matching the given selector.\n */\n harnessLoaderForAll(selector: string): Promise<HarnessLoader[]>;\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n forceStabilize(): Promise<void>;\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n waitForTasksOutsideAngular(): Promise<void>;\n}\n\n/**\n * Base class for component test harnesses that all component harness authors should extend. This\n * base component harness provides the basic ability to locate element and sub-component harnesses.\n */\nexport abstract class ComponentHarness {\n constructor(protected readonly locatorFactory: LocatorFactory) {}\n\n /** Gets a `Promise` for the `TestElement` representing the host element of the component. */\n async host(): Promise<TestElement> {\n return this.locatorFactory.rootElement;\n }\n\n /**\n * Gets a `LocatorFactory` for the document root element. This factory can be used to create\n * locators for elements that a component creates outside of its own root element. (e.g. by\n * appending to document.body).\n */\n protected documentRootLocatorFactory(): LocatorFactory {\n return this.locatorFactory.documentRootLocatorFactory();\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the host element of this `ComponentHarness`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await ch.locatorFor(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await ch.locatorFor('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await ch.locatorFor('span')() // Throws because the `Promise` rejects\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for\n * each query.\n */\n protected locatorFor<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>> {\n return this.locatorFactory.locatorFor(...queries);\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the host element of this `ComponentHarness`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await ch.locatorForOptional(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await ch.locatorForOptional('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await ch.locatorForOptional('span')() // Gets `null`\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all\n * result types for each query or null.\n */\n protected locatorForOptional<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T> | null> {\n return this.locatorFactory.locatorForOptional(...queries);\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances\n * or elements under the host element of this `ComponentHarness`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` and\n * `IdIsD1Harness.hostSelector` is `'#d1'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * // Gets [DivHarness for #d1, TestElement for #d1, DivHarness for #d2, TestElement for #d2]\n * await ch.locatorForAll(DivHarness, 'div')()\n * // Gets [TestElement for #d1, TestElement for #d2]\n * await ch.locatorForAll('div', '#d1')()\n * // Gets [DivHarness for #d1, IdIsD1Harness for #d1, DivHarness for #d2]\n * await ch.locatorForAll(DivHarness, IdIsD1Harness)()\n * // Gets []\n * await ch.locatorForAll('span')()\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for all\n * elements and harnesses matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If an element matches more than\n * one `ComponentHarness` class, the locator gets an instance of each for the same element. If\n * an element matches multiple `string` selectors, only one `TestElement` instance is returned\n * for that element. The type that the `Promise` resolves to is an array where each element is\n * the union of all result types for each query.\n */\n protected locatorForAll<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>[]> {\n return this.locatorFactory.locatorForAll(...queries);\n }\n\n /**\n * Flushes change detection and async tasks in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n protected async forceStabilize() {\n return this.locatorFactory.forceStabilize();\n }\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n protected async waitForTasksOutsideAngular() {\n return this.locatorFactory.waitForTasksOutsideAngular();\n }\n}\n\n/**\n * Base class for component harnesses that authors should extend if they anticipate that consumers\n * of the harness may want to access other harnesses within the `<ng-content>` of the component.\n */\nexport abstract class ContentContainerComponentHarness<S extends string = string>\n extends ComponentHarness\n implements HarnessLoader\n{\n /**\n * Gets a `HarnessLoader` that searches for harnesses under the first element matching the given\n * selector within the current harness's content.\n * @param selector The selector for an element in the component's content.\n * @returns A `HarnessLoader` that searches for harnesses under the given selector.\n */\n async getChildLoader(selector: S): Promise<HarnessLoader> {\n return (await this.getRootHarnessLoader()).getChildLoader(selector);\n }\n\n /**\n * Gets a list of `HarnessLoader` for each element matching the given selector under the current\n * harness's cotnent that searches for harnesses under that element.\n * @param selector The selector for elements in the component's content.\n * @returns A list of `HarnessLoader` for each element matching the given selector.\n */\n async getAllChildLoaders(selector: S): Promise<HarnessLoader[]> {\n return (await this.getRootHarnessLoader()).getAllChildLoaders(selector);\n }\n\n /**\n * Gets the first matching harness for the given query within the current harness's content.\n * @param query The harness query to search for.\n * @returns The first harness matching the given query.\n * @throws If no matching harness is found.\n */\n async getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T> {\n return (await this.getRootHarnessLoader()).getHarness(query);\n }\n\n /**\n * Gets the first matching harness for the given query within the current harness's content.\n * @param query The harness query to search for.\n * @returns The first harness matching the given query, or null if none is found.\n */\n async getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null> {\n return (await this.getRootHarnessLoader()).getHarnessOrNull(query);\n }\n\n /**\n * Gets a matching harness for the given query and index within the current harness's content.\n * @param query The harness query to search for.\n * @param index The zero-indexed offset of the component to find.\n * @returns The first harness matching the given query.\n * @throws If no matching harness is found.\n */\n async getHarnessAtIndex<T extends ComponentHarness>(\n query: HarnessQuery<T>,\n index: number,\n ): Promise<T> {\n return (await this.getRootHarnessLoader()).getHarnessAtIndex(query, index);\n }\n\n /**\n * Gets all matching harnesses for the given query within the current harness's content.\n * @param query The harness query to search for.\n * @returns The list of harness matching the given query.\n */\n async getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]> {\n return (await this.getRootHarnessLoader()).getAllHarnesses(query);\n }\n\n /**\n * Returns the number of matching harnesses for the given query within the current harness's\n * content.\n *\n * @param query The harness query to search for.\n * @returns The number of matching harnesses for the given query.\n */\n async countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number> {\n return (await this.getRootHarnessLoader()).countHarnesses(query);\n }\n\n /**\n * Checks whether there is a matching harnesses for the given query within the current harness's\n * content.\n *\n * @param query The harness query to search for.\n * @returns Whether there is matching harnesses for the given query.\n */\n async hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean> {\n return (await this.getRootHarnessLoader()).hasHarness(query);\n }\n\n /**\n * Gets the root harness loader from which to start\n * searching for content contained by this harness.\n */\n protected async getRootHarnessLoader(): Promise<HarnessLoader> {\n return this.locatorFactory.rootHarnessLoader();\n }\n}\n\n/**\n * Constructor for a ComponentHarness subclass. To be a valid ComponentHarnessConstructor, the\n * class must also have a static `hostSelector` property.\n */\nexport interface ComponentHarnessConstructor<T extends ComponentHarness> {\n new (locatorFactory: LocatorFactory): T;\n\n /**\n * `ComponentHarness` subclasses must specify a static `hostSelector` property that is used to\n * find the host element for the corresponding component. This property should match the selector\n * for the Angular component.\n */\n hostSelector: string;\n}\n\n/** A set of criteria that can be used to filter a list of `ComponentHarness` instances. */\nexport interface BaseHarnessFilters {\n /** Only find instances whose host element matches the given selector. */\n selector?: string;\n /** Only find instances that are nested under an element with the given selector. */\n ancestor?: string;\n}\n\n/**\n * A class used to associate a ComponentHarness class with predicate functions that can be used to\n * filter instances of the class to be matched.\n */\nexport class HarnessPredicate<T extends ComponentHarness> {\n private _predicates: AsyncPredicate<T>[] = [];\n private _descriptions: string[] = [];\n private _ancestor: string;\n\n constructor(\n public harnessType: ComponentHarnessConstructor<T>,\n options: BaseHarnessFilters,\n ) {\n this._addBaseOptions(options);\n }\n\n /**\n * Checks if the specified nullable string value matches the given pattern.\n * @param value The nullable string value to check, or a Promise resolving to the\n * nullable string value.\n * @param pattern The pattern the value is expected to match. If `pattern` is a string,\n * `value` is expected to match exactly. If `pattern` is a regex, a partial match is\n * allowed. If `pattern` is `null`, the value is expected to be `null`.\n * @return Whether the value matches the pattern.\n */\n static async stringMatches(\n value: string | null | Promise<string | null>,\n pattern: string | RegExp | null,\n ): Promise<boolean> {\n value = await value;\n if (pattern === null) {\n return value === null;\n } else if (value === null) {\n return false;\n }\n return typeof pattern === 'string' ? value === pattern : pattern.test(value);\n }\n\n /**\n * Adds a predicate function to be run against candidate harnesses.\n * @param description A description of this predicate that may be used in error messages.\n * @param predicate An async predicate function.\n * @return this (for method chaining).\n */\n add(description: string, predicate: AsyncPredicate<T>) {\n this._descriptions.push(description);\n this._predicates.push(predicate);\n return this;\n }\n\n /**\n * Adds a predicate function that depends on an option value to be run against candidate\n * harnesses. If the option value is undefined, the predicate will be ignored.\n * @param name The name of the option (may be used in error messages).\n * @param option The option value.\n * @param predicate The predicate function to run if the option value is not undefined.\n * @return this (for method chaining).\n */\n addOption<O>(name: string, option: O | undefined, predicate: AsyncOptionPredicate<T, O>) {\n if (option !== undefined) {\n this.add(`${name} = ${_valueAsString(option)}`, item => predicate(item, option));\n }\n return this;\n }\n\n /**\n * Filters a list of harnesses on this predicate.\n * @param harnesses The list of harnesses to filter.\n * @return A list of harnesses that satisfy this predicate.\n */\n async filter(harnesses: T[]): Promise<T[]> {\n if (harnesses.length === 0) {\n return [];\n }\n const results = await parallel(() => harnesses.map(h => this.evaluate(h)));\n return harnesses.filter((_, i) => results[i]);\n }\n\n /**\n * Evaluates whether the given harness satisfies this predicate.\n * @param harness The harness to check\n * @return A promise that resolves to true if the harness satisfies this predicate,\n * and resolves to false otherwise.\n */\n async evaluate(harness: T): Promise<boolean> {\n const results = await parallel(() => this._predicates.map(p => p(harness)));\n return results.reduce((combined, current) => combined && current, true);\n }\n\n /** Gets a description of this predicate for use in error messages. */\n getDescription() {\n return this._descriptions.join(', ');\n }\n\n /** Gets the selector used to find candidate elements. */\n getSelector() {\n // We don't have to go through the extra trouble if there are no ancestors.\n if (!this._ancestor) {\n return (this.harnessType.hostSelector || '').trim();\n }\n\n const [ancestors, ancestorPlaceholders] = _splitAndEscapeSelector(this._ancestor);\n const [selectors, selectorPlaceholders] = _splitAndEscapeSelector(\n this.harnessType.hostSelector || '',\n );\n const result: string[] = [];\n\n // We have to add the ancestor to each part of the host compound selector, otherwise we can get\n // incorrect results. E.g. `.ancestor .a, .ancestor .b` vs `.ancestor .a, .b`.\n ancestors.forEach(escapedAncestor => {\n const ancestor = _restoreSelector(escapedAncestor, ancestorPlaceholders);\n return selectors.forEach(escapedSelector =>\n result.push(`${ancestor} ${_restoreSelector(escapedSelector, selectorPlaceholders)}`),\n );\n });\n\n return result.join(', ');\n }\n\n /** Adds base options common to all harness types. */\n private _addBaseOptions(options: BaseHarnessFilters) {\n this._ancestor = options.ancestor || '';\n if (this._ancestor) {\n this._descriptions.push(`has ancestor matching selector \"${this._ancestor}\"`);\n }\n const selector = options.selector;\n if (selector !== undefined) {\n this.add(`host matches selector \"${selector}\"`, async item => {\n return (await item.host()).matchesSelector(selector);\n });\n }\n }\n}\n\n/** Represent a value as a string for the purpose of logging. */\nfunction _valueAsString(value: unknown) {\n if (value === undefined) {\n return 'undefined';\n }\n try {\n // `JSON.stringify` doesn't handle RegExp properly, so we need a custom replacer.\n // Use a character that is unlikely to appear in real strings to denote the start and end of\n // the regex. This allows us to strip out the extra quotes around the value added by\n // `JSON.stringify`. Also do custom escaping on `\"` characters to prevent `JSON.stringify`\n // from escaping them as if they were part of a string.\n const stringifiedValue = JSON.stringify(value, (_, v) =>\n v instanceof RegExp\n ? `◬MAT_RE_ESCAPE◬${v.toString().replace(/\"/g, '◬MAT_RE_ESCAPE◬')}◬MAT_RE_ESCAPE◬`\n : v,\n );\n // Strip out the extra quotes around regexes and put back the manually escaped `\"` characters.\n return stringifiedValue\n .replace(/\"◬MAT_RE_ESCAPE◬|◬MAT_RE_ESCAPE◬\"/g, '')\n .replace(/◬MAT_RE_ESCAPE◬/g, '\"');\n } catch {\n // `JSON.stringify` will throw if the object is cyclical,\n // in this case the best we can do is report the value as `{...}`.\n return '{...}';\n }\n}\n\n/**\n * Splits up a compound selector into its parts and escapes any quoted content. The quoted content\n * has to be escaped, because it can contain commas which will throw throw us off when trying to\n * split it.\n * @param selector Selector to be split.\n * @returns The escaped string where any quoted content is replaced with a placeholder. E.g.\n * `[foo=\"bar\"]` turns into `[foo=__cdkPlaceholder-0__]`. Use `_restoreSelector` to restore\n * the placeholders.\n */\nfunction _splitAndEscapeSelector(selector: string): [parts: string[], placeholders: string[]] {\n const placeholders: string[] = [];\n\n // Note that the regex doesn't account for nested quotes so something like `\"ab'cd'e\"` will be\n // considered as two blocks. It's a bit of an edge case, but if we find that it's a problem,\n // we can make it a bit smarter using a loop. Use this for now since it's more readable and\n // compact. More complete implementation:\n // https://github.com/angular/angular/blob/bd34bc9e89f18a/packages/compiler/src/shadow_css.ts#L655\n const result = selector.replace(/([\"'][^[\"']*[\"'])/g, (_, keep) => {\n const replaceBy = `__cdkPlaceholder-${placeholders.length}__`;\n placeholders.push(keep);\n return replaceBy;\n });\n\n return [result.split(',').map(part => part.trim()), placeholders];\n}\n\n/** Restores a selector whose content was escaped in `_splitAndEscapeSelector`. */\nfunction _restoreSelector(selector: string, placeholders: string[]): string {\n return selector.replace(/__cdkPlaceholder-(\\d+)__/g, (_, index) => placeholders[+index]);\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 {parallel} from './change-detection';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessLoader,\n HarnessPredicate,\n HarnessQuery,\n LocatorFactory,\n LocatorFnResult,\n} from './component-harness';\nimport {TestElement} from './test-element';\n\n/** Parsed form of the queries passed to the `locatorFor*` methods. */\ntype ParsedQueries<T extends ComponentHarness> = {\n /** The full list of queries, in their original order. */\n allQueries: (string | HarnessPredicate<T>)[];\n /**\n * A filtered view of `allQueries` containing only the queries that are looking for a\n * `ComponentHarness`\n */\n harnessQueries: HarnessPredicate<T>[];\n /**\n * A filtered view of `allQueries` containing only the queries that are looking for a\n * `TestElement`\n */\n elementQueries: string[];\n /** The set of all `ComponentHarness` subclasses represented in the original query list. */\n harnessTypes: Set<ComponentHarnessConstructor<T>>;\n};\n\n/**\n * Base harness environment class that can be extended to allow `ComponentHarness`es to be used in\n * different test environments (e.g. testbed, protractor, etc.). This class implements the\n * functionality of both a `HarnessLoader` and `LocatorFactory`. This class is generic on the raw\n * element type, `E`, used by the particular test environment.\n */\nexport abstract class HarnessEnvironment<E> implements HarnessLoader, LocatorFactory {\n /** The root element of this `HarnessEnvironment` as a `TestElement`. */\n get rootElement(): TestElement {\n this._rootElement = this._rootElement || this.createTestElement(this.rawRootElement);\n return this._rootElement;\n }\n set rootElement(element: TestElement) {\n this._rootElement = element;\n }\n private _rootElement: TestElement | undefined;\n\n protected constructor(\n /** The native root element of this `HarnessEnvironment`. */\n protected rawRootElement: E,\n ) {}\n\n /** Gets a locator factory rooted at the document root. */\n documentRootLocatorFactory(): LocatorFactory {\n return this.createEnvironment(this.getDocumentRoot());\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `HarnessEnvironment`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorFor(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorFor('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorFor('span')() // Throws because the `Promise` rejects\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` rejects. The type that the `Promise` resolves to is a union of all result types for\n * each query.\n */\n locatorFor<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>> {\n return () =>\n _assertResultFound(\n this._getAllHarnessesAndTestElements(queries),\n _getDescriptionForLocatorForQueries(queries),\n );\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance\n * or element under the root element of this `HarnessEnvironmnet`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * await lf.locatorForOptional(DivHarness, 'div')() // Gets a `DivHarness` instance for #d1\n * await lf.locatorForOptional('div', DivHarness)() // Gets a `TestElement` instance for #d1\n * await lf.locatorForOptional('span')() // Gets `null`\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for the\n * first element or harness matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If no matches are found, the\n * `Promise` is resolved with `null`. The type that the `Promise` resolves to is a union of all\n * result types for each query or null.\n */\n locatorForOptional<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T> | null> {\n return async () => (await this._getAllHarnessesAndTestElements(queries))[0] || null;\n }\n\n /**\n * Creates an asynchronous locator function that can be used to find `ComponentHarness` instances\n * or elements under the root element of this `HarnessEnvironment`.\n *\n * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` and\n * `IdIsD1Harness.hostSelector` is `'#d1'`\n *\n * ```html\n * <div id=\"d1\"></div><div id=\"d2\"></div>\n * ```\n *\n * then we expect:\n *\n * ```ts\n * // Gets [DivHarness for #d1, TestElement for #d1, DivHarness for #d2, TestElement for #d2]\n * await lf.locatorForAll(DivHarness, 'div')()\n * // Gets [TestElement for #d1, TestElement for #d2]\n * await lf.locatorForAll('div', '#d1')()\n * // Gets [DivHarness for #d1, IdIsD1Harness for #d1, DivHarness for #d2]\n * await lf.locatorForAll(DivHarness, IdIsD1Harness)()\n * // Gets []\n * await lf.locatorForAll('span')()\n * ```\n *\n * @param queries A list of queries specifying which harnesses and elements to search for:\n * - A `string` searches for elements matching the CSS selector specified by the string.\n * - A `ComponentHarness` constructor searches for `ComponentHarness` instances matching the\n * given class.\n * - A `HarnessPredicate` searches for `ComponentHarness` instances matching the given\n * predicate.\n * @return An asynchronous locator function that searches for and returns a `Promise` for all\n * elements and harnesses matching the given search criteria. Matches are ordered first by\n * order in the DOM, and second by order in the queries list. If an element matches more than\n * one `ComponentHarness` class, the locator gets an instance of each for the same element. If\n * an element matches multiple `string` selectors, only one `TestElement` instance is returned\n * for that element. The type that the `Promise` resolves to is an array where each element is\n * the union of all result types for each query.\n */\n locatorForAll<T extends (HarnessQuery<any> | string)[]>(\n ...queries: T\n ): () => Promise<LocatorFnResult<T>[]> {\n return () => this._getAllHarnessesAndTestElements(queries);\n }\n\n /** @return A `HarnessLoader` rooted at the root element of this `HarnessEnvironment`. */\n async rootHarnessLoader(): Promise<HarnessLoader> {\n return this;\n }\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `HarnessEnvironment`.\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector.\n * @throws If no matching element is found for the given selector.\n */\n async harnessLoaderFor(selector: string): Promise<HarnessLoader> {\n return this.createEnvironment(\n await _assertResultFound(this.getAllRawElements(selector), [\n _getDescriptionForHarnessLoaderQuery(selector),\n ]),\n );\n }\n\n /**\n * Gets a `HarnessLoader` instance for an element under the root of this `HarnessEnvironment`.\n * @param selector The selector for the root element.\n * @return A `HarnessLoader` rooted at the first element matching the given selector, or null if\n * no matching element is found.\n */\n async harnessLoaderForOptional(selector: string): Promise<HarnessLoader | null> {\n const elements = await this.getAllRawElements(selector);\n return elements[0] ? this.createEnvironment(elements[0]) : null;\n }\n\n /**\n * Gets a list of `HarnessLoader` instances, one for each matching element.\n * @param selector The selector for the root element.\n * @return A list of `HarnessLoader`, one rooted at each element matching the given selector.\n */\n async harnessLoaderForAll(selector: string): Promise<HarnessLoader[]> {\n const elements = await this.getAllRawElements(selector);\n return elements.map(element => this.createEnvironment(element));\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that instance. If\n * multiple matching components are found, a harness for the first one is returned. If no matching\n * component is found, an error is thrown.\n * @param query A query for a harness to create\n * @return An instance of the given harness type\n * @throws If a matching component instance can't be found.\n */\n getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T> {\n return this.locatorFor(query)();\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that instance. If\n * multiple matching components are found, a harness for the first one is returned. If no matching\n * component is found, null is returned.\n * @param query A query for a harness to create\n * @return An instance of the given harness type (or null if not found).\n */\n getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null> {\n return this.locatorForOptional(query)();\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type and index\n * under the `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that\n * instance. The index specifies the offset of the component to find. If no matching\n * component is found at that index, an error is thrown.\n * @param query A query for a harness to create\n * @param index The zero-indexed offset of the component to find\n * @return An instance of the given harness type\n * @throws If a matching component instance can't be found.\n */\n async getHarnessAtIndex<T extends ComponentHarness>(\n query: HarnessQuery<T>,\n offset: number,\n ): Promise<T> {\n if (offset < 0) {\n throw Error('Index must not be negative');\n }\n const harnesses = await this.locatorForAll(query)();\n if (offset >= harnesses.length) {\n throw Error(`No harness was located at index ${offset}`);\n }\n return harnesses[offset];\n }\n\n /**\n * Searches for all instances of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a list `ComponentHarness` for each instance.\n * @param query A query for a harness to create\n * @return A list instances of the given harness type.\n */\n getAllHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T[]> {\n return this.locatorForAll(query)();\n }\n\n /**\n * Searches for all instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns the number that were found.\n * @param query A query for a harness to create\n * @return The number of instances that were found.\n */\n async countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number> {\n return (await this.locatorForAll(query)()).length;\n }\n\n /**\n * Searches for an instance of the component corresponding to the given harness type under the\n * `HarnessEnvironment`'s root element, and returns a boolean indicating if any were found.\n * @param query A query for a harness to create\n * @return A boolean indicating if an instance was found.\n */\n async hasHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<boolean> {\n return (await this.locatorForOptional(query)()) !== null;\n }\n\n /**\n * Searches for an element with the given selector under the evironment's root element,\n * and returns a `HarnessLoader` rooted at the matching element. If multiple elements match the\n * selector, the first is used. If no elements match, an error is thrown.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A `HarnessLoader` rooted at the element matching the given selector.\n * @throws If a matching element can't be found.\n */\n async getChildLoader(selector: string): Promise<HarnessLoader> {\n return this.createEnvironment(\n await _assertResultFound(this.getAllRawElements(selector), [\n _getDescriptionForHarnessLoaderQuery(selector),\n ]),\n );\n }\n\n /**\n * Searches for all elements with the given selector under the environment's root element,\n * and returns an array of `HarnessLoader`s, one for each matching element, rooted at that\n * element.\n * @param selector The selector for the root element of the new `HarnessLoader`\n * @return A list of `HarnessLoader`s, one for each matching element, rooted at that element.\n */\n async getAllChildLoaders(selector: string): Promise<HarnessLoader[]> {\n return (await this.getAllRawElements(selector)).map(e => this.createEnvironment(e));\n }\n\n /** Creates a `ComponentHarness` for the given harness type with the given raw host element. */\n protected createComponentHarness<T extends ComponentHarness>(\n harnessType: ComponentHarnessConstructor<T>,\n element: E,\n ): T {\n return new harnessType(this.createEnvironment(element));\n }\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n * This is an abstrct method that must be implemented by subclasses.\n */\n abstract forceStabilize(): Promise<void>;\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n * This is an abstrct method that must be implemented by subclasses.\n */\n abstract waitForTasksOutsideAngular(): Promise<void>;\n\n /** Gets the root element for the document. */\n protected abstract getDocumentRoot(): E;\n\n /** Creates a `TestElement` from a raw element. */\n protected abstract createTestElement(element: E): TestElement;\n\n /** Creates a `HarnessEnvironment` rooted at the given raw element. */\n protected abstract createEnvironment(element: E): HarnessEnvironment<E>;\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected abstract getAllRawElements(selector: string): Promise<E[]>;\n\n /**\n * Matches the given raw elements with the given list of element and harness queries to produce a\n * list of matched harnesses and test elements.\n */\n private async _getAllHarnessesAndTestElements<T extends (HarnessQuery<any> | string)[]>(\n queries: T,\n ): Promise<LocatorFnResult<T>[]> {\n if (!queries.length) {\n throw Error('CDK Component harness query must contain at least one element.');\n }\n\n const {allQueries, harnessQueries, elementQueries, harnessTypes} = _parseQueries(queries);\n\n // Combine all of the queries into one large comma-delimited selector and use it to get all raw\n // elements matching any of the individual queries.\n const rawElements = await this.getAllRawElements(\n [...elementQueries, ...harnessQueries.map(predicate => predicate.getSelector())].join(','),\n );\n\n // If every query is searching for the same harness subclass, we know every result corresponds\n // to an instance of that subclass. Likewise, if every query is for a `TestElement`, we know\n // every result corresponds to a `TestElement`. Otherwise we need to verify which result was\n // found by which selector so it can be matched to the appropriate instance.\n const skipSelectorCheck =\n (elementQueries.length === 0 && harnessTypes.size === 1) || harnessQueries.length === 0;\n\n const perElementMatches = await parallel(() =>\n rawElements.map(async rawElement => {\n const testElement = this.createTestElement(rawElement);\n const allResultsForElement = await parallel(\n // For each query, get `null` if it doesn't match, or a `TestElement` or\n // `ComponentHarness` as appropriate if it does match. This gives us everything that\n // matches the current raw element, but it may contain duplicate entries (e.g.\n // multiple `TestElement` or multiple `ComponentHarness` of the same type).\n () =>\n allQueries.map(query =>\n this._getQueryResultForElement(query, rawElement, testElement, skipSelectorCheck),\n ),\n );\n return _removeDuplicateQueryResults(allResultsForElement);\n }),\n );\n return ([] as any).concat(...perElementMatches);\n }\n\n /**\n * Check whether the given query matches the given element, if it does return the matched\n * `TestElement` or `ComponentHarness`, if it does not, return null. In cases where the caller\n * knows for sure that the query matches the element's selector, `skipSelectorCheck` can be used\n * to skip verification and optimize performance.\n */\n private async _getQueryResultForElement<T extends ComponentHarness>(\n query: string | HarnessPredicate<T>,\n rawElement: E,\n testElement: TestElement,\n skipSelectorCheck: boolean = false,\n ): Promise<T | TestElement | null> {\n if (typeof query === 'string') {\n return skipSelectorCheck || (await testElement.matchesSelector(query)) ? testElement : null;\n }\n if (skipSelectorCheck || (await testElement.matchesSelector(query.getSelector()))) {\n const harness = this.createComponentHarness(query.harnessType, rawElement);\n return (await query.evaluate(harness)) ? harness : null;\n }\n return null;\n }\n}\n\n/**\n * Parses a list of queries in the format accepted by the `locatorFor*` methods into an easier to\n * work with format.\n */\nfunction _parseQueries<T extends (HarnessQuery<any> | string)[]>(\n queries: T,\n): ParsedQueries<LocatorFnResult<T> & ComponentHarness> {\n const allQueries = [];\n const harnessQueries = [];\n const elementQueries = [];\n const harnessTypes = new Set<\n ComponentHarnessConstructor<LocatorFnResult<T> & ComponentHarness>\n >();\n\n for (const query of queries) {\n if (typeof query === 'string') {\n allQueries.push(query);\n elementQueries.push(query);\n } else {\n const predicate = query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});\n allQueries.push(predicate);\n harnessQueries.push(predicate);\n harnessTypes.add(predicate.harnessType);\n }\n }\n\n return {allQueries, harnessQueries, elementQueries, harnessTypes};\n}\n\n/**\n * Removes duplicate query results for a particular element. (e.g. multiple `TestElement`\n * instances or multiple instances of the same `ComponentHarness` class.\n */\nasync function _removeDuplicateQueryResults<T extends (ComponentHarness | TestElement | null)[]>(\n results: T,\n): Promise<T> {\n let testElementMatched = false;\n let matchedHarnessTypes = new Set();\n const dedupedMatches = [];\n for (const result of results) {\n if (!result) {\n continue;\n }\n if (result instanceof ComponentHarness) {\n if (!matchedHarnessTypes.has(result.constructor)) {\n matchedHarnessTypes.add(result.constructor);\n dedupedMatches.push(result);\n }\n } else if (!testElementMatched) {\n testElementMatched = true;\n dedupedMatches.push(result);\n }\n }\n return dedupedMatches as T;\n}\n\n/** Verifies that there is at least one result in an array. */\nasync function _assertResultFound<T>(\n results: Promise<T[]>,\n queryDescriptions: string[],\n): Promise<T> {\n const result = (await results)[0];\n if (result == undefined) {\n throw Error(\n `Failed to find element matching one of the following queries:\\n` +\n queryDescriptions.map(desc => `(${desc})`).join(',\\n'),\n );\n }\n return result;\n}\n\n/** Gets a list of description strings from a list of queries. */\nfunction _getDescriptionForLocatorForQueries(queries: (string | HarnessQuery<any>)[]) {\n return queries.map(query =>\n typeof query === 'string'\n ? _getDescriptionForTestElementQuery(query)\n : _getDescriptionForComponentHarnessQuery(query),\n );\n}\n\n/** Gets a description string for a `ComponentHarness` query. */\nfunction _getDescriptionForComponentHarnessQuery(query: HarnessQuery<any>) {\n const harnessPredicate =\n query instanceof HarnessPredicate ? query : new HarnessPredicate(query, {});\n const {name, hostSelector} = harnessPredicate.harnessType;\n const description = `${name} with host element matching selector: \"${hostSelector}\"`;\n const constraints = harnessPredicate.getDescription();\n return (\n description +\n (constraints ? ` satisfying the constraints: ${harnessPredicate.getDescription()}` : '')\n );\n}\n\n/** Gets a description string for a `TestElement` query. */\nfunction _getDescriptionForTestElementQuery(selector: string) {\n return `TestElement for element matching selector: \"${selector}\"`;\n}\n\n/** Gets a description string for a `HarnessLoader` query. */\nfunction _getDescriptionForHarnessLoaderQuery(selector: string) {\n return `HarnessLoader for element matching selector: \"${selector}\"`;\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 {ElementDimensions} from './element-dimensions';\n\n/** Modifier keys that may be held while typing. */\nexport interface ModifierKeys {\n control?: boolean;\n alt?: boolean;\n shift?: boolean;\n meta?: boolean;\n}\n\n/** Data that can be attached to a custom event dispatched from a `TestElement`. */\nexport type EventData =\n | string\n | number\n | boolean\n | Function\n | undefined\n | null\n | EventData[]\n | {[key: string]: EventData};\n\n/** An enum of non-text keys that can be used with the `sendKeys` method. */\n// NOTE: This is a separate enum from `@angular/cdk/keycodes` because we don't necessarily want to\n// support every possible keyCode. We also can't rely on Protractor's `Key` because we don't want a\n// dependency on any particular testing framework here. Instead we'll just maintain this supported\n// list of keys and let individual concrete `HarnessEnvironment` classes map them to whatever key\n// representation is used in its respective testing framework.\n// tslint:disable-next-line:prefer-const-enum Seems like this causes some issues with System.js\nexport enum TestKey {\n BACKSPACE,\n TAB,\n ENTER,\n SHIFT,\n CONTROL,\n ALT,\n ESCAPE,\n PAGE_UP,\n PAGE_DOWN,\n END,\n HOME,\n LEFT_ARROW,\n UP_ARROW,\n RIGHT_ARROW,\n DOWN_ARROW,\n INSERT,\n DELETE,\n F1,\n F2,\n F3,\n F4,\n F5,\n F6,\n F7,\n F8,\n F9,\n F10,\n F11,\n F12,\n META,\n COMMA, // Commas are a common separator key.\n}\n\n/**\n * This acts as a common interface for DOM elements across both unit and e2e tests. It is the\n * interface through which the ComponentHarness interacts with the component's DOM.\n */\nexport interface TestElement {\n /** Blur the element. */\n blur(): Promise<void>;\n\n /** Clear the element's input (for input and textarea elements only). */\n clear(): Promise<void>;\n\n /**\n * Click the element at the default location for the current environment. If you need to guarantee\n * the element is clicked at a specific location, consider using `click('center')` or\n * `click(x, y)` instead.\n */\n click(modifiers?: ModifierKeys): Promise<void>;\n\n /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise<void>;\n\n /**\n * Click the element at the specified coordinates relative to the top-left of the element.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n\n /**\n * Right clicks on the element at the specified coordinates relative to the top-left of it.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;\n\n /** Focus the element. */\n focus(): Promise<void>;\n\n /** Get the computed value of the given CSS property for the element. */\n getCssValue(property: string): Promise<string>;\n\n /** Hovers the mouse over the element. */\n hover(): Promise<void>;\n\n /** Moves the mouse away from the element. */\n mouseAway(): Promise<void>;\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value. Note that some environments cannot\n * reproduce native browser behavior for keyboard shortcuts such as Tab, Ctrl + A, etc.\n * @throws An error if no keys have been specified.\n */\n sendKeys(...keys: (string | TestKey)[]): Promise<void>;\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input\n * events and attempts to add the string to the Element's value.\n * @throws An error if no keys have been specified.\n */\n sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n text(options?: TextOptions): Promise<string>;\n\n /**\n * Sets the value of a `contenteditable` element.\n * @param value Value to be set on the element.\n */\n setContenteditableValue(value: string): Promise<void>;\n\n /** Gets the value for the given attribute from the element. */\n getAttribute(name: string): Promise<string | null>;\n\n /** Checks whether the element has the given class. */\n hasClass(name: string): Promise<boolean>;\n\n /** Gets the dimensions of the element. */\n getDimensions(): Promise<ElementDimensions>;\n\n /** Gets the value of a property of an element. */\n getProperty<T = any>(name: string): Promise<T>;\n\n /** Checks whether this element matches the given selector. */\n matchesSelector(selector: string): Promise<boolean>;\n\n /** Checks whether the element is focused. */\n isFocused(): Promise<boolean>;\n\n /** Sets the value of a property of an input. */\n setInputValue(value: string): Promise<void>;\n\n // Note that ideally here we'd be selecting options based on their value, rather than their\n // index, but we're limited by `@angular/forms` which will modify the option value in some cases.\n // Since the value will be truncated, we can't rely on it to do the lookup in the DOM. See:\n // https://github.com/angular/angular/blob/main/packages/forms/src/directives/select_control_value_accessor.ts#L19\n /** Selects the options at the specified indexes inside of a native `select` element. */\n selectOptions(...optionIndexes: number[]): Promise<void>;\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void>;\n}\n\n/**\n * Options that affect the text returned by `TestElement.text`.\n */\nexport interface TextOptions {\n /** Optional selector for elements whose content should be excluded from the text string. */\n exclude?: string;\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\n/**\n * Returns an error which reports that no keys have been specified.\n * @docs-private\n */\nexport function getNoKeysSpecifiedError() {\n return Error('No keys have been specified.');\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\n/**\n * Gets text of element excluding certain selectors within the element.\n * @param element Element to get text from,\n * @param excludeSelector Selector identifying which elements to exclude,\n */\nexport function _getTextWithExcludedElements(element: Element, excludeSelector: string) {\n const clone = element.cloneNode(true) as Element;\n const exclusions = clone.querySelectorAll(excludeSelector);\n for (let i = 0; i < exclusions.length; i++) {\n exclusions[i].remove();\n }\n return (clone.textContent || '').trim();\n}\n"],"names":["autoChangeDetectionSubject","BehaviorSubject","isDisabled","autoChangeDetectionSubscription","defaultAutoChangeDetectionHandler","status","onDetectChangesNow","handleAutoChangeDetectionStatus","handler","stopHandlingAutoChangeDetectionStatus","subscribe","unsubscribe","batchChangeDetection","fn","triggerBeforeAndAfter","getValue","Promise","resolve","next","manualChangeDetection","parallel","values","all","ComponentHarness","locatorFactory","constructor","host","rootElement","documentRootLocatorFactory","locatorFor","queries","locatorForOptional","locatorForAll","forceStabilize","waitForTasksOutsideAngular","ContentContainerComponentHarness","getChildLoader","selector","getRootHarnessLoader","getAllChildLoaders","getHarness","query","getHarnessOrNull","getHarnessAtIndex","index","getAllHarnesses","countHarnesses","hasHarness","rootHarnessLoader","HarnessPredicate","harnessType","_predicates","_descriptions","_ancestor","options","_addBaseOptions","stringMatches","value","pattern","test","add","description","predicate","push","addOption","name","option","undefined","_valueAsString","item","filter","harnesses","length","results","map","h","evaluate","_","i","harness","p","reduce","combined","current","getDescription","join","getSelector","hostSelector","trim","ancestors","ancestorPlaceholders","_splitAndEscapeSelector","selectors","selectorPlaceholders","result","forEach","escapedAncestor","ancestor","_restoreSelector","escapedSelector","matchesSelector","stringifiedValue","JSON","stringify","v","RegExp","toString","replace","placeholders","keep","replaceBy","split","part","HarnessEnvironment","rawRootElement","_rootElement","createTestElement","element","createEnvironment","getDocumentRoot","_assertResultFound","_getAllHarnessesAndTestElements","_getDescriptionForLocatorForQueries","harnessLoaderFor","getAllRawElements","_getDescriptionForHarnessLoaderQuery","harnessLoaderForOptional","elements","harnessLoaderForAll","offset","Error","e","createComponentHarness","allQueries","harnessQueries","elementQueries","harnessTypes","_parseQueries","rawElements","skipSelectorCheck","size","perElementMatches","rawElement","testElement","allResultsForElement","_getQueryResultForElement","_removeDuplicateQueryResults","concat","Set","testElementMatched","matchedHarnessTypes","dedupedMatches","has","queryDescriptions","desc","_getDescriptionForTestElementQuery","_getDescriptionForComponentHarnessQuery","harnessPredicate","constraints","TestKey","getNoKeysSpecifiedError","_getTextWithExcludedElements","excludeSelector","clone","cloneNode","exclusions","querySelectorAll","remove","textContent"],"mappings":";;AA2BA,MAAMA,0BAA0B,GAAG,IAAIC,eAAe,CAA4B;AAChFC,EAAAA,UAAU,EAAE;AACb,CAAA,CAAC;AAGF,IAAIC,+BAAoD;AAOxD,SAASC,iCAAiCA,CAACC,MAAiC,EAAA;EAC1EA,MAAM,CAACC,kBAAkB,IAAI;AAC/B;AAOM,SAAUC,+BAA+BA,CAC7CC,OAAoD,EAAA;AAEpDC,EAAAA,qCAAqC,EAAE;AACvCN,EAAAA,+BAA+B,GAAGH,0BAA0B,CAACU,SAAS,CAACF,OAAO,CAAC;AACjF;SAGgBC,qCAAqCA,GAAA;EACnDN,+BAA+B,EAAEQ,WAAW,EAAE;AAC9CR,EAAAA,+BAA+B,GAAG,IAAI;AACxC;AASA,eAAeS,oBAAoBA,CAAIC,EAAoB,EAAEC,qBAA8B,EAAA;AAEzF,EAAA,IAAId,0B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W,IAAI,EAAE,EAAEhF,IAAI,EAAE;AACzC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/text-field-style-loader.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autofill.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autosize.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n/** Component used to load the structural styles of the text field. */\n@Component({\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: 'text-field-prebuilt.css',\n host: {'cdk-text-field-style-loader': ''},\n})\nexport class _CdkTextFieldStyleLoader {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Platform} from '../platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n RendererFactory2,\n} from '@angular/core';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {coerceElement} from '../coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n readonly subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = {passive: true};\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(RendererFactory2).createRenderer(null, null);\n\n private _styleLoader = inject(_CdkPrivateStyleLoader);\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n this._styleLoader.load(_CdkTextFieldStyleLoader);\n\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject;\n }\n\n const subject = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = (event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (\n event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)\n ) {\n element.classList.add(cssClass);\n this._ngZone.run(() => subject.next({target: event.target as Element, isAutofilled: true}));\n } else if (\n event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)\n ) {\n element.classList.remove(cssClass);\n this._ngZone.run(() =>\n subject.next({target: event.target as Element, isAutofilled: false}),\n );\n }\n };\n\n const unlisten = this._ngZone.runOutsideAngular(() => {\n element.classList.add('cdk-text-field-autofill-monitored');\n return this._renderer.listen(element, 'animationstart', listener, listenerOptions);\n });\n\n this._monitoredElements.set(element, {subject, unlisten});\n return subject;\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _autofillMonitor = inject(AutofillMonitor);\n\n /** Emits when the autofill state of the element changes. */\n @Output() readonly cdkAutofill = new EventEmitter<AutofillEvent>();\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NumberInput, coerceNumberProperty} from '../coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n booleanAttribute,\n inject,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {Platform} from '../platform';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {auditTime} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(Renderer2);\n private _resizeEvents = new Subject<void>();\n\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | undefined;\n private readonly _destroyed = new Subject<void>();\n private _listenerCleanups: (() => void)[] | undefined;\n\n private _minRows: number;\n private _maxRows: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number {\n return this._minRows;\n }\n set minRows(value: NumberInput) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number {\n return this._maxRows;\n }\n set maxRows(value: NumberInput) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input({alias: 'cdkTextareaAutosize', transform: booleanAttribute})\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: boolean) {\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n @Input()\n get placeholder(): string {\n return this._textareaElement.placeholder;\n }\n set placeholder(value: string) {\n this._cachedPlaceholderHeight = undefined;\n\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n } else {\n this._textareaElement.removeAttribute('placeholder');\n }\n\n this._cacheTextareaPlaceholderHeight();\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight?: number;\n /** Cached height of a textarea with only the placeholder. */\n private _cachedPlaceholderHeight?: number;\n\n /** Used to reference correct document/window */\n protected _document = inject(DOCUMENT);\n\n private _hasFocus: boolean;\n\n private _isViewInited = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_CdkTextFieldStyleLoader);\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight =\n this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight =\n this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n this._listenerCleanups = [\n this._renderer.listen('window', 'resize', () => this._resizeEvents.next()),\n this._renderer.listen(this._textareaElement, 'focus', this._handleFocusEvent),\n this._renderer.listen(this._textareaElement, 'blur', this._handleFocusEvent),\n ];\n this._resizeEvents.pipe(auditTime(16)).subscribe(() => {\n // Clear the cached heights since the styles can change\n // when the window is resized (e.g. by media queries).\n this._cachedLineHeight = this._cachedPlaceholderHeight = undefined;\n this.resizeToFitContent(true);\n });\n });\n\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n\n ngOnDestroy() {\n this._listenerCleanups?.forEach(cleanup => cleanup());\n this._resizeEvents.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n const textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n const cloneStyles = textareaClone.style;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n cloneStyles.position = 'absolute';\n cloneStyles.visibility = 'hidden';\n cloneStyles.border = 'none';\n cloneStyles.padding = '0';\n cloneStyles.height = '';\n cloneStyles.minHeight = '';\n cloneStyles.maxHeight = '';\n\n // App styles might be messing with the height through the positioning properties.\n cloneStyles.top = cloneStyles.bottom = cloneStyles.left = cloneStyles.right = 'auto';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n cloneStyles.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n private _measureScrollHeight(): number {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = isFirefox && this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n\n // In some cases the page might move around while we're measuring the `textarea` on Firefox. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n\n return scrollHeight;\n }\n\n private _cacheTextareaPlaceholderHeight(): void {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n\n const value = this._textareaElement.value;\n\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n\n /** Handles `focus` and `blur` events. */\n private _handleFocusEvent = (event: FocusEvent) => {\n this._hasFocus = event.type === 'focus';\n };\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n } else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n imports: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["version","ngImport","i0","type","_CdkTextFieldStyleLoader","decorators","listenerOptions","Platform","constructor","monitor","elementOrRef","_platform","isBrowser","EMPTY","_styleLoader","load","element","coerceElement","_monitoredElements","get","subject","Subject","cssClass","listener","event","animationName","classList","contains","_ngZone","run","next","target","isAutofilled","EventEmitter","CdkTextareaAutosize","_renderer","inject","Renderer2","_initialHeight","_destroyed","_listenerCleanups","_minRows","_maxRows","_previousMinRows","_textareaElement","coerceNumberProperty","value","maxRows","_setMaxHeight","enabled","_enabled","resizeToFitContent","reset","placeholder","_cachedPlaceholderHeight","undefined","setAttribute","_cacheTextareaPlaceholderHeight","DOCUMENT","_hasFocus","_isViewInited","styleLoader","_elementRef","nativeElement","minHeight","style","maxHeight","_cachedLineHeight","ngAfterViewInit","height","listen","_resizeEvents","_handleFocusEvent","pipe","auditTime","subscribe","forEach","cleanup","complete","textareaClone","rows","cloneStyles","visibility","border","padding","top","bottom","left","right","parentNode","appendChild","remove","_measureScrollHeight","marginBottom","isFirefox","FIREFOX","needsMarginFiller","measuringClass","clientHeight","scrollHeight","ngDoCheck","force","textarea","ctorParameters","propDecorators","minRows","transform","booleanAttribute","Input","ɵmod","ɵɵngDeclareNgModule","minVersion","TextFieldModule","imports","CdkAutofill","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAWU,EAAA,QAAA;AAAAA,EAAAA,OAAA,EAAA,eAAA;AAAAC,EAAAA,QAAA,EAAAC,EAAA;AAAAC,EAAAA,IAAA,EAAAC,wBAAA;EAAAC,UAAA,EAAA,CAAA;;;;;;;;;;;;;;ACgCV,MAAAC;;;;oBAyDM,CAAAC,QAAA,CAAA;;;;;EASFC,WAAA,GAAA;AAGEC,EAAAA,O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,OAAA,EAAA,CAAAD,WAAA,EAAAhF,mBAAA;AAAA,GAAA,CAAA;;;;;;;;4BAJJ;AAAA6E,EAAAA,UAAA,EAAA,QAAA;EAAA/G,OAAA,EAAA,eAAA;AAAAC,EAAAA,QAAA,EAAAC,EAAA;AAAAC,EAAAA,IAAA,EAAA6G,eAAA;EAAA3G,UAAA,EAAA,CAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"text-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/text-field-style-loader.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autofill.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/autosize.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n/** Component used to load the structural styles of the text field. */\n@Component({\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: 'text-field-prebuilt.css',\n host: {'cdk-text-field-style-loader': ''},\n})\nexport class _CdkTextFieldStyleLoader {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Platform} from '../platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n RendererFactory2,\n} from '@angular/core';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {coerceElement} from '../coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n readonly subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = {passive: true};\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(RendererFactory2).createRenderer(null, null);\n\n private _styleLoader = inject(_CdkPrivateStyleLoader);\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n this._styleLoader.load(_CdkTextFieldStyleLoader);\n\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject;\n }\n\n const subject = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = (event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (\n event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)\n ) {\n element.classList.add(cssClass);\n this._ngZone.run(() => subject.next({target: event.target as Element, isAutofilled: true}));\n } else if (\n event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)\n ) {\n element.classList.remove(cssClass);\n this._ngZone.run(() =>\n subject.next({target: event.target as Element, isAutofilled: false}),\n );\n }\n };\n\n const unlisten = this._ngZone.runOutsideAngular(() => {\n element.classList.add('cdk-text-field-autofill-monitored');\n return this._renderer.listen(element, 'animationstart', listener, listenerOptions);\n });\n\n this._monitoredElements.set(element, {subject, unlisten});\n return subject;\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _autofillMonitor = inject(AutofillMonitor);\n\n /** Emits when the autofill state of the element changes. */\n @Output() readonly cdkAutofill = new EventEmitter<AutofillEvent>();\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NumberInput, coerceNumberProperty} from '../coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n booleanAttribute,\n inject,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {Platform} from '../platform';\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {auditTime} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {_CdkTextFieldStyleLoader} from './text-field-style-loader';\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _platform = inject(Platform);\n private _ngZone = inject(NgZone);\n private _renderer = inject(Renderer2);\n private _resizeEvents = new Subject<void>();\n\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | undefined;\n private readonly _destroyed = new Subject<void>();\n private _listenerCleanups: (() => void)[] | undefined;\n\n private _minRows: number;\n private _maxRows: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number {\n return this._minRows;\n }\n set minRows(value: NumberInput) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number {\n return this._maxRows;\n }\n set maxRows(value: NumberInput) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input({alias: 'cdkTextareaAutosize', transform: booleanAttribute})\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: boolean) {\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n @Input()\n get placeholder(): string {\n return this._textareaElement.placeholder;\n }\n set placeholder(value: string) {\n this._cachedPlaceholderHeight = undefined;\n\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n } else {\n this._textareaElement.removeAttribute('placeholder');\n }\n\n this._cacheTextareaPlaceholderHeight();\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight?: number;\n /** Cached height of a textarea with only the placeholder. */\n private _cachedPlaceholderHeight?: number;\n\n /** Used to reference correct document/window */\n protected _document = inject(DOCUMENT);\n\n private _hasFocus: boolean;\n\n private _isViewInited = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_CdkTextFieldStyleLoader);\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight =\n this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight =\n this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n this._listenerCleanups = [\n this._renderer.listen('window', 'resize', () => this._resizeEvents.next()),\n this._renderer.listen(this._textareaElement, 'focus', this._handleFocusEvent),\n this._renderer.listen(this._textareaElement, 'blur', this._handleFocusEvent),\n ];\n this._resizeEvents.pipe(auditTime(16)).subscribe(() => {\n // Clear the cached heights since the styles can change\n // when the window is resized (e.g. by media queries).\n this._cachedLineHeight = this._cachedPlaceholderHeight = undefined;\n this.resizeToFitContent(true);\n });\n });\n\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n\n ngOnDestroy() {\n this._listenerCleanups?.forEach(cleanup => cleanup());\n this._resizeEvents.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n const textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n const cloneStyles = textareaClone.style;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n cloneStyles.position = 'absolute';\n cloneStyles.visibility = 'hidden';\n cloneStyles.border = 'none';\n cloneStyles.padding = '0';\n cloneStyles.height = '';\n cloneStyles.minHeight = '';\n cloneStyles.maxHeight = '';\n\n // App styles might be messing with the height through the positioning properties.\n cloneStyles.top = cloneStyles.bottom = cloneStyles.left = cloneStyles.right = 'auto';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n cloneStyles.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n private _measureScrollHeight(): number {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = isFirefox && this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n\n // In some cases the page might move around while we're measuring the `textarea` on Firefox. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n\n return scrollHeight;\n }\n\n private _cacheTextareaPlaceholderHeight(): void {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n\n const value = this._textareaElement.value;\n\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n\n /** Handles `focus` and `blur` events. */\n private _handleFocusEvent = (event: FocusEvent) => {\n this._hasFocus = event.type === 'focus';\n };\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n } else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n imports: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["_CdkTextFieldStyleLoader","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","template","host","listenerOptions","passive","AutofillMonitor","_platform","inject","Platform","_ngZone","NgZone","_renderer","RendererFactory2","createRenderer","_styleLoader","_CdkPrivateStyleLoader","_monitoredElements","Map","constructor","monitor","elementOrRef","isBrowser","EMPTY","load","element","coerceElement","info","get","subject","Subject","cssClass","listener","event","animationName","classList","contains","add","run","next","isAutofilled","remove","unlisten","runOutsideAngular","listen","set","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","Injectable","ɵprov","ɵɵngDeclareInjectable","ngImport","providedIn","CdkAutofill","_elementRef","ElementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","isStandalone","selector","outputs","Output","CdkTextareaAutosize","Renderer2","_resizeEvents","_previousValue","_initialHeight","_destroyed","_listenerCleanups","_minRows","_maxRows","_enabled","_previousMinRows","_textareaElement","minRows","value","coerceNumberProperty","_setMinHeight","maxRows","_setMaxHeight","enabled","resizeToFitContent","reset","placeholder","_cachedPlaceholderHeight","undefined","setAttribute","removeAttribute","_cacheTextareaPlaceholderHeight","_cachedLineHeight","_document","DOCUMENT","_hasFocus","_isViewInited","styleLoader","nativeElement","minHeight","style","maxHeight","ngAfterViewInit","height","_handleFocusEvent","pipe","auditTime","cleanup","_cacheTextareaLineHeight","textareaClone","cloneNode","cloneStyles","rows","position","visibility","border","padding","top","bottom","left","right","overflow","parentNode","appendChild","clientHeight","_measureScrollHeight","previousMargin","marginBottom","isFirefox","FIREFOX","needsMarginFiller","measuringClass","scrollHeight","ngDoCheck","force","textarea","Math","max","requestAnimationFrame","_scrollToCaretPosition","setTimeout","_noopInputHandler","selectionStart","selectionEnd","isStopped","setSelectionRange","ɵdir","ɵɵngDeclareDirective","booleanAttribute","attributes","listeners","classAttribute","exportAs","Input","alias","transform","TextFieldModule","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","imports"],"mappings":";;;;;;;;;MAkBaA,wBAAwB,CAAA;;;;;UAAxBA,wBAAwB;AAAAC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;AAAxB,EAAA,OAAAC,IAAA,GAAAH,EAAA,CAAAI,oBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAC,IAAAA,IAAA,EAAAV,wBAAwB;;;;;;;;;cANzB,EAAE;AAAAW,IAAAA,QAAA,EAAA,IAAA;IAAAC,MAAA,EAAA,CAAA,2mBAAA,CAAA;AAAAC,IAAAA,eAAA,EAAAV,EAAA,CAAAW,uBAAA,CAAAC,MAAA;AAAAC,IAAAA,aAAA,EAAAb,EAAA,CAAAc,iBAAA,CAAAC;AAAA,GAAA,CAAA;;;;;;QAMDlB,wBAAwB;AAAAmB,EAAAA,UAAA,EAAA,CAAA;UAPpCd,SAAS;AACEe,IAAAA,IAAA,EAAA,CAAA;AAAAC,MAAAA,QAAA,EAAA,EAAE;MACKR,eAAA,EAAAC,uBAAuB,CAACC,MAAM;MAChCC,aAAA,EAAAC,iBAAiB,CAACC,IAAI;AAE/BI,MAAAA,IAAA,EAAA;AAAC,QAAA,6BAA6B,EAAE;OAAG;MA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