UNPKG

ad-custom-lib

Version:

This is an UI custom library based on Adminlte library with purpose for personal use, if you need a full template of Primeng please visit https://github.com/mledour/angular-admin-lte

143 lines (142 loc) 4.59 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { AnimationEvent } from '../../animations/animations.interface'; import { RoutingService } from '../../services/routing.service'; import { HeaderService } from '../header/header.service'; import { LayoutStore } from '../layout.store'; import { WrapperService } from '../wrapper/wrapper.service'; 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; disableCollapse?: boolean; } export declare type Items = Array<Item>; export declare class SidebarLeftComponent implements OnInit, AfterViewInit, OnDestroy { private changeDetectorRef; private layoutStore; private ngZone; private renderer2; private router; private routingService; private wrapperService; private headerService; private activatedRoute; menu: Array<any>; sidebarHeight: number; sidebarOverflow: string; private layout; private isSidebarLeftCollapsed; private isSidebarLeftExpandOnOver; private isSidebarLeftMouseOver; private windowInnerWidth; private windowInnerHeight; private collapsedItems; private activatedItems; private toggleListeners; private listeners; private itemsByIds; private runningAnimations; private subscriptions; private activeUrl; private initialized; sidebarElement: ElementRef; sidebarLeftToggleDirectives: QueryList<SidebarLeftToggleDirective>; /** * @method constructor * @param changeDetectorRef [description] * @param layoutStore [description] * @param ngZone [description] * @param renderer2 [description] * @param router [description] * @param routingService [description] * @param wrapperService [description] * @param headerService [description] */ constructor(changeDetectorRef: ChangeDetectorRef, layoutStore: LayoutStore, ngZone: NgZone, renderer2: Renderer2, router: Router, routingService: RoutingService, wrapperService: WrapperService, headerService: HeaderService, activatedRoute: ActivatedRoute); /** * @method ngOnInit */ ngOnInit(): void; /** * @method ngAfterViewInit */ ngAfterViewInit(): void; /** * @method ngOnDestroy */ ngOnDestroy(): void; /** * [setSidebarListeners description] * @method setSidebarListeners */ setSidebarListeners(): void; /** * [setMenuListeners description] * @method setMenuListeners */ setMenuListeners(url: any): void; /** * [getIconClasses description] * @method getIconClasses * @param item [description] * @return [description] */ getIconClasses(item: Item): string; /** * [visibilityStateStart description] * @method visibilityStateStart * @param event [description] */ visibilityStateStart(event: AnimationEvent): void; /** * [uncollapseItemParents description] * @method uncollapseItemParents * @param item [description] * @param isActive [description] */ private uncollapseItemParents; /** * [findItemsByUrl description] * @method findItemsByUrl * @param url [description] * @param items [description] * @param returnItems [description] * @return [description] */ private findItemsByUrl; /** * [activeItems description] * @method activeItems * @param url [description] */ private activeItems; /** * [monkeyPatchMenu description] * @method monkeyPatchMenu * @param items [description] * @param parentId [description] */ private monkeyPatchMenu; /** * [setMenuTogglesListeners description] * @method setMenuTogglesListeners */ private setMenuTogglesListeners; /** * [checkMenuWithoutChildren description] * @method checkMenuWithoutChildren */ private checkMenuWithoutChildren; /** * [setSidebarHeight description] * @method setSidebarHeight */ private setSidebarHeight; }