@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
@@ -180,6 +180,10 @@ DragRef = /** @class */ (function () {
180
180
  * Subscription to the event that is dispatched when the user lifts their pointer.
181
181
  */
182
182
  this._pointerUpSubscription = Subscription.EMPTY;
183
+ /**
184
+ * Subscription to the viewport being scrolled.
185
+ */
186
+ this._scrollSubscription = Subscription.EMPTY;
183
187
  /**
184
188
  * Cached reference to the boundary element.
185
189
  */
@@ -289,7 +293,13 @@ DragRef = /** @class */ (function () {
289
293
  // direction. Note that this is preferrable over doing something like `skip(minimumDistance)`
290
294
  // in the `pointerMove` subscription, because we're not guaranteed to have one move event
291
295
  // per pixel of movement (e.g. if the user moves their pointer quickly).
292
- if (isOverThreshold && (Date.now() >= _this._dragStartTime + (_this.dragStartDelay || 0))) {
296
+ if (isOverThreshold) {
297
+ /** @type {?} */
298
+ var isDelayElapsed = Date.now() >= _this._dragStartTime + (_this.dragStartDelay || 0);
299
+ if (!isDelayElapsed) {
300
+ _this._endDragSequence(event);
301
+ return;
302
+ }
293
303
  // Prevent other drag sequences from starting while something in the container is still
294
304
  // being dragged. This can happen while we're waiting for the drop animation to finish
295
305
  // and can cause errors, because some elements might still be moving around.
@@ -360,47 +370,7 @@ DragRef = /** @class */ (function () {
360
370
  * @return {?}
361
371
  */
362
372
  function (event) {
363
- // Note that here we use `isDragging` from the service, rather than from `this`.
364
- // The difference is that the one from the service reflects whether a dragging sequence
365
- // has been initiated, whereas the one on `this` includes whether the user has passed
366
- // the minimum dragging threshold.
367
- if (!_this._dragDropRegistry.isDragging(_this)) {
368
- return;
369
- }
370
- _this._removeSubscriptions();
371
- _this._dragDropRegistry.stopDragging(_this);
372
- if (_this._handles) {
373
- _this._rootElement.style.webkitTapHighlightColor = _this._rootElementTapHighlight;
374
- }
375
- if (!_this._hasStartedDragging) {
376
- return;
377
- }
378
- _this.released.next({ source: _this });
379
- if (!_this._dropContainer) {
380
- // Convert the active transform into a passive one. This means that next time
381
- // the user starts dragging the item, its position will be calculated relatively
382
- // to the new passive transform.
383
- _this._passiveTransform.x = _this._activeTransform.x;
384
- _this._passiveTransform.y = _this._activeTransform.y;
385
- _this._ngZone.run((/**
386
- * @return {?}
387
- */
388
- function () {
389
- _this.ended.next({
390
- source: _this,
391
- distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))
392
- });
393
- }));
394
- _this._dragDropRegistry.stopDragging(_this);
395
- return;
396
- }
397
- _this._animatePreviewToPlaceholder().then((/**
398
- * @return {?}
399
- */
400
- function () {
401
- _this._cleanupDragArtifacts(event);
402
- _this._dragDropRegistry.stopDragging(_this);
403
- }));
373
+ _this._endDragSequence(event);
404
374
  });
405
375
  this.withRootElement(element);
406
376
  _dragDropRegistry.registerDragItem(this);
@@ -732,7 +702,9 @@ DragRef = /** @class */ (function () {
732
702
  * @return {?}
733
703
  */
734
704
  function () {
735
- return { x: this._passiveTransform.x, y: this._passiveTransform.y };
705
+ /** @type {?} */
706
+ var position = this.isDragging() ? this._activeTransform : this._passiveTransform;
707
+ return { x: position.x, y: position.y };
736
708
  };
737
709
  /**
738
710
  * Sets the current position in pixels the draggable outside of a drop container.
@@ -761,6 +733,22 @@ DragRef = /** @class */ (function () {
761
733
  }
762
734
  return (/** @type {?} */ (this));
763
735
  };
736
+ /** Updates the item's sort order based on the last-known pointer position. */
737
+ /**
738
+ * Updates the item's sort order based on the last-known pointer position.
739
+ * @return {?}
740
+ */
741
+ DragRef.prototype._sortFromLastPointerPosition = /**
742
+ * Updates the item's sort order based on the last-known pointer position.
743
+ * @return {?}
744
+ */
745
+ function () {
746
+ /** @type {?} */
747
+ var position = this._pointerPositionAtLastDirectionChange;
748
+ if (position && this._dropContainer) {
749
+ this._updateActiveDropContainer(position);
750
+ }
751
+ };
764
752
  /** Unsubscribes from the global subscriptions. */
765
753
  /**
766
754
  * Unsubscribes from the global subscriptions.
@@ -775,6 +763,7 @@ DragRef = /** @class */ (function () {
775
763
  function () {
776
764
  this._pointerMoveSubscription.unsubscribe();
777
765
  this._pointerUpSubscription.unsubscribe();
766
+ this._scrollSubscription.unsubscribe();
778
767
  };
779
768
  /** Destroys the preview element and its ViewRef. */
780
769
  /**
@@ -816,6 +805,69 @@ DragRef = /** @class */ (function () {
816
805
  }
817
806
  this._placeholder = this._placeholderRef = (/** @type {?} */ (null));
818
807
  };
808
+ /**
809
+ * Clears subscriptions and stops the dragging sequence.
810
+ * @param event Browser event object that ended the sequence.
811
+ */
812
+ /**
813
+ * Clears subscriptions and stops the dragging sequence.
814
+ * @private
815
+ * @param {?} event Browser event object that ended the sequence.
816
+ * @return {?}
817
+ */
818
+ DragRef.prototype._endDragSequence = /**
819
+ * Clears subscriptions and stops the dragging sequence.
820
+ * @private
821
+ * @param {?} event Browser event object that ended the sequence.
822
+ * @return {?}
823
+ */
824
+ function (event) {
825
+ var _this = this;
826
+ // Note that here we use `isDragging` from the service, rather than from `this`.
827
+ // The difference is that the one from the service reflects whether a dragging sequence
828
+ // has been initiated, whereas the one on `this` includes whether the user has passed
829
+ // the minimum dragging threshold.
830
+ if (!this._dragDropRegistry.isDragging(this)) {
831
+ return;
832
+ }
833
+ this._removeSubscriptions();
834
+ this._dragDropRegistry.stopDragging(this);
835
+ if (this._handles) {
836
+ this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;
837
+ }
838
+ if (!this._hasStartedDragging) {
839
+ return;
840
+ }
841
+ this.released.next({ source: this });
842
+ if (this._dropContainer) {
843
+ // Stop scrolling immediately, instead of waiting for the animation to finish.
844
+ this._dropContainer._stopScrolling();
845
+ this._animatePreviewToPlaceholder().then((/**
846
+ * @return {?}
847
+ */
848
+ function () {
849
+ _this._cleanupDragArtifacts(event);
850
+ _this._dragDropRegistry.stopDragging(_this);
851
+ }));
852
+ }
853
+ else {
854
+ // Convert the active transform into a passive one. This means that next time
855
+ // the user starts dragging the item, its position will be calculated relatively
856
+ // to the new passive transform.
857
+ this._passiveTransform.x = this._activeTransform.x;
858
+ this._passiveTransform.y = this._activeTransform.y;
859
+ this._ngZone.run((/**
860
+ * @return {?}
861
+ */
862
+ function () {
863
+ _this.ended.next({
864
+ source: _this,
865
+ distance: _this._getDragDistance(_this._getPointerPositionOnPage(event))
866
+ });
867
+ }));
868
+ this._dragDropRegistry.stopDragging(this);
869
+ }
870
+ };
819
871
  /** Starts the dragging sequence. */
820
872
  /**
821
873
  * Starts the dragging sequence.
@@ -835,6 +887,7 @@ DragRef = /** @class */ (function () {
835
887
  if (isTouchEvent(event)) {
836
888
  this._lastTouchEventTime = Date.now();
837
889
  }
890
+ this._toggleNativeDragInteractions();
838
891
  if (this._dropContainer) {
839
892
  /** @type {?} */
840
893
  var element = this._rootElement;
@@ -877,6 +930,7 @@ DragRef = /** @class */ (function () {
877
930
  * @return {?}
878
931
  */
879
932
  function (referenceElement, event) {
933
+ var _this = this;
880
934
  // Always stop propagation for the event that initializes
881
935
  // the dragging sequence, in order to prevent it from potentially
882
936
  // starting another sequence for a draggable parent somewhere up the DOM tree.
@@ -912,7 +966,6 @@ DragRef = /** @class */ (function () {
912
966
  this._rootElementTapHighlight = rootElement.style.webkitTapHighlightColor;
913
967
  rootElement.style.webkitTapHighlightColor = 'transparent';
914
968
  }
915
- this._toggleNativeDragInteractions();
916
969
  this._hasStartedDragging = this._hasMoved = false;
917
970
  this._initialContainer = (/** @type {?} */ (this._dropContainer));
918
971
  // Avoid multiple subscriptions and memory leaks when multi touch
@@ -920,7 +973,12 @@ DragRef = /** @class */ (function () {
920
973
  this._removeSubscriptions();
921
974
  this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);
922
975
  this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);
923
- this._scrollPosition = this._viewportRuler.getViewportScrollPosition();
976
+ this._scrollSubscription = this._dragDropRegistry.scroll.pipe(startWith(null)).subscribe((/**
977
+ * @return {?}
978
+ */
979
+ function () {
980
+ _this._scrollPosition = _this._viewportRuler.getViewportScrollPosition();
981
+ }));
924
982
  if (this._boundaryElement) {
925
983
  this._boundaryRect = this._boundaryElement.getBoundingClientRect();
926
984
  }
@@ -1044,6 +1102,7 @@ DragRef = /** @class */ (function () {
1044
1102
  });
1045
1103
  }));
1046
1104
  }
1105
+ (/** @type {?} */ (this._dropContainer))._startScrollingIfNecessary(x, y);
1047
1106
  (/** @type {?} */ (this._dropContainer))._sortItem(this, x, y, this._pointerDirectionDelta);
1048
1107
  this._preview.style.transform =
1049
1108
  getTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);
@@ -1272,7 +1331,7 @@ DragRef = /** @class */ (function () {
1272
1331
  /** @type {?} */
1273
1332
  var point = this._getPointerPositionOnPage(event);
1274
1333
  /** @type {?} */
1275
- var constrainedPoint = this.constrainPosition ? this.constrainPosition(point) : point;
1334
+ var constrainedPoint = this.constrainPosition ? this.constrainPosition(point, this) : point;
1276
1335
  /** @type {?} */
1277
1336
  var dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;
1278
1337
  if (this.lockAxis === 'x' || dropContainerLock === 'x') {
@@ -1354,7 +1413,7 @@ DragRef = /** @class */ (function () {
1354
1413
  return;
1355
1414
  }
1356
1415
  /** @type {?} */
1357
- var shouldEnable = this.disabled || this._handles.length > 0;
1416
+ var shouldEnable = this._handles.length > 0 || !this.isDragging();
1358
1417
  if (shouldEnable !== this._nativeInteractionsEnabled) {
1359
1418
  this._nativeInteractionsEnabled = shouldEnable;
1360
1419
  toggleNativeDragInteractions(this._rootElement, shouldEnable);
@@ -1505,7 +1564,10 @@ function removeElement(element) {
1505
1564
  * @return {?}
1506
1565
  */
1507
1566
  function isTouchEvent(event) {
1508
- return event.type.startsWith('touch');
1567
+ // This function is called for every pixel that the user has dragged so we need it to be
1568
+ // as fast as possible. Since we only bind mouse events and touch events, we can assume
1569
+ // that if the event's name starts with `t`, it's a touch event.
1570
+ return event.type[0] === 't';
1509
1571
  }
1510
1572
  /**
1511
1573
  * Gets the element into which the drag preview should be inserted.
@@ -1614,6 +1676,18 @@ var _uniqueIdCounter = 0;
1614
1676
  * @type {?}
1615
1677
  */
1616
1678
  var DROP_PROXIMITY_THRESHOLD = 0.05;
1679
+ /**
1680
+ * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the
1681
+ * viewport. The value comes from trying it out manually until it feels right.
1682
+ * @type {?}
1683
+ */
1684
+ var SCROLL_PROXIMITY_THRESHOLD = 0.05;
1685
+ /**
1686
+ * Number of pixels to scroll for each frame when auto-scrolling an element.
1687
+ * The value comes from trying it out manually until it feels right.
1688
+ * @type {?}
1689
+ */
1690
+ var AUTO_SCROLL_STEP = 2;
1617
1691
  /**
1618
1692
  * Reference to a drop list. Used to manipulate or dispose of the container.
1619
1693
  * \@docs-private
@@ -1625,8 +1699,11 @@ var /**
1625
1699
  * @template T
1626
1700
  */
1627
1701
  DropListRef = /** @class */ (function () {
1628
- function DropListRef(element, _dragDropRegistry, _document) {
1702
+ function DropListRef(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {
1703
+ var _this = this;
1629
1704
  this._dragDropRegistry = _dragDropRegistry;
1705
+ this._ngZone = _ngZone;
1706
+ this._viewportRuler = _viewportRuler;
1630
1707
  /**
1631
1708
  * Unique ID for the drop list.
1632
1709
  * @deprecated No longer being used. To be removed.
@@ -1641,6 +1718,11 @@ DropListRef = /** @class */ (function () {
1641
1718
  * Whether sorting items within the list is disabled.
1642
1719
  */
1643
1720
  this.sortingDisabled = true;
1721
+ /**
1722
+ * Whether auto-scrolling the view when the user
1723
+ * moves their pointer close to the edges is disabled.
1724
+ */
1725
+ this.autoScrollDisabled = false;
1644
1726
  /**
1645
1727
  * Function that is used to determine whether an item
1646
1728
  * is allowed to be moved into a drop container.
@@ -1678,6 +1760,14 @@ DropListRef = /** @class */ (function () {
1678
1760
  * Cache of the dimensions of all the items inside the container.
1679
1761
  */
1680
1762
  this._itemPositions = [];
1763
+ /**
1764
+ * Keeps track of the container's scroll position.
1765
+ */
1766
+ this._scrollPosition = { top: 0, left: 0 };
1767
+ /**
1768
+ * Keeps track of the scroll position of the viewport.
1769
+ */
1770
+ this._viewportScrollPosition = { top: 0, left: 0 };
1681
1771
  /**
1682
1772
  * Keeps track of the item that was last swapped with the dragged item, as
1683
1773
  * well as what direction the pointer was moving in when the swap occured.
@@ -1699,6 +1789,66 @@ DropListRef = /** @class */ (function () {
1699
1789
  * Layout direction of the drop list.
1700
1790
  */
1701
1791
  this._direction = 'ltr';
1792
+ /**
1793
+ * Subscription to the window being scrolled.
1794
+ */
1795
+ this._viewportScrollSubscription = Subscription.EMPTY;
1796
+ /**
1797
+ * Vertical direction in which the list is currently scrolling.
1798
+ */
1799
+ this._verticalScrollDirection = 0 /* NONE */;
1800
+ /**
1801
+ * Horizontal direction in which the list is currently scrolling.
1802
+ */
1803
+ this._horizontalScrollDirection = 0 /* NONE */;
1804
+ /**
1805
+ * Used to signal to the current auto-scroll sequence when to stop.
1806
+ */
1807
+ this._stopScrollTimers = new Subject();
1808
+ /**
1809
+ * Handles the container being scrolled. Has to be an arrow function to preserve the context.
1810
+ */
1811
+ this._handleScroll = (/**
1812
+ * @return {?}
1813
+ */
1814
+ function () {
1815
+ if (!_this.isDragging()) {
1816
+ return;
1817
+ }
1818
+ /** @type {?} */
1819
+ var element = coerceElement(_this.element);
1820
+ _this._updateAfterScroll(_this._scrollPosition, element.scrollTop, element.scrollLeft);
1821
+ });
1822
+ /**
1823
+ * Starts the interval that'll auto-scroll the element.
1824
+ */
1825
+ this._startScrollInterval = (/**
1826
+ * @return {?}
1827
+ */
1828
+ function () {
1829
+ _this._stopScrolling();
1830
+ interval(0, animationFrameScheduler)
1831
+ .pipe(takeUntil(_this._stopScrollTimers))
1832
+ .subscribe((/**
1833
+ * @return {?}
1834
+ */
1835
+ function () {
1836
+ /** @type {?} */
1837
+ var node = _this._scrollNode;
1838
+ if (_this._verticalScrollDirection === 1 /* UP */) {
1839
+ incrementVerticalScroll(node, -AUTO_SCROLL_STEP);
1840
+ }
1841
+ else if (_this._verticalScrollDirection === 2 /* DOWN */) {
1842
+ incrementVerticalScroll(node, AUTO_SCROLL_STEP);
1843
+ }
1844
+ if (_this._horizontalScrollDirection === 1 /* LEFT */) {
1845
+ incrementHorizontalScroll(node, -AUTO_SCROLL_STEP);
1846
+ }
1847
+ else if (_this._horizontalScrollDirection === 2 /* RIGHT */) {
1848
+ incrementHorizontalScroll(node, AUTO_SCROLL_STEP);
1849
+ }
1850
+ }));
1851
+ });
1702
1852
  _dragDropRegistry.registerDropContainer(this);
1703
1853
  this._document = _document;
1704
1854
  this.element = element instanceof ElementRef ? element.nativeElement : element;
@@ -1713,12 +1863,16 @@ DropListRef = /** @class */ (function () {
1713
1863
  * @return {?}
1714
1864
  */
1715
1865
  function () {
1866
+ this._stopScrolling();
1867
+ this._stopScrollTimers.complete();
1868
+ this._removeListeners();
1716
1869
  this.beforeStarted.complete();
1717
1870
  this.entered.complete();
1718
1871
  this.exited.complete();
1719
1872
  this.dropped.complete();
1720
1873
  this.sorted.complete();
1721
1874
  this._activeSiblings.clear();
1875
+ this._scrollNode = (/** @type {?} */ (null));
1722
1876
  this._dragDropRegistry.removeDropContainer(this);
1723
1877
  };
1724
1878
  /** Whether an item from this list is currently being dragged. */
@@ -1744,6 +1898,8 @@ DropListRef = /** @class */ (function () {
1744
1898
  */
1745
1899
  function () {
1746
1900
  var _this = this;
1901
+ /** @type {?} */
1902
+ var element = coerceElement(this.element);
1747
1903
  this.beforeStarted.next();
1748
1904
  this._isDragging = true;
1749
1905
  this._cacheItems();
@@ -1752,6 +1908,31 @@ DropListRef = /** @class */ (function () {
1752
1908
  * @return {?}
1753
1909
  */
1754
1910
  function (sibling) { return sibling._startReceiving(_this); }));
1911
+ this._removeListeners();
1912
+ // @breaking-change 9.0.0 Remove check for _ngZone once it's marked as a required param.
1913
+ if (this._ngZone) {
1914
+ this._ngZone.runOutsideAngular((/**
1915
+ * @return {?}
1916
+ */
1917
+ function () { return element.addEventListener('scroll', _this._handleScroll); }));
1918
+ }
1919
+ else {
1920
+ element.addEventListener('scroll', this._handleScroll);
1921
+ }
1922
+ // @breaking-change 9.0.0 Remove check for _viewportRuler once it's marked as a required param.
1923
+ if (this._viewportRuler) {
1924
+ this._viewportScrollPosition = this._viewportRuler.getViewportScrollPosition();
1925
+ this._viewportScrollSubscription = this._dragDropRegistry.scroll.subscribe((/**
1926
+ * @return {?}
1927
+ */
1928
+ function () {
1929
+ if (_this.isDragging()) {
1930
+ /** @type {?} */
1931
+ var newPosition = (/** @type {?} */ (_this._viewportRuler)).getViewportScrollPosition();
1932
+ _this._updateAfterScroll(_this._viewportScrollPosition, newPosition.top, newPosition.left, _this._clientRect);
1933
+ }
1934
+ }));
1935
+ }
1755
1936
  };
1756
1937
  /**
1757
1938
  * Emits an event to indicate that the user moved an item into the container.
@@ -2135,6 +2316,91 @@ DropListRef = /** @class */ (function () {
2135
2316
  }
2136
2317
  }));
2137
2318
  };
2319
+ /**
2320
+ * Checks whether the user's pointer is close to the edges of either the
2321
+ * viewport or the drop list and starts the auto-scroll sequence.
2322
+ * @param pointerX User's pointer position along the x axis.
2323
+ * @param pointerY User's pointer position along the y axis.
2324
+ */
2325
+ /**
2326
+ * Checks whether the user's pointer is close to the edges of either the
2327
+ * viewport or the drop list and starts the auto-scroll sequence.
2328
+ * @param {?} pointerX User's pointer position along the x axis.
2329
+ * @param {?} pointerY User's pointer position along the y axis.
2330
+ * @return {?}
2331
+ */
2332
+ DropListRef.prototype._startScrollingIfNecessary = /**
2333
+ * Checks whether the user's pointer is close to the edges of either the
2334
+ * viewport or the drop list and starts the auto-scroll sequence.
2335
+ * @param {?} pointerX User's pointer position along the x axis.
2336
+ * @param {?} pointerY User's pointer position along the y axis.
2337
+ * @return {?}
2338
+ */
2339
+ function (pointerX, pointerY) {
2340
+ if (this.autoScrollDisabled) {
2341
+ return;
2342
+ }
2343
+ /** @type {?} */
2344
+ var scrollNode;
2345
+ /** @type {?} */
2346
+ var verticalScrollDirection = 0 /* NONE */;
2347
+ /** @type {?} */
2348
+ var horizontalScrollDirection = 0 /* NONE */;
2349
+ // @breaking-change 9.0.0 Remove null check for _viewportRuler once it's a required parameter.
2350
+ // Check whether we're in range to scroll the viewport.
2351
+ if (this._viewportRuler) {
2352
+ var _a = this._viewportRuler.getViewportSize(), width = _a.width, height = _a.height;
2353
+ /** @type {?} */
2354
+ var clientRect = { width: width, height: height, top: 0, right: width, bottom: height, left: 0 };
2355
+ verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);
2356
+ horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);
2357
+ scrollNode = window;
2358
+ }
2359
+ // If we couldn't find a scroll direction based on the
2360
+ // window, try with the container, if the pointer is close by.
2361
+ if (!verticalScrollDirection && !horizontalScrollDirection &&
2362
+ this._isPointerNearDropContainer(pointerX, pointerY)) {
2363
+ verticalScrollDirection = getVerticalScrollDirection(this._clientRect, pointerY);
2364
+ horizontalScrollDirection = getHorizontalScrollDirection(this._clientRect, pointerX);
2365
+ scrollNode = coerceElement(this.element);
2366
+ }
2367
+ // TODO(crisbeto): we also need to account for whether the view or element are scrollable in
2368
+ // the first place. With the current approach we'll still try to scroll them, but it just
2369
+ // won't do anything. The only case where this is relevant is that if we have a scrollable
2370
+ // list close to the viewport edge where the viewport isn't scrollable. In this case the
2371
+ // we'll be trying to scroll the viewport rather than the list.
2372
+ if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection ||
2373
+ horizontalScrollDirection !== this._horizontalScrollDirection ||
2374
+ scrollNode !== this._scrollNode)) {
2375
+ this._verticalScrollDirection = verticalScrollDirection;
2376
+ this._horizontalScrollDirection = horizontalScrollDirection;
2377
+ this._scrollNode = scrollNode;
2378
+ if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {
2379
+ // @breaking-change 9.0.0 Remove null check for `_ngZone` once it is made required.
2380
+ if (this._ngZone) {
2381
+ this._ngZone.runOutsideAngular(this._startScrollInterval);
2382
+ }
2383
+ else {
2384
+ this._startScrollInterval();
2385
+ }
2386
+ }
2387
+ else {
2388
+ this._stopScrolling();
2389
+ }
2390
+ }
2391
+ };
2392
+ /** Stops any currently-running auto-scroll sequences. */
2393
+ /**
2394
+ * Stops any currently-running auto-scroll sequences.
2395
+ * @return {?}
2396
+ */
2397
+ DropListRef.prototype._stopScrolling = /**
2398
+ * Stops any currently-running auto-scroll sequences.
2399
+ * @return {?}
2400
+ */
2401
+ function () {
2402
+ this._stopScrollTimers.next();
2403
+ };
2138
2404
  /** Caches the position of the drop list. */
2139
2405
  /**
2140
2406
  * Caches the position of the drop list.
@@ -2147,7 +2413,10 @@ DropListRef = /** @class */ (function () {
2147
2413
  * @return {?}
2148
2414
  */
2149
2415
  function () {
2150
- this._clientRect = coerceElement(this.element).getBoundingClientRect();
2416
+ /** @type {?} */
2417
+ var element = coerceElement(this.element);
2418
+ this._clientRect = getMutableClientRect(element);
2419
+ this._scrollPosition = { top: element.scrollTop, left: element.scrollLeft };
2151
2420
  };
2152
2421
  /** Refreshes the position cache of the items and sibling containers. */
2153
2422
  /**
@@ -2175,24 +2444,7 @@ DropListRef = /** @class */ (function () {
2175
2444
  // placeholder, because the element is hidden.
2176
2445
  drag.getPlaceholderElement() :
2177
2446
  drag.getRootElement();
2178
- /** @type {?} */
2179
- var clientRect = elementToMeasure.getBoundingClientRect();
2180
- return {
2181
- drag: drag,
2182
- offset: 0,
2183
- // We need to clone the `clientRect` here, because all the values on it are readonly
2184
- // and we need to be able to update them. Also we can't use a spread here, because
2185
- // the values on a `ClientRect` aren't own properties. See:
2186
- // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
2187
- clientRect: {
2188
- top: clientRect.top,
2189
- right: clientRect.right,
2190
- bottom: clientRect.bottom,
2191
- left: clientRect.left,
2192
- width: clientRect.width,
2193
- height: clientRect.height
2194
- }
2195
- };
2447
+ return { drag: drag, offset: 0, clientRect: getMutableClientRect(elementToMeasure) };
2196
2448
  })).sort((/**
2197
2449
  * @param {?} a
2198
2450
  * @param {?} b
@@ -2232,6 +2484,8 @@ DropListRef = /** @class */ (function () {
2232
2484
  this._itemPositions = [];
2233
2485
  this._previousSwap.drag = null;
2234
2486
  this._previousSwap.delta = 0;
2487
+ this._stopScrolling();
2488
+ this._removeListeners();
2235
2489
  };
2236
2490
  /**
2237
2491
  * Gets the offset in pixels by which the items that aren't being dragged should be moved.
@@ -2419,6 +2673,89 @@ DropListRef = /** @class */ (function () {
2419
2673
  this._cacheItemPositions();
2420
2674
  this._cacheOwnPosition();
2421
2675
  };
2676
+ /**
2677
+ * Updates the internal state of the container after a scroll event has happened.
2678
+ * @param scrollPosition Object that is keeping track of the scroll position.
2679
+ * @param newTop New top scroll position.
2680
+ * @param newLeft New left scroll position.
2681
+ * @param extraClientRect Extra `ClientRect` object that should be updated, in addition to the
2682
+ * ones of the drag items. Useful when the viewport has been scrolled and we also need to update
2683
+ * the `ClientRect` of the list.
2684
+ */
2685
+ /**
2686
+ * Updates the internal state of the container after a scroll event has happened.
2687
+ * @private
2688
+ * @param {?} scrollPosition Object that is keeping track of the scroll position.
2689
+ * @param {?} newTop New top scroll position.
2690
+ * @param {?} newLeft New left scroll position.
2691
+ * @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
2692
+ * ones of the drag items. Useful when the viewport has been scrolled and we also need to update
2693
+ * the `ClientRect` of the list.
2694
+ * @return {?}
2695
+ */
2696
+ DropListRef.prototype._updateAfterScroll = /**
2697
+ * Updates the internal state of the container after a scroll event has happened.
2698
+ * @private
2699
+ * @param {?} scrollPosition Object that is keeping track of the scroll position.
2700
+ * @param {?} newTop New top scroll position.
2701
+ * @param {?} newLeft New left scroll position.
2702
+ * @param {?=} extraClientRect Extra `ClientRect` object that should be updated, in addition to the
2703
+ * ones of the drag items. Useful when the viewport has been scrolled and we also need to update
2704
+ * the `ClientRect` of the list.
2705
+ * @return {?}
2706
+ */
2707
+ function (scrollPosition, newTop, newLeft, extraClientRect) {
2708
+ var _this = this;
2709
+ /** @type {?} */
2710
+ var topDifference = scrollPosition.top - newTop;
2711
+ /** @type {?} */
2712
+ var leftDifference = scrollPosition.left - newLeft;
2713
+ if (extraClientRect) {
2714
+ adjustClientRect(extraClientRect, topDifference, leftDifference);
2715
+ }
2716
+ // Since we know the amount that the user has scrolled we can shift all of the client rectangles
2717
+ // ourselves. This is cheaper than re-measuring everything and we can avoid inconsistent
2718
+ // behavior where we might be measuring the element before its position has changed.
2719
+ this._itemPositions.forEach((/**
2720
+ * @param {?} __0
2721
+ * @return {?}
2722
+ */
2723
+ function (_a) {
2724
+ var clientRect = _a.clientRect;
2725
+ adjustClientRect(clientRect, topDifference, leftDifference);
2726
+ }));
2727
+ // We need two loops for this, because we want all of the cached
2728
+ // positions to be up-to-date before we re-sort the item.
2729
+ this._itemPositions.forEach((/**
2730
+ * @param {?} __0
2731
+ * @return {?}
2732
+ */
2733
+ function (_a) {
2734
+ var drag = _a.drag;
2735
+ if (_this._dragDropRegistry.isDragging(drag)) {
2736
+ // We need to re-sort the item manually, because the pointer move
2737
+ // events won't be dispatched while the user is scrolling.
2738
+ drag._sortFromLastPointerPosition();
2739
+ }
2740
+ }));
2741
+ scrollPosition.top = newTop;
2742
+ scrollPosition.left = newLeft;
2743
+ };
2744
+ /** Removes the event listeners associated with this drop list. */
2745
+ /**
2746
+ * Removes the event listeners associated with this drop list.
2747
+ * @private
2748
+ * @return {?}
2749
+ */
2750
+ DropListRef.prototype._removeListeners = /**
2751
+ * Removes the event listeners associated with this drop list.
2752
+ * @private
2753
+ * @return {?}
2754
+ */
2755
+ function () {
2756
+ coerceElement(this.element).removeEventListener('scroll', this._handleScroll);
2757
+ this._viewportScrollSubscription.unsubscribe();
2758
+ };
2422
2759
  /**
2423
2760
  * Checks whether the user's pointer is positioned over the container.
2424
2761
  * @param x Pointer position along the X axis.
@@ -2566,7 +2903,7 @@ function adjustClientRect(clientRect, top, left) {
2566
2903
  }
2567
2904
  /**
2568
2905
  * Finds the index of an item that matches a predicate function. Used as an equivalent
2569
- * of `Array.prototype.find` which isn't part of the standard Google typings.
2906
+ * of `Array.prototype.findIndex` which isn't part of the standard Google typings.
2570
2907
  * @template T
2571
2908
  * @param {?} array Array in which to look for matches.
2572
2909
  * @param {?} predicate Function used to determine whether an item is a match.
@@ -2591,6 +2928,93 @@ function isInsideClientRect(clientRect, x, y) {
2591
2928
  var top = clientRect.top, bottom = clientRect.bottom, left = clientRect.left, right = clientRect.right;
2592
2929
  return y >= top && y <= bottom && x >= left && x <= right;
2593
2930
  }
2931
+ /**
2932
+ * Gets a mutable version of an element's bounding `ClientRect`.
2933
+ * @param {?} element
2934
+ * @return {?}
2935
+ */
2936
+ function getMutableClientRect(element) {
2937
+ /** @type {?} */
2938
+ var clientRect = element.getBoundingClientRect();
2939
+ // We need to clone the `clientRect` here, because all the values on it are readonly
2940
+ // and we need to be able to update them. Also we can't use a spread here, because
2941
+ // the values on a `ClientRect` aren't own properties. See:
2942
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
2943
+ return {
2944
+ top: clientRect.top,
2945
+ right: clientRect.right,
2946
+ bottom: clientRect.bottom,
2947
+ left: clientRect.left,
2948
+ width: clientRect.width,
2949
+ height: clientRect.height
2950
+ };
2951
+ }
2952
+ /**
2953
+ * Increments the vertical scroll position of a node.
2954
+ * @param {?} node Node whose scroll position should change.
2955
+ * @param {?} amount Amount of pixels that the `node` should be scrolled.
2956
+ * @return {?}
2957
+ */
2958
+ function incrementVerticalScroll(node, amount) {
2959
+ if (node === window) {
2960
+ ((/** @type {?} */ (node))).scrollBy(0, amount);
2961
+ }
2962
+ else {
2963
+ // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
2964
+ ((/** @type {?} */ (node))).scrollTop += amount;
2965
+ }
2966
+ }
2967
+ /**
2968
+ * Increments the horizontal scroll position of a node.
2969
+ * @param {?} node Node whose scroll position should change.
2970
+ * @param {?} amount Amount of pixels that the `node` should be scrolled.
2971
+ * @return {?}
2972
+ */
2973
+ function incrementHorizontalScroll(node, amount) {
2974
+ if (node === window) {
2975
+ ((/** @type {?} */ (node))).scrollBy(amount, 0);
2976
+ }
2977
+ else {
2978
+ // Ideally we could use `Element.scrollBy` here as well, but IE and Edge don't support it.
2979
+ ((/** @type {?} */ (node))).scrollLeft += amount;
2980
+ }
2981
+ }
2982
+ /**
2983
+ * Gets whether the vertical auto-scroll direction of a node.
2984
+ * @param {?} clientRect Dimensions of the node.
2985
+ * @param {?} pointerY Position of the user's pointer along the y axis.
2986
+ * @return {?}
2987
+ */
2988
+ function getVerticalScrollDirection(clientRect, pointerY) {
2989
+ var top = clientRect.top, bottom = clientRect.bottom, height = clientRect.height;
2990
+ /** @type {?} */
2991
+ var yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;
2992
+ if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {
2993
+ return 1 /* UP */;
2994
+ }
2995
+ else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {
2996
+ return 2 /* DOWN */;
2997
+ }
2998
+ return 0 /* NONE */;
2999
+ }
3000
+ /**
3001
+ * Gets whether the horizontal auto-scroll direction of a node.
3002
+ * @param {?} clientRect Dimensions of the node.
3003
+ * @param {?} pointerX Position of the user's pointer along the x axis.
3004
+ * @return {?}
3005
+ */
3006
+ function getHorizontalScrollDirection(clientRect, pointerX) {
3007
+ var left = clientRect.left, right = clientRect.right, width = clientRect.width;
3008
+ /** @type {?} */
3009
+ var xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;
3010
+ if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {
3011
+ return 1 /* LEFT */;
3012
+ }
3013
+ else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {
3014
+ return 2 /* RIGHT */;
3015
+ }
3016
+ return 0 /* NONE */;
3017
+ }
2594
3018
 
2595
3019
  /**
2596
3020
  * @fileoverview added by tsickle
@@ -2643,6 +3067,10 @@ var DragDropRegistry = /** @class */ (function () {
2643
3067
  * while the user is dragging a drag item instance.
2644
3068
  */
2645
3069
  this.pointerUp = new Subject();
3070
+ /**
3071
+ * Emits when the viewport has been scrolled while the user is dragging an item.
3072
+ */
3073
+ this.scroll = new Subject();
2646
3074
  /**
2647
3075
  * Event listener that will prevent the default browser action while the user is dragging.
2648
3076
  * @param event Event whose default action should be prevented.
@@ -2787,6 +3215,13 @@ var DragDropRegistry = /** @class */ (function () {
2787
3215
  */
2788
3216
  function (e) { return _this.pointerUp.next((/** @type {?} */ (e))); }),
2789
3217
  options: true
3218
+ })
3219
+ .set('scroll', {
3220
+ handler: (/**
3221
+ * @param {?} e
3222
+ * @return {?}
3223
+ */
3224
+ function (e) { return _this.scroll.next(e); })
2790
3225
  })
2791
3226
  // Preventing the default action on `mousemove` isn't enough to disable text selection
2792
3227
  // on Safari so we need to prevent the selection event as well. Alternatively this can
@@ -2796,14 +3231,6 @@ var DragDropRegistry = /** @class */ (function () {
2796
3231
  handler: this._preventDefaultWhileDragging,
2797
3232
  options: activeCapturingEventOptions
2798
3233
  });
2799
- // TODO(crisbeto): prevent mouse wheel scrolling while
2800
- // dragging until we've set up proper scroll handling.
2801
- if (!isTouchEvent) {
2802
- this._globalListeners.set('wheel', {
2803
- handler: this._preventDefaultWhileDragging,
2804
- options: activeCapturingEventOptions
2805
- });
2806
- }
2807
3234
  this._ngZone.runOutsideAngular((/**
2808
3235
  * @return {?}
2809
3236
  */
@@ -2995,7 +3422,7 @@ var DragDrop = /** @class */ (function () {
2995
3422
  * @return {?}
2996
3423
  */
2997
3424
  function (element) {
2998
- return new DropListRef(element, this._dragDropRegistry, this._document);
3425
+ return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
2999
3426
  };
3000
3427
  DragDrop.decorators = [
3001
3428
  { type: Injectable, args: [{ providedIn: 'root' },] },
@@ -3823,6 +4250,10 @@ var CdkDropList = /** @class */ (function () {
3823
4250
  * @return {?}
3824
4251
  */
3825
4252
  function () { return true; });
4253
+ /**
4254
+ * Whether to auto-scroll the view when the user moves their pointer close to the edges.
4255
+ */
4256
+ this.autoScrollDisabled = false;
3826
4257
  /**
3827
4258
  * Emits when the user drops an item inside the container.
3828
4259
  */
@@ -4161,6 +4592,7 @@ var CdkDropList = /** @class */ (function () {
4161
4592
  ref.disabled = _this.disabled;
4162
4593
  ref.lockAxis = _this.lockAxis;
4163
4594
  ref.sortingDisabled = _this.sortingDisabled;
4595
+ ref.autoScrollDisabled = _this.autoScrollDisabled;
4164
4596
  ref
4165
4597
  .connectedTo(siblings.filter((/**
4166
4598
  * @param {?} drop
@@ -4295,6 +4727,7 @@ var CdkDropList = /** @class */ (function () {
4295
4727
  disabled: [{ type: Input, args: ['cdkDropListDisabled',] }],
4296
4728
  sortingDisabled: [{ type: Input, args: ['cdkDropListSortingDisabled',] }],
4297
4729
  enterPredicate: [{ type: Input, args: ['cdkDropListEnterPredicate',] }],
4730
+ autoScrollDisabled: [{ type: Input, args: ['cdkDropListAutoScrollDisabled',] }],
4298
4731
  dropped: [{ type: Output, args: ['cdkDropListDropped',] }],
4299
4732
  entered: [{ type: Output, args: ['cdkDropListEntered',] }],
4300
4733
  exited: [{ type: Output, args: ['cdkDropListExited',] }],