@angular/cdk 9.1.1 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/a11y/focus-monitor/focus-monitor.d.ts +36 -2
  2. package/a11y/index.metadata.json +1 -1
  3. package/bundles/cdk-a11y.umd.js +241 -19
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +25 -10
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-clipboard.umd.js +1 -1
  8. package/bundles/cdk-clipboard.umd.js.map +1 -1
  9. package/bundles/cdk-clipboard.umd.min.js +1 -1
  10. package/bundles/cdk-clipboard.umd.min.js.map +1 -1
  11. package/bundles/cdk-coercion.umd.js +0 -1
  12. package/bundles/cdk-coercion.umd.js.map +1 -1
  13. package/bundles/cdk-coercion.umd.min.js.map +1 -1
  14. package/bundles/cdk-collections.umd.js +203 -6
  15. package/bundles/cdk-collections.umd.js.map +1 -1
  16. package/bundles/cdk-collections.umd.min.js +17 -10
  17. package/bundles/cdk-collections.umd.min.js.map +1 -1
  18. package/bundles/cdk-drag-drop.umd.js +217 -23
  19. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  20. package/bundles/cdk-drag-drop.umd.min.js +25 -10
  21. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  22. package/bundles/cdk-overlay.umd.js +210 -12
  23. package/bundles/cdk-overlay.umd.js.map +1 -1
  24. package/bundles/cdk-overlay.umd.min.js +27 -12
  25. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  26. package/bundles/cdk-platform.umd.js +11 -0
  27. package/bundles/cdk-platform.umd.js.map +1 -1
  28. package/bundles/cdk-platform.umd.min.js +6 -6
  29. package/bundles/cdk-platform.umd.min.js.map +1 -1
  30. package/bundles/cdk-portal.umd.js +211 -14
  31. package/bundles/cdk-portal.umd.js.map +1 -1
  32. package/bundles/cdk-portal.umd.min.js +19 -4
  33. package/bundles/cdk-portal.umd.min.js.map +1 -1
  34. package/bundles/cdk-scrolling.umd.js +242 -14
  35. package/bundles/cdk-scrolling.umd.js.map +1 -1
  36. package/bundles/cdk-scrolling.umd.min.js +14 -6
  37. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  38. package/bundles/cdk-table.umd.js +278 -50
  39. package/bundles/cdk-table.umd.js.map +1 -1
  40. package/bundles/cdk-table.umd.min.js +29 -7
  41. package/bundles/cdk-table.umd.min.js.map +1 -1
  42. package/bundles/cdk-testing-protractor.umd.js +254 -49
  43. package/bundles/cdk-testing-protractor.umd.js.map +1 -1
  44. package/bundles/cdk-testing-protractor.umd.min.js +16 -9
  45. package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
  46. package/bundles/cdk-testing-testbed.umd.js +257 -54
  47. package/bundles/cdk-testing-testbed.umd.js.map +1 -1
  48. package/bundles/cdk-testing-testbed.umd.min.js +23 -8
  49. package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
  50. package/bundles/cdk-testing.umd.js +243 -46
  51. package/bundles/cdk-testing.umd.js.map +1 -1
  52. package/bundles/cdk-testing.umd.min.js +20 -5
  53. package/bundles/cdk-testing.umd.min.js.map +1 -1
  54. package/bundles/cdk-text-field.umd.js +21 -6
  55. package/bundles/cdk-text-field.umd.js.map +1 -1
  56. package/bundles/cdk-text-field.umd.min.js +3 -3
  57. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  58. package/bundles/cdk-tree.umd.js +212 -15
  59. package/bundles/cdk-tree.umd.js.map +1 -1
  60. package/bundles/cdk-tree.umd.min.js +17 -3
  61. package/bundles/cdk-tree.umd.min.js.map +1 -1
  62. package/bundles/cdk.umd.js +1 -1
  63. package/bundles/cdk.umd.js.map +1 -1
  64. package/bundles/cdk.umd.min.js +1 -1
  65. package/bundles/cdk.umd.min.js.map +1 -1
  66. package/coercion/array.d.ts +1 -0
  67. package/esm2015/a11y/focus-monitor/focus-monitor.js +93 -12
  68. package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
  69. package/esm2015/a11y/focus-trap/focus-trap.js +1 -1
  70. package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
  71. package/esm2015/a11y/public-api.js +2 -2
  72. package/esm2015/bidi/directionality.js +1 -1
  73. package/esm2015/clipboard/pending-copy.js +3 -3
  74. package/esm2015/coercion/array.js +1 -2
  75. package/esm2015/drag-drop/drag-drop.js +1 -1
  76. package/esm2015/drag-drop/drag-ref.js +7 -5
  77. package/esm2015/drag-drop/drop-list-ref.js +11 -19
  78. package/esm2015/layout/breakpoints-observer.js +1 -1
  79. package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -2
  80. package/esm2015/overlay/position/overlay-position-builder.js +1 -1
  81. package/esm2015/platform/features/shadow-dom.js +16 -1
  82. package/esm2015/platform/public-api.js +2 -2
  83. package/esm2015/scrolling/scroll-dispatcher.js +38 -5
  84. package/esm2015/scrolling/viewport-ruler.js +44 -5
  85. package/esm2015/table/cell.js +18 -8
  86. package/esm2015/table/public-api.js +3 -2
  87. package/esm2015/table/row.js +24 -8
  88. package/esm2015/table/table.js +26 -12
  89. package/esm2015/table/text-column.js +3 -26
  90. package/esm2015/table/tokens.js +44 -0
  91. package/esm2015/testing/protractor/protractor-element.js +4 -2
  92. package/esm2015/testing/protractor/protractor-harness-environment.js +13 -8
  93. package/esm2015/testing/testbed/testbed-harness-environment.js +16 -10
  94. package/esm2015/text-field/autosize.js +38 -4
  95. package/esm2015/version.js +1 -1
  96. package/esm5/a11y/focus-monitor/focus-monitor.js +39 -13
  97. package/esm5/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
  98. package/esm5/a11y/focus-trap/focus-trap.js +1 -1
  99. package/esm5/a11y/live-announcer/live-announcer.js +1 -1
  100. package/esm5/bidi/directionality.js +1 -1
  101. package/esm5/clipboard/pending-copy.js +2 -2
  102. package/esm5/coercion/array.js +1 -2
  103. package/esm5/drag-drop/drag-drop.js +1 -1
  104. package/esm5/drag-drop/drag-ref.js +7 -5
  105. package/esm5/drag-drop/drop-list-ref.js +9 -14
  106. package/esm5/layout/breakpoints-observer.js +1 -1
  107. package/esm5/overlay/position/flexible-connected-position-strategy.js +3 -2
  108. package/esm5/overlay/position/overlay-position-builder.js +1 -1
  109. package/esm5/platform/features/shadow-dom.js +11 -1
  110. package/esm5/scrolling/scroll-dispatcher.js +21 -5
  111. package/esm5/scrolling/viewport-ruler.js +24 -5
  112. package/esm5/table/cell.js +13 -8
  113. package/esm5/table/public-api.js +2 -1
  114. package/esm5/table/row.js +21 -11
  115. package/esm5/table/table.js +16 -11
  116. package/esm5/table/text-column.js +3 -4
  117. package/esm5/table/tokens.js +16 -0
  118. package/esm5/testing/protractor/protractor-element.js +4 -2
  119. package/esm5/testing/protractor/protractor-harness-environment.js +17 -11
  120. package/esm5/testing/testbed/testbed-harness-environment.js +17 -11
  121. package/esm5/text-field/autosize.js +20 -4
  122. package/esm5/version.js +1 -1
  123. package/fesm2015/a11y.js +89 -11
  124. package/fesm2015/a11y.js.map +1 -1
  125. package/fesm2015/cdk.js +1 -1
  126. package/fesm2015/cdk.js.map +1 -1
  127. package/fesm2015/clipboard.js +2 -2
  128. package/fesm2015/clipboard.js.map +1 -1
  129. package/fesm2015/coercion.js +0 -1
  130. package/fesm2015/coercion.js.map +1 -1
  131. package/fesm2015/drag-drop.js +16 -22
  132. package/fesm2015/drag-drop.js.map +1 -1
  133. package/fesm2015/overlay.js +2 -1
  134. package/fesm2015/overlay.js.map +1 -1
  135. package/fesm2015/platform.js +16 -1
  136. package/fesm2015/platform.js.map +1 -1
  137. package/fesm2015/scrolling.js +76 -7
  138. package/fesm2015/scrolling.js.map +1 -1
  139. package/fesm2015/table.js +98 -49
  140. package/fesm2015/table.js.map +1 -1
  141. package/fesm2015/testing/protractor.js +16 -9
  142. package/fesm2015/testing/protractor.js.map +1 -1
  143. package/fesm2015/testing/testbed.js +15 -9
  144. package/fesm2015/testing/testbed.js.map +1 -1
  145. package/fesm2015/text-field.js +37 -3
  146. package/fesm2015/text-field.js.map +1 -1
  147. package/fesm5/a11y.js +36 -12
  148. package/fesm5/a11y.js.map +1 -1
  149. package/fesm5/cdk.js +1 -1
  150. package/fesm5/cdk.js.map +1 -1
  151. package/fesm5/clipboard.js +1 -1
  152. package/fesm5/clipboard.js.map +1 -1
  153. package/fesm5/coercion.js +0 -1
  154. package/fesm5/coercion.js.map +1 -1
  155. package/fesm5/drag-drop.js +14 -17
  156. package/fesm5/drag-drop.js.map +1 -1
  157. package/fesm5/overlay.js +2 -1
  158. package/fesm5/overlay.js.map +1 -1
  159. package/fesm5/platform.js +11 -1
  160. package/fesm5/platform.js.map +1 -1
  161. package/fesm5/scrolling.js +39 -7
  162. package/fesm5/scrolling.js.map +1 -1
  163. package/fesm5/table.js +59 -29
  164. package/fesm5/table.js.map +1 -1
  165. package/fesm5/testing/protractor.js +20 -12
  166. package/fesm5/testing/protractor.js.map +1 -1
  167. package/fesm5/testing/testbed.js +16 -10
  168. package/fesm5/testing/testbed.js.map +1 -1
  169. package/fesm5/text-field.js +19 -3
  170. package/fesm5/text-field.js.map +1 -1
  171. package/package.json +1 -1
  172. package/platform/features/shadow-dom.d.ts +2 -0
  173. package/platform/index.metadata.json +1 -1
  174. package/schematics/ng-add/index.js +1 -1
  175. package/schematics/ng-update/upgrade-rules/class-names-rule.js +3 -1
  176. package/schematics/utils/ast/ng-module-imports.js +3 -2
  177. package/scrolling/index.metadata.json +1 -1
  178. package/scrolling/scroll-dispatcher.d.ts +9 -1
  179. package/scrolling/viewport-ruler.d.ts +9 -1
  180. package/table/cell.d.ts +2 -0
  181. package/table/index.metadata.json +1 -1
  182. package/table/public-api.d.ts +1 -0
  183. package/table/row.d.ts +6 -3
  184. package/table/table.d.ts +2 -0
  185. package/table/text-column.d.ts +2 -13
  186. package/table/tokens.d.ts +25 -0
  187. package/testing/protractor/protractor-harness-environment.d.ts +10 -3
  188. package/testing/testbed/testbed-harness-environment.d.ts +12 -4
  189. package/text-field/autosize.d.ts +9 -1
  190. package/text-field/index.metadata.json +1 -1
