@angular/cdk 10.1.1 → 10.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 (223) hide show
  1. package/a11y/index.metadata.json +1 -1
  2. package/a11y/key-manager/list-key-manager.d.ts +4 -3
  3. package/bundles/cdk-a11y.umd.js +440 -384
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +34 -10
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-accordion.umd.js +40 -40
  8. package/bundles/cdk-accordion.umd.js.map +1 -1
  9. package/bundles/cdk-accordion.umd.min.js +10 -2
  10. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  11. package/bundles/cdk-bidi.umd.js +25 -25
  12. package/bundles/cdk-bidi.umd.js.map +1 -1
  13. package/bundles/cdk-bidi.umd.min.js +5 -4
  14. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  15. package/bundles/cdk-clipboard.umd.js +37 -36
  16. package/bundles/cdk-clipboard.umd.js.map +1 -1
  17. package/bundles/cdk-clipboard.umd.min.js +10 -2
  18. package/bundles/cdk-clipboard.umd.min.js.map +1 -1
  19. package/bundles/cdk-coercion.umd.js.map +1 -1
  20. package/bundles/cdk-collections.umd.js +498 -238
  21. package/bundles/cdk-collections.umd.js.map +1 -1
  22. package/bundles/cdk-collections.umd.min.js +6 -4
  23. package/bundles/cdk-collections.umd.min.js.map +1 -1
  24. package/bundles/cdk-drag-drop.umd.js +508 -448
  25. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  26. package/bundles/cdk-drag-drop.umd.min.js +64 -8
  27. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  28. package/bundles/cdk-keycodes.umd.js.map +1 -1
  29. package/bundles/cdk-layout.umd.js +30 -26
  30. package/bundles/cdk-layout.umd.js.map +1 -1
  31. package/bundles/cdk-layout.umd.min.js +7 -6
  32. package/bundles/cdk-layout.umd.min.js.map +1 -1
  33. package/bundles/cdk-observers.umd.js +34 -34
  34. package/bundles/cdk-observers.umd.js.map +1 -1
  35. package/bundles/cdk-observers.umd.min.js +2 -2
  36. package/bundles/cdk-observers.umd.min.js.map +1 -1
  37. package/bundles/cdk-overlay.umd.js +492 -435
  38. package/bundles/cdk-overlay.umd.js.map +1 -1
  39. package/bundles/cdk-overlay.umd.min.js +51 -11
  40. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  41. package/bundles/cdk-platform.umd.js +38 -11
  42. package/bundles/cdk-platform.umd.js.map +1 -1
  43. package/bundles/cdk-platform.umd.min.js +5 -12
  44. package/bundles/cdk-platform.umd.min.js.map +1 -1
  45. package/bundles/cdk-portal.umd.js +385 -322
  46. package/bundles/cdk-portal.umd.js.map +1 -1
  47. package/bundles/cdk-portal.umd.min.js +3 -12
  48. package/bundles/cdk-portal.umd.min.js.map +1 -1
  49. package/bundles/cdk-scrolling.umd.js +503 -490
  50. package/bundles/cdk-scrolling.umd.js.map +1 -1
  51. package/bundles/cdk-scrolling.umd.min.js +20 -34
  52. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  53. package/bundles/cdk-stepper.umd.js +135 -136
  54. package/bundles/cdk-stepper.umd.js.map +1 -1
  55. package/bundles/cdk-stepper.umd.min.js +11 -2
  56. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  57. package/bundles/cdk-table.umd.js +923 -653
  58. package/bundles/cdk-table.umd.js.map +1 -1
  59. package/bundles/cdk-table.umd.min.js +7 -22
  60. package/bundles/cdk-table.umd.min.js.map +1 -1
  61. package/bundles/cdk-testing-protractor.umd.js +310 -245
  62. package/bundles/cdk-testing-protractor.umd.js.map +1 -1
  63. package/bundles/cdk-testing-protractor.umd.min.js +2 -9
  64. package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
  65. package/bundles/cdk-testing-testbed.umd.js +341 -292
  66. package/bundles/cdk-testing-testbed.umd.js.map +1 -1
  67. package/bundles/cdk-testing-testbed.umd.min.js +6 -29
  68. package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
  69. package/bundles/cdk-testing.umd.js +342 -270
  70. package/bundles/cdk-testing.umd.js.map +1 -1
  71. package/bundles/cdk-testing.umd.min.js +3 -17
  72. package/bundles/cdk-testing.umd.min.js.map +1 -1
  73. package/bundles/cdk-text-field.umd.js +53 -53
  74. package/bundles/cdk-text-field.umd.js.map +1 -1
  75. package/bundles/cdk-text-field.umd.min.js +10 -2
  76. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  77. package/bundles/cdk-tree.umd.js +481 -417
  78. package/bundles/cdk-tree.umd.js.map +1 -1
  79. package/bundles/cdk-tree.umd.min.js +28 -3
  80. package/bundles/cdk-tree.umd.min.js.map +1 -1
  81. package/bundles/cdk.umd.js +1 -1
  82. package/bundles/cdk.umd.js.map +1 -1
  83. package/bundles/cdk.umd.min.js +1 -1
  84. package/bundles/cdk.umd.min.js.map +1 -1
  85. package/collections/dispose-view-repeater-strategy.d.ts +22 -0
  86. package/collections/index.metadata.json +1 -1
  87. package/collections/public-api.d.ts +3 -0
  88. package/collections/recycle-view-repeater-strategy.d.ts +56 -0
  89. package/collections/view-repeater.d.ts +94 -0
  90. package/drag-drop/index.d.ts +1 -2
  91. package/drag-drop/index.metadata.json +1 -1
  92. package/drag-drop/public-api.d.ts +2 -1
  93. package/esm2015/a11y/aria-describer/aria-describer.js +3 -3
  94. package/esm2015/a11y/focus-monitor/focus-monitor.js +3 -3
  95. package/esm2015/a11y/focus-trap/focus-trap.js +5 -4
  96. package/esm2015/a11y/key-manager/list-key-manager.js +8 -6
  97. package/esm2015/clipboard/pending-copy.js +7 -6
  98. package/esm2015/collections/collection-viewer.js +1 -0
  99. package/esm2015/collections/dispose-view-repeater-strategy.js +48 -0
  100. package/esm2015/collections/public-api.js +4 -1
  101. package/esm2015/collections/recycle-view-repeater-strategy.js +128 -0
  102. package/esm2015/collections/selection-model.js +2 -2
  103. package/esm2015/collections/tree-adapter.js +1 -0
  104. package/esm2015/collections/view-repeater.js +16 -0
  105. package/esm2015/drag-drop/clone-node.js +9 -1
  106. package/esm2015/drag-drop/directives/drag-handle.js +1 -3
  107. package/esm2015/drag-drop/directives/drag.js +7 -5
  108. package/esm2015/drag-drop/directives/drop-list.js +3 -3
  109. package/esm2015/drag-drop/drag-events.js +1 -0
  110. package/esm2015/drag-drop/drag-ref.js +2 -2
  111. package/esm2015/drag-drop/index.js +1 -3
  112. package/esm2015/drag-drop/public-api.js +3 -2
  113. package/esm2015/layout/breakpoints-observer.js +9 -9
  114. package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +11 -9
  115. package/esm2015/overlay/overlay-config.js +1 -5
  116. package/esm2015/overlay/overlay-directives.js +18 -2
  117. package/esm2015/overlay/overlay-ref.js +6 -8
  118. package/esm2015/overlay/overlay-reference.js +1 -0
  119. package/esm2015/overlay/overlay.js +4 -4
  120. package/esm2015/overlay/position/connected-position-strategy.js +2 -9
  121. package/esm2015/overlay/position/flexible-connected-position-strategy.js +19 -16
  122. package/esm2015/overlay/position/position-strategy.js +1 -0
  123. package/esm2015/overlay/scroll/close-scroll-strategy.js +2 -2
  124. package/esm2015/overlay/scroll/reposition-scroll-strategy.js +2 -2
  125. package/esm2015/platform/features/scrolling.js +29 -2
  126. package/esm2015/portal/dom-portal-outlet.js +7 -4
  127. package/esm2015/portal/portal-directives.js +3 -3
  128. package/esm2015/portal/portal-injector.js +3 -1
  129. package/esm2015/portal/portal.js +25 -19
  130. package/esm2015/scrolling/fixed-size-virtual-scroll.js +2 -2
  131. package/esm2015/scrolling/scrolling-module.js +4 -1
  132. package/esm2015/scrolling/virtual-for-of.js +67 -92
  133. package/esm2015/scrolling/virtual-scroll-repeater.js +1 -0
  134. package/esm2015/scrolling/virtual-scroll-viewport.js +5 -5
  135. package/esm2015/stepper/stepper.js +19 -17
  136. package/esm2015/table/cell.js +34 -14
  137. package/esm2015/table/coalesced-style-scheduler.js +87 -0
  138. package/esm2015/table/public-api.js +2 -1
  139. package/esm2015/table/sticky-styler.js +79 -45
  140. package/esm2015/table/table-module.js +4 -2
  141. package/esm2015/table/table.js +70 -44
  142. package/esm2015/table/text-column.js +9 -5
  143. package/esm2015/testing/element-dimensions.js +1 -0
  144. package/esm2015/testing/protractor/protractor-element.js +6 -3
  145. package/esm2015/testing/public-api.js +2 -1
  146. package/esm2015/testing/test-element.js +1 -1
  147. package/esm2015/testing/testbed/task-state-zone-interceptor.js +2 -2
  148. package/esm2015/testing/testbed/unit-test-element.js +26 -21
  149. package/esm2015/testing/text-filtering.js +23 -0
  150. package/esm2015/text-field/autofill.js +3 -3
  151. package/esm2015/tree/control/tree-control.js +1 -0
  152. package/esm2015/tree/nested-node.js +2 -2
  153. package/esm2015/tree/padding.js +34 -20
  154. package/esm2015/tree/tree.js +14 -27
  155. package/esm2015/version.js +1 -1
  156. package/fesm2015/a11y.js +15 -12
  157. package/fesm2015/a11y.js.map +1 -1
  158. package/fesm2015/cdk.js +1 -1
  159. package/fesm2015/cdk.js.map +1 -1
  160. package/fesm2015/clipboard.js +6 -5
  161. package/fesm2015/clipboard.js.map +1 -1
  162. package/fesm2015/collections.js +194 -3
  163. package/fesm2015/collections.js.map +1 -1
  164. package/fesm2015/drag-drop.js +32 -23
  165. package/fesm2015/drag-drop.js.map +1 -1
  166. package/fesm2015/layout.js +8 -8
  167. package/fesm2015/layout.js.map +1 -1
  168. package/fesm2015/overlay.js +55 -48
  169. package/fesm2015/overlay.js.map +1 -1
  170. package/fesm2015/platform.js +28 -1
  171. package/fesm2015/platform.js.map +1 -1
  172. package/fesm2015/portal.js +34 -23
  173. package/fesm2015/portal.js.map +1 -1
  174. package/fesm2015/scrolling.js +72 -95
  175. package/fesm2015/scrolling.js.map +1 -1
  176. package/fesm2015/stepper.js +19 -17
  177. package/fesm2015/stepper.js.map +1 -1
  178. package/fesm2015/table.js +274 -105
  179. package/fesm2015/table.js.map +1 -1
  180. package/fesm2015/testing/protractor.js +5 -2
  181. package/fesm2015/testing/protractor.js.map +1 -1
  182. package/fesm2015/testing/testbed.js +26 -21
  183. package/fesm2015/testing/testbed.js.map +1 -1
  184. package/fesm2015/testing.js +24 -1
  185. package/fesm2015/testing.js.map +1 -1
  186. package/fesm2015/text-field.js +2 -2
  187. package/fesm2015/text-field.js.map +1 -1
  188. package/fesm2015/tree.js +46 -45
  189. package/fesm2015/tree.js.map +1 -1
  190. package/layout/breakpoints-observer.d.ts +3 -3
  191. package/overlay/index.metadata.json +1 -1
  192. package/overlay/overlay-config.d.ts +0 -4
  193. package/overlay/overlay-directives.d.ts +1 -0
  194. package/overlay/position/connected-position-strategy.d.ts +1 -3
  195. package/package.json +1 -1
  196. package/platform/index.metadata.json +1 -1
  197. package/portal/index.metadata.json +1 -1
  198. package/portal/portal-injector.d.ts +2 -0
  199. package/schematics/index.js +1 -1
  200. package/schematics/ng-add/index.js +1 -1
  201. package/schematics/ng-update/data/index.js +1 -1
  202. package/schematics/ng-update/public-api.js +1 -1
  203. package/schematics/update-tool/public-api.js +1 -1
  204. package/schematics/utils/index.js +1 -1
  205. package/scrolling/index.metadata.json +1 -1
  206. package/scrolling/scrolling-module.d.ts +3 -0
  207. package/scrolling/virtual-for-of.d.ts +11 -19
  208. package/stepper/index.metadata.json +1 -1
  209. package/stepper/stepper.d.ts +7 -10
  210. package/table/cell.d.ts +21 -1
  211. package/table/coalesced-style-scheduler.d.ts +41 -0
  212. package/table/index.metadata.json +1 -1
  213. package/table/public-api.d.ts +1 -0
  214. package/table/sticky-styler.d.ts +7 -1
  215. package/table/table.d.ts +14 -8
  216. package/testing/protractor/protractor-element.d.ts +2 -2
  217. package/testing/public-api.d.ts +1 -0
  218. package/testing/test-element.d.ts +9 -2
  219. package/testing/testbed/unit-test-element.d.ts +9 -2
  220. package/testing/text-filtering.d.ts +13 -0
  221. package/tree/index.metadata.json +1 -1
  222. package/tree/padding.d.ts +14 -0
  223. package/tree/tree.d.ts +2 -4
