angular-admin-lte
Version:
Admin-lte implémentation for Angular 4+
136 lines (135 loc) • 4.57 kB
TypeScript
import { AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, OnInit, QueryList, Renderer2 } from '@angular/core';
import { Router } from '@angular/router';
import { WrapperService } from '../wrapper/wrapper.service';
import { HeaderService } from '../header/header.service';
import { LayoutStore } from '../layout.store';
import { AnimationEvent } from '../../animations/animations.interface';
import { SidebarLeftToggleDirective } from './sidebar-left.directive';
export interface Item {
id: number;
parentId: number;
label: string;
route?: string;
iconClasses?: string;
children?: Array<Item>;
isActive?: boolean;
isCollapsed?: boolean;
}
export declare type Items = Array<Item>;
export declare class SidebarLeftComponent implements OnInit, AfterViewInit {
private changeDetectorRef;
private layoutStore;
private ngZone;
private renderer2;
private router;
private wrapperService;
private headerService;
menu: Array<any>;
sidebarStyles: any;
sidebarHeight: number;
sidebarOverflow: string;
private layout;
private isSidebarLeftCollapsed;
private isSidebarLeftExpandOnOver;
private isSidebarLeftMouseOver;
private windowInnerWidth;
private windowInnerHeight;
private collapsedItems;
private activatedItems;
private toggleListeners;
private itemsByIds;
private runningAnimations;
sidebarElement: ElementRef;
sidebarLeftToggleDirectives: QueryList<SidebarLeftToggleDirective>;
/**
* @method constructor
* @param {ChangeDetectorRef} privatechangeDetectorRef [description]
* @param {LayoutStore} privatelayoutStore [description]
* @param {LayoutService} privatelayoutService [description]
* @param {NgZone} privatengZone [description]
* @param {Renderer2} privaterenderer2 [description]
* @param {Router} privaterouter [description]
*/
constructor(changeDetectorRef: ChangeDetectorRef, layoutStore: LayoutStore, ngZone: NgZone, renderer2: Renderer2, router: Router, wrapperService: WrapperService, headerService: HeaderService);
/**
* @method ngOnInit
*/
ngOnInit(): void;
/**
* @method ngAfterViewInit
*/
ngAfterViewInit(): void;
/**
* [setSidebarListeners description]
* @method setSidebarListeners
*/
setSidebarListeners(): void;
/**
* [setMenuListeners description]
* @method setMenuListeners
* @return {[type]} [description]
*/
setMenuListeners(): void;
/**
* [getIconClasses description]
* @method getIconClasses
* @param {[type]} item [description]
* @return {string} [description]
*/
getIconClasses(item: Item): string;
/**
* [visibilityStateStart description]
* @method visibilityStateStart
* @param {AnimationEvent} event [description]
*/
visibilityStateStart(event: AnimationEvent): void;
/**
* [uncollapseItemParents description]
* @method uncollapseItemParents
* @param {Item} item [description]
* @param {Boolean} isActive [description]
*/
private uncollapseItemParents(item, isActive?);
/**
* [findItemsByUrl description]
* @method findItemsByUrl
* @param {string} url [description]
* @param {Items} items [description]
* @param {Items} returnItems [description]
* @return {Items} [description]
*/
private findItemsByUrl(url, items, returnItems?);
/**
* [activeItems description]
* @method activeItems
* @param {string} url [description]
*/
private activeItems(url);
/**
* [monkeyPatchMenu description]
* @method monkeyPatchMenu
* @param {Items} items [description]
* @param {number} parentId [description]
*/
private monkeyPatchMenu(items, parentId?);
/**
* [removeListeners description]
* @method removeListeners
*/
private removeListeners();
/**
* [setMenuTogglesListeners description]
* @method setMenuTogglesListeners
*/
private setMenuTogglesListeners();
/**
* [checkMenuWithoutChildren description]
* @method checkMenuWithoutChildren
*/
private checkMenuWithoutChildren();
/**
* [setSidebarHeight description]
* @method setSidebarHeight
*/
private setSidebarHeight();
}