@angular/cdk 8.0.2 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) 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 +511 -81
  8. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  9. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  10. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  11. package/bundles/cdk-overlay.umd.js +15 -13
  12. package/bundles/cdk-overlay.umd.js.map +1 -1
  13. package/bundles/cdk-overlay.umd.min.js +2 -2
  14. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  15. package/bundles/cdk-tree.umd.js +8 -6
  16. package/bundles/cdk-tree.umd.js.map +1 -1
  17. package/bundles/cdk-tree.umd.min.js +1 -1
  18. package/bundles/cdk-tree.umd.min.js.map +1 -1
  19. package/bundles/cdk.umd.js +1 -1
  20. package/bundles/cdk.umd.js.map +1 -1
  21. package/bundles/cdk.umd.min.js +1 -1
  22. package/bundles/cdk.umd.min.js.map +1 -1
  23. package/drag-drop/typings/directives/drag.d.ts +1 -1
  24. package/drag-drop/typings/directives/drop-list.d.ts +2 -0
  25. package/drag-drop/typings/drag-drop-registry.d.ts +2 -0
  26. package/drag-drop/typings/drag-ref.d.ts +10 -1
  27. package/drag-drop/typings/drop-list-ref.d.ts +59 -3
  28. package/drag-drop/typings/index.metadata.json +1 -1
  29. package/esm2015/a11y.js +35 -10
  30. package/esm2015/a11y.js.map +1 -1
  31. package/esm2015/cdk.js +1 -1
  32. package/esm2015/cdk.js.map +1 -1
  33. package/esm2015/drag-drop.js +446 -79
  34. package/esm2015/drag-drop.js.map +1 -1
  35. package/esm2015/overlay.js +14 -12
  36. package/esm2015/overlay.js.map +1 -1
  37. package/esm2015/tree.js +7 -6
  38. package/esm2015/tree.js.map +1 -1
  39. package/esm5/a11y.es5.js +42 -10
  40. package/esm5/a11y.es5.js.map +1 -1
  41. package/esm5/cdk.es5.js +1 -1
  42. package/esm5/cdk.es5.js.map +1 -1
  43. package/esm5/drag-drop.es5.js +509 -79
  44. package/esm5/drag-drop.es5.js.map +1 -1
  45. package/esm5/overlay.es5.js +15 -13
  46. package/esm5/overlay.es5.js.map +1 -1
  47. package/esm5/tree.es5.js +8 -6
  48. package/esm5/tree.es5.js.map +1 -1
  49. package/package.json +4 -4
  50. package/schematics/index.d.ts +1 -0
  51. package/schematics/index.js +1 -0
  52. package/schematics/index.js.map +1 -1
  53. package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  54. package/schematics/ng-update/data/attribute-selectors.js +5 -13
  55. package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
  56. package/schematics/ng-update/data/class-names.d.ts +1 -1
  57. package/schematics/ng-update/data/class-names.js +5 -21
  58. package/schematics/ng-update/data/class-names.js.map +1 -1
  59. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  60. package/schematics/ng-update/data/constructor-checks.js +3 -5
  61. package/schematics/ng-update/data/constructor-checks.js.map +1 -1
  62. package/schematics/ng-update/data/css-selectors.d.ts +1 -1
  63. package/schematics/ng-update/data/css-selectors.js +1 -1
  64. package/schematics/ng-update/data/css-selectors.js.map +1 -1
  65. package/schematics/ng-update/data/element-selectors.d.ts +1 -1
  66. package/schematics/ng-update/data/element-selectors.js +1 -1
  67. package/schematics/ng-update/data/element-selectors.js.map +1 -1
  68. package/schematics/ng-update/data/input-names.d.ts +1 -1
  69. package/schematics/ng-update/data/input-names.js +13 -37
  70. package/schematics/ng-update/data/input-names.js.map +1 -1
  71. package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  72. package/schematics/ng-update/data/method-call-checks.js +6 -15
  73. package/schematics/ng-update/data/method-call-checks.js.map +1 -1
  74. package/schematics/ng-update/data/output-names.d.ts +1 -1
  75. package/schematics/ng-update/data/output-names.js +1 -1
  76. package/schematics/ng-update/data/output-names.js.map +1 -1
  77. package/schematics/ng-update/data/property-names.d.ts +1 -1
  78. package/schematics/ng-update/data/property-names.js +19 -59
  79. package/schematics/ng-update/data/property-names.js.map +1 -1
  80. package/schematics/ng-update/html-parsing/elements.js.map +1 -1
  81. package/schematics/ng-update/index.d.ts +0 -2
  82. package/schematics/ng-update/index.js +13 -24
  83. package/schematics/ng-update/index.js.map +1 -1
  84. package/schematics/ng-update/public-api.d.ts +0 -5
  85. package/schematics/ng-update/public-api.js +0 -5
  86. package/schematics/ng-update/public-api.js.map +1 -1
  87. package/schematics/ng-update/typescript/base-types.js.map +1 -1
  88. package/schematics/ng-update/typescript/module-specifiers.js.map +1 -1
  89. package/schematics/ng-update/upgrade-data.d.ts +5 -30
  90. package/schematics/ng-update/upgrade-data.js +4 -34
  91. package/schematics/ng-update/upgrade-data.js.map +1 -1
  92. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  93. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js +66 -0
  94. package/schematics/ng-update/upgrade-rules/attribute-selectors-rule.js.map +1 -0
  95. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  96. package/schematics/ng-update/upgrade-rules/{class-inheritance/classInheritanceCheckRule.js → class-inheritance-rule.js} +24 -20
  97. package/schematics/ng-update/upgrade-rules/class-inheritance-rule.js.map +1 -0
  98. package/{typings/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  99. package/schematics/ng-update/upgrade-rules/{class-names/classNamesIdentifierRule.js → class-names-rule.js} +19 -24
  100. package/schematics/ng-update/upgrade-rules/class-names-rule.js.map +1 -0
  101. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  102. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js +134 -0
  103. package/schematics/ng-update/upgrade-rules/constructor-signature-rule.js.map +1 -0
  104. package/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  105. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js +73 -0
  106. package/schematics/ng-update/upgrade-rules/css-selectors-rule.js.map +1 -0
  107. package/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  108. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js +64 -0
  109. package/schematics/ng-update/upgrade-rules/element-selectors-rule.js.map +1 -0
  110. package/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  111. package/schematics/ng-update/upgrade-rules/index.js +49 -29
  112. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  113. package/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  114. package/schematics/ng-update/upgrade-rules/input-names-rule.js +59 -0
  115. package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -0
  116. 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
  117. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js +60 -0
  118. package/schematics/ng-update/upgrade-rules/method-call-arguments-rule.js.map +1 -0
  119. package/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  120. package/schematics/ng-update/upgrade-rules/misc-template-rule.js +37 -0
  121. package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -0
  122. package/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  123. package/schematics/ng-update/upgrade-rules/output-names-rule.js +46 -0
  124. package/schematics/ng-update/upgrade-rules/output-names-rule.js.map +1 -0
  125. package/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  126. package/schematics/ng-update/upgrade-rules/property-names-rule.js +46 -0
  127. package/schematics/ng-update/upgrade-rules/property-names-rule.js.map +1 -0
  128. package/schematics/tsconfig.tsbuildinfo +2895 -3608
  129. package/schematics/update-tool/component-resource-collector.d.ts +41 -0
  130. package/schematics/update-tool/component-resource-collector.js +141 -0
  131. package/schematics/update-tool/component-resource-collector.js.map +1 -0
  132. package/schematics/update-tool/index.d.ts +13 -0
  133. package/schematics/update-tool/index.js +117 -0
  134. package/schematics/update-tool/index.js.map +1 -0
  135. package/schematics/update-tool/migration-rule.d.ts +45 -0
  136. package/schematics/update-tool/migration-rule.js +50 -0
  137. package/schematics/update-tool/migration-rule.js.map +1 -0
  138. package/schematics/update-tool/public-api.d.ts +12 -0
  139. package/schematics/update-tool/public-api.js +18 -0
  140. package/schematics/update-tool/public-api.js.map +1 -0
  141. package/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  142. package/schematics/{ng-update → update-tool}/target-version.js +3 -3
  143. package/schematics/update-tool/target-version.js.map +1 -0
  144. package/schematics/update-tool/utils/decorators.d.ts +23 -0
  145. package/schematics/update-tool/utils/decorators.js +37 -0
  146. package/schematics/update-tool/utils/decorators.js.map +1 -0
  147. package/schematics/update-tool/utils/functions.d.ts +14 -0
  148. package/schematics/update-tool/utils/functions.js +20 -0
  149. package/schematics/update-tool/utils/functions.js.map +1 -0
  150. package/schematics/update-tool/utils/imports.d.ts +15 -0
  151. package/schematics/update-tool/utils/imports.js +35 -0
  152. package/schematics/update-tool/utils/imports.js.map +1 -0
  153. package/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  154. package/schematics/update-tool/utils/line-mappings.js +75 -0
  155. package/schematics/update-tool/utils/line-mappings.js.map +1 -0
  156. package/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  157. package/schematics/update-tool/utils/parse-tsconfig.js +22 -0
  158. package/schematics/update-tool/utils/parse-tsconfig.js.map +1 -0
  159. package/schematics/update-tool/utils/property-name.d.ts +18 -0
  160. package/schematics/update-tool/utils/property-name.js +27 -0
  161. package/schematics/update-tool/utils/property-name.js.map +1 -0
  162. package/schematics/update-tool/version-changes.d.ts +32 -0
  163. package/schematics/update-tool/version-changes.js +41 -0
  164. package/schematics/update-tool/version-changes.js.map +1 -0
  165. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  166. package/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.js +31 -20
  167. package/schematics/utils/project-tsconfig-paths.js.map +1 -0
  168. package/typings/a11y/aria-describer/aria-describer.d.ts +4 -3
  169. package/typings/a11y/index.metadata.json +1 -1
  170. package/typings/drag-drop/directives/drag.d.ts +1 -1
  171. package/typings/drag-drop/directives/drop-list.d.ts +2 -0
  172. package/typings/drag-drop/drag-drop-registry.d.ts +2 -0
  173. package/typings/drag-drop/drag-ref.d.ts +10 -1
  174. package/typings/drag-drop/drop-list-ref.d.ts +59 -3
  175. package/typings/drag-drop/index.metadata.json +1 -1
  176. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +4 -3
  177. package/typings/esm5/a11y/index.metadata.json +1 -1
  178. package/typings/esm5/drag-drop/directives/drag.d.ts +1 -1
  179. package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -0
  180. package/typings/esm5/drag-drop/drag-drop-registry.d.ts +2 -0
  181. package/typings/esm5/drag-drop/drag-ref.d.ts +10 -1
  182. package/typings/esm5/drag-drop/drop-list-ref.d.ts +59 -3
  183. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  184. package/typings/esm5/index.metadata.json +1 -1
  185. package/typings/index.metadata.json +1 -1
  186. package/typings/schematics/index.d.ts +1 -0
  187. package/typings/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  188. package/typings/schematics/ng-update/data/class-names.d.ts +1 -1
  189. package/typings/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  190. package/typings/schematics/ng-update/data/css-selectors.d.ts +1 -1
  191. package/typings/schematics/ng-update/data/element-selectors.d.ts +1 -1
  192. package/typings/schematics/ng-update/data/input-names.d.ts +1 -1
  193. package/typings/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  194. package/typings/schematics/ng-update/data/output-names.d.ts +1 -1
  195. package/typings/schematics/ng-update/data/property-names.d.ts +1 -1
  196. package/typings/schematics/ng-update/index.d.ts +0 -2
  197. package/typings/schematics/ng-update/public-api.d.ts +0 -5
  198. package/typings/schematics/ng-update/upgrade-data.d.ts +5 -30
  199. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors-rule.d.ts +25 -0
  200. package/typings/schematics/ng-update/upgrade-rules/class-inheritance-rule.d.ts +26 -0
  201. package/{schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.d.ts → typings/schematics/ng-update/upgrade-rules/class-names-rule.d.ts} +7 -7
  202. package/typings/schematics/ng-update/upgrade-rules/constructor-signature-rule.d.ts +29 -0
  203. package/typings/schematics/ng-update/upgrade-rules/css-selectors-rule.d.ts +25 -0
  204. package/typings/schematics/ng-update/upgrade-rules/element-selectors-rule.d.ts +25 -0
  205. package/typings/schematics/ng-update/upgrade-rules/index.d.ts +13 -4
  206. package/typings/schematics/ng-update/upgrade-rules/input-names-rule.d.ts +26 -0
  207. 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
  208. package/typings/schematics/ng-update/upgrade-rules/misc-template-rule.d.ts +18 -0
  209. package/typings/schematics/ng-update/upgrade-rules/output-names-rule.d.ts +22 -0
  210. package/typings/schematics/ng-update/upgrade-rules/property-names-rule.d.ts +22 -0
  211. package/typings/schematics/update-tool/component-resource-collector.d.ts +41 -0
  212. package/typings/schematics/update-tool/index.d.ts +13 -0
  213. package/typings/schematics/update-tool/migration-rule.d.ts +45 -0
  214. package/typings/schematics/update-tool/public-api.d.ts +12 -0
  215. package/typings/schematics/{ng-update → update-tool}/target-version.d.ts +3 -3
  216. package/typings/schematics/update-tool/utils/decorators.d.ts +23 -0
  217. package/typings/schematics/update-tool/utils/functions.d.ts +14 -0
  218. package/typings/schematics/update-tool/utils/imports.d.ts +15 -0
  219. package/typings/schematics/update-tool/utils/line-mappings.d.ts +21 -0
  220. package/typings/schematics/update-tool/utils/parse-tsconfig.d.ts +9 -0
  221. package/typings/schematics/update-tool/utils/property-name.d.ts +18 -0
  222. package/typings/schematics/update-tool/version-changes.d.ts +32 -0
  223. package/typings/schematics/{ng-update/upgrade-rules → utils}/project-tsconfig-paths.d.ts +4 -1
  224. package/schematics/ng-update/target-version.js.map +0 -1
  225. package/schematics/ng-update/tslint/component-file.d.ts +0 -14
  226. package/schematics/ng-update/tslint/component-file.js +0 -31
  227. package/schematics/ng-update/tslint/component-file.js.map +0 -1
  228. package/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  229. package/schematics/ng-update/tslint/component-walker.js +0 -142
  230. package/schematics/ng-update/tslint/component-walker.js.map +0 -1
  231. package/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  232. package/schematics/ng-update/tslint/external-failure-walker.js +0 -38
  233. package/schematics/ng-update/tslint/external-failure-walker.js.map +0 -1
  234. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  235. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js +0 -49
  236. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.js.map +0 -1
  237. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  238. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js +0 -62
  239. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.js.map +0 -1
  240. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  241. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js +0 -59
  242. package/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.js.map +0 -1
  243. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  244. package/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.js.map +0 -1
  245. package/schematics/ng-update/upgrade-rules/class-names/classNamesIdentifierRule.js.map +0 -1
  246. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  247. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js +0 -53
  248. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.js.map +0 -1
  249. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  250. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js +0 -63
  251. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.js.map +0 -1
  252. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  253. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js +0 -62
  254. package/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.js.map +0 -1
  255. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  256. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js +0 -50
  257. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.js.map +0 -1
  258. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  259. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js +0 -60
  260. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.js.map +0 -1
  261. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  262. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js +0 -59
  263. package/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.js.map +0 -1
  264. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  265. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js +0 -67
  266. package/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.js.map +0 -1
  267. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  268. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js +0 -67
  269. package/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.js.map +0 -1
  270. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  271. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js +0 -49
  272. package/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.js.map +0 -1
  273. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  274. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js +0 -67
  275. package/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.js.map +0 -1
  276. package/schematics/ng-update/upgrade-rules/project-tsconfig-paths.js.map +0 -1
  277. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  278. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js +0 -46
  279. package/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.js.map +0 -1
  280. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  281. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +0 -132
  282. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +0 -1
  283. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js +0 -58
  284. package/schematics/ng-update/upgrade-rules/signature-check/methodCallsCheckRule.js.map +0 -1
  285. package/schematics/ng-update/upgrade-rules/tslint-config.d.ts +0 -32
  286. package/schematics/ng-update/upgrade-rules/tslint-config.js +0 -87
  287. package/schematics/ng-update/upgrade-rules/tslint-config.js.map +0 -1
  288. package/typings/schematics/ng-update/tslint/component-file.d.ts +0 -14
  289. package/typings/schematics/ng-update/tslint/component-walker.d.ts +0 -47
  290. package/typings/schematics/ng-update/tslint/external-failure-walker.d.ts +0 -25
  291. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStringLiteralRule.d.ts +0 -16
  292. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsStylesheetRule.d.ts +0 -31
  293. package/typings/schematics/ng-update/upgrade-rules/attribute-selectors/attributeSelectorsTemplateRule.d.ts +0 -30
  294. package/typings/schematics/ng-update/upgrade-rules/class-inheritance/classInheritanceCheckRule.d.ts +0 -26
  295. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStringLiteralRule.d.ts +0 -24
  296. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsStylesheetRule.d.ts +0 -31
  297. package/typings/schematics/ng-update/upgrade-rules/css-selectors/cssSelectorsTemplateRule.d.ts +0 -30
  298. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStringLiteralRule.d.ts +0 -24
  299. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsStylesheetRule.d.ts +0 -31
  300. package/typings/schematics/ng-update/upgrade-rules/element-selectors/elementSelectorsTemplateRule.d.ts +0 -30
  301. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesStylesheetRule.d.ts +0 -36
  302. package/typings/schematics/ng-update/upgrade-rules/input-names/inputNamesTemplateRule.d.ts +0 -30
  303. package/typings/schematics/ng-update/upgrade-rules/misc-checks/checkTemplateMiscRule.d.ts +0 -23
  304. package/typings/schematics/ng-update/upgrade-rules/output-names/outputNamesTemplateRule.d.ts +0 -30
  305. package/typings/schematics/ng-update/upgrade-rules/property-names/propertyNamesAccessRule.d.ts +0 -22
  306. package/typings/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.d.ts +0 -16
  307. 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);
