@volo/ngx-lepton-x.core 4.3.0-rc.1 → 4.3.0-rc.3
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 +1539 -1524
- package/fesm2022/volo-ngx-lepton-x.core.mjs.map +1 -1
- package/index.d.ts +973 -14
- package/package.json +1 -1
- package/lib/animations/collapse.animations.d.ts +0 -9
- package/lib/components/avatar/avatar.component.d.ts +0 -10
- package/lib/components/avatar/avatar.module.d.ts +0 -9
- package/lib/components/avatar/index.d.ts +0 -2
- package/lib/components/brand-logo/brand-logo.component.d.ts +0 -10
- package/lib/components/brand-logo/brand-logo.module.d.ts +0 -8
- package/lib/components/brand-logo/index.d.ts +0 -2
- package/lib/components/breadcrumb/breadcrumb-route-listener.service.d.ts +0 -18
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +0 -28
- package/lib/components/breadcrumb/breadcrumb.module.d.ts +0 -17
- package/lib/components/breadcrumb/breadcrumb.service.d.ts +0 -19
- package/lib/components/breadcrumb/index.d.ts +0 -4
- package/lib/components/footer/footer-links.service.d.ts +0 -17
- package/lib/components/footer/footer.component.d.ts +0 -9
- package/lib/components/footer/footer.module.d.ts +0 -11
- package/lib/components/footer/index.d.ts +0 -3
- package/lib/components/icon/icon.component.d.ts +0 -10
- package/lib/components/icon/icon.module.d.ts +0 -14
- package/lib/components/icon/icon.token.d.ts +0 -40
- package/lib/components/icon/index.d.ts +0 -3
- package/lib/components/index.d.ts +0 -6
- package/lib/components/navbar/index.d.ts +0 -7
- package/lib/components/navbar/models.d.ts +0 -24
- package/lib/components/navbar/navbar-routes/index.d.ts +0 -2
- package/lib/components/navbar/navbar-routes/navbar-routes.component.d.ts +0 -26
- package/lib/components/navbar/navbar-routes/navbar-routes.directive.d.ts +0 -5
- package/lib/components/navbar/navbar.component.d.ts +0 -26
- package/lib/components/navbar/navbar.module.d.ts +0 -27
- package/lib/components/navbar/navbar.service.d.ts +0 -34
- package/lib/components/navbar/navbar.token.d.ts +0 -5
- package/lib/components/navbar/sub-navbar/sub-navbar.component.d.ts +0 -15
- package/lib/consts/index.d.ts +0 -1
- package/lib/consts/others-group.d.ts +0 -1
- package/lib/directives/click-outside/click-outside.directive.d.ts +0 -11
- package/lib/directives/click-outside/click-outside.module.d.ts +0 -8
- package/lib/directives/click-outside/index.d.ts +0 -2
- package/lib/directives/index.d.ts +0 -3
- package/lib/directives/responsive/defaults.d.ts +0 -2
- package/lib/directives/responsive/index.d.ts +0 -5
- package/lib/directives/responsive/responsive-breakpoints.token.d.ts +0 -5
- package/lib/directives/responsive/responsive.directive.d.ts +0 -19
- package/lib/directives/responsive/responsive.module.d.ts +0 -8
- package/lib/directives/responsive/responsive.service.d.ts +0 -47
- package/lib/directives/visible.directive.d.ts +0 -18
- package/lib/enums/index.d.ts +0 -1
- package/lib/enums/layouts.d.ts +0 -4
- package/lib/lepton-x-core.module.d.ts +0 -24
- package/lib/models/common.d.ts +0 -7
- package/lib/models/index.d.ts +0 -3
- package/lib/models/toolbar-item.model.d.ts +0 -26
- package/lib/models/user.d.ts +0 -18
- package/lib/panels/breadcrumb-panel.directive.d.ts +0 -8
- package/lib/panels/content-panel.directive.d.ts +0 -8
- package/lib/panels/current-user-image-panel.directive.d.ts +0 -8
- package/lib/panels/current-user-panel.directive.d.ts +0 -8
- package/lib/panels/footer-panel.directive.d.ts +0 -8
- package/lib/panels/index.d.ts +0 -16
- package/lib/panels/language-panel.directive.d.ts +0 -8
- package/lib/panels/logo-panel.directive.d.ts +0 -8
- package/lib/panels/mobile-navbar-panel.directive.d.ts +0 -8
- package/lib/panels/mobile-navbar-profile-panel.directive.d.ts +0 -8
- package/lib/panels/mobile-navbar-settings-panel.directive.d.ts +0 -8
- package/lib/panels/navbar-panel.directive.d.ts +0 -8
- package/lib/panels/navitem-panel.directive.d.ts +0 -8
- package/lib/panels/panels.module.d.ts +0 -22
- package/lib/panels/settings-panel.directive.d.ts +0 -8
- package/lib/panels/toolbar-panel.directive.d.ts +0 -8
- package/lib/panels/top-navbar-panel.directive.d.ts +0 -8
- package/lib/pipes/index.d.ts +0 -3
- package/lib/pipes/safe-html/index.d.ts +0 -1
- package/lib/pipes/safe-html/safe-html.pipe.d.ts +0 -8
- package/lib/pipes/to-observable/index.d.ts +0 -2
- package/lib/pipes/to-observable/to-observable.module.d.ts +0 -8
- package/lib/pipes/to-observable/to-observable.pipe.d.ts +0 -9
- package/lib/pipes/translate/index.d.ts +0 -2
- package/lib/pipes/translate/translate.module.d.ts +0 -8
- package/lib/pipes/translate/translate.pipe.d.ts +0 -10
- package/lib/providers/direction.provider.d.ts +0 -2
- package/lib/providers/index.d.ts +0 -5
- package/lib/providers/logo.provider.d.ts +0 -11
- package/lib/providers/responsive.provider.d.ts +0 -3
- package/lib/providers/styles.provider.d.ts +0 -5
- package/lib/providers/window.provider.d.ts +0 -2
- package/lib/services/auth/default-auth.service.d.ts +0 -11
- package/lib/services/auth/index.d.ts +0 -4
- package/lib/services/auth/models.d.ts +0 -5
- package/lib/services/auth/providers.d.ts +0 -2
- package/lib/services/auth/tokens.d.ts +0 -3
- package/lib/services/body/body.service.d.ts +0 -11
- package/lib/services/body/index.d.ts +0 -1
- package/lib/services/index.d.ts +0 -8
- package/lib/services/language/index.d.ts +0 -5
- package/lib/services/language/language-translate-keys.enum.d.ts +0 -7
- package/lib/services/language/language.module.d.ts +0 -10
- package/lib/services/language/language.service.d.ts +0 -28
- package/lib/services/language/models.d.ts +0 -14
- package/lib/services/language/tokens.d.ts +0 -3
- package/lib/services/layout/index.d.ts +0 -1
- package/lib/services/layout/layout.service.d.ts +0 -20
- package/lib/services/local-storage/index.d.ts +0 -1
- package/lib/services/local-storage/local-storage.service.d.ts +0 -13
- package/lib/services/route/index.d.ts +0 -1
- package/lib/services/route/routes.service.d.ts +0 -10
- package/lib/services/toolbar/index.d.ts +0 -1
- package/lib/services/toolbar/toolbar.service.d.ts +0 -12
- package/lib/services/translate/default-translate.service.d.ts +0 -9
- package/lib/services/translate/index.d.ts +0 -4
- package/lib/services/translate/models.d.ts +0 -9
- package/lib/services/translate/providers.d.ts +0 -3
- package/lib/services/translate/tokens.d.ts +0 -4
- package/lib/services/translate/translate.service.d.ts +0 -12
- package/lib/services/user-profile/index.d.ts +0 -1
- package/lib/services/user-profile/user-profile.service.d.ts +0 -10
- package/lib/style/index.d.ts +0 -5
- package/lib/style/models.d.ts +0 -8
- package/lib/style/style-load.factory.d.ts +0 -2
- package/lib/style/style.service.d.ts +0 -17
- package/lib/style/tokens.d.ts +0 -5
- package/lib/style/utils.d.ts +0 -2
- package/lib/tokens/index.d.ts +0 -2
- package/lib/tokens/logo.token.d.ts +0 -3
- package/lib/tokens/window.token.d.ts +0 -2
- package/lib/utils/common.d.ts +0 -11
- package/lib/utils/data-store.d.ts +0 -12
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/tree-utils.d.ts +0 -8
|
@@ -1,18 +1,105 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Inject, Injectable,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import * as i2 from '@angular/router';
|
|
9
|
-
import { RouterModule, Router, NavigationEnd } from '@angular/router';
|
|
2
|
+
import { Input, Directive, NgModule, InjectionToken, Inject, Injectable, DOCUMENT, provideAppInitializer, inject, Optional, SkipSelf, makeEnvironmentProviders, ViewEncapsulation, Component, input, ElementRef, EventEmitter, HostListener, Output, Pipe, Injector, signal, computed, PLATFORM_ID, TemplateRef, ContentChild, SecurityContext } from '@angular/core';
|
|
3
|
+
import { CommonModule, Location, NgClass, NgTemplateOutlet, AsyncPipe, NgComponentOutlet, isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { of, from, Observable, EMPTY, BehaviorSubject, Subject, fromEvent, Subscription, combineLatest, map as map$1 } from 'rxjs';
|
|
5
|
+
import { Router, NavigationEnd, RouterLink, RouterModule } from '@angular/router';
|
|
6
|
+
import { map, distinctUntilChanged, filter, take, switchMap, distinctUntilKeyChanged, startWith, tap } from 'rxjs/operators';
|
|
7
|
+
import { RoutesService as RoutesService$1, LocalizationService, LocalizationPipe } from '@abp/ng.core';
|
|
10
8
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
11
9
|
import { animation, style, animate, trigger, state, transition, useAnimation } from '@angular/animations';
|
|
10
|
+
import { FormsModule } from '@angular/forms';
|
|
12
11
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
13
|
-
import { RoutesService as RoutesService$1, LocalizationService } from '@abp/ng.core';
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
class LpxVisibleDirective {
|
|
14
|
+
set lpxVisible(value) {
|
|
15
|
+
this.condition$ = checkType(value);
|
|
16
|
+
this.subscribeToCondition();
|
|
17
|
+
}
|
|
18
|
+
constructor(viewContainerRef, templateRef) {
|
|
19
|
+
this.viewContainerRef = viewContainerRef;
|
|
20
|
+
this.templateRef = templateRef;
|
|
21
|
+
this.condition$ = of(false);
|
|
22
|
+
}
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
this.updateVisibility();
|
|
25
|
+
}
|
|
26
|
+
ngOnDestroy() {
|
|
27
|
+
this.conditionSubscription?.unsubscribe();
|
|
28
|
+
}
|
|
29
|
+
subscribeToCondition() {
|
|
30
|
+
this.conditionSubscription = this.condition$.subscribe((value) => {
|
|
31
|
+
this.isVisible = value;
|
|
32
|
+
this.updateVisibility();
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
updateVisibility() {
|
|
36
|
+
this.viewContainerRef.clear();
|
|
37
|
+
// it should be false not falsy
|
|
38
|
+
if (this.isVisible === false) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
42
|
+
}
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxVisibleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
44
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: LpxVisibleDirective, isStandalone: true, selector: "[lpxVisible]", inputs: { lpxVisible: "lpxVisible" }, ngImport: i0 }); }
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxVisibleDirective, decorators: [{
|
|
47
|
+
type: Directive,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: '[lpxVisible]',
|
|
50
|
+
standalone: true,
|
|
51
|
+
}]
|
|
52
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }], propDecorators: { lpxVisible: [{
|
|
53
|
+
type: Input,
|
|
54
|
+
args: ['lpxVisible']
|
|
55
|
+
}] } });
|
|
56
|
+
function checkType(value) {
|
|
57
|
+
if (value instanceof Promise) {
|
|
58
|
+
return from(value);
|
|
59
|
+
}
|
|
60
|
+
else if (value instanceof Observable) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
else if (typeof value === 'boolean') {
|
|
64
|
+
return of(value);
|
|
65
|
+
}
|
|
66
|
+
else if (value === undefined || value === null) {
|
|
67
|
+
return of(true);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return EMPTY;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var LanguageTranslateKeys;
|
|
75
|
+
(function (LanguageTranslateKeys) {
|
|
76
|
+
LanguageTranslateKeys["SettingsTitle"] = "language.settings.title";
|
|
77
|
+
})(LanguageTranslateKeys || (LanguageTranslateKeys = {}));
|
|
78
|
+
const LanguageTranslateDefaults = {
|
|
79
|
+
[LanguageTranslateKeys.SettingsTitle]: 'Language Options',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
class LpxLanguageModule {
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated `LpxLanguageModule.forRoot()` is deprecated. You can use `provideLpxCore` **function** instead.
|
|
85
|
+
*/
|
|
86
|
+
static forRoot(options) {
|
|
87
|
+
return {
|
|
88
|
+
ngModule: LpxLanguageModule,
|
|
89
|
+
providers: [provideLpxCore(SKIP_DEFAULTS, withLanguage(options))],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxLanguageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
93
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxLanguageModule, imports: [CommonModule] }); }
|
|
94
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxLanguageModule, imports: [CommonModule] }); }
|
|
95
|
+
}
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxLanguageModule, decorators: [{
|
|
97
|
+
type: NgModule,
|
|
98
|
+
args: [{
|
|
99
|
+
declarations: [],
|
|
100
|
+
imports: [CommonModule],
|
|
101
|
+
}]
|
|
102
|
+
}] });
|
|
16
103
|
|
|
17
104
|
class DataStore {
|
|
18
105
|
get state() {
|
|
@@ -42,13 +129,7 @@ class DataStore {
|
|
|
42
129
|
}
|
|
43
130
|
}
|
|
44
131
|
|
|
45
|
-
|
|
46
|
-
(function (LanguageTranslateKeys) {
|
|
47
|
-
LanguageTranslateKeys["SettingsTitle"] = "language.settings.title";
|
|
48
|
-
})(LanguageTranslateKeys || (LanguageTranslateKeys = {}));
|
|
49
|
-
const LanguageTranslateDefaults = {
|
|
50
|
-
[LanguageTranslateKeys.SettingsTitle]: 'Language Options',
|
|
51
|
-
};
|
|
132
|
+
const LPX_LANGUAGE = new InjectionToken('LPX_LANGUAGE');
|
|
52
133
|
|
|
53
134
|
class LanguageService {
|
|
54
135
|
get selectedLanguage() {
|
|
@@ -99,10 +180,10 @@ class LanguageService {
|
|
|
99
180
|
selectedLanguage: lang,
|
|
100
181
|
});
|
|
101
182
|
}
|
|
102
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
103
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
183
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LanguageService, deps: [{ token: LPX_LANGUAGE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
184
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LanguageService, providedIn: 'root' }); }
|
|
104
185
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LanguageService, decorators: [{
|
|
106
187
|
type: Injectable,
|
|
107
188
|
args: [{
|
|
108
189
|
providedIn: 'root',
|
|
@@ -112,160 +193,312 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
112
193
|
args: [LPX_LANGUAGE]
|
|
113
194
|
}] }] });
|
|
114
195
|
|
|
115
|
-
const
|
|
116
|
-
const
|
|
196
|
+
const LPX_INITIAL_STYLES = new InjectionToken('LPX_INITIAL_STYLES_TOKEN');
|
|
197
|
+
const LPX_STYLE_FINAL = new InjectionToken('LPX_STYLE_FINAL_TOKEN');
|
|
198
|
+
const LPX_LAYOUT_STYLE_FINAL = new InjectionToken('LPX_LAYOUT_STYLE_FINALIZE_TOKEN');
|
|
117
199
|
|
|
118
|
-
class
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
provide: LPX_LANGUAGE,
|
|
125
|
-
useValue: options?.languages || [],
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
provide: LPX_TRANSLATE_TOKEN,
|
|
129
|
-
useValue: [LanguageTranslateDefaults],
|
|
130
|
-
multi: true,
|
|
131
|
-
},
|
|
132
|
-
LanguageService,
|
|
133
|
-
],
|
|
134
|
-
};
|
|
200
|
+
class StyleService {
|
|
201
|
+
constructor(initialStyles, document) {
|
|
202
|
+
this.initialStyles = initialStyles;
|
|
203
|
+
this.document = document;
|
|
204
|
+
this.lastInjectedStyle = null;
|
|
205
|
+
this.initialized$ = new BehaviorSubject(false);
|
|
135
206
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
sunset: 'bi bi-brightness-alt-high-fill',
|
|
162
|
-
sunup: 'bi bi-brightness-high-fill',
|
|
163
|
-
star: 'bi bi-star',
|
|
164
|
-
x: 'bi bi-x',
|
|
165
|
-
xCircleFill: 'bi bi-x-circle-fill',
|
|
166
|
-
};
|
|
167
|
-
const LEPTON_X_ICON_SET = new InjectionToken('LEPTON_X_ICON_SET');
|
|
168
|
-
|
|
169
|
-
class IconComponent {
|
|
170
|
-
get styleClass() {
|
|
171
|
-
return (this.iconSet[this.iconClass] || this.iconClass);
|
|
207
|
+
async initStyles(direction) {
|
|
208
|
+
for (const style of this.initialStyles) {
|
|
209
|
+
await this.loadStyle(style, direction);
|
|
210
|
+
}
|
|
211
|
+
this.initialized$.next(true);
|
|
212
|
+
}
|
|
213
|
+
async loadStyle(style, direction) {
|
|
214
|
+
return new Promise((resolve, reject) => {
|
|
215
|
+
const linkElem = this.createLinkElem(style, direction, resolve);
|
|
216
|
+
//TODO: find a better way for understand style laaded by angular json
|
|
217
|
+
const appStyles = document.querySelector('link[rel="stylesheet"][href*="styles"]');
|
|
218
|
+
if (appStyles) {
|
|
219
|
+
if (this.lastInjectedStyle && this.lastInjectedStyle.isConnected) {
|
|
220
|
+
this.lastInjectedStyle.insertAdjacentElement('afterend', linkElem);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
appStyles.insertAdjacentElement('beforebegin', linkElem);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
this.document.head.appendChild(linkElem);
|
|
228
|
+
}
|
|
229
|
+
this.lastInjectedStyle = linkElem;
|
|
230
|
+
return Promise.resolve(linkElem);
|
|
231
|
+
});
|
|
172
232
|
}
|
|
173
|
-
|
|
174
|
-
|
|
233
|
+
async replaceStyle(style, direction) {
|
|
234
|
+
const loaded = this.document.querySelector(`link#${style.bundleName}`);
|
|
235
|
+
if (loaded) {
|
|
236
|
+
loaded.remove();
|
|
237
|
+
}
|
|
238
|
+
return this.loadStyle(style, direction);
|
|
175
239
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
240
|
+
async reloadInitialStyles(direction) {
|
|
241
|
+
for (const style of this.initialStyles) {
|
|
242
|
+
await this.replaceStyle(style, direction);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
createLinkElem(style, direction, resolve) {
|
|
246
|
+
const linkElem = document.createElement('link');
|
|
247
|
+
linkElem.rel = 'stylesheet';
|
|
248
|
+
linkElem.id = style.bundleName;
|
|
249
|
+
linkElem.href = `${style.bundleName}${direction === 'rtl' ? '.rtl' : ''}.css`;
|
|
250
|
+
linkElem.onload = () => {
|
|
251
|
+
resolve(linkElem);
|
|
252
|
+
};
|
|
253
|
+
return linkElem;
|
|
254
|
+
}
|
|
255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: StyleService, deps: [{ token: LPX_STYLE_FINAL }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
256
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: StyleService, providedIn: 'root' }); }
|
|
180
257
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
182
|
-
type:
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: StyleService, decorators: [{
|
|
259
|
+
type: Injectable,
|
|
183
260
|
args: [{
|
|
184
|
-
|
|
185
|
-
selector: 'lpx-icon',
|
|
186
|
-
template: `
|
|
187
|
-
<i class="lpx-icon" [ngClass]="styleClass" aria-hidden="true"></i>
|
|
188
|
-
`,
|
|
189
|
-
encapsulation: ViewEncapsulation.None,
|
|
261
|
+
providedIn: 'root',
|
|
190
262
|
}]
|
|
191
263
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
192
264
|
type: Inject,
|
|
193
|
-
args: [
|
|
194
|
-
}] }
|
|
195
|
-
|
|
196
|
-
|
|
265
|
+
args: [LPX_STYLE_FINAL]
|
|
266
|
+
}] }, { type: Document, decorators: [{
|
|
267
|
+
type: Inject,
|
|
268
|
+
args: [DOCUMENT]
|
|
269
|
+
}] }] });
|
|
197
270
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return {
|
|
201
|
-
ngModule: LpxIconModule,
|
|
202
|
-
providers: [
|
|
203
|
-
{
|
|
204
|
-
provide: LEPTON_X_ICON_SET,
|
|
205
|
-
useValue: options?.iconSet || ICON_MAP,
|
|
206
|
-
},
|
|
207
|
-
],
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
211
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: LpxIconModule, declarations: [IconComponent], imports: [CommonModule], exports: [IconComponent] }); }
|
|
212
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxIconModule, imports: [CommonModule] }); }
|
|
271
|
+
function createStyleFactory(handler) {
|
|
272
|
+
return handler || ((defaultValue) => defaultValue);
|
|
213
273
|
}
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxIconModule, decorators: [{
|
|
215
|
-
type: NgModule,
|
|
216
|
-
args: [{
|
|
217
|
-
declarations: [IconComponent],
|
|
218
|
-
imports: [CommonModule],
|
|
219
|
-
exports: [IconComponent],
|
|
220
|
-
}]
|
|
221
|
-
}] });
|
|
222
|
-
|
|
223
|
-
const LOGO_URL_TOKEN = new InjectionToken('LOGO_URL_TOKEN');
|
|
224
|
-
const LOGO_APP_NAME_TOKEN = new InjectionToken('LOGO_APP_NAME_TOKEN');
|
|
225
274
|
|
|
226
|
-
|
|
227
|
-
(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
-
}
|
|
243
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BrandLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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 }); }
|
|
275
|
+
function styleLoadFactory(styleList, layoutStyles) {
|
|
276
|
+
styleList.push({
|
|
277
|
+
bundleName: 'ng-bundle',
|
|
278
|
+
});
|
|
279
|
+
styleList.push({
|
|
280
|
+
bundleName: 'font-bundle',
|
|
281
|
+
});
|
|
282
|
+
return [...styleList, ...layoutStyles];
|
|
245
283
|
}
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BrandLogoComponent, decorators: [{
|
|
247
|
-
type: Component,
|
|
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" }]
|
|
249
|
-
}] });
|
|
250
284
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
285
|
+
function createDirectionProvider(listenDirection) {
|
|
286
|
+
return provideAppInitializer(() => {
|
|
287
|
+
if (listenDirection) {
|
|
288
|
+
listenDirectionChange();
|
|
289
|
+
}
|
|
290
|
+
});
|
|
255
291
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
292
|
+
// subscribe to direction from documentElement and load direction stylesheet
|
|
293
|
+
function listenDirectionChange() {
|
|
294
|
+
const languageService = inject(LanguageService);
|
|
295
|
+
const styleService = inject(StyleService);
|
|
296
|
+
return new Promise((resolve) => {
|
|
297
|
+
styleService.initialized$
|
|
298
|
+
.pipe(filter(Boolean), take(1), switchMap(() => languageService.languageChange$), distinctUntilKeyChanged('isRTL'))
|
|
299
|
+
.subscribe(async (lang) => {
|
|
300
|
+
const direction = lang?.isRTL ? 'rtl' : 'ltr';
|
|
301
|
+
const documentElement = document.documentElement;
|
|
302
|
+
if (documentElement.dir !== direction) {
|
|
303
|
+
documentElement.dir = direction;
|
|
304
|
+
}
|
|
305
|
+
await styleService.reloadInitialStyles(direction);
|
|
306
|
+
resolve(null);
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const RESPONSIVE_BREAKPOINTS = new InjectionToken('RESPONSIVE_BREAKPOINTS');
|
|
312
|
+
|
|
313
|
+
const WINDOW = new InjectionToken('WINDOW');
|
|
314
|
+
|
|
315
|
+
class ResponsiveService {
|
|
316
|
+
constructor(providedBreakpoints, window) {
|
|
317
|
+
this.providedBreakpoints = providedBreakpoints;
|
|
318
|
+
this.window = window;
|
|
319
|
+
this.defaultBreakpoint = {
|
|
320
|
+
name: "all" /* ResponsiveTokens.all */,
|
|
321
|
+
width: 0,
|
|
322
|
+
};
|
|
323
|
+
this.breakpoints = this.buildBreakpoints(this.providedBreakpoints);
|
|
324
|
+
this.getCurrentSize = () => ({
|
|
325
|
+
height: this.window.innerHeight,
|
|
326
|
+
width: this.window.innerWidth,
|
|
327
|
+
});
|
|
328
|
+
this.mapSizeToBreakpoint = ({ width } = this.getCurrentSize()) => {
|
|
329
|
+
return this.breakpoints.find((s) => width >= s.width);
|
|
330
|
+
};
|
|
331
|
+
this.currentSize$ = new BehaviorSubject(this.mapSizeToBreakpoint());
|
|
332
|
+
this.shouldRenderWithCurrentSize = (query) => {
|
|
333
|
+
return this.matchQuery(query);
|
|
334
|
+
};
|
|
335
|
+
this.setupListener();
|
|
336
|
+
}
|
|
337
|
+
setupListener() {
|
|
338
|
+
this.currentResolution$ = fromEvent(this.window, 'resize')
|
|
339
|
+
.pipe(map(this.getCurrentSize))
|
|
340
|
+
.pipe(startWith(this.getCurrentSize()));
|
|
341
|
+
this.currentResolution$
|
|
342
|
+
.pipe(map(this.mapSizeToBreakpoint), distinctUntilChanged())
|
|
343
|
+
.subscribe((current) => {
|
|
344
|
+
this.currentSize$.next(current);
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
buildBreakpoints(breakpoints) {
|
|
348
|
+
return [
|
|
349
|
+
...Object.keys(breakpoints)
|
|
350
|
+
.map((key) => ({
|
|
351
|
+
name: key,
|
|
352
|
+
width: breakpoints[key],
|
|
353
|
+
}))
|
|
354
|
+
.sort((a, b) => b.width - a.width),
|
|
355
|
+
this.defaultBreakpoint,
|
|
356
|
+
];
|
|
357
|
+
}
|
|
358
|
+
matchQuery(query) {
|
|
359
|
+
const { width } = this.getCurrentSize();
|
|
360
|
+
const tokens = query.split(' ');
|
|
361
|
+
const findInTokens = (size) => tokens.find((token) => token.split("-" /* ResponsiveTokens.separator */)[0] === size);
|
|
362
|
+
const matchedBreakpoint = this.breakpoints.find((breakpoint) => width >= breakpoint.width && findInTokens(breakpoint.name));
|
|
363
|
+
if (matchedBreakpoint) {
|
|
364
|
+
const token = findInTokens(matchedBreakpoint.name);
|
|
365
|
+
const shouldBeBigger = !token?.includes("none" /* ResponsiveTokens.none */);
|
|
366
|
+
return shouldBeBigger === width >= matchedBreakpoint.width;
|
|
367
|
+
}
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ResponsiveService, deps: [{ token: RESPONSIVE_BREAKPOINTS }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
371
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ResponsiveService, providedIn: 'root' }); }
|
|
372
|
+
}
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ResponsiveService, decorators: [{
|
|
374
|
+
type: Injectable,
|
|
375
|
+
args: [{
|
|
376
|
+
providedIn: 'root',
|
|
377
|
+
}]
|
|
378
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
379
|
+
type: Inject,
|
|
380
|
+
args: [RESPONSIVE_BREAKPOINTS]
|
|
381
|
+
}] }, { type: undefined, decorators: [{
|
|
382
|
+
type: Inject,
|
|
383
|
+
args: [WINDOW]
|
|
384
|
+
}] }] });
|
|
385
|
+
|
|
386
|
+
class ResponsiveDirective {
|
|
387
|
+
constructor(templateRef, viewContainer, service, parentCdr) {
|
|
388
|
+
this.templateRef = templateRef;
|
|
389
|
+
this.viewContainer = viewContainer;
|
|
390
|
+
this.service = service;
|
|
391
|
+
this.parentCdr = parentCdr;
|
|
392
|
+
this.hasRendered = false;
|
|
393
|
+
this.sub = new Subscription();
|
|
394
|
+
this.render = (shouldRender) => {
|
|
395
|
+
if (shouldRender && !this.hasRendered) {
|
|
396
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
397
|
+
this.hasRendered = true;
|
|
398
|
+
}
|
|
399
|
+
else if (!shouldRender && this.hasRendered) {
|
|
400
|
+
this.viewContainer.clear();
|
|
401
|
+
this.hasRendered = false;
|
|
402
|
+
}
|
|
403
|
+
this.parentCdr.detectChanges();
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
ngOnInit() {
|
|
407
|
+
this.sub.add(this.service.currentSize$
|
|
408
|
+
.pipe(map((_) => this.service.shouldRenderWithCurrentSize(this.query)))
|
|
409
|
+
.subscribe(this.render));
|
|
410
|
+
}
|
|
411
|
+
ngOnDestroy() {
|
|
412
|
+
this.sub.unsubscribe();
|
|
413
|
+
}
|
|
414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ResponsiveDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: ResponsiveService }, { token: i0.ChangeDetectorRef, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
415
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: ResponsiveDirective, isStandalone: true, selector: "[lpxResponsive]", inputs: { query: ["lpxResponsive", "query"] }, ngImport: i0 }); }
|
|
416
|
+
}
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ResponsiveDirective, decorators: [{
|
|
418
|
+
type: Directive,
|
|
419
|
+
args: [{ selector: '[lpxResponsive]' }]
|
|
420
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: ResponsiveService }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
421
|
+
type: Optional
|
|
422
|
+
}, {
|
|
423
|
+
type: SkipSelf
|
|
424
|
+
}] }], propDecorators: { query: [{
|
|
425
|
+
type: Input,
|
|
426
|
+
args: ['lpxResponsive']
|
|
427
|
+
}] } });
|
|
428
|
+
|
|
429
|
+
class LpxResponsiveModule {
|
|
430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxResponsiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
431
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxResponsiveModule, imports: [CommonModule, ResponsiveDirective], exports: [ResponsiveDirective] }); }
|
|
432
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxResponsiveModule, imports: [CommonModule] }); }
|
|
433
|
+
}
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxResponsiveModule, decorators: [{
|
|
435
|
+
type: NgModule,
|
|
436
|
+
args: [{
|
|
437
|
+
imports: [CommonModule, ResponsiveDirective],
|
|
438
|
+
exports: [ResponsiveDirective],
|
|
439
|
+
}]
|
|
440
|
+
}] });
|
|
441
|
+
|
|
442
|
+
const LPX_RESPONSIVE_BREAKPOINTS_DEFAULTS = {
|
|
443
|
+
sm: 480,
|
|
444
|
+
md: 768,
|
|
445
|
+
lg: 992,
|
|
446
|
+
xl: 1200,
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
function createResponsiveProvider(responsiveSettings) {
|
|
450
|
+
return {
|
|
451
|
+
provide: RESPONSIVE_BREAKPOINTS,
|
|
452
|
+
useValue: responsiveSettings || LPX_RESPONSIVE_BREAKPOINTS_DEFAULTS,
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
class UserProfileService {
|
|
457
|
+
constructor() {
|
|
458
|
+
this.store = new DataStore({});
|
|
459
|
+
this.user$ = this.store.sliceState((state) => state);
|
|
460
|
+
}
|
|
461
|
+
setUser(user) {
|
|
462
|
+
this.store.set(user);
|
|
463
|
+
}
|
|
464
|
+
patchUser(user) {
|
|
465
|
+
this.store.patch(user);
|
|
466
|
+
}
|
|
467
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: UserProfileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
468
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: UserProfileService, providedIn: 'root' }); }
|
|
469
|
+
}
|
|
470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: UserProfileService, decorators: [{
|
|
471
|
+
type: Injectable,
|
|
472
|
+
args: [{
|
|
473
|
+
providedIn: 'root',
|
|
474
|
+
}]
|
|
475
|
+
}] });
|
|
476
|
+
|
|
477
|
+
class BodyService {
|
|
478
|
+
constructor() {
|
|
479
|
+
this.body = document.querySelector('body');
|
|
480
|
+
this.classes = {
|
|
481
|
+
overflowYHidden: 'overflow-y-hidden',
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
disableScrollY() {
|
|
485
|
+
this.body?.classList.add(this.classes.overflowYHidden);
|
|
486
|
+
}
|
|
487
|
+
enableScrollY() {
|
|
488
|
+
this.body?.classList.remove(this.classes.overflowYHidden);
|
|
489
|
+
}
|
|
490
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BodyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
491
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BodyService, providedIn: 'root' }); }
|
|
492
|
+
}
|
|
493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BodyService, decorators: [{
|
|
494
|
+
type: Injectable,
|
|
495
|
+
args: [{
|
|
496
|
+
providedIn: 'root',
|
|
497
|
+
}]
|
|
498
|
+
}] });
|
|
499
|
+
|
|
500
|
+
class LayoutService {
|
|
501
|
+
constructor() {
|
|
269
502
|
this.store = new DataStore({
|
|
270
503
|
containerClass: [''],
|
|
271
504
|
});
|
|
@@ -310,19 +543,18 @@ class LayoutService {
|
|
|
310
543
|
containerClass,
|
|
311
544
|
});
|
|
312
545
|
}
|
|
313
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
314
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
546
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
547
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LayoutService, providedIn: 'root' }); }
|
|
315
548
|
}
|
|
316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LayoutService, decorators: [{
|
|
317
550
|
type: Injectable,
|
|
318
551
|
args: [{
|
|
319
552
|
providedIn: 'root',
|
|
320
553
|
}]
|
|
321
554
|
}] });
|
|
322
555
|
|
|
323
|
-
const
|
|
324
|
-
const
|
|
325
|
-
const LPX_MENU_ITEMS = new InjectionToken('LPX_MENU_ITEMS');
|
|
556
|
+
const LPX_TRANSLATE_SERVICE_TOKEN = new InjectionToken('LPX_TRANSLATE_SERVICE_TOKEN');
|
|
557
|
+
const LPX_TRANSLATE_TOKEN = new InjectionToken('LPX_TRANSLATE_TOKEN');
|
|
326
558
|
|
|
327
559
|
function sortItems(a, b) {
|
|
328
560
|
if (!a.order) {
|
|
@@ -353,1394 +585,1126 @@ function isArray(obj) {
|
|
|
353
585
|
return Array.isArray(obj);
|
|
354
586
|
}
|
|
355
587
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
for (const node of list) {
|
|
362
|
-
const group = node?.group || othersGroupKey;
|
|
363
|
-
if (typeof group !== 'string') {
|
|
364
|
-
throw new Error(`Invalid group: ${group}`);
|
|
365
|
-
}
|
|
366
|
-
const items = mapGroup.get(group) || [];
|
|
367
|
-
items.push(node);
|
|
368
|
-
mapGroup.set(group, items);
|
|
588
|
+
class LpxThemeTranslateService {
|
|
589
|
+
constructor(translateValues, translateService) {
|
|
590
|
+
this.translateValues = translateValues;
|
|
591
|
+
this.translateService = translateService;
|
|
592
|
+
this._content = flatArrayDeepToObject(this.translateValues);
|
|
369
593
|
}
|
|
370
|
-
|
|
594
|
+
// TODO: PROVIDE API : Implement args
|
|
595
|
+
translate$(key, ...args) {
|
|
596
|
+
return this.translateService.get$(key, this._content[key]);
|
|
597
|
+
}
|
|
598
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxThemeTranslateService, deps: [{ token: LPX_TRANSLATE_TOKEN, optional: true }, { token: LPX_TRANSLATE_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
599
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxThemeTranslateService, providedIn: 'root' }); }
|
|
371
600
|
}
|
|
372
|
-
|
|
373
|
-
|
|
601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxThemeTranslateService, decorators: [{
|
|
602
|
+
type: Injectable,
|
|
603
|
+
args: [{
|
|
604
|
+
providedIn: 'root',
|
|
605
|
+
}]
|
|
606
|
+
}], ctorParameters: () => [{ type: Array, decorators: [{
|
|
607
|
+
type: Optional
|
|
608
|
+
}, {
|
|
609
|
+
type: Inject,
|
|
610
|
+
args: [LPX_TRANSLATE_TOKEN]
|
|
611
|
+
}] }, { type: undefined, decorators: [{
|
|
612
|
+
type: Inject,
|
|
613
|
+
args: [LPX_TRANSLATE_SERVICE_TOKEN]
|
|
614
|
+
}] }] });
|
|
615
|
+
|
|
616
|
+
class DefaultTranslateService {
|
|
617
|
+
get$(key, defaultValue) {
|
|
618
|
+
return of(defaultValue || key || '');
|
|
619
|
+
}
|
|
620
|
+
get(key, defaultValue) {
|
|
621
|
+
return defaultValue || key || '';
|
|
622
|
+
}
|
|
623
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultTranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
624
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultTranslateService }); }
|
|
374
625
|
}
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultTranslateService, decorators: [{
|
|
627
|
+
type: Injectable
|
|
628
|
+
}] });
|
|
375
629
|
|
|
376
|
-
const
|
|
630
|
+
const LPX_TRANSLATE_SERVICE_PROVIDER = {
|
|
631
|
+
provide: LPX_TRANSLATE_SERVICE_TOKEN,
|
|
632
|
+
useClass: DefaultTranslateService,
|
|
633
|
+
};
|
|
634
|
+
const LPX_TRANSLATE_PROVIDERS = [
|
|
635
|
+
LPX_TRANSLATE_SERVICE_PROVIDER,
|
|
636
|
+
];
|
|
377
637
|
|
|
378
|
-
class
|
|
379
|
-
constructor() {
|
|
380
|
-
this.
|
|
381
|
-
this.
|
|
382
|
-
this.store = new DataStore(this.addContainerLinks(this.menuItems));
|
|
383
|
-
this.navbarItems$ = this.store.sliceState((state) => state);
|
|
384
|
-
this.groupedNavbarItems$ = this.store
|
|
385
|
-
.sliceState((state) => state)
|
|
386
|
-
.pipe(map((items) => {
|
|
387
|
-
if (!items.some((f) => !!f.group)) {
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
const map = createGroupMap(items, OTHERS_GROUP_KEY) || [];
|
|
391
|
-
return Array.from(map, ([group, items]) => ({
|
|
392
|
-
group,
|
|
393
|
-
items,
|
|
394
|
-
}));
|
|
395
|
-
}));
|
|
396
|
-
this.expandItemByLink$().pipe(take(1)).subscribe();
|
|
397
|
-
}
|
|
398
|
-
addNavbarItems(...menuItems) {
|
|
399
|
-
this.store.set([...this.store.state, ...this.addContainerLinks(menuItems)]);
|
|
400
|
-
}
|
|
401
|
-
setNavbarItems(...menuItems) {
|
|
402
|
-
this.store.set([...this.addContainerLinks(menuItems)]);
|
|
403
|
-
}
|
|
404
|
-
// TODO: muhammed: refactor this method to be readable
|
|
405
|
-
addChildren(id, ...menuItems) {
|
|
406
|
-
const parent = this.findById(id, this.store.state);
|
|
407
|
-
const update = (items, location, link = '') => {
|
|
408
|
-
const i = location.shift();
|
|
409
|
-
return items.reduce((acc, item, index) => {
|
|
410
|
-
return [
|
|
411
|
-
...acc,
|
|
412
|
-
...(index === i
|
|
413
|
-
? [
|
|
414
|
-
{
|
|
415
|
-
...item,
|
|
416
|
-
children: !location.length
|
|
417
|
-
? [
|
|
418
|
-
...(item.children || []),
|
|
419
|
-
...this.addContainerLinks(menuItems, `${link}/${item.containerLink}`),
|
|
420
|
-
]
|
|
421
|
-
: update(item.children || [], location, `${link}/${item.containerLink}`),
|
|
422
|
-
},
|
|
423
|
-
]
|
|
424
|
-
: [item]),
|
|
425
|
-
];
|
|
426
|
-
}, []);
|
|
427
|
-
};
|
|
428
|
-
const updated = update(this.store.state, parent.location);
|
|
429
|
-
this.store.patch(updated);
|
|
430
|
-
}
|
|
431
|
-
findByLink(link, items) {
|
|
432
|
-
return this.findByProp('link', link, items);
|
|
433
|
-
}
|
|
434
|
-
expandItemByLink$() {
|
|
435
|
-
return this.router.events.pipe(filter((e) => e instanceof NavigationEnd), tap(() => this.expandItems()));
|
|
638
|
+
class DefaultAuthService {
|
|
639
|
+
constructor(userProfileService) {
|
|
640
|
+
this.userProfileService = userProfileService;
|
|
641
|
+
this.isUserExists$ = this.userProfileService.user$.pipe(map((user) => !!user && Object.keys(user).length > 0));
|
|
436
642
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
if (route?.item) {
|
|
440
|
-
const expanded = this.calculateExpandState(this.store.state, route.location);
|
|
441
|
-
this.store.patch(expanded);
|
|
442
|
-
}
|
|
643
|
+
navigateToLogin() {
|
|
644
|
+
return;
|
|
443
645
|
}
|
|
444
|
-
|
|
445
|
-
|
|
646
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultAuthService, deps: [{ token: UserProfileService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
647
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultAuthService }); }
|
|
648
|
+
}
|
|
649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DefaultAuthService, decorators: [{
|
|
650
|
+
type: Injectable
|
|
651
|
+
}], ctorParameters: () => [{ type: UserProfileService }] });
|
|
652
|
+
|
|
653
|
+
const LPX_AUTH_SERVICE_TOKEN = new InjectionToken('LPX_AUTH_SERVICE_TOKEN');
|
|
654
|
+
|
|
655
|
+
const LPX_AUTH_SERVICE_PROVIDER = {
|
|
656
|
+
provide: LPX_AUTH_SERVICE_TOKEN,
|
|
657
|
+
useClass: DefaultAuthService,
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
class LpxLocalStorageService {
|
|
661
|
+
constructor() { }
|
|
662
|
+
get length() {
|
|
663
|
+
return localStorage.length;
|
|
446
664
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
return items.reduce((acc, item, index) => {
|
|
450
|
-
if (index === matchIndex) {
|
|
451
|
-
return [
|
|
452
|
-
...acc,
|
|
453
|
-
{
|
|
454
|
-
...item,
|
|
455
|
-
expanded: true,
|
|
456
|
-
selected: true,
|
|
457
|
-
children: this.calculateExpandState(item.children || [], indexes),
|
|
458
|
-
},
|
|
459
|
-
];
|
|
460
|
-
}
|
|
461
|
-
const newItem = {
|
|
462
|
-
...item,
|
|
463
|
-
...(item.children
|
|
464
|
-
? { children: this.collapseChildren(item.children) }
|
|
465
|
-
: {}),
|
|
466
|
-
};
|
|
467
|
-
return [...acc, { ...newItem, expanded: false, selected: false }];
|
|
468
|
-
}, []);
|
|
665
|
+
clear() {
|
|
666
|
+
localStorage.clear();
|
|
469
667
|
}
|
|
470
|
-
|
|
471
|
-
return
|
|
472
|
-
...children.map((child) => ({
|
|
473
|
-
...child,
|
|
474
|
-
expanded: false,
|
|
475
|
-
selected: false,
|
|
476
|
-
children: child.children ? this.collapseChildren(child.children) : [],
|
|
477
|
-
})),
|
|
478
|
-
];
|
|
668
|
+
getItem(key) {
|
|
669
|
+
return localStorage.getItem(key);
|
|
479
670
|
}
|
|
480
|
-
|
|
481
|
-
return
|
|
671
|
+
key(index) {
|
|
672
|
+
return localStorage.key(index);
|
|
482
673
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const itemIndex = navbarItems.findIndex((i) => i[prop] === value);
|
|
486
|
-
let item;
|
|
487
|
-
if (itemIndex === -1) {
|
|
488
|
-
navbarItems.forEach((i, index) => {
|
|
489
|
-
if (i.children) {
|
|
490
|
-
const child = this.findByProp(prop, value, i.children, [
|
|
491
|
-
...location,
|
|
492
|
-
index,
|
|
493
|
-
]);
|
|
494
|
-
if (child?.item) {
|
|
495
|
-
item = child.item;
|
|
496
|
-
location = child.location;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
else {
|
|
502
|
-
item = navbarItems[itemIndex];
|
|
503
|
-
location.push(itemIndex);
|
|
504
|
-
}
|
|
505
|
-
return { item, location };
|
|
674
|
+
removeItem(key) {
|
|
675
|
+
localStorage.removeItem(key);
|
|
506
676
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
...item,
|
|
510
|
-
...(item.link && link ? { link: `${link}/${item.link}` } : {}),
|
|
511
|
-
children: this.addContainerLinks(item.children || [], `${link ? link + '/' : ''}${item.containerLink || ''}`),
|
|
512
|
-
}));
|
|
677
|
+
setItem(key, value) {
|
|
678
|
+
localStorage.setItem(key, value);
|
|
513
679
|
}
|
|
514
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
515
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
680
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
681
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxLocalStorageService, providedIn: 'root' }); }
|
|
516
682
|
}
|
|
517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxLocalStorageService, decorators: [{
|
|
518
684
|
type: Injectable,
|
|
519
685
|
args: [{
|
|
520
|
-
providedIn: 'root'
|
|
686
|
+
providedIn: 'root'
|
|
521
687
|
}]
|
|
522
688
|
}], ctorParameters: () => [] });
|
|
523
689
|
|
|
524
|
-
class NavbarRoutesDirective {
|
|
525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavbarRoutesDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
526
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: NavbarRoutesDirective, isStandalone: false, selector: "[lpx-navbar-routes],[lpxNavbarRoutes]", exportAs: ["lpxNavbarRoutes"], ngImport: i0 }); }
|
|
527
|
-
}
|
|
528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: NavbarRoutesDirective, decorators: [{
|
|
529
|
-
type: Directive,
|
|
530
|
-
args: [{
|
|
531
|
-
standalone: false,
|
|
532
|
-
selector: '[lpx-navbar-routes],[lpxNavbarRoutes]',
|
|
533
|
-
exportAs: 'lpxNavbarRoutes',
|
|
534
|
-
}]
|
|
535
|
-
}] });
|
|
536
|
-
|
|
537
|
-
class LogoPanelDirective {
|
|
538
|
-
constructor(template) {
|
|
539
|
-
this.template = template;
|
|
540
|
-
}
|
|
541
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LogoPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
542
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: LogoPanelDirective, isStandalone: false, selector: "ng-template[lpx-logo-panel]", ngImport: i0 }); }
|
|
543
|
-
}
|
|
544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LogoPanelDirective, decorators: [{
|
|
545
|
-
type: Directive,
|
|
546
|
-
args: [{
|
|
547
|
-
standalone: false,
|
|
548
|
-
selector: 'ng-template[lpx-logo-panel]',
|
|
549
|
-
}]
|
|
550
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
551
|
-
|
|
552
690
|
class RoutesService {
|
|
553
691
|
constructor() {
|
|
554
692
|
this.router = inject(Router);
|
|
555
693
|
this.location = inject(Location);
|
|
556
694
|
this.currentNavigation = toSignal(this.router.events.pipe(filter((e) => e instanceof NavigationEnd), map(() => this.location.path() || '/')), { initialValue: this.location.path() || '/' });
|
|
557
695
|
}
|
|
558
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
559
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
696
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: RoutesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
697
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: RoutesService, providedIn: 'root' }); }
|
|
560
698
|
}
|
|
561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: RoutesService, decorators: [{
|
|
562
700
|
type: Injectable,
|
|
563
701
|
args: [{
|
|
564
702
|
providedIn: 'root',
|
|
565
703
|
}]
|
|
566
704
|
}] });
|
|
567
705
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
ngOnDestroy() {
|
|
582
|
-
this.conditionSubscription?.unsubscribe();
|
|
583
|
-
}
|
|
584
|
-
subscribeToCondition() {
|
|
585
|
-
this.conditionSubscription = this.condition$.subscribe((value) => {
|
|
586
|
-
this.isVisible = value;
|
|
587
|
-
this.updateVisibility();
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
updateVisibility() {
|
|
591
|
-
this.viewContainerRef.clear();
|
|
592
|
-
// it should be false not falsy
|
|
593
|
-
if (this.isVisible === false) {
|
|
594
|
-
return;
|
|
595
|
-
}
|
|
596
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
597
|
-
}
|
|
598
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxVisibleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
599
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.8", type: LpxVisibleDirective, isStandalone: true, selector: "[lpxVisible]", inputs: { lpxVisible: "lpxVisible" }, ngImport: i0 }); }
|
|
706
|
+
const LPX_STYLE_PROVIDERS = [
|
|
707
|
+
{
|
|
708
|
+
provide: LPX_INITIAL_STYLES,
|
|
709
|
+
useFactory: () => [],
|
|
710
|
+
},
|
|
711
|
+
provideAppInitializer(() => {
|
|
712
|
+
return loadInitialStyles();
|
|
713
|
+
}),
|
|
714
|
+
];
|
|
715
|
+
function loadInitialStyles() {
|
|
716
|
+
const styleService = inject(StyleService);
|
|
717
|
+
const languageService = inject(LanguageService);
|
|
718
|
+
return languageService.languageChange$.pipe(take(1), switchMap((lang) => from(styleService.initStyles(lang.isRTL ? 'rtl' : 'ltr'))));
|
|
600
719
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
selector: '[lpxVisible]',
|
|
605
|
-
standalone: true,
|
|
606
|
-
}]
|
|
607
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }], propDecorators: { lpxVisible: [{
|
|
608
|
-
type: Input,
|
|
609
|
-
args: ['lpxVisible']
|
|
610
|
-
}] } });
|
|
611
|
-
function checkType(value) {
|
|
612
|
-
if (value instanceof Promise) {
|
|
613
|
-
return from(value);
|
|
614
|
-
}
|
|
615
|
-
else if (value instanceof Observable) {
|
|
616
|
-
return value;
|
|
617
|
-
}
|
|
618
|
-
else if (typeof value === 'boolean') {
|
|
619
|
-
return of(value);
|
|
620
|
-
}
|
|
621
|
-
else if (value === undefined || value === null) {
|
|
622
|
-
return of(true);
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
return EMPTY;
|
|
626
|
-
}
|
|
720
|
+
|
|
721
|
+
function createWindowProvider(windowObj) {
|
|
722
|
+
return { provide: WINDOW, useValue: windowObj || window };
|
|
627
723
|
}
|
|
628
724
|
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
animate('{{ time }} {{ easing }}', style({ height: '0', padding: '0px' })),
|
|
632
|
-
], { params: { time: '350ms', easing: 'ease' } });
|
|
633
|
-
const collapseYWithMargin = animation([
|
|
634
|
-
style({ 'margin-top': '0' }),
|
|
635
|
-
animate('{{ time }} {{ easing }}', style({ 'margin-left': '-100%' })),
|
|
636
|
-
], {
|
|
637
|
-
params: { time: '500ms', easing: 'ease' },
|
|
638
|
-
});
|
|
639
|
-
const collapseX = animation([
|
|
640
|
-
style({ width: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
641
|
-
animate('{{ time }} {{ easing }}', style({ width: '0', padding: '0px' })),
|
|
642
|
-
], { params: { time: '350ms', easing: 'ease' } });
|
|
643
|
-
const expandY = animation([
|
|
644
|
-
style({ height: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
645
|
-
animate('{{ time }} {{ easing }}', style({ height: '*', padding: '*' })),
|
|
646
|
-
], { params: { time: '350ms', easing: 'ease' } });
|
|
647
|
-
const expandYWithMargin = animation([
|
|
648
|
-
style({ 'margin-top': '-100%' }),
|
|
649
|
-
animate('{{ time }} {{ easing }}', style({ 'margin-top': '0' })),
|
|
650
|
-
], {
|
|
651
|
-
params: { time: '500ms', easing: 'ease' },
|
|
652
|
-
});
|
|
653
|
-
const expandX = animation([
|
|
654
|
-
style({ width: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
655
|
-
animate('{{ time }} {{ easing }}', style({ width: '*', padding: '*' })),
|
|
656
|
-
], { params: { time: '350ms', easing: 'ease' } });
|
|
657
|
-
const collapse = trigger('collapse', [
|
|
658
|
-
state('collapsed', style({ height: '0', overflow: 'hidden' })),
|
|
659
|
-
state('expanded', style({ height: '*', overflow: 'hidden' })),
|
|
660
|
-
transition('expanded => collapsed', useAnimation(collapseY)),
|
|
661
|
-
transition('collapsed => expanded', useAnimation(expandY)),
|
|
662
|
-
]);
|
|
663
|
-
const collapseWithMargin = trigger('collapseWithMargin', [
|
|
664
|
-
state('collapsed', style({ 'margin-top': '-100%' })),
|
|
665
|
-
state('expanded', style({ 'margin-top': '0' })),
|
|
666
|
-
transition('expanded => collapsed', useAnimation(collapseYWithMargin), {
|
|
667
|
-
params: { time: '400ms', easing: 'linear' },
|
|
668
|
-
}),
|
|
669
|
-
transition('collapsed => expanded', useAnimation(expandYWithMargin)),
|
|
670
|
-
]);
|
|
671
|
-
const collapseLinearWithMargin = trigger('collapseLinearWithMargin', [
|
|
672
|
-
state('collapsed', style({ 'margin-top': '-100vh' })),
|
|
673
|
-
state('expanded', style({ 'margin-top': '0' })),
|
|
674
|
-
transition('expanded => collapsed', useAnimation(collapseYWithMargin, {
|
|
675
|
-
params: { time: '200ms', easing: 'linear' },
|
|
676
|
-
})),
|
|
677
|
-
transition('collapsed => expanded', useAnimation(expandYWithMargin, {
|
|
678
|
-
params: { time: '250ms', easing: 'linear' },
|
|
679
|
-
})),
|
|
680
|
-
]);
|
|
725
|
+
const LOGO_URL_TOKEN = new InjectionToken('LOGO_URL_TOKEN');
|
|
726
|
+
const LOGO_APP_NAME_TOKEN = new InjectionToken('LOGO_APP_NAME_TOKEN');
|
|
681
727
|
|
|
682
|
-
|
|
728
|
+
var LpxLogoFeatureKind;
|
|
729
|
+
(function (LpxLogoFeatureKind) {
|
|
730
|
+
LpxLogoFeatureKind[LpxLogoFeatureKind["Options"] = 0] = "Options";
|
|
731
|
+
})(LpxLogoFeatureKind || (LpxLogoFeatureKind = {}));
|
|
732
|
+
function makeLpxLogoFeature(kind, providers) {
|
|
733
|
+
return {
|
|
734
|
+
ɵkind: kind,
|
|
735
|
+
ɵproviders: providers,
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
function withEnvironmentOptions(options = {}) {
|
|
739
|
+
const { name, logoUrl } = options.application || {};
|
|
740
|
+
return makeLpxLogoFeature(LpxLogoFeatureKind.Options, [
|
|
741
|
+
{
|
|
742
|
+
provide: LOGO_URL_TOKEN,
|
|
743
|
+
useValue: logoUrl || '',
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
provide: LOGO_APP_NAME_TOKEN,
|
|
747
|
+
useValue: name || 'ProjectName',
|
|
748
|
+
},
|
|
749
|
+
]);
|
|
750
|
+
}
|
|
751
|
+
function provideLogo(...features) {
|
|
752
|
+
const providers = [];
|
|
753
|
+
features.forEach(({ ɵproviders }) => providers.push(...ɵproviders));
|
|
754
|
+
return makeEnvironmentProviders(providers);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
const ICON_MAP = {
|
|
758
|
+
bagFill: 'bi bi-bag-fill',
|
|
759
|
+
bellFill: 'bi bi-bell-fill',
|
|
760
|
+
calendarWeek: 'bi bi-calendar2-week',
|
|
761
|
+
chatDots: 'bi bi-chat-dots',
|
|
762
|
+
chevronDown: 'bi bi-chevron-down',
|
|
763
|
+
chevronUp: 'bi bi-chevron-up',
|
|
764
|
+
gearConnected: 'bi bi-gear-wide-connected',
|
|
765
|
+
filter: 'bi bi-filter',
|
|
766
|
+
filterFill: 'bi bi-filter-circle-fill',
|
|
767
|
+
layoutThreeColumns: 'bi bi-layout-three-columns',
|
|
768
|
+
moon: 'bi bi-moon',
|
|
769
|
+
square: 'bi bi-square',
|
|
770
|
+
sunset: 'bi bi-brightness-alt-high-fill',
|
|
771
|
+
sunup: 'bi bi-brightness-high-fill',
|
|
772
|
+
star: 'bi bi-star',
|
|
773
|
+
x: 'bi bi-x',
|
|
774
|
+
xCircleFill: 'bi bi-x-circle-fill',
|
|
775
|
+
};
|
|
776
|
+
const LEPTON_X_ICON_SET = new InjectionToken('LEPTON_X_ICON_SET');
|
|
777
|
+
|
|
778
|
+
class IconComponent {
|
|
683
779
|
constructor() {
|
|
684
|
-
this.
|
|
685
|
-
this.user$ = this.store.sliceState((state) => state);
|
|
780
|
+
this.iconSet = inject(LEPTON_X_ICON_SET);
|
|
686
781
|
}
|
|
687
|
-
|
|
688
|
-
this.
|
|
782
|
+
get styleClass() {
|
|
783
|
+
return (this.iconSet[this.iconClass] || this.iconClass);
|
|
689
784
|
}
|
|
690
|
-
|
|
691
|
-
|
|
785
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
786
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.7", type: IconComponent, isStandalone: true, selector: "lpx-icon", inputs: { iconClass: "iconClass" }, ngImport: i0, template: `
|
|
787
|
+
<i class="lpx-icon" [ngClass]="styleClass" aria-hidden="true"></i>
|
|
788
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
789
|
+
}
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: IconComponent, decorators: [{
|
|
791
|
+
type: Component,
|
|
792
|
+
args: [{
|
|
793
|
+
selector: 'lpx-icon',
|
|
794
|
+
template: `
|
|
795
|
+
<i class="lpx-icon" [ngClass]="styleClass" aria-hidden="true"></i>
|
|
796
|
+
`,
|
|
797
|
+
encapsulation: ViewEncapsulation.None,
|
|
798
|
+
imports: [NgClass],
|
|
799
|
+
}]
|
|
800
|
+
}], propDecorators: { iconClass: [{
|
|
801
|
+
type: Input
|
|
802
|
+
}] } });
|
|
803
|
+
|
|
804
|
+
class AvatarComponent {
|
|
805
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
806
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AvatarComponent, isStandalone: true, selector: "lpx-avatar", inputs: { avatar: "avatar" }, ngImport: i0, template: "@if (avatar && avatar.source) {\r\n <div class=\"lpx-avatar\">\r\n @switch (avatar.type) {\r\n @case ('icon') {\r\n <lpx-icon\r\n class=\"lpx-avatar-icon\"\r\n [iconClass]=\"avatar.source\"\r\n ></lpx-icon>\r\n }\r\n @case ('image') {\r\n <img class=\"lpx-avatar-img\" [src]=\"avatar.source\" />\r\n }\r\n }\r\n </div>\r\n}\r\n", dependencies: [{ kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
807
|
+
}
|
|
808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
809
|
+
type: Component,
|
|
810
|
+
args: [{ selector: 'lpx-avatar', encapsulation: ViewEncapsulation.None, imports: [IconComponent], template: "@if (avatar && avatar.source) {\r\n <div class=\"lpx-avatar\">\r\n @switch (avatar.type) {\r\n @case ('icon') {\r\n <lpx-icon\r\n class=\"lpx-avatar-icon\"\r\n [iconClass]=\"avatar.source\"\r\n ></lpx-icon>\r\n }\r\n @case ('image') {\r\n <img class=\"lpx-avatar-img\" [src]=\"avatar.source\" />\r\n }\r\n }\r\n </div>\r\n}\r\n" }]
|
|
811
|
+
}], propDecorators: { avatar: [{
|
|
812
|
+
type: Input
|
|
813
|
+
}] } });
|
|
814
|
+
|
|
815
|
+
class LpxIconModule {
|
|
816
|
+
/**
|
|
817
|
+
* @deprecated `LpxIconModule.forRoot()` is deprecated. You can use `provideLpxCore` **function** instead.
|
|
818
|
+
*/
|
|
819
|
+
static forRoot(options) {
|
|
820
|
+
return {
|
|
821
|
+
ngModule: LpxIconModule,
|
|
822
|
+
providers: [provideLpxCore(SKIP_DEFAULTS, withIcon(options))],
|
|
823
|
+
};
|
|
692
824
|
}
|
|
693
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
694
|
-
static { this.ɵ
|
|
825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
826
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxIconModule, imports: [CommonModule, IconComponent], exports: [IconComponent] }); }
|
|
827
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxIconModule, imports: [CommonModule] }); }
|
|
695
828
|
}
|
|
696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
697
|
-
type:
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxIconModule, decorators: [{
|
|
830
|
+
type: NgModule,
|
|
698
831
|
args: [{
|
|
699
|
-
|
|
832
|
+
imports: [CommonModule, IconComponent],
|
|
833
|
+
exports: [IconComponent],
|
|
700
834
|
}]
|
|
701
835
|
}] });
|
|
702
836
|
|
|
703
|
-
class
|
|
837
|
+
class LpxAvatarModule {
|
|
838
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
839
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxAvatarModule, imports: [CommonModule, LpxIconModule, AvatarComponent], exports: [AvatarComponent] }); }
|
|
840
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxAvatarModule, imports: [CommonModule, LpxIconModule] }); }
|
|
841
|
+
}
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxAvatarModule, decorators: [{
|
|
843
|
+
type: NgModule,
|
|
844
|
+
args: [{
|
|
845
|
+
imports: [CommonModule, LpxIconModule, AvatarComponent],
|
|
846
|
+
exports: [AvatarComponent],
|
|
847
|
+
}]
|
|
848
|
+
}] });
|
|
849
|
+
|
|
850
|
+
var Layouts;
|
|
851
|
+
(function (Layouts) {
|
|
852
|
+
Layouts["sideMenu"] = "side-menu";
|
|
853
|
+
Layouts["topMenu"] = "top-menu";
|
|
854
|
+
})(Layouts || (Layouts = {}));
|
|
855
|
+
|
|
856
|
+
class BrandLogoComponent {
|
|
704
857
|
constructor() {
|
|
705
|
-
this.
|
|
706
|
-
this.
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
enableScrollY() {
|
|
714
|
-
this.body?.classList.remove(this.classes.overflowYHidden);
|
|
858
|
+
this.layout = input(Layouts.sideMenu);
|
|
859
|
+
this.layoutOptions = Layouts;
|
|
860
|
+
this.logoUrl = inject(LOGO_URL_TOKEN, {
|
|
861
|
+
optional: true,
|
|
862
|
+
});
|
|
863
|
+
this.appName = inject(LOGO_APP_NAME_TOKEN, {
|
|
864
|
+
optional: true,
|
|
865
|
+
}) ?? 'ProjectName';
|
|
715
866
|
}
|
|
716
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
717
|
-
static { this.ɵ
|
|
867
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BrandLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
868
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: BrandLogoComponent, isStandalone: true, 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: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
718
869
|
}
|
|
719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
720
|
-
type:
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BrandLogoComponent, decorators: [{
|
|
871
|
+
type: Component,
|
|
872
|
+
args: [{ selector: 'lpx-brand-logo', encapsulation: ViewEncapsulation.None, imports: [RouterLink], 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" }]
|
|
873
|
+
}] });
|
|
874
|
+
|
|
875
|
+
class LpxBrandLogoModule {
|
|
876
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxBrandLogoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
877
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxBrandLogoModule, imports: [RouterModule, BrandLogoComponent], exports: [BrandLogoComponent] }); }
|
|
878
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxBrandLogoModule, imports: [RouterModule] }); }
|
|
879
|
+
}
|
|
880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxBrandLogoModule, decorators: [{
|
|
881
|
+
type: NgModule,
|
|
721
882
|
args: [{
|
|
722
|
-
|
|
883
|
+
imports: [RouterModule, BrandLogoComponent],
|
|
884
|
+
exports: [BrandLogoComponent],
|
|
723
885
|
}]
|
|
724
886
|
}] });
|
|
725
887
|
|
|
726
|
-
class
|
|
727
|
-
|
|
728
|
-
|
|
888
|
+
class ClickOutsideDirective {
|
|
889
|
+
constructor() {
|
|
890
|
+
this.elementRef = inject(ElementRef);
|
|
891
|
+
this.lpxClickOutside = new EventEmitter();
|
|
892
|
+
this.exceptedRefs = [];
|
|
729
893
|
}
|
|
730
|
-
|
|
731
|
-
|
|
894
|
+
onDocumentClick(event) {
|
|
895
|
+
if (!(this.elementRef.nativeElement.contains(event.target) ||
|
|
896
|
+
this.exceptedRefs.some((ref) => ref.nativeElement.contains(event.target)))) {
|
|
897
|
+
this.lpxClickOutside.emit();
|
|
898
|
+
}
|
|
732
899
|
}
|
|
733
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
734
|
-
static { this.ɵ
|
|
900
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
901
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: ClickOutsideDirective, isStandalone: true, selector: "[lpxClickOutside]", inputs: { exceptedRefs: "exceptedRefs" }, outputs: { lpxClickOutside: "lpxClickOutside" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0 }); }
|
|
735
902
|
}
|
|
736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
737
|
-
type:
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
904
|
+
type: Directive,
|
|
905
|
+
args: [{ selector: '[lpxClickOutside]' }]
|
|
906
|
+
}], propDecorators: { lpxClickOutside: [{
|
|
907
|
+
type: Output
|
|
908
|
+
}], exceptedRefs: [{
|
|
909
|
+
type: Input
|
|
910
|
+
}], onDocumentClick: [{
|
|
911
|
+
type: HostListener,
|
|
912
|
+
args: ['document:click', ['$event']]
|
|
913
|
+
}] } });
|
|
914
|
+
|
|
915
|
+
class ToObservablePipe {
|
|
916
|
+
transform(value) {
|
|
917
|
+
return value ? getStream$(value) : of('');
|
|
918
|
+
}
|
|
919
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToObservablePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
920
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ToObservablePipe, isStandalone: true, name: "toObservable" }); }
|
|
921
|
+
}
|
|
922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToObservablePipe, decorators: [{
|
|
923
|
+
type: Pipe,
|
|
924
|
+
args: [{ name: 'toObservable' }]
|
|
738
925
|
}] });
|
|
739
926
|
|
|
740
|
-
class
|
|
741
|
-
constructor(
|
|
742
|
-
this.
|
|
743
|
-
this.
|
|
744
|
-
this._content = flatArrayDeepToObject(this.translateValues);
|
|
927
|
+
class BreadcrumbService {
|
|
928
|
+
constructor() {
|
|
929
|
+
this.store = new DataStore([]);
|
|
930
|
+
this.items$ = this.store.sliceState((state) => state);
|
|
745
931
|
}
|
|
746
|
-
// TODO:
|
|
747
|
-
|
|
748
|
-
|
|
932
|
+
// TODO: generate id per item
|
|
933
|
+
add(item) {
|
|
934
|
+
const items = Array.isArray(item) ? item : [item];
|
|
935
|
+
this.store.set([...this.store.state, ...items]);
|
|
936
|
+
}
|
|
937
|
+
// TODO: generate id per item
|
|
938
|
+
insert(item, index) {
|
|
939
|
+
const state = this.store.state;
|
|
940
|
+
const items = Array.isArray(item) ? item : [item];
|
|
941
|
+
this.store.set([...state.slice(0, index), ...items, ...state.slice(index)]);
|
|
942
|
+
}
|
|
943
|
+
// TODO: generate id per item
|
|
944
|
+
setItems(items) {
|
|
945
|
+
this.store.set(items);
|
|
749
946
|
}
|
|
750
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
751
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
947
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
948
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbService, providedIn: 'root' }); }
|
|
752
949
|
}
|
|
753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbService, decorators: [{
|
|
754
951
|
type: Injectable,
|
|
755
952
|
args: [{
|
|
756
953
|
providedIn: 'root',
|
|
757
954
|
}]
|
|
758
|
-
}]
|
|
759
|
-
type: Optional
|
|
760
|
-
}, {
|
|
761
|
-
type: Inject,
|
|
762
|
-
args: [LPX_TRANSLATE_TOKEN]
|
|
763
|
-
}] }, { type: undefined, decorators: [{
|
|
764
|
-
type: Inject,
|
|
765
|
-
args: [LPX_TRANSLATE_SERVICE_TOKEN]
|
|
766
|
-
}] }] });
|
|
955
|
+
}] });
|
|
767
956
|
|
|
768
|
-
class
|
|
769
|
-
constructor(
|
|
770
|
-
this.
|
|
771
|
-
this.
|
|
957
|
+
class BreadcrumbComponent {
|
|
958
|
+
constructor() {
|
|
959
|
+
this.service = inject(BreadcrumbService);
|
|
960
|
+
this.icon = ICON_MAP;
|
|
772
961
|
}
|
|
773
|
-
|
|
774
|
-
|
|
962
|
+
onClick(item) {
|
|
963
|
+
if (item.children) {
|
|
964
|
+
item.expanded = !item.expanded;
|
|
965
|
+
}
|
|
775
966
|
}
|
|
776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
777
|
-
static { this.ɵ
|
|
967
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
968
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: BreadcrumbComponent, isStandalone: true, selector: "lpx-breadcrumb", ngImport: i0, template: "<nav aria-label=\"breadcrumb\">\r\n <ol class=\"lpx-breadcrumb\">\r\n @for (item of service.items$ | async; track $index; let last = $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 @if (item.icon) {\r\n <lpx-icon\r\n class=\"lpx-breadcrumb-item-icon\"\r\n [iconClass]=\"item.icon\"\r\n ></lpx-icon>\r\n }\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 @if (!last) {\r\n <li class=\"lpx-breadcrumb-separator\">\r\n <lpx-icon iconClass=\"bi bi-chevron-right\"></lpx-icon>\r\n </li>\r\n }\r\n }\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: ClickOutsideDirective, selector: "[lpxClickOutside]", inputs: ["exceptedRefs"], outputs: ["lpxClickOutside"] }, { kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: ToObservablePipe, name: "toObservable" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
778
969
|
}
|
|
779
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
780
|
-
type:
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
971
|
+
type: Component,
|
|
972
|
+
args: [{ selector: 'lpx-breadcrumb', encapsulation: ViewEncapsulation.None, imports: [
|
|
973
|
+
ClickOutsideDirective,
|
|
974
|
+
IconComponent,
|
|
975
|
+
NgTemplateOutlet,
|
|
976
|
+
RouterLink,
|
|
977
|
+
AsyncPipe,
|
|
978
|
+
ToObservablePipe,
|
|
979
|
+
], template: "<nav aria-label=\"breadcrumb\">\r\n <ol class=\"lpx-breadcrumb\">\r\n @for (item of service.items$ | async; track $index; let last = $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 @if (item.icon) {\r\n <lpx-icon\r\n class=\"lpx-breadcrumb-item-icon\"\r\n [iconClass]=\"item.icon\"\r\n ></lpx-icon>\r\n }\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 @if (!last) {\r\n <li class=\"lpx-breadcrumb-separator\">\r\n <lpx-icon iconClass=\"bi bi-chevron-right\"></lpx-icon>\r\n </li>\r\n }\r\n }\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" }]
|
|
980
|
+
}] });
|
|
784
981
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
};
|
|
982
|
+
class ToObservableModule {
|
|
983
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToObservableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
984
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ToObservableModule, imports: [CommonModule, ToObservablePipe], exports: [ToObservablePipe] }); }
|
|
985
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToObservableModule, imports: [CommonModule] }); }
|
|
986
|
+
}
|
|
987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToObservableModule, decorators: [{
|
|
988
|
+
type: NgModule,
|
|
989
|
+
args: [{
|
|
990
|
+
imports: [CommonModule, ToObservablePipe],
|
|
991
|
+
exports: [ToObservablePipe],
|
|
992
|
+
}]
|
|
993
|
+
}] });
|
|
789
994
|
|
|
790
|
-
class
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}
|
|
795
|
-
clear() {
|
|
796
|
-
localStorage.clear();
|
|
797
|
-
}
|
|
798
|
-
getItem(key) {
|
|
799
|
-
return localStorage.getItem(key);
|
|
800
|
-
}
|
|
801
|
-
key(index) {
|
|
802
|
-
return localStorage.key(index);
|
|
803
|
-
}
|
|
804
|
-
removeItem(key) {
|
|
805
|
-
localStorage.removeItem(key);
|
|
806
|
-
}
|
|
807
|
-
setItem(key, value) {
|
|
808
|
-
localStorage.setItem(key, value);
|
|
809
|
-
}
|
|
810
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
811
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxLocalStorageService, providedIn: 'root' }); }
|
|
995
|
+
class LpxClickOutsideModule {
|
|
996
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxClickOutsideModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
997
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxClickOutsideModule, imports: [CommonModule, ClickOutsideDirective], exports: [ClickOutsideDirective] }); }
|
|
998
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxClickOutsideModule, imports: [CommonModule] }); }
|
|
812
999
|
}
|
|
813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
814
|
-
type:
|
|
1000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxClickOutsideModule, decorators: [{
|
|
1001
|
+
type: NgModule,
|
|
815
1002
|
args: [{
|
|
816
|
-
|
|
1003
|
+
imports: [CommonModule, ClickOutsideDirective],
|
|
1004
|
+
exports: [ClickOutsideDirective],
|
|
817
1005
|
}]
|
|
818
|
-
}]
|
|
1006
|
+
}] });
|
|
819
1007
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
1008
|
+
const exportedDeclarations$1 = [BreadcrumbComponent];
|
|
1009
|
+
/**
|
|
1010
|
+
* @deprecated `LpxBreadcrumbModule.forRoot()` is deprecated. You can use `provideLpxBreadcrumb` **function** instead.
|
|
1011
|
+
*/
|
|
1012
|
+
class LpxBreadcrumbModule {
|
|
1013
|
+
static forRoot() {
|
|
1014
|
+
return {
|
|
1015
|
+
ngModule: LpxBreadcrumbModule,
|
|
1016
|
+
providers: [provideLpxBreadcrumb()],
|
|
1017
|
+
};
|
|
826
1018
|
}
|
|
827
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
828
|
-
static { this.ɵ
|
|
1019
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxBreadcrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1020
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxBreadcrumbModule, imports: [CommonModule,
|
|
1021
|
+
LpxIconModule,
|
|
1022
|
+
ToObservableModule,
|
|
1023
|
+
RouterModule,
|
|
1024
|
+
LpxClickOutsideModule, BreadcrumbComponent], exports: [BreadcrumbComponent] }); }
|
|
1025
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxBreadcrumbModule, imports: [CommonModule,
|
|
1026
|
+
LpxIconModule,
|
|
1027
|
+
ToObservableModule,
|
|
1028
|
+
RouterModule,
|
|
1029
|
+
LpxClickOutsideModule] }); }
|
|
829
1030
|
}
|
|
830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
831
|
-
type:
|
|
1031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxBreadcrumbModule, decorators: [{
|
|
1032
|
+
type: NgModule,
|
|
832
1033
|
args: [{
|
|
833
|
-
|
|
834
|
-
|
|
1034
|
+
imports: [
|
|
1035
|
+
CommonModule,
|
|
1036
|
+
LpxIconModule,
|
|
1037
|
+
ToObservableModule,
|
|
1038
|
+
RouterModule,
|
|
1039
|
+
LpxClickOutsideModule,
|
|
1040
|
+
...exportedDeclarations$1,
|
|
1041
|
+
],
|
|
1042
|
+
exports: [...exportedDeclarations$1],
|
|
835
1043
|
}]
|
|
836
|
-
}]
|
|
1044
|
+
}] });
|
|
837
1045
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
action$.pipe(take(1)).subscribe((result) => {
|
|
852
|
-
if (result) {
|
|
853
|
-
this.processItemClick(menuItem);
|
|
854
|
-
}
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
onChildExpand(child) {
|
|
858
|
-
if (child.expanded) {
|
|
859
|
-
this.item?.children
|
|
860
|
-
?.filter((otherChild) => otherChild !== child)
|
|
861
|
-
.forEach((otherChild) => {
|
|
862
|
-
otherChild.expanded = false;
|
|
863
|
-
otherChild.selected = false;
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
processItemClick(menuItem) {
|
|
868
|
-
if (menuItem.children?.length) {
|
|
869
|
-
menuItem.expanded = !menuItem.expanded;
|
|
870
|
-
this.expand.emit(menuItem);
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
this.routeClick.emit(menuItem);
|
|
874
|
-
if (!this.routerItem()) {
|
|
875
|
-
menuItem.selected = true;
|
|
1046
|
+
const CONTENT_BEFORE_ROUTES = new InjectionToken('CONTENT_BEFORE_ROUTES');
|
|
1047
|
+
const CONTENT_AFTER_ROUTES = new InjectionToken('CONTENT_AFTER_ROUTES');
|
|
1048
|
+
const LPX_MENU_ITEMS = new InjectionToken('LPX_MENU_ITEMS');
|
|
1049
|
+
|
|
1050
|
+
function createGroupMap(list, othersGroupKey, skipGroupCheck = false) {
|
|
1051
|
+
if (!skipGroupCheck &&
|
|
1052
|
+
(!isArray(list) || !list.some((node) => Boolean(node.group))))
|
|
1053
|
+
return undefined;
|
|
1054
|
+
const mapGroup = new Map();
|
|
1055
|
+
for (const node of list) {
|
|
1056
|
+
const group = node?.group || othersGroupKey;
|
|
1057
|
+
if (typeof group !== 'string') {
|
|
1058
|
+
throw new Error(`Invalid group: ${group}`);
|
|
876
1059
|
}
|
|
1060
|
+
const items = mapGroup.get(group) || [];
|
|
1061
|
+
items.push(node);
|
|
1062
|
+
mapGroup.set(group, items);
|
|
877
1063
|
}
|
|
878
|
-
|
|
879
|
-
|
|
1064
|
+
return mapGroup;
|
|
1065
|
+
}
|
|
1066
|
+
function getItemsFromGroup(list, pred) {
|
|
1067
|
+
return list?.reduce((acc, { items }) => [...acc, ...(pred ? items.filter(pred) : items)], []);
|
|
880
1068
|
}
|
|
881
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: SubNavbarComponent, decorators: [{
|
|
882
|
-
type: Component,
|
|
883
|
-
args: [{ standalone: false, selector: 'lpx-sub-navbar', encapsulation: ViewEncapsulation.None, animations: [collapse], template: "@if (item.component) {\r\n <ng-container *ngComponentOutlet=\"item.component; injector: injector\" />\r\n} @else {\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\" />\r\n}\r\n\r\n<ng-template #defaultTemplate>\r\n <a\r\n class=\"lpx-menu-item-link\"\r\n [routerLink]=\"item.link\"\r\n [class.selected]=\"item.selected\"\r\n [class.expanded]=\"item.children?.length && item.expanded\"\r\n (click)=\"onItemClick(item)\"\r\n >\r\n @if (item.icon) {\r\n <lpx-icon class=\"lpx-menu-item-icon\" [iconClass]=\"item.icon\" />\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.template || textTmpl;\r\n context: { $implicit: item }\r\n \"\r\n />\r\n\r\n <ng-template #textTmpl>\r\n @if (item.text) {\r\n <span class=\"lpx-menu-item-text hidden-in-hover-trigger\">{{\r\n item.text | lpxTranslate | async\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n @if (item.children?.length) {\r\n <lpx-icon\r\n [iconClass]=\"item.expanded ? 'chevronUp' : 'chevronDown'\"\r\n class=\"dd-icon hidden-in-hover-trigger\"\r\n />\r\n }\r\n </a>\r\n\r\n @if (item.children?.length) {\r\n <ul\r\n class=\"lpx-inner-menu hidden-in-hover-trigger\"\r\n [class.collapsed]=\"!item.expanded\"\r\n >\r\n @for (child of item.children; track $index) {\r\n <li\r\n class=\"lpx-inner-menu-item\"\r\n *lpxVisible=\"!child.visible || child.visible(child, injector)\"\r\n >\r\n <lpx-sub-navbar\r\n [item]=\"child\"\r\n (routeClick)=\"this.routeClick.emit($event)\"\r\n (expand)=\"onChildExpand($event)\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n }\r\n</ng-template>\r\n" }]
|
|
884
|
-
}], propDecorators: { item: [{
|
|
885
|
-
type: Input
|
|
886
|
-
}], routeClick: [{
|
|
887
|
-
type: Output
|
|
888
|
-
}], expand: [{
|
|
889
|
-
type: Output
|
|
890
|
-
}] } });
|
|
891
1069
|
|
|
892
|
-
|
|
1070
|
+
const OTHERS_GROUP_KEY = 'AbpUi::OthersGroup';
|
|
1071
|
+
|
|
1072
|
+
class NavbarService {
|
|
893
1073
|
constructor() {
|
|
894
|
-
this.
|
|
895
|
-
this.
|
|
896
|
-
this.
|
|
897
|
-
this.
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
1074
|
+
this.router = inject(Router);
|
|
1075
|
+
this.menuItems = inject(LPX_MENU_ITEMS);
|
|
1076
|
+
this.store = new DataStore(this.addContainerLinks(this.menuItems));
|
|
1077
|
+
this.navbarItems$ = this.store.sliceState((state) => state);
|
|
1078
|
+
this.groupedNavbarItems$ = this.store
|
|
1079
|
+
.sliceState((state) => state)
|
|
1080
|
+
.pipe(map((items) => {
|
|
1081
|
+
if (!items.some((f) => !!f.group)) {
|
|
1082
|
+
return;
|
|
902
1083
|
}
|
|
903
|
-
const
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
this.
|
|
1084
|
+
const map = createGroupMap(items, OTHERS_GROUP_KEY) || [];
|
|
1085
|
+
return Array.from(map, ([group, items]) => ({
|
|
1086
|
+
group,
|
|
1087
|
+
items,
|
|
1088
|
+
}));
|
|
1089
|
+
}));
|
|
1090
|
+
this.expandItemByLink$().pipe(take(1)).subscribe();
|
|
910
1091
|
}
|
|
911
|
-
|
|
912
|
-
this.
|
|
1092
|
+
addNavbarItems(...menuItems) {
|
|
1093
|
+
this.store.set([...this.store.state, ...this.addContainerLinks(menuItems)]);
|
|
913
1094
|
}
|
|
914
|
-
|
|
915
|
-
|
|
1095
|
+
setNavbarItems(...menuItems) {
|
|
1096
|
+
this.store.set([...this.addContainerLinks(menuItems)]);
|
|
916
1097
|
}
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1098
|
+
// TODO: muhammed: refactor this method to be readable
|
|
1099
|
+
addChildren(id, ...menuItems) {
|
|
1100
|
+
const parent = this.findById(id, this.store.state);
|
|
1101
|
+
const update = (items, location, link = '') => {
|
|
1102
|
+
const i = location.shift();
|
|
1103
|
+
return items.reduce((acc, item, index) => {
|
|
1104
|
+
return [
|
|
1105
|
+
...acc,
|
|
1106
|
+
...(index === i
|
|
1107
|
+
? [
|
|
1108
|
+
{
|
|
1109
|
+
...item,
|
|
1110
|
+
children: !location.length
|
|
1111
|
+
? [
|
|
1112
|
+
...(item.children || []),
|
|
1113
|
+
...this.addContainerLinks(menuItems, `${link}/${item.containerLink}`),
|
|
1114
|
+
]
|
|
1115
|
+
: update(item.children || [], location, `${link}/${item.containerLink}`),
|
|
1116
|
+
},
|
|
1117
|
+
]
|
|
1118
|
+
: [item]),
|
|
1119
|
+
];
|
|
1120
|
+
}, []);
|
|
1121
|
+
};
|
|
1122
|
+
const updated = update(this.store.state, parent.location);
|
|
1123
|
+
this.store.patch(updated);
|
|
922
1124
|
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
const items = this.itemsFromGroup || menuItems;
|
|
926
|
-
if (!items) {
|
|
927
|
-
return;
|
|
928
|
-
}
|
|
929
|
-
items
|
|
930
|
-
.filter((item) => item !== menuItem)
|
|
931
|
-
.forEach((item) => (item.expanded = false));
|
|
932
|
-
}
|
|
1125
|
+
findByLink(link, items) {
|
|
1126
|
+
return this.findByProp('link', link, items);
|
|
933
1127
|
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
const expandedGroupItems = this.itemsFromGroup?.filter(this.isExpandedOrSelected);
|
|
937
|
-
const items = expandedGroupItems || expandedItems;
|
|
938
|
-
if (items) {
|
|
939
|
-
items
|
|
940
|
-
.filter((item) => item !== menuItem)
|
|
941
|
-
.reduce((acc, item) => {
|
|
942
|
-
return [...acc, item, ...this.flatChildren(item.children || [])];
|
|
943
|
-
}, [])
|
|
944
|
-
?.filter((item) => !this.checkChildrenIncludesItem(item, menuItem) &&
|
|
945
|
-
item !== menuItem)
|
|
946
|
-
.forEach((item) => {
|
|
947
|
-
item.selected = false;
|
|
948
|
-
item.expanded = false;
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
this.routeClick.emit(menuItem);
|
|
1128
|
+
expandItemByLink$() {
|
|
1129
|
+
return this.router.events.pipe(filter((e) => e instanceof NavigationEnd), tap(() => this.expandItems()));
|
|
952
1130
|
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
this.
|
|
1131
|
+
expandItems() {
|
|
1132
|
+
const route = this.getRouteItem();
|
|
1133
|
+
if (route?.item) {
|
|
1134
|
+
const expanded = this.calculateExpandState(this.store.state, route.location);
|
|
1135
|
+
this.store.patch(expanded);
|
|
1136
|
+
}
|
|
957
1137
|
}
|
|
958
|
-
|
|
959
|
-
return (
|
|
960
|
-
return [...acc, item, ...this.flatChildren(item.children || [])];
|
|
961
|
-
}, []) || []);
|
|
1138
|
+
getRouteItem() {
|
|
1139
|
+
return this.findByLink(this.router.url);
|
|
962
1140
|
}
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
if (
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1141
|
+
calculateExpandState(items, indexes) {
|
|
1142
|
+
const matchIndex = indexes.shift();
|
|
1143
|
+
return items.reduce((acc, item, index) => {
|
|
1144
|
+
if (index === matchIndex) {
|
|
1145
|
+
return [
|
|
1146
|
+
...acc,
|
|
1147
|
+
{
|
|
1148
|
+
...item,
|
|
1149
|
+
expanded: true,
|
|
1150
|
+
selected: true,
|
|
1151
|
+
children: this.calculateExpandState(item.children || [], indexes),
|
|
1152
|
+
},
|
|
1153
|
+
];
|
|
973
1154
|
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
}], propDecorators: { navbarItems: [{
|
|
983
|
-
type: Input
|
|
984
|
-
}], groupedItems: [{
|
|
985
|
-
type: Input
|
|
986
|
-
}], routeClick: [{
|
|
987
|
-
type: Output
|
|
988
|
-
}] } });
|
|
989
|
-
|
|
990
|
-
class NavbarComponent {
|
|
991
|
-
constructor() {
|
|
992
|
-
this.layoutService = inject(LayoutService);
|
|
993
|
-
this.platformId = inject(PLATFORM_ID);
|
|
994
|
-
this.service = inject(NavbarService);
|
|
995
|
-
this.injector = inject(Injector);
|
|
996
|
-
this.didResized = false;
|
|
997
|
-
this.initialHover = false;
|
|
998
|
-
this.showFilterMenu$ = this.service.navbarItems$.pipe(map$1((items) => !!items.length));
|
|
999
|
-
this.contentBefore = this.flatContents(CONTENT_BEFORE_ROUTES);
|
|
1000
|
-
this.contentAfter = this.flatContents(CONTENT_AFTER_ROUTES);
|
|
1155
|
+
const newItem = {
|
|
1156
|
+
...item,
|
|
1157
|
+
...(item.children
|
|
1158
|
+
? { children: this.collapseChildren(item.children) }
|
|
1159
|
+
: {}),
|
|
1160
|
+
};
|
|
1161
|
+
return [...acc, { ...newItem, expanded: false, selected: false }];
|
|
1162
|
+
}, []);
|
|
1001
1163
|
}
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
}
|
|
1164
|
+
collapseChildren(children) {
|
|
1165
|
+
return [
|
|
1166
|
+
...children.map((child) => ({
|
|
1167
|
+
...child,
|
|
1168
|
+
expanded: false,
|
|
1169
|
+
selected: false,
|
|
1170
|
+
children: child.children ? this.collapseChildren(child.children) : [],
|
|
1171
|
+
})),
|
|
1172
|
+
];
|
|
1012
1173
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
this.layoutService.removeClass('initial-hover');
|
|
1016
|
-
}
|
|
1174
|
+
findById(id, items) {
|
|
1175
|
+
return this.findByProp('id', id, items);
|
|
1017
1176
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1177
|
+
findByProp(prop, value, items, location = []) {
|
|
1178
|
+
const navbarItems = items || this.store.state;
|
|
1179
|
+
const itemIndex = navbarItems.findIndex((i) => i[prop] === value);
|
|
1180
|
+
let item;
|
|
1181
|
+
if (itemIndex === -1) {
|
|
1182
|
+
navbarItems.forEach((i, index) => {
|
|
1183
|
+
if (i.children) {
|
|
1184
|
+
const child = this.findByProp(prop, value, i.children, [
|
|
1185
|
+
...location,
|
|
1186
|
+
index,
|
|
1187
|
+
]);
|
|
1188
|
+
if (child?.item) {
|
|
1189
|
+
item = child.item;
|
|
1190
|
+
location = child.location;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1021
1194
|
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1195
|
+
else {
|
|
1196
|
+
item = navbarItems[itemIndex];
|
|
1197
|
+
location.push(itemIndex);
|
|
1025
1198
|
}
|
|
1199
|
+
return { item, location };
|
|
1026
1200
|
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1201
|
+
addContainerLinks(items, link = '') {
|
|
1202
|
+
return items.map((item) => ({
|
|
1203
|
+
...item,
|
|
1204
|
+
...(item.link && link ? { link: `${link}/${item.link}` } : {}),
|
|
1205
|
+
children: this.addContainerLinks(item.children || [], `${link ? link + '/' : ''}${item.containerLink || ''}`),
|
|
1206
|
+
}));
|
|
1030
1207
|
}
|
|
1031
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1032
|
-
static { this.ɵ
|
|
1208
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1209
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarService, providedIn: 'root' }); }
|
|
1033
1210
|
}
|
|
1034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1035
|
-
type:
|
|
1036
|
-
args: [{
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
}], logoPanel: [{
|
|
1041
|
-
type: ContentChild,
|
|
1042
|
-
args: [LogoPanelDirective]
|
|
1043
|
-
}] } });
|
|
1211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarService, decorators: [{
|
|
1212
|
+
type: Injectable,
|
|
1213
|
+
args: [{
|
|
1214
|
+
providedIn: 'root',
|
|
1215
|
+
}]
|
|
1216
|
+
}], ctorParameters: () => [] });
|
|
1044
1217
|
|
|
1045
|
-
class
|
|
1046
|
-
|
|
1047
|
-
|
|
1218
|
+
class BreadcrumbRouteListenerService {
|
|
1219
|
+
constructor() {
|
|
1220
|
+
this.navbarService = inject(NavbarService);
|
|
1221
|
+
this.router = inject(Router);
|
|
1222
|
+
this.routes = inject(RoutesService$1);
|
|
1223
|
+
this.breadcrumbService = inject(BreadcrumbService);
|
|
1224
|
+
this.localizationService = inject(LocalizationService);
|
|
1225
|
+
}
|
|
1226
|
+
subscribeRoute() {
|
|
1227
|
+
combineLatest([
|
|
1228
|
+
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)),
|
|
1229
|
+
this.navbarService.navbarItems$.pipe(filter((items) => !!items.length)),
|
|
1230
|
+
]).subscribe(([event, items]) => {
|
|
1231
|
+
const currentPath = event.url;
|
|
1232
|
+
let activeItem = this.navbarService.findByLink(currentPath);
|
|
1233
|
+
let breadcrumbItems;
|
|
1234
|
+
if (!activeItem.item) {
|
|
1235
|
+
const item = this.findItemByTreeNode(currentPath);
|
|
1236
|
+
if (item) {
|
|
1237
|
+
breadcrumbItems = this.createBreadcrumbTrail(item);
|
|
1238
|
+
this.breadcrumbService.setItems(breadcrumbItems);
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
activeItem = this.navbarService.findByLink('/');
|
|
1242
|
+
}
|
|
1243
|
+
breadcrumbItems = activeItem.location.reduce((acc, itemIndex) => {
|
|
1244
|
+
const parent = acc[acc.length - 1]?.children || items;
|
|
1245
|
+
const item = parent[itemIndex];
|
|
1246
|
+
return [
|
|
1247
|
+
...acc,
|
|
1248
|
+
{ ...item, siblings: parent },
|
|
1249
|
+
];
|
|
1250
|
+
}, []);
|
|
1251
|
+
this.breadcrumbService.setItems(this.mapNavbarItemToBreadcrumbItem(breadcrumbItems));
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
mapNavbarItemToBreadcrumbItem(items) {
|
|
1255
|
+
return items.map(({ breadcrumbText, text, link, icon, siblings }) => ({
|
|
1256
|
+
text: breadcrumbText || text || '',
|
|
1257
|
+
link,
|
|
1258
|
+
icon,
|
|
1259
|
+
children: this.mapNavbarItemToBreadcrumbItem(siblings || []),
|
|
1260
|
+
}));
|
|
1261
|
+
}
|
|
1262
|
+
findItemByTreeNode(path) {
|
|
1263
|
+
const { tree, search: boundSearch } = {
|
|
1264
|
+
tree: this.routes.tree,
|
|
1265
|
+
search: this.routes.search.bind(this.routes),
|
|
1266
|
+
};
|
|
1267
|
+
const treeNode = boundSearch({
|
|
1268
|
+
path: path,
|
|
1269
|
+
}, tree);
|
|
1270
|
+
return treeNode;
|
|
1271
|
+
}
|
|
1272
|
+
createBreadcrumbTrail(item) {
|
|
1273
|
+
const trail = [];
|
|
1274
|
+
let current = item;
|
|
1275
|
+
while (current && current.breadcrumbText) {
|
|
1276
|
+
trail.push({
|
|
1277
|
+
text: this.localizationService.instant(current.breadcrumbText),
|
|
1278
|
+
icon: current.iconClass,
|
|
1279
|
+
});
|
|
1280
|
+
current = current.parent;
|
|
1281
|
+
}
|
|
1282
|
+
return trail.reverse();
|
|
1048
1283
|
}
|
|
1049
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1050
|
-
static { this.ɵ
|
|
1284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbRouteListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1285
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbRouteListenerService, providedIn: 'root' }); }
|
|
1051
1286
|
}
|
|
1052
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1053
|
-
type:
|
|
1287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbRouteListenerService, decorators: [{
|
|
1288
|
+
type: Injectable,
|
|
1054
1289
|
args: [{
|
|
1055
|
-
|
|
1056
|
-
name: 'toObservable',
|
|
1290
|
+
providedIn: 'root',
|
|
1057
1291
|
}]
|
|
1058
1292
|
}] });
|
|
1059
1293
|
|
|
1060
|
-
class
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1294
|
+
class LogoPanelDirective {
|
|
1295
|
+
constructor(template) {
|
|
1296
|
+
this.template = template;
|
|
1297
|
+
}
|
|
1298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LogoPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1299
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: LogoPanelDirective, isStandalone: true, selector: "ng-template[lpx-logo-panel]", ngImport: i0 }); }
|
|
1064
1300
|
}
|
|
1065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1066
|
-
type:
|
|
1067
|
-
args: [{
|
|
1068
|
-
|
|
1069
|
-
imports: [CommonModule],
|
|
1070
|
-
exports: [ToObservablePipe],
|
|
1071
|
-
}]
|
|
1072
|
-
}] });
|
|
1301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LogoPanelDirective, decorators: [{
|
|
1302
|
+
type: Directive,
|
|
1303
|
+
args: [{ selector: 'ng-template[lpx-logo-panel]' }]
|
|
1304
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1073
1305
|
|
|
1074
|
-
class
|
|
1306
|
+
class TranslatePipe {
|
|
1075
1307
|
constructor() {
|
|
1076
|
-
this.
|
|
1308
|
+
this.lpxThemeTranslateService = inject(LpxThemeTranslateService);
|
|
1077
1309
|
}
|
|
1078
|
-
transform(value) {
|
|
1079
|
-
|
|
1080
|
-
return '';
|
|
1081
|
-
return this.sanitizer.sanitize(SecurityContext.HTML, value) || '';
|
|
1310
|
+
transform(value, ...args) {
|
|
1311
|
+
return this.lpxThemeTranslateService.translate$(value, args);
|
|
1082
1312
|
}
|
|
1083
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1084
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1314
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: TranslatePipe, isStandalone: true, name: "lpxTranslate" }); }
|
|
1085
1315
|
}
|
|
1086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TranslatePipe, decorators: [{
|
|
1087
1317
|
type: Pipe,
|
|
1088
|
-
args: [{ name: '
|
|
1089
|
-
}] });
|
|
1090
|
-
|
|
1091
|
-
class LpxTranslateModule {
|
|
1092
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxTranslateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1093
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: LpxTranslateModule, declarations: [TranslatePipe], imports: [CommonModule], exports: [TranslatePipe] }); }
|
|
1094
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxTranslateModule, imports: [CommonModule] }); }
|
|
1095
|
-
}
|
|
1096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxTranslateModule, decorators: [{
|
|
1097
|
-
type: NgModule,
|
|
1098
|
-
args: [{
|
|
1099
|
-
declarations: [TranslatePipe],
|
|
1100
|
-
imports: [CommonModule],
|
|
1101
|
-
exports: [TranslatePipe],
|
|
1102
|
-
}]
|
|
1318
|
+
args: [{ name: 'lpxTranslate' }]
|
|
1103
1319
|
}] });
|
|
1104
1320
|
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
LpxBrandLogoModule,
|
|
1158
|
-
LpxIconModule,
|
|
1159
|
-
ToObservableModule,
|
|
1160
|
-
LpxTranslateModule,
|
|
1161
|
-
LpxVisibleDirective], exports: [NavbarComponent,
|
|
1162
|
-
SubNavbarComponent,
|
|
1163
|
-
NavbarRoutesComponent,
|
|
1164
|
-
NavbarRoutesDirective] }); }
|
|
1165
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxNavbarModule, imports: [CommonModule,
|
|
1166
|
-
FormsModule,
|
|
1167
|
-
RouterModule,
|
|
1168
|
-
LpxBrandLogoModule,
|
|
1169
|
-
LpxIconModule,
|
|
1170
|
-
ToObservableModule,
|
|
1171
|
-
LpxTranslateModule] }); }
|
|
1172
|
-
}
|
|
1173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxNavbarModule, decorators: [{
|
|
1174
|
-
type: NgModule,
|
|
1175
|
-
args: [{
|
|
1176
|
-
declarations: [...exportedDeclarations$1],
|
|
1177
|
-
imports: [
|
|
1178
|
-
CommonModule,
|
|
1179
|
-
FormsModule,
|
|
1180
|
-
RouterModule,
|
|
1181
|
-
LpxBrandLogoModule,
|
|
1182
|
-
LpxIconModule,
|
|
1183
|
-
ToObservableModule,
|
|
1184
|
-
LpxTranslateModule,
|
|
1185
|
-
LpxVisibleDirective,
|
|
1186
|
-
],
|
|
1187
|
-
exports: [...exportedDeclarations$1],
|
|
1188
|
-
}]
|
|
1189
|
-
}] });
|
|
1321
|
+
const collapseY = animation([
|
|
1322
|
+
style({ height: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
1323
|
+
animate('{{ time }} {{ easing }}', style({ height: '0', padding: '0px' })),
|
|
1324
|
+
], { params: { time: '350ms', easing: 'ease' } });
|
|
1325
|
+
const collapseYWithMargin = animation([
|
|
1326
|
+
style({ 'margin-top': '0' }),
|
|
1327
|
+
animate('{{ time }} {{ easing }}', style({ 'margin-left': '-100%' })),
|
|
1328
|
+
], {
|
|
1329
|
+
params: { time: '500ms', easing: 'ease' },
|
|
1330
|
+
});
|
|
1331
|
+
const collapseX = animation([
|
|
1332
|
+
style({ width: '*', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
1333
|
+
animate('{{ time }} {{ easing }}', style({ width: '0', padding: '0px' })),
|
|
1334
|
+
], { params: { time: '350ms', easing: 'ease' } });
|
|
1335
|
+
const expandY = animation([
|
|
1336
|
+
style({ height: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
1337
|
+
animate('{{ time }} {{ easing }}', style({ height: '*', padding: '*' })),
|
|
1338
|
+
], { params: { time: '350ms', easing: 'ease' } });
|
|
1339
|
+
const expandYWithMargin = animation([
|
|
1340
|
+
style({ 'margin-top': '-100%' }),
|
|
1341
|
+
animate('{{ time }} {{ easing }}', style({ 'margin-top': '0' })),
|
|
1342
|
+
], {
|
|
1343
|
+
params: { time: '500ms', easing: 'ease' },
|
|
1344
|
+
});
|
|
1345
|
+
const expandX = animation([
|
|
1346
|
+
style({ width: '0', overflow: 'hidden', 'box-sizing': 'border-box' }),
|
|
1347
|
+
animate('{{ time }} {{ easing }}', style({ width: '*', padding: '*' })),
|
|
1348
|
+
], { params: { time: '350ms', easing: 'ease' } });
|
|
1349
|
+
const collapse = trigger('collapse', [
|
|
1350
|
+
state('collapsed', style({ height: '0', overflow: 'hidden' })),
|
|
1351
|
+
state('expanded', style({ height: '*', overflow: 'hidden' })),
|
|
1352
|
+
transition('expanded => collapsed', useAnimation(collapseY)),
|
|
1353
|
+
transition('collapsed => expanded', useAnimation(expandY)),
|
|
1354
|
+
]);
|
|
1355
|
+
const collapseWithMargin = trigger('collapseWithMargin', [
|
|
1356
|
+
state('collapsed', style({ 'margin-top': '-100%' })),
|
|
1357
|
+
state('expanded', style({ 'margin-top': '0' })),
|
|
1358
|
+
transition('expanded => collapsed', useAnimation(collapseYWithMargin), {
|
|
1359
|
+
params: { time: '400ms', easing: 'linear' },
|
|
1360
|
+
}),
|
|
1361
|
+
transition('collapsed => expanded', useAnimation(expandYWithMargin)),
|
|
1362
|
+
]);
|
|
1363
|
+
const collapseLinearWithMargin = trigger('collapseLinearWithMargin', [
|
|
1364
|
+
state('collapsed', style({ 'margin-top': '-100vh' })),
|
|
1365
|
+
state('expanded', style({ 'margin-top': '0' })),
|
|
1366
|
+
transition('expanded => collapsed', useAnimation(collapseYWithMargin, {
|
|
1367
|
+
params: { time: '200ms', easing: 'linear' },
|
|
1368
|
+
})),
|
|
1369
|
+
transition('collapsed => expanded', useAnimation(expandYWithMargin, {
|
|
1370
|
+
params: { time: '250ms', easing: 'linear' },
|
|
1371
|
+
})),
|
|
1372
|
+
]);
|
|
1190
1373
|
|
|
1191
|
-
class
|
|
1374
|
+
class SubNavbarComponent {
|
|
1192
1375
|
constructor() {
|
|
1193
|
-
this.
|
|
1194
|
-
this.
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
add(item) {
|
|
1198
|
-
const items = Array.isArray(item) ? item : [item];
|
|
1199
|
-
this.store.set([...this.store.state, ...items]);
|
|
1200
|
-
}
|
|
1201
|
-
// TODO: generate id per item
|
|
1202
|
-
insert(item, index) {
|
|
1203
|
-
const state = this.store.state;
|
|
1204
|
-
const items = Array.isArray(item) ? item : [item];
|
|
1205
|
-
this.store.set([...state.slice(0, index), ...items, ...state.slice(index)]);
|
|
1206
|
-
}
|
|
1207
|
-
// TODO: generate id per item
|
|
1208
|
-
setItems(items) {
|
|
1209
|
-
this.store.set(items);
|
|
1210
|
-
}
|
|
1211
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1212
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbService, providedIn: 'root' }); }
|
|
1213
|
-
}
|
|
1214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbService, decorators: [{
|
|
1215
|
-
type: Injectable,
|
|
1216
|
-
args: [{
|
|
1217
|
-
providedIn: 'root',
|
|
1218
|
-
}]
|
|
1219
|
-
}] });
|
|
1220
|
-
|
|
1221
|
-
class ClickOutsideDirective {
|
|
1222
|
-
constructor(elementRef) {
|
|
1223
|
-
this.elementRef = elementRef;
|
|
1224
|
-
this.lpxClickOutside = new EventEmitter();
|
|
1225
|
-
this.exceptedRefs = [];
|
|
1376
|
+
this.injector = inject(Injector);
|
|
1377
|
+
this.routerItem = input();
|
|
1378
|
+
this.routeClick = new EventEmitter();
|
|
1379
|
+
this.expand = new EventEmitter();
|
|
1226
1380
|
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1381
|
+
onItemClick(menuItem) {
|
|
1382
|
+
let action$ = of(true);
|
|
1383
|
+
if (menuItem.action) {
|
|
1384
|
+
const result = menuItem.action();
|
|
1385
|
+
action$ = getStream$(result);
|
|
1231
1386
|
}
|
|
1387
|
+
action$.pipe(take(1)).subscribe((result) => {
|
|
1388
|
+
if (result) {
|
|
1389
|
+
this.processItemClick(menuItem);
|
|
1390
|
+
}
|
|
1391
|
+
});
|
|
1232
1392
|
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { lpxClickOutside: [{
|
|
1243
|
-
type: Output
|
|
1244
|
-
}], exceptedRefs: [{
|
|
1245
|
-
type: Input
|
|
1246
|
-
}], onDocumentClick: [{
|
|
1247
|
-
type: HostListener,
|
|
1248
|
-
args: ['document:click', ['$event']]
|
|
1249
|
-
}] } });
|
|
1250
|
-
|
|
1251
|
-
class BreadcrumbComponent {
|
|
1252
|
-
constructor(service) {
|
|
1253
|
-
this.service = service;
|
|
1254
|
-
this.icon = ICON_MAP;
|
|
1393
|
+
onChildExpand(child) {
|
|
1394
|
+
if (child.expanded) {
|
|
1395
|
+
this.item?.children
|
|
1396
|
+
?.filter((otherChild) => otherChild !== child)
|
|
1397
|
+
.forEach((otherChild) => {
|
|
1398
|
+
otherChild.expanded = false;
|
|
1399
|
+
otherChild.selected = false;
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1255
1402
|
}
|
|
1256
|
-
|
|
1257
|
-
if (
|
|
1258
|
-
|
|
1403
|
+
processItemClick(menuItem) {
|
|
1404
|
+
if (menuItem.children?.length) {
|
|
1405
|
+
menuItem.expanded = !menuItem.expanded;
|
|
1406
|
+
this.expand.emit(menuItem);
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
this.routeClick.emit(menuItem);
|
|
1410
|
+
if (!this.routerItem()) {
|
|
1411
|
+
menuItem.selected = true;
|
|
1259
1412
|
}
|
|
1260
1413
|
}
|
|
1261
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1262
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SubNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1415
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: SubNavbarComponent, isStandalone: true, selector: "lpx-sub-navbar", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: false, isRequired: false, transformFunction: null }, routerItem: { classPropertyName: "routerItem", publicName: "routerItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { routeClick: "routeClick", expand: "expand" }, ngImport: i0, template: "@if (item.component) {\r\n <ng-container *ngComponentOutlet=\"item.component; injector: injector\" />\r\n} @else {\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\" />\r\n}\r\n\r\n<ng-template #defaultTemplate>\r\n <a\r\n class=\"lpx-menu-item-link\"\r\n [routerLink]=\"item.link\"\r\n [class.selected]=\"item.selected\"\r\n [class.expanded]=\"item.children?.length && item.expanded\"\r\n (click)=\"onItemClick(item)\"\r\n >\r\n @if (item.icon) {\r\n <lpx-icon class=\"lpx-menu-item-icon\" [iconClass]=\"item.icon\" />\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.template || textTmpl;\r\n context: { $implicit: item }\r\n \"\r\n />\r\n\r\n <ng-template #textTmpl>\r\n @if (item.text) {\r\n @let isToolbarItem = item.text.split('::').length > 1;\r\n <span class=\"lpx-menu-item-text hidden-in-hover-trigger\">\r\n @if (isToolbarItem) {\r\n {{ item.text | abpLocalization }}\r\n } @else {\r\n {{ item.text | lpxTranslate | async }}\r\n }\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n @if (item.children?.length) {\r\n <lpx-icon\r\n [iconClass]=\"item.expanded ? 'chevronUp' : 'chevronDown'\"\r\n class=\"dd-icon hidden-in-hover-trigger\"\r\n />\r\n }\r\n </a>\r\n\r\n @if (item.children?.length) {\r\n <ul\r\n class=\"lpx-inner-menu hidden-in-hover-trigger\"\r\n [class.collapsed]=\"!item.expanded\"\r\n >\r\n @for (child of item.children; track $index) {\r\n <li\r\n class=\"lpx-inner-menu-item\"\r\n *lpxVisible=\"!child.visible || child.visible(child, injector)\"\r\n >\r\n <lpx-sub-navbar\r\n [item]=\"child\"\r\n (routeClick)=\"this.routeClick.emit($event)\"\r\n (expand)=\"onChildExpand($event)\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n }\r\n</ng-template>\r\n", dependencies: [{ kind: "component", type: SubNavbarComponent, selector: "lpx-sub-navbar", inputs: ["item", "routerItem"], outputs: ["routeClick", "expand"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }, { kind: "directive", type: LpxVisibleDirective, selector: "[lpxVisible]", inputs: ["lpxVisible"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "lpxTranslate" }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], animations: [collapse], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1263
1416
|
}
|
|
1264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SubNavbarComponent, decorators: [{
|
|
1265
1418
|
type: Component,
|
|
1266
|
-
args: [{
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1419
|
+
args: [{ selector: 'lpx-sub-navbar', encapsulation: ViewEncapsulation.None, animations: [collapse], imports: [
|
|
1420
|
+
NgComponentOutlet,
|
|
1421
|
+
NgTemplateOutlet,
|
|
1422
|
+
RouterLink,
|
|
1423
|
+
IconComponent,
|
|
1424
|
+
LpxVisibleDirective,
|
|
1425
|
+
AsyncPipe,
|
|
1426
|
+
TranslatePipe,
|
|
1427
|
+
LocalizationPipe,
|
|
1428
|
+
], template: "@if (item.component) {\r\n <ng-container *ngComponentOutlet=\"item.component; injector: injector\" />\r\n} @else {\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\" />\r\n}\r\n\r\n<ng-template #defaultTemplate>\r\n <a\r\n class=\"lpx-menu-item-link\"\r\n [routerLink]=\"item.link\"\r\n [class.selected]=\"item.selected\"\r\n [class.expanded]=\"item.children?.length && item.expanded\"\r\n (click)=\"onItemClick(item)\"\r\n >\r\n @if (item.icon) {\r\n <lpx-icon class=\"lpx-menu-item-icon\" [iconClass]=\"item.icon\" />\r\n }\r\n\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n item.template || textTmpl;\r\n context: { $implicit: item }\r\n \"\r\n />\r\n\r\n <ng-template #textTmpl>\r\n @if (item.text) {\r\n @let isToolbarItem = item.text.split('::').length > 1;\r\n <span class=\"lpx-menu-item-text hidden-in-hover-trigger\">\r\n @if (isToolbarItem) {\r\n {{ item.text | abpLocalization }}\r\n } @else {\r\n {{ item.text | lpxTranslate | async }}\r\n }\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n @if (item.children?.length) {\r\n <lpx-icon\r\n [iconClass]=\"item.expanded ? 'chevronUp' : 'chevronDown'\"\r\n class=\"dd-icon hidden-in-hover-trigger\"\r\n />\r\n }\r\n </a>\r\n\r\n @if (item.children?.length) {\r\n <ul\r\n class=\"lpx-inner-menu hidden-in-hover-trigger\"\r\n [class.collapsed]=\"!item.expanded\"\r\n >\r\n @for (child of item.children; track $index) {\r\n <li\r\n class=\"lpx-inner-menu-item\"\r\n *lpxVisible=\"!child.visible || child.visible(child, injector)\"\r\n >\r\n <lpx-sub-navbar\r\n [item]=\"child\"\r\n (routeClick)=\"this.routeClick.emit($event)\"\r\n (expand)=\"onChildExpand($event)\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n }\r\n</ng-template>\r\n" }]
|
|
1429
|
+
}], propDecorators: { item: [{
|
|
1430
|
+
type: Input
|
|
1431
|
+
}], routeClick: [{
|
|
1432
|
+
type: Output
|
|
1433
|
+
}], expand: [{
|
|
1434
|
+
type: Output
|
|
1435
|
+
}] } });
|
|
1282
1436
|
|
|
1283
|
-
class
|
|
1437
|
+
class NavbarRoutesComponent {
|
|
1284
1438
|
constructor() {
|
|
1285
|
-
this.
|
|
1286
|
-
this.
|
|
1287
|
-
this.
|
|
1288
|
-
this.
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)),
|
|
1294
|
-
this.navbarService.navbarItems$.pipe(filter((items) => !!items.length)),
|
|
1295
|
-
]).subscribe(([event, items]) => {
|
|
1296
|
-
const currentPath = event.url;
|
|
1297
|
-
let activeItem = this.navbarService.findByLink(currentPath);
|
|
1298
|
-
let breadcrumbItems;
|
|
1299
|
-
if (!activeItem.item) {
|
|
1300
|
-
const item = this.findItemByTreeNode(currentPath);
|
|
1301
|
-
if (item) {
|
|
1302
|
-
breadcrumbItems = this.createBreadcrumbTrail(item);
|
|
1303
|
-
this.breadcrumbService.setItems(breadcrumbItems);
|
|
1304
|
-
return;
|
|
1305
|
-
}
|
|
1306
|
-
activeItem = this.navbarService.findByLink('/');
|
|
1439
|
+
this.injector = inject(Injector);
|
|
1440
|
+
this.routesService = inject(RoutesService);
|
|
1441
|
+
this._sourceItems = signal([]);
|
|
1442
|
+
this._processedItems = computed(() => {
|
|
1443
|
+
const url = this.routesService.currentNavigation().split('?')[0];
|
|
1444
|
+
const items = this._sourceItems();
|
|
1445
|
+
if (!items?.length || !url) {
|
|
1446
|
+
return items;
|
|
1307
1447
|
}
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
return [
|
|
1312
|
-
...acc,
|
|
1313
|
-
{ ...item, siblings: parent },
|
|
1314
|
-
];
|
|
1315
|
-
}, []);
|
|
1316
|
-
this.breadcrumbService.setItems(this.mapNavbarItemToBreadcrumbItem(breadcrumbItems));
|
|
1448
|
+
const updated = [...items];
|
|
1449
|
+
this.fixNavbarItems(url, items);
|
|
1450
|
+
return updated;
|
|
1317
1451
|
});
|
|
1452
|
+
this.routerItem = input();
|
|
1453
|
+
this.routeClick = new EventEmitter();
|
|
1454
|
+
this.isExpandedOrSelected = (item) => !!(item.expanded || item.selected);
|
|
1318
1455
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
text: breadcrumbText || text || '',
|
|
1322
|
-
link,
|
|
1323
|
-
icon,
|
|
1324
|
-
children: this.mapNavbarItemToBreadcrumbItem(siblings || []),
|
|
1325
|
-
}));
|
|
1456
|
+
set navbarItems(value) {
|
|
1457
|
+
this._sourceItems.set(value);
|
|
1326
1458
|
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
tree: this.routes.tree,
|
|
1330
|
-
search: this.routes.search.bind(this.routes),
|
|
1331
|
-
};
|
|
1332
|
-
const treeNode = boundSearch({
|
|
1333
|
-
path: path,
|
|
1334
|
-
}, tree);
|
|
1335
|
-
return treeNode;
|
|
1459
|
+
get navbarItems() {
|
|
1460
|
+
return this._processedItems();
|
|
1336
1461
|
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
while (current && current.breadcrumbText) {
|
|
1341
|
-
trail.push({
|
|
1342
|
-
text: this.localizationService.instant(current.breadcrumbText),
|
|
1343
|
-
icon: current.iconClass,
|
|
1344
|
-
});
|
|
1345
|
-
current = current.parent;
|
|
1346
|
-
}
|
|
1347
|
-
return trail.reverse();
|
|
1348
|
-
}
|
|
1349
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbRouteListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1350
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbRouteListenerService, providedIn: 'root' }); }
|
|
1351
|
-
}
|
|
1352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: BreadcrumbRouteListenerService, decorators: [{
|
|
1353
|
-
type: Injectable,
|
|
1354
|
-
args: [{
|
|
1355
|
-
providedIn: 'root',
|
|
1356
|
-
}]
|
|
1357
|
-
}] });
|
|
1358
|
-
|
|
1359
|
-
const exportedDeclarations = [BreadcrumbComponent];
|
|
1360
|
-
class LpxBreadcrumbModule {
|
|
1361
|
-
static forRoot() {
|
|
1362
|
-
return {
|
|
1363
|
-
ngModule: LpxBreadcrumbModule,
|
|
1364
|
-
providers: [
|
|
1365
|
-
provideAppInitializer(() => {
|
|
1366
|
-
breadCrumbInit();
|
|
1367
|
-
}),
|
|
1368
|
-
],
|
|
1369
|
-
};
|
|
1370
|
-
}
|
|
1371
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxBreadcrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1372
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: LpxBreadcrumbModule, declarations: [BreadcrumbComponent], imports: [CommonModule,
|
|
1373
|
-
LpxIconModule,
|
|
1374
|
-
ToObservableModule,
|
|
1375
|
-
RouterModule,
|
|
1376
|
-
LpxClickOutsideModule], exports: [BreadcrumbComponent] }); }
|
|
1377
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxBreadcrumbModule, imports: [CommonModule,
|
|
1378
|
-
LpxIconModule,
|
|
1379
|
-
ToObservableModule,
|
|
1380
|
-
RouterModule,
|
|
1381
|
-
LpxClickOutsideModule] }); }
|
|
1382
|
-
}
|
|
1383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxBreadcrumbModule, decorators: [{
|
|
1384
|
-
type: NgModule,
|
|
1385
|
-
args: [{
|
|
1386
|
-
declarations: [...exportedDeclarations],
|
|
1387
|
-
imports: [
|
|
1388
|
-
CommonModule,
|
|
1389
|
-
LpxIconModule,
|
|
1390
|
-
ToObservableModule,
|
|
1391
|
-
RouterModule,
|
|
1392
|
-
LpxClickOutsideModule,
|
|
1393
|
-
],
|
|
1394
|
-
exports: [...exportedDeclarations],
|
|
1395
|
-
}]
|
|
1396
|
-
}] });
|
|
1397
|
-
function breadCrumbInit() {
|
|
1398
|
-
const service = inject(BreadcrumbRouteListenerService);
|
|
1399
|
-
service.subscribeRoute();
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
const LPX_TRANSLATE_SERVICE_PROVIDER = {
|
|
1403
|
-
provide: LPX_TRANSLATE_SERVICE_TOKEN,
|
|
1404
|
-
useClass: DefaultTranslateService,
|
|
1405
|
-
};
|
|
1406
|
-
const LPX_TRANSLATE_PROVIDERS = [
|
|
1407
|
-
LPX_TRANSLATE_SERVICE_PROVIDER,
|
|
1408
|
-
];
|
|
1409
|
-
|
|
1410
|
-
const LPX_INITIAL_STYLES = new InjectionToken('LPX_INITIAL_STYLES_TOKEN');
|
|
1411
|
-
const LPX_STYLE_FINAL = new InjectionToken('LPX_STYLE_FINAL_TOKEN');
|
|
1412
|
-
const LPX_LAYOUT_STYLE_FINAL = new InjectionToken('LPX_LAYOUT_STYLE_FINALIZE_TOKEN');
|
|
1413
|
-
|
|
1414
|
-
class StyleService {
|
|
1415
|
-
constructor(initialStyles, document) {
|
|
1416
|
-
this.initialStyles = initialStyles;
|
|
1417
|
-
this.document = document;
|
|
1418
|
-
this.lastInjectedStyle = null;
|
|
1419
|
-
this.initialized$ = new BehaviorSubject(false);
|
|
1420
|
-
}
|
|
1421
|
-
async initStyles(direction) {
|
|
1422
|
-
for (const style of this.initialStyles) {
|
|
1423
|
-
await this.loadStyle(style, direction);
|
|
1462
|
+
get itemsFromGroup() {
|
|
1463
|
+
if (!this.groupedItems) {
|
|
1464
|
+
return undefined;
|
|
1424
1465
|
}
|
|
1425
|
-
this.
|
|
1466
|
+
return getItemsFromGroup(this.groupedItems);
|
|
1426
1467
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
const
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
if (appStyles) {
|
|
1433
|
-
if (this.lastInjectedStyle && this.lastInjectedStyle.isConnected) {
|
|
1434
|
-
this.lastInjectedStyle.insertAdjacentElement('afterend', linkElem);
|
|
1435
|
-
}
|
|
1436
|
-
else {
|
|
1437
|
-
appStyles.insertAdjacentElement('beforebegin', linkElem);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
else {
|
|
1441
|
-
this.document.head.appendChild(linkElem);
|
|
1468
|
+
onSubnavbarExpand(menuItem, menuItems) {
|
|
1469
|
+
if (menuItem.expanded) {
|
|
1470
|
+
const items = this.itemsFromGroup || menuItems;
|
|
1471
|
+
if (!items) {
|
|
1472
|
+
return;
|
|
1442
1473
|
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1447
|
-
async replaceStyle(style, direction) {
|
|
1448
|
-
const loaded = this.document.querySelector(`link#${style.bundleName}`);
|
|
1449
|
-
if (loaded) {
|
|
1450
|
-
loaded.remove();
|
|
1474
|
+
items
|
|
1475
|
+
.filter((item) => item !== menuItem)
|
|
1476
|
+
.forEach((item) => (item.expanded = false));
|
|
1451
1477
|
}
|
|
1452
|
-
return this.loadStyle(style, direction);
|
|
1453
1478
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1479
|
+
onRouteClick(menuItem, menuItems) {
|
|
1480
|
+
const expandedItems = menuItems?.filter(this.isExpandedOrSelected);
|
|
1481
|
+
const expandedGroupItems = this.itemsFromGroup?.filter(this.isExpandedOrSelected);
|
|
1482
|
+
const items = expandedGroupItems || expandedItems;
|
|
1483
|
+
if (items) {
|
|
1484
|
+
items
|
|
1485
|
+
.filter((item) => item !== menuItem)
|
|
1486
|
+
.reduce((acc, item) => {
|
|
1487
|
+
return [...acc, item, ...this.flatChildren(item.children || [])];
|
|
1488
|
+
}, [])
|
|
1489
|
+
?.filter((item) => !this.checkChildrenIncludesItem(item, menuItem) &&
|
|
1490
|
+
item !== menuItem)
|
|
1491
|
+
.forEach((item) => {
|
|
1492
|
+
item.selected = false;
|
|
1493
|
+
item.expanded = false;
|
|
1494
|
+
});
|
|
1457
1495
|
}
|
|
1496
|
+
this.routeClick.emit(menuItem);
|
|
1458
1497
|
}
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
linkElem.href = `${style.bundleName}${direction === 'rtl' ? '.rtl' : ''}.css`;
|
|
1464
|
-
linkElem.onload = () => {
|
|
1465
|
-
resolve(linkElem);
|
|
1466
|
-
};
|
|
1467
|
-
return linkElem;
|
|
1468
|
-
}
|
|
1469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StyleService, deps: [{ token: LPX_STYLE_FINAL }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1470
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StyleService, providedIn: 'root' }); }
|
|
1471
|
-
}
|
|
1472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: StyleService, decorators: [{
|
|
1473
|
-
type: Injectable,
|
|
1474
|
-
args: [{
|
|
1475
|
-
providedIn: 'root',
|
|
1476
|
-
}]
|
|
1477
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1478
|
-
type: Inject,
|
|
1479
|
-
args: [LPX_STYLE_FINAL]
|
|
1480
|
-
}] }, { type: Document, decorators: [{
|
|
1481
|
-
type: Inject,
|
|
1482
|
-
args: [DOCUMENT]
|
|
1483
|
-
}] }] });
|
|
1484
|
-
|
|
1485
|
-
function createStyleFactory(handler) {
|
|
1486
|
-
return handler || ((defaultValue) => defaultValue);
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
function styleLoadFactory(styleList, layoutStyles) {
|
|
1490
|
-
styleList.push({
|
|
1491
|
-
bundleName: 'ng-bundle',
|
|
1492
|
-
});
|
|
1493
|
-
styleList.push({
|
|
1494
|
-
bundleName: 'font-bundle',
|
|
1495
|
-
});
|
|
1496
|
-
return [...styleList, ...layoutStyles];
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
const LPX_STYLE_PROVIDERS = [
|
|
1500
|
-
{
|
|
1501
|
-
provide: LPX_INITIAL_STYLES,
|
|
1502
|
-
useFactory: () => [],
|
|
1503
|
-
},
|
|
1504
|
-
provideAppInitializer(() => {
|
|
1505
|
-
return loadInitialStyles();
|
|
1506
|
-
}),
|
|
1507
|
-
];
|
|
1508
|
-
function loadInitialStyles() {
|
|
1509
|
-
const styleService = inject(StyleService);
|
|
1510
|
-
const languageService = inject(LanguageService);
|
|
1511
|
-
return languageService.languageChange$.pipe(take(1), switchMap((lang) => from(styleService.initStyles(lang.isRTL ? 'rtl' : 'ltr'))));
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
const WINDOW = new InjectionToken('WINDOW');
|
|
1515
|
-
|
|
1516
|
-
function createWindowProvider(windowObj) {
|
|
1517
|
-
return { provide: WINDOW, useValue: windowObj || window };
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
const RESPONSIVE_BREAKPOINTS = new InjectionToken('RESPONSIVE_BREAKPOINTS');
|
|
1521
|
-
|
|
1522
|
-
class ResponsiveService {
|
|
1523
|
-
constructor(providedBreakpoints, window) {
|
|
1524
|
-
this.providedBreakpoints = providedBreakpoints;
|
|
1525
|
-
this.window = window;
|
|
1526
|
-
this.defaultBreakpoint = {
|
|
1527
|
-
name: "all" /* ResponsiveTokens.all */,
|
|
1528
|
-
width: 0,
|
|
1529
|
-
};
|
|
1530
|
-
this.breakpoints = this.buildBreakpoints(this.providedBreakpoints);
|
|
1531
|
-
this.getCurrentSize = () => ({
|
|
1532
|
-
height: this.window.innerHeight,
|
|
1533
|
-
width: this.window.innerWidth,
|
|
1534
|
-
});
|
|
1535
|
-
this.mapSizeToBreakpoint = ({ width } = this.getCurrentSize()) => {
|
|
1536
|
-
return this.breakpoints.find((s) => width >= s.width);
|
|
1537
|
-
};
|
|
1538
|
-
this.currentSize$ = new BehaviorSubject(this.mapSizeToBreakpoint());
|
|
1539
|
-
this.shouldRenderWithCurrentSize = (query) => {
|
|
1540
|
-
return this.matchQuery(query);
|
|
1541
|
-
};
|
|
1542
|
-
this.setupListener();
|
|
1543
|
-
}
|
|
1544
|
-
setupListener() {
|
|
1545
|
-
this.currentResolution$ = fromEvent(this.window, 'resize')
|
|
1546
|
-
.pipe(map(this.getCurrentSize))
|
|
1547
|
-
.pipe(startWith(this.getCurrentSize()));
|
|
1548
|
-
this.currentResolution$
|
|
1549
|
-
.pipe(map(this.mapSizeToBreakpoint), distinctUntilChanged())
|
|
1550
|
-
.subscribe((current) => {
|
|
1551
|
-
this.currentSize$.next(current);
|
|
1552
|
-
});
|
|
1553
|
-
}
|
|
1554
|
-
buildBreakpoints(breakpoints) {
|
|
1555
|
-
return [
|
|
1556
|
-
...Object.keys(breakpoints)
|
|
1557
|
-
.map((key) => ({
|
|
1558
|
-
name: key,
|
|
1559
|
-
width: breakpoints[key],
|
|
1560
|
-
}))
|
|
1561
|
-
.sort((a, b) => b.width - a.width),
|
|
1562
|
-
this.defaultBreakpoint,
|
|
1563
|
-
];
|
|
1498
|
+
checkChildrenIncludesItem(item, menuItem) {
|
|
1499
|
+
return (item.children?.reduce((acc, child) => acc ||
|
|
1500
|
+
child === menuItem ||
|
|
1501
|
+
this.checkChildrenIncludesItem(child, menuItem), false) || false);
|
|
1564
1502
|
}
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
const matchedBreakpoint = this.breakpoints.find((breakpoint) => width >= breakpoint.width && findInTokens(breakpoint.name));
|
|
1570
|
-
if (matchedBreakpoint) {
|
|
1571
|
-
const token = findInTokens(matchedBreakpoint.name);
|
|
1572
|
-
const shouldBeBigger = !token?.includes("none" /* ResponsiveTokens.none */);
|
|
1573
|
-
return shouldBeBigger === width >= matchedBreakpoint.width;
|
|
1574
|
-
}
|
|
1575
|
-
return false;
|
|
1503
|
+
flatChildren(menuItems) {
|
|
1504
|
+
return (menuItems?.reduce((acc, item) => {
|
|
1505
|
+
return [...acc, item, ...this.flatChildren(item.children || [])];
|
|
1506
|
+
}, []) || []);
|
|
1576
1507
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
}]
|
|
1585
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1586
|
-
type: Inject,
|
|
1587
|
-
args: [RESPONSIVE_BREAKPOINTS]
|
|
1588
|
-
}] }, { type: undefined, decorators: [{
|
|
1589
|
-
type: Inject,
|
|
1590
|
-
args: [WINDOW]
|
|
1591
|
-
}] }] });
|
|
1592
|
-
|
|
1593
|
-
class ResponsiveDirective {
|
|
1594
|
-
constructor(templateRef, viewContainer, service, parentCdr) {
|
|
1595
|
-
this.templateRef = templateRef;
|
|
1596
|
-
this.viewContainer = viewContainer;
|
|
1597
|
-
this.service = service;
|
|
1598
|
-
this.parentCdr = parentCdr;
|
|
1599
|
-
this.hasRendered = false;
|
|
1600
|
-
this.sub = new Subscription();
|
|
1601
|
-
this.render = (shouldRender) => {
|
|
1602
|
-
if (shouldRender && !this.hasRendered) {
|
|
1603
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
1604
|
-
this.hasRendered = true;
|
|
1508
|
+
fixNavbarItems(currentUrl, items) {
|
|
1509
|
+
items.forEach((item) => {
|
|
1510
|
+
const { link, children } = item;
|
|
1511
|
+
if (children?.length) {
|
|
1512
|
+
this.fixNavbarItems(currentUrl, children);
|
|
1513
|
+
const hasActiveChild = children.some((child) => child.selected || child.expanded || child.link === currentUrl);
|
|
1514
|
+
item.expanded ||= hasActiveChild || link === currentUrl;
|
|
1605
1515
|
}
|
|
1606
|
-
else
|
|
1607
|
-
|
|
1608
|
-
this.hasRendered = false;
|
|
1516
|
+
else {
|
|
1517
|
+
item.selected = link === currentUrl;
|
|
1609
1518
|
}
|
|
1610
|
-
|
|
1611
|
-
};
|
|
1612
|
-
}
|
|
1613
|
-
ngOnInit() {
|
|
1614
|
-
this.sub.add(this.service.currentSize$
|
|
1615
|
-
.pipe(map((_) => this.service.shouldRenderWithCurrentSize(this.query)))
|
|
1616
|
-
.subscribe(this.render));
|
|
1617
|
-
}
|
|
1618
|
-
ngOnDestroy() {
|
|
1619
|
-
this.sub.unsubscribe();
|
|
1519
|
+
});
|
|
1620
1520
|
}
|
|
1621
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1622
|
-
static { this.ɵ
|
|
1623
|
-
}
|
|
1624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1625
|
-
type:
|
|
1626
|
-
args: [{
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1521
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarRoutesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1522
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: NavbarRoutesComponent, isStandalone: true, 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: 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: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "lpxTranslate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1523
|
+
}
|
|
1524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarRoutesComponent, decorators: [{
|
|
1525
|
+
type: Component,
|
|
1526
|
+
args: [{ selector: 'lpx-navbar-routes', encapsulation: ViewEncapsulation.None, imports: [
|
|
1527
|
+
NgTemplateOutlet,
|
|
1528
|
+
LpxVisibleDirective,
|
|
1529
|
+
SubNavbarComponent,
|
|
1530
|
+
AsyncPipe,
|
|
1531
|
+
TranslatePipe,
|
|
1532
|
+
], 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" }]
|
|
1533
|
+
}], propDecorators: { navbarItems: [{
|
|
1534
|
+
type: Input
|
|
1535
|
+
}], groupedItems: [{
|
|
1536
|
+
type: Input
|
|
1537
|
+
}], routeClick: [{
|
|
1538
|
+
type: Output
|
|
1637
1539
|
}] } });
|
|
1638
1540
|
|
|
1639
|
-
class
|
|
1640
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1641
|
-
static { this.ɵ
|
|
1642
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LpxResponsiveModule, imports: [CommonModule] }); }
|
|
1541
|
+
class NavbarRoutesDirective {
|
|
1542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarRoutesDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1543
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: NavbarRoutesDirective, isStandalone: true, selector: "[lpx-navbar-routes],[lpxNavbarRoutes]", exportAs: ["lpxNavbarRoutes"], ngImport: i0 }); }
|
|
1643
1544
|
}
|
|
1644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1645
|
-
type:
|
|
1545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarRoutesDirective, decorators: [{
|
|
1546
|
+
type: Directive,
|
|
1646
1547
|
args: [{
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
exports: [ResponsiveDirective],
|
|
1548
|
+
selector: '[lpx-navbar-routes],[lpxNavbarRoutes]',
|
|
1549
|
+
exportAs: 'lpxNavbarRoutes',
|
|
1650
1550
|
}]
|
|
1651
1551
|
}] });
|
|
1652
1552
|
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
if (
|
|
1670
|
-
|
|
1553
|
+
class NavbarComponent {
|
|
1554
|
+
constructor() {
|
|
1555
|
+
this.layoutService = inject(LayoutService);
|
|
1556
|
+
this.platformId = inject(PLATFORM_ID);
|
|
1557
|
+
this.service = inject(NavbarService);
|
|
1558
|
+
this.injector = inject(Injector);
|
|
1559
|
+
this.didResized = false;
|
|
1560
|
+
this.initialHover = false;
|
|
1561
|
+
this.showFilterMenu$ = this.service.navbarItems$.pipe(map$1((items) => !!items.length));
|
|
1562
|
+
this.contentBefore = this.flatContents(CONTENT_BEFORE_ROUTES);
|
|
1563
|
+
this.contentAfter = this.flatContents(CONTENT_AFTER_ROUTES);
|
|
1564
|
+
}
|
|
1565
|
+
toggleSidebarHover() {
|
|
1566
|
+
this.didResized = true;
|
|
1567
|
+
this.layoutService.toggleClass('hover-trigger');
|
|
1568
|
+
this.initialHover = !this.initialHover;
|
|
1569
|
+
if (this.initialHover) {
|
|
1570
|
+
this.layoutService.addClass('initial-hover');
|
|
1671
1571
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1572
|
+
else {
|
|
1573
|
+
this.layoutService.removeClass('initial-hover');
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
handleInitialHover() {
|
|
1577
|
+
if (this.initialHover) {
|
|
1578
|
+
this.layoutService.removeClass('initial-hover');
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
ngAfterViewChecked() {
|
|
1582
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
if (this.didResized) {
|
|
1586
|
+
this.didResized = false;
|
|
1587
|
+
window.dispatchEvent(new Event('resize'));
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
flatContents(token) {
|
|
1591
|
+
const contents = this.injector.get(token, []);
|
|
1592
|
+
return contents.reduce((acc, val) => acc.concat(val), []);
|
|
1593
|
+
}
|
|
1594
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1595
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: NavbarComponent, isStandalone: true, 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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "lpx-icon", inputs: ["iconClass"] }, { kind: "component", type: NavbarRoutesComponent, selector: "lpx-navbar-routes", inputs: ["navbarItems", "groupedItems", "routerItem"], outputs: ["routeClick"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: BrandLogoComponent, selector: "lpx-brand-logo", inputs: ["layout"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1691
1596
|
}
|
|
1597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarComponent, decorators: [{
|
|
1598
|
+
type: Component,
|
|
1599
|
+
args: [{ selector: 'lpx-navbar', encapsulation: ViewEncapsulation.None, imports: [
|
|
1600
|
+
NgTemplateOutlet,
|
|
1601
|
+
IconComponent,
|
|
1602
|
+
NavbarRoutesComponent,
|
|
1603
|
+
NgComponentOutlet,
|
|
1604
|
+
BrandLogoComponent,
|
|
1605
|
+
AsyncPipe,
|
|
1606
|
+
], 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" }]
|
|
1607
|
+
}], ctorParameters: () => [], propDecorators: { routesTemplate: [{
|
|
1608
|
+
type: ContentChild,
|
|
1609
|
+
args: [NavbarRoutesDirective, { read: TemplateRef }]
|
|
1610
|
+
}], logoPanel: [{
|
|
1611
|
+
type: ContentChild,
|
|
1612
|
+
args: [LogoPanelDirective]
|
|
1613
|
+
}] } });
|
|
1692
1614
|
|
|
1693
|
-
class
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
LpxLanguageModule.forRoot(options?.languageSettings)
|
|
1702
|
-
.providers,
|
|
1703
|
-
LpxNavbarModule.forRoot(options?.navbarSettings).providers,
|
|
1704
|
-
LpxBreadcrumbModule.forRoot().providers,
|
|
1705
|
-
LPX_TRANSLATE_PROVIDERS,
|
|
1706
|
-
...LPX_STYLE_PROVIDERS,
|
|
1707
|
-
createDirectionProvider(options?.listenDirectionChanges || true),
|
|
1708
|
-
],
|
|
1709
|
-
};
|
|
1615
|
+
class SafeHtmlPipe {
|
|
1616
|
+
constructor() {
|
|
1617
|
+
this.sanitizer = inject(DomSanitizer);
|
|
1618
|
+
}
|
|
1619
|
+
transform(value) {
|
|
1620
|
+
if (!value || typeof value !== 'string')
|
|
1621
|
+
return '';
|
|
1622
|
+
return this.sanitizer.sanitize(SecurityContext.HTML, value) || '';
|
|
1710
1623
|
}
|
|
1711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1712
|
-
static { this.ɵ
|
|
1713
|
-
|
|
1624
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SafeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1625
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: SafeHtmlPipe, isStandalone: true, name: "lpxSafeHtml" }); }
|
|
1626
|
+
}
|
|
1627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
1628
|
+
type: Pipe,
|
|
1629
|
+
args: [{ name: 'lpxSafeHtml', standalone: true }]
|
|
1630
|
+
}] });
|
|
1631
|
+
|
|
1632
|
+
class LpxTranslateModule {
|
|
1633
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxTranslateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1634
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxTranslateModule, imports: [CommonModule, TranslatePipe], exports: [TranslatePipe] }); }
|
|
1635
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxTranslateModule, imports: [CommonModule] }); }
|
|
1714
1636
|
}
|
|
1715
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxTranslateModule, decorators: [{
|
|
1716
1638
|
type: NgModule,
|
|
1717
1639
|
args: [{
|
|
1718
|
-
imports: [CommonModule,
|
|
1640
|
+
imports: [CommonModule, TranslatePipe],
|
|
1641
|
+
exports: [TranslatePipe],
|
|
1719
1642
|
}]
|
|
1720
1643
|
}] });
|
|
1721
1644
|
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1645
|
+
const exportedDeclarations = [
|
|
1646
|
+
NavbarComponent,
|
|
1647
|
+
SubNavbarComponent,
|
|
1648
|
+
NavbarRoutesComponent,
|
|
1649
|
+
NavbarRoutesDirective,
|
|
1650
|
+
];
|
|
1651
|
+
class LpxNavbarModule {
|
|
1652
|
+
/**
|
|
1653
|
+
* @deprecated `LpxNavbarModule.forRoot()` is deprecated. You can use `provideLpxCore` **function** instead.
|
|
1654
|
+
*/
|
|
1655
|
+
static forRoot(options = {}) {
|
|
1656
|
+
return {
|
|
1657
|
+
ngModule: LpxNavbarModule,
|
|
1658
|
+
providers: [provideLpxCore(SKIP_DEFAULTS, withNavbar(options))],
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
/**
|
|
1662
|
+
* @deprecated `LpxNavbarModule.forChild()` is deprecated. You can use `provideLpxCore` **function** instead.
|
|
1663
|
+
*/
|
|
1664
|
+
static forChild(options = {}) {
|
|
1665
|
+
return {
|
|
1666
|
+
ngModule: LpxNavbarModule,
|
|
1667
|
+
providers: [provideLpxCore(SKIP_DEFAULTS, withNavbarChild(options))],
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1671
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxNavbarModule, imports: [CommonModule,
|
|
1672
|
+
FormsModule,
|
|
1673
|
+
RouterModule,
|
|
1674
|
+
LpxBrandLogoModule,
|
|
1675
|
+
LpxIconModule,
|
|
1676
|
+
ToObservableModule,
|
|
1677
|
+
LpxTranslateModule,
|
|
1678
|
+
LpxVisibleDirective, NavbarComponent,
|
|
1679
|
+
SubNavbarComponent,
|
|
1680
|
+
NavbarRoutesComponent,
|
|
1681
|
+
NavbarRoutesDirective], exports: [NavbarComponent,
|
|
1682
|
+
SubNavbarComponent,
|
|
1683
|
+
NavbarRoutesComponent,
|
|
1684
|
+
NavbarRoutesDirective] }); }
|
|
1685
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxNavbarModule, imports: [CommonModule,
|
|
1686
|
+
FormsModule,
|
|
1687
|
+
RouterModule,
|
|
1688
|
+
LpxBrandLogoModule,
|
|
1689
|
+
LpxIconModule,
|
|
1690
|
+
ToObservableModule,
|
|
1691
|
+
LpxTranslateModule] }); }
|
|
1737
1692
|
}
|
|
1738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxNavbarModule, decorators: [{
|
|
1739
1694
|
type: NgModule,
|
|
1740
1695
|
args: [{
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1696
|
+
imports: [
|
|
1697
|
+
CommonModule,
|
|
1698
|
+
FormsModule,
|
|
1699
|
+
RouterModule,
|
|
1700
|
+
LpxBrandLogoModule,
|
|
1701
|
+
LpxIconModule,
|
|
1702
|
+
ToObservableModule,
|
|
1703
|
+
LpxTranslateModule,
|
|
1704
|
+
LpxVisibleDirective,
|
|
1705
|
+
...exportedDeclarations,
|
|
1706
|
+
],
|
|
1707
|
+
exports: [...exportedDeclarations],
|
|
1744
1708
|
}]
|
|
1745
1709
|
}] });
|
|
1746
1710
|
|
|
@@ -1752,10 +1716,10 @@ class FooterLinksService {
|
|
|
1752
1716
|
setFooterInfo(links) {
|
|
1753
1717
|
this.store.set(links);
|
|
1754
1718
|
}
|
|
1755
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1756
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1719
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterLinksService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1720
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterLinksService, providedIn: 'root' }); }
|
|
1757
1721
|
}
|
|
1758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterLinksService, decorators: [{
|
|
1759
1723
|
type: Injectable,
|
|
1760
1724
|
args: [{
|
|
1761
1725
|
providedIn: 'root',
|
|
@@ -1763,17 +1727,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
1763
1727
|
}] });
|
|
1764
1728
|
|
|
1765
1729
|
class FooterComponent {
|
|
1766
|
-
constructor(
|
|
1767
|
-
this.service =
|
|
1730
|
+
constructor() {
|
|
1731
|
+
this.service = inject(FooterLinksService);
|
|
1768
1732
|
this.footerValues$ = this.service.footerInfo$;
|
|
1769
1733
|
}
|
|
1770
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1771
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1734
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1735
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: FooterComponent, isStandalone: true, selector: "lpx-footer", ngImport: i0, template: "@if (footerValues$ | async; as footerValues) {\r\n <div class=\"lpx-footbar\">\r\n <div class=\"lpx-footbar-copyright\">\r\n @if (footerValues.descUrl) {\r\n <a [routerLink]=\"[footerValues.descUrl]\"> {{ footerValues.desc }}</a>\r\n } @else {\r\n <a> {{ footerValues.desc }}</a>\r\n }\r\n </div>\r\n <div class=\"lpx-footbar-solo-links\">\r\n @for (footerLink of footerValues.footerLinks; track $index) {\r\n @if (footerLink) {\r\n <a [routerLink]=\"[footerLink.link]\">{{ footerLink.text }}</a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
1772
1736
|
}
|
|
1773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1774
1738
|
type: Component,
|
|
1775
|
-
args: [{
|
|
1776
|
-
}]
|
|
1739
|
+
args: [{ selector: 'lpx-footer', imports: [RouterLink, AsyncPipe], template: "@if (footerValues$ | async; as footerValues) {\r\n <div class=\"lpx-footbar\">\r\n <div class=\"lpx-footbar-copyright\">\r\n @if (footerValues.descUrl) {\r\n <a [routerLink]=\"[footerValues.descUrl]\"> {{ footerValues.desc }}</a>\r\n } @else {\r\n <a> {{ footerValues.desc }}</a>\r\n }\r\n </div>\r\n <div class=\"lpx-footbar-solo-links\">\r\n @for (footerLink of footerValues.footerLinks; track $index) {\r\n @if (footerLink) {\r\n <a [routerLink]=\"[footerLink.link]\">{{ footerLink.text }}</a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n}\r\n" }]
|
|
1740
|
+
}] });
|
|
1777
1741
|
|
|
1778
1742
|
class LpxFooterModule {
|
|
1779
1743
|
static forRoot() {
|
|
@@ -1782,256 +1746,308 @@ class LpxFooterModule {
|
|
|
1782
1746
|
providers: [],
|
|
1783
1747
|
};
|
|
1784
1748
|
}
|
|
1785
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1786
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1787
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1749
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1750
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxFooterModule, imports: [CommonModule, RouterModule, FooterComponent], exports: [FooterComponent] }); }
|
|
1751
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxFooterModule, imports: [CommonModule, RouterModule] }); }
|
|
1788
1752
|
}
|
|
1789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxFooterModule, decorators: [{
|
|
1790
1754
|
type: NgModule,
|
|
1791
1755
|
args: [{
|
|
1792
|
-
declarations: [FooterComponent],
|
|
1793
1756
|
exports: [FooterComponent],
|
|
1794
|
-
imports: [CommonModule, RouterModule],
|
|
1757
|
+
imports: [CommonModule, RouterModule, FooterComponent],
|
|
1795
1758
|
}]
|
|
1796
1759
|
}] });
|
|
1797
1760
|
|
|
1798
|
-
var
|
|
1799
|
-
(function (
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1761
|
+
var LpxCoreFeatureKind;
|
|
1762
|
+
(function (LpxCoreFeatureKind) {
|
|
1763
|
+
LpxCoreFeatureKind[LpxCoreFeatureKind["Options"] = 0] = "Options";
|
|
1764
|
+
LpxCoreFeatureKind[LpxCoreFeatureKind["Icon"] = 1] = "Icon";
|
|
1765
|
+
LpxCoreFeatureKind[LpxCoreFeatureKind["Language"] = 2] = "Language";
|
|
1766
|
+
LpxCoreFeatureKind[LpxCoreFeatureKind["Navbar"] = 3] = "Navbar";
|
|
1767
|
+
LpxCoreFeatureKind[LpxCoreFeatureKind["NavbarChild"] = 4] = "NavbarChild";
|
|
1768
|
+
LpxCoreFeatureKind[LpxCoreFeatureKind["SkipDefaults"] = 5] = "SkipDefaults";
|
|
1769
|
+
})(LpxCoreFeatureKind || (LpxCoreFeatureKind = {}));
|
|
1770
|
+
function makeLpxCoreFeature(kind, providers) {
|
|
1803
1771
|
return {
|
|
1804
1772
|
ɵkind: kind,
|
|
1805
1773
|
ɵproviders: providers,
|
|
1806
1774
|
};
|
|
1807
1775
|
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
return
|
|
1776
|
+
const SKIP_DEFAULTS = makeLpxCoreFeature(LpxCoreFeatureKind.SkipDefaults, []);
|
|
1777
|
+
function withIcon(iconSettings = {}) {
|
|
1778
|
+
return makeLpxCoreFeature(LpxCoreFeatureKind.Icon, [
|
|
1811
1779
|
{
|
|
1812
|
-
provide:
|
|
1813
|
-
useValue:
|
|
1780
|
+
provide: LEPTON_X_ICON_SET,
|
|
1781
|
+
useValue: iconSettings.iconSet || ICON_MAP,
|
|
1814
1782
|
},
|
|
1783
|
+
]);
|
|
1784
|
+
}
|
|
1785
|
+
function withLanguage(languageOptions = {}) {
|
|
1786
|
+
return makeLpxCoreFeature(LpxCoreFeatureKind.Language, [
|
|
1815
1787
|
{
|
|
1816
|
-
provide:
|
|
1817
|
-
useValue:
|
|
1788
|
+
provide: LPX_LANGUAGE,
|
|
1789
|
+
useValue: languageOptions.languages || [],
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
provide: LPX_TRANSLATE_TOKEN,
|
|
1793
|
+
useValue: [LanguageTranslateDefaults],
|
|
1794
|
+
multi: true,
|
|
1818
1795
|
},
|
|
1796
|
+
LanguageService,
|
|
1819
1797
|
]);
|
|
1820
1798
|
}
|
|
1821
|
-
function
|
|
1799
|
+
function withNavbar(navbarOptions = {}) {
|
|
1800
|
+
const { menuItems, contentBeforeRoutes, contentAfterRoutes } = navbarOptions;
|
|
1801
|
+
return makeLpxCoreFeature(LpxCoreFeatureKind.Navbar, [
|
|
1802
|
+
{
|
|
1803
|
+
provide: LPX_MENU_ITEMS,
|
|
1804
|
+
useValue: menuItems || [],
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
provide: CONTENT_AFTER_ROUTES,
|
|
1808
|
+
useValue: contentAfterRoutes || [],
|
|
1809
|
+
multi: true,
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
provide: CONTENT_BEFORE_ROUTES,
|
|
1813
|
+
useValue: contentBeforeRoutes || [],
|
|
1814
|
+
multi: true,
|
|
1815
|
+
},
|
|
1816
|
+
]);
|
|
1817
|
+
}
|
|
1818
|
+
function withNavbarChild(navbarChildOptions = {}) {
|
|
1819
|
+
return makeLpxCoreFeature(LpxCoreFeatureKind.NavbarChild, [
|
|
1820
|
+
{
|
|
1821
|
+
provide: CONTENT_AFTER_ROUTES,
|
|
1822
|
+
useValue: navbarChildOptions.contentAfterRoutes || [],
|
|
1823
|
+
multi: true,
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
provide: CONTENT_BEFORE_ROUTES,
|
|
1827
|
+
useValue: navbarChildOptions.contentBeforeRoutes || [],
|
|
1828
|
+
multi: true,
|
|
1829
|
+
},
|
|
1830
|
+
]);
|
|
1831
|
+
}
|
|
1832
|
+
function withLpxCoreOptions(options = {}) {
|
|
1833
|
+
const { responsiveSettings, window, iconSettings, languageSettings, navbarSettings, listenDirectionChanges, } = options;
|
|
1834
|
+
const iconOptions = withIcon(iconSettings);
|
|
1835
|
+
const languageOptions = withLanguage(languageSettings);
|
|
1836
|
+
const navbarOptions = withNavbar(navbarSettings);
|
|
1837
|
+
return [
|
|
1838
|
+
iconOptions,
|
|
1839
|
+
languageOptions,
|
|
1840
|
+
navbarOptions,
|
|
1841
|
+
makeLpxCoreFeature(LpxCoreFeatureKind.Options, [
|
|
1842
|
+
createDirectionProvider(listenDirectionChanges || true),
|
|
1843
|
+
createResponsiveProvider(responsiveSettings),
|
|
1844
|
+
createWindowProvider(window),
|
|
1845
|
+
]),
|
|
1846
|
+
];
|
|
1847
|
+
}
|
|
1848
|
+
function provideLpxBreadcrumb() {
|
|
1849
|
+
return provideAppInitializer(() => {
|
|
1850
|
+
const breadcrumb = inject(BreadcrumbRouteListenerService);
|
|
1851
|
+
breadcrumb.subscribeRoute();
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
function provideLpxCore(...features) {
|
|
1822
1855
|
const providers = [];
|
|
1856
|
+
const skipDefaults = features.some((feature) => feature.ɵkind === LpxCoreFeatureKind.SkipDefaults);
|
|
1857
|
+
if (!skipDefaults) {
|
|
1858
|
+
providers.push(provideLpxBreadcrumb(), ...LPX_STYLE_PROVIDERS, ...LPX_TRANSLATE_PROVIDERS);
|
|
1859
|
+
}
|
|
1823
1860
|
features.forEach(({ ɵproviders }) => providers.push(...ɵproviders));
|
|
1824
1861
|
return makeEnvironmentProviders(providers);
|
|
1825
1862
|
}
|
|
1826
1863
|
|
|
1864
|
+
class LpxCoreModule {
|
|
1865
|
+
/**
|
|
1866
|
+
* @deprecated `LpxCoreModule.forRoot()` is deprecated. You can use `provideLpxCore` **function** instead.
|
|
1867
|
+
*/
|
|
1868
|
+
static forRoot(options) {
|
|
1869
|
+
return {
|
|
1870
|
+
ngModule: LpxCoreModule,
|
|
1871
|
+
providers: [provideLpxCore(...withLpxCoreOptions(options))],
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1875
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LpxCoreModule, imports: [CommonModule, LpxVisibleDirective] }); }
|
|
1876
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxCoreModule, imports: [CommonModule] }); }
|
|
1877
|
+
}
|
|
1878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LpxCoreModule, decorators: [{
|
|
1879
|
+
type: NgModule,
|
|
1880
|
+
args: [{
|
|
1881
|
+
imports: [CommonModule, LpxVisibleDirective],
|
|
1882
|
+
}]
|
|
1883
|
+
}] });
|
|
1884
|
+
|
|
1827
1885
|
class BreadcrumbPanelDirective {
|
|
1828
1886
|
constructor(template) {
|
|
1829
1887
|
this.template = template;
|
|
1830
1888
|
}
|
|
1831
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1832
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1889
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1890
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: BreadcrumbPanelDirective, isStandalone: true, selector: "ng-template[lpx-breadcrumb-panel]", ngImport: i0 }); }
|
|
1833
1891
|
}
|
|
1834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1892
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: BreadcrumbPanelDirective, decorators: [{
|
|
1835
1893
|
type: Directive,
|
|
1836
|
-
args: [{
|
|
1837
|
-
standalone: false,
|
|
1838
|
-
selector: 'ng-template[lpx-breadcrumb-panel]',
|
|
1839
|
-
}]
|
|
1894
|
+
args: [{ selector: 'ng-template[lpx-breadcrumb-panel]' }]
|
|
1840
1895
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1841
1896
|
|
|
1842
1897
|
class ContentPanelDirective {
|
|
1843
1898
|
constructor(template) {
|
|
1844
1899
|
this.template = template;
|
|
1845
1900
|
}
|
|
1846
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1847
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1901
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ContentPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1902
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: ContentPanelDirective, isStandalone: true, selector: "ng-template[lpx-content]", ngImport: i0 }); }
|
|
1848
1903
|
}
|
|
1849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ContentPanelDirective, decorators: [{
|
|
1850
1905
|
type: Directive,
|
|
1851
|
-
args: [{
|
|
1852
|
-
standalone: false,
|
|
1853
|
-
selector: 'ng-template[lpx-content]',
|
|
1854
|
-
}]
|
|
1906
|
+
args: [{ selector: 'ng-template[lpx-content]' }]
|
|
1855
1907
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1856
1908
|
|
|
1857
1909
|
class CurrentUserImagePanelDirective {
|
|
1858
1910
|
constructor(template) {
|
|
1859
1911
|
this.template = template;
|
|
1860
1912
|
}
|
|
1861
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1862
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1913
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: CurrentUserImagePanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1914
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: CurrentUserImagePanelDirective, isStandalone: true, selector: "ng-template[lpx-current-user-image-panel]", ngImport: i0 }); }
|
|
1863
1915
|
}
|
|
1864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: CurrentUserImagePanelDirective, decorators: [{
|
|
1865
1917
|
type: Directive,
|
|
1866
|
-
args: [{
|
|
1867
|
-
standalone: false,
|
|
1868
|
-
selector: 'ng-template[lpx-current-user-image-panel]',
|
|
1869
|
-
}]
|
|
1918
|
+
args: [{ selector: 'ng-template[lpx-current-user-image-panel]' }]
|
|
1870
1919
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1871
1920
|
|
|
1872
1921
|
class CurrentUserPanelDirective {
|
|
1873
1922
|
constructor(template) {
|
|
1874
1923
|
this.template = template;
|
|
1875
1924
|
}
|
|
1876
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1877
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1925
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: CurrentUserPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1926
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: CurrentUserPanelDirective, isStandalone: true, selector: "ng-template[lpx-current-user-panel]", ngImport: i0 }); }
|
|
1878
1927
|
}
|
|
1879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: CurrentUserPanelDirective, decorators: [{
|
|
1880
1929
|
type: Directive,
|
|
1881
|
-
args: [{
|
|
1882
|
-
standalone: false,
|
|
1883
|
-
selector: 'ng-template[lpx-current-user-panel]',
|
|
1884
|
-
}]
|
|
1930
|
+
args: [{ selector: 'ng-template[lpx-current-user-panel]' }]
|
|
1885
1931
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1886
1932
|
|
|
1887
1933
|
class FooterPanelDirective {
|
|
1888
1934
|
constructor(template) {
|
|
1889
1935
|
this.template = template;
|
|
1890
1936
|
}
|
|
1891
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1892
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1937
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1938
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: FooterPanelDirective, isStandalone: true, selector: "ng-template[lpx-footer-panel]", ngImport: i0 }); }
|
|
1893
1939
|
}
|
|
1894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: FooterPanelDirective, decorators: [{
|
|
1895
1941
|
type: Directive,
|
|
1896
|
-
args: [{
|
|
1897
|
-
standalone: false,
|
|
1898
|
-
selector: 'ng-template[lpx-footer-panel]',
|
|
1899
|
-
}]
|
|
1942
|
+
args: [{ selector: 'ng-template[lpx-footer-panel]' }]
|
|
1900
1943
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1901
1944
|
|
|
1902
1945
|
class LanguagePanelDirective {
|
|
1903
1946
|
constructor(template) {
|
|
1904
1947
|
this.template = template;
|
|
1905
1948
|
}
|
|
1906
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1907
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1949
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LanguagePanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1950
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: LanguagePanelDirective, isStandalone: true, selector: "ng-template[lpx-language-panel]", ngImport: i0 }); }
|
|
1908
1951
|
}
|
|
1909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LanguagePanelDirective, decorators: [{
|
|
1910
1953
|
type: Directive,
|
|
1911
|
-
args: [{
|
|
1912
|
-
standalone: false,
|
|
1913
|
-
selector: 'ng-template[lpx-language-panel]',
|
|
1914
|
-
}]
|
|
1954
|
+
args: [{ selector: 'ng-template[lpx-language-panel]', }]
|
|
1915
1955
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1916
1956
|
|
|
1917
1957
|
class MobileNavbarPanelDirective {
|
|
1918
1958
|
constructor(template) {
|
|
1919
1959
|
this.template = template;
|
|
1920
1960
|
}
|
|
1921
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1922
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1961
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: MobileNavbarPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1962
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: MobileNavbarPanelDirective, isStandalone: true, selector: "ng-template[lpx-mobile-navbar-panel]", ngImport: i0 }); }
|
|
1923
1963
|
}
|
|
1924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: MobileNavbarPanelDirective, decorators: [{
|
|
1925
1965
|
type: Directive,
|
|
1926
|
-
args: [{
|
|
1927
|
-
standalone: false,
|
|
1928
|
-
selector: 'ng-template[lpx-mobile-navbar-panel]',
|
|
1929
|
-
}]
|
|
1966
|
+
args: [{ selector: 'ng-template[lpx-mobile-navbar-panel]', }]
|
|
1930
1967
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1931
1968
|
|
|
1932
1969
|
class MobileNavbarSettingsPanelDirective {
|
|
1933
1970
|
constructor(template) {
|
|
1934
1971
|
this.template = template;
|
|
1935
1972
|
}
|
|
1936
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1937
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1973
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: MobileNavbarSettingsPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1974
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: MobileNavbarSettingsPanelDirective, isStandalone: true, selector: "ng-template[lpx-mobile-navbar-settings-panel]", ngImport: i0 }); }
|
|
1938
1975
|
}
|
|
1939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1976
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: MobileNavbarSettingsPanelDirective, decorators: [{
|
|
1940
1977
|
type: Directive,
|
|
1941
|
-
args: [{
|
|
1942
|
-
standalone: false,
|
|
1943
|
-
selector: 'ng-template[lpx-mobile-navbar-settings-panel]',
|
|
1944
|
-
}]
|
|
1978
|
+
args: [{ selector: 'ng-template[lpx-mobile-navbar-settings-panel]', }]
|
|
1945
1979
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1946
1980
|
|
|
1947
1981
|
class MobileNavbarProfilePanelDirective {
|
|
1948
1982
|
constructor(template) {
|
|
1949
1983
|
this.template = template;
|
|
1950
1984
|
}
|
|
1951
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1952
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1985
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: MobileNavbarProfilePanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1986
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: MobileNavbarProfilePanelDirective, isStandalone: true, selector: "ng-template[lpx-mobile-navbar-profile-panel]", ngImport: i0 }); }
|
|
1953
1987
|
}
|
|
1954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: MobileNavbarProfilePanelDirective, decorators: [{
|
|
1955
1989
|
type: Directive,
|
|
1956
|
-
args: [{
|
|
1957
|
-
standalone: false,
|
|
1958
|
-
selector: 'ng-template[lpx-mobile-navbar-profile-panel]',
|
|
1959
|
-
}]
|
|
1990
|
+
args: [{ selector: 'ng-template[lpx-mobile-navbar-profile-panel]', }]
|
|
1960
1991
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1961
1992
|
|
|
1962
1993
|
class NavbarPanelDirective {
|
|
1963
1994
|
constructor(template) {
|
|
1964
1995
|
this.template = template;
|
|
1965
1996
|
}
|
|
1966
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1967
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1997
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1998
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: NavbarPanelDirective, isStandalone: true, selector: "ng-template[lpx-navbar-panel]", ngImport: i0 }); }
|
|
1968
1999
|
}
|
|
1969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavbarPanelDirective, decorators: [{
|
|
1970
2001
|
type: Directive,
|
|
1971
|
-
args: [{
|
|
1972
|
-
standalone: false,
|
|
1973
|
-
selector: 'ng-template[lpx-navbar-panel]',
|
|
1974
|
-
}]
|
|
2002
|
+
args: [{ selector: 'ng-template[lpx-navbar-panel]', }]
|
|
1975
2003
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1976
2004
|
|
|
1977
2005
|
class NavitemPanelDirective {
|
|
1978
2006
|
constructor(template) {
|
|
1979
2007
|
this.template = template;
|
|
1980
2008
|
}
|
|
1981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1982
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2009
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavitemPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2010
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: NavitemPanelDirective, isStandalone: true, selector: "ng-template[lpx-navitem-panel]", ngImport: i0 }); }
|
|
1983
2011
|
}
|
|
1984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: NavitemPanelDirective, decorators: [{
|
|
1985
2013
|
type: Directive,
|
|
1986
|
-
args: [{
|
|
1987
|
-
standalone: false,
|
|
1988
|
-
selector: 'ng-template[lpx-navitem-panel]',
|
|
1989
|
-
}]
|
|
2014
|
+
args: [{ selector: 'ng-template[lpx-navitem-panel]', }]
|
|
1990
2015
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1991
2016
|
|
|
1992
2017
|
class ToolbarPanelDirective {
|
|
1993
2018
|
constructor(template) {
|
|
1994
2019
|
this.template = template;
|
|
1995
2020
|
}
|
|
1996
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1997
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2021
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToolbarPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2022
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: ToolbarPanelDirective, isStandalone: true, selector: "ng-template[lpx-toolbar-panel]", ngImport: i0 }); }
|
|
1998
2023
|
}
|
|
1999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToolbarPanelDirective, decorators: [{
|
|
2000
2025
|
type: Directive,
|
|
2001
|
-
args: [{
|
|
2002
|
-
standalone: false,
|
|
2003
|
-
selector: 'ng-template[lpx-toolbar-panel]',
|
|
2004
|
-
}]
|
|
2026
|
+
args: [{ selector: 'ng-template[lpx-toolbar-panel]', }]
|
|
2005
2027
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
2006
2028
|
|
|
2007
2029
|
class TopNavbarPanelDirective {
|
|
2008
2030
|
constructor(template) {
|
|
2009
2031
|
this.template = template;
|
|
2010
2032
|
}
|
|
2011
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2012
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TopNavbarPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2034
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: TopNavbarPanelDirective, isStandalone: true, selector: "ng-template[lpx-top-navbar-panel]", ngImport: i0 }); }
|
|
2013
2035
|
}
|
|
2014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TopNavbarPanelDirective, decorators: [{
|
|
2015
2037
|
type: Directive,
|
|
2016
|
-
args: [{
|
|
2017
|
-
standalone: false,
|
|
2018
|
-
selector: 'ng-template[lpx-top-navbar-panel]',
|
|
2019
|
-
}]
|
|
2038
|
+
args: [{ selector: 'ng-template[lpx-top-navbar-panel]', }]
|
|
2020
2039
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
2021
2040
|
|
|
2022
2041
|
class SettingsPanelDirective {
|
|
2023
2042
|
constructor(template) {
|
|
2024
2043
|
this.template = template;
|
|
2025
2044
|
}
|
|
2026
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2027
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2045
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SettingsPanelDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2046
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.7", type: SettingsPanelDirective, isStandalone: true, selector: "ng-template[lpx-settings-panel]", ngImport: i0 }); }
|
|
2028
2047
|
}
|
|
2029
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SettingsPanelDirective, decorators: [{
|
|
2030
2049
|
type: Directive,
|
|
2031
|
-
args: [{
|
|
2032
|
-
standalone: false,
|
|
2033
|
-
selector: 'ng-template[lpx-settings-panel]',
|
|
2034
|
-
}]
|
|
2050
|
+
args: [{ selector: 'ng-template[lpx-settings-panel]', }]
|
|
2035
2051
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
2036
2052
|
|
|
2037
2053
|
const declarationsAndExports = [
|
|
@@ -2052,8 +2068,8 @@ const declarationsAndExports = [
|
|
|
2052
2068
|
ToolbarPanelDirective,
|
|
2053
2069
|
];
|
|
2054
2070
|
class PanelsModule {
|
|
2055
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2056
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2071
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PanelsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2072
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: PanelsModule, imports: [CommonModule, BreadcrumbPanelDirective,
|
|
2057
2073
|
ContentPanelDirective,
|
|
2058
2074
|
CurrentUserImagePanelDirective,
|
|
2059
2075
|
CurrentUserPanelDirective,
|
|
@@ -2067,7 +2083,7 @@ class PanelsModule {
|
|
|
2067
2083
|
NavitemPanelDirective,
|
|
2068
2084
|
SettingsPanelDirective,
|
|
2069
2085
|
TopNavbarPanelDirective,
|
|
2070
|
-
ToolbarPanelDirective],
|
|
2086
|
+
ToolbarPanelDirective], exports: [BreadcrumbPanelDirective,
|
|
2071
2087
|
ContentPanelDirective,
|
|
2072
2088
|
CurrentUserImagePanelDirective,
|
|
2073
2089
|
CurrentUserPanelDirective,
|
|
@@ -2082,13 +2098,12 @@ class PanelsModule {
|
|
|
2082
2098
|
SettingsPanelDirective,
|
|
2083
2099
|
TopNavbarPanelDirective,
|
|
2084
2100
|
ToolbarPanelDirective] }); }
|
|
2085
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2101
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PanelsModule, imports: [CommonModule] }); }
|
|
2086
2102
|
}
|
|
2087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: PanelsModule, decorators: [{
|
|
2088
2104
|
type: NgModule,
|
|
2089
2105
|
args: [{
|
|
2090
|
-
|
|
2091
|
-
imports: [CommonModule],
|
|
2106
|
+
imports: [CommonModule, ...declarationsAndExports],
|
|
2092
2107
|
exports: [...declarationsAndExports],
|
|
2093
2108
|
}]
|
|
2094
2109
|
}] });
|
|
@@ -2123,10 +2138,10 @@ class ToolbarService {
|
|
|
2123
2138
|
const updateItems = [...items.slice(0, index), ...items.slice(index + 1)];
|
|
2124
2139
|
this.store.patch({ items: updateItems });
|
|
2125
2140
|
}
|
|
2126
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2127
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2142
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToolbarService, providedIn: 'root' }); }
|
|
2128
2143
|
}
|
|
2129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ToolbarService, decorators: [{
|
|
2130
2145
|
type: Injectable,
|
|
2131
2146
|
args: [{ providedIn: 'root' }]
|
|
2132
2147
|
}] });
|
|
@@ -2135,5 +2150,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
2135
2150
|
* Generated bundle index. Do not edit.
|
|
2136
2151
|
*/
|
|
2137
2152
|
|
|
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,
|
|
2153
|
+
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_PROVIDERS, LPX_TRANSLATE_SERVICE_PROVIDER, LPX_TRANSLATE_SERVICE_TOKEN, LPX_TRANSLATE_TOKEN, LanguagePanelDirective, LanguageService, LanguageTranslateDefaults, LanguageTranslateKeys, LayoutService, Layouts, LogoPanelDirective, LpxAvatarModule, LpxBrandLogoModule, LpxBreadcrumbModule, LpxClickOutsideModule, LpxCoreFeatureKind, 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, SKIP_DEFAULTS, SafeHtmlPipe, SettingsPanelDirective, StyleService, SubNavbarComponent, ToObservableModule, ToObservablePipe, ToolbarPanelDirective, ToolbarService, TopNavbarPanelDirective, TranslatePipe, UserProfileService, WINDOW, createDirectionProvider, createGroupMap, createResponsiveProvider, createStyleFactory, createWindowProvider, exportedDeclarations$1 as exportedDeclarations, flatArrayDeepToObject, getItemsFromGroup, getStream$, isArray, isNullOrUndefined, listenDirectionChange, loadInitialStyles, provideLogo, provideLpxBreadcrumb, provideLpxCore, sortItems, styleLoadFactory, withEnvironmentOptions, withIcon, withLanguage, withLpxCoreOptions, withNavbar, withNavbarChild };
|
|
2139
2154
|
//# sourceMappingURL=volo-ngx-lepton-x.core.mjs.map
|