@angular/cdk 7.0.3 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/a11y/typings/focus-monitor/focus-monitor.d.ts +20 -4
  2. package/a11y/typings/index.metadata.json +1 -1
  3. package/a11y/typings/key-manager/list-key-manager.d.ts +8 -0
  4. package/a11y/typings/live-announcer/live-announcer.d.ts +37 -4
  5. package/bidi/typings/dir.d.ts +4 -1
  6. package/bidi/typings/index.metadata.json +1 -1
  7. package/bundles/cdk-a11y.umd.js +503 -210
  8. package/bundles/cdk-a11y.umd.js.map +1 -1
  9. package/bundles/cdk-a11y.umd.min.js +1 -1
  10. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  11. package/bundles/cdk-accordion.umd.js +16 -9
  12. package/bundles/cdk-accordion.umd.js.map +1 -1
  13. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  14. package/bundles/cdk-bidi.umd.js +16 -7
  15. package/bundles/cdk-bidi.umd.js.map +1 -1
  16. package/bundles/cdk-bidi.umd.min.js +1 -1
  17. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  18. package/bundles/cdk-coercion.umd.js +5 -5
  19. package/bundles/cdk-coercion.umd.js.map +1 -1
  20. package/bundles/cdk-collections.umd.js +28 -5
  21. package/bundles/cdk-collections.umd.js.map +1 -1
  22. package/bundles/cdk-collections.umd.min.js.map +1 -1
  23. package/bundles/cdk-drag-drop.umd.js +2251 -853
  24. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  25. package/bundles/cdk-drag-drop.umd.min.js +2 -1
  26. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  27. package/bundles/cdk-keycodes.umd.js +33 -1
  28. package/bundles/cdk-keycodes.umd.js.map +1 -1
  29. package/bundles/cdk-keycodes.umd.min.js +1 -1
  30. package/bundles/cdk-keycodes.umd.min.js.map +1 -1
  31. package/bundles/cdk-layout.umd.js +29 -22
  32. package/bundles/cdk-layout.umd.js.map +1 -1
  33. package/bundles/cdk-layout.umd.min.js +1 -1
  34. package/bundles/cdk-layout.umd.min.js.map +1 -1
  35. package/bundles/cdk-observers.umd.js +25 -6
  36. package/bundles/cdk-observers.umd.js.map +1 -1
  37. package/bundles/cdk-observers.umd.min.js.map +1 -1
  38. package/bundles/cdk-overlay.umd.js +600 -243
  39. package/bundles/cdk-overlay.umd.js.map +1 -1
  40. package/bundles/cdk-overlay.umd.min.js +2 -2
  41. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  42. package/bundles/cdk-platform.umd.js +50 -28
  43. package/bundles/cdk-platform.umd.js.map +1 -1
  44. package/bundles/cdk-platform.umd.min.js.map +1 -1
  45. package/bundles/cdk-portal.umd.js +14 -7
  46. package/bundles/cdk-portal.umd.js.map +1 -1
  47. package/bundles/cdk-portal.umd.min.js.map +1 -1
  48. package/bundles/cdk-scrolling.umd.js +143 -48
  49. package/bundles/cdk-scrolling.umd.js.map +1 -1
  50. package/bundles/cdk-scrolling.umd.min.js +1 -1
  51. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  52. package/bundles/cdk-stepper.umd.js +103 -19
  53. package/bundles/cdk-stepper.umd.js.map +1 -1
  54. package/bundles/cdk-stepper.umd.min.js +1 -1
  55. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  56. package/bundles/cdk-table.umd.js +182 -48
  57. package/bundles/cdk-table.umd.js.map +1 -1
  58. package/bundles/cdk-table.umd.min.js.map +1 -1
  59. package/bundles/cdk-text-field.umd.js +70 -32
  60. package/bundles/cdk-text-field.umd.js.map +1 -1
  61. package/bundles/cdk-text-field.umd.min.js +1 -1
  62. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  63. package/bundles/cdk-tree.umd.js +71 -34
  64. package/bundles/cdk-tree.umd.js.map +1 -1
  65. package/bundles/cdk-tree.umd.min.js +1 -1
  66. package/bundles/cdk-tree.umd.min.js.map +1 -1
  67. package/bundles/cdk.umd.js +5 -4
  68. package/bundles/cdk.umd.js.map +1 -1
  69. package/bundles/cdk.umd.min.js +1 -1
  70. package/bundles/cdk.umd.min.js.map +1 -1
  71. package/drag-drop/typings/{drag-handle.d.ts → directives/drag-handle.d.ts} +3 -0
  72. package/drag-drop/typings/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  73. package/drag-drop/typings/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  74. package/drag-drop/typings/directives/drag.d.ts +108 -0
  75. package/drag-drop/typings/directives/drop-list-group.d.ts +22 -0
  76. package/drag-drop/typings/directives/drop-list.d.ts +135 -0
  77. package/drag-drop/typings/drag-drop-registry.d.ts +8 -5
  78. package/drag-drop/typings/drag-events.d.ts +24 -6
  79. package/{typings/esm5/drag-drop/drag.d.ts → drag-drop/typings/drag-ref.d.ts} +153 -77
  80. package/drag-drop/typings/drop-list-container.d.ts +21 -3
  81. package/drag-drop/typings/{drop-list.d.ts → drop-list-ref.d.ts} +133 -77
  82. package/drag-drop/typings/index.d.ts +1 -0
  83. package/drag-drop/typings/index.metadata.json +1 -1
  84. package/drag-drop/typings/public-api.d.ts +13 -5
  85. package/esm2015/a11y.js +353 -189
  86. package/esm2015/a11y.js.map +1 -1
  87. package/esm2015/accordion.js +16 -11
  88. package/esm2015/accordion.js.map +1 -1
  89. package/esm2015/bidi.js +18 -9
  90. package/esm2015/bidi.js.map +1 -1
  91. package/esm2015/cdk.js +7 -6
  92. package/esm2015/cdk.js.map +1 -1
  93. package/esm2015/coercion.js +7 -7
  94. package/esm2015/coercion.js.map +1 -1
  95. package/esm2015/collections.js +22 -7
  96. package/esm2015/collections.js.map +1 -1
  97. package/esm2015/drag-drop.js +1768 -751
  98. package/esm2015/drag-drop.js.map +1 -1
  99. package/esm2015/keycodes.js +31 -4
  100. package/esm2015/keycodes.js.map +1 -1
  101. package/esm2015/layout.js +29 -19
  102. package/esm2015/layout.js.map +1 -1
  103. package/esm2015/observers.js +13 -8
  104. package/esm2015/observers.js.map +1 -1
  105. package/esm2015/overlay.js +384 -219
  106. package/esm2015/overlay.js.map +1 -1
  107. package/esm2015/platform.js +53 -31
  108. package/esm2015/platform.js.map +1 -1
  109. package/esm2015/portal.js +13 -9
  110. package/esm2015/portal.js.map +1 -1
  111. package/esm2015/scrolling.js +106 -49
  112. package/esm2015/scrolling.js.map +1 -1
  113. package/esm2015/stepper.js +93 -24
  114. package/esm2015/stepper.js.map +1 -1
  115. package/esm2015/table.js +89 -45
  116. package/esm2015/table.js.map +1 -1
  117. package/esm2015/text-field.js +51 -34
  118. package/esm2015/text-field.js.map +1 -1
  119. package/esm2015/tree.js +55 -36
  120. package/esm2015/tree.js.map +1 -1
  121. package/esm5/a11y.es5.js +507 -214
  122. package/esm5/a11y.es5.js.map +1 -1
  123. package/esm5/accordion.es5.js +18 -11
  124. package/esm5/accordion.es5.js.map +1 -1
  125. package/esm5/bidi.es5.js +18 -9
  126. package/esm5/bidi.es5.js.map +1 -1
  127. package/esm5/cdk.es5.js +7 -6
  128. package/esm5/cdk.es5.js.map +1 -1
  129. package/esm5/coercion.es5.js +7 -7
  130. package/esm5/coercion.es5.js.map +1 -1
  131. package/esm5/collections.es5.js +35 -7
  132. package/esm5/collections.es5.js.map +1 -1
  133. package/esm5/drag-drop.es5.js +2125 -729
  134. package/esm5/drag-drop.es5.js.map +1 -1
  135. package/esm5/keycodes.es5.js +35 -4
  136. package/esm5/keycodes.es5.js.map +1 -1
  137. package/esm5/layout.es5.js +31 -24
  138. package/esm5/layout.es5.js.map +1 -1
  139. package/esm5/observers.es5.js +27 -8
  140. package/esm5/observers.es5.js.map +1 -1
  141. package/esm5/overlay.es5.js +602 -245
  142. package/esm5/overlay.es5.js.map +1 -1
  143. package/esm5/platform.es5.js +52 -30
  144. package/esm5/platform.es5.js.map +1 -1
  145. package/esm5/portal.es5.js +16 -9
  146. package/esm5/portal.es5.js.map +1 -1
  147. package/esm5/scrolling.es5.js +145 -50
  148. package/esm5/scrolling.es5.js.map +1 -1
  149. package/esm5/stepper.es5.js +106 -24
  150. package/esm5/stepper.es5.js.map +1 -1
  151. package/esm5/table.es5.js +184 -50
  152. package/esm5/table.es5.js.map +1 -1
  153. package/esm5/text-field.es5.js +72 -34
  154. package/esm5/text-field.es5.js.map +1 -1
  155. package/esm5/tree.es5.js +74 -37
  156. package/esm5/tree.es5.js.map +1 -1
  157. package/keycodes/typings/index.metadata.json +1 -1
  158. package/keycodes/typings/modifiers.d.ts +14 -0
  159. package/keycodes/typings/public-api.d.ts +1 -0
  160. package/overlay/typings/index.metadata.json +1 -1
  161. package/package.json +4 -4
  162. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  163. package/schematics/ng-update/upgrade-data.js +2 -1
  164. package/schematics/ng-update/upgrade-data.js.map +1 -1
  165. package/schematics/ng-update/upgrade-rules/index.js +3 -2
  166. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  167. package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  168. package/schematics/utils/ast/ng-module-imports.js +25 -13
  169. package/schematics/utils/ast/ng-module-imports.js.map +1 -1
  170. package/schematics/utils/get-project.js +2 -1
  171. package/schematics/utils/get-project.js.map +1 -1
  172. package/schematics/utils/parse5-element.js +3 -2
  173. package/schematics/utils/parse5-element.js.map +1 -1
  174. package/schematics/utils/project-targets.js +2 -1
  175. package/schematics/utils/project-targets.js.map +1 -1
  176. package/schematics/utils/version-agnostic-typescript.js +3 -2
  177. package/schematics/utils/version-agnostic-typescript.js.map +1 -1
  178. package/scrolling/typings/index.metadata.json +1 -1
  179. package/stepper/typings/index.metadata.json +1 -1
  180. package/stepper/typings/public-api.d.ts +1 -0
  181. package/stepper/typings/step-header.d.ts +15 -0
  182. package/stepper/typings/stepper.d.ts +11 -1
  183. package/text-field/typings/autosize.d.ts +6 -0
  184. package/text-field/typings/index.metadata.json +1 -1
  185. package/tree/typings/nested-node.d.ts +5 -5
  186. package/typings/a11y/focus-monitor/focus-monitor.d.ts +20 -4
  187. package/typings/a11y/index.metadata.json +1 -1
  188. package/typings/a11y/key-manager/list-key-manager.d.ts +8 -0
  189. package/typings/a11y/live-announcer/live-announcer.d.ts +37 -4
  190. package/typings/bidi/dir.d.ts +4 -1
  191. package/typings/bidi/index.metadata.json +1 -1
  192. package/typings/{esm5/drag-drop → drag-drop/directives}/drag-handle.d.ts +3 -0
  193. package/typings/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  194. package/typings/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  195. package/typings/drag-drop/directives/drag.d.ts +108 -0
  196. package/typings/drag-drop/directives/drop-list-group.d.ts +22 -0
  197. package/typings/drag-drop/directives/drop-list.d.ts +135 -0
  198. package/typings/drag-drop/drag-drop-registry.d.ts +8 -5
  199. package/typings/drag-drop/drag-events.d.ts +24 -6
  200. package/typings/drag-drop/{drag.d.ts → drag-ref.d.ts} +153 -77
  201. package/typings/drag-drop/drop-list-container.d.ts +21 -3
  202. package/typings/{esm5/drag-drop/drop-list.d.ts → drag-drop/drop-list-ref.d.ts} +133 -77
  203. package/typings/drag-drop/index.d.ts +1 -0
  204. package/typings/drag-drop/index.metadata.json +1 -1
  205. package/typings/drag-drop/public-api.d.ts +13 -5
  206. package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +20 -4
  207. package/typings/esm5/a11y/index.metadata.json +1 -1
  208. package/typings/esm5/a11y/key-manager/list-key-manager.d.ts +8 -0
  209. package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +37 -4
  210. package/typings/esm5/bidi/dir.d.ts +4 -1
  211. package/typings/esm5/bidi/index.metadata.json +1 -1
  212. package/typings/{drag-drop → esm5/drag-drop/directives}/drag-handle.d.ts +3 -0
  213. package/typings/esm5/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  214. package/typings/esm5/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  215. package/typings/esm5/drag-drop/directives/drag.d.ts +108 -0
  216. package/typings/esm5/drag-drop/directives/drop-list-group.d.ts +22 -0
  217. package/typings/esm5/drag-drop/directives/drop-list.d.ts +135 -0
  218. package/typings/esm5/drag-drop/drag-drop-registry.d.ts +8 -5
  219. package/typings/esm5/drag-drop/drag-events.d.ts +24 -6
  220. package/{drag-drop/typings/drag.d.ts → typings/esm5/drag-drop/drag-ref.d.ts} +153 -77
  221. package/typings/esm5/drag-drop/drop-list-container.d.ts +21 -3
  222. package/typings/{drag-drop/drop-list.d.ts → esm5/drag-drop/drop-list-ref.d.ts} +133 -77
  223. package/typings/esm5/drag-drop/index.d.ts +1 -0
  224. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  225. package/typings/esm5/drag-drop/public-api.d.ts +13 -5
  226. package/typings/esm5/index.metadata.json +1 -1
  227. package/typings/esm5/keycodes/index.metadata.json +1 -1
  228. package/typings/esm5/keycodes/modifiers.d.ts +14 -0
  229. package/typings/esm5/keycodes/public-api.d.ts +1 -0
  230. package/typings/esm5/overlay/index.metadata.json +1 -1
  231. package/typings/esm5/scrolling/index.metadata.json +1 -1
  232. package/typings/esm5/stepper/index.metadata.json +1 -1
  233. package/typings/esm5/stepper/public-api.d.ts +1 -0
  234. package/typings/esm5/stepper/step-header.d.ts +15 -0
  235. package/typings/esm5/stepper/stepper.d.ts +11 -1
  236. package/typings/esm5/text-field/autosize.d.ts +6 -0
  237. package/typings/esm5/text-field/index.metadata.json +1 -1
  238. package/typings/esm5/tree/nested-node.d.ts +5 -5
  239. package/typings/index.metadata.json +1 -1
  240. package/typings/keycodes/index.metadata.json +1 -1
  241. package/typings/keycodes/modifiers.d.ts +14 -0
  242. package/typings/keycodes/public-api.d.ts +1 -0
  243. package/typings/overlay/index.metadata.json +1 -1
  244. package/typings/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  245. package/typings/scrolling/index.metadata.json +1 -1
  246. package/typings/stepper/index.metadata.json +1 -1
  247. package/typings/stepper/public-api.d.ts +1 -0
  248. package/typings/stepper/step-header.d.ts +15 -0
  249. package/typings/stepper/stepper.d.ts +11 -1
  250. package/typings/text-field/autosize.d.ts +6 -0
  251. package/typings/text-field/index.metadata.json +1 -1
  252. package/typings/tree/nested-node.d.ts +5 -5