@@ -1326,6 +1368,18 @@ let _uniqueIdCounter = 0;
1326
1368
  * @type {?}
1327
1369
  */
1328
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;
1329
1383
  /**
1330
1384
  * Reference to a drop list. Used to manipulate or dispose of the container.
1331
1385
  * \@docs-private
@@ -1336,9 +1390,13 @@ class DropListRef {
1336
1390
  * @param {?} element
1337
1391
  * @param {?} _dragDropRegistry
1338
1392
  * @param {?} _document
1393
+ * @param {?=} _ngZone
1394
+ * @param {?=} _viewportRuler
1339
1395
  */
1340
- constructor(element, _dragDropRegistry, _document) {
1396
+ constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {
1341
1397
  this._dragDropRegistry = _dragDropRegistry;
1398
+ this._ngZone = _ngZone;
1399
+ this._viewportRuler = _viewportRuler;
1342
1400
  /**
1343
1401
  * Unique ID for the drop list.
1344
1402
  * @deprecated No longer being used. To be removed.
@@ -1353,6 +1411,11 @@ class DropListRef {
1353
1411
  * Whether sorting items within the list is disabled.
1354
1412
  */
1355
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;
1356
1419
  /**
1357
1420
  * Function that is used to determine whether an item
1358
1421
  * is allowed to be moved into a drop container.
@@ -1390,6 +1453,14 @@ class DropListRef {
1390
1453
  * Cache of the dimensions of all the items inside the container.
1391
1454
  */
1392
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 };
1393
1464
  /**
1394
1465
  * Keeps track of the item that was last swapped with the dragged item, as
1395
1466
  * well as what direction the pointer was moving in when the swap occured.
@@ -1411,6 +1482,66 @@ class DropListRef {
1411
1482
  * Layout direction of the drop list.
1412
1483
  */
1413
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
+ });
1414
1545
  _dragDropRegistry.registerDropContainer(this);
