@angular/cdk 8.0.0-beta.2 → 8.0.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 (219) hide show
  1. package/README.md +2 -2
  2. package/_overlay.scss +4 -4
  3. package/bundles/cdk-a11y.umd.js +227 -79
  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-accordion.umd.js +20 -8
  8. package/bundles/cdk-accordion.umd.js.map +1 -1
  9. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  10. package/bundles/cdk-bidi.umd.js +5 -5
  11. package/bundles/cdk-bidi.umd.min.js +1 -1
  12. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  13. package/bundles/cdk-coercion.umd.js +5 -5
  14. package/bundles/cdk-collections.umd.js +38 -15
  15. package/bundles/cdk-collections.umd.js.map +1 -1
  16. package/bundles/cdk-collections.umd.min.js +1 -1
  17. package/bundles/cdk-collections.umd.min.js.map +1 -1
  18. package/bundles/cdk-drag-drop.umd.js +571 -180
  19. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  20. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  21. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  22. package/bundles/cdk-keycodes.umd.js +7 -3
  23. package/bundles/cdk-keycodes.umd.js.map +1 -1
  24. package/bundles/cdk-keycodes.umd.min.js.map +1 -1
  25. package/bundles/cdk-layout.umd.js +83 -30
  26. package/bundles/cdk-layout.umd.js.map +1 -1
  27. package/bundles/cdk-layout.umd.min.js +1 -1
  28. package/bundles/cdk-layout.umd.min.js.map +1 -1
  29. package/bundles/cdk-observers.umd.js +30 -11
  30. package/bundles/cdk-observers.umd.js.map +1 -1
  31. package/bundles/cdk-observers.umd.min.js +1 -1
  32. package/bundles/cdk-observers.umd.min.js.map +1 -1
  33. package/bundles/cdk-overlay.umd.js +229 -108
  34. package/bundles/cdk-overlay.umd.js.map +1 -1
  35. package/bundles/cdk-overlay.umd.min.js +2 -2
  36. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  37. package/bundles/cdk-platform.umd.js +17 -10
  38. package/bundles/cdk-platform.umd.js.map +1 -1
  39. package/bundles/cdk-platform.umd.min.js +1 -1
  40. package/bundles/cdk-platform.umd.min.js.map +1 -1
  41. package/bundles/cdk-portal.umd.js +32 -13
  42. package/bundles/cdk-portal.umd.js.map +1 -1
  43. package/bundles/cdk-portal.umd.min.js.map +1 -1
  44. package/bundles/cdk-scrolling.umd.js +184 -62
  45. package/bundles/cdk-scrolling.umd.js.map +1 -1
  46. package/bundles/cdk-scrolling.umd.min.js +1 -1
  47. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  48. package/bundles/cdk-stepper.umd.js +30 -12
  49. package/bundles/cdk-stepper.umd.js.map +1 -1
  50. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  51. package/bundles/cdk-table.umd.js +384 -74
  52. package/bundles/cdk-table.umd.js.map +1 -1
  53. package/bundles/cdk-table.umd.min.js +1 -1
  54. package/bundles/cdk-table.umd.min.js.map +1 -1
  55. package/bundles/cdk-text-field.umd.js +61 -21
  56. package/bundles/cdk-text-field.umd.js.map +1 -1
  57. package/bundles/cdk-text-field.umd.min.js +1 -1
  58. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  59. package/bundles/cdk-tree.umd.js +85 -29
  60. package/bundles/cdk-tree.umd.js.map +1 -1
  61. package/bundles/cdk-tree.umd.min.js.map +1 -1
  62. package/bundles/cdk.umd.js +2 -2
  63. package/bundles/cdk.umd.js.map +1 -1
  64. package/bundles/cdk.umd.min.js +1 -1
  65. package/bundles/cdk.umd.min.js.map +1 -1
  66. package/drag-drop/typings/directives/drag.d.ts +11 -2
  67. package/drag-drop/typings/drag-events.d.ts +17 -0
  68. package/drag-drop/typings/drag-ref.d.ts +9 -5
  69. package/drag-drop/typings/drop-list-ref.d.ts +9 -3
  70. package/drag-drop/typings/index.metadata.json +1 -1
  71. package/esm2015/a11y.js +229 -81
  72. package/esm2015/a11y.js.map +1 -1
  73. package/esm2015/accordion.js +22 -10
  74. package/esm2015/accordion.js.map +1 -1
  75. package/esm2015/bidi.js +8 -8
  76. package/esm2015/cdk.js +4 -4
  77. package/esm2015/cdk.js.map +1 -1
  78. package/esm2015/coercion.js +7 -7
  79. package/esm2015/collections.js +41 -18
  80. package/esm2015/collections.js.map +1 -1
  81. package/esm2015/drag-drop.js +540 -181
  82. package/esm2015/drag-drop.js.map +1 -1
  83. package/esm2015/keycodes.js +9 -5
  84. package/esm2015/keycodes.js.map +1 -1
  85. package/esm2015/layout.js +89 -36
  86. package/esm2015/layout.js.map +1 -1
  87. package/esm2015/observers.js +33 -14
  88. package/esm2015/observers.js.map +1 -1
  89. package/esm2015/overlay.js +232 -110
  90. package/esm2015/overlay.js.map +1 -1
  91. package/esm2015/platform.js +20 -13
  92. package/esm2015/platform.js.map +1 -1
  93. package/esm2015/portal.js +34 -15
  94. package/esm2015/portal.js.map +1 -1
  95. package/esm2015/scrolling.js +180 -58
  96. package/esm2015/scrolling.js.map +1 -1
  97. package/esm2015/stepper.js +32 -14
  98. package/esm2015/stepper.js.map +1 -1
  99. package/esm2015/table.js +369 -69
  100. package/esm2015/table.js.map +1 -1
  101. package/esm2015/text-field.js +64 -24
  102. package/esm2015/text-field.js.map +1 -1
  103. package/esm2015/tree.js +86 -30
  104. package/esm2015/tree.js.map +1 -1
  105. package/esm5/a11y.es5.js +230 -82
  106. package/esm5/a11y.es5.js.map +1 -1
  107. package/esm5/accordion.es5.js +22 -10
  108. package/esm5/accordion.es5.js.map +1 -1
  109. package/esm5/bidi.es5.js +8 -8
  110. package/esm5/cdk.es5.js +4 -4
  111. package/esm5/cdk.es5.js.map +1 -1
  112. package/esm5/coercion.es5.js +7 -7
  113. package/esm5/collections.es5.js +42 -19
  114. package/esm5/collections.es5.js.map +1 -1
  115. package/esm5/drag-drop.es5.js +574 -183
  116. package/esm5/drag-drop.es5.js.map +1 -1
  117. package/esm5/keycodes.es5.js +9 -5
  118. package/esm5/keycodes.es5.js.map +1 -1
  119. package/esm5/layout.es5.js +86 -33
  120. package/esm5/layout.es5.js.map +1 -1
  121. package/esm5/observers.es5.js +33 -14
  122. package/esm5/observers.es5.js.map +1 -1
  123. package/esm5/overlay.es5.js +232 -111
  124. package/esm5/overlay.es5.js.map +1 -1
  125. package/esm5/platform.es5.js +20 -13
  126. package/esm5/platform.es5.js.map +1 -1
  127. package/esm5/portal.es5.js +34 -15
  128. package/esm5/portal.es5.js.map +1 -1
  129. package/esm5/scrolling.es5.js +187 -65
  130. package/esm5/scrolling.es5.js.map +1 -1
  131. package/esm5/stepper.es5.js +32 -14
  132. package/esm5/stepper.es5.js.map +1 -1
  133. package/esm5/table.es5.js +386 -72
  134. package/esm5/table.es5.js.map +1 -1
  135. package/esm5/text-field.es5.js +64 -24
  136. package/esm5/text-field.es5.js.map +1 -1
  137. package/esm5/tree.es5.js +87 -31
  138. package/esm5/tree.es5.js.map +1 -1
  139. package/layout/typings/breakpoints-observer.d.ts +3 -3
  140. package/layout/typings/index.metadata.json +1 -1
  141. package/layout/typings/media-matcher.d.ts +2 -2
  142. package/overlay/typings/index.metadata.json +1 -1
  143. package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
  144. package/package.json +8 -8
  145. package/portal/typings/portal.d.ts +2 -2
  146. package/schematics/ng-update/data/attribute-selectors.js +1 -1
  147. package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
  148. package/schematics/ng-update/data/class-names.js +3 -3
  149. package/schematics/ng-update/data/class-names.js.map +1 -1
  150. package/schematics/ng-update/data/constructor-checks.js +1 -1
  151. package/schematics/ng-update/data/constructor-checks.js.map +1 -1
  152. package/schematics/ng-update/data/input-names.js +1 -1
  153. package/schematics/ng-update/data/input-names.js.map +1 -1
  154. package/schematics/ng-update/data/method-call-checks.js +1 -1
  155. package/schematics/ng-update/data/method-call-checks.js.map +1 -1
  156. package/schematics/ng-update/data/property-names.js +4 -4
  157. package/schematics/ng-update/data/property-names.js.map +1 -1
  158. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
  159. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
  160. package/schematics/tsconfig.tsbuildinfo +5811 -0
  161. package/schematics/utils/ast.d.ts +1 -1
  162. package/schematics/utils/build-component.js +1 -1
  163. package/schematics/utils/build-component.js.map +1 -1
  164. package/schematics/utils/get-project.d.ts +1 -1
  165. package/schematics/utils/project-main-file.d.ts +1 -1
  166. package/schematics/utils/project-style-file.d.ts +1 -1
  167. package/schematics/utils/project-targets.d.ts +1 -1
  168. package/schematics/utils/schematic-options.d.ts +1 -1
  169. package/table/typings/cell.d.ts +3 -2
  170. package/table/typings/index.metadata.json +1 -1
  171. package/table/typings/public-api.d.ts +1 -0
  172. package/table/typings/row.d.ts +5 -4
  173. package/table/typings/sticky-styler.d.ts +5 -5
  174. package/table/typings/table-errors.d.ts +10 -0
  175. package/table/typings/text-column.d.ts +80 -0
  176. package/typings/drag-drop/directives/drag.d.ts +11 -2
  177. package/typings/drag-drop/drag-events.d.ts +17 -0
  178. package/typings/drag-drop/drag-ref.d.ts +9 -5
  179. package/typings/drag-drop/drop-list-ref.d.ts +9 -3
  180. package/typings/drag-drop/index.metadata.json +1 -1
  181. package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
  182. package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
  183. package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
  184. package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
  185. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  186. package/typings/esm5/index.metadata.json +1 -1
  187. package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
  188. package/typings/esm5/layout/index.metadata.json +1 -1
  189. package/typings/esm5/layout/media-matcher.d.ts +2 -2
  190. package/typings/esm5/overlay/index.metadata.json +1 -1
  191. package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
  192. package/typings/esm5/portal/portal.d.ts +2 -2
  193. package/typings/esm5/table/cell.d.ts +3 -2
  194. package/typings/esm5/table/index.metadata.json +1 -1
  195. package/typings/esm5/table/public-api.d.ts +1 -0
  196. package/typings/esm5/table/row.d.ts +5 -4
  197. package/typings/esm5/table/sticky-styler.d.ts +5 -5
  198. package/typings/esm5/table/table-errors.d.ts +10 -0
  199. package/typings/esm5/table/text-column.d.ts +80 -0
  200. package/typings/index.metadata.json +1 -1
  201. package/typings/layout/breakpoints-observer.d.ts +3 -3
  202. package/typings/layout/index.metadata.json +1 -1
  203. package/typings/layout/media-matcher.d.ts +2 -2
  204. package/typings/overlay/index.metadata.json +1 -1
  205. package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
  206. package/typings/portal/portal.d.ts +2 -2
  207. package/typings/schematics/utils/ast.d.ts +1 -1
  208. package/typings/schematics/utils/get-project.d.ts +1 -1
  209. package/typings/schematics/utils/project-main-file.d.ts +1 -1
  210. package/typings/schematics/utils/project-style-file.d.ts +1 -1
  211. package/typings/schematics/utils/project-targets.d.ts +1 -1
  212. package/typings/schematics/utils/schematic-options.d.ts +1 -1
  213. package/typings/table/cell.d.ts +3 -2
  214. package/typings/table/index.metadata.json +1 -1
  215. package/typings/table/public-api.d.ts +1 -0
  216. package/typings/table/row.d.ts +5 -4
  217. package/typings/table/sticky-styler.d.ts +5 -5
  218. package/typings/table/table-errors.d.ts +10 -0
  219. package/typings/table/text-column.d.ts +80 -0
