import { SimpleChange, ElementRef, EventEmitter, Renderer, OnInit, OnDestroy, OnChanges, AfterContentInit } from '@angular/core';
import { BaseComponent } from '../core/base';
import { HammerGesturesManager } from "../core/touch";
import { NavigationService, ToggleView } from '../core/navigation';
/**
* Navigation Drawer component supports collapsible side navigation container.
* Usage:
* ```
*
*
*
*
*
* ```
* Can also include an optional `
`.
* ID required to register with NavigationService allow directives to target the control.
*/
export declare class NavigationDrawer extends BaseComponent implements ToggleView, OnInit, AfterContentInit, OnDestroy, OnChanges {
private elementRef;
private _state;
protected renderer: Renderer;
private _touchManager;
private _hasMimiTempl;
private _swipeAttached;
private _widthCache;
private css;
private _resolveOpen;
private _resolveClose;
private _drawer;
readonly drawer: HTMLElement;
private _overlay;
readonly overlay: any;
private _styleDummy;
readonly styleDummy: any;
/** Pan animation properties */
private _panning;
private _panStartWidth;
private _panLimit;
private _previousDeltaX;
/**
* Property to decide whether to change width or translate the drawer from pan gesture.
*/
readonly hasAnimateWidth: boolean;
private _maxEdgeZone;
/**
* Used for touch gestures (swipe and pan). Defaults to 50 (in px) and is extended to at least 110% of the mini template width if available.
* @protected set method
*/
readonly maxEdgeZone: number;
protected set_maxEdgeZone(value: number): void;
/**
* Get the Drawer width for specific state. Will attempt to evaluate requested state and cache.
*/
readonly expectedWidth: number;
/**
* Get the Drawer mini width for specific state. Will attempt to evaluate requested state and cache.
*/
readonly expectedMiniWidth: number;
readonly touchManager: HammerGesturesManager;
/**
* Exposes optional navigation service
*/
readonly state: NavigationService;
/** ID of the component */
id: string;
/**
* Position of the Navigation Drawer. Can be "left"(default) or "right". Only has effect when not pinned.
*/
position: string;
/**
* Enables the use of touch gestures to manipulate the drawer - such as swipe/pan from edge to open, swipe toggle and pan drag.
*/
enableGestures: boolean;
/** State of the drawer. */
isOpen: boolean;
/** Pinned state of the drawer. Currently only support */
pin: boolean;
/** Minimum device width required for automatic pin to be toggled. Deafult is 1024, can be set to falsy value to ignore. */
pinThreshold: number;
/**
* Width of the drawer in its open state. Defaults to 300px based on the `.ig-nav-drawer` style.
* Can be used to override or dynamically modify the width.
*/
width: string;
/**
* Width of the drawer in its mini state. Defaults to 60px based on the `.ig-nav-drawer.mini` style.
* Can be used to override or dynamically modify the width.
*/
miniWidth: string;
/** Event fired as the Navigation Drawer is about to open. */
opening: EventEmitter<{}>;
/** Event fired when the Navigation Drawer has opened. */
opened: EventEmitter<{}>;
/** Event fired as the Navigation Drawer is about to close. */
closing: EventEmitter<{}>;
/** Event fired when the Navigation Drawer has closed. */
closed: EventEmitter<{}>;
constructor(elementRef: ElementRef, _state: NavigationService, renderer: Renderer, _touchManager: HammerGesturesManager);
ngOnInit(): void;
ngAfterContentInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: {
[propName: string]: SimpleChange;
}): void;
private getWindowWidth();
/**
* Sets the drawer width.
* @param width Width to set, must be valid CSS size string.
*/
private setDrawerWidth(width);
protected ensureDrawerHeight(): void;
/**
* Get the Drawer width for specific state. Will attempt to evaluate requested state and cache.
* @param mini Request mini width instead
*/
protected getExpectedWidth(mini?: boolean): number;
/**
* Get current Drawer width.
*/
private getDrawerWidth();
private ensureEvents();
private updateEdgeZone();
private swipe;
private panstart;
private pan;
private panEnd;
private resetPan();
/**
* Sets the absolute position or width in case the drawer doesn't change position.
* @param x the number pixels to translate on the X axis or the width to set. 0 width will clear the style instead.
* @param opacity optional value to apply to the overlay
*/
private setXSize(x, opacity?);
/**
* Toggle the open state of the Navigation Drawer.
* @param fireEvents Optional flag determining whether events should be fired or not.
* @return Promise that is resolved once the operation completes.
*/
toggle(fireEvents?: boolean): Promise
;
/**
* Open the Navigation Drawer. Has no effect if already opened.
* @param fireEvents Optional flag determining whether events should be fired or not.
* @return Promise that is resolved once the operation completes.
*/
open(fireEvents?: boolean): Promise;
private toggleOpenedEvent;
private toggleClosedEvent;
/**
* Close the Navigation Drawer. Has no effect if already closed.
* @param fireEvents Optional flag determining whether events should be fired or not.
* @return Promise that is resolved once the operation completes.
*/
close(fireEvents?: boolean): Promise;
}
export declare class NavigationDrawerModule {
}