1415
1546
  this._document = _document;
1416
1547
  this.element = element instanceof ElementRef ? element.nativeElement : element;
@@ -1420,12 +1551,16 @@ class DropListRef {
1420
1551
  * @return {?}
1421
1552
  */
1422
1553
  dispose() {
1554
+ this._stopScrolling();
1555
+ this._stopScrollTimers.complete();
1556
+ this._removeListeners();
1423
1557
  this.beforeStarted.complete();
1424
1558
  this.entered.complete();
1425
1559
  this.exited.complete();
1426
1560
  this.dropped.complete();
1427
1561
  this.sorted.complete();
1428
1562
  this._activeSiblings.clear();
1563
+ this._scrollNode = (/** @type {?} */ (null));
1429
1564
  this._dragDropRegistry.removeDropContainer(this);
1430
1565
  }
1431
1566
  /**
@@ -1440,6 +1575,8 @@ class DropListRef {
1440
1575
  * @return {?}
1441
1576
  */
1442
1577
  start() {
1578
+ /** @type {?} */
1579
+ const element = coerceElement(this.element);
1443
1580
  this.beforeStarted.next();
1444
1581
  this._isDragging = true;
1445
1582
  this._cacheItems();
@@ -1448,6 +1585,31 @@ class DropListRef {
1448
1585
  * @return {?}
1449
1586
  */
1450
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
+ }
1451
1613
  }
1452
1614
  /**
1453
1615
  * Emits an event to indicate that the user moved an item into the container.
@@ -1710,13 +1872,83 @@ class DropListRef {
1710
1872
  }
1711
1873
  }));
1712
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
+ }
1713
1942
  /**
1714
1943
  * Caches the position of the drop list.
1715
1944
  * @private
1716
1945
  * @return {?}
1717
1946
  */
1718
1947
  _cacheOwnPosition() {
1719
- 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 };
1720
1952
  }
