@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
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { InjectionToken, Directive, forwardRef, Input, Injectable, NgZone, Optional, SkipSelf, ElementRef, NgModule, IterableDiffers, TemplateRef, ViewContainerRef, ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Output, ViewChild, ViewEncapsulation, defineInjectable, inject } from '@angular/core';
8
+ import { InjectionToken, Directive, forwardRef, Input, Injectable, NgZone, Optional, SkipSelf, ElementRef, NgModule, IterableDiffers, TemplateRef, ViewContainerRef, ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, Output, ViewChild, ViewEncapsulation, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
9
9
  import { coerceNumberProperty } from '@angular/cdk/coercion';
10
10
  import { Subject, fromEvent, of, Observable, animationFrameScheduler, asapScheduler, merge } from 'rxjs';
11
11
  import { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise, shareReplay, switchMap } from 'rxjs/operators';
@@ -16,7 +16,7 @@ import { ArrayDataSource, isDataSource } from '@angular/cdk/collections';
16
16
 
17
17
  /**
18
18
  * @fileoverview added by tsickle
19
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
19
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
20
20
  */
21
21
  /**
22
22
  * The injection token used to specify the virtual scrolling strategy.
@@ -26,7 +26,7 @@ var VIRTUAL_SCROLL_STRATEGY = new InjectionToken('VIRTUAL_SCROLL_STRATEGY');
26
26
 
27
27
  /**
28
28
  * @fileoverview added by tsickle
29
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
29
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
30
30
  */
31
31
  /**
32
32
  * Virtual scrolling strategy for lists with items of known fixed size.
@@ -342,7 +342,10 @@ var CdkFixedSizeVirtualScroll = /** @class */ (function () {
342
342
  providers: [{
343
343
  provide: VIRTUAL_SCROLL_STRATEGY,
344
344
  useFactory: _fixedSizeVirtualScrollStrategyFactory,
345
- deps: [forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
345
+ deps: [forwardRef((/**
346
+ * @return {?}
347
+ */
348
+ function () { return CdkFixedSizeVirtualScroll; }))],
346
349
  }],
347
350
  },] },
348
351
  ];
