1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { ComponentFactoryResolver, Directive, EventEmitter, NgModule, Output, TemplateRef, ViewContainerRef, Inject, } from '@angular/core';
|
---|
9 | import { DOCUMENT } from '@angular/common';
|
---|
10 | import { BasePortalOutlet, TemplatePortal } from './portal';
|
---|
11 | /**
|
---|
12 | * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
|
---|
13 | * the directive instance itself can be attached to a host, enabling declarative use of portals.
|
---|
14 | */
|
---|
15 | export class CdkPortal extends TemplatePortal {
|
---|
16 | constructor(templateRef, viewContainerRef) {
|
---|
17 | super(templateRef, viewContainerRef);
|
---|
18 | }
|
---|
19 | }
|
---|
20 | CdkPortal.decorators = [
|
---|
21 | { type: Directive, args: [{
|
---|
22 | selector: '[cdkPortal]',
|
---|
23 | exportAs: 'cdkPortal',
|
---|
24 | },] }
|
---|
25 | ];
|
---|
26 | CdkPortal.ctorParameters = () => [
|
---|
27 | { type: TemplateRef },
|
---|
28 | { type: ViewContainerRef }
|
---|
29 | ];
|
---|
30 | /**
|
---|
31 | * @deprecated Use `CdkPortal` instead.
|
---|
32 | * @breaking-change 9.0.0
|
---|
33 | */
|
---|
34 | export class TemplatePortalDirective extends CdkPortal {
|
---|
35 | }
|
---|
36 | TemplatePortalDirective.decorators = [
|
---|
37 | { type: Directive, args: [{
|
---|
38 | selector: '[cdk-portal], [portal]',
|
---|
39 | exportAs: 'cdkPortal',
|
---|
40 | providers: [{
|
---|
41 | provide: CdkPortal,
|
---|
42 | useExisting: TemplatePortalDirective
|
---|
43 | }]
|
---|
44 | },] }
|
---|
45 | ];
|
---|
46 | /**
|
---|
47 | * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
|
---|
48 | * directly attached to it, enabling declarative use.
|
---|
49 | *
|
---|
50 | * Usage:
|
---|
51 | * `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
|
---|
52 | */
|
---|
53 | export class CdkPortalOutlet extends BasePortalOutlet {
|
---|
54 | constructor(_componentFactoryResolver, _viewContainerRef,
|
---|
55 | /**
|
---|
56 | * @deprecated `_document` parameter to be made required.
|
---|
57 | * @breaking-change 9.0.0
|
---|
58 | */
|
---|
59 | _document) {
|
---|
60 | super();
|
---|
61 | this._componentFactoryResolver = _componentFactoryResolver;
|
---|
62 | this._viewContainerRef = _viewContainerRef;
|
---|
63 | /** Whether the portal component is initialized. */
|
---|
64 | this._isInitialized = false;
|
---|
65 | /** Emits when a portal is attached to the outlet. */
|
---|
66 | this.attached = new EventEmitter();
|
---|
67 | /**
|
---|
68 | * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.
|
---|
69 | * @param portal Portal to be attached.
|
---|
70 | * @deprecated To be turned into a method.
|
---|
71 | * @breaking-change 10.0.0
|
---|
72 | */
|
---|
73 | this.attachDomPortal = (portal) => {
|
---|
74 | // @breaking-change 9.0.0 Remove check and error once the
|
---|
75 | // `_document` constructor parameter is required.
|
---|
76 | if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
---|
77 | throw Error('Cannot attach DOM portal without _document constructor parameter');
|
---|
78 | }
|
---|
79 | const element = portal.element;
|
---|
80 | if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
---|
81 | throw Error('DOM portal content must be attached to a parent node.');
|
---|
82 | }
|
---|
83 | // Anchor used to save the element's previous position so
|
---|
84 | // that we can restore it when the portal is detached.
|
---|
85 | const anchorNode = this._document.createComment('dom-portal');
|
---|
86 | portal.setAttachedHost(this);
|
---|
87 | element.parentNode.insertBefore(anchorNode, element);
|
---|
88 | this._getRootNode().appendChild(element);
|
---|
89 | this._attachedPortal = portal;
|
---|
90 | super.setDisposeFn(() => {
|
---|
91 | if (anchorNode.parentNode) {
|
---|
92 | anchorNode.parentNode.replaceChild(element, anchorNode);
|
---|
93 | }
|
---|
94 | });
|
---|
95 | };
|
---|
96 | this._document = _document;
|
---|
97 | }
|
---|
98 | /** Portal associated with the Portal outlet. */
|
---|
99 | get portal() {
|
---|
100 | return this._attachedPortal;
|
---|
101 | }
|
---|
102 | set portal(portal) {
|
---|
103 | // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have
|
---|
104 | // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`
|
---|
105 | // and attach a portal programmatically in the parent component. When Angular does the first CD
|
---|
106 | // round, it will fire the setter with empty string, causing the user's content to be cleared.
|
---|
107 | if (this.hasAttached() && !portal && !this._isInitialized) {
|
---|
108 | return;
|
---|
109 | }
|
---|
110 | if (this.hasAttached()) {
|
---|
111 | super.detach();
|
---|
112 | }
|
---|
113 | if (portal) {
|
---|
114 | super.attach(portal);
|
---|
115 | }
|
---|
116 | this._attachedPortal = portal;
|
---|
117 | }
|
---|
118 | /** Component or view reference that is attached to the portal. */
|
---|
119 | get attachedRef() {
|
---|
120 | return this._attachedRef;
|
---|
121 | }
|
---|
122 | ngOnInit() {
|
---|
123 | this._isInitialized = true;
|
---|
124 | }
|
---|
125 | ngOnDestroy() {
|
---|
126 | super.dispose();
|
---|
127 | this._attachedPortal = null;
|
---|
128 | this._attachedRef = null;
|
---|
129 | }
|
---|
130 | /**
|
---|
131 | * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
|
---|
132 | *
|
---|
133 | * @param portal Portal to be attached to the portal outlet.
|
---|
134 | * @returns Reference to the created component.
|
---|
135 | */
|
---|
136 | attachComponentPortal(portal) {
|
---|
137 | portal.setAttachedHost(this);
|
---|
138 | // If the portal specifies an origin, use that as the logical location of the component
|
---|
139 | // in the application tree. Otherwise use the location of this PortalOutlet.
|
---|
140 | const viewContainerRef = portal.viewContainerRef != null ?
|
---|
141 | portal.viewContainerRef :
|
---|
142 | this._viewContainerRef;
|
---|
143 | const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;
|
---|
144 | const componentFactory = resolver.resolveComponentFactory(portal.component);
|
---|
145 | const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);
|
---|
146 | // If we're using a view container that's different from the injected one (e.g. when the portal
|
---|
147 | // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered
|
---|
148 | // inside of the alternate view container.
|
---|
149 | if (viewContainerRef !== this._viewContainerRef) {
|
---|
150 | this._getRootNode().appendChild(ref.hostView.rootNodes[0]);
|
---|
151 | }
|
---|
152 | super.setDisposeFn(() => ref.destroy());
|
---|
153 | this._attachedPortal = portal;
|
---|
154 | this._attachedRef = ref;
|
---|
155 | this.attached.emit(ref);
|
---|
156 | return ref;
|
---|
157 | }
|
---|
158 | /**
|
---|
159 | * Attach the given TemplatePortal to this PortalHost as an embedded View.
|
---|
160 | * @param portal Portal to be attached.
|
---|
161 | * @returns Reference to the created embedded view.
|
---|
162 | */
|
---|
163 | attachTemplatePortal(portal) {
|
---|
164 | portal.setAttachedHost(this);
|
---|
165 | const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);
|
---|
166 | super.setDisposeFn(() => this._viewContainerRef.clear());
|
---|
167 | this._attachedPortal = portal;
|
---|
168 | this._attachedRef = viewRef;
|
---|
169 | this.attached.emit(viewRef);
|
---|
170 | return viewRef;
|
---|
171 | }
|
---|
172 | /** Gets the root node of the portal outlet. */
|
---|
173 | _getRootNode() {
|
---|
174 | const nativeElement = this._viewContainerRef.element.nativeElement;
|
---|
175 | // The directive could be set on a template which will result in a comment
|
---|
176 | // node being the root. Use the comment's parent node if that is the case.
|
---|
177 | return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?
|
---|
178 | nativeElement : nativeElement.parentNode);
|
---|
179 | }
|
---|
180 | }
|
---|
181 | CdkPortalOutlet.decorators = [
|
---|
182 | { type: Directive, args: [{
|
---|
183 | selector: '[cdkPortalOutlet]',
|
---|
184 | exportAs: 'cdkPortalOutlet',
|
---|
185 | inputs: ['portal: cdkPortalOutlet']
|
---|
186 | },] }
|
---|
187 | ];
|
---|
188 | CdkPortalOutlet.ctorParameters = () => [
|
---|
189 | { type: ComponentFactoryResolver },
|
---|
190 | { type: ViewContainerRef },
|
---|
191 | { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
---|
192 | ];
|
---|
193 | CdkPortalOutlet.propDecorators = {
|
---|
194 | attached: [{ type: Output }]
|
---|
195 | };
|
---|
196 | /**
|
---|
197 | * @deprecated Use `CdkPortalOutlet` instead.
|
---|
198 | * @breaking-change 9.0.0
|
---|
199 | */
|
---|
200 | export class PortalHostDirective extends CdkPortalOutlet {
|
---|
201 | }
|
---|
202 | PortalHostDirective.decorators = [
|
---|
203 | { type: Directive, args: [{
|
---|
204 | selector: '[cdkPortalHost], [portalHost]',
|
---|
205 | exportAs: 'cdkPortalHost',
|
---|
206 | inputs: ['portal: cdkPortalHost'],
|
---|
207 | providers: [{
|
---|
208 | provide: CdkPortalOutlet,
|
---|
209 | useExisting: PortalHostDirective
|
---|
210 | }]
|
---|
211 | },] }
|
---|
212 | ];
|
---|
213 | export class PortalModule {
|
---|
214 | }
|
---|
215 | PortalModule.decorators = [
|
---|
216 | { type: NgModule, args: [{
|
---|
217 | exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
---|
218 | declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
---|
219 | },] }
|
---|
220 | ];
|
---|
221 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9ydGFsLWRpcmVjdGl2ZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvY2RrL3BvcnRhbC9wb3J0YWwtZGlyZWN0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQ0wsd0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