@@ -59,7 +59,7 @@
59
59
  * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.
60
60
  */
61
61
  FixedSizeVirtualScrollStrategy.prototype.updateItemAndBufferSize = function (itemSize, minBufferPx, maxBufferPx) {
62
- if (maxBufferPx < minBufferPx) {
62
+ if (maxBufferPx < minBufferPx && (typeof ngDevMode === 'undefined' || ngDevMode)) {
63
63
  throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');
64
64
  }
65
65
  this._itemSize = itemSize;
@@ -192,23 +192,23 @@
192
192
  CdkFixedSizeVirtualScroll.prototype.ngOnChanges = function () {
193
193
  this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);
194
194
  };
195
- CdkFixedSizeVirtualScroll.decorators = [
196
- { type: i0.Directive, args: [{
197
- selector: 'cdk-virtual-scroll-viewport[itemSize]',
198
- providers: [{
199
- provide: VIRTUAL_SCROLL_STRATEGY,
200
- useFactory: _fixedSizeVirtualScrollStrategyFactory,
201
- deps: [i0.forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
202
- }],
203
- },] }
204
- ];
205
- CdkFixedSizeVirtualScroll.propDecorators = {
206
- itemSize: [{ type: i0.Input }],
207
- minBufferPx: [{ type: i0.Input }],
208
- maxBufferPx: [{ type: i0.Input }]
209
- };
210
195
  return CdkFixedSizeVirtualScroll;
211
196
  }());
