@angular/cdk 15.1.0-next.2 → 15.1.0

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.
Files changed (204) hide show
  1. package/LICENSE +1 -1
  2. package/drag-drop/index.d.ts +11 -0
  3. package/esm2020/a11y/a11y-module.mjs +5 -5
  4. package/esm2020/a11y/aria-describer/aria-describer.mjs +4 -4
  5. package/esm2020/a11y/focus-monitor/focus-monitor.mjs +7 -7
  6. package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
  7. package/esm2020/a11y/focus-trap/configurable-focus-trap.mjs +7 -7
  8. package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +4 -4
  9. package/esm2020/a11y/focus-trap/focus-trap.mjs +30 -30
  10. package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +4 -4
  11. package/esm2020/a11y/input-modality/input-modality-detector.mjs +8 -8
  12. package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
  13. package/esm2020/a11y/live-announcer/live-announcer.mjs +14 -14
  14. package/esm2020/accordion/accordion-item.mjs +38 -38
  15. package/esm2020/accordion/accordion-module.mjs +5 -5
  16. package/esm2020/accordion/accordion.mjs +4 -4
  17. package/esm2020/bidi/bidi-module.mjs +5 -5
  18. package/esm2020/bidi/dir.mjs +4 -4
  19. package/esm2020/bidi/directionality.mjs +4 -4
  20. package/esm2020/clipboard/clipboard-module.mjs +5 -5
  21. package/esm2020/clipboard/clipboard.mjs +4 -4
  22. package/esm2020/clipboard/copy-to-clipboard.mjs +4 -4
  23. package/esm2020/collections/selection-model.mjs +8 -8
  24. package/esm2020/collections/unique-selection-dispatcher.mjs +4 -4
  25. package/esm2020/dialog/dialog-container.mjs +4 -4
  26. package/esm2020/dialog/dialog-module.mjs +5 -5
  27. package/esm2020/dialog/dialog.mjs +12 -12
  28. package/esm2020/drag-drop/directives/drag-handle.mjs +12 -12
  29. package/esm2020/drag-drop/directives/drag-placeholder.mjs +4 -4
  30. package/esm2020/drag-drop/directives/drag-preview.mjs +8 -8
  31. package/esm2020/drag-drop/directives/drag.mjs +12 -12
  32. package/esm2020/drag-drop/directives/drop-list-group.mjs +4 -4
  33. package/esm2020/drag-drop/directives/drop-list.mjs +17 -16
  34. package/esm2020/drag-drop/drag-drop-module.mjs +5 -5
  35. package/esm2020/drag-drop/drag-drop-registry.mjs +4 -4
  36. package/esm2020/drag-drop/drag-drop.mjs +4 -4
  37. package/esm2020/drag-drop/drag-ref.mjs +13 -13
  38. package/esm2020/drag-drop/drop-list-ref.mjs +13 -1
  39. package/esm2020/layout/breakpoints-observer.mjs +4 -4
  40. package/esm2020/layout/layout-module.mjs +5 -5
  41. package/esm2020/layout/media-matcher.mjs +4 -4
  42. package/esm2020/listbox/listbox-module.mjs +5 -5
  43. package/esm2020/listbox/listbox.mjs +7 -7
  44. package/esm2020/menu/context-menu-trigger.mjs +14 -14
  45. package/esm2020/menu/menu-aim.mjs +7 -7
  46. package/esm2020/menu/menu-bar.mjs +4 -4
  47. package/esm2020/menu/menu-base.mjs +4 -4
  48. package/esm2020/menu/menu-group.mjs +4 -4
  49. package/esm2020/menu/menu-item-checkbox.mjs +4 -4
  50. package/esm2020/menu/menu-item-radio.mjs +4 -4
  51. package/esm2020/menu/menu-item-selectable.mjs +4 -4
  52. package/esm2020/menu/menu-item.mjs +26 -20
  53. package/esm2020/menu/menu-module.mjs +5 -5
  54. package/esm2020/menu/menu-stack.mjs +4 -4
  55. package/esm2020/menu/menu-trigger-base.mjs +4 -4
  56. package/esm2020/menu/menu-trigger.mjs +16 -11
  57. package/esm2020/menu/menu.mjs +4 -4
  58. package/esm2020/observers/observe-content.mjs +23 -23
  59. package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
  60. package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +4 -4
  61. package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +4 -4
  62. package/esm2020/overlay/fullscreen-overlay-container.mjs +4 -4
  63. package/esm2020/overlay/overlay-container.mjs +4 -4
  64. package/esm2020/overlay/overlay-directives.mjs +44 -42
  65. package/esm2020/overlay/overlay-module.mjs +6 -7
  66. package/esm2020/overlay/overlay.mjs +4 -4
  67. package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +5 -5
  68. package/esm2020/overlay/position/overlay-position-builder.mjs +4 -4
  69. package/esm2020/overlay/scroll/scroll-strategy-options.mjs +4 -4
  70. package/esm2020/platform/platform-module.mjs +5 -5
  71. package/esm2020/platform/platform.mjs +4 -4
  72. package/esm2020/portal/portal-directives.mjs +17 -17
  73. package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +4 -4
  74. package/esm2020/scrolling/scroll-dispatcher.mjs +4 -4
  75. package/esm2020/scrolling/scrollable.mjs +4 -4
  76. package/esm2020/scrolling/scrolling-module.mjs +9 -9
  77. package/esm2020/scrolling/viewport-ruler.mjs +4 -4
  78. package/esm2020/scrolling/virtual-for-of.mjs +48 -48
  79. package/esm2020/scrolling/virtual-scroll-viewport.mjs +24 -24
  80. package/esm2020/scrolling/virtual-scrollable-element.mjs +4 -4
  81. package/esm2020/scrolling/virtual-scrollable-window.mjs +4 -4
  82. package/esm2020/scrolling/virtual-scrollable.mjs +4 -4
  83. package/esm2020/stepper/step-header.mjs +4 -4
  84. package/esm2020/stepper/step-label.mjs +4 -4
  85. package/esm2020/stepper/stepper-button.mjs +7 -7
  86. package/esm2020/stepper/stepper-module.mjs +5 -5
  87. package/esm2020/stepper/stepper.mjs +37 -37
  88. package/esm2020/table/can-stick.mjs +7 -7
  89. package/esm2020/table/cell.mjs +27 -27
  90. package/esm2020/table/coalesced-style-scheduler.mjs +4 -4
  91. package/esm2020/table/row.mjs +28 -28
  92. package/esm2020/table/table-module.mjs +5 -5
  93. package/esm2020/table/table.mjs +93 -93
  94. package/esm2020/table/text-column.mjs +14 -14
  95. package/esm2020/testing/harness-environment.mjs +4 -4
  96. package/esm2020/text-field/autofill.mjs +7 -7
  97. package/esm2020/text-field/autosize.mjs +26 -26
  98. package/esm2020/text-field/text-field-module.mjs +5 -5
  99. package/esm2020/tree/nested-node.mjs +4 -4
  100. package/esm2020/tree/node.mjs +4 -4
  101. package/esm2020/tree/outlet.mjs +4 -4
  102. package/esm2020/tree/padding.mjs +21 -21
  103. package/esm2020/tree/toggle.mjs +9 -9
  104. package/esm2020/tree/tree-module.mjs +5 -5
  105. package/esm2020/tree/tree.mjs +30 -30
  106. package/esm2020/version.mjs +1 -1
  107. package/fesm2015/a11y.mjs +80 -80
  108. package/fesm2015/a11y.mjs.map +1 -1
  109. package/fesm2015/accordion.mjs +44 -44
  110. package/fesm2015/accordion.mjs.map +1 -1
  111. package/fesm2015/bidi.mjs +10 -10
  112. package/fesm2015/bidi.mjs.map +1 -1
  113. package/fesm2015/cdk.mjs +1 -1
  114. package/fesm2015/cdk.mjs.map +1 -1
  115. package/fesm2015/clipboard.mjs +10 -10
  116. package/fesm2015/clipboard.mjs.map +1 -1
  117. package/fesm2015/collections.mjs +10 -10
  118. package/fesm2015/collections.mjs.map +1 -1
  119. package/fesm2015/dialog.mjs +18 -18
  120. package/fesm2015/dialog.mjs.map +1 -1
  121. package/fesm2015/drag-drop.mjs +84 -71
  122. package/fesm2015/drag-drop.mjs.map +1 -1
  123. package/fesm2015/layout.mjs +10 -10
  124. package/fesm2015/layout.mjs.map +1 -1
  125. package/fesm2015/listbox.mjs +10 -10
  126. package/fesm2015/listbox.mjs.map +1 -1
  127. package/fesm2015/menu.mjs +90 -81
  128. package/fesm2015/menu.mjs.map +1 -1
  129. package/fesm2015/observers.mjs +22 -22
  130. package/fesm2015/observers.mjs.map +1 -1
  131. package/fesm2015/overlay.mjs +76 -75
  132. package/fesm2015/overlay.mjs.map +1 -1
  133. package/fesm2015/platform.mjs +7 -7
  134. package/fesm2015/platform.mjs.map +1 -1
  135. package/fesm2015/portal.mjs +16 -16
  136. package/fesm2015/portal.mjs.map +1 -1
  137. package/fesm2015/scrolling.mjs +99 -99
  138. package/fesm2015/scrolling.mjs.map +1 -1
  139. package/fesm2015/stepper.mjs +52 -52
  140. package/fesm2015/stepper.mjs.map +1 -1
  141. package/fesm2015/table.mjs +171 -171
  142. package/fesm2015/table.mjs.map +1 -1
  143. package/fesm2015/testing.mjs +3 -3
  144. package/fesm2015/testing.mjs.map +1 -1
  145. package/fesm2015/text-field.mjs +35 -35
  146. package/fesm2015/text-field.mjs.map +1 -1
  147. package/fesm2015/tree.mjs +70 -70
  148. package/fesm2015/tree.mjs.map +1 -1
  149. package/fesm2020/a11y.mjs +80 -80
  150. package/fesm2020/a11y.mjs.map +1 -1
  151. package/fesm2020/accordion.mjs +44 -44
  152. package/fesm2020/accordion.mjs.map +1 -1
  153. package/fesm2020/bidi.mjs +10 -10
  154. package/fesm2020/bidi.mjs.map +1 -1
  155. package/fesm2020/cdk.mjs +1 -1
  156. package/fesm2020/cdk.mjs.map +1 -1
  157. package/fesm2020/clipboard.mjs +10 -10
  158. package/fesm2020/clipboard.mjs.map +1 -1
  159. package/fesm2020/collections.mjs +10 -10
  160. package/fesm2020/collections.mjs.map +1 -1
  161. package/fesm2020/dialog.mjs +18 -18
  162. package/fesm2020/dialog.mjs.map +1 -1
  163. package/fesm2020/drag-drop.mjs +84 -71
  164. package/fesm2020/drag-drop.mjs.map +1 -1
  165. package/fesm2020/layout.mjs +10 -10
  166. package/fesm2020/layout.mjs.map +1 -1
  167. package/fesm2020/listbox.mjs +10 -10
  168. package/fesm2020/listbox.mjs.map +1 -1
  169. package/fesm2020/menu.mjs +89 -80
  170. package/fesm2020/menu.mjs.map +1 -1
  171. package/fesm2020/observers.mjs +22 -22
  172. package/fesm2020/observers.mjs.map +1 -1
  173. package/fesm2020/overlay.mjs +76 -75
  174. package/fesm2020/overlay.mjs.map +1 -1
  175. package/fesm2020/platform.mjs +7 -7
  176. package/fesm2020/platform.mjs.map +1 -1
  177. package/fesm2020/portal.mjs +16 -16
  178. package/fesm2020/portal.mjs.map +1 -1
  179. package/fesm2020/scrolling.mjs +99 -99
  180. package/fesm2020/scrolling.mjs.map +1 -1
  181. package/fesm2020/stepper.mjs +52 -52
  182. package/fesm2020/stepper.mjs.map +1 -1
  183. package/fesm2020/table.mjs +171 -171
  184. package/fesm2020/table.mjs.map +1 -1
  185. package/fesm2020/testing.mjs +3 -3
  186. package/fesm2020/testing.mjs.map +1 -1
  187. package/fesm2020/text-field.mjs +35 -35
  188. package/fesm2020/text-field.mjs.map +1 -1
  189. package/fesm2020/tree.mjs +70 -70
  190. package/fesm2020/tree.mjs.map +1 -1
  191. package/menu/index.d.ts +7 -8
  192. package/overlay/index.d.ts +7 -7
  193. package/package.json +1 -1
  194. package/schematics/ng-add/index.js +1 -1
  195. package/schematics/ng-add/index.mjs +1 -1
  196. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  197. package/schematics/ng-update/devkit-migration-rule.d.ts +2 -2
  198. package/schematics/ng-update/devkit-migration.d.ts +2 -2
  199. package/schematics/update-tool/file-system.d.ts +1 -1
  200. package/schematics/update-tool/migration.d.ts +3 -3
  201. package/schematics/update-tool/utils/decorators.d.ts +1 -1
  202. package/schematics/update-tool/utils/property-name.d.ts +1 -1
  203. package/schematics/update-tool/version-changes.d.ts +3 -3
  204. package/schematics/utils/parse5-element.d.ts +2 -2
