@angular/cdk 6.4.6 → 6.4.7

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 (151) hide show
  1. package/a11y/typings/focus-monitor/focus-monitor.d.ts +1 -1
  2. package/a11y/typings/focus-trap/focus-trap.d.ts +1 -1
  3. package/a11y/typings/index.metadata.json +1 -1
  4. package/accordion/typings/accordion.d.ts +6 -1
  5. package/accordion/typings/index.metadata.json +1 -1
  6. package/bundles/cdk-a11y.umd.js +9 -7
  7. package/bundles/cdk-a11y.umd.js.map +1 -1
  8. package/bundles/cdk-a11y.umd.min.js +1 -1
  9. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  10. package/bundles/cdk-accordion.umd.js +28 -4
  11. package/bundles/cdk-accordion.umd.js.map +1 -1
  12. package/bundles/cdk-accordion.umd.min.js +1 -1
  13. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  14. package/bundles/cdk-collections.umd.js +9 -3
  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-observers.umd.js +5 -10
  19. package/bundles/cdk-observers.umd.js.map +1 -1
  20. package/bundles/cdk-observers.umd.min.js +1 -1
  21. package/bundles/cdk-observers.umd.min.js.map +1 -1
  22. package/bundles/cdk-overlay.umd.js.map +1 -1
  23. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  24. package/bundles/cdk-scrolling.umd.js +1 -1
  25. package/bundles/cdk-scrolling.umd.js.map +1 -1
  26. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  27. package/bundles/cdk-stepper.umd.js +36 -6
  28. package/bundles/cdk-stepper.umd.js.map +1 -1
  29. package/bundles/cdk-stepper.umd.min.js +1 -1
  30. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  31. package/bundles/cdk-table.umd.js +29 -9
  32. package/bundles/cdk-table.umd.js.map +1 -1
  33. package/bundles/cdk-table.umd.min.js +1 -1
  34. package/bundles/cdk-table.umd.min.js.map +1 -1
  35. package/bundles/cdk-text-field.umd.js +12 -23
  36. package/bundles/cdk-text-field.umd.js.map +1 -1
  37. package/bundles/cdk-text-field.umd.min.js +1 -1
  38. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  39. package/bundles/cdk-tree.umd.js.map +1 -1
  40. package/bundles/cdk-tree.umd.min.js.map +1 -1
  41. package/bundles/cdk.umd.js +1 -1
  42. package/bundles/cdk.umd.js.map +1 -1
  43. package/bundles/cdk.umd.min.js +1 -1
  44. package/bundles/cdk.umd.min.js.map +1 -1
  45. package/collections/typings/index.metadata.json +1 -1
  46. package/collections/typings/selection.d.ts +6 -0
  47. package/esm2015/a11y.js +10 -4
  48. package/esm2015/a11y.js.map +1 -1
  49. package/esm2015/accordion.js +18 -1
  50. package/esm2015/accordion.js.map +1 -1
  51. package/esm2015/cdk.js +1 -1
  52. package/esm2015/cdk.js.map +1 -1
  53. package/esm2015/collections.js +9 -3
  54. package/esm2015/collections.js.map +1 -1
  55. package/esm2015/observers.js +4 -4
  56. package/esm2015/observers.js.map +1 -1
  57. package/esm2015/overlay.js.map +1 -1
  58. package/esm2015/scrolling.js +1 -1
  59. package/esm2015/scrolling.js.map +1 -1
  60. package/esm2015/stepper.js +32 -4
  61. package/esm2015/stepper.js.map +1 -1
  62. package/esm2015/table.js +30 -8
  63. package/esm2015/table.js.map +1 -1
  64. package/esm2015/text-field.js +9 -9
  65. package/esm2015/text-field.js.map +1 -1
  66. package/esm2015/tree.js.map +1 -1
  67. package/esm5/a11y.es5.js +9 -7
  68. package/esm5/a11y.es5.js.map +1 -1
  69. package/esm5/accordion.es5.js +25 -1
  70. package/esm5/accordion.es5.js.map +1 -1
  71. package/esm5/cdk.es5.js +1 -1
  72. package/esm5/cdk.es5.js.map +1 -1
  73. package/esm5/collections.es5.js +9 -3
  74. package/esm5/collections.es5.js.map +1 -1
  75. package/esm5/observers.es5.js +5 -10
  76. package/esm5/observers.es5.js.map +1 -1
  77. package/esm5/overlay.es5.js.map +1 -1
  78. package/esm5/scrolling.es5.js +1 -1
  79. package/esm5/scrolling.es5.js.map +1 -1
  80. package/esm5/stepper.es5.js +34 -4
  81. package/esm5/stepper.es5.js.map +1 -1
  82. package/esm5/table.es5.js +28 -7
  83. package/esm5/table.es5.js.map +1 -1
  84. package/esm5/text-field.es5.js +12 -23
  85. package/esm5/text-field.es5.js.map +1 -1
  86. package/esm5/tree.es5.js.map +1 -1
  87. package/observers/typings/index.metadata.json +1 -1
  88. package/observers/typings/observe-content.d.ts +6 -1
  89. package/overlay/typings/index.metadata.json +1 -1
  90. package/overlay/typings/position/connected-position-strategy.d.ts +1 -1
  91. package/package.json +3 -3
  92. package/stepper/typings/index.metadata.json +1 -1
  93. package/stepper/typings/stepper.d.ts +10 -2
  94. package/table/typings/index.metadata.json +1 -1
  95. package/table/typings/sticky-styler.d.ts +3 -1
  96. package/table/typings/table.d.ts +10 -1
  97. package/text-field/typings/autofill.d.ts +13 -2
  98. package/text-field/typings/autosize.d.ts +1 -1
  99. package/text-field/typings/index.metadata.json +1 -1
  100. package/tree/typings/index.metadata.json +1 -1
  101. package/tree/typings/nested-node.d.ts +2 -2
  102. package/tree/typings/padding.d.ts +1 -1
  103. package/tree/typings/tree.d.ts +2 -2
  104. package/typings/a11y/focus-monitor/focus-monitor.d.ts +1 -1
  105. package/typings/a11y/focus-trap/focus-trap.d.ts +1 -1
  106. package/typings/a11y/index.metadata.json +1 -1
  107. package/typings/accordion/accordion.d.ts +6 -1
  108. package/typings/accordion/index.metadata.json +1 -1
  109. package/typings/collections/index.metadata.json +1 -1
  110. package/typings/collections/selection.d.ts +6 -0
  111. package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +1 -1
  112. package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +1 -1
  113. package/typings/esm5/a11y/index.metadata.json +1 -1
  114. package/typings/esm5/accordion/accordion.d.ts +6 -1
  115. package/typings/esm5/accordion/index.metadata.json +1 -1
  116. package/typings/esm5/collections/index.metadata.json +1 -1
  117. package/typings/esm5/collections/selection.d.ts +6 -0
  118. package/typings/esm5/index.metadata.json +1 -1
  119. package/typings/esm5/observers/index.metadata.json +1 -1
  120. package/typings/esm5/observers/observe-content.d.ts +6 -1
  121. package/typings/esm5/overlay/index.metadata.json +1 -1
  122. package/typings/esm5/overlay/position/connected-position-strategy.d.ts +1 -1
  123. package/typings/esm5/stepper/index.metadata.json +1 -1
  124. package/typings/esm5/stepper/stepper.d.ts +10 -2
  125. package/typings/esm5/table/index.metadata.json +1 -1
  126. package/typings/esm5/table/sticky-styler.d.ts +3 -1
  127. package/typings/esm5/table/table.d.ts +10 -1
  128. package/typings/esm5/text-field/autofill.d.ts +13 -2
  129. package/typings/esm5/text-field/autosize.d.ts +1 -1
  130. package/typings/esm5/text-field/index.metadata.json +1 -1
  131. package/typings/esm5/tree/index.metadata.json +1 -1
  132. package/typings/esm5/tree/nested-node.d.ts +2 -2
  133. package/typings/esm5/tree/padding.d.ts +1 -1
  134. package/typings/esm5/tree/tree.d.ts +2 -2
  135. package/typings/index.metadata.json +1 -1
  136. package/typings/observers/index.metadata.json +1 -1
  137. package/typings/observers/observe-content.d.ts +6 -1
  138. package/typings/overlay/index.metadata.json +1 -1
  139. package/typings/overlay/position/connected-position-strategy.d.ts +1 -1
  140. package/typings/stepper/index.metadata.json +1 -1
  141. package/typings/stepper/stepper.d.ts +10 -2
  142. package/typings/table/index.metadata.json +1 -1
  143. package/typings/table/sticky-styler.d.ts +3 -1
  144. package/typings/table/table.d.ts +10 -1
  145. package/typings/text-field/autofill.d.ts +13 -2
  146. package/typings/text-field/autosize.d.ts +1 -1
  147. package/typings/text-field/index.metadata.json +1 -1
  148. package/typings/tree/index.metadata.json +1 -1
  149. package/typings/tree/nested-node.d.ts +2 -2
  150. package/typings/tree/padding.d.ts +1 -1
  151. package/typings/tree/tree.d.ts +2 -2