@@ -42,7 +42,7 @@ function __extends(d, b) {
42
42
 
43
43
  /**
44
44
  * @fileoverview added by tsickle
45
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
45
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
46
46
  */
47
47
  /**
48
48
  * The injection token used to specify the virtual scrolling strategy.
@@ -52,7 +52,7 @@ var VIRTUAL_SCROLL_STRATEGY = new core.InjectionToken('VIRTUAL_SCROLL_STRATEGY')
52
52
 
53
53
  /**
54
54
  * @fileoverview added by tsickle
55
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
55
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
56
56
  */
57
57
  /**
58
58
  * Virtual scrolling strategy for lists with items of known fixed size.
@@ -368,7 +368,10 @@ var CdkFixedSizeVirtualScroll = /** @class */ (function () {
368
368
  providers: [{
369
369
  provide: VIRTUAL_SCROLL_STRATEGY,
370
370
  useFactory: _fixedSizeVirtualScrollStrategyFactory,
371
- deps: [core.forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
371
+ deps: [core.forwardRef((/**
372
+ * @return {?}
373
+ */
374
+ function () { return CdkFixedSizeVirtualScroll; }))],
372
375
  }],
373
376
  },] },
374
377
  ];
@@ -382,7 +385,7 @@ var CdkFixedSizeVirtualScroll = /** @class */ (function () {
382
385
 
383
386
  /**
384
387
  * @fileoverview added by tsickle
385
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
388
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
386
389
  */
387
390
  /**
388
391
  * Time in ms to throttle the scrolling events by default.
@@ -436,7 +439,10 @@ var ScrollDispatcher = /** @class */ (function () {
436
439
  var _this = this;
437
440
  if (!this.scrollContainers.has(scrollable)) {
438
441
  this.scrollContainers.set(scrollable, scrollable.elementScrolled()
439
- .subscribe(function () { return _this._scrolled.next(scrollable); }));
442
+ .subscribe((/**
443
+ * @return {?}
444
+ */
445
+ function () { return _this._scrolled.next(scrollable); })));
440
446
  }
441
447
  };
442
448
  /**
@@ -501,7 +507,11 @@ var ScrollDispatcher = /** @class */ (function () {
501
507
  if (!this._platform.isBrowser) {
502
508
  return rxjs.of();
503
509
  }
504
- return new rxjs.Observable(function (observer) {
510
+ return new rxjs.Observable((/**
511
+ * @param {?} observer
512
+ * @return {?}
513
+ */
514
+ function (observer) {
505
515
  if (!_this._globalSubscription) {
506
516
  _this._addGlobalListener();
507
517
  }
@@ -512,14 +522,17 @@ var ScrollDispatcher = /** @class */ (function () {
512
522
  _this._scrolled.pipe(operators.auditTime(auditTimeInMs)).subscribe(observer) :
513
523
  _this._scrolled.subscribe(observer);
514
524
  _this._scrolledCount++;
515
- return function () {
525
+ return (/**
526
+ * @return {?}
527
+ */
528
+ function () {
516
529
  subscription.unsubscribe();
517
530
  _this._scrolledCount--;
518
531
  if (!_this._scrolledCount) {
519
532
  _this._removeGlobalListener();
520
533
  }
521
- };
522
- });
534
+ });
535
+ }));
523
536
  };
524
537
  /**
525
538
  * @return {?}
@@ -530,7 +543,12 @@ var ScrollDispatcher = /** @class */ (function () {
530
543
  function () {
531
544
  var _this = this;
532
545
  this._removeGlobalListener();
533
- this.scrollContainers.forEach(function (_, container) { return _this.deregister(container); });
546
+ this.scrollContainers.forEach((/**
547
+ * @param {?} _
548
+ * @param {?} container
549
+ * @return {?}
550
+ */
551
+ function (_, container) { return _this.deregister(container); }));
534
552
  this._scrolled.complete();
535
553
  };
536
554
  /**
@@ -556,9 +574,13 @@ var ScrollDispatcher = /** @class */ (function () {
556
574
  function (elementRef, auditTimeInMs) {
557
575
  /** @type {?} */
558
576
  var ancestors = this.getAncestorScrollContainers(elementRef);
559
- return this.scrolled(auditTimeInMs).pipe(operators.filter(function (target) {
577
+ return this.scrolled(auditTimeInMs).pipe(operators.filter((/**
578
+ * @param {?} target
579
+ * @return {?}
580
+ */
581
+ function (target) {
560
582
  return !target || ancestors.indexOf(target) > -1;
561
- }));
583
+ })));
562
584
  };
563
585
  /** Returns all registered Scrollables that contain the provided element. */
564
586
  /**
@@ -575,11 +597,16 @@ var ScrollDispatcher = /** @class */ (function () {
575
597
  var _this = this;
576
598
  /** @type {?} */
577
599
  var scrollingContainers = [];
578
- this.scrollContainers.forEach(function (_subscription, scrollable) {
600
+ this.scrollContainers.forEach((/**
601
+ * @param {?} _subscription
602
+ * @param {?} scrollable
603
+ * @return {?}
604
+ */
605
+ function (_subscription, scrollable) {
579
606
  if (_this._scrollableContainsElement(scrollable, elementRef)) {
580
607
  scrollingContainers.push(scrollable);
581
608
  }
582
- });
609
+ }));
583
610
  return scrollingContainers;
584
611
  };
585
612
  /** Returns true if the element is contained within the provided Scrollable. */
@@ -624,9 +651,15 @@ var ScrollDispatcher = /** @class */ (function () {
624
651
  */
625
652
  function () {
626
653
  var _this = this;
627
- this._globalSubscription = this._ngZone.runOutsideAngular(function () {
628
- return rxjs.fromEvent(window.document, 'scroll').subscribe(function () { return _this._scrolled.next(); });
629
- });
654
+ this._globalSubscription = this._ngZone.runOutsideAngular((/**
655
+ * @return {?}
656
+ */
657
+ function () {
658
+ return rxjs.fromEvent(window.document, 'scroll').subscribe((/**
659
+ * @return {?}
660
+ */
661
+ function () { return _this._scrolled.next(); }));
662
+ }));
630
663
  };
631
664
  /** Cleans up the global scroll listener. */
632
665
  /**
@@ -653,7 +686,7 @@ var ScrollDispatcher = /** @class */ (function () {
653
686
  { type: core.NgZone },
654
687
  { type: platform.Platform }
655
688
  ]; };
656
- /** @nocollapse */ ScrollDispatcher.ngInjectableDef = core.defineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(core.inject(core.NgZone), core.inject(platform.Platform)); }, token: ScrollDispatcher, providedIn: "root" });
689
+ /** @nocollapse */ ScrollDispatcher.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(core.ɵɵinject(core.NgZone), core.ɵɵinject(platform.Platform)); }, token: ScrollDispatcher, providedIn: "root" });
657
690
  return ScrollDispatcher;
658
691
  }());
659
692
  /**
@@ -679,7 +712,7 @@ var SCROLL_DISPATCHER_PROVIDER = {
679
712
 
680
713
  /**
681
714
  * @fileoverview added by tsickle
682
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
715
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
683
716
  */
684
717
  /**
685
718
  * Sends an event when the directive's element is scrolled. Registers itself with the
@@ -694,12 +727,19 @@ var CdkScrollable = /** @class */ (function () {
694
727
  this.ngZone = ngZone;
695
728
  this.dir = dir;
696
729
  this._destroyed = new rxjs.Subject();
697
- this._elementScrolled = new rxjs.Observable(function (observer) {
698
- return _this.ngZone.runOutsideAngular(function () {
730
+ this._elementScrolled = new rxjs.Observable((/**
731
+ * @param {?} observer
732
+ * @return {?}
733
+ */
734
+ function (observer) {
735
+ return _this.ngZone.runOutsideAngular((/**
736
+ * @return {?}
737
+ */
738
+ function () {
699
739
  return rxjs.fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(operators.takeUntil(_this._destroyed))
700
740
  .subscribe(observer);
701
- });
702
- });
741
+ }));
742
+ }));
703
743
  }
704
744
  /**
705
745
  * @return {?}
@@ -929,7 +969,7 @@ var CdkScrollable = /** @class */ (function () {
929
969
 
930
970
  /**
931
971
  * @fileoverview added by tsickle
932
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
972
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
933
973
  */
934
974
  /**
935
975
  * Checks if the given ranges are equal.
@@ -976,11 +1016,25 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
976
1016
  /**
977
1017
  * Emits when the index of the first element visible in the viewport changes.
978
1018
  */
979
- _this.scrolledIndexChange = new rxjs.Observable(function (observer) {
980
- return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) {
981
- return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); });
982
- });
983
- });
1019
+ _this.scrolledIndexChange = new rxjs.Observable((/**
1020
+ * @param {?} observer
1021
+ * @return {?}
1022
+ */
1023
+ function (observer) {
1024
+ return _this._scrollStrategy.scrolledIndexChange.subscribe((/**
1025
+ * @param {?} index
1026
+ * @return {?}
1027
+ */
1028
+ function (index) {
1029
+ return Promise.resolve().then((/**
1030
+ * @return {?}
1031
+ */
1032
+ function () { return _this.ngZone.run((/**
1033
+ * @return {?}
1034
+ */
1035
+ function () { return observer.next(index); })); }));
1036
+ }));
1037
+ }));
984
1038
  /**
985
1039
  * A stream that emits whenever the rendered range changes.
986
1040
  */
@@ -1041,7 +1095,13 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1041
1095
  // the Viewport to be rendered with the correct size before we measure. We run this outside the
1042
1096
  // zone to avoid causing more change detection cycles. We handle the change detection loop
1043
1097
  // ourselves instead.
1044
- this.ngZone.runOutsideAngular(function () { return Promise.resolve().then(function () {
1098
+ this.ngZone.runOutsideAngular((/**
1099
+ * @return {?}
1100
+ */
1101
+ function () { return Promise.resolve().then((/**
1102
+ * @return {?}
1103
+ */
1104
+ function () {
1045
1105
  _this._measureViewportSize();
1046
1106
  _this._scrollStrategy.attach(_this);
1047
1107
  _this.elementScrolled()
@@ -1052,9 +1112,12 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1052
1112
  // there are multiple scroll events in the same frame we only need to recheck
1053
1113
  // our layout once.
1054
1114
  operators.auditTime(0, SCROLL_SCHEDULER))
1055
- .subscribe(function () { return _this._scrollStrategy.onContentScrolled(); });
1115
+ .subscribe((/**
1116
+ * @return {?}
1117
+ */
1118
+ function () { return _this._scrollStrategy.onContentScrolled(); }));
1056
1119
  _this._markChangeDetectionNeeded();
1057
- }); });
1120
+ })); }));
1058
1121
  };
