@rxap/layout 12.2.2 → 13.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +1 -1
- package/esm2020/index.mjs +59 -0
- package/{esm2015/lib/footer/footer.component.js → esm2020/lib/footer/footer.component.mjs} +2 -7
- package/esm2020/lib/footer/footer.component.module.mjs +31 -0
- package/esm2020/lib/footer.directive.mjs +52 -0
- package/esm2020/lib/header/apps-button/apps-button.component.mjs +106 -0
- package/esm2020/lib/header/apps-button/apps-button.component.module.mjs +47 -0
- package/esm2020/lib/header/header.component.mjs +130 -0
- package/esm2020/lib/header/header.component.module.mjs +71 -0
- package/esm2020/lib/header/language-selector/language-selector.component.mjs +111 -0
- package/esm2020/lib/header/language-selector/language-selector.component.module.mjs +31 -0
- package/esm2020/lib/header/navigation-progress-bar/navigation-progress-bar.component.mjs +33 -0
- package/esm2020/lib/header/navigation-progress-bar/navigation-progress-bar.component.module.mjs +27 -0
- package/esm2020/lib/header/reset-button/reset-button.component.mjs +27 -0
- package/esm2020/lib/header/reset-button/reset-button.component.module.mjs +27 -0
- package/esm2020/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.mjs +44 -0
- package/esm2020/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.module.mjs +31 -0
- package/esm2020/lib/header/sign-out/sign-out.component.mjs +31 -0
- package/esm2020/lib/header/sign-out/sign-out.component.module.mjs +31 -0
- package/esm2020/lib/header/user-profile-icon/user-profile-icon.component.mjs +111 -0
- package/esm2020/lib/header/user-profile-icon/user-profile-icon.component.module.mjs +39 -0
- package/esm2020/lib/layout/layout.component.mjs +78 -0
- package/esm2020/lib/layout/layout.component.module.mjs +71 -0
- package/esm2020/lib/layout/layout.component.service.mjs +43 -0
- package/esm2020/lib/navigation/navigation-item/navigation-item.component.mjs +286 -0
- package/esm2020/lib/navigation/navigation-item.mjs +10 -0
- package/esm2020/lib/navigation/navigation.component.mjs +130 -0
- package/esm2020/lib/navigation/navigation.component.module.mjs +73 -0
- package/esm2020/lib/navigation/navigation.service.mjs +143 -0
- package/esm2020/lib/navigation/replace-router-paths.pipe.mjs +21 -0
- package/esm2020/lib/navigation/replace-router-paths.service.mjs +15 -0
- package/esm2020/lib/sidenav/sidenav-footer.directive.mjs +19 -0
- package/esm2020/lib/sidenav/sidenav-header.directive.mjs +19 -0
- package/esm2020/lib/sidenav/sidenav.component.mjs +120 -0
- package/esm2020/lib/sidenav/sidenav.component.module.mjs +45 -0
- package/esm2020/lib/sidenav/sidenav.component.service.mjs +22 -0
- package/esm2020/lib/sidenav/version/version.component.mjs +62 -0
- package/esm2020/lib/sidenav/version/version.component.module.mjs +27 -0
- package/esm2020/lib/sidenav-content/sidenav-content.component.mjs +45 -0
- package/esm2020/lib/sidenav-content/sidenav-content.component.module.mjs +27 -0
- package/esm2020/lib/sidenav-content/sidenav-content.component.service.mjs +36 -0
- package/esm2020/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.mjs +50 -0
- package/esm2020/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.module.mjs +31 -0
- package/esm2020/lib/tokens.mjs +8 -0
- package/esm2020/lib/types.mjs +2 -0
- package/esm2020/lib/window-container-sidenav/window-container-sidenav.component.mjs +73 -0
- package/esm2020/lib/window-container-sidenav/window-container-sidenav.component.module.mjs +31 -0
- package/esm2020/rxap-layout.mjs +5 -0
- package/fesm2015/rxap-layout.mjs +2559 -0
- package/fesm2015/rxap-layout.mjs.map +1 -0
- package/{fesm2015/rxap-layout.js → fesm2020/rxap-layout.mjs} +212 -355
- package/fesm2020/rxap-layout.mjs.map +1 -0
- package/package.json +45 -31
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-layout.umd.js +0 -3211
- package/bundles/rxap-layout.umd.js.map +0 -1
- package/esm2015/index.js +0 -59
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/footer/footer.component.js.map +0 -1
- package/esm2015/lib/footer/footer.component.module.js +0 -31
- package/esm2015/lib/footer/footer.component.module.js.map +0 -1
- package/esm2015/lib/footer.directive.js +0 -52
- package/esm2015/lib/footer.directive.js.map +0 -1
- package/esm2015/lib/header/apps-button/apps-button.component.js +0 -119
- package/esm2015/lib/header/apps-button/apps-button.component.js.map +0 -1
- package/esm2015/lib/header/apps-button/apps-button.component.module.js +0 -47
- package/esm2015/lib/header/apps-button/apps-button.component.module.js.map +0 -1
- package/esm2015/lib/header/header.component.js +0 -144
- package/esm2015/lib/header/header.component.js.map +0 -1
- package/esm2015/lib/header/header.component.module.js +0 -71
- package/esm2015/lib/header/header.component.module.js.map +0 -1
- package/esm2015/lib/header/language-selector/language-selector.component.js +0 -119
- package/esm2015/lib/header/language-selector/language-selector.component.js.map +0 -1
- package/esm2015/lib/header/language-selector/language-selector.component.module.js +0 -31
- package/esm2015/lib/header/language-selector/language-selector.component.module.js.map +0 -1
- package/esm2015/lib/header/navigation-progress-bar/navigation-progress-bar.component.js +0 -39
- package/esm2015/lib/header/navigation-progress-bar/navigation-progress-bar.component.js.map +0 -1
- package/esm2015/lib/header/navigation-progress-bar/navigation-progress-bar.component.module.js +0 -27
- package/esm2015/lib/header/navigation-progress-bar/navigation-progress-bar.component.module.js.map +0 -1
- package/esm2015/lib/header/reset-button/reset-button.component.js +0 -34
- package/esm2015/lib/header/reset-button/reset-button.component.js.map +0 -1
- package/esm2015/lib/header/reset-button/reset-button.component.module.js +0 -27
- package/esm2015/lib/header/reset-button/reset-button.component.module.js.map +0 -1
- package/esm2015/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.js +0 -50
- package/esm2015/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.js.map +0 -1
- package/esm2015/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.module.js +0 -31
- package/esm2015/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.module.js.map +0 -1
- package/esm2015/lib/header/sign-out/sign-out.component.js +0 -38
- package/esm2015/lib/header/sign-out/sign-out.component.js.map +0 -1
- package/esm2015/lib/header/sign-out/sign-out.component.module.js +0 -31
- package/esm2015/lib/header/sign-out/sign-out.component.module.js.map +0 -1
- package/esm2015/lib/header/user-profile-icon/user-profile-icon.component.js +0 -126
- package/esm2015/lib/header/user-profile-icon/user-profile-icon.component.js.map +0 -1
- package/esm2015/lib/header/user-profile-icon/user-profile-icon.component.module.js +0 -39
- package/esm2015/lib/header/user-profile-icon/user-profile-icon.component.module.js.map +0 -1
- package/esm2015/lib/layout/layout.component.js +0 -89
- package/esm2015/lib/layout/layout.component.js.map +0 -1
- package/esm2015/lib/layout/layout.component.module.js +0 -71
- package/esm2015/lib/layout/layout.component.module.js.map +0 -1
- package/esm2015/lib/layout/layout.component.service.js +0 -43
- package/esm2015/lib/layout/layout.component.service.js.map +0 -1
- package/esm2015/lib/navigation/navigation-item/navigation-item.component.js +0 -299
- package/esm2015/lib/navigation/navigation-item/navigation-item.component.js.map +0 -1
- package/esm2015/lib/navigation/navigation-item.js +0 -10
- package/esm2015/lib/navigation/navigation-item.js.map +0 -1
- package/esm2015/lib/navigation/navigation.component.js +0 -138
- package/esm2015/lib/navigation/navigation.component.js.map +0 -1
- package/esm2015/lib/navigation/navigation.component.module.js +0 -73
- package/esm2015/lib/navigation/navigation.component.module.js.map +0 -1
- package/esm2015/lib/navigation/navigation.service.js +0 -139
- package/esm2015/lib/navigation/navigation.service.js.map +0 -1
- package/esm2015/lib/navigation/replace-router-paths.pipe.js +0 -21
- package/esm2015/lib/navigation/replace-router-paths.pipe.js.map +0 -1
- package/esm2015/lib/navigation/replace-router-paths.service.js +0 -15
- package/esm2015/lib/navigation/replace-router-paths.service.js.map +0 -1
- package/esm2015/lib/sidenav/sidenav-footer.directive.js +0 -19
- package/esm2015/lib/sidenav/sidenav-footer.directive.js.map +0 -1
- package/esm2015/lib/sidenav/sidenav-header.directive.js +0 -19
- package/esm2015/lib/sidenav/sidenav-header.directive.js.map +0 -1
- package/esm2015/lib/sidenav/sidenav.component.js +0 -127
- package/esm2015/lib/sidenav/sidenav.component.js.map +0 -1
- package/esm2015/lib/sidenav/sidenav.component.module.js +0 -45
- package/esm2015/lib/sidenav/sidenav.component.module.js.map +0 -1
- package/esm2015/lib/sidenav/sidenav.component.service.js +0 -22
- package/esm2015/lib/sidenav/sidenav.component.service.js.map +0 -1
- package/esm2015/lib/sidenav/version/version.component.js +0 -70
- package/esm2015/lib/sidenav/version/version.component.js.map +0 -1
- package/esm2015/lib/sidenav/version/version.component.module.js +0 -27
- package/esm2015/lib/sidenav/version/version.component.module.js.map +0 -1
- package/esm2015/lib/sidenav-content/sidenav-content.component.js +0 -51
- package/esm2015/lib/sidenav-content/sidenav-content.component.js.map +0 -1
- package/esm2015/lib/sidenav-content/sidenav-content.component.module.js +0 -27
- package/esm2015/lib/sidenav-content/sidenav-content.component.module.js.map +0 -1
- package/esm2015/lib/sidenav-content/sidenav-content.component.service.js +0 -36
- package/esm2015/lib/sidenav-content/sidenav-content.component.service.js.map +0 -1
- package/esm2015/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.js +0 -58
- package/esm2015/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.js.map +0 -1
- package/esm2015/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.module.js +0 -31
- package/esm2015/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.module.js.map +0 -1
- package/esm2015/lib/tokens.js +0 -8
- package/esm2015/lib/tokens.js.map +0 -1
- package/esm2015/lib/types.js +0 -2
- package/esm2015/lib/types.js.map +0 -1
- package/esm2015/lib/window-container-sidenav/window-container-sidenav.component.js +0 -78
- package/esm2015/lib/window-container-sidenav/window-container-sidenav.component.js.map +0 -1
- package/esm2015/lib/window-container-sidenav/window-container-sidenav.component.module.js +0 -31
- package/esm2015/lib/window-container-sidenav/window-container-sidenav.component.module.js.map +0 -1
- package/esm2015/rxap-layout.js +0 -5
- package/esm2015/rxap-layout.js.map +0 -1
- package/fesm2015/rxap-layout.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.component.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/layout/layout.component.ts","../../../../../../libs/layout/src/lib/layout/layout.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;;;;;;;;;;;;;;;ICM/C,yBAME;;;IALA,uDAAoB,mDAAA,iEAAA;;;ADC9B,MAAM,OAAO,eAAe;IAM1B,YACkB,sBAA8C;QAA9C,2BAAsB,GAAtB,sBAAsB,CAAwB;QALzD,sBAAiB,GAAG,KAAK,CAAC;IAM7B,CAAC;;8EARM,eAAe;kEAAf,eAAe;uBAIf,UAAU;;;;;;QClBvB,iCAA8D;QAC9D,gDAAkD;QAChD,sCAOC;;;;;QACC,oCAAc;QACZ,gFAQc;QAChB,iBAAe;QACjB,iBAAc;QACd,8CAAqC;QACnC,gDAA0C;QACxC,mBAAyB;QACzB,6DAA6E;QAA1C,oMAAyC;QAAC,iBAAoC;QACnH,iBAAuB;QACzB,iBAAsB;QACtB,uCAQC;;;QACC,iDAA+D;QACjE,iBAAc;QAChB,iBAAwB;QACxB,kCAA0C;;;;QAxC7B,qCAAmB;QAG5B,eAAiE;QAAjE,kGAAiE,yBAAA,+EAAA,kIAAA,oIAAA;QAoB3C,eAAmB;QAAnB,qCAAmB;QAEJ,eAAyC;QAAzC,yDAAyC;QAI9E,eAAiE;QAAjE,mGAAiE,yBAAA,gFAAA,iCAAA;;uFDfxD,eAAe;cAN3B,SAAS;eAAC;gBACT,QAAQ,EAAS,aAAa;gBAC9B,WAAW,EAAM,yBAAyB;gBAC1C,SAAS,EAAQ,CAAE,yBAAyB,CAAE;gBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;yEAKiD,OAAO;kBAAtD,SAAS;mBAAC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewChild\n} from '@angular/core';\nimport { LayoutComponentService } from './layout.component.service';\nimport { MatSidenav } from '@angular/material/sidenav';\n\n@Component({\n selector: 'rxap-layout',\n templateUrl: './layout.component.html',\n styleUrls: [ './layout.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LayoutComponent {\n\n public openWindowSidenav = false;\n\n @ViewChild(MatSidenav, { static: true }) public sidenav!: MatSidenav;\n\n constructor(\n public readonly layoutComponentService: LayoutComponentService,\n ) { }\n\n}\n","<rxap-header [sidenav]=\"sidenav\" class=\"header\"></rxap-header>\n<mat-sidenav-container autosize class=\"container\">\n <mat-sidenav\n [fixedBottomGap]=\"layoutComponentService.fixedBottomGap$ | async\"\n [fixedInViewport]=\"true\"\n [fixedTopGap]=\"layoutComponentService.fixedTopGap$ | async\"\n [mode]=\"(layoutComponentService.mode$ | async) ?? 'side'\"\n [opened]=\"(layoutComponentService.opened$ | async) ?? true\"\n class=\"sidenav\"\n >\n <rxap-sidenav>\n <ng-template rxapSidenavHeader>\n <img\n [routerLink]=\"['/']\"\n alt=\"logo\"\n class=\"logo\"\n [width]=\"layoutComponentService.logo.width\"\n [src]=\"layoutComponentService.logo.src\"\n />\n </ng-template>\n </rxap-sidenav>\n </mat-sidenav>\n <mat-sidenav-content class=\"content\">\n <rxap-sidenav-content [sidenav]=\"sidenav\">\n <ng-content></ng-content>\n <rxap-toggle-window-sidenav-button [(openWindowSidenav)]=\"openWindowSidenav\"></rxap-toggle-window-sidenav-button>\n </rxap-sidenav-content>\n </mat-sidenav-content>\n <mat-sidenav\n [fixedBottomGap]=\"layoutComponentService.fixedBottomGap$ | async\"\n [fixedInViewport]=\"true\"\n [fixedTopGap]=\"layoutComponentService.fixedTopGap$ | async\"\n [opened]=\"openWindowSidenav\"\n mode=\"side\"\n class=\"window-container-sidenav\"\n position=\"end\"\n >\n <rxap-window-container-sidenav></rxap-window-container-sidenav>\n </mat-sidenav>\n</mat-sidenav-container>\n<rxap-footer class=\"footer\"></rxap-footer>\n"]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { LayoutComponent } from './layout.component';
|
|
3
|
-
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
4
|
-
import { FooterModule } from '../footer/footer.component.module';
|
|
5
|
-
import { HeaderModule } from '../header/header.component.module';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { SidenavModule } from '../sidenav/sidenav.component.module';
|
|
8
|
-
import { SidenavContentModule } from '../sidenav-content/sidenav-content.component.module';
|
|
9
|
-
import { RXAP_NAVIGATION_CONFIG } from '../tokens';
|
|
10
|
-
import { WindowContainerSidenavModule } from '../window-container-sidenav/window-container-sidenav.component.module';
|
|
11
|
-
import { ToggleWindowSidenavButtonModule } from '../toggle-window-sidenav-button/toggle-window-sidenav-button.component.module';
|
|
12
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
13
|
-
import { RouterModule } from '@angular/router';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
export class LayoutModule {
|
|
16
|
-
static withNavigation(navigation) {
|
|
17
|
-
return {
|
|
18
|
-
ngModule: LayoutModule,
|
|
19
|
-
providers: [
|
|
20
|
-
{
|
|
21
|
-
provide: RXAP_NAVIGATION_CONFIG,
|
|
22
|
-
useValue: navigation
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
LayoutModule.ɵfac = function LayoutModule_Factory(t) { return new (t || LayoutModule)(); };
|
|
29
|
-
LayoutModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LayoutModule });
|
|
30
|
-
LayoutModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
|
|
31
|
-
MatSidenavModule,
|
|
32
|
-
FooterModule,
|
|
33
|
-
HeaderModule,
|
|
34
|
-
CommonModule,
|
|
35
|
-
SidenavModule,
|
|
36
|
-
SidenavContentModule,
|
|
37
|
-
WindowContainerSidenavModule,
|
|
38
|
-
ToggleWindowSidenavButtonModule,
|
|
39
|
-
FlexLayoutModule,
|
|
40
|
-
RouterModule
|
|
41
|
-
]] });
|
|
42
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutModule, [{
|
|
43
|
-
type: NgModule,
|
|
44
|
-
args: [{
|
|
45
|
-
declarations: [LayoutComponent],
|
|
46
|
-
imports: [
|
|
47
|
-
MatSidenavModule,
|
|
48
|
-
FooterModule,
|
|
49
|
-
HeaderModule,
|
|
50
|
-
CommonModule,
|
|
51
|
-
SidenavModule,
|
|
52
|
-
SidenavContentModule,
|
|
53
|
-
WindowContainerSidenavModule,
|
|
54
|
-
ToggleWindowSidenavButtonModule,
|
|
55
|
-
FlexLayoutModule,
|
|
56
|
-
RouterModule
|
|
57
|
-
],
|
|
58
|
-
exports: [LayoutComponent]
|
|
59
|
-
}]
|
|
60
|
-
}], null, null); })();
|
|
61
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LayoutModule, { declarations: [LayoutComponent], imports: [MatSidenavModule,
|
|
62
|
-
FooterModule,
|
|
63
|
-
HeaderModule,
|
|
64
|
-
CommonModule,
|
|
65
|
-
SidenavModule,
|
|
66
|
-
SidenavContentModule,
|
|
67
|
-
WindowContainerSidenavModule,
|
|
68
|
-
ToggleWindowSidenavButtonModule,
|
|
69
|
-
FlexLayoutModule,
|
|
70
|
-
RouterModule], exports: [LayoutComponent] }); })();
|
|
71
|
-
//# sourceMappingURL=layout.component.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.component.module.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/layout/layout.component.module.ts"],"names":[],"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AAoB;oBACpB,4BAA4B;oBAC5B,+BAA+B;oBAC/B,gBAAgB;oBAChB,YAAY;iBACb;gBACD,OAAO,EAAO,CAAE,eAAe,CAAE;aAClC;;wFACY,YAAY,mBAfP,eAAe,aAE7B,gBAAgB;QAChB,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,oBAAoB;QACpB,4BAA4B;QAC5B,+BAA+B;QAC/B,gBAAgB;QAChB,YAAY,aAEE,eAAe","sourcesContent":["import {\n NgModule,\n ModuleWithProviders\n} from '@angular/core';\nimport { LayoutComponent } from './layout.component';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { FooterModule } from '../footer/footer.component.module';\nimport { HeaderModule } from '../header/header.component.module';\nimport { CommonModule } from '@angular/common';\nimport { SidenavModule } from '../sidenav/sidenav.component.module';\nimport { SidenavContentModule } from '../sidenav-content/sidenav-content.component.module';\nimport { NavigationWithInserts } from '../navigation/navigation-item';\nimport { RXAP_NAVIGATION_CONFIG } from '../tokens';\nimport { WindowContainerSidenavModule } from '../window-container-sidenav/window-container-sidenav.component.module';\nimport { ToggleWindowSidenavButtonModule } from '../toggle-window-sidenav-button/toggle-window-sidenav-button.component.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { RouterModule } from '@angular/router';\n\n@NgModule({\n declarations: [ LayoutComponent ],\n imports: [\n MatSidenavModule,\n FooterModule,\n HeaderModule,\n CommonModule,\n SidenavModule,\n SidenavContentModule,\n WindowContainerSidenavModule,\n ToggleWindowSidenavButtonModule,\n FlexLayoutModule,\n RouterModule\n ],\n exports: [ LayoutComponent ]\n})\nexport class LayoutModule {\n\n public static withNavigation(navigation: NavigationWithInserts | (() => NavigationWithInserts)): ModuleWithProviders<LayoutModule> {\n\n return {\n ngModule: LayoutModule,\n providers: [\n {\n provide: RXAP_NAVIGATION_CONFIG,\n useValue: navigation\n }\n ]\n };\n }\n\n}\n"]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Injectable, Optional, Inject } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { tap, map } from 'rxjs/operators';
|
|
4
|
-
import { FooterService, HeaderService } from '@rxap/services';
|
|
5
|
-
import { RXAP_LOGO_CONFIG } from '../tokens';
|
|
6
|
-
import { ConfigService } from '@rxap/config';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@rxap/services";
|
|
9
|
-
import * as i2 from "@rxap/config";
|
|
10
|
-
export class LayoutComponentService {
|
|
11
|
-
constructor(footerComponentService, headerComponentService, logoConfig = null, config) {
|
|
12
|
-
this.footerComponentService = footerComponentService;
|
|
13
|
-
this.headerComponentService = headerComponentService;
|
|
14
|
-
this.config = config;
|
|
15
|
-
this.opened$ = new BehaviorSubject(true);
|
|
16
|
-
this.mode$ = new BehaviorSubject('side');
|
|
17
|
-
this.fixedTopGap$ = new BehaviorSubject(64);
|
|
18
|
-
this.mode$.next(this.config.get('navigation.mode', this.mode$.value));
|
|
19
|
-
this.opened$.next(this.config.get('navigation.open', this.opened$.value));
|
|
20
|
-
this.fixedBottomGap$ = this.footerComponentService.portalCount$.pipe(map(count => count * 64));
|
|
21
|
-
this.fixedTopGap$.next(this.headerComponentService.countComponent * 64);
|
|
22
|
-
this.headerComponentService.update$.pipe(tap(() => this.fixedTopGap$.next(this.headerComponentService.countComponent * 64))).subscribe();
|
|
23
|
-
this.logo = logoConfig !== null && logoConfig !== void 0 ? logoConfig : {
|
|
24
|
-
src: '/assets/logo.png',
|
|
25
|
-
width: '192'
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
LayoutComponentService.ɵfac = function LayoutComponentService_Factory(t) { return new (t || LayoutComponentService)(i0.ɵɵinject(i1.FooterService), i0.ɵɵinject(i1.HeaderService), i0.ɵɵinject(RXAP_LOGO_CONFIG, 8), i0.ɵɵinject(ConfigService)); };
|
|
30
|
-
LayoutComponentService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LayoutComponentService, factory: LayoutComponentService.ɵfac, providedIn: 'root' });
|
|
31
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutComponentService, [{
|
|
32
|
-
type: Injectable,
|
|
33
|
-
args: [{ providedIn: 'root' }]
|
|
34
|
-
}], function () { return [{ type: i1.FooterService }, { type: i1.HeaderService }, { type: undefined, decorators: [{
|
|
35
|
-
type: Optional
|
|
36
|
-
}, {
|
|
37
|
-
type: Inject,
|
|
38
|
-
args: [RXAP_LOGO_CONFIG]
|
|
39
|
-
}] }, { type: i2.ConfigService, decorators: [{
|
|
40
|
-
type: Inject,
|
|
41
|
-
args: [ConfigService]
|
|
42
|
-
}] }]; }, null); })();
|
|
43
|
-
//# sourceMappingURL=layout.component.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.component.service.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/layout/layout.component.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EAEhB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,GAAG,EACH,GAAG,EACJ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,aAAa,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;;;;AAI7C,MAAM,OAAO,sBAAsB;IAQjC,YACkB,sBAAqC,EACrC,sBAAqC,EACf,aAAgC,IAAI,EAEzD,MAAqB;QAJtB,2BAAsB,GAAtB,sBAAsB,CAAe;QACrC,2BAAsB,GAAtB,sBAAsB,CAAe;QAGpC,WAAM,GAAN,MAAM,CAAe;QAXjC,YAAO,GAAQ,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;QAClD,UA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n Injectable,\n Optional,\n Inject\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable\n} from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport {\n FooterService,\n HeaderService\n} from '@rxap/services';\nimport { RXAP_LOGO_CONFIG } from '../tokens';\nimport { LogoConfig } from '../types';\nimport { ConfigService } from '@rxap/config';\nimport { MatDrawerMode } from '@angular/material/sidenav';\n\n@Injectable({ providedIn: 'root' })\nexport class LayoutComponentService {\n\n public opened$ = new BehaviorSubject<boolean>(true);\n public mode$ = new BehaviorSubject<MatDrawerMode>('side');\n public fixedBottomGap$: Observable<number>;\n public fixedTopGap$ = new BehaviorSubject<number>(64);\n public logo: LogoConfig;\n\n public constructor(\n public readonly footerComponentService: FooterService,\n public readonly headerComponentService: HeaderService,\n @Optional() @Inject(RXAP_LOGO_CONFIG) logoConfig: LogoConfig | null = null,\n @Inject(ConfigService)\n private readonly config: ConfigService\n ) {\n this.mode$.next(this.config.get('navigation.mode', this.mode$.value));\n this.opened$.next(this.config.get('navigation.open', this.opened$.value));\n this.fixedBottomGap$ = this.footerComponentService.portalCount$.pipe(map(count => count * 64));\n this.fixedTopGap$.next(this.headerComponentService.countComponent * 64);\n this.headerComponentService.update$.pipe(\n tap(() => this.fixedTopGap$.next(this.headerComponentService.countComponent * 64))\n ).subscribe();\n this.logo = logoConfig ?? {\n src: '/assets/logo.png',\n width: '192'\n };\n }\n\n}\n"]}
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Component, Input, ChangeDetectionStrategy, ViewChild, HostBinding, ViewEncapsulation, ElementRef, Renderer2, HostListener, TemplateRef, ViewContainerRef, Inject, } from '@angular/core';
|
|
3
|
-
import { Required, DebounceCall } from '@rxap/utilities';
|
|
4
|
-
import { trigger, style, transition, animate } from '@angular/animations';
|
|
5
|
-
import { RouterLinkActive, Router, NavigationEnd } from '@angular/router';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import { filter, tap, delay, startWith, distinctUntilChanged, skip, } from 'rxjs/operators';
|
|
8
|
-
import { SidenavComponentService } from '../../sidenav/sidenav.component.service';
|
|
9
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
10
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "@angular/router";
|
|
13
|
-
import * as i2 from "../../sidenav/sidenav.component.service";
|
|
14
|
-
import * as i3 from "@angular/cdk/overlay";
|
|
15
|
-
const _c0 = ["navigationOverlay"];
|
|
16
|
-
const _c1 = ["rxap-navigation-item", ""];
|
|
17
|
-
function NavigationItemComponent_mat_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
-
i0.ɵɵelement(0, "mat-icon", 5);
|
|
19
|
-
} if (rf & 2) {
|
|
20
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
|
-
i0.ɵɵproperty("rxapIcon", ctx_r0.item.icon);
|
|
22
|
-
} }
|
|
23
|
-
function NavigationItemComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
-
i0.ɵɵelementStart(0, "span", 6);
|
|
25
|
-
i0.ɵɵtext(1);
|
|
26
|
-
i0.ɵɵelementEnd();
|
|
27
|
-
} if (rf & 2) {
|
|
28
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
29
|
-
i0.ɵɵadvance(1);
|
|
30
|
-
i0.ɵɵtextInterpolate(ctx_r1.item.label);
|
|
31
|
-
} }
|
|
32
|
-
function NavigationItemComponent_ul_5_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
-
i0.ɵɵelement(0, "ul", 7);
|
|
34
|
-
} if (rf & 2) {
|
|
35
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
36
|
-
i0.ɵɵproperty("@sub-nav", undefined)("items", ctx_r2.children)("level", ctx_r2.level + 1);
|
|
37
|
-
} }
|
|
38
|
-
function NavigationItemComponent_ng_template_7_li_2_a_1_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
-
i0.ɵɵelement(0, "mat-icon", 5);
|
|
40
|
-
} if (rf & 2) {
|
|
41
|
-
const child_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
42
|
-
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
43
|
-
i0.ɵɵproperty("rxapIcon", ctx_r8.asNavigationItem(child_r6).icon);
|
|
44
|
-
} }
|
|
45
|
-
function NavigationItemComponent_ng_template_7_li_2_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
-
i0.ɵɵelementStart(0, "a", 11);
|
|
47
|
-
i0.ɵɵtemplate(1, NavigationItemComponent_ng_template_7_li_2_a_1_mat_icon_1_Template, 1, 1, "mat-icon", 1);
|
|
48
|
-
i0.ɵɵelementStart(2, "span", 6);
|
|
49
|
-
i0.ɵɵtext(3);
|
|
50
|
-
i0.ɵɵelementEnd();
|
|
51
|
-
i0.ɵɵelementEnd();
|
|
52
|
-
} if (rf & 2) {
|
|
53
|
-
const child_r6 = i0.ɵɵnextContext().$implicit;
|
|
54
|
-
const ctx_r7 = i0.ɵɵnextContext(2);
|
|
55
|
-
i0.ɵɵproperty("routerLink", ctx_r7.asNavigationItem(child_r6).routerLink);
|
|
56
|
-
i0.ɵɵadvance(1);
|
|
57
|
-
i0.ɵɵproperty("ngIf", ctx_r7.asNavigationItem(child_r6).icon);
|
|
58
|
-
i0.ɵɵadvance(2);
|
|
59
|
-
i0.ɵɵtextInterpolate(ctx_r7.asNavigationItem(child_r6).label);
|
|
60
|
-
} }
|
|
61
|
-
function NavigationItemComponent_ng_template_7_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
-
i0.ɵɵelementStart(0, "li");
|
|
63
|
-
i0.ɵɵtemplate(1, NavigationItemComponent_ng_template_7_li_2_a_1_Template, 4, 3, "a", 10);
|
|
64
|
-
i0.ɵɵelementEnd();
|
|
65
|
-
} if (rf & 2) {
|
|
66
|
-
const child_r6 = ctx.$implicit;
|
|
67
|
-
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
68
|
-
i0.ɵɵadvance(1);
|
|
69
|
-
i0.ɵɵproperty("ngIf", ctx_r5.isNavigationItem(child_r6));
|
|
70
|
-
} }
|
|
71
|
-
function NavigationItemComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
72
|
-
const _r12 = i0.ɵɵgetCurrentView();
|
|
73
|
-
i0.ɵɵelementStart(0, "div", 8);
|
|
74
|
-
i0.ɵɵlistener("mouseenter", function NavigationItemComponent_ng_template_7_Template_div_mouseenter_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.lockeOverlay = true; })("mouseleave", function NavigationItemComponent_ng_template_7_Template_div_mouseleave_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r13 = i0.ɵɵnextContext(); ctx_r13.lockeOverlay = false; return ctx_r13.onMouseleave(); });
|
|
75
|
-
i0.ɵɵelementStart(1, "ul");
|
|
76
|
-
i0.ɵɵtemplate(2, NavigationItemComponent_ng_template_7_li_2_Template, 2, 1, "li", 9);
|
|
77
|
-
i0.ɵɵelementEnd();
|
|
78
|
-
i0.ɵɵelementEnd();
|
|
79
|
-
} if (rf & 2) {
|
|
80
|
-
const ctx_r4 = i0.ɵɵnextContext();
|
|
81
|
-
i0.ɵɵadvance(2);
|
|
82
|
-
i0.ɵɵproperty("ngForOf", ctx_r4.children);
|
|
83
|
-
} }
|
|
84
|
-
export class NavigationItemComponent {
|
|
85
|
-
constructor(router, sidenav, elementRef, renderer, overlay, viewContainerRef) {
|
|
86
|
-
this.router = router;
|
|
87
|
-
this.sidenav = sidenav;
|
|
88
|
-
this.elementRef = elementRef;
|
|
89
|
-
this.renderer = renderer;
|
|
90
|
-
this.overlay = overlay;
|
|
91
|
-
this.viewContainerRef = viewContainerRef;
|
|
92
|
-
this.children = null;
|
|
93
|
-
this.level = 0;
|
|
94
|
-
this.isActive = false;
|
|
95
|
-
this._subscription = new Subscription();
|
|
96
|
-
/**
|
|
97
|
-
* indicates the mouse is over the
|
|
98
|
-
*/
|
|
99
|
-
this.lockeOverlay = false;
|
|
100
|
-
}
|
|
101
|
-
ngOnChanges(changes) {
|
|
102
|
-
if (changes.item) {
|
|
103
|
-
const item = changes.item.currentValue;
|
|
104
|
-
this.children =
|
|
105
|
-
item.children && item.children.length ? item.children : null;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
ngAfterViewInit() {
|
|
109
|
-
this._subscription.add(this.router.events
|
|
110
|
-
.pipe(filter((event) => event instanceof NavigationEnd), startWith(true), delay(100), tap(() => {
|
|
111
|
-
var _a;
|
|
112
|
-
if (this.routerLinkActive.isActive) {
|
|
113
|
-
if (!this.sidenav.collapsed$.value) {
|
|
114
|
-
// only close the overlay if sidenav collapsed
|
|
115
|
-
(_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
|
|
116
|
-
}
|
|
117
|
-
this.renderer.addClass(this.elementRef.nativeElement, 'active');
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
this.renderer.removeClass(this.elementRef.nativeElement, 'active');
|
|
121
|
-
}
|
|
122
|
-
}))
|
|
123
|
-
.subscribe());
|
|
124
|
-
}
|
|
125
|
-
ngOnInit() {
|
|
126
|
-
// detach the navigation overlay if the sidenav collapsed
|
|
127
|
-
// state is changed
|
|
128
|
-
this._subscription.add(this.sidenav.collapsed$
|
|
129
|
-
.pipe(skip(1), distinctUntilChanged(), tap(() => { var _a; return (_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.detach(); }))
|
|
130
|
-
.subscribe());
|
|
131
|
-
}
|
|
132
|
-
ngOnDestroy() {
|
|
133
|
-
var _a, _b;
|
|
134
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
135
|
-
(_b = this._overlayRef) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
136
|
-
}
|
|
137
|
-
onMouseenter() {
|
|
138
|
-
if (this.children) {
|
|
139
|
-
if (!this.routerLinkActive.isActive || this.sidenav.collapsed$.value) {
|
|
140
|
-
if (!this._overlayRef) {
|
|
141
|
-
this._overlayRef = this.overlay.create({
|
|
142
|
-
positionStrategy: this.overlay
|
|
143
|
-
.position()
|
|
144
|
-
.flexibleConnectedTo(this.elementRef)
|
|
145
|
-
.withPositions([
|
|
146
|
-
{
|
|
147
|
-
originY: 'top',
|
|
148
|
-
originX: 'end',
|
|
149
|
-
overlayY: 'top',
|
|
150
|
-
overlayX: 'start',
|
|
151
|
-
},
|
|
152
|
-
]),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
if (!this._overlayRef.hasAttached()) {
|
|
156
|
-
this._embeddedViewRef = this._overlayRef.attach(new TemplatePortal(this._navigationOverlay, this.viewContainerRef));
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
onMouseleave() {
|
|
162
|
-
var _a;
|
|
163
|
-
if (!this.lockeOverlay) {
|
|
164
|
-
(_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
// region type save item property
|
|
168
|
-
// required to check the type of the item property in the ngFor loop
|
|
169
|
-
isNavigationDividerItem(item) {
|
|
170
|
-
return item['divider'];
|
|
171
|
-
}
|
|
172
|
-
isNavigationItem(item) {
|
|
173
|
-
return !this.isNavigationDividerItem(item);
|
|
174
|
-
}
|
|
175
|
-
asNavigationItem(item) {
|
|
176
|
-
if (!this.isNavigationItem(item)) {
|
|
177
|
-
throw new Error('The item is not a NavigationItem');
|
|
178
|
-
}
|
|
179
|
-
return item;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
NavigationItemComponent.ɵfac = function NavigationItemComponent_Factory(t) { return new (t || NavigationItemComponent)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(SidenavComponentService), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(Overlay), i0.ɵɵdirectiveInject(ViewContainerRef)); };
|
|
183
|
-
NavigationItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationItemComponent, selectors: [["li", "rxap-navigation-item", ""]], viewQuery: function NavigationItemComponent_Query(rf, ctx) { if (rf & 1) {
|
|
184
|
-
i0.ɵɵviewQuery(RouterLinkActive, 7);
|
|
185
|
-
i0.ɵɵviewQuery(_c0, 5);
|
|
186
|
-
} if (rf & 2) {
|
|
187
|
-
let _t;
|
|
188
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.routerLinkActive = _t.first);
|
|
189
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._navigationOverlay = _t.first);
|
|
190
|
-
} }, hostAttrs: [1, "rxap-navigation-item"], hostVars: 2, hostBindings: function NavigationItemComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
191
|
-
i0.ɵɵlistener("mouseenter", function NavigationItemComponent_mouseenter_HostBindingHandler() { return ctx.onMouseenter(); })("mouseleave", function NavigationItemComponent_mouseleave_HostBindingHandler() { return ctx.onMouseleave(); });
|
|
192
|
-
} if (rf & 2) {
|
|
193
|
-
i0.ɵɵclassProp("active", ctx.isActive);
|
|
194
|
-
} }, inputs: { item: "item", level: "level" }, features: [i0.ɵɵNgOnChangesFeature], attrs: _c1, decls: 9, vars: 15, consts: [["routerLinkActive", "link-active", "matRipple", "", 3, "routerLink", "matTooltipDisabled", "matTooltip"], ["class", "icon", 3, "rxapIcon", 4, "ngIf"], [3, "ngIf"], ["rxap-navigation", "", "class", "sub-items", "fxFlex", "nogrow", 3, "items", "level", 4, "ngIf"], ["navigationOverlay", ""], [1, "icon", 3, "rxapIcon"], [1, "label"], ["rxap-navigation", "", "fxFlex", "nogrow", 1, "sub-items", 3, "items", "level"], [1, "navigation-overlay-container", "mat-elevation-z1", 3, "mouseenter", "mouseleave"], [4, "ngFor", "ngForOf"], ["class", "navigation-link mat-body-2 mat-body-strong", "matRipple", "", 3, "routerLink", 4, "ngIf"], ["matRipple", "", 1, "navigation-link", "mat-body-2", "mat-body-strong", 3, "routerLink"]], template: function NavigationItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
195
|
-
i0.ɵɵelementStart(0, "a", 0);
|
|
196
|
-
i0.ɵɵpipe(1, "async");
|
|
197
|
-
i0.ɵɵtemplate(2, NavigationItemComponent_mat_icon_2_Template, 1, 1, "mat-icon", 1);
|
|
198
|
-
i0.ɵɵtemplate(3, NavigationItemComponent_ng_template_3_Template, 2, 1, "ng-template", 2);
|
|
199
|
-
i0.ɵɵpipe(4, "async");
|
|
200
|
-
i0.ɵɵelementEnd();
|
|
201
|
-
i0.ɵɵtemplate(5, NavigationItemComponent_ul_5_Template, 1, 3, "ul", 3);
|
|
202
|
-
i0.ɵɵpipe(6, "async");
|
|
203
|
-
i0.ɵɵtemplate(7, NavigationItemComponent_ng_template_7_Template, 3, 1, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
|
|
204
|
-
} if (rf & 2) {
|
|
205
|
-
i0.ɵɵclassMapInterpolate1("navigation-link mat-body-2 mat-body-strong navigation-level-", ctx.level, "");
|
|
206
|
-
i0.ɵɵproperty("routerLink", ctx.item.routerLink)("matTooltipDisabled", !i0.ɵɵpipeBind1(1, 9, ctx.sidenav.collapsed$))("matTooltip", ctx.item.label);
|
|
207
|
-
i0.ɵɵadvance(2);
|
|
208
|
-
i0.ɵɵproperty("ngIf", ctx.item.icon);
|
|
209
|
-
i0.ɵɵadvance(1);
|
|
210
|
-
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(4, 11, ctx.sidenav.collapsed$));
|
|
211
|
-
i0.ɵɵadvance(2);
|
|
212
|
-
i0.ɵɵproperty("ngIf", ctx.routerLinkActive.isActive && !i0.ɵɵpipeBind1(6, 13, ctx.sidenav.collapsed$) && ctx.children);
|
|
213
|
-
} }, styles: [".navigation-overlay-container,.rxap-navigation-item{display:flex;flex-direction:column;min-height:48px}.navigation-overlay-container .navigation-link,.rxap-navigation-item .navigation-link{display:flex;flex-direction:row;align-items:center;text-decoration:none;height:48px}.navigation-overlay-container .navigation-link .icon,.rxap-navigation-item .navigation-link .icon{margin:0 16px}.navigation-overlay-container .navigation-link .label,.rxap-navigation-item .navigation-link .label{padding-right:12px}.navigation-overlay-container .navigation-link.navigation-level-1,.rxap-navigation-item .navigation-link.navigation-level-1{padding-left:52px}.navigation-overlay-container .navigation-link.navigation-level-1 .icon,.rxap-navigation-item .navigation-link.navigation-level-1 .icon{padding-left:0}.navigation-overlay-container .navigation-link.navigation-level-2,.rxap-navigation-item .navigation-link.navigation-level-2{padding-left:88px}.navigation-overlay-container .navigation-link.navigation-level-2 .icon,.rxap-navigation-item .navigation-link.navigation-level-2 .icon{padding-left:0}.navigation-overlay-container{padding:0 16px}.navigation-overlay-container ul{list-style-type:none;margin:0;padding:0}.navigation-overlay-container ul .navigation-link .label{padding-right:0}.navigation-overlay-container ul .navigation-link .icon{margin-left:0}"], encapsulation: 2, data: { animation: [
|
|
214
|
-
trigger('sub-nav', [
|
|
215
|
-
transition(':enter', [
|
|
216
|
-
style({ display: 'block', height: '0', overflow: 'hidden' }),
|
|
217
|
-
animate(150, style({ height: '*' })),
|
|
218
|
-
]),
|
|
219
|
-
transition(':leave', [
|
|
220
|
-
style({ overflow: 'hidden' }),
|
|
221
|
-
animate(300, style({ height: '0' })),
|
|
222
|
-
style({ display: 'none' }),
|
|
223
|
-
]),
|
|
224
|
-
]),
|
|
225
|
-
] }, changeDetection: 0 });
|
|
226
|
-
__decorate([
|
|
227
|
-
Required,
|
|
228
|
-
__metadata("design:type", Object)
|
|
229
|
-
], NavigationItemComponent.prototype, "item", void 0);
|
|
230
|
-
__decorate([
|
|
231
|
-
DebounceCall(100),
|
|
232
|
-
__metadata("design:type", Function),
|
|
233
|
-
__metadata("design:paramtypes", []),
|
|
234
|
-
__metadata("design:returntype", void 0)
|
|
235
|
-
], NavigationItemComponent.prototype, "onMouseleave", null);
|
|
236
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationItemComponent, [{
|
|
237
|
-
type: Component,
|
|
238
|
-
args: [{
|
|
239
|
-
selector: 'li[rxap-navigation-item]',
|
|
240
|
-
templateUrl: './navigation-item.component.html',
|
|
241
|
-
styleUrls: ['./navigation-item.component.scss'],
|
|
242
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
243
|
-
encapsulation: ViewEncapsulation.None,
|
|
244
|
-
host: {
|
|
245
|
-
class: 'rxap-navigation-item',
|
|
246
|
-
},
|
|
247
|
-
animations: [
|
|
248
|
-
trigger('sub-nav', [
|
|
249
|
-
transition(':enter', [
|
|
250
|
-
style({ display: 'block', height: '0', overflow: 'hidden' }),
|
|
251
|
-
animate(150, style({ height: '*' })),
|
|
252
|
-
]),
|
|
253
|
-
transition(':leave', [
|
|
254
|
-
style({ overflow: 'hidden' }),
|
|
255
|
-
animate(300, style({ height: '0' })),
|
|
256
|
-
style({ display: 'none' }),
|
|
257
|
-
]),
|
|
258
|
-
]),
|
|
259
|
-
],
|
|
260
|
-
}]
|
|
261
|
-
}], function () { return [{ type: i1.Router, decorators: [{
|
|
262
|
-
type: Inject,
|
|
263
|
-
args: [Router]
|
|
264
|
-
}] }, { type: i2.SidenavComponentService, decorators: [{
|
|
265
|
-
type: Inject,
|
|
266
|
-
args: [SidenavComponentService]
|
|
267
|
-
}] }, { type: i0.ElementRef, decorators: [{
|
|
268
|
-
type: Inject,
|
|
269
|
-
args: [ElementRef]
|
|
270
|
-
}] }, { type: i0.Renderer2, decorators: [{
|
|
271
|
-
type: Inject,
|
|
272
|
-
args: [Renderer2]
|
|
273
|
-
}] }, { type: i3.Overlay, decorators: [{
|
|
274
|
-
type: Inject,
|
|
275
|
-
args: [Overlay]
|
|
276
|
-
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
277
|
-
type: Inject,
|
|
278
|
-
args: [ViewContainerRef]
|
|
279
|
-
}] }]; }, { routerLinkActive: [{
|
|
280
|
-
type: ViewChild,
|
|
281
|
-
args: [RouterLinkActive, { static: true }]
|
|
282
|
-
}], item: [{
|
|
283
|
-
type: Input
|
|
284
|
-
}], level: [{
|
|
285
|
-
type: Input
|
|
286
|
-
}], isActive: [{
|
|
287
|
-
type: HostBinding,
|
|
288
|
-
args: ['class.active']
|
|
289
|
-
}], _navigationOverlay: [{
|
|
290
|
-
type: ViewChild,
|
|
291
|
-
args: ['navigationOverlay']
|
|
292
|
-
}], onMouseenter: [{
|
|
293
|
-
type: HostListener,
|
|
294
|
-
args: ['mouseenter']
|
|
295
|
-
}], onMouseleave: [{
|
|
296
|
-
type: HostListener,
|
|
297
|
-
args: ['mouseleave']
|
|
298
|
-
}] }); })();
|
|
299
|
-
//# sourceMappingURL=navigation-item.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-item.component.js","sourceRoot":"","sources":["../../../../../../../libs/layout/src/lib/navigation/navigation-item/navigation-item.component.ts","../../../../../../../libs/layout/src/lib/navigation/navigation-item/navigation-item.component.html"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,uBAAuB,EAGvB,SAAS,EAGT,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,YAAY,EAEZ,WAAW,EACX,gBAAgB,EAEhB,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAM1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,MAAM,EACN,GAAG,EACH,KAAK,EACL,SAAS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;mBAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;YAKtC,IAAI;kBAFV,KAAK;YAKC,KAAK;kBADX,KAAK;YAIC,QAAQ;kBADd,WAAW;mBAAC,cAAc;YAInB,kBAAkB;kBADzB,SAAS;mBAAC,mBAAmB;YAkFvB,YAAY;kBADlB,YAAY;mBAAC,YAAY;YA8BnB,YAAY;kBAFlB,YAAY;mBAAC,YAAY","sourcesContent":["import {\n Component,\n Input,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n ViewChild,\n OnDestroy,\n AfterViewInit,\n HostBinding,\n ViewEncapsulation,\n ElementRef,\n Renderer2,\n HostListener,\n OnInit,\n TemplateRef,\n ViewContainerRef,\n EmbeddedViewRef,\n Inject,\n} from '@angular/core';\nimport { Required, DebounceCall } from '@rxap/utilities';\nimport { trigger, style, transition, animate } from '@angular/animations';\nimport {\n NavigationItem,\n Navigation,\n NavigationDividerItem,\n} from '../navigation-item';\nimport { RouterLinkActive, Router, NavigationEnd } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport {\n filter,\n tap,\n delay,\n startWith,\n distinctUntilChanged,\n skip,\n} from 'rxjs/operators';\nimport { SidenavComponentService } from '../../sidenav/sidenav.component.service';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\n\n@Component({\n selector: 'li[rxap-navigation-item]',\n templateUrl: './navigation-item.component.html',\n styleUrls: ['./navigation-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'rxap-navigation-item',\n },\n animations: [\n trigger('sub-nav', [\n transition(':enter', [\n style({ display: 'block', height: '0', overflow: 'hidden' }),\n animate(150, style({ height: '*' })),\n ]),\n transition(':leave', [\n style({ overflow: 'hidden' }),\n animate(300, style({ height: '0' })),\n style({ display: 'none' }),\n ]),\n ]),\n ],\n})\nexport class NavigationItemComponent\n implements OnChanges, AfterViewInit, OnDestroy, OnInit\n{\n public children: Navigation | null = null;\n\n @ViewChild(RouterLinkActive, { static: true })\n public routerLinkActive!: RouterLinkActive;\n\n @Input()\n @Required\n public item!: NavigationItem;\n\n @Input()\n public level: number = 0;\n\n @HostBinding('class.active')\n public isActive: boolean = false;\n\n @ViewChild('navigationOverlay')\n private _navigationOverlay!: TemplateRef<any>;\n\n private readonly _subscription = new Subscription();\n\n private _overlayRef?: OverlayRef;\n private _embeddedViewRef?: EmbeddedViewRef<any>;\n\n /**\n * indicates the mouse is over the\n */\n public lockeOverlay: boolean = false;\n\n constructor(\n @Inject(Router)\n private readonly router: Router,\n @Inject(SidenavComponentService)\n public readonly sidenav: SidenavComponentService,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef,\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(Overlay)\n private readonly overlay: Overlay,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.item) {\n const item: NavigationItem = changes.item.currentValue;\n this.children =\n item.children && item.children.length ? item.children : null;\n }\n }\n\n public ngAfterViewInit() {\n this._subscription.add(\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n startWith(true),\n delay(100),\n tap(() => {\n if (this.routerLinkActive.isActive) {\n if (!this.sidenav.collapsed$.value) {\n // only close the overlay if sidenav collapsed\n this._overlayRef?.detach();\n }\n this.renderer.addClass(this.elementRef.nativeElement, 'active');\n } else {\n this.renderer.removeClass(\n this.elementRef.nativeElement,\n 'active'\n );\n }\n })\n )\n .subscribe()\n );\n }\n\n public ngOnInit() {\n // detach the navigation overlay if the sidenav collapsed\n // state is changed\n this._subscription.add(\n this.sidenav.collapsed$\n .pipe(\n skip(1),\n distinctUntilChanged(),\n tap(() => this._overlayRef?.detach())\n )\n .subscribe()\n );\n }\n\n public ngOnDestroy() {\n this._subscription?.unsubscribe();\n this._overlayRef?.dispose();\n }\n\n @HostListener('mouseenter')\n public onMouseenter() {\n if (this.children) {\n if (!this.routerLinkActive.isActive || this.sidenav.collapsed$.value) {\n if (!this._overlayRef) {\n this._overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n {\n originY: 'top',\n originX: 'end',\n overlayY: 'top',\n overlayX: 'start',\n },\n ]),\n });\n }\n if (!this._overlayRef.hasAttached()) {\n this._embeddedViewRef = this._overlayRef.attach(\n new TemplatePortal(this._navigationOverlay, this.viewContainerRef)\n );\n }\n }\n }\n }\n\n @HostListener('mouseleave')\n @DebounceCall(100)\n public onMouseleave() {\n if (!this.lockeOverlay) {\n this._overlayRef?.detach();\n }\n }\n\n // region type save item property\n\n // required to check the type of the item property in the ngFor loop\n\n public isNavigationDividerItem(\n item: NavigationItem | NavigationDividerItem\n ): item is NavigationDividerItem {\n return (item as any)['divider'];\n }\n\n public isNavigationItem(\n item: NavigationItem | NavigationDividerItem\n ): item is NavigationItem {\n return !this.isNavigationDividerItem(item);\n }\n\n public asNavigationItem(\n item: NavigationItem | NavigationDividerItem\n ): NavigationItem {\n if (!this.isNavigationItem(item)) {\n throw new Error('The item is not a NavigationItem');\n }\n return item;\n }\n\n // endregion\n}\n","<a [routerLink]=\"item.routerLink\"\n routerLinkActive=\"link-active\"\n [matTooltipDisabled]=\"!(sidenav.collapsed$ | async)\"\n [matTooltip]=\"item.label\"\n class=\"navigation-link mat-body-2 mat-body-strong navigation-level-{{level}}\" matRipple>\n <mat-icon *ngIf=\"item.icon\" [rxapIcon]=\"item.icon\" class=\"icon\"></mat-icon>\n <ng-template [ngIf]=\"!(sidenav.collapsed$ | async)\">\n <span class=\"label\">{{ item.label }}</span>\n </ng-template>\n</a>\n\n<ul rxap-navigation\n *ngIf=\"routerLinkActive.isActive && !(sidenav.collapsed$ | async) && children\"\n [@sub-nav]\n [items]=\"children\"\n [level]=\"level + 1\"\n class=\"sub-items\"\n fxFlex=\"nogrow\"\n>\n</ul>\n\n<ng-template #navigationOverlay>\n <div class=\"navigation-overlay-container mat-elevation-z1\"\n (mouseenter)=\"lockeOverlay = true\" (mouseleave)=\"lockeOverlay = false; onMouseleave()\">\n <ul>\n <li *ngFor=\"let child of children\">\n <a *ngIf=\"isNavigationItem(child)\" [routerLink]=\"asNavigationItem(child).routerLink\"\n class=\"navigation-link mat-body-2 mat-body-strong\" matRipple>\n <mat-icon *ngIf=\"asNavigationItem(child).icon\" [rxapIcon]=\"asNavigationItem(child).icon\" class=\"icon\"></mat-icon>\n <span class=\"label\">{{ asNavigationItem(child).label }}</span>\n </a>\n </li>\n </ul>\n </div>\n</ng-template>\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function IsNavigationDividerItem(item) {
|
|
2
|
-
return item && item.hasOwnProperty('divider') && item.divider;
|
|
3
|
-
}
|
|
4
|
-
export function IsNavigationInsertItem(item) {
|
|
5
|
-
return item && item.hasOwnProperty('insert');
|
|
6
|
-
}
|
|
7
|
-
export function IsNavigationItem(item) {
|
|
8
|
-
return (item && item.hasOwnProperty('routerLink') && item.hasOwnProperty('label'));
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=navigation-item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-item.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/navigation-item.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,uBAAuB,CACrC,IAAS;IAET,OAAO,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC;AAChE,CAAC;AAMD,MAAM,UAAU,sBAAsB,CACpC,IAAS;IAET,OAAO,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAoBD,MAAM,UAAU,gBAAgB,CAAC,IAAS;IACxC,OAAO,CACL,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAC1E,CAAC;AACJ,CAAC","sourcesContent":["import { IconConfig } from '@rxap/utilities';\nimport {\n InjectionToken,\n Type,\n AbstractType\n} from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport type Navigation = Array<NavigationItem | NavigationDividerItem>;\n\nexport type NavigationWithInserts = Array<\n | NavigationItem<NavigationWithInserts>\n | NavigationDividerItem\n | NavigationInsertItem\n>;\n\nexport interface NavigationDividerItem {\n divider: boolean;\n title?: string;\n}\n\nexport function IsNavigationDividerItem(\n item: any\n): item is NavigationDividerItem {\n return item && item.hasOwnProperty('divider') && item.divider;\n}\n\nexport interface NavigationInsertItem {\n insert: string;\n}\n\nexport function IsNavigationInsertItem(\n item: any\n): item is NavigationInsertItem {\n return item && item.hasOwnProperty('insert');\n}\n\nexport interface NavigationStatus {\n isVisible(\n navigationItem: NavigationItem,\n ): Observable<boolean> | Promise<boolean> | boolean;\n}\n\nexport interface NavigationItem<Children = Navigation> extends Record<string, unknown> {\n routerLink: string[];\n label: string;\n children?: Children;\n icon?: IconConfig;\n status?: Array<\n | Type<NavigationStatus>\n | InjectionToken<NavigationStatus>\n | AbstractType<NavigationStatus>\n >;\n}\n\nexport function IsNavigationItem(item: any): item is NavigationItem {\n return (\n item && item.hasOwnProperty('routerLink') && item.hasOwnProperty('label')\n );\n}\n"]}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Component, ChangeDetectionStrategy, Input, ChangeDetectorRef, ViewEncapsulation, HostBinding, Inject } from '@angular/core';
|
|
3
|
-
import { Required, coerceBoolean } from '@rxap/utilities';
|
|
4
|
-
import { NavigationService } from './navigation.service';
|
|
5
|
-
import { tap } from 'rxjs/operators';
|
|
6
|
-
import { SidenavComponentService } from '../sidenav/sidenav.component.service';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@angular/common";
|
|
9
|
-
import * as i2 from "@angular/material/divider";
|
|
10
|
-
import * as i3 from "@angular/flex-layout/flex";
|
|
11
|
-
import * as i4 from "./navigation-item/navigation-item.component";
|
|
12
|
-
import * as i5 from "./navigation.service";
|
|
13
|
-
import * as i6 from "../sidenav/sidenav.component.service";
|
|
14
|
-
const _c0 = ["rxap-navigation", ""];
|
|
15
|
-
function NavigationComponent_ng_template_0_ng_template_0_div_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
-
i0.ɵɵelementStart(0, "span", 2);
|
|
17
|
-
i0.ɵɵtext(1);
|
|
18
|
-
i0.ɵɵelementEnd();
|
|
19
|
-
} if (rf & 2) {
|
|
20
|
-
const item_r1 = i0.ɵɵnextContext(3).$implicit;
|
|
21
|
-
i0.ɵɵadvance(1);
|
|
22
|
-
i0.ɵɵtextInterpolate(item_r1.title);
|
|
23
|
-
} }
|
|
24
|
-
function NavigationComponent_ng_template_0_ng_template_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
-
i0.ɵɵelementStart(0, "div", 4);
|
|
26
|
-
i0.ɵɵtemplate(1, NavigationComponent_ng_template_0_ng_template_0_div_1_span_1_Template, 2, 1, "span", 5);
|
|
27
|
-
i0.ɵɵelementEnd();
|
|
28
|
-
} if (rf & 2) {
|
|
29
|
-
const item_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
30
|
-
i0.ɵɵadvance(1);
|
|
31
|
-
i0.ɵɵproperty("ngIf", item_r1.title);
|
|
32
|
-
} }
|
|
33
|
-
function NavigationComponent_ng_template_0_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
-
i0.ɵɵelement(0, "mat-divider", 2);
|
|
35
|
-
i0.ɵɵtemplate(1, NavigationComponent_ng_template_0_ng_template_0_div_1_Template, 2, 1, "div", 3);
|
|
36
|
-
i0.ɵɵpipe(2, "async");
|
|
37
|
-
} if (rf & 2) {
|
|
38
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
39
|
-
i0.ɵɵadvance(1);
|
|
40
|
-
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(2, 1, ctx_r2.sidenav.collapsed$));
|
|
41
|
-
} }
|
|
42
|
-
function NavigationComponent_ng_template_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
-
i0.ɵɵelement(0, "li", 6);
|
|
44
|
-
} if (rf & 2) {
|
|
45
|
-
const item_r1 = i0.ɵɵnextContext().$implicit;
|
|
46
|
-
const ctx_r3 = i0.ɵɵnextContext();
|
|
47
|
-
i0.ɵɵproperty("level", ctx_r3.level)("item", ctx_r3.asNavigationItem(item_r1));
|
|
48
|
-
} }
|
|
49
|
-
function NavigationComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
-
i0.ɵɵtemplate(0, NavigationComponent_ng_template_0_ng_template_0_Template, 3, 3, "ng-template", 1);
|
|
51
|
-
i0.ɵɵtemplate(1, NavigationComponent_ng_template_0_ng_template_1_Template, 1, 2, "ng-template", 1);
|
|
52
|
-
} if (rf & 2) {
|
|
53
|
-
const item_r1 = ctx.$implicit;
|
|
54
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
55
|
-
i0.ɵɵproperty("ngIf", ctx_r0.isNavigationDividerItem(item_r1));
|
|
56
|
-
i0.ɵɵadvance(1);
|
|
57
|
-
i0.ɵɵproperty("ngIf", ctx_r0.isNavigationItem(item_r1));
|
|
58
|
-
} }
|
|
59
|
-
export class NavigationComponent {
|
|
60
|
-
constructor(navigationService, cdr, sidenav) {
|
|
61
|
-
this.navigationService = navigationService;
|
|
62
|
-
this.cdr = cdr;
|
|
63
|
-
this.sidenav = sidenav;
|
|
64
|
-
this._root = false;
|
|
65
|
-
this.level = 0;
|
|
66
|
-
}
|
|
67
|
-
set root(value) {
|
|
68
|
-
this._root = coerceBoolean(value);
|
|
69
|
-
}
|
|
70
|
-
ngOnInit() {
|
|
71
|
-
if (this._root) {
|
|
72
|
-
this.items = [];
|
|
73
|
-
this.subscription = this.navigationService.config$
|
|
74
|
-
.pipe(tap((navigation) => (this.items = navigation)), tap(() => this.cdr.detectChanges()))
|
|
75
|
-
.subscribe();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
ngOnDestroy() {
|
|
79
|
-
var _a;
|
|
80
|
-
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
81
|
-
}
|
|
82
|
-
// region type save item property
|
|
83
|
-
// required to check the type of the item property in the ngFor loop
|
|
84
|
-
isNavigationDividerItem(item) {
|
|
85
|
-
return item['divider'];
|
|
86
|
-
}
|
|
87
|
-
isNavigationItem(item) {
|
|
88
|
-
return !this.isNavigationDividerItem(item);
|
|
89
|
-
}
|
|
90
|
-
asNavigationItem(item) {
|
|
91
|
-
if (!this.isNavigationItem(item)) {
|
|
92
|
-
throw new Error('The item is not a NavigationItem');
|
|
93
|
-
}
|
|
94
|
-
return item;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(i0.ɵɵdirectiveInject(NavigationService), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(SidenavComponentService)); };
|
|
98
|
-
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["ul", "rxap-navigation", ""]], hostAttrs: [1, "rxap-navigation"], hostVars: 2, hostBindings: function NavigationComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
99
|
-
i0.ɵɵclassProp("rxap-root-navigation", ctx._root);
|
|
100
|
-
} }, inputs: { root: "root", items: "items", level: "level" }, attrs: _c0, decls: 1, vars: 1, consts: [["ngFor", "", 3, "ngForOf"], [3, "ngIf"], ["fxFlex", "nogrow"], ["class", "divider-title", "fxFlex", "nogrow", "fxLayout", "row", "fxLayoutAlign", "start end", 4, "ngIf"], ["fxFlex", "nogrow", "fxLayout", "row", "fxLayoutAlign", "start end", 1, "divider-title"], ["fxFlex", "nogrow", 4, "ngIf"], ["rxap-navigation-item", "", 1, "item", 3, "level", "item"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
-
i0.ɵɵtemplate(0, NavigationComponent_ng_template_0_Template, 2, 2, "ng-template", 0);
|
|
102
|
-
} if (rf & 2) {
|
|
103
|
-
i0.ɵɵproperty("ngForOf", ctx.items);
|
|
104
|
-
} }, directives: [i1.NgForOf, i1.NgIf, i2.MatDivider, i3.DefaultFlexDirective, i3.DefaultLayoutDirective, i3.DefaultLayoutAlignDirective, i4.NavigationItemComponent], pipes: [i1.AsyncPipe], styles: [".rxap-navigation{list-style-type:none;padding:0}.rxap-navigation .divider-title{padding-left:18px;height:28px;align-content:center}"], encapsulation: 2, changeDetection: 0 });
|
|
105
|
-
__decorate([
|
|
106
|
-
Required,
|
|
107
|
-
__metadata("design:type", Array)
|
|
108
|
-
], NavigationComponent.prototype, "items", void 0);
|
|
109
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationComponent, [{
|
|
110
|
-
type: Component,
|
|
111
|
-
args: [{
|
|
112
|
-
selector: 'ul[rxap-navigation]',
|
|
113
|
-
templateUrl: './navigation.component.html',
|
|
114
|
-
styleUrls: ['./navigation.component.scss'],
|
|
115
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
116
|
-
encapsulation: ViewEncapsulation.None,
|
|
117
|
-
host: { class: 'rxap-navigation' },
|
|
118
|
-
}]
|
|
119
|
-
}], function () { return [{ type: i5.NavigationService, decorators: [{
|
|
120
|
-
type: Inject,
|
|
121
|
-
args: [NavigationService]
|
|
122
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
123
|
-
type: Inject,
|
|
124
|
-
args: [ChangeDetectorRef]
|
|
125
|
-
}] }, { type: i6.SidenavComponentService, decorators: [{
|
|
126
|
-
type: Inject,
|
|
127
|
-
args: [SidenavComponentService]
|
|
128
|
-
}] }]; }, { _root: [{
|
|
129
|
-
type: HostBinding,
|
|
130
|
-
args: ['class.rxap-root-navigation']
|
|
131
|
-
}], root: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], items: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}], level: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}] }); })();
|
|
138
|
-
//# sourceMappingURL=navigation.component.js.map
|