@angular/cdk 7.0.0-rc.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/_a11y.scss +32 -0
  2. package/_overlay.scss +141 -0
  3. package/_text-field.scss +63 -0
  4. package/a11y/typings/aria-describer/aria-describer.d.ts +2 -2
  5. package/a11y/typings/focus-monitor/focus-monitor.d.ts +2 -2
  6. package/a11y/typings/index.metadata.json +1 -1
  7. package/a11y/typings/key-manager/list-key-manager.d.ts +1 -1
  8. package/a11y/typings/live-announcer/live-announcer.d.ts +2 -2
  9. package/bundles/cdk-a11y.umd.js +26 -21
  10. package/bundles/cdk-a11y.umd.js.map +1 -1
  11. package/bundles/cdk-a11y.umd.min.js +1 -1
  12. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  13. package/bundles/cdk-drag-drop.umd.js +126 -81
  14. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  15. package/bundles/cdk-drag-drop.umd.min.js +1 -1
  16. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  17. package/bundles/cdk-overlay.umd.js +22 -22
  18. package/bundles/cdk-overlay.umd.js.map +1 -1
  19. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  20. package/bundles/cdk-platform.umd.js +13 -2
  21. package/bundles/cdk-platform.umd.js.map +1 -1
  22. package/bundles/cdk-platform.umd.min.js +1 -1
  23. package/bundles/cdk-platform.umd.min.js.map +1 -1
  24. package/bundles/cdk-scrolling.umd.js +10 -6
  25. package/bundles/cdk-scrolling.umd.js.map +1 -1
  26. package/bundles/cdk-scrolling.umd.min.js +1 -1
  27. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  28. package/bundles/cdk-stepper.umd.js +1 -1
  29. package/bundles/cdk-stepper.umd.js.map +1 -1
  30. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  31. package/bundles/cdk-table.umd.js +5 -1
  32. package/bundles/cdk-table.umd.js.map +1 -1
  33. package/bundles/cdk-table.umd.min.js +1 -1
  34. package/bundles/cdk-table.umd.min.js.map +1 -1
  35. package/bundles/cdk-text-field.umd.js +10 -3
  36. package/bundles/cdk-text-field.umd.js.map +1 -1
  37. package/bundles/cdk-text-field.umd.min.js +1 -1
  38. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  39. package/bundles/cdk.umd.js +1 -1
  40. package/bundles/cdk.umd.js.map +1 -1
  41. package/bundles/cdk.umd.min.js +1 -1
  42. package/bundles/cdk.umd.min.js.map +1 -1
  43. package/drag-drop/typings/drag-events.d.ts +5 -5
  44. package/drag-drop/typings/drag-handle.d.ts +3 -1
  45. package/drag-drop/typings/drag-parent.d.ts +15 -0
  46. package/drag-drop/typings/drag-utils.d.ts +10 -0
  47. package/drag-drop/typings/drag.d.ts +6 -11
  48. package/drag-drop/typings/{drop-container.d.ts → drop-list-container.d.ts} +5 -5
  49. package/{typings/drag-drop/drop.d.ts → drag-drop/typings/drop-list.d.ts} +7 -7
  50. package/drag-drop/typings/index.d.ts +1 -0
  51. package/drag-drop/typings/index.metadata.json +1 -1
  52. package/drag-drop/typings/public-api.d.ts +2 -2
  53. package/esm2015/a11y.js +25 -20
  54. package/esm2015/a11y.js.map +1 -1
  55. package/esm2015/cdk.js +1 -1
  56. package/esm2015/cdk.js.map +1 -1
  57. package/esm2015/drag-drop.js +108 -57
  58. package/esm2015/drag-drop.js.map +1 -1
  59. package/esm2015/overlay.js +12 -12
  60. package/esm2015/overlay.js.map +1 -1
  61. package/esm2015/platform.js +13 -3
  62. package/esm2015/platform.js.map +1 -1
  63. package/esm2015/scrolling.js +10 -6
  64. package/esm2015/scrolling.js.map +1 -1
  65. package/esm2015/stepper.js +1 -1
  66. package/esm2015/stepper.js.map +1 -1
  67. package/esm2015/table.js +5 -1
  68. package/esm2015/table.js.map +1 -1
  69. package/esm2015/text-field.js +11 -4
  70. package/esm2015/text-field.js.map +1 -1
  71. package/esm5/a11y.es5.js +27 -22
  72. package/esm5/a11y.es5.js.map +1 -1
  73. package/esm5/cdk.es5.js +1 -1
  74. package/esm5/cdk.es5.js.map +1 -1
  75. package/esm5/drag-drop.es5.js +124 -81
  76. package/esm5/drag-drop.es5.js.map +1 -1
  77. package/esm5/overlay.es5.js +22 -22
  78. package/esm5/overlay.es5.js.map +1 -1
  79. package/esm5/platform.es5.js +13 -3
  80. package/esm5/platform.es5.js.map +1 -1
  81. package/esm5/scrolling.es5.js +10 -6
  82. package/esm5/scrolling.es5.js.map +1 -1
  83. package/esm5/stepper.es5.js +1 -1
  84. package/esm5/stepper.es5.js.map +1 -1
  85. package/esm5/table.es5.js +5 -1
  86. package/esm5/table.es5.js.map +1 -1
  87. package/esm5/text-field.es5.js +11 -4
  88. package/esm5/text-field.es5.js.map +1 -1
  89. package/overlay/typings/keyboard/overlay-keyboard-dispatcher.d.ts +2 -2
  90. package/overlay/typings/overlay-container.d.ts +2 -2
  91. package/overlay/typings/overlay-directives.d.ts +1 -1
  92. package/overlay/typings/overlay-module.d.ts +1 -1
  93. package/overlay/typings/position/connected-position-strategy.d.ts +1 -1
  94. package/overlay/typings/position/global-position-strategy.d.ts +2 -2
  95. package/overlay/typings/position/overlay-position-builder.d.ts +1 -1
  96. package/package.json +6 -6
  97. package/platform/typings/features/passive-listeners.d.ts +7 -0
  98. package/platform/typings/index.metadata.json +1 -1
  99. package/platform/typings/platform.d.ts +1 -1
  100. package/schematics/index.d.ts +0 -1
  101. package/schematics/index.js +0 -1
  102. package/schematics/index.js.map +1 -1
  103. package/schematics/ng-add/index.d.ts +4 -0
  104. package/schematics/ng-add/index.js +7 -3
  105. package/schematics/ng-add/index.js.map +1 -1
  106. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +4 -4
  107. package/schematics/ng-generate/drag-drop/schema.json +2 -1
  108. package/schematics/ng-update/index.js +8 -2
  109. package/schematics/ng-update/index.js.map +1 -1
  110. package/schematics/utils/build-component.d.ts +7 -0
  111. package/schematics/utils/build-component.js +4 -5
  112. package/schematics/utils/build-component.js.map +1 -1
  113. package/schematics/utils/html-head-element.d.ts +13 -0
  114. package/schematics/utils/html-head-element.js +54 -0
  115. package/schematics/utils/html-head-element.js.map +1 -0
  116. package/schematics/utils/index.d.ts +1 -0
  117. package/schematics/utils/index.js +1 -0
  118. package/schematics/utils/index.js.map +1 -1
  119. package/scrolling/typings/index.metadata.json +1 -1
  120. package/scrolling/typings/scroll-dispatcher.d.ts +2 -2
  121. package/scrolling/typings/viewport-ruler.d.ts +2 -2
  122. package/table/typings/index.metadata.json +1 -1
  123. package/text-field/typings/autosize.d.ts +7 -1
  124. package/text-field/typings/index.metadata.json +1 -1
  125. package/typings/a11y/aria-describer/aria-describer.d.ts +2 -2
  126. package/typings/a11y/focus-monitor/focus-monitor.d.ts +2 -2
  127. package/typings/a11y/index.metadata.json +1 -1
  128. package/typings/a11y/key-manager/list-key-manager.d.ts +1 -1
  129. package/typings/a11y/live-announcer/live-announcer.d.ts +2 -2
  130. package/typings/drag-drop/drag-events.d.ts +5 -5
  131. package/typings/drag-drop/drag-handle.d.ts +3 -1
  132. package/typings/drag-drop/drag-parent.d.ts +15 -0
  133. package/typings/drag-drop/drag-utils.d.ts +10 -0
  134. package/typings/drag-drop/drag.d.ts +6 -11
  135. package/typings/drag-drop/{drop-container.d.ts → drop-list-container.d.ts} +5 -5
  136. package/{drag-drop/typings/drop.d.ts → typings/drag-drop/drop-list.d.ts} +7 -7
  137. package/typings/drag-drop/index.d.ts +1 -0
  138. package/typings/drag-drop/index.metadata.json +1 -1
  139. package/typings/drag-drop/public-api.d.ts +2 -2
  140. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +2 -2
  141. package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +2 -2
  142. package/typings/esm5/a11y/index.metadata.json +1 -1
  143. package/typings/esm5/a11y/key-manager/list-key-manager.d.ts +1 -1
  144. package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +2 -2
  145. package/typings/esm5/drag-drop/drag-events.d.ts +5 -5
  146. package/typings/esm5/drag-drop/drag-handle.d.ts +3 -1
  147. package/typings/esm5/drag-drop/drag-parent.d.ts +15 -0
  148. package/typings/esm5/drag-drop/drag-utils.d.ts +10 -0
  149. package/typings/esm5/drag-drop/drag.d.ts +6 -11
  150. package/typings/esm5/drag-drop/{drop-container.d.ts → drop-list-container.d.ts} +5 -5
  151. package/typings/esm5/drag-drop/{drop.d.ts → drop-list.d.ts} +7 -7
  152. package/typings/esm5/drag-drop/index.d.ts +1 -0
  153. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  154. package/typings/esm5/drag-drop/public-api.d.ts +2 -2
  155. package/typings/esm5/index.metadata.json +1 -1
  156. package/typings/esm5/overlay/keyboard/overlay-keyboard-dispatcher.d.ts +2 -2
  157. package/typings/esm5/overlay/overlay-container.d.ts +2 -2
  158. package/typings/esm5/overlay/overlay-directives.d.ts +1 -1
  159. package/typings/esm5/overlay/overlay-module.d.ts +1 -1
  160. package/typings/esm5/overlay/position/connected-position-strategy.d.ts +1 -1
  161. package/typings/esm5/overlay/position/global-position-strategy.d.ts +2 -2
  162. package/typings/esm5/overlay/position/overlay-position-builder.d.ts +1 -1
  163. package/typings/esm5/platform/features/passive-listeners.d.ts +7 -0
  164. package/typings/esm5/platform/index.metadata.json +1 -1
  165. package/typings/esm5/platform/platform.d.ts +1 -1
  166. package/typings/esm5/scrolling/index.metadata.json +1 -1
  167. package/typings/esm5/scrolling/scroll-dispatcher.d.ts +2 -2
  168. package/typings/esm5/scrolling/viewport-ruler.d.ts +2 -2
  169. package/typings/esm5/table/index.metadata.json +1 -1
  170. package/typings/esm5/text-field/autosize.d.ts +7 -1
  171. package/typings/esm5/text-field/index.metadata.json +1 -1
  172. package/typings/index.metadata.json +1 -1
  173. package/typings/overlay/keyboard/overlay-keyboard-dispatcher.d.ts +2 -2
  174. package/typings/overlay/overlay-container.d.ts +2 -2
  175. package/typings/overlay/overlay-directives.d.ts +1 -1
  176. package/typings/overlay/overlay-module.d.ts +1 -1
  177. package/typings/overlay/position/connected-position-strategy.d.ts +1 -1
  178. package/typings/overlay/position/global-position-strategy.d.ts +2 -2
  179. package/typings/overlay/position/overlay-position-builder.d.ts +1 -1
  180. package/typings/platform/features/passive-listeners.d.ts +7 -0
  181. package/typings/platform/index.metadata.json +1 -1
  182. package/typings/platform/platform.d.ts +1 -1
  183. package/typings/schematics/index.d.ts +0 -1
  184. package/typings/schematics/ng-add/index.d.ts +4 -0
  185. package/typings/schematics/utils/build-component.d.ts +7 -0
  186. package/typings/schematics/utils/html-head-element.d.ts +13 -0
  187. package/typings/schematics/utils/index.d.ts +1 -0
  188. package/typings/scrolling/index.metadata.json +1 -1
  189. package/typings/scrolling/scroll-dispatcher.d.ts +2 -2
  190. package/typings/scrolling/viewport-ruler.d.ts +2 -2
  191. package/typings/table/index.metadata.json +1 -1
  192. package/typings/text-field/autosize.d.ts +7 -1
  193. package/typings/text-field/index.metadata.json +1 -1
  194. package/schematics/testing/index.d.ts +0 -9
  195. package/schematics/testing/index.js +0 -15
  196. package/schematics/testing/index.js.map +0 -1
  197. package/schematics/testing/post-scheduled-tasks.d.ts +0 -18
  198. package/schematics/testing/post-scheduled-tasks.js +0 -35
  199. package/schematics/testing/post-scheduled-tasks.js.map +0 -1
  200. package/schematics/testing/test-app.d.ts +0 -10
  201. package/schematics/testing/test-app.js +0 -20
  202. package/schematics/testing/test-app.js.map +0 -1
  203. package/typings/schematics/testing/index.d.ts +0 -9
  204. package/typings/schematics/testing/post-scheduled-tasks.d.ts +0 -18
  205. package/typings/schematics/testing/test-app.d.ts +0 -10
