UNPKG

3.65 kBTypeScriptView Raw
1import { InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core';
2import { Overlay } from '@angular/cdk/overlay';
3import { ComponentType } from '@angular/cdk/portal';
4import { CovalentSideSheetContainerComponent, _CovalentSideSheetContainerBase } from './side-sheet-container';
5import { CovalentSideSheetRef } from './side-sheet-ref';
6import { CovalentSideSheetConfig } from './side-sheet.config';
7import * as i0 from "@angular/core";
8export declare class _CovalentSideSheetBase<C extends _CovalentSideSheetContainerBase> implements OnDestroy {
9 private _overlay;
10 private _injector;
11 private _defaultOptions;
12 private _parentSideSheet;
13 private _sideSheetRefConstructor;
14 private _sideSheetContainerType;
15 private _sideSheetDataToken;
16 private _openSideSheetsAtThisLevel;
17 private readonly _afterAllClosedAtThisLevel;
18 private readonly _afterOpenedAtThisLevel;
19 private _animationStateSubscriptions;
20 private defaultSidebarConfig;
21 constructor(_overlay: Overlay, _injector: Injector, _defaultOptions: CovalentSideSheetConfig | undefined, _parentSideSheet: _CovalentSideSheetBase<C> | undefined, _sideSheetRefConstructor: Type<CovalentSideSheetRef<any>>, _sideSheetContainerType: Type<C>, _sideSheetDataToken: InjectionToken<unknown>);
22 /** Keeps track of the currently-open side-sheets. */
23 get openSideSheets(): CovalentSideSheetRef<unknown>[];
24 open<T, D = unknown, R = unknown>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: CovalentSideSheetConfig<D>): CovalentSideSheetRef<T, R>;
25 ngOnDestroy(): void;
26 /**
27 * Closes all of the currently-open side-sheets.
28 */
29 closeAll(): void;
30 private _createOverlay;
31 /**
32 * Attaches a container to a side-sheets's already-created overlay.
33 * @param overlay Reference to the side-sheet's underlying overlay.
34 * @param config The side-sheet configuration.
35 * @returns A promise resolving to a ComponentRef for the attached container.
36 */
37 private _attachSideSheetContainer;
38 /**
39 * Attaches the user-provided component to the already-created side sheet container.
40 * @param componentOrTemplateRef The type of component being loaded into the side-sheet,
41 * or a TemplateRef to instantiate as the content.
42 * @param dialogContainer Reference to the wrapping side-sheet container.
43 * @param overlayRef Reference to the overlay in which the side-sheet resides.
44 * @param config The side-sheet configuration.
45 * @returns A promise resolving to the CovalentSideSheetRef that should be returned to the user.
46 */
47 private _attachSideSheetContent;
48 private _createInjector;
49 /**
50 * Removes a side sheet from the array of open side sheets.
51 * @param sideSheetRef Side Sheet to be removed.
52 */
53 private _removeOpenSideSheet;
54 /** Closes all of the side-sheet in an array. */
55 private _closeSideSheets;
56 static ɵfac: i0.ɵɵFactoryDeclaration<_CovalentSideSheetBase<any>, never>;
57 static ɵdir: i0.ɵɵDirectiveDeclaration<_CovalentSideSheetBase<any>, never, never, {}, {}, never, never, false, never>;
58}
59/**
60 * Service to open Covalent Design side-sheet.
61 */
62export declare class CovalentSideSheet extends _CovalentSideSheetBase<CovalentSideSheetContainerComponent> {
63 constructor(overlay: Overlay, injector: Injector, defaultOptions: CovalentSideSheetConfig, parentSideSheet: CovalentSideSheet);
64 static ɵfac: i0.ɵɵFactoryDeclaration<CovalentSideSheet, [null, null, { optional: true; }, { optional: true; skipSelf: true; }]>;
65 static ɵprov: i0.ɵɵInjectableDeclaration<CovalentSideSheet>;
66}