197
+ CdkFixedSizeVirtualScroll.decorators = [
198
+ { type: i0.Directive, args: [{
199
+ selector: 'cdk-virtual-scroll-viewport[itemSize]',
200
+ providers: [{
201
+ provide: VIRTUAL_SCROLL_STRATEGY,
202
+ useFactory: _fixedSizeVirtualScrollStrategyFactory,
203
+ deps: [i0.forwardRef(function () { return CdkFixedSizeVirtualScroll; })],
204
+ }],
205
+ },] }
206
+ ];
207
+ CdkFixedSizeVirtualScroll.propDecorators = {
208
+ itemSize: [{ type: i0.Input }],
209
+ minBufferPx: [{ type: i0.Input }],
210
+ maxBufferPx: [{ type: i0.Input }]
211
+ };
212
212
 
213
213
  /**
214
214
  * @license
@@ -366,17 +366,17 @@
366
366
  this._globalSubscription = null;
367
367
  }
368
368
  };
369
- ScrollDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i2.DOCUMENT, 8)); }, token: ScrollDispatcher, providedIn: "root" });
370
- ScrollDispatcher.decorators = [
371
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
372
- ];
373
- ScrollDispatcher.ctorParameters = function () { return [
374
- { type: i0.NgZone },
375
- { type: i1.Platform },
376
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
377
- ]; };
378
369
  return ScrollDispatcher;
379
370
  }());
371
+ ScrollDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i2.DOCUMENT, 8)); }, token: ScrollDispatcher, providedIn: "root" });
372
+ ScrollDispatcher.decorators = [
373
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
374
+ ];
375
+ ScrollDispatcher.ctorParameters = function () { return [
376
+ { type: i0.NgZone },
377
+ { type: i1.Platform },
378
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
379
+ ]; };
380
380
 
381
381
  /**
382
382
  * @license
@@ -398,12 +398,8 @@
398
398
  this.ngZone = ngZone;
399
399
  this.dir = dir;
400
400
  this._destroyed = new rxjs.Subject();
401
- this._elementScrolled = new rxjs.Observable(function (observer) {
402
- return _this.ngZone.runOutsideAngular(function () {
403
- return rxjs.fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(operators.takeUntil(_this._destroyed))
404
- .subscribe(observer);
405
- });
406
- });
401
+ this._elementScrolled = new rxjs.Observable(function (observer) { return _this.ngZone.runOutsideAngular(function () { return rxjs.fromEvent(_this.elementRef.nativeElement, 'scroll').pipe(operators.takeUntil(_this._destroyed))
402
+ .subscribe(observer); }); });
407
403
  }
408
404
  CdkScrollable.prototype.ngOnInit = function () {
409
405
  this.scrollDispatcher.register(this);
@@ -537,246 +533,319 @@
537
533
  }
538
534
  }
539
535
  };
540
- CdkScrollable.decorators = [
541
- { type: i0.Directive, args: [{
542
- selector: '[cdk-scrollable], [cdkScrollable]'
543
- },] }
544
- ];
545
- CdkScrollable.ctorParameters = function () { return [
546
- { type: i0.ElementRef },
547
- { type: ScrollDispatcher },
548
- { type: i0.NgZone },
549
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
550
- ]; };
551
536
  return CdkScrollable;
552
537
  }());
538
+ CdkScrollable.decorators = [
539
+ { type: i0.Directive, args: [{
540
+ selector: '[cdk-scrollable], [cdkScrollable]'
541
+ },] }
542
+ ];
543
+ CdkScrollable.ctorParameters = function () { return [
544
+ { type: i0.ElementRef },
545
+ { type: ScrollDispatcher },
546
+ { type: i0.NgZone },
547
+ { type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
548
+ ]; };
549
+
550
+ /*! *****************************************************************************
551
+ Copyright (c) Microsoft Corporation.
553
552
 
554
- /*! *****************************************************************************
555
- Copyright (c) Microsoft Corporation.
556
-
557
- Permission to use, copy, modify, and/or distribute this software for any
558
- purpose with or without fee is hereby granted.
559
-
560
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
561
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
562
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
563
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
564
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
565
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
566
- PERFORMANCE OF THIS SOFTWARE.
567
- ***************************************************************************** */
568
- /* global Reflect, Promise */
569
-
570
- var extendStatics = function(d, b) {
571
- extendStatics = Object.setPrototypeOf ||
572
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
573
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
574
- return extendStatics(d, b);
575
- };
576
-
577
- function __extends(d, b) {
578
- extendStatics(d, b);
579
- function __() { this.constructor = d; }
580
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
581
- }
582
-
583
- var __assign = function() {
584
- __assign = Object.assign || function __assign(t) {
585
- for (var s, i = 1, n = arguments.length; i < n; i++) {
586
- s = arguments[i];
587
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
588
- }
589
- return t;
590
- };
591
- return __assign.apply(this, arguments);
592
- };
593
-
594
- function __rest(s, e) {
595
- var t = {};
596
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
597
- t[p] = s[p];
598
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
599
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
600
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
601
- t[p[i]] = s[p[i]];
602
- }
603
- return t;
604
- }
605
-
606
- function __decorate(decorators, target, key, desc) {
607
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
608
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
609
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
610
- return c > 3 && r && Object.defineProperty(target, key, r), r;
611
- }
612
-
613
- function __param(paramIndex, decorator) {
614
- return function (target, key) { decorator(target, key, paramIndex); }
615
- }
616
-
617
- function __metadata(metadataKey, metadataValue) {
618
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
619
- }
620
-
621
- function __awaiter(thisArg, _arguments, P, generator) {
622
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
623
- return new (P || (P = Promise))(function (resolve, reject) {
624
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
625
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
626
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
627
- step((generator = generator.apply(thisArg, _arguments || [])).next());
628
- });
629
- }
630
-
631
- function __generator(thisArg, body) {
632
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
633
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
634
- function verb(n) { return function (v) { return step([n, v]); }; }
635
- function step(op) {
636
- if (f) throw new TypeError("Generator is already executing.");
637
- while (_) try {
638
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
639
- if (y = 0, t) op = [op[0] & 2, t.value];
640
- switch (op[0]) {
641
- case 0: case 1: t = op; break;
642
- case 4: _.label++; return { value: op[1], done: false };
643
- case 5: _.label++; y = op[1]; op = [0]; continue;
644
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
645
- default:
646
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
647
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
648
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
649
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
650
- if (t[2]) _.ops.pop();
651
- _.trys.pop(); continue;
652
- }
653
- op = body.call(thisArg, _);
654
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
655
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
656
- }
657
- }
658
-
659
- var __createBinding = Object.create ? (function(o, m, k, k2) {
660
- if (k2 === undefined) k2 = k;
661
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
662
- }) : (function(o, m, k, k2) {
663
- if (k2 === undefined) k2 = k;
664
- o[k2] = m[k];
665
- });
666
-
667
- function __exportStar(m, exports) {
668
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
669
- }
670
-
671
- function __values(o) {
672
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
673
- if (m) return m.call(o);
674
- if (o && typeof o.length === "number") return {
675
- next: function () {
676
- if (o && i >= o.length) o = void 0;
677
- return { value: o && o[i++], done: !o };
678
- }
679
- };
680
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
681
- }
682
-
683
- function __read(o, n) {
684
- var m = typeof Symbol === "function" && o[Symbol.iterator];
685
- if (!m) return o;
686
- var i = m.call(o), r, ar = [], e;
687
- try {
688
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
689
- }
690
- catch (error) { e = { error: error }; }
691
- finally {
692
- try {
693
- if (r && !r.done && (m = i["return"])) m.call(i);
694
- }
695
- finally { if (e) throw e.error; }
696
- }
697
- return ar;
698
- }
699
-
700
- function __spread() {
701
- for (var ar = [], i = 0; i < arguments.length; i++)
702
- ar = ar.concat(__read(arguments[i]));
703
- return ar;
704
- }
705
-
706
- function __spreadArrays() {
707
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
708
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
709
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
710
- r[k] = a[j];
711
- return r;
712
- };
713
-
714
- function __await(v) {
715
- return this instanceof __await ? (this.v = v, this) : new __await(v);
716
- }
717
-
718
- function __asyncGenerator(thisArg, _arguments, generator) {
719
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
720
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
721
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
722
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
723
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
724
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
725
- function fulfill(value) { resume("next", value); }
726
- function reject(value) { resume("throw", value); }
727
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
728
- }
729
-
730
- function __asyncDelegator(o) {
731
- var i, p;
732
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
733
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
734
- }
735
-
736
- function __asyncValues(o) {
737
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
738
- var m = o[Symbol.asyncIterator], i;
739
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
740
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
741
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
742
- }
743
-
744
- function __makeTemplateObject(cooked, raw) {
745
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
746
- return cooked;
747
- };
748
-
749
- var __setModuleDefault = Object.create ? (function(o, v) {
750
- Object.defineProperty(o, "default", { enumerable: true, value: v });
751
- }) : function(o, v) {
752
- o["default"] = v;
753
- };
754
-
755
- function __importStar(mod) {
756
- if (mod && mod.__esModule) return mod;
757
- var result = {};
758
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
759
- __setModuleDefault(result, mod);
760
- return result;
761
- }
762
-
763
- function __importDefault(mod) {
764
- return (mod && mod.__esModule) ? mod : { default: mod };
765
- }
766
-
767
- function __classPrivateFieldGet(receiver, privateMap) {
768
- if (!privateMap.has(receiver)) {
769
- throw new TypeError("attempted to get private field on non-instance");
770
- }
771
- return privateMap.get(receiver);
772
- }
773
-
774
- function __classPrivateFieldSet(receiver, privateMap, value) {
775
- if (!privateMap.has(receiver)) {
776
- throw new TypeError("attempted to set private field on non-instance");
777
- }
778
- privateMap.set(receiver, value);
779
- return value;
553
+ Permission to use, copy, modify, and/or distribute this software for any
554
+ purpose with or without fee is hereby granted.
555
+
556
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
557
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
558
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
559
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
560
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
561
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
562
+ PERFORMANCE OF THIS SOFTWARE.
563
+ ***************************************************************************** */
564
+ /* global Reflect, Promise */
565
+ var extendStatics = function (d, b) {
566
+ extendStatics = Object.setPrototypeOf ||
567
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
568
+ function (d, b) { for (var p in b)
569
+ if (b.hasOwnProperty(p))
570
+ d[p] = b[p]; };
571
+ return extendStatics(d, b);
572
+ };
573
+ function __extends(d, b) {
574
+ extendStatics(d, b);
575
+ function __() { this.constructor = d; }
576
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
577
+ }
578
+ var __assign = function () {
579
+ __assign = Object.assign || function __assign(t) {
580
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
581
+ s = arguments[i];
582
+ for (var p in s)
583
+ if (Object.prototype.hasOwnProperty.call(s, p))
584
+ t[p] = s[p];
585
+ }
586
+ return t;
587
+ };
588
+ return __assign.apply(this, arguments);
589
+ };
590
+ function __rest(s, e) {
591
+ var t = {};
592
+ for (var p in s)
593
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
594
+ t[p] = s[p];
595
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
596
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
597
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
598
+ t[p[i]] = s[p[i]];
599
+ }
600
+ return t;
601
+ }
602
+ function __decorate(decorators, target, key, desc) {
603
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
604
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
605
+ r = Reflect.decorate(decorators, target, key, desc);
606
+ else
607
+ for (var i = decorators.length - 1; i >= 0; i--)
608
+ if (d = decorators[i])
609
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
610
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
611
+ }
612
+ function __param(paramIndex, decorator) {
613
+ return function (target, key) { decorator(target, key, paramIndex); };
614
+ }
615
+ function __metadata(metadataKey, metadataValue) {
616
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
617
+ return Reflect.metadata(metadataKey, metadataValue);
618
+ }
619
+ function __awaiter(thisArg, _arguments, P, generator) {
620
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
621
+ return new (P || (P = Promise))(function (resolve, reject) {
622
+ function fulfilled(value) { try {
623
+ step(generator.next(value));
624
+ }
625
+ catch (e) {
626
+ reject(e);
627
+ } }
628
+ function rejected(value) { try {
629
+ step(generator["throw"](value));
630
+ }
631
+ catch (e) {
632
+ reject(e);
633
+ } }
634
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
635
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
636
+ });
637
+ }
638
+ function __generator(thisArg, body) {
639
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
640
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
641
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
642
+ function verb(n) { return function (v) { return step([n, v]); }; }
643
+ function step(op) {
644
+ if (f)
645
+ throw new TypeError("Generator is already executing.");
646
+ while (_)
647
+ try {
648
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
649
+ return t;
650
+ if (y = 0, t)
651
+ op = [op[0] & 2, t.value];
652
+ switch (op[0]) {
653
+ case 0:
654
+ case 1:
655
+ t = op;
656
+ break;
657
+ case 4:
658
+ _.label++;
659
+ return { value: op[1], done: false };
660
+ case 5:
661
+ _.label++;
662
+ y = op[1];
663
+ op = [0];
664
+ continue;
665
+ case 7:
666
+ op = _.ops.pop();
667
+ _.trys.pop();
668
+ continue;
669
+ default:
670
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
671
+ _ = 0;
672
+ continue;
673
+ }
674
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
675
+ _.label = op[1];
676
+ break;
677
+ }
678
+ if (op[0] === 6 && _.label < t[1]) {
679
+ _.label = t[1];
680
+ t = op;
681
+ break;
682
+ }
683
+ if (t && _.label < t[2]) {
684
+ _.label = t[2];
685
+ _.ops.push(op);
686
+ break;
687
+ }
688
+ if (t[2])
689
+ _.ops.pop();
690
+ _.trys.pop();
691
+ continue;
692
+ }
693
+ op = body.call(thisArg, _);
694
+ }
695
+ catch (e) {
696
+ op = [6, e];
697
+ y = 0;
698
+ }
699
+ finally {
700
+ f = t = 0;
701
+ }
702
+ if (op[0] & 5)
703
+ throw op[1];
704
+ return { value: op[0] ? op[1] : void 0, done: true };
705
+ }
706
+ }
707
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
708
+ if (k2 === undefined)
709
+ k2 = k;
710
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
711
+ }) : (function (o, m, k, k2) {
712
+ if (k2 === undefined)
713
+ k2 = k;
714
+ o[k2] = m[k];
715
+ });
716
+ function __exportStar(m, exports) {
717
+ for (var p in m)
718
+ if (p !== "default" && !exports.hasOwnProperty(p))
719
+ __createBinding(exports, m, p);
720
+ }
721
+ function __values(o) {
722
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
723
+ if (m)
724
+ return m.call(o);
725
+ if (o && typeof o.length === "number")
726
+ return {
727
+ next: function () {
728
+ if (o && i >= o.length)
729
+ o = void 0;
730
+ return { value: o && o[i++], done: !o };
731
+ }
732
+ };
733
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
734
+ }
735
+ function __read(o, n) {
736
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
737
+ if (!m)
738
+ return o;
739
+ var i = m.call(o), r, ar = [], e;
740
+ try {
741
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
742
+ ar.push(r.value);
743
+ }
744
+ catch (error) {
745
+ e = { error: error };
746
+ }
747
+ finally {
748
+ try {
749
+ if (r && !r.done && (m = i["return"]))
750
+ m.call(i);
751
+ }
752
+ finally {
753
+ if (e)
754
+ throw e.error;
755
+ }
756
+ }
757
+ return ar;
758
+ }
759
+ function __spread() {
760
+ for (var ar = [], i = 0; i < arguments.length; i++)
761
+ ar = ar.concat(__read(arguments[i]));
762
+ return ar;
763
+ }
764
+ function __spreadArrays() {
765
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
766
+ s += arguments[i].length;
767
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
768
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
769
+ r[k] = a[j];
770
+ return r;
771
+ }
772
+ ;
773
+ function __await(v) {
774
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
775
+ }
776
+ function __asyncGenerator(thisArg, _arguments, generator) {
777
+ if (!Symbol.asyncIterator)
778
+ throw new TypeError("Symbol.asyncIterator is not defined.");
779
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
780
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
781
+ function verb(n) { if (g[n])
782
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
783
+ function resume(n, v) { try {
784
+ step(g[n](v));
785
+ }
786
+ catch (e) {
787
+ settle(q[0][3], e);
788
+ } }
789
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
790
+ function fulfill(value) { resume("next", value); }
791
+ function reject(value) { resume("throw", value); }
792
+ function settle(f, v) { if (f(v), q.shift(), q.length)
793
+ resume(q[0][0], q[0][1]); }
794
+ }
795
+ function __asyncDelegator(o) {
796
+ var i, p;
797
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
798
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
799
+ }
800
+ function __asyncValues(o) {
801
+ if (!Symbol.asyncIterator)
802
+ throw new TypeError("Symbol.asyncIterator is not defined.");
803
+ var m = o[Symbol.asyncIterator], i;
804
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
805
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
806
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
807
+ }
808
+ function __makeTemplateObject(cooked, raw) {
809
+ if (Object.defineProperty) {
810
+ Object.defineProperty(cooked, "raw", { value: raw });
811
+ }
812
+ else {
813
+ cooked.raw = raw;
814
+ }
815
+ return cooked;
816
+ }
817
+ ;
818
+ var __setModuleDefault = Object.create ? (function (o, v) {
819
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
820
+ }) : function (o, v) {
821
+ o["default"] = v;
822
+ };
823
+ function __importStar(mod) {
824
+ if (mod && mod.__esModule)
825
+ return mod;
826
+ var result = {};
827
+ if (mod != null)
828
+ for (var k in mod)
829
+ if (Object.hasOwnProperty.call(mod, k))
830
+ __createBinding(result, mod, k);
831
+ __setModuleDefault(result, mod);
832
+ return result;
833
+ }
834
+ function __importDefault(mod) {
835
+ return (mod && mod.__esModule) ? mod : { default: mod };
836
+ }
837
+ function __classPrivateFieldGet(receiver, privateMap) {
838
+ if (!privateMap.has(receiver)) {
839
+ throw new TypeError("attempted to get private field on non-instance");
840
+ }
841
+ return privateMap.get(receiver);
842
+ }
843
+ function __classPrivateFieldSet(receiver, privateMap, value) {
844
+ if (!privateMap.has(receiver)) {
845
+ throw new TypeError("attempted to set private field on non-instance");
846
+ }
847
+ privateMap.set(receiver, value);
848
+ return value;
780
849
  }
781
850
 
782
851
  /**
@@ -807,11 +876,11 @@
807
876
  this._document = document;
808
877
  ngZone.runOutsideAngular(function () {
809
878
  if (_platform.isBrowser) {
810
- var window_1 = _this._getWindow();
879
+ var window = _this._getWindow();
811
880
  // Note that bind the events ourselves, rather than going through something like RxJS's
812
881
  // `fromEvent` so that we can ensure that they're bound outside of the NgZone.
813
- window_1.addEventListener('resize', _this._changeListener);
814
- window_1.addEventListener('orientationchange', _this._changeListener);
882
+ window.addEventListener('resize', _this._changeListener);
883
+ window.addEventListener('orientationchange', _this._changeListener);
815
884
  }
816
885
  // We don't need to keep track of the subscription,
817
886
  // because we complete the `change` stream on destroy.
@@ -820,9 +889,9 @@
820
889
  }
821
890
  ViewportRuler.prototype.ngOnDestroy = function () {
822
891
  if (this._platform.isBrowser) {
823
- var window_2 = this._getWindow();
824
- window_2.removeEventListener('resize', this._changeListener);
825
- window_2.removeEventListener('orientationchange', this._changeListener);
892
+ var window = this._getWindow();
893
+ window.removeEventListener('resize', this._changeListener);
894
+ window.removeEventListener('orientationchange', this._changeListener);
826
895
  }
827
896
  this._change.complete();
828
897
  };
@@ -907,25 +976,18 @@
907
976
  { width: window.innerWidth, height: window.innerHeight } :
908
977
  { width: 0, height: 0 };
909
978
  };
910
- ViewportRuler.ɵprov = i0.ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i2.DOCUMENT, 8)); }, token: ViewportRuler, providedIn: "root" });
911
- ViewportRuler.decorators = [
912
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
913
- ];
914
- ViewportRuler.ctorParameters = function () { return [
915
- { type: i1.Platform },
916
- { type: i0.NgZone },
917
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
918
- ]; };
919
979
  return ViewportRuler;
920
980
  }());
981
+ ViewportRuler.ɵprov = i0.ɵɵdefineInjectable({ factory: function ViewportRuler_Factory() { return new ViewportRuler(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i2.DOCUMENT, 8)); }, token: ViewportRuler, providedIn: "root" });
982
+ ViewportRuler.decorators = [
983
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
984
+ ];
985
+ ViewportRuler.ctorParameters = function () { return [
986
+ { type: i1.Platform },
987
+ { type: i0.NgZone },
988
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.DOCUMENT,] }] }
989
+ ]; };
921
990
 
922
- /**
923
- * @license
924
- * Copyright Google LLC All Rights Reserved.
925
- *
926
- * Use of this source code is governed by an MIT-style license that can be
927
- * found in the LICENSE file at https://angular.io/license
928
- */
929
991
  /** Checks if the given ranges are equal. */
930
992
  function rangesEqual(r1, r2) {
931
993
  return r1.start == r2.start && r1.end == r2.end;
@@ -959,13 +1021,9 @@
959
1021
  // depending on how the strategy calculates the scrolled index, it may come at a cost to
960
1022
  // performance.
961
1023
  /** Emits when the index of the first element visible in the viewport changes. */
962
- _this.scrolledIndexChange = new rxjs.Observable(function (observer) {
963
- return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) {
964
- return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); });
965
- });
966
- });
1024
+ _this.scrolledIndexChange = new rxjs.Observable(function (observer) { return _this._scrollStrategy.scrolledIndexChange.subscribe(function (index) { return Promise.resolve().then(function () { return _this.ngZone.run(function () { return observer.next(index); }); }); }); });
967
1025
  /** A stream that emits whenever the rendered range changes. */