1059
1122
  /**
1060
1123
  * @return {?}
@@ -1089,9 +1152,16 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1089
1152
  // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
1090
1153
  // changes. Run outside the zone to avoid triggering change detection, since we're managing the
1091
1154
  // change detection loop ourselves.
1092
- this.ngZone.runOutsideAngular(function () {
1155
+ this.ngZone.runOutsideAngular((/**
1156
+ * @return {?}
1157
+ */
1158
+ function () {
1093
1159
  _this._forOf = forOf;
1094
- _this._forOf.dataStream.pipe(operators.takeUntil(_this._detachedSubject)).subscribe(function (data) {
1160
+ _this._forOf.dataStream.pipe(operators.takeUntil(_this._detachedSubject)).subscribe((/**
1161
+ * @param {?} data
1162
+ * @return {?}
1163
+ */
1164
+ function (data) {
1095
1165
  /** @type {?} */
1096
1166
  var newLength = data.length;
1097
1167
  if (newLength !== _this._dataLength) {
@@ -1099,8 +1169,8 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1099
1169
  _this._scrollStrategy.onDataLengthChanged();
1100
1170
  }
1101
1171
  _this._doChangeDetection();
1102
- });
1103
- });
1172
+ }));
1173
+ }));
1104
1174
  };
1105
1175
  /** Detaches the current `CdkVirtualForOf`. */
