com.phloxui
Version:
PhloxUI Ng2+ Framework
55 lines (54 loc) • 3.15 kB
TypeScript
import { OnInit } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { PhloxApp } from './PhloxApp.component';
import { IApplicationAware } from './IApplicationAware';
import { ObservableManager } from '../service/ObservableManager.service';
import { PhloxAppService } from '../service/PhloxAppService.service';
import { AbstractNavItem } from './AbstractNavItem';
import { AbstractNavMenu } from './AbstractNavMenu';
/**
* <p style="text-indent: 2em;">
* An abstract base class for left side bar <code>nav menu</code>. This class provides more capabilities than [[AbstractNavMenu]] in case of that it can be
* showed/hidden by sliding the panel in/out from the left side of the screen. You can subscribe to the [[ObservableManager]]'s topic name
* <code>nav-left-layout.[sub-topic-name].toggled</code> to listen on the event emitted from this component when the left panel is <code>toggled</code>
* (showed/hidden). Futhermore, instead of sliding the panel in/out from the left side of the screen, it can be fixed by setting a flag [[fixed]] to <code>true</code>.
* By setting a flag [[fixed]] to <code>true</code>, the left panel will be always shown on the screen. This component will automatically publish an event to
* topic name <code>nav-left-layout.[sub-topic-name].fixed</code> when the flag [[fixed]] is changed. You can also control the <code>toggled</code> and <code>fixed</code>
* flag sending an event into <code>command</code> topic name <code>nav-left-layout.[sub-topic-name].cmd.toggled</code> and <code>nav-left-layout.[sub-topic-name].cmd.fixed</code>
* respectively.
* </p>
*
* @author shiorin, tee4cute
* @see [[ObservableManager]]
*/
export declare abstract class AbstractNavLeftLayout<T extends AbstractNavItem> extends AbstractNavMenu<T> implements IApplicationAware, OnInit {
static readonly FIXED_CHANGE_TOPIC_NAME: string;
static readonly TOGGLED_CHANGE_TOPIC_NAME: string;
static readonly FIXED_CMD_TOPIC_NAME: string;
static readonly TOGGLED_CMD_TOPIC_NAME: string;
static readonly SUB_TOPIC_NAME: string;
static getFixedChangeTopicName(subTopicName: string): string;
static getToggledChangeTopicName(subTopicName: string): string;
static getFixedCmdTopicName(subTopicName: string): string;
static getToggledCmdTopicName(subTopicName: string): string;
private _fixed;
private _toggled;
protected phloxAppService: PhloxAppService;
protected fixedSubjects: Subject<any>[];
protected toggledSubjects: Subject<any>[];
protected subTopicName: string;
private readonly app;
constructor(phloxAppService: PhloxAppService, observableMgr: ObservableManager, subTopicName: string);
fixed: boolean;
toggled: boolean;
private initNavLeftEventTopics(fixedChange, toggledChanged, fixedCmd, toggledCmd);
ngOnInit(): void;
getApplication(): PhloxApp;
getSubTopicName(): string;
isFixed(): boolean;
setFixed(fixed: boolean): void;
isToggled(): boolean;
setToggled(toggled: boolean): void;
abstract onFixedChange(fixed: boolean): void;
abstract onToggledChange(toggled: boolean): void;
}