@angular/cdk 8.1.4 → 8.2.3

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 (162) hide show
  1. package/a11y/typings/index.metadata.json +1 -1
  2. package/a11y/typings/key-manager/focus-key-manager.d.ts +1 -1
  3. package/bundles/cdk-a11y.umd.js +10 -2
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +1 -1
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-drag-drop.umd.js +239 -36
  8. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  9. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  10. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  11. package/bundles/cdk-overlay.umd.js +15 -8
  12. package/bundles/cdk-overlay.umd.js.map +1 -1
  13. package/bundles/cdk-overlay.umd.min.js +2 -2
  14. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  15. package/bundles/cdk-platform.umd.js +21 -0
  16. package/bundles/cdk-platform.umd.js.map +1 -1
  17. package/bundles/cdk-platform.umd.min.js +1 -1
  18. package/bundles/cdk-platform.umd.min.js.map +1 -1
  19. package/bundles/cdk-scrolling.umd.js +1 -1
  20. package/bundles/cdk-scrolling.umd.js.map +1 -1
  21. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  22. package/bundles/cdk-stepper.umd.js +46 -40
  23. package/bundles/cdk-stepper.umd.js.map +1 -1
  24. package/bundles/cdk-stepper.umd.min.js +1 -1
  25. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  26. package/bundles/cdk-table.umd.js +4 -4
  27. package/bundles/cdk-table.umd.js.map +1 -1
  28. package/bundles/cdk-table.umd.min.js.map +1 -1
  29. package/bundles/cdk-testing.umd.js +404 -0
  30. package/bundles/cdk-testing.umd.js.map +1 -0
  31. package/bundles/cdk-testing.umd.min.js +9 -0
  32. package/bundles/cdk-testing.umd.min.js.map +1 -0
  33. package/bundles/cdk-text-field.umd.js +3 -3
  34. package/bundles/cdk-text-field.umd.js.map +1 -1
  35. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  36. package/bundles/cdk.umd.js +1 -1
  37. package/bundles/cdk.umd.js.map +1 -1
  38. package/bundles/cdk.umd.min.js +1 -1
  39. package/bundles/cdk.umd.min.js.map +1 -1
  40. package/drag-drop/typings/drag-ref.d.ts +9 -0
  41. package/drag-drop/typings/drop-list-ref.d.ts +7 -1
  42. package/drag-drop/typings/index.metadata.json +1 -1
  43. package/esm2015/a11y.js +10 -2
  44. package/esm2015/a11y.js.map +1 -1
  45. package/esm2015/cdk.js +1 -1
  46. package/esm2015/cdk.js.map +1 -1
  47. package/esm2015/drag-drop.js +212 -37
  48. package/esm2015/drag-drop.js.map +1 -1
  49. package/esm2015/overlay.js +13 -6
  50. package/esm2015/overlay.js.map +1 -1
  51. package/esm2015/platform.js +21 -1
  52. package/esm2015/platform.js.map +1 -1
  53. package/esm2015/scrolling.js +1 -1
  54. package/esm2015/scrolling.js.map +1 -1
  55. package/esm2015/stepper.js +51 -45
  56. package/esm2015/stepper.js.map +1 -1
  57. package/esm2015/table.js +4 -4
  58. package/esm2015/table.js.map +1 -1
  59. package/esm2015/testing.js +370 -0
  60. package/esm2015/testing.js.map +1 -0
  61. package/esm2015/text-field.js +1 -1
  62. package/esm2015/text-field.js.map +1 -1
  63. package/esm5/a11y.es5.js +10 -2
  64. package/esm5/a11y.es5.js.map +1 -1
  65. package/esm5/cdk.es5.js +1 -1
  66. package/esm5/cdk.es5.js.map +1 -1
  67. package/esm5/drag-drop.es5.js +241 -38
  68. package/esm5/drag-drop.es5.js.map +1 -1
  69. package/esm5/overlay.es5.js +15 -8
  70. package/esm5/overlay.es5.js.map +1 -1
  71. package/esm5/platform.es5.js +21 -1
  72. package/esm5/platform.es5.js.map +1 -1
  73. package/esm5/scrolling.es5.js +1 -1
  74. package/esm5/scrolling.es5.js.map +1 -1
  75. package/esm5/stepper.es5.js +49 -43
  76. package/esm5/stepper.es5.js.map +1 -1
  77. package/esm5/table.es5.js +4 -4
  78. package/esm5/table.es5.js.map +1 -1
  79. package/esm5/testing.es5.js +390 -0
  80. package/esm5/testing.es5.js.map +1 -0
  81. package/esm5/text-field.es5.js +3 -3
  82. package/esm5/text-field.es5.js.map +1 -1
  83. package/overlay/typings/index.metadata.json +1 -1
  84. package/overlay/typings/position/flexible-connected-position-strategy.d.ts +5 -2
  85. package/overlay/typings/public-api.d.ts +1 -1
  86. package/package.json +4 -4
  87. package/platform/typings/features/shadow-dom.d.ts +9 -0
  88. package/platform/typings/index.metadata.json +1 -1
  89. package/platform/typings/public-api.d.ts +1 -0
  90. package/schematics/ng-update/index.js +2 -2
  91. package/schematics/ng-update/index.js.map +1 -1
  92. package/schematics/ng-update/test-cases/misc/global-stylesheets-test.css +1 -0
  93. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js +3 -3
  94. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -1
  95. package/schematics/tsconfig.tsbuildinfo +2898 -2898
  96. package/schematics/update-tool/index.js +9 -5
  97. package/schematics/update-tool/index.js.map +1 -1
  98. package/scrolling/typings/virtual-scroll-viewport.d.ts +1 -1
  99. package/stepper/typings/index.metadata.json +1 -1
  100. package/stepper/typings/stepper.d.ts +3 -3
  101. package/table/typings/table.d.ts +4 -4
  102. package/testing/index.d.ts +8 -0
  103. package/testing/index.metadata.json +12 -0
  104. package/testing/package.json +8 -0
  105. package/testing/typings/dispatch-events.d.ts +33 -0
  106. package/testing/typings/element-focus.d.ts +18 -0
  107. package/testing/typings/event-objects.d.ts +34 -0
  108. package/testing/typings/index.d.ts +4 -0
  109. package/testing/typings/index.metadata.json +1 -0
  110. package/testing/typings/public-api.d.ts +11 -0
  111. package/testing/typings/type-in-element.d.ts +41 -0
  112. package/testing.d.ts +8 -0
  113. package/testing.metadata.json +12 -0
  114. package/text-field/typings/autosize.d.ts +1 -1
  115. package/typings/a11y/index.metadata.json +1 -1
  116. package/typings/a11y/key-manager/focus-key-manager.d.ts +1 -1
  117. package/typings/drag-drop/drag-ref.d.ts +9 -0
  118. package/typings/drag-drop/drop-list-ref.d.ts +7 -1
  119. package/typings/drag-drop/index.metadata.json +1 -1
  120. package/typings/esm5/a11y/index.metadata.json +1 -1
  121. package/typings/esm5/a11y/key-manager/focus-key-manager.d.ts +1 -1
  122. package/typings/esm5/drag-drop/drag-ref.d.ts +9 -0
  123. package/typings/esm5/drag-drop/drop-list-ref.d.ts +7 -1
  124. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  125. package/typings/esm5/index.metadata.json +1 -1
  126. package/typings/esm5/overlay/index.metadata.json +1 -1
  127. package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +5 -2
  128. package/typings/esm5/overlay/public-api.d.ts +1 -1
  129. package/typings/esm5/platform/features/shadow-dom.d.ts +9 -0
  130. package/typings/esm5/platform/index.metadata.json +1 -1
  131. package/typings/esm5/platform/public-api.d.ts +1 -0
  132. package/typings/esm5/scrolling/virtual-scroll-viewport.d.ts +1 -1
  133. package/typings/esm5/stepper/index.metadata.json +1 -1
  134. package/typings/esm5/stepper/stepper.d.ts +3 -3
  135. package/typings/esm5/table/table.d.ts +4 -4
  136. package/typings/esm5/testing/dispatch-events.d.ts +33 -0
  137. package/typings/esm5/testing/element-focus.d.ts +18 -0
  138. package/typings/esm5/testing/event-objects.d.ts +34 -0
  139. package/typings/esm5/testing/index.d.ts +4 -0
  140. package/typings/esm5/testing/index.metadata.json +1 -0
  141. package/typings/esm5/testing/public-api.d.ts +11 -0
  142. package/typings/esm5/testing/type-in-element.d.ts +41 -0
  143. package/typings/esm5/text-field/autosize.d.ts +1 -1
  144. package/typings/index.metadata.json +1 -1
  145. package/typings/overlay/index.metadata.json +1 -1
  146. package/typings/overlay/position/flexible-connected-position-strategy.d.ts +5 -2
  147. package/typings/overlay/public-api.d.ts +1 -1
  148. package/typings/platform/features/shadow-dom.d.ts +9 -0
  149. package/typings/platform/index.metadata.json +1 -1
  150. package/typings/platform/public-api.d.ts +1 -0
  151. package/typings/scrolling/virtual-scroll-viewport.d.ts +1 -1
  152. package/typings/stepper/index.metadata.json +1 -1
  153. package/typings/stepper/stepper.d.ts +3 -3
  154. package/typings/table/table.d.ts +4 -4
  155. package/typings/testing/dispatch-events.d.ts +33 -0
  156. package/typings/testing/element-focus.d.ts +18 -0
  157. package/typings/testing/event-objects.d.ts +34 -0
  158. package/typings/testing/index.d.ts +4 -0
  159. package/typings/testing/index.metadata.json +1 -0
  160. package/typings/testing/public-api.d.ts +11 -0
  161. package/typings/testing/type-in-element.d.ts +41 -0
  162. package/typings/text-field/autosize.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-text-field.umd.js","sources":["../../src/cdk/text-field/text-field-module.ts","../../src/cdk/text-field/autosize.ts","../../src/cdk/text-field/autofill.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 {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\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\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\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 | null;\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 { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\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 /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\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 = this.minRows && this._cachedLineHeight ?\n `${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 = this.maxRows && this._cachedLineHeight ?\n `${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\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\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 this._textareaElement.parentNode!.removeChild(textareaClone);\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 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\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 placeholderText = textarea.placeholder;\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 // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\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 textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\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 it's 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 return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\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 {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\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\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\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.asObservable();\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 (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\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.asObservable();\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\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() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\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"],"names":["PlatformModule","NgModule","Input","NgZone","Platform","ElementRef","Directive","auditTime","takeUntil","fromEvent","coerceBooleanProperty","Subject","Output","EventEmitter","Injectable","coerceElement","EMPTY","normalizePassiveListenerOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AEwCA,IAAM,eAAe,GAAGiB,wCAA+B,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAxE;;;;;;AAQA,AAAA,IAAA,eAAA,kBAAA,YAAA;IAIE,SAAF,eAAA,CAAsB,SAAmB,EAAU,OAAe,EAAlE;QAAsB,IAAtB,CAAA,SAA+B,GAAT,SAAS,CAAU;QAAU,IAAnD,CAAA,OAA0D,GAAP,OAAO,CAAQ;QAFxD,IAAV,CAA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B,CAAC;iBAC5C,EAAD,EAAA;;IAC8B,OAA9B,eAA+B,CAA/B;CAA+B,EAA/B,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-text-field.umd.js","sources":["../../src/cdk/text-field/text-field-module.ts","../../src/cdk/text-field/autosize.ts","../../src/cdk/text-field/autofill.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 {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\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\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\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 | null;\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 { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\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 /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\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 = this.minRows && this._cachedLineHeight ?\n `${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 = this.maxRows && this._cachedLineHeight ?\n `${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\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\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 this._textareaElement.parentNode!.removeChild(textareaClone);\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 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\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 placeholderText = textarea.placeholder;\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 // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\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 textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\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 return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\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 {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\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\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\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.asObservable();\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 (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\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.asObservable();\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\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() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\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"],"names":["PlatformModule","NgModule","Input","NgZone","Platform","ElementRef","Directive","auditTime","takeUntil","fromEvent","coerceBooleanProperty","Subject","Output","EventEmitter","Injectable","coerceElement","EMPTY","normalizePassiveListenerOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AEwCA,IAAM,eAAe,GAAGiB,wCAA+B,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAxE;;;;;;AAQA,AAAA,IAAA,eAAA,kBAAA,YAAA;IAIE,SAAF,eAAA,CAAsB,SAAmB,EAAU,OAAe,EAAlE;QAAsB,IAAtB,CAAA,SAA+B,GAAT,SAAS,CAAU;QAAU,IAAnD,CAAA,OAA0D,GAAP,OAAO,CAAQ;QAFxD,IAAV,CAAA,kBAA4B,GAAG,IAAI,GAAG,EAAiC,CAAC;KAEF;;;;;IAgBpE,eAAF,CAAA,SAAA,CAAA,OAAS;;;;IAAP,UAAQ,YAA2C,EAArD;QAAE,IAAF,KAAA,GAAA,IAAA,CA0CG;QAzCC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;YAC7B,OAAOD,UAAK,CAAC;SACd;;QAEL,IAAU,OAAO,GAAGD,sBAAa,CAAC,YAAY,CAAC,CAA/C;;QACA,IAAU,IAAI,GAAG,IAAI,CAAC,kB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,EAAE,qBAAqB;oBAC/B,IAAI,EAAE;wBACJ,OAAO,EAAE,uBAAuB;;;wBAGhC,MAAM,EAAE,GAAG;wBACX,SAAS,EAAE,qBAAqB;qBACjC;iBACF,EAAD,EAAA;;;;QAvBA,EAAA,IAAA,EAAED,eAAU,EAAZ;QAOA,EAAA,IAAA,EAAQD,iBAAQ,EAAhB;QAFA,EAAA,IAAA,EAAED,WAAM,EAAR;;;QAuCA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAGD,UAAK,EAAR,IAAA,EAAA,CAAS,oBAAoB,EAA7B,EAAA,CAAA;QAQA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAGA,UAAK,EAAR,IAAA,EAAA,CAAS,oBAAoB,EAA7B,EAAA,CAAA;QAQA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAGA,UAAK,EAAR,IAAA,EAAA,CAAS,qBAAqB,EAA9B,EAAA,CAAA;;IA2MA,OAAA,mBAAC,CAAD;CAAC,EAAD,CAAA,CAAA;;;;;;ADpQA,AAAA,IAAA,eAAA,kBAAA,YAAA;IAAA,SAAA,eAAA,GAAA;KAK+B;;QAL/B,EAAA,IAAA,EAACD,aAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,YAAY,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;oBAChD,OAAO,EAAE,CAACD,uBAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC;iBAC5C,EAAD,EAAA;;IAC8B,OAA9B,eAA+B,CAA/B;CAA+B,EAA/B,CAAA;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-text-field.umd.min.js","sources":["../../src/cdk/text-field/autofill.ts","../../src/cdk/text-field/autosize.ts","../../src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.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\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\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\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.asObservable();\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 (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\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.asObservable();\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\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() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\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 | null;\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 { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\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 /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\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 = this.minRows && this._cachedLineHeight ?\n `${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 = this.maxRows && this._cachedLineHeight ?\n `${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\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\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 this._textareaElement.parentNode!.removeChild(textareaClone);\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 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\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 placeholderText = textarea.placeholder;\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 // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\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 textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\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 it's 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 return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\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\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_platform","_ngZone","this","_monitoredElements","Map","prototype","monitor","elementOrRef","_this","isBrowser","EMPTY","element","coerceElement","info","get","subject","asObservable","result","Subject","cssClass","listener","event","animationName","classList","contains","remove","run","next","target","isAutofilled","add","runOutsideAngular","addEventListener","set","unlisten","removeEventListener","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","type","Injectable","args","providedIn","Platform","NgZone","CdkAutofill","_elementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","selector","ElementRef","Output","CdkTextareaAutosize","_destroyed","_enabled","_previousMinRows","_textareaElement","Object","defineProperty","_minRows","value","_setMinHeight","_maxRows","_setMaxHeight","coerceBooleanProperty","resizeToFitContent","reset","minHeight","minRows","_cachedLineHeight","style","maxHeight","maxRows","ngAfterViewInit","_initialHeight","height","fromEvent","window","pipe","auditTime","takeUntil","_cacheTextareaLineHeight","textareaClone","cloneNode","rows","position","visibility","border","padding","overflow","appendChild","clientHeight","removeChild","ngDoCheck","force","textarea","_previousValue","placeholderText","placeholder","scrollHeight","requestAnimationFrame","_scrollToCaretPosition","setTimeout","undefined","_noopInputHandler","selectionStart","selectionEnd","isStopped","document","activeElement","setSelectionRange","exportAs","host","class","(input)","Input","enabled","TextFieldModule","NgModule","declarations","imports","PlatformModule","exports"],"mappings":";;;;;;;+iBAwCA,IAAMA,GAAkBC,EAAAA,iCAAiCC,SAAS,IAQlEC,EAAA,WAIE,QAAFA,GAAsBC,EAA6BC,GAA7BC,KAAtBF,UAAsBA,EAA6BE,KAAnDD,QAAmDA,EAFzCC,KAAVC,mBAA+B,GAAIC,KAlDnC,MAoEEL,GAAFM,UAAAC,QAAE,SAAQC,GAAR,GAAFC,GAAAN,IACI,KAAKA,KAAKF,UAAUS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A,aAOFhB,KAAQI,EAAAA,WAFRJ,KAAEK,EAAAA,4BAuCF6B,UAAAlC,KAAGiF,EAAAA,MAAH/E,MAAS,wBAQToC,UAAAtC,KAAGiF,EAAAA,MAAH/E,MAAS,wBAQTgF,UAAAlF,KAAGiF,EAAAA,MAAH/E,MAAS,0BA2MTgB,KCpQAiE,EAAA,WAAA,QAAAA,MAK8B,sBAL9BnF,KAACoF,EAAAA,SAADlF,OACEmF,cAAe/E,EAAaY,GAC5BoE,SAAUC,EAAAA,gBACVC,SAAUlF,EAAaY,OAEzBiE"}
1
+ {"version":3,"file":"cdk-text-field.umd.min.js","sources":["../../src/cdk/text-field/autofill.ts","../../src/cdk/text-field/autosize.ts","../../src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.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\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\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\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.asObservable();\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 (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\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.asObservable();\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\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() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\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 | null;\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 { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\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 /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\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 = this.minRows && this._cachedLineHeight ?\n `${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 = this.maxRows && this._cachedLineHeight ?\n `${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\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\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 this._textareaElement.parentNode!.removeChild(textareaClone);\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 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\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 placeholderText = textarea.placeholder;\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 // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\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 textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\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 return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\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\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_platform","_ngZone","this","_monitoredElements","Map","prototype","monitor","elementOrRef","_this","isBrowser","EMPTY","element","coerceElement","info","get","subject","asObservable","result","Subject","cssClass","listener","event","animationName","classList","contains","remove","run","next","target","isAutofilled","add","runOutsideAngular","addEventListener","set","unlisten","removeEventListener","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","type","Injectable","args","providedIn","Platform","NgZone","CdkAutofill","_elementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","selector","ElementRef","Output","CdkTextareaAutosize","_destroyed","_enabled","_previousMinRows","_textareaElement","Object","defineProperty","_minRows","value","_setMinHeight","_maxRows","_setMaxHeight","coerceBooleanProperty","resizeToFitContent","reset","minHeight","minRows","_cachedLineHeight","style","maxHeight","maxRows","ngAfterViewInit","_initialHeight","height","fromEvent","window","pipe","auditTime","takeUntil","_cacheTextareaLineHeight","textareaClone","cloneNode","rows","position","visibility","border","padding","overflow","appendChild","clientHeight","removeChild","ngDoCheck","force","textarea","_previousValue","placeholderText","placeholder","scrollHeight","requestAnimationFrame","_scrollToCaretPosition","setTimeout","undefined","_noopInputHandler","selectionStart","selectionEnd","isStopped","document","activeElement","setSelectionRange","exportAs","host","class","(input)","Input","enabled","TextFieldModule","NgModule","declarations","imports","PlatformModule","exports"],"mappings":";;;;;;;+iBAwCA,IAAMA,GAAkBC,EAAAA,iCAAiCC,SAAS,IAQlEC,EAAA,WAIE,QAAFA,GAAsBC,EAA6BC,GAA7BC,KAAtBF,UAAsBA,EAA6BE,KAAnDD,QAAmDA,EAFzCC,KAAVC,mBAA+B,GAAIC,KAlDnC,MAoEEL,GAAFM,UAAAC,QAAE,SAAQC,GAAR,GAAFC,GAAAN,IACI,KAAKA,KAAKF,UAAUS,UAClB,MAAOC,GAAAA,KAGb,IAAUC,GAAUC,EAAAA,cAAcL,GACxBM,EAAOX,KAAKC,mBAAmBW,IAAIH,EAEzC,IAAIE,EACF,MAAOA,GAAKE,QAAQC,cAG1B,IAAUC,GAAS,GAAIC,GAAAA,QACbC,EAAW,4BACXC,EAAQ,SAAKC,GAIW,kCAAxBA,EAAMC,eACLX,EAAQY,UAAUC,SAASL,GAGG,gCAAxBE,EAAMC,eACbX,EAAQY,UAAUC,SAASL,KAC7BR,EAAQY,UAAUE,OAAON,GACzBX,EAAKP,QAAQyB,IAAG,WAAO,MAAAT,GAAOU,MAAMC,OAAQP,EAAY,OAAaQ,cAAc,QALnFlB,EAAQY,UAAUO,IAAIX,GACtBX,EAAKP,QAAQyB,IAAG,WAAO,MAAAT,GAAOU,MAAMC,OAAQP,EAAY,OAAaQ,cAAc,OAoBvF,OAZA3B,MAAKD,QAAQ8B,kBAAiB,WAC5BpB,EAAQqB,iBAAiB,iBAAkBZ,EAAUxB,GACrDe,EAAQY,UAAUO,IAAI,uCA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O,MAAApG,GAAKqG,uBAAuBN,KAExDO,WAAU,WAAO,MAAAtG,GAAKqG,uBAAuBN,OAIjDrG,KAAKsG,eAAiBpC,EACtBlE,KAAK6D,iBAAmB7D,KAAKiE,YAM/BP,EAAFvD,UAAAqE,MAAE,eAG8BqC,KAAxB7G,KAAKgF,iBAGThF,KAAK8D,iBAAiBc,MAAMK,OAASjF,KAAKgF,iBAG5CtB,EAAFvD,UAAA2G,kBAAE,aASQpD,EAAVvD,UAAAwG,uBAAE,SAA+BN,GACtB,GAAAU,GAAXV,EAAAU,eAA2BC,EAA3BX,EAAAW,YAQShH,MAAK2D,WAAWsD,WAAaC,SAASC,gBAAkBd,GAC3DA,EAASe,kBAAkBL,EAAgBC,mBAvPjDxE,KAACc,EAAAA,UAADZ,OACEa,SAAU,gCACV8D,SAAU,sBACVC,MACEC,MAAS,wBAGT7B,KAAQ,IACR8B,UAAW,+DArBfhF,KAAEgB,EAAAA,aAOFhB,KAAQI,EAAAA,WAFRJ,KAAEK,EAAAA,4BAuCF6B,UAAAlC,KAAGiF,EAAAA,MAAH/E,MAAS,wBAQToC,UAAAtC,KAAGiF,EAAAA,MAAH/E,MAAS,wBAQTgF,UAAAlF,KAAGiF,EAAAA,MAAH/E,MAAS,0BA2MTgB,KCpQAiE,EAAA,WAAA,QAAAA,MAK8B,sBAL9BnF,KAACoF,EAAAA,SAADlF,OACEmF,cAAe/E,EAAaY,GAC5BoE,SAAUC,EAAAA,gBACVC,SAAUlF,EAAaY,OAEzBiE"}
@@ -19,7 +19,7 @@
19
19
  * Current version of the Angular Component Development Kit.
20
20
  * @type {?}
21
21
  */
22
- var VERSION = new core.Version('8.1.4');
22
+ var VERSION = new core.Version('8.2.3');
23
23
 
24
24
  exports.VERSION = VERSION;
25
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.umd.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.1.4');\n"],"names":["Version"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAWA,AAAA,IAAa,OAAO,GAAG,IAAIA,YAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk.umd.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.2.3');\n"],"names":["Version"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAWA,AAAA,IAAa,OAAO,GAAG,IAAIA,YAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;"}
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk={}),e.ng.core)}(this,function(e,n){"use strict";var o=new n.Version("8.1.4");e.VERSION=o,Object.defineProperty(e,"__esModule",{value:!0})});
8
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk={}),e.ng.core)}(this,function(e,n){"use strict";var o=new n.Version("8.2.3");e.VERSION=o,Object.defineProperty(e,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=cdk.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.umd.min.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.1.4');\n"],"names":["VERSION","Version"],"mappings":";;;;;;;4QAWA,IAAaA,GAAU,GAAIC,GAAAA,QAAQ"}
1
+ {"version":3,"file":"cdk.umd.min.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.2.3');\n"],"names":["VERSION","Version"],"mappings":";;;;;;;4QAWA,IAAaA,GAAU,GAAIC,GAAAA,QAAQ"}
@@ -108,6 +108,8 @@ export declare class DragRef<T = any> {
108
108
  private _pointerUpSubscription;
109
109
  /** Subscription to the viewport being scrolled. */
110
110
  private _scrollSubscription;
111
+ /** Subscription to the viewport being resized. */
112
+ private _resizeSubscription;
111
113
  /**
112
114
  * Time at which the last touch event occurred. Used to avoid firing the same
113
115
  * events multiple times on touch devices where the browser will fire a fake
@@ -341,6 +343,13 @@ export declare class DragRef<T = any> {
341
343
  * @param currentPosition Current position of the user's pointer.
342
344
  */
343
345
  private _getDragDistance;
346
+ /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */
347
+ private _cleanupCachedDimensions;
348
+ /**
349
+ * Checks whether the element is still inside its boundary after the viewport has been resized.
350
+ * If not, the position is adjusted so that the element fits again.
351
+ */
352
+ private _containInsideBoundaryOnResize;
344
353
  }
345
354
  /** Point on the page or within an element. */
346
355
  export interface Point {
@@ -30,7 +30,6 @@ export declare class DropListRef<T = any> {
30
30
  */
31
31
  private _ngZone?;
32
32
  private _viewportRuler?;
33
- private _document;
34
33
  /** Element that the drop list is attached to. */
35
34
  element: HTMLElement | ElementRef<HTMLElement>;
36
35
  /**
@@ -133,6 +132,8 @@ export declare class DropListRef<T = any> {
133
132
  private _scrollNode;
134
133
  /** Used to signal to the current auto-scroll sequence when to stop. */
135
134
  private _stopScrollTimers;
135
+ /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */
136
+ private _shadowRoot;
136
137
  constructor(element: ElementRef<HTMLElement> | HTMLElement, _dragDropRegistry: DragDropRegistry<DragRef, DropListRef>, _document: any,
137
138
  /**
138
139
  * @deprecated _ngZone and _viewportRuler parameters to be made required.
@@ -299,4 +300,9 @@ export declare class DropListRef<T = any> {
299
300
  * @param sibling Sibling whose dragging has stopped.
300
301
  */
301
302
  _stopReceiving(sibling: DropListRef): void;
303
+ /**
304
+ * Starts listening to scroll events on the viewport.
305
+ * Used for updating the internal state of the list.
306
+ */
307
+ private _listenToScrollEvents;
302
308
  }
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"CdkDragConfig":{"__symbolic":"interface"},"DragDrop":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":27,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":28,"character":21},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":29,"character":28},{"__symbolic":"reference","name":"DragDropRegistry"}]}],"createDrag":[{"__symbolic":"method"}],"createDropList":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"DragRef":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":276,"character":39,"context":{"typeName":"HTMLElement"},"module":"./drag-ref"},{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Could not resolve type","line":278,"character":23,"context":{"typeName":"Document"},"module":"./drag-ref"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":279,"character":21},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":280,"character":28},{"__symbolic":"reference","name":"DragDropRegistry"}]}],"getPlaceholderElement":[{"__symbolic":"method"}],"getRootElement":[{"__symbolic":"method"}],"withHandles":[{"__symbolic":"method"}],"withPreviewTemplate":[{"__symbolic":"method"}],"withPlaceholderTemplate":[{"__symbolic":"method"}],"withRootElement":[{"__symbolic":"method"}],"withBoundaryElement":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"disableHandle":[{"__symbolic":"method"}],"enableHandle":[{"__symbolic":"method"}],"withDirection":[{"__symbolic":"method"}],"_withDropContainer":[{"__symbolic":"method"}],"getFreeDragPosition":[{"__symbolic":"method"}],"setFreeDragPosition":[{"__symbolic":"method"}],"_sortFromLastPointerPosition":[{"__symbolic":"method"}],"_removeSubscriptions":[{"__symbolic":"method"}],"_destroyPreview":[{"__symbolic":"method"}],"_destroyPlaceholder":[{"__symbolic":"method"}],"_endDragSequence":[{"__symbolic":"method"}],"_startDragSequence":[{"__symbolic":"method"}],"_initializeDragSequence":[{"__symbolic":"method"}],"_cleanupDragArtifacts":[{"__symbolic":"method"}],"_updateActiveDropContainer":[{"__symbolic":"method"}],"_createPreviewElement":[{"__symbolic":"method"}],"_animatePreviewToPlaceholder":[{"__symbolic":"method"}],"_createPlaceholderElement":[{"__symbolic":"method"}],"_getPointerPositionInElement":[{"__symbolic":"method"}],"_getPointerPositionOnPage":[{"__symbolic":"method"}],"_getConstrainedPointerPosition":[{"__symbolic":"method"}],"_updatePointerDirectionDelta":[{"__symbolic":"method"}],"_toggleNativeDragInteractions":[{"__symbolic":"method"}],"_removeRootElementListeners":[{"__symbolic":"method"}],"_applyRootElementTransform":[{"__symbolic":"method"}],"_getDragDistance":[{"__symbolic":"method"}]}},"DragRefConfig":{"__symbolic":"interface"},"DropListRef":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":204,"character":39,"context":{"typeName":"HTMLElement"},"module":"./drop-list-ref"},{"__symbolic":"reference","name":"DragDropRegistry"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":211,"character":22},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":212,"character":29}]}],"dispose":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"enter":[{"__symbolic":"method"}],"exit":[{"__symbolic":"method"}],"drop":[{"__symbolic":"method"}],"withItems":[{"__symbolic":"method"}],"withDirection":[{"__symbolic":"method"}],"connectedTo":[{"__symbolic":"method"}],"withOrientation":[{"__symbolic":"method"}],"getItemIndex":[{"__symbolic":"method"}],"isReceiving":[{"__symbolic":"method"}],"_sortItem":[{"__symbolic":"method"}],"_startScrollingIfNecessary":[{"__symbolic":"method"}],"_stopScrolling":[{"__symbolic":"method"}],"_cacheOwnPosition":[{"__symbolic":"method"}],"_cacheItemPositions":[{"__symbolic":"method"}],"_reset":[{"__symbolic":"method"}],"_getSiblingOffsetPx":[{"__symbolic":"method"}],"_isPointerNearDropContainer":[{"__symbolic":"method"}],"_getItemOffsetPx":[{"__symbolic":"method"}],"_getItemIndexFromPointerPosition":[{"__symbolic":"method"}],"_cacheItems":[{"__symbolic":"method"}],"_updateAfterScroll":[{"__symbolic":"method"}],"_removeListeners":[{"__symbolic":"method"}],"_isOverContainer":[{"__symbolic":"method"}],"_getSiblingContainerFromPosition":[{"__symbolic":"method"}],"_canReceive":[{"__symbolic":"method"}],"_startReceiving":[{"__symbolic":"method"}],"_stopReceiving":[{"__symbolic":"method"}]}},"CdkDropListContainer":{"__symbolic":"interface"},"CDK_DROP_LIST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":82,"character":33},"arguments":["CDK_DROP_LIST"]},"CDK_DROP_LIST_CONTAINER":{"__symbolic":"reference","name":"CDK_DROP_LIST"},"CdkDragStart":{"__symbolic":"interface"},"CdkDragRelease":{"__symbolic":"interface"},"CdkDragEnd":{"__symbolic":"interface"},"CdkDragEnter":{"__symbolic":"interface"},"CdkDragExit":{"__symbolic":"interface"},"CdkDragDrop":{"__symbolic":"interface"},"CdkDragMove":{"__symbolic":"interface"},"CdkDragSortEvent":{"__symbolic":"interface"},"moveItemInArray":{"__symbolic":"function"},"transferArrayItem":{"__symbolic":"function"},"copyArrayItem":{"__symbolic":"function"},"DragDropModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":17,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}],"exports":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}],"providers":[{"__symbolic":"reference","name":"DragDrop"}]}]}],"members":{}},"DragDropRegistry":{"__symbolic":"class","arity":2,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":27,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":63,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":63,"character":12}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":62,"character":21},{"__symbolic":"reference","name":"any"}]}],"registerDropContainer":[{"__symbolic":"method"}],"registerDragItem":[{"__symbolic":"method"}],"removeDropContainer":[{"__symbolic":"method"}],"removeDragItem":[{"__symbolic":"method"}],"startDragging":[{"__symbolic":"method"}],"stopDragging":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"getDropContainer":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_clearGlobalListeners":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵa":{"__symbolic":"interface"},"CdkDropList":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":50,"character":1},"arguments":[{"selector":"[cdkDropList], cdk-drop-list","exportAs":"cdkDropList","providers":[{"provide":{"__symbolic":"reference","name":"CdkDropListGroup"},"useValue":{"__symbolic":"reference","name":"undefined"}},{"provide":{"__symbolic":"reference","name":"CDK_DROP_LIST_CONTAINER"},"useExisting":{"__symbolic":"reference","name":"CdkDropList"}}],"host":{"class":"cdk-drop-list","[id]":"id","[class.cdk-drop-list-disabled]":"disabled","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()","$quoted$":["class","[id]","[class.cdk-drop-list-disabled]","[class.cdk-drop-list-dragging]","[class.cdk-drop-list-receiving]"]}}]}],"members":{"_draggables":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":77,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDrag"},{"descendants":false}]}]}],"connectedTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3},"arguments":["cdkDropListConnectedTo"]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3},"arguments":["cdkDropListData"]}]}],"orientation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3},"arguments":["cdkDropListOrientation"]}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3}}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":104,"character":3},"arguments":["cdkDropListLockAxis"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":107,"character":3},"arguments":["cdkDropListDisabled"]}]}],"sortingDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":117,"character":3},"arguments":["cdkDropListSortingDisabled"]}]}],"enterPredicate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":128,"character":3},"arguments":["cdkDropListEnterPredicate"]}]}],"autoScrollDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3},"arguments":["cdkDropListAutoScrollDisabled"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3},"arguments":["cdkDropListDropped"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":142,"character":3},"arguments":["cdkDropListEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":149,"character":3},"arguments":["cdkDropListExited"]}]}],"sorted":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":153,"character":3},"arguments":["cdkDropListSorted"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":159,"character":54}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":160,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":160,"character":19}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":158,"character":33,"context":{"typeName":"HTMLElement"},"module":"./directives/drop-list"}]},{"__symbolic":"reference","name":"DragDrop"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":159,"character":34},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":159,"character":80},{"__symbolic":"reference","name":"CdkDropListGroup"}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"drop":[{"__symbolic":"method"}],"enter":[{"__symbolic":"method"}],"exit":[{"__symbolic":"method"}],"getItemIndex":[{"__symbolic":"method"}],"_sortItem":[{"__symbolic":"method"}],"_getSiblingContainerFromPosition":[{"__symbolic":"method"}],"_isOverContainer":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_handleEvents":[{"__symbolic":"method"}]},"statics":{"_dropLists":[]}},"CdkDropListGroup":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"[cdkDropListGroup]","exportAs":"cdkDropListGroup"}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3},"arguments":["cdkDropListGroupDisabled"]}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CDK_DRAG_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":35},"arguments":["CDK_DRAG_CONFIG",{"providedIn":"root","factory":{"__symbolic":"reference","name":"CDK_DRAG_CONFIG_FACTORY"}}]},"CDK_DRAG_CONFIG_FACTORY":{"__symbolic":"function","parameters":[],"value":{"dragStartThreshold":5,"pointerDirectionChangeThreshold":5}},"CdkDrag":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":65,"character":1},"arguments":[{"selector":"[cdkDrag]","exportAs":"cdkDrag","host":{"class":"cdk-drag","[class.cdk-drag-disabled]":"disabled","[class.cdk-drag-dragging]":"_dragRef.isDragging()","$quoted$":["class","[class.cdk-drag-disabled]","[class.cdk-drag-dragging]"]},"providers":[{"provide":{"__symbolic":"reference","name":"ɵb"},"useExisting":{"__symbolic":"reference","name":"CdkDrag"}}]}]}],"members":{"_handles":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":82,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragHandle"},{"descendants":true}]}]}],"_previewTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":85,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPreview"},{"static":false}]}]}],"_placeholderTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":88,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPlaceholder"},{"static":false}]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3},"arguments":["cdkDragData"]}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3},"arguments":["cdkDragLockAxis"]}]}],"rootElementSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3},"arguments":["cdkDragRootElement"]}]}],"boundaryElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":109,"character":3},"arguments":["cdkDragBoundary"]}]}],"dragStartDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":129,"character":3},"arguments":["cdkDragStartDelay"]}]}],"freeDragPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":3},"arguments":["cdkDragFreeDragPosition"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":138,"character":3},"arguments":["cdkDragDisabled"]}]}],"constrainPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":154,"character":3},"arguments":["cdkDragConstrainPosition"]}]}],"started":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":157,"character":3},"arguments":["cdkDragStarted"]}]}],"released":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":160,"character":3},"arguments":["cdkDragReleased"]}]}],"ended":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":164,"character":3},"arguments":["cdkDragEnded"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":167,"character":3},"arguments":["cdkDragEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":171,"character":3},"arguments":["cdkDragExited"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":175,"character":3},"arguments":["cdkDragDropped"]}]}],"moved":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":182,"character":3},"arguments":["cdkDragMoved"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":201,"character":7},"arguments":[{"__symbolic":"reference","name":"CDK_DROP_LIST"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":201,"character":30}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":201,"character":42}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":202,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":202,"character":14}]}],null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":203,"character":52},"arguments":[{"__symbolic":"reference","name":"CDK_DRAG_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":204,"character":7}}],null,null],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":199,"character":33,"context":{"typeName":"HTMLElement"},"module":"./directives/drag"}]},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":202,"character":65},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":203,"character":33},{"__symbolic":"reference","name":"DragRefConfig"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":204,"character":32},{"__symbolic":"reference","name":"DragDrop"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":205,"character":34}]}],"getPlaceholderElement":[{"__symbolic":"method"}],"getRootElement":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"getFreeDragPosition":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_updateRootElement":[{"__symbolic":"method"}],"_getBoundaryElement":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_handleEvents":[{"__symbolic":"method"}]}},"CdkDragHandle":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"selector":"[cdkDragHandle]","host":{"class":"cdk-drag-handle","$quoted$":["class"]}}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3},"arguments":["cdkDragHandleDisabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":39,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵb"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":39,"character":30}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":38,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drag-handle"}]},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CdkDragPreview":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPreview]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-preview"}]}]}]}},"CdkDragPlaceholder":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPlaceholder]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-placeholder"}]}]}]}},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":16,"character":35},"arguments":["CDK_DRAG_PARENT"]}},"origins":{"CdkDragConfig":"./public-api","DragDrop":"./drag-drop","DragRef":"./drag-ref","DragRefConfig":"./drag-ref","DropListRef":"./drop-list-ref","CdkDropListContainer":"./drop-list-container","CDK_DROP_LIST":"./drop-list-container","CDK_DROP_LIST_CONTAINER":"./drop-list-container","CdkDragStart":"./drag-events","CdkDragRelease":"./drag-events","CdkDragEnd":"./drag-events","CdkDragEnter":"./drag-events","CdkDragExit":"./drag-events","CdkDragDrop":"./drag-events","CdkDragMove":"./drag-events","CdkDragSortEvent":"./drag-events","moveItemInArray":"./drag-utils","transferArrayItem":"./drag-utils","copyArrayItem":"./drag-utils","DragDropModule":"./drag-drop-module","DragDropRegistry":"./drag-drop-registry","ɵa":"./directives/drop-list","CdkDropList":"./directives/drop-list","CdkDropListGroup":"./directives/drop-list-group","CDK_DRAG_CONFIG":"./directives/drag","CDK_DRAG_CONFIG_FACTORY":"./directives/drag","CdkDrag":"./directives/drag","CdkDragHandle":"./directives/drag-handle","CdkDragPreview":"./directives/drag-preview","CdkDragPlaceholder":"./directives/drag-placeholder","ɵb":"./drag-parent"},"importAs":"@angular/cdk/drag-drop"}
1
+ {"__symbolic":"module","version":4,"metadata":{"CdkDragConfig":{"__symbolic":"interface"},"DragDrop":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":27,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":28,"character":21},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":29,"character":28},{"__symbolic":"reference","name":"DragDropRegistry"}]}],"createDrag":[{"__symbolic":"method"}],"createDropList":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"DragRef":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":279,"character":39,"context":{"typeName":"HTMLElement"},"module":"./drag-ref"},{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Could not resolve type","line":281,"character":23,"context":{"typeName":"Document"},"module":"./drag-ref"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":282,"character":21},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":283,"character":28},{"__symbolic":"reference","name":"DragDropRegistry"}]}],"getPlaceholderElement":[{"__symbolic":"method"}],"getRootElement":[{"__symbolic":"method"}],"withHandles":[{"__symbolic":"method"}],"withPreviewTemplate":[{"__symbolic":"method"}],"withPlaceholderTemplate":[{"__symbolic":"method"}],"withRootElement":[{"__symbolic":"method"}],"withBoundaryElement":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"disableHandle":[{"__symbolic":"method"}],"enableHandle":[{"__symbolic":"method"}],"withDirection":[{"__symbolic":"method"}],"_withDropContainer":[{"__symbolic":"method"}],"getFreeDragPosition":[{"__symbolic":"method"}],"setFreeDragPosition":[{"__symbolic":"method"}],"_sortFromLastPointerPosition":[{"__symbolic":"method"}],"_removeSubscriptions":[{"__symbolic":"method"}],"_destroyPreview":[{"__symbolic":"method"}],"_destroyPlaceholder":[{"__symbolic":"method"}],"_endDragSequence":[{"__symbolic":"method"}],"_startDragSequence":[{"__symbolic":"method"}],"_initializeDragSequence":[{"__symbolic":"method"}],"_cleanupDragArtifacts":[{"__symbolic":"method"}],"_updateActiveDropContainer":[{"__symbolic":"method"}],"_createPreviewElement":[{"__symbolic":"method"}],"_animatePreviewToPlaceholder":[{"__symbolic":"method"}],"_createPlaceholderElement":[{"__symbolic":"method"}],"_getPointerPositionInElement":[{"__symbolic":"method"}],"_getPointerPositionOnPage":[{"__symbolic":"method"}],"_getConstrainedPointerPosition":[{"__symbolic":"method"}],"_updatePointerDirectionDelta":[{"__symbolic":"method"}],"_toggleNativeDragInteractions":[{"__symbolic":"method"}],"_removeRootElementListeners":[{"__symbolic":"method"}],"_applyRootElementTransform":[{"__symbolic":"method"}],"_getDragDistance":[{"__symbolic":"method"}],"_cleanupCachedDimensions":[{"__symbolic":"method"}],"_containInsideBoundaryOnResize":[{"__symbolic":"method"}]}},"DragRefConfig":{"__symbolic":"interface"},"DropListRef":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":206,"character":39,"context":{"typeName":"HTMLElement"},"module":"./drop-list-ref"},{"__symbolic":"reference","name":"DragDropRegistry"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":213,"character":22},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":214,"character":29}]}],"dispose":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"enter":[{"__symbolic":"method"}],"exit":[{"__symbolic":"method"}],"drop":[{"__symbolic":"method"}],"withItems":[{"__symbolic":"method"}],"withDirection":[{"__symbolic":"method"}],"connectedTo":[{"__symbolic":"method"}],"withOrientation":[{"__symbolic":"method"}],"getItemIndex":[{"__symbolic":"method"}],"isReceiving":[{"__symbolic":"method"}],"_sortItem":[{"__symbolic":"method"}],"_startScrollingIfNecessary":[{"__symbolic":"method"}],"_stopScrolling":[{"__symbolic":"method"}],"_cacheOwnPosition":[{"__symbolic":"method"}],"_cacheItemPositions":[{"__symbolic":"method"}],"_reset":[{"__symbolic":"method"}],"_getSiblingOffsetPx":[{"__symbolic":"method"}],"_isPointerNearDropContainer":[{"__symbolic":"method"}],"_getItemOffsetPx":[{"__symbolic":"method"}],"_getItemIndexFromPointerPosition":[{"__symbolic":"method"}],"_cacheItems":[{"__symbolic":"method"}],"_updateAfterScroll":[{"__symbolic":"method"}],"_removeListeners":[{"__symbolic":"method"}],"_isOverContainer":[{"__symbolic":"method"}],"_getSiblingContainerFromPosition":[{"__symbolic":"method"}],"_canReceive":[{"__symbolic":"method"}],"_startReceiving":[{"__symbolic":"method"}],"_stopReceiving":[{"__symbolic":"method"}],"_listenToScrollEvents":[{"__symbolic":"method"}]}},"CdkDropListContainer":{"__symbolic":"interface"},"CDK_DROP_LIST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":82,"character":33},"arguments":["CDK_DROP_LIST"]},"CDK_DROP_LIST_CONTAINER":{"__symbolic":"reference","name":"CDK_DROP_LIST"},"CdkDragStart":{"__symbolic":"interface"},"CdkDragRelease":{"__symbolic":"interface"},"CdkDragEnd":{"__symbolic":"interface"},"CdkDragEnter":{"__symbolic":"interface"},"CdkDragExit":{"__symbolic":"interface"},"CdkDragDrop":{"__symbolic":"interface"},"CdkDragMove":{"__symbolic":"interface"},"CdkDragSortEvent":{"__symbolic":"interface"},"moveItemInArray":{"__symbolic":"function"},"transferArrayItem":{"__symbolic":"function"},"copyArrayItem":{"__symbolic":"function"},"DragDropModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":17,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}],"exports":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}],"providers":[{"__symbolic":"reference","name":"DragDrop"}]}]}],"members":{}},"DragDropRegistry":{"__symbolic":"class","arity":2,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":27,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":63,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":63,"character":12}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":62,"character":21},{"__symbolic":"reference","name":"any"}]}],"registerDropContainer":[{"__symbolic":"method"}],"registerDragItem":[{"__symbolic":"method"}],"removeDropContainer":[{"__symbolic":"method"}],"removeDragItem":[{"__symbolic":"method"}],"startDragging":[{"__symbolic":"method"}],"stopDragging":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"getDropContainer":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_clearGlobalListeners":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵa":{"__symbolic":"interface"},"CdkDropList":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":50,"character":1},"arguments":[{"selector":"[cdkDropList], cdk-drop-list","exportAs":"cdkDropList","providers":[{"provide":{"__symbolic":"reference","name":"CdkDropListGroup"},"useValue":{"__symbolic":"reference","name":"undefined"}},{"provide":{"__symbolic":"reference","name":"CDK_DROP_LIST_CONTAINER"},"useExisting":{"__symbolic":"reference","name":"CdkDropList"}}],"host":{"class":"cdk-drop-list","[id]":"id","[class.cdk-drop-list-disabled]":"disabled","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()","$quoted$":["class","[id]","[class.cdk-drop-list-disabled]","[class.cdk-drop-list-dragging]","[class.cdk-drop-list-receiving]"]}}]}],"members":{"_draggables":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":77,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDrag"},{"descendants":false}]}]}],"connectedTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3},"arguments":["cdkDropListConnectedTo"]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3},"arguments":["cdkDropListData"]}]}],"orientation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3},"arguments":["cdkDropListOrientation"]}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3}}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":104,"character":3},"arguments":["cdkDropListLockAxis"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":107,"character":3},"arguments":["cdkDropListDisabled"]}]}],"sortingDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":117,"character":3},"arguments":["cdkDropListSortingDisabled"]}]}],"enterPredicate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":128,"character":3},"arguments":["cdkDropListEnterPredicate"]}]}],"autoScrollDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3},"arguments":["cdkDropListAutoScrollDisabled"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3},"arguments":["cdkDropListDropped"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":142,"character":3},"arguments":["cdkDropListEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":149,"character":3},"arguments":["cdkDropListExited"]}]}],"sorted":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":153,"character":3},"arguments":["cdkDropListSorted"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":159,"character":54}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":160,"character":7}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":160,"character":19}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":158,"character":33,"context":{"typeName":"HTMLElement"},"module":"./directives/drop-list"}]},{"__symbolic":"reference","name":"DragDrop"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":159,"character":34},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":159,"character":80},{"__symbolic":"reference","name":"CdkDropListGroup"}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"drop":[{"__symbolic":"method"}],"enter":[{"__symbolic":"method"}],"exit":[{"__symbolic":"method"}],"getItemIndex":[{"__symbolic":"method"}],"_sortItem":[{"__symbolic":"method"}],"_getSiblingContainerFromPosition":[{"__symbolic":"method"}],"_isOverContainer":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_handleEvents":[{"__symbolic":"method"}]},"statics":{"_dropLists":[]}},"CdkDropListGroup":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"[cdkDropListGroup]","exportAs":"cdkDropListGroup"}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3},"arguments":["cdkDropListGroupDisabled"]}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CDK_DRAG_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":35},"arguments":["CDK_DRAG_CONFIG",{"providedIn":"root","factory":{"__symbolic":"reference","name":"CDK_DRAG_CONFIG_FACTORY"}}]},"CDK_DRAG_CONFIG_FACTORY":{"__symbolic":"function","parameters":[],"value":{"dragStartThreshold":5,"pointerDirectionChangeThreshold":5}},"CdkDrag":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":65,"character":1},"arguments":[{"selector":"[cdkDrag]","exportAs":"cdkDrag","host":{"class":"cdk-drag","[class.cdk-drag-disabled]":"disabled","[class.cdk-drag-dragging]":"_dragRef.isDragging()","$quoted$":["class","[class.cdk-drag-disabled]","[class.cdk-drag-dragging]"]},"providers":[{"provide":{"__symbolic":"reference","name":"ɵb"},"useExisting":{"__symbolic":"reference","name":"CdkDrag"}}]}]}],"members":{"_handles":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":82,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragHandle"},{"descendants":true}]}]}],"_previewTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":85,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPreview"},{"static":false}]}]}],"_placeholderTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":88,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPlaceholder"},{"static":false}]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3},"arguments":["cdkDragData"]}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3},"arguments":["cdkDragLockAxis"]}]}],"rootElementSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3},"arguments":["cdkDragRootElement"]}]}],"boundaryElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":109,"character":3},"arguments":["cdkDragBoundary"]}]}],"dragStartDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":129,"character":3},"arguments":["cdkDragStartDelay"]}]}],"freeDragPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":3},"arguments":["cdkDragFreeDragPosition"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":138,"character":3},"arguments":["cdkDragDisabled"]}]}],"constrainPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":154,"character":3},"arguments":["cdkDragConstrainPosition"]}]}],"started":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":157,"character":3},"arguments":["cdkDragStarted"]}]}],"released":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":160,"character":3},"arguments":["cdkDragReleased"]}]}],"ended":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":164,"character":3},"arguments":["cdkDragEnded"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":167,"character":3},"arguments":["cdkDragEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":171,"character":3},"arguments":["cdkDragExited"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":175,"character":3},"arguments":["cdkDragDropped"]}]}],"moved":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":182,"character":3},"arguments":["cdkDragMoved"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":201,"character":7},"arguments":[{"__symbolic":"reference","name":"CDK_DROP_LIST"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":201,"character":30}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":201,"character":42}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":202,"character":7},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":202,"character":14}]}],null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":203,"character":52},"arguments":[{"__symbolic":"reference","name":"CDK_DRAG_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":204,"character":7}}],null,null],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":199,"character":33,"context":{"typeName":"HTMLElement"},"module":"./directives/drag"}]},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":202,"character":65},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":203,"character":33},{"__symbolic":"reference","name":"DragRefConfig"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":204,"character":32},{"__symbolic":"reference","name":"DragDrop"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":205,"character":34}]}],"getPlaceholderElement":[{"__symbolic":"method"}],"getRootElement":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"getFreeDragPosition":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_updateRootElement":[{"__symbolic":"method"}],"_getBoundaryElement":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_handleEvents":[{"__symbolic":"method"}]}},"CdkDragHandle":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"selector":"[cdkDragHandle]","host":{"class":"cdk-drag-handle","$quoted$":["class"]}}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3},"arguments":["cdkDragHandleDisabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":39,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵb"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":39,"character":30}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":38,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drag-handle"}]},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CdkDragPreview":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPreview]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-preview"}]}]}]}},"CdkDragPlaceholder":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPlaceholder]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-placeholder"}]}]}]}},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":16,"character":35},"arguments":["CDK_DRAG_PARENT"]}},"origins":{"CdkDragConfig":"./public-api","DragDrop":"./drag-drop","DragRef":"./drag-ref","DragRefConfig":"./drag-ref","DropListRef":"./drop-list-ref","CdkDropListContainer":"./drop-list-container","CDK_DROP_LIST":"./drop-list-container","CDK_DROP_LIST_CONTAINER":"./drop-list-container","CdkDragStart":"./drag-events","CdkDragRelease":"./drag-events","CdkDragEnd":"./drag-events","CdkDragEnter":"./drag-events","CdkDragExit":"./drag-events","CdkDragDrop":"./drag-events","CdkDragMove":"./drag-events","CdkDragSortEvent":"./drag-events","moveItemInArray":"./drag-utils","transferArrayItem":"./drag-utils","copyArrayItem":"./drag-utils","DragDropModule":"./drag-drop-module","DragDropRegistry":"./drag-drop-registry","ɵa":"./directives/drop-list","CdkDropList":"./directives/drop-list","CdkDropListGroup":"./directives/drop-list-group","CDK_DRAG_CONFIG":"./directives/drag","CDK_DRAG_CONFIG_FACTORY":"./directives/drag","CdkDrag":"./directives/drag","CdkDragHandle":"./directives/drag-handle","CdkDragPreview":"./directives/drag-preview","CdkDragPlaceholder":"./directives/drag-placeholder","ɵb":"./drag-parent"},"importAs":"@angular/cdk/drag-drop"}
package/esm2015/a11y.js CHANGED
@@ -62,7 +62,12 @@ function removeAriaReferencedId(el, attr, id) {
62
62
  * @return {?}
63
63
  */
64
64
  val => val != id.trim()));
65
- el.setAttribute(attr, filteredIds.join(ID_DELIMINATOR));
65
+ if (filteredIds.length) {
66
+ el.setAttribute(attr, filteredIds.join(ID_DELIMINATOR));
67
+ }
68
+ else {
69
+ el.removeAttribute(attr);
70
+ }
66
71
  }
67
72
  /**
68
73
  * Gets the list of IDs referenced by the given ARIA attribute on an element.
@@ -1952,7 +1957,10 @@ class FocusMonitor {
1952
1957
  if (this._touchTimeoutId != null) {
1953
1958
  clearTimeout(this._touchTimeoutId);
1954
1959
  }
1955
- this._lastTouchTarget = event.target;
1960
+ // Since this listener is bound on the `document` level, any events coming from the shadow DOM
1961
+ // will have their `target` set to the shadow root. If available, use `composedPath` to
1962
+ // figure out the event target.
1963
+ this._lastTouchTarget = event.composedPath ? event.composedPath()[0] : event.target;
1956
1964
  this._touchTimeoutId = setTimeout((/**
1957
1965
  * @return {?}
1958
1966
  */