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