@angular/cdk 8.0.1 → 8.1.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 (327) hide show
  1. package/a11y/typings/aria-describer/aria-describer.d.ts +4 -3
  2. package/a11y/typings/index.metadata.json +1 -1
  3. package/bundles/cdk-a11y.umd.js +42 -10
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +1 -1
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-drag-drop.umd.js +515 -82
  8. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  9. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  10. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  11. package/bundles/cdk-layout.umd.js +5 -1
  12. package/bundles/cdk-layout.umd.js.map +1 -1
  13. package/bundles/cdk-layout.umd.min.js +1 -1
  14. package/bundles/cdk-layout.umd.min.js.map +1 -1
  15. package/bundles/cdk-overlay.umd.js +50 -31
  16. package/bundles/cdk-overlay.umd.js.map +1 -1
  17. package/bundles/cdk-overlay.umd.min.js +2 -2
  18. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  19. package/bundles/cdk-tree.umd.js +14 -9
  20. package/bundles/cdk-tree.umd.js.map +1 -1
  21. package/bundles/cdk-tree.umd.min.js +1 -1
  22. package/bundles/cdk-tree.umd.min.js.map +1 -1
  23. package/bundles/cdk.umd.js +1 -1
  24. package/bundles/cdk.umd.js.map +1 -1
  25. package/bundles/cdk.umd.min.js +1 -1
  26. package/bundles/cdk.umd.min.js.map +1 -1
  27. package/drag-drop/typings/directives/drag.d.ts +1 -1
  28. package/drag-drop/typings/directives/drop-list.d.ts +2 -0
  29. package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
  30. package/drag-drop/typings/drag-ref.d.ts +10 -1
  31. package/drag-drop/typings/drop-list-ref.d.ts +59 -3
  32. package/drag-drop/typings/index.metadata.json +1 -1
  33. package/esm2015/a11y.js +35 -10
  34. package/esm2015/a11y.js.map +1 -1
  35. package/esm2015/cdk.js +1 -1
  36. package/esm2015/cdk.js.map +1 -1
  37. package/esm2015/drag-drop.js +450 -80
  38. package/esm2015/drag-drop.js.map +1 -1
  39. package/esm2015/layout.js +7 -3
  40. package/esm2015/layout.js.map +1 -1
  41. package/esm2015/overlay.js +50 -31
  42. package/esm2015/overlay.js.map +1 -1
  43. package/esm2015/tree.js +13 -9
  44. package/esm2015/tree.js.map +1 -1
  45. package/esm5/a11y.es5.js +42 -10
  46. package/esm5/a11y.es5.js.map +1 -1
  47. package/esm5/cdk.es5.js +1 -1
  48. package/esm5/cdk.es5.js.map +1 -1
  49. package/esm5/drag-drop.es5.js +513 -80
  50. package/esm5/drag-drop.es5.js.map +1 -1
  51. package/esm5/layout.es5.js +7 -3
  52. package/esm5/layout.es5.js.map +1 -1
  53. package/esm5/overlay.es5.js +50 -31
  54. package/esm5/overlay.es5.js.map +1 -1
  55. package/esm5/tree.es5.js +14 -9
  56. package/esm5/tree.es5.js.map +1 -1
  57. package/overlay/typings/index.metadata.json +1 -1
  58. package/overlay/typings/overlay-container.d.ts +2 -2
  59. package/overlay/typings/overlay-ref.d.ts +1 -0
  60. package/package.json +4 -4
  61. package/schematics/index.d.ts +1 -0
  62. package/schematics/index.js +1 -0
  63. package/schematics/index.js.map +1 -1
  64. package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  65. package/schematics/ng-update/data/attribute-selectors.js +5 -13
  66. package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
  67. package/schematics/ng-update/data/class-names.d.ts +1 -1
  68. package/schematics/ng-update/data/class-names.js +5 -21
  69. package/schematics/ng-update/data/class-names.js.map +1 -1
  70. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  71. package/schematics/ng-update/data/constructor-checks.js +3 -5
  72. package/schematics/ng-update/data/constructor-checks.js.map +1 -1
  73. package/schematics/ng-update/data/css-selectors.d.ts +1 -1
  74. package/schematics/ng-update/data/css-selectors.js +1 -1
  75. package/schematics/ng-update/data/css-selectors.js.map +1 -1
  76. package/schematics/ng-update/data/element-selectors.d.ts +1 -1
  77. package/schematics/ng-update/data/element-selectors.js +1 -1
  78. package/schematics/ng-update/data/element-selectors.js.map +1 -1
  79. package/schematics/ng-update/data/input-names.d.ts +1 -1
  80. package/schematics/ng-update/data/input-names.js +13 -37
  81. package/schematics/ng-update/data/input-names.js.map +1 -1
  82. package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  83. package/schematics/ng-update/data/method-call-checks.js +6 -15
  84. package/schematics/ng-update/data/method-call-checks.js.map +1 -1
  85. package/schematics/ng-update/data/output-names.d.ts +1 -1
  86. package/schematics/ng-update/data/output-names.js +1 -1
  87. package/schematics/ng-update/data/output-names.js.map +1 -1
  88. package/schematics/ng-update/data/property-names.d.ts +1 -1
  89. package/schematics/ng-update/data/property-names.js +19 -59
  90. package/schematics/ng-update/data/property-names.js.map +1 -1
  91. package/schematics/ng-update/html-parsing/elements.js.map +1 -1
  92. package/schematics/ng-update/index.d.ts +0 -2
  93. package/schematics/ng-update/index.js +13 -24
  94. package/schematics/ng-update/index.js.map +1 -1
  95. package/schematics/ng-update/public-api.d.ts +0 -5
  96. package/schematics/ng-update/public-api.js +0 -5
  97. package/schematics/ng-update/public-api.js.map +1 -1
  98. package/schematics/ng-update/typescript/base-types.js.map +1 -1
  99. package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
  100. package/schematics/ng-update/upgrade-data.d.ts +5 -30
  101. package/schematics/ng-update/upgrade-data.js +4 -34
  102. package/schematics/ng-update/upgrade-data.js.map +1 -1
  103. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  104. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
  105. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
  106. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  107. package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
  108. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
  109. package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  110. package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
  111. package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
  112. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  113. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
  114. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
  115. package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  116. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
  117. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
  118. package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  119. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
  120. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
  121. package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  122. package/schematics/ng-update/upgrade-rules/index.js +49 -29
  123. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  124. package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  125. package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
  126. package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
  127. package/{typings/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.d.ts → schematics/ng-update/upgrade-rules/method-call-arguments-rule.d.ts} +8 -9
  128. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
  129. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
  130. package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  131. package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
  132. package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
  133. package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  134. package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
  135. package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
  136. package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  137. package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
  138. package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
  139. package/schematics/tsconfig.tsbuildinfo +2873 -5006
  140. package/schematics/update-tool/component-resource-collector.d.ts +41 -0
  141. package/schematics/update-tool/component-resource-collector.js +141 -0
  142. package/schematics/update-tool/component-resource-collector.js.map +1 -0
  143. package/schematics/update-tool/index.d.ts +13 -0
  144. package/schematics/update-tool/index.js +117 -0
  145. package/schematics/update-tool/index.js.map +1 -0
  146. package/schematics/update-tool/migration-rule.d.ts +45 -0
  147. package/schematics/update-tool/migration-rule.js +50 -0
  148. package/schematics/update-tool/migration-rule.js.map +1 -0
  149. package/schematics/update-tool/public-api.d.ts +12 -0
  150. package/schematics/update-tool/public-api.js +18 -0
  151. package/schematics/update-tool/public-api.js.map +1 -0
  152. package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  153. package/schematics/{ng-update → update-tool}/target-version.js +3 -3
  154. package/schematics/update-tool/target-version.js.map +1 -0
  155. package/schematics/update-tool/utils/decorators.d.ts +23 -0
  156. package/schematics/update-tool/utils/decorators.js +37 -0
  157. package/schematics/update-tool/utils/decorators.js.map +1 -0
  158. package/schematics/update-tool/utils/functions.d.ts +14 -0
  159. package/schematics/update-tool/utils/functions.js +20 -0
  160. package/schematics/update-tool/utils/functions.js.map +1 -0
  161. package/schematics/update-tool/utils/imports.d.ts +15 -0
  162. package/schematics/update-tool/utils/imports.js +35 -0
  163. package/schematics/update-tool/utils/imports.js.map +1 -0
  164. package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  165. package/schematics/update-tool/utils/line-mappings.js +75 -0
  166. package/schematics/update-tool/utils/line-mappings.js.map +1 -0
  167. package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  168. package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
  169. package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
  170. package/schematics/update-tool/utils/property-name.d.ts +18 -0
  171. package/schematics/update-tool/utils/property-name.js +27 -0
  172. package/schematics/update-tool/utils/property-name.js.map +1 -0
  173. package/schematics/update-tool/version-changes.d.ts +32 -0
  174. package/schematics/update-tool/version-changes.js +41 -0
  175. package/schematics/update-tool/version-changes.js.map +1 -0
  176. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  177. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.js +31 -20
  178. package/schematics/utils/project-tsconfig-paths.js.map +1 -0
  179. package/tree/typings/index.metadata.json +1 -1
  180. package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
  181. package/typings/a11y/index.metadata.json +1 -1
  182. package/typings/drag-drop/directives/drag.d.ts +1 -1
  183. package/typings/drag-drop/directives/drop-list.d.ts +2 -0
  184. package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
  185. package/typings/drag-drop/drag-ref.d.ts +10 -1
  186. package/typings/drag-drop/drop-list-ref.d.ts +59 -3
  187. package/typings/drag-drop/index.metadata.json +1 -1
  188. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
  189. package/typings/esm5/a11y/index.metadata.json +1 -1
  190. package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
  191. package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
  192. package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
  193. package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
  194. package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
  195. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  196. package/typings/esm5/index.metadata.json +1 -1
  197. package/typings/esm5/overlay/index.metadata.json +1 -1
  198. package/typings/esm5/overlay/overlay-container.d.ts +2 -2
  199. package/typings/esm5/overlay/overlay-ref.d.ts +1 -0
  200. package/typings/esm5/tree/index.metadata.json +1 -1
  201. package/typings/index.metadata.json +1 -1
  202. package/typings/overlay/index.metadata.json +1 -1
  203. package/typings/overlay/overlay-container.d.ts +2 -2
  204. package/typings/overlay/overlay-ref.d.ts +1 -0
  205. package/typings/schematics/index.d.ts +1 -0
  206. package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  207. package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
  208. package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  209. package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
  210. package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
  211. package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
  212. package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  213. package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
  214. package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
  215. package/typings/schematics/ng-update/index.d.ts +0 -2
  216. package/typings/schematics/ng-update/public-api.d.ts +0 -5
  217. package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
  218. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  219. package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  220. package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  221. package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  222. package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  223. package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  224. package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  225. package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  226. package/{schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.d.ts → typings/schematics/ng-update/upgrade-rules/method-call-arguments-rule.d.ts} +8 -9
  227. package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  228. package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  229. package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  230. package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
  231. package/typings/schematics/update-tool/index.d.ts +13 -0
  232. package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
  233. package/typings/schematics/update-tool/public-api.d.ts +12 -0
  234. package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  235. package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
  236. package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
  237. package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
  238. package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  239. package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  240. package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
  241. package/typings/schematics/update-tool/version-changes.d.ts +32 -0
  242. package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  243. package/typings/tree/index.metadata.json +1 -1
  244. package/schematics/ng-update/target-version.js.map +0 -1
  245. package/schematics/ng-update/tslint/component-file.d.ts +0 -14
  246. package/schematics/ng-update/tslint/component-file.js +0 -31
  247. package/schematics/ng-update/tslint/component-file.js.map +0 -1
  248. package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  249. package/schematics/ng-update/tslint/component-walker.js +0 -142
  250. package/schematics/ng-update/tslint/component-walker.js.map +0 -1
  251. package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  252. package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
  253. package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
  254. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  255. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
  256. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
  257. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  258. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
  259. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
  260. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  261. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
  262. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
  263. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  264. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
  265. package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
  266. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  267. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
  268. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
  269. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  270. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
  271. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
  272. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  273. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
  274. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
  275. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  276. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
  277. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
  278. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  279. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
  280. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
  281. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  282. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
  283. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
  284. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  285. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
  286. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
  287. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  288. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
  289. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
  290. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  291. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
  292. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
  293. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  294. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
  295. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
  296. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
  297. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  298. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
  299. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
  300. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  301. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
  302. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
  303. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
  304. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
  305. package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
  306. package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -76
  307. package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
  308. package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
  309. package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  310. package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  311. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  312. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  313. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  314. package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  315. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  316. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  317. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  318. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  319. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  320. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  321. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  322. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  323. package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  324. package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  325. package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  326. package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  327. package/typings/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