@@ -225,7 +225,7 @@ var ScrollDispatcher = /** @class */ (function () {
225
225
  if (element == scrollableElement) {
226
226
  return true;
227
227
  }
228
- } while (element = element.parentElement);
228
+ } while (element = /** @type {?} */ ((element)).parentElement);
229
229
  return false;
230
230
  };
231
231
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-scrolling.umd.js","sources":["../../src/cdk/scrolling/scrolling-module.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scroll-dispatcher.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkScrollable} from './scrollable';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n})\nexport class ScrollDispatchModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core';\nimport {merge, of as observableOf, fromEvent, Observable, Subscription} from 'rxjs';\nimport {auditTime} from 'rxjs/operators';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n this._change = _platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n\n this._elementScrolled.complete();\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ElementRef,\n Injectable,\n NgZone,\n OnDestroy,\n Optional,\n SkipSelf,\n} from '@angular/core';\nimport {fromEvent, of as observableOf, Subject, Subscription, Observable} from 'rxjs';\nimport {auditTime, filter} from 'rxjs/operators';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n\n /** Returns true if the element is contained within the provided Scrollable. */\n private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element = elementRef.nativeElement;\n let scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element.parentElement);\n\n return false;\n }\n\n /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n"],"names":["PlatformModule","NgModule","Optional","SkipSelf","Platform","NgZone","platform","Injectable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AAU,EAAE,+BAA+B;CAC5C,CAAD;;;;;;;;;;QD9HA,EAAA,IAAA,EAACJ,aAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAACD,uBAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,YAAY,EAAE,CAAC,aAAa,CAAC;iBAC9B,EAAD,EAAA;;IAhBA,OAAA,oBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-scrolling.umd.js","sources":["../../src/cdk/scrolling/scrolling-module.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scroll-dispatcher.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkScrollable} from './scrollable';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n})\nexport class ScrollDispatchModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core';\nimport {merge, of as observableOf, fromEvent, Observable, Subscription} from 'rxjs';\nimport {auditTime} from 'rxjs/operators';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n this._change = _platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n\n this._elementScrolled.complete();\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ElementRef,\n Injectable,\n NgZone,\n OnDestroy,\n Optional,\n SkipSelf,\n} from '@angular/core';\nimport {fromEvent, of as observableOf, Subject, Subscription, Observable} from 'rxjs';\nimport {auditTime, filter} from 'rxjs/operators';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n\n /** Returns true if the element is contained within the provided Scrollable. */\n private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element: HTMLElement | null = elementRef.nativeElement;\n let scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element!.parentElement);\n\n return false;\n }\n\n /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n"],"names":["PlatformModule","NgModule","Optional","SkipSelf","Platform","NgZone","platform","Injectable","auditTime","observableOf","merge","fromEvent","ElementRef","Directive","Subject","filter","Observable"],"mappings":";;;;;;;;;;;;;;;;;;;;AGuBA,AAAA,IAAA,iBAAa,mBAAmB,GAAG,EAAE,CAAC;;;;;;IAQpC,SAAF,gBAAA,CAAsB,OAAe,EAAU,SAAmB,EAAlE;QAAsB,IAAtB,CAAA,OAA6B,GAAP,OAAO,CAAQ;QAAU,IAA/C,CAAA,SAAwD,GAAT,SAAS,CAAU;;;;QAGlE,IAAA,CAAA,SAAA,GAAsB,IAAIc,YAAO,EAAsB,CAAvD;;;;QAGA,IAAA,CAAA,mBAAA,GAA6C,IAAI,CAAjD;;;;QAGA,IAAA,CAAA,cAAA,GAA2B,CAAC,CAA5B;;;;;QAMA,IAAA,CAAA,gBAAA,GAAuD,IAAI,GAAG,EAAE,CAAhE;KAfuE;;;;;;;;;;;;IAsBrE,gBAAF,CAAA,SAAA,CAAA,QAAU;;;;;;IAAR,UAAS,UAAyB,EAApC;QAAE,IAAF,KAAA,GAAA,IAAA,CAKG;QAJC,qBAAM,kBAAkB,GAAG,UAAU,CAAC,eAAe,EAAE;aAClD,SAAS,CAAC,YAAnB,EAAyB,OAAA,KAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAxD,EAAwD,CAAC,CAAC;QAEtD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;KAC3D,CAAH;;;;;;;;;;IAME,gBAAF,CAAA,SAAA,CAAA,UAAY;;;;;IAAV,UAAW,UAAyB,EAAtC;QACI,qBAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAElE,IAAI,mBAAmB,EAAE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;IAErC,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,CAAC,CAAC,IAAIJ,aAAQ,EAAE,EAAE,IAAIC,aAAQ,EAAE,EAAE,aAAa,CAAC,EAAEC,iBAAQ,EAAEC,WAAM,CAAC;IACzE,UAAU,EAAE,+BAA+B;CAC5C,CAAD;;;;;;;;;;QD9HA,EAAA,IAAA,EAACJ,aAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAACD,uBAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,YAAY,EAAE,CAAC,aAAa,CAAC;iBAC9B,EAAD,EAAA;;IAhBA,OAAA,oBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-scrolling.umd.min.js","sources":["../../src/cdk/scrolling/scroll-dispatcher.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scrolling-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ElementRef,\n Injectable,\n NgZone,\n OnDestroy,\n Optional,\n SkipSelf,\n} from '@angular/core';\nimport {fromEvent, of as observableOf, Subject, Subscription, Observable} from 'rxjs';\nimport {auditTime, filter} from 'rxjs/operators';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n\n /** Returns true if the element is contained within the provided Scrollable. */\n private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element = elementRef.nativeElement;\n let scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element.parentElement);\n\n return false;\n }\n\n /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core';\nimport {merge, of as observableOf, fromEvent, Observable, Subscription} from 'rxjs';\nimport {auditTime} from 'rxjs/operators';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n this._change = _platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n\n this._elementScrolled.complete();\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkScrollable} from './scrollable';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n})\nexport class ScrollDispatchModule {}\n"],"names":["SCROLL_DISPATCHER_PROVIDER_FACTORY","parentDispatcher","ngZone","platform","ScrollDispatcher","VIEWPORT_RULER_PROVIDER_FACTORY","parentRuler","ViewportRuler","_ngZone","_platform","this","_scrolled","Subject","_globalSubscription","_scrolledCount","scrollContainers","Map","prototype","register","scrollable","_this","scrollSubscription","elementScrolled","subscribe","next","set","deregister","scrollableReference","get","unsubscribe","delete","scrolled","auditTimeInMs","isBrowser","Observable","create","observer","_addGlobalListener","subscription","pipe","auditTime","_removeGlobalListener","observableOf","ngOnDestroy","forEach","_","container","complete","ancestorScrolled","elementRef","ancestors","getAncestorScrollContainers","filter","target","indexOf","scrollingContainers","_subscription","_scrollableContainsElement","push","element","nativeElement","scrollableElement","getElementRef","parentElement","runOutsideAngular","fromEvent","window","document","type","Injectable","args","providedIn","NgZone","Platform","SCROLL_DISPATCHER_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","CdkScrollable","_elementRef","_scroll","_elementScrolled","_scrollListener","event","ngOnInit","addEventListener","removeEventListener","asObservable","Directive","selector","ElementRef","_change","merge","_invalidateCache","change","_updateViewportSize","getViewportSize","_viewportSize","output","width","height","getViewportRect","scrollPosition","getViewportScrollPosition","_a","top","left","bottom","right","documentRect","documentElement","getBoundingClientRect","body","scrollTop","scrollY","scrollLeft","scrollX","throttleTime","innerWidth","innerHeight","VIEWPORT_RULER_PROVIDER","NgModule","imports","PlatformModule","exports","declarations","ScrollDispatchModule"],"mappings":";;;;;;;ieA6KA,SAAAA,GACIC,EAAoCC,EAAgBC,GACtD,MAAOF,IAAo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3,"file":"cdk-scrolling.umd.min.js","sources":["../../src/cdk/scrolling/scroll-dispatcher.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scrolling-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ElementRef,\n Injectable,\n NgZone,\n OnDestroy,\n Optional,\n SkipSelf,\n} from '@angular/core';\nimport {fromEvent, of as observableOf, Subject, Subscription, Observable} from 'rxjs';\nimport {auditTime, filter} from 'rxjs/operators';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n\n /** Returns true if the element is contained within the provided Scrollable. */\n private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element: HTMLElement | null = elementRef.nativeElement;\n let scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element!.parentElement);\n\n return false;\n }\n\n /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core';\nimport {merge, of as observableOf, fromEvent, Observable, Subscription} from 'rxjs';\nimport {auditTime} from 'rxjs/operators';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n this._change = _platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private @deprecated @breaking-change 7.0.0 */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n\n this._elementScrolled.complete();\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkScrollable} from './scrollable';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n})\nexport class ScrollDispatchModule {}\n"],"names":["SCROLL_DISPATCHER_PROVIDER_FACTORY","parentDispatcher","ngZone","platform","ScrollDispatcher","VIEWPORT_RULER_PROVIDER_FACTORY","parentRuler","ViewportRuler","_ngZone","_platform","this","_scrolled","Subject","_globalSubscription","_scrolledCount","scrollContainers","Map","prototype","register","scrollable","_this","scrollSubscription","elementScrolled","subscribe","next","set","deregister","scrollableReference","get","unsubscribe","delete","scrolled","auditTimeInMs","isBrowser","Observable","create","observer","_addGlobalListener","subscription","pipe","auditTime","_removeGlobalListener","observableOf","ngOnDestroy","forEach","_","container","complete","ancestorScrolled","elementRef","ancestors","getAncestorScrollContainers","filter","target","indexOf","scrollingContainers","_subscription","_scrollableContainsElement","push","element","nativeElement","scrollableElement","getElementRef","parentElement","runOutsideAngular","fromEvent","window","document","type","Injectable","args","providedIn","NgZone","Platform","SCROLL_DISPATCHER_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","CdkScrollable","_elementRef","_scroll","_elementScrolled","_scrollListener","event","ngOnInit","addEventListener","removeEventListener","asObservable","Directive","selector","ElementRef","_change","merge","_invalidateCache","change","_updateViewportSize","getViewportSize","_viewportSize","output","width","height","getViewportRect","scrollPosition","getViewportScrollPosition","_a","top","left","bottom","right","documentRect","documentElement","getBoundingClientRect","body","scrollTop","scrollY","scrollLeft","scrollX","throttleTime","innerWidth","innerHeight","VIEWPORT_RULER_PROVIDER","NgModule","imports","PlatformModule","exports","declarations","ScrollDispatchModule"],"mappings":";;;;;;;ieA6KA,SAAAA,GACIC,EAAoCC,EAAgBC,GACtD,MAAOF,IAAoB,GAAIG,GAAiBF,EAAQC,GCjD1D,QAAAE,GAAgDC,EACAH,EACAD,GAC9C,MAAOI,IAAe,GAAIC,GAAcJ,EAAUD,GD1GpD,iBAQE,QAAFE,GAAsBI,EAAyBC,GAAzBC,KAAtBF,QAAsBA,EAAyBE,KAA/CD,UAA+CA,EAG/CC,KAAAC,UAAsB,GAAIC,GAAAA,QAG1BF,KAAAG,oBAA6C,KAG7CH,KAAAI,eAA2B,EAM3BJ,KAAAK,iBAAuD,GAAIC,KA9C3D,MAqDEZ,GAAFa,UAAAC,SAAE,SAASC,GAAT,GAAFC,GAAAV,KACUW,EAAqBF,EAAWG,kBACjCC,UAAU,WAAM,MAAAH,GAAKT,UAAUa,KAAKL,IAEzCT,MAAKK,i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,gBAAgBG,WAAa,EAKtCP,MAHCG,EAAaH,MAAQzC,SAAS+C,KAAKG,YAAcnD,OAAOoD,SACxDnD,SAAS6C,gBAAgBK,YAAc,IASvD9G,EAAFU,UAAA+E,OAAE,SAAOuB,GACL,WADJ,KAAAA,IAASA,EAlG0B,IAmGxBA,EAAe,EAAI7G,KAAKmF,QAAQtD,KAAKC,EAAAA,UAAU+E,IAAiB7G,KAAKmF,SAItEtF,EAAVU,UAAAgF,+BACIvF,KAAKyF,cAAgBzF,KAAKD,UAAUwB,WAC/BoE,MAAOnC,OAAOsD,WAAYlB,OAAQpC,OAAOuD,cACzCpB,MAAO,EAAGC,OAAQ,mBApG3BlC,KAACC,EAAAA,WAADC,OAAaC,WAAY,+CAZzBH,KAAQK,EAAAA,WACRL,KAAoBI,EAAAA,sJATpBjE,KAqIamH,GAEX/C,QAASpE,EACTqE,OAAQ,GAAIC,GAAAA,SAAY,GAAIC,GAAAA,SAAYvE,GAAgBkE,EAAAA,SAAUD,EAAAA,QAClEO,WAAY1E,8BEzId,sBAYA+D,KAACuD,EAAAA,SAADrD,OACEsD,SAAUC,EAAAA,gBACVC,SAAU9C,GACV+C,cAAe/C,OAfjBgD,2BHuBmC,sICTA"}
@@ -6,10 +6,10 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  (function (global, factory) {
9
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/a11y'), require('@angular/cdk/bidi'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
10
- typeof define === 'function' && define.amd ? define('@angular/cdk/stepper', ['exports', '@angular/core', '@angular/cdk/a11y', '@angular/cdk/bidi', '@angular/cdk/coercion', '@angular/cdk/keycodes', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
11
- (factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.stepper = {}),global.ng.core,global.ng.cdk.a11y,global.ng.cdk.bidi,global.ng.cdk.coercion,global.ng.cdk.keycodes,global.ng.forms,global.rxjs,global.rxjs.operators,global.ng.common));
12
- }(this, (function (exports,core,a11y,bidi,coercion,keycodes,forms,rxjs,operators,common) { 'use strict';
9
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/a11y'), require('@angular/cdk/bidi'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('@angular/common'), require('@angular/forms'), require('rxjs'), require('rxjs/operators')) :
10
+ typeof define === 'function' && define.amd ? define('@angular/cdk/stepper', ['exports', '@angular/core', '@angular/cdk/a11y', '@angular/cdk/bidi', '@angular/cdk/coercion', '@angular/cdk/keycodes', '@angular/common', '@angular/forms', 'rxjs', 'rxjs/operators'], factory) :
11
+ (factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.stepper = {}),global.ng.core,global.ng.cdk.a11y,global.ng.cdk.bidi,global.ng.cdk.coercion,global.ng.cdk.keycodes,global.ng.common,global.ng.forms,global.rxjs,global.rxjs.operators));
12
+ }(this, (function (exports,core,a11y,bidi,coercion,keycodes,common,forms,rxjs,operators) { 'use strict';
13
13
 
14
14
  /**
15
15
  * @fileoverview added by tsickle
@@ -188,9 +188,10 @@ var CdkStep = /** @class */ (function () {
188
188
  return CdkStep;
189
189
  }());
190
190
  var CdkStepper = /** @class */ (function () {
191
- function CdkStepper(_dir, _changeDetectorRef) {
191
+ function CdkStepper(_dir, _changeDetectorRef, _elementRef, _document) {
192
192
  this._dir = _dir;
193
193
  this._changeDetectorRef = _changeDetectorRef;
194
+ this._elementRef = _elementRef;
194
195
  /**
195
196
  * Emits when the component is destroyed.
196
197
  */
@@ -203,6 +204,7 @@ var CdkStepper = /** @class */ (function () {
203
204
  this.selectionChange = new core.EventEmitter();
204
205
  this._orientation = 'horizontal';
205
206
  this._groupId = nextId++;
207
+ this._document = _document;
206
208
  }
207
209
  Object.defineProperty(CdkStepper.prototype, "linear", {
208
210
  get: /**
@@ -281,6 +283,11 @@ var CdkStepper = /** @class */ (function () {
281
283
  .pipe(operators.startWith(this._layoutDirection()), operators.takeUntil(this._destroyed))
282
284
  .subscribe(function (direction) { return _this._keyManager.withHorizontalOrientation(direction); });
283
285
  this._keyManager.updateActiveItemIndex(this._selectedIndex);
286
+ this._steps.changes.pipe(operators.takeUntil(this._destroyed)).subscribe(function () {
287
+ if (!_this.selected) {
288
+ _this._selectedIndex = Math.max(_this._selectedIndex - 1, 0);
289
+ }
290
+ });
284
291
  };
285
292
  /**
286
293
  * @return {?}
@@ -439,7 +446,12 @@ var CdkStepper = /** @class */ (function () {
439
446
  selectedStep: stepsArray[newIndex],
440
447
  previouslySelectedStep: stepsArray[this._selectedIndex],
441
448
  });
442
- this._keyManager.updateActiveItemIndex(newIndex);
449
+ // If focus is inside the stepper, move it to the next header, otherwise it may become
450
+ // lost when the active step content is hidden. We can't be more granular with the check
451
+ // (e.g. checking whether focus is inside the active step), because we don't have a
452
+ // reference to the elements that are rendering out the content.
453
+ this._containsFocus() ? this._keyManager.setActiveItem(newIndex) :
454
+ this._keyManager.updateActiveItemIndex(newIndex);
443
455
  this._selectedIndex = newIndex;
444
456
  this._stateChanged();
445
457
  };
@@ -500,6 +512,22 @@ var CdkStepper = /** @class */ (function () {
500
512
  function () {
501
513
  return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
502
514
  };
515
+ /**
516
+ * Checks whether the stepper contains the focused element.
517
+ * @return {?}
518
+ */
519
+ CdkStepper.prototype._containsFocus = /**
520
+ * Checks whether the stepper contains the focused element.
521
+ * @return {?}
522
+ */
523
+ function () {
524
+ if (!this._document || !this._elementRef) {
525
+ return false;
526
+ }
527
+ var /** @type {?} */ stepperElement = this._elementRef.nativeElement;
528
+ var /** @type {?} */ focusedElement = this._document.activeElement;
529
+ return stepperElement === focusedElement || stepperElement.contains(focusedElement);
530
+ };
503
531
  CdkStepper.decorators = [
504
532
  { type: core.Directive, args: [{
505
533
  selector: '[cdkStepper]',
@@ -510,6 +538,8 @@ var CdkStepper = /** @class */ (function () {
510
538
  CdkStepper.ctorParameters = function () { return [
511
539
  { type: bidi.Directionality, decorators: [{ type: core.Optional },] },
512
540
  { type: core.ChangeDetectorRef, },
541
+ { type: core.ElementRef, },
542
+ { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] },] },
513
543
  ]; };
514
544
  CdkStepper.propDecorators = {
515
545
  "_steps": [{ type: core.ContentChildren, args: [CdkStep,] },],
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-stepper.umd.js","sources":["../../src/cdk/stepper/stepper-module.ts","../../src/cdk/stepper/stepper-button.ts","../../src/cdk/stepper/stepper.ts","../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Input} from '@angular/core';\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '(click)': '_stepper.next()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '(click)': '_stepper.previous()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {END, ENTER, HOME, SPACE} from '@angular/cdk/keycodes';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {AbstractControl} from '@angular/forms';\nimport {CdkStepLabel} from './step-label';\nimport {Observable, Subject, of as obaservableOf} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: '<ng-template><ng-content></ng-content></ng-template>',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: AbstractControl;\n\n /** Whether user has seen the expanded step content or not. */\n interacted = false;\n\n /** Plain text label of the step. */\n @Input() label: string;\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Whether the user can return to this step once it has been marked as complted. */\n @Input()\n get editable(): boolean { return this._editable; }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean { return this._optional; }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n set completed(value: boolean) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n private _customCompleted: boolean | null = null;\n\n private get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n constructor(@Inject(forwardRef(() => CdkStepper)) private _stepper: CdkStepper) { }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._customCompleted != null) {\n this._customCompleted = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements AfterViewInit, OnDestroy {\n /** Emits when the component is destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Used for managing keyboard focus. */\n private _keyManager: FocusKeyManager<FocusableOption>;\n\n /** The list of step components that the stepper is holding. */\n @ContentChildren(CdkStep) _steps: QueryList<CdkStep>;\n\n /** The list of step headers of the steps in the stepper. */\n _stepHeader: QueryList<FocusableOption>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean { return this._linear; }\n set linear(value: boolean) { this._linear = coerceBooleanProperty(value); }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() { return this._selectedIndex; }\n set selectedIndex(index: number) {\n if (this._steps) {\n // Ensure that the index can't be out of bounds.\n if (index < 0 || index > this._steps.length - 1) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n if (this._selectedIndex != index &&\n !this._anyControlsInvalidOrPending(index) &&\n (index >= this._selectedIndex || this._steps.toArray()[index].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = index;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep {\n // @breaking-change 7.0.0 Change return type to `CdkStep | undefined`.\n return this._steps ? this._steps.toArray()[this.selectedIndex] : undefined!;\n }\n set selected(step: CdkStep) {\n this.selectedIndex = this._steps ? this._steps.toArray().indexOf(step) : -1;\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() selectionChange: EventEmitter<StepperSelectionEvent>\n = new EventEmitter<StepperSelectionEvent>();\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality,\n private _changeDetectorRef: ChangeDetectorRef) {\n this._groupId = nextId++;\n }\n\n ngAfterViewInit() {\n this._keyManager = new FocusKeyManager(this._stepHeader)\n .withWrap()\n .withVerticalOrientation(this._orientation === 'vertical');\n\n (this._dir ? this._dir.change as Observable<Direction> : obaservableOf())\n .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))\n .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n\n this._keyManager.updateActiveItemIndex(this._selectedIndex);\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this._updateSelectedItemIndex(0);\n this._steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number): 'number' | 'edit' | 'done' {\n const step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n } else {\n return step.editable ? 'edit' : 'done';\n }\n }\n\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n\n private _updateSelectedItemIndex(newIndex: number): void {\n const stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n this._keyManager.updateActiveItemIndex(newIndex);\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n if (this._keyManager.activeItemIndex != null && (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = this._keyManager.activeItemIndex;\n event.preventDefault();\n } else if (keyCode === HOME) {\n this._keyManager.setFirstItemActive();\n event.preventDefault();\n } else if (keyCode === END) {\n this._keyManager.setLastItemActive();\n event.preventDefault();\n } else {\n this._keyManager.onKeydown(event);\n }\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n const steps = this._steps.toArray();\n\n steps[this._selectedIndex].interacted = true;\n\n if (this._linear && index >= 0) {\n return steps.slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ?\n (control.invalid || control.pending || !step.interacted) :\n !step.completed;\n return isIncomplete && !step.optional;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n"],"names":["BidiModule","CommonModule","NgModule","Input","Directive","Output","END","HOME","SPACE","ENTER","startWith","takeUntil","obaservableOf","FocusKeyManager","ChangeDetectionStrategy","ViewEncapsulation","Component","coerceBooleanProperty","TemplateRef"],"mappings":";;;;;;;;;;;;;;;;;;IGcE,SAAF,YAAA,CAA0C,QA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src/cdk/stepper/stepper-module.ts","../../src/cdk/stepper/stepper-button.ts","../../src/cdk/stepper/stepper.ts","../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Input} from '@angular/core';\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '(click)': '_stepper.next()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '(click)': '_stepper.previous()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {END, ENTER, HOME, SPACE} from '@angular/cdk/keycodes';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n EventEmitter,\n ElementRef,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {AbstractControl} from '@angular/forms';\nimport {CdkStepLabel} from './step-label';\nimport {Observable, Subject, of as obaservableOf} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: '<ng-template><ng-content></ng-content></ng-template>',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: AbstractControl;\n\n /** Whether user has seen the expanded step content or not. */\n interacted = false;\n\n /** Plain text label of the step. */\n @Input() label: string;\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Whether the user can return to this step once it has been marked as complted. */\n @Input()\n get editable(): boolean { return this._editable; }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean { return this._optional; }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n set completed(value: boolean) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n private _customCompleted: boolean | null = null;\n\n private get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n constructor(@Inject(forwardRef(() => CdkStepper)) private _stepper: CdkStepper) { }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._customCompleted != null) {\n this._customCompleted = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements AfterViewInit, OnDestroy {\n /** Emits when the component is destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Used for managing keyboard focus. */\n private _keyManager: FocusKeyManager<FocusableOption>;\n\n /**\n * @breaking-change 8.0.0 Remove `| undefined` once the `_document`\n * constructor param is required.\n */\n private _document: Document | undefined;\n\n /** The list of step components that the stepper is holding. */\n @ContentChildren(CdkStep) _steps: QueryList<CdkStep>;\n\n /** The list of step headers of the steps in the stepper. */\n _stepHeader: QueryList<FocusableOption>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean { return this._linear; }\n set linear(value: boolean) { this._linear = coerceBooleanProperty(value); }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() { return this._selectedIndex; }\n set selectedIndex(index: number) {\n if (this._steps) {\n // Ensure that the index can't be out of bounds.\n if (index < 0 || index > this._steps.length - 1) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n if (this._selectedIndex != index &&\n !this._anyControlsInvalidOrPending(index) &&\n (index >= this._selectedIndex || this._steps.toArray()[index].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = index;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep {\n // @breaking-change 7.0.0 Change return type to `CdkStep | undefined`.\n return this._steps ? this._steps.toArray()[this.selectedIndex] : undefined!;\n }\n set selected(step: CdkStep) {\n this.selectedIndex = this._steps ? this._steps.toArray().indexOf(step) : -1;\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() selectionChange: EventEmitter<StepperSelectionEvent>\n = new EventEmitter<StepperSelectionEvent>();\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality,\n private _changeDetectorRef: ChangeDetectorRef,\n // @breaking-change 8.0.0 `_elementRef` and `_document` parameters to become required.\n private _elementRef?: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) _document?: any) {\n this._groupId = nextId++;\n this._document = _document;\n }\n\n ngAfterViewInit() {\n this._keyManager = new FocusKeyManager(this._stepHeader)\n .withWrap()\n .withVerticalOrientation(this._orientation === 'vertical');\n\n (this._dir ? this._dir.change as Observable<Direction> : obaservableOf())\n .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))\n .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n\n this._keyManager.updateActiveItemIndex(this._selectedIndex);\n\n this._steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (!this.selected) {\n this._selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n });\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this._updateSelectedItemIndex(0);\n this._steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number): 'number' | 'edit' | 'done' {\n const step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n } else {\n return step.editable ? 'edit' : 'done';\n }\n }\n\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n\n private _updateSelectedItemIndex(newIndex: number): void {\n const stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n\n // If focus is inside the stepper, move it to the next header, otherwise it may become\n // lost when the active step content is hidden. We can't be more granular with the check\n // (e.g. checking whether focus is inside the active step), because we don't have a\n // reference to the elements that are rendering out the content.\n this._containsFocus() ? this._keyManager.setActiveItem(newIndex) :\n this._keyManager.updateActiveItemIndex(newIndex);\n\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n if (this._keyManager.activeItemIndex != null && (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = this._keyManager.activeItemIndex;\n event.preventDefault();\n } else if (keyCode === HOME) {\n this._keyManager.setFirstItemActive();\n event.preventDefault();\n } else if (keyCode === END) {\n this._keyManager.setLastItemActive();\n event.preventDefault();\n } else {\n this._keyManager.onKeydown(event);\n }\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n const steps = this._steps.toArray();\n\n steps[this._selectedIndex].interacted = true;\n\n if (this._linear && index >= 0) {\n return steps.slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ?\n (control.invalid || control.pending || !step.interacted) :\n !step.completed;\n return isIncomplete && !step.optional;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Checks whether the stepper contains the focused element. */\n private _containsFocus(): boolean {\n if (!this._document || !this._elementRef) {\n return false;\n }\n\n const stepperElement = this._elementRef.nativeElement;\n const focusedElement = this._document.activeElement;\n return stepperElement === focusedElement || stepperElement.contains(focusedElement);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n"],"names":["BidiModule","CommonModule","NgModule","Input","Directive","Output","Inject","DOCUMENT","ElementRef","END","HOME","SPACE","ENTER","takeUntil","startWith","obaservableOf","FocusKeyManager","ChangeDetectionStrategy","ViewEncapsulation","Component","coerceBooleanProperty","TemplateRef"],"mappings":";;;;;;;;;;;;;;;;;;IGcE,SAAF,YAAA,CAA0C,QAA1C,EAAA;QAA0C,IAA1C,CAAA,QAAkD,GAAR,QAAQ,CAAlD;KAAyE;;QAJzE,EAAA,IAAA,EAACI,cAAS,EAAV,IAAA,EAAA,CAAW;oBACT,QAAQ,EAAE,gBAAgB;iBAC3B,EAAD,EAAA;;;;QAJA,EAAA,IAAA,EAAmBiB,gBAAW,GAA9B;;IARA,OAAA,YAAA,CAAA;;;;;;;;;;ADyCA,qBAAI,MAAM,GAAG,CAAC,CAAC;;;;AAYf,AAAA,IAAA;;;AAAA,qBAAA,kBAAA,YAAA;;;IArDA,OAAA,qBAAA,CAAA;CAiEA,EAAA,CAAC,CAAA;;IAiEC,SAAF,OAAA,CAA4D,QAA5D,EAAA;QAA4D,IAA5D,CAAA,QAAoE,GAAR,QAAQ,CAApE;;;;QA5CA,IAAA,CAAA,UAAA,GAAe,KAAK,CAApB;QAoBA,IAAA,CAAA,SAAA,GAAsB,IAAI,CAA1B;QAQA,IAAA,CAAA,SAAA,GAAsB,KAAK,CAA3B;QAUA,IAAA,CAAA,gBAAA,GAA6C,IAAI,CAAjD;KAMqF;IA5BrF,MAAA,CAAA,cAAA,CAAM,OAAN,CAAA,SAAA,EAAA,UAAc,EAAd;;;;;QAAA,YAAA,EAA4B,OAAO,IAAI,CAAC,SAAS,CAAC,EAAlD;;;;;QACE,UAAa,KAAc,EAA7B;YACI,IAAI,CAAC,SAAS,GAAGD,8BAAqB,CAAC,KAAK,CAAC,CAAC;SAC/C;;;;IAKH,MAAA,CAAA,cAAA,CAAM,OAAN,CAAA,SAAA,EAAA,UA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ACjB;iBACF,EAAD,EAAA;;;;QATA,EAAA,IAAA,EAAQ,UAAU,GAAlB;;;QAYA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAGD,UAAK,EAAR,EAAA;;IArBA,OAAA,cAAA,CAAA;;;;;;IAsCE,SAAF,kBAAA,CAAqB,QAAoB,EAAzC;QAAqB,IAArB,CAAA,QAA6B,GAAR,QAAQ,CAAY;;;;QAFzC,IAAA,CAAA,IAAA,GAA0B,QAAQ,CAAlC;KAE6C;;QAX7C,EAAA,IAAA,EAACC,cAAS,EAAV,IAAA,EAAA,CAAW;oBACT,QAAQ,EAAE,4BAA4B;oBACtC,IAAI,EAAE;wBACJ,SAAS,EAAE,qBAAqB;wBAChC,QAAQ,EAAE,MAAM;qBACjB;iBACF,EAAD,EAAA;;;;QAxBA,EAAA,IAAA,EAAQ,UAAU,GAAlB;;;QA2BA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAGD,UAAK,EAAR,EAAA;;IApCA,OAAA,kBAAA,CAAA;;;;;;;;;;;QDeA,EAAA,IAAA,EAACD,aAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAACF,eAAU,EAAEC,mBAAY,CAAC;oBACnC,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,CAAC;oBAChF,YAAY,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,CAAC;iBACtF,EAAD,EAAA;;IAnBA,OAAA,gBAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
@@ -5,5 +5,5 @@
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
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/a11y"),require("@angular/cdk/bidi"),require("@angular/cdk/coercion"),require("@angular/cdk/keycodes"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@angular/cdk/stepper",["exports","@angular/core","@angular/cdk/a11y","@angular/cdk/bidi","@angular/cdk/coercion","@angular/cdk/keycodes","@angular/forms","rxjs","rxjs/operators","@angular/common"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.stepper={}),e.ng.core,e.ng.cdk.a11y,e.ng.cdk.bidi,e.ng.cdk.coercion,e.ng.cdk.keycodes,e.ng.forms,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,t,n,r,o,i,s,p,a,c){"use strict";var d=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[cdkStepLabel]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),u=0,l=function(){function e(){}return e}(),h=function(){function e(e){this._stepper=e,this.interacted=!1,this._editable=!0,this._optional=!1,this._customCompleted=null}return Object.defineProperty(e.prototype,"editable",{get:function(){return this._editable},set:function(e){this._editable=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optional",{get:function(){return this._optional},set:function(e){this._optional=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"completed",{get:function(){return null==this._customCompleted?this._defaultCompleted:this._customCompleted},set:function(e){this._customCompleted=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_defaultCompleted",{get:function(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted},enumerable:!0,configurable:!0}),e.prototype.select=function(){this._stepper.selected=this},e.prototype.reset=function(){this.interacted=!1,null!=this._customCompleted&&(this._customCompleted=!1),this.stepControl&&this.stepControl.reset()},e.prototype.ngOnChanges=function(){this._stepper._stateChanged()},e.decorators=[{type:t.Component,args:[{selector:"cdk-step",exportAs:"cdkStep",template:"<ng-template><ng-content></ng-content></ng-template>",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:y,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return y})]}]}]},e.propDecorators={stepLabel:[{type:t.ContentChild,args:[d]}],content:[{type:t.ViewChild,args:[t.TemplateRef]}],stepControl:[{type:t.Input}],label:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],editable:[{type:t.Input}],optional:[{type:t.Input}],completed:[{type:t.Input}]},e}(),y=function(){function e(e,n){this._dir=e,this._changeDetectorRef=n,this._destroyed=new p.Subject,this._linear=!1,this._selectedIndex=0,this.selectionChange=new t.EventEmitter,this._orientation="horizontal",this._groupId=u++}return Object.defineProperty(e.prototype,"linear",{get:function(){return this._linear},set:function(e){this._linear=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){if(this._steps){if(e<0||e>this._steps.length-1)throw Error("cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.");this._selectedIndex!=e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this._steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e)}else this._selectedIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._steps?this._steps.toArray()[this.selectedIndex]:void 0},set:function(e){this.selectedIndex=this._steps?this._steps.toArray().indexOf(e):-1},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;this._keyManager=new n.FocusKeyManager(this._stepHeader).withWrap().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:p.of()).pipe(a.startWith(this._layoutDirection()),a.takeUntil(this._destroyed)).subscribe(function(t){return e._keyManager.withHorizontalOrientation(t)}),this._keyManager.updateActiveItemIndex(this._selectedIndex)},e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},e.prototype.next=function(){this.selectedIndex=Math.min(this._selectedIndex+1,this._steps.length-1)},e.prototype.previous=function(){this.selectedIndex=Math.max(this._selectedIndex-1,0)},e.prototype.reset=function(){this._updateSelectedItemIndex(0),this._steps.forEach(function(e){return e.reset()}),this._stateChanged()},e.prototype._getStepLabelId=function(e){return"cdk-step-label-"+this._groupId+"-"+e},e.prototype._getStepContentId=function(e){return"cdk-step-content-"+this._groupId+"-"+e},e.prototype._stateChanged=function(){this._changeDetectorRef.markForCheck()},e.prototype._getAnimationDirection=function(e){var t=e-this._selectedIndex;return t<0?"rtl"===this._layoutDirection()?"next":"previous":t>0?"rtl"===this._layoutDirection()?"previous":"next":"current"},e.prototype._getIndicatorType=function(e){var t=this._steps.toArray()[e];return t.completed&&this._selectedIndex!=e?t.editable?"edit":"done":"number"},e.prototype._getFocusIndex=function(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex},e.prototype._updateSelectedItemIndex=function(e){var t=this._steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:t[e],previouslySelectedStep:t[this._selectedIndex]}),this._keyManager.updateActiveItemIndex(e),this._selectedIndex=e,this._stateChanged()},e.prototype._onKeydown=function(e){var t=e.keyCode;null==this._keyManager.activeItemIndex||t!==i.SPACE&&t!==i.ENTER?t===i.HOME?(this._keyManager.setFirstItemActive(),e.preventDefault()):t===i.END?(this._keyManager.setLastItemActive(),e.preventDefault()):this._keyManager.onKeydown(e):(this.selectedIndex=this._keyManager.activeItemIndex,e.preventDefault())},e.prototype._anyControlsInvalidOrPending=function(e){var t=this._steps.toArray();return t[this._selectedIndex].interacted=!0,!!(this._linear&&e>=0)&&t.slice(0,e).some(function(e){var t=e.stepControl;return(t?t.invalid||t.pending||!e.interacted:!e.completed)&&!e.optional})},e.prototype._layoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},e.decorators=[{type:t.Directive,args:[{selector:"[cdkStepper]",exportAs:"cdkStepper"}]}],e.ctorParameters=function(){return[{type:r.Directionality,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef}]},e.propDecorators={_steps:[{type:t.ContentChildren,args:[h]}],linear:[{type:t.Input}],selectedIndex:[{type:t.Input}],selected:[{type:t.Input}],selectionChange:[{type:t.Output}]},e}(),g=function(){function e(e){this._stepper=e,this.type="submit"}return e.decorators=[{type:t.Directive,args:[{selector:"button[cdkStepperNext]",host:{"(click)":"_stepper.next()","[type]":"type"}}]}],e.ctorParameters=function(){return[{type:y}]},e.propDecorators={type:[{type:t.Input}]},e}(),_=function(){function e(e){this._stepper=e,this.type="button"}return e.decorators=[{type:t.Directive,args:[{selector:"button[cdkStepperPrevious]",host:{"(click)":"_stepper.previous()","[type]":"type"}}]}],e.ctorParameters=function(){return[{type:y}]},e.propDecorators={type:[{type:t.Input}]},e}(),f=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.BidiModule,c.CommonModule],exports:[h,y,d,g,_],declarations:[h,y,d,g,_]}]}],e}();e.StepperSelectionEvent=l,e.CdkStep=h,e.CdkStepper=y,e.CdkStepLabel=d,e.CdkStepperNext=g,e.CdkStepperPrevious=_,e.CdkStepperModule=f,Object.defineProperty(e,"__esModule",{value:!0})});
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/a11y"),require("@angular/cdk/bidi"),require("@angular/cdk/coercion"),require("@angular/cdk/keycodes"),require("@angular/common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/stepper",["exports","@angular/core","@angular/cdk/a11y","@angular/cdk/bidi","@angular/cdk/coercion","@angular/cdk/keycodes","@angular/common","@angular/forms","rxjs","rxjs/operators"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.stepper={}),e.ng.core,e.ng.cdk.a11y,e.ng.cdk.bidi,e.ng.cdk.coercion,e.ng.cdk.keycodes,e.ng.common,e.ng.forms,e.rxjs,e.rxjs.operators)}(this,function(e,t,n,r,o,i,s,c,a,p){"use strict";var d=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[cdkStepLabel]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),u=0,l=function(){function e(){}return e}(),h=function(){function e(e){this._stepper=e,this.interacted=!1,this._editable=!0,this._optional=!1,this._customCompleted=null}return Object.defineProperty(e.prototype,"editable",{get:function(){return this._editable},set:function(e){this._editable=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optional",{get:function(){return this._optional},set:function(e){this._optional=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"completed",{get:function(){return null==this._customCompleted?this._defaultCompleted:this._customCompleted},set:function(e){this._customCompleted=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_defaultCompleted",{get:function(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted},enumerable:!0,configurable:!0}),e.prototype.select=function(){this._stepper.selected=this},e.prototype.reset=function(){this.interacted=!1,null!=this._customCompleted&&(this._customCompleted=!1),this.stepControl&&this.stepControl.reset()},e.prototype.ngOnChanges=function(){this._stepper._stateChanged()},e.decorators=[{type:t.Component,args:[{selector:"cdk-step",exportAs:"cdkStep",template:"<ng-template><ng-content></ng-content></ng-template>",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:y,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return y})]}]}]},e.propDecorators={stepLabel:[{type:t.ContentChild,args:[d]}],content:[{type:t.ViewChild,args:[t.TemplateRef]}],stepControl:[{type:t.Input}],label:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],editable:[{type:t.Input}],optional:[{type:t.Input}],completed:[{type:t.Input}]},e}(),y=function(){function e(e,n,r,o){this._dir=e,this._changeDetectorRef=n,this._elementRef=r,this._destroyed=new a.Subject,this._linear=!1,this._selectedIndex=0,this.selectionChange=new t.EventEmitter,this._orientation="horizontal",this._groupId=u++,this._document=o}return Object.defineProperty(e.prototype,"linear",{get:function(){return this._linear},set:function(e){this._linear=o.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){if(this._steps){if(e<0||e>this._steps.length-1)throw Error("cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.");this._selectedIndex!=e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this._steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e)}else this._selectedIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._steps?this._steps.toArray()[this.selectedIndex]:void 0},set:function(e){this.selectedIndex=this._steps?this._steps.toArray().indexOf(e):-1},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;this._keyManager=new n.FocusKeyManager(this._stepHeader).withWrap().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:a.of()).pipe(p.startWith(this._layoutDirection()),p.takeUntil(this._destroyed)).subscribe(function(t){return e._keyManager.withHorizontalOrientation(t)}),this._keyManager.updateActiveItemIndex(this._selectedIndex),this._steps.changes.pipe(p.takeUntil(this._destroyed)).subscribe(function(){e.selected||(e._selectedIndex=Math.max(e._selectedIndex-1,0))})},e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},e.prototype.next=function(){this.selectedIndex=Math.min(this._selectedIndex+1,this._steps.length-1)},e.prototype.previous=function(){this.selectedIndex=Math.max(this._selectedIndex-1,0)},e.prototype.reset=function(){this._updateSelectedItemIndex(0),this._steps.forEach(function(e){return e.reset()}),this._stateChanged()},e.prototype._getStepLabelId=function(e){return"cdk-step-label-"+this._groupId+"-"+e},e.prototype._getStepContentId=function(e){return"cdk-step-content-"+this._groupId+"-"+e},e.prototype._stateChanged=function(){this._changeDetectorRef.markForCheck()},e.prototype._getAnimationDirection=function(e){var t=e-this._selectedIndex;return t<0?"rtl"===this._layoutDirection()?"next":"previous":t>0?"rtl"===this._layoutDirection()?"previous":"next":"current"},e.prototype._getIndicatorType=function(e){var t=this._steps.toArray()[e];return t.completed&&this._selectedIndex!=e?t.editable?"edit":"done":"number"},e.prototype._getFocusIndex=function(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex},e.prototype._updateSelectedItemIndex=function(e){var t=this._steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:t[e],previouslySelectedStep:t[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItemIndex(e),this._selectedIndex=e,this._stateChanged()},e.prototype._onKeydown=function(e){var t=e.keyCode;null==this._keyManager.activeItemIndex||t!==i.SPACE&&t!==i.ENTER?t===i.HOME?(this._keyManager.setFirstItemActive(),e.preventDefault()):t===i.END?(this._keyManager.setLastItemActive(),e.preventDefault()):this._keyManager.onKeydown(e):(this.selectedIndex=this._keyManager.activeItemIndex,e.preventDefault())},e.prototype._anyControlsInvalidOrPending=function(e){var t=this._steps.toArray();return t[this._selectedIndex].interacted=!0,!!(this._linear&&e>=0)&&t.slice(0,e).some(function(e){var t=e.stepControl;return(t?t.invalid||t.pending||!e.interacted:!e.completed)&&!e.optional})},e.prototype._layoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},e.prototype._containsFocus=function(){if(!this._document||!this._elementRef)return!1;var e=this._elementRef.nativeElement,t=this._document.activeElement;return e===t||e.contains(t)},e.decorators=[{type:t.Directive,args:[{selector:"[cdkStepper]",exportAs:"cdkStepper"}]}],e.ctorParameters=function(){return[{type:r.Directionality,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:void 0,decorators:[{type:t.Inject,args:[s.DOCUMENT]}]}]},e.propDecorators={_steps:[{type:t.ContentChildren,args:[h]}],linear:[{type:t.Input}],selectedIndex:[{type:t.Input}],selected:[{type:t.Input}],selectionChange:[{type:t.Output}]},e}(),_=function(){function e(e){this._stepper=e,this.type="submit"}return e.decorators=[{type:t.Directive,args:[{selector:"button[cdkStepperNext]",host:{"(click)":"_stepper.next()","[type]":"type"}}]}],e.ctorParameters=function(){return[{type:y}]},e.propDecorators={type:[{type:t.Input}]},e}(),f=function(){function e(e){this._stepper=e,this.type="button"}return e.decorators=[{type:t.Directive,args:[{selector:"button[cdkStepperPrevious]",host:{"(click)":"_stepper.previous()","[type]":"type"}}]}],e.ctorParameters=function(){return[{type:y}]},e.propDecorators={type:[{type:t.Input}]},e}(),g=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.BidiModule,s.CommonModule],exports:[h,y,d,_,f],declarations:[h,y,d,_,f]}]}],e}();e.StepperSelectionEvent=l,e.CdkStep=h,e.CdkStepper=y,e.CdkStepLabel=d,e.CdkStepperNext=_,e.CdkStepperPrevious=f,e.CdkStepperModule=g,Object.defineProperty(e,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=cdk-stepper.umd.min.js.map