968
- _this.renderedRangeStream = _this._renderedRangeSubject.asObservable();
1026
+ _this.renderedRangeStream = _this._renderedRangeSubject;
969
1027
  /**
970
1028
  * The total size of all content (in pixels), including content that is not currently rendered.
971
1029
  */
@@ -993,7 +1051,7 @@
993
1051
  _this._runAfterChangeDetection = [];
994
1052
  /** Subscription to changes in the viewport size. */
995
1053
  _this._viewportChanges = rxjs.Subscription.EMPTY;
996
- if (!_scrollStrategy) {
1054
+ if (!_scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) {
997
1055
  throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
998
1056
  }
999
1057
  // @breaking-change 11.0.0 Remove null check for `viewportRuler`.
@@ -1052,7 +1110,7 @@
1052
1110
  /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
1053
1111
  CdkVirtualScrollViewport.prototype.attach = function (forOf) {
1054
1112
  var _this = this;
1055
- if (this._forOf) {
1113
+ if (this._forOf && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1056
1114
  throw Error('CdkVirtualScrollViewport is already attached.');
1057
1115
  }
1058
1116
  // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
@@ -1270,56 +1328,52 @@
1270
1328
  this._totalContentWidth =
1271
1329
  this.orientation === 'horizontal' ? this._totalContentSize + "px" : '';
1272
1330
  };
1273
- CdkVirtualScrollViewport.decorators = [
1274
- { type: i0.Component, args: [{
1275
- selector: 'cdk-virtual-scroll-viewport',
1276
- template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n",
1277
- host: {
1278
- 'class': 'cdk-virtual-scroll-viewport',
1279
- '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
1280
- '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
1281
- },
1282
- encapsulation: i0.ViewEncapsulation.None,
1283
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1284
- providers: [{
1285
- provide: CdkScrollable,
1286
- useExisting: CdkVirtualScrollViewport,
1287
- }],
1288
- styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"]
1289
- },] }
1290
- ];
1291
- CdkVirtualScrollViewport.ctorParameters = function () { return [
1292
- { type: i0.ElementRef },
1293
- { type: i0.ChangeDetectorRef },
1294
- { type: i0.NgZone },
1295
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [VIRTUAL_SCROLL_STRATEGY,] }] },
1296
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
1297
- { type: ScrollDispatcher },
1298
- { type: ViewportRuler, decorators: [{ type: i0.Optional }] }
1299
- ]; };
1300
- CdkVirtualScrollViewport.propDecorators = {
1301
- orientation: [{ type: i0.Input }],
1302
- scrolledIndexChange: [{ type: i0.Output }],
1303
- _contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { static: true },] }]
1304
- };
1305
1331
  return CdkVirtualScrollViewport;
