@netgrif/components-core
Version:
Netgrif Application engine frontend core Angular library
130 lines (129 loc) • 7.69 kB
TypeScript
import { BreakpointObserver } from '@angular/cdk/layout';
import { EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { ResizeEvent } from 'angular-resizable-element';
import { Observable, Subscription } from 'rxjs';
import { ConfigurationService } from '../../configuration/configuration.service';
import { ImpersonationUserSelectService } from '../../impersonation/services/impersonation-user-select.service';
import { ImpersonationService } from '../../impersonation/services/impersonation.service';
import { LoggerService } from '../../logger/services/logger.service';
import { CaseResourceService } from '../../resources/engine-endpoint/case-resource.service';
import { LanguageService } from '../../translate/language.service';
import { User } from '../../user/models/user';
import { UserService } from '../../user/services/user.service';
import { PathService } from '../service/path.service';
import { ConfigDoubleMenu, NavigationItem } from '../model/navigation-configs';
import { MenuItemClickEvent, MenuItemLoadedEvent, MenuResizeEvent, MenuStateChangeEvent } from '../model/navigation-menu-events';
import { DoubleDrawerNavigationService } from "./service/double-drawer-navigation.service";
import { LoadingEmitter } from "../../utility/loading-emitter";
import * as i0 from "@angular/core";
export declare abstract class AbstractNavigationDoubleDrawerComponent implements OnInit, OnDestroy {
protected _router: Router;
protected _activatedRoute: ActivatedRoute;
protected _breakpoint: BreakpointObserver;
protected _languageService: LanguageService;
protected _translateService: TranslateService;
protected _userService: UserService;
protected _log: LoggerService;
protected _config: ConfigurationService;
protected _pathService: PathService;
protected _caseResourceService: CaseResourceService;
protected _impersonationUserSelect: ImpersonationUserSelectService;
protected _impersonation: ImpersonationService;
protected _navigationService: DoubleDrawerNavigationService;
portalLeftMenu: TemplateRef<any>;
portalRightMenu: TemplateRef<any>;
imageRouterLink: string;
imageAlt: string;
image: string;
profileRouterLink: string;
includeUser: boolean;
includeLanguage: boolean;
includeMoreMenu: boolean;
includeImpersonation: boolean;
allClosable: boolean;
folderIcon: string;
openedFolderIcon: string;
filterIcon: string;
foldersCategoryName: string;
viewsCategoryName: string;
loggedOut: EventEmitter<any>;
stateChanged: EventEmitter<MenuStateChangeEvent>;
itemClicked: EventEmitter<MenuItemClickEvent>;
resized: EventEmitter<MenuResizeEvent>;
itemLoaded: EventEmitter<MenuItemLoadedEvent>;
hideMoreMenu: boolean;
protected _breakpointSubscription: Subscription;
protected _currentNodeSubscription: Subscription;
protected _currentPathSubscription: Subscription;
protected _loggedUserSubscription: Subscription;
/**
* Currently display Path
* Siblings of the node are on the left, children are on the right
*/
protected _currentPath: string;
protected _pathResolverLoading$: LoadingEmitter;
protected _configLeftMenu: ConfigDoubleMenu;
protected _configRightMenu: ConfigDoubleMenu;
protected configUrl: string;
protected constructor(_router: Router, _activatedRoute: ActivatedRoute, _breakpoint: BreakpointObserver, _languageService: LanguageService, _translateService: TranslateService, _userService: UserService, _log: LoggerService, _config: ConfigurationService, _pathService: PathService, _caseResourceService: CaseResourceService, _impersonationUserSelect: ImpersonationUserSelectService, _impersonation: ImpersonationService, _navigationService: DoubleDrawerNavigationService);
ngOnInit(): void;
ngOnDestroy(): void;
get currentPath(): string;
set currentPath(node: string);
get configLeftMenu(): ConfigDoubleMenu;
get configRightMenu(): ConfigDoubleMenu;
get leftItems$(): import("rxjs").BehaviorSubject<NavigationItem[]>;
get leftItems(): NavigationItem[];
get rightItems$(): import("rxjs").BehaviorSubject<NavigationItem[]>;
get rightItems(): NavigationItem[];
get moreItems$(): import("rxjs").BehaviorSubject<NavigationItem[]>;
get moreItems(): NavigationItem[];
get hiddenCustomItems$(): import("rxjs").BehaviorSubject<NavigationItem[]>;
get hiddenCustomItems(): NavigationItem[];
get leftLoading$(): LoadingEmitter;
get rightLoading$(): LoadingEmitter;
get pathResolverLoading$(): LoadingEmitter;
toggleMenu(): void;
toggleLeftMenu(): void;
toggleRightMenu(): void;
getLang(): string;
logout(): void;
impersonate(): void;
stopImpersonating(): void;
get user(): User;
get canGoBackLoading$(): Observable<boolean>;
/**
* On home click, the current level is set to 0, and current parent is
* set to root node.
* */
onHomeClick(): void;
/**
* On back click, the parent is set to parent of left nodes, that will solve
* the right side menu (elements that were in left side, after backward
* navigation will be on the right side).
* Current level is set to a lower number in order to set the left side menu.
* */
onBackClick(): void;
onItemClick(item: NavigationItem): void;
loadMoreItems(): void;
isAscending(): boolean;
switchOrder(): void;
/**
* Function to check whether the back button should be displayed
* @returns boolean if the back button should be displayed
* */
isOnZeroLevel(): boolean;
isItemAndPathEqual(item: NavigationItem, path: string): boolean;
isLeftItemsEmpty(): boolean;
isRightItemsEmpty(): boolean;
itemsTrackBy(index: number, item: NavigationItem): string;
onResizeEvent(event: ResizeEvent): void;
protected resolveLayout(isLargeScreen: boolean): void;
protected canApplyAutoSelect(): boolean;
protected openAvailableView(): void;
protected resolveInitialValueOfPath(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractNavigationDoubleDrawerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractNavigationDoubleDrawerComponent, "ncc-abstract-navigation-double-drawer", never, { "portalLeftMenu": { "alias": "portalLeftMenu"; "required": false; }; "portalRightMenu": { "alias": "portalRightMenu"; "required": false; }; "imageRouterLink": { "alias": "imageRouterLink"; "required": false; }; "imageAlt": { "alias": "imageAlt"; "required": false; }; "image": { "alias": "image"; "required": false; }; "profileRouterLink": { "alias": "profileRouterLink"; "required": false; }; "includeUser": { "alias": "includeUser"; "required": false; }; "includeLanguage": { "alias": "includeLanguage"; "required": false; }; "includeMoreMenu": { "alias": "includeMoreMenu"; "required": false; }; "includeImpersonation": { "alias": "includeImpersonation"; "required": false; }; "allClosable": { "alias": "allClosable"; "required": false; }; "folderIcon": { "alias": "folderIcon"; "required": false; }; "openedFolderIcon": { "alias": "openedFolderIcon"; "required": false; }; "filterIcon": { "alias": "filterIcon"; "required": false; }; "foldersCategoryName": { "alias": "foldersCategoryName"; "required": false; }; "viewsCategoryName": { "alias": "viewsCategoryName"; "required": false; }; }, { "loggedOut": "loggedOut"; "stateChanged": "stateChanged"; "itemClicked": "itemClicked"; "resized": "resized"; "itemLoaded": "itemLoaded"; }, never, never, false, never>;
}