@@ -356,7 +359,7 @@ var CdkFixedSizeVirtualScroll = /** @class */ (function () {
356
359
 
357
360
  /**
358
361
  * @fileoverview added by tsickle
359
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
362
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
360
363
  */
361
364
  /**
362
365
  * Time in ms to throttle the scrolling events by default.
@@ -410,7 +413,10 @@ var ScrollDispatcher = /** @class */ (function () {
410
413
  var _this = this;
411
414
  if (!this.scrollContainers.has(scrollable)) {
412
415
  this.scrollContainers.set(scrollable, scrollable.elementScrolled()
413
- .subscribe(function () { return _this._scrolled.next(scrollable); }));
416
+ .subscribe((/**
417
+ * @return {?}
418
+ */
419
+ function () { return _this._scrolled.next(scrollable); })));
414
420
  }
415
421
  };
416
422
  /**
@@ -475,7 +481,11 @@ var ScrollDispatcher = /** @class */ (function () {
475
481
  if (!this._platform.isBrowser) {
476
482
  return of();
477
483
  }
478
- return new Observable(function (observer) {
484
+ return new Observable((/**
485
+ * @param {?} observer
486
+ * @return {?}
487
+ */
488
+ function (observer) {
479
489
  if (!_this._globalSubscription) {
480
490
  _this._addGlobalListener();
481
491
  }
@@ -486,14 +496,17 @@ var ScrollDispatcher = /** @class */ (function () {
486
496
  _this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :
487
497
  _this._scrolled.subscribe(observer);
488
498
  _this._scrolledCount++;
489
- return function () {
499
+ return (/**
500
+ * @return {?}
501
+ */
502
+ function () {
490
503
  subscription.unsubscribe();
491
504
  _this._scrolledCount--;
492
505
  if (!_this._scrolledCount) {
493
506
  _this._removeGlobalListener();
494
507
  }
495
- };
496
- });
508
+ });
509
+ }));
497
510
  };
498
511
  /**
499
512
  * @return {?}
@@ -504,7 +517,12 @@ var ScrollDispatcher = /** @class */ (function () {
504
517
  function () {
505
518
  var _this = this;
506
519
  this._removeGlobalListener();
507
- this.scrollContainers.forEach(function (_, container) { return _this.deregister(container); });
520
+ this.scrollContainers.forEach((/**
521
+ * @param {?} _
522
+ * @param {?} container
523
+ * @return {?}
524
+ */
525
+ function (_, container) { return _this.deregister(container); }));
508
526
  this._scrolled.complete();
509
527
  };
510
528
  /**
@@ -530,9 +548,13 @@ var ScrollDispatcher = /** @class */ (function () {
530
548
  function (elementRef, auditTimeInMs) {
531
549
  /** @type {?} */
532
550
  var ancestors = this.getAncestorScrollContainers(elementRef);
533
- return this.scrolled(auditTimeInMs).pipe(filter(function (target) {
551
+ return this.scrolled(auditTimeInMs).pipe(filter((/**
552
+ * @param {?} target
553
+ * @return {?}
554
+ */
555
+ function (target) {
534
556
  return !target || ancestors.indexOf(target) > -1;
535
- }));
557
+ })));
536
558
  };
537
559
  /** Returns all registered Scrollables that contain the provided element. */
538
560
  /**
@@ -549,11 +571,16 @@ var ScrollDispatcher = /** @class */ (function () {
549
571
  var _this = this;
550
572
  /** @type {?} */
551
573
  var scrollingContainers = [];
552
- this.scrollContainers.forEach(function (_subscription, scrollable) {
574
+ this.scrollContainers.forEach((/**
575
+ * @param {?} _subscription
576
+ * @param {?} scrollable
577
+ * @return {?}
578
+ */
579
+ function (_subscription, scrollable) {
553
580
  if (_this._scrollableContainsElement(scrollable, elementRef)) {
554
581
  scrollingContainers.push(scrollable);
555
582
  }
556
- });
583
+ }));
557
584
  return scrollingContainers;
558
585
  };
559
586
  /** Returns true if the element is contained within the provided Scrollable. */
@@ -598,9 +625,15 @@ var ScrollDispatcher = /** @class */ (function () {
598
625
  */
599
626
  function () {
600
627
  var _this = this;
601
- this._globalSubscription = this._ngZone.runOutsideAngular(function () {
602
- return fromEvent(window.document, 'scroll').subscribe(function () { return _this._scrolled.next(); });
603
- });
628
+ this._globalSubscription = this._ngZone.runOutsideAngular((/**
629
+ * @return {?}
630
+ */
631
+ function () {
632
+ return fromEvent(window.document, 'scroll').subscribe((/**
633
+ * @return {?}
634
+ */
635
+ function () { return _this._scrolled.next(); }));
636
+ }));
604
637
  };
605
638
  /** Cleans up the global scroll listener. */
606
639
  /**
@@ -627,7 +660,7 @@ var ScrollDispatcher = /** @class */ (function () {
627
660
  { type: NgZone },
628
661
  { type: Platform }
629
662
  ]; };
630
- /** @nocollapse */ ScrollDispatcher.ngInjectableDef = defineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(inject(NgZone), inject(Platform)); }, token: ScrollDispatcher, providedIn: "root" });
663
+ /** @nocollapse */ ScrollDispatcher.ngInjectableDef = ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(ɵɵinject(NgZone), ɵɵinject(Platform)); }, token: ScrollDispatcher, providedIn: "root" });
631
664
  return ScrollDispatcher;
632
665
  }());
633
666
  /**
@@ -653,7 +686,7 @@ var SCROLL_DISPATCHER_PROVIDER = {
653
686
 
654
687
  /**
655
688
  * @fileoverview added by tsickle
656
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
689
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
657
690
  */
658
691
  /**
659
692
  * Sends an event when the directive's element is scrolled. Registers itself with the
@@ -668,12 +701,19 @@ var CdkScrollable = /** @class */ (function () {
668
701
  this.ngZone = ngZone;
669
702
  this.dir = dir;
670
703
  this._destroyed = new Subject();
671
- this._elementScrolled = new Observable(function (observer) {
672
- return _this.ngZone.runOutsideAngular(function () {
704
+ this._elementScrolled = new Observable((/**
705
+ * @param {?} observer
706
+ * @return {?}
707
+ */
708
+ function (observer) {
709
+ return _this.ngZone.runOutsideAngular((/**
710
+ * @return {?}
711
+ */
712
+ function () {
673
713
  return fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(takeUntil(_this._destroyed))
674
714
  .subscribe(observer);
675
- });
676
- });
715
+ }));
716
+ }));
677
717
  }
678
718
  /**
679
719
  * @return {?}
@@ -903,7 +943,7 @@ var CdkScrollable = /** @class */ (function () {
903
943
 
904
944
  /**
905
945
  * @fileoverview added by tsickle
906
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
946
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
907
947
  */
908
948
  /**
909
949
  * Checks if the given ranges are equal.
@@ -950,11 +990,25 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
950
990
  /**
951
991
  * Emits when the index of the first element visible in the viewport changes.
952
992
  */
953
- _this.scrolledIndexChange = new Observable(function (observer) {
954
- return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) {
955
- return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); });
956
- });
957
- });
993
+ _this.scrolledIndexChange = new Observable((/**
994
+ * @param {?} observer
995
+ * @return {?}
996
+ */
997
+ function (observer) {
998
+ return _this._scrollStrategy.scrolledIndexChange.subscribe((/**
999
+ * @param {?} index
1000
+ * @return {?}
1001
+ */
1002
+ function (index) {
1003
+ return Promise.resolve().then((/**
1004
+ * @return {?}
1005
+ */
1006
+ function () { return _this.ngZone.run((/**
1007
+ * @return {?}
1008
+ */
1009
+ function () { return observer.next(index); })); }));
1010
+ }));
1011
+ }));
958
1012
  /**
959
1013
  * A stream that emits whenever the rendered range changes.
960
1014
  */
@@ -1015,7 +1069,13 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1015
1069
  // the Viewport to be rendered with the correct size before we measure. We run this outside the
1016
1070
  // zone to avoid causing more change detection cycles. We handle the change detection loop
1017
1071
  // ourselves instead.
1018
- this.ngZone.runOutsideAngular(function () { return Promise.resolve().then(function () {
1072
+ this.ngZone.runOutsideAngular((/**
1073
+ * @return {?}
1074
+ */
1075
+ function () { return Promise.resolve().then((/**
1076
+ * @return {?}
1077
+ */
1078
+ function () {
1019
1079
  _this._measureViewportSize();
1020
1080
  _this._scrollStrategy.attach(_this);
1021
1081
  _this.elementScrolled()
@@ -1026,9 +1086,12 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1026
1086
  // there are multiple scroll events in the same frame we only need to recheck
1027
1087
  // our layout once.
1028
1088
  auditTime(0, SCROLL_SCHEDULER))
1029
- .subscribe(function () { return _this._scrollStrategy.onContentScrolled(); });
1089
+ .subscribe((/**
1090
+ * @return {?}
1091
+ */
1092
+ function () { return _this._scrollStrategy.onContentScrolled(); }));
1030
1093
  _this._markChangeDetectionNeeded();
1031
- }); });
1094
+ })); }));
1032
1095
  };