@@ -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 {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\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;;;;;;AAMG;AA8BH;AACA,MAAM,eAAe,GAAG,+BAA+B,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;AAEzE;;;;AAIG;MAEU,eAAe,CAAA;IAG1B,WAAoB,CAAA,SAAmB,EAAU,OAAe,EAAA;AAA5C,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;AAAU,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAFxD,QAAA,IAAA,CAAA,kBAAkB,GAAG,IAAI,GAAG,EAAiC,CAAC;KAEF;AAgBpE,IAAA,OAAO,CAAC,YAA2C,EAAA;AACjD,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;AAC7B,YAAA,OAAO,KAAK,CAAC;AACd,SAAA;AAED,QAAA,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAElD,QAAA,IAAI,IAAI,EAAE;YACR,OAAO,IAAI,CAAC,OAAO,CAAC;AACrB,SAAA;AAED,QAAA,MAAM,MAAM,GAAG,IAAI,OAA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2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;AAChD,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;iBAC5C,CAAA;;;ACfD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
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 {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\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;;;;;;AAMG;AA8BH;AACA,MAAM,eAAe,GAAG,+BAA+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AwFI,QAAQ;;8BAAI,MAAM;+BAAC,QAAQ,CAAA;;yBAlE1B,OAAO,EAAA,CAAA;sBADV,KAAK;uBAAC,oBAAoB,CAAA;gBAWvB,OAAO,EAAA,CAAA;sBADV,KAAK;uBAAC,oBAAoB,CAAA;gBAWvB,OAAO,EAAA,CAAA;sBADV,KAAK;uBAAC,qBAAqB,CAAA;gBAexB,WAAW,EAAA,CAAA;sBADd,KAAK;;;AChGR;;;;;;AAMG;MAUU,eAAe,CAAA;;iHAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAHX,WAAW,EAAE,mBAAmB,CACrC,EAAA,OAAA,EAAA,CAAA,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;kHAE/B,eAAe,EAAA,CAAA,CAAA;gGAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;AAChD,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;iBAC5C,CAAA;;;ACfD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
package/fesm2015/tree.mjs CHANGED
@@ -190,9 +190,9 @@ class CdkTreeNodeOutlet {
190
190
  this._node = _node;
191
191
  }
192
192
  }
193
- CdkTreeNodeOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.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: "14.0.0", version: "15.0.0", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]", ngImport: i0 });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeNodeOutlet, decorators: [{
193
+ CdkTreeNodeOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.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: "14.0.0", version: "15.1.0-rc.0", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]", ngImport: i0 });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.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: "15.0.0", ngImport: i0, type: CdkTreeNodeDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
233
- CdkTreeNodeDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: CdkTreeNodeDef, selector: "[cdkTreeNodeDef]", inputs: { when: ["cdkTreeNodeDefWhen", "when"] }, ngImport: i0 });
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeNodeDef, decorators: [{
232
+ CdkTreeNodeDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeNodeDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
233
+ CdkTreeNodeDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-rc.0", type: CdkTreeNodeDef, selector: "[cdkTreeNodeDef]", inputs: { when: ["cdkTreeNodeDefWhen", "when"] }, ngImport: i0 });
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeNodeDef, decorators: [{
235
235
  type: Directive,
236
236
  args: [{
237
237
  selector: '[cdkTreeNodeDef]',
@@ -287,6 +287,19 @@ function getTreeControlFunctionsMissingError() {
287
287
  * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.
288
288
  */
289
289
  class CdkTree {
290
+ /**
291
+ * Provides a stream containing the latest data array to render. Influenced by the tree's
292
+ * stream of view window (what dataNodes are currently on screen).
293
+ * Data source can be an observable of data array, or a data array to render.
294
+ */
295
+ get dataSource() {
296
+ return this._dataSource;
297
+ }
298
+ set dataSource(dataSource) {
299
+ if (this._dataSource !== dataSource) {
300
+ this._switchDataSource(dataSource);
301
+ }
302
+ }
290
303
  constructor(_differs, _changeDetectorRef) {
291
304
  this._differs = _differs;
292
305
  this._changeDetectorRef = _changeDetectorRef;
@@ -305,19 +318,6 @@ class CdkTree {
305
318
  end: Number.MAX_VALUE,
306
319
  });
307
320
  }
308
- /**
309
- * Provides a stream containing the latest data array to render. Influenced by the tree's
310
- * stream of view window (what dataNodes are currently on screen).
311
- * Data source can be an observable of data array, or a data array to render.
312
- */
313
- get dataSource() {
314
- return this._dataSource;
315
- }
316
- set dataSource(dataSource) {
317
- if (this._dataSource !== dataSource) {
318
- this._switchDataSource(dataSource);
319
- }
320
- }
321
321
  ngOnInit() {
322
322
  this._dataDiffer = this._differs.find([]).create(this.trackBy);
323
323
  if (!this.treeControl && (typeof ngDevMode === 'undefined' || ngDevMode)) {
@@ -460,9 +460,9 @@ class CdkTree {
460
460
  }
461
461
  }
462
462
  }
463
- CdkTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTree, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
464
- CdkTree.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.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, dependencies: [{ kind: "directive", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
465
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTree, decorators: [{
463
+ CdkTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTree, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
464
+ CdkTree.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0-rc.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, dependencies: [{ kind: "directive", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTree, decorators: [{
466
466
  type: Component,
467
467
  args: [{
468
468
  selector: 'cdk-tree',
@@ -500,16 +500,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
500
500
  * Tree node for CdkTree. It contains the data in the tree node.
501
501
  */
502
502
  class CdkTreeNode {
503
- constructor(_elementRef, _tree) {
504
- this._elementRef = _elementRef;
505
- this._tree = _tree;
506
- /** Subject that emits when the component has been destroyed. */
507
- this._destroyed = new Subject();
508
- /** Emits when the node's data has changed. */
509
- this._dataChanges = new Subject();
510
- CdkTreeNode.mostRecentTreeNode = this;
511
- this.role = 'treeitem';
512
- }
513
503
  /**
514
504
  * The role of the tree node.
515
505
  * @deprecated The correct role is 'treeitem', 'group' should not be used. This input will be
@@ -545,6 +535,16 @@ class CdkTreeNode {
545
535
  ? this._tree.treeControl.getLevel(this._data)
546
536
  : this._parentNodeAriaLevel;
547
537
  }
538
+ constructor(_elementRef, _tree) {
539
+ this._elementRef = _elementRef;
540
+ this._tree = _tree;
541
+ /** Subject that emits when the component has been destroyed. */
542
+ this._destroyed = new Subject();
543
+ /** Emits when the node's data has changed. */
544
+ this._dataChanges = new Subject();
545
+ CdkTreeNode.mostRecentTreeNode = this;
546
+ this.role = 'treeitem';
547
+ }
548
548
  ngOnInit() {
549
549
  this._parentNodeAriaLevel = getParentNodeAriaLevel(this._elementRef.nativeElement);
550
550
  this._elementRef.nativeElement.setAttribute('aria-level', `${this.level + 1}`);
@@ -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: "15.0.0", ngImport: i0, type: CdkTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }], target: i0.ɵɵFactoryTarget.Directive });
582
- CdkTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.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: "15.0.0", ngImport: i0, type: CdkTreeNode, decorators: [{
581
+ CdkTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }], target: i0.ɵɵFactoryTarget.Directive });
582
+ CdkTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-rc.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: "15.1.0-rc.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: "15.0.0", ngImport: i0, type: CdkNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
699
- CdkNestedTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: CdkNestedTreeNode, selector: "cdk-nested-tree-node", inputs: { role: "role", disabled: "disabled", tabIndex: "tabIndex" }, host: { classAttribute: "cdk-nested-tree-node" }, providers: [
698
+ CdkNestedTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
699
+ CdkNestedTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-rc.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: "15.0.0", ngImport: i0, type: CdkNestedTreeNode, decorators: [{
703
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkNestedTreeNode, decorators: [{
704
704
  type: Directive,
705
705
  args: [{
706
706
  selector: 'cdk-nested-tree-node',
@@ -730,6 +730,23 @@ const cssUnitPattern = /([A-Za-z%]+)$/;
730
730
  * This directive will add left-padding to the node to show hierarchy.
731
731
  */
732
732
  class CdkTreeNodePadding {
733
+ /** The level of depth of the tree node. The padding will be `level * indent` pixels. */
734
+ get level() {
735
+ return this._level;
736
+ }
737
+ set level(value) {
738
+ this._setLevelInput(value);
739
+ }
740
+ /**
741
+ * The indent for each level. Can be a number or a CSS string.
742
+ * Default number 40px from material design menu sub-menu spec.
743
+ */
744
+ get indent() {
745
+ return this._indent;
746
+ }
747
+ set indent(indent) {
748
+ this._setIndentInput(indent);
749
+ }
733
750
  constructor(_treeNode, _tree, _element, _dir) {
734
751
  this._treeNode = _treeNode;
735
752
  this._tree = _tree;
@@ -749,23 +766,6 @@ class CdkTreeNodePadding {
749
766
  // data to ensure that everything is up to date.
750
767
  _treeNode._dataChanges.subscribe(() => this._setPadding());
751
768
  }
752
- /** The level of depth of the tree node. The padding will be `level * indent` pixels. */
753
- get level() {
754
- return this._level;
755
- }
756
- set level(value) {
757
- this._setLevelInput(value);
758
- }
759
- /**
760
- * The indent for each level. Can be a number or a CSS string.
761
- * Default number 40px from material design menu sub-menu spec.
762
- */
763
- get indent() {
764
- return this._indent;
765
- }
766
- set indent(indent) {
767
- this._setIndentInput(indent);
768
- }
769
769
  ngOnDestroy() {
770
770
  this._destroyed.next();
771
771
  this._destroyed.complete();
@@ -821,9 +821,9 @@ class CdkTreeNodePadding {
821
821
  this._setPadding();
822
822
  }
823
823
  }
824
- CdkTreeNodePadding.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.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: "14.0.0", version: "15.0.0", type: CdkTreeNodePadding, selector: "[cdkTreeNodePadding]", inputs: { level: ["cdkTreeNodePadding", "level"], indent: ["cdkTreeNodePaddingIndent", "indent"] }, ngImport: i0 });
826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeNodePadding, decorators: [{
824
+ CdkTreeNodePadding.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.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: "14.0.0", version: "15.1.0-rc.0", type: CdkTreeNodePadding, selector: "[cdkTreeNodePadding]", inputs: { level: ["cdkTreeNodePadding", "level"], indent: ["cdkTreeNodePaddingIndent", "indent"] }, ngImport: i0 });
826
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeNodePadding, decorators: [{
827
827
  type: Directive,
828
828
  args: [{
829
829
  selector: '[cdkTreeNodePadding]',
@@ -851,11 +851,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
851
851
  * Node toggle to expand/collapse the node.
852
852
  */
853
853
  class CdkTreeNodeToggle {
854
- constructor(_tree, _treeNode) {
855
- this._tree = _tree;
856
- this._treeNode = _treeNode;
857
- this._recursive = false;
858
- }
859
854
  /** Whether expand/collapse the node recursively. */
860
855
  get recursive() {
861
856
  return this._recursive;
@@ -863,6 +858,11 @@ class CdkTreeNodeToggle {
863
858
  set recursive(value) {
864
859
  this._recursive = coerceBooleanProperty(value);
865
860
  }
861
+ constructor(_tree, _treeNode) {
862
+ this._tree = _tree;
863
+ this._treeNode = _treeNode;
864
+ this._recursive = false;
865
+ }
866
866
  _toggle(event) {
867
867
  this.recursive
868
868
  ? this._tree.treeControl.toggleDescendants(this._treeNode.data)
@@ -870,9 +870,9 @@ class CdkTreeNodeToggle {
870
870
  event.stopPropagation();
871
871
  }
872
872
  }
873
- CdkTreeNodeToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeNodeToggle, deps: [{ token: CdkTree }, { token: CdkTreeNode }], target: i0.ɵɵFactoryTarget.Directive });
874
- CdkTreeNodeToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: CdkTreeNodeToggle, selector: "[cdkTreeNodeToggle]", inputs: { recursive: ["cdkTreeNodeToggleRecursive", "recursive"] }, host: { listeners: { "click": "_toggle($event)" } }, ngImport: i0 });
875
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeNodeToggle, decorators: [{
873
+ CdkTreeNodeToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeNodeToggle, deps: [{ token: CdkTree }, { token: CdkTreeNode }], target: i0.ɵɵFactoryTarget.Directive });
874
+ CdkTreeNodeToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-rc.0", type: CdkTreeNodeToggle, selector: "[cdkTreeNodeToggle]", inputs: { recursive: ["cdkTreeNodeToggleRecursive", "recursive"] }, host: { listeners: { "click": "_toggle($event)" } }, ngImport: i0 });
875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.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: "15.0.0", ngImport: i0, type: CdkTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
907
- CdkTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeModule, declarations: [CdkNestedTreeNode,
906
+ CdkTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
907
+ CdkTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-rc.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: "14.0.0", version:
917
917
  CdkTree,
918
918
  CdkTreeNode,
919
919
  CdkTreeNodeOutlet] });
920
- CdkTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeModule });
921
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: CdkTreeModule, decorators: [{
920
+ CdkTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeModule });
921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-rc.0", ngImport: i0, type: CdkTreeModule, decorators: [{
922
922
  type: NgModule,
923
923
  args: [{
924
924
  exports: EXPORTED_DECLARATIONS,