@netgrif/components
Version:
Netgrif Application Engine frontend Angular components
34 lines • 15.1 kB
JavaScript
import { Component } from '@angular/core';
import 'hammerjs';
import { AbstractNavigationDrawerComponent } from '@netgrif/components-core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/cdk/layout";
import * as i2 from "@netgrif/components-core";
import * as i3 from "@angular/common";
import * as i4 from "@ngbracket/ngx-layout";
import * as i5 from "@angular/material/button";
import * as i6 from "@angular/material/divider";
import * as i7 from "@angular/material/icon";
import * as i8 from "@angular/material/sidenav";
import * as i9 from "../quick-panel/components/quick-panel.component";
import * as i10 from "../../user/user-card/user-card.component";
import * as i11 from "angular-resizable-element";
import * as i12 from "../navigation-tree/navigation-tree.component";
export class NavigationDrawerComponent extends AbstractNavigationDrawerComponent {
breakpoint;
_log;
userPreferenceService;
constructor(breakpoint, _log, userPreferenceService) {
super(breakpoint, _log, userPreferenceService);
this.breakpoint = breakpoint;
this._log = _log;
this.userPreferenceService = userPreferenceService;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationDrawerComponent, deps: [{ token: i1.BreakpointObserver }, { token: i2.LoggerService }, { token: i2.UserPreferenceService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NavigationDrawerComponent, selector: "nc-navigation-drawer", usesInheritance: true, ngImport: i0, template: "<mat-sidenav-container class=\"drawer-container\" (panright)=\"swipeRight()\" (panleft)=\"swipeLeft()\" autosize>\n <mat-sidenav #sidenav [mode]=\"config.mode\" [(opened)]=\"opened\" position=\"start\"\n [disableClose]=\"config.disableClose\" class=\"drawer-content mat-elevation-z10\"\n mwlResizable\n [style.width.px]=\"width\"\n (resizing)=\"onResizeEvent($event)\">\n <div class=\"sidenav-wrapper\">\n <button\n class=\"sidenav-close-button\"\n type=\"button\"\n aria-label=\"Toggle sidenav\"\n mat-icon-button\n *ngIf=\"!fixed\"\n (click)=\"close()\">\n <mat-icon aria-label=\"Side nav toggle icon\">close</mat-icon>\n </button>\n <div fxLayout=\"column\" fxLayoutAlign=\"start center\" fxFlex>\n <nc-user-card *ngIf=\"showUser\" [user]=\"user\" mode=\"full\" [contentWidth]=\"contentWidth\"></nc-user-card>\n <mat-divider *ngIf=\"showUser\" class=\"drawer-divider\"></mat-divider>\n <nc-quick-panel *ngIf=\"showQuickPanel\" [items]=\"quickPanelItems\"\n [contentWidth]=\"contentWidth\"></nc-quick-panel>\n <mat-divider *ngIf=\"showQuickPanel\" class=\"drawer-divider\"></mat-divider>\n <nc-navigation-tree *ngIf=\"navigation\" [contentWidth]=\"contentWidth\"></nc-navigation-tree>\n </div>\n </div>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div class=\"content-wrapper\" fxLayout=\"row\" fxLayoutAlign=\"space-between none\">\n <button\n type=\"button\"\n aria-label=\"Toggle sidenav\"\n mat-icon-button\n (click)=\"open()\"\n *ngIf=\"!sidenav.opened\">\n <mat-icon aria-label=\"Side nav toggle icon\">menu</mat-icon>\n </button>\n <div fxFlex=\"100\">\n <ng-content></ng-content>\n </div>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [".drawer-container{height:100%}.drawer-content{min-width:200px;outline:none!important}.mat-mdc-drawer-side{border-right:0}mat-divider.drawer-divider{width:90%}.sidenav-wrapper{overflow-x:hidden!important}.sidenav-close-button{position:absolute;right:0;z-index:100}.content-wrapper{height:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i4.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i4.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i8.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i8.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "component", type: i9.QuickPanelComponent, selector: "nc-quick-panel" }, { kind: "component", type: i10.UserCardComponent, selector: "nc-user-card" }, { kind: "directive", type: i11.ResizableDirective, selector: "[mwlResizable]", inputs: ["validateResize", "enableGhostResize", "resizeSnapGrid", "resizeCursors", "ghostElementPositioning", "allowNegativeResizes", "mouseMoveThrottleMS"], outputs: ["resizeStart", "resizing", "resizeEnd"], exportAs: ["mwlResizable"] }, { kind: "component", type: i12.NavigationTreeComponent, selector: "nc-navigation-tree" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationDrawerComponent, decorators: [{
type: Component,
args: [{ selector: 'nc-navigation-drawer', template: "<mat-sidenav-container class=\"drawer-container\" (panright)=\"swipeRight()\" (panleft)=\"swipeLeft()\" autosize>\n <mat-sidenav #sidenav [mode]=\"config.mode\" [(opened)]=\"opened\" position=\"start\"\n [disableClose]=\"config.disableClose\" class=\"drawer-content mat-elevation-z10\"\n mwlResizable\n [style.width.px]=\"width\"\n (resizing)=\"onResizeEvent($event)\">\n <div class=\"sidenav-wrapper\">\n <button\n class=\"sidenav-close-button\"\n type=\"button\"\n aria-label=\"Toggle sidenav\"\n mat-icon-button\n *ngIf=\"!fixed\"\n (click)=\"close()\">\n <mat-icon aria-label=\"Side nav toggle icon\">close</mat-icon>\n </button>\n <div fxLayout=\"column\" fxLayoutAlign=\"start center\" fxFlex>\n <nc-user-card *ngIf=\"showUser\" [user]=\"user\" mode=\"full\" [contentWidth]=\"contentWidth\"></nc-user-card>\n <mat-divider *ngIf=\"showUser\" class=\"drawer-divider\"></mat-divider>\n <nc-quick-panel *ngIf=\"showQuickPanel\" [items]=\"quickPanelItems\"\n [contentWidth]=\"contentWidth\"></nc-quick-panel>\n <mat-divider *ngIf=\"showQuickPanel\" class=\"drawer-divider\"></mat-divider>\n <nc-navigation-tree *ngIf=\"navigation\" [contentWidth]=\"contentWidth\"></nc-navigation-tree>\n </div>\n </div>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div class=\"content-wrapper\" fxLayout=\"row\" fxLayoutAlign=\"space-between none\">\n <button\n type=\"button\"\n aria-label=\"Toggle sidenav\"\n mat-icon-button\n (click)=\"open()\"\n *ngIf=\"!sidenav.opened\">\n <mat-icon aria-label=\"Side nav toggle icon\">menu</mat-icon>\n </button>\n <div fxFlex=\"100\">\n <ng-content></ng-content>\n </div>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [".drawer-container{height:100%}.drawer-content{min-width:200px;outline:none!important}.mat-mdc-drawer-side{border-right:0}mat-divider.drawer-divider{width:90%}.sidenav-wrapper{overflow-x:hidden!important}.sidenav-close-button{position:absolute;right:0;z-index:100}.content-wrapper{height:100%}\n"] }]
}], ctorParameters: () => [{ type: i1.BreakpointObserver }, { type: i2.LoggerService }, { type: i2.UserPreferenceService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2aWdhdGlvbi1kcmF3ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmV0Z3JpZi1jb21wb25lbnRzL3NyYy9saWIvbmF2aWdhdGlvbi9uYXZpZ2F0aW9uLWRyYXdlci9uYXZpZ2F0aW9uLWRyYXdlci5jb21wb25lbnQudHMiLCIuLi8uLi8u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VwiZHJhd2VyLWNvbnRlbnQgbWF0LWVsZXZhdGlvbi16MTBcIlxuICAgICAgICAgICAgICAgICBtd2xSZXNpemFibGVcbiAgICAgICAgICAgICAgICAgW3N0eWxlLndpZHRoLnB4XT1cIndpZHRoXCJcbiAgICAgICAgICAgICAgICAgKHJlc2l6aW5nKT1cIm9uUmVzaXplRXZlbnQoJGV2ZW50KVwiPlxuICAgICAgICA8ZGl2IGNsYXNzPVwic2lkZW5hdi13cmFwcGVyXCI+XG4gICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJzaWRlbmF2LWNsb3NlLWJ1dHRvblwiXG4gICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cIlRvZ2dsZSBzaWRlbmF2XCJcbiAgICAgICAgICAgICAgICBtYXQtaWNvbi1idXR0b25cbiAgICAgICAgICAgICAgICAqbmdJZj1cIiFmaXhlZFwiXG4gICAgICAgICAgICAgICAgKGNsaWNrKT1cImNsb3NlKClcIj5cbiAgICAgICAgICAgICAgICA8bWF0LWljb24gYXJpYS1sYWJlbD1cIlNpZGUgbmF2IHRvZ2dsZSBpY29uXCI+Y2xvc2U8L21hdC1pY29uPlxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICA8ZGl2IGZ4TGF5b3V0PVwiY29sdW1uXCIgZnhMYXlvdXRBbGlnbj1cInN0YXJ0IGNlbnRlclwiIGZ4RmxleD5cbiAgICAgICAgICAgICAgICA8bmMtdXNlci1jYXJkICpuZ0lmPVwic2hvd1VzZXJcIiBbdXNlcl09XCJ1c2VyXCIgbW9kZT1cImZ1bGxcIiBbY29udGVudFdpZHRoXT1cImNvbnRlbnRXaWR0aFwiPjwvbmMtdXNlci1jYXJkPlxuICAgICAgICAgICAgICAgIDxtYXQtZGl2aWRlciAqbmdJZj1cInNob3dVc2VyXCIgY2xhc3M9XCJkcmF3ZXItZGl2aWRlclwi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Y29uXCI+bWVudTwvbWF0LWljb24+XG4gICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIDxkaXYgZnhGbGV4PVwiMTAwXCI+XG4gICAgICAgICAgICAgICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgIDwvbWF0LXNpZGVuYXYtY29udGVudD5cbjwvbWF0LXNpZGVuYXYtY29udGFpbmVyPlxuIl19