1306
1332
  }(CdkScrollable));
1333
+ CdkVirtualScrollViewport.decorators = [
1334
+ { type: i0.Component, args: [{
1335
+ selector: 'cdk-virtual-scroll-viewport',
1336
+ template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n",
1337
+ host: {
1338
+ 'class': 'cdk-virtual-scroll-viewport',
1339
+ '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
1340
+ '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
1341
+ },
1342
+ encapsulation: i0.ViewEncapsulation.None,
1343
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1344
+ providers: [{
1345
+ provide: CdkScrollable,
1346
+ useExisting: CdkVirtualScrollViewport,
1347
+ }],
1348
+ styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"]
1349
+ },] }
1350
+ ];
1351
+ CdkVirtualScrollViewport.ctorParameters = function () { return [
1352
+ { type: i0.ElementRef },
1353
+ { type: i0.ChangeDetectorRef },
1354
+ { type: i0.NgZone },
1355
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [VIRTUAL_SCROLL_STRATEGY,] }] },
1356
+ { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
1357
+ { type: ScrollDispatcher },
1358
+ { type: ViewportRuler }
1359
+ ]; };
1360
+ CdkVirtualScrollViewport.propDecorators = {
1361
+ orientation: [{ type: i0.Input }],
1362
+ scrolledIndexChange: [{ type: i0.Output }],
1363
+ _contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { static: true },] }]
1364
+ };
1307
1365
 
