You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sc...@apache.org on 2018/04/30 19:31:47 UTC
[06/51] [partial] nifi-fds git commit: update gh-pages
http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/4a326208/node_modules/@angular/cdk/esm5/overlay.es5.js
----------------------------------------------------------------------
diff --git a/node_modules/@angular/cdk/esm5/overlay.es5.js b/node_modules/@angular/cdk/esm5/overlay.es5.js
new file mode 100644
index 0000000..ac4223f
--- /dev/null
+++ b/node_modules/@angular/cdk/esm5/overlay.es5.js
@@ -0,0 +1,2041 @@
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+import { ApplicationRef, ComponentFactoryResolver, Directive, ElementRef, EventEmitter, Inject, Injectable, InjectionToken, Injector, Input, NgModule, NgZone, Optional, Output, Renderer2, SkipSelf, TemplateRef, ViewContainerRef } from '@angular/core';
+import { DomPortalHost, PortalModule, TemplatePortal } from '@angular/cdk/portal';
+import { Subject } from 'rxjs/Subject';
+import { ScrollDispatchModule, ScrollDispatcher, Scrollable, VIEWPORT_RULER_PROVIDER, ViewportRuler } from '@angular/cdk/scrolling';
+import { Subscription } from 'rxjs/Subscription';
+import { __extends } from 'tslib';
+import * as tslib_1 from 'tslib';
+import { Directionality } from '@angular/cdk/bidi';
+import { coerceBooleanProperty } from '@angular/cdk/coercion';
+import { ESCAPE } from '@angular/cdk/keycodes';
+
+/**
+ * Scroll strategy that doesn't do anything.
+ */
+var NoopScrollStrategy = (function () {
+ function NoopScrollStrategy() {
+ }
+ /**
+ * @return {?}
+ */
+ NoopScrollStrategy.prototype.enable = function () { };
+ /**
+ * @return {?}
+ */
+ NoopScrollStrategy.prototype.disable = function () { };
+ /**
+ * @return {?}
+ */
+ NoopScrollStrategy.prototype.attach = function () { };
+ return NoopScrollStrategy;
+}());
+
+/**
+ * OverlayConfig captures the initial configuration used when opening an overlay.
+ */
+var OverlayConfig = (function () {
+ /**
+ * @param {?=} config
+ */
+ function OverlayConfig(config) {
+ var _this = this;
+ /**
+ * Strategy to be used when handling scroll events while the overlay is open.
+ */
+ this.scrollStrategy = new NoopScrollStrategy();
+ /**
+ * Custom class to add to the overlay pane.
+ */
+ this.panelClass = '';
+ /**
+ * Whether the overlay has a backdrop.
+ */
+ this.hasBackdrop = false;
+ /**
+ * Custom class to add to the backdrop
+ */
+ this.backdropClass = 'cdk-overlay-dark-backdrop';
+ /**
+ * The direction of the text in the overlay panel.
+ */
+ this.direction = 'ltr';
+ if (config) {
+ Object.keys(config).forEach(function (key) { return _this[key] = config[key]; });
+ }
+ }
+ return OverlayConfig;
+}());
+
+/**
+ * Reference to an overlay that has been created with the Overlay service.
+ * Used to manipulate or dispose of said overlay.
+ */
+var OverlayRef = (function () {
+ /**
+ * @param {?} _portalHost
+ * @param {?} _pane
+ * @param {?} _config
+ * @param {?} _ngZone
+ */
+ function OverlayRef(_portalHost, _pane, _config, _ngZone) {
+ this._portalHost = _portalHost;
+ this._pane = _pane;
+ this._config = _config;
+ this._ngZone = _ngZone;
+ this._backdropElement = null;
+ this._backdropClick = new Subject();
+ this._attachments = new Subject();
+ this._detachments = new Subject();
+ if (_config.scrollStrategy) {
+ _config.scrollStrategy.attach(this);
+ }
+ }
+ Object.defineProperty(OverlayRef.prototype, "overlayElement", {
+ /**
+ * The overlay's HTML element
+ * @return {?}
+ */
+ get: function () {
+ return this._pane;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Attaches the overlay to a portal instance and adds the backdrop.
+ * @param {?} portal Portal instance to which to attach the overlay.
+ * @return {?} The portal attachment result.
+ */
+ OverlayRef.prototype.attach = function (portal) {
+ var _this = this;
+ var /** @type {?} */ attachResult = this._portalHost.attach(portal);
+ if (this._config.positionStrategy) {
+ this._config.positionStrategy.attach(this);
+ }
+ // Update the pane element with the given configuration.
+ this._updateStackingOrder();
+ this.updateSize();
+ this.updateDirection();
+ this.updatePosition();
+ if (this._config.scrollStrategy) {
+ this._config.scrollStrategy.enable();
+ }
+ // Enable pointer events for the overlay pane element.
+ this._togglePointerEvents(true);
+ if (this._config.hasBackdrop) {
+ this._attachBackdrop();
+ }
+ if (this._config.panelClass) {
+ // We can't do a spread here, because IE doesn't support setting multiple classes.
+ if (Array.isArray(this._config.panelClass)) {
+ this._config.panelClass.forEach(function (cls) { return _this._pane.classList.add(cls); });
+ }
+ else {
+ this._pane.classList.add(this._config.panelClass);
+ }
+ }
+ // Only emit the `attachments` event once all other setup is done.
+ this._attachments.next();
+ return attachResult;
+ };
+ /**
+ * Detaches an overlay from a portal.
+ * @return {?} The portal detachment result.
+ */
+ OverlayRef.prototype.detach = function () {
+ this.detachBackdrop();
+ // When the overlay is detached, the pane element should disable pointer events.
+ // This is necessary because otherwise the pane element will cover the page and disable
+ // pointer events therefore. Depends on the position strategy and the applied pane boundaries.
+ this._togglePointerEvents(false);
+ if (this._config.positionStrategy && this._config.positionStrategy.detach) {
+ this._config.positionStrategy.detach();
+ }
+ if (this._config.scrollStrategy) {
+ this._config.scrollStrategy.disable();
+ }
+ var /** @type {?} */ detachmentResult = this._portalHost.detach();
+ // Only emit after everything is detached.
+ this._detachments.next();
+ return detachmentResult;
+ };
+ /**
+ * Cleans up the overlay from the DOM.
+ * @return {?}
+ */
+ OverlayRef.prototype.dispose = function () {
+ if (this._config.positionStrategy) {
+ this._config.positionStrategy.dispose();
+ }
+ if (this._config.scrollStrategy) {
+ this._config.scrollStrategy.disable();
+ }
+ this.detachBackdrop();
+ this._portalHost.dispose();
+ this._attachments.complete();
+ this._backdropClick.complete();
+ this._detachments.next();
+ this._detachments.complete();
+ };
+ /**
+ * Checks whether the overlay has been attached.
+ * @return {?}
+ */
+ OverlayRef.prototype.hasAttached = function () {
+ return this._portalHost.hasAttached();
+ };
+ /**
+ * Returns an observable that emits when the backdrop has been clicked.
+ * @return {?}
+ */
+ OverlayRef.prototype.backdropClick = function () {
+ return this._backdropClick.asObservable();
+ };
+ /**
+ * Returns an observable that emits when the overlay has been attached.
+ * @return {?}
+ */
+ OverlayRef.prototype.attachments = function () {
+ return this._attachments.asObservable();
+ };
+ /**
+ * Returns an observable that emits when the overlay has been detached.
+ * @return {?}
+ */
+ OverlayRef.prototype.detachments = function () {
+ return this._detachments.asObservable();
+ };
+ /**
+ * Gets the current config of the overlay.
+ * @return {?}
+ */
+ OverlayRef.prototype.getConfig = function () {
+ return this._config;
+ };
+ /**
+ * Updates the position of the overlay based on the position strategy.
+ * @return {?}
+ */
+ OverlayRef.prototype.updatePosition = function () {
+ if (this._config.positionStrategy) {
+ this._config.positionStrategy.apply();
+ }
+ };
+ /**
+ * Updates the text direction of the overlay panel.
+ * @return {?}
+ */
+ OverlayRef.prototype.updateDirection = function () {
+ this._pane.setAttribute('dir', /** @type {?} */ ((this._config.direction)));
+ };
+ /**
+ * Updates the size of the overlay based on the overlay config.
+ * @return {?}
+ */
+ OverlayRef.prototype.updateSize = function () {
+ if (this._config.width || this._config.width === 0) {
+ this._pane.style.width = formatCssUnit(this._config.width);
+ }
+ if (this._config.height || this._config.height === 0) {
+ this._pane.style.height = formatCssUnit(this._config.height);
+ }
+ if (this._config.minWidth || this._config.minWidth === 0) {
+ this._pane.style.minWidth = formatCssUnit(this._config.minWidth);
+ }
+ if (this._config.minHeight || this._config.minHeight === 0) {
+ this._pane.style.minHeight = formatCssUnit(this._config.minHeight);
+ }
+ if (this._config.maxWidth || this._config.maxWidth === 0) {
+ this._pane.style.maxWidth = formatCssUnit(this._config.maxWidth);
+ }
+ if (this._config.maxHeight || this._config.maxHeight === 0) {
+ this._pane.style.maxHeight = formatCssUnit(this._config.maxHeight);
+ }
+ };
+ /**
+ * Toggles the pointer events for the overlay pane element.
+ * @param {?} enablePointer
+ * @return {?}
+ */
+ OverlayRef.prototype._togglePointerEvents = function (enablePointer) {
+ this._pane.style.pointerEvents = enablePointer ? 'auto' : 'none';
+ };
+ /**
+ * Attaches a backdrop for this overlay.
+ * @return {?}
+ */
+ OverlayRef.prototype._attachBackdrop = function () {
+ var _this = this;
+ this._backdropElement = document.createElement('div');
+ this._backdropElement.classList.add('cdk-overlay-backdrop');
+ if (this._config.backdropClass) {
+ this._backdropElement.classList.add(this._config.backdropClass);
+ } /** @type {?} */
+ ((
+ // Insert the backdrop before the pane in the DOM order,
+ // in order to handle stacked overlays properly.
+ this._pane.parentElement)).insertBefore(this._backdropElement, this._pane);
+ // Forward backdrop clicks such that the consumer of the overlay can perform whatever
+ // action desired when such a click occurs (usually closing the overlay).
+ this._backdropElement.addEventListener('click', function () { return _this._backdropClick.next(null); });
+ // Add class to fade-in the backdrop after one frame.
+ requestAnimationFrame(function () {
+ if (_this._backdropElement) {
+ _this._backdropElement.classList.add('cdk-overlay-backdrop-showing');
+ }
+ });
+ };
+ /**
+ * Updates the stacking order of the element, moving it to the top if necessary.
+ * This is required in cases where one overlay was detached, while another one,
+ * that should be behind it, was destroyed. The next time both of them are opened,
+ * the stacking will be wrong, because the detached element's pane will still be
+ * in its original DOM position.
+ * @return {?}
+ */
+ OverlayRef.prototype._updateStackingOrder = function () {
+ if (this._pane.nextSibling) {
+ ((this._pane.parentNode)).appendChild(this._pane);
+ }
+ };
+ /**
+ * Detaches the backdrop (if any) associated with the overlay.
+ * @return {?}
+ */
+ OverlayRef.prototype.detachBackdrop = function () {
+ var _this = this;
+ var /** @type {?} */ backdropToDetach = this._backdropElement;
+ if (backdropToDetach) {
+ var /** @type {?} */ finishDetach_1 = function () {
+ // It may not be attached to anything in certain cases (e.g. unit tests).
+ if (backdropToDetach && backdropToDetach.parentNode) {
+ backdropToDetach.parentNode.removeChild(backdropToDetach);
+ }
+ // It is possible that a new portal has been attached to this overlay since we started
+ // removing the backdrop. If that is the case, only clear the backdrop reference if it
+ // is still the same instance that we started to remove.
+ if (_this._backdropElement == backdropToDetach) {
+ _this._backdropElement = null;
+ }
+ };
+ backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
+ if (this._config.backdropClass) {
+ backdropToDetach.classList.remove(this._config.backdropClass);
+ }
+ backdropToDetach.addEventListener('transitionend', finishDetach_1);
+ // If the backdrop doesn't have a transition, the `transitionend` event won't fire.
+ // In this case we make it unclickable and we try to remove it after a delay.
+ backdropToDetach.style.pointerEvents = 'none';
+ // Run this outside the Angular zone because there's nothing that Angular cares about.
+ // If it were to run inside the Angular zone, every test that used Overlay would have to be
+ // either async or fakeAsync.
+ this._ngZone.runOutsideAngular(function () {
+ setTimeout(finishDetach_1, 500);
+ });
+ }
+ };
+ return OverlayRef;
+}());
+/**
+ * @param {?} value
+ * @return {?}
+ */
+function formatCssUnit(value) {
+ return typeof value === 'string' ? (value) : value + "px";
+}
+
+/** Horizontal dimension of a connection point on the perimeter of the origin or overlay element. */
+/**
+ * The points of the origin element and the overlay element to connect.
+ */
+var ConnectionPositionPair = (function () {
+ /**
+ * @param {?} origin
+ * @param {?} overlay
+ */
+ function ConnectionPositionPair(origin, overlay) {
+ this.originX = origin.originX;
+ this.originY = origin.originY;
+ this.overlayX = overlay.overlayX;
+ this.overlayY = overlay.overlayY;
+ }
+ return ConnectionPositionPair;
+}());
+/**
+ * Set of properties regarding the position of the origin and overlay relative to the viewport
+ * with respect to the containing Scrollable elements.
+ *
+ * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the
+ * bounds of any one of the strategy's Scrollable's bounding client rectangle.
+ *
+ * The overlay and origin are outside view if there is no overlap between their bounding client
+ * rectangle and any one of the strategy's Scrollable's bounding client rectangle.
+ *
+ * ----------- -----------
+ * | outside | | clipped |
+ * | view | --------------------------
+ * | | | | | |
+ * ---------- | ----------- |
+ * -------------------------- | |
+ * | | | Scrollable |
+ * | | | |
+ * | | --------------------------
+ * | Scrollable |
+ * | |
+ * --------------------------
+ */
+var ScrollingVisibility = (function () {
+ function ScrollingVisibility() {
+ }
+ return ScrollingVisibility;
+}());
+/**
+ * The change event emitted by the strategy when a fallback position is used.
+ */
+var ConnectedOverlayPositionChange = (function () {
+ /**
+ * @param {?} connectionPair
+ * @param {?} scrollableViewProperties
+ */
+ function ConnectedOverlayPositionChange(connectionPair, scrollableViewProperties) {
+ this.connectionPair = connectionPair;
+ this.scrollableViewProperties = scrollableViewProperties;
+ }
+ /**
+ * @nocollapse
+ */
+ ConnectedOverlayPositionChange.ctorParameters = function () { return [
+ { type: ConnectionPositionPair, },
+ { type: ScrollingVisibility, decorators: [{ type: Optional },] },
+ ]; };
+ return ConnectedOverlayPositionChange;
+}());
+
+/**
+ * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.
+ * \@docs-private
+ * @param {?} element Dimensions of the element (from getBoundingClientRect)
+ * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)
+ * @return {?} Whether the element is scrolled out of view
+ */
+function isElementScrolledOutsideView(element, scrollContainers) {
+ return scrollContainers.some(function (containerBounds) {
+ var /** @type {?} */ outsideAbove = element.bottom < containerBounds.top;
+ var /** @type {?} */ outsideBelow = element.top > containerBounds.bottom;
+ var /** @type {?} */ outsideLeft = element.right < containerBounds.left;
+ var /** @type {?} */ outsideRight = element.left > containerBounds.right;
+ return outsideAbove || outsideBelow || outsideLeft || outsideRight;
+ });
+}
+/**
+ * Gets whether an element is clipped by any of its scrolling containers.
+ * \@docs-private
+ * @param {?} element Dimensions of the element (from getBoundingClientRect)
+ * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)
+ * @return {?} Whether the element is clipped
+ */
+function isElementClippedByScrolling(element, scrollContainers) {
+ return scrollContainers.some(function (scrollContainerRect) {
+ var /** @type {?} */ clippedAbove = element.top < scrollContainerRect.top;
+ var /** @type {?} */ clippedBelow = element.bottom > scrollContainerRect.bottom;
+ var /** @type {?} */ clippedLeft = element.left < scrollContainerRect.left;
+ var /** @type {?} */ clippedRight = element.right > scrollContainerRect.right;
+ return clippedAbove || clippedBelow || clippedLeft || clippedRight;
+ });
+}
+
+/**
+ * A strategy for positioning overlays. Using this strategy, an overlay is given an
+ * implicit position relative some origin element. The relative position is defined in terms of
+ * a point on the origin element that is connected to a point on the overlay element. For example,
+ * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
+ * of the overlay.
+ */
+var ConnectedPositionStrategy = (function () {
+ /**
+ * @param {?} originPos
+ * @param {?} overlayPos
+ * @param {?} _connectedTo
+ * @param {?} _viewportRuler
+ */
+ function ConnectedPositionStrategy(originPos, overlayPos, _connectedTo, _viewportRuler) {
+ this._connectedTo = _connectedTo;
+ this._viewportRuler = _viewportRuler;
+ /**
+ * Layout direction of the position strategy.
+ */
+ this._dir = 'ltr';
+ /**
+ * The offset in pixels for the overlay connection point on the x-axis
+ */
+ this._offsetX = 0;
+ /**
+ * The offset in pixels for the overlay connection point on the y-axis
+ */
+ this._offsetY = 0;
+ /**
+ * The Scrollable containers used to check scrollable view properties on position change.
+ */
+ this.scrollables = [];
+ /**
+ * Subscription to viewport resize events.
+ */
+ this._resizeSubscription = Subscription.EMPTY;
+ /**
+ * Ordered list of preferred positions, from most to least desirable.
+ */
+ this._preferredPositions = [];
+ this._onPositionChange = new Subject();
+ this._origin = this._connectedTo.nativeElement;
+ this.withFallbackPosition(originPos, overlayPos);
+ }
+ Object.defineProperty(ConnectedPositionStrategy.prototype, "_isRtl", {
+ /**
+ * Whether the we're dealing with an RTL context
+ * @return {?}
+ */
+ get: function () {
+ return this._dir === 'rtl';
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedPositionStrategy.prototype, "onPositionChange", {
+ /**
+ * Emits an event when the connection point changes.
+ * @return {?}
+ */
+ get: function () {
+ return this._onPositionChange.asObservable();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedPositionStrategy.prototype, "positions", {
+ /**
+ * Ordered list of preferred positions, from most to least desirable.
+ * @return {?}
+ */
+ get: function () {
+ return this._preferredPositions;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * @param {?} overlayRef
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.attach = function (overlayRef) {
+ var _this = this;
+ this._overlayRef = overlayRef;
+ this._pane = overlayRef.overlayElement;
+ this._resizeSubscription.unsubscribe();
+ this._resizeSubscription = this._viewportRuler.change().subscribe(function () { return _this.apply(); });
+ };
+ /**
+ * Performs any cleanup after the element is destroyed.
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.dispose = function () {
+ this._resizeSubscription.unsubscribe();
+ };
+ /**
+ * \@docs-private
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.detach = function () {
+ this._resizeSubscription.unsubscribe();
+ };
+ /**
+ * Updates the position of the overlay element, using whichever preferred position relative
+ * to the origin fits on-screen.
+ * \@docs-private
+ *
+ * @return {?} Resolves when the styles have been applied.
+ */
+ ConnectedPositionStrategy.prototype.apply = function () {
+ // We need the bounding rects for the origin and the overlay to determine how to position
+ // the overlay relative to the origin.
+ var /** @type {?} */ element = this._pane;
+ var /** @type {?} */ originRect = this._origin.getBoundingClientRect();
+ var /** @type {?} */ overlayRect = element.getBoundingClientRect();
+ // We use the viewport rect to determine whether a position would go off-screen.
+ var /** @type {?} */ viewportRect = this._viewportRuler.getViewportRect();
+ // Fallback point if none of the fallbacks fit into the viewport.
+ var /** @type {?} */ fallbackPoint;
+ var /** @type {?} */ fallbackPosition;
+ // We want to place the overlay in the first of the preferred positions such that the
+ // overlay fits on-screen.
+ for (var _i = 0, _a = this._preferredPositions; _i < _a.length; _i++) {
+ var pos = _a[_i];
+ // Get the (x, y) point of connection on the origin, and then use that to get the
+ // (top, left) coordinate for the overlay at `pos`.
+ var /** @type {?} */ originPoint = this._getOriginConnectionPoint(originRect, pos);
+ var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, overlayRect, viewportRect, pos);
+ // If the overlay in the calculated position fits on-screen, put it there and we're done.
+ if (overlayPoint.fitsInViewport) {
+ this._setElementPosition(element, overlayRect, overlayPoint, pos);
+ // Save the last connected position in case the position needs to be re-calculated.
+ this._lastConnectedPosition = pos;
+ return;
+ }
+ else if (!fallbackPoint || fallbackPoint.visibleArea < overlayPoint.visibleArea) {
+ fallbackPoint = overlayPoint;
+ fallbackPosition = pos;
+ }
+ }
+ // If none of the preferred positions were in the viewport, take the one
+ // with the largest visible area.
+ this._setElementPosition(element, overlayRect, /** @type {?} */ ((fallbackPoint)), /** @type {?} */ ((fallbackPosition)));
+ };
+ /**
+ * This re-aligns the overlay element with the trigger in its last calculated position,
+ * even if a position higher in the "preferred positions" list would now fit. This
+ * allows one to re-align the panel without changing the orientation of the panel.
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.recalculateLastPosition = function () {
+ var /** @type {?} */ originRect = this._origin.getBoundingClientRect();
+ var /** @type {?} */ overlayRect = this._pane.getBoundingClientRect();
+ var /** @type {?} */ viewportRect = this._viewportRuler.getViewportRect();
+ var /** @type {?} */ lastPosition = this._lastConnectedPosition || this._preferredPositions[0];
+ var /** @type {?} */ originPoint = this._getOriginConnectionPoint(originRect, lastPosition);
+ var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, overlayRect, viewportRect, lastPosition);
+ this._setElementPosition(this._pane, overlayRect, overlayPoint, lastPosition);
+ };
+ /**
+ * Sets the list of Scrollable containers that host the origin element so that
+ * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
+ * Scrollable must be an ancestor element of the strategy's origin element.
+ * @param {?} scrollables
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.withScrollableContainers = function (scrollables) {
+ this.scrollables = scrollables;
+ };
+ /**
+ * Adds a new preferred fallback position.
+ * @param {?} originPos
+ * @param {?} overlayPos
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.withFallbackPosition = function (originPos, overlayPos) {
+ this._preferredPositions.push(new ConnectionPositionPair(originPos, overlayPos));
+ return this;
+ };
+ /**
+ * Sets the layout direction so the overlay's position can be adjusted to match.
+ * @param {?} dir New layout direction.
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.withDirection = function (dir) {
+ this._dir = dir;
+ return this;
+ };
+ /**
+ * Sets an offset for the overlay's connection point on the x-axis
+ * @param {?} offset New offset in the X axis.
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.withOffsetX = function (offset) {
+ this._offsetX = offset;
+ return this;
+ };
+ /**
+ * Sets an offset for the overlay's connection point on the y-axis
+ * @param {?} offset New offset in the Y axis.
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype.withOffsetY = function (offset) {
+ this._offsetY = offset;
+ return this;
+ };
+ /**
+ * Gets the horizontal (x) "start" dimension based on whether the overlay is in an RTL context.
+ * @param {?} rect
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._getStartX = function (rect) {
+ return this._isRtl ? rect.right : rect.left;
+ };
+ /**
+ * Gets the horizontal (x) "end" dimension based on whether the overlay is in an RTL context.
+ * @param {?} rect
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._getEndX = function (rect) {
+ return this._isRtl ? rect.left : rect.right;
+ };
+ /**
+ * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.
+ * @param {?} originRect
+ * @param {?} pos
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._getOriginConnectionPoint = function (originRect, pos) {
+ var /** @type {?} */ originStartX = this._getStartX(originRect);
+ var /** @type {?} */ originEndX = this._getEndX(originRect);
+ var /** @type {?} */ x;
+ if (pos.originX == 'center') {
+ x = originStartX + (originRect.width / 2);
+ }
+ else {
+ x = pos.originX == 'start' ? originStartX : originEndX;
+ }
+ var /** @type {?} */ y;
+ if (pos.originY == 'center') {
+ y = originRect.top + (originRect.height / 2);
+ }
+ else {
+ y = pos.originY == 'top' ? originRect.top : originRect.bottom;
+ }
+ return { x: x, y: y };
+ };
+ /**
+ * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and
+ * origin point to which the overlay should be connected, as well as how much of the element
+ * would be inside the viewport at that position.
+ * @param {?} originPoint
+ * @param {?} overlayRect
+ * @param {?} viewportRect
+ * @param {?} pos
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._getOverlayPoint = function (originPoint, overlayRect, viewportRect, pos) {
+ // Calculate the (overlayStartX, overlayStartY), the start of the potential overlay position
+ // relative to the origin point.
+ var /** @type {?} */ overlayStartX;
+ if (pos.overlayX == 'center') {
+ overlayStartX = -overlayRect.width / 2;
+ }
+ else if (pos.overlayX === 'start') {
+ overlayStartX = this._isRtl ? -overlayRect.width : 0;
+ }
+ else {
+ overlayStartX = this._isRtl ? 0 : -overlayRect.width;
+ }
+ var /** @type {?} */ overlayStartY;
+ if (pos.overlayY == 'center') {
+ overlayStartY = -overlayRect.height / 2;
+ }
+ else {
+ overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;
+ }
+ // The (x, y) coordinates of the overlay.
+ var /** @type {?} */ x = originPoint.x + overlayStartX + this._offsetX;
+ var /** @type {?} */ y = originPoint.y + overlayStartY + this._offsetY;
+ // How much the overlay would overflow at this position, on each side.
+ var /** @type {?} */ leftOverflow = 0 - x;
+ var /** @type {?} */ rightOverflow = (x + overlayRect.width) - viewportRect.width;
+ var /** @type {?} */ topOverflow = 0 - y;
+ var /** @type {?} */ bottomOverflow = (y + overlayRect.height) - viewportRect.height;
+ // Visible parts of the element on each axis.
+ var /** @type {?} */ visibleWidth = this._subtractOverflows(overlayRect.width, leftOverflow, rightOverflow);
+ var /** @type {?} */ visibleHeight = this._subtractOverflows(overlayRect.height, topOverflow, bottomOverflow);
+ // The area of the element that's within the viewport.
+ var /** @type {?} */ visibleArea = visibleWidth * visibleHeight;
+ var /** @type {?} */ fitsInViewport = (overlayRect.width * overlayRect.height) === visibleArea;
+ return { x: x, y: y, fitsInViewport: fitsInViewport, visibleArea: visibleArea };
+ };
+ /**
+ * Gets the view properties of the trigger and overlay, including whether they are clipped
+ * or completely outside the view of any of the strategy's scrollables.
+ * @param {?} overlay
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._getScrollVisibility = function (overlay) {
+ var /** @type {?} */ originBounds = this._origin.getBoundingClientRect();
+ var /** @type {?} */ overlayBounds = overlay.getBoundingClientRect();
+ var /** @type {?} */ scrollContainerBounds = this.scrollables.map(function (s) { return s.getElementRef().nativeElement.getBoundingClientRect(); });
+ return {
+ isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),
+ isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),
+ isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),
+ isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),
+ };
+ };
+ /**
+ * Physically positions the overlay element to the given coordinate.
+ * @param {?} element
+ * @param {?} overlayRect
+ * @param {?} overlayPoint
+ * @param {?} pos
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._setElementPosition = function (element, overlayRect, overlayPoint, pos) {
+ // We want to set either `top` or `bottom` based on whether the overlay wants to appear above
+ // or below the origin and the direction in which the element will expand.
+ var /** @type {?} */ verticalStyleProperty = pos.overlayY === 'bottom' ? 'bottom' : 'top';
+ // When using `bottom`, we adjust the y position such that it is the distance
+ // from the bottom of the viewport rather than the top.
+ var /** @type {?} */ y = verticalStyleProperty === 'top' ?
+ overlayPoint.y :
+ document.documentElement.clientHeight - (overlayPoint.y + overlayRect.height);
+ // We want to set either `left` or `right` based on whether the overlay wants to appear "before"
+ // or "after" the origin, which determines the direction in which the element will expand.
+ // For the horizontal axis, the meaning of "before" and "after" change based on whether the
+ // page is in RTL or LTR.
+ var /** @type {?} */ horizontalStyleProperty;
+ if (this._dir === 'rtl') {
+ horizontalStyleProperty = pos.overlayX === 'end' ? 'left' : 'right';
+ }
+ else {
+ horizontalStyleProperty = pos.overlayX === 'end' ? 'right' : 'left';
+ }
+ // When we're setting `right`, we adjust the x position such that it is the distance
+ // from the right edge of the viewport rather than the left edge.
+ var /** @type {?} */ x = horizontalStyleProperty === 'left' ?
+ overlayPoint.x :
+ document.documentElement.clientWidth - (overlayPoint.x + overlayRect.width);
+ // Reset any existing styles. This is necessary in case the preferred position has
+ // changed since the last `apply`.
+ ['top', 'bottom', 'left', 'right'].forEach(function (p) { return element.style[p] = null; });
+ element.style[verticalStyleProperty] = y + "px";
+ element.style[horizontalStyleProperty] = x + "px";
+ // Notify that the position has been changed along with its change properties.
+ var /** @type {?} */ scrollableViewProperties = this._getScrollVisibility(element);
+ var /** @type {?} */ positionChange = new ConnectedOverlayPositionChange(pos, scrollableViewProperties);
+ this._onPositionChange.next(positionChange);
+ };
+ /**
+ * Subtracts the amount that an element is overflowing on an axis from it's length.
+ * @param {?} length
+ * @param {...?} overflows
+ * @return {?}
+ */
+ ConnectedPositionStrategy.prototype._subtractOverflows = function (length) {
+ var overflows = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ overflows[_i - 1] = arguments[_i];
+ }
+ return overflows.reduce(function (currentValue, currentOverflow) {
+ return currentValue - Math.max(currentOverflow, 0);
+ }, length);
+ };
+ return ConnectedPositionStrategy;
+}());
+
+/**
+ * A strategy for positioning overlays. Using this strategy, an overlay is given an
+ * explicit position relative to the browser's viewport. We use flexbox, instead of
+ * transforms, in order to avoid issues with subpixel rendering which can cause the
+ * element to become blurry.
+ */
+var GlobalPositionStrategy = (function () {
+ function GlobalPositionStrategy() {
+ this._cssPosition = 'static';
+ this._topOffset = '';
+ this._bottomOffset = '';
+ this._leftOffset = '';
+ this._rightOffset = '';
+ this._alignItems = '';
+ this._justifyContent = '';
+ this._width = '';
+ this._height = '';
+ this._wrapper = null;
+ }
+ /**
+ * @param {?} overlayRef
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.attach = function (overlayRef) {
+ this._overlayRef = overlayRef;
+ };
+ /**
+ * Sets the top position of the overlay. Clears any previously set vertical position.
+ * @param {?=} value New top offset.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.top = function (value) {
+ if (value === void 0) { value = ''; }
+ this._bottomOffset = '';
+ this._topOffset = value;
+ this._alignItems = 'flex-start';
+ return this;
+ };
+ /**
+ * Sets the left position of the overlay. Clears any previously set horizontal position.
+ * @param {?=} value New left offset.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.left = function (value) {
+ if (value === void 0) { value = ''; }
+ this._rightOffset = '';
+ this._leftOffset = value;
+ this._justifyContent = 'flex-start';
+ return this;
+ };
+ /**
+ * Sets the bottom position of the overlay. Clears any previously set vertical position.
+ * @param {?=} value New bottom offset.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.bottom = function (value) {
+ if (value === void 0) { value = ''; }
+ this._topOffset = '';
+ this._bottomOffset = value;
+ this._alignItems = 'flex-end';
+ return this;
+ };
+ /**
+ * Sets the right position of the overlay. Clears any previously set horizontal position.
+ * @param {?=} value New right offset.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.right = function (value) {
+ if (value === void 0) { value = ''; }
+ this._leftOffset = '';
+ this._rightOffset = value;
+ this._justifyContent = 'flex-end';
+ return this;
+ };
+ /**
+ * Sets the overlay width and clears any previously set width.
+ * @param {?=} value New width for the overlay
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.width = function (value) {
+ if (value === void 0) { value = ''; }
+ this._width = value;
+ // When the width is 100%, we should reset the `left` and the offset,
+ // in order to ensure that the element is flush against the viewport edge.
+ if (value === '100%') {
+ this.left('0px');
+ }
+ return this;
+ };
+ /**
+ * Sets the overlay height and clears any previously set height.
+ * @param {?=} value New height for the overlay
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.height = function (value) {
+ if (value === void 0) { value = ''; }
+ this._height = value;
+ // When the height is 100%, we should reset the `top` and the offset,
+ // in order to ensure that the element is flush against the viewport edge.
+ if (value === '100%') {
+ this.top('0px');
+ }
+ return this;
+ };
+ /**
+ * Centers the overlay horizontally with an optional offset.
+ * Clears any previously set horizontal position.
+ *
+ * @param {?=} offset Overlay offset from the horizontal center.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.centerHorizontally = function (offset) {
+ if (offset === void 0) { offset = ''; }
+ this.left(offset);
+ this._justifyContent = 'center';
+ return this;
+ };
+ /**
+ * Centers the overlay vertically with an optional offset.
+ * Clears any previously set vertical position.
+ *
+ * @param {?=} offset Overlay offset from the vertical center.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.centerVertically = function (offset) {
+ if (offset === void 0) { offset = ''; }
+ this.top(offset);
+ this._alignItems = 'center';
+ return this;
+ };
+ /**
+ * Apply the position to the element.
+ * \@docs-private
+ *
+ * @return {?} Resolved when the styles have been applied.
+ */
+ GlobalPositionStrategy.prototype.apply = function () {
+ var /** @type {?} */ element = this._overlayRef.overlayElement;
+ if (!this._wrapper && element.parentNode) {
+ this._wrapper = document.createElement('div');
+ this._wrapper.classList.add('cdk-global-overlay-wrapper');
+ element.parentNode.insertBefore(this._wrapper, element);
+ this._wrapper.appendChild(element);
+ }
+ var /** @type {?} */ styles = element.style;
+ var /** @type {?} */ parentStyles = ((element.parentNode)).style;
+ styles.position = this._cssPosition;
+ styles.marginTop = this._topOffset;
+ styles.marginLeft = this._leftOffset;
+ styles.marginBottom = this._bottomOffset;
+ styles.marginRight = this._rightOffset;
+ styles.width = this._width;
+ styles.height = this._height;
+ parentStyles.justifyContent = this._justifyContent;
+ parentStyles.alignItems = this._alignItems;
+ };
+ /**
+ * Removes the wrapper element from the DOM.
+ * @return {?}
+ */
+ GlobalPositionStrategy.prototype.dispose = function () {
+ if (this._wrapper && this._wrapper.parentNode) {
+ this._wrapper.parentNode.removeChild(this._wrapper);
+ this._wrapper = null;
+ }
+ };
+ return GlobalPositionStrategy;
+}());
+
+/**
+ * Builder for overlay position strategy.
+ */
+var OverlayPositionBuilder = (function () {
+ /**
+ * @param {?} _viewportRuler
+ */
+ function OverlayPositionBuilder(_viewportRuler) {
+ this._viewportRuler = _viewportRuler;
+ }
+ /**
+ * Creates a global position strategy.
+ * @return {?}
+ */
+ OverlayPositionBuilder.prototype.global = function () {
+ return new GlobalPositionStrategy();
+ };
+ /**
+ * Creates a relative position strategy.
+ * @param {?} elementRef
+ * @param {?} originPos
+ * @param {?} overlayPos
+ * @return {?}
+ */
+ OverlayPositionBuilder.prototype.connectedTo = function (elementRef, originPos, overlayPos) {
+ return new ConnectedPositionStrategy(originPos, overlayPos, elementRef, this._viewportRuler);
+ };
+ OverlayPositionBuilder.decorators = [
+ { type: Injectable },
+ ];
+ /**
+ * @nocollapse
+ */
+ OverlayPositionBuilder.ctorParameters = function () { return [
+ { type: ViewportRuler, },
+ ]; };
+ return OverlayPositionBuilder;
+}());
+
+/**
+ * The OverlayContainer is the container in which all overlays will load.
+ * It should be provided in the root component to ensure it is properly shared.
+ */
+var OverlayContainer = (function () {
+ function OverlayContainer() {
+ }
+ /**
+ * @return {?}
+ */
+ OverlayContainer.prototype.ngOnDestroy = function () {
+ if (this._containerElement && this._containerElement.parentNode) {
+ this._containerElement.parentNode.removeChild(this._containerElement);
+ }
+ };
+ /**
+ * This method returns the overlay container element. It will lazily
+ * create the element the first time it is called to facilitate using
+ * the container in non-browser environments.
+ * @return {?} the container element
+ */
+ OverlayContainer.prototype.getContainerElement = function () {
+ if (!this._containerElement) {
+ this._createContainer();
+ }
+ return this._containerElement;
+ };
+ /**
+ * Create the overlay container element, which is simply a div
+ * with the 'cdk-overlay-container' class on the document body.
+ * @return {?}
+ */
+ OverlayContainer.prototype._createContainer = function () {
+ var /** @type {?} */ container = document.createElement('div');
+ container.classList.add('cdk-overlay-container');
+ document.body.appendChild(container);
+ this._containerElement = container;
+ };
+ OverlayContainer.decorators = [
+ { type: Injectable },
+ ];
+ /**
+ * @nocollapse
+ */
+ OverlayContainer.ctorParameters = function () { return []; };
+ return OverlayContainer;
+}());
+/**
+ * \@docs-private
+ * @param {?} parentContainer
+ * @return {?}
+ */
+function OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer) {
+ return parentContainer || new OverlayContainer();
+}
+/**
+ * \@docs-private
+ */
+var OVERLAY_CONTAINER_PROVIDER = {
+ // If there is already an OverlayContainer available, use that. Otherwise, provide a new one.
+ provide: OverlayContainer,
+ deps: [[new Optional(), new SkipSelf(), OverlayContainer]],
+ useFactory: OVERLAY_CONTAINER_PROVIDER_FACTORY
+};
+
+/**
+ * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.
+ * @return {?}
+ */
+function getMatScrollStrategyAlreadyAttachedError() {
+ return Error("Scroll strategy has already been attached.");
+}
+
+/**
+ * Strategy that will close the overlay as soon as the user starts scrolling.
+ */
+var CloseScrollStrategy = (function () {
+ /**
+ * @param {?} _scrollDispatcher
+ */
+ function CloseScrollStrategy(_scrollDispatcher) {
+ this._scrollDispatcher = _scrollDispatcher;
+ this._scrollSubscription = null;
+ }
+ /**
+ * @param {?} overlayRef
+ * @return {?}
+ */
+ CloseScrollStrategy.prototype.attach = function (overlayRef) {
+ if (this._overlayRef) {
+ throw getMatScrollStrategyAlreadyAttachedError();
+ }
+ this._overlayRef = overlayRef;
+ };
+ /**
+ * @return {?}
+ */
+ CloseScrollStrategy.prototype.enable = function () {
+ var _this = this;
+ if (!this._scrollSubscription) {
+ this._scrollSubscription = this._scrollDispatcher.scrolled(0, function () {
+ if (_this._overlayRef.hasAttached()) {
+ _this._overlayRef.detach();
+ }
+ _this.disable();
+ });
+ }
+ };
+ /**
+ * @return {?}
+ */
+ CloseScrollStrategy.prototype.disable = function () {
+ if (this._scrollSubscription) {
+ this._scrollSubscription.unsubscribe();
+ this._scrollSubscription = null;
+ }
+ };
+ return CloseScrollStrategy;
+}());
+
+/**
+ * Strategy that will prevent the user from scrolling while the overlay is visible.
+ */
+var BlockScrollStrategy = (function () {
+ /**
+ * @param {?} _viewportRuler
+ */
+ function BlockScrollStrategy(_viewportRuler) {
+ this._viewportRuler = _viewportRuler;
+ this._previousHTMLStyles = { top: '', left: '' };
+ this._isEnabled = false;
+ }
+ /**
+ * @return {?}
+ */
+ BlockScrollStrategy.prototype.attach = function () { };
+ /**
+ * @return {?}
+ */
+ BlockScrollStrategy.prototype.enable = function () {
+ if (this._canBeEnabled()) {
+ var /** @type {?} */ root = document.documentElement;
+ this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();
+ // Cache the previous inline styles in case the user had set them.
+ this._previousHTMLStyles.left = root.style.left || '';
+ this._previousHTMLStyles.top = root.style.top || '';
+ // Note: we're using the `html` node, instead of the `body`, because the `body` may
+ // have the user agent margin, whereas the `html` is guaranteed not to have one.
+ root.style.left = -this._previousScrollPosition.left + "px";
+ root.style.top = -this._previousScrollPosition.top + "px";
+ root.classList.add('cdk-global-scrollblock');
+ this._isEnabled = true;
+ }
+ };
+ /**
+ * @return {?}
+ */
+ BlockScrollStrategy.prototype.disable = function () {
+ if (this._isEnabled) {
+ this._isEnabled = false;
+ document.documentElement.style.left = this._previousHTMLStyles.left;
+ document.documentElement.style.top = this._previousHTMLStyles.top;
+ document.documentElement.classList.remove('cdk-global-scrollblock');
+ window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);
+ }
+ };
+ /**
+ * @return {?}
+ */
+ BlockScrollStrategy.prototype._canBeEnabled = function () {
+ // Since the scroll strategies can't be singletons, we have to use a global CSS class
+ // (`cdk-global-scrollblock`) to make sure that we don't try to disable global
+ // scrolling multiple times.
+ if (document.documentElement.classList.contains('cdk-global-scrollblock') || this._isEnabled) {
+ return false;
+ }
+ var /** @type {?} */ body = document.body;
+ var /** @type {?} */ viewport = this._viewportRuler.getViewportRect();
+ return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;
+ };
+ return BlockScrollStrategy;
+}());
+
+/**
+ * Strategy that will update the element position as the user is scrolling.
+ */
+var RepositionScrollStrategy = (function () {
+ /**
+ * @param {?} _scrollDispatcher
+ * @param {?=} _config
+ */
+ function RepositionScrollStrategy(_scrollDispatcher, _config) {
+ this._scrollDispatcher = _scrollDispatcher;
+ this._config = _config;
+ this._scrollSubscription = null;
+ }
+ /**
+ * @param {?} overlayRef
+ * @return {?}
+ */
+ RepositionScrollStrategy.prototype.attach = function (overlayRef) {
+ if (this._overlayRef) {
+ throw getMatScrollStrategyAlreadyAttachedError();
+ }
+ this._overlayRef = overlayRef;
+ };
+ /**
+ * @return {?}
+ */
+ RepositionScrollStrategy.prototype.enable = function () {
+ var _this = this;
+ if (!this._scrollSubscription) {
+ var /** @type {?} */ throttle = this._config ? this._config.scrollThrottle : 0;
+ this._scrollSubscription = this._scrollDispatcher.scrolled(throttle, function () {
+ _this._overlayRef.updatePosition();
+ });
+ }
+ };
+ /**
+ * @return {?}
+ */
+ RepositionScrollStrategy.prototype.disable = function () {
+ if (this._scrollSubscription) {
+ this._scrollSubscription.unsubscribe();
+ this._scrollSubscription = null;
+ }
+ };
+ return RepositionScrollStrategy;
+}());
+
+/**
+ * Options for how an overlay will handle scrolling.
+ *
+ * Users can provide a custom value for `ScrollStrategyOptions` to replace the default
+ * behaviors. This class primarily acts as a factory for ScrollStrategy instances.
+ */
+var ScrollStrategyOptions = (function () {
+ /**
+ * @param {?} _scrollDispatcher
+ * @param {?} _viewportRuler
+ */
+ function ScrollStrategyOptions(_scrollDispatcher, _viewportRuler) {
+ var _this = this;
+ this._scrollDispatcher = _scrollDispatcher;
+ this._viewportRuler = _viewportRuler;
+ /**
+ * Do nothing on scroll.
+ */
+ this.noop = function () { return new NoopScrollStrategy(); };
+ /**
+ * Close the overlay as soon as the user scrolls.
+ */
+ this.close = function () { return new CloseScrollStrategy(_this._scrollDispatcher); };
+ /**
+ * Block scrolling.
+ */
+ this.block = function () { return new BlockScrollStrategy(_this._viewportRuler); };
+ /**
+ * Update the overlay's position on scroll.
+ * @param config Configuration to be used inside the scroll strategy.
+ * Allows debouncing the reposition calls.
+ */
+ this.reposition = function (config) {
+ return new RepositionScrollStrategy(_this._scrollDispatcher, config);
+ };
+ }
+ ScrollStrategyOptions.decorators = [
+ { type: Injectable },
+ ];
+ /**
+ * @nocollapse
+ */
+ ScrollStrategyOptions.ctorParameters = function () { return [
+ { type: ScrollDispatcher, },
+ { type: ViewportRuler, },
+ ]; };
+ return ScrollStrategyOptions;
+}());
+
+/**
+ * Next overlay unique ID.
+ */
+var nextUniqueId = 0;
+/**
+ * The default config for newly created overlays.
+ */
+var defaultConfig = new OverlayConfig();
+/**
+ * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
+ * used as a low-level building building block for other components. Dialogs, tooltips, menus,
+ * selects, etc. can all be built using overlays. The service should primarily be used by authors
+ * of re-usable components rather than developers building end-user applications.
+ *
+ * An overlay *is* a PortalHost, so any kind of Portal can be loaded into one.
+ */
+var Overlay = (function () {
+ /**
+ * @param {?} scrollStrategies
+ * @param {?} _overlayContainer
+ * @param {?} _componentFactoryResolver
+ * @param {?} _positionBuilder
+ * @param {?} _appRef
+ * @param {?} _injector
+ * @param {?} _ngZone
+ */
+ function Overlay(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _appRef, _injector, _ngZone) {
+ this.scrollStrategies = scrollStrategies;
+ this._overlayContainer = _overlayContainer;
+ this._componentFactoryResolver = _componentFactoryResolver;
+ this._positionBuilder = _positionBuilder;
+ this._appRef = _appRef;
+ this._injector = _injector;
+ this._ngZone = _ngZone;
+ }
+ /**
+ * Creates an overlay.
+ * @param {?=} config Config to apply to the overlay.
+ * @return {?} Reference to the created overlay.
+ */
+ Overlay.prototype.create = function (config) {
+ if (config === void 0) { config = defaultConfig; }
+ var /** @type {?} */ pane = this._createPaneElement();
+ var /** @type {?} */ portalHost = this._createPortalHost(pane);
+ return new OverlayRef(portalHost, pane, config, this._ngZone);
+ };
+ /**
+ * Returns a position builder that can be used, via fluent API,
+ * to construct and configure a position strategy.
+ * @return {?}
+ */
+ Overlay.prototype.position = function () {
+ return this._positionBuilder;
+ };
+ /**
+ * Creates the DOM element for an overlay and appends it to the overlay container.
+ * @return {?} Newly-created pane element
+ */
+ Overlay.prototype._createPaneElement = function () {
+ var /** @type {?} */ pane = document.createElement('div');
+ pane.id = "cdk-overlay-" + nextUniqueId++;
+ pane.classList.add('cdk-overlay-pane');
+ this._overlayContainer.getContainerElement().appendChild(pane);
+ return pane;
+ };
+ /**
+ * Create a DomPortalHost into which the overlay content can be loaded.
+ * @param {?} pane The DOM element to turn into a portal host.
+ * @return {?} A portal host for the given DOM element.
+ */
+ Overlay.prototype._createPortalHost = function (pane) {
+ return new DomPortalHost(pane, this._componentFactoryResolver, this._appRef, this._injector);
+ };
+ Overlay.decorators = [
+ { type: Injectable },
+ ];
+ /**
+ * @nocollapse
+ */
+ Overlay.ctorParameters = function () { return [
+ { type: ScrollStrategyOptions, },
+ { type: OverlayContainer, },
+ { type: ComponentFactoryResolver, },
+ { type: OverlayPositionBuilder, },
+ { type: ApplicationRef, },
+ { type: Injector, },
+ { type: NgZone, },
+ ]; };
+ return Overlay;
+}());
+
+/**
+ * The FullscreenOverlayContainer is the alternative to OverlayContainer
+ * that supports correct displaying of overlay elements in Fullscreen mode
+ * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
+ * It should be provided in the root component that way:
+ * providers: [
+ * {provide: OverlayContainer, useClass: FullscreenOverlayContainer}
+ * ],
+ */
+var FullscreenOverlayContainer = (function (_super) {
+ __extends(FullscreenOverlayContainer, _super);
+ function FullscreenOverlayContainer() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ /**
+ * @return {?}
+ */
+ FullscreenOverlayContainer.prototype._createContainer = function () {
+ var _this = this;
+ _super.prototype._createContainer.call(this);
+ this._adjustParentForFullscreenChange();
+ this._addFullscreenChangeListener(function () { return _this._adjustParentForFullscreenChange(); });
+ };
+ /**
+ * @return {?}
+ */
+ FullscreenOverlayContainer.prototype._adjustParentForFullscreenChange = function () {
+ if (!this._containerElement) {
+ return;
+ }
+ var /** @type {?} */ fullscreenElement = this.getFullscreenElement();
+ var /** @type {?} */ parent = fullscreenElement || document.body;
+ parent.appendChild(this._containerElement);
+ };
+ /**
+ * @param {?} fn
+ * @return {?}
+ */
+ FullscreenOverlayContainer.prototype._addFullscreenChangeListener = function (fn) {
+ if (document.fullscreenEnabled) {
+ document.addEventListener('fullscreenchange', fn);
+ }
+ else if (document.webkitFullscreenEnabled) {
+ document.addEventListener('webkitfullscreenchange', fn);
+ }
+ else if (((document)).mozFullScreenEnabled) {
+ document.addEventListener('mozfullscreenchange', fn);
+ }
+ else if (((document)).msFullscreenEnabled) {
+ document.addEventListener('MSFullscreenChange', fn);
+ }
+ };
+ /**
+ * When the page is put into fullscreen mode, a specific element is specified.
+ * Only that element and its children are visible when in fullscreen mode.
+ * @return {?}
+ */
+ FullscreenOverlayContainer.prototype.getFullscreenElement = function () {
+ return document.fullscreenElement ||
+ document.webkitFullscreenElement ||
+ ((document)).mozFullScreenElement ||
+ ((document)).msFullscreenElement ||
+ null;
+ };
+ FullscreenOverlayContainer.decorators = [
+ { type: Injectable },
+ ];
+ /**
+ * @nocollapse
+ */
+ FullscreenOverlayContainer.ctorParameters = function () { return []; };
+ return FullscreenOverlayContainer;
+}(OverlayContainer));
+
+/**
+ * Default set of positions for the overlay. Follows the behavior of a dropdown.
+ */
+var defaultPositionList = [
+ new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
+ new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
+];
+/**
+ * Injection token that determines the scroll handling while the connected overlay is open.
+ */
+var MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('mat-connected-overlay-scroll-strategy');
+/**
+ * \@docs-private
+ * @param {?} overlay
+ * @return {?}
+ */
+function MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
+ return function () { return overlay.scrollStrategies.reposition(); };
+}
+/**
+ * \@docs-private
+ */
+var MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
+ provide: MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY,
+ deps: [Overlay],
+ useFactory: MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
+};
+/**
+ * Directive applied to an element to make it usable as an origin for an Overlay using a
+ * ConnectedPositionStrategy.
+ */
+var OverlayOrigin = (function () {
+ /**
+ * @param {?} elementRef
+ */
+ function OverlayOrigin(elementRef) {
+ this.elementRef = elementRef;
+ }
+ OverlayOrigin.decorators = [
+ { type: Directive, args: [{
+ selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
+ exportAs: 'cdkOverlayOrigin',
+ },] },
+ ];
+ /**
+ * @nocollapse
+ */
+ OverlayOrigin.ctorParameters = function () { return [
+ { type: ElementRef, },
+ ]; };
+ return OverlayOrigin;
+}());
+/**
+ * Directive to facilitate declarative creation of an Overlay using a ConnectedPositionStrategy.
+ */
+var ConnectedOverlayDirective = (function () {
+ /**
+ * @param {?} _overlay
+ * @param {?} _renderer
+ * @param {?} templateRef
+ * @param {?} viewContainerRef
+ * @param {?} _scrollStrategy
+ * @param {?} _dir
+ */
+ function ConnectedOverlayDirective(_overlay, _renderer, templateRef, viewContainerRef, _scrollStrategy, _dir) {
+ this._overlay = _overlay;
+ this._renderer = _renderer;
+ this._scrollStrategy = _scrollStrategy;
+ this._dir = _dir;
+ this._hasBackdrop = false;
+ this._backdropSubscription = Subscription.EMPTY;
+ this._positionSubscription = Subscription.EMPTY;
+ this._offsetX = 0;
+ this._offsetY = 0;
+ this._escapeListener = function () { };
+ /**
+ * Strategy to be used when handling scroll events while the overlay is open.
+ */
+ this.scrollStrategy = this._scrollStrategy();
+ /**
+ * Whether the overlay is open.
+ */
+ this.open = false;
+ /**
+ * Event emitted when the backdrop is clicked.
+ */
+ this.backdropClick = new EventEmitter();
+ /**
+ * Event emitted when the position has changed.
+ */
+ this.positionChange = new EventEmitter();
+ /**
+ * Event emitted when the overlay has been attached.
+ */
+ this.attach = new EventEmitter();
+ /**
+ * Event emitted when the overlay has been detached.
+ */
+ this.detach = new EventEmitter();
+ this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);
+ }
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "offsetX", {
+ /**
+ * The offset in pixels for the overlay connection point on the x-axis
+ * @return {?}
+ */
+ get: function () { return this._offsetX; },
+ /**
+ * @param {?} offsetX
+ * @return {?}
+ */
+ set: function (offsetX) {
+ this._offsetX = offsetX;
+ if (this._position) {
+ this._position.withOffsetX(offsetX);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "offsetY", {
+ /**
+ * The offset in pixels for the overlay connection point on the y-axis
+ * @return {?}
+ */
+ get: function () { return this._offsetY; },
+ /**
+ * @param {?} offsetY
+ * @return {?}
+ */
+ set: function (offsetY) {
+ this._offsetY = offsetY;
+ if (this._position) {
+ this._position.withOffsetY(offsetY);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "hasBackdrop", {
+ /**
+ * Whether or not the overlay should attach a backdrop.
+ * @return {?}
+ */
+ get: function () { return this._hasBackdrop; },
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set: function (value) { this._hasBackdrop = coerceBooleanProperty(value); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedOrigin", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.origin; },
+ /**
+ * @param {?} _origin
+ * @return {?}
+ */
+ set: function (_origin) { this.origin = _origin; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedPositions", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.positions; },
+ /**
+ * @param {?} _positions
+ * @return {?}
+ */
+ set: function (_positions) { this.positions = _positions; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedOffsetX", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.offsetX; },
+ /**
+ * @param {?} _offsetX
+ * @return {?}
+ */
+ set: function (_offsetX) { this.offsetX = _offsetX; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedOffsetY", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.offsetY; },
+ /**
+ * @param {?} _offsetY
+ * @return {?}
+ */
+ set: function (_offsetY) { this.offsetY = _offsetY; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedWidth", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.width; },
+ /**
+ * @param {?} _width
+ * @return {?}
+ */
+ set: function (_width) { this.width = _width; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedHeight", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.height; },
+ /**
+ * @param {?} _height
+ * @return {?}
+ */
+ set: function (_height) { this.height = _height; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedMinWidth", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.minWidth; },
+ /**
+ * @param {?} _minWidth
+ * @return {?}
+ */
+ set: function (_minWidth) { this.minWidth = _minWidth; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedMinHeight", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.minHeight; },
+ /**
+ * @param {?} _minHeight
+ * @return {?}
+ */
+ set: function (_minHeight) { this.minHeight = _minHeight; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedBackdropClass", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.backdropClass; },
+ /**
+ * @param {?} _backdropClass
+ * @return {?}
+ */
+ set: function (_backdropClass) { this.backdropClass = _backdropClass; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedScrollStrategy", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.scrollStrategy; },
+ /**
+ * @param {?} _scrollStrategy
+ * @return {?}
+ */
+ set: function (_scrollStrategy) {
+ this.scrollStrategy = _scrollStrategy;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedOpen", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.open; },
+ /**
+ * @param {?} _open
+ * @return {?}
+ */
+ set: function (_open) { this.open = _open; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "_deprecatedHasBackdrop", {
+ /**
+ * @deprecated
+ * @return {?}
+ */
+ get: function () { return this.hasBackdrop; },
+ /**
+ * @param {?} _hasBackdrop
+ * @return {?}
+ */
+ set: function (_hasBackdrop) { this.hasBackdrop = _hasBackdrop; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "overlayRef", {
+ /**
+ * The associated overlay reference.
+ * @return {?}
+ */
+ get: function () {
+ return this._overlayRef;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ConnectedOverlayDirective.prototype, "dir", {
+ /**
+ * The element's layout direction.
+ * @return {?}
+ */
+ get: function () {
+ return this._dir ? this._dir.value : 'ltr';
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype.ngOnDestroy = function () {
+ this._destroyOverlay();
+ };
+ /**
+ * @param {?} changes
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype.ngOnChanges = function (changes) {
+ if (changes['open'] || changes['_deprecatedOpen']) {
+ this.open ? this._attachOverlay() : this._detachOverlay();
+ }
+ };
+ /**
+ * Creates an overlay
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._createOverlay = function () {
+ if (!this.positions || !this.positions.length) {
+ this.positions = defaultPositionList;
+ }
+ this._overlayRef = this._overlay.create(this._buildConfig());
+ };
+ /**
+ * Builds the overlay config based on the directive's inputs
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._buildConfig = function () {
+ var /** @type {?} */ positionStrategy = this._position = this._createPositionStrategy();
+ var /** @type {?} */ overlayConfig = new OverlayConfig({
+ positionStrategy: positionStrategy,
+ scrollStrategy: this.scrollStrategy,
+ hasBackdrop: this.hasBackdrop
+ });
+ if (this.width || this.width === 0) {
+ overlayConfig.width = this.width;
+ }
+ if (this.height || this.height === 0) {
+ overlayConfig.height = this.height;
+ }
+ if (this.minWidth || this.minWidth === 0) {
+ overlayConfig.minWidth = this.minWidth;
+ }
+ if (this.minHeight || this.minHeight === 0) {
+ overlayConfig.minHeight = this.minHeight;
+ }
+ if (this.backdropClass) {
+ overlayConfig.backdropClass = this.backdropClass;
+ }
+ return overlayConfig;
+ };
+ /**
+ * Returns the position strategy of the overlay to be set on the overlay config
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._createPositionStrategy = function () {
+ var /** @type {?} */ pos = this.positions[0];
+ var /** @type {?} */ originPoint = { originX: pos.originX, originY: pos.originY };
+ var /** @type {?} */ overlayPoint = { overlayX: pos.overlayX, overlayY: pos.overlayY };
+ var /** @type {?} */ strategy = this._overlay.position()
+ .connectedTo(this.origin.elementRef, originPoint, overlayPoint)
+ .withOffsetX(this.offsetX)
+ .withOffsetY(this.offsetY);
+ this._handlePositionChanges(strategy);
+ return strategy;
+ };
+ /**
+ * @param {?} strategy
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._handlePositionChanges = function (strategy) {
+ var _this = this;
+ for (var /** @type {?} */ i = 1; i < this.positions.length; i++) {
+ strategy.withFallbackPosition({ originX: this.positions[i].originX, originY: this.positions[i].originY }, { overlayX: this.positions[i].overlayX, overlayY: this.positions[i].overlayY });
+ }
+ this._positionSubscription =
+ strategy.onPositionChange.subscribe(function (pos) { return _this.positionChange.emit(pos); });
+ };
+ /**
+ * Attaches the overlay and subscribes to backdrop clicks if backdrop exists
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._attachOverlay = function () {
+ var _this = this;
+ if (!this._overlayRef) {
+ this._createOverlay();
+ }
+ this._position.withDirection(this.dir);
+ this._overlayRef.getConfig().direction = this.dir;
+ this._initEscapeListener();
+ if (!this._overlayRef.hasAttached()) {
+ this._overlayRef.attach(this._templatePortal);
+ this.attach.emit();
+ }
+ if (this.hasBackdrop) {
+ this._backdropSubscription = this._overlayRef.backdropClick().subscribe(function () {
+ _this.backdropClick.emit();
+ });
+ }
+ };
+ /**
+ * Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._detachOverlay = function () {
+ if (this._overlayRef) {
+ this._overlayRef.detach();
+ this.detach.emit();
+ }
+ this._backdropSubscription.unsubscribe();
+ this._escapeListener();
+ };
+ /**
+ * Destroys the overlay created by this directive.
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._destroyOverlay = function () {
+ if (this._overlayRef) {
+ this._overlayRef.dispose();
+ }
+ this._backdropSubscription.unsubscribe();
+ this._positionSubscription.unsubscribe();
+ this._escapeListener();
+ };
+ /**
+ * Sets the event listener that closes the overlay when pressing Escape.
+ * @return {?}
+ */
+ ConnectedOverlayDirective.prototype._initEscapeListener = function () {
+ var _this = this;
+ this._escapeListener = this._renderer.listen('document', 'keydown', function (event) {
+ if (event.keyCode === ESCAPE) {
+ _this._detachOverlay();
+ }
+ });
+ };
+ ConnectedOverlayDirective.decorators = [
+ { type: Directive, args: [{
+ selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
+ exportAs: 'cdkConnectedOverlay'
+ },] },
+ ];
+ /**
+ * @nocollapse
+ */
+ ConnectedOverlayDirective.ctorParameters = function () { return [
+ { type: Overlay, },
+ { type: Renderer2, },
+ { type: TemplateRef, },
+ { type: ViewContainerRef, },
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY,] },] },
+ { type: Directionality, decorators: [{ type: Optional },] },
+ ]; };
+ ConnectedOverlayDirective.propDecorators = {
+ 'origin': [{ type: Input, args: ['cdkConnectedOverlayOrigin',] },],
+ 'positions': [{ type: Input, args: ['cdkConnectedOverlayPositions',] },],
+ 'offsetX': [{ type: Input, args: ['cdkConnectedOverlayOffsetX',] },],
+ 'offsetY': [{ type: Input, args: ['cdkConnectedOverlayOffsetY',] },],
+ 'width': [{ type: Input, args: ['cdkConnectedOverlayWidth',] },],
+ 'height': [{ type: Input, args: ['cdkConnectedOverlayHeight',] },],
+ 'minWidth': [{ type: Input, args: ['cdkConnectedOverlayMinWidth',] },],
+ 'minHeight': [{ type: Input, args: ['cdkConnectedOverlayMinHeight',] },],
+ 'backdropClass': [{ type: Input, args: ['cdkConnectedOverlayBackdropClass',] },],
+ 'scrollStrategy': [{ type: Input, args: ['cdkConnectedOverlayScrollStrategy',] },],
+ 'open': [{ type: Input, args: ['cdkConnectedOverlayOpen',] },],
+ 'hasBackdrop': [{ type: Input, args: ['cdkConnectedOverlayHasBackdrop',] },],
+ '_deprecatedOrigin': [{ type: Input, args: ['origin',] },],
+ '_deprecatedPositions': [{ type: Input, args: ['positions',] },],
+ '_deprecatedOffsetX': [{ type: Input, args: ['offsetX',] },],
+ '_deprecatedOffsetY': [{ type: Input, args: ['offsetY',] },],
+ '_deprecatedWidth': [{ type: Input, args: ['width',] },],
+ '_deprecatedHeight': [{ type: Input, args: ['height',] },],
+ '_deprecatedMinWidth': [{ type: Input, args: ['minWidth',] },],
+ '_deprecatedMinHeight': [{ type: Input, args: ['minHeight',] },],
+ '_deprecatedBackdropClass': [{ type: Input, args: ['backdropClass',] },],
+ '_deprecatedScrollStrategy': [{ type: Input, args: ['scrollStrategy',] },],
+ '_deprecatedOpen': [{ type: Input, args: ['open',] },],
+ '_deprecatedHasBackdrop': [{ type: Input, args: ['hasBackdrop',] },],
+ 'backdropClick': [{ type: Output },],
+ 'positionChange': [{ type: Output },],
+ 'attach': [{ type: Output },],
+ 'detach': [{ type: Output },],
+ };
+ return ConnectedOverlayDirective;
+}());
+
+var OVERLAY_PROVIDERS = [
+ Overlay,
+ OverlayPositionBuilder,
+ VIEWPORT_RULER_PROVIDER,
+ OVERLAY_CONTAINER_PROVIDER,
+ MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,
+];
+var OverlayModule = (function () {
+ function OverlayModule() {
+ }
+ OverlayModule.decorators = [
+ { type: NgModule, args: [{
+ imports: [PortalModule, ScrollDispatchModule],
+ exports: [ConnectedOverlayDirective, OverlayOrigin, ScrollDispatchModule],
+ declarations: [ConnectedOverlayDirective, OverlayOrigin],
+ providers: [OVERLAY_PROVIDERS, ScrollStrategyOptions],
+ },] },
+ ];
+ /**
+ * @nocollapse
+ */
+ OverlayModule.ctorParameters = function () { return []; };
+ return OverlayModule;
+}());
+
+/**
+ * Generated bundle index. Do not edit.
+ */
+
+export { Overlay, OverlayContainer, FullscreenOverlayContainer, OverlayRef, ConnectedOverlayDirective, OverlayOrigin, ViewportRuler, GlobalPositionStrategy, ConnectedPositionStrategy, VIEWPORT_RULER_PROVIDER, OverlayConfig, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, Scrollable, ScrollDispatcher, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OVERLAY_PROVIDERS, OverlayModule, OVERLAY_CONTAINER_PROVIDER as ɵb, OVERLAY_CONTAINER_PROVIDER_FACTORY as ɵa, MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵc, MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵe, MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵd, OverlayPositionBuilder as ɵf };
+//# sourceMappingURL=overlay.es5.js.map