1033
1096
  /**
1034
1097
  * @return {?}
@@ -1063,9 +1126,16 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1063
1126
  // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
1064
1127
  // changes. Run outside the zone to avoid triggering change detection, since we're managing the
1065
1128
  // change detection loop ourselves.
1066
- this.ngZone.runOutsideAngular(function () {
1129
+ this.ngZone.runOutsideAngular((/**
1130
+ * @return {?}
1131
+ */
1132
+ function () {
1067
1133
  _this._forOf = forOf;
1068
- _this._forOf.dataStream.pipe(takeUntil(_this._detachedSubject)).subscribe(function (data) {
1134
+ _this._forOf.dataStream.pipe(takeUntil(_this._detachedSubject)).subscribe((/**
1135
+ * @param {?} data
1136
+ * @return {?}
1137
+ */
1138
+ function (data) {
1069
1139
  /** @type {?} */
1070
1140
  var newLength = data.length;
1071
1141
  if (newLength !== _this._dataLength) {
@@ -1073,8 +1143,8 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1073
1143
  _this._scrollStrategy.onDataLengthChanged();
1074
1144
  }
1075
1145
  _this._doChangeDetection();
1076
- });
1077
- });
1146
+ }));
1147
+ }));
1078
1148
  };
1079
1149
  /** Detaches the current `CdkVirtualForOf`. */
