@rxap/layout 12.1.0-next.1 → 12.2.1
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/bundles/rxap-layout.umd.js +43 -35
- package/bundles/rxap-layout.umd.js.map +1 -1
- package/esm2015/lib/navigation/navigation-item/navigation-item.component.js +23 -22
- package/esm2015/lib/navigation/navigation-item/navigation-item.component.js.map +1 -1
- package/esm2015/lib/navigation/navigation-item.js.map +1 -1
- package/esm2015/lib/navigation/navigation.component.module.js +11 -6
- package/esm2015/lib/navigation/navigation.component.module.js.map +1 -1
- package/esm2015/lib/navigation/navigation.service.js +8 -5
- package/esm2015/lib/navigation/navigation.service.js.map +1 -1
- package/esm2015/lib/sidenav/sidenav.component.service.js +1 -1
- package/esm2015/lib/sidenav/sidenav.component.service.js.map +1 -1
- package/fesm2015/rxap-layout.js +38 -29
- package/fesm2015/rxap-layout.js.map +1 -1
- package/lib/navigation/navigation-item.d.ts +2 -2
- package/lib/navigation/navigation.component.module.d.ts +2 -1
- package/package.json +12 -11
|
@@ -14,13 +14,13 @@ import * as i2 from "../../sidenav/sidenav.component.service";
|
|
|
14
14
|
import * as i3 from "@angular/cdk/overlay";
|
|
15
15
|
const _c0 = ["navigationOverlay"];
|
|
16
16
|
const _c1 = ["rxap-navigation-item", ""];
|
|
17
|
-
function
|
|
17
|
+
function NavigationItemComponent_mat_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
18
18
|
i0.ɵɵelement(0, "mat-icon", 5);
|
|
19
19
|
} if (rf & 2) {
|
|
20
20
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
21
|
i0.ɵɵproperty("rxapIcon", ctx_r0.item.icon);
|
|
22
22
|
} }
|
|
23
|
-
function
|
|
23
|
+
function NavigationItemComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
24
24
|
i0.ɵɵelementStart(0, "span", 6);
|
|
25
25
|
i0.ɵɵtext(1);
|
|
26
26
|
i0.ɵɵelementEnd();
|
|
@@ -29,22 +29,22 @@ function NavigationItemComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
29
29
|
i0.ɵɵadvance(1);
|
|
30
30
|
i0.ɵɵtextInterpolate(ctx_r1.item.label);
|
|
31
31
|
} }
|
|
32
|
-
function
|
|
32
|
+
function NavigationItemComponent_ul_5_Template(rf, ctx) { if (rf & 1) {
|
|
33
33
|
i0.ɵɵelement(0, "ul", 7);
|
|
34
34
|
} if (rf & 2) {
|
|
35
35
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
36
36
|
i0.ɵɵproperty("@sub-nav", undefined)("items", ctx_r2.children)("level", ctx_r2.level + 1);
|
|
37
37
|
} }
|
|
38
|
-
function
|
|
38
|
+
function NavigationItemComponent_ng_template_7_li_2_a_1_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
39
|
i0.ɵɵelement(0, "mat-icon", 5);
|
|
40
40
|
} if (rf & 2) {
|
|
41
41
|
const child_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
42
42
|
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
43
43
|
i0.ɵɵproperty("rxapIcon", ctx_r8.asNavigationItem(child_r6).icon);
|
|
44
44
|
} }
|
|
45
|
-
function
|
|
45
|
+
function NavigationItemComponent_ng_template_7_li_2_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
46
46
|
i0.ɵɵelementStart(0, "a", 11);
|
|
47
|
-
i0.ɵɵtemplate(1,
|
|
47
|
+
i0.ɵɵtemplate(1, NavigationItemComponent_ng_template_7_li_2_a_1_mat_icon_1_Template, 1, 1, "mat-icon", 1);
|
|
48
48
|
i0.ɵɵelementStart(2, "span", 6);
|
|
49
49
|
i0.ɵɵtext(3);
|
|
50
50
|
i0.ɵɵelementEnd();
|
|
@@ -58,9 +58,9 @@ function NavigationItemComponent_ng_template_6_li_2_a_1_Template(rf, ctx) { if (
|
|
|
58
58
|
i0.ɵɵadvance(2);
|
|
59
59
|
i0.ɵɵtextInterpolate(ctx_r7.asNavigationItem(child_r6).label);
|
|
60
60
|
} }
|
|
61
|
-
function
|
|
61
|
+
function NavigationItemComponent_ng_template_7_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
62
62
|
i0.ɵɵelementStart(0, "li");
|
|
63
|
-
i0.ɵɵtemplate(1,
|
|
63
|
+
i0.ɵɵtemplate(1, NavigationItemComponent_ng_template_7_li_2_a_1_Template, 4, 3, "a", 10);
|
|
64
64
|
i0.ɵɵelementEnd();
|
|
65
65
|
} if (rf & 2) {
|
|
66
66
|
const child_r6 = ctx.$implicit;
|
|
@@ -68,12 +68,12 @@ function NavigationItemComponent_ng_template_6_li_2_Template(rf, ctx) { if (rf &
|
|
|
68
68
|
i0.ɵɵadvance(1);
|
|
69
69
|
i0.ɵɵproperty("ngIf", ctx_r5.isNavigationItem(child_r6));
|
|
70
70
|
} }
|
|
71
|
-
function
|
|
71
|
+
function NavigationItemComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
72
72
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
73
73
|
i0.ɵɵelementStart(0, "div", 8);
|
|
74
|
-
i0.ɵɵlistener("mouseenter", function
|
|
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
75
|
i0.ɵɵelementStart(1, "ul");
|
|
76
|
-
i0.ɵɵtemplate(2,
|
|
76
|
+
i0.ɵɵtemplate(2, NavigationItemComponent_ng_template_7_li_2_Template, 2, 1, "li", 9);
|
|
77
77
|
i0.ɵɵelementEnd();
|
|
78
78
|
i0.ɵɵelementEnd();
|
|
79
79
|
} if (rf & 2) {
|
|
@@ -191,24 +191,25 @@ NavigationItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Nav
|
|
|
191
191
|
i0.ɵɵlistener("mouseenter", function NavigationItemComponent_mouseenter_HostBindingHandler() { return ctx.onMouseenter(); })("mouseleave", function NavigationItemComponent_mouseleave_HostBindingHandler() { return ctx.onMouseleave(); });
|
|
192
192
|
} if (rf & 2) {
|
|
193
193
|
i0.ɵɵclassProp("active", ctx.isActive);
|
|
194
|
-
} }, inputs: { item: "item", level: "level" }, features: [i0.ɵɵNgOnChangesFeature], attrs: _c1, decls:
|
|
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
195
|
i0.ɵɵelementStart(0, "a", 0);
|
|
196
|
-
i0.ɵɵ
|
|
197
|
-
i0.ɵɵtemplate(2,
|
|
198
|
-
i0.ɵɵ
|
|
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");
|
|
199
200
|
i0.ɵɵelementEnd();
|
|
200
|
-
i0.ɵɵtemplate(
|
|
201
|
-
i0.ɵɵpipe(
|
|
202
|
-
i0.ɵɵtemplate(
|
|
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);
|
|
203
204
|
} if (rf & 2) {
|
|
204
205
|
i0.ɵɵclassMapInterpolate1("navigation-link mat-body-2 mat-body-strong navigation-level-", ctx.level, "");
|
|
205
|
-
i0.ɵɵproperty("routerLink", ctx.item.routerLink);
|
|
206
|
-
i0.ɵɵadvance(
|
|
206
|
+
i0.ɵɵproperty("routerLink", ctx.item.routerLink)("matTooltipDisabled", !i0.ɵɵpipeBind1(1, 9, ctx.sidenav.collapsed$))("matTooltip", ctx.item.label);
|
|
207
|
+
i0.ɵɵadvance(2);
|
|
207
208
|
i0.ɵɵproperty("ngIf", ctx.item.icon);
|
|
208
209
|
i0.ɵɵadvance(1);
|
|
209
|
-
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(
|
|
210
|
+
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(4, 11, ctx.sidenav.collapsed$));
|
|
210
211
|
i0.ɵɵadvance(2);
|
|
211
|
-
i0.ɵɵproperty("ngIf", ctx.routerLinkActive.isActive && !i0.ɵɵpipeBind1(
|
|
212
|
+
i0.ɵɵproperty("ngIf", ctx.routerLinkActive.isActive && !i0.ɵɵpipeBind1(6, 13, ctx.sidenav.collapsed$) && ctx.children);
|
|
212
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: [
|
|
213
214
|
trigger('sub-nav', [
|
|
214
215
|
transition(':enter', [
|
|
@@ -1 +1 @@
|
|
|
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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sBAEjB,MAAM;uBAAC,SAAS;;sBAEhB,MAAM;uBAAC,OAAO;;sBAEd,MAAM;uBAAC,gBAAgB;wBApCnB,gBAAgB;kBADtB,SAAS;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 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
|
+
{"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,EACT,oBAAoB,EACpB,IAAI,GACL,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,O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AQ;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-item.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/navigation-item.ts"],"names":[],"mappings":"
|
|
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"]}
|
|
@@ -12,13 +12,15 @@ import { ButtonComponentModule } from '@rxap/components';
|
|
|
12
12
|
import { MatRippleModule } from '@angular/material/core';
|
|
13
13
|
import { MatDividerModule } from '@angular/material/divider';
|
|
14
14
|
import { StopPropagationDirectiveModule } from '@rxap/directives';
|
|
15
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
import * as i1 from "@angular/router";
|
|
17
18
|
import * as i2 from "@angular/material/core";
|
|
18
|
-
import * as i3 from "@angular/
|
|
19
|
-
import * as i4 from "@angular/
|
|
20
|
-
import * as i5 from "@
|
|
21
|
-
import * as i6 from "@
|
|
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";
|
|
22
24
|
export class NavigationComponentModule {
|
|
23
25
|
}
|
|
24
26
|
NavigationComponentModule.ɵfac = function NavigationComponentModule_Factory(t) { return new (t || NavigationComponentModule)(); };
|
|
@@ -34,6 +36,7 @@ NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
|
|
|
34
36
|
MatRippleModule,
|
|
35
37
|
MatDividerModule,
|
|
36
38
|
StopPropagationDirectiveModule,
|
|
39
|
+
MatTooltipModule
|
|
37
40
|
]] });
|
|
38
41
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationComponentModule, [{
|
|
39
42
|
type: NgModule,
|
|
@@ -50,6 +53,7 @@ NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
|
|
|
50
53
|
MatRippleModule,
|
|
51
54
|
MatDividerModule,
|
|
52
55
|
StopPropagationDirectiveModule,
|
|
56
|
+
MatTooltipModule
|
|
53
57
|
],
|
|
54
58
|
exports: [NavigationComponent]
|
|
55
59
|
}]
|
|
@@ -63,6 +67,7 @@ NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
|
|
|
63
67
|
ButtonComponentModule,
|
|
64
68
|
MatRippleModule,
|
|
65
69
|
MatDividerModule,
|
|
66
|
-
StopPropagationDirectiveModule
|
|
67
|
-
|
|
70
|
+
StopPropagationDirectiveModule,
|
|
71
|
+
MatTooltipModule], exports: [NavigationComponent] }); })();
|
|
72
|
+
i0.ɵɵsetComponentScope(NavigationItemComponent, [i1.RouterLinkWithHref, i1.RouterLinkActive, i2.MatRipple, i3.MatTooltip, i4.NgIf, i5.MatIcon, i6.IconDirective, NavigationComponent, i7.DefaultFlexDirective, i4.NgForOf], [i4.AsyncPipe]);
|
|
68
73
|
//# sourceMappingURL=navigation.component.module.js.map
|
|
@@ -1 +1 @@
|
|
|
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,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC
|
|
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,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;;;;;;;;;AAoB7D,MAAM,OAAO,yBAAyB;;kGAAzB,yBAAyB;2EAAzB,yBAAyB;+EAf3B;YACP,aAAa;YACb,eAAe;YACf,gBAAgB;YAChB,YAAY;YACZ,YAAY;YACZ,mBAAmB;YACnB,qBAAqB;YACrB,eAAe;YACf,gBAAgB;YAChB,8BAA8B;YAC9B,gBAAgB;SACjB;uFAGU,yBAAyB;cAjBrC,QAAQ;eAAC;gBACR,YAAY,EAAE,CAAE,mBAAmB,EAAE,uBAAuB,EAAE,sBAAsB,CAAE;gBACtF,OAAO,EAAE;oBACP,aAAa;oBACb,eAAe;oBACf,gBAAgB;oBAChB,YAAY;oBACZ,YAAY;oBACZ,mBAAmB;oBACnB,qBAAqB;oBACrB,eAAe;oBACf,gBAAgB;oBAChB,8BAA8B;oBAC9B,gBAAgB;iBACjB;gBACD,OAAO,EAAO,CAAE,mBAAmB,CAAE;aACtC;;wFACY,yBAAyB,mBAhBpB,mBAAmB,EAAE,uBAAuB,EAAE,sBAAsB,aAElF,aAAa;QACb,eAAe;QACf,gBAAgB;QAChB,YAAY;QACZ,YAAY;QACZ,mBAAmB;QACnB,qBAAqB;QACrB,eAAe;QACf,gBAAgB;QAChB,8BAA8B;QAC9B,gBAAgB,aAEF,mBAAmB;uBAdE,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 { ReplaceRouterPathsPipe } 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, ReplaceRouterPathsPipe ],\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 ],\n exports: [ NavigationComponent ]\n})\nexport class NavigationComponentModule {}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Injectable, Inject, Optional, INJECTOR } from '@angular/core';
|
|
2
2
|
import { ReplaySubject, of, combineLatest, from } from 'rxjs';
|
|
3
|
-
import { IsNavigationInsertItem, IsNavigationItem, IsNavigationDividerItem
|
|
4
|
-
import { RXAP_NAVIGATION_CONFIG, RXAP_NAVIGATION_CONFIG_INSERTS
|
|
5
|
-
import { switchMap, map } from 'rxjs/operators';
|
|
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
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export class NavigationService {
|
|
8
8
|
constructor(navigation, injector, inserts = null) {
|
|
@@ -62,14 +62,17 @@ export class NavigationService {
|
|
|
62
62
|
const isVisibleArray$ = navigationItem.status
|
|
63
63
|
.map((statusToken) => this.injector.get(statusToken))
|
|
64
64
|
.map((status) => {
|
|
65
|
-
const isVisible = status.isVisible(navigationItem
|
|
65
|
+
const isVisible = status.isVisible(navigationItem);
|
|
66
66
|
if (typeof isVisible === 'boolean') {
|
|
67
67
|
return of(isVisible);
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
70
|
return from(isVisible);
|
|
71
71
|
}
|
|
72
|
-
})
|
|
72
|
+
}).map(isVisible$ => isVisible$.pipe(catchError(e => {
|
|
73
|
+
console.error('isVisible method failed: ' + e.message);
|
|
74
|
+
return of(false);
|
|
75
|
+
})));
|
|
73
76
|
// TODO : dont wait for all status services to complete, but cancel waiting if one returns false
|
|
74
77
|
return combineLatest(isVisibleArray$).pipe(map((isVisibleArray) => isVisibleArray.reduce((acc, isVisible) => acc && isVisible, true)), map((isVisible) => (isVisible ? navigationItem : null)), switchMap((navigationItemOrNull) => {
|
|
75
78
|
if (navigationItemOrNull) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.service.js","sourceRoot":"","sources":["../../../../../../libs/layout/src/lib/navigation/navigation.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAc,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1E,OAAO,EAGL,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,GAGxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;;AAGhD,MAAM,OAAO,iBAAiB;IAS5B,YAEE,UAAe,EAEE,QAAkB,EAGnC,UAAsB,IAAI;QAHT,aAAQ,GAAR,QAAQ,CAAU;QAV7B,YAAO,GAAG,IAAI,GAAG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AAC,GAAG,CAAC,cAAc,CAAC,MAAM,CAAE,CAAC,CACjE,CAAC;iBACH;aACF;iBAAM,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;;kFA9KU,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 { Injectable, Inject, Optional, INJECTOR } from '@angular/core';\nimport { Observable, ReplaySubject, of, combineLatest, from } 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 { switchMap, map } 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.routerLink);\n if (typeof isVisible === 'boolean') {\n return of(isVisible);\n } else {\n return from(isVisible);\n }\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) {\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
|
+
{"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,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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) {\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"]}
|
|
@@ -6,7 +6,7 @@ import * as i1 from "@rxap/config";
|
|
|
6
6
|
export class SidenavComponentService {
|
|
7
7
|
constructor(config) {
|
|
8
8
|
this.config = config;
|
|
9
|
-
this.collapsed$ = new BehaviorSubject(
|
|
9
|
+
this.collapsed$ = new BehaviorSubject(true);
|
|
10
10
|
this.collapsed$.next(this.config.get('navigation.collapsed', this.collapsed$.value));
|
|
11
11
|
}
|
|
12
12
|
toggleNavigationCollapse() {
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"]}
|
package/fesm2015/rxap-layout.js
CHANGED
|
@@ -9,7 +9,7 @@ import { MatToolbarModule } from '@angular/material/toolbar';
|
|
|
9
9
|
import * as i4 from '@angular/cdk/portal';
|
|
10
10
|
import { PortalModule, TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
11
11
|
import { Subscription, BehaviorSubject, ReplaySubject, of, from, combineLatest } from 'rxjs';
|
|
12
|
-
import { filter, map, tap, switchMap, startWith, delay, skip, distinctUntilChanged } from 'rxjs/operators';
|
|
12
|
+
import { filter, map, tap, switchMap, catchError, startWith, delay, skip, distinctUntilChanged } from 'rxjs/operators';
|
|
13
13
|
import * as i3$5 from '@angular/material/sidenav';
|
|
14
14
|
import { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';
|
|
15
15
|
import * as i2$2 from '@rxap/authentication';
|
|
@@ -47,9 +47,11 @@ import { MatGridListModule } from '@angular/material/grid-list';
|
|
|
47
47
|
import * as i2$5 from '@angular/material/divider';
|
|
48
48
|
import { MatDividerModule } from '@angular/material/divider';
|
|
49
49
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
50
|
-
import * as
|
|
50
|
+
import * as i6$1 from '@rxap/material-directives/icon';
|
|
51
51
|
import { IconDirectiveModule } from '@rxap/material-directives/icon';
|
|
52
52
|
import { ButtonComponentModule } from '@rxap/components';
|
|
53
|
+
import * as i3$6 from '@angular/material/tooltip';
|
|
54
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
53
55
|
|
|
54
56
|
const RXAP_NAVIGATION_CONFIG = new InjectionToken('rxap/layout/navigation-config');
|
|
55
57
|
const RXAP_NAVIGATION_CONFIG_INSERTS = new InjectionToken('rxap/layout/navigation-config-inserts');
|
|
@@ -1030,7 +1032,7 @@ SidenavHeaderDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: Side
|
|
|
1030
1032
|
class SidenavComponentService {
|
|
1031
1033
|
constructor(config) {
|
|
1032
1034
|
this.config = config;
|
|
1033
|
-
this.collapsed$ = new BehaviorSubject(
|
|
1035
|
+
this.collapsed$ = new BehaviorSubject(true);
|
|
1034
1036
|
this.collapsed$.next(this.config.get('navigation.collapsed', this.collapsed$.value));
|
|
1035
1037
|
}
|
|
1036
1038
|
toggleNavigationCollapse() {
|
|
@@ -1112,14 +1114,17 @@ class NavigationService {
|
|
|
1112
1114
|
const isVisibleArray$ = navigationItem.status
|
|
1113
1115
|
.map((statusToken) => this.injector.get(statusToken))
|
|
1114
1116
|
.map((status) => {
|
|
1115
|
-
const isVisible = status.isVisible(navigationItem
|
|
1117
|
+
const isVisible = status.isVisible(navigationItem);
|
|
1116
1118
|
if (typeof isVisible === 'boolean') {
|
|
1117
1119
|
return of(isVisible);
|
|
1118
1120
|
}
|
|
1119
1121
|
else {
|
|
1120
1122
|
return from(isVisible);
|
|
1121
1123
|
}
|
|
1122
|
-
})
|
|
1124
|
+
}).map(isVisible$ => isVisible$.pipe(catchError(e => {
|
|
1125
|
+
console.error('isVisible method failed: ' + e.message);
|
|
1126
|
+
return of(false);
|
|
1127
|
+
})));
|
|
1123
1128
|
// TODO : dont wait for all status services to complete, but cancel waiting if one returns false
|
|
1124
1129
|
return combineLatest(isVisibleArray$).pipe(map((isVisibleArray) => isVisibleArray.reduce((acc, isVisible) => acc && isVisible, true)), map((isVisible) => (isVisible ? navigationItem : null)), switchMap((navigationItemOrNull) => {
|
|
1125
1130
|
if (navigationItemOrNull) {
|
|
@@ -1185,13 +1190,13 @@ NavigationService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Naviga
|
|
|
1185
1190
|
|
|
1186
1191
|
const _c0$3 = ["navigationOverlay"];
|
|
1187
1192
|
const _c1$2 = ["rxap-navigation-item", ""];
|
|
1188
|
-
function
|
|
1193
|
+
function NavigationItemComponent_mat_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
1189
1194
|
i0.ɵɵelement(0, "mat-icon", 5);
|
|
1190
1195
|
} if (rf & 2) {
|
|
1191
1196
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
1192
1197
|
i0.ɵɵproperty("rxapIcon", ctx_r0.item.icon);
|
|
1193
1198
|
} }
|
|
1194
|
-
function
|
|
1199
|
+
function NavigationItemComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
1195
1200
|
i0.ɵɵelementStart(0, "span", 6);
|
|
1196
1201
|
i0.ɵɵtext(1);
|
|
1197
1202
|
i0.ɵɵelementEnd();
|
|
@@ -1200,22 +1205,22 @@ function NavigationItemComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
1200
1205
|
i0.ɵɵadvance(1);
|
|
1201
1206
|
i0.ɵɵtextInterpolate(ctx_r1.item.label);
|
|
1202
1207
|
} }
|
|
1203
|
-
function
|
|
1208
|
+
function NavigationItemComponent_ul_5_Template(rf, ctx) { if (rf & 1) {
|
|
1204
1209
|
i0.ɵɵelement(0, "ul", 7);
|
|
1205
1210
|
} if (rf & 2) {
|
|
1206
1211
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1207
1212
|
i0.ɵɵproperty("@sub-nav", undefined)("items", ctx_r2.children)("level", ctx_r2.level + 1);
|
|
1208
1213
|
} }
|
|
1209
|
-
function
|
|
1214
|
+
function NavigationItemComponent_ng_template_7_li_2_a_1_mat_icon_1_Template(rf, ctx) { if (rf & 1) {
|
|
1210
1215
|
i0.ɵɵelement(0, "mat-icon", 5);
|
|
1211
1216
|
} if (rf & 2) {
|
|
1212
1217
|
const child_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
1213
1218
|
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
1214
1219
|
i0.ɵɵproperty("rxapIcon", ctx_r8.asNavigationItem(child_r6).icon);
|
|
1215
1220
|
} }
|
|
1216
|
-
function
|
|
1221
|
+
function NavigationItemComponent_ng_template_7_li_2_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
1217
1222
|
i0.ɵɵelementStart(0, "a", 11);
|
|
1218
|
-
i0.ɵɵtemplate(1,
|
|
1223
|
+
i0.ɵɵtemplate(1, NavigationItemComponent_ng_template_7_li_2_a_1_mat_icon_1_Template, 1, 1, "mat-icon", 1);
|
|
1219
1224
|
i0.ɵɵelementStart(2, "span", 6);
|
|
1220
1225
|
i0.ɵɵtext(3);
|
|
1221
1226
|
i0.ɵɵelementEnd();
|
|
@@ -1229,9 +1234,9 @@ function NavigationItemComponent_ng_template_6_li_2_a_1_Template(rf, ctx) { if (
|
|
|
1229
1234
|
i0.ɵɵadvance(2);
|
|
1230
1235
|
i0.ɵɵtextInterpolate(ctx_r7.asNavigationItem(child_r6).label);
|
|
1231
1236
|
} }
|
|
1232
|
-
function
|
|
1237
|
+
function NavigationItemComponent_ng_template_7_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
1233
1238
|
i0.ɵɵelementStart(0, "li");
|
|
1234
|
-
i0.ɵɵtemplate(1,
|
|
1239
|
+
i0.ɵɵtemplate(1, NavigationItemComponent_ng_template_7_li_2_a_1_Template, 4, 3, "a", 10);
|
|
1235
1240
|
i0.ɵɵelementEnd();
|
|
1236
1241
|
} if (rf & 2) {
|
|
1237
1242
|
const child_r6 = ctx.$implicit;
|
|
@@ -1239,12 +1244,12 @@ function NavigationItemComponent_ng_template_6_li_2_Template(rf, ctx) { if (rf &
|
|
|
1239
1244
|
i0.ɵɵadvance(1);
|
|
1240
1245
|
i0.ɵɵproperty("ngIf", ctx_r5.isNavigationItem(child_r6));
|
|
1241
1246
|
} }
|
|
1242
|
-
function
|
|
1247
|
+
function NavigationItemComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
1243
1248
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
1244
1249
|
i0.ɵɵelementStart(0, "div", 8);
|
|
1245
|
-
i0.ɵɵlistener("mouseenter", function
|
|
1250
|
+
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(); });
|
|
1246
1251
|
i0.ɵɵelementStart(1, "ul");
|
|
1247
|
-
i0.ɵɵtemplate(2,
|
|
1252
|
+
i0.ɵɵtemplate(2, NavigationItemComponent_ng_template_7_li_2_Template, 2, 1, "li", 9);
|
|
1248
1253
|
i0.ɵɵelementEnd();
|
|
1249
1254
|
i0.ɵɵelementEnd();
|
|
1250
1255
|
} if (rf & 2) {
|
|
@@ -1362,24 +1367,25 @@ NavigationItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Nav
|
|
|
1362
1367
|
i0.ɵɵlistener("mouseenter", function NavigationItemComponent_mouseenter_HostBindingHandler() { return ctx.onMouseenter(); })("mouseleave", function NavigationItemComponent_mouseleave_HostBindingHandler() { return ctx.onMouseleave(); });
|
|
1363
1368
|
} if (rf & 2) {
|
|
1364
1369
|
i0.ɵɵclassProp("active", ctx.isActive);
|
|
1365
|
-
} }, inputs: { item: "item", level: "level" }, features: [i0.ɵɵNgOnChangesFeature], attrs: _c1$2, decls:
|
|
1370
|
+
} }, inputs: { item: "item", level: "level" }, features: [i0.ɵɵNgOnChangesFeature], attrs: _c1$2, 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) {
|
|
1366
1371
|
i0.ɵɵelementStart(0, "a", 0);
|
|
1367
|
-
i0.ɵɵ
|
|
1368
|
-
i0.ɵɵtemplate(2,
|
|
1369
|
-
i0.ɵɵ
|
|
1372
|
+
i0.ɵɵpipe(1, "async");
|
|
1373
|
+
i0.ɵɵtemplate(2, NavigationItemComponent_mat_icon_2_Template, 1, 1, "mat-icon", 1);
|
|
1374
|
+
i0.ɵɵtemplate(3, NavigationItemComponent_ng_template_3_Template, 2, 1, "ng-template", 2);
|
|
1375
|
+
i0.ɵɵpipe(4, "async");
|
|
1370
1376
|
i0.ɵɵelementEnd();
|
|
1371
|
-
i0.ɵɵtemplate(
|
|
1372
|
-
i0.ɵɵpipe(
|
|
1373
|
-
i0.ɵɵtemplate(
|
|
1377
|
+
i0.ɵɵtemplate(5, NavigationItemComponent_ul_5_Template, 1, 3, "ul", 3);
|
|
1378
|
+
i0.ɵɵpipe(6, "async");
|
|
1379
|
+
i0.ɵɵtemplate(7, NavigationItemComponent_ng_template_7_Template, 3, 1, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
|
|
1374
1380
|
} if (rf & 2) {
|
|
1375
1381
|
i0.ɵɵclassMapInterpolate1("navigation-link mat-body-2 mat-body-strong navigation-level-", ctx.level, "");
|
|
1376
|
-
i0.ɵɵproperty("routerLink", ctx.item.routerLink);
|
|
1377
|
-
i0.ɵɵadvance(
|
|
1382
|
+
i0.ɵɵproperty("routerLink", ctx.item.routerLink)("matTooltipDisabled", !i0.ɵɵpipeBind1(1, 9, ctx.sidenav.collapsed$))("matTooltip", ctx.item.label);
|
|
1383
|
+
i0.ɵɵadvance(2);
|
|
1378
1384
|
i0.ɵɵproperty("ngIf", ctx.item.icon);
|
|
1379
1385
|
i0.ɵɵadvance(1);
|
|
1380
|
-
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(
|
|
1386
|
+
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(4, 11, ctx.sidenav.collapsed$));
|
|
1381
1387
|
i0.ɵɵadvance(2);
|
|
1382
|
-
i0.ɵɵproperty("ngIf", ctx.routerLinkActive.isActive && !i0.ɵɵpipeBind1(
|
|
1388
|
+
i0.ɵɵproperty("ngIf", ctx.routerLinkActive.isActive && !i0.ɵɵpipeBind1(6, 13, ctx.sidenav.collapsed$) && ctx.children);
|
|
1383
1389
|
} }, 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: [
|
|
1384
1390
|
trigger('sub-nav', [
|
|
1385
1391
|
transition(':enter', [
|
|
@@ -2017,6 +2023,7 @@ NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
|
|
|
2017
2023
|
MatRippleModule,
|
|
2018
2024
|
MatDividerModule,
|
|
2019
2025
|
StopPropagationDirectiveModule,
|
|
2026
|
+
MatTooltipModule
|
|
2020
2027
|
]] });
|
|
2021
2028
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationComponentModule, [{
|
|
2022
2029
|
type: NgModule,
|
|
@@ -2033,6 +2040,7 @@ NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
|
|
|
2033
2040
|
MatRippleModule,
|
|
2034
2041
|
MatDividerModule,
|
|
2035
2042
|
StopPropagationDirectiveModule,
|
|
2043
|
+
MatTooltipModule
|
|
2036
2044
|
],
|
|
2037
2045
|
exports: [NavigationComponent]
|
|
2038
2046
|
}]
|
|
@@ -2046,8 +2054,9 @@ NavigationComponentModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
|
|
|
2046
2054
|
ButtonComponentModule,
|
|
2047
2055
|
MatRippleModule,
|
|
2048
2056
|
MatDividerModule,
|
|
2049
|
-
StopPropagationDirectiveModule
|
|
2050
|
-
|
|
2057
|
+
StopPropagationDirectiveModule,
|
|
2058
|
+
MatTooltipModule], exports: [NavigationComponent] }); })();
|
|
2059
|
+
i0.ɵɵsetComponentScope(NavigationItemComponent, [i1$4.RouterLinkWithHref, i1$4.RouterLinkActive, i6.MatRipple, i3$6.MatTooltip, i2.NgIf, i3$3.MatIcon, i6$1.IconDirective, NavigationComponent, i1$3.DefaultFlexDirective, i2.NgForOf], [i2.AsyncPipe]);
|
|
2051
2060
|
|
|
2052
2061
|
class SidenavModule {
|
|
2053
2062
|
}
|