@@ -16,16 +16,17 @@ import { ArrayDataSource, DataSource } from '@angular/cdk/collections';
16
16
 
17
17
  /**
18
18
  * @fileoverview added by tsickle
19
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
19
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
20
20
  */
21
- /** *
21
+ /**
22
22
  * The injection token used to specify the virtual scrolling strategy.
23
- @type {?} */
23
+ * @type {?}
24
+ */
24
25
  var VIRTUAL_SCROLL_STRATEGY = new InjectionToken('VIRTUAL_SCROLL_STRATEGY');
25
26
 
26
27
  /**
27
28
  * @fileoverview added by tsickle
28
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
29
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
29
30
  */
30
31
  /**
31
32
  * Virtual scrolling strategy for lists with items of known fixed size.
@@ -149,9 +150,7 @@ FixedSizeVirtualScrollStrategy = /** @class */ (function () {
149
150
  * \@docs-private Implemented as part of VirtualScrollStrategy.
150
151
  * @return {?}
151
152
  */
152
- function () {
153
- /* no-op */
154
- };
153
+ function () { };
155
154
  /** @docs-private Implemented as part of VirtualScrollStrategy. */
156
155
  /**
157
156
  * \@docs-private Implemented as part of VirtualScrollStrategy.
@@ -161,9 +160,7 @@ FixedSizeVirtualScrollStrategy = /** @class */ (function () {
161
160
  * \@docs-private Implemented as part of VirtualScrollStrategy.
162
161
  * @return {?}
163
162
  */
164
- function () {
165
- /* no-op */
166
- };
163
+ function () { };
167
164
  /**
168
165
  * Scroll to the offset for the given index.
169
166
  * @param index The index of the element to scroll to.
@@ -186,12 +183,15 @@ FixedSizeVirtualScrollStrategy = /** @class */ (function () {
186
183
  this._viewport.scrollToOffset(index * this._itemSize, behavior);
187
184
  }
188
185
  };
186
+ /** Update the viewport's total content size. */
189
187
  /**
190
188
  * Update the viewport's total content size.
189
+ * @private
191
190
  * @return {?}
192
191
  */
193
192
  FixedSizeVirtualScrollStrategy.prototype._updateTotalContentSize = /**
194
193
  * Update the viewport's total content size.
194
+ * @private
195
195
  * @return {?}
196
196
  */
197
197
  function () {
@@ -200,12 +200,15 @@ FixedSizeVirtualScrollStrategy = /** @class */ (function () {
200
200
  }
201
201
  this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize);
202
202
  };
203
+ /** Update the viewport's rendered range. */
203
204
  /**
204
205
  * Update the viewport's rendered range.
206
+ * @private
205
207
  * @return {?}
206
208
  */
207
209
  FixedSizeVirtualScrollStrategy.prototype._updateRenderedRange = /**
208
210
  * Update the viewport's rendered range.
211
+ * @private
209
212
  * @return {?}
210
213
  */
211
214
  function () {
@@ -353,11 +356,12 @@ var CdkFixedSizeVirtualScroll = /** @class */ (function () {
353
356
 
354
357
  /**
355
358
  * @fileoverview added by tsickle
356
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
359
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
357
360
  */
358
- /** *
361
+ /**
359
362
  * Time in ms to throttle the scrolling events by default.
360
- @type {?} */
363
+ * @type {?}
364
+ */
361
365
  var DEFAULT_SCROLL_TIME = 20;
362
366
  /**
363
367
  * Service contained all registered Scrollable references and emits an event when any one of the
@@ -404,10 +408,10 @@ var ScrollDispatcher = /** @class */ (function () {
404
408
  */
405
409
  function (scrollable) {
406
410
  var _this = this;
407
- /** @type {?} */
408
- var scrollSubscription = scrollable.elementScrolled()
409
- .subscribe(function () { return _this._scrolled.next(scrollable); });
410
- this.scrollContainers.set(scrollable, scrollSubscription);
411
+ if (!this.scrollContainers.has(scrollable)) {
412
+ this.scrollContainers.set(scrollable, scrollable.elementScrolled()
413
+ .subscribe(function () { return _this._scrolled.next(scrollable); }));
414
+ }
411
415
  };
412
416
  /**
413
417
  * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.
@@ -475,6 +479,8 @@ var ScrollDispatcher = /** @class */ (function () {
475
479
  if (!_this._globalSubscription) {
476
480
  _this._addGlobalListener();
477
481
  }
482
+ // In the case of a 0ms delay, use an observable without auditTime
483
+ // since it does add a perceptible delay in processing overhead.
478
484
  /** @type {?} */
479
485
  var subscription = auditTimeInMs > 0 ?
480
486
  _this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :
@@ -550,14 +556,17 @@ var ScrollDispatcher = /** @class */ (function () {
550
556
  });
551
557
  return scrollingContainers;
552
558
  };
559
+ /** Returns true if the element is contained within the provided Scrollable. */
553
560
  /**
554
561
  * Returns true if the element is contained within the provided Scrollable.
562
+ * @private
555
563
  * @param {?} scrollable
556
564
  * @param {?} elementRef
557
565
  * @return {?}
558
566
  */
559
567
  ScrollDispatcher.prototype._scrollableContainsElement = /**
560
568
  * Returns true if the element is contained within the provided Scrollable.
569
+ * @private
561
570
  * @param {?} scrollable
562
571
  * @param {?} elementRef
563
572
  * @return {?}
@@ -573,15 +582,18 @@ var ScrollDispatcher = /** @class */ (function () {
573
582
  if (element == scrollableElement) {
574
583
  return true;
575
584
  }
576
- } while (element = /** @type {?} */ ((element)).parentElement);
585
+ } while (element = (/** @type {?} */ (element)).parentElement);
577
586
  return false;
578
587
  };
588
+ /** Sets up the global scroll listeners. */
579
589
  /**
580
590
  * Sets up the global scroll listeners.
591
+ * @private
581
592
  * @return {?}
582
593
  */
583
594
  ScrollDispatcher.prototype._addGlobalListener = /**
584
595
  * Sets up the global scroll listeners.
596
+ * @private
585
597
  * @return {?}
586
598
  */
587
599
  function () {
@@ -590,12 +602,15 @@ var ScrollDispatcher = /** @class */ (function () {
590
602
  return fromEvent(window.document, 'scroll').subscribe(function () { return _this._scrolled.next(); });
591
603
  });
592
604
  };
605
+ /** Cleans up the global scroll listener. */
593
606
  /**
594
607
  * Cleans up the global scroll listener.
608
+ * @private
595
609
  * @return {?}
596
610
  */
597
611
  ScrollDispatcher.prototype._removeGlobalListener = /**
598
612
  * Cleans up the global scroll listener.
613
+ * @private
599
614
  * @return {?}
600
615
  */
601
616
  function () {
@@ -625,9 +640,10 @@ var ScrollDispatcher = /** @class */ (function () {
625
640
  function SCROLL_DISPATCHER_PROVIDER_FACTORY(parentDispatcher, ngZone, platform) {
626
641
  return parentDispatcher || new ScrollDispatcher(ngZone, platform);
627
642
  }
628
- /** *
643
+ /**
629
644
  * \@docs-private \@deprecated \@breaking-change 8.0.0
630
- @type {?} */
645
+ * @type {?}
646
+ */
631
647
  var SCROLL_DISPATCHER_PROVIDER = {
632
648
  // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.
633
649
  provide: ScrollDispatcher,
@@ -637,7 +653,7 @@ var SCROLL_DISPATCHER_PROVIDER = {
637
653
 
638
654
  /**
639
655
  * @fileoverview added by tsickle
640
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
656
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
641
657
  */
642
658
  /**
643
659
  * Sends an event when the directive's element is scrolled. Registers itself with the
@@ -761,10 +777,12 @@ var CdkScrollable = /** @class */ (function () {
761
777
  this._applyScrollToOptions(options);
762
778
  };
763
779
  /**
780
+ * @private
764
781
  * @param {?} options
765
782
  * @return {?}
766
783
  */
767
784
  CdkScrollable.prototype._applyScrollToOptions = /**
785
+ * @private
768
786
  * @param {?} options
769
787
  * @return {?}
770
788
  */
@@ -825,6 +843,7 @@ var CdkScrollable = /** @class */ (function () {
825
843
  if (from == 'bottom') {
826
844
  return el.scrollHeight - el.clientHeight - el.scrollTop;
827
845
  }
846
+ // Rewrite start & end as left or right offsets.
828
847
  /** @type {?} */
829
848
  var isRtl = this.dir && this.dir.value == 'rtl';
830
849
  if (from == 'start') {
@@ -881,7 +900,7 @@ var CdkScrollable = /** @class */ (function () {
881
900
 
882
901
  /**
883
902
  * @fileoverview added by tsickle
884
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
903
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
885
904
  */
886
905
  /**
887
906
  * Checks if the given ranges are equal.
@@ -914,6 +933,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
914
933
  * The direction the viewport scrolls.
915
934
  */
916
935
  _this.orientation = 'vertical';
936
+ // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
937
+ // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
938
+ // depending on how the strategy calculates the scrolled index, it may come at a cost to
939
+ // performance.
917
940
  /**
918
941
  * Emits when the index of the first element visible in the viewport changes.
919
942
  */
@@ -988,7 +1011,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
988
1011
  _this.elementScrolled()
989
1012
  .pipe(
990
1013
  // Start off with a fake scroll event so we properly detect our initial position.
991
- startWith(/** @type {?} */ ((null))),
1014
+ startWith((/** @type {?} */ (null))),
992
1015
  // Collect multiple events into one until the next animation frame. This way if
993
1016
  // there are multiple scroll events in the same frame we only need to recheck
994
1017
  // our layout once.
@@ -1085,11 +1108,20 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1085
1108
  // setting it to something else, but its error prone and should probably be split into
1086
1109
  // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
1087
1110
  /** Get the current rendered range of items. */
1111
+ // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
1112
+ // cycle happens. I'm being careful to only call it after the render cycle is complete and before
1113
+ // setting it to something else, but its error prone and should probably be split into
1114
+ // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
1088
1115
  /**
1089
1116
  * Get the current rendered range of items.
1090
1117
  * @return {?}
1091
1118
  */
1092
- CdkVirtualScrollViewport.prototype.getRenderedRange = /**
1119
+ CdkVirtualScrollViewport.prototype.getRenderedRange =
1120
+ // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
1121
+ // cycle happens. I'm being careful to only call it after the render cycle is complete and before
1122
+ // setting it to something else, but its error prone and should probably be split into
1123
+ // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
1124
+ /**
1093
1125
  * Get the current rendered range of items.
1094
1126
  * @return {?}
1095
1127
  */
@@ -1174,6 +1206,8 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1174
1206
  function (offset, to) {
1175
1207
  var _this = this;
1176
1208
  if (to === void 0) { to = 'to-start'; }
1209
+ // For a horizontal viewport in a right-to-left language we need to translate along the x-axis
1210
+ // in the negative direction.
1177
1211
  /** @type {?} */
1178
1212
  var isRtl = this.dir && this.dir.value == 'rtl';
1179
1213
  /** @type {?} */
@@ -1334,12 +1368,15 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1334
1368
  this._measureViewportSize();
1335
1369
  this._scrollStrategy.onDataLengthChanged();
1336
1370
  };
1371
+ /** Measure the viewport size. */
1337
1372
  /**
1338
1373
  * Measure the viewport size.
1374
+ * @private
1339
1375
  * @return {?}
1340
1376
  */
1341
1377
  CdkVirtualScrollViewport.prototype._measureViewportSize = /**
1342
1378
  * Measure the viewport size.
1379
+ * @private
1343
1380
  * @return {?}
1344
1381
  */
1345
1382
  function () {
@@ -1348,13 +1385,16 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1348
1385
  this._viewportSize = this.orientation === 'horizontal' ?
1349
1386
  viewportEl.clientWidth : viewportEl.clientHeight;
1350
1387
  };
1388
+ /** Queue up change detection to run. */
1351
1389
  /**
1352
1390
  * Queue up change detection to run.
1391
+ * @private
1353
1392
  * @param {?=} runAfter
1354
1393
  * @return {?}
1355
1394
  */
1356
1395
  CdkVirtualScrollViewport.prototype._markChangeDetectionNeeded = /**
1357
1396
  * Queue up change detection to run.
1397
+ * @private
1358
1398
  * @param {?=} runAfter
1359
1399
  * @return {?}
1360
1400
  */
@@ -1372,12 +1412,15 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1372
1412
  }); });
1373
1413
  }
1374
1414
  };
1415
+ /** Run change detection. */
1375
1416
  /**
1376
1417
  * Run change detection.
1418
+ * @private
1377
1419
  * @return {?}
1378
1420
  */
1379
1421
  CdkVirtualScrollViewport.prototype._doChangeDetection = /**
1380
1422
  * Run change detection.
1423
+ * @private
1381
1424
  * @return {?}
1382
1425
  */
1383
1426
  function () {
@@ -1407,10 +1450,14 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1407
1450
  host: {
1408
1451
  'class': 'cdk-virtual-scroll-viewport',
1409
1452
  '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
1410
- '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation === "vertical"',
1453
+ '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
1411
1454
  },
1412
1455
  encapsulation: ViewEncapsulation.None,
1413
1456
  changeDetection: ChangeDetectionStrategy.OnPush,
1457
+ providers: [{
1458
+ provide: CdkScrollable,
1459
+ useExisting: CdkVirtualScrollViewport,
1460
+ }]
1414
1461
  },] },
1415
1462
  ];
1416
1463
  /** @nocollapse */
@@ -1432,7 +1479,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1432
1479
 
1433
1480
  /**
1434
1481
  * @fileoverview added by tsickle
1435
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1482
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1436
1483
  */
1437
1484
  /**
1438
1485
  * Helper to extract size from a DOM Node.
@@ -1442,7 +1489,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1442
1489
  */
1443
1490
  function getSize(orientation, node) {
1444
1491
  /** @type {?} */
1445
- var el = /** @type {?} */ (node);
1492
+ var el = (/** @type {?} */ (node));
1446
1493
  if (!el.getBoundingClientRect) {
1447
1494
  return 0;
1448
1495
  }
@@ -1456,8 +1503,7 @@ function getSize(orientation, node) {
1456
1503
  * @template T
1457
1504
  */
1458
1505
  var CdkVirtualForOf = /** @class */ (function () {
1459
- function CdkVirtualForOf(_viewContainerRef, _template, _differs, /** The virtual scrolling viewport that these items are being rendered in. */
1460
- _viewport, ngZone) {
1506
+ function CdkVirtualForOf(_viewContainerRef, _template, _differs, _viewport, ngZone) {
1461
1507
  var _this = this;
1462
1508
  this._viewContainerRef = _viewContainerRef;
1463
1509
  this._template = _template;
@@ -1482,7 +1528,7 @@ var CdkVirtualForOf = /** @class */ (function () {
1482
1528
  this.dataStream = this._dataSourceChanges
1483
1529
  .pipe(
1484
1530
  // Start off with null `DataSource`.
1485
- startWith(/** @type {?} */ ((null))),
1531
+ startWith((/** @type {?} */ (null))),
1486
1532
  // Bundle up the previous and current data sources so we can work with both.
1487
1533
  pairwise(),
1488
1534
  // Use `_changeDataSource` to disconnect from the previous data source and connect to the
@@ -1615,21 +1661,24 @@ var CdkVirtualForOf = /** @class */ (function () {
1615
1661
  if (range.start < this._renderedRange.start || range.end > this._renderedRange.end) {
1616
1662
  throw Error("Error: attempted to measure an item that isn't rendered.");
1617
1663
  }
1664
+ // The index into the list of rendered views for the first item in the range.
1618
1665
  /** @type {?} */
1619
1666
  var renderedStartIndex = range.start - this._renderedRange.start;
1667
+ // The length of the range we're measuring.
1620
1668
  /** @type {?} */
1621
1669
  var rangeLen = range.end - range.start;
1670
+ // Loop over all root nodes for all items in the range and sum up their size.
1622
1671
  /** @type {?} */
1623
1672
  var totalSize = 0;
1624
1673
  /** @type {?} */
1625
1674
  var i = rangeLen;
1626
1675
  while (i--) {
1627
1676
  /** @type {?} */
1628
- var view = /** @type {?} */ (this._viewContainerRef.get(i + renderedStartIndex));
1677
+ var view = (/** @type {?} */ (this._viewContainerRef.get(i + renderedStartIndex)));
1629
1678
  /** @type {?} */
1630
1679
  var j = view ? view.rootNodes.length : 0;
1631
1680
  while (j--) {
1632
- totalSize += getSize(orientation, /** @type {?} */ ((view)).rootNodes[j]);
1681
+ totalSize += getSize(orientation, (/** @type {?} */ (view)).rootNodes[j]);
1633
1682
  }
1634
1683
  }
1635
1684
  return totalSize;
@@ -1642,6 +1691,9 @@ var CdkVirtualForOf = /** @class */ (function () {
1642
1691
  */
1643
1692
  function () {
1644
1693
  if (this._differ && this._needsUpdate) {
1694
+ // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of
1695
+ // this list being rendered (can use simpler algorithm) vs needs update due to data actually
1696
+ // changing (need to do this diff).
1645
1697
  /** @type {?} */
1646
1698
  var changes = this._differ.diff(this._renderedItems);
1647
1699
  if (!changes) {
@@ -1670,12 +1722,15 @@ var CdkVirtualForOf = /** @class */ (function () {
1670
1722
  view.destroy();
1671
1723
  }
1672
1724
  };
1725
+ /** React to scroll state changes in the viewport. */
1673
1726
  /**
1674
1727
  * React to scroll state changes in the viewport.
1728
+ * @private
1675
1729
  * @return {?}
1676
1730
  */
1677
1731
  CdkVirtualForOf.prototype._onRenderedDataChange = /**
1678
1732
  * React to scroll state changes in the viewport.
1733
+ * @private
1679
1734
  * @return {?}
1680
1735
  */
1681
1736
  function () {
@@ -1688,14 +1743,17 @@ var CdkVirtualForOf = /** @class */ (function () {
1688
1743
  }
1689
1744
  this._needsUpdate = true;
1690
1745
  };
1746
+ /** Swap out one `DataSource` for another. */
1691
1747
  /**
1692
1748
  * Swap out one `DataSource` for another.
1749
+ * @private
1693
1750
  * @param {?} oldDs
1694
1751
  * @param {?} newDs
1695
1752
  * @return {?}
1696
1753
  */
1697
1754
  CdkVirtualForOf.prototype._changeDataSource = /**
1698
1755
  * Swap out one `DataSource` for another.
1756
+ * @private
1699
1757
  * @param {?} oldDs
1700
1758
  * @param {?} newDs
1701
1759
  * @return {?}
@@ -1707,12 +1765,15 @@ var CdkVirtualForOf = /** @class */ (function () {
1707
1765
  this._needsUpdate = true;
1708
1766
  return newDs.connect(this);
1709
1767
  };
1768
+ /** Update the `CdkVirtualForOfContext` for all views. */
1710
1769
  /**
1711
1770
  * Update the `CdkVirtualForOfContext` for all views.
1771
+ * @private
1712
1772
  * @return {?}
1713
1773
  */
1714
1774
  CdkVirtualForOf.prototype._updateContext = /**
1715
1775
  * Update the `CdkVirtualForOfContext` for all views.
1776
+ * @private
1716
1777
  * @return {?}
1717
1778
  */
1718
1779
  function () {
@@ -1722,20 +1783,23 @@ var CdkVirtualForOf = /** @class */ (function () {
1722
1783
  var i = this._viewContainerRef.length;
1723
1784
  while (i--) {
1724
1785
  /** @type {?} */
1725
- var view = /** @type {?} */ (this._viewContainerRef.get(i));
1786
+ var view = (/** @type {?} */ (this._viewContainerRef.get(i)));
1726
1787
  view.context.index = this._renderedRange.start + i;
1727
1788
  view.context.count = count;
1728
1789
  this._updateComputedContextProperties(view.context);
1729
1790
  view.detectChanges();
1730
1791
  }
1731
1792
  };
1793
+ /** Apply changes to the DOM. */
1732
1794
  /**
1733
1795
  * Apply changes to the DOM.
1796
+ * @private
1734
1797
  * @param {?} changes
1735
1798
  * @return {?}
1736
1799
  */
1737
1800
  CdkVirtualForOf.prototype._applyChanges = /**
1738
1801
  * Apply changes to the DOM.
1802
+ * @private
1739
1803
  * @param {?} changes
1740
1804
  * @return {?}
1741
1805
  */
@@ -1744,18 +1808,19 @@ var CdkVirtualForOf = /** @class */ (function () {
1744
1808
  // Rearrange the views to put them in the right location.
1745
1809
  changes.forEachOperation(function (record, adjustedPreviousIndex, currentIndex) {
1746
1810
  if (record.previousIndex == null) { // Item added.
1811
+ // Item added.
1747
1812
  /** @type {?} */
1748
1813
  var view = _this._getViewForNewItem();
1749
- _this._viewContainerRef.insert(view, /** @type {?} */ ((currentIndex)));
1814
+ _this._viewContainerRef.insert(view, (/** @type {?} */ (currentIndex)));
1750
1815
  view.context.$implicit = record.item;
1751
1816
  }
1752
1817
  else if (currentIndex == null) { // Item removed.
1753
- // Item removed.
1754
- _this._cacheView(/** @type {?} */ (_this._viewContainerRef.detach(/** @type {?} */ ((adjustedPreviousIndex)))));
1818
+ _this._cacheView((/** @type {?} */ (_this._viewContainerRef.detach((/** @type {?} */ (adjustedPreviousIndex))))));
1755
1819
  }
1756
1820
  else { // Item moved.
1821
+ // Item moved.
1757
1822
  /** @type {?} */
1758
- var view = /** @type {?} */ (_this._viewContainerRef.get(/** @type {?} */ ((adjustedPreviousIndex))));
1823
+ var view = (/** @type {?} */ (_this._viewContainerRef.get((/** @type {?} */ (adjustedPreviousIndex)))));
1759
1824
  _this._viewContainerRef.move(view, currentIndex);
1760
1825
  view.context.$implicit = record.item;
1761
1826
  }
@@ -1763,28 +1828,32 @@ var CdkVirtualForOf = /** @class */ (function () {
1763
1828
  // Update $implicit for any items that had an identity change.
1764
1829
  changes.forEachIdentityChange(function (record) {
1765
1830
  /** @type {?} */
1766
- var view = /** @type {?} */ (_this._viewContainerRef.get(/** @type {?} */ ((record.currentIndex))));
1831
+ var view = (/** @type {?} */ (_this._viewContainerRef.get((/** @type {?} */ (record.currentIndex)))));
1767
1832
  view.context.$implicit = record.item;
1768
1833
  });
1834
+ // Update the context variables on all items.
1769
1835
  /** @type {?} */
1770
1836
  var count = this._data.length;
1771
1837
  /** @type {?} */
1772
1838
  var i = this._viewContainerRef.length;
1773
1839
  while (i--) {
1774
1840
  /** @type {?} */
1775
- var view = /** @type {?} */ (this._viewContainerRef.get(i));
1841
+ var view = (/** @type {?} */ (this._viewContainerRef.get(i)));
1776
1842
  view.context.index = this._renderedRange.start + i;
1777
1843
  view.context.count = count;
1778
1844
  this._updateComputedContextProperties(view.context);
1779
1845
  }
1780
1846
  };
1847
+ /** Cache the given detached view. */
1781
1848
  /**
1782
1849
  * Cache the given detached view.
1850
+ * @private
1783
1851
  * @param {?} view
1784
1852
  * @return {?}
1785
1853
  */
1786
1854
  CdkVirtualForOf.prototype._cacheView = /**
1787
1855
  * Cache the given detached view.
1856
+ * @private
1788
1857
  * @param {?} view
1789
1858
  * @return {?}
1790
1859
  */
@@ -1806,17 +1875,20 @@ var CdkVirtualForOf = /** @class */ (function () {
1806
1875
  }
1807
1876
  }
1808
1877
  };
1878
+ /** Get a view for a new item, either from the cache or by creating a new one. */
1809
1879
  /**
1810
1880
  * Get a view for a new item, either from the cache or by creating a new one.
1881
+ * @private
1811
1882
  * @return {?}
1812
1883
  */
1813
1884
  CdkVirtualForOf.prototype._getViewForNewItem = /**
1814
1885
  * Get a view for a new item, either from the cache or by creating a new one.
1886
+ * @private
1815
1887
  * @return {?}
1816
1888
  */
1817
1889
  function () {
1818
1890
  return this._templateCache.pop() || this._viewContainerRef.createEmbeddedView(this._template, {
1819
- $implicit: /** @type {?} */ ((null)),
1891
+ $implicit: (/** @type {?} */ (null)),
1820
1892
  cdkVirtualForOf: this._cdkVirtualForOf,
1821
1893
  index: -1,
1822
1894
  count: -1,
@@ -1826,13 +1898,16 @@ var CdkVirtualForOf = /** @class */ (function () {
1826
1898
  even: false
1827
1899
  });
1828
1900
  };
1901
+ /** Update the computed properties on the `CdkVirtualForOfContext`. */
1829
1902
  /**
1830
1903
  * Update the computed properties on the `CdkVirtualForOfContext`.
1904
+ * @private
1831
1905
  * @param {?} context
1832
1906
  * @return {?}
1833
1907
  */
1834
1908
  CdkVirtualForOf.prototype._updateComputedContextProperties = /**
1835
1909
  * Update the computed properties on the `CdkVirtualForOfContext`.
1910
+ * @private
1836
1911
  * @param {?} context
1837
1912
  * @return {?}
1838
1913
  */
@@ -1866,7 +1941,7 @@ var CdkVirtualForOf = /** @class */ (function () {
1866
1941
 
1867
1942
  /**
1868
1943
  * @fileoverview added by tsickle
1869
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1944
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1870
1945
  */
1871
1946
  var ScrollingModule = /** @class */ (function () {
1872
1947
  function ScrollingModule() {
@@ -1909,11 +1984,12 @@ var ScrollDispatchModule = /** @class */ (function () {
1909
1984
 
1910
1985
  /**
1911
1986
  * @fileoverview added by tsickle
1912
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1987
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1913
1988
  */
1914
- /** *
1989
+ /**
1915
1990
  * Time in ms to throttle the resize events by default.
1916
- @type {?} */
1991
+ * @type {?}
1992
+ */
1917
1993
  var DEFAULT_RESIZE_TIME = 20;
1918
1994
  /**
1919
1995
  * Simple utility for getting the bounds of the browser viewport.
@@ -1958,7 +2034,7 @@ var ViewportRuler = /** @class */ (function () {
1958
2034
  var output = { width: this._viewportSize.width, height: this._viewportSize.height };
1959
2035
  // If we're not on a browser, don't cache the size since it'll be mocked out anyway.
1960
2036
  if (!this._platform.isBrowser) {
1961
- this._viewportSize = /** @type {?} */ ((null));
2037
+ this._viewportSize = (/** @type {?} */ (null));
1962
2038
  }
1963
2039
  return output;
1964
2040
  };
@@ -1972,6 +2048,15 @@ var ViewportRuler = /** @class */ (function () {
1972
2048
  * @return {?}
1973
2049
  */
1974
2050
  function () {
2051
+ // Use the document element's bounding rect rather than the window scroll properties
2052
+ // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll
2053
+ // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different
2054
+ // conceptual viewports. Under most circumstances these viewports are equivalent, but they
2055
+ // can disagree when the page is pinch-zoomed (on devices that support touch).
2056
+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4
2057
+ // We use the documentElement instead of the body because, by default (without a css reset)
2058
+ // browsers typically give the document body an 8px margin, which is not included in
2059
+ // getBoundingClientRect().
1975
2060
  /** @type {?} */
1976
2061
  var scrollPosition = this.getViewportScrollPosition();
1977
2062
  var _a = this.getViewportSize(), width = _a.width, height = _a.height;
@@ -1999,8 +2084,14 @@ var ViewportRuler = /** @class */ (function () {
1999
2084
  if (!this._platform.isBrowser) {
2000
2085
  return { top: 0, left: 0 };
2001
2086
  }
2087
+ // The top-left-corner of the viewport is determined by the scroll position of the document
2088
+ // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about
2089
+ // whether `document.body` or `document.documentElement` is the scrolled element, so reading
2090
+ // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of
2091
+ // `document.documentElement` works consistently, where the `top` and `left` values will
2092
+ // equal negative the scroll position.
2002
2093
  /** @type {?} */
2003
- var documentElement = /** @type {?} */ ((document.documentElement));
2094
+ var documentElement = (/** @type {?} */ (document.documentElement));
2004
2095
  /** @type {?} */
2005
2096
  var documentRect = documentElement.getBoundingClientRect();
2006
2097
  /** @type {?} */
@@ -2029,12 +2120,15 @@ var ViewportRuler = /** @class */ (function () {
2029
2120
  if (throttleTime === void 0) { throttleTime = DEFAULT_RESIZE_TIME; }
2030
2121
  return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;
2031
2122
  };
2123
+ /** Updates the cached viewport size. */
2032
2124
  /**
2033
2125
  * Updates the cached viewport size.
2126
+ * @private
2034
2127
  * @return {?}
2035
2128
  */
2036
2129
  ViewportRuler.prototype._updateViewportSize = /**
2037
2130
  * Updates the cached viewport size.
2131
+ * @private
2038
2132
  * @return {?}
2039
2133
  */
2040
2134
  function () {
@@ -2063,9 +2157,10 @@ var ViewportRuler = /** @class */ (function () {
2063
2157
  function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler, platform, ngZone) {
2064
2158
  return parentRuler || new ViewportRuler(platform, ngZone);
2065
2159
  }
2066
- /** *
2160
+ /**
2067
2161
  * \@docs-private \@deprecated \@breaking-change 8.0.0
2068
- @type {?} */
2162
+ * @type {?}
2163
+ */
2069
2164
  var VIEWPORT_RULER_PROVIDER = {
2070
2165
  // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.
2071
2166
  provide: ViewportRuler,
@@ -2075,12 +2170,12 @@ var VIEWPORT_RULER_PROVIDER = {
2075
2170
 
2076
2171
  /**
2077
2172
  * @fileoverview added by tsickle
2078
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2173
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2079
2174
  */
2080
2175
 
2081
2176
  /**
2082
2177
  * @fileoverview added by tsickle
2083
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2178
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2084
2179
  */
2085
2180
 
2086
2181
  export { _fixedSizeVirtualScrollStrategyFactory, FixedSizeVirtualScrollStrategy, CdkFixedSizeVirtualScroll, SCROLL_DISPATCHER_PROVIDER_FACTORY, DEFAULT_SCROLL_TIME, ScrollDispatcher, SCROLL_DISPATCHER_PROVIDER, CdkScrollable, ScrollingModule, ScrollDispatchModule, VIEWPORT_RULER_PROVIDER_FACTORY, DEFAULT_RESIZE_TIME, ViewportRuler, VIEWPORT_RULER_PROVIDER, CdkVirtualForOf, VIRTUAL_SCROLL_STRATEGY, CdkVirtualScrollViewport };