1308
- /**
1309
- * @license
1310
- * Copyright Google LLC All Rights Reserved.
1311
- *
1312
- * Use of this source code is governed by an MIT-style license that can be
1313
- * found in the LICENSE file at https://angular.io/license
1314
- */
1315
- /** Helper to extract size from a DOM Node. */
1316
- function getSize(orientation, node) {
1366
+ /** Helper to extract the offset of a DOM Node in a certain direction. */
1367
+ function getOffset(orientation, direction, node) {
1317
1368
  var el = node;
1318
1369
  if (!el.getBoundingClientRect) {
1319
1370
  return 0;
1320
1371
  }
1321
1372
  var rect = el.getBoundingClientRect();
1322
- return orientation == 'horizontal' ? rect.width : rect.height;
1373
+ if (orientation === 'horizontal') {
1374
+ return direction === 'start' ? rect.left : rect.right;
1375
+ }
1376
+ return direction === 'start' ? rect.top : rect.bottom;
1323
1377
  }
1324
1378
  /**
1325
1379
  * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling
@@ -1333,22 +1387,20 @@
1333
1387
  _template,
1334
1388
  /** The set of available differs. */
1335
1389
  _differs,
1390
+ /** The strategy used to render items in the virtual scroll viewport. */
1391
+ _viewRepeater,
1336
1392
  /** The virtual scrolling viewport that these items are being rendered in. */
1337
1393
  _viewport, ngZone) {
1338
1394
  var _this = this;
1339
1395
  this._viewContainerRef = _viewContainerRef;
1340
1396
  this._template = _template;
1341
1397
  this._differs = _differs;
1398
+ this._viewRepeater = _viewRepeater;
1342
1399
  this._viewport = _viewport;
1343
1400
  /** Emits when the rendered view of the data changes. */
1344
1401
  this.viewChange = new rxjs.Subject();
1345
1402
  /** Subject that emits when a new DataSource instance is given. */
1346
1403
  this._dataSourceChanges = new rxjs.Subject();
1347
- /**
1348
- * The size of the cache used to store templates that are not being used for re-use later.
1349
- * Setting the cache size to `0` will disable caching. Defaults to 20 templates.
1350
- */
1351
- this.cdkVirtualForTemplateCacheSize = 20;
1352
1404
  /** Emits whenever the data in the current DataSource changes. */
1353
1405
  this.dataStream = this._dataSourceChanges
1354
1406
  .pipe(
@@ -1367,12 +1419,6 @@
1367
1419
  operators.shareReplay(1));
1368
1420
  /** The differ used to calculate changes to the data. */
1369
1421
  this._differ = null;
1370
- /**
1371
- * The template cache used to hold on ot template instancess that have been stamped out, but don't
1372
- * currently need to be rendered. These instances will be reused in the future rather than
1373
- * stamping out brand new ones.
1374
- */
1375
- this._templateCache = [];
1376
1422
  /** Whether the rendered data should be updated during the next ngDoCheck cycle. */
1377
1423
  this._needsUpdate = false;
1378
1424
  this._destroyed = new rxjs.Subject();
@@ -1434,6 +1480,20 @@
1434
1480
  enumerable: false,
1435
1481
  configurable: true
1436
1482
  });
