@mediusinc/mng-commons-layout 5.5.0 → 6.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/components/README.md +3 -0
  2. package/components/index.d.ts +10 -0
  3. package/{lib → components/lib}/components/footer.component.d.ts +1 -1
  4. package/{lib → components/lib}/components/main-layout.component.d.ts +1 -1
  5. package/{lib → components/lib}/components/menu-item.component.d.ts +2 -2
  6. package/{lib → components/lib}/components/menu.component.d.ts +1 -1
  7. package/{lib → components/lib}/components/settings.component.d.ts +1 -2
  8. package/{lib → components/lib}/components/sidebar.component.d.ts +1 -1
  9. package/{lib → components/lib}/components/topbar.component.d.ts +2 -2
  10. package/components/pages/error/README.md +3 -0
  11. package/components/pages/error/index.d.ts +2 -0
  12. package/{lib/components/pages/error → components/pages/error/lib}/error.page.component.d.ts +1 -1
  13. package/components/pages/main/README.md +3 -0
  14. package/components/pages/main/index.d.ts +2 -0
  15. package/components/pages/main/lazy/README.md +3 -0
  16. package/components/pages/main/lazy/index.d.ts +1 -0
  17. package/components/pages/main/lazy/lib/route-builder.d.ts +8 -0
  18. package/components/pages/main/lib/main-layout.component.d.ts +23 -0
  19. package/components/pages/not-found/README.md +3 -0
  20. package/components/pages/not-found/index.d.ts +2 -0
  21. package/{lib/components/pages/not-found → components/pages/not-found/lib}/not-found.page.component.d.ts +1 -1
  22. package/esm2022/components/index.mjs +12 -0
  23. package/esm2022/components/lib/components/breadcrumb.component.mjs +29 -0
  24. package/esm2022/components/lib/components/footer.component.mjs +23 -0
  25. package/esm2022/components/lib/components/main-layout.component.mjs +86 -0
  26. package/esm2022/components/lib/components/menu-item.component.mjs +169 -0
  27. package/esm2022/components/lib/components/menu.component.mjs +36 -0
  28. package/esm2022/components/lib/components/settings.component.mjs +87 -0
  29. package/esm2022/components/lib/components/sidebar.component.mjs +51 -0
  30. package/esm2022/components/lib/components/topbar-user.component.mjs +51 -0
  31. package/esm2022/components/lib/components/topbar.component.mjs +37 -0
  32. package/esm2022/components/lib/components/version.component.mjs +95 -0
  33. package/esm2022/components/mediusinc-mng-commons-layout-components.mjs +5 -0
  34. package/esm2022/components/pages/error/index.mjs +3 -0
  35. package/esm2022/components/pages/error/lib/error.page.component.mjs +20 -0
  36. package/esm2022/components/pages/error/mediusinc-mng-commons-layout-components-pages-error.mjs +5 -0
  37. package/esm2022/components/pages/main/index.mjs +3 -0
  38. package/esm2022/components/pages/main/lazy/index.mjs +2 -0
  39. package/esm2022/components/pages/main/lazy/lib/route-builder.mjs +11 -0
  40. package/esm2022/components/pages/main/lazy/mediusinc-mng-commons-layout-components-pages-main-lazy.mjs +5 -0
  41. package/esm2022/components/pages/main/lib/main-layout.component.mjs +84 -0
  42. package/esm2022/components/pages/main/lib/route-builder.mjs +12 -0
  43. package/esm2022/components/pages/main/mediusinc-mng-commons-layout-components-pages-main.mjs +5 -0
  44. package/esm2022/components/pages/not-found/index.mjs +3 -0
  45. package/esm2022/components/pages/not-found/lib/not-found.page.component.mjs +20 -0
  46. package/esm2022/components/pages/not-found/mediusinc-mng-commons-layout-components-pages-not-found.mjs +5 -0
  47. package/esm2022/index.mjs +2 -15
  48. package/esm2022/lib/helpers/menu-items.mjs +5 -2
  49. package/esm2022/lib/services/layout-feature-config.token.mjs +1 -1
  50. package/esm2022/lib/services/layout.service.mjs +6 -14
  51. package/fesm2022/mediusinc-mng-commons-layout-components-pages-error.mjs +25 -0
  52. package/fesm2022/mediusinc-mng-commons-layout-components-pages-error.mjs.map +1 -0
  53. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main-lazy.mjs +18 -0
  54. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main-lazy.mjs.map +1 -0
  55. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main.mjs +101 -0
  56. package/fesm2022/mediusinc-mng-commons-layout-components-pages-main.mjs.map +1 -0
  57. package/fesm2022/mediusinc-mng-commons-layout-components-pages-not-found.mjs +25 -0
  58. package/fesm2022/mediusinc-mng-commons-layout-components-pages-not-found.mjs.map +1 -0
  59. package/fesm2022/mediusinc-mng-commons-layout-components.mjs +600 -0
  60. package/fesm2022/mediusinc-mng-commons-layout-components.mjs.map +1 -0
  61. package/fesm2022/mediusinc-mng-commons-layout.mjs +74 -696
  62. package/fesm2022/mediusinc-mng-commons-layout.mjs.map +1 -1
  63. package/index.d.ts +1 -13
  64. package/lib/helpers/menu-items.d.ts +3 -0
  65. package/lib/services/layout-feature-config.token.d.ts +2 -2
  66. package/lib/services/layout.service.d.ts +2 -2
  67. package/package.json +32 -2
  68. package/version-info.json +6 -6
  69. package/esm2022/lib/components/breadcrumb.component.mjs +0 -29
  70. package/esm2022/lib/components/footer.component.mjs +0 -25
  71. package/esm2022/lib/components/main-layout.component.mjs +0 -88
  72. package/esm2022/lib/components/menu-item.component.mjs +0 -170
  73. package/esm2022/lib/components/menu.component.mjs +0 -38
  74. package/esm2022/lib/components/pages/error/error.page.component.mjs +0 -20
  75. package/esm2022/lib/components/pages/not-found/not-found.page.component.mjs +0 -20
  76. package/esm2022/lib/components/settings.component.mjs +0 -87
  77. package/esm2022/lib/components/sidebar.component.mjs +0 -52
  78. package/esm2022/lib/components/topbar-user.component.mjs +0 -52
  79. package/esm2022/lib/components/topbar.component.mjs +0 -39
  80. package/esm2022/lib/components/version.component.mjs +0 -96
  81. package/esm2022/lib/helpers/route-builder.mjs +0 -12
  82. /package/{lib → components/lib}/components/breadcrumb.component.d.ts +0 -0
  83. /package/{lib → components/lib}/components/topbar-user.component.d.ts +0 -0
  84. /package/{lib → components/lib}/components/version.component.d.ts +0 -0
  85. /package/{lib/helpers → components/pages/main/lib}/route-builder.d.ts +0 -0
@@ -1,35 +1,41 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, PLATFORM_ID, signal, computed, afterNextRender, effect, Injectable, Component, ChangeDetectionStrategy, DestroyRef, input, output, viewChild, untracked, ElementRef, Injector, Renderer2 } from '@angular/core';
3
- import * as i1$4 from '@angular/router';
4
- import { RouterLink, Router, NavigationEnd, RouterModule, ActivatedRoute } from '@angular/router';
5
- import * as i1$1 from '@ngx-translate/core';
6
- import { TranslateModule, TranslateService } from '@ngx-translate/core';
7
- import * as i1 from 'primeng/button';
8
- import { ButtonModule, Button } from 'primeng/button';
9
- import { DOCUMENT, AsyncPipe, NgOptimizedImage, NgClass, NgTemplateOutlet } from '@angular/common';
10
- import { Subject, ReplaySubject, catchError, of, switchMap, take, startWith, distinctUntilChanged } from 'rxjs';
2
+ import { signal, computed, InjectionToken, inject, PLATFORM_ID, afterNextRender, effect, Injectable, DestroyRef } from '@angular/core';
3
+ import { DOCUMENT } from '@angular/common';
4
+ import { Subject, ReplaySubject, startWith, take } from 'rxjs';
11
5
  import * as i2 from '@mediusinc/mng-commons/core';