1106
1176
  /**
@@ -1204,7 +1274,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1204
1274
  var _this = this;
1205
1275
  if (!rangesEqual(this._renderedRange, range)) {
1206
1276
  this._renderedRangeSubject.next(this._renderedRange = range);
1207
- this._markChangeDetectionNeeded(function () { return _this._scrollStrategy.onContentRendered(); });
1277
+ this._markChangeDetectionNeeded((/**
1278
+ * @return {?}
1279
+ */
1280
+ function () { return _this._scrollStrategy.onContentRendered(); }));
1208
1281
  }
1209
1282
  };
1210
1283
  /**
@@ -1266,7 +1339,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1266
1339
  // We know this value is safe because we parse `offset` with `Number()` before passing it
1267
1340
  // into the string.
1268
1341
  this._renderedContentTransform = transform;
1269
- this._markChangeDetectionNeeded(function () {
1342
+ this._markChangeDetectionNeeded((/**
1343
+ * @return {?}
1344
+ */
1345
+ function () {
1270
1346
  if (_this._renderedContentOffsetNeedsRewrite) {
1271
1347
  _this._renderedContentOffset -= _this.measureRenderedContentSize();
1272
1348
  _this._renderedContentOffsetNeedsRewrite = false;
@@ -1275,7 +1351,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1275
1351
  else {
1276
1352
  _this._scrollStrategy.onRenderedOffsetChanged();
1277
1353
  }
1278
- });
1354
+ }));
1279
1355
  }