1483
+ Object.defineProperty(CdkVirtualForOf.prototype, "cdkVirtualForTemplateCacheSize", {
1484
+ /**
1485
+ * The size of the cache used to store templates that are not being used for re-use later.
1486
+ * Setting the cache size to `0` will disable caching. Defaults to 20 templates.
1487
+ */
1488
+ get: function () {
1489
+ return this._viewRepeater.viewCacheSize;
1490
+ },
1491
+ set: function (size) {
1492
+ this._viewRepeater.viewCacheSize = coercion.coerceNumberProperty(size);
1493
+ },
1494
+ enumerable: false,
1495
+ configurable: true
1496
+ });
1437
1497
  /**
1438
1498
  * Measures the combined size (width for horizontal orientation, height for vertical) of all items
1439
1499
  * in the specified range. Throws an error if the range includes items that are not currently
@@ -1443,24 +1503,36 @@
1443
1503
  if (range.start >= range.end) {
1444
1504
  return 0;
1445
1505
  }
1446
- if (range.start < this._renderedRange.start || range.end > this._renderedRange.end) {
1506
+ if ((range.start < this._renderedRange.start || range.end > this._renderedRange.end) &&
1507
+ (typeof ngDevMode === 'undefined' || ngDevMode)) {
1447
1508
  throw Error("Error: attempted to measure an item that isn't rendered.");
1448
1509
  }
1449
1510
  // The index into the list of rendered views for the first item in the range.
1450
1511
  var renderedStartIndex = range.start - this._renderedRange.start;
1451
1512
  // The length of the range we're measuring.
1452
1513
  var rangeLen = range.end - range.start;
1453
- // Loop over all root nodes for all items in the range and sum up their size.
1454
- var totalSize = 0;
1455
- var i = rangeLen;
1456
- while (i--) {
1514
+ // Loop over all the views, find the first and land node and compute the size by subtracting
1515
+ // the top of the first node from the bottom of the last one.
1516
+ var firstNode;
1517
+ var lastNode;
1518
+ // Find the first node by starting from the beginning and going forwards.
1519
+ for (var i = 0; i < rangeLen; i++) {
1457
1520
  var view = this._viewContainerRef.get(i + renderedStartIndex);
1458
- var j = view ? view.rootNodes.length : 0;
1459
- while (j--) {
1460
- totalSize += getSize(orientation, view.rootNodes[j]);
1521
+ if (view && view.rootNodes.length) {
1522
+ firstNode = lastNode = view.rootNodes[0];
1523
+ break;
1461
1524
  }
1462
1525
  }
1463
- return totalSize;
1526
+ // Find the last node by starting from the end and going backwards.
1527
+ for (var i = rangeLen - 1; i > -1; i--) {
1528
+ var view = this._viewContainerRef.get(i + renderedStartIndex);
1529
+ if (view && view.rootNodes.length) {
1530
+ lastNode = view.rootNodes[view.rootNodes.length - 1];
1531
+ break;
1532
+ }
1533
+ }
1534
+ return firstNode && lastNode ?
1535
+ getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode) : 0;
1464
1536
  };
1465
1537
  CdkVirtualForOf.prototype.ngDoCheck = function () {
1466
1538
  if (this._differ && this._needsUpdate) {
@@ -1478,26 +1550,13 @@
1478
1550
  }
1479
1551
  };
1480
1552
  CdkVirtualForOf.prototype.ngOnDestroy = function () {
1481
- var e_1, _a;
1482
1553
  this._viewport.detach();
1483
1554
  this._dataSourceChanges.next(undefined);
1484
1555
  this._dataSourceChanges.complete();
1485
1556
  this.viewChange.complete();
1486
1557
  this._destroyed.next();
1487
1558
  this._destroyed.complete();
1488
- try {
1489
- for (var _b = __values(this._templateCache), _c = _b.next(); !_c.done; _c = _b.next()) {
1490
- var view = _c.value;
1491
- view.destroy();
1492
- }
1493
- }
1494
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1495
- finally {
1496
- try {
1497
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1498
- }
1499
- finally { if (e_1) throw e_1.error; }
1500
- }
1559
+ this._viewRepeater.detach();
1501
1560
  };
1502
1561
  /** React to scroll state changes in the viewport. */
