@volo/ngx-lepton-x.core 4.2.0 → 4.3.0-rc.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/fesm2022/volo-ngx-lepton-x.core.mjs +87 -57
- package/fesm2022/volo-ngx-lepton-x.core.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/components/brand-logo/brand-logo.component.d.ts +6 -1
- package/lib/components/navbar/navbar-routes/navbar-routes.component.d.ts +4 -5
- package/lib/enums/index.d.ts +1 -0
- package/lib/enums/layouts.d.ts +4 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/providers/logo.provider.d.ts +11 -0
- package/lib/tokens/index.d.ts +1 -0
- package/lib/tokens/logo.token.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Inject, Injectable, NgModule, Input, ViewEncapsulation, Component, inject, Directive, Optional, Pipe, Injector,
|
|
2
|
+
import { InjectionToken, Inject, Injectable, NgModule, Input, ViewEncapsulation, Component, input, inject, Directive, Optional, Pipe, Injector, EventEmitter, Output, signal, computed, PLATFORM_ID, TemplateRef, ContentChild, SecurityContext, HostListener, provideAppInitializer, SkipSelf, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, Location, isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { map, distinctUntilChanged, filter, take, tap, switchMap, startWith, distinctUntilKeyChanged } from 'rxjs/operators';
|
|
@@ -220,13 +220,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
220
220
|
}]
|
|
221
221
|
}] });
|
|
222
222
|
|
|
223
|
+
const LOGO_URL_TOKEN = new InjectionToken('LOGO_URL_TOKEN');
|
|
224
|
+
const LOGO_APP_NAME_TOKEN = new InjectionToken('LOGO_APP_NAME_TOKEN');
|
|
225
|
+
|
|
226
|
+
var layouts;
|
|
227
|
+
(function (layouts) {
|
|
228
|
+
layouts["sideMenu"] = "side-menu";
|
|
229
|
+
layouts["topMenu"] = "top-menu";
|
|
230
|
+
})(layouts || (layouts = {}));
|
|
231
|
+
|
|
223
232
|
class BrandLogoComponent {
|
|
233
|
+
constructor() {
|
|
234
|
+
this.layout = input(layouts.sideMenu);
|
|
235
|
+
this.layoutOptions = layouts;
|
|
236
|
+
this.logoUrl = inject(LOGO_URL_TOKEN, {
|
|
237
|
+
optional: true,
|
|
238
|
+
});
|
|
239
|
+
this.appName = inject(LOGO_APP_NAME_TOKEN, {
|
|
240
|
+
optional: true,
|
|
241
|
+
}) ?? 'ProjectName';
|
|
242
|
+
}
|
|
224
243
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BrandLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
225
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
244
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: BrandLogoComponent, isStandalone: false, selector: "lpx-brand-logo", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (logoUrl) {\r\n @let logo = 'url(' + logoUrl + ')';\r\n <a routerLink=\"/\">\r\n <div\r\n class=\"lpx-brand-logo\"\r\n [style.background-image]=\"logo\"\r\n role=\"img\"\r\n aria-label=\"App Logo\"\r\n ></div>\r\n </a>\r\n} @else {\r\n <a routerLink=\"/\" class=\"text-decoration-none\">\r\n @switch (layout()) {\r\n @case (layoutOptions.sideMenu) {\r\n <div class=\"lpx-brand-logo\"></div>\r\n <div class=\"lpx-brand-name\" style=\"left: 58px !important\">\r\n {{ appName }}\r\n </div>\r\n }\r\n\r\n @case (layoutOptions.topMenu) {\r\n <div class=\"lpx-brand-name\" style=\"position: inherit\">\r\n {{ appName }}\r\n </div>\r\n }\r\n }\r\n </a>\r\n}\r\n", dependencies: [{ kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
226
245
|
}
|
|
227
246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BrandLogoComponent, decorators: [{
|
|
228
247
|
type: Component,
|
|
229
|
-
args: [{ standalone: false, selector: 'lpx-brand-logo', encapsulation: ViewEncapsulation.None, template: "<a routerLink=\"/\">\r\n <div class=\"lpx-brand-logo\"></div>\r\n</a>\r\n" }]
|
|
248
|
+
args: [{ standalone: false, selector: 'lpx-brand-logo', encapsulation: ViewEncapsulation.None, template: "@if (logoUrl) {\r\n @let logo = 'url(' + logoUrl + ')';\r\n <a routerLink=\"/\">\r\n <div\r\n class=\"lpx-brand-logo\"\r\n [style.background-image]=\"logo\"\r\n role=\"img\"\r\n aria-label=\"App Logo\"\r\n ></div>\r\n </a>\r\n} @else {\r\n <a routerLink=\"/\" class=\"text-decoration-none\">\r\n @switch (layout()) {\r\n @case (layoutOptions.sideMenu) {\r\n <div class=\"lpx-brand-logo\"></div>\r\n <div class=\"lpx-brand-name\" style=\"left: 58px !important\">\r\n {{ appName }}\r\n </div>\r\n }\r\n\r\n @case (layoutOptions.topMenu) {\r\n <div class=\"lpx-brand-name\" style=\"position: inherit\">\r\n {{ appName }}\r\n </div>\r\n }\r\n }\r\n </a>\r\n}\r\n" }]
|
|
230
249
|
}] });
|
|
231
250
|
|
|
232
251
|
class LpxBrandLogoModule {
|
|
@@ -871,8 +890,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
871
890
|
}] } });
|
|
872
891
|
|
|
873
892
|
class NavbarRoutesComponent {
|
|
893
|
+
constructor() {
|
|
894
|
+
this.injector = inject(Injector);
|
|
895
|
+
this.routesService = inject(RoutesService);
|
|
896
|
+
this._sourceItems = signal([]);
|
|
897
|
+
this._processedItems = computed(() => {
|
|
898
|
+
const url = this.routesService.currentNavigation().split('?')[0];
|
|
899
|
+
const items = this._sourceItems();
|
|
900
|
+
if (!items?.length || !url) {
|
|
901
|
+
return items;
|
|
902
|
+
}
|
|
903
|
+
const updated = [...items];
|
|
904
|
+
this.fixNavbarItems(url, items);
|
|
905
|
+
return updated;
|
|
906
|
+
});
|
|
907
|
+
this.routerItem = input();
|
|
908
|
+
this.routeClick = new EventEmitter();
|
|
909
|
+
this.isExpandedOrSelected = (item) => !!(item.expanded || item.selected);
|
|
910
|
+
}
|
|
874
911
|
set navbarItems(value) {
|
|
875
|
-
this.
|
|
912
|
+
this._sourceItems.set(value);
|
|
913
|
+
}
|
|
914
|
+
get navbarItems() {
|
|
915
|
+
return this._processedItems();
|
|
876
916
|
}
|
|
877
917
|
get itemsFromGroup() {
|
|
878
918
|
if (!this.groupedItems) {
|
|
@@ -880,15 +920,6 @@ class NavbarRoutesComponent {
|
|
|
880
920
|
}
|
|
881
921
|
return getItemsFromGroup(this.groupedItems);
|
|
882
922
|
}
|
|
883
|
-
constructor() {
|
|
884
|
-
this.injector = inject(Injector);
|
|
885
|
-
this.routesService = inject(RoutesService);
|
|
886
|
-
this._navbarItems = signal([]);
|
|
887
|
-
this.routerItem = input();
|
|
888
|
-
this.routeClick = new EventEmitter();
|
|
889
|
-
this.isExpandedOrSelected = (item) => !!(item.expanded || item.selected);
|
|
890
|
-
this.fixNavbarItemsByRouter();
|
|
891
|
-
}
|
|
892
923
|
onSubnavbarExpand(menuItem, menuItems) {
|
|
893
924
|
if (menuItem.expanded) {
|
|
894
925
|
const items = this.itemsFromGroup || menuItems;
|
|
@@ -929,56 +960,26 @@ class NavbarRoutesComponent {
|
|
|
929
960
|
return [...acc, item, ...this.flatChildren(item.children || [])];
|
|
930
961
|
}, []) || []);
|
|
931
962
|
}
|
|
932
|
-
fixNavbarItemsByRouter() {
|
|
933
|
-
effect(() => {
|
|
934
|
-
const items = this._navbarItems();
|
|
935
|
-
if (!items?.length) {
|
|
936
|
-
return;
|
|
937
|
-
}
|
|
938
|
-
const currentNavigation = this.routesService
|
|
939
|
-
.currentNavigation()
|
|
940
|
-
.split('?')[0];
|
|
941
|
-
if (!currentNavigation) {
|
|
942
|
-
return;
|
|
943
|
-
}
|
|
944
|
-
this.fixNavbarItems(currentNavigation, items);
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
963
|
fixNavbarItems(currentUrl, items) {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
item.expanded
|
|
954
|
-
this.fixNavbarItems(currentUrl, item.children);
|
|
964
|
+
items.forEach((item) => {
|
|
965
|
+
const { link, children } = item;
|
|
966
|
+
if (children?.length) {
|
|
967
|
+
this.fixNavbarItems(currentUrl, children);
|
|
968
|
+
const hasActiveChild = children.some((child) => child.selected || child.expanded || child.link === currentUrl);
|
|
969
|
+
item.expanded ||= hasActiveChild || link === currentUrl;
|
|
955
970
|
}
|
|
956
971
|
else {
|
|
957
|
-
item.selected =
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
hasUrlInChildren(item, url) {
|
|
962
|
-
if (item.link === url) {
|
|
963
|
-
return true;
|
|
964
|
-
}
|
|
965
|
-
if (item.children) {
|
|
966
|
-
for (const child of item.children) {
|
|
967
|
-
const found = this.hasUrlInChildren(child, url);
|
|
968
|
-
if (found) {
|
|
969
|
-
return true;
|
|
970
|
-
}
|
|
972
|
+
item.selected = link === currentUrl;
|
|
971
973
|
}
|
|
972
|
-
}
|
|
973
|
-
return false;
|
|
974
|
+
});
|
|
974
975
|
}
|
|
975
976
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavbarRoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
976
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: NavbarRoutesComponent, isStandalone: false, selector: "lpx-navbar-routes", inputs: { navbarItems: { classPropertyName: "navbarItems", publicName: "navbarItems", isSignal: false, isRequired: false, transformFunction: null }, groupedItems: { classPropertyName: "groupedItems", publicName: "groupedItems", isSignal: false, isRequired: false, transformFunction: null }, routerItem: { classPropertyName: "routerItem", publicName: "routerItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { routeClick: "routeClick" }, ngImport: i0, template: "<ul class=\"lpx-nav-menu\">\r\n @if (groupedItems && groupedItems.length) {\r\n @for (item of groupedItems; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"groupText; context: { $implicit: item }\"\r\n />\r\n\r\n @for (navbarItem of item.items; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: navbarItem }\"\r\n />\r\n }\r\n }\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"defaultRoute\" />\r\n }\r\n</ul>\r\n\r\n<ng-template #defaultRoute>\r\n @for (item of
|
|
977
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: NavbarRoutesComponent, isStandalone: false, selector: "lpx-navbar-routes", inputs: { navbarItems: { classPropertyName: "navbarItems", publicName: "navbarItems", isSignal: false, isRequired: false, transformFunction: null }, groupedItems: { classPropertyName: "groupedItems", publicName: "groupedItems", isSignal: false, isRequired: false, transformFunction: null }, routerItem: { classPropertyName: "routerItem", publicName: "routerItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { routeClick: "routeClick" }, ngImport: i0, template: "<ul class=\"lpx-nav-menu\">\r\n @if (groupedItems && groupedItems.length) {\r\n @for (item of groupedItems; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"groupText; context: { $implicit: item }\"\r\n />\r\n\r\n @for (navbarItem of item.items; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: navbarItem }\"\r\n />\r\n }\r\n }\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"defaultRoute\" />\r\n }\r\n</ul>\r\n\r\n<ng-template #defaultRoute>\r\n @for (item of navbarItems; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"\r\n />\r\n }\r\n</ng-template>\r\n\r\n<ng-template #groupText let-item>\r\n @if (item.items.length) {\r\n <li class=\"group-menu-item hidden-in-hover-trigger\">\r\n {{ item.group | lpxTranslate | async }}\r\n </li>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #itemTemplate let-item>\r\n <li\r\n class=\"outer-menu-item\"\r\n *lpxVisible=\"!item.visible || item.visible(item, injector)\"\r\n >\r\n <lpx-sub-navbar\r\n [item]=\"item\"\r\n (expand)=\"onSubnavbarExpand($event, navbarItems)\"\r\n (routeClick)=\"onRouteClick($event, navbarItems)\"\r\n [routerItem]=\"routerItem()\"\r\n />\r\n </li>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LpxVisibleDirective, selector: "[lpxVisible]", inputs: ["lpxVisible"] }, { kind: "component", type: SubNavbarComponent, selector: "lpx-sub-navbar", inputs: ["item", "routerItem"], outputs: ["routeClick", "expand"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "lpxTranslate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
977
978
|
}
|
|
978
979
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavbarRoutesComponent, decorators: [{
|
|
979
980
|
type: Component,
|
|
980
|
-
args: [{ standalone: false, selector: 'lpx-navbar-routes', encapsulation: ViewEncapsulation.None, template: "<ul class=\"lpx-nav-menu\">\r\n @if (groupedItems && groupedItems.length) {\r\n @for (item of groupedItems; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"groupText; context: { $implicit: item }\"\r\n />\r\n\r\n @for (navbarItem of item.items; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: navbarItem }\"\r\n />\r\n }\r\n }\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"defaultRoute\" />\r\n }\r\n</ul>\r\n\r\n<ng-template #defaultRoute>\r\n @for (item of
|
|
981
|
-
}],
|
|
981
|
+
args: [{ standalone: false, selector: 'lpx-navbar-routes', encapsulation: ViewEncapsulation.None, template: "<ul class=\"lpx-nav-menu\">\r\n @if (groupedItems && groupedItems.length) {\r\n @for (item of groupedItems; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"groupText; context: { $implicit: item }\"\r\n />\r\n\r\n @for (navbarItem of item.items; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: navbarItem }\"\r\n />\r\n }\r\n }\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"defaultRoute\" />\r\n }\r\n</ul>\r\n\r\n<ng-template #defaultRoute>\r\n @for (item of navbarItems; track $index) {\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"\r\n />\r\n }\r\n</ng-template>\r\n\r\n<ng-template #groupText let-item>\r\n @if (item.items.length) {\r\n <li class=\"group-menu-item hidden-in-hover-trigger\">\r\n {{ item.group | lpxTranslate | async }}\r\n </li>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #itemTemplate let-item>\r\n <li\r\n class=\"outer-menu-item\"\r\n *lpxVisible=\"!item.visible || item.visible(item, injector)\"\r\n >\r\n <lpx-sub-navbar\r\n [item]=\"item\"\r\n (expand)=\"onSubnavbarExpand($event, navbarItems)\"\r\n (routeClick)=\"onRouteClick($event, navbarItems)\"\r\n [routerItem]=\"routerItem()\"\r\n />\r\n </li>\r\n</ng-template>\r\n" }]
|
|
982
|
+
}], propDecorators: { navbarItems: [{
|
|
982
983
|
type: Input
|
|
983
984
|
}], groupedItems: [{
|
|
984
985
|
type: Input
|
|
@@ -1028,11 +1029,11 @@ class NavbarComponent {
|
|
|
1028
1029
|
return contents.reduce((acc, val) => acc.concat(val), []);
|
|
1029
1030
|
}
|
|
1030
1031
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1031
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: NavbarComponent, isStandalone: false, selector: "lpx-navbar", queries: [{ propertyName: "routesTemplate", first: true, predicate: NavbarRoutesDirective, descendants: true, read: TemplateRef }, { propertyName: "logoPanel", first: true, predicate: LogoPanelDirective, descendants: true }], ngImport: i0, template: "<nav class=\"lpx-nav\" (mouseenter)=\"handleInitialHover()\">\r\n <div class=\"lpx-logo-container\">\r\n <ng-container\r\n *ngTemplateOutlet=\"logoPanel?.template || defaultLogo\"\r\n ></ng-container>\r\n <lpx-icon\r\n class=\"menu-collapse-icon hidden-in-hover-trigger\"\r\n iconClass=\"bi bi-filter-left\"\r\n (click)=\"toggleSidebarHover()\"\r\n ></lpx-icon>\r\n </div>\r\n\r\n @if (showFilterMenu$ | async) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n routesTemplate || defaultRouteTemplate;\r\n context: {\r\n $implicit: service.navbarItems$ | async,\r\n groupItems: service.groupedNavbarItems$ | async,\r\n }\r\n \"\r\n ></ng-container>\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentAfter }\r\n \"\r\n ></ng-container>\r\n</nav>\r\n\r\n<ng-template #defaultRouteTemplate let-items let-groupItems=\"groupItems\">\r\n <lpx-navbar-routes\r\n [navbarItems]=\"items\"\r\n [groupedItems]=\"groupItems\"\r\n [routerItem]=\"true\"\r\n ></lpx-navbar-routes>\r\n</ng-template>\r\n\r\n<ng-template #customContentTemplate let-contents>\r\n @for (component of contents; track $index) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: injector\"\r\n ></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultLogo>\r\n <lpx-brand-logo
|
|
1032
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: NavbarComponent, isStandalone: false, selector: "lpx-navbar", queries: [{ propertyName: "routesTemplate", first: true, predicate: NavbarRoutesDirective, descendants: true, read: TemplateRef }, { propertyName: "logoPanel", first: true, predicate: LogoPanelDirective, descendants: true }], ngImport: i0, template: "<nav class=\"lpx-nav\" (mouseenter)=\"handleInitialHover()\">\r\n <div class=\"lpx-logo-container\">\r\n <ng-container\r\n *ngTemplateOutlet=\"logoPanel?.template || defaultLogo\"\r\n ></ng-container>\r\n <lpx-icon\r\n class=\"menu-collapse-icon hidden-in-hover-trigger\"\r\n iconClass=\"bi bi-filter-left\"\r\n (click)=\"toggleSidebarHover()\"\r\n ></lpx-icon>\r\n </div>\r\n\r\n @if (showFilterMenu$ | async) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n routesTemplate || defaultRouteTemplate;\r\n context: {\r\n $implicit: service.navbarItems$ | async,\r\n groupItems: service.groupedNavbarItems$ | async,\r\n }\r\n \"\r\n ></ng-container>\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentAfter }\r\n \"\r\n ></ng-container>\r\n</nav>\r\n\r\n<ng-template #defaultRouteTemplate let-items let-groupItems=\"groupItems\">\r\n <lpx-navbar-routes\r\n [navbarItems]=\"items\"\r\n [groupedItems]=\"groupItems\"\r\n [routerItem]=\"true\"\r\n ></lpx-navbar-routes>\r\n</ng-template>\r\n\r\n<ng-template #customContentTemplate let-contents>\r\n @for (component of contents; track $index) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: injector\"\r\n ></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultLogo>\r\n <lpx-brand-logo />\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BrandLogoComponent, selector: "lpx-brand-logo", inputs: ["layout"] }, { kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }, { kind: "component", type: NavbarRoutesComponent, selector: "lpx-navbar-routes", inputs: ["navbarItems", "groupedItems", "routerItem"], outputs: ["routeClick"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1032
1033
|
}
|
|
1033
1034
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavbarComponent, decorators: [{
|
|
1034
1035
|
type: Component,
|
|
1035
|
-
args: [{ standalone: false, selector: 'lpx-navbar', encapsulation: ViewEncapsulation.None, template: "<nav class=\"lpx-nav\" (mouseenter)=\"handleInitialHover()\">\r\n <div class=\"lpx-logo-container\">\r\n <ng-container\r\n *ngTemplateOutlet=\"logoPanel?.template || defaultLogo\"\r\n ></ng-container>\r\n <lpx-icon\r\n class=\"menu-collapse-icon hidden-in-hover-trigger\"\r\n iconClass=\"bi bi-filter-left\"\r\n (click)=\"toggleSidebarHover()\"\r\n ></lpx-icon>\r\n </div>\r\n\r\n @if (showFilterMenu$ | async) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n routesTemplate || defaultRouteTemplate;\r\n context: {\r\n $implicit: service.navbarItems$ | async,\r\n groupItems: service.groupedNavbarItems$ | async,\r\n }\r\n \"\r\n ></ng-container>\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentAfter }\r\n \"\r\n ></ng-container>\r\n</nav>\r\n\r\n<ng-template #defaultRouteTemplate let-items let-groupItems=\"groupItems\">\r\n <lpx-navbar-routes\r\n [navbarItems]=\"items\"\r\n [groupedItems]=\"groupItems\"\r\n [routerItem]=\"true\"\r\n ></lpx-navbar-routes>\r\n</ng-template>\r\n\r\n<ng-template #customContentTemplate let-contents>\r\n @for (component of contents; track $index) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: injector\"\r\n ></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultLogo>\r\n <lpx-brand-logo
|
|
1036
|
+
args: [{ standalone: false, selector: 'lpx-navbar', encapsulation: ViewEncapsulation.None, template: "<nav class=\"lpx-nav\" (mouseenter)=\"handleInitialHover()\">\r\n <div class=\"lpx-logo-container\">\r\n <ng-container\r\n *ngTemplateOutlet=\"logoPanel?.template || defaultLogo\"\r\n ></ng-container>\r\n <lpx-icon\r\n class=\"menu-collapse-icon hidden-in-hover-trigger\"\r\n iconClass=\"bi bi-filter-left\"\r\n (click)=\"toggleSidebarHover()\"\r\n ></lpx-icon>\r\n </div>\r\n\r\n @if (showFilterMenu$ | async) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n routesTemplate || defaultRouteTemplate;\r\n context: {\r\n $implicit: service.navbarItems$ | async,\r\n groupItems: service.groupedNavbarItems$ | async,\r\n }\r\n \"\r\n ></ng-container>\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentAfter }\r\n \"\r\n ></ng-container>\r\n</nav>\r\n\r\n<ng-template #defaultRouteTemplate let-items let-groupItems=\"groupItems\">\r\n <lpx-navbar-routes\r\n [navbarItems]=\"items\"\r\n [groupedItems]=\"groupItems\"\r\n [routerItem]=\"true\"\r\n ></lpx-navbar-routes>\r\n</ng-template>\r\n\r\n<ng-template #customContentTemplate let-contents>\r\n @for (component of contents; track $index) {\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: injector\"\r\n ></ng-container>\r\n }\r\n</ng-template>\r\n\r\n<ng-template #defaultLogo>\r\n <lpx-brand-logo />\r\n</ng-template>\r\n" }]
|
|
1036
1037
|
}], ctorParameters: () => [], propDecorators: { routesTemplate: [{
|
|
1037
1038
|
type: ContentChild,
|
|
1038
1039
|
args: [NavbarRoutesDirective, { read: TemplateRef }]
|
|
@@ -1794,6 +1795,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1794
1795
|
}]
|
|
1795
1796
|
}] });
|
|
1796
1797
|
|
|
1798
|
+
var LpxLogoFeatureKind;
|
|
1799
|
+
(function (LpxLogoFeatureKind) {
|
|
1800
|
+
LpxLogoFeatureKind[LpxLogoFeatureKind["Options"] = 0] = "Options";
|
|
1801
|
+
})(LpxLogoFeatureKind || (LpxLogoFeatureKind = {}));
|
|
1802
|
+
function makeLpxLogoFeature(kind, providers) {
|
|
1803
|
+
return {
|
|
1804
|
+
ɵkind: kind,
|
|
1805
|
+
ɵproviders: providers,
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
function withEnvironmentOptions(options = {}) {
|
|
1809
|
+
const { name, logoUrl } = options.application || {};
|
|
1810
|
+
return makeLpxLogoFeature(LpxLogoFeatureKind.Options, [
|
|
1811
|
+
{
|
|
1812
|
+
provide: LOGO_URL_TOKEN,
|
|
1813
|
+
useValue: logoUrl || '',
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
provide: LOGO_APP_NAME_TOKEN,
|
|
1817
|
+
useValue: name || 'ProjectName',
|
|
1818
|
+
},
|
|
1819
|
+
]);
|
|
1820
|
+
}
|
|
1821
|
+
function provideLogo(...features) {
|
|
1822
|
+
const providers = [];
|
|
1823
|
+
features.forEach(({ ɵproviders }) => providers.push(...ɵproviders));
|
|
1824
|
+
return makeEnvironmentProviders(providers);
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1797
1827
|
class BreadcrumbPanelDirective {
|
|
1798
1828
|
constructor(template) {
|
|
1799
1829
|
this.template = template;
|
|
@@ -2105,5 +2135,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
2105
2135
|
* Generated bundle index. Do not edit.
|
|
2106
2136
|
*/
|
|
2107
2137
|
|
|
2108
|
-
export { AvatarComponent, BodyService, BrandLogoComponent, BreadcrumbComponent, BreadcrumbPanelDirective, BreadcrumbRouteListenerService, BreadcrumbService, CONTENT_AFTER_ROUTES, CONTENT_BEFORE_ROUTES, ClickOutsideDirective, ContentPanelDirective, CurrentUserImagePanelDirective, CurrentUserPanelDirective, DataStore, DefaultAuthService, DefaultTranslateService, FooterComponent, FooterLinksService, FooterPanelDirective, ICON_MAP, IconComponent, LEPTON_X_ICON_SET, LPX_AUTH_SERVICE_PROVIDER, LPX_AUTH_SERVICE_TOKEN, LPX_INITIAL_STYLES, LPX_LANGUAGE, LPX_LAYOUT_STYLE_FINAL, LPX_MENU_ITEMS, LPX_RESPONSIVE_BREAKPOINTS_DEFAULTS, LPX_STYLE_FINAL, LPX_STYLE_PROVIDERS, LPX_TRANSLATE_SERVICE_TOKEN, LPX_TRANSLATE_TOKEN, LanguagePanelDirective, LanguageService, LanguageTranslateDefaults, LanguageTranslateKeys, LayoutService, LogoPanelDirective, LpxAvatarModule, LpxBrandLogoModule, LpxBreadcrumbModule, LpxClickOutsideModule, LpxCoreModule, LpxFooterModule, LpxIconModule, LpxLanguageModule, LpxLocalStorageService, LpxNavbarModule, LpxResponsiveModule, LpxThemeTranslateService, LpxTranslateModule, LpxVisibleDirective, MobileNavbarPanelDirective, MobileNavbarProfilePanelDirective, MobileNavbarSettingsPanelDirective, NavbarComponent, NavbarPanelDirective, NavbarRoutesComponent, NavbarRoutesDirective, NavbarService, NavitemPanelDirective, OTHERS_GROUP_KEY, PanelsModule, RESPONSIVE_BREAKPOINTS, ResponsiveDirective, ResponsiveService, RoutesService, SafeHtmlPipe, SettingsPanelDirective, StyleService, SubNavbarComponent, ToObservableModule, ToObservablePipe, ToolbarPanelDirective, ToolbarService, TopNavbarPanelDirective, TranslatePipe, UserProfileService, WINDOW, breadCrumbInit, createDirectionProvider, createGroupMap, createResponsiveProvider, createStyleFactory, createWindowProvider, exportedDeclarations, flatArrayDeepToObject, getItemsFromGroup, getStream$, isArray, isNullOrUndefined, listenDirectionChange, loadInitialStyles, sortItems, styleLoadFactory };
|
|
2138
|
+
export { AvatarComponent, BodyService, BrandLogoComponent, BreadcrumbComponent, BreadcrumbPanelDirective, BreadcrumbRouteListenerService, BreadcrumbService, CONTENT_AFTER_ROUTES, CONTENT_BEFORE_ROUTES, ClickOutsideDirective, ContentPanelDirective, CurrentUserImagePanelDirective, CurrentUserPanelDirective, DataStore, DefaultAuthService, DefaultTranslateService, FooterComponent, FooterLinksService, FooterPanelDirective, ICON_MAP, IconComponent, LEPTON_X_ICON_SET, LOGO_APP_NAME_TOKEN, LOGO_URL_TOKEN, LPX_AUTH_SERVICE_PROVIDER, LPX_AUTH_SERVICE_TOKEN, LPX_INITIAL_STYLES, LPX_LANGUAGE, LPX_LAYOUT_STYLE_FINAL, LPX_MENU_ITEMS, LPX_RESPONSIVE_BREAKPOINTS_DEFAULTS, LPX_STYLE_FINAL, LPX_STYLE_PROVIDERS, LPX_TRANSLATE_SERVICE_TOKEN, LPX_TRANSLATE_TOKEN, LanguagePanelDirective, LanguageService, LanguageTranslateDefaults, LanguageTranslateKeys, LayoutService, LogoPanelDirective, LpxAvatarModule, LpxBrandLogoModule, LpxBreadcrumbModule, LpxClickOutsideModule, LpxCoreModule, LpxFooterModule, LpxIconModule, LpxLanguageModule, LpxLocalStorageService, LpxLogoFeatureKind, LpxNavbarModule, LpxResponsiveModule, LpxThemeTranslateService, LpxTranslateModule, LpxVisibleDirective, MobileNavbarPanelDirective, MobileNavbarProfilePanelDirective, MobileNavbarSettingsPanelDirective, NavbarComponent, NavbarPanelDirective, NavbarRoutesComponent, NavbarRoutesDirective, NavbarService, NavitemPanelDirective, OTHERS_GROUP_KEY, PanelsModule, RESPONSIVE_BREAKPOINTS, ResponsiveDirective, ResponsiveService, RoutesService, SafeHtmlPipe, SettingsPanelDirective, StyleService, SubNavbarComponent, ToObservableModule, ToObservablePipe, ToolbarPanelDirective, ToolbarService, TopNavbarPanelDirective, TranslatePipe, UserProfileService, WINDOW, breadCrumbInit, createDirectionProvider, createGroupMap, createResponsiveProvider, createStyleFactory, createWindowProvider, exportedDeclarations, flatArrayDeepToObject, getItemsFromGroup, getStream$, isArray, isNullOrUndefined, layouts, listenDirectionChange, loadInitialStyles, provideLogo, sortItems, styleLoadFactory, withEnvironmentOptions };
|
|
2109
2139
|
//# sourceMappingURL=volo-ngx-lepton-x.core.mjs.map
|