12
- import { COMMONS_MODULE_CONFIG_IT, CommonsStorageService, LoggerService, CommonsConfigurationService, JsonPathPipe, CommonsService, ComponentDirective, CommonsRouterService, adjustRouteMenuLazyChildrenRouterLinks, doesUrlMatchRouterLink, PermissionService, toObservable as toObservable$1, EnumerateAsyncPipe, NotificationWrapperComponent, createRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
13
- import { toObservable, takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
14
- import { map, filter } from 'rxjs/operators';
15
- import * as i1$2 from '@angular/common/http';
16
- import * as i3 from '@angular/forms';
17
- import { FormsModule } from '@angular/forms';
18
- import * as i4 from 'primeng/dropdown';
19
- import { DropdownModule } from 'primeng/dropdown';
20
- import * as i1$3 from 'primeng/ripple';
21
- import { RippleModule } from 'primeng/ripple';
22
- import * as i3$1 from 'primeng/styleclass';
23
- import { StyleClassModule } from 'primeng/styleclass';
24
- import { trigger, state, style, transition, animate } from '@angular/animations';
25
- import { TooltipModule } from 'primeng/tooltip';
26
- import { DomSanitizer } from '@angular/platform-browser';
27
- import { DynamicDialogConfig, DynamicDialogRef, DialogService } from 'primeng/dynamicdialog';
28
- import { InputSwitchModule } from 'primeng/inputswitch';
29
- import * as i2$1 from 'primeng/radiobutton';
30
- import { RadioButtonModule } from 'primeng/radiobutton';
31
- import * as i5 from 'primeng/selectbutton';
32
- import { SelectButtonModule } from 'primeng/selectbutton';
6
+ import { COMMONS_MODULE_CONFIG_IT, CommonsStorageService, LoggerService, CommonsRouterService, adjustRouteMenuLazyChildrenRouterLinks, doesUrlMatchRouterLink, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
7
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
+ import { Router, NavigationEnd } from '@angular/router';
9
+ import { filter, map } from 'rxjs/operators';
10
+ import * as i1 from '@angular/common/http';
11
+
12
+ /**
13
+ * @internal
14
+ */
15
+ function prepareMenuItemsToInternal(menuItems, parentKey = '') {
16
+ const newItems = menuItems.map((item, idx) => {
17
+ const itemsProp = signal([]);
18
+ const lazyChildrenProp = signal(item.lazyChildren ?? false);
19
+ const hasItemsProp = computed(() => itemsProp().length > 0);
20
+ const newItem = {
21
+ ...item,
22
+ isVisible: item.isVisible,
23
+ key: parentKey ? parentKey + '-' + idx : idx.toString(),
24
+ config: item,
25
+ items: itemsProp,
26
+ lazyChildren: lazyChildrenProp,
27
+ itemsVisibility: signal([]),
28
+ hasItems: hasItemsProp,
29
+ hasItemsOrLazyChildren: computed(() => lazyChildrenProp() || hasItemsProp())
30
+ };
31
+ if (Array.isArray(item.items) && item.items.length > 0) {
32
+ newItem.items.set(prepareMenuItemsToInternal(item.items, newItem.key));
33
+ newItem.itemsVisibility.set(newItem.items()?.map(() => signal(true)));
34
+ }
35
+ return newItem;
36
+ });
37
+ return newItems;
38
+ }
33
39
 
34
40
  const COMMONS_LAYOUT_FEATURE_CONFIG_IT = new InjectionToken('COMMONS_LAYOUT_FEATURE_CONFIG');
35
41
 
@@ -50,7 +56,7 @@ class LayoutService {
50
56
  }
51
57
  }
52
58
  getDefaultColorScheme() {
53
- return this.config?.colorScheme ?? this.commonsConfig?.app?.colorScheme ?? 'auto';
59
+ return this.config?.colorScheme ?? 'auto';
54
60
  }
55
61
  setColorScheme(scheme) {
56
62
  const defaultColorScheme = this.getDefaultColorScheme();
@@ -95,19 +101,11 @@ class LayoutService {
95
101
  this._menuMode = signal(this.initMenuMode());
96
102
  this.menuMode = this._menuMode.asReadonly();
97
103
  // logos
98
- this.appLogoLight = signal(this.config?.logoPathLight ?? this.commonsConfig?.app?.logoPathLight ?? this.config?.logoPath ?? this.commonsConfig?.app?.logoPath ?? 'assets/layout/images/logo.png');
99
- this.appLogoDark = signal(this.config?.logoPathLight ?? this.commonsConfig?.app?.logoPathDark ?? this.config?.logoPath ?? this.commonsConfig?.app?.logoPath ?? 'assets/layout/images/logo.png');
104
+ this.appLogoLight = signal(this.config?.logoPathLight ?? this.config?.logoPath ?? 'assets/layout/images/logo.png');
105
+ this.appLogoDark = signal(this.config?.logoPathLight ?? this.config?.logoPath ?? 'assets/layout/images/logo.png');
100
106
  this.appLogo = computed(() => (this.colorSchemeIsLight() ? this.appLogoLight() : this.appLogoDark()));
101
- this.appLogoNameLight = signal(this.config?.logoNamePathLight ??
102
- this.commonsConfig?.app?.logoNamePathLight ??
103
- this.config?.logoNamePath ??
104
- this.commonsConfig?.app?.logoNamePath ??
105
- 'assets/layout/images/logo-appname.png');
106
- this.appLogoNameDark = signal(this.config?.logoNamePathDark ??
107
- this.commonsConfig?.app?.logoNamePathDark ??
108
- this.config?.logoNamePath ??
109
- this.commonsConfig?.app?.logoNamePath ??
110
- 'assets/layout/images/logo-appname.png');
107
+ this.appLogoNameLight = signal(this.config?.logoNamePathLight ?? this.config?.logoNamePath ?? 'assets/layout/images/logo-appname.png');
108
+ this.appLogoNameDark = signal(this.config?.logoNamePathDark ?? this.config?.logoNamePath ?? 'assets/layout/images/logo-appname.png');
111
109
  this.appLogoName = computed(() => (this.colorSchemeIsLight() ? this.appLogoNameLight() : this.appLogoNameDark()));
112
110
  // overlays
113
111
  this.isOverlay = computed(() => this.menuMode() === 'overlay');
@@ -202,221 +200,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
202
200
  type: Injectable
203
201
  }], ctorParameters: () => [] });
204
202
 
