@covalent/core
Version:
Core Teradata UI Platform for layouts, icons, custom components and themes. This should be added as a dependency for any project that wants to use layouts, icons and themes for Angular Material.
67 lines (66 loc) • 3.65 kB
TypeScript
import { InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core';
import { Overlay } from '@angular/cdk/overlay';
import { ComponentType } from '@angular/cdk/portal';
import { CovalentSideSheetContainerComponent, _CovalentSideSheetContainerBase } from './side-sheet-container';
import { CovalentSideSheetRef } from './side-sheet-ref';
import { CovalentSideSheetConfig } from './side-sheet.config';
import * as i0 from "@angular/core";
export declare class _CovalentSideSheetBase<C extends _CovalentSideSheetContainerBase> implements OnDestroy {
private _overlay;
private _injector;
private _defaultOptions;
private _parentSideSheet;
private _sideSheetRefConstructor;
private _sideSheetContainerType;
private _sideSheetDataToken;
private _openSideSheetsAtThisLevel;
private readonly _afterAllClosedAtThisLevel;
private readonly _afterOpenedAtThisLevel;
private _animationStateSubscriptions;
private defaultSidebarConfig;
constructor(_overlay: Overlay, _injector: Injector, _defaultOptions: CovalentSideSheetConfig | undefined, _parentSideSheet: _CovalentSideSheetBase<C> | undefined, _sideSheetRefConstructor: Type<CovalentSideSheetRef<any>>, _sideSheetContainerType: Type<C>, _sideSheetDataToken: InjectionToken<unknown>);
/** Keeps track of the currently-open side-sheets. */
get openSideSheets(): CovalentSideSheetRef<unknown>[];
open<T, D = unknown, R = unknown>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: CovalentSideSheetConfig<D>): CovalentSideSheetRef<T, R>;
ngOnDestroy(): void;
/**
* Closes all of the currently-open side-sheets.
*/
closeAll(): void;
private _createOverlay;
/**
* Attaches a container to a side-sheets's already-created overlay.
* @param overlay Reference to the side-sheet's underlying overlay.
* @param config The side-sheet configuration.
* @returns A promise resolving to a ComponentRef for the attached container.
*/
private _attachSideSheetContainer;
/**
* Attaches the user-provided component to the already-created side sheet container.
* @param componentOrTemplateRef The type of component being loaded into the side-sheet,
* or a TemplateRef to instantiate as the content.
* @param dialogContainer Reference to the wrapping side-sheet container.
* @param overlayRef Reference to the overlay in which the side-sheet resides.
* @param config The side-sheet configuration.
* @returns A promise resolving to the CovalentSideSheetRef that should be returned to the user.
*/
private _attachSideSheetContent;
private _createInjector;
/**
* Removes a side sheet from the array of open side sheets.
* @param sideSheetRef Side Sheet to be removed.
*/
private _removeOpenSideSheet;
/** Closes all of the side-sheet in an array. */
private _closeSideSheets;
static ɵfac: i0.ɵɵFactoryDeclaration<_CovalentSideSheetBase<any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<_CovalentSideSheetBase<any>, never, never, {}, {}, never, never, false, never>;
}
/**
* Service to open Covalent Design side-sheet.
*/
export declare class CovalentSideSheet extends _CovalentSideSheetBase<CovalentSideSheetContainerComponent> {
constructor(overlay: Overlay, injector: Injector, defaultOptions: CovalentSideSheetConfig, parentSideSheet: CovalentSideSheet);
static ɵfac: i0.ɵɵFactoryDeclaration<CovalentSideSheet, [null, null, { optional: true; }, { optional: true; skipSelf: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<CovalentSideSheet>;
}