@@ -7,12 +7,12 @@
7
7
  */
8
8
  import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
9
9
  import { coerceBooleanProperty, coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
10
- import { Subscription, Subject, Observable, merge } from 'rxjs';
10
+ import { Subscription, Subject, interval, animationFrameScheduler, Observable, merge } from 'rxjs';
11
+ import { startWith, takeUntil, take, map, switchMap, tap } from 'rxjs/operators';
11
12
  import { ElementRef, Injectable, NgZone, Inject, InjectionToken, NgModule, ContentChildren, EventEmitter, forwardRef, Input, Output, Optional, Directive, ChangeDetectorRef, SkipSelf, ContentChild, ViewContainerRef, isDevMode, TemplateRef, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
12
13
  import { DOCUMENT } from '@angular/common';
13
14
  import { ViewportRuler } from '@angular/cdk/scrolling';
14
15
  import { Directionality } from '@angular/cdk/bidi';
15
- import { startWith, take, map, takeUntil, switchMap, tap } from 'rxjs/operators';
16
16
 
17
17
  /**
18
18
  * @fileoverview added by tsickle
@@ -182,6 +182,10 @@ class DragRef {
182
182
  * Subscription to the event that is dispatched when the user lifts their pointer.
183
183
  */
184
184
  this._pointerUpSubscription = Subscription.EMPTY;
185
+ /**
186
+ * Subscription to the viewport being scrolled.
187
+ */
188
+ this._scrollSubscription = Subscription.EMPTY;
185
189
  /**
186
190
  * Cached reference to the boundary element.
187
191
  */
@@ -291,7 +295,13 @@ class DragRef {
291
295
  // direction. Note that this is preferrable over doing something like `skip(minimumDistance)`
292
296
  // in the `pointerMove` subscription, because we're not guaranteed to have one move event
293
297
  // per pixel of movement (e.g. if the user moves their pointer quickly).
294
- if (isOverThreshold && (Date.now() >= this._dragStartTime + (this.dragStartDelay || 0))) {
298
+ if (isOverThreshold) {
299
+ /** @type {?} */
300
+ const isDelayElapsed = Date.now() >= this._dragStartTime + (this.dragStartDelay || 0);
301
+ if (!isDelayElapsed) {
302
+ this._endDragSequence(event);
303
+ return;
304
+ }
295
305
  // Prevent other drag sequences from starting while something in the container is still
296
306
  // being dragged. This can happen while we're waiting for the drop animation to finish
297
307
  // and can cause errors, because some elements might still be moving around.
@@ -362,47 +372,7 @@ class DragRef {
362
372
  * @return {?}
363
373
  */
364
374
  (event) => {
365
- // Note that here we use `isDragging` from the service, rather than from `this`.
366
- // The difference is that the one from the service reflects whether a dragging sequence
367
- // has been initiated, whereas the one on `this` includes whether the user has passed
368
- // the minimum dragging threshold.
369
- if (!this._dragDropRegistry.isDragging(this)) {
370
- return;
371
- }
372
- this._removeSubscriptions();
373
- this._dragDropRegistry.stopDragging(this);
374
- if (this._handles) {
375
- this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
376
- }
377
- if (!this._hasStartedDragging) {
378
- return;
379
- }
380
- this.released.next({ source: this });
381
- if (!this._dropContainer) {
382
- // Convert the active transform into a passive one. This means that next time
383
- // the user starts dragging the item, its position will be calculated relatively
384
- // to the new passive transform.
385
- this._passiveTransform.x = this._activeTransform.x;
386
- this._passiveTransform.y = this._activeTransform.y;
387
- this._ngZone.run((/**
388
- * @return {?}
389
- */
390
- () => {
391
- this.ended.next({
392
- source: this,
393
- distance: this._getDragDistance(this._getPointerPositionOnPage(event))
394
- });
395
- }));
396
- this._dragDropRegistry.stopDragging(this);
397
- return;
398
- }
399
- this._animatePreviewToPlaceholder().then((/**
400
- * @return {?}
401
- */
402
- () => {
403
- this._cleanupDragArtifacts(event);
404
- this._dragDropRegistry.stopDragging(this);
405
- }));
375
+ this._endDragSequence(event);
406
376
  });
407
377
  this.withRootElement(element);
408
378
  _dragDropRegistry.registerDragItem(this);
@@ -607,7 +577,9 @@ class DragRef {
607
577
  * @return {?}
608
578
  */
609
579
  getFreeDragPosition() {
610
- return { x: this._passiveTransform.x, y: this._passiveTransform.y };
580
+ /** @type {?} */
581
+ const position = this.isDragging() ? this._activeTransform : this._passiveTransform;
582
+ return { x: position.x, y: position.y };
611
583
  }
612
584
  /**
613
585
  * Sets the current position in pixels the draggable outside of a drop container.
@@ -625,6 +597,17 @@ class DragRef {
625
597
  }
626
598
  return (/** @type {?} */ (this));
627
599
  }
600
+ /**
601
+ * Updates the item's sort order based on the last-known pointer position.
602
+ * @return {?}
603
+ */
604
+ _sortFromLastPointerPosition() {
605
+ /** @type {?} */
606
+ const position = this._pointerPositionAtLastDirectionChange;
607
+ if (position && this._dropContainer) {
608
+ this._updateActiveDropContainer(position);
609
+ }
610
+ }
628
611
  /**
629
612
  * Unsubscribes from the global subscriptions.
630
613
  * @private
@@ -633,6 +616,7 @@ class DragRef {
633
616
  _removeSubscriptions() {
634
617
  this._pointerMoveSubscription.unsubscribe();
635
618
  this._pointerUpSubscription.unsubscribe();
619
+ this._scrollSubscription.unsubscribe();
636
620
  }
637
621
  /**
638
622
  * Destroys the preview element and its ViewRef.
@@ -662,6 +646,58 @@ class DragRef {
662
646
  }
663
647
  this._placeholder = this._placeholderRef = (/** @type {?} */ (null));
664
648
  }
649
+ /**
650
+ * Clears subscriptions and stops the dragging sequence.
651
+ * @private
652
+ * @param {?} event Browser event object that ended the sequence.
653
+ * @return {?}
654
+ */
655
+ _endDragSequence(event) {
656
+ // Note that here we use `isDragging` from the service, rather than from `this`.
657
+ // The difference is that the one from the service reflects whether a dragging sequence
658
+ // has been initiated, whereas the one on `this` includes whether the user has passed
659
+ // the minimum dragging threshold.
660
+ if (!this._dragDropRegistry.isDragging(this)) {
661
+ return;
662
+ }
663
+ this._removeSubscriptions();
664
+ this._dragDropRegistry.stopDragging(this);
665
+ if (this._handles) {
666
+ this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
667
+ }
668
+ if (!this._hasStartedDragging) {
669
+ return;
670
+ }
671
+ this.released.next({ source: this });
672
+ if (this._dropContainer) {
673
+ // Stop scrolling immediately, instead of waiting for the animation to finish.
674
+ this._dropContainer._stopScrolling();
675
+ this._animatePreviewToPlaceholder().then((/**
676
+ * @return {?}
677
+ */
678
+ () => {
679
+ this._cleanupDragArtifacts(event);
680
+ this._dragDropRegistry.stopDragging(this);
681
+ }));
682
+ }
683
+ else {
684
+ // Convert the active transform into a passive one. This means that next time
685
+ // the user starts dragging the item, its position will be calculated relatively
686
+ // to the new passive transform.
687
+ this._passiveTransform.x = this._activeTransform.x;
688
+ this._passiveTransform.y = this._activeTransform.y;
689
+ this._ngZone.run((/**
690
+ * @return {?}
691
+ */
692
+ () => {
693
+ this.ended.next({
694
+ source: this,
695
+ distance: this._getDragDistance(this._getPointerPositionOnPage(event))
696
+ });
697
+ }));
698
+ this._dragDropRegistry.stopDragging(this);
699
+ }
700
+ }
665
701
  /**
666
702
  * Starts the dragging sequence.
667
703
  * @private
@@ -674,6 +710,7 @@ class DragRef {
674
710
  if (isTouchEvent(event)) {
675
711
  this._lastTouchEventTime = Date.now();
676
712
  }
713
+ this._toggleNativeDragInteractions();
677
714
  if (this._dropContainer) {
678
715
  /** @type {?} */
679
716
  const element = this._rootElement;
@@ -737,7 +774,6 @@ class DragRef {
737
774
  this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor;
738
775
  rootElement.style.webkitTapHighlightColor = 'transparent';
739
776
  }
740
- this._toggleNativeDragInteractions();
741
777
  this._hasStartedDragging = this._hasMoved = false;
742
778
  this._initialContainer = (/** @type {?} */ (this._dropContainer));
743
779
  // Avoid multiple subscriptions and memory leaks when multi touch
@@ -745,7 +781,12 @@ class DragRef {
745
781
  this._removeSubscriptions();
746
782
  this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);
747
783
  this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);
748
- this._scrollPosition = this._viewportRuler.getViewportScrollPosition();
784
+ this._scrollSubscription = this._dragDropRegistry.scroll.pipe(startWith(null)).subscribe((/**
785
+ * @return {?}
786
+ */
787
+ () => {
788
+ this._scrollPosition = this._viewportRuler.getViewportScrollPosition();
789
+ }));
749
790
  if (this._boundaryElement) {
750
791
  this._boundaryRect = this._boundaryElement.getBoundingClientRect();
751
792
  }
@@ -848,6 +889,7 @@ class DragRef {
848
889
  });