205
- class ErrorPageComponent {
206
- constructor() {
207
- this.layout = inject(LayoutService);
208
- }
209
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
210
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: ErrorPageComponent, isStandalone: true, selector: "mng-error-page", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (layout.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"layout.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"layout.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
211
- }
212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ErrorPageComponent, decorators: [{
213
- type: Component,
214
- args: [{ standalone: true, selector: 'mng-error-page', imports: [ButtonModule, TranslateModule, RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'exception-body min-h-screen ' + (layout.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"layout.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"layout.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
215
- }] });
216
-
217
- class NotFoundPageComponent {
218
- constructor() {
219
- this.layout = inject(LayoutService);
220
- }
221
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: NotFoundPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
222
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: NotFoundPageComponent, isStandalone: true, selector: "mng-not-found-page", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (layout.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"layout.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"layout.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
223
- }
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: NotFoundPageComponent, decorators: [{
225
- type: Component,
226
- args: [{ standalone: true, selector: 'mng-not-found-page', imports: [ButtonModule, RouterLink, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'exception-body min-h-screen ' + (layout.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"layout.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"layout.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
227
- }] });
228
-
229
- class VersionService {
230
- constructor(http, configurationService) {
231
- this.http = http;
232
- this.configurationService = configurationService;
233
- this.logger = inject(LoggerService).create('VersionService');
234
- this.cache = {};
235
- }
236
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
237
- loadVersion(path, baseConfigKey, jsonPath = '$') {
238
- const urlSegments = [];
239
- if (baseConfigKey) {
240
- const baseUrl = this.configurationService.getConfigValue(baseConfigKey);
241
- urlSegments.push(baseUrl.endsWith('/') ? baseUrl.substring(0, baseUrl.length - 1) : baseUrl);
242
- }
243
- if (path) {
244
- urlSegments.push(!path.startsWith('/') ? `/${path}` : path);
245
- }
246
- const url = urlSegments.join('');
247
- if (!this.cache[url]) {
248
- this.cache[url] = new ReplaySubject(1);
249
- this.http.get(urlSegments.join('')).subscribe({
250
- next: res => {
251
- this.cache[url].next(res);
252
- },
253
- error: err => {
254
- this.logger.error('Version could not be retreived', err);
255
- }
256
- });
257
- }
258
- return this.cache[url].asObservable();
259
- }
260
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionService, deps: [{ token: i1$2.HttpClient }, { token: i2.CommonsConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable }); }
261
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionService }); }
262
- }
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionService, decorators: [{
264
- type: Injectable
265
- }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2.CommonsConfigurationService }] });
266
-
267
- class VersionComponent {
268
- constructor() {
269
- this.versionService = inject(VersionService);
270
- this.configService = inject(CommonsConfigurationService);
271
- this.destroyRef = inject(DestroyRef);
272
- this.jsonPathPipe = new JsonPathPipe();
273
- this.versionInput = input(undefined, { alias: 'version' });
274
- this.isLoading = signal(false);
275
- this.loadedVersion = signal(undefined);
276
- this.versionAsArray = computed(() => {
277
- if (Array.isArray(this.versionInput())) {
278
- return this.versionInput();
279
- }
280
- return undefined;
281
- });
282
- this.versionInfo = computed(() => {
283
- if (this.versionAsArray() !== undefined) {
284
- return undefined; // Each version will be processed separately in child component
285
- }
286
- const initVersion = this.versionInput();
287
- if (typeof initVersion === 'string') {
288
- return initVersion;
289
- }
290
- else if (typeof initVersion !== 'undefined' && !Array.isArray(initVersion)) {
291
- const source = initVersion.source;
292
- switch (source) {
293
- case 'config':
294
- return this.configService.getConfigValue(initVersion.configKey);
295
- case 'httpResource':
296
- return this.loadedVersion();
297
- case 'info':
298
- return initVersion.info;
299
- default:
300
- return initVersion;
301
- }
302
- }
303
- return undefined;
304
- });
305
- this.versionAsString = computed(() => {
306
- const versionInfo = this.versionInfo();
307
- if (versionInfo == null) {
308
- return undefined;
309
- }
310
- else if (typeof versionInfo === 'string') {
311
- return versionInfo;
312
- }
313
- else {
314
- return versionInfo.raw;
315
- }
316
- });
317
- this.displayName = computed(() => this.versionInput()?.displayName);
318
- this.displayText = computed(() => `${this.displayName() ?? ''}${this.displayName() && this.versionAsString() ? ': ' : ''}${!this.isLoading() ? (this.versionAsString() ?? '') : ''}`);
319
- toObservable(this.versionInput)
320
- .pipe(catchError(() => of(undefined)), switchMap(version => {
321
- if (typeof version !== 'undefined' && !Array.isArray(version)) {
322
- const config = version;
323
- if (config.source === 'httpResource') {
324
- this.isLoading.set(true);
325
- const infoJsonPath = config.infoJsonPath;
326
- return this.versionService.loadVersion(config.urlPath, config.urlBaseConfigKey).pipe(take(1), map(res => ({ res, infoJsonPath })));
327
- }
328
- }
329
- return of({ res: undefined, infoJsonPath: undefined });
330
- }), takeUntilDestroyed(this.destroyRef))
331
- .subscribe({
332
- next: ({ res, infoJsonPath }) => {
333
- if (typeof res !== 'undefined') {
334
- this.loadedVersion.set(this.jsonPathPipe.transform(res, infoJsonPath ?? '$'));
335
- }
336
- else {
337
- this.loadedVersion.set(undefined);
338
- }
339
- this.isLoading.set(false);
340
- },
341
- error: () => {
342
- this.loadedVersion.set('');
343
- this.isLoading.set(false);
344
- }
345
- });
346
- }
347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: VersionComponent, isStandalone: true, selector: "mng-version", inputs: { versionInput: { classPropertyName: "versionInput", publicName: "version", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (versionAsArray()) {\n @for (v of versionAsArray(); track v; let last = $last) {\n <mng-version [version]=\"v\"></mng-version>\n @if (!last) {\n <br />\n }\n }\n} @else if (displayText()) {\n {{ displayText() }}\n}\n", dependencies: [{ kind: "component", type: VersionComponent, selector: "mng-version", inputs: ["version"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
349
- }
350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionComponent, decorators: [{
351
- type: Component,
352
- args: [{ standalone: true, selector: 'mng-version', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (versionAsArray()) {\n @for (v of versionAsArray(); track v; let last = $last) {\n <mng-version [version]=\"v\"></mng-version>\n @if (!last) {\n <br />\n }\n }\n} @else if (displayText()) {\n {{ displayText() }}\n}\n" }]
353
- }], ctorParameters: () => [] });
354
-
355
- class FooterComponent {
356
- constructor() {
357
- this.config = inject(COMMONS_LAYOUT_FEATURE_CONFIG_IT, { optional: true });
358
- this.layout = inject(LayoutService);
359
- this.commons = inject(CommonsService);
360
- this.currentYear = signal(new Date().getFullYear());
361
- this.versionComponent = signal(this.config?.components?.version === false ? undefined : (this.config?.components?.version ?? VersionComponent));
362
- }
363
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
364
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: FooterComponent, isStandalone: true, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"layout.appLogo()\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ commons.appName() | translate }}</span>\n </div>\n <div class=\"flex flex-column\">\n <div>\n <span class=\"copyright\">&#169; {{ commons.appOwner() | translate }} - {{ currentYear() }}</span>\n </div>\n @if (versionComponent()) {\n <div class=\"version\" [mngComponent]=\"versionComponent()\" [inputs]=\"{version: commons.appVersion()}\" [attachToHost]=\"true\"></div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
365
- }
366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: FooterComponent, decorators: [{
367
- type: Component,
368
- args: [{ standalone: true, selector: 'mng-footer', imports: [TranslateModule, NgOptimizedImage, VersionComponent, ComponentDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"layout.appLogo()\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ commons.appName() | translate }}</span>\n </div>\n <div class=\"flex flex-column\">\n <div>\n <span class=\"copyright\">&#169; {{ commons.appOwner() | translate }} - {{ currentYear() }}</span>\n </div>\n @if (versionComponent()) {\n <div class=\"version\" [mngComponent]=\"versionComponent()\" [inputs]=\"{version: commons.appVersion()}\" [attachToHost]=\"true\"></div>\n }\n </div>\n</div>\n" }]
369
- }] });
370
-
371
- class BreadcrumbComponent {
372
- constructor() {
373
- this.commons = inject(CommonsService);
374
- this.mappedBreadcrumbs = computed(() => {
375
- const items = this.commons.breadcrumbs();
376
- return items.map(el => this.mapMenuItem(el));
377
- });
378
- }
379
- mapMenuItem(item) {
380
- return {
381
- ...item,
382
- url: item.href,
383
- badgeStyleClass: item.badgeClassName,
384
- styleClass: item.className
385
- };
386
- }
387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
388
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: BreadcrumbComponent, isStandalone: true, selector: "mng-breadcrumb", ngImport: i0, template: "<div class=\"layout-breadcrumb flex align-items-center relative h-3rem\">\n <nav>\n <ol class=\"relative z-2\">\n @for (item of mappedBreadcrumbs(); track item.id; let last = $last) {\n <li>{{ item.label! | translate }}</li>\n @if (!last) {\n <li class=\"layout-breadcrumb-chevron\">/</li>\n }\n }\n </ol>\n </nav>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
389
- }
390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: BreadcrumbComponent, decorators: [{
391
- type: Component,
392
- args: [{ standalone: true, selector: 'mng-breadcrumb', imports: [TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-breadcrumb flex align-items-center relative h-3rem\">\n <nav>\n <ol class=\"relative z-2\">\n @for (item of mappedBreadcrumbs(); track item.id; let last = $last) {\n <li>{{ item.label! | translate }}</li>\n @if (!last) {\n <li class=\"layout-breadcrumb-chevron\">/</li>\n }\n }\n </ol>\n </nav>\n</div>\n" }]
393
- }] });
394
-
395
- function prepareMenuItemsToInternal(menuItems, parentKey = '') {
396
- const newItems = menuItems.map((item, idx) => {
397
- const itemsProp = signal([]);
398
- const lazyChildrenProp = signal(item.lazyChildren ?? false);
399
- const hasItemsProp = computed(() => itemsProp().length > 0);
400
- const newItem = {
401
- ...item,
402
- isVisible: typeof item.isVisible !== 'undefined' ? item.isVisible : item.visible,
403
- key: parentKey ? parentKey + '-' + idx : idx.toString(),
404
- config: item,
405
- items: itemsProp,
406
- lazyChildren: lazyChildrenProp,
407
- itemsVisibility: signal([]),
408
- hasItems: hasItemsProp,
409
- hasItemsOrLazyChildren: computed(() => lazyChildrenProp() || hasItemsProp())
410
- };
411
- if (Array.isArray(item.items) && item.items.length > 0) {
412
- newItem.items.set(prepareMenuItemsToInternal(item.items, newItem.key));
413
- newItem.itemsVisibility.set(newItem.items()?.map(() => signal(true)));
414
- }
415
- return newItem;
416
- });
417
- return newItems;
418
- }
419
-
420
203
  class MenuService {
421
204
  constructor() {
422
205
  this.destroyRef = inject(DestroyRef);
@@ -530,448 +313,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
530
313
  type: Injectable
531
314
  }] });
532
315
 
533
- class MenuItemComponent {
534
- constructor() {
535
- this.menuService = inject(MenuService);
536
- this.permissionService = inject(PermissionService);
537
- this.layout = inject(LayoutService);
538
- this.item = input.required();
539
- this.root = input(false);
540
- this.visibleChange = output();
541
- this.submenuElRef = viewChild('submenu');
542
- this.isPermitted = toSignal(toObservable(this.item).pipe(switchMap(i => (i.permissions ? this.permissionService.isMenuItemVisible(i.permissions, i.config) : of(true)))));
543
- this.isVisibleFromItemSettings = toSignal(toObservable(this.item).pipe(switchMap(i => (typeof i.isVisible === 'function' ? toObservable$1(i.isVisible(i.config)) : of(i.isVisible ?? true)))));
544
- this.menuChangeEvents = toSignal(this.menuService.menuChange$.pipe(distinctUntilChanged((v1, v2) => v1.key === v2.key)));
545
- this.active = computed(() => {
546
- if (!this.isPermitted()) {
547
- return false;
548
- }
549
- const menuChangeEvent = this.menuChangeEvents();
550
- if (menuChangeEvent) {
551
- return menuChangeEvent.eventType === 'reset' || !menuChangeEvent.key
552
- ? false
553
- : this.item().key === menuChangeEvent.key || menuChangeEvent.key.startsWith((this.item().key ?? '') + '-');
554
- }
555
- return false;
556
- });
557
- this.visible = computed(() => {
558
- const isPermitted = this.isPermitted();
559
- if (!isPermitted) {
560
- return false;
561
- }
562
- if (!this.isVisibleFromItemSettings()) {
563
- return false;
564
- }
565
- const items = this.item().items();
566
- if (Array.isArray(items) &&
567
- items.length > 0 &&
568
- this.item()
569
- .itemsVisibility()
570
- .every(v => !v())) {
571
- return false;
572
- }
573
- return true;
574
- });
575
- this.submenuAnimation = computed(() => {
576
- if (this.layout.isDesktop() && (this.layout.isSlim() || this.layout.isSlimPlus())) {
577
- return this.layout.submenuOverlayKey() === this.item().key ? 'visible' : 'hidden';
578
- }
579
- else {
580
- return this.root() ? 'expanded' : this.active() ? 'expanded' : 'collapsed';
581
- }
582
- });
583
- effect(() => {
584
- if (this.root() && this.active() && this.layout.isDesktop() && (this.layout.isSlim() || this.layout.isSlimPlus())) {
585
- this.calculatePosition(this.submenuElRef()?.nativeElement, this.submenuElRef()?.nativeElement.parentElement);
586
- }
587
- });
588
- }
589
- itemClick(event) {
590
- const item = this.item();
591
- // avoid processing disabled items
592
- if (item.disabled) {
593
- event.preventDefault();
594
- return;
595
- }
596
- if (item.hasItemsOrLazyChildren()) {
597
- // open submenu in slim/slim+ mode
598
- if (this.root() && (this.layout.isSlim() || this.layout.isSlimPlus())) {
599
- this.layout.onOverlaySubmenuOpen(item.key);
600
- }
601
- }
602
- else {
603
- if (this.layout.isMobile()) {
604
- this.layout.state.update(state => ({
605
- ...state,
606
- staticMenuMobileActive: false
607
- }));
608
- }
609
- if (this.layout.isSlim() || this.layout.isSlimPlus()) {
610
- this.layout.state.update(state => ({
611
- ...state,
612
- menuHoverActive: false
613
- }));
614
- }
615
- if (this.layout.submenuOverlayKey() !== undefined) {
616
- this.layout.onOverlaySubmenuClose();
617
- }
618
- }
619
- }
620
- onSubmenuAnimated(event) {
621
- if (event.toState === 'visible' && this.layout.isDesktop() && (this.layout.isSlim() || this.layout.isSlimPlus())) {
622
- const el = event.element;
623
- const elParent = el.parentElement;
624
- this.calculatePosition(el, elParent);
625
- }
626
- }
627
- onChildVisibleChange(visible, item, idx) {
628
- this.item().itemsVisibility()[idx]?.set(visible);
629
- }
630
- calculatePosition(overlay, target) {
631
- if (overlay) {
632
- const top = target.getBoundingClientRect().top;
633
- const vHeight = window.innerHeight;
634
- const oHeight = overlay.offsetHeight;
635
- // reset
636
- overlay.style.top = '';
637
- overlay.style.left = '';
638
- if (this.layout.isSlim() || this.layout.isSlimPlus()) {
639
- const height = top + oHeight;
640
- overlay.style.top = vHeight < height ? `${top - (height - vHeight)}px` : `${top}px`;
641
- }
642
- }
643
- }
644
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
645
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: MenuItemComponent, isStandalone: true, selector: "[mng-menuitem]", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, host: { properties: { "class.active-menuitem": "!root() && active()", "class.layout-root-menuitem": "root()" } }, providers: [PermissionService], viewQueries: [{ propertyName: "submenuElRef", first: true, predicate: ["submenu"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible()) {\n @if (root()) {\n <div class=\"layout-menuitem-root-text\">\n {{ item().label! | translate }}\n </div>\n }\n @if (!item().href) {\n @if (!item().routerLink || item().hasItems()) {\n <a\n [attr.href]=\"item().href\"\n [routerLink]=\"layout.isSlim() || layout.isSlimPlus() ? null : item().routerLink\"\n (click)=\"itemClick($event)\"\n (keydown.enter)=\"itemClick($event)\"\n [attr.target]=\"item().target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item().className ?? '' + (this.active() ? ' active-route' : '')\"\n pRipple>\n <i [ngClass]=\"item().icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item().label! | translate }}</span>\n @if (item().hasItemsOrLazyChildren()) {\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\"></i>\n }\n @if (item().badge) {\n <span class=\"menuitem-badge\">{{ item().badge }}</span>\n }\n </a>\n } @else if (item().routerLink && !item().hasItems()) {\n <a\n (click)=\"itemClick($event)\"\n [routerLink]=\"item().routerLink\"\n [attr.target]=\"item().target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item().className ?? '' + (this.active() ? ' active-route' : '')\"\n [preserveFragment]=\"item().preserveFragment\"\n [skipLocationChange]=\"item().skipLocationChange\"\n [replaceUrl]=\"item().replaceUrl\"\n [queryParams]=\"item().queryParams\"\n pRipple>\n <i [ngClass]=\"item().icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item().label! | translate }}</span>\n @if (item().hasItemsOrLazyChildren()) {\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\"></i>\n }\n @if (item().badge) {\n <span class=\"menuitem-badge\">{{ item().badge }}</span>\n }\n </a>\n }\n } @else {\n @if (!item().hasItems()) {\n <a (click)=\"itemClick($event)\" [attr.href]=\"item().href\" [attr.target]=\"item().target\" [attr.tabindex]=\"0\" [ngClass]=\"item().className ?? ''\" pRipple>\n <i [ngClass]=\"item().icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item().label! | translate }}</span>\n @if (item().hasItemsOrLazyChildren()) {\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\"></i>\n }\n @if (item().badge) {\n <span class=\"menuitem-badge\">{{ item().badge }}</span>\n }\n </a>\n }\n }\n @if (item().hasItems()) {\n <ul #submenu [@children]=\"submenuAnimation()\" (@children.done)=\"onSubmenuAnimated($event)\">\n @for (child of item().items(); track child; let i = $index) {\n <li mng-menuitem [item]=\"child\" [class]=\"child.badgeClassName\" (visibleChange)=\"onChildVisibleChange($event, child, i)\"></li>\n }\n </ul>\n }\n}\n", dependencies: [{ kind: "component", type: MenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "root"], outputs: ["visibleChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i1$3.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], animations: [
646
- trigger('children', [
647
- state('collapsed', style({
648
- height: '0'
649
- })),
650
- state('expanded', style({
651
- height: '*'
652
- })),
653
- state('hidden', style({
654
- display: 'none'
655
- })),
656
- state('visible', style({
657
- display: 'block'
658
- })),
659
- transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
660
- ])
661
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
662
- }
663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MenuItemComponent, decorators: [{
664
- type: Component,
665
- args: [{ standalone: true, selector: '[mng-menuitem]', imports: [NgClass, RippleModule, TooltipModule, RouterModule, TranslateModule, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
666
- trigger('children', [
667
- state('collapsed', style({
668
- height: '0'
669
- })),
670
- state('expanded', style({
671
- height: '*'
672
- })),
673
- state('hidden', style({
674
- display: 'none'
675
- })),
676
- state('visible', style({
677
- display: 'block'
678
- })),
679
- transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
680
- ])
681
- ], host: {
682
- '[class.active-menuitem]': '!root() && active()',
683
- '[class.layout-root-menuitem]': 'root()'
684
- }, providers: [PermissionService], template: "@if (visible()) {\n @if (root()) {\n <div class=\"layout-menuitem-root-text\">\n {{ item().label! | translate }}\n </div>\n }\n @if (!item().href) {\n @if (!item().routerLink || item().hasItems()) {\n <a\n [attr.href]=\"item().href\"\n [routerLink]=\"layout.isSlim() || layout.isSlimPlus() ? null : item().routerLink\"\n (click)=\"itemClick($event)\"\n (keydown.enter)=\"itemClick($event)\"\n [attr.target]=\"item().target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item().className ?? '' + (this.active() ? ' active-route' : '')\"\n pRipple>\n <i [ngClass]=\"item().icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item().label! | translate }}</span>\n @if (item().hasItemsOrLazyChildren()) {\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\"></i>\n }\n @if (item().badge) {\n <span class=\"menuitem-badge\">{{ item().badge }}</span>\n }\n </a>\n } @else if (item().routerLink && !item().hasItems()) {\n <a\n (click)=\"itemClick($event)\"\n [routerLink]=\"item().routerLink\"\n [attr.target]=\"item().target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item().className ?? '' + (this.active() ? ' active-route' : '')\"\n [preserveFragment]=\"item().preserveFragment\"\n [skipLocationChange]=\"item().skipLocationChange\"\n [replaceUrl]=\"item().replaceUrl\"\n [queryParams]=\"item().queryParams\"\n pRipple>\n <i [ngClass]=\"item().icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item().label! | translate }}</span>\n @if (item().hasItemsOrLazyChildren()) {\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\"></i>\n }\n @if (item().badge) {\n <span class=\"menuitem-badge\">{{ item().badge }}</span>\n }\n </a>\n }\n } @else {\n @if (!item().hasItems()) {\n <a (click)=\"itemClick($event)\" [attr.href]=\"item().href\" [attr.target]=\"item().target\" [attr.tabindex]=\"0\" [ngClass]=\"item().className ?? ''\" pRipple>\n <i [ngClass]=\"item().icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item().label! | translate }}</span>\n @if (item().hasItemsOrLazyChildren()) {\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\"></i>\n }\n @if (item().badge) {\n <span class=\"menuitem-badge\">{{ item().badge }}</span>\n }\n </a>\n }\n }\n @if (item().hasItems()) {\n <ul #submenu [@children]=\"submenuAnimation()\" (@children.done)=\"onSubmenuAnimated($event)\">\n @for (child of item().items(); track child; let i = $index) {\n <li mng-menuitem [item]=\"child\" [class]=\"child.badgeClassName\" (visibleChange)=\"onChildVisibleChange($event, child, i)\"></li>\n }\n </ul>\n }\n}\n" }]
685
- }], ctorParameters: () => [] });
686
-
687
- class MenuComponent {
688
- constructor() {
689
- this.route = inject(ActivatedRoute);
690
- this.config = inject(COMMONS_LAYOUT_FEATURE_CONFIG_IT, { optional: true });
691
- this.layout = inject(LayoutService);
692
- this.menuService = inject(MenuService);
693
- this.routeData = toSignal(this.route.data);
694
- effect(() => {
695
- let items = [];
696
- if (this.config?.menuItems && Array.isArray(this.config.menuItems)) {
697
- items = this.config.menuItems;
698
- }
699
- else if (Array.isArray(this.routeData()?.menuItems)) {
700
- items = this.routeData().menuItems;
701
- }
702
- // Wraps menu items
703
- if (!(this.layout.isSlim() || this.layout.isSlimPlus())) {
704
- items = [{ items }];
705
- }
706
- untracked(() => this.menuService.setItems(items));
707
- });
708
- }
709
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
710
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: MenuComponent, isStandalone: true, selector: "mng-menu", ngImport: i0, template: "<ul class=\"layout-menu\">\n @for (item of menuService.menuItems(); track item) {\n @if (!item.separator) {\n <li mng-menuitem [item]=\"item\" [root]=\"true\"></li>\n }\n @if (item.separator) {\n <li class=\"menu-separator\"></li>\n }\n }\n</ul>\n", dependencies: [{ kind: "component", type: MenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "root"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
711
- }
712
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MenuComponent, decorators: [{
713
- type: Component,
714
- args: [{ standalone: true, selector: 'mng-menu', imports: [MenuItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"layout-menu\">\n @for (item of menuService.menuItems(); track item) {\n @if (!item.separator) {\n <li mng-menuitem [item]=\"item\" [root]=\"true\"></li>\n }\n @if (item.separator) {\n <li class=\"menu-separator\"></li>\n }\n }\n</ul>\n" }]
715
- }], ctorParameters: () => [] });
716
-
717
- class SidebarComponent {
718
- constructor() {
719
- this.config = inject(COMMONS_LAYOUT_FEATURE_CONFIG_IT, { optional: true });
720
- this.layout = inject(LayoutService);
721
- this.el = inject(ElementRef);
722
- this.menuComponent = signal(this.config?.components?.menu === false ? undefined : (this.config?.components?.menu ?? MenuComponent));
723
- this.timeout = null;
724
- }
725
- onMouseEnter() {
726
- if (!this.layout.state().anchored) {
727
- if (this.timeout) {
728
- clearTimeout(this.timeout);
729
- this.timeout = null;
730
- }
731
- this.layout.state.update(state => ({
732
- ...state,
733
- sidebarActive: true
734
- }));
735
- }
736
- }
737
- onMouseLeave() {
738
- if (!this.layout.state().anchored) {
739
- if (!this.timeout) {
740
- this.timeout = setTimeout(() => this.layout.state.update(state => ({
741
- ...state,
742
- sidebarActive: false
743
- })), 300);
744
- }
745
- }
746
- }
747
- anchor() {
748
- this.layout.state.update(state => ({
749
- ...state,
750
- anchored: !state.anchored
751
- }));
752
- }
753
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
754
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: SidebarComponent, isStandalone: true, selector: "mng-sidebar", ngImport: i0, template: "<div class=\"layout-sidebar\" (mouseenter)=\"onMouseEnter()\" (mouseleave)=\"onMouseLeave()\">\n <div class=\"sidebar-header\">\n <a [routerLink]=\"['/']\" class=\"app-logo\">\n <div class=\"app-logo-small h-2rem\">\n <img [src]=\"layout.appLogo()\" [alt]=\"'App logo'\" />\n </div>\n <div class=\"app-logo-normal\">\n <img class=\"h-2rem\" [src]=\"layout.appLogo()\" [alt]=\"'App logo'\" />\n <img class=\"h-2rem ml-3\" [src]=\"layout.appLogoName()\" [alt]=\"'App name'\" />\n </div>\n </a>\n <button class=\"layout-sidebar-anchor p-link z-2\" type=\"button\" (click)=\"anchor()\"></button>\n </div>\n\n @if (menuComponent()) {\n <div #menuContainer class=\"layout-menu-container\">\n <div [mngComponent]=\"menuComponent()\" [attachToHost]=\"true\"></div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
755
- }
756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SidebarComponent, decorators: [{
757
- type: Component,
758
- args: [{ standalone: true, selector: 'mng-sidebar', imports: [RouterModule, MenuComponent, ComponentDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-sidebar\" (mouseenter)=\"onMouseEnter()\" (mouseleave)=\"onMouseLeave()\">\n <div class=\"sidebar-header\">\n <a [routerLink]=\"['/']\" class=\"app-logo\">\n <div class=\"app-logo-small h-2rem\">\n <img [src]=\"layout.appLogo()\" [alt]=\"'App logo'\" />\n </div>\n <div class=\"app-logo-normal\">\n <img class=\"h-2rem\" [src]=\"layout.appLogo()\" [alt]=\"'App logo'\" />\n <img class=\"h-2rem ml-3\" [src]=\"layout.appLogoName()\" [alt]=\"'App name'\" />\n </div>\n </a>\n <button class=\"layout-sidebar-anchor p-link z-2\" type=\"button\" (click)=\"anchor()\"></button>\n </div>\n\n @if (menuComponent()) {\n <div #menuContainer class=\"layout-menu-container\">\n <div [mngComponent]=\"menuComponent()\" [attachToHost]=\"true\"></div>\n </div>\n }\n</div>\n" }]
759
- }] });
760
-
761
- const defaultColorSchemeOpts = [
762
- {
763
- value: 'auto',
764
- label: 'system'
765
- },
766
- {
767
- value: 'light',
768
- label: 'light'
769
- },
770
- {
771
- value: 'dark',
772
- label: 'dark'
773
- }
774
- ];
775
- class SettingsComponent {
776
- constructor() {
777
- this.dynamicDialogConfig = inject(DynamicDialogConfig);
778
- this.dynamicDialogRef = inject(DynamicDialogRef);
779
- this.colorSchemeOptions = signal(defaultColorSchemeOpts);
780
- this.injector = this.dynamicDialogConfig.data.injector;
781
- this.translate = this.injector.get(TranslateService);
782
- this.commons = this.injector.get(CommonsService);
783
- this.layout = this.injector.get(LayoutService);
784
- this.menuModes = this.layout.menuModes;
785
- this.translate
786
- .stream('mngSettings.title')
787
- .pipe(takeUntilDestroyed())
788
- .subscribe(t => {
789
- setTimeout(() => (this.dynamicDialogConfig.header = t));
790
- });
791
- const translateKey = 'mngSettings.colorScheme.options';
792
- this.translate
793
- .stream(translateKey)
794
- .pipe(takeUntilDestroyed())
795
- .subscribe(t => {
796
- if (t === translateKey) {
797
- this.colorSchemeOptions.set(defaultColorSchemeOpts);
798
- }
799
- else {
800
- this.colorSchemeOptions.update(options => options.map(o => ({
801
- value: o.value,
802
- label: `${t[o.value]}`
803
- })));
804
- }
805
- });
806
- }
807
- switchLocale(language) {
808
- this.commons.setAppLocale(language);
809
- }
810
- switchDataLocale(language) {
811
- this.commons.setAppDataLocale(language);
812
- }
813
- onMenuModeChange(mode) {
814
- this.layout.onMenuModeChange(mode);
815
- }
816
- onColorSchemeChange(scheme) {
817
- this.layout.setColorScheme(scheme);
818
- }
819
- closeDialog() {
820
- this.dynamicDialogRef.close();
821
- }
822
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
823
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: SettingsComponent, isStandalone: true, selector: "mng-settings", ngImport: i0, template: "<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (commons.appLocales().length > 1 || commons.appDataLocales().length > 1) {\n <h5>{{ 'mngSettings.locales' | translate }}</h5>\n <div class=\"formgrid grid\">\n @if (commons.appLocales().length > 1) {\n <div class=\"field pr-4\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"commons.appLocale()\" [options]=\"commons.appLocales()\" (onChange)=\"switchLocale($event.value)\"></p-dropdown>\n </div>\n }\n @if (commons.appDataLocales().length > 1) {\n <div class=\"field pr-4\">\n <i class=\"pi pi-fw pi-database\"></i>\n <p-dropdown [ngModel]=\"commons.appDataLocale()\" [options]=\"commons.appDataLocales()\" (onChange)=\"switchDataLocale($event.value)\"></p-dropdown>\n </div>\n }\n </div>\n }\n\n <h5>{{ 'mngSettings.colorScheme.title' | translate }}</h5>\n <div class=\"formgrid grid\">\n <p-selectButton\n [options]=\"colorSchemeOptions()\"\n [ngModel]=\"layout.colorSchemeSetting()\"\n (ngModelChange)=\"onColorSchemeChange($event)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n allowEmpty=\"false\" />\n </div>\n\n @if (menuModes.length > 1) {\n <h5>{{ 'mngSettings.menuMode.title' | translate }}</h5>\n <div class=\"formgrid grid\">\n @for (mode of menuModes; track mode) {\n <div class=\"field-radiobutton col-6 md:col-4\">\n <p-radioButton name=\"category\" [value]=\"mode\" [ngModel]=\"layout.menuMode()\" (ngModelChange)=\"onMenuModeChange(mode)\" />\n <label [for]=\"mode\" class=\"ml-2\">\n {{ 'mngSettings.menuMode.' + mode | translate }}\n </label>\n </div>\n }\n </div>\n }\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div></div>\n <div>\n <p-button (onClick)=\"closeDialog()\" [label]=\"'general.close' | translate\" icon=\"pi pi-times\" styleClass=\"p-button-primary p-button-text\" />\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i2$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i5.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey", "autofocus"], outputs: ["onOptionClick", "onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
824
- }
825
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SettingsComponent, decorators: [{
826
- type: Component,
827
- args: [{ standalone: true, selector: 'mng-settings', imports: [TranslateModule, RadioButtonModule, FormsModule, Button, DropdownModule, InputSwitchModule, SelectButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (commons.appLocales().length > 1 || commons.appDataLocales().length > 1) {\n <h5>{{ 'mngSettings.locales' | translate }}</h5>\n <div class=\"formgrid grid\">\n @if (commons.appLocales().length > 1) {\n <div class=\"field pr-4\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"commons.appLocale()\" [options]=\"commons.appLocales()\" (onChange)=\"switchLocale($event.value)\"></p-dropdown>\n </div>\n }\n @if (commons.appDataLocales().length > 1) {\n <div class=\"field pr-4\">\n <i class=\"pi pi-fw pi-database\"></i>\n <p-dropdown [ngModel]=\"commons.appDataLocale()\" [options]=\"commons.appDataLocales()\" (onChange)=\"switchDataLocale($event.value)\"></p-dropdown>\n </div>\n }\n </div>\n }\n\n <h5>{{ 'mngSettings.colorScheme.title' | translate }}</h5>\n <div class=\"formgrid grid\">\n <p-selectButton\n [options]=\"colorSchemeOptions()\"\n [ngModel]=\"layout.colorSchemeSetting()\"\n (ngModelChange)=\"onColorSchemeChange($event)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n allowEmpty=\"false\" />\n </div>\n\n @if (menuModes.length > 1) {\n <h5>{{ 'mngSettings.menuMode.title' | translate }}</h5>\n <div class=\"formgrid grid\">\n @for (mode of menuModes; track mode) {\n <div class=\"field-radiobutton col-6 md:col-4\">\n <p-radioButton name=\"category\" [value]=\"mode\" [ngModel]=\"layout.menuMode()\" (ngModelChange)=\"onMenuModeChange(mode)\" />\n <label [for]=\"mode\" class=\"ml-2\">\n {{ 'mngSettings.menuMode.' + mode | translate }}\n </label>\n </div>\n }\n </div>\n }\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div></div>\n <div>\n <p-button (onClick)=\"closeDialog()\" [label]=\"'general.close' | translate\" icon=\"pi pi-times\" styleClass=\"p-button-primary p-button-text\" />\n </div>\n </div>\n </div>\n</div>\n" }]
828
- }], ctorParameters: () => [] });
829
-
830
- class TopbarUserComponent {
831
- constructor() {
832
- this.injector = inject(Injector);
833
- this.dialogService = inject(DialogService);
834
- this.commons = inject(CommonsService);
835
- this.hrefJsVoid = inject(DomSanitizer).bypassSecurityTrustUrl('javascript:void(0)');
836
- this.config = inject(COMMONS_LAYOUT_FEATURE_CONFIG_IT, { optional: true });
837
- this.user = computed(() => this.commons.user());
838
- this.userRoles = computed(() => this.commons.userRoles());
839
- this.settingsDisabled = signal(this.config?.components?.settings === false);
840
- }
841
- logout(user, event) {
842
- if (typeof user?.logout === 'function') {
843
- event.preventDefault();
844
- event.stopPropagation();
845
- user.logout();
846
- }
847
- }
848
- openSettings() {
849
- if (this.config?.components?.settings === false) {
850
- return;
851
- }
852
- this.dialogService.open(this.config?.components?.settings ?? SettingsComponent, {
853
- modal: true,
854
- styleClass: 'mng-dialog mng-action-editor-dialog mng-dialog-xs',
855
- data: {
856
- injector: this.injector
857
- }
858
- });
859
- }
860
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TopbarUserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
861
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: TopbarUserComponent, isStandalone: true, selector: "mng-topbar-user-component", ngImport: i0, template: "<a\n class=\"cursor-pointer lg:pr-4\"\n pStyleClass=\"@next\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\"\n [hideOnOutsideClick]=\"true\"\n pRipple>\n <i class=\"pi pi-fw pi-user text-2xl\"></i>\n <span class=\"hidden sm:inline-block\">&nbsp; {{ user()?.displayName ?? user()?.username }}</span>\n</a>\n<ul class=\"topbar-menu active-topbar-menu w-15rem z-5 ng-hidden border-round\">\n <li role=\"menuitem\">\n <a\n class=\"flex align-items-center transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-user text-base mr-2\"></i>\n <div>\n <strong>{{ user()?.displayName ?? user()?.username }}</strong>\n @if (userRoles().length > 0) {\n <small>\n <br />\n {{ userRoles() }}\n </small>\n }\n </div>\n </a>\n </li>\n @if (!settingsDisabled()) {\n <li role=\"menuitem\">\n <a\n [href]=\"hrefJsVoid\"\n (click)=\"openSettings()\"\n class=\"flex align-items-center transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-cog text-base mr-2\"></i>\n {{ 'mngSettings.title' | translate }}\n </a>\n </li>\n }\n @if (user()?.logout || user()?.logoutUrl) {\n <li role=\"menuitem\">\n <a\n [href]=\"user()?.logoutUrl ?? hrefJsVoid\"\n (click)=\"logout(user(), $event)\"\n class=\"flex align-items-center hover:text-primary-500 transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-sign-out text-base mr-2\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n }\n</ul>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i1$3.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i3$1.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
862
- }
863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TopbarUserComponent, decorators: [{
864
- type: Component,
865
- args: [{ standalone: true, selector: 'mng-topbar-user-component', imports: [AsyncPipe, EnumerateAsyncPipe, TranslateModule, RippleModule, StyleClassModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n class=\"cursor-pointer lg:pr-4\"\n pStyleClass=\"@next\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\"\n [hideOnOutsideClick]=\"true\"\n pRipple>\n <i class=\"pi pi-fw pi-user text-2xl\"></i>\n <span class=\"hidden sm:inline-block\">&nbsp; {{ user()?.displayName ?? user()?.username }}</span>\n</a>\n<ul class=\"topbar-menu active-topbar-menu w-15rem z-5 ng-hidden border-round\">\n <li role=\"menuitem\">\n <a\n class=\"flex align-items-center transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-user text-base mr-2\"></i>\n <div>\n <strong>{{ user()?.displayName ?? user()?.username }}</strong>\n @if (userRoles().length > 0) {\n <small>\n <br />\n {{ userRoles() }}\n </small>\n }\n </div>\n </a>\n </li>\n @if (!settingsDisabled()) {\n <li role=\"menuitem\">\n <a\n [href]=\"hrefJsVoid\"\n (click)=\"openSettings()\"\n class=\"flex align-items-center transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-cog text-base mr-2\"></i>\n {{ 'mngSettings.title' | translate }}\n </a>\n </li>\n }\n @if (user()?.logout || user()?.logoutUrl) {\n <li role=\"menuitem\">\n <a\n [href]=\"user()?.logoutUrl ?? hrefJsVoid\"\n (click)=\"logout(user(), $event)\"\n class=\"flex align-items-center hover:text-primary-500 transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterFromClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-sign-out text-base mr-2\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n }\n</ul>\n" }]
866
- }] });
867
-
868
- class TopbarComponent {
869
- constructor() {
870
- this.el = inject(ElementRef);
871
- this.commons = inject(CommonsService);
872
- this.layout = inject(LayoutService);
873
- this.config = inject(COMMONS_LAYOUT_FEATURE_CONFIG_IT, { optional: true });
874
- this.topbarUserComponent = signal(this.config?.components?.topbarUser === false ? undefined : (this.config?.components?.topbarUser ?? TopbarUserComponent));
875
- this.breadcrumbComponent = signal(this.config?.components?.breadcrumb === false ? undefined : (this.config?.components?.breadcrumb ?? BreadcrumbComponent));
876
- }
877
- onMenuButtonClick() {
878
- this.layout.onMenuToggle();
879
- }
880
- switchLocale(language) {
881
- this.commons.setAppLocale(language);
882
- }
883
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
884
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: TopbarComponent, isStandalone: true, selector: "mng-topbar", ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"topbar-start\">\n <button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\n <i class=\"pi pi-bars\"></i>\n </button>\n\n @if (breadcrumbComponent()) {\n <div class=\"topbar-breadcrumb\">\n <div [mngComponent]=\"breadcrumbComponent()\" [attachToHost]=\"true\"></div>\n </div>\n }\n </div>\n <div class=\"layout-topbar-menu-section\">\n <mng-sidebar></mng-sidebar>\n </div>\n <div class=\"topbar-end\">\n <ul class=\"topbar-menu\">\n @if (commons.appLocales().length > 1) {\n <li class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"commons.appLocale()\" [options]=\"commons.appLocales()\" (onChange)=\"switchLocale($event.value)\"></p-dropdown>\n </li>\n }\n @if (topbarUserComponent()) {\n <li #userMenuItem class=\"profile-item topbar-item mr-3\" [mngComponent]=\"topbarUserComponent()\" [attachToHost]=\"true\"></li>\n }\n </ul>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SidebarComponent, selector: "mng-sidebar" }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: StyleClassModule }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
885
- }
886
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: TopbarComponent, decorators: [{
887
- type: Component,
888
- args: [{ standalone: true, selector: 'mng-topbar', imports: [SidebarComponent, NgClass, ButtonModule, StyleClassModule, RippleModule, BreadcrumbComponent, AsyncPipe, DropdownModule, ComponentDirective, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-topbar\">\n <div class=\"topbar-start\">\n <button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\n <i class=\"pi pi-bars\"></i>\n </button>\n\n @if (breadcrumbComponent()) {\n <div class=\"topbar-breadcrumb\">\n <div [mngComponent]=\"breadcrumbComponent()\" [attachToHost]=\"true\"></div>\n </div>\n }\n </div>\n <div class=\"layout-topbar-menu-section\">\n <mng-sidebar></mng-sidebar>\n </div>\n <div class=\"topbar-end\">\n <ul class=\"topbar-menu\">\n @if (commons.appLocales().length > 1) {\n <li class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"commons.appLocale()\" [options]=\"commons.appLocales()\" (onChange)=\"switchLocale($event.value)\"></p-dropdown>\n </li>\n }\n @if (topbarUserComponent()) {\n <li #userMenuItem class=\"profile-item topbar-item mr-3\" [mngComponent]=\"topbarUserComponent()\" [attachToHost]=\"true\"></li>\n }\n </ul>\n </div>\n</div>\n" }]
889
- }] });
890
-
891
- class MainLayoutComponent {
892
- constructor() {
893
- // private readonly commonsService = inject(CommonsService);
894
- this.config = inject(COMMONS_LAYOUT_FEATURE_CONFIG_IT, { optional: true });
895
- this.layout = inject(LayoutService);
896
- this.menuService = inject(MenuService);
897
- this.renderer = inject(Renderer2);
898
- this.appTopbar = viewChild('topbarCmp');
899
- this.ripple = signal(this.config?.ripple ?? true);
900
- this.topbarComponent = signal(this.config?.components?.topbar === false ? undefined : (this.config?.components?.topbar ?? TopbarComponent));
901
- this.breadcrumbsComponent = signal(this.config?.components?.breadcrumb === false ? undefined : (this.config?.components?.breadcrumb ?? BreadcrumbComponent));
902
- this.footerComponent = signal(this.config?.components?.footer === false ? undefined : (this.config?.components?.footer ?? FooterComponent));
903
- this.useNotificationWrapper = signal(!this.config?.disableNotificationWrapper);
904
- this.layout.overlayOpen$.pipe(takeUntilDestroyed()).subscribe(() => {
905
- if (!this.menuOutsideClickListener) {
906
- this.menuOutsideClickListener = this.renderer.listen('document', 'click', event => {
907
- const isOutsideClicked = !(this.appTopbar()?.nativeElement.isSameNode(event.target) || this.appTopbar()?.nativeElement.contains(event.target));
908
- if (isOutsideClicked) {
909
- this.hideMenu();
910
- }
911
- });
912
- }
913
- if (this.layout.state().staticMenuMobileActive) {
914
- this.blockBodyScroll();
915
- }
916
- });
917
- }
918
- blockBodyScroll() {
919
- if (document.body.classList) {
920
- document.body.classList.add('blocked-scroll');
921
- }
922
- else {
923
- document.body.className += ' blocked-scroll';
924
- }
925
- }
926
- unblockBodyScroll() {
927
- if (document.body.classList) {
928
- document.body.classList.remove('blocked-scroll');
929
- }
930
- else {
931
- document.body.className = document.body.className.replace(new RegExp('(^|\\b)' + 'blocked-scroll'.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
932
- }
316
+ class VersionService {
317
+ constructor(http, configurationService) {
318
+ this.http = http;
319
+ this.configurationService = configurationService;
320
+ this.logger = inject(LoggerService).create('VersionService');
321
+ this.cache = {};
933
322
  }
934
- hideMenu() {
935
- this.layout.state.update(state => ({
936
- ...state,
937
- overlayMenuActive: false,
938
- staticMenuMobileActive: false,
939
- menuHoverActive: false
940
- }));
941
- if (this.layout.submenuOverlayKey() !== undefined) {
942
- this.layout.onOverlaySubmenuClose();
943
- }
944
- if (!(this.layout.isSlim() || this.layout.isSlimPlus())) {
945
- this.menuService.reset();
323
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
324
+ loadVersion(path, baseConfigKey, jsonPath = '$') {
325
+ const urlSegments = [];
326
+ if (baseConfigKey) {
327
+ const baseUrl = this.configurationService.getConfigValue(baseConfigKey);
328
+ urlSegments.push(baseUrl.endsWith('/') ? baseUrl.substring(0, baseUrl.length - 1) : baseUrl);
946
329
  }
947
- if (this.menuOutsideClickListener) {
948
- this.menuOutsideClickListener();
949
- this.menuOutsideClickListener = null;
330
+ if (path) {
331
+ urlSegments.push(!path.startsWith('/') ? `/${path}` : path);
950
332
  }
951
- this.unblockBodyScroll();
952
- }
953
- ngOnDestroy() {
954
- if (this.menuOutsideClickListener) {
955
- this.menuOutsideClickListener();
333
+ const url = urlSegments.join('');
334
+ if (!this.cache[url]) {
335
+ this.cache[url] = new ReplaySubject(1);
336
+ this.http.get(urlSegments.join('')).subscribe({
337
+ next: res => {
338
+ this.cache[url].next(res);
339
+ },
340
+ error: err => {
341
+ this.logger.error('Version could not be retreived', err);
342
+ }
343
+ });
956
344
  }
345
+ return this.cache[url].asObservable();
957
346
  }
958
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MainLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
959
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: MainLayoutComponent, isStandalone: true, selector: "mng-main-layout", viewQueries: [{ propertyName: "appTopbar", first: true, predicate: ["topbarCmp"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (useNotificationWrapper()) {\n <mng-notification-wrapper>\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </mng-notification-wrapper>\n} @else {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n}\n\n<ng-template #content>\n <div\n class=\"layout-container\"\n [ngClass]=\"{\n 'layout-light': layout.colorScheme() === 'light',\n 'layout-dark': layout.colorScheme() === 'dark',\n 'layout-overlay': layout.menuMode() === 'overlay',\n 'layout-static': layout.menuMode() === 'static',\n 'layout-reveal': layout.menuMode() === 'reveal',\n 'layout-drawer': layout.menuMode() === 'drawer',\n 'layout-slim': layout.menuMode() === 'slim',\n 'layout-slim-plus': layout.menuMode() === 'slim-plus',\n 'layout-static-inactive': layout.state().staticMenuDesktopInactive && layout.menuMode() === 'static',\n 'layout-overlay-active': layout.state().overlayMenuActive,\n 'layout-mobile-active': layout.state().staticMenuMobileActive,\n 'p-ripple-disabled': !ripple(),\n 'layout-sidebar-active': layout.state().sidebarActive,\n 'layout-sidebar-anchored': layout.state().anchored\n }\">\n <div class=\"layout-content-wrapper\">\n @if (topbarComponent()) {\n <div #topbarCmp class=\"layout-topbar-wrapper\" [mngComponent]=\"topbarComponent()\" [attachToHost]=\"true\"></div>\n }\n @if (breadcrumbsComponent()) {\n <div class=\"content-breadcrumb\">\n <div [mngComponent]=\"breadcrumbsComponent()\" [attachToHost]=\"true\"></div>\n </div>\n }\n <div class=\"layout-content\">\n <router-outlet></router-outlet>\n </div>\n <div class=\"layout-mask\"></div>\n @if (footerComponent()) {\n <div [mngComponent]=\"footerComponent()\" [attachToHost]=\"true\"></div>\n }\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: ComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "injectionToken", "inputs", "attachToHost", "parentInjector"], outputs: ["instanceCreated"] }, { kind: "component", type: NotificationWrapperComponent, selector: "mng-notification-wrapper" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
960
- }
961
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MainLayoutComponent, decorators: [{
962
- type: Component,
963
- args: [{ standalone: true, selector: 'mng-main-layout', imports: [NgClass, RouterModule, TopbarComponent, BreadcrumbComponent, ComponentDirective, AsyncPipe, NotificationWrapperComponent, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (useNotificationWrapper()) {\n <mng-notification-wrapper>\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </mng-notification-wrapper>\n} @else {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n}\n\n<ng-template #content>\n <div\n class=\"layout-container\"\n [ngClass]=\"{\n 'layout-light': layout.colorScheme() === 'light',\n 'layout-dark': layout.colorScheme() === 'dark',\n 'layout-overlay': layout.menuMode() === 'overlay',\n 'layout-static': layout.menuMode() === 'static',\n 'layout-reveal': layout.menuMode() === 'reveal',\n 'layout-drawer': layout.menuMode() === 'drawer',\n 'layout-slim': layout.menuMode() === 'slim',\n 'layout-slim-plus': layout.menuMode() === 'slim-plus',\n 'layout-static-inactive': layout.state().staticMenuDesktopInactive && layout.menuMode() === 'static',\n 'layout-overlay-active': layout.state().overlayMenuActive,\n 'layout-mobile-active': layout.state().staticMenuMobileActive,\n 'p-ripple-disabled': !ripple(),\n 'layout-sidebar-active': layout.state().sidebarActive,\n 'layout-sidebar-anchored': layout.state().anchored\n }\">\n <div class=\"layout-content-wrapper\">\n @if (topbarComponent()) {\n <div #topbarCmp class=\"layout-topbar-wrapper\" [mngComponent]=\"topbarComponent()\" [attachToHost]=\"true\"></div>\n }\n @if (breadcrumbsComponent()) {\n <div class=\"content-breadcrumb\">\n <div [mngComponent]=\"breadcrumbsComponent()\" [attachToHost]=\"true\"></div>\n </div>\n }\n <div class=\"layout-content\">\n <router-outlet></router-outlet>\n </div>\n <div class=\"layout-mask\"></div>\n @if (footerComponent()) {\n <div [mngComponent]=\"footerComponent()\" [attachToHost]=\"true\"></div>\n }\n </div>\n </div>\n</ng-template>\n" }]
964
- }], ctorParameters: () => [] });
965
-
966
- /**
967
- * Creates a layout route on the specified path.
968
- *
969
- * @param {String} path - The path of the route.
970
- * @return {RouteBuilder} - The route builder for the layout route.
971
- */
972
- function createLayoutRoute(path) {
973
- return createRoute(path, MainLayoutComponent);
347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionService, deps: [{ token: i1.HttpClient }, { token: i2.CommonsConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable }); }
348
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionService }); }
974
349
  }
350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: VersionService, decorators: [{
351
+ type: Injectable
352
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.CommonsConfigurationService }] });
975
353
 
976
354
  /**
977
355
  * Prepares providers for usage of the layout functionalities.
@@ -993,11 +371,11 @@ function withLayout(config) {
993
371
  };
994
372
  }
995
373
 
996
- // components
374
+ // helpers
997
375
 
998
376
  /**
999
377
  * Generated bundle index. Do not edit.
1000
378
  */
1001
379
 
1002
- export { BreadcrumbComponent, COMMONS_LAYOUT_FEATURE_CONFIG_IT, ErrorPageComponent, FooterComponent, LayoutService, MainLayoutComponent, MenuComponent, MenuItemComponent, MenuService, NotFoundPageComponent, SettingsComponent, SidebarComponent, TopbarComponent, TopbarUserComponent, VersionComponent, VersionService, createLayoutRoute, withLayout };
380
+ export { COMMONS_LAYOUT_FEATURE_CONFIG_IT, LayoutService, MenuService, VersionService, prepareMenuItemsToInternal, withLayout };
1003
381
  //# sourceMappingURL=mediusinc-mng-commons-layout.mjs.map