1280
1356
  };
1281
1357
  /**
@@ -1443,9 +1519,15 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1443
1519
  // properties sequentially we only have to run `_doChangeDetection` once at the end.
1444
1520
  if (!this._isChangeDetectionPending) {
1445
1521
  this._isChangeDetectionPending = true;
1446
- this.ngZone.runOutsideAngular(function () { return Promise.resolve().then(function () {
1522
+ this.ngZone.runOutsideAngular((/**
1523
+ * @return {?}
1524
+ */
1525
+ function () { return Promise.resolve().then((/**
1526
+ * @return {?}
1527
+ */
1528
+ function () {
1447
1529
  _this._doChangeDetection();
1448
- }); });
1530
+ })); }));
1449
1531
  }
1450
1532
  };
1451
1533
  /** Run change detection. */
@@ -1465,7 +1547,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1465
1547
  // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
1466
1548
  // from the root, since the repeated items are content projected in. Calling `detectChanges`
1467
1549
  // instead does not properly check the projected content.
1468
- this.ngZone.run(function () { return _this._changeDetectorRef.markForCheck(); });
1550
+ this.ngZone.run((/**
1551
+ * @return {?}
1552
+ */
1553
+ function () { return _this._changeDetectorRef.markForCheck(); }));
1469
1554
  // Apply the content transform. The transform can't be set via an Angular binding because