849
890
  }));
850
891
  }
892
+ (/** @type {?} */ (this._dropContainer))._startScrollingIfNecessary(x, y);
851
893
  (/** @type {?} */ (this._dropContainer))._sortItem(this, x, y, this._pointerDirectionDelta);
852
894
  this._preview.style.transform =
853
895
  getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);
@@ -1024,7 +1066,7 @@ class DragRef {
1024
1066
  /** @type {?} */
1025
1067
  const point = this._getPointerPositionOnPage(event);
1026
1068
  /** @type {?} */
1027
- const constrainedPoint = this.constrainPosition ? this.constrainPosition(point) : point;
1069
+ const constrainedPoint = this.constrainPosition ? this.constrainPosition(point, this) : point;
1028
1070
  /** @type {?} */
1029
1071
  const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;
1030
1072
  if (this.lockAxis === 'x' || dropContainerLock === 'x') {
@@ -1093,7 +1135,7 @@ class DragRef {
1093
1135
  return;
1094
1136
  }
1095
1137
  /** @type {?} */
1096
- const shouldEnable = this.disabled || this._handles.length > 0;
1138
+ const shouldEnable = this._handles.length > 0 || !this.isDragging();
1097
1139
  if (shouldEnable !== this._nativeInteractionsEnabled) {
1098
1140
  this._nativeInteractionsEnabled = shouldEnable;
1099
1141
  toggleNativeDragInteractions(this._rootElement, shouldEnable);
@@ -1214,7 +1256,10 @@ function removeElement(element) {
1214
1256
  * @return {?}
1215
1257
  */
1216
1258
  function isTouchEvent(event) {
1217
- return event.type.startsWith('touch');
1259
+ // This function is called for every pixel that the user has dragged so we need it to be
1260
+ // as fast as possible. Since we only bind mouse events and touch events, we can assume
1261
+ // that if the event's name starts with `t`, it's a touch event.
1262
+ return event.type[0] === 't';
1218
1263
  }
1219
1264
  /**
1220
1265
  * Gets the element into which the drag preview should be inserted.
@@ -1323,6 +1368,18 @@ let _uniqueIdCounter = 0;
1323
1368
  * @type {?}
1324
1369
  */
1325
1370
  const DROP_PROXIMITY_THRESHOLD = 0.05;
1371
+ /**
1372
+ * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the
1373
+ * viewport. The value comes from trying it out manually until it feels right.
1374
+ * @type {?}
1375
+ */
1376
+ const SCROLL_PROXIMITY_THRESHOLD = 0.05;
1377
+ /**
1378
+ * Number of pixels to scroll for each frame when auto-scrolling an element.
1379
+ * The value comes from trying it out manually until it feels right.
1380
+ * @type {?}
1381
+ */
1382
+ const AUTO_SCROLL_STEP = 2;
1326
1383
  /**
1327
1384
  * Reference to a drop list. Used to manipulate or dispose of the container.
1328
1385
  * \@docs-private
@@ -1333,9 +1390,13 @@ class DropListRef {
1333
1390
  * @param {?} element
1334
1391
  * @param {?} _dragDropRegistry
1335
1392
  * @param {?} _document
1393
+ * @param {?=} _ngZone
1394
+ * @param {?=} _viewportRuler
1336
1395
  */
1337
- constructor(element, _dragDropRegistry, _document) {
1396
+ constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {
1338
1397
  this._dragDropRegistry = _dragDropRegistry;
1398
+ this._ngZone = _ngZone;
1399
+ this._viewportRuler = _viewportRuler;
1339
1400
  /**
1340
1401
  * Unique ID for the drop list.
1341
1402
  * @deprecated No longer being used. To be removed.
@@ -1350,6 +1411,11 @@ class DropListRef {
1350
1411
  * Whether sorting items within the list is disabled.
1351
1412
  */
1352
1413
  this.sortingDisabled = true;
1414
+ /**
1415
+ * Whether auto-scrolling the view when the user
1416
+ * moves their pointer close to the edges is disabled.
1417
+ */
1418
+ this.autoScrollDisabled = false;
1353
1419
  /**
1354
1420
  * Function that is used to determine whether an item
1355
1421
  * is allowed to be moved into a drop container.
@@ -1387,6 +1453,14 @@ class DropListRef {
1387
1453
  * Cache of the dimensions of all the items inside the container.
1388
1454
  */
1389
1455
  this._itemPositions = [];
1456
+ /**
1457
+ * Keeps track of the container's scroll position.
1458
+ */
1459
+ this._scrollPosition = { top: 0, left: 0 };
1460
+ /**
1461
+ * Keeps track of the scroll position of the viewport.
1462
+ */
1463
+ this._viewportScrollPosition = { top: 0, left: 0 };
1390
1464
  /**
1391
1465
  * Keeps track of the item that was last swapped with the dragged item, as
1392
1466
  * well as what direction the pointer was moving in when the swap occured.
@@ -1408,6 +1482,66 @@ class DropListRef {
1408
1482
  * Layout direction of the drop list.
1409
1483
  */
1410
1484
  this._direction = 'ltr';
1485
+ /**
1486
+ * Subscription to the window being scrolled.
1487
+ */
1488
+ this._viewportScrollSubscription = Subscription.EMPTY;
1489
+ /**
1490
+ * Vertical direction in which the list is currently scrolling.
1491
+ */
1492
+ this._verticalScrollDirection = 0 /* NONE */;
1493
+ /**
1494
+ * Horizontal direction in which the list is currently scrolling.
1495
+ */
1496
+ this._horizontalScrollDirection = 0 /* NONE */;
1497
+ /**
1498
+ * Used to signal to the current auto-scroll sequence when to stop.
1499
+ */
1500
+ this._stopScrollTimers = new Subject();
1501
+ /**
1502
+ * Handles the container being scrolled. Has to be an arrow function to preserve the context.
1503
+ */
1504
+ this._handleScroll = (/**
1505
+ * @return {?}
1506
+ */
1507
+ () => {
1508
+ if (!this.isDragging()) {
1509
+ return;
1510
+ }
1511
+ /** @type {?} */
1512
+ const element = coerceElement(this.element);
1513
+ this._updateAfterScroll(this._scrollPosition, element.scrollTop, element.scrollLeft);
1514
+ });
1515
+ /**
1516
+ * Starts the interval that'll auto-scroll the element.
1517
+ */
1518
+ this._startScrollInterval = (/**
1519
+ * @return {?}
1520
+ */
1521
+ () => {
1522
+ this._stopScrolling();
1523
+ interval(0, animationFrameScheduler)
1524
+ .pipe(takeUntil(this._stopScrollTimers))
1525
+ .subscribe((/**
1526
+ * @return {?}
1527
+ */
1528
+ () => {
1529
+ /** @type {?} */
1530
+ const node = this._scrollNode;
1531
+ if (this._verticalScrollDirection === 1 /* UP */) {
1532
+ incrementVerticalScroll(node, -AUTO_SCROLL_STEP);
1533
+ }
1534
+ else if (this._verticalScrollDirection === 2 /* DOWN */) {
1535
+ incrementVerticalScroll(node, AUTO_SCROLL_STEP);
1536
+ }
1537
+ if (this._horizontalScrollDirection === 1 /* LEFT */) {
1538
+ incrementHorizontalScroll(node, -AUTO_SCROLL_STEP);
1539
+ }
1540
+ else if (this._horizontalScrollDirection === 2 /* RIGHT */) {
1541
+ incrementHorizontalScroll(node, AUTO_SCROLL_STEP);
1542
+ }
1543
+ }));
1544
+ });
1411
1545
  _dragDropRegistry.registerDropContainer(this);
1412
1546
  this._document = _document;
1413
1547
  this.element = element instanceof ElementRef ? element.nativeElement : element;
@@ -1417,12 +1551,16 @@ class DropListRef {
1417
1551
  * @return {?}
1418
1552
  */
1419
1553
  dispose() {
1554
+ this._stopScrolling();
1555
+ this._stopScrollTimers.complete();
1556
+ this._removeListeners();
1420
1557
  this.beforeStarted.complete();
1421
1558
  this.entered.complete();
1422
1559
  this.exited.complete();
1423
1560
  this.dropped.complete();
1424
1561
  this.sorted.complete();
1425
1562
  this._activeSiblings.clear();
1563
+ this._scrollNode = (/** @type {?} */ (null));
1426
1564
  this._dragDropRegistry.removeDropContainer(this);
1427
1565
  }
1428
1566
  /**
@@ -1437,6 +1575,8 @@ class DropListRef {
1437
1575
  * @return {?}
1438
1576
  */
1439
1577
  start() {
1578
+ /** @type {?} */
1579
+ const element = coerceElement(this.element);
1440
1580
  this.beforeStarted.next();
1441
1581
  this._isDragging = true;
1442
1582
  this._cacheItems();
@@ -1445,6 +1585,31 @@ class DropListRef {
1445
1585
  * @return {?}
1446
1586
  */
1447
1587
  sibling => sibling._startReceiving(this)));
1588
+ this._removeListeners();
1589
+ // @breaking-change 9.0.0 Remove check for _ngZone once it's marked as a required param.
1590
+ if (this._ngZone) {
1591
+ this._ngZone.runOutsideAngular((/**
1592
+ * @return {?}
1593
+ */
1594
+ () => element.addEventListener('scroll', this._handleScroll)));
1595
+ }
1596
+ else {
1597
+ element.addEventListener('scroll', this._handleScroll);
1598
+ }
1599
+ // @breaking-change 9.0.0 Remove check for _viewportRuler once it's marked as a required param.
1600
+ if (this._viewportRuler) {
1601
+ this._viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();
1602
+ this._viewportScrollSubscription = this._dragDropRegistry.scroll.subscribe((/**
1603
+ * @return {?}
1604
+ */
1605
+ () => {
1606
+ if (this.isDragging()) {
1607
+ /** @type {?} */
1608
+ const newPosition = (/** @type {?} */ (this._viewportRuler)).getViewportScrollPosition();
1609
+ this._updateAfterScroll(this._viewportScrollPosition, newPosition.top, newPosition.left, this._clientRect);
1610
+ }
1611
+ }));
1612
+ }
1448
1613
  }
1449
1614
  /**
1450
1615
  * Emits an event to indicate that the user moved an item into the container.
@@ -1707,13 +1872,83 @@ class DropListRef {
1707
1872
  }
1708
1873
  }));
1709
1874
  }
1875
+ /**
1876
+ * Checks whether the user's pointer is close to the edges of either the
1877
+ * viewport or the drop list and starts the auto-scroll sequence.
1878
+ * @param {?} pointerX User's pointer position along the x axis.
1879
+ * @param {?} pointerY User's pointer position along the y axis.
1880
+ * @return {?}
1881
+ */
1882
+ _startScrollingIfNecessary(pointerX, pointerY) {
1883
+ if (this.autoScrollDisabled) {
1884
+ return;
1885
+ }
1886
+ /** @type {?} */
1887
+ let scrollNode;
1888
+ /** @type {?} */
1889
+ let verticalScrollDirection = 0 /* NONE */;
1890
+ /** @type {?} */
1891
+ let horizontalScrollDirection = 0 /* NONE */;
1892
+ // @breaking-change 9.0.0 Remove null check for _viewportRuler once it's a required parameter.
1893
+ // Check whether we're in range to scroll the viewport.
1894
+ if (this._viewportRuler) {
1895
+ const { width, height } = this._viewportRuler.getViewportSize();
1896
+ /** @type {?} */
1897
+ const clientRect = { width, height, top: 0, right: width, bottom: height, left: 0 };
1898
+ verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);
1899
+ horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);
1900
+ scrollNode = window;
1901
+ }
1902
+ // If we couldn't find a scroll direction based on the
1903
+ // window, try with the container, if the pointer is close by.
1904
+ if (!verticalScrollDirection && !horizontalScrollDirection &&
1905
+ this._isPointerNearDropContainer(pointerX, pointerY)) {
1906
+ verticalScrollDirection = getVerticalScrollDirection(this._clientRect, pointerY);
1907
+ horizontalScrollDirection = getHorizontalScrollDirection(this._clientRect, pointerX);
1908
+ scrollNode = coerceElement(this.element);
1909
+ }
1910
+ // TODO(crisbeto): we also need to account for whether the view or element are scrollable in
1911
+ // the first place. With the current approach we'll still try to scroll them, but it just
1912
+ // won't do anything. The only case where this is relevant is that if we have a scrollable
1913
+ // list close to the viewport edge where the viewport isn't scrollable. In this case the
1914
+ // we'll be trying to scroll the viewport rather than the list.
1915
+ if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||
1916
+ horizontalScrollDirection !== this._horizontalScrollDirection ||
1917
+ scrollNode !== this._scrollNode)) {
1918
+ this._verticalScrollDirection = verticalScrollDirection;
1919
+ this._horizontalScrollDirection = horizontalScrollDirection;
1920
+ this._scrollNode = scrollNode;
1921
+ if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {
1922
+ // @breaking-change 9.0.0 Remove null check for `_ngZone` once it is made required.
1923
+ if (this._ngZone) {
1924
+ this._ngZone.runOutsideAngular(this._startScrollInterval);
1925
+ }
1926
+ else {
1927
+ this._startScrollInterval();
1928
+ }
1929
+ }
1930
+ else {
1931
+ this._stopScrolling();
1932
+ }
1933
+ }
1934
+ }
1935
+ /**
1936
+ * Stops any currently-running auto-scroll sequences.
1937
+ * @return {?}
1938
+ */
1939
+ _stopScrolling() {
1940
+ this._stopScrollTimers.next();
1941
+ }
1710
1942
  /**
1711
1943
  * Caches the position of the drop list.
1712
1944
  * @private
1713
1945
  * @return {?}
1714
1946
  */
1715
1947
  _cacheOwnPosition() {
1716
- this._clientRect = coerceElement(this.element).getBoundingClientRect();
1948
+ /** @type {?} */
1949
+ const element = coerceElement(this.element);
1950
+ this._clientRect = getMutableClientRect(element);
1951
+ this._scrollPosition = { top: element.scrollTop, left: element.scrollLeft };
1717
1952
  }
1718
1953
  /**
1719
1954
  * Refreshes the position cache of the items and sibling containers.
@@ -1734,24 +1969,7 @@ class DropListRef {
1734
1969
  // placeholder, because the element is hidden.
1735
1970
  drag.getPlaceholderElement() :
1736
1971
  drag.getRootElement();
1737
- /** @type {?} */
1738
- const clientRect = elementToMeasure.getBoundingClientRect();
1739
- return {
1740
- drag,
1741
- offset: 0,
1742
- // We need to clone the `clientRect` here, because all the values on it are readonly
1743
- // and we need to be able to update them. Also we can't use a spread here, because
1744
- // the values on a `ClientRect` aren't own properties. See:
1745
- // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
1746
- clientRect: {
1747
- top: clientRect.top,
1748
- right: clientRect.right,
1749
- bottom: clientRect.bottom,
1750
- left: clientRect.left,
1751
- width: clientRect.width,
1752
- height: clientRect.height
1753
- }
1754
- };
1972
+ return { drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };
1755
1973
  })).sort((/**
1756
1974
  * @param {?} a
1757
1975
  * @param {?} b
@@ -1784,6 +2002,8 @@ class DropListRef {
1784
2002
  this._itemPositions = [];
1785
2003
  this._previousSwap.drag = null;
1786
2004
  this._previousSwap.delta = 0;
2005
+ this._stopScrolling();
2006
+ this._removeListeners();
1787
2007
  }
1788
2008
  /**
1789
2009
  * Gets the offset in pixels by which the items that aren't being dragged should be moved.
@@ -1907,6 +2127,60 @@ class DropListRef {
1907
2127
  this._cacheItemPositions();
1908
2128
  this._cacheOwnPosition();
1909
2129
  }
2130
+ /**
2131
+ * Updates the internal state of the container after a scroll event has happened.
2132
+ * @private
2133
+ * @param {?} scrollPosition Object that is keeping track of the scroll position.
2134
+ * @param {?} newTop New top scroll position.
2135
+ * @param {?} newLeft New left scroll position.
2136
+ * @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
2137
+ * ones of the drag items. Useful when the viewport has been scrolled and we also need to update
2138
+ * the `ClientRect` of the list.
2139
+ * @return {?}
2140
+ */
2141
+ _updateAfterScroll(scrollPosition, newTop, newLeft, extraClientRect) {
2142
+ /** @type {?} */
2143
+ const topDifference = scrollPosition.top - newTop;
2144
+ /** @type {?} */
2145
+ const leftDifference = scrollPosition.left - newLeft;
2146
+ if (extraClientRect) {
2147
+ adjustClientRect(extraClientRect, topDifference, leftDifference);
2148
+ }
2149
+ // Since we know the amount that the user has scrolled we can shift all of the client rectangles
2150
+ // ourselves. This is cheaper than re-measuring everything and we can avoid inconsistent
2151
+ // behavior where we might be measuring the element before its position has changed.
2152
+ this._itemPositions.forEach((/**
2153
+ * @param {?} __0
2154
+ * @return {?}
2155
+ */
2156
+ ({ clientRect }) => {
2157
+ adjustClientRect(clientRect, topDifference, leftDifference);
2158
+ }));
2159
+ // We need two loops for this, because we want all of the cached
2160
+ // positions to be up-to-date before we re-sort the item.
2161
+ this._itemPositions.forEach((/**
2162
+ * @param {?} __0
2163
+ * @return {?}
2164
+ */
2165
+ ({ drag }) => {
2166
+ if (this._dragDropRegistry.isDragging(drag)) {
2167
+ // We need to re-sort the item manually, because the pointer move
2168
+ // events won't be dispatched while the user is scrolling.
2169
+ drag._sortFromLastPointerPosition();
2170
+ }
2171
+ }));
2172
+ scrollPosition.top = newTop;
2173
+ scrollPosition.left = newLeft;
2174
+ }
2175
+ /**
2176
+ * Removes the event listeners associated with this drop list.
2177
+ * @private
2178
+ * @return {?}
2179
+ */
2180
+ _removeListeners() {
2181
+ coerceElement(this.element).removeEventListener('scroll', this._handleScroll);
2182
+ this._viewportScrollSubscription.unsubscribe();
2183
+ }
1910
2184
  /**
1911
2185
  * Checks whether the user's pointer is positioned over the container.
1912
2186
  * @param {?} x Pointer position along the X axis.
@@ -1996,7 +2270,7 @@ function adjustClientRect(clientRect, top, left) {
1996
2270
  }
1997
2271
  /**
1998
2272
  * Finds the index of an item that matches a predicate function. Used as an equivalent
1999
- * of `Array.prototype.find` which isn't part of the standard Google typings.
2273
+ * of `Array.prototype.findIndex` which isn't part of the standard Google typings.
2000
2274
  * @template T
2001
2275
  * @param {?} array Array in which to look for matches.
2002
2276
  * @param {?} predicate Function used to determine whether an item is a match.
@@ -2021,6 +2295,93 @@ function isInsideClientRect(clientRect, x, y) {
2021
2295
  const { top, bottom, left, right } = clientRect;
2022
2296
  return y >= top && y <= bottom && x >= left && x <= right;
2023
2297
  }
2298
+ /**
2299
+ * Gets a mutable version of an element's bounding `ClientRect`.
2300
+ * @param {?} element
2301
+ * @return {?}
2302
+ */
2303
+ function getMutableClientRect(element) {
2304
+ /** @type {?} */
2305
+ const clientRect = element.getBoundingClientRect();
2306
+ // We need to clone the `clientRect` here, because all the values on it are readonly
2307
+ // and we need to be able to update them. Also we can't use a spread here, because
2308
+ // the values on a `ClientRect` aren't own properties. See:
2309
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
2310
+ return {
2311
+ top: clientRect.top,
2312
+ right: clientRect.right,
2313
+ bottom: clientRect.bottom,
2314
+ left: clientRect.left,
2315
+ width: clientRect.width,
2316
+ height: clientRect.height
2317
+ };
2318
+ }
2319
+ /**
2320
+ * Increments the vertical scroll position of a node.
2321
+ * @param {?} node Node whose scroll position should change.
2322
+ * @param {?} amount Amount of pixels that the `node` should be scrolled.
2323
+ * @return {?}
2324
+ */
2325
+ function incrementVerticalScroll(node, amount) {
2326
+ if (node === window) {
2327
+ ((/** @type {?} */ (node))).scrollBy(0, amount);
2328
+ }
2329
+ else {
2330
+ // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
2331
+ ((/** @type {?} */ (node))).scrollTop += amount;
2332
+ }
2333
+ }
2334
+ /**
2335
+ * Increments the horizontal scroll position of a node.
2336
+ * @param {?} node Node whose scroll position should change.
2337
+ * @param {?} amount Amount of pixels that the `node` should be scrolled.
2338
+ * @return {?}
2339
+ */
2340
+ function incrementHorizontalScroll(node, amount) {
2341
+ if (node === window) {
2342
+ ((/** @type {?} */ (node))).scrollBy(amount, 0);
2343
+ }
2344
+ else {
2345
+ // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
2346
+ ((/** @type {?} */ (node))).scrollLeft += amount;
2347
+ }
2348
+ }
2349
+ /**
2350
+ * Gets whether the vertical auto-scroll direction of a node.
2351
+ * @param {?} clientRect Dimensions of the node.
2352
+ * @param {?} pointerY Position of the user's pointer along the y axis.
2353
+ * @return {?}
2354
+ */
2355
+ function getVerticalScrollDirection(clientRect, pointerY) {
2356
+ const { top, bottom, height } = clientRect;
2357
+ /** @type {?} */
2358
+ const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;
2359
+ if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {
2360
+ return 1 /* UP */;
2361
+ }
2362
+ else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {
2363
+ return 2 /* DOWN */;
2364
+ }
2365
+ return 0 /* NONE */;
2366
+ }
2367
+ /**
2368
+ * Gets whether the horizontal auto-scroll direction of a node.
2369
+ * @param {?} clientRect Dimensions of the node.
2370
+ * @param {?} pointerX Position of the user's pointer along the x axis.
2371
+ * @return {?}
2372
+ */
2373
+ function getHorizontalScrollDirection(clientRect, pointerX) {
2374
+ const { left, right, width } = clientRect;
2375
+ /** @type {?} */
2376
+ const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;
2377
+ if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {
2378
+ return 1 /* LEFT */;
2379
+ }
2380
+ else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {
2381
+ return 2 /* RIGHT */;
2382
+ }
2383
+ return 0 /* NONE */;
2384
+ }
2024
2385
 
2025
2386
  /**
2026
2387
  * @fileoverview added by tsickle
@@ -2076,6 +2437,10 @@ class DragDropRegistry {
2076
2437
  * while the user is dragging a drag item instance.
2077
2438
  */
2078
2439
  this.pointerUp = new Subject();
2440
+ /**
2441
+ * Emits when the viewport has been scrolled while the user is dragging an item.
2442
+ */
2443
+ this.scroll = new Subject();
2079
2444
  /**
2080
2445
  * Event listener that will prevent the default browser action while the user is dragging.
2081
2446
  * @param event Event whose default action should be prevented.
@@ -2183,6 +2548,13 @@ class DragDropRegistry {
2183
2548
  */
2184
2549
  (e) => this.pointerUp.next((/** @type {?} */ (e)))),
2185
2550
  options: true
2551
+ })
2552
+ .set('scroll', {
2553
+ handler: (/**
2554
+ * @param {?} e
2555
+ * @return {?}
2556
+ */
2557
+ (e) => this.scroll.next(e))
2186
2558
  })