package/fesm2015/cdk.js CHANGED
@@ -8,7 +8,7 @@ import { Version } from '@angular/core';
8
8
  * found in the LICENSE file at https://angular.io/license
9
9
  */
10
10
  /** Current version of the Angular Component Development Kit. */
11
- const VERSION = new Version('9.1.1');
11
+ const VERSION = new Version('9.2.0');
12
12
 
13
13
  /**
14
14
  * @license
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('9.1.1');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAQA,AAEA;AACA,MAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;ACXvD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('9.2.0');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAQA,AAEA;AACA,MAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;ACXvD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
@@ -58,11 +58,11 @@ class PendingCopy {
58
58
  try { // Older browsers could throw if copy is not supported.
59
59
  if (textarea) {
60
60
  /** @type {?} */
61
- const currentFocus = this._document.activeElement;
61
+ const currentFocus = (/** @type {?} */ (this._document.activeElement));
62
62
  textarea.select();
63
63
  textarea.setSelectionRange(0, textarea.value.length);
64
64
  successful = this._document.execCommand('copy');
65
- if (currentFocus && currentFocus instanceof HTMLElement) {
65
+ if (currentFocus) {
66
66
  currentFocus.focus();
67
67
  }
68
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sources":["../../../../../../src/cdk/clipboard/pending-copy.ts","../../../../../../src/cdk/clipboard/clipboard.ts","../../../../../../src/cdk/clipboard/copy-to-clipboard.ts","../../../../../../src/cdk/clipboard/clipboard-module.ts","../../../../../../src/cdk/clipboard/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement|undefined;\n\n constructor(text: string, private readonly _document: Document) {\n const textarea = this._textarea = this._document.createElement('textarea');\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set an\n // absolute position so the page layout isn't affected.\n styles.opacity = '0';\n styles.position = 'absolute';\n styles.left = styles.top = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus && currentFocus instanceof HTMLElement) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n\n this._textarea = undefined;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n\n/**\n * A service for copying text to the clipboard.\n */\n@Injectable({providedIn: 'root'})\nexport class Clipboard {\n private readonly _document: Document;\n\n constructor(@Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n Inject,\n Optional,\n OnDestroy,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CKD_COPY_TO_CLIPBOARD_CONFIG =\n new InjectionToken<CdkCopyToClipboardConfig>('CKD_COPY_TO_CLIPBOARD_CONFIG');\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n }\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') copied = new EventEmitter<boolean>();\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n * @deprecated Use `cdkCopyToClipboardCopied` instead.\n * @breaking-change 10.0.0\n */\n @Output('copied') _deprecatedCopied = this.copied;\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed: boolean;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor(\n private _clipboard: Clipboard,\n /**\n * @deprecated _ngZone parameter to become required.\n * @breaking-change 10.0.0\n */\n private _ngZone?: NgZone,\n @Optional() @Inject(CKD_COPY_TO_CLIPBOARD_CONFIG) config?: CdkCopyToClipboardConfig) {\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // @breaking-change 10.0.0 Remove null check for `_ngZone`.\n if (this._ngZone) {\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = setTimeout(attempt, 1);\n }\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,WAAW;;;;;IAGtB,YAAY,IAAY,EAAmB,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;;cACtD,QAAQ,GAAG,I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,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;KACxB;;;YA3FF,SAAS,SAAC;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,IAAI,EAAE;oBACJ,SAAS,EAAE,QAAQ;iBACpB;aACF;;;;YAtBO,SAAS;YANf,MAAM;4CAqEH,QAAQ,YAAI,MAAM,SAAC,4BAA4B;;;mBAtCjD,KAAK,SAAC,oBAAoB;uBAM1B,KAAK,SAAC,4BAA4B;qBAMlC,MAAM,SAAC,0BAA0B;gCAQjC,MAAM,SAAC,QAAQ;;;;;;;IApBhB,kCAA+C;;;;;;IAM/C,sCAA0D;;;;;;IAM1D,oCAAyE;;;;;;;;IAQzE,+CAAkD;;;;;;IAGlD,sCAA0C;;;;;;IAG1C,wCAA4B;;;;;;IAG5B,6CAA6B;;;;;IAG3B,wCAA6B;;;;;;;IAK7B,qCAAwB;;;;;;;;MCjEf,eAAe;;;YAJ3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;gBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;;;;;;;ACfD;;GAEG;;;;"}
1
+ {"version":3,"file":"clipboard.js","sources":["../../../../../../src/cdk/clipboard/pending-copy.ts","../../../../../../src/cdk/clipboard/clipboard.ts","../../../../../../src/cdk/clipboard/copy-to-clipboard.ts","../../../../../../src/cdk/clipboard/clipboard-module.ts","../../../../../../src/cdk/clipboard/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nexport class PendingCopy {\n private _textarea: HTMLTextAreaElement|undefined;\n\n constructor(text: string, private readonly _document: Document) {\n const textarea = this._textarea = this._document.createElement('textarea');\n const styles = textarea.style;\n\n // Hide the element for display and accessibility. Set an\n // absolute position so the page layout isn't affected.\n styles.opacity = '0';\n styles.position = 'absolute';\n styles.left = styles.top = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n\n /** Finishes copying the text. */\n copy(): boolean {\n const textarea = this._textarea;\n let successful = false;\n\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement as HTMLOrSVGElement | null;\n\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n } catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n\n return successful;\n }\n\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n\n this._textarea = undefined;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {PendingCopy} from './pending-copy';\n\n\n/**\n * A service for copying text to the clipboard.\n */\n@Injectable({providedIn: 'root'})\nexport class Clipboard {\n private readonly _document: Document;\n\n constructor(@Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text: string): boolean {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n\n return successful;\n }\n\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text: string): PendingCopy {\n return new PendingCopy(text, this._document);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n EventEmitter,\n Input,\n Output,\n NgZone,\n InjectionToken,\n Inject,\n Optional,\n OnDestroy,\n} from '@angular/core';\nimport {Clipboard} from './clipboard';\nimport {PendingCopy} from './pending-copy';\n\n/** Object that can be used to configure the default options for `CdkCopyToClipboard`. */\nexport interface CdkCopyToClipboardConfig {\n /** Default number of attempts to make when copying text to the clipboard. */\n attempts?: number;\n}\n\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nexport const CKD_COPY_TO_CLIPBOARD_CONFIG =\n new InjectionToken<CdkCopyToClipboardConfig>('CKD_COPY_TO_CLIPBOARD_CONFIG');\n\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\n@Directive({\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n }\n})\nexport class CdkCopyToClipboard implements OnDestroy {\n /** Content to be copied. */\n @Input('cdkCopyToClipboard') text: string = '';\n\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n @Input('cdkCopyToClipboardAttempts') attempts: number = 1;\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n @Output('cdkCopyToClipboardCopied') copied = new EventEmitter<boolean>();\n\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n * @deprecated Use `cdkCopyToClipboardCopied` instead.\n * @breaking-change 10.0.0\n */\n @Output('copied') _deprecatedCopied = this.copied;\n\n /** Copies that are currently being attempted. */\n private _pending = new Set<PendingCopy>();\n\n /** Whether the directive has been destroyed. */\n private _destroyed: boolean;\n\n /** Timeout for the current copy attempt. */\n private _currentTimeout: any;\n\n constructor(\n private _clipboard: Clipboard,\n /**\n * @deprecated _ngZone parameter to become required.\n * @breaking-change 10.0.0\n */\n private _ngZone?: NgZone,\n @Optional() @Inject(CKD_COPY_TO_CLIPBOARD_CONFIG) config?: CdkCopyToClipboardConfig) {\n\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n\n /** Copies the current text to the clipboard. */\n copy(attempts: number = this.attempts): void {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // @breaking-change 10.0.0 Remove null check for `_ngZone`.\n if (this._ngZone) {\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n } else {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = setTimeout(attempt, 1);\n }\n } else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n } else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {CdkCopyToClipboard} from './copy-to-clipboard';\n\n@NgModule({\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\n})\nexport class ClipboardModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,WAAW;;;;;IAG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IAAI,CAAC,OAAO,EAAE,EAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;KACxB;;;YA3FF,SAAS,SAAC;gBACT,QAAQ,EAAE,sBAAsB;gBAChC,IAAI,EAAE;oBACJ,SAAS,EAAE,QAAQ;iBACpB;aACF;;;;YAtBO,SAAS;YANf,MAAM;4CAqEH,QAAQ,YAAI,MAAM,SAAC,4BAA4B;;;mBAtCjD,KAAK,SAAC,oBAAoB;uBAM1B,KAAK,SAAC,4BAA4B;qBAMlC,MAAM,SAAC,0BAA0B;gCAQjC,MAAM,SAAC,QAAQ;;;;;;;IApBhB,kCAA+C;;;;;;IAM/C,sCAA0D;;;;;;IAM1D,oCAAyE;;;;;;;;IAQzE,+CAAkD;;;;;;IAGlD,sCAA0C;;;;;;IAG1C,wCAA4B;;;;;;IAG5B,6CAA6B;;;;;IAG3B,wCAA6B;;;;;;;IAK7B,qCAAwB;;;;;;;;MCjEf,eAAe;;;YAJ3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;gBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;;;;;;;ACfD;;GAEG;;;;"}
@@ -40,7 +40,6 @@ function _isNumberValue(value) {
40
40
  * Use of this source code is governed by an MIT-style license that can be
41
41
  * found in the LICENSE file at https://angular.io/license
42
42
  */
43
- /** Wraps the provided value in an array, unless the provided value is an array. */
44
43
  function coerceArray(value) {
45
44
  return Array.isArray(value) ? value : [value];
46
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"coercion.js","sources":["../../../../../../src/cdk/coercion/boolean-property.ts","../../../../../../src/cdk/coercion/number-property.ts","../../../../../../src/cdk/coercion/array.ts","../../../../../../src/cdk/coercion/css-pixel-value.ts","../../../../../../src/cdk/coercion/element.ts","../../../../../../src/cdk/coercion/public-api.ts","../../../../../../src/cdk/coercion/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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\n/**\n * Type describing the allowed values for a number input\n * @docs-private\n */\nexport type NumberInput = string | number | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\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\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\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\n/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\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 {ElementRef} from '@angular/core';\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nexport function coerceElement<T>(elementOrRef: ElementRef<T> | T): T {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './boolean-property';\nexport * from './number-property';\nexport * from './array';\nexport * from './css-pixel-value';\nexport * from './element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;;AAeA,SAAgB,qBAAqB,CAAC,KAAU;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,EAAE,KAAK,OAAO,CAAC;CAChD;;ACjBD;;;;;;;AAiBA,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAa,GAAG,CAAC;IAChE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;AAMD,SAAgB,cAAc,CAAC,KAAU;;;;IAIvC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;CAClE;;AC9BD;;;;;;;;AASA,SAAgB,WAAW,CAAI,KAAc;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;ACXD;;;;;;;;AASA,SAAgB,mBAAmB,CAAC,KAAU;IAC5C,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,GAAG,KAAK,IAAI,CAAC;CACzD;;ACfD;;;;;;;AAQA,AAEA;;;;AAIA,SAAgB,aAAa,CAAI,YAA+B;IAC9D,OAAO,YAAY,YAAY,UAAU,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC;CACvF;;AChBD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"coercion.js","sources":["../../../../../../src/cdk/coercion/boolean-property.ts","../../../../../../src/cdk/coercion/number-property.ts","../../../../../../src/cdk/coercion/array.ts","../../../../../../src/cdk/coercion/css-pixel-value.ts","../../../../../../src/cdk/coercion/element.ts","../../../../../../src/cdk/coercion/public-api.ts","../../../../../../src/cdk/coercion/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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\n/**\n * Type describing the allowed values for a number input\n * @docs-private\n */\nexport type NumberInput = string | number | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\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\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[];\nexport function coerceArray<T>(value: T | readonly T[]): readonly T[];\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\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\n/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\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 {ElementRef} from '@angular/core';\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nexport function coerceElement<T>(elementOrRef: ElementRef<T> | T): T {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './boolean-property';\nexport * from './number-property';\nexport * from './array';\nexport * from './css-pixel-value';\nexport * from './element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;;AAeA,SAAgB,qBAAqB,CAAC,KAAU;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,GAAG,KAAK,EAAE,KAAK,OAAO,CAAC;CAChD;;ACjBD;;;;;;;AAiBA,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAa,GAAG,CAAC;IAChE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;AAMD,SAAgB,cAAc,CAAC,KAAU;;;;IAIvC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;CAClE;;AC9BD;;;;;;;AAWA,SAAgB,WAAW,CAAI,KAAc;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;ACbD;;;;;;;;AASA,SAAgB,mBAAmB,CAAC,KAAU;IAC5C,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,GAAG,KAAK,IAAI,CAAC;CACzD;;ACfD;;;;;;;AAQA,AAEA;;;;AAIA,SAAgB,aAAa,CAAI,YAA+B;IAC9D,OAAO,YAAY,YAAY,UAAU,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC;CACvF;;AChBD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { Injectable, NgZone, Inject, ɵɵdefineInjectable, ɵɵinject, InjectionToken, Directive, ElementRef, Optional, Input, TemplateRef, EventEmitter, isDevMode, SkipSelf, ViewContainerRef, ChangeDetectorRef, ContentChildren, ContentChild, Output, NgModule } from '@angular/core';
2
2
  import { DOCUMENT } from '@angular/common';
3
3
  import { ViewportRuler, ScrollDispatcher } from '@angular/cdk/scrolling';
4
- import { normalizePassiveListenerOptions, _supportsShadowDom } from '@angular/cdk/platform';
4
+ import { normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';
5
5
  import { coerceBooleanProperty, coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
6
6
  import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';
7
7
  import { startWith, takeUntil, map, take, tap, switchMap } from 'rxjs/operators';
@@ -995,10 +995,10 @@ class DragRef {
995
995
  (/** @type {?} */ (this._dropContainer)).exit(this);
996
996
  // Notify the new container that the item has entered.
997
997
  this._dropContainer = (/** @type {?} */ (newContainer));
998
- this._dropContainer.enter(this, x, y,
999
- // If we're re-entering the initial container,
1000
- // put item the into its starting index to begin with.
1001
- newContainer === this._initialContainer ? this._initialIndex : undefined);
998
+ this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&
999
+ // If we're re-entering the initial container and sorting is disabled,
1000
+ // put item the into its starting index to begin with.
1001
+ newContainer.sortingDisabled ? this._initialIndex : undefined);
1002
1002
  this.entered.next({
1003
1003
  item: this,
1004
1004
  container: (/** @type {?} */ (newContainer)),
@@ -1029,6 +1029,7 @@ class DragRef {
1029
1029
  if (previewTemplate) {
1030
1030
  /** @type {?} */
1031
1031
  const viewRef = (/** @type {?} */ (previewConfig)).viewContainer.createEmbeddedView(previewTemplate, (/** @type {?} */ (previewConfig)).context);
1032
+ viewRef.detectChanges();
1032
1033
  preview = getRootNode(viewRef, this._document);
1033
1034
  this._previewRef = viewRef;
1034
1035
  if ((/** @type {?} */ (previewConfig)).matchSize) {
@@ -1142,6 +1143,7 @@ class DragRef {
1142
1143
  let placeholder;
1143
1144
  if (placeholderTemplate) {
1144
1145
  this._placeholderRef = (/** @type {?} */ (placeholderConfig)).viewContainer.createEmbeddedView(placeholderTemplate, (/** @type {?} */ (placeholderConfig)).context);
1146
+ this._placeholderRef.detectChanges();
1145
1147
  placeholder = getRootNode(this._placeholderRef, this._document);
1146
1148
  }
1147
1149
  else {
@@ -2775,6 +2777,11 @@ class DropListRef {
2775
2777
  * @return {?}
2776
2778
  */
2777
2779
  _updateAfterScroll(scrolledParent, newTop, newLeft) {
2780
+ // Used when figuring out whether an element is inside the scroll parent. If the scrolled
2781
+ // parent is the `document`, we use the `documentElement`, because IE doesn't support `contains`
2782
+ // on the `document`.
2783
+ /** @type {?} */
2784
+ const scrolledParentNode = scrolledParent === this._document ? scrolledParent.documentElement : scrolledParent;
2778
2785
  /** @type {?} */
2779
2786
  const scrollPosition = (/** @type {?} */ (this._parentPositions.get(scrolledParent))).scrollPosition;
2780
2787
  /** @type {?} */
@@ -2789,7 +2796,7 @@ class DropListRef {
2789
2796
  * @return {?}
2790
2797
  */
2791
2798
  (position, node) => {
2792
- if (position.clientRect && scrolledParent !== node && scrolledParent.contains(node)) {
2799
+ if (position.clientRect && scrolledParent !== node && scrolledParentNode.contains(node)) {
2793
2800
  adjustClientRect(position.clientRect, topDifference, leftDifference);
2794
2801
  }
2795
2802
  }));
@@ -2944,7 +2951,9 @@ class DropListRef {
2944
2951
  */
2945
2952
  _getShadowRoot() {
2946
2953
  if (!this._cachedShadowRoot) {
2947
- this._cachedShadowRoot = getShadowRoot(coerceElement(this.element)) || this._document;
2954
+ /** @type {?} */
2955
+ const shadowRoot = (/** @type {?} */ (_getShadowRoot(coerceElement(this.element))));
2956
+ this._cachedShadowRoot = shadowRoot || this._document;
2948
2957
  }
2949
2958
  return this._cachedShadowRoot;
2950
2959
  }
@@ -3349,21 +3358,6 @@ function getElementScrollDirections(element, clientRect, pointerX, pointerY) {
3349
3358
  }
3350
3359
  return [verticalScrollDirection, horizontalScrollDirection];
3351
3360
  }
3352
- /**
3353
- * Gets the shadow root of an element, if any.
3354
- * @param {?} element
3355
- * @return {?}
3356
- */
3357
- function getShadowRoot(element) {
3358
- if (_supportsShadowDom()) {
3359
- /** @type {?} */
3360
- const rootNode = element.getRootNode ? element.getRootNode() : null;
3361
- if (rootNode instanceof ShadowRoot) {
3362
- return rootNode;
3363
- }
3364
- }
3365
- return null;
3366
- }
3367
3361
 
3368
3362
  /**
3369
3363
  * @fileoverview added by tsickle