@angular/cdk 13.2.0 → 13.2.1
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/a11y/aria-describer/aria-describer.d.ts +33 -6
- package/esm2020/a11y/a11y-module.mjs +5 -5
- package/esm2020/a11y/aria-describer/aria-describer.mjs +75 -52
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +7 -7
- package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
- package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +4 -4
- package/esm2020/a11y/focus-trap/focus-trap.mjs +7 -7
- package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +4 -4
- package/esm2020/a11y/input-modality/input-modality-detector.mjs +4 -4
- package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
- package/esm2020/a11y/live-announcer/live-announcer.mjs +7 -7
- package/esm2020/accordion/accordion-item.mjs +4 -4
- package/esm2020/accordion/accordion-module.mjs +5 -5
- package/esm2020/accordion/accordion.mjs +4 -4
- package/esm2020/bidi/bidi-module.mjs +5 -5
- package/esm2020/bidi/dir.mjs +4 -4
- package/esm2020/bidi/directionality.mjs +4 -4
- package/esm2020/clipboard/clipboard-module.mjs +5 -5
- package/esm2020/clipboard/clipboard.mjs +4 -4
- package/esm2020/clipboard/copy-to-clipboard.mjs +4 -4
- package/esm2020/collections/unique-selection-dispatcher.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-handle.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-placeholder.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-preview.mjs +4 -4
- package/esm2020/drag-drop/directives/drag.mjs +4 -4
- package/esm2020/drag-drop/directives/drop-list-group.mjs +4 -4
- package/esm2020/drag-drop/directives/drop-list.mjs +4 -4
- package/esm2020/drag-drop/drag-drop-module.mjs +5 -5
- package/esm2020/drag-drop/drag-drop-registry.mjs +4 -4
- package/esm2020/drag-drop/drag-drop.mjs +4 -4
- package/esm2020/layout/breakpoints-observer.mjs +4 -4
- package/esm2020/layout/layout-module.mjs +5 -5
- package/esm2020/layout/media-matcher.mjs +4 -4
- package/esm2020/observers/observe-content.mjs +14 -14
- package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
- package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +4 -4
- package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +4 -4
- package/esm2020/overlay/fullscreen-overlay-container.mjs +4 -4
- package/esm2020/overlay/overlay-container.mjs +4 -4
- package/esm2020/overlay/overlay-directives.mjs +7 -7
- package/esm2020/overlay/overlay-module.mjs +5 -5
- package/esm2020/overlay/overlay.mjs +4 -4
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +9 -3
- package/esm2020/overlay/position/overlay-position-builder.mjs +4 -4
- package/esm2020/overlay/scroll/scroll-strategy-options.mjs +4 -4
- package/esm2020/platform/platform-module.mjs +5 -5
- package/esm2020/platform/platform.mjs +4 -4
- package/esm2020/portal/portal-directives.mjs +17 -17
- package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +4 -4
- package/esm2020/scrolling/scroll-dispatcher.mjs +4 -4
- package/esm2020/scrolling/scrollable.mjs +4 -4
- package/esm2020/scrolling/scrolling-module.mjs +9 -9
- package/esm2020/scrolling/viewport-ruler.mjs +4 -4
- package/esm2020/scrolling/virtual-for-of.mjs +4 -4
- package/esm2020/scrolling/virtual-scroll-viewport.mjs +4 -4
- package/esm2020/stepper/step-header.mjs +4 -4
- package/esm2020/stepper/step-label.mjs +4 -4
- package/esm2020/stepper/stepper-button.mjs +7 -7
- package/esm2020/stepper/stepper-module.mjs +5 -5
- package/esm2020/stepper/stepper.mjs +7 -7
- package/esm2020/table/cell.mjs +22 -22
- package/esm2020/table/coalesced-style-scheduler.mjs +4 -4
- package/esm2020/table/row.mjs +28 -28
- package/esm2020/table/table-module.mjs +5 -5
- package/esm2020/table/table.mjs +19 -19
- package/esm2020/table/text-column.mjs +4 -4
- package/esm2020/testing/protractor/protractor-harness-environment.mjs +3 -2
- package/esm2020/text-field/autofill.mjs +7 -7
- package/esm2020/text-field/autosize.mjs +4 -4
- package/esm2020/text-field/text-field-module.mjs +5 -5
- package/esm2020/tree/nested-node.mjs +4 -4
- package/esm2020/tree/node.mjs +4 -4
- package/esm2020/tree/outlet.mjs +4 -4
- package/esm2020/tree/padding.mjs +4 -4
- package/esm2020/tree/toggle.mjs +4 -4
- package/esm2020/tree/tree-module.mjs +5 -5
- package/esm2020/tree/tree.mjs +7 -7
- package/esm2020/version.mjs +1 -1
- package/fesm2015/a11y.mjs +116 -93
- package/fesm2015/a11y.mjs.map +1 -1
- package/fesm2015/accordion.mjs +10 -10
- package/fesm2015/accordion.mjs.map +1 -1
- package/fesm2015/bidi.mjs +10 -10
- package/fesm2015/bidi.mjs.map +1 -1
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2015/clipboard.mjs +10 -10
- package/fesm2015/clipboard.mjs.map +1 -1
- package/fesm2015/collections.mjs +3 -3
- package/fesm2015/collections.mjs.map +1 -1
- package/fesm2015/drag-drop.mjs +28 -28
- package/fesm2015/drag-drop.mjs.map +1 -1
- package/fesm2015/layout.mjs +10 -10
- package/fesm2015/layout.mjs.map +1 -1
- package/fesm2015/observers.mjs +13 -13
- package/fesm2015/observers.mjs.map +1 -1
- package/fesm2015/overlay.mjs +42 -36
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/platform.mjs +7 -7
- package/fesm2015/platform.mjs.map +1 -1
- package/fesm2015/portal.mjs +16 -16
- package/fesm2015/portal.mjs.map +1 -1
- package/fesm2015/scrolling.mjs +26 -26
- package/fesm2015/scrolling.mjs.map +1 -1
- package/fesm2015/stepper.mjs +22 -22
- package/fesm2015/stepper.mjs.map +1 -1
- package/fesm2015/table.mjs +76 -76
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/testing/protractor.mjs +2 -1
- package/fesm2015/testing/protractor.mjs.map +1 -1
- package/fesm2015/text-field.mjs +13 -13
- package/fesm2015/text-field.mjs.map +1 -1
- package/fesm2015/tree.mjs +25 -25
- package/fesm2015/tree.mjs.map +1 -1
- package/fesm2020/a11y.mjs +113 -92
- package/fesm2020/a11y.mjs.map +1 -1
- package/fesm2020/accordion.mjs +10 -10
- package/fesm2020/accordion.mjs.map +1 -1
- package/fesm2020/bidi.mjs +10 -10
- package/fesm2020/bidi.mjs.map +1 -1
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/fesm2020/clipboard.mjs +10 -10
- package/fesm2020/clipboard.mjs.map +1 -1
- package/fesm2020/collections.mjs +3 -3
- package/fesm2020/collections.mjs.map +1 -1
- package/fesm2020/drag-drop.mjs +28 -28
- package/fesm2020/drag-drop.mjs.map +1 -1
- package/fesm2020/layout.mjs +10 -10
- package/fesm2020/layout.mjs.map +1 -1
- package/fesm2020/observers.mjs +13 -13
- package/fesm2020/observers.mjs.map +1 -1
- package/fesm2020/overlay.mjs +42 -36
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/platform.mjs +7 -7
- package/fesm2020/platform.mjs.map +1 -1
- package/fesm2020/portal.mjs +16 -16
- package/fesm2020/portal.mjs.map +1 -1
- package/fesm2020/scrolling.mjs +26 -26
- package/fesm2020/scrolling.mjs.map +1 -1
- package/fesm2020/stepper.mjs +22 -22
- package/fesm2020/stepper.mjs.map +1 -1
- package/fesm2020/table.mjs +76 -76
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/testing/protractor.mjs +2 -1
- package/fesm2020/testing/protractor.mjs.map +1 -1
- package/fesm2020/text-field.mjs +13 -13
- package/fesm2020/text-field.mjs.map +1 -1
- package/fesm2020/tree.mjs +25 -25
- package/fesm2020/tree.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/utils/html-manipulation.js +3 -1
- package/schematics/utils/html-manipulation.mjs +3 -1
- package/testing/protractor/protractor-harness-environment.d.ts +2 -1
|
@@ -273,7 +273,8 @@ const defaultEnvironmentOptions = {
|
|
|
273
273
|
};
|
|
274
274
|
/**
|
|
275
275
|
* A `HarnessEnvironment` implementation for Protractor.
|
|
276
|
-
* @deprecated
|
|
276
|
+
* @deprecated As of v13.0.0, this environment no longer works, as it is not
|
|
277
|
+
* compatible with the new [Angular Package Format](https://angular.io/guide/angular-package-format).
|
|
277
278
|
* @breaking-change 13.0.0
|
|
278
279
|
*/
|
|
279
280
|
class ProtractorHarnessEnvironment extends HarnessEnvironment {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protractor.mjs","sources":["../../../../../../../src/cdk/testing/protractor/protractor-element.ts","../../../../../../../src/cdk/testing/protractor/protractor-harness-environment.ts","../../../../../../../src/cdk/testing/protractor/public-api.ts","../../../../../../../src/cdk/testing/protractor/index.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.io/license\n */\n\nimport {\n _getTextWithExcludedElements,\n ElementDimensions,\n ModifierKeys,\n TestElement,\n TestKey,\n TextOptions,\n EventData,\n} from '@angular/cdk/testing';\nimport {browser, Button, by, ElementFinder, Key} from 'protractor';\n\n/** Maps the `TestKey` constants to Protractor's `Key` constants. */\nconst keyMap = {\n [TestKey.BACKSPACE]: Key.BACK_SPACE,\n [TestKey.TAB]: Key.TAB,\n [TestKey.ENTER]: Key.ENTER,\n [TestKey.SHIFT]: Key.SHIFT,\n [TestKey.CONTROL]: Key.CONTROL,\n [TestKey.ALT]: Key.ALT,\n [TestKey.ESCAPE]: Key.ESCAPE,\n [TestKey.PAGE_UP]: Key.PAGE_UP,\n [TestKey.PAGE_DOWN]: Key.PAGE_DOWN,\n [TestKey.END]: Key.END,\n [TestKey.HOME]: Key.HOME,\n [TestKey.LEFT_ARROW]: Key.ARROW_LEFT,\n [TestKey.UP_ARROW]: Key.ARROW_UP,\n [TestKey.RIGHT_ARROW]: Key.ARROW_RIGHT,\n [TestKey.DOWN_ARROW]: Key.ARROW_DOWN,\n [TestKey.INSERT]: Key.INSERT,\n [TestKey.DELETE]: Key.DELETE,\n [TestKey.F1]: Key.F1,\n [TestKey.F2]: Key.F2,\n [TestKey.F3]: Key.F3,\n [TestKey.F4]: Key.F4,\n [TestKey.F5]: Key.F5,\n [TestKey.F6]: Key.F6,\n [TestKey.F7]: Key.F7,\n [TestKey.F8]: Key.F8,\n [TestKey.F9]: Key.F9,\n [TestKey.F10]: Key.F10,\n [TestKey.F11]: Key.F11,\n [TestKey.F12]: Key.F12,\n [TestKey.META]: Key.META,\n};\n\n/** Converts a `ModifierKeys` object to a list of Protractor `Key`s. */\nfunction toProtractorModifierKeys(modifiers: ModifierKeys): string[] {\n const result: string[] = [];\n if (modifiers.control) {\n result.push(Key.CONTROL);\n }\n if (modifiers.alt) {\n result.push(Key.ALT);\n }\n if (modifiers.shift) {\n result.push(Key.SHIFT);\n }\n if (modifiers.meta) {\n result.push(Key.META);\n }\n return result;\n}\n\n/**\n * A `TestElement` implementation for Protractor.\n * @deprecated\n * @breaking-change 13.0.0\n */\nexport class ProtractorElement implements TestElement {\n constructor(readonly element: ElementFinder) {}\n\n /** Blur the element. */\n async blur(): Promise<void> {\n return browser.executeScript('arguments[0].blur()', this.element);\n }\n\n /** Clear the element's input (for input and textarea elements only). */\n async clear(): Promise<void> {\n return this.element.clear();\n }\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 /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise<void>;\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 async click(\n ...args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?]\n ): Promise<void> {\n await this._dispatchClickEventSequence(args, Button.LEFT);\n }\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 async rightClick(\n ...args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?]\n ): Promise<void> {\n await this._dispatchClickEventSequence(args, Button.RIGHT);\n }\n\n /** Focus the element. */\n async focus(): Promise<void> {\n return browser.executeScript('arguments[0].focus()', this.element);\n }\n\n /** Get the computed value of the given CSS property for the element. */\n async getCssValue(property: string): Promise<string> {\n return this.element.getCssValue(property);\n }\n\n /** Hovers the mouse over the element. */\n async hover(): Promise<void> {\n return browser\n .actions()\n .mouseMove(await this.element.getWebElement())\n .perform();\n }\n\n /** Moves the mouse away from the element. */\n async mouseAway(): Promise<void> {\n return browser\n .actions()\n .mouseMove(await this.element.getWebElement(), {x: -1, y: -1})\n .perform();\n }\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.\n */\n async sendKeys(...keys: (string | TestKey)[]): Promise<void>;\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.\n */\n async sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;\n async sendKeys(...modifiersAndKeys: any[]): Promise<void> {\n const first = modifiersAndKeys[0];\n let modifiers: ModifierKeys;\n let rest: (string | TestKey)[];\n if (typeof first !== 'string' && typeof first !== 'number') {\n modifiers = first;\n rest = modifiersAndKeys.slice(1);\n } else {\n modifiers = {};\n rest = modifiersAndKeys;\n }\n\n const modifierKeys = toProtractorModifierKeys(modifiers);\n const keys = rest\n .map(k => (typeof k === 'string' ? k.split('') : [keyMap[k]]))\n .reduce((arr, k) => arr.concat(k), [])\n // Key.chord doesn't work well with geckodriver (mozilla/geckodriver#1502),\n // so avoid it if no modifier keys are required.\n .map(k => (modifierKeys.length > 0 ? Key.chord(...modifierKeys, k) : k));\n\n return this.element.sendKeys(...keys);\n }\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n async text(options?: TextOptions): Promise<string> {\n if (options?.exclude) {\n return browser.executeScript(_getTextWithExcludedElements, this.element, options.exclude);\n }\n // We don't go through Protractor's `getText`, because it excludes text from hidden elements.\n return browser.executeScript(`return (arguments[0].textContent || '').trim()`, this.element);\n }\n\n /** Gets the value for the given attribute from the element. */\n async getAttribute(name: string): Promise<string | null> {\n return browser.executeScript(\n `return arguments[0].getAttribute(arguments[1])`,\n this.element,\n name,\n );\n }\n\n /** Checks whether the element has the given class. */\n async hasClass(name: string): Promise<boolean> {\n const classes = (await this.getAttribute('class')) || '';\n return new Set(classes.split(/\\s+/).filter(c => c)).has(name);\n }\n\n /** Gets the dimensions of the element. */\n async getDimensions(): Promise<ElementDimensions> {\n const {width, height} = await this.element.getSize();\n const {x: left, y: top} = await this.element.getLocation();\n return {width, height, left, top};\n }\n\n /** Gets the value of a property of an element. */\n async getProperty<T = any>(name: string): Promise<T> {\n return browser.executeScript(`return arguments[0][arguments[1]]`, this.element, name);\n }\n\n /** Sets the value of a property of an input. */\n async setInputValue(value: string): Promise<void> {\n return browser.executeScript(`arguments[0].value = arguments[1]`, this.element, value);\n }\n\n /** Selects the options at the specified indexes inside of a native `select` element. */\n async selectOptions(...optionIndexes: number[]): Promise<void> {\n const options = await this.element.all(by.css('option'));\n const indexes = new Set(optionIndexes); // Convert to a set to remove duplicates.\n\n if (options.length && indexes.size) {\n // Reset the value so all the selected states are cleared. We can\n // reuse the input-specific method since the logic is the same.\n await this.setInputValue('');\n\n for (let i = 0; i < options.length; i++) {\n if (indexes.has(i)) {\n // We have to hold the control key while clicking on options so that multiple can be\n // selected in multi-selection mode. The key doesn't do anything for single selection.\n await browser.actions().keyDown(Key.CONTROL).perform();\n await options[i].click();\n await browser.actions().keyUp(Key.CONTROL).perform();\n }\n }\n }\n }\n\n /** Checks whether this element matches the given selector. */\n async matchesSelector(selector: string): Promise<boolean> {\n return browser.executeScript(\n `\n return (Element.prototype.matches ||\n Element.prototype.msMatchesSelector).call(arguments[0], arguments[1])\n `,\n this.element,\n selector,\n );\n }\n\n /** Checks whether the element is focused. */\n async isFocused(): Promise<boolean> {\n return this.element.equals(browser.driver.switchTo().activeElement());\n }\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n async dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void> {\n return browser.executeScript(_dispatchEvent, name, this.element, data);\n }\n\n /** Dispatches all the events that are part of a click event sequence. */\n private async _dispatchClickEventSequence(\n args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?],\n button: string,\n ) {\n let modifiers: ModifierKeys = {};\n if (args.length && typeof args[args.length - 1] === 'object') {\n modifiers = args.pop() as ModifierKeys;\n }\n const modifierKeys = toProtractorModifierKeys(modifiers);\n\n // Omitting the offset argument to mouseMove results in clicking the center.\n // This is the default behavior we want, so we use an empty array of offsetArgs if\n // no args remain after popping the modifiers from the args passed to this function.\n const offsetArgs = (args.length === 2 ? [{x: args[0], y: args[1]}] : []) as [\n {x: number; y: number},\n ];\n\n let actions = browser.actions().mouseMove(await this.element.getWebElement(), ...offsetArgs);\n\n for (const modifierKey of modifierKeys) {\n actions = actions.keyDown(modifierKey);\n }\n actions = actions.click(button);\n for (const modifierKey of modifierKeys) {\n actions = actions.keyUp(modifierKey);\n }\n\n await actions.perform();\n }\n}\n\n/**\n * Dispatches an event with a particular name and data to an element.\n * Note that this needs to be a pure function, because it gets stringified by\n * Protractor and is executed inside the browser.\n */\nfunction _dispatchEvent(name: string, element: ElementFinder, data?: Record<string, EventData>) {\n const event = document.createEvent('Event');\n event.initEvent(name);\n\n if (data) {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the original object.\n Object.assign(event, data);\n }\n\n // This type has a string index signature, so we cannot access it using a dotted property access.\n element['dispatchEvent'](event);\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.io/license\n */\n\nimport {HarnessEnvironment, HarnessLoader, TestElement} from '@angular/cdk/testing';\nimport {by, element as protractorElement, ElementArrayFinder, ElementFinder} from 'protractor';\nimport {ProtractorElement} from './protractor-element';\n\n/**\n * Options to configure the environment.\n * @deprecated\n * @breaking-change 13.0.0\n */\nexport interface ProtractorHarnessEnvironmentOptions {\n /** The query function used to find DOM elements. */\n queryFn: (selector: string, root: ElementFinder) => ElementArrayFinder;\n}\n\n/** The default environment options. */\nconst defaultEnvironmentOptions: ProtractorHarnessEnvironmentOptions = {\n queryFn: (selector: string, root: ElementFinder) => root.all(by.css(selector)),\n};\n\n/**\n * A `HarnessEnvironment` implementation for Protractor.\n * @deprecated\n * @breaking-change 13.0.0\n */\nexport class ProtractorHarnessEnvironment extends HarnessEnvironment<ElementFinder> {\n /** The options for this environment. */\n private _options: ProtractorHarnessEnvironmentOptions;\n\n protected constructor(\n rawRootElement: ElementFinder,\n options?: ProtractorHarnessEnvironmentOptions,\n ) {\n super(rawRootElement);\n this._options = {...defaultEnvironmentOptions, ...options};\n }\n\n /** Creates a `HarnessLoader` rooted at the document root. */\n static loader(options?: ProtractorHarnessEnvironmentOptions): HarnessLoader {\n return new ProtractorHarnessEnvironment(protractorElement(by.css('body')), options);\n }\n\n /** Gets the ElementFinder corresponding to the given TestElement. */\n static getNativeElement(el: TestElement): ElementFinder {\n if (el instanceof ProtractorElement) {\n return el.element;\n }\n throw Error('This TestElement was not created by the ProtractorHarnessEnvironment');\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 */\n async forceStabilize(): Promise<void> {}\n\n /** @docs-private */\n async waitForTasksOutsideAngular(): Promise<void> {\n // TODO: figure out how we can do this for the protractor environment.\n // https://github.com/angular/components/issues/17412\n }\n\n /** Gets the root element for the document. */\n protected getDocumentRoot(): ElementFinder {\n return protractorElement(by.css('body'));\n }\n\n /** Creates a `TestElement` from a raw element. */\n protected createTestElement(element: ElementFinder): TestElement {\n return new ProtractorElement(element);\n }\n\n /** Creates a `HarnessLoader` rooted at the given raw element. */\n protected createEnvironment(element: ElementFinder): HarnessEnvironment<ElementFinder> {\n return new ProtractorHarnessEnvironment(element, this._options);\n }\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected async getAllRawElements(selector: string): Promise<ElementFinder[]> {\n const elementArrayFinder = this._options.queryFn(selector, this.rawRootElement);\n const length = await elementArrayFinder.count();\n const elements: ElementFinder[] = [];\n for (let i = 0; i < length; i++) {\n elements.push(elementArrayFinder.get(i));\n }\n return elements;\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.io/license\n */\n\nexport * from './protractor-element';\nexport * from './protractor-harness-environment';\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.io/license\n */\n\nexport * from './public-api';\n"],"names":["protractorElement"],"mappings":";;;;AAmBA;AACA,MAAM,MAAM,GAAG;IACb,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC,UAAU;IACnC,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG;IACtB,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;IAC1B,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;IAC1B,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO;IAC9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iBAAiB,CAAC,OAAsB;QAChD,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;KACvC;;IAGS,iBAAiB,CAAC,OAAsB;QAChD,OAAO,IAAI,4BAA4B,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjE;;;;IAKe,iBAAiB,CAAC,QAAgB;;YAChD,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAChF,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAoB,EAAE,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC/B,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1C;YACD,OAAO,QAAQ,CAAC;SACjB;KAAA;;;AChGH;;;;;;;;ACAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"protractor.mjs","sources":["../../../../../../../src/cdk/testing/protractor/protractor-element.ts","../../../../../../../src/cdk/testing/protractor/protractor-harness-environment.ts","../../../../../../../src/cdk/testing/protractor/public-api.ts","../../../../../../../src/cdk/testing/protractor/index.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.io/license\n */\n\nimport {\n _getTextWithExcludedElements,\n ElementDimensions,\n ModifierKeys,\n TestElement,\n TestKey,\n TextOptions,\n EventData,\n} from '@angular/cdk/testing';\nimport {browser, Button, by, ElementFinder, Key} from 'protractor';\n\n/** Maps the `TestKey` constants to Protractor's `Key` constants. */\nconst keyMap = {\n [TestKey.BACKSPACE]: Key.BACK_SPACE,\n [TestKey.TAB]: Key.TAB,\n [TestKey.ENTER]: Key.ENTER,\n [TestKey.SHIFT]: Key.SHIFT,\n [TestKey.CONTROL]: Key.CONTROL,\n [TestKey.ALT]: Key.ALT,\n [TestKey.ESCAPE]: Key.ESCAPE,\n [TestKey.PAGE_UP]: Key.PAGE_UP,\n [TestKey.PAGE_DOWN]: Key.PAGE_DOWN,\n [TestKey.END]: Key.END,\n [TestKey.HOME]: Key.HOME,\n [TestKey.LEFT_ARROW]: Key.ARROW_LEFT,\n [TestKey.UP_ARROW]: Key.ARROW_UP,\n [TestKey.RIGHT_ARROW]: Key.ARROW_RIGHT,\n [TestKey.DOWN_ARROW]: Key.ARROW_DOWN,\n [TestKey.INSERT]: Key.INSERT,\n [TestKey.DELETE]: Key.DELETE,\n [TestKey.F1]: Key.F1,\n [TestKey.F2]: Key.F2,\n [TestKey.F3]: Key.F3,\n [TestKey.F4]: Key.F4,\n [TestKey.F5]: Key.F5,\n [TestKey.F6]: Key.F6,\n [TestKey.F7]: Key.F7,\n [TestKey.F8]: Key.F8,\n [TestKey.F9]: Key.F9,\n [TestKey.F10]: Key.F10,\n [TestKey.F11]: Key.F11,\n [TestKey.F12]: Key.F12,\n [TestKey.META]: Key.META,\n};\n\n/** Converts a `ModifierKeys` object to a list of Protractor `Key`s. */\nfunction toProtractorModifierKeys(modifiers: ModifierKeys): string[] {\n const result: string[] = [];\n if (modifiers.control) {\n result.push(Key.CONTROL);\n }\n if (modifiers.alt) {\n result.push(Key.ALT);\n }\n if (modifiers.shift) {\n result.push(Key.SHIFT);\n }\n if (modifiers.meta) {\n result.push(Key.META);\n }\n return result;\n}\n\n/**\n * A `TestElement` implementation for Protractor.\n * @deprecated\n * @breaking-change 13.0.0\n */\nexport class ProtractorElement implements TestElement {\n constructor(readonly element: ElementFinder) {}\n\n /** Blur the element. */\n async blur(): Promise<void> {\n return browser.executeScript('arguments[0].blur()', this.element);\n }\n\n /** Clear the element's input (for input and textarea elements only). */\n async clear(): Promise<void> {\n return this.element.clear();\n }\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 /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise<void>;\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 async click(\n ...args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?]\n ): Promise<void> {\n await this._dispatchClickEventSequence(args, Button.LEFT);\n }\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 async rightClick(\n ...args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?]\n ): Promise<void> {\n await this._dispatchClickEventSequence(args, Button.RIGHT);\n }\n\n /** Focus the element. */\n async focus(): Promise<void> {\n return browser.executeScript('arguments[0].focus()', this.element);\n }\n\n /** Get the computed value of the given CSS property for the element. */\n async getCssValue(property: string): Promise<string> {\n return this.element.getCssValue(property);\n }\n\n /** Hovers the mouse over the element. */\n async hover(): Promise<void> {\n return browser\n .actions()\n .mouseMove(await this.element.getWebElement())\n .perform();\n }\n\n /** Moves the mouse away from the element. */\n async mouseAway(): Promise<void> {\n return browser\n .actions()\n .mouseMove(await this.element.getWebElement(), {x: -1, y: -1})\n .perform();\n }\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.\n */\n async sendKeys(...keys: (string | TestKey)[]): Promise<void>;\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.\n */\n async sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;\n async sendKeys(...modifiersAndKeys: any[]): Promise<void> {\n const first = modifiersAndKeys[0];\n let modifiers: ModifierKeys;\n let rest: (string | TestKey)[];\n if (typeof first !== 'string' && typeof first !== 'number') {\n modifiers = first;\n rest = modifiersAndKeys.slice(1);\n } else {\n modifiers = {};\n rest = modifiersAndKeys;\n }\n\n const modifierKeys = toProtractorModifierKeys(modifiers);\n const keys = rest\n .map(k => (typeof k === 'string' ? k.split('') : [keyMap[k]]))\n .reduce((arr, k) => arr.concat(k), [])\n // Key.chord doesn't work well with geckodriver (mozilla/geckodriver#1502),\n // so avoid it if no modifier keys are required.\n .map(k => (modifierKeys.length > 0 ? Key.chord(...modifierKeys, k) : k));\n\n return this.element.sendKeys(...keys);\n }\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n async text(options?: TextOptions): Promise<string> {\n if (options?.exclude) {\n return browser.executeScript(_getTextWithExcludedElements, this.element, options.exclude);\n }\n // We don't go through Protractor's `getText`, because it excludes text from hidden elements.\n return browser.executeScript(`return (arguments[0].textContent || '').trim()`, this.element);\n }\n\n /** Gets the value for the given attribute from the element. */\n async getAttribute(name: string): Promise<string | null> {\n return browser.executeScript(\n `return arguments[0].getAttribute(arguments[1])`,\n this.element,\n name,\n );\n }\n\n /** Checks whether the element has the given class. */\n async hasClass(name: string): Promise<boolean> {\n const classes = (await this.getAttribute('class')) || '';\n return new Set(classes.split(/\\s+/).filter(c => c)).has(name);\n }\n\n /** Gets the dimensions of the element. */\n async getDimensions(): Promise<ElementDimensions> {\n const {width, height} = await this.element.getSize();\n const {x: left, y: top} = await this.element.getLocation();\n return {width, height, left, top};\n }\n\n /** Gets the value of a property of an element. */\n async getProperty<T = any>(name: string): Promise<T> {\n return browser.executeScript(`return arguments[0][arguments[1]]`, this.element, name);\n }\n\n /** Sets the value of a property of an input. */\n async setInputValue(value: string): Promise<void> {\n return browser.executeScript(`arguments[0].value = arguments[1]`, this.element, value);\n }\n\n /** Selects the options at the specified indexes inside of a native `select` element. */\n async selectOptions(...optionIndexes: number[]): Promise<void> {\n const options = await this.element.all(by.css('option'));\n const indexes = new Set(optionIndexes); // Convert to a set to remove duplicates.\n\n if (options.length && indexes.size) {\n // Reset the value so all the selected states are cleared. We can\n // reuse the input-specific method since the logic is the same.\n await this.setInputValue('');\n\n for (let i = 0; i < options.length; i++) {\n if (indexes.has(i)) {\n // We have to hold the control key while clicking on options so that multiple can be\n // selected in multi-selection mode. The key doesn't do anything for single selection.\n await browser.actions().keyDown(Key.CONTROL).perform();\n await options[i].click();\n await browser.actions().keyUp(Key.CONTROL).perform();\n }\n }\n }\n }\n\n /** Checks whether this element matches the given selector. */\n async matchesSelector(selector: string): Promise<boolean> {\n return browser.executeScript(\n `\n return (Element.prototype.matches ||\n Element.prototype.msMatchesSelector).call(arguments[0], arguments[1])\n `,\n this.element,\n selector,\n );\n }\n\n /** Checks whether the element is focused. */\n async isFocused(): Promise<boolean> {\n return this.element.equals(browser.driver.switchTo().activeElement());\n }\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n async dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void> {\n return browser.executeScript(_dispatchEvent, name, this.element, data);\n }\n\n /** Dispatches all the events that are part of a click event sequence. */\n private async _dispatchClickEventSequence(\n args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?],\n button: string,\n ) {\n let modifiers: ModifierKeys = {};\n if (args.length && typeof args[args.length - 1] === 'object') {\n modifiers = args.pop() as ModifierKeys;\n }\n const modifierKeys = toProtractorModifierKeys(modifiers);\n\n // Omitting the offset argument to mouseMove results in clicking the center.\n // This is the default behavior we want, so we use an empty array of offsetArgs if\n // no args remain after popping the modifiers from the args passed to this function.\n const offsetArgs = (args.length === 2 ? [{x: args[0], y: args[1]}] : []) as [\n {x: number; y: number},\n ];\n\n let actions = browser.actions().mouseMove(await this.element.getWebElement(), ...offsetArgs);\n\n for (const modifierKey of modifierKeys) {\n actions = actions.keyDown(modifierKey);\n }\n actions = actions.click(button);\n for (const modifierKey of modifierKeys) {\n actions = actions.keyUp(modifierKey);\n }\n\n await actions.perform();\n }\n}\n\n/**\n * Dispatches an event with a particular name and data to an element.\n * Note that this needs to be a pure function, because it gets stringified by\n * Protractor and is executed inside the browser.\n */\nfunction _dispatchEvent(name: string, element: ElementFinder, data?: Record<string, EventData>) {\n const event = document.createEvent('Event');\n event.initEvent(name);\n\n if (data) {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the original object.\n Object.assign(event, data);\n }\n\n // This type has a string index signature, so we cannot access it using a dotted property access.\n element['dispatchEvent'](event);\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.io/license\n */\n\nimport {HarnessEnvironment, HarnessLoader, TestElement} from '@angular/cdk/testing';\nimport {by, element as protractorElement, ElementArrayFinder, ElementFinder} from 'protractor';\nimport {ProtractorElement} from './protractor-element';\n\n/**\n * Options to configure the environment.\n * @deprecated\n * @breaking-change 13.0.0\n */\nexport interface ProtractorHarnessEnvironmentOptions {\n /** The query function used to find DOM elements. */\n queryFn: (selector: string, root: ElementFinder) => ElementArrayFinder;\n}\n\n/** The default environment options. */\nconst defaultEnvironmentOptions: ProtractorHarnessEnvironmentOptions = {\n queryFn: (selector: string, root: ElementFinder) => root.all(by.css(selector)),\n};\n\n/**\n * A `HarnessEnvironment` implementation for Protractor.\n * @deprecated As of v13.0.0, this environment no longer works, as it is not\n * compatible with the new [Angular Package Format](https://angular.io/guide/angular-package-format).\n * @breaking-change 13.0.0\n */\nexport class ProtractorHarnessEnvironment extends HarnessEnvironment<ElementFinder> {\n /** The options for this environment. */\n private _options: ProtractorHarnessEnvironmentOptions;\n\n protected constructor(\n rawRootElement: ElementFinder,\n options?: ProtractorHarnessEnvironmentOptions,\n ) {\n super(rawRootElement);\n this._options = {...defaultEnvironmentOptions, ...options};\n }\n\n /** Creates a `HarnessLoader` rooted at the document root. */\n static loader(options?: ProtractorHarnessEnvironmentOptions): HarnessLoader {\n return new ProtractorHarnessEnvironment(protractorElement(by.css('body')), options);\n }\n\n /** Gets the ElementFinder corresponding to the given TestElement. */\n static getNativeElement(el: TestElement): ElementFinder {\n if (el instanceof ProtractorElement) {\n return el.element;\n }\n throw Error('This TestElement was not created by the ProtractorHarnessEnvironment');\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 */\n async forceStabilize(): Promise<void> {}\n\n /** @docs-private */\n async waitForTasksOutsideAngular(): Promise<void> {\n // TODO: figure out how we can do this for the protractor environment.\n // https://github.com/angular/components/issues/17412\n }\n\n /** Gets the root element for the document. */\n protected getDocumentRoot(): ElementFinder {\n return protractorElement(by.css('body'));\n }\n\n /** Creates a `TestElement` from a raw element. */\n protected createTestElement(element: ElementFinder): TestElement {\n return new ProtractorElement(element);\n }\n\n /** Creates a `HarnessLoader` rooted at the given raw element. */\n protected createEnvironment(element: ElementFinder): HarnessEnvironment<ElementFinder> {\n return new ProtractorHarnessEnvironment(element, this._options);\n }\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected async getAllRawElements(selector: string): Promise<ElementFinder[]> {\n const elementArrayFinder = this._options.queryFn(selector, this.rawRootElement);\n const length = await elementArrayFinder.count();\n const elements: ElementFinder[] = [];\n for (let i = 0; i < length; i++) {\n elements.push(elementArrayFinder.get(i));\n }\n return elements;\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.io/license\n */\n\nexport * from './protractor-element';\nexport * from './protractor-harness-environment';\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.io/license\n */\n\nexport *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CAAC;KACrF;;IAGD,OAAO,gBAAgB,CAAC,EAAe;QACrC,IAAI,EAAE,YAAY,iBAAiB,EAAE;YACnC,OAAO,EAAE,CAAC,OAAO,CAAC;SACnB;QACD,MAAM,KAAK,CAAC,sEAAsE,CAAC,CAAC;KACrF;;;;;;IAOK,cAAc;+DAAoB;KAAA;;IAGlC,0BAA0B;;;;SAG/B;KAAA;;IAGS,eAAe;QACvB,OAAOA,OAAiB,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;KAC1C;;IAGS,iBAAiB,CAAC,OAAsB;QAChD,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;KACvC;;IAGS,iBAAiB,CAAC,OAAsB;QAChD,OAAO,IAAI,4BAA4B,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;KACjE;;;;IAKe,iBAAiB,CAAC,QAAgB;;YAChD,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAChF,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAoB,EAAE,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC/B,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1C;YACD,OAAO,QAAQ,CAAC;SACjB;KAAA;;;ACjGH;;;;;;;;ACAA;;;;;;;;;;"}
|
package/fesm2015/text-field.mjs
CHANGED
|
@@ -80,9 +80,9 @@ class AutofillMonitor {
|
|
|
80
80
|
this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
AutofillMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
84
|
-
AutofillMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
83
|
+
AutofillMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AutofillMonitor, deps: [{ token: i1.Platform }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
84
|
+
AutofillMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AutofillMonitor, providedIn: 'root' });
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AutofillMonitor, decorators: [{
|
|
86
86
|
type: Injectable,
|
|
87
87
|
args: [{ providedIn: 'root' }]
|
|
88
88
|
}], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.NgZone }]; } });
|
|
@@ -103,9 +103,9 @@ class CdkAutofill {
|
|
|
103
103
|
this._autofillMonitor.stopMonitoring(this._elementRef);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
CdkAutofill.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
107
|
-
CdkAutofill.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
106
|
+
CdkAutofill.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkAutofill, deps: [{ token: i0.ElementRef }, { token: AutofillMonitor }], target: i0.ɵɵFactoryTarget.Directive });
|
|
107
|
+
CdkAutofill.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkAutofill, selector: "[cdkAutofill]", outputs: { cdkAutofill: "cdkAutofill" }, ngImport: i0 });
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkAutofill, decorators: [{
|
|
109
109
|
type: Directive,
|
|
110
110
|
args: [{
|
|
111
111
|
selector: '[cdkAutofill]',
|
|
@@ -382,9 +382,9 @@ class CdkTextareaAutosize {
|
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
CdkTextareaAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
386
|
-
CdkTextareaAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
385
|
+
CdkTextareaAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTextareaAutosize, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
386
|
+
CdkTextareaAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: { minRows: ["cdkAutosizeMinRows", "minRows"], maxRows: ["cdkAutosizeMaxRows", "maxRows"], enabled: ["cdkTextareaAutosize", "enabled"], placeholder: "placeholder" }, host: { attributes: { "rows": "1" }, listeners: { "input": "_noopInputHandler()" }, classAttribute: "cdk-textarea-autosize" }, exportAs: ["cdkTextareaAutosize"], ngImport: i0 });
|
|
387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTextareaAutosize, decorators: [{
|
|
388
388
|
type: Directive,
|
|
389
389
|
args: [{
|
|
390
390
|
selector: 'textarea[cdkTextareaAutosize]',
|
|
@@ -426,10 +426,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0-rc.1", ng
|
|
|
426
426
|
*/
|
|
427
427
|
class TextFieldModule {
|
|
428
428
|
}
|
|
429
|
-
TextFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
430
|
-
TextFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0
|
|
431
|
-
TextFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
429
|
+
TextFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
430
|
+
TextFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TextFieldModule, declarations: [CdkAutofill, CdkTextareaAutosize], imports: [PlatformModule], exports: [CdkAutofill, CdkTextareaAutosize] });
|
|
431
|
+
TextFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TextFieldModule, imports: [[PlatformModule]] });
|
|
432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TextFieldModule, decorators: [{
|
|
433
433
|
type: NgModule,
|
|
434
434
|
args: [{
|
|
435
435
|
declarations: [CdkAutofill, CdkTextareaAutosize],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.mjs","sources":["../../../../../../src/cdk/text-field/autofill.ts","../../../../../../src/cdk/text-field/autosize.ts","../../../../../../src/cdk/text-field/text-field-module.ts","../../../../../../src/cdk/text-field/public-api.ts","../../../../../../src/cdk/text-field/index.ts","../../../../../../src/cdk/text-field/text-field_public_index.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.io/license\n */\n\nimport {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\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 = normalizePassiveListenerOptions({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 _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(private _platform: Platform, private _ngZone: NgZone) {}\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 const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject;\n }\n\n const result = 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(() => result.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(() => result.next({target: event.target as Element, isAutofilled: false}));\n }\n }) as EventListenerOrEventListenerObject;\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n },\n });\n\n return result;\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 /** Emits when the autofill state of the element changes. */\n @Output() readonly cdkAutofill = new EventEmitter<AutofillEvent>();\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor,\n ) {}\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.io/license\n */\n\nimport {\n BooleanInput,\n coerceBooleanProperty,\n coerceNumberProperty,\n NumberInput,\n} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n Optional,\n Inject,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\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 /** 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\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('cdkTextareaAutosize')\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: BooleanInput) {\n value = coerceBooleanProperty(value);\n\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?: Document;\n\n private _hasFocus: boolean;\n\n private _isViewInited = false;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone,\n /** @breaking-change 11.0.0 make document required */\n @Optional() @Inject(DOCUMENT) document?: any,\n ) {\n this._document = document;\n\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 const window = this._getWindow();\n\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n\n this._textareaElement.addEventListener('focus', this._handleFocusEvent);\n this._textareaElement.addEventListener('blur', this._handleFocusEvent);\n });\n\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n\n ngOnDestroy() {\n this._textareaElement.removeEventListener('focus', this._handleFocusEvent);\n this._textareaElement.removeEventListener('blur', this._handleFocusEvent);\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 let textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\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 textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\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 textareaClone.style.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 /** Access injected document if available or fallback to global document reference */\n private _getDocument(): Document {\n return this._document || document;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n const doc = this._getDocument();\n return doc.defaultView || window;\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.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\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.io/license\n */\n\nexport * from './autofill';\nexport * from './autosize';\nexport * from './text-field-module';\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.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAoCA;AACA,MAAM,eAAe,GAAG,+BAA+B,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;AAEzE;;;;;MAMa,eAAe;IAG1B,YAAoB,SAAmB,EAAU,OAAe;QAA5C,cAAS,GAAT,SAAS,CAAU;QAAU,YAAO,GAAP,OAAO,CAAQ;QAFxD,uBAAkB,GAAG,IAAI,GAAG,EAAiC,CAAC;KAEF;IAgBpE,OAAO,CAAC,YAA2C;QACjD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;YAC7B,OAAO,KAAK,CAAC;SACd;QAED,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;QAC5C,MAAM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CAAC;;;;;;;QAQhD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE;YAChD,QAAQ,CAAC,iBAAiB,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;SAC1D;KACF;;qHA7UU,mBAAmB,0FAuFR,QAAQ;yGAvFnB,mBAAmB;gGAAnB,mBAAmB;kBAX/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,+BAA+B;oBACzC,QAAQ,EAAE,qBAAqB;oBAC/B,IAAI,EAAE;wBACJ,OAAO,EAAE,uBAAuB;;;wBAGhC,MAAM,EAAE,GAAG;wBACX,SAAS,EAAE,qBAAqB;qBACjC;iBACF;;;8BAwFI,QAAQ;;8BAAI,MAAM;+BAAC,QAAQ;;yBAlE1B,OAAO;sBADV,KAAK;uBAAC,oBAAoB;gBAWvB,OAAO;sBADV,KAAK;uBAAC,oBAAoB;gBAWvB,OAAO;sBADV,KAAK;uBAAC,qBAAqB;gBAexB,WAAW;sBADd,KAAK;;;AChGR;;;;;;;MAkBa,eAAe;;iHAAf,eAAe;kHAAf,eAAe,iBAJX,WAAW,EAAE,mBAAmB,aACrC,cAAc,aACd,WAAW,EAAE,mBAAmB;kHAE/B,eAAe,YAHjB,CAAC,cAAc,CAAC;gGAGd,eAAe;kBAL3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;oBAChD,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;iBAC5C;;;ACjBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"text-field.mjs","sources":["../../../../../../src/cdk/text-field/autofill.ts","../../../../../../src/cdk/text-field/autosize.ts","../../../../../../src/cdk/text-field/text-field-module.ts","../../../../../../src/cdk/text-field/public-api.ts","../../../../../../src/cdk/text-field/index.ts","../../../../../../src/cdk/text-field/text-field_public_index.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.io/license\n */\n\nimport {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\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 = normalizePassiveListenerOptions({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 _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(private _platform: Platform, private _ngZone: NgZone) {}\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 const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject;\n }\n\n const result = 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(() => result.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(() => result.next({target: event.target as Element, isAutofilled: false}));\n }\n }) as EventListenerOrEventListenerObject;\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n },\n });\n\n return result;\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 /** Emits when the autofill state of the element changes. */\n @Output() readonly cdkAutofill = new EventEmitter<AutofillEvent>();\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor,\n ) {}\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.io/license\n */\n\nimport {\n BooleanInput,\n coerceBooleanProperty,\n coerceNumberProperty,\n NumberInput,\n} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n Optional,\n Inject,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\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 /** 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\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('cdkTextareaAutosize')\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: BooleanInput) {\n value = coerceBooleanProperty(value);\n\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?: Document;\n\n private _hasFocus: boolean;\n\n private _isViewInited = false;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone,\n /** @breaking-change 11.0.0 make document required */\n @Optional() @Inject(DOCUMENT) document?: any,\n ) {\n this._document = document;\n\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 const window = this._getWindow();\n\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n\n this._textareaElement.addEventListener('focus', this._handleFocusEvent);\n this._textareaElement.addEventListener('blur', this._handleFocusEvent);\n });\n\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n\n ngOnDestroy() {\n this._textareaElement.removeEventListener('focus', this._handleFocusEvent);\n this._textareaElement.removeEventListener('blur', this._handleFocusEvent);\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 let textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\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 textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\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 textareaClone.style.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 /** Access injected document if available or fallback to global document reference */\n private _getDocument(): Document {\n return this._document || document;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n const doc = this._getDocument();\n return doc.defaultView || window;\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.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\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.io/license\n */\n\nexport * from './autofill';\nexport * from './autosize';\nexport * from './text-field-module';\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.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAoCA;AACA,MAAM,eAAe,GAAG,+BAA+B,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;AAEzE;;;;;MAMa,eAAe;IAG1B,YAAoB,SAAmB,EAAU,OAAe;QAA5C,cAAS,GAAT,SAAS,CAAU;QAAU,YAAO,GAAP,OAAO,CAAQ;QAFxD,uBAAkB,GAAG,IAAI,GAAG,EAAiC,CAAC;KAEF;IAgBpE,OAAO,CAAC,YAA2C;QACjD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;YAC7B,OAAO,KAAK,CAAC;SACd;QAED,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAk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dir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
193
|
+
CdkTreeNodeOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodeOutlet, deps: [{ token: i0.ViewContainerRef }, { token: CDK_TREE_NODE_OUTLET_NODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
194
|
+
CdkTreeNodeOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]", ngImport: i0 });
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodeOutlet, decorators: [{
|
|
196
196
|
type: Directive,
|
|
197
197
|
args: [{
|
|
198
198
|
selector: '[cdkTreeNodeOutlet]',
|
|
@@ -229,9 +229,9 @@ class CdkTreeNodeDef {
|
|
|
229
229
|
this.template = template;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
CdkTreeNodeDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
233
|
-
CdkTreeNodeDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
232
|
+
CdkTreeNodeDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodeDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
233
|
+
CdkTreeNodeDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTreeNodeDef, selector: "[cdkTreeNodeDef]", inputs: { when: ["cdkTreeNodeDefWhen", "when"] }, ngImport: i0 });
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodeDef, decorators: [{
|
|
235
235
|
type: Directive,
|
|
236
236
|
args: [{
|
|
237
237
|
selector: '[cdkTreeNodeDef]',
|
|
@@ -460,9 +460,9 @@ class CdkTree {
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
CdkTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
464
|
-
CdkTree.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0
|
|
465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
463
|
+
CdkTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTree, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
+
CdkTree.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: CdkTree, selector: "cdk-tree", inputs: { dataSource: "dataSource", treeControl: "treeControl", trackBy: "trackBy" }, host: { attributes: { "role": "tree" }, classAttribute: "cdk-tree" }, queries: [{ propertyName: "_nodeDefs", predicate: CdkTreeNodeDef, descendants: true }], viewQueries: [{ propertyName: "_nodeOutlet", first: true, predicate: CdkTreeNodeOutlet, descendants: true, static: true }], exportAs: ["cdkTree"], ngImport: i0, template: `<ng-container cdkTreeNodeOutlet></ng-container>`, isInline: true, directives: [{ type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTree, decorators: [{
|
|
466
466
|
type: Component,
|
|
467
467
|
args: [{
|
|
468
468
|
selector: 'cdk-tree',
|
|
@@ -578,9 +578,9 @@ class CdkTreeNode {
|
|
|
578
578
|
* in `CdkTree` and set the data to it.
|
|
579
579
|
*/
|
|
580
580
|
CdkTreeNode.mostRecentTreeNode = null;
|
|
581
|
-
CdkTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
582
|
-
CdkTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
583
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
581
|
+
CdkTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }], target: i0.ɵɵFactoryTarget.Directive });
|
|
582
|
+
CdkTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTreeNode, selector: "cdk-tree-node", inputs: { role: "role" }, host: { properties: { "attr.aria-expanded": "isExpanded" }, classAttribute: "cdk-tree-node" }, exportAs: ["cdkTreeNode"], ngImport: i0 });
|
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNode, decorators: [{
|
|
584
584
|
type: Directive,
|
|
585
585
|
args: [{
|
|
586
586
|
selector: 'cdk-tree-node',
|
|
@@ -695,12 +695,12 @@ class CdkNestedTreeNode extends CdkTreeNode {
|
|
|
695
695
|
return outlets && outlets.find(outlet => !outlet._node || outlet._node === this);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
CdkNestedTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
699
|
-
CdkNestedTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
698
|
+
CdkNestedTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
|
|
699
|
+
CdkNestedTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkNestedTreeNode, selector: "cdk-nested-tree-node", inputs: { role: "role", disabled: "disabled", tabIndex: "tabIndex" }, host: { classAttribute: "cdk-nested-tree-node" }, providers: [
|
|
700
700
|
{ provide: CdkTreeNode, useExisting: CdkNestedTreeNode },
|
|
701
701
|
{ provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode },
|
|
702
702
|
], queries: [{ propertyName: "nodeOutlet", predicate: CdkTreeNodeOutlet, descendants: true }], exportAs: ["cdkNestedTreeNode"], usesInheritance: true, ngImport: i0 });
|
|
703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkNestedTreeNode, decorators: [{
|
|
704
704
|
type: Directive,
|
|
705
705
|
args: [{
|
|
706
706
|
selector: 'cdk-nested-tree-node',
|
|
@@ -821,9 +821,9 @@ class CdkTreeNodePadding {
|
|
|
821
821
|
this._setPadding();
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
CdkTreeNodePadding.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
825
|
-
CdkTreeNodePadding.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
824
|
+
CdkTreeNodePadding.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodePadding, deps: [{ token: CdkTreeNode }, { token: CdkTree }, { token: i0.ElementRef }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
825
|
+
CdkTreeNodePadding.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTreeNodePadding, selector: "[cdkTreeNodePadding]", inputs: { level: ["cdkTreeNodePadding", "level"], indent: ["cdkTreeNodePaddingIndent", "indent"] }, ngImport: i0 });
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodePadding, decorators: [{
|
|
827
827
|
type: Directive,
|
|
828
828
|
args: [{
|
|
829
829
|
selector: '[cdkTreeNodePadding]',
|
|
@@ -870,9 +870,9 @@ class CdkTreeNodeToggle {
|
|
|
870
870
|
event.stopPropagation();
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
CdkTreeNodeToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
874
|
-
CdkTreeNodeToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0
|
|
875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
873
|
+
CdkTreeNodeToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodeToggle, deps: [{ token: CdkTree }, { token: CdkTreeNode }], target: i0.ɵɵFactoryTarget.Directive });
|
|
874
|
+
CdkTreeNodeToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTreeNodeToggle, selector: "[cdkTreeNodeToggle]", inputs: { recursive: ["cdkTreeNodeToggleRecursive", "recursive"] }, host: { listeners: { "click": "_toggle($event)" } }, ngImport: i0 });
|
|
875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeNodeToggle, decorators: [{
|
|
876
876
|
type: Directive,
|
|
877
877
|
args: [{
|
|
878
878
|
selector: '[cdkTreeNodeToggle]',
|
|
@@ -903,8 +903,8 @@ const EXPORTED_DECLARATIONS = [
|
|
|
903
903
|
];
|
|
904
904
|
class CdkTreeModule {
|
|
905
905
|
}
|
|
906
|
-
CdkTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0
|
|
907
|
-
CdkTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0
|
|
906
|
+
CdkTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
907
|
+
CdkTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeModule, declarations: [CdkNestedTreeNode,
|
|
908
908
|
CdkTreeNodeDef,
|
|
909
909
|
CdkTreeNodePadding,
|
|
910
910
|
CdkTreeNodeToggle,
|
|
@@ -917,8 +917,8 @@ CdkTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
917
917
|
CdkTree,
|
|
918
918
|
CdkTreeNode,
|
|
919
919
|
CdkTreeNodeOutlet] });
|
|
920
|
-
CdkTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0
|
|
921
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0
|
|
920
|
+
CdkTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeModule });
|
|
921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTreeModule, decorators: [{
|
|
922
922
|
type: NgModule,
|
|
923
923
|
args: [{
|
|
924
924
|
exports: EXPORTED_DECLARATIONS,
|