1470
1555
  // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
1471
1556
  // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
@@ -1515,7 +1600,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1515
1600
 
1516
1601
  /**
1517
1602
  * @fileoverview added by tsickle
1518
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1603
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1519
1604
  */
1520
1605
  /**
1521
1606
  * Helper to extract size from a DOM Node.
@@ -1570,10 +1655,14 @@ var CdkVirtualForOf = /** @class */ (function () {
1570
1655
  // Use `_changeDataSource` to disconnect from the previous data source and connect to the
1571
1656
  // new one, passing back a stream of data changes which we run through `switchMap` to give
1572
1657
  // us a data stream that emits the latest data from whatever the current `DataSource` is.
1573
- operators.switchMap(function (_a) {
1658
+ operators.switchMap((/**
1659
+ * @param {?} __0
1660
+ * @return {?}
1661
+ */
1662
+ function (_a) {
1574
1663
  var prev = _a[0], cur = _a[1];
1575
1664
  return _this._changeDataSource(prev, cur);
1576
- }),
1665
+ })),
1577
1666
  // Replay the last emitted data when someone subscribes.
1578
1667
  operators.shareReplay(1));
1579
1668
  /**
@@ -1591,15 +1680,26 @@ var CdkVirtualForOf = /** @class */ (function () {
1591
1680
  */
1592
1681
  this._needsUpdate = false;
1593
1682
  this._destroyed = new rxjs.Subject();
1594
- this.dataStream.subscribe(function (data) {
1683
+ this.dataStream.subscribe((/**
1684
+ * @param {?} data
1685
+ * @return {?}
1686
+ */
1687
+ function (data) {
1595
1688
  _this._data = data;
1596
1689
  _this._onRenderedDataChange();
1597
- });
1598
- this._viewport.renderedRangeStream.pipe(operators.takeUntil(this._destroyed)).subscribe(function (range) {
1690
+ }));
1691
+ this._viewport.renderedRangeStream.pipe(operators.takeUntil(this._destroyed)).subscribe((/**
1692
+ * @param {?} range
1693
+ * @return {?}
1694
+ */
1695
+ function (range) {
1599
1696
  _this._renderedRange = range;
1600
- ngZone.run(function () { return _this.viewChange.next(_this._renderedRange); });
1697
+ ngZone.run((/**
1698
+ * @return {?}
1699
+ */
1700
+ function () { return _this.viewChange.next(_this._renderedRange); }));
1601
1701
  _this._onRenderedDataChange();
1602
- });
1702
+ }));
1603
1703
  this._viewport.attach(this);
1604
1704
  }
1605
1705
  Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForOf", {
@@ -1647,7 +1747,12 @@ var CdkVirtualForOf = /** @class */ (function () {
1647
1747
  var _this = this;
1648
1748
  this._needsUpdate = true;
1649
1749
  this._cdkVirtualForTrackBy = fn ?
1650
- function (index, item) { return fn(index + (_this._renderedRange ? _this._renderedRange.start : 0), item); } :
1750
+ (/**
1751
+ * @param {?} index
1752
+ * @param {?} item
1753
+ * @return {?}
1754
+ */
1755
+ function (index, item) { return fn(index + (_this._renderedRange ? _this._renderedRange.start : 0), item); }) :
1651
1756
  undefined;
1652
1757
  },
1653
1758
  enumerable: true,
@@ -1749,6 +1854,7 @@ var CdkVirtualForOf = /** @class */ (function () {
1749
1854
  */
1750
1855
  function () {
1751
1856
  this._viewport.detach();
1857
+ this._dataSourceChanges.next();
1752
1858
  this._dataSourceChanges.complete();
1753
1859
  this.viewChange.complete();
1754
1860
  this._destroyed.next();
@@ -1799,7 +1905,7 @@ var CdkVirtualForOf = /** @class */ (function () {
1799
1905
  oldDs.disconnect(this);
1800
1906
  }
1801
1907
  this._needsUpdate = true;
1802
- return newDs.connect(this);
1908
+ return newDs ? newDs.connect(this) : rxjs.of();
1803
1909
  };
1804
1910
  /** Update the `CdkVirtualForOfContext` for all views. */
1805
1911
  /**
@@ -1842,7 +1948,13 @@ var CdkVirtualForOf = /** @class */ (function () {
1842
1948
  function (changes) {
1843
1949
  var _this = this;
1844
1950
  // Rearrange the views to put them in the right location.
1845
- changes.forEachOperation(function (record, adjustedPreviousIndex, currentIndex) {
1951
+ changes.forEachOperation((/**
1952
+ * @param {?} record
1953
+ * @param {?} adjustedPreviousIndex
1954
+ * @param {?} currentIndex
1955
+ * @return {?}
1956
+ */
1957
+ function (record, adjustedPreviousIndex, currentIndex) {
1846
1958
  if (record.previousIndex == null) { // Item added.
1847
1959
  // Item added.
1848
1960
  /** @type {?} */
@@ -1859,13 +1971,17 @@ var CdkVirtualForOf = /** @class */ (function () {
1859
1971
  _this._viewContainerRef.move(view, currentIndex);
1860
1972
  view.context.$implicit = record.item;
1861
1973
  }
1862
- });
1974
+ }));
1863
1975
  // Update $implicit for any items that had an identity change.
1864
- changes.forEachIdentityChange(function (record) {
1976
+ changes.forEachIdentityChange((/**
1977
+ * @param {?} record
1978
+ * @return {?}
1979
+ */
1980
+ function (record) {
1865
1981
  /** @type {?} */
1866
1982
  var view = (/** @type {?} */ (_this._viewContainerRef.get((/** @type {?} */ (record.currentIndex)))));
1867
1983
  view.context.$implicit = record.item;
1868
- });
1984
+ }));
1869
1985
  // Update the context variables on all items.
1870
1986
  /** @type {?} */
1871
1987
  var count = this._data.length;
@@ -2036,7 +2152,7 @@ var CdkVirtualForOf = /** @class */ (function () {
2036
2152
 
2037
2153
  /**
2038
2154
  * @fileoverview added by tsickle
2039
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2155
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2040
2156
  */
2041
2157
  var ScrollingModule = /** @class */ (function () {
2042
2158
  function ScrollingModule() {
@@ -2079,7 +2195,7 @@ var ScrollDispatchModule = /** @class */ (function () {
2079
2195
 
2080
2196
  /**
2081
2197
  * @fileoverview added by tsickle
2082
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2198
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2083
2199
  */
2084
2200
  /**
2085
2201
  * Time in ms to throttle the resize events by default.
@@ -2094,14 +2210,20 @@ var ViewportRuler = /** @class */ (function () {
2094
2210
  function ViewportRuler(_platform, ngZone) {
2095
2211
  var _this = this;
2096
2212
  this._platform = _platform;
2097
- ngZone.runOutsideAngular(function () {
2213
+ ngZone.runOutsideAngular((/**
2214
+ * @return {?}
2215
+ */
2216
+ function () {
2098
2217
  _this._change = _platform.isBrowser ?
2099
2218
  rxjs.merge(rxjs.fromEvent(window, 'resize'), rxjs.fromEvent(window, 'orientationchange')) :
2100
2219
  rxjs.of();
2101
2220
  // Note that we need to do the subscription inside `runOutsideAngular`
2102
2221
  // since subscribing is what causes the event listener to be added.
2103
- _this._invalidateCache = _this.change().subscribe(function () { return _this._updateViewportSize(); });
2104
- });
2222
+ _this._invalidateCache = _this.change().subscribe((/**
2223
+ * @return {?}
2224
+ */
2225
+ function () { return _this._updateViewportSize(); }));
2226
+ }));
2105
2227
  }
2106
2228
  /**
2107
2229
  * @return {?}
@@ -2239,7 +2361,7 @@ var ViewportRuler = /** @class */ (function () {
2239
2361
  { type: platform.Platform },
2240
2362
  { type: core.NgZone }
2241
2363
  ]; };
2242
- /** @nocollapse */ ViewportRuler.ngInjectableDef = core.defineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(core.inject(platform.Platform), core.inject(core.NgZone)); }, token: ViewportRuler, providedIn: "root" });
2364
+ /** @nocollapse */ ViewportRuler.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(core.ɵɵinject(platform.Platform), core.ɵɵinject(core.NgZone)); }, token: ViewportRuler, providedIn: "root" });
2243
2365
  return ViewportRuler;
2244
2366
  }());
2245
2367
  /**