1080
1150
  /**
@@ -1178,7 +1248,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1178
1248
  var _this = this;
1179
1249
  if (!rangesEqual(this._renderedRange, range)) {
1180
1250
  this._renderedRangeSubject.next(this._renderedRange = range);
1181
- this._markChangeDetectionNeeded(function () { return _this._scrollStrategy.onContentRendered(); });
1251
+ this._markChangeDetectionNeeded((/**
1252
+ * @return {?}
1253
+ */
1254
+ function () { return _this._scrollStrategy.onContentRendered(); }));
1182
1255
  }
1183
1256
  };
1184
1257
  /**
@@ -1240,7 +1313,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1240
1313
  // We know this value is safe because we parse `offset` with `Number()` before passing it
1241
1314
  // into the string.
1242
1315
  this._renderedContentTransform = transform;
1243
- this._markChangeDetectionNeeded(function () {
1316
+ this._markChangeDetectionNeeded((/**
1317
+ * @return {?}
1318
+ */
1319
+ function () {
1244
1320
  if (_this._renderedContentOffsetNeedsRewrite) {
1245
1321
  _this._renderedContentOffset -= _this.measureRenderedContentSize();
1246
1322
  _this._renderedContentOffsetNeedsRewrite = false;
@@ -1249,7 +1325,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1249
1325
  else {
1250
1326
  _this._scrollStrategy.onRenderedOffsetChanged();
1251
1327
  }
1252
- });
1328
+ }));
1253
1329
  }
1254
1330
  };
1255
1331
  /**
@@ -1417,9 +1493,15 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1417
1493
  // properties sequentially we only have to run `_doChangeDetection` once at the end.
1418
1494
  if (!this._isChangeDetectionPending) {
1419
1495
  this._isChangeDetectionPending = true;
1420
- this.ngZone.runOutsideAngular(function () { return Promise.resolve().then(function () {
1496
+ this.ngZone.runOutsideAngular((/**
1497
+ * @return {?}
1498
+ */
1499
+ function () { return Promise.resolve().then((/**
1500
+ * @return {?}
1501
+ */
1502
+ function () {
1421
1503
  _this._doChangeDetection();
1422
- }); });
1504
+ })); }));
1423
1505
  }
1424
1506
  };
1425
1507
  /** Run change detection. */
@@ -1439,7 +1521,10 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1439
1521
  // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
1440
1522
  // from the root, since the repeated items are content projected in. Calling `detectChanges`
1441
1523
  // instead does not properly check the projected content.
1442
- this.ngZone.run(function () { return _this._changeDetectorRef.markForCheck(); });
1524
+ this.ngZone.run((/**
1525
+ * @return {?}
1526
+ */
1527
+ function () { return _this._changeDetectorRef.markForCheck(); }));
1443
1528
  // Apply the content transform. The transform can't be set via an Angular binding because
1444
1529
  // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
1445
1530
  // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