1721
1953
  /**
1722
1954
  * Refreshes the position cache of the items and sibling containers.
@@ -1737,24 +1969,7 @@ class DropListRef {
1737
1969
  // placeholder, because the element is hidden.
1738
1970
  drag.getPlaceholderElement() :
1739
1971
  drag.getRootElement();
1740
- /** @type {?} */
1741
- const clientRect = elementToMeasure.getBoundingClientRect();
1742
- return {
1743
- drag,
1744
- offset: 0,
1745
- // We need to clone the `clientRect` here, because all the values on it are readonly
1746
- // and we need to be able to update them. Also we can't use a spread here, because
1747
- // the values on a `ClientRect` aren't own properties. See:
1748
- // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
1749
- clientRect: {
1750
- top: clientRect.top,
1751
- right: clientRect.right,
1752
- bottom: clientRect.bottom,
1753
- left: clientRect.left,
1754
- width: clientRect.width,
1755
- height: clientRect.height
1756
- }
1757
- };
1972
+ return { drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };
1758
1973
  })).sort((/**
1759
1974
  * @param {?} a
1760
1975
  * @param {?} b
@@ -1787,6 +2002,8 @@ class DropListRef {
1787
2002
  this._itemPositions = [];
1788
2003
  this._previousSwap.drag = null;
1789
2004
  this._previousSwap.delta = 0;
2005
+ this._stopScrolling();
2006
+ this._removeListeners();
1790
2007
  }
1791
2008
  /**
1792
2009
  * Gets the offset in pixels by which the items that aren't being dragged should be moved.
@@ -1910,6 +2127,60 @@ class DropListRef {
1910
2127
  this._cacheItemPositions();
1911
2128
  this._cacheOwnPosition();
1912
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
+ }
1913
2184
  /**
1914
2185
  * Checks whether the user's pointer is positioned over the container.
1915
2186
  * @param {?} x Pointer position along the X axis.
@@ -1999,7 +2270,7 @@ function adjustClientRect(clientRect, top, left) {
1999
2270
  }
2000
2271
  /**
2001
2272
  * Finds the index of an item that matches a predicate function. Used as an equivalent
2002
- * 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.
2003
2274
  * @template T
2004
2275
  * @param {?} array Array in which to look for matches.
2005
2276
  * @param {?} predicate Function used to determine whether an item is a match.
@@ -2024,6 +2295,93 @@ function isInsideClientRect(clientRect, x, y) {
2024
2295
  const { top, bottom, left, right } = clientRect;
2025
2296
  return y >= top && y <= bottom && x >= left && x <= right;
2026
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
+ }
2027
2385
 
2028
2386
  /**
2029
2387
  * @fileoverview added by tsickle
@@ -2079,6 +2437,10 @@ class DragDropRegistry {
2079
2437
  * while the user is dragging a drag item instance.
2080
2438
  */
2081
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();
2082
2444
  /**
2083
2445
  * Event listener that will prevent the default browser action while the user is dragging.
2084
2446
  * @param event Event whose default action should be prevented.
@@ -2186,6 +2548,13 @@ class DragDropRegistry {
2186
2548
  */
2187
2549
  (e) => this.pointerUp.next((/** @type {?} */ (e)))),
2188
2550
  options: true
2551
+ })
2552
+ .set('scroll', {
2553
+ handler: (/**
2554
+ * @param {?} e
2555
+ * @return {?}
2556
+ */
2557
+ (e) => this.scroll.next(e))
2189
2558
  })