@@ -1 +1 @@
1
- {"version":3,"file":"drag-drop.es5.js","sources":["../../../src/cdk/drag-drop/drag-drop-module.ts","../../../src/cdk/drag-drop/drop.ts","../../../src/cdk/drag-drop/drag-utils.ts","../../../src/cdk/drag-drop/drag.ts","../../../src/cdk/drag-drop/transition-duration.ts","../../../src/cdk/drag-drop/drop-container.ts","../../../src/cdk/drag-drop/drag-preview.ts","../../../src/cdk/drag-drop/drag-placeholder.ts","../../../src/cdk/drag-drop/drag-handle.ts","../../../src/cdk/drag-drop/drag-drop-registry.ts","../../../src/cdk/drag-drop/drag-styling.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 {NgModule} from '@angular/core';\nimport {CdkDrop} from './drop';\nimport {CdkDrag} from './drag';\nimport {CdkDragHandle} from './drag-handle';\nimport {CdkDragPreview} from './drag-preview';\nimport {CdkDragPlaceholder} from './drag-placeholder';\n\n@NgModule({\n declarations: [\n CdkDrop,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n exports: [\n CdkDrop,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n})\nexport class DragDropModule {}\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 {coerceArray} from '@angular/cdk/coercion';\nimport {\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Optional,\n Directive,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {CdkDrag} from './drag';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport {CdkDragDrop, CdkDragEnter, CdkDragExit} from './drag-events';\nimport {moveItemInArray} from './drag-utils';\nimport {CDK_DROP_CONTAINER} from './drop-container';\n\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n\n/** Container that wraps a set of draggable items. */\n@Directive({\n selector: '[cdkDrop], cdk-drop',\n exportAs: 'cdkDrop',\n providers: [\n {provide: CDK_DROP_CONTAINER, useExisting: CdkDrop},\n ],\n host: {\n 'class': 'cdk-drop',\n '[id]': 'id',\n '[class.cdk-drop-dragging]': '_dragging'\n }\n})\nexport class CdkDrop<T = any> implements OnInit, OnDestroy {\n /** Draggable items in the container. */\n @ContentChildren(forwardRef(() => CdkDrag)) _draggables: QueryList<CdkDrag>;\n\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n @Input('cdkDropConnectedTo') connectedTo: (CdkDrop | string)[] | CdkDrop | string = [];\n\n /** Arbitrary data to attach to this container. */\n @Input('cdkDropData') data: T;\n\n /** Direction in which the list is oriented. */\n @Input('cdkDropOrientation') orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDrop`.\n */\n @Input() id: string = `cdk-drop-${_uniqueIdCounter++}`;\n\n /** Locks the position of the draggable elements inside the container along the specified axis. */\n @Input('cdkDropLockAxis') lockAxis: 'x' | 'y';\n\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n @Input('cdkDropEnterPredication')\n enterPredicate: (drag?: CdkDrag, drop?: CdkDrop) => boolean = () => true\n\n /** Emits when the user drops an item inside the container. */\n @Output('cdkDropDropped')\n dropped: EventEmitter<CdkDragDrop<T, any>> = new EventEmitter<CdkDragDrop<T, any>>();\n\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n @Output('cdkDropEntered')\n entered: EventEmitter<CdkDragEnter<T>> = new EventEmitter<CdkDragEnter<T>>();\n\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n @Output('cdkDropExited')\n exited: EventEmitter<CdkDragExit<T>> = new EventEmitter<CdkDragExit<T>>();\n\n constructor(\n public element: ElementRef<HTMLElement>,\n private _dragDropRegistry: DragDropRegistry<CdkDrag, CdkDrop<T>>,\n @Optional() private _dir?: Directionality) {}\n\n ngOnInit() {\n this._dragDropRegistry.registerDropContainer(this);\n }\n\n ngOnDestroy() {\n this._dragDropRegistry.removeDropContainer(this);\n }\n\n /** Whether an item in the container is being dragged. */\n _dragging = false;\n\n /** Cache of the dimensions of all the items and the sibling containers. */\n private _positionCache = {\n items: [] as {drag: CdkDrag, clientRect: ClientRect, offset: number}[],\n siblings: [] as {drop: CdkDrop, clientRect: ClientRect}[],\n self: {} as ClientRect\n };\n\n /**\n * Draggable items that are currently active inside the container. Includes the items\n * from `_draggables`, as well as any items that have been dragged in, but haven't\n * been dropped yet.\n */\n private _activeDraggables: CdkDrag[];\n\n /**\n * Keeps track of the item that was last swapped with the dragged item, as\n * well as what direction the pointer was moving in when the swap occured.\n */\n private _previousSwap = {drag: null as CdkDrag | null, delta: 0};\n\n /** Starts dragging an item. */\n start(): void {\n this._dragging = true;\n this._activeDraggables = this._draggables.toArray();\n this._cachePositions();\n }\n\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousContainer Container from which the item got dragged in.\n */\n drop(item: CdkDrag, currentIndex: number, previousContainer: CdkDrop): void {\n this._reset();\n this.dropped.emit({\n item,\n currentIndex,\n previousIndex: previousContainer.getItemIndex(item),\n container: this,\n // TODO(crisbeto): reconsider whether to make this null if the containers are the same.\n previousContainer\n });\n }\n\n /**\n * Emits an event to indicate that the user moved an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n */\n enter(item: CdkDrag, pointerX: number, pointerY: number): void {\n this.entered.emit({item, container: this});\n this.start();\n\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);\n const currentIndex = this._activeDraggables.indexOf(item);\n const newPositionReference = this._activeDraggables[newIndex];\n const placeholder = item.getPlaceholderElement();\n\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n this._activeDraggables.splice(currentIndex, 1);\n }\n\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement!.insertBefore(placeholder, element);\n this._activeDraggables.splice(newIndex, 0, item);\n } else {\n this.element.nativeElement.appendChild(placeholder);\n this._activeDraggables.push(item);\n }\n\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n\n // Note that the positions were already cached when we called `start` above,\n // but we need to refresh them since the amount of items has changed.\n this._cachePositions();\n }\n\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item: CdkDrag): void {\n this._reset();\n this.exited.emit({item, container: this});\n }\n\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item: CdkDrag): number {\n if (!this._dragging) {\n return this._draggables.toArray().indexOf(item);\n }\n\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this._dir && this._dir.value === 'rtl' ?\n this._positionCache.items.slice().reverse() : this._positionCache.items;\n\n return findIndex(items, currentItem => currentItem.drag === item);\n }\n\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDeta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item: CdkDrag, pointerX: number, pointerY: number,\n pointerDelta: {x: number, y: number}): void {\n // Don't sort the item if it's out of range.\n if (!this._isPointerNearDropContainer(pointerX, pointerY)) {\n return;\n }\n\n const siblings = this._positionCache.items;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n\n if (newIndex === -1 && siblings.length > 0) {\n return;\n }\n\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = findIndex(siblings, currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n\n // How many pixels the item's placeholder should be offset.\n const itemOffset = isHorizontal ? newPosition.left - currentPosition.left :\n newPosition.top - currentPosition.top;\n\n // How many pixels all the other items should be offset.\n const siblingOffset = isHorizontal ? currentPosition.width * delta :\n currentPosition.height * delta;\n\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem ? item.getPlaceholderElement() :\n sibling.drag.getRootElement();\n\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n elementToOffset.style.transform = `translate3d(${sibling.offset}px, 0, 0)`;\n this._adjustClientRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = `translate3d(0, ${sibling.offset}px, 0)`;\n this._adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n }\n\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item: CdkDrag, x: number, y: number): CdkDrop | null {\n const result = this._positionCache.siblings\n .find(sibling => isInsideClientRect(sibling.clientRect, x, y));\n\n return result && result.drop.enterPredicate(item, this) ? result.drop : null;\n }\n\n /**\n * Checks whether an item that started in this container can be returned to it,\n * after it was moved out into another container.\n * @param item Item that is being checked.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReturnItem(item: CdkDrag, x: number, y: number): boolean {\n return isInsideClientRect(this._positionCache.self, x, y) && this.enterPredicate(item, this);\n }\n\n /** Refreshes the position cache of the items and sibling containers. */\n private _cachePositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._positionCache.items = this._activeDraggables\n .map(drag => {\n const elementToMeasure = this._dragDropRegistry.isDragging(drag) ?\n // If the element is being dragged, we have to measure the\n // placeholder, because the element is hidden.\n drag.getPlaceholderElement() :\n drag.getRootElement();\n const clientRect = elementToMeasure.getBoundingClientRect();\n\n return {\n drag,\n offset: 0,\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n clientRect: {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height\n }\n };\n })\n .sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left :\n a.clientRect.top - b.clientRect.top;\n });\n\n this._positionCache.siblings = coerceArray(this.connectedTo)\n .map(drop => typeof drop === 'string' ? this._dragDropRegistry.getDropContainer(drop)! : drop)\n .filter(drop => drop && drop !== this)\n .map(drop => ({drop, clientRect: drop.element.nativeElement.getBoundingClientRect()}));\n\n this._positionCache.self = this.element.nativeElement.getBoundingClientRect();\n }\n\n /** Resets the container to its initial state. */\n private _reset() {\n this._dragging = false;\n\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => item.getRootElement().style.transform = '');\n this._activeDraggables = [];\n this._positionCache.items = [];\n this._positionCache.siblings = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n }\n\n /**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\n private _adjustClientRect(clientRect: ClientRect, top: number, left: number) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n }\n\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n private _getItemIndexFromPointerPosition(item: CdkDrag, pointerX: number, pointerY: number,\n delta?: {x: number, y: number}) {\n\n const isHorizontal = this.orientation === 'horizontal';\n\n return findIndex(this._positionCache.items, ({drag, clientRect}, _, array) => {\n if (drag === item) {\n // If there's only one item left in the container, it must be\n // the dragged item itself so we use it as a reference.\n return array.length < 2;\n }\n\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n\n // If the user is still hovering over the same item as last time, and they didn't change\n // the direction in which they're dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag && direction === this._previousSwap.delta) {\n return false;\n }\n }\n\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX <= Math.floor(clientRect.right) :\n pointerY >= Math.floor(clientRect.top) && pointerY <= Math.floor(clientRect.bottom);\n });\n }\n\n /**\n * Checks whether the pointer coordinates are close to the drop container.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\n private _isPointerNearDropContainer(pointerX: number, pointerY: number): boolean {\n const {top, right, bottom, left, width, height} = this._positionCache.self;\n const xThreshold = width * DROP_PROXIMITY_THRESHOLD;\n const yThreshold = height * DROP_PROXIMITY_THRESHOLD;\n\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold &&\n pointerX > left - xThreshold && pointerX < right + xThreshold;\n }\n}\n\n\n/**\n * Finds the index of an item that matches a predicate function. Used as an equivalent\n * of `Array.prototype.find` which isn't part of the standard Google typings.\n * @param array Array in which to look for matches.\n * @param predicate Function used to determine whether an item is a match.\n */\nfunction findIndex<T>(array: T[],\n predicate: (value: T, index: number, obj: T[]) => boolean): number {\n\n for (let i = 0; i < array.length; i++) {\n if (predicate(array[i], i, array)) {\n return i;\n }\n }\n\n return -1;\n}\n\n\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect: ClientRect, x: number, y: number) {\n const {top, bottom, left, right} = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\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 * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n\n if (from === to) {\n return;\n }\n\n const target = array[from];\n const delta = to < from ? -1 : 1;\n\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n\n array[to] = target;\n}\n\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number): void {\n\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value: number, max: number): number {\n return Math.max(0, Math.min(max, 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\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n SkipSelf,\n ViewContainerRef,\n} from '@angular/core';\nimport {Observable, Subject, Subscription, Observer} from 'rxjs';\nimport {take} from 'rxjs/operators';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport {\n CdkDragDrop,\n CdkDragEnd,\n CdkDragEnter,\n CdkDragExit,\n CdkDragMove,\n CdkDragStart,\n} from './drag-events';\nimport {CdkDragHandle} from './drag-handle';\nimport {CdkDragPlaceholder} from './drag-placeholder';\nimport {CdkDragPreview} from './drag-preview';\nimport {CDK_DROP_CONTAINER, CdkDropContainer} from './drop-container';\nimport {getTransformTransitionDurationInMs} from './transition-duration';\nimport {extendStyles, toggleNativeDragInteractions} from './drag-styling';\n\n\n// TODO(crisbeto): add auto-scrolling functionality.\n// TODO(crisbeto): add an API for moving a draggable up/down the\n// list programmatically. Useful for keyboard controls.\n\n/** Object that can be used to configure the behavior of CdkDrag. */\nexport interface CdkDragConfig {\n /**\n * Minimum amount of pixels that the user should\n * drag, before the CDK initiates a drag sequence.\n */\n dragStartThreshold: number;\n\n /**\n * Amount the pixels the user should drag before the CDK\n * considers them to have changed the drag direction.\n */\n pointerDirectionChangeThreshold: number;\n}\n\n/** Injection token that can be used to configure the behavior of `CdkDrag`. */\nexport const CDK_DRAG_CONFIG = new InjectionToken<CdkDragConfig>('CDK_DRAG_CONFIG', {\n providedIn: 'root',\n factory: CDK_DRAG_CONFIG_FACTORY\n});\n\n/** @docs-private */\nexport function CDK_DRAG_CONFIG_FACTORY(): CdkDragConfig {\n return {dragStartThreshold: 5, pointerDirectionChangeThreshold: 5};\n}\n\n/** Element that can be moved inside a CdkDrop container. */\n@Directive({\n selector: '[cdkDrag]',\n exportAs: 'cdkDrag',\n host: {\n 'class': 'cdk-drag',\n '[class.cdk-drag-dragging]': '_hasStartedDragging && _isDragging()',\n }\n})\nexport class CdkDrag<T = any> implements AfterViewInit, OnDestroy {\n private _document: Document;\n\n /** Element displayed next to the user's pointer while the element is dragged. */\n private _preview: HTMLElement;\n\n /** Reference to the view of the preview element. */\n private _previewRef: EmbeddedViewRef<any> | null;\n\n /** Reference to the view of the placeholder element. */\n private _placeholderRef: EmbeddedViewRef<any> | null;\n\n /** Element that is rendered instead of the draggable item while it is being sorted. */\n private _placeholder: HTMLElement;\n\n /** Coordinates within the element at which the user picked up the element. */\n private _pickupPositionInElement: Point;\n\n /** Coordinates on the page at which the user picked up the element. */\n private _pickupPositionOnPage: Point;\n\n /**\n * Reference to the element that comes after the draggable in the DOM, at the time\n * it was picked up. Used for restoring its initial position when it's dropped.\n */\n private _nextSibling: Node | null;\n\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n private _passiveTransform: Point = {x: 0, y: 0};\n\n /** CSS `transform` that is applied to the element while it's being dragged. */\n private _activeTransform: Point = {x: 0, y: 0};\n\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n _hasStartedDragging: boolean;\n\n /** Whether the element has moved since the user started dragging it. */\n private _hasMoved: boolean;\n\n /** Drop container in which the CdkDrag resided when dragging began. */\n private _initialContainer: CdkDropContainer;\n\n /** Cached scroll position on the page when the element was picked up. */\n private _scrollPosition: {top: number, left: number};\n\n /** Emits when the item is being moved. */\n private _moveEvents = new Subject<CdkDragMove<T>>();\n\n /**\n * Amount of subscriptions to the move event. Used to avoid\n * hitting the zone if the consumer didn't subscribe to it.\n */\n private _moveEventSubscriptions = 0;\n\n /** Keeps track of the direction in which the user is dragging along each axis. */\n private _pointerDirectionDelta: {x: -1 | 0 | 1, y: -1 | 0 | 1};\n\n /** Pointer position at which the last change in the delta occurred. */\n private _pointerPositionAtLastDirectionChange: Point;\n\n /** Root element that will be dragged by the user. */\n private _rootElement: HTMLElement;\n\n /** Subscription to pointer movement events. */\n private _pointerMoveSubscription = Subscription.EMPTY;\n\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n private _pointerUpSubscription = Subscription.EMPTY;\n\n /** Elements that can be used to drag the draggable item. */\n @ContentChildren(CdkDragHandle) _handles: QueryList<CdkDragHandle>;\n\n /** Element that will be used as a template to create the draggable item's preview. */\n @ContentChild(CdkDragPreview) _previewTemplate: CdkDragPreview;\n\n /** Template for placeholder element rendered to show where a draggable would be dropped. */\n @ContentChild(CdkDragPlaceholder) _placeholderTemplate: CdkDragPlaceholder;\n\n /** Arbitrary data to attach to this drag instance. */\n @Input('cdkDragData') data: T;\n\n /** Locks the position of the dragged element along the specified axis. */\n @Input('cdkDragLockAxis') lockAxis: 'x' | 'y';\n\n /**\n * Selector that will be used to determine the root draggable element, starting from\n * the `cdkDrag` element and going up the DOM. Passing an alternate root element is useful\n * when trying to enable dragging on an element that you might not have access to.\n */\n @Input('cdkDragRootElement') rootElementSelector: string;\n\n /** Emits when the user starts dragging the item. */\n @Output('cdkDragStarted') started: EventEmitter<CdkDragStart> = new EventEmitter<CdkDragStart>();\n\n /** Emits when the user stops dragging an item in the container. */\n @Output('cdkDragEnded') ended: EventEmitter<CdkDragEnd> = new EventEmitter<CdkDragEnd>();\n\n /** Emits when the user has moved the item into a new container. */\n @Output('cdkDragEntered') entered: EventEmitter<CdkDragEnter<any>> =\n new EventEmitter<CdkDragEnter<any>>();\n\n /** Emits when the user removes the item its container by dragging it into another container. */\n @Output('cdkDragExited') exited: EventEmitter<CdkDragExit<any>> =\n new EventEmitter<CdkDragExit<any>>();\n\n /** Emits when the user drops the item inside a container. */\n @Output('cdkDragDropped') dropped: EventEmitter<CdkDragDrop<any>> =\n new EventEmitter<CdkDragDrop<any>>();\n\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n @Output('cdkDragMoved') moved: Observable<CdkDragMove<T>> =\n Observable.create((observer: Observer<CdkDragMove<T>>) => {\n const subscription = this._moveEvents.subscribe(observer);\n this._moveEventSubscriptions++;\n\n return () => {\n subscription.unsubscribe();\n this._moveEventSubscriptions--;\n };\n });\n\n constructor(\n /** Element that the draggable is attached to. */\n public element: ElementRef<HTMLElement>,\n /** Droppable container that the draggable is a part of. */\n @Inject(CDK_DROP_CONTAINER) @Optional() @SkipSelf() public dropContainer: CdkDropContainer,\n @Inject(DOCUMENT) document: any,\n private _ngZone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n private _viewportRuler: ViewportRuler,\n private _dragDropRegistry: DragDropRegistry<CdkDrag<T>, CdkDropContainer>,\n @Inject(CDK_DRAG_CONFIG) private _config: CdkDragConfig,\n @Optional() private _dir: Directionality) {\n this._document = document;\n _dragDropRegistry.registerDragItem(this);\n }\n\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement(): HTMLElement {\n return this._placeholder;\n }\n\n /** Returns the root draggable element. */\n getRootElement(): HTMLElement {\n return this._rootElement;\n }\n\n ngAfterViewInit() {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n const rootElement = this._rootElement = this._getRootElement();\n rootElement.addEventListener('mousedown', this._pointerDown);\n rootElement.addEventListener('touchstart', this._pointerDown);\n toggleNativeDragInteractions(rootElement , false);\n });\n }\n\n ngOnDestroy() {\n this._rootElement.removeEventListener('mousedown', this._pointerDown);\n this._rootElement.removeEventListener('touchstart', this._pointerDown);\n this._destroyPreview();\n this._destroyPlaceholder();\n\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this._isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._removeElement(this._rootElement);\n }\n\n this._nextSibling = null;\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this._moveEvents.complete();\n }\n\n /** Checks whether the element is currently being dragged. */\n _isDragging() {\n return this._dragDropRegistry.isDragging(this);\n }\n\n /** Handler for the `mousedown`/`touchstart` events. */\n _pointerDown = (event: MouseEvent | TouchEvent) => {\n // Delegate the event based on whether it started from a handle or the element itself.\n if (this._handles.length) {\n const targetHandle = this._handles.find(handle => {\n const element = handle.element.nativeElement;\n const target = event.target;\n return !!target && (target === element || element.contains(target as HTMLElement));\n });\n\n if (targetHandle) {\n this._initializeDragSequence(targetHandle.element.nativeElement, event);\n }\n } else {\n this._initializeDragSequence(this._rootElement, event);\n }\n }\n\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n private _initializeDragSequence(referenceElement: HTMLElement, event: MouseEvent | TouchEvent) {\n const isDragging = this._isDragging();\n\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || (!this._isTouchEvent(event) && event.button !== 0)) {\n return;\n }\n\n this._hasStartedDragging = this._hasMoved = false;\n this._initialContainer = this.dropContainer;\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n // If we have a custom preview template, the element won't be visible anyway so we avoid the\n // extra `getBoundingClientRect` calls and just move the preview next to the cursor.\n this._pickupPositionInElement = this._previewTemplate ? {x: 0, y: 0} :\n this._getPointerPositionInElement(referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = {x: 0, y: 0};\n this._pointerPositionAtLastDirectionChange = {x: pointerPosition.x, y: pointerPosition.y};\n this._dragDropRegistry.startDragging(this, event);\n }\n\n /** Starts the dragging sequence. */\n private _startDragSequence() {\n // Emit the event on the item before the one on the container.\n this.started.emit({source: this});\n\n if (this.dropContainer) {\n const element = this._rootElement;\n\n // Grab the `nextSibling` before the preview and placeholder\n // have been created so we don't get the preview by accident.\n this._nextSibling = element.nextSibling;\n\n const preview = this._preview = this._createPreviewElement();\n const placeholder = this._placeholder = this._createPlaceholderElement();\n\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n element.style.display = 'none';\n this._document.body.appendChild(element.parentNode!.replaceChild(placeholder, element));\n this._document.body.appendChild(preview);\n this.dropContainer.start();\n }\n }\n\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n private _pointerMove = (event: MouseEvent | TouchEvent) => {\n const pointerPosition = this._getConstrainedPointerPosition(event);\n\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n const minimumDistance = this._config.dragStartThreshold;\n\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferrable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (distanceX + distanceY >= minimumDistance) {\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence());\n }\n\n return;\n }\n\n this._hasMoved = true;\n event.preventDefault();\n this._updatePointerDirectionDelta(pointerPosition);\n\n if (this.dropContainer) {\n this._updateActiveDropContainer(pointerPosition);\n } else {\n const activeTransform = this._activeTransform;\n activeTransform.x =\n pointerPosition.x - this._pickupPositionOnPage.x + this._passiveTransform.x;\n activeTransform.y =\n pointerPosition.y - this._pickupPositionOnPage.y + this._passiveTransform.y;\n this._setTransform(this._rootElement, activeTransform.x, activeTransform.y);\n }\n\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEventSubscriptions > 0) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition,\n event,\n delta: this._pointerDirectionDelta\n });\n });\n }\n }\n\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n private _pointerUp = () => {\n if (!this._isDragging()) {\n return;\n }\n\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n\n if (!this._hasStartedDragging) {\n return;\n }\n\n if (!this.dropContainer) {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => this.ended.emit({source: this}));\n return;\n }\n\n this._animatePreviewToPlaceholder().then(() => this._cleanupDragArtifacts());\n }\n\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n private _cleanupDragArtifacts() {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n this._rootElement.style.display = '';\n\n if (this._nextSibling) {\n this._nextSibling.parentNode!.insertBefore(this._rootElement, this._nextSibling);\n } else {\n this._initialContainer.element.nativeElement.appendChild(this._rootElement);\n }\n\n this._destroyPreview();\n this._destroyPlaceholder();\n\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const currentIndex = this.dropContainer.getItemIndex(this);\n\n this.ended.emit({source: this});\n this.dropped.emit({\n item: this,\n currentIndex,\n previousIndex: this._initialContainer.getItemIndex(this),\n container: this.dropContainer,\n previousContainer: this._initialContainer\n });\n this.dropContainer.drop(this, currentIndex, this._initialContainer);\n this.dropContainer = this._initialContainer;\n });\n }\n\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n private _updateActiveDropContainer({x, y}: Point) {\n // Drop container that draggable has been moved into.\n let newContainer = this.dropContainer._getSiblingContainerFromPosition(this, x, y);\n\n // If we couldn't find a new container to move the item into, and the item has left it's\n // initial container, check whether the it's allowed to return into its original container.\n // This handles the case where two containers are connected one way and the user tries to\n // undo dragging an item into a new container.\n if (!newContainer && this.dropContainer !== this._initialContainer &&\n this._initialContainer._canReturnItem(this, x, y)) {\n newContainer = this._initialContainer;\n }\n\n if (newContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.emit({item: this, container: this.dropContainer});\n this.dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this.entered.emit({item: this, container: newContainer!});\n this.dropContainer = newContainer!;\n this.dropContainer.enter(this, x, y);\n });\n }\n\n this.dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n this._setTransform(this._preview,\n x - this._pickupPositionInElement.x,\n y - this._pickupPositionInElement.y);\n }\n\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n private _createPreviewElement(): HTMLElement {\n let preview: HTMLElement;\n\n if (this._previewTemplate) {\n const viewRef = this._viewContainerRef.createEmbeddedView(this._previewTemplate.templateRef,\n this._previewTemplate.data);\n\n preview = viewRef.rootNodes[0];\n this._previewRef = viewRef;\n this._setTransform(preview, this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n } else {\n const element = this._rootElement;\n const elementRect = element.getBoundingClientRect();\n\n preview = element.cloneNode(true) as HTMLElement;\n preview.style.width = `${elementRect.width}px`;\n preview.style.height = `${elementRect.height}px`;\n this._setTransform(preview, elementRect.left, elementRect.top);\n }\n\n extendStyles(preview.style, {\n position: 'fixed',\n top: '0',\n left: '0',\n zIndex: '1000'\n });\n\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._dir ? this._dir.value : 'ltr');\n\n return preview;\n }\n\n /** Creates an element that will be shown instead of the current element while dragging. */\n private _createPlaceholderElement(): HTMLElement {\n let placeholder: HTMLElement;\n\n if (this._placeholderTemplate) {\n this._placeholderRef = this._viewContainerRef.createEmbeddedView(\n this._placeholderTemplate.templateRef,\n this._placeholderTemplate.data\n );\n placeholder = this._placeholderRef.rootNodes[0];\n } else {\n placeholder = this._rootElement.cloneNode(true) as HTMLElement;\n }\n\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n private _getPointerPositionInElement(referenceElement: HTMLElement,\n event: MouseEvent | TouchEvent): Point {\n const elementRect = this._rootElement.getBoundingClientRect();\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = this._isTouchEvent(event) ? event.targetTouches[0] : event;\n const x = point.pageX - referenceRect.left - this._scrollPosition.left;\n const y = point.pageY - referenceRect.top - this._scrollPosition.top;\n\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n }\n\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n private _animatePreviewToPlaceholder(): Promise<void> {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n\n const placeholderRect = this._placeholder.getBoundingClientRect();\n\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n\n // Move the preview to the placeholder position.\n this._setTransform(this._preview, placeholderRect.left, placeholderRect.top);\n\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n\n if (duration === 0) {\n return Promise.resolve();\n }\n\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = ((event: TransitionEvent) => {\n if (!event || (event.target === this._preview && event.propertyName === 'transform')) {\n this._preview.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n }) as EventListenerOrEventListenerObject;\n\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler as Function, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n\n /**\n * Sets the `transform` style on an element.\n * @param element Element on which to set the transform.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\n private _setTransform(element: HTMLElement, x: number, y: number) {\n element.style.transform = `translate3d(${x}px, ${y}px, 0)`;\n }\n\n /**\n * Helper to remove an element from the DOM and to do all the necessary null checks.\n * @param element Element to be removed.\n */\n private _removeElement(element: HTMLElement | null) {\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n\n /** Determines the point of the page that was touched by the user. */\n private _getPointerPositionOnPage(event: MouseEvent | TouchEvent): Point {\n const point = this._isTouchEvent(event) ? event.touches[0] : event;\n\n return {\n x: point.pageX - this._scrollPosition.left,\n y: point.pageY - this._scrollPosition.top\n };\n }\n\n /** Gets the pointer position on the page, accounting for any position constraints. */\n private _getConstrainedPointerPosition(event: MouseEvent | TouchEvent): Point {\n const point = this._getPointerPositionOnPage(event);\n const dropContainerLock = this.dropContainer ? this.dropContainer.lockAxis : null;\n\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n point.y = this._pickupPositionOnPage.y;\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n point.x = this._pickupPositionOnPage.x;\n }\n\n return point;\n }\n\n /** Determines whether an event is a touch event. */\n private _isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n return event.type.startsWith('touch');\n }\n\n /** Destroys the preview element and its ViewRef. */\n private _destroyPreview() {\n if (this._preview) {\n this._removeElement(this._preview);\n }\n\n if (this._previewRef) {\n this._previewRef.destroy();\n }\n\n this._preview = this._previewRef = null!;\n }\n\n /** Destroys the placeholder element and its ViewRef. */\n private _destroyPlaceholder() {\n if (this._placeholder) {\n this._removeElement(this._placeholder);\n }\n\n if (this._placeholderRef) {\n this._placeholderRef.destroy();\n }\n\n this._placeholder = this._placeholderRef = null!;\n }\n\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n private _updatePointerDirectionDelta(pointerPositionOnPage: Point) {\n const {x, y} = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n\n return delta;\n }\n\n /** Gets the root draggable element, based on the `rootElementSelector`. */\n private _getRootElement(): HTMLElement {\n if (this.rootElementSelector) {\n const selector = this.rootElementSelector;\n let currentElement = this.element.nativeElement.parentElement as HTMLElement | null;\n\n while (currentElement) {\n // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.\n if (currentElement.matches ? currentElement.matches(selector) :\n (currentElement as any).msMatchesSelector(selector)) {\n return currentElement;\n }\n\n currentElement = currentElement.parentElement;\n }\n }\n\n return this.element.nativeElement;\n }\n\n /** Unsubscribes from the global subscriptions. */\n private _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n }\n}\n\n/** Point on the page or within an element. */\ninterface Point {\n x: number;\n y: number;\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/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value: string): number {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nexport function getTransformTransitionDurationInMs(element: HTMLElement): number {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n}\n\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle: CSSStyleDeclaration, name: string): string[] {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\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 {InjectionToken, QueryList, ElementRef} from '@angular/core';\nimport {CdkDrag} from './drag';\n\n\nexport interface CdkDropContainer<T = any> {\n /** DOM node that corresponds to the drop container. */\n element: ElementRef<HTMLElement>;\n\n /** Arbitrary data to attach to all events emitted by this container. */\n data: T;\n\n /** Unique ID for the drop zone. */\n id: string;\n\n /** Direction in which the list is oriented. */\n orientation: 'horizontal' | 'vertical';\n\n /** Locks the position of the draggable elements inside the container along the specified axis. */\n lockAxis: 'x' | 'y';\n\n /** Starts dragging an item. */\n start(): void;\n\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousContainer Container from which the item got dragged in.\n */\n drop(item: CdkDrag, currentIndex: number, previousContainer?: CdkDropContainer): void;\n\n /**\n * Emits an event to indicate that the user moved an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n */\n enter(item: CdkDrag, pointerX: number, pointerY: number): void;\n\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item: CdkDrag): void;\n\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item: CdkDrag): number;\n _sortItem(item: CdkDrag, pointerX: number, pointerY: number, delta: {x: number, y: number}): void;\n _draggables: QueryList<CdkDrag>;\n _getSiblingContainerFromPosition(item: CdkDrag, x: number, y: number): CdkDropContainer | null;\n _canReturnItem(item: CdkDrag, x: number, y: number): boolean;\n}\n\n/**\n * Injection token that is used to provide a CdkDrop instance to CdkDrag.\n * Used for avoiding circular imports.\n */\nexport const CDK_DROP_CONTAINER = new InjectionToken<CdkDropContainer>('CDK_DROP_CONTAINER');\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 {Directive, TemplateRef, Input} from '@angular/core';\n\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\n@Directive({\n selector: 'ng-template[cdkDragPreview]'\n})\nexport class CdkDragPreview<T = any> {\n /** Context data to be added to the preview template instance. */\n @Input() data: T;\n constructor(public templateRef: TemplateRef<T>) {}\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 {Directive, TemplateRef, Input} from '@angular/core';\n\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\n@Directive({\n selector: 'ng-template[cdkDragPlaceholder]'\n})\nexport class CdkDragPlaceholder<T = any> {\n /** Context data to be added to the placeholder template instance. */\n @Input() data: T;\n constructor(public templateRef: TemplateRef<T>) {}\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 {Directive, ElementRef} from '@angular/core';\nimport {toggleNativeDragInteractions} from './drag-styling';\n\n/** Handle that can be used to drag and CdkDrag instance. */\n@Directive({\n selector: '[cdkDragHandle]',\n host: {\n 'class': 'cdk-drag-handle'\n }\n})\nexport class CdkDragHandle {\n constructor(public element: ElementRef<HTMLElement>) {\n toggleNativeDragInteractions(element.nativeElement, false);\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 {Injectable, NgZone, OnDestroy, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {supportsPassiveEventListeners} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs';\nimport {toggleNativeDragInteractions} from './drag-styling';\n\n/** Event options that can be used to bind an active event. */\nconst activeEventOptions = supportsPassiveEventListeners() ? {passive: false} : false;\n\n/** Handler for a pointer event callback. */\ntype PointerEventHandler = (event: TouchEvent | MouseEvent) => void;\n\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDrop directly, in order to\n// avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\n@Injectable({providedIn: 'root'})\nexport class DragDropRegistry<I, C extends {id: string}> implements OnDestroy {\n private _document: Document;\n\n /** Registered drop container instances. */\n private _dropInstances = new Set<C>();\n\n /** Registered drag item instances. */\n private _dragInstances = new Set<I>();\n\n /** Drag item instances that are currently being dragged. */\n private _activeDragInstances = new Set<I>();\n\n /** Keeps track of the event listeners that we've bound to the `document`. */\n private _globalListeners = new Map<'touchmove' | 'mousemove' | 'touchend' | 'mouseup', {\n handler: PointerEventHandler,\n options?: any\n }>();\n\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n readonly pointerMove: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n readonly pointerUp: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n constructor(\n private _ngZone: NgZone,\n @Inject(DOCUMENT) _document: any) {\n this._document = _document;\n }\n\n /** Adds a drop container to the registry. */\n registerDropContainer(drop: C) {\n if (!this._dropInstances.has(drop)) {\n if (this.getDropContainer(drop.id)) {\n throw Error(`Drop instance with id \"${drop.id}\" has already been registered.`);\n }\n\n this._dropInstances.add(drop);\n }\n }\n\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag: I) {\n this._dragInstances.add(drag);\n\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active, because\n // newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._preventScrollListener,\n activeEventOptions);\n });\n }\n }\n\n /** Removes a drop container from the registry. */\n removeDropContainer(drop: C) {\n this._dropInstances.delete(drop);\n }\n\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag: I) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._preventScrollListener,\n activeEventOptions as any);\n }\n }\n\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag: I, event: TouchEvent | MouseEvent) {\n this._activeDragInstances.add(drag);\n\n if (this._activeDragInstances.size === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n const moveEvent = isTouchEvent ? 'touchmove' : 'mousemove';\n const upEvent = isTouchEvent ? 'touchend' : 'mouseup';\n\n // We need to disable the native interactions on the entire body, because\n // the user can start marking text if they drag too far in Safari.\n toggleNativeDragInteractions(this._document.body, false);\n\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners\n .set(moveEvent, {handler: e => this.pointerMove.next(e), options: activeEventOptions})\n .set(upEvent, {handler: e => this.pointerUp.next(e)})\n .forEach((config, name) => {\n this._ngZone.runOutsideAngular(() => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n\n /** Stops dragging a drag item instance. */\n stopDragging(drag: I) {\n this._activeDragInstances.delete(drag);\n\n if (this._activeDragInstances.size === 0) {\n this._clearGlobalListeners();\n toggleNativeDragInteractions(this._document.body, true);\n }\n }\n\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag: I) {\n return this._activeDragInstances.has(drag);\n }\n\n /** Gets a drop container by its id. */\n getDropContainer(id: string): C | undefined {\n return Array.from(this._dropInstances).find(instance => instance.id === id);\n }\n\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n\n /**\n * Listener used to prevent `touchmove` events while the element is being dragged.\n * This gets bound once, ahead of time, because WebKit won't preventDefault on a\n * dynamically-added `touchmove` listener. See https://bugs.webkit.org/show_bug.cgi?id=184250.\n */\n private _preventScrollListener = (event: TouchEvent) => {\n if (this._activeDragInstances.size) {\n event.preventDefault();\n }\n }\n\n /** Clears out the global event listeners from the `document`. */\n private _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n\n this._globalListeners.clear();\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\n\n// Helper type that ignores `readonly` properties. This is used in\n// `extendStyles` to ignore the readonly properties on CSSStyleDeclaration\n// since we won't be touching those anyway.\ntype Writeable<T> = { -readonly [P in keyof T]-?: T[P] };\n\n/**\n * Extended CSSStyleDeclaration that includes a couple of drag-related\n * properties that aren't in the built-in TS typings.\n */\ninterface DragCSSStyleDeclaration extends CSSStyleDeclaration {\n webkitUserDrag: string;\n MozUserSelect: string; // For some reason the Firefox property is in PascalCase.\n}\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet object.\n * @docs-private\n */\nexport function extendStyles(\n dest: Writeable<CSSStyleDeclaration>,\n source: Partial<DragCSSStyleDeclaration>) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n dest[key as keyof CSSStyleDeclaration] = source[key as keyof CSSStyleDeclaration];\n }\n }\n\n return dest;\n}\n\n\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nexport function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) {\n const userSelect = enable ? '' : 'none';\n\n extendStyles(element.style, {\n touchAction: enable ? '' : 'none',\n webkitUserDrag: enable ? '' : 'none',\n webkitTapHighlightColor: enable ? '' : 'transparent',\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AAA,EAAA,CAAU;oBACR,YAAY,EAAE;wBACZ,OAAO;wBACP,OAAO;wBACP,aAAa;wBACb,cAAc;wBACd,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACP,OAAO;wBACP,OAAO;wBACP,aAAa;wBACb,cAAc;wBACd,kBAAkB;qBACnB;iBACF,EAAD,EAAA;;IA9BA,OAAA,cAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"drag-drop.es5.js","sources":["../../../src/cdk/drag-drop/drag-drop-module.ts","../../../src/cdk/drag-drop/drop-list.ts","../../../src/cdk/drag-drop/drag-utils.ts","../../../src/cdk/drag-drop/drag.ts","../../../src/cdk/drag-drop/transition-duration.ts","../../../src/cdk/drag-drop/drop-list-container.ts","../../../src/cdk/drag-drop/drag-preview.ts","../../../src/cdk/drag-drop/drag-placeholder.ts","../../../src/cdk/drag-drop/drag-handle.ts","../../../src/cdk/drag-drop/drag-parent.ts","../../../src/cdk/drag-drop/drag-drop-registry.ts","../../../src/cdk/drag-drop/drag-styling.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 {NgModule} from '@angular/core';\nimport {CdkDropList} from './drop-list';\nimport {CdkDrag} from './drag';\nimport {CdkDragHandle} from './drag-handle';\nimport {CdkDragPreview} from './drag-preview';\nimport {CdkDragPlaceholder} from './drag-placeholder';\n\n@NgModule({\n declarations: [\n CdkDropList,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n exports: [\n CdkDropList,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n})\nexport class DragDropModule {}\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 {coerceArray} from '@angular/cdk/coercion';\nimport {\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Optional,\n Directive,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {CdkDrag} from './drag';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport {CdkDragDrop, CdkDragEnter, CdkDragExit} from './drag-events';\nimport {moveItemInArray} from './drag-utils';\nimport {CDK_DROP_LIST_CONTAINER} from './drop-list-container';\n\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n\n/** Container that wraps a set of draggable items. */\n@Directive({\n selector: '[cdkDropList], cdk-drop-list',\n exportAs: 'cdkDropList',\n providers: [\n {provide: CDK_DROP_LIST_CONTAINER, useExisting: CdkDropList},\n ],\n host: {\n 'class': 'cdk-drop-list',\n '[id]': 'id',\n '[class.cdk-drop-list-dragging]': '_dragging'\n }\n})\nexport class CdkDropList<T = any> implements OnInit, OnDestroy {\n /** Draggable items in the container. */\n @ContentChildren(forwardRef(() => CdkDrag)) _draggables: QueryList<CdkDrag>;\n\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n @Input('cdkDropListConnectedTo')\n connectedTo: (CdkDropList | string)[] | CdkDropList | string = [];\n\n /** Arbitrary data to attach to this container. */\n @Input('cdkDropListData') data: T;\n\n /** Direction in which the list is oriented. */\n @Input('cdkDropListOrientation') orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n @Input() id: string = `cdk-drop-list-${_uniqueIdCounter++}`;\n\n /** Locks the position of the draggable elements inside the container along the specified axis. */\n @Input('cdkDropListLockAxis') lockAxis: 'x' | 'y';\n\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n @Input('cdkDropListEnterPredicate')\n enterPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean = () => true\n\n /** Emits when the user drops an item inside the container. */\n @Output('cdkDropListDropped')\n dropped: EventEmitter<CdkDragDrop<T, any>> = new EventEmitter<CdkDragDrop<T, any>>();\n\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n @Output('cdkDropListEntered')\n entered: EventEmitter<CdkDragEnter<T>> = new EventEmitter<CdkDragEnter<T>>();\n\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n @Output('cdkDropListExited')\n exited: EventEmitter<CdkDragExit<T>> = new EventEmitter<CdkDragExit<T>>();\n\n constructor(\n public element: ElementRef<HTMLElement>,\n private _dragDropRegistry: DragDropRegistry<CdkDrag, CdkDropList<T>>,\n @Optional() private _dir?: Directionality) {}\n\n ngOnInit() {\n this._dragDropRegistry.registerDropContainer(this);\n }\n\n ngOnDestroy() {\n this._dragDropRegistry.removeDropContainer(this);\n }\n\n /** Whether an item in the container is being dragged. */\n _dragging = false;\n\n /** Cache of the dimensions of all the items and the sibling containers. */\n private _positionCache = {\n items: [] as {drag: CdkDrag, clientRect: ClientRect, offset: number}[],\n siblings: [] as {drop: CdkDropList, clientRect: ClientRect}[],\n self: {} as ClientRect\n };\n\n /**\n * Draggable items that are currently active inside the container. Includes the items\n * from `_draggables`, as well as any items that have been dragged in, but haven't\n * been dropped yet.\n */\n private _activeDraggables: CdkDrag[];\n\n /**\n * Keeps track of the item that was last swapped with the dragged item, as\n * well as what direction the pointer was moving in when the swap occured.\n */\n private _previousSwap = {drag: null as CdkDrag | null, delta: 0};\n\n /** Starts dragging an item. */\n start(): void {\n this._dragging = true;\n this._activeDraggables = this._draggables.toArray();\n this._cachePositions();\n }\n\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousContainer Container from which the item got dragged in.\n */\n drop(item: CdkDrag, currentIndex: number, previousContainer: CdkDropList): void {\n this._reset();\n this.dropped.emit({\n item,\n currentIndex,\n previousIndex: previousContainer.getItemIndex(item),\n container: this,\n // TODO(crisbeto): reconsider whether to make this null if the containers are the same.\n previousContainer\n });\n }\n\n /**\n * Emits an event to indicate that the user moved an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n */\n enter(item: CdkDrag, pointerX: number, pointerY: number): void {\n this.entered.emit({item, container: this});\n this.start();\n\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);\n const currentIndex = this._activeDraggables.indexOf(item);\n const newPositionReference = this._activeDraggables[newIndex];\n const placeholder = item.getPlaceholderElement();\n\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n this._activeDraggables.splice(currentIndex, 1);\n }\n\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement!.insertBefore(placeholder, element);\n this._activeDraggables.splice(newIndex, 0, item);\n } else {\n this.element.nativeElement.appendChild(placeholder);\n this._activeDraggables.push(item);\n }\n\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n\n // Note that the positions were already cached when we called `start` above,\n // but we need to refresh them since the amount of items has changed.\n this._cachePositions();\n }\n\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item: CdkDrag): void {\n this._reset();\n this.exited.emit({item, container: this});\n }\n\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item: CdkDrag): number {\n if (!this._dragging) {\n return this._draggables.toArray().indexOf(item);\n }\n\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this._dir && this._dir.value === 'rtl' ?\n this._positionCache.items.slice().reverse() : this._positionCache.items;\n\n return findIndex(items, currentItem => currentItem.drag === item);\n }\n\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDeta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item: CdkDrag, pointerX: number, pointerY: number,\n pointerDelta: {x: number, y: number}): void {\n // Don't sort the item if it's out of range.\n if (!this._isPointerNearDropContainer(pointerX, pointerY)) {\n return;\n }\n\n const siblings = this._positionCache.items;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n\n if (newIndex === -1 && siblings.length > 0) {\n return;\n }\n\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = findIndex(siblings, currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n\n // How many pixels the item's placeholder should be offset.\n const itemOffset = isHorizontal ? newPosition.left - currentPosition.left :\n newPosition.top - currentPosition.top;\n\n // How many pixels all the other items should be offset.\n const siblingOffset = isHorizontal ? currentPosition.width * delta :\n currentPosition.height * delta;\n\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem ? item.getPlaceholderElement() :\n sibling.drag.getRootElement();\n\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n elementToOffset.style.transform = `translate3d(${sibling.offset}px, 0, 0)`;\n this._adjustClientRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = `translate3d(0, ${sibling.offset}px, 0)`;\n this._adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n }\n\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item: CdkDrag, x: number, y: number): CdkDropList | null {\n const result = this._positionCache.siblings\n .find(sibling => isInsideClientRect(sibling.clientRect, x, y));\n\n return result && result.drop.enterPredicate(item, result.drop) ? result.drop : null;\n }\n\n /**\n * Checks whether an item that started in this container can be returned to it,\n * after it was moved out into another container.\n * @param item Item that is being checked.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReturnItem(item: CdkDrag, x: number, y: number): boolean {\n return isInsideClientRect(this._positionCache.self, x, y) && this.enterPredicate(item, this);\n }\n\n /** Refreshes the position cache of the items and sibling containers. */\n private _cachePositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._positionCache.items = this._activeDraggables\n .map(drag => {\n const elementToMeasure = this._dragDropRegistry.isDragging(drag) ?\n // If the element is being dragged, we have to measure the\n // placeholder, because the element is hidden.\n drag.getPlaceholderElement() :\n drag.getRootElement();\n const clientRect = elementToMeasure.getBoundingClientRect();\n\n return {\n drag,\n offset: 0,\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n clientRect: {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height\n }\n };\n })\n .sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left :\n a.clientRect.top - b.clientRect.top;\n });\n\n this._positionCache.siblings = coerceArray(this.connectedTo)\n .map(drop => typeof drop === 'string' ? this._dragDropRegistry.getDropContainer(drop)! : drop)\n .filter(drop => drop && drop !== this)\n .map(drop => ({drop, clientRect: drop.element.nativeElement.getBoundingClientRect()}));\n\n this._positionCache.self = this.element.nativeElement.getBoundingClientRect();\n }\n\n /** Resets the container to its initial state. */\n private _reset() {\n this._dragging = false;\n\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => item.getRootElement().style.transform = '');\n this._activeDraggables = [];\n this._positionCache.items = [];\n this._positionCache.siblings = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n }\n\n /**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\n private _adjustClientRect(clientRect: ClientRect, top: number, left: number) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n }\n\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n private _getItemIndexFromPointerPosition(item: CdkDrag, pointerX: number, pointerY: number,\n delta?: {x: number, y: number}) {\n\n const isHorizontal = this.orientation === 'horizontal';\n\n return findIndex(this._positionCache.items, ({drag, clientRect}, _, array) => {\n if (drag === item) {\n // If there's only one item left in the container, it must be\n // the dragged item itself so we use it as a reference.\n return array.length < 2;\n }\n\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n\n // If the user is still hovering over the same item as last time, and they didn't change\n // the direction in which they're dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag && direction === this._previousSwap.delta) {\n return false;\n }\n }\n\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX <= Math.floor(clientRect.right) :\n pointerY >= Math.floor(clientRect.top) && pointerY <= Math.floor(clientRect.bottom);\n });\n }\n\n /**\n * Checks whether the pointer coordinates are close to the drop container.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\n private _isPointerNearDropContainer(pointerX: number, pointerY: number): boolean {\n const {top, right, bottom, left, width, height} = this._positionCache.self;\n const xThreshold = width * DROP_PROXIMITY_THRESHOLD;\n const yThreshold = height * DROP_PROXIMITY_THRESHOLD;\n\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold &&\n pointerX > left - xThreshold && pointerX < right + xThreshold;\n }\n}\n\n\n/**\n * Finds the index of an item that matches a predicate function. Used as an equivalent\n * of `Array.prototype.find` which isn't part of the standard Google typings.\n * @param array Array in which to look for matches.\n * @param predicate Function used to determine whether an item is a match.\n */\nfunction findIndex<T>(array: T[],\n predicate: (value: T, index: number, obj: T[]) => boolean): number {\n\n for (let i = 0; i < array.length; i++) {\n if (predicate(array[i], i, array)) {\n return i;\n }\n }\n\n return -1;\n}\n\n\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect: ClientRect, x: number, y: number) {\n const {top, bottom, left, right} = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\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 * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n\n if (from === to) {\n return;\n }\n\n const target = array[from];\n const delta = to < from ? -1 : 1;\n\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n\n array[to] = target;\n}\n\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number): void {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nexport function copyArrayItem<T = any>(currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number): void {\n const to = clamp(targetIndex, targetArray.length);\n\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n}\n\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value: number, max: number): number {\n return Math.max(0, Math.min(max, 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\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n SkipSelf,\n ViewContainerRef,\n} from '@angular/core';\nimport {supportsPassiveEventListeners} from '@angular/cdk/platform';\nimport {Observable, Subject, Subscription, Observer} from 'rxjs';\nimport {take} from 'rxjs/operators';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport {\n CdkDragDrop,\n CdkDragEnd,\n CdkDragEnter,\n CdkDragExit,\n CdkDragMove,\n CdkDragStart,\n} from './drag-events';\nimport {CdkDragHandle} from './drag-handle';\nimport {CdkDragPlaceholder} from './drag-placeholder';\nimport {CdkDragPreview} from './drag-preview';\nimport {CDK_DROP_LIST_CONTAINER, CdkDropListContainer} from './drop-list-container';\nimport {getTransformTransitionDurationInMs} from './transition-duration';\nimport {extendStyles, toggleNativeDragInteractions} from './drag-styling';\nimport {CDK_DRAG_PARENT} from './drag-parent';\n\n\n// TODO(crisbeto): add auto-scrolling functionality.\n// TODO(crisbeto): add an API for moving a draggable up/down the\n// list programmatically. Useful for keyboard controls.\n\n/** Object that can be used to configure the behavior of CdkDrag. */\nexport interface CdkDragConfig {\n /**\n * Minimum amount of pixels that the user should\n * drag, before the CDK initiates a drag sequence.\n */\n dragStartThreshold: number;\n\n /**\n * Amount the pixels the user should drag before the CDK\n * considers them to have changed the drag direction.\n */\n pointerDirectionChangeThreshold: number;\n}\n\n/** Injection token that can be used to configure the behavior of `CdkDrag`. */\nexport const CDK_DRAG_CONFIG = new InjectionToken<CdkDragConfig>('CDK_DRAG_CONFIG', {\n providedIn: 'root',\n factory: CDK_DRAG_CONFIG_FACTORY\n});\n\n/** @docs-private */\nexport function CDK_DRAG_CONFIG_FACTORY(): CdkDragConfig {\n return {dragStartThreshold: 5, pointerDirectionChangeThreshold: 5};\n}\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = supportsPassiveEventListeners() ?\n {passive: true} as EventListenerOptions : false;\n\n/** Element that can be moved inside a CdkDropList container. */\n@Directive({\n selector: '[cdkDrag]',\n exportAs: 'cdkDrag',\n host: {\n 'class': 'cdk-drag',\n '[class.cdk-drag-dragging]': '_hasStartedDragging && _isDragging()',\n },\n providers: [{\n provide: CDK_DRAG_PARENT,\n useExisting: CdkDrag\n }]\n})\nexport class CdkDrag<T = any> implements AfterViewInit, OnDestroy {\n private _document: Document;\n\n /** Element displayed next to the user's pointer while the element is dragged. */\n private _preview: HTMLElement;\n\n /** Reference to the view of the preview element. */\n private _previewRef: EmbeddedViewRef<any> | null;\n\n /** Reference to the view of the placeholder element. */\n private _placeholderRef: EmbeddedViewRef<any> | null;\n\n /** Element that is rendered instead of the draggable item while it is being sorted. */\n private _placeholder: HTMLElement;\n\n /** Coordinates within the element at which the user picked up the element. */\n private _pickupPositionInElement: Point;\n\n /** Coordinates on the page at which the user picked up the element. */\n private _pickupPositionOnPage: Point;\n\n /**\n * Reference to the element that comes after the draggable in the DOM, at the time\n * it was picked up. Used for restoring its initial position when it's dropped.\n */\n private _nextSibling: Node | null;\n\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n private _passiveTransform: Point = {x: 0, y: 0};\n\n /** CSS `transform` that is applied to the element while it's being dragged. */\n private _activeTransform: Point = {x: 0, y: 0};\n\n /** Inline `transform` value that the element had before the first dragging sequence. */\n private _initialTransform?: string;\n\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n _hasStartedDragging: boolean;\n\n /** Whether the element has moved since the user started dragging it. */\n private _hasMoved: boolean;\n\n /** Drop container in which the CdkDrag resided when dragging began. */\n private _initialContainer: CdkDropListContainer;\n\n /** Cached scroll position on the page when the element was picked up. */\n private _scrollPosition: {top: number, left: number};\n\n /** Emits when the item is being moved. */\n private _moveEvents = new Subject<CdkDragMove<T>>();\n\n /**\n * Amount of subscriptions to the move event. Used to avoid\n * hitting the zone if the consumer didn't subscribe to it.\n */\n private _moveEventSubscriptions = 0;\n\n /** Keeps track of the direction in which the user is dragging along each axis. */\n private _pointerDirectionDelta: {x: -1 | 0 | 1, y: -1 | 0 | 1};\n\n /** Pointer position at which the last change in the delta occurred. */\n private _pointerPositionAtLastDirectionChange: Point;\n\n /** Root element that will be dragged by the user. */\n private _rootElement: HTMLElement;\n\n /** Subscription to pointer movement events. */\n private _pointerMoveSubscription = Subscription.EMPTY;\n\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n private _pointerUpSubscription = Subscription.EMPTY;\n\n /** Elements that can be used to drag the draggable item. */\n @ContentChildren(CdkDragHandle, {descendants: true}) _handles: QueryList<CdkDragHandle>;\n\n /** Element that will be used as a template to create the draggable item's preview. */\n @ContentChild(CdkDragPreview) _previewTemplate: CdkDragPreview;\n\n /** Template for placeholder element rendered to show where a draggable would be dropped. */\n @ContentChild(CdkDragPlaceholder) _placeholderTemplate: CdkDragPlaceholder;\n\n /** Arbitrary data to attach to this drag instance. */\n @Input('cdkDragData') data: T;\n\n /** Locks the position of the dragged element along the specified axis. */\n @Input('cdkDragLockAxis') lockAxis: 'x' | 'y';\n\n /**\n * Selector that will be used to determine the root draggable element, starting from\n * the `cdkDrag` element and going up the DOM. Passing an alternate root element is useful\n * when trying to enable dragging on an element that you might not have access to.\n */\n @Input('cdkDragRootElement') rootElementSelector: string;\n\n /** Emits when the user starts dragging the item. */\n @Output('cdkDragStarted') started: EventEmitter<CdkDragStart> = new EventEmitter<CdkDragStart>();\n\n /** Emits when the user stops dragging an item in the container. */\n @Output('cdkDragEnded') ended: EventEmitter<CdkDragEnd> = new EventEmitter<CdkDragEnd>();\n\n /** Emits when the user has moved the item into a new container. */\n @Output('cdkDragEntered') entered: EventEmitter<CdkDragEnter<any>> =\n new EventEmitter<CdkDragEnter<any>>();\n\n /** Emits when the user removes the item its container by dragging it into another container. */\n @Output('cdkDragExited') exited: EventEmitter<CdkDragExit<any>> =\n new EventEmitter<CdkDragExit<any>>();\n\n /** Emits when the user drops the item inside a container. */\n @Output('cdkDragDropped') dropped: EventEmitter<CdkDragDrop<any>> =\n new EventEmitter<CdkDragDrop<any>>();\n\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n @Output('cdkDragMoved') moved: Observable<CdkDragMove<T>> =\n Observable.create((observer: Observer<CdkDragMove<T>>) => {\n const subscription = this._moveEvents.subscribe(observer);\n this._moveEventSubscriptions++;\n\n return () => {\n subscription.unsubscribe();\n this._moveEventSubscriptions--;\n };\n });\n\n constructor(\n /** Element that the draggable is attached to. */\n public element: ElementRef<HTMLElement>,\n /** Droppable container that the draggable is a part of. */\n @Inject(CDK_DROP_LIST_CONTAINER) @Optional() @SkipSelf()\n public dropContainer: CdkDropListContainer,\n @Inject(DOCUMENT) document: any,\n private _ngZone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n private _viewportRuler: ViewportRuler,\n private _dragDropRegistry: DragDropRegistry<CdkDrag<T>, CdkDropListContainer>,\n @Inject(CDK_DRAG_CONFIG) private _config: CdkDragConfig,\n @Optional() private _dir: Directionality) {\n this._document = document;\n _dragDropRegistry.registerDragItem(this);\n }\n\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement(): HTMLElement {\n return this._placeholder;\n }\n\n /** Returns the root draggable element. */\n getRootElement(): HTMLElement {\n return this._rootElement;\n }\n\n ngAfterViewInit() {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n const rootElement = this._rootElement = this._getRootElement();\n rootElement.addEventListener('mousedown', this._pointerDown, passiveEventListenerOptions);\n rootElement.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n toggleNativeDragInteractions(rootElement , false);\n });\n }\n\n ngOnDestroy() {\n this._rootElement.removeEventListener('mousedown', this._pointerDown,\n passiveEventListenerOptions);\n this._rootElement.removeEventListener('touchstart', this._pointerDown,\n passiveEventListenerOptions);\n this._destroyPreview();\n this._destroyPlaceholder();\n\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this._isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._removeElement(this._rootElement);\n }\n\n this._nextSibling = null;\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this._moveEvents.complete();\n }\n\n /** Checks whether the element is currently being dragged. */\n _isDragging() {\n return this._dragDropRegistry.isDragging(this);\n }\n\n /** Handler for the `mousedown`/`touchstart` events. */\n _pointerDown = (event: MouseEvent | TouchEvent) => {\n // Skip handles inside descendant `CdkDrag` instances.\n const handles = this._handles.filter(handle => handle._parentDrag === this);\n\n // Delegate the event based on whether it started from a handle or the element itself.\n if (handles.length) {\n const targetHandle = handles.find(handle => {\n const element = handle.element.nativeElement;\n const target = event.target;\n return !!target && (target === element || element.contains(target as HTMLElement));\n });\n\n if (targetHandle) {\n this._initializeDragSequence(targetHandle.element.nativeElement, event);\n }\n } else {\n this._initializeDragSequence(this._rootElement, event);\n }\n }\n\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n private _initializeDragSequence(referenceElement: HTMLElement, event: MouseEvent | TouchEvent) {\n const isDragging = this._isDragging();\n\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || (!this._isTouchEvent(event) && event.button !== 0)) {\n return;\n }\n\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n if (this._initialTransform == null) {\n this._initialTransform = this._rootElement.style.transform || '';\n }\n\n this._hasStartedDragging = this._hasMoved = false;\n this._initialContainer = this.dropContainer;\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n // If we have a custom preview template, the element won't be visible anyway so we avoid the\n // extra `getBoundingClientRect` calls and just move the preview next to the cursor.\n this._pickupPositionInElement = this._previewTemplate ? {x: 0, y: 0} :\n this._getPointerPositionInElement(referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = {x: 0, y: 0};\n this._pointerPositionAtLastDirectionChange = {x: pointerPosition.x, y: pointerPosition.y};\n this._dragDropRegistry.startDragging(this, event);\n }\n\n /** Starts the dragging sequence. */\n private _startDragSequence() {\n // Emit the event on the item before the one on the container.\n this.started.emit({source: this});\n\n if (this.dropContainer) {\n const element = this._rootElement;\n\n // Grab the `nextSibling` before the preview and placeholder\n // have been created so we don't get the preview by accident.\n this._nextSibling = element.nextSibling;\n\n const preview = this._preview = this._createPreviewElement();\n const placeholder = this._placeholder = this._createPlaceholderElement();\n\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n element.style.display = 'none';\n this._document.body.appendChild(element.parentNode!.replaceChild(placeholder, element));\n this._document.body.appendChild(preview);\n this.dropContainer.start();\n }\n }\n\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n private _pointerMove = (event: MouseEvent | TouchEvent) => {\n const pointerPosition = this._getConstrainedPointerPosition(event);\n\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferrable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (distanceX + distanceY >= this._config.dragStartThreshold) {\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence());\n }\n\n return;\n }\n\n this._hasMoved = true;\n event.preventDefault();\n this._updatePointerDirectionDelta(pointerPosition);\n\n if (this.dropContainer) {\n this._updateActiveDropContainer(pointerPosition);\n } else {\n const activeTransform = this._activeTransform;\n activeTransform.x =\n pointerPosition.x - this._pickupPositionOnPage.x + this._passiveTransform.x;\n activeTransform.y =\n pointerPosition.y - this._pickupPositionOnPage.y + this._passiveTransform.y;\n const transform = getTransform(activeTransform.x, activeTransform.y);\n\n // Preserve the previous `transform` value, if there was one.\n this._rootElement.style.transform = this._initialTransform ?\n this._initialTransform + ' ' + transform : transform;\n }\n\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEventSubscriptions > 0) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition,\n event,\n delta: this._pointerDirectionDelta\n });\n });\n }\n }\n\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n private _pointerUp = () => {\n if (!this._isDragging()) {\n return;\n }\n\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n\n if (!this._hasStartedDragging) {\n return;\n }\n\n if (!this.dropContainer) {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => this.ended.emit({source: this}));\n return;\n }\n\n this._animatePreviewToPlaceholder().then(() => this._cleanupDragArtifacts());\n }\n\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n private _cleanupDragArtifacts() {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n this._rootElement.style.display = '';\n\n if (this._nextSibling) {\n this._nextSibling.parentNode!.insertBefore(this._rootElement, this._nextSibling);\n } else {\n this._initialContainer.element.nativeElement.appendChild(this._rootElement);\n }\n\n this._destroyPreview();\n this._destroyPlaceholder();\n\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const currentIndex = this.dropContainer.getItemIndex(this);\n\n this.ended.emit({source: this});\n this.dropped.emit({\n item: this,\n currentIndex,\n previousIndex: this._initialContainer.getItemIndex(this),\n container: this.dropContainer,\n previousContainer: this._initialContainer\n });\n this.dropContainer.drop(this, currentIndex, this._initialContainer);\n this.dropContainer = this._initialContainer;\n });\n }\n\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n private _updateActiveDropContainer({x, y}: Point) {\n // Drop container that draggable has been moved into.\n let newContainer = this.dropContainer._getSiblingContainerFromPosition(this, x, y);\n\n // If we couldn't find a new container to move the item into, and the item has left it's\n // initial container, check whether the it's allowed to return into its original container.\n // This handles the case where two containers are connected one way and the user tries to\n // undo dragging an item into a new container.\n if (!newContainer && this.dropContainer !== this._initialContainer &&\n this._initialContainer._canReturnItem(this, x, y)) {\n newContainer = this._initialContainer;\n }\n\n if (newContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.emit({item: this, container: this.dropContainer});\n this.dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this.entered.emit({item: this, container: newContainer!});\n this.dropContainer = newContainer!;\n this.dropContainer.enter(this, x, y);\n });\n }\n\n this.dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n this._preview.style.transform =\n getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n private _createPreviewElement(): HTMLElement {\n let preview: HTMLElement;\n\n if (this._previewTemplate) {\n const viewRef = this._viewContainerRef.createEmbeddedView(this._previewTemplate.templateRef,\n this._previewTemplate.data);\n\n preview = viewRef.rootNodes[0];\n this._previewRef = viewRef;\n preview.style.transform =\n getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n } else {\n const element = this._rootElement;\n const elementRect = element.getBoundingClientRect();\n\n preview = element.cloneNode(true) as HTMLElement;\n preview.style.width = `${elementRect.width}px`;\n preview.style.height = `${elementRect.height}px`;\n preview.style.transform = getTransform(elementRect.left, elementRect.top);\n }\n\n extendStyles(preview.style, {\n position: 'fixed',\n top: '0',\n left: '0',\n zIndex: '1000'\n });\n\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._dir ? this._dir.value : 'ltr');\n\n return preview;\n }\n\n /** Creates an element that will be shown instead of the current element while dragging. */\n private _createPlaceholderElement(): HTMLElement {\n let placeholder: HTMLElement;\n\n if (this._placeholderTemplate) {\n this._placeholderRef = this._viewContainerRef.createEmbeddedView(\n this._placeholderTemplate.templateRef,\n this._placeholderTemplate.data\n );\n placeholder = this._placeholderRef.rootNodes[0];\n } else {\n placeholder = this._rootElement.cloneNode(true) as HTMLElement;\n }\n\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n private _getPointerPositionInElement(referenceElement: HTMLElement,\n event: MouseEvent | TouchEvent): Point {\n const elementRect = this._rootElement.getBoundingClientRect();\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = this._isTouchEvent(event) ? event.targetTouches[0] : event;\n const x = point.pageX - referenceRect.left - this._scrollPosition.left;\n const y = point.pageY - referenceRect.top - this._scrollPosition.top;\n\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n }\n\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n private _animatePreviewToPlaceholder(): Promise<void> {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n\n const placeholderRect = this._placeholder.getBoundingClientRect();\n\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n\n // Move the preview to the placeholder position.\n this._preview.style.transform = getTransform(placeholderRect.left, placeholderRect.top);\n\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n\n if (duration === 0) {\n return Promise.resolve();\n }\n\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = ((event: TransitionEvent) => {\n if (!event || (event.target === this._preview && event.propertyName === 'transform')) {\n this._preview.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n }) as EventListenerOrEventListenerObject;\n\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler as Function, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n\n /**\n * Helper to remove an element from the DOM and to do all the necessary null checks.\n * @param element Element to be removed.\n */\n private _removeElement(element: HTMLElement | null) {\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n\n /** Determines the point of the page that was touched by the user. */\n private _getPointerPositionOnPage(event: MouseEvent | TouchEvent): Point {\n const point = this._isTouchEvent(event) ? event.touches[0] : event;\n\n return {\n x: point.pageX - this._scrollPosition.left,\n y: point.pageY - this._scrollPosition.top\n };\n }\n\n /** Gets the pointer position on the page, accounting for any position constraints. */\n private _getConstrainedPointerPosition(event: MouseEvent | TouchEvent): Point {\n const point = this._getPointerPositionOnPage(event);\n const dropContainerLock = this.dropContainer ? this.dropContainer.lockAxis : null;\n\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n point.y = this._pickupPositionOnPage.y;\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n point.x = this._pickupPositionOnPage.x;\n }\n\n return point;\n }\n\n /** Determines whether an event is a touch event. */\n private _isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n return event.type.startsWith('touch');\n }\n\n /** Destroys the preview element and its ViewRef. */\n private _destroyPreview() {\n if (this._preview) {\n this._removeElement(this._preview);\n }\n\n if (this._previewRef) {\n this._previewRef.destroy();\n }\n\n this._preview = this._previewRef = null!;\n }\n\n /** Destroys the placeholder element and its ViewRef. */\n private _destroyPlaceholder() {\n if (this._placeholder) {\n this._removeElement(this._placeholder);\n }\n\n if (this._placeholderRef) {\n this._placeholderRef.destroy();\n }\n\n this._placeholder = this._placeholderRef = null!;\n }\n\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n private _updatePointerDirectionDelta(pointerPositionOnPage: Point) {\n const {x, y} = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n\n return delta;\n }\n\n /** Gets the root draggable element, based on the `rootElementSelector`. */\n private _getRootElement(): HTMLElement {\n if (this.rootElementSelector) {\n const selector = this.rootElementSelector;\n let currentElement = this.element.nativeElement.parentElement as HTMLElement | null;\n\n while (currentElement) {\n // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.\n if (currentElement.matches ? currentElement.matches(selector) :\n (currentElement as any).msMatchesSelector(selector)) {\n return currentElement;\n }\n\n currentElement = currentElement.parentElement;\n }\n }\n\n return this.element.nativeElement;\n }\n\n /** Unsubscribes from the global subscriptions. */\n private _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n }\n}\n\n/** Point on the page or within an element. */\ninterface Point {\n x: number;\n y: number;\n}\n\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x: number, y: number): string {\n return `translate3d(${x}px, ${y}px, 0)`;\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/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value: string): number {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nexport function getTransformTransitionDurationInMs(element: HTMLElement): number {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n}\n\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle: CSSStyleDeclaration, name: string): string[] {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\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 {InjectionToken, QueryList, ElementRef} from '@angular/core';\nimport {CdkDrag} from './drag';\n\n\nexport interface CdkDropListContainer<T = any> {\n /** DOM node that corresponds to the drop container. */\n element: ElementRef<HTMLElement>;\n\n /** Arbitrary data to attach to all events emitted by this container. */\n data: T;\n\n /** Unique ID for the drop zone. */\n id: string;\n\n /** Direction in which the list is oriented. */\n orientation: 'horizontal' | 'vertical';\n\n /** Locks the position of the draggable elements inside the container along the specified axis. */\n lockAxis: 'x' | 'y';\n\n /** Starts dragging an item. */\n start(): void;\n\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousContainer Container from which the item got dragged in.\n */\n drop(item: CdkDrag, currentIndex: number, previousContainer?: CdkDropListContainer): void;\n\n /**\n * Emits an event to indicate that the user moved an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n */\n enter(item: CdkDrag, pointerX: number, pointerY: number): void;\n\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item: CdkDrag): void;\n\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item: CdkDrag): number;\n _sortItem(item: CdkDrag, pointerX: number, pointerY: number, delta: {x: number, y: number}): void;\n _draggables: QueryList<CdkDrag>;\n _getSiblingContainerFromPosition(item: CdkDrag, x: number, y: number):\n CdkDropListContainer | null;\n _canReturnItem(item: CdkDrag, x: number, y: number): boolean;\n}\n\n/**\n * Injection token that is used to provide a CdkDropList instance to CdkDrag.\n * Used for avoiding circular imports.\n */\nexport const CDK_DROP_LIST_CONTAINER =\n new InjectionToken<CdkDropListContainer>('CDK_DROP_LIST_CONTAINER');\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 {Directive, TemplateRef, Input} from '@angular/core';\n\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\n@Directive({\n selector: 'ng-template[cdkDragPreview]'\n})\nexport class CdkDragPreview<T = any> {\n /** Context data to be added to the preview template instance. */\n @Input() data: T;\n constructor(public templateRef: TemplateRef<T>) {}\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 {Directive, TemplateRef, Input} from '@angular/core';\n\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\n@Directive({\n selector: 'ng-template[cdkDragPlaceholder]'\n})\nexport class CdkDragPlaceholder<T = any> {\n /** Context data to be added to the placeholder template instance. */\n @Input() data: T;\n constructor(public templateRef: TemplateRef<T>) {}\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 {Directive, ElementRef, Inject, Optional} from '@angular/core';\nimport {CDK_DRAG_PARENT} from './drag-parent';\nimport {toggleNativeDragInteractions} from './drag-styling';\n\n/** Handle that can be used to drag and CdkDrag instance. */\n@Directive({\n selector: '[cdkDragHandle]',\n host: {\n 'class': 'cdk-drag-handle'\n }\n})\nexport class CdkDragHandle {\n /** Closest parent draggable instance. */\n _parentDrag: {} | undefined;\n\n constructor(\n public element: ElementRef<HTMLElement>,\n @Inject(CDK_DRAG_PARENT) @Optional() parentDrag?: any) {\n\n this._parentDrag = parentDrag;\n toggleNativeDragInteractions(element.nativeElement, false);\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 {InjectionToken} from '@angular/core';\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nexport const CDK_DRAG_PARENT = new InjectionToken<{}>('CDK_DRAG_PARENT');\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 {Injectable, NgZone, OnDestroy, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs';\nimport {toggleNativeDragInteractions} from './drag-styling';\n\n/** Event options that can be used to bind an active event. */\nconst activeEventOptions = normalizePassiveListenerOptions({passive: false});\n\n/** Handler for a pointer event callback. */\ntype PointerEventHandler = (event: TouchEvent | MouseEvent) => void;\n\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\n@Injectable({providedIn: 'root'})\nexport class DragDropRegistry<I, C extends {id: string}> implements OnDestroy {\n private _document: Document;\n\n /** Registered drop container instances. */\n private _dropInstances = new Set<C>();\n\n /** Registered drag item instances. */\n private _dragInstances = new Set<I>();\n\n /** Drag item instances that are currently being dragged. */\n private _activeDragInstances = new Set<I>();\n\n /** Keeps track of the event listeners that we've bound to the `document`. */\n private _globalListeners = new Map<'touchmove' | 'mousemove' | 'touchend' | 'mouseup', {\n handler: PointerEventHandler,\n options?: any\n }>();\n\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n readonly pointerMove: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n readonly pointerUp: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n constructor(\n private _ngZone: NgZone,\n @Inject(DOCUMENT) _document: any) {\n this._document = _document;\n }\n\n /** Adds a drop container to the registry. */\n registerDropContainer(drop: C) {\n if (!this._dropInstances.has(drop)) {\n if (this.getDropContainer(drop.id)) {\n throw Error(`Drop instance with id \"${drop.id}\" has already been registered.`);\n }\n\n this._dropInstances.add(drop);\n }\n }\n\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag: I) {\n this._dragInstances.add(drag);\n\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active, because\n // newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._preventScrollListener,\n activeEventOptions);\n });\n }\n }\n\n /** Removes a drop container from the registry. */\n removeDropContainer(drop: C) {\n this._dropInstances.delete(drop);\n }\n\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag: I) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._preventScrollListener,\n activeEventOptions as any);\n }\n }\n\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag: I, event: TouchEvent | MouseEvent) {\n this._activeDragInstances.add(drag);\n\n if (this._activeDragInstances.size === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n const moveEvent = isTouchEvent ? 'touchmove' : 'mousemove';\n const upEvent = isTouchEvent ? 'touchend' : 'mouseup';\n\n // We need to disable the native interactions on the entire body, because\n // the user can start marking text if they drag too far in Safari.\n toggleNativeDragInteractions(this._document.body, false);\n\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners\n .set(moveEvent, {handler: e => this.pointerMove.next(e), options: activeEventOptions})\n .set(upEvent, {handler: e => this.pointerUp.next(e)})\n .forEach((config, name) => {\n this._ngZone.runOutsideAngular(() => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n\n /** Stops dragging a drag item instance. */\n stopDragging(drag: I) {\n this._activeDragInstances.delete(drag);\n\n if (this._activeDragInstances.size === 0) {\n this._clearGlobalListeners();\n toggleNativeDragInteractions(this._document.body, true);\n }\n }\n\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag: I) {\n return this._activeDragInstances.has(drag);\n }\n\n /** Gets a drop container by its id. */\n getDropContainer(id: string): C | undefined {\n return Array.from(this._dropInstances).find(instance => instance.id === id);\n }\n\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n\n /**\n * Listener used to prevent `touchmove` events while the element is being dragged.\n * This gets bound once, ahead of time, because WebKit won't preventDefault on a\n * dynamically-added `touchmove` listener. See https://bugs.webkit.org/show_bug.cgi?id=184250.\n */\n private _preventScrollListener = (event: TouchEvent) => {\n if (this._activeDragInstances.size) {\n event.preventDefault();\n }\n }\n\n /** Clears out the global event listeners from the `document`. */\n private _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n\n this._globalListeners.clear();\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\n\n// Helper type that ignores `readonly` properties. This is used in\n// `extendStyles` to ignore the readonly properties on CSSStyleDeclaration\n// since we won't be touching those anyway.\ntype Writeable<T> = { -readonly [P in keyof T]-?: T[P] };\n\n/**\n * Extended CSSStyleDeclaration that includes a couple of drag-related\n * properties that aren't in the built-in TS typings.\n */\ninterface DragCSSStyleDeclaration extends CSSStyleDeclaration {\n webkitUserDrag: string;\n MozUserSelect: string; // For some reason the Firefox property is in PascalCase.\n}\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet object.\n * @docs-private\n */\nexport function extendStyles(\n dest: Writeable<CSSStyleDeclaration>,\n source: Partial<DragCSSStyleDeclaration>) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n dest[key as keyof CSSStyleDeclaration] = source[key as keyof CSSStyleDeclaration];\n }\n }\n\n return dest;\n}\n\n\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nexport function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) {\n const userSelect = enable ? '' : 'none';\n\n extendStyles(element.style, {\n touchAction: enable ? '' : 'none',\n webkitUserDrag: enable ? '' : 'none',\n webkitTapHighlightColor: enable ? '' : 'transparent',\n userSelect: userSelect,\n msUserSelect: userSelect,\n webkitUserSelect: userSelect,\n MozUserSelect: userSelect\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AW2BA,AAAA,SAAgB,YAAY,CACxB,IAAoC,EACpC,MAAwC,EAF5C;IAGE,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;QACtB,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,mBAAC,GAAgC,EAAC,GAAG,MAAM,mBAAC,GAAgC,EAAC,CAAC;SACnF;KACF;IAED,OAAO,IAAI,CAAC;CACb;;;;;;;;AASD,AAAA,SAAgB,4BAA4B,CAAC,OAAoB,EAAE,MAAe,EAAlF;;IACE,IAAM,UAAU,GAAG,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC;IAExC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE;QAC1B,WAAW,EAAE,M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