{"version":3,"file":"portal.js","sources":["../../packages/cdk/portal/portal-errors.js","../../packages/cdk/portal/portal.js","../../packages/cdk/portal/dom-portal-host.js","../../packages/cdk/portal/portal-directives.js","../../packages/cdk/portal/portal-injector.js","../../packages/cdk/portal/index.js"],"sourcesContent":["/**\n * Throws an exception when attempting to attach a null portal to a host.\n * \\@docs-private\n * @return {?}\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * \\@docs-private\n * @return {?}\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * \\@docs-private\n * @return {?}\n */\nexport function throwPortalHostAlreadyDisposedError() {\n throw Error('This PortalHost has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * \\@docs-private\n * @return {?}\n */\nexport function throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalHost accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * \\@docs-private\n * @return {?}\n */\nexport function throwNullPortalHostError() {\n throw Error('Attempting to attach a portal to a null PortalHost');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * \\@docs-privatew\n * @return {?}\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n//# sourceMappingURL=portal-errors.js.map","/**\n * @license\n * Copyright Google Inc. 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 */\nimport { throwNullPortalHostError, throwPortalAlreadyAttachedError, throwNoPortalAttachedError, throwNullPortalError, throwPortalHostAlreadyDisposedError, throwUnknownPortalTypeError } from './portal-errors';\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalHost`.\n * @abstract\n */\nexport class Portal {\n /**\n * Attach this portal to a host.\n * @param {?} host\n * @return {?}\n */\n attach(host) {\n if (host == null) {\n throwNullPortalHostError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n this._attachedHost = host;\n return (host.attach(this));\n }\n /**\n * Detach this portal from its host\n * @return {?}\n */\n detach() {\n let /** @type {?} */ host = this._attachedHost;\n if (host == null) {\n throwNoPortalAttachedError();\n }\n else {\n this._attachedHost = null;\n host.detach();\n }\n }\n /**\n * Whether this portal is attached to a host.\n * @return {?}\n */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalHost reference without performing `attach()`. This is used directly by\n * the PortalHost when it is performing an `attach()` or `detach()`.\n * @param {?} host\n * @return {?}\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\nfunction Portal_tsickle_Closure_declarations() {\n /** @type {?} */\n Portal.prototype._attachedHost;\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal extends Portal {\n /**\n * @param {?} component\n * @param {?=} viewContainerRef\n * @param {?=} injector\n */\n constructor(component, viewContainerRef, injector) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n }\n}\nfunction ComponentPortal_tsickle_Closure_declarations() {\n /**\n * The type of the component that will be instantiated for attachment.\n * @type {?}\n */\n ComponentPortal.prototype.component;\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalHost.\n * The origin is necessary when the host is outside of the Angular application context.\n * @type {?}\n */\n ComponentPortal.prototype.viewContainerRef;\n /**\n * [Optional] Injector used for the instantiation of the component.\n * @type {?}\n */\n ComponentPortal.prototype.injector;\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal extends Portal {\n /**\n * @param {?} template\n * @param {?} viewContainerRef\n * @param {?=} context\n */\n constructor(template, viewContainerRef, context) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n if (context) {\n this.context = context;\n }\n }\n /**\n * @return {?}\n */\n get origin() {\n return this.templateRef.elementRef;\n }\n /**\n * Attach the the portal to the provided `PortalHost`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n * @param {?} host\n * @param {?=} context\n * @return {?}\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n /**\n * @return {?}\n */\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\nfunction TemplatePortal_tsickle_Closure_declarations() {\n /**\n * The embedded template that will be used to instantiate an embedded View in the host.\n * @type {?}\n */\n TemplatePortal.prototype.templateRef;\n /**\n * Reference to the ViewContainer into which the template will be stamped out.\n * @type {?}\n */\n TemplatePortal.prototype.viewContainerRef;\n /** @type {?} */\n TemplatePortal.prototype.context;\n}\n/**\n * Partial implementation of PortalHost that only deals with attaching either a\n * ComponentPortal or a TemplatePortal.\n * @abstract\n */\nexport class BasePortalHost {\n constructor() {\n /**\n * Whether this host has already been permanently disposed.\n */\n this._isDisposed = false;\n }\n /**\n * Whether this host has an attached portal.\n * @return {?}\n */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /**\n * @param {?} portal\n * @return {?}\n */\n attach(portal) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalHostAlreadyDisposedError();\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n }\n else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n }\n throwUnknownPortalTypeError();\n }\n /**\n * @abstract\n * @template T\n * @param {?} portal\n * @return {?}\n */\n attachComponentPortal(portal) { }\n /**\n * @abstract\n * @template C\n * @param {?} portal\n * @return {?}\n */\n attachTemplatePortal(portal) { }\n /**\n * @return {?}\n */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /**\n * @return {?}\n */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /**\n * @param {?} fn\n * @return {?}\n */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n /**\n * @return {?}\n */\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\nfunction BasePortalHost_tsickle_Closure_declarations() {\n /**\n * The portal currently attached to the host.\n * @type {?}\n */\n BasePortalHost.prototype._attachedPortal;\n /**\n * A function that will permanently dispose this host.\n * @type {?}\n */\n BasePortalHost.prototype._disposeFn;\n /**\n * Whether this host has already been permanently disposed.\n * @type {?}\n */\n BasePortalHost.prototype._isDisposed;\n}\n//# sourceMappingURL=portal.js.map","/**\n * @license\n * Copyright Google Inc. 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 */\nimport { BasePortalHost } from './portal';\n/**\n * A PortalHost for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n *\n * This is the only part of the portal core that directly touches the DOM.\n */\nexport class DomPortalHost extends BasePortalHost {\n /**\n * @param {?} _hostDomElement\n * @param {?} _componentFactoryResolver\n * @param {?} _appRef\n * @param {?} _defaultInjector\n */\n constructor(_hostDomElement, _componentFactoryResolver, _appRef, _defaultInjector) {\n super();\n this._hostDomElement = _hostDomElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @template T\n * @param {?} portal Portal to be attached\n * @return {?}\n */\n attachComponentPortal(portal) {\n let /** @type {?} */ componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);\n let /** @type {?} */ componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.parentInjector);\n this.setDisposeFn(() => componentRef.destroy());\n }\n else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this._hostDomElement.appendChild(this._getComponentRootNode(componentRef));\n return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?}\n */\n attachTemplatePortal(portal) {\n let /** @type {?} */ viewContainer = portal.viewContainerRef;\n let /** @type {?} */ viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n viewRef.detectChanges();\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalHost the view can be added everywhere in the DOM (e.g Overlay Container)\n // To move the view to the specified host element. We just re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this._hostDomElement.appendChild(rootNode));\n this.setDisposeFn((() => {\n let /** @type {?} */ index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n }));\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n * @return {?}\n */\n dispose() {\n super.dispose();\n if (this._hostDomElement.parentNode != null) {\n this._hostDomElement.parentNode.removeChild(this._hostDomElement);\n }\n }\n /**\n * Gets the root HTMLElement for an instantiated component.\n * @param {?} componentRef\n * @return {?}\n */\n _getComponentRootNode(componentRef) {\n return (((componentRef.hostView)).rootNodes[0]);\n }\n}\nfunction DomPortalHost_tsickle_Closure_declarations() {\n /** @type {?} */\n DomPortalHost.prototype._hostDomElement;\n /** @type {?} */\n DomPortalHost.prototype._componentFactoryResolver;\n /** @type {?} */\n DomPortalHost.prototype._appRef;\n /** @type {?} */\n DomPortalHost.prototype._defaultInjector;\n}\n//# sourceMappingURL=dom-portal-host.js.map","/**\n * @license\n * Copyright Google Inc. 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 */\nimport { NgModule, Directive, TemplateRef, ComponentFactoryResolver, ViewContainerRef, Input, } from '@angular/core';\nimport { TemplatePortal, BasePortalHost } from './portal';\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n *\n * Usage:\n * \n *

Hello {{name}}

\n *
\n */\nexport class TemplatePortalDirective extends TemplatePortal {\n /**\n * @param {?} templateRef\n * @param {?} viewContainerRef\n */\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\nTemplatePortalDirective.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-portal], [cdkPortal], [portal]',\n exportAs: 'cdkPortal',\n },] },\n];\n/**\n * @nocollapse\n */\nTemplatePortalDirective.ctorParameters = () => [\n { type: TemplateRef, },\n { type: ViewContainerRef, },\n];\nfunction TemplatePortalDirective_tsickle_Closure_declarations() {\n /** @type {?} */\n TemplatePortalDirective.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n TemplatePortalDirective.ctorParameters;\n}\n/**\n * Directive version of a PortalHost. Because the directive *is* a PortalHost, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * \n */\nexport class PortalHostDirective extends BasePortalHost {\n /**\n * @param {?} _componentFactoryResolver\n * @param {?} _viewContainerRef\n */\n constructor(_componentFactoryResolver, _viewContainerRef) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /**\n * The attached portal.\n */\n this._portal = null;\n }\n /**\n * @deprecated\n * @return {?}\n */\n get _deprecatedPortal() { return this.portal; }\n /**\n * @param {?} v\n * @return {?}\n */\n set _deprecatedPortal(v) { this.portal = v; }\n /**\n * Portal associated with the Portal host.\n * @return {?}\n */\n get portal() {\n return this._portal;\n }\n /**\n * @param {?} portal\n * @return {?}\n */\n set portal(portal) {\n if (this.hasAttached()) {\n super.detach();\n }\n if (portal) {\n super.attach(portal);\n }\n this._portal = portal;\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n super.dispose();\n this._portal = null;\n }\n /**\n * Attach the given ComponentPortal to this PortalHost using the ComponentFactoryResolver.\n *\n * @template T\n * @param {?} portal Portal to be attached to the portal host.\n * @return {?}\n */\n attachComponentPortal(portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalHost.\n let /** @type {?} */ viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n let /** @type {?} */ componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);\n let /** @type {?} */ ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.parentInjector);\n super.setDisposeFn(() => ref.destroy());\n this._portal = portal;\n return ref;\n }\n /**\n * Attach the given TemplatePortal to this PortlHost as an embedded View.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?}\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n const /** @type {?} */ viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn(() => this._viewContainerRef.clear());\n this._portal = portal;\n return viewRef;\n }\n}\nPortalHostDirective.decorators = [\n { type: Directive, args: [{\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost']\n },] },\n];\n/**\n * @nocollapse\n */\nPortalHostDirective.ctorParameters = () => [\n { type: ComponentFactoryResolver, },\n { type: ViewContainerRef, },\n];\nPortalHostDirective.propDecorators = {\n '_deprecatedPortal': [{ type: Input, args: ['portalHost',] },],\n};\nfunction PortalHostDirective_tsickle_Closure_declarations() {\n /** @type {?} */\n PortalHostDirective.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n PortalHostDirective.ctorParameters;\n /** @type {?} */\n PortalHostDirective.propDecorators;\n /**\n * The attached portal.\n * @type {?}\n */\n PortalHostDirective.prototype._portal;\n /** @type {?} */\n PortalHostDirective.prototype._componentFactoryResolver;\n /** @type {?} */\n PortalHostDirective.prototype._viewContainerRef;\n}\nexport class PortalModule {\n}\nPortalModule.decorators = [\n { type: NgModule, args: [{\n exports: [TemplatePortalDirective, PortalHostDirective],\n declarations: [TemplatePortalDirective, PortalHostDirective],\n },] },\n];\n/**\n * @nocollapse\n */\nPortalModule.ctorParameters = () => [];\nfunction PortalModule_tsickle_Closure_declarations() {\n /** @type {?} */\n PortalModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n PortalModule.ctorParameters;\n}\n//# sourceMappingURL=portal-directives.js.map","/**\n * @license\n * Copyright Google Inc. 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/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * \\@docs-private\n */\nexport class PortalInjector {\n /**\n * @param {?} _parentInjector\n * @param {?} _customTokens\n */\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n /**\n * @param {?} token\n * @param {?=} notFoundValue\n * @return {?}\n */\n get(token, notFoundValue) {\n const /** @type {?} */ value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, notFoundValue);\n }\n}\nfunction PortalInjector_tsickle_Closure_declarations() {\n /** @type {?} */\n PortalInjector.prototype._parentInjector;\n /** @type {?} */\n PortalInjector.prototype._customTokens;\n}\n//# sourceMappingURL=portal-injector.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { Portal, ComponentPortal, TemplatePortal, BasePortalHost, DomPortalHost, TemplatePortalDirective, PortalHostDirective, PortalModule, PortalInjector } from './public-api';\n//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