2190
2559
  // Preventing the default action on `mousemove` isn't enough to disable text selection
2191
2560
  // on Safari so we need to prevent the selection event as well. Alternatively this can
@@ -2195,14 +2564,6 @@ class DragDropRegistry {
2195
2564
  handler: this._preventDefaultWhileDragging,
2196
2565
  options: activeCapturingEventOptions
2197
2566
  });
2198
- // TODO(crisbeto): prevent mouse wheel scrolling while
2199
- // dragging until we've set up proper scroll handling.
2200
- if (!isTouchEvent) {
2201
- this._globalListeners.set('wheel', {
2202
- handler: this._preventDefaultWhileDragging,
2203
- options: activeCapturingEventOptions
2204
- });
2205
- }
2206
2567
  this._ngZone.runOutsideAngular((/**
2207
2568
  * @return {?}
2208
2569
  */
@@ -2341,7 +2702,7 @@ class DragDrop {
2341
2702
  * @return {?}
2342
2703
  */
2343
2704
  createDropList(element) {
2344
- return new DropListRef(element, this._dragDropRegistry, this._document);
2705
+ return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
2345
2706
  }
2346
2707
  }
2347
2708
  DragDrop.decorators = [
@@ -3092,6 +3453,10 @@ class CdkDropList {
3092
3453
  * @return {?}
3093
3454
  */
3094
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;
3095
3460
  /**
3096
3461
  * Emits when the user drops an item inside the container.
3097
3462
  */
@@ -3311,6 +3676,7 @@ class CdkDropList {
3311
3676
  ref.disabled = this.disabled;
3312
3677
  ref.lockAxis = this.lockAxis;
3313
3678
  ref.sortingDisabled = this.sortingDisabled;
3679
+ ref.autoScrollDisabled = this.autoScrollDisabled;
3314
3680
  ref
3315
3681
  .connectedTo(siblings.filter((/**
3316
3682
  * @param {?} drop
@@ -3438,6 +3804,7 @@ CdkDropList.propDecorators = {
3438
3804
  disabled: [{ type: Input, args: ['cdkDropListDisabled',] }],
3439
3805
  sortingDisabled: [{ type: Input, args: ['cdkDropListSortingDisabled',] }],
3440
3806
  enterPredicate: [{ type: Input, args: ['cdkDropListEnterPredicate',] }],
3807
+ autoScrollDisabled: [{ type: Input, args: ['cdkDropListAutoScrollDisabled',] }],
3441
3808
  dropped: [{ type: Output, args: ['cdkDropListDropped',] }],
3442
3809
  entered: [{ type: Output, args: ['cdkDropListEntered',] }],
3443
3810
  exited: [{ type: Output, args: ['cdkDropListExited',] }],