@@ -1489,7 +1574,7 @@ var CdkVirtualScrollViewport = /** @class */ (function (_super) {
1489
1574
 
1490
1575
  /**
1491
1576
  * @fileoverview added by tsickle
1492
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1577
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1493
1578
  */
1494
1579
  /**
1495
1580
  * Helper to extract size from a DOM Node.
@@ -1544,10 +1629,14 @@ var CdkVirtualForOf = /** @class */ (function () {
1544
1629
  // Use `_changeDataSource` to disconnect from the previous data source and connect to the
1545
1630
  // new one, passing back a stream of data changes which we run through `switchMap` to give
1546
1631
  // us a data stream that emits the latest data from whatever the current `DataSource` is.
1547
- switchMap(function (_a) {
1632
+ switchMap((/**
1633
+ * @param {?} __0
1634
+ * @return {?}
1635
+ */
1636
+ function (_a) {
1548
1637
  var prev = _a[0], cur = _a[1];
1549
1638
  return _this._changeDataSource(prev, cur);
1550
- }),
1639
+ })),
1551
1640
  // Replay the last emitted data when someone subscribes.
1552
1641
  shareReplay(1));
1553
1642
  /**
@@ -1565,15 +1654,26 @@ var CdkVirtualForOf = /** @class */ (function () {
1565
1654
  */
1566
1655
  this._needsUpdate = false;
1567
1656
  this._destroyed = new Subject();
1568
- this.dataStream.subscribe(function (data) {
1657
+ this.dataStream.subscribe((/**
1658
+ * @param {?} data
1659
+ * @return {?}
1660
+ */
1661
+ function (data) {
1569
1662
  _this._data = data;
1570
1663
  _this._onRenderedDataChange();
1571
- });
1572
- this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(function (range) {
1664
+ }));
1665
+ this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe((/**
1666
+ * @param {?} range
1667
+ * @return {?}
1668
+ */
1669
+ function (range) {
1573
1670
  _this._renderedRange = range;
1574
- ngZone.run(function () { return _this.viewChange.next(_this._renderedRange); });
1671
+ ngZone.run((/**
1672
+ * @return {?}
1673
+ */
1674
+ function () { return _this.viewChange.next(_this._renderedRange); }));
1575
1675
  _this._onRenderedDataChange();
1576
- });
1676
+ }));
1577
1677
  this._viewport.attach(this);
1578
1678
  }
1579
1679
  Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForOf", {
@@ -1621,7 +1721,12 @@ var CdkVirtualForOf = /** @class */ (function () {
1621
1721
  var _this = this;
1622
1722
  this._needsUpdate = true;
1623
1723
  this._cdkVirtualForTrackBy = fn ?
1624
- function (index, item) { return fn(index + (_this._renderedRange ? _this._renderedRange.start : 0), item); } :
1724
+ (/**
1725
+ * @param {?} index
1726
+ * @param {?} item
1727
+ * @return {?}
1728
+ */
1729
+ function (index, item) { return fn(index + (_this._renderedRange ? _this._renderedRange.start : 0), item); }) :
1625
1730
  undefined;
1626
1731
  },
1627
1732
  enumerable: true,
@@ -1723,6 +1828,7 @@ var CdkVirtualForOf = /** @class */ (function () {
1723
1828
  */
1724
1829
  function () {
1725
1830
  this._viewport.detach();
1831
+ this._dataSourceChanges.next();
1726
1832
  this._dataSourceChanges.complete();
1727
1833
  this.viewChange.complete();
1728
1834
  this._destroyed.next();
@@ -1773,7 +1879,7 @@ var CdkVirtualForOf = /** @class */ (function () {
1773
1879
  oldDs.disconnect(this);
1774
1880
  }
1775
1881
  this._needsUpdate = true;
1776
- return newDs.connect(this);
1882
+ return newDs ? newDs.connect(this) : of();
1777
1883
  };
1778
1884
  /** Update the `CdkVirtualForOfContext` for all views. */
1779
1885
  /**
@@ -1816,7 +1922,13 @@ var CdkVirtualForOf = /** @class */ (function () {
1816
1922
  function (changes) {
1817
1923
  var _this = this;
1818
1924
  // Rearrange the views to put them in the right location.
1819
- changes.forEachOperation(function (record, adjustedPreviousIndex, currentIndex) {
1925
+ changes.forEachOperation((/**
1926
+ * @param {?} record
1927
+ * @param {?} adjustedPreviousIndex
1928
+ * @param {?} currentIndex
1929
+ * @return {?}
1930
+ */
1931
+ function (record, adjustedPreviousIndex, currentIndex) {
1820
1932
  if (record.previousIndex == null) { // Item added.
1821
1933
  // Item added.
1822
1934
  /** @type {?} */
@@ -1833,13 +1945,17 @@ var CdkVirtualForOf = /** @class */ (function () {
1833
1945
  _this._viewContainerRef.move(view, currentIndex);
1834
1946
  view.context.$implicit = record.item;
1835
1947
  }
1836
- });
1948
+ }));
1837
1949
  // Update $implicit for any items that had an identity change.
1838
- changes.forEachIdentityChange(function (record) {
1950
+ changes.forEachIdentityChange((/**
1951
+ * @param {?} record
1952
+ * @return {?}
1953
+ */
1954
+ function (record) {
1839
1955
  /** @type {?} */
1840
1956
  var view = (/** @type {?} */ (_this._viewContainerRef.get((/** @type {?} */ (record.currentIndex)))));
1841
1957
  view.context.$implicit = record.item;
1842
- });
1958
+ }));
1843
1959
  // Update the context variables on all items.
1844
1960
  /** @type {?} */
1845
1961
  var count = this._data.length;
@@ -2010,7 +2126,7 @@ var CdkVirtualForOf = /** @class */ (function () {
2010
2126
 
2011
2127
  /**
2012
2128
  * @fileoverview added by tsickle
2013
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2129
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2014
2130
  */
2015
2131
  var ScrollingModule = /** @class */ (function () {
2016
2132
  function ScrollingModule() {
@@ -2053,7 +2169,7 @@ var ScrollDispatchModule = /** @class */ (function () {
2053
2169
 
2054
2170
  /**
2055
2171
  * @fileoverview added by tsickle
2056
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2172
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2057
2173
  */
2058
2174
  /**
2059
2175
  * Time in ms to throttle the resize events by default.
@@ -2068,14 +2184,20 @@ var ViewportRuler = /** @class */ (function () {
2068
2184
  function ViewportRuler(_platform, ngZone) {
2069
2185
  var _this = this;
2070
2186
  this._platform = _platform;
2071
- ngZone.runOutsideAngular(function () {
2187
+ ngZone.runOutsideAngular((/**
2188
+ * @return {?}
2189
+ */
2190
+ function () {
2072
2191
  _this._change = _platform.isBrowser ?
2073
2192
  merge(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange')) :
2074
2193
  of();
2075
2194
  // Note that we need to do the subscription inside `runOutsideAngular`
2076
2195
  // since subscribing is what causes the event listener to be added.
2077
- _this._invalidateCache = _this.change().subscribe(function () { return _this._updateViewportSize(); });
2078
- });
2196
+ _this._invalidateCache = _this.change().subscribe((/**
2197
+ * @return {?}
2198
+ */
2199
+ function () { return _this._updateViewportSize(); }));
2200
+ }));
2079
2201
  }
2080
2202
  /**
2081
2203
  * @return {?}
@@ -2213,7 +2335,7 @@ var ViewportRuler = /** @class */ (function () {
2213
2335
  { type: Platform },
2214
2336
  { type: NgZone }
2215
2337
  ]; };
2216
- /** @nocollapse */ ViewportRuler.ngInjectableDef = defineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(inject(Platform), inject(NgZone)); }, token: ViewportRuler, providedIn: "root" });
2338
+ /** @nocollapse */ ViewportRuler.ngInjectableDef = ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(ɵɵinject(Platform), ɵɵinject(NgZone)); }, token: ViewportRuler, providedIn: "root" });
2217
2339
  return ViewportRuler;
2218
2340
  }());
2219
2341
  /**
@@ -2239,12 +2361,12 @@ var VIEWPORT_RULER_PROVIDER = {
2239
2361
 
2240
2362
  /**
2241
2363
  * @fileoverview added by tsickle
2242
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2364
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2243
2365
  */
2244
2366
 
2245
2367
  /**
2246
2368
  * @fileoverview added by tsickle
2247
- * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2369
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2248
2370
  */
2249
2371
 
2250
2372
  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 };