@volo/ngx-lepton-x.core 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/index.mjs +3 -1
- package/esm2020/lib/abstracts/index.mjs +2 -0
- package/esm2020/lib/abstracts/perfect-scrollbar.mjs +8 -0
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2020/lib/components/navbar/models.mjs +1 -1
- package/esm2020/lib/components/navbar/navbar-routes/navbar-routes.component.mjs +26 -9
- package/esm2020/lib/components/navbar/navbar.component.mjs +3 -3
- package/esm2020/lib/components/navbar/navbar.service.mjs +13 -2
- package/esm2020/lib/consts/index.mjs +2 -0
- package/esm2020/lib/consts/others-group.mjs +2 -0
- package/esm2020/lib/directives/index.mjs +2 -1
- package/esm2020/lib/directives/perfect-scrollbar.directive.mjs +34 -0
- package/esm2020/lib/lepton-x-core.module.mjs +10 -3
- package/esm2020/lib/models/common.mjs +1 -1
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/user.mjs +2 -0
- package/esm2020/lib/services/index.mjs +2 -1
- package/esm2020/lib/services/perfect-scrollbar.service.mjs +47 -0
- package/esm2020/lib/services/user-profile/user-profile.service.mjs +1 -1
- package/esm2020/lib/tokens/index.mjs +2 -1
- package/esm2020/lib/tokens/perfect-scrollbar.token.mjs +3 -0
- package/esm2020/lib/utils/common.mjs +7 -1
- package/esm2020/lib/utils/index.mjs +2 -1
- package/esm2020/lib/utils/tree-utils.mjs +21 -0
- package/fesm2015/volo-ngx-lepton-x.core.mjs +181 -39
- package/fesm2015/volo-ngx-lepton-x.core.mjs.map +1 -1
- package/fesm2020/volo-ngx-lepton-x.core.mjs +179 -41
- package/fesm2020/volo-ngx-lepton-x.core.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/abstracts/index.d.ts +1 -0
- package/lib/abstracts/perfect-scrollbar.d.ts +15 -0
- package/lib/components/navbar/models.d.ts +5 -0
- package/lib/components/navbar/navbar-routes/navbar-routes.component.d.ts +6 -2
- package/lib/components/navbar/navbar.service.d.ts +7 -2
- package/lib/consts/index.d.ts +1 -0
- package/lib/consts/others-group.d.ts +1 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/perfect-scrollbar.directive.d.ts +12 -0
- package/lib/models/common.d.ts +5 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/user.d.ts +16 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/perfect-scrollbar.service.d.ts +15 -0
- package/lib/services/user-profile/user-profile.service.d.ts +1 -10
- package/lib/tokens/index.d.ts +1 -0
- package/lib/tokens/perfect-scrollbar.token.d.ts +3 -0
- package/lib/utils/common.d.ts +2 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/tree-utils.d.ts +8 -0
- package/package.json +3 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { NavigationCancel, NavigationEnd, NavigationError, } from '@angular/router';
|
|
3
|
+
import { filter } from 'rxjs';
|
|
4
|
+
import { LpxPerfectScrollbar } from '../abstracts';
|
|
5
|
+
import PerfectScrollbar from 'perfect-scrollbar';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class LpxPerfectScrollbarService extends LpxPerfectScrollbar {
|
|
8
|
+
setElement(value) {
|
|
9
|
+
if (value) {
|
|
10
|
+
this.elementRef = value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
setOptions(value) {
|
|
14
|
+
if (value) {
|
|
15
|
+
this.options = value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
createScrollbar() {
|
|
19
|
+
this.perfectScrollbar = new PerfectScrollbar(this.elementRef.nativeElement, this.options);
|
|
20
|
+
}
|
|
21
|
+
onResize() {
|
|
22
|
+
this.perfectScrollbar.update();
|
|
23
|
+
}
|
|
24
|
+
afterViewInit() {
|
|
25
|
+
this.createScrollbar();
|
|
26
|
+
this.subscription?.unsubscribe();
|
|
27
|
+
this.subscription = this.router.events
|
|
28
|
+
.pipe(filter((event) => event instanceof NavigationEnd ||
|
|
29
|
+
event instanceof NavigationError ||
|
|
30
|
+
event instanceof NavigationCancel))
|
|
31
|
+
.subscribe(() => {
|
|
32
|
+
const { element } = this.perfectScrollbar;
|
|
33
|
+
const { topAfterNavigate, leftAfterNavigate } = this.options || {};
|
|
34
|
+
element.scrollTop = topAfterNavigate || 0;
|
|
35
|
+
element.scrollLeft = leftAfterNavigate || 0;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
ngOnDestroy() {
|
|
39
|
+
this.subscription?.unsubscribe();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
LpxPerfectScrollbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LpxPerfectScrollbarService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
LpxPerfectScrollbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LpxPerfectScrollbarService });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LpxPerfectScrollbarService, decorators: [{
|
|
45
|
+
type: Injectable
|
|
46
|
+
}] });
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZmVjdC1zY3JvbGxiYXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvbGVwdG9uLXgtY29yZS9zcmMvbGliL3NlcnZpY2VzL3BlcmZlY3Qtc2Nyb2xsYmFyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFjLFVBQVUsRUFBYSxNQUFNLGVBQWUsQ0FBQztB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VTY3JvbGxiYXIoKTtcclxuXHJcbiAgICB0aGlzLnN1YnNjcmlwdGlvbj8udW5zdWJzY3JpYmUoKTtcclxuICAgIHRoaXMuc3Vic2NyaXB0aW9uID0gdGhpcy5yb3V0ZXIuZXZlbnRzXHJcbiAgICAgIC5waXBlKFxyXG4gICAgICAgIGZpbHRlcihcclxuICAgICAgICAgIChldmVudCkgPT5cclxuICAgICAgICAgICAgZXZlbnQgaW5zdGFuY2VvZiBOYXZpZ2F0aW9uRW5kIHx8XHJcbiAgICAgICAgICAgIGV2ZW50IGluc3RhbmNlb2YgTmF2aWdhdGlvbkVycm9yIHx8XHJcbiAgICAgICAgICAgIGV2ZW50IGluc3RhbmNlb2YgTmF2aWdhdGlvbkNhbmNlbFxyXG4gICAgICAgIClcclxuICAgICAgKVxyXG4gICAgICAuc3Vic2NyaWJlKCgpID0+IHtcclxuICAgICAgICBjb25zdCB7IGVsZW1lbnQgfSA9IHRoaXMucGVyZmVjdFNjcm9sbGJhcjtcclxuICAgICAgICBjb25zdCB7IHRvcEFmdGVyTmF2aWdhdGUsIGxlZnRBZnRlck5hdmlnYXRlIH0gPSB0aGlzLm9wdGlvbnMgfHwge307XHJcbiAgICAgICAgZWxlbWVudC5zY3JvbGxUb3AgPSB0b3BBZnRlck5hdmlnYXRlIHx8IDA7XHJcbiAgICAgICAgZWxlbWVudC5zY3JvbGxMZWZ0ID0gbGVmdEFmdGVyTmF2aWdhdGUgfHwgMDtcclxuICAgICAgfSk7XHJcbiAgfVxyXG5cclxuICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcclxuICAgIHRoaXMuc3Vic2NyaXB0aW9uPy51bnN1YnNjcmliZSgpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -21,4 +21,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
21
21
|
providedIn: 'root',
|
|
22
22
|
}]
|
|
23
23
|
}] });
|
|
24
|
-
//# sourceMappingURL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YXIvY29yZSc7XHJcbmltcG9ydCB7IERhdGFTdG9yZSB9IGZyb20gJy4uLy4uL3V0aWxzL2RhdGEtc3RvcmUnO1xyXG5pbXBvcnQgeyBVc2VyUHJvZmlsZSB9IGZyb20gJy4uLy4uL21vZGVscyc7XHJcblxyXG5ASW5qZWN0YWJsZSh7XHJcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgVXNlclByb2ZpbGVTZXJ2aWNlIHtcclxuICBwcml2YXRlIHN0b3JlID0gbmV3IERhdGFTdG9yZSh7fSBhcyBVc2VyUHJvZmlsZSk7XHJcbiAgdXNlciQgPSB0aGlzLnN0b3JlLnNsaWNlU3RhdGUoKHN0YXRlKSA9PiBzdGF0ZSk7XHJcblxyXG4gIHNldFVzZXIodXNlcjogVXNlclByb2ZpbGUpIHtcclxuICAgIHRoaXMuc3RvcmUuc2V0KHVzZXIpO1xyXG4gIH1cclxuXHJcbiAgcGF0Y2hVc2VyKHVzZXI6IFBhcnRpYWw8VXNlclByb2ZpbGU+KSB7XHJcbiAgICB0aGlzLnN0b3JlLnBhdGNoKHVzZXIpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export * from './window.token';
|
|
2
|
-
|
|
2
|
+
export * from './perfect-scrollbar.token';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2xlcHRvbi14LWNvcmUvc3JjL2xpYi90b2tlbnMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi93aW5kb3cudG9rZW4nO1xyXG5leHBvcnQgKiBmcm9tICcuL3BlcmZlY3Qtc2Nyb2xsYmFyLnRva2VuJztcclxuIl19
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export const LPX_PERFECT_SCROLLBAR = new InjectionToken('LPX_PERFECT_SCROLLBAR');
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZmVjdC1zY3JvbGxiYXIudG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2xlcHRvbi14LWNvcmUvc3JjL2xpYi90b2tlbnMvcGVyZmVjdC1zY3JvbGxiYXIudG9rZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUcvQyxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBRyxJQUFJLGNBQWMsQ0FDckQsdUJBQXVCLENBQ3hCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBMcHhQZXJmZWN0U2Nyb2xsYmFyIH0gZnJvbSAnLi4vYWJzdHJhY3RzJztcclxuXHJcbmV4cG9ydCBjb25zdCBMUFhfUEVSRkVDVF9TQ1JPTExCQVIgPSBuZXcgSW5qZWN0aW9uVG9rZW48THB4UGVyZmVjdFNjcm9sbGJhcj4oXHJcbiAgJ0xQWF9QRVJGRUNUX1NDUk9MTEJBUidcclxuKTtcclxuIl19
|
|
@@ -21,4 +21,10 @@ export function getStream$(source) {
|
|
|
21
21
|
? from(source)
|
|
22
22
|
: of(source);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
export function isNullOrUndefined(obj) {
|
|
25
|
+
return obj === null || obj === undefined;
|
|
26
|
+
}
|
|
27
|
+
export function isArray(obj) {
|
|
28
|
+
return Array.isArray(obj);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9sZXB0b24teC1jb3JlL3NyYy9saWIvdXRpbHMvY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUc1QyxNQUFNLFVBQVUsU0FBUyxDQUErQixDQUFJLEVBQUUsQ0FBSTtJQUNoRSxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRTtRQUNaLE9BQU8sQ0FBQyxDQUFDO0tBQ1Y7SUFDRCxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRTtRQUNaLE9BQU8sQ0FBQyxDQUFDLENBQUM7S0FDWDtJQUVELE9BQU8sQ0FBQyxDQUFDLEtBQUssR0FBRyxDQUFDLENBQUMsS0FBSyxDQUFDO0FBQzNCLENBQUM7QUFFRCxNQUFNLFVBQVUscUJBQXFCLENBQ25DLEdBQXFDO0lBRXJDLE9BQU8sR0FBRyxDQUFDLE1BQU0sQ0FDZixDQUFDLEdBQUcsRUFBRSxJQUFJLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDZCxHQUFHLEdBQUc7UUFDTixHQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMscUJBQXFCLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztLQUM5RCxDQUFDLEVBQ0YsRUFBRSxDQUNpQixDQUFDO0FBQ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BleHRlbmRzIHsgW2tleTogc3RyaW5nXTogYW55IH0+KFxyXG4gIGFycjogUmVjdXJzaXZlQXJyYXk8QXJyYXlUeXBlRGVlcDxUPj5cclxuKTogQXJyYXlUeXBlRGVlcDxUPiB7XHJcbiAgcmV0dXJuIGFyci5yZWR1Y2UoXHJcbiAgICAoYWNjLCBjdXJyKSA9PiAoe1xyXG4gICAgICAuLi5hY2MsXHJcbiAgICAgIC4uLihBcnJheS5pc0FycmF5KGN1cnIpID8gZmxhdEFycmF5RGVlcFRvT2JqZWN0KGN1cnIpIDogY3VyciksXHJcbiAgICB9KSxcclxuICAgIHt9XHJcbiAgKSBhcyBBcnJheVR5cGVEZWVwPFQ+O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gZ2V0U3RyZWFtJDxUPihzb3VyY2U6IFZhcmlhbnRTb3VyY2U8VD4pOiBPYnNlcnZhYmxlPFQ+IHtcclxuICByZXR1cm4gc291cmNlIGluc3RhbmNlb2YgT2JzZXJ2YWJsZVxyXG4gICAgPyBzb3VyY2VcclxuICAgIDogc291cmNlIGluc3RhbmNlb2YgUHJvbWlzZVxyXG4gICAgPyBmcm9tKHNvdXJjZSlcclxuICAgIDogb2Yoc291cmNlKTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIGlzTnVsbE9yVW5kZWZpbmVkPFQ+KG9iajogVCkge1xyXG4gIHJldHVybiBvYmogPT09IG51bGwgfHwgb2JqID09PSB1bmRlZmluZWQ7XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBpc0FycmF5PFQ+KG9iajogVCk6IGJvb2xlYW4ge1xyXG4gIHJldHVybiBBcnJheS5pc0FycmF5KG9iaik7XHJcbn1cclxuIl19
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './common';
|
|
2
2
|
export * from './data-store';
|
|
3
|
-
|
|
3
|
+
export * from './tree-utils';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2xlcHRvbi14LWNvcmUvc3JjL2xpYi91dGlscy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFVBQVUsQ0FBQztBQUN6QixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29tbW9uJztcclxuZXhwb3J0ICogZnJvbSAnLi9kYXRhLXN0b3JlJztcclxuZXhwb3J0ICogZnJvbSAnLi90cmVlLXV0aWxzJztcclxuIl19
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isArray } from './common';
|
|
2
|
+
export function createGroupMap(list, othersGroupKey, skipGroupCheck = false) {
|
|
3
|
+
if (!skipGroupCheck &&
|
|
4
|
+
(!isArray(list) || !list.some((node) => Boolean(node.group))))
|
|
5
|
+
return undefined;
|
|
6
|
+
const mapGroup = new Map();
|
|
7
|
+
for (const node of list) {
|
|
8
|
+
const group = node?.group || othersGroupKey;
|
|
9
|
+
if (typeof group !== 'string') {
|
|
10
|
+
throw new Error(`Invalid group: ${group}`);
|
|
11
|
+
}
|
|
12
|
+
const items = mapGroup.get(group) || [];
|
|
13
|
+
items.push(node);
|
|
14
|
+
mapGroup.set(group, items);
|
|
15
|
+
}
|
|
16
|
+
return mapGroup;
|
|
17
|
+
}
|
|
18
|
+
export function getItemsFromGroup(list, pred) {
|
|
19
|
+
return list?.reduce((acc, { items }) => [...acc, ...(pred ? items.filter(pred) : items)], []);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJlZS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4u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b3VwICE9PSAnc3RyaW5nJykge1xyXG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYEludmFsaWQgZ3JvdXA6ICR7Z3JvdXB9YCk7XHJcbiAgICB9XHJcblxyXG4gICAgY29uc3QgaXRlbXMgPSBtYXBHcm91cC5nZXQoZ3JvdXApIHx8IFtdO1xyXG4gICAgaXRlbXMucHVzaChub2RlKTtcclxuICAgIG1hcEdyb3VwLnNldChncm91cCwgaXRlbXMpO1xyXG4gIH1cclxuICByZXR1cm4gbWFwR3JvdXA7XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBnZXRJdGVtc0Zyb21Hcm91cDxTIGV4dGVuZHMgeyBpdGVtczogUltdIH0sIFI+KFxyXG4gIGxpc3Q6IFNbXSxcclxuICBwcmVkPzogSXRlbVByb3BQcmVkaWNhdGU8Uj5cclxuKTogUltdIHwgdW5kZWZpbmVkIHtcclxuICByZXR1cm4gbGlzdD8ucmVkdWNlPFJbXT4oXHJcbiAgICAoYWNjLCB7IGl0ZW1zIH0pID0+IFsuLi5hY2MsIC4uLihwcmVkID8gaXRlbXMuZmlsdGVyKHByZWQpIDogaXRlbXMpXSxcclxuICAgIFtdXHJcbiAgKTtcclxufVxyXG5cclxuZXhwb3J0IHR5cGUgSXRlbVByb3BQcmVkaWNhdGU8VD4gPSAoXHJcbiAgcHJvcDogVFxyXG4pID0+IGJvb2xlYW4gfCBQcm9taXNlPGJvb2xlYW4+IHwgT2JzZXJ2YWJsZTxib29sZWFuPjtcclxuIl19
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, Inject, NgModule, Component, ViewEncapsulation, Input, Directive, Optional, Pipe, EventEmitter, Output, TemplateRef, ContentChild,
|
|
2
|
+
import { inject, InjectionToken, Injectable, Inject, NgModule, Component, ViewEncapsulation, Input, Directive, Optional, Pipe, EventEmitter, Output, TemplateRef, ContentChild, SecurityContext, HostListener, APP_INITIALIZER, Injector, SkipSelf, ElementRef } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/router';
|
|
4
|
+
import { Router, NavigationEnd, NavigationError, NavigationCancel, RouterModule } from '@angular/router';
|
|
3
5
|
import * as i1 from '@angular/common';
|
|
4
6
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
7
|
import { map, distinctUntilChanged, filter, take, tap, switchMap, startWith, distinctUntilKeyChanged } from 'rxjs/operators';
|
|
6
|
-
import { BehaviorSubject, Subject,
|
|
8
|
+
import { BehaviorSubject, Subject, Observable, from, of, EMPTY, filter as filter$1, combineLatest, fromEvent, Subscription } from 'rxjs';
|
|
7
9
|
import { FormsModule } from '@angular/forms';
|
|
8
|
-
import
|
|
9
|
-
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
10
|
+
import PerfectScrollbar from 'perfect-scrollbar';
|
|
10
11
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
11
12
|
import { __awaiter } from 'tslib';
|
|
12
13
|
|
|
14
|
+
class LpxPerfectScrollbar {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.router = inject(Router);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
const LPX_LANGUAGE = new InjectionToken('LPX_LANGUAGE');
|
|
14
21
|
|
|
15
22
|
class DataStore {
|
|
@@ -272,6 +279,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
272
279
|
}]
|
|
273
280
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
274
281
|
|
|
282
|
+
function sortItems(a, b) {
|
|
283
|
+
if (!a.order) {
|
|
284
|
+
return 1;
|
|
285
|
+
}
|
|
286
|
+
if (!b.order) {
|
|
287
|
+
return -1;
|
|
288
|
+
}
|
|
289
|
+
return a.order - b.order;
|
|
290
|
+
}
|
|
291
|
+
function flatArrayDeepToObject(arr) {
|
|
292
|
+
return arr.reduce((acc, curr) => (Object.assign(Object.assign({}, acc), (Array.isArray(curr) ? flatArrayDeepToObject(curr) : curr))), {});
|
|
293
|
+
}
|
|
294
|
+
function getStream$(source) {
|
|
295
|
+
return source instanceof Observable
|
|
296
|
+
? source
|
|
297
|
+
: source instanceof Promise
|
|
298
|
+
? from(source)
|
|
299
|
+
: of(source);
|
|
300
|
+
}
|
|
301
|
+
function isNullOrUndefined(obj) {
|
|
302
|
+
return obj === null || obj === undefined;
|
|
303
|
+
}
|
|
304
|
+
function isArray(obj) {
|
|
305
|
+
return Array.isArray(obj);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function createGroupMap(list, othersGroupKey, skipGroupCheck = false) {
|
|
309
|
+
if (!skipGroupCheck &&
|
|
310
|
+
(!isArray(list) || !list.some((node) => Boolean(node.group))))
|
|
311
|
+
return undefined;
|
|
312
|
+
const mapGroup = new Map();
|
|
313
|
+
for (const node of list) {
|
|
314
|
+
const group = (node === null || node === void 0 ? void 0 : node.group) || othersGroupKey;
|
|
315
|
+
if (typeof group !== 'string') {
|
|
316
|
+
throw new Error(`Invalid group: ${group}`);
|
|
317
|
+
}
|
|
318
|
+
const items = mapGroup.get(group) || [];
|
|
319
|
+
items.push(node);
|
|
320
|
+
mapGroup.set(group, items);
|
|
321
|
+
}
|
|
322
|
+
return mapGroup;
|
|
323
|
+
}
|
|
324
|
+
function getItemsFromGroup(list, pred) {
|
|
325
|
+
return list === null || list === void 0 ? void 0 : list.reduce((acc, { items }) => [...acc, ...(pred ? items.filter(pred) : items)], []);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const OTHERS_GROUP_KEY = 'AbpUi::OthersGroup';
|
|
329
|
+
|
|
275
330
|
class NavbarService {
|
|
276
331
|
constructor(menuItems, route, router) {
|
|
277
332
|
this.menuItems = menuItems;
|
|
@@ -279,6 +334,15 @@ class NavbarService {
|
|
|
279
334
|
this.router = router;
|
|
280
335
|
this.store = new DataStore(this.addContainerLinks(this.menuItems));
|
|
281
336
|
this.navbarItems$ = this.store.sliceState((state) => state);
|
|
337
|
+
this.groupedNavbarItems$ = this.store
|
|
338
|
+
.sliceState((state) => state)
|
|
339
|
+
.pipe(filter((navItems) => navItems.some((f) => !!f.group)), map((items) => {
|
|
340
|
+
const map = createGroupMap(items, OTHERS_GROUP_KEY) || [];
|
|
341
|
+
return Array.from(map, ([group, items]) => ({
|
|
342
|
+
group,
|
|
343
|
+
items,
|
|
344
|
+
}));
|
|
345
|
+
}));
|
|
282
346
|
this.expandItemByLink$().pipe(take(1)).subscribe();
|
|
283
347
|
}
|
|
284
348
|
addNavbarItems(...menuItems) {
|
|
@@ -507,26 +571,6 @@ function checkType(value) {
|
|
|
507
571
|
}
|
|
508
572
|
}
|
|
509
573
|
|
|
510
|
-
function sortItems(a, b) {
|
|
511
|
-
if (!a.order) {
|
|
512
|
-
return 1;
|
|
513
|
-
}
|
|
514
|
-
if (!b.order) {
|
|
515
|
-
return -1;
|
|
516
|
-
}
|
|
517
|
-
return a.order - b.order;
|
|
518
|
-
}
|
|
519
|
-
function flatArrayDeepToObject(arr) {
|
|
520
|
-
return arr.reduce((acc, curr) => (Object.assign(Object.assign({}, acc), (Array.isArray(curr) ? flatArrayDeepToObject(curr) : curr))), {});
|
|
521
|
-
}
|
|
522
|
-
function getStream$(source) {
|
|
523
|
-
return source instanceof Observable
|
|
524
|
-
? source
|
|
525
|
-
: source instanceof Promise
|
|
526
|
-
? from(source)
|
|
527
|
-
: of(source);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
574
|
class UserProfileService {
|
|
531
575
|
constructor() {
|
|
532
576
|
this.store = new DataStore({});
|
|
@@ -669,6 +713,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
669
713
|
}]
|
|
670
714
|
}], ctorParameters: function () { return []; } });
|
|
671
715
|
|
|
716
|
+
class LpxPerfectScrollbarService extends LpxPerfectScrollbar {
|
|
717
|
+
setElement(value) {
|
|
718
|
+
if (value) {
|
|
719
|
+
this.elementRef = value;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
setOptions(value) {
|
|
723
|
+
if (value) {
|
|
724
|
+
this.options = value;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
createScrollbar() {
|
|
728
|
+
this.perfectScrollbar = new PerfectScrollbar(this.elementRef.nativeElement, this.options);
|
|
729
|
+
}
|
|
730
|
+
onResize() {
|
|
731
|
+
this.perfectScrollbar.update();
|
|
732
|
+
}
|
|
733
|
+
afterViewInit() {
|
|
734
|
+
var _a;
|
|
735
|
+
this.createScrollbar();
|
|
736
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
737
|
+
this.subscription = this.router.events
|
|
738
|
+
.pipe(filter$1((event) => event instanceof NavigationEnd ||
|
|
739
|
+
event instanceof NavigationError ||
|
|
740
|
+
event instanceof NavigationCancel))
|
|
741
|
+
.subscribe(() => {
|
|
742
|
+
const { element } = this.perfectScrollbar;
|
|
743
|
+
const { topAfterNavigate, leftAfterNavigate } = this.options || {};
|
|
744
|
+
element.scrollTop = topAfterNavigate || 0;
|
|
745
|
+
element.scrollLeft = leftAfterNavigate || 0;
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
ngOnDestroy() {
|
|
749
|
+
var _a;
|
|
750
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
LpxPerfectScrollbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LpxPerfectScrollbarService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
754
|
+
LpxPerfectScrollbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LpxPerfectScrollbarService });
|
|
755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LpxPerfectScrollbarService, decorators: [{
|
|
756
|
+
type: Injectable
|
|
757
|
+
}] });
|
|
758
|
+
|
|
672
759
|
class TranslatePipe {
|
|
673
760
|
constructor(lpxThemeTranslateService) {
|
|
674
761
|
this.lpxThemeTranslateService = lpxThemeTranslateService;
|
|
@@ -745,21 +832,36 @@ class NavbarRoutesComponent {
|
|
|
745
832
|
constructor(injector) {
|
|
746
833
|
this.injector = injector;
|
|
747
834
|
this.routeClick = new EventEmitter();
|
|
835
|
+
this.isExpandedOrSelected = (item) => !!(item.expanded || item.selected);
|
|
836
|
+
}
|
|
837
|
+
get itemsFromGroup() {
|
|
838
|
+
if (!this.groupedItems) {
|
|
839
|
+
return undefined;
|
|
840
|
+
}
|
|
841
|
+
return getItemsFromGroup(this.groupedItems);
|
|
748
842
|
}
|
|
749
843
|
onSubnavbarExpand(menuItem, menuItems) {
|
|
750
844
|
if (menuItem.expanded) {
|
|
751
|
-
|
|
845
|
+
const items = this.itemsFromGroup || menuItems;
|
|
846
|
+
if (!items) {
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
items
|
|
850
|
+
.filter((item) => item !== menuItem)
|
|
851
|
+
.forEach((item) => (item.expanded = false));
|
|
752
852
|
}
|
|
753
853
|
}
|
|
754
854
|
onRouteClick(menuItem, menuItems) {
|
|
755
|
-
var _a;
|
|
756
|
-
const expandedItems = menuItems === null || menuItems === void 0 ? void 0 : menuItems.filter(
|
|
757
|
-
|
|
758
|
-
|
|
855
|
+
var _a, _b;
|
|
856
|
+
const expandedItems = menuItems === null || menuItems === void 0 ? void 0 : menuItems.filter(this.isExpandedOrSelected);
|
|
857
|
+
const expandedGroupItems = (_a = this.itemsFromGroup) === null || _a === void 0 ? void 0 : _a.filter(this.isExpandedOrSelected);
|
|
858
|
+
const items = expandedGroupItems || expandedItems;
|
|
859
|
+
if (items) {
|
|
860
|
+
(_b = items
|
|
759
861
|
.filter((item) => item !== menuItem)
|
|
760
862
|
.reduce((acc, item) => {
|
|
761
863
|
return [...acc, item, ...this.flatChildren(item.children || [])];
|
|
762
|
-
}, [])) === null ||
|
|
864
|
+
}, [])) === null || _b === void 0 ? void 0 : _b.filter((item) => !this.checkChildrenIncludesItem(item, menuItem) && item !== menuItem).forEach((item) => {
|
|
763
865
|
item.selected = false;
|
|
764
866
|
item.expanded = false;
|
|
765
867
|
});
|
|
@@ -779,11 +881,13 @@ class NavbarRoutesComponent {
|
|
|
779
881
|
}
|
|
780
882
|
}
|
|
781
883
|
NavbarRoutesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavbarRoutesComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
782
|
-
NavbarRoutesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NavbarRoutesComponent, selector: "lpx-navbar-routes", inputs: { navbarItems: "navbarItems", routerItem: "routerItem" }, outputs: { routeClick: "routeClick" }, ngImport: i0, template: "<ul class=\"lpx-nav-menu\">\r\n <ng-container *ngFor=\"let item of navbarItems\">\r\n <li class=\"outer-menu-item\"
|
|
884
|
+
NavbarRoutesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NavbarRoutesComponent, selector: "lpx-navbar-routes", inputs: { groupedItems: "groupedItems", navbarItems: "navbarItems", routerItem: "routerItem" }, outputs: { routeClick: "routeClick" }, ngImport: i0, template: "<ul class=\"lpx-nav-menu\">\r\n <ng-container *ngIf=\"groupedItems; else defaultRoute\">\r\n <ng-container *ngFor=\"let item of groupedItems\">\r\n <ng-container\r\n *ngTemplateOutlet=\"groupText; context: { $implicit: item }\"\r\n ></ng-container>\r\n\r\n <ng-container *ngFor=\"let navbarItem of item.items\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: navbarItem }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ul>\r\n\r\n<ng-template #defaultRoute>\r\n <ng-container *ngFor=\"let item of navbarItems\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #groupText let-item>\r\n <li\r\n *ngIf=\"item.items.length > 0\"\r\n class=\"group-menu-item hidden-in-hover-trigger\"\r\n >\r\n {{ item.group | lpxTranslate | async }}\r\n </li>\r\n</ng-template>\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 ></lpx-sub-navbar>\r\n </li>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 });
|
|
783
885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavbarRoutesComponent, decorators: [{
|
|
784
886
|
type: Component,
|
|
785
|
-
args: [{ selector: 'lpx-navbar-routes', encapsulation: ViewEncapsulation.None, template: "<ul class=\"lpx-nav-menu\">\r\n <ng-container *ngFor=\"let item of navbarItems\">\r\n <li class=\"outer-menu-item\"
|
|
786
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: {
|
|
887
|
+
args: [{ selector: 'lpx-navbar-routes', encapsulation: ViewEncapsulation.None, template: "<ul class=\"lpx-nav-menu\">\r\n <ng-container *ngIf=\"groupedItems; else defaultRoute\">\r\n <ng-container *ngFor=\"let item of groupedItems\">\r\n <ng-container\r\n *ngTemplateOutlet=\"groupText; context: { $implicit: item }\"\r\n ></ng-container>\r\n\r\n <ng-container *ngFor=\"let navbarItem of item.items\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: navbarItem }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ul>\r\n\r\n<ng-template #defaultRoute>\r\n <ng-container *ngFor=\"let item of navbarItems\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"\r\n ></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #groupText let-item>\r\n <li\r\n *ngIf=\"item.items.length > 0\"\r\n class=\"group-menu-item hidden-in-hover-trigger\"\r\n >\r\n {{ item.group | lpxTranslate | async }}\r\n </li>\r\n</ng-template>\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 ></lpx-sub-navbar>\r\n </li>\r\n</ng-template>\r\n" }]
|
|
888
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { groupedItems: [{
|
|
889
|
+
type: Input
|
|
890
|
+
}], navbarItems: [{
|
|
787
891
|
type: Input
|
|
788
892
|
}], routerItem: [{
|
|
789
893
|
type: Input
|
|
@@ -808,10 +912,10 @@ class NavbarComponent {
|
|
|
808
912
|
}
|
|
809
913
|
}
|
|
810
914
|
NavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavbarComponent, deps: [{ token: NavbarService }, { token: i0.Injector }, { token: LayoutService }], target: i0.ɵɵFactoryTarget.Component });
|
|
811
|
-
NavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NavbarComponent, 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\">\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 <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n routesTemplate || defaultRouteTemplate;\r\n context: {
|
|
915
|
+
NavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NavbarComponent, 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\">\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 <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\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 <ng-container *ngFor=\"let component of contents\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: injector\"\r\n ></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultLogo>\r\n <lpx-brand-logo></lpx-brand-logo>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BrandLogoComponent, selector: "lpx-brand-logo" }, { kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }, { kind: "component", type: NavbarRoutesComponent, selector: "lpx-navbar-routes", inputs: ["groupedItems", "navbarItems", "routerItem"], outputs: ["routeClick"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
|
|
812
916
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavbarComponent, decorators: [{
|
|
813
917
|
type: Component,
|
|
814
|
-
args: [{ selector: 'lpx-navbar', encapsulation: ViewEncapsulation.None, template: "<nav class=\"lpx-nav\">\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 <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n routesTemplate || defaultRouteTemplate;\r\n context: {
|
|
918
|
+
args: [{ selector: 'lpx-navbar', encapsulation: ViewEncapsulation.None, template: "<nav class=\"lpx-nav\">\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 <ng-container\r\n *ngTemplateOutlet=\"\r\n customContentTemplate;\r\n context: { $implicit: contentBefore }\r\n \"\r\n ></ng-container>\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 <ng-container *ngFor=\"let component of contents\">\r\n <ng-container\r\n *ngComponentOutlet=\"component; injector: injector\"\r\n ></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultLogo>\r\n <lpx-brand-logo></lpx-brand-logo>\r\n</ng-template>\r\n" }]
|
|
815
919
|
}], ctorParameters: function () { return [{ type: NavbarService }, { type: i0.Injector }, { type: LayoutService }]; }, propDecorators: { routesTemplate: [{
|
|
816
920
|
type: ContentChild,
|
|
817
921
|
args: [NavbarRoutesDirective, { read: TemplateRef }]
|
|
@@ -1036,10 +1140,10 @@ class BreadcrumbComponent {
|
|
|
1036
1140
|
}
|
|
1037
1141
|
}
|
|
1038
1142
|
BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1039
|
-
BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BreadcrumbComponent, selector: "lpx-breadcrumb", ngImport: i0, template: "<nav aria-label=\"breadcrumb\">\r\n <ol class=\"lpx-breadcrumb\">\r\n <ng-container *ngFor=\"let item of service.items$ | async; last as last\">\r\n <li\r\n class=\"lpx-breadcrumb-item\"\r\n (click)=\"onClick(item)\"\r\n [class.expanded]=\"item.expanded\"\r\n (lpxClickOutside)=\"item.expanded = false\"\r\n >\r\n <lpx-icon\r\n class=\"lpx-breadcrumb-item-icon\"\r\n *ngIf=\"item.icon\"\r\n [iconClass]=\"item.icon\"\r\n ></lpx-icon>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.children?.length ? textTemplate : linkTemplate;\r\n context: { $implicit: item }\r\n \"\r\n ></ng-container>\r\n
|
|
1143
|
+
BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BreadcrumbComponent, selector: "lpx-breadcrumb", ngImport: i0, template: "<nav aria-label=\"breadcrumb\">\r\n <ol class=\"lpx-breadcrumb\">\r\n <ng-container *ngFor=\"let item of service.items$ | async; last as last\">\r\n <li\r\n class=\"lpx-breadcrumb-item\"\r\n (click)=\"onClick(item)\"\r\n [class.expanded]=\"item.expanded\"\r\n (lpxClickOutside)=\"item.expanded = false\"\r\n >\r\n <lpx-icon\r\n class=\"lpx-breadcrumb-item-icon\"\r\n *ngIf=\"item.icon\"\r\n [iconClass]=\"item.icon\"\r\n ></lpx-icon>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.children?.length ? textTemplate : linkTemplate;\r\n context: { $implicit: item }\r\n \"\r\n ></ng-container>\r\n </li>\r\n <li *ngIf=\"!last\" class=\"lpx-breadcrumb-separator\">\r\n <lpx-icon iconClass=\"bi bi-chevron-right\"></lpx-icon>\r\n </li>\r\n </ng-container>\r\n </ol>\r\n</nav>\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.link\"> {{ item.text | toObservable | async }} </a>\r\n</ng-template>\r\n<ng-template #textTemplate let-item>\r\n <span class=\"lpx-breadcrumb-item-text\">\r\n {{ item.text | toObservable | async }}\r\n </span>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[lpxClickOutside]", inputs: ["exceptedRefs"], outputs: ["lpxClickOutside"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: ToObservablePipe, name: "toObservable" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1040
1144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
1041
1145
|
type: Component,
|
|
1042
|
-
args: [{ selector: 'lpx-breadcrumb', encapsulation: ViewEncapsulation.None, template: "<nav aria-label=\"breadcrumb\">\r\n <ol class=\"lpx-breadcrumb\">\r\n <ng-container *ngFor=\"let item of service.items$ | async; last as last\">\r\n <li\r\n class=\"lpx-breadcrumb-item\"\r\n (click)=\"onClick(item)\"\r\n [class.expanded]=\"item.expanded\"\r\n (lpxClickOutside)=\"item.expanded = false\"\r\n >\r\n <lpx-icon\r\n class=\"lpx-breadcrumb-item-icon\"\r\n *ngIf=\"item.icon\"\r\n [iconClass]=\"item.icon\"\r\n ></lpx-icon>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.children?.length ? textTemplate : linkTemplate;\r\n context: { $implicit: item }\r\n \"\r\n ></ng-container>\r\n
|
|
1146
|
+
args: [{ selector: 'lpx-breadcrumb', encapsulation: ViewEncapsulation.None, template: "<nav aria-label=\"breadcrumb\">\r\n <ol class=\"lpx-breadcrumb\">\r\n <ng-container *ngFor=\"let item of service.items$ | async; last as last\">\r\n <li\r\n class=\"lpx-breadcrumb-item\"\r\n (click)=\"onClick(item)\"\r\n [class.expanded]=\"item.expanded\"\r\n (lpxClickOutside)=\"item.expanded = false\"\r\n >\r\n <lpx-icon\r\n class=\"lpx-breadcrumb-item-icon\"\r\n *ngIf=\"item.icon\"\r\n [iconClass]=\"item.icon\"\r\n ></lpx-icon>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.children?.length ? textTemplate : linkTemplate;\r\n context: { $implicit: item }\r\n \"\r\n ></ng-container>\r\n </li>\r\n <li *ngIf=\"!last\" class=\"lpx-breadcrumb-separator\">\r\n <lpx-icon iconClass=\"bi bi-chevron-right\"></lpx-icon>\r\n </li>\r\n </ng-container>\r\n </ol>\r\n</nav>\r\n\r\n<ng-template #linkTemplate let-item>\r\n <a [routerLink]=\"item.link\"> {{ item.text | toObservable | async }} </a>\r\n</ng-template>\r\n<ng-template #textTemplate let-item>\r\n <span class=\"lpx-breadcrumb-item-text\">\r\n {{ item.text | toObservable | async }}\r\n </span>\r\n</ng-template>\r\n" }]
|
|
1043
1147
|
}], ctorParameters: function () { return [{ type: BreadcrumbService }]; } });
|
|
1044
1148
|
|
|
1045
1149
|
class LpxClickOutsideModule {
|
|
@@ -1458,15 +1562,22 @@ function listenDirectionChange(languageService, styleService) {
|
|
|
1458
1562
|
};
|
|
1459
1563
|
}
|
|
1460
1564
|
|
|
1565
|
+
const LPX_PERFECT_SCROLLBAR = new InjectionToken('LPX_PERFECT_SCROLLBAR');
|
|
1566
|
+
|
|
1461
1567
|
class LpxCoreModule {
|
|
1462
1568
|
static forRoot(options) {
|
|
1463
1569
|
return {
|
|
1464
1570
|
ngModule: LpxCoreModule,
|
|
1465
1571
|
providers: [
|
|
1572
|
+
{
|
|
1573
|
+
provide: LPX_PERFECT_SCROLLBAR,
|
|
1574
|
+
useClass: LpxPerfectScrollbarService,
|
|
1575
|
+
},
|
|
1466
1576
|
createResponsiveProvider(options === null || options === void 0 ? void 0 : options.responsiveSettings),
|
|
1467
1577
|
createWindowProvider(options === null || options === void 0 ? void 0 : options.window),
|
|
1468
1578
|
LpxIconModule.forRoot(options === null || options === void 0 ? void 0 : options.iconSettings).providers,
|
|
1469
|
-
LpxLanguageModule.forRoot(options === null || options === void 0 ? void 0 : options.languageSettings)
|
|
1579
|
+
LpxLanguageModule.forRoot(options === null || options === void 0 ? void 0 : options.languageSettings)
|
|
1580
|
+
.providers,
|
|
1470
1581
|
LpxNavbarModule.forRoot(options === null || options === void 0 ? void 0 : options.navbarSettings).providers,
|
|
1471
1582
|
LpxBreadcrumbModule.forRoot().providers,
|
|
1472
1583
|
LPX_TRANSLATE_PROVIDERS,
|
|
@@ -1563,6 +1674,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1563
1674
|
}]
|
|
1564
1675
|
}] });
|
|
1565
1676
|
|
|
1677
|
+
class PerfectScrollbarDirective {
|
|
1678
|
+
constructor() {
|
|
1679
|
+
this.elementRef = inject(ElementRef);
|
|
1680
|
+
this.lpxPerfectService = inject(LPX_PERFECT_SCROLLBAR);
|
|
1681
|
+
}
|
|
1682
|
+
set lpxPerfectScrollbarOptions(value) {
|
|
1683
|
+
this.lpxPerfectService.setOptions(value);
|
|
1684
|
+
}
|
|
1685
|
+
onResize() {
|
|
1686
|
+
this.lpxPerfectService.onResize();
|
|
1687
|
+
}
|
|
1688
|
+
ngAfterViewInit() {
|
|
1689
|
+
this.lpxPerfectService.setElement(this.elementRef);
|
|
1690
|
+
this.lpxPerfectService.afterViewInit();
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
PerfectScrollbarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PerfectScrollbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1694
|
+
PerfectScrollbarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: PerfectScrollbarDirective, isStandalone: true, selector: "[lpxPerfectScrollbar]", inputs: { lpxPerfectScrollbarOptions: "lpxPerfectScrollbarOptions" }, host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0 });
|
|
1695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PerfectScrollbarDirective, decorators: [{
|
|
1696
|
+
type: Directive,
|
|
1697
|
+
args: [{
|
|
1698
|
+
selector: '[lpxPerfectScrollbar]',
|
|
1699
|
+
standalone: true,
|
|
1700
|
+
}]
|
|
1701
|
+
}], propDecorators: { lpxPerfectScrollbarOptions: [{
|
|
1702
|
+
type: Input
|
|
1703
|
+
}], onResize: [{
|
|
1704
|
+
type: HostListener,
|
|
1705
|
+
args: ['window:resize']
|
|
1706
|
+
}] } });
|
|
1707
|
+
|
|
1566
1708
|
class BreadcrumbPanelDirective {
|
|
1567
1709
|
constructor(template) {
|
|
1568
1710
|
this.template = template;
|
|
@@ -1788,5 +1930,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1788
1930
|
* Generated bundle index. Do not edit.
|
|
1789
1931
|
*/
|
|
1790
1932
|
|
|
1791
|
-
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, NavbarComponent, NavbarPanelDirective, NavbarRoutesComponent, NavbarRoutesDirective, NavbarService, NavitemPanelDirective, PanelsModule, RESPONSIVE_BREAKPOINTS, ResponsiveDirective, ResponsiveService, SafeHtmlPipe, SettingsPanelDirective, StyleService, SubNavbarComponent, ToObservableModule, ToObservablePipe, ToolbarPanelDirective, TopNavbarPanelDirective, TranslatePipe, UserProfileService, WINDOW, breadCrumbInit, createDirectionProvider, createResponsiveProvider, createStyleFactory, createWindowProvider, exportedDeclarations, flatArrayDeepToObject, getStream$, listenDirectionChange, loadInitialStyles, sortItems, styleLoadFactory };
|
|
1933
|
+
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_PERFECT_SCROLLBAR, 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, LpxPerfectScrollbar, LpxPerfectScrollbarService, LpxResponsiveModule, LpxThemeTranslateService, LpxTranslateModule, LpxVisibleDirective, MobileNavbarPanelDirective, NavbarComponent, NavbarPanelDirective, NavbarRoutesComponent, NavbarRoutesDirective, NavbarService, NavitemPanelDirective, OTHERS_GROUP_KEY, PanelsModule, PerfectScrollbarDirective, RESPONSIVE_BREAKPOINTS, ResponsiveDirective, ResponsiveService, SafeHtmlPipe, SettingsPanelDirective, StyleService, SubNavbarComponent, ToObservableModule, ToObservablePipe, ToolbarPanelDirective, TopNavbarPanelDirective, TranslatePipe, UserProfileService, WINDOW, breadCrumbInit, createDirectionProvider, createGroupMap, createResponsiveProvider, createStyleFactory, createWindowProvider, exportedDeclarations, flatArrayDeepToObject, getItemsFromGroup, getStream$, isArray, isNullOrUndefined, listenDirectionChange, loadInitialStyles, sortItems, styleLoadFactory };
|
|
1792
1934
|
//# sourceMappingURL=volo-ngx-lepton-x.core.mjs.map
|