UNPKG

1.75 kBTypeScriptView Raw
1import { Renderer2, ElementRef, AfterViewInit, OnDestroy } from '@angular/core';
2import { MatSidenav, MatDrawerToggleResult } from '@angular/material/sidenav';
3import { ICanDisable } from '@covalent/core/common';
4import * as i0 from "@angular/core";
5export interface ILayoutTogglable {
6 opened: boolean;
7 sidenav: MatSidenav;
8 toggle(): Promise<MatDrawerToggleResult>;
9 open(): Promise<MatDrawerToggleResult>;
10 close(): Promise<MatDrawerToggleResult>;
11}
12export declare class LayoutToggleBase {
13}
14export declare const _TdLayoutToggleMixinBase: (new (...args: any[]) => ICanDisable) & typeof LayoutToggleBase;
15export declare abstract class BaseLayoutToggleDirective extends _TdLayoutToggleMixinBase implements AfterViewInit, OnDestroy, ICanDisable {
16 protected _layout: ILayoutTogglable;
17 private _renderer;
18 private _elementRef;
19 private _toggleSubs?;
20 private _initialized;
21 private _hideWhenOpened;
22 /**
23 * hideWhenOpened?: boolean
24 * When this is set to true, the host will be hidden when
25 * the sidenav is opened.
26 */
27 set hideWhenOpened(hideWhenOpened: boolean);
28 constructor(_layout: ILayoutTogglable, _renderer: Renderer2, _elementRef: ElementRef);
29 ngAfterViewInit(): void;
30 ngOnDestroy(): void;
31 /**
32 * Listens to host click event to trigger the layout toggle
33 */
34 clickListener(event: Event): void;
35 abstract onClick(): void;
36 private _toggleVisibility;
37 private _noLayoutMessage;
38 static ɵfac: i0.ɵɵFactoryDeclaration<BaseLayoutToggleDirective, never>;
39 static ɵdir: i0.ɵɵDirectiveDeclaration<BaseLayoutToggleDirective, never, never, { "hideWhenOpened": { "alias": "hideWhenOpened"; "required": false; }; }, {}, never, never, false, never>;
40}
41
\No newline at end of file