@rxap/layout 12.2.3 → 13.0.0-next.2
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 +76 -0
- package/esm2020/lib/navigation/navigation.service.mjs +143 -0
- package/{esm2015/lib/navigation/replace-router-paths.pipe.js → esm2020/lib/navigation/replace-router-paths.pipe.mjs} +1 -1
- 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 +2577 -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 -3232
- 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 -76
- 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.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":"navigation.component.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/navigation.component.ts","../../../../../../libs/layout/src/lib/navigation/navigation.component.html"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EAET,uBAAuB,EACvB,KAAK,EAEL,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,MAAM,EACP,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,QAAQ,EACR,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;;;;;;;;;;ICnBzE,+BAAyC;IAAA,YAAc;IAAA,iBAAO;;;IAArB,eAAc;IAAd,mCAAc;;;IADzD,8BAA0H;IACxH,wGAA8D;IAChE,iBAAM;;;IADmB,eAAgB;IAAhB,oCAAgB;;;IAFzC,iCAA2C;IAC3C,gGAEM;;;;IAFA,eAAmC;IAAnC,uEAAmC;;;IAKzC,wBAA2F;;;;IAArD,oCAAe,0CAAA;;;IAPvD,kGAKc;IACd,kGAEc;;;;IARD,8DAAsC;IAMtC,eAA+B;IAA/B,uDAA+B;;AD0B9C,MAAM,OAAO,mBAAmB;IAkB9B,YAEmB,iBAAoC,EAEpC,GAAsB,EAEvB,OAAgC;QAJ/B,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,QAAG,GAAH,GAAG,CAAmB;QAEvB,YAAO,GAAP,OAAO,CAAyB;QAtB3C,UAAK,GAAG,KAAK,CAAC;QAcd,UAAK,GAAW,CAAC,CAAC;IAStB,CAAC;IArBJ,IACW,IAAI,CAAC,KAAmB;QACjC,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAoBM,QAAQ;QACb,IAAI,IAAI,CA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,EAAE,iBAAiB,EAAE;aACnC;;sBAoBI,MAAM;uBAAC,iBAAiB;;sBAExB,MAAM;uBAAC,iBAAiB;;sBAExB,MAAM;uBAAC,uBAAuB;wBArB1B,KAAK;kBADX,WAAW;mBAAC,4BAA4B;YAI9B,IAAI;kBADd,KAAK;YAOC,KAAK;kBAFX,KAAK;YAOC,KAAK;kBADX,KAAK","sourcesContent":["import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n Input,\n OnDestroy,\n ChangeDetectorRef,\n ViewEncapsulation,\n HostBinding,\n Inject\n} from '@angular/core';\nimport {\n Navigation,\n NavigationItem,\n NavigationDividerItem\n} from './navigation-item';\nimport {\n Required,\n coerceBoolean\n} from '@rxap/utilities';\nimport { NavigationService } from './navigation.service';\nimport { Subscription } from 'rxjs';\nimport { tap } from 'rxjs/operators';\nimport { SidenavComponentService } from '../sidenav/sidenav.component.service';\n\n@Component({\n selector: 'ul[rxap-navigation]',\n templateUrl: './navigation.component.html',\n styleUrls: ['./navigation.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'rxap-navigation' },\n})\nexport class NavigationComponent implements OnInit, OnDestroy {\n @HostBinding('class.rxap-root-navigation')\n public _root = false;\n\n @Input()\n public set root(value: boolean | '') {\n this._root = coerceBoolean(value);\n }\n\n @Input()\n @Required\n public items!: Navigation;\n\n public subscription?: Subscription;\n\n @Input()\n public level: number = 0;\n\n constructor(\n @Inject(NavigationService)\n private readonly navigationService: NavigationService,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Inject(SidenavComponentService)\n public readonly sidenav: SidenavComponentService\n ) {}\n\n public ngOnInit(): void {\n if (this._root) {\n this.items = [];\n this.subscription = this.navigationService.config$\n .pipe(\n tap((navigation) => (this.items = navigation)),\n tap(() => this.cdr.detectChanges())\n )\n .subscribe();\n }\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\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","<ng-template [ngForOf]=\"items\" let-item ngFor>\n <ng-template [ngIf]=\"isNavigationDividerItem(item)\">\n <mat-divider fxFlex=\"nogrow\"></mat-divider>\n <div *ngIf=\"!(sidenav.collapsed$ | async)\" class=\"divider-title\" fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"start end\">\n <span fxFlex=\"nogrow\" *ngIf=\"item.title\">{{item.title}}</span>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isNavigationItem(item)\">\n <li class=\"item\" rxap-navigation-item [level]=\"level\" [item]=\"asNavigationItem(item)\"></li>\n </ng-template>\n</ng-template>\n"]}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { NavigationComponent } from './navigation.component';
|
|
3
|
-
import { NavigationItemComponent } from './navigation-item/navigation-item.component';
|
|
4
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
7
|
-
import { RouterModule } from '@angular/router';
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
9
|
-
import { ReplaceRouterPathsPipeModule } from './replace-router-paths.pipe';
|
|
10
|
-
import { IconDirectiveModule } from '@rxap/material-directives/icon';
|
|
11
|
-
import { ButtonComponentModule } from '@rxap/components';
|
|
12
|
-
import { MatRippleModule } from '@angular/material/core';
|
|
13
|
-
import { MatDividerModule } from '@angular/material/divider';
|
|
14
|
-
import { StopPropagationDirectiveModule } from '@rxap/directives';
|
|
15
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import * as i0 from "@angular/core";
|
|
17
|
-
import * as i1 from "@angular/router";
|
|
18
|
-
import * as i2 from "@angular/material/core";
|
|
19
|
-
import * as i3 from "@angular/material/tooltip";
|
|
20
|
-
import * as i4 from "@angular/common";
|
|
21
|
-
import * as i5 from "@angular/material/icon";
|
|
22
|
-
import * as i6 from "@rxap/material-directives/icon";
|
|
23
|
-
import * as i7 from "@angular/flex-layout/flex";
|
|
24
|
-
export class NavigationComponentModule {
|
|
25
|
-
}
|
|
26
|
-
NavigationComponentModule.ɵfac = function NavigationComponentModule_Factory(t) { return new (t || NavigationComponentModule)(); };
|
|
27
|
-
NavigationComponentModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: NavigationComponentModule });
|
|
28
|
-
NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
|
|
29
|
-
MatIconModule,
|
|
30
|
-
MatButtonModule,
|
|
31
|
-
FlexLayoutModule,
|
|
32
|
-
RouterModule,
|
|
33
|
-
CommonModule,
|
|
34
|
-
IconDirectiveModule,
|
|
35
|
-
ButtonComponentModule,
|
|
36
|
-
MatRippleModule,
|
|
37
|
-
MatDividerModule,
|
|
38
|
-
StopPropagationDirectiveModule,
|
|
39
|
-
MatTooltipModule,
|
|
40
|
-
ReplaceRouterPathsPipeModule
|
|
41
|
-
]] });
|
|
42
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationComponentModule, [{
|
|
43
|
-
type: NgModule,
|
|
44
|
-
args: [{
|
|
45
|
-
declarations: [NavigationComponent, NavigationItemComponent],
|
|
46
|
-
imports: [
|
|
47
|
-
MatIconModule,
|
|
48
|
-
MatButtonModule,
|
|
49
|
-
FlexLayoutModule,
|
|
50
|
-
RouterModule,
|
|
51
|
-
CommonModule,
|
|
52
|
-
IconDirectiveModule,
|
|
53
|
-
ButtonComponentModule,
|
|
54
|
-
MatRippleModule,
|
|
55
|
-
MatDividerModule,
|
|
56
|
-
StopPropagationDirectiveModule,
|
|
57
|
-
MatTooltipModule,
|
|
58
|
-
ReplaceRouterPathsPipeModule
|
|
59
|
-
],
|
|
60
|
-
exports: [NavigationComponent]
|
|
61
|
-
}]
|
|
62
|
-
}], null, null); })();
|
|
63
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(NavigationComponentModule, { declarations: [NavigationComponent, NavigationItemComponent], imports: [MatIconModule,
|
|
64
|
-
MatButtonModule,
|
|
65
|
-
FlexLayoutModule,
|
|
66
|
-
RouterModule,
|
|
67
|
-
CommonModule,
|
|
68
|
-
IconDirectiveModule,
|
|
69
|
-
ButtonComponentModule,
|
|
70
|
-
MatRippleModule,
|
|
71
|
-
MatDividerModule,
|
|
72
|
-
StopPropagationDirectiveModule,
|
|
73
|
-
MatTooltipModule,
|
|
74
|
-
ReplaceRouterPathsPipeModule], exports: [NavigationComponent] }); })();
|
|
75
|
-
i0.ɵɵsetComponentScope(NavigationItemComponent, [i1.RouterLinkWithHref, i1.RouterLinkActive, i2.MatRipple, i3.MatTooltip, i4.NgIf, i5.MatIcon, i6.IconDirective, NavigationComponent, i7.DefaultFlexDirective, i4.NgForOf], [i4.AsyncPipe]);
|
|
76
|
-
//# sourceMappingURL=navigation.component.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.component.module.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/navigation.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CA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b,eAAe;QACf,gBAAgB;QAChB,YAAY;QACZ,YAAY;QACZ,mBAAmB;QACnB,qBAAqB;QACrB,eAAe;QACf,gBAAgB;QAChB,8BAA8B;QAC9B,gBAAgB;QAChB,4BAA4B,aAEd,mBAAmB;uBAfE,uBAAuB,mHAA5C,mBAAmB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { NavigationComponent } from './navigation.component';\nimport { NavigationItemComponent } from './navigation-item/navigation-item.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { RouterModule } from '@angular/router';\nimport { CommonModule } from '@angular/common';\nimport { ReplaceRouterPathsPipeModule } from './replace-router-paths.pipe';\nimport { IconDirectiveModule } from '@rxap/material-directives/icon';\nimport { ButtonComponentModule } from '@rxap/components';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { StopPropagationDirectiveModule } from '@rxap/directives';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n\n@NgModule({\n declarations: [ NavigationComponent, NavigationItemComponent ],\n imports: [\n MatIconModule,\n MatButtonModule,\n FlexLayoutModule,\n RouterModule,\n CommonModule,\n IconDirectiveModule,\n ButtonComponentModule,\n MatRippleModule,\n MatDividerModule,\n StopPropagationDirectiveModule,\n MatTooltipModule,\n ReplaceRouterPathsPipeModule\n ],\n exports: [ NavigationComponent ]\n})\nexport class NavigationComponentModule {}\n"]}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject, Optional, INJECTOR } from '@angular/core';
|
|
2
|
-
import { ReplaySubject, of, combineLatest, from } from 'rxjs';
|
|
3
|
-
import { IsNavigationInsertItem, IsNavigationItem, IsNavigationDividerItem } from './navigation-item';
|
|
4
|
-
import { RXAP_NAVIGATION_CONFIG, RXAP_NAVIGATION_CONFIG_INSERTS } from '../tokens';
|
|
5
|
-
import { switchMap, map, catchError } from 'rxjs/operators';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export class NavigationService {
|
|
8
|
-
constructor(navigation, injector, inserts = null) {
|
|
9
|
-
this.injector = injector;
|
|
10
|
-
this.inserts = new Map();
|
|
11
|
-
this.navigation$ = new ReplaySubject(1);
|
|
12
|
-
if (typeof navigation === 'function') {
|
|
13
|
-
this.navigation = navigation();
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
this.navigation = navigation;
|
|
17
|
-
}
|
|
18
|
-
if (inserts) {
|
|
19
|
-
Object.entries(inserts).forEach(([id, insert]) => this.insert(id, insert, false));
|
|
20
|
-
}
|
|
21
|
-
this.updateNavigation();
|
|
22
|
-
this.config$ = this.navigation$.pipe(switchMap((navigationWithoutStatusCheck) => this.checkNavigationStatusProviders(navigationWithoutStatusCheck)));
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated use add instead
|
|
26
|
-
* @param id
|
|
27
|
-
* @param value
|
|
28
|
-
* @param update
|
|
29
|
-
*/
|
|
30
|
-
insert(id, value, update = true) {
|
|
31
|
-
this.add(id, value, update);
|
|
32
|
-
}
|
|
33
|
-
add(id, value, update = true) {
|
|
34
|
-
this.inserts.set(id, value);
|
|
35
|
-
if (update) {
|
|
36
|
-
this.updateNavigation();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
has(id) {
|
|
40
|
-
return this.inserts.has(id);
|
|
41
|
-
}
|
|
42
|
-
get(id) {
|
|
43
|
-
return this.inserts.get(id);
|
|
44
|
-
}
|
|
45
|
-
remove(id, update = true) {
|
|
46
|
-
this.inserts.delete(id);
|
|
47
|
-
if (update) {
|
|
48
|
-
this.updateNavigation();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
updateNavigation() {
|
|
52
|
-
this.navigation$.next(this.replaceInserts(this.navigation));
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @param navigationItem
|
|
57
|
-
*/
|
|
58
|
-
checkNavigationItemStatusProviders(navigationItem) {
|
|
59
|
-
if (IsNavigationDividerItem(navigationItem) || !navigationItem.status) {
|
|
60
|
-
return of(navigationItem);
|
|
61
|
-
}
|
|
62
|
-
const isVisibleArray$ = navigationItem.status
|
|
63
|
-
.map((statusToken) => this.injector.get(statusToken))
|
|
64
|
-
.map((status) => {
|
|
65
|
-
const isVisible = status.isVisible(navigationItem);
|
|
66
|
-
if (typeof isVisible === 'boolean') {
|
|
67
|
-
return of(isVisible);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return from(isVisible);
|
|
71
|
-
}
|
|
72
|
-
}).map(isVisible$ => isVisible$.pipe(catchError(e => {
|
|
73
|
-
console.error('isVisible method failed: ' + e.message);
|
|
74
|
-
return of(false);
|
|
75
|
-
})));
|
|
76
|
-
// TODO : dont wait for all status services to complete, but cancel waiting if one returns false
|
|
77
|
-
return combineLatest(isVisibleArray$).pipe(map((isVisibleArray) => isVisibleArray.reduce((acc, isVisible) => acc && isVisible, true)), map((isVisible) => (isVisible ? navigationItem : null)), switchMap((navigationItemOrNull) => {
|
|
78
|
-
var _a;
|
|
79
|
-
if (navigationItemOrNull) {
|
|
80
|
-
if ((_a = navigationItemOrNull.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
81
|
-
return this.checkNavigationStatusProviders(navigationItemOrNull.children).pipe(map((children) => (Object.assign(Object.assign({}, navigationItemOrNull), { children }))));
|
|
82
|
-
}
|
|
83
|
-
return of(navigationItemOrNull);
|
|
84
|
-
}
|
|
85
|
-
return of(null);
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @internal
|
|
90
|
-
* @param navigationItem
|
|
91
|
-
*/
|
|
92
|
-
checkNavigationStatusProviders(navigation) {
|
|
93
|
-
return combineLatest(navigation.map((navigationItem) => this.checkNavigationItemStatusProviders(navigationItem))).pipe(map((navigationWithNullItems) => {
|
|
94
|
-
const cleanNavigation = [];
|
|
95
|
-
for (const navigationItem of navigationWithNullItems) {
|
|
96
|
-
if (navigationItem !== null) {
|
|
97
|
-
cleanNavigation.push(navigationItem);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return cleanNavigation;
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
103
|
-
replaceInserts(navigationWithInserts) {
|
|
104
|
-
var _a;
|
|
105
|
-
const navigation = [];
|
|
106
|
-
for (const navigationItem of navigationWithInserts) {
|
|
107
|
-
if (IsNavigationInsertItem(navigationItem)) {
|
|
108
|
-
if (this.inserts.has(navigationItem.insert)) {
|
|
109
|
-
navigation.push(...this.replaceInserts(this.inserts.get(navigationItem.insert)));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
else if (IsNavigationItem(navigationItem)) {
|
|
113
|
-
navigation.push(Object.assign(Object.assign({}, navigationItem), { children: this.replaceInserts((_a = navigationItem.children) !== null && _a !== void 0 ? _a : []) }));
|
|
114
|
-
}
|
|
115
|
-
else if (IsNavigationDividerItem(navigationItem)) {
|
|
116
|
-
navigation.push(navigationItem);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return navigation;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
NavigationService.ɵfac = function NavigationService_Factory(t) { return new (t || NavigationService)(i0.ɵɵinject(RXAP_NAVIGATION_CONFIG), i0.ɵɵinject(INJECTOR), i0.ɵɵinject(RXAP_NAVIGATION_CONFIG_INSERTS, 8)); };
|
|
123
|
-
NavigationService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NavigationService, factory: NavigationService.ɵfac, providedIn: 'root' });
|
|
124
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationService, [{
|
|
125
|
-
type: Injectable,
|
|
126
|
-
args: [{ providedIn: 'root' }]
|
|
127
|
-
}], function () { return [{ type: undefined, decorators: [{
|
|
128
|
-
type: Inject,
|
|
129
|
-
args: [RXAP_NAVIGATION_CONFIG]
|
|
130
|
-
}] }, { type: undefined, decorators: [{
|
|
131
|
-
type: Inject,
|
|
132
|
-
args: [INJECTOR]
|
|
133
|
-
}] }, { type: undefined, decorators: [{
|
|
134
|
-
type: Optional
|
|
135
|
-
}, {
|
|
136
|
-
type: Inject,
|
|
137
|
-
args: [RXAP_NAVIGATION_CONFIG_INSERTS]
|
|
138
|
-
}] }]; }, null); })();
|
|
139
|
-
//# sourceMappingURL=navigation.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.service.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/navigation.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACR,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,aAAa,EACb,EAAE,EACF,aAAa,EACb,IAAI,EACL,MAAM,MAAM,CAAC;AACd,OAAO,EAGL,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EAGxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,SAAS,EACT,GAAG,EACH,UAAU,EACX,MAAM,gBAAgB,CAAC;;AAGxB,MAAM,OAAO,iBAAiB;IAS5B,YAEE,UAAe,EAEE,QAAkB,EAGnC,UAAsB,IAAI;QAHT,aAAQ,GAAR,QAAQ,CAAU;QAV7B,YAAO,GAAG,IAAI,GAAG,EAAiC,CAAC;QAI1C,gBAAW,GAAG,IAAI,aAAa,CAAa,CAAC,CAAC,CAAC;QAW9D,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;YACpC,IAAI,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC;SAChC;aAAM;YACL,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAC9B;QACD,IAAI,OAAO,EAAE;YACX,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE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IAAI,gBAAgB,CAAC,cAAc,CAAC,EAAE;gBAC3C,UAAU,CAAC,IAAI,iCACV,cAAc,KACjB,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,MAAA,cAAc,CAAC,QAAQ,mCAAI,EAAE,CAAC,IAC5D,CAAC;aACJ;iBAAM,IAAI,uBAAuB,CAAC,cAAc,CAAC,EAAE;gBAClD,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aACjC;SACF;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;;kFAjLU,iBAAiB,cAUlB,sBAAsB,eAEtB,QAAQ,eAGR,8BAA8B;uEAf7B,iBAAiB,WAAjB,iBAAiB,mBADJ,MAAM;uFACnB,iBAAiB;cAD7B,UAAU;eAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;sBAW7B,MAAM;uBAAC,sBAAsB;;sBAE7B,MAAM;uBAAC,QAAQ;;sBAEf,QAAQ;;sBACR,MAAM;uBAAC,8BAA8B","sourcesContent":["import type { Injector } from '@angular/core';\nimport {\n Injectable,\n Inject,\n Optional,\n INJECTOR\n} from '@angular/core';\nimport {\n Observable,\n ReplaySubject,\n of,\n combineLatest,\n from\n} from 'rxjs';\nimport {\n Navigation,\n NavigationWithInserts,\n IsNavigationInsertItem,\n IsNavigationItem,\n IsNavigationDividerItem,\n NavigationItem,\n NavigationDividerItem\n} from './navigation-item';\nimport {\n RXAP_NAVIGATION_CONFIG,\n RXAP_NAVIGATION_CONFIG_INSERTS\n} from '../tokens';\nimport {\n switchMap,\n map,\n catchError\n} from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class NavigationService {\n public readonly config$: Observable<Navigation>;\n\n private inserts = new Map<string, NavigationWithInserts>();\n\n private readonly navigation: NavigationWithInserts;\n\n private readonly navigation$ = new ReplaySubject<Navigation>(1);\n\n constructor(\n @Inject(RXAP_NAVIGATION_CONFIG)\n navigation: any,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Optional()\n @Inject(RXAP_NAVIGATION_CONFIG_INSERTS)\n inserts: any | null = null\n ) {\n if (typeof navigation === 'function') {\n this.navigation = navigation();\n } else {\n this.navigation = navigation;\n }\n if (inserts) {\n Object.entries(inserts).forEach(([id, insert]: [string, any]) =>\n this.insert(id, insert, false)\n );\n }\n this.updateNavigation();\n this.config$ = this.navigation$.pipe(\n switchMap((navigationWithoutStatusCheck) =>\n this.checkNavigationStatusProviders(navigationWithoutStatusCheck)\n )\n );\n }\n\n /**\n * @deprecated use add instead\n * @param id\n * @param value\n * @param update\n */\n public insert(\n id: string,\n value: NavigationWithInserts,\n update: boolean = true\n ): void {\n this.add(id, value, update);\n }\n\n public add(\n id: string,\n value: NavigationWithInserts,\n update: boolean = true\n ): void {\n this.inserts.set(id, value);\n if (update) {\n this.updateNavigation();\n }\n }\n\n public has(id: string): boolean {\n return this.inserts.has(id);\n }\n\n public get(id: string): NavigationWithInserts | undefined {\n return this.inserts.get(id);\n }\n\n public remove(id: string, update: boolean = true): void {\n this.inserts.delete(id);\n if (update) {\n this.updateNavigation();\n }\n }\n\n public updateNavigation(): void {\n this.navigation$.next(this.replaceInserts(this.navigation));\n }\n\n /**\n * @internal\n * @param navigationItem\n */\n public checkNavigationItemStatusProviders(\n navigationItem: NavigationItem | NavigationDividerItem\n ): Observable<NavigationItem | NavigationDividerItem | null> {\n if (IsNavigationDividerItem(navigationItem) || !navigationItem.status) {\n return of(navigationItem);\n }\n const isVisibleArray$: Array<Observable<boolean>> = navigationItem.status\n .map((statusToken) => this.injector.get(statusToken))\n .map((status) => {\n const isVisible = status.isVisible(navigationItem);\n if (typeof isVisible === 'boolean') {\n return of(isVisible);\n } else {\n return from(isVisible);\n }\n }).map(isVisible$ => isVisible$.pipe(catchError(e => {\n console.error('isVisible method failed: ' + e.message);\n return of(false);\n })));\n // TODO : dont wait for all status services to complete, but cancel waiting if one returns false\n return combineLatest(isVisibleArray$).pipe(\n map((isVisibleArray) =>\n isVisibleArray.reduce((acc, isVisible) => acc && isVisible, true)\n ),\n map((isVisible) => (isVisible ? navigationItem : null)),\n switchMap((navigationItemOrNull) => {\n if (navigationItemOrNull) {\n if (navigationItemOrNull.children?.length) {\n return this.checkNavigationStatusProviders(\n navigationItemOrNull.children\n ).pipe(\n map((children) => ({\n ...navigationItemOrNull,\n children,\n }))\n );\n }\n return of(navigationItemOrNull);\n }\n return of(null);\n })\n );\n }\n\n /**\n * @internal\n * @param navigationItem\n */\n public checkNavigationStatusProviders(\n navigation: Navigation\n ): Observable<Navigation> {\n return combineLatest(\n navigation.map((navigationItem) =>\n this.checkNavigationItemStatusProviders(navigationItem)\n )\n ).pipe(\n map((navigationWithNullItems) => {\n const cleanNavigation: Navigation = [];\n\n for (const navigationItem of navigationWithNullItems) {\n if (navigationItem !== null) {\n cleanNavigation.push(navigationItem);\n }\n }\n\n return cleanNavigation;\n })\n );\n }\n\n private replaceInserts(\n navigationWithInserts: NavigationWithInserts\n ): Navigation {\n const navigation: Navigation = [];\n\n for (const navigationItem of navigationWithInserts) {\n if (IsNavigationInsertItem(navigationItem)) {\n if (this.inserts.has(navigationItem.insert)) {\n navigation.push(\n ...this.replaceInserts(this.inserts.get(navigationItem.insert)!)\n );\n }\n } else if (IsNavigationItem(navigationItem)) {\n navigation.push({\n ...navigationItem,\n children: this.replaceInserts(navigationItem.children ?? []),\n });\n } else if (IsNavigationDividerItem(navigationItem)) {\n navigation.push(navigationItem);\n }\n }\n\n return navigation;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-router-paths.pipe.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/replace-router-paths.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,IAAI,EAEL,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;;;AAK3E,MAAM,OAAO,sBAAsB;IACjC,YACS,GAA8B;QAA9B,QAAG,GAAH,GAAG,CAA2B;IACpC,CAAC;IAEJ,SAAS,CAAC,UAAoB;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;;4FAPU,sBAAsB;iGAAtB,sBAAsB;uFAAtB,sBAAsB;cAHlC,IAAI;eAAC;gBACJ,IAAI,EAAE,oBAAoB;aAC3B;;AAeD,MAAM,OAAO,4BAA4B;;wGAA5B,4BAA4B;8EAA5B,4BAA4B;;uFAA5B,4BAA4B;cAJxC,QAAQ;eAAC;gBACR,YAAY,EAAE,CAAE,sBAAsB,CAAE;gBACxC,OAAO,EAAO,CAAE,sBAAsB,CAAE;aACzC;;wFACY,4BAA4B,mBAd5B,sBAAsB,aAAtB,sBAAsB","sourcesContent":["import {\n NgModule,\n Pipe,\n PipeTransform\n} from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { ReplaceRouterPathsService } from './replace-router-paths.service';\n\n@Pipe({\n name: 'replaceRouterPaths'\n})\nexport class ReplaceRouterPathsPipe implements PipeTransform {\n constructor(\n public rrp: ReplaceRouterPathsService\n ) {}\n\n transform(routerLink: string[]): Observable<string[]> {\n return this.rrp.transform(routerLink);\n }\n}\n\n@NgModule({\n declarations: [ ReplaceRouterPathsPipe ],\n exports: [ ReplaceRouterPathsPipe ]\n})\nexport class ReplaceRouterPathsPipeModule {}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { of } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class ReplaceRouterPathsService {
|
|
5
|
-
transform(routerLink) {
|
|
6
|
-
return of(routerLink);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
ReplaceRouterPathsService.ɵfac = function ReplaceRouterPathsService_Factory(t) { return new (t || ReplaceRouterPathsService)(); };
|
|
10
|
-
ReplaceRouterPathsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ReplaceRouterPathsService, factory: ReplaceRouterPathsService.ɵfac, providedIn: 'root' });
|
|
11
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReplaceRouterPathsService, [{
|
|
12
|
-
type: Injectable,
|
|
13
|
-
args: [{ providedIn: 'root' }]
|
|
14
|
-
}], null, null); })();
|
|
15
|
-
//# sourceMappingURL=replace-router-paths.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-router-paths.service.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/replace-router-paths.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEL,EAAE,EACH,MAAM,MAAM,CAAC;;AAGd,MAAM,OAAO,yBAAyB;IAE7B,SAAS,CAAC,UAAoB;QACnC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;;kGAJU,yBAAyB;+EAAzB,yBAAyB,WAAzB,yBAAyB,mBADZ,MAAM;uFACnB,yBAAyB;cADrC,UAAU;eAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of\n} from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ReplaceRouterPathsService {\n\n public transform(routerLink: string[]): Observable<string[]> {\n return of(routerLink);\n }\n\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Directive, TemplateRef, Inject } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class SidenavFooterDirective {
|
|
4
|
-
constructor(template) {
|
|
5
|
-
this.template = template;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
SidenavFooterDirective.ɵfac = function SidenavFooterDirective_Factory(t) { return new (t || SidenavFooterDirective)(i0.ɵɵdirectiveInject(TemplateRef)); };
|
|
9
|
-
SidenavFooterDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SidenavFooterDirective, selectors: [["", "rxapSidenavFooter", ""]] });
|
|
10
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SidenavFooterDirective, [{
|
|
11
|
-
type: Directive,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: '[rxapSidenavFooter]',
|
|
14
|
-
}]
|
|
15
|
-
}], function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
16
|
-
type: Inject,
|
|
17
|
-
args: [TemplateRef]
|
|
18
|
-
}] }]; }, null); })();
|
|
19
|
-
//# sourceMappingURL=sidenav-footer.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav-footer.directive.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/sidenav/sidenav-footer.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;AAK/D,MAAM,OAAO,sBAAsB;IACjC,YAEkB,QAA2B;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAC1C,CAAC;;4FAJO,sBAAsB,uBAEvB,WAAW;yEAFV,sBAAsB;uFAAtB,sBAAsB;cAHlC,SAAS;eAAC;gBACT,QAAQ,EAAE,qBAAqB;aAChC;;sBAGI,MAAM;uBAAC,WAAW","sourcesContent":["import { Directive, TemplateRef, Inject } from '@angular/core';\n\n@Directive({\n selector: '[rxapSidenavFooter]',\n})\nexport class SidenavFooterDirective {\n constructor(\n @Inject(TemplateRef)\n public readonly template: TemplateRef<void>\n ) {}\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Directive, Inject, TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class SidenavHeaderDirective {
|
|
4
|
-
constructor(template) {
|
|
5
|
-
this.template = template;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
SidenavHeaderDirective.ɵfac = function SidenavHeaderDirective_Factory(t) { return new (t || SidenavHeaderDirective)(i0.ɵɵdirectiveInject(TemplateRef)); };
|
|
9
|
-
SidenavHeaderDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SidenavHeaderDirective, selectors: [["", "rxapSidenavHeader", ""]] });
|
|
10
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SidenavHeaderDirective, [{
|
|
11
|
-
type: Directive,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: '[rxapSidenavHeader]',
|
|
14
|
-
}]
|
|
15
|
-
}], function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
16
|
-
type: Inject,
|
|
17
|
-
args: [TemplateRef]
|
|
18
|
-
}] }]; }, null); })();
|
|
19
|
-
//# sourceMappingURL=sidenav-header.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav-header.directive.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/sidenav/sidenav-header.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;AAK/D,MAAM,OAAO,sBAAsB;IACjC,YAEkB,QAA2B;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAC1C,CAAC;;4FAJO,sBAAsB,uBAEvB,WAAW;yEAFV,sBAAsB;uFAAtB,sBAAsB;cAHlC,SAAS;eAAC;gBACT,QAAQ,EAAE,qBAAqB;aAChC;;sBAGI,MAAM;uBAAC,WAAW","sourcesContent":["import { Directive, Inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[rxapSidenavHeader]',\n})\nexport class SidenavHeaderDirective {\n constructor(\n @Inject(TemplateRef)\n public readonly template: TemplateRef<void>\n ) {}\n}\n"]}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, ContentChild } from '@angular/core';
|
|
2
|
-
import { SidenavFooterDirective } from './sidenav-footer.directive';
|
|
3
|
-
import { SidenavHeaderDirective } from './sidenav-header.directive';
|
|
4
|
-
import { SidenavComponentService } from './sidenav.component.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "./sidenav.component.service";
|
|
7
|
-
import * as i2 from "@angular/flex-layout/extended";
|
|
8
|
-
import * as i3 from "@angular/common";
|
|
9
|
-
import * as i4 from "@angular/flex-layout/flex";
|
|
10
|
-
import * as i5 from "../navigation/navigation.component";
|
|
11
|
-
import * as i6 from "@angular/material/divider";
|
|
12
|
-
import * as i7 from "@angular/material/button";
|
|
13
|
-
import * as i8 from "@angular/material/icon";
|
|
14
|
-
function SidenavComponent_ng_template_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
-
i0.ɵɵelementContainer(0);
|
|
16
|
-
} }
|
|
17
|
-
function SidenavComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
-
i0.ɵɵelementStart(0, "div", 11);
|
|
19
|
-
i0.ɵɵpipe(1, "async");
|
|
20
|
-
i0.ɵɵtemplate(2, SidenavComponent_ng_template_3_ng_container_2_Template, 1, 0, "ng-container", 12);
|
|
21
|
-
i0.ɵɵelementEnd();
|
|
22
|
-
i0.ɵɵelement(3, "mat-divider", 13);
|
|
23
|
-
i0.ɵɵpipe(4, "async");
|
|
24
|
-
} if (rf & 2) {
|
|
25
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
26
|
-
let tmp_1_0;
|
|
27
|
-
i0.ɵɵproperty("fxHide", i0.ɵɵpipeBind1(1, 3, ctx_r0.sidenav.collapsed$));
|
|
28
|
-
i0.ɵɵadvance(2);
|
|
29
|
-
i0.ɵɵproperty("ngTemplateOutlet", (tmp_1_0 = ctx_r0.sidenavHeaderDirective == null ? null : ctx_r0.sidenavHeaderDirective.template) !== null && tmp_1_0 !== undefined ? tmp_1_0 : null);
|
|
30
|
-
i0.ɵɵadvance(1);
|
|
31
|
-
i0.ɵɵproperty("fxHide", i0.ɵɵpipeBind1(4, 5, ctx_r0.sidenav.collapsed$));
|
|
32
|
-
} }
|
|
33
|
-
function SidenavComponent_ng_template_15_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
-
i0.ɵɵelementContainer(0);
|
|
35
|
-
} }
|
|
36
|
-
function SidenavComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
-
i0.ɵɵelement(0, "mat-divider", 13);
|
|
38
|
-
i0.ɵɵpipe(1, "async");
|
|
39
|
-
i0.ɵɵelementStart(2, "div", 14);
|
|
40
|
-
i0.ɵɵpipe(3, "async");
|
|
41
|
-
i0.ɵɵtemplate(4, SidenavComponent_ng_template_15_ng_container_4_Template, 1, 0, "ng-container", 12);
|
|
42
|
-
i0.ɵɵelementEnd();
|
|
43
|
-
} if (rf & 2) {
|
|
44
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
45
|
-
let tmp_2_0;
|
|
46
|
-
i0.ɵɵproperty("fxHide", i0.ɵɵpipeBind1(1, 3, ctx_r1.sidenav.collapsed$));
|
|
47
|
-
i0.ɵɵadvance(2);
|
|
48
|
-
i0.ɵɵproperty("fxHide", i0.ɵɵpipeBind1(3, 5, ctx_r1.sidenav.collapsed$));
|
|
49
|
-
i0.ɵɵadvance(2);
|
|
50
|
-
i0.ɵɵproperty("ngTemplateOutlet", (tmp_2_0 = ctx_r1.sidenavFooterDirective == null ? null : ctx_r1.sidenavFooterDirective.template) !== null && tmp_2_0 !== undefined ? tmp_2_0 : null);
|
|
51
|
-
} }
|
|
52
|
-
const _c2 = function (a0) { return { "collapsed": a0 }; };
|
|
53
|
-
export class SidenavComponent {
|
|
54
|
-
constructor(sidenav) {
|
|
55
|
-
this.sidenav = sidenav;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
SidenavComponent.ɵfac = function SidenavComponent_Factory(t) { return new (t || SidenavComponent)(i0.ɵɵdirectiveInject(i1.SidenavComponentService)); };
|
|
59
|
-
SidenavComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SidenavComponent, selectors: [["rxap-sidenav"]], contentQueries: function SidenavComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
60
|
-
i0.ɵɵcontentQuery(dirIndex, SidenavFooterDirective, 5);
|
|
61
|
-
i0.ɵɵcontentQuery(dirIndex, SidenavHeaderDirective, 5);
|
|
62
|
-
} if (rf & 2) {
|
|
63
|
-
let _t;
|
|
64
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sidenavFooterDirective = _t.first);
|
|
65
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sidenavHeaderDirective = _t.first);
|
|
66
|
-
} }, hostAttrs: [1, "rxap-layout-sidenav"], decls: 16, vars: 15, consts: function () { let i18n_0; if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
67
|
-
const MSG_EXTERNAL_rxap_layout_navigation_collapse_sidebar$$LIB_SIDENAV_SIDENAV_COMPONENT_TS_1 = goog.getMsg("Collapse sidebar");
|
|
68
|
-
i18n_0 = MSG_EXTERNAL_rxap_layout_navigation_collapse_sidebar$$LIB_SIDENAV_SIDENAV_COMPONENT_TS_1;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
i18n_0 = $localize `:@@rxap.layout.navigation.collapse-sidebar␟98effe6eb558f87ab061ab608a31b44adec4e2ae␟1144722711335201698:Collapse sidebar`;
|
|
72
|
-
} return [[1, "container", 3, "ngClass"], ["fxLayout", "column", "fxLayoutAlign", "space-between stretch", 1, "inner"], [3, "ngIf"], ["fxFlex", "grow", 1, "nav-container"], ["fxLayout", "column", "root", "", "rxap-navigation", ""], ["fxFlex", "nogrow"], ["mat-button", "", "fxFlex", "nogrow", 1, "sidebar-toggle", 3, "ngClass", "click"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "16px", 1, "sidebar-toggle-inner"], ["fxFlex", "nogrow", 1, "arrow"], ["fxFlex", "grow", 1, "label", 3, "fxHide"], i18n_0, ["fxFlex", "nogrow", 1, "header", 3, "fxHide"], [4, "ngTemplateOutlet"], ["fxFlex", "nogrow", 3, "fxHide"], ["fxFlex", "nogrow", 1, "footer", 3, "fxHide"]]; }, template: function SidenavComponent_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
74
|
-
i0.ɵɵpipe(1, "async");
|
|
75
|
-
i0.ɵɵelementStart(2, "div", 1);
|
|
76
|
-
i0.ɵɵtemplate(3, SidenavComponent_ng_template_3_Template, 5, 7, "ng-template", 2);
|
|
77
|
-
i0.ɵɵelementStart(4, "div", 3);
|
|
78
|
-
i0.ɵɵelement(5, "ul", 4);
|
|
79
|
-
i0.ɵɵelementEnd();
|
|
80
|
-
i0.ɵɵelement(6, "mat-divider", 5);
|
|
81
|
-
i0.ɵɵelementStart(7, "button", 6);
|
|
82
|
-
i0.ɵɵlistener("click", function SidenavComponent_Template_button_click_7_listener() { return ctx.sidenav.toggleNavigationCollapse(); });
|
|
83
|
-
i0.ɵɵpipe(8, "async");
|
|
84
|
-
i0.ɵɵelementStart(9, "span", 7);
|
|
85
|
-
i0.ɵɵelementStart(10, "mat-icon", 8);
|
|
86
|
-
i0.ɵɵtext(11, "double_arrow");
|
|
87
|
-
i0.ɵɵelementEnd();
|
|
88
|
-
i0.ɵɵelementStart(12, "span", 9);
|
|
89
|
-
i0.ɵɵi18n(13, 10);
|
|
90
|
-
i0.ɵɵpipe(14, "async");
|
|
91
|
-
i0.ɵɵelementEnd();
|
|
92
|
-
i0.ɵɵelementEnd();
|
|
93
|
-
i0.ɵɵelementEnd();
|
|
94
|
-
i0.ɵɵtemplate(15, SidenavComponent_ng_template_15_Template, 5, 7, "ng-template", 2);
|
|
95
|
-
i0.ɵɵelementEnd();
|
|
96
|
-
i0.ɵɵelementEnd();
|
|
97
|
-
} if (rf & 2) {
|
|
98
|
-
let tmp_4_0;
|
|
99
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c2, i0.ɵɵpipeBind1(1, 5, ctx.sidenav.collapsed$)));
|
|
100
|
-
i0.ɵɵadvance(3);
|
|
101
|
-
i0.ɵɵproperty("ngIf", ctx.sidenavHeaderDirective == null ? null : ctx.sidenavHeaderDirective.template);
|
|
102
|
-
i0.ɵɵadvance(4);
|
|
103
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c2, i0.ɵɵpipeBind1(8, 7, ctx.sidenav.collapsed$)));
|
|
104
|
-
i0.ɵɵadvance(5);
|
|
105
|
-
i0.ɵɵproperty("fxHide", i0.ɵɵpipeBind1(14, 9, ctx.sidenav.collapsed$));
|
|
106
|
-
i0.ɵɵadvance(3);
|
|
107
|
-
i0.ɵɵproperty("ngIf", (tmp_4_0 = ctx.sidenavFooterDirective == null ? null : ctx.sidenavFooterDirective.template) !== null && tmp_4_0 !== undefined ? tmp_4_0 : null);
|
|
108
|
-
} }, directives: [i2.DefaultClassDirective, i3.NgClass, i4.DefaultLayoutDirective, i4.DefaultLayoutAlignDirective, i3.NgIf, i4.DefaultFlexDirective, i5.NavigationComponent, i6.MatDivider, i7.MatButton, i4.DefaultLayoutGapDirective, i8.MatIcon, i2.DefaultShowHideDirective, i3.NgTemplateOutlet], pipes: [i3.AsyncPipe], styles: [".container[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{height:100%}.container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding-bottom:12px}.container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{padding-top:12px}.container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .nav-container[_ngcontent-%COMP%]{overflow-y:scroll;padding-top:12px}.container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .nav-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .nav-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-radius:2px}.container[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .nav-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px}.container[_ngcontent-%COMP%] .sidebar-toggle[_ngcontent-%COMP%]{min-height:48px}.container[_ngcontent-%COMP%] .sidebar-toggle[_ngcontent-%COMP%] .sidebar-toggle-inner[_ngcontent-%COMP%]{padding:0}.container[_ngcontent-%COMP%] .sidebar-toggle[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.container[_ngcontent-%COMP%] .sidebar-toggle.collapsed[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{transform:none}.container[_ngcontent-%COMP%] .sidebar-toggle.collapsed[_ngcontent-%COMP%] .sidebar-toggle-inner[_ngcontent-%COMP%]{justify-content:space-around!important}"], changeDetection: 0 });
|
|
109
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SidenavComponent, [{
|
|
110
|
-
type: Component,
|
|
111
|
-
args: [{
|
|
112
|
-
selector: 'rxap-sidenav',
|
|
113
|
-
templateUrl: './sidenav.component.html',
|
|
114
|
-
styleUrls: ['./sidenav.component.scss'],
|
|
115
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
116
|
-
host: {
|
|
117
|
-
class: 'rxap-layout-sidenav'
|
|
118
|
-
}
|
|
119
|
-
}]
|
|
120
|
-
}], function () { return [{ type: i1.SidenavComponentService }]; }, { sidenavFooterDirective: [{
|
|
121
|
-
type: ContentChild,
|
|
122
|
-
args: [SidenavFooterDirective]
|
|
123
|
-
}], sidenavHeaderDirective: [{
|
|
124
|
-
type: ContentChild,
|
|
125
|
-
args: [SidenavHeaderDirective]
|
|
126
|
-
}] }); })();
|
|
127
|
-
//# sourceMappingURL=sidenav.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav.component.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/sidenav/sidenav.component.ts","../../../../../../libs/layout/src/lib/sidenav/sidenav.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;;;;;;;;;;;ICD9D,wBAA0F;;;IAD5F,+BAA0E;;IACxE,kGAA0F;IAC5F,iBAAM;IACN,kCAAiF;;;;;IAH7C,wEAAqC;IACxD,eAA0D;IAA1D,uLAA0D;IAE9C,eAAqC;IAArC,wEAAqC;;;IAgBhE,wBAA0F;;;IAF5F,kCAAiF;;IACjF,+BAA0E;;IACxE,mGAA0F;IAC5F,iBAAM;;;;IAHuB,wEAAqC;IAC9B,eAAqC;IAArC,wEAAqC;IACxD,eAA0D;IAA1D,uLAA0D;;;ADNjF,MAAM,OAAO,gBAAgB;IAQ3B,YAA4B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;;gFARrD,gBAAgB;mEAAhB,gBAAgB;oCAEb,sBAAsB;oCAGtB,sBAAsB;;;;;;;;;;iBCL2F,UAAA,0HAAgB;;QAlBjJ,8BAA+E;;QAC7E,8BAE2C;QACzC,iFAKc;QACd,8BAAyC;QACvC,wBAAgD;QAClD,iBAAM;QACN,iCAA2C;QAC3C,iCACqD;QAA7C,6FAAS,sCAAkC,IAAC;;QAClD,+BAAkG;QAChG,oCAAwC;QAAA,6BAAY;QAAA,iBAAW;QAC/D,gCAAyH;QAAzH,iBAAyH;;QAAgB,iBAAO;QAClJ,iBAAO;QACT,iBAAS;QACT,mFAKc;QAChB,iBAAM;QACR,iBAAM;;;QA5BiB,mGAAuD;QAI7D,eAAyC;QAAzC,sGAAyC;QAUZ,eAAuD;QAAvD,mGAAuD;QAIvF,eAAqC;QAArC,sEAAqC;QAGlC,eAAiD;QAAjD,qKAAiD;;uFDHrD,gBAAgB;cAT5B,SAAS;eAAC;gBACT,QAAQ,EAAS,cAAc;gBAC/B,WAAW,EAAM,0BAA0B;gBAC3C,SAAS,EAAQ,CAAE,0BAA0B,CAAE;gBAC/C,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,IAAI,EAAa;oBACf,KAAK,EAAE,qBAAqB;iBAC7B;aACF;0EAIQ,sBAAsB;kBAD5B,YAAY;mBAAC,sBAAsB;YAI7B,sBAAsB;kBAD5B,YAAY;mBAAC,sBAAsB","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ContentChild\n} from '@angular/core';\nimport { SidenavFooterDirective } from './sidenav-footer.directive';\nimport { SidenavHeaderDirective } from './sidenav-header.directive';\nimport { SidenavComponentService } from './sidenav.component.service';\n\n@Component({\n selector: 'rxap-sidenav',\n templateUrl: './sidenav.component.html',\n styleUrls: [ './sidenav.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'rxap-layout-sidenav'\n }\n})\nexport class SidenavComponent {\n\n @ContentChild(SidenavFooterDirective)\n public sidenavFooterDirective?: SidenavFooterDirective;\n\n @ContentChild(SidenavHeaderDirective)\n public sidenavHeaderDirective?: SidenavHeaderDirective;\n\n constructor(public readonly sidenav: SidenavComponentService) {}\n\n}\n","<div class=\"container\" [ngClass]=\"{ 'collapsed': sidenav.collapsed$ | async }\">\n <div class=\"inner\"\n fxLayout=\"column\"\n fxLayoutAlign=\"space-between stretch\">\n <ng-template [ngIf]=\"sidenavHeaderDirective?.template\">\n <div fxFlex=\"nogrow\" class=\"header\" [fxHide]=\"sidenav.collapsed$ | async\">\n <ng-container *ngTemplateOutlet=\"sidenavHeaderDirective?.template ?? null\"></ng-container>\n </div>\n <mat-divider fxFlex=\"nogrow\" [fxHide]=\"sidenav.collapsed$ | async\"></mat-divider>\n </ng-template>\n <div fxFlex=\"grow\" class=\"nav-container\">\n <ul fxLayout=\"column\" root rxap-navigation></ul>\n </div>\n <mat-divider fxFlex=\"nogrow\"></mat-divider>\n <button mat-button class=\"sidebar-toggle\" [ngClass]=\"{ 'collapsed': sidenav.collapsed$ | async }\" fxFlex=\"nogrow\"\n (click)=\"sidenav.toggleNavigationCollapse()\">\n <span class=\"sidebar-toggle-inner\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"16px\">\n <mat-icon fxFlex=\"nogrow\" class=\"arrow\">double_arrow</mat-icon>\n <span [fxHide]=\"sidenav.collapsed$ | async\" class=\"label\" fxFlex=\"grow\" i18n=\"@@rxap.layout.navigation.collapse-sidebar\">Collapse sidebar</span>\n </span>\n </button>\n <ng-template [ngIf]=\"sidenavFooterDirective?.template ?? null\">\n <mat-divider fxFlex=\"nogrow\" [fxHide]=\"sidenav.collapsed$ | async\"></mat-divider>\n <div fxFlex=\"nogrow\" class=\"footer\" [fxHide]=\"sidenav.collapsed$ | async\">\n <ng-container *ngTemplateOutlet=\"sidenavFooterDirective?.template ?? null\"></ng-container>\n </div>\n </ng-template>\n </div>\n</div>\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { SidenavComponent } from './sidenav.component';
|
|
3
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
4
|
-
import { NavigationComponentModule } from '../navigation/navigation.component.module';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { MatDividerModule } from '@angular/material/divider';
|
|
7
|
-
import { SidenavHeaderDirective } from './sidenav-header.directive';
|
|
8
|
-
import { SidenavFooterDirective } from './sidenav-footer.directive';
|
|
9
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
10
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
export class SidenavModule {
|
|
13
|
-
}
|
|
14
|
-
SidenavModule.ɵfac = function SidenavModule_Factory(t) { return new (t || SidenavModule)(); };
|
|
15
|
-
SidenavModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: SidenavModule });
|
|
16
|
-
SidenavModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
|
|
17
|
-
FlexLayoutModule,
|
|
18
|
-
NavigationComponentModule,
|
|
19
|
-
CommonModule,
|
|
20
|
-
MatDividerModule,
|
|
21
|
-
MatIconModule,
|
|
22
|
-
MatButtonModule
|
|
23
|
-
]] });
|
|
24
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SidenavModule, [{
|
|
25
|
-
type: NgModule,
|
|
26
|
-
args: [{
|
|
27
|
-
declarations: [SidenavComponent, SidenavHeaderDirective, SidenavFooterDirective],
|
|
28
|
-
imports: [
|
|
29
|
-
FlexLayoutModule,
|
|
30
|
-
NavigationComponentModule,
|
|
31
|
-
CommonModule,
|
|
32
|
-
MatDividerModule,
|
|
33
|
-
MatIconModule,
|
|
34
|
-
MatButtonModule
|
|
35
|
-
],
|
|
36
|
-
exports: [SidenavComponent, SidenavHeaderDirective, SidenavFooterDirective],
|
|
37
|
-
}]
|
|
38
|
-
}], null, null); })();
|
|
39
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SidenavModule, { declarations: [SidenavComponent, SidenavHeaderDirective, SidenavFooterDirective], imports: [FlexLayoutModule,
|
|
40
|
-
NavigationComponentModule,
|
|
41
|
-
CommonModule,
|
|
42
|
-
MatDividerModule,
|
|
43
|
-
MatIconModule,
|
|
44
|
-
MatButtonModule], exports: [SidenavComponent, SidenavHeaderDirective, SidenavFooterDirective] }); })();
|
|
45
|
-
//# sourceMappingURL=sidenav.component.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav.component.module.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/sidenav/sidenav.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;;AAe3D,MAAM,OAAO,aAAa;;0EAAb,aAAa;+DAAb,aAAa;mEAVV;YACZ,gBAAgB;YAChB,yBAAyB;YACzB,YAAY;YACZ,gBAAgB;YAChB,aAAa;YACb,eAAe;SAChB;uFAGU,aAAa;cAZzB,QAAQ;eAAC;gBACR,YAAY,EAAE,CAAE,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,CAAE;gBAClF,OAAO,EAAO;oBACZ,gBAAgB;oBAChB,yBAAyB;oBACzB,YAAY;oBACZ,gBAAgB;oBAChB,aAAa;oBACb,eAAe;iBAChB;gBACD,OAAO,EAAO,CAAE,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,CAAE;aACnF;;wFACY,aAAa,mBAXR,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,aAE9E,gBAAgB;QAChB,yBAAyB;QACzB,YAAY;QACZ,gBAAgB;QAChB,aAAa;QACb,eAAe,aAED,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { SidenavComponent } from './sidenav.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { NavigationComponentModule } from '../navigation/navigation.component.module';\nimport { CommonModule } from '@angular/common';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { SidenavHeaderDirective } from './sidenav-header.directive';\nimport { SidenavFooterDirective } from './sidenav-footer.directive';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [ SidenavComponent, SidenavHeaderDirective, SidenavFooterDirective ],\n imports: [\n FlexLayoutModule,\n NavigationComponentModule,\n CommonModule,\n MatDividerModule,\n MatIconModule,\n MatButtonModule\n ],\n exports: [ SidenavComponent, SidenavHeaderDirective, SidenavFooterDirective ],\n})\nexport class SidenavModule {}\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { ConfigService } from '@rxap/config';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@rxap/config";
|
|
6
|
-
export class SidenavComponentService {
|
|
7
|
-
constructor(config) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
this.collapsed$ = new BehaviorSubject(true);
|
|
10
|
-
this.collapsed$.next(this.config.get('navigation.collapsed', this.collapsed$.value));
|
|
11
|
-
}
|
|
12
|
-
toggleNavigationCollapse() {
|
|
13
|
-
this.collapsed$.next(!this.collapsed$.value);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
SidenavComponentService.ɵfac = function SidenavComponentService_Factory(t) { return new (t || SidenavComponentService)(i0.ɵɵinject(i1.ConfigService)); };
|
|
17
|
-
SidenavComponentService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SidenavComponentService, factory: SidenavComponentService.ɵfac, providedIn: 'root' });
|
|
18
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SidenavComponentService, [{
|
|
19
|
-
type: Injectable,
|
|
20
|
-
args: [{ providedIn: 'root' }]
|
|
21
|
-
}], function () { return [{ type: i1.ConfigService }]; }, null); })();
|
|
22
|
-
//# sourceMappingURL=sidenav.component.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav.component.service.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/sidenav/sidenav.component.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;;;AAG7C,MAAM,OAAO,uBAAuB;IAIlC,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QAFlC,eAAU,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QAGrD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACvF,CAAC;IAEM,wBAAwB;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;;8FAVU,uBAAuB;6EAAvB,uBAAuB,WAAvB,uBAAuB,mBADV,MAAM;uFACnB,uBAAuB;cADnC,UAAU;eAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { ConfigService } from '@rxap/config';\n\n@Injectable({ providedIn: 'root' })\nexport class SidenavComponentService {\n\n public readonly collapsed$ = new BehaviorSubject(true);\n\n constructor(private readonly config: ConfigService) {\n this.collapsed$.next(this.config.get('navigation.collapsed', this.collapsed$.value));\n }\n\n public toggleNavigationCollapse(): void {\n this.collapsed$.next(!this.collapsed$.value);\n }\n\n}\n"]}
|