2187
2559
  // Preventing the default action on `mousemove` isn't enough to disable text selection
2188
2560
  // on Safari so we need to prevent the selection event as well. Alternatively this can
@@ -2192,14 +2564,6 @@ class DragDropRegistry {
2192
2564
  handler: this._preventDefaultWhileDragging,
2193
2565
  options: activeCapturingEventOptions
2194
2566
  });
2195
- // TODO(crisbeto): prevent mouse wheel scrolling while
2196
- // dragging until we've set up proper scroll handling.
2197
- if (!isTouchEvent) {
2198
- this._globalListeners.set('wheel', {
2199
- handler: this._preventDefaultWhileDragging,
2200
- options: activeCapturingEventOptions
2201
- });
2202
- }
2203
2567
  this._ngZone.runOutsideAngular((/**
2204
2568
  * @return {?}
2205
2569
  */
@@ -2338,7 +2702,7 @@ class DragDrop {
2338
2702
  * @return {?}
2339
2703
  */
2340
2704
  createDropList(element) {
2341
- return new DropListRef(element, this._dragDropRegistry, this._document);
2705
+ return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
2342
2706
  }
2343
2707
  }
2344
2708
  DragDrop.decorators = [
@@ -3089,6 +3453,10 @@ class CdkDropList {
3089
3453
  * @return {?}
3090
3454
  */
3091
3455
  () => true);
3456
+ /**
3457
+ * Whether to auto-scroll the view when the user moves their pointer close to the edges.
3458
+ */
3459
+ this.autoScrollDisabled = false;
3092
3460
  /**
3093
3461
  * Emits when the user drops an item inside the container.
3094
3462
  */
@@ -3308,6 +3676,7 @@ class CdkDropList {
3308
3676
  ref.disabled = this.disabled;
3309
3677
  ref.lockAxis = this.lockAxis;
3310
3678
  ref.sortingDisabled = this.sortingDisabled;
3679
+ ref.autoScrollDisabled = this.autoScrollDisabled;
3311
3680
  ref
3312
3681
  .connectedTo(siblings.filter((/**
3313
3682
  * @param {?} drop
@@ -3435,6 +3804,7 @@ CdkDropList.propDecorators = {
3435
3804
  disabled: [{ type: Input, args: ['cdkDropListDisabled',] }],
3436
3805
  sortingDisabled: [{ type: Input, args: ['cdkDropListSortingDisabled',] }],
3437
3806
  enterPredicate: [{ type: Input, args: ['cdkDropListEnterPredicate',] }],
3807
+ autoScrollDisabled: [{ type: Input, args: ['cdkDropListAutoScrollDisabled',] }],
3438
3808
  dropped: [{ type: Output, args: ['cdkDropListDropped',] }],
3439
3809
  entered: [{ type: Output, args: ['cdkDropListEntered',] }],
3440
3810
  exited: [{ type: Output, args: ['cdkDropListExited',] }],