source: trip-planner-front/node_modules/@angular/cdk/portal/portal-directives.d.ts@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 4.8 KB
Line 
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 */
8import { ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, EventEmitter, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
9import { BasePortalOutlet, ComponentPortal, Portal, TemplatePortal, DomPortal } from './portal';
10/**
11 * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
12 * the directive instance itself can be attached to a host, enabling declarative use of portals.
13 */
14import * as ɵngcc0 from '@angular/core';
15export declare class CdkPortal extends TemplatePortal {
16 constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
17 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkPortal, never>;
18 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkPortal, "[cdkPortal]", ["cdkPortal"], {}, {}, never>;
19}
20/**
21 * @deprecated Use `CdkPortal` instead.
22 * @breaking-change 9.0.0
23 */
24export declare class TemplatePortalDirective extends CdkPortal {
25 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<TemplatePortalDirective, never>;
26 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<TemplatePortalDirective, "[cdk-portal], [portal]", ["cdkPortal"], {}, {}, never>;
27}
28/**
29 * Possible attached references to the CdkPortalOutlet.
30 */
31export declare type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;
32/**
33 * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
34 * directly attached to it, enabling declarative use.
35 *
36 * Usage:
37 * `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
38 */
39export declare class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {
40 private _componentFactoryResolver;
41 private _viewContainerRef;
42 private _document;
43 /** Whether the portal component is initialized. */
44 private _isInitialized;
45 /** Reference to the currently-attached component/view ref. */
46 private _attachedRef;
47 constructor(_componentFactoryResolver: ComponentFactoryResolver, _viewContainerRef: ViewContainerRef,
48 /**
49 * @deprecated `_document` parameter to be made required.
50 * @breaking-change 9.0.0
51 */
52 _document?: any);
53 /** Portal associated with the Portal outlet. */
54 get portal(): Portal<any> | null;
55 set portal(portal: Portal<any> | null);
56 /** Emits when a portal is attached to the outlet. */
57 readonly attached: EventEmitter<CdkPortalOutletAttachedRef>;
58 /** Component or view reference that is attached to the portal. */
59 get attachedRef(): CdkPortalOutletAttachedRef;
60 ngOnInit(): void;
61 ngOnDestroy(): void;
62 /**
63 * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
64 *
65 * @param portal Portal to be attached to the portal outlet.
66 * @returns Reference to the created component.
67 */
68 attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
69 /**
70 * Attach the given TemplatePortal to this PortalHost as an embedded View.
71 * @param portal Portal to be attached.
72 * @returns Reference to the created embedded view.
73 */
74 attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
75 /**
76 * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.
77 * @param portal Portal to be attached.
78 * @deprecated To be turned into a method.
79 * @breaking-change 10.0.0
80 */
81 attachDomPortal: (portal: DomPortal) => void;
82 /** Gets the root node of the portal outlet. */
83 private _getRootNode;
84 static ngAcceptInputType_portal: Portal<any> | null | undefined | '';
85 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkPortalOutlet, never>;
86 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkPortalOutlet, "[cdkPortalOutlet]", ["cdkPortalOutlet"], { "portal": "cdkPortalOutlet"; }, { "attached": "attached"; }, never>;
87}
88/**
89 * @deprecated Use `CdkPortalOutlet` instead.
90 * @breaking-change 9.0.0
91 */
92export declare class PortalHostDirective extends CdkPortalOutlet {
93 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<PortalHostDirective, never>;
94 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<PortalHostDirective, "[cdkPortalHost], [portalHost]", ["cdkPortalHost"], { "portal": "cdkPortalHost"; }, {}, never>;
95}
96export declare class PortalModule {
97 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<PortalModule, never>;
98 static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<PortalModule, [typeof CdkPortal, typeof CdkPortalOutlet, typeof TemplatePortalDirective, typeof PortalHostDirective], never, [typeof CdkPortal, typeof CdkPortalOutlet, typeof TemplatePortalDirective, typeof PortalHostDirective]>;
99 static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<PortalModule>;
100}
101
102//# sourceMappingURL=portal-directives.d.ts.map
Note: See TracBrowser for help on using the repository browser.