1503
1562
  CdkVirtualForOf.prototype._onRenderedDataChange = function () {
@@ -1533,21 +1592,7 @@
1533
1592
  /** Apply changes to the DOM. */
1534
1593
  CdkVirtualForOf.prototype._applyChanges = function (changes) {
1535
1594
  var _this = this;
1536
- // Rearrange the views to put them in the right location.
1537
- changes.forEachOperation(function (record, adjustedPreviousIndex, currentIndex) {
1538
- if (record.previousIndex == null) { // Item added.
1539
- var view = _this._insertViewForNewItem(currentIndex);
1540
- view.context.$implicit = record.item;
1541
- }
1542
- else if (currentIndex == null) { // Item removed.
1543
- _this._cacheView(_this._detachView(adjustedPreviousIndex));
1544
- }
1545
- else { // Item moved.
1546
- var view = _this._viewContainerRef.get(adjustedPreviousIndex);
1547
- _this._viewContainerRef.move(view, currentIndex);
1548
- view.context.$implicit = record.item;
1549
- }
1550
- });
1595
+ this._viewRepeater.applyChanges(changes, this._viewContainerRef, function (record, adjustedPreviousIndex, currentIndex) { return _this._getEmbeddedViewArgs(record, currentIndex); }, function (record) { return record.item; });
1551
1596
  // Update $implicit for any items that had an identity change.
1552
1597
  changes.forEachIdentityChange(function (record) {
1553
1598
  var view = _this._viewContainerRef.get(record.currentIndex);
@@ -1563,28 +1608,6 @@
1563
1608
  this._updateComputedContextProperties(view.context);
1564
1609
  }
1565
1610
  };
1566
- /** Cache the given detached view. */
1567
- CdkVirtualForOf.prototype._cacheView = function (view) {
1568
- if (this._templateCache.length < this.cdkVirtualForTemplateCacheSize) {
1569
- this._templateCache.push(view);
1570
- }
1571
- else {
1572
- var index = this._viewContainerRef.indexOf(view);
1573
- // It's very unlikely that the index will ever be -1, but just in case,
1574
- // destroy the view on its own, otherwise destroy it through the
1575
- // container to ensure that all the references are removed.
1576
- if (index === -1) {
1577
- view.destroy();
1578
- }
1579
- else {
1580
- this._viewContainerRef.remove(index);
1581
- }
1582
- }
1583
- };
1584
- /** Inserts a view for a new item, either from the cache or by creating a new one. */
1585
- CdkVirtualForOf.prototype._insertViewForNewItem = function (index) {
1586
- return this._insertViewFromCache(index) || this._createEmbeddedViewAt(index);
1587
- };
1588
1611
  /** Update the computed properties on the `CdkVirtualForOfContext`. */
1589
1612
  CdkVirtualForOf.prototype._updateComputedContextProperties = function (context) {
1590
1613
  context.first = context.index === 0;
@@ -1592,57 +1615,52 @@
1592
1615
  context.even = context.index % 2 === 0;
1593
1616
  context.odd = !context.even;
1594
1617
  };
1595
- /** Creates a new embedded view and moves it to the given index */
1596
- CdkVirtualForOf.prototype._createEmbeddedViewAt = function (index) {
1618
+ CdkVirtualForOf.prototype._getEmbeddedViewArgs = function (record, index) {
1597
1619
  // Note that it's important that we insert the item directly at the proper index,
1598
1620
  // rather than inserting it and the moving it in place, because if there's a directive
1599
1621
  // on the same node that injects the `ViewContainerRef`, Angular will insert another
1600
1622
  // comment node which can throw off the move when it's being repeated for all items.
1601
- return this._viewContainerRef.createEmbeddedView(this._template, {
1602
- $implicit: null,
1603
- // It's guaranteed that the iterable is not "undefined" or "null" because we only
1604
- // generate views for elements if the "cdkVirtualForOf" iterable has elements.
1605
- cdkVirtualForOf: this._cdkVirtualForOf,
1606
- index: -1,
1607
- count: -1,
1608
- first: false,
1609
- last: false,
1610
- odd: false,
1611
- even: false
1612
- }, index);
1613
- };
1614
- /** Inserts a recycled view from the cache at the given index. */
1615
- CdkVirtualForOf.prototype._insertViewFromCache = function (index) {
1616
- var cachedView = this._templateCache.pop();
1617
- if (cachedView) {
1618
- this._viewContainerRef.insert(cachedView, index);
1619
- }
1620
- return cachedView || null;
1621
- };
1622
- /** Detaches the embedded view at the given index. */
1623
- CdkVirtualForOf.prototype._detachView = function (index) {
1624
- return this._viewContainerRef.detach(index);
1625
- };
1626
- CdkVirtualForOf.decorators = [
1627
- { type: i0.Directive, args: [{
1628
- selector: '[cdkVirtualFor][cdkVirtualForOf]',
1629
- },] }
1630
- ];
1631
- CdkVirtualForOf.ctorParameters = function () { return [
1632
- { type: i0.ViewContainerRef },
1633
- { type: i0.TemplateRef },
1634
- { type: i0.IterableDiffers },
1635
- { type: CdkVirtualScrollViewport, decorators: [{ type: i0.SkipSelf }] },
1636
- { type: i0.NgZone }
1637
- ]; };
1638
- CdkVirtualForOf.propDecorators = {
1639
- cdkVirtualForOf: [{ type: i0.Input }],
1640
- cdkVirtualForTrackBy: [{ type: i0.Input }],
1641
- cdkVirtualForTemplate: [{ type: i0.Input }],
1642
- cdkVirtualForTemplateCacheSize: [{ type: i0.Input }]
1623
+ return {
1624
+ templateRef: this._template,
1625
+ context: {
1626
+ $implicit: record.item,
1627
+ // It's guaranteed that the iterable is not "undefined" or "null" because we only
1628
+ // generate views for elements if the "cdkVirtualForOf" iterable has elements.
1629
+ cdkVirtualForOf: this._cdkVirtualForOf,
1630
+ index: -1,
1631
+ count: -1,
1632
+ first: false,
1633
+ last: false,
1634
+ odd: false,
1635
+ even: false
1636
+ },
1637
+ index: index,
1638
+ };
1643
1639
  };
1644
1640
  return CdkVirtualForOf;
1645
1641
  }());
1642
+ CdkVirtualForOf.decorators = [
1643
+ { type: i0.Directive, args: [{
1644
+ selector: '[cdkVirtualFor][cdkVirtualForOf]',
1645
+ providers: [
1646
+ { provide: collections._VIEW_REPEATER_STRATEGY, useClass: collections._RecycleViewRepeaterStrategy },
1647
+ ]
1648
+ },] }
1649
+ ];
1650
+ CdkVirtualForOf.ctorParameters = function () { return [
1651
+ { type: i0.ViewContainerRef },
1652
+ { type: i0.TemplateRef },
1653
+ { type: i0.IterableDiffers },
1654
+ { type: collections._RecycleViewRepeaterStrategy, decorators: [{ type: i0.Inject, args: [collections._VIEW_REPEATER_STRATEGY,] }] },
1655
+ { type: CdkVirtualScrollViewport, decorators: [{ type: i0.SkipSelf }] },
1656
+ { type: i0.NgZone }
1657
+ ]; };
1658
+ CdkVirtualForOf.propDecorators = {
1659
+ cdkVirtualForOf: [{ type: i0.Input }],
1660
+ cdkVirtualForTrackBy: [{ type: i0.Input }],
1661
+ cdkVirtualForTemplate: [{ type: i0.Input }],
1662
+ cdkVirtualForTemplateCacheSize: [{ type: i0.Input }]
1663
+ };
1646
1664
 
1647
1665
  /**
1648
1666
  * @license
@@ -1654,48 +1672,43 @@
1654
1672
  var CdkScrollableModule = /** @class */ (function () {
1655
1673
  function CdkScrollableModule() {
1656
1674
  }
1657
- CdkScrollableModule.decorators = [
1658
- { type: i0.NgModule, args: [{
1659
- exports: [CdkScrollable],
1660
- declarations: [CdkScrollable]
1661
- },] }
1662
- ];
1663
1675
  return CdkScrollableModule;
1664
1676
  }());
1677
+ CdkScrollableModule.decorators = [
1678
+ { type: i0.NgModule, args: [{
1679
+ exports: [CdkScrollable],
1680
+ declarations: [CdkScrollable]
1681
+ },] }
1682
+ ];
1683
+ /**
1684
+ * @docs-primary-export
1685
+ */
1665
1686
  var ScrollingModule = /** @class */ (function () {
1666
1687
  function ScrollingModule() {
1667
1688
  }
1668
- ScrollingModule.decorators = [
1669
- { type: i0.NgModule, args: [{
1670
- imports: [
1671
- bidi.BidiModule,
1672
- i1.PlatformModule,
1673
- CdkScrollableModule
1674
- ],
1675
- exports: [
1676
- bidi.BidiModule,
1677
- CdkScrollableModule,
1678
- CdkFixedSizeVirtualScroll,
1679
- CdkVirtualForOf,
1680
- CdkVirtualScrollViewport,
1681
- ],
1682
- declarations: [
1683
- CdkFixedSizeVirtualScroll,
1684
- CdkVirtualForOf,
1685
- CdkVirtualScrollViewport,
1686
- ],
1687
- },] }
1688
- ];
1689
1689
  return ScrollingModule;
1690
1690
  }());
1691
-
1692
- /**
1693
- * @license
1694
- * Copyright Google LLC All Rights Reserved.
1695
- *
1696
- * Use of this source code is governed by an MIT-style license that can be
1697
- * found in the LICENSE file at https://angular.io/license
1698
- */
1691
+ ScrollingModule.decorators = [
1692
+ { type: i0.NgModule, args: [{
1693
+ imports: [
1694
+ bidi.BidiModule,
1695
+ i1.PlatformModule,
1696
+ CdkScrollableModule
1697
+ ],
1698
+ exports: [
1699
+ bidi.BidiModule,
1700
+ CdkScrollableModule,
1701
+ CdkFixedSizeVirtualScroll,
1702
+ CdkVirtualForOf,
1703
+ CdkVirtualScrollViewport,
1704
+ ],
1705
+ declarations: [
1706
+ CdkFixedSizeVirtualScroll,
1707
+ CdkVirtualForOf,
1708
+ CdkVirtualScrollViewport,
1709
+ ],
1710
+ },] }
1711
+ ];
1699
1712
 
1700
1713
  /**
1701
1714
  * @license