@tilde-nlp/ngx-menu 4.0.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/menu-columns/menu-columns.component.mjs +26 -123
- package/esm2022/lib/components/menu-item-icon/menu-item-icon.component.mjs +4 -6
- package/esm2022/lib/components/menu-item-link/menu-item-link.component.mjs +1 -1
- package/esm2022/lib/components/menu-item-list/menu-item-list.component.mjs +3 -3
- package/esm2022/lib/components/modal-nav-menu/modal-nav-menu.component.mjs +14 -12
- package/esm2022/lib/components/nav-base/nav-base.component.mjs +21 -17
- package/esm2022/lib/components/side-nav-menu/side-nav-menu.component.mjs +16 -13
- package/esm2022/lib/models/active-menu-item-config.model.mjs +2 -0
- package/esm2022/lib/models/active-menu-items.model.mjs +2 -0
- package/esm2022/lib/models/index.mjs +3 -1
- package/esm2022/lib/models/menu-shared-config.model.mjs +1 -1
- package/esm2022/lib/services/index.mjs +3 -0
- package/esm2022/lib/services/menu-items.service.mjs +125 -0
- package/esm2022/lib/services/strapi.service.mjs +2 -2
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/tilde-nlp-ngx-menu.mjs +210 -181
- package/fesm2022/tilde-nlp-ngx-menu.mjs.map +1 -1
- package/lib/components/menu-columns/menu-columns.component.d.ts +13 -33
- package/lib/components/menu-item-icon/menu-item-icon.component.d.ts +1 -2
- package/lib/components/menu-item-link/menu-item-link.component.d.ts +1 -1
- package/lib/components/menu-item-list/menu-item-list.component.d.ts +1 -1
- package/lib/components/modal-nav-menu/modal-nav-menu.component.d.ts +5 -3
- package/lib/components/nav-base/nav-base.component.d.ts +14 -8
- package/lib/components/side-nav-menu/side-nav-menu.component.d.ts +6 -4
- package/lib/models/active-menu-item-config.model.d.ts +4 -0
- package/lib/models/active-menu-items.model.d.ts +6 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/menu-shared-config.model.d.ts +10 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/menu-items.service.d.ts +38 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Injectable, Optional, Inject, Component, Input, EventEmitter, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/router';
|
|
4
|
+
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
5
|
+
import { map, BehaviorSubject, filter } from 'rxjs';
|
|
3
6
|
import * as i1 from '@tilde-nlp/ngx-strapi';
|
|
4
7
|
import { STRAPI_API_CONFIG_TOKEN } from '@tilde-nlp/ngx-strapi';
|
|
8
|
+
import { CollectionTypes } from '@tilde-nlp/strapi-models';
|
|
5
9
|
import * as i2 from '@tilde-nlp/ngx-common';
|
|
6
10
|
import { PlausibleModule } from '@tilde-nlp/ngx-common';
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
11
|
+
import * as i2$2 from '@angular/flex-layout/flex';
|
|
12
|
+
import * as i3 from '@angular/common';
|
|
9
13
|
import { CommonModule } from '@angular/common';
|
|
10
|
-
import * as
|
|
14
|
+
import * as i2$1 from '@angular/material/icon';
|
|
11
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as
|
|
16
|
+
import * as i7 from '@angular/material/button';
|
|
13
17
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
|
-
import * as i2$2 from '@angular/router';
|
|
15
|
-
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
16
|
-
import { map, filter } from 'rxjs';
|
|
17
|
-
import { CollectionTypes } from '@tilde-nlp/strapi-models';
|
|
18
18
|
import * as i4$1 from '@angular/material/divider';
|
|
19
19
|
import * as i4 from '@angular/material/tooltip';
|
|
20
20
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i6 from '@ngx-translate/core';
|
|
22
22
|
import { TranslateModule } from '@ngx-translate/core';
|
|
23
23
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
24
24
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
@@ -36,37 +36,6 @@ var StrapiDataLocation;
|
|
|
36
36
|
StrapiDataLocation[StrapiDataLocation["END"] = 1] = "END";
|
|
37
37
|
})(StrapiDataLocation || (StrapiDataLocation = {}));
|
|
38
38
|
|
|
39
|
-
/** This component is created to help nest some common input params through nav components. */
|
|
40
|
-
class NavBaseComponent {
|
|
41
|
-
constructor() {
|
|
42
|
-
this.hideSelectedCustomId = false;
|
|
43
|
-
this.strapiGroupBase = {};
|
|
44
|
-
this.strapiDataLocation = StrapiDataLocation.END;
|
|
45
|
-
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NavBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: NavBaseComponent, selector: "nav-base", inputs: { hideSelectedCustomId: "hideSelectedCustomId", direction: "direction", menuItemGroups: "menuItemGroups", strapiGroupBase: "strapiGroupBase", strapiDataLocation: "strapiDataLocation" }, ngImport: i0, template: "<p>nav-base works!</p>\r\n", styles: [""] }); }
|
|
48
|
-
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NavBaseComponent, decorators: [{
|
|
50
|
-
type: Component,
|
|
51
|
-
args: [{ selector: 'nav-base', template: "<p>nav-base works!</p>\r\n" }]
|
|
52
|
-
}], propDecorators: { hideSelectedCustomId: [{
|
|
53
|
-
type: Input
|
|
54
|
-
}], direction: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}], menuItemGroups: [{
|
|
57
|
-
type: Input
|
|
58
|
-
}], strapiGroupBase: [{
|
|
59
|
-
type: Input
|
|
60
|
-
}], strapiDataLocation: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}] } });
|
|
63
|
-
|
|
64
|
-
var MenuLayoutDirection;
|
|
65
|
-
(function (MenuLayoutDirection) {
|
|
66
|
-
MenuLayoutDirection["column"] = "column";
|
|
67
|
-
MenuLayoutDirection["row"] = "row";
|
|
68
|
-
})(MenuLayoutDirection || (MenuLayoutDirection = {}));
|
|
69
|
-
|
|
70
39
|
const MENU_ICON_STRAPI_EXTENSION = ".svg";
|
|
71
40
|
|
|
72
41
|
class StarpiMenuService {
|
|
@@ -153,6 +122,158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
153
122
|
args: [STRAPI_API_CONFIG_TOKEN]
|
|
154
123
|
}] }, { type: i2.IconService }]; } });
|
|
155
124
|
|
|
125
|
+
class MenuItemsService {
|
|
126
|
+
get activeElements() { return this._activeElements.asObservable(); }
|
|
127
|
+
get allRootItems() { return this._allRootItems; }
|
|
128
|
+
get strapiGroup() { return this._strapiGroup; }
|
|
129
|
+
get customId() { return this.menuSharedConfig?.customId; }
|
|
130
|
+
get hideSelectedCustomId() { return this.menuSharedConfig?.hideSelectedCustomId; }
|
|
131
|
+
get strapiGroupBase() { return this.menuSharedConfig?.strapiGroupBase; }
|
|
132
|
+
get strapiDataLocation() { return this.menuSharedConfig?.strapiDataLocation ?? StrapiDataLocation.END; }
|
|
133
|
+
get mergedGroups() { return this._mergedGroups; }
|
|
134
|
+
get menuItemGroups() { return this.menuSharedConfig.itemGroups; }
|
|
135
|
+
constructor(router, menuSharedConfig, strapiService) {
|
|
136
|
+
this.router = router;
|
|
137
|
+
this.menuSharedConfig = menuSharedConfig;
|
|
138
|
+
this.strapiService = strapiService;
|
|
139
|
+
this._activeElements = new BehaviorSubject({});
|
|
140
|
+
this.strapiItems = [];
|
|
141
|
+
this.isActiveMatchOptions = {
|
|
142
|
+
matrixParams: 'exact',
|
|
143
|
+
queryParams: 'exact',
|
|
144
|
+
paths: 'exact',
|
|
145
|
+
fragment: 'exact'
|
|
146
|
+
};
|
|
147
|
+
this._mergedGroups = [];
|
|
148
|
+
this.getStrapiData();
|
|
149
|
+
this.subscribeToRouteChanges();
|
|
150
|
+
}
|
|
151
|
+
subscribeToRouteChanges() {
|
|
152
|
+
this.router.events
|
|
153
|
+
.pipe(filter(e => e instanceof NavigationEnd))
|
|
154
|
+
.subscribe(() => { this.updateActive(); });
|
|
155
|
+
}
|
|
156
|
+
updateActive() {
|
|
157
|
+
const items = this.allRootItems;
|
|
158
|
+
const root = this.findActiveElement(items, false);
|
|
159
|
+
const child = this.findActiveElement(items, true);
|
|
160
|
+
this._activeElements.next({ root, child });
|
|
161
|
+
}
|
|
162
|
+
/** Finds active element from whole list. RouterLink has priority over custom Id. */
|
|
163
|
+
// at this version, child elements should not have customId, since that property comes from strapi and strapi provides only one level structure
|
|
164
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
165
|
+
findActiveElement(items, includeChildren) {
|
|
166
|
+
if (!items?.length) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
let customIdElement;
|
|
170
|
+
for (const item of items) {
|
|
171
|
+
// Child element has priority over parent, so need to check if any child is active
|
|
172
|
+
if (this.isElementRouterLinkActive(item)) {
|
|
173
|
+
// If has children and they are visible, return active child or current item
|
|
174
|
+
return includeChildren ? this.findActiveElement(item.children, includeChildren) ?? item : item;
|
|
175
|
+
}
|
|
176
|
+
// if selected custom id element is hidden, no need to look for it and set it to active;
|
|
177
|
+
else if (!this.hideSelectedCustomId && this.isElementCustomIdActive(item)) {
|
|
178
|
+
customIdElement = item;
|
|
179
|
+
}
|
|
180
|
+
else if (includeChildren && item.children?.length) {
|
|
181
|
+
const activeChild = this.findActiveElement(item.children, includeChildren);
|
|
182
|
+
if (activeChild) {
|
|
183
|
+
return activeChild;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return customIdElement;
|
|
188
|
+
}
|
|
189
|
+
getStrapiData() {
|
|
190
|
+
if (!this.menuSharedConfig?.disableStrapi) {
|
|
191
|
+
this.strapiService.getMenuItems().subscribe(this.loadData.bind(this));
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this.loadData([]);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
loadData(data) {
|
|
198
|
+
// hide custom id based on input param
|
|
199
|
+
this.strapiItems = (this.hideSelectedCustomId && this.customId) ? data.filter(item => item.customId !== this.customId) : data;
|
|
200
|
+
this._strapiGroup = {
|
|
201
|
+
...this.strapiGroupBase,
|
|
202
|
+
items: this.strapiItems
|
|
203
|
+
};
|
|
204
|
+
if (this.strapiDataLocation === StrapiDataLocation.START) {
|
|
205
|
+
this._mergedGroups = [this.strapiGroup, ...this.menuItemGroups ?? []];
|
|
206
|
+
}
|
|
207
|
+
else if (this.strapiDataLocation === StrapiDataLocation.END) {
|
|
208
|
+
this._mergedGroups = [...this.menuItemGroups ?? [], this.strapiGroup];
|
|
209
|
+
}
|
|
210
|
+
const allItems = this.mergedGroups.map(map => map.items);
|
|
211
|
+
let newArray = [];
|
|
212
|
+
allItems.forEach((array) => { newArray = newArray.concat(array); });
|
|
213
|
+
this._allRootItems = newArray;
|
|
214
|
+
this.updateActive();
|
|
215
|
+
}
|
|
216
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
217
|
+
// private isMenuItem(item: any): item is MenuItems {
|
|
218
|
+
// return item.customId;
|
|
219
|
+
// }
|
|
220
|
+
isElementCustomIdActive(element) {
|
|
221
|
+
return this.customId && element.customId === this.customId;
|
|
222
|
+
}
|
|
223
|
+
isElementRouterLinkActive(element) {
|
|
224
|
+
const routerLinkActiveOptions = element.routerLinkActiveOptions ?? this.menuSharedConfig.activeMatchOptions ?? this.isActiveMatchOptions;
|
|
225
|
+
return this.router.isActive(element.link, routerLinkActiveOptions);
|
|
226
|
+
}
|
|
227
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemsService, deps: [{ token: i1$1.Router }, { token: MENU_SHARED_CONFIG, optional: true }, { token: StarpiMenuService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
228
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemsService, providedIn: 'root' }); }
|
|
229
|
+
}
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemsService, decorators: [{
|
|
231
|
+
type: Injectable,
|
|
232
|
+
args: [{
|
|
233
|
+
providedIn: 'root'
|
|
234
|
+
}]
|
|
235
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: undefined, decorators: [{
|
|
236
|
+
type: Optional
|
|
237
|
+
}, {
|
|
238
|
+
type: Inject,
|
|
239
|
+
args: [MENU_SHARED_CONFIG]
|
|
240
|
+
}] }, { type: StarpiMenuService }]; } });
|
|
241
|
+
|
|
242
|
+
/** This component is created to help nest some common input params through nav components. */
|
|
243
|
+
class NavBaseComponent {
|
|
244
|
+
constructor(menuItemsService) {
|
|
245
|
+
this.menuItemsService = menuItemsService;
|
|
246
|
+
}
|
|
247
|
+
ngOnInit() {
|
|
248
|
+
this.initBase();
|
|
249
|
+
}
|
|
250
|
+
initBase() {
|
|
251
|
+
this.activeItemSubscription = this.menuItemsService.activeElements.subscribe((active) => {
|
|
252
|
+
this.active = active;
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
ngOnDestroy() {
|
|
256
|
+
this.destroyBase();
|
|
257
|
+
}
|
|
258
|
+
destroyBase() {
|
|
259
|
+
this.activeItemSubscription?.unsubscribe();
|
|
260
|
+
}
|
|
261
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NavBaseComponent, deps: [{ token: MenuItemsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
262
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: NavBaseComponent, selector: "nav-base", inputs: { direction: "direction" }, ngImport: i0, template: "<p>nav-base works!</p>\r\n", styles: [""] }); }
|
|
263
|
+
}
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: NavBaseComponent, decorators: [{
|
|
265
|
+
type: Component,
|
|
266
|
+
args: [{ selector: 'nav-base', template: "<p>nav-base works!</p>\r\n" }]
|
|
267
|
+
}], ctorParameters: function () { return [{ type: MenuItemsService }]; }, propDecorators: { direction: [{
|
|
268
|
+
type: Input
|
|
269
|
+
}] } });
|
|
270
|
+
|
|
271
|
+
var MenuLayoutDirection;
|
|
272
|
+
(function (MenuLayoutDirection) {
|
|
273
|
+
MenuLayoutDirection["column"] = "column";
|
|
274
|
+
MenuLayoutDirection["row"] = "row";
|
|
275
|
+
})(MenuLayoutDirection || (MenuLayoutDirection = {}));
|
|
276
|
+
|
|
156
277
|
class MenuIconComponent {
|
|
157
278
|
constructor() {
|
|
158
279
|
this.svgExtension = MENU_ICON_STRAPI_EXTENSION;
|
|
@@ -162,7 +283,7 @@ class MenuIconComponent {
|
|
|
162
283
|
return typeof icon !== "string";
|
|
163
284
|
}
|
|
164
285
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
165
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuIconComponent, selector: "tld-menu-icon", inputs: { menuItem: "menuItem" }, ngImport: i0, template: "<ng-container *ngIf=\"menuItem.icon\">\r\n <mat-icon class=\"menu-icon\" [svgIcon]=\"menuItem.icon\" *ngIf=\"!menuItem.materialIcon; else materialIcon;\"></mat-icon>\r\n <ng-template #materialIcon>\r\n <mat-icon class=\"menu-icon\">{{menuItem.icon}}</mat-icon>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".menu-icon{color:var(--base-40);margin:auto;min-width:24px;min-height:24px;max-width:24px;max-height:24px;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type:
|
|
286
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuIconComponent, selector: "tld-menu-icon", inputs: { menuItem: "menuItem" }, ngImport: i0, template: "<ng-container *ngIf=\"menuItem.icon\">\r\n <mat-icon class=\"menu-icon\" [svgIcon]=\"menuItem.icon\" *ngIf=\"!menuItem.materialIcon; else materialIcon;\"></mat-icon>\r\n <ng-template #materialIcon>\r\n <mat-icon class=\"menu-icon\">{{menuItem.icon}}</mat-icon>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".menu-icon{color:var(--base-40);margin:auto;min-width:24px;min-height:24px;max-width:24px;max-height:24px;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
166
287
|
}
|
|
167
288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuIconComponent, decorators: [{
|
|
168
289
|
type: Component,
|
|
@@ -196,7 +317,7 @@ class MenuItemLinkComponent {
|
|
|
196
317
|
this.placeholderService.unregister(this.placeholderServiceId);
|
|
197
318
|
}
|
|
198
319
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemLinkComponent, deps: [{ token: i1.StrapiLinkService }, { token: i1.StrapiVariablesService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
199
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuItemLinkComponent, selector: "tld-menu-item-link", inputs: { direction: "direction", labelsVisible: "labelsVisible", activeItem: "activeItem", showIcons: "showIcons", menuItem: "menuItem" }, ngImport: i0, template: "<a [libPlausibleEvent]=\"menuItem.plausibleEvent\" [fxLayout]=\"menuItemLayout\"\r\n [class.text-center]=\"menuItemLayout === 'column'\" class=\"text-m menu-item\"\r\n [matTooltip]=\"!labelsVisible ? (menuItem.title | translate) : ''\" matTooltipPosition=\"after\"\r\n [fxLayoutAlign]=\"menuLayoutDirection\" matTooltipClass=\"menu-tooltip\" (click)=\"linkClick($event, menuItem)\"\r\n [href]=\"href | translate\" [attr.target]=\"menuItem.externalLink?'_blank': '_self'\" fxLayoutGap=\"0.375rem\"\r\n [class.active-menu-item]=\"menuItem === activeItem\">\r\n <ng-container *ngIf=\"showIcons && menuItem.icon\">\r\n <tld-menu-icon [menuItem]=\"menuItem\"></tld-menu-icon>\r\n </ng-container>\r\n <span *ngIf=\"labelsVisible\" class=\"menu-item-title\">\r\n <span class=\"title-content\" [attr.content]=\"menuItem.title | translate\">\r\n {{ menuItem.title | translate}}\r\n </span>\r\n </span>\r\n</a>\r\n", styles: [""], dependencies: [{ kind: "directive", type:
|
|
320
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuItemLinkComponent, selector: "tld-menu-item-link", inputs: { direction: "direction", labelsVisible: "labelsVisible", activeItem: "activeItem", showIcons: "showIcons", menuItem: "menuItem" }, ngImport: i0, template: "<a [libPlausibleEvent]=\"menuItem.plausibleEvent\" [fxLayout]=\"menuItemLayout\"\r\n [class.text-center]=\"menuItemLayout === 'column'\" class=\"text-m menu-item\"\r\n [matTooltip]=\"!labelsVisible ? (menuItem.title | translate) : ''\" matTooltipPosition=\"after\"\r\n [fxLayoutAlign]=\"menuLayoutDirection\" matTooltipClass=\"menu-tooltip\" (click)=\"linkClick($event, menuItem)\"\r\n [href]=\"href | translate\" [attr.target]=\"menuItem.externalLink?'_blank': '_self'\" fxLayoutGap=\"0.375rem\"\r\n [class.active-menu-item]=\"menuItem === activeItem\">\r\n <ng-container *ngIf=\"showIcons && menuItem.icon\">\r\n <tld-menu-icon [menuItem]=\"menuItem\"></tld-menu-icon>\r\n </ng-container>\r\n <span *ngIf=\"labelsVisible\" class=\"menu-item-title\">\r\n <span class=\"title-content\" [attr.content]=\"menuItem.title | translate\">\r\n {{ menuItem.title | translate}}\r\n </span>\r\n </span>\r\n</a>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i2.PlausibleEventDirective, selector: "[libPlausibleEvent]", inputs: ["libPlausibleEvent"] }, { kind: "component", type: MenuIconComponent, selector: "tld-menu-icon", inputs: ["menuItem"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
200
321
|
}
|
|
201
322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemLinkComponent, decorators: [{
|
|
202
323
|
type: Component,
|
|
@@ -242,11 +363,11 @@ class MenuItemListComponent {
|
|
|
242
363
|
this.toggleExpand.next(menuItem);
|
|
243
364
|
}
|
|
244
365
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
245
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuItemListComponent, selector: "menu-item-list", inputs: { direction: "direction", labelsVisible: "labelsVisible", activeItem: "activeItem", showIcons: "showIcons", showChildren: "showChildren", items: "items", menuItemGroup: "menuItemGroup" }, outputs: { toggleExpand: "toggleExpand" }, ngImport: i0, template: "<div class=\"menu-list-wrapper\">\r\n <div *ngIf=\"titleKey && showTitle && labelsVisible\" fxLayoutAlign=\"start center\" class=\"menu-item-list-title\">\r\n {{ titleKey | translate }}\r\n </div>\r\n <div fxLayout=\"column\" [fxLayoutAlign]=\"menuLayoutDirection\" class=\"menu-item-list\">\r\n <ng-container *ngFor=\"let menuItem of items\">\r\n <ng-container\r\n *ngTemplateOutlet=\"!showChildren || !menuItem.children || menuItem?.children?.length === 0 ? menuItemLink : itemWithChildren; context: {menuItem: menuItem}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-template #itemWithChildren let-menuItem=\"menuItem\">\r\n <button [fxLayout]=\"menuItemLayout\" [class.text-center]=\"menuItemLayout === 'column'\" class=\"text-m menu-item\"\r\n [matTooltip]=\"!labelsVisible ? (menuItem.title | translate) : ''\" matTooltipPosition=\"after\"\r\n [fxLayoutAlign]=\"menuLayoutDirection\" matTooltipClass=\"menu-tooltip\" fxLayoutGap=\"0.375rem\"\r\n [class.active-menu-item]=\"menuItem === activeItem\" (click)=\"toggleItemExpand($event,menuItem)\">\r\n <ng-container *ngIf=\"showIcons && menuItem.icon\">\r\n <tld-menu-icon [menuItem]=\"menuItem\"></tld-menu-icon>\r\n </ng-container>\r\n <span *ngIf=\"labelsVisible\" class=\"menu-item-title\">\r\n <span class=\"title-content\">{{ menuItem.title | translate }}</span></span>\r\n <span class=\"material-icons\" *ngIf=\"showChildren && menuItem.children\">\r\n {{menuItem.expanded? 'expand_more' : 'navigate_next'}}\r\n </span>\r\n </button>\r\n <ng-container *ngIf=\"showChildren && menuItem.expanded\">\r\n <menu-item-list class=\"child-list\" *ngIf=\"menuItem.children && menuItem.children.length\" [items]=\"menuItem.children\"\r\n [direction]=\"direction\" [labelsVisible]=\"labelsVisible\" [activeItem]=\"activeItem\" [showIcons]=\"false\">\r\n </menu-item-list>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #menuItemLink let-menuItem=\"menuItem\">\r\n <tld-menu-item-link [menuItem]=\"menuItem\" [direction]=\"direction\" [labelsVisible]=\"labelsVisible\"\r\n [activeItem]=\"activeItem\" [showIcons]=\"showIcons\"></tld-menu-item-link>\r\n</ng-template
|
|
366
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuItemListComponent, selector: "menu-item-list", inputs: { direction: "direction", labelsVisible: "labelsVisible", activeItem: "activeItem", showIcons: "showIcons", showChildren: "showChildren", items: "items", menuItemGroup: "menuItemGroup" }, outputs: { toggleExpand: "toggleExpand" }, ngImport: i0, template: "<div class=\"menu-list-wrapper\">\r\n <div *ngIf=\"titleKey && showTitle && labelsVisible\" fxLayoutAlign=\"start center\" class=\"menu-item-list-title\">\r\n {{ titleKey | translate }}\r\n </div>\r\n <div fxLayout=\"column\" [fxLayoutAlign]=\"menuLayoutDirection\" class=\"menu-item-list\">\r\n <ng-container *ngFor=\"let menuItem of items\">\r\n <ng-container\r\n *ngTemplateOutlet=\"!showChildren || !menuItem.children || menuItem?.children?.length === 0 ? menuItemLink : itemWithChildren; context: {menuItem: menuItem}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-template #itemWithChildren let-menuItem=\"menuItem\">\r\n <button [fxLayout]=\"menuItemLayout\" [class.text-center]=\"menuItemLayout === 'column'\" class=\"text-m menu-item\"\r\n [matTooltip]=\"!labelsVisible ? (menuItem.title | translate) : ''\" matTooltipPosition=\"after\"\r\n [fxLayoutAlign]=\"menuLayoutDirection\" matTooltipClass=\"menu-tooltip\" fxLayoutGap=\"0.375rem\"\r\n [class.active-menu-item]=\"menuItem === activeItem\" (click)=\"toggleItemExpand($event,menuItem)\">\r\n <ng-container *ngIf=\"showIcons && menuItem.icon\">\r\n <tld-menu-icon [menuItem]=\"menuItem\"></tld-menu-icon>\r\n </ng-container>\r\n <span *ngIf=\"labelsVisible\" class=\"menu-item-title\">\r\n <span class=\"title-content\">{{ menuItem.title | translate }}</span></span>\r\n <span class=\"material-icons\" *ngIf=\"showChildren && menuItem.children\">\r\n {{menuItem.expanded? 'expand_more' : 'navigate_next'}}\r\n </span>\r\n </button>\r\n <ng-container *ngIf=\"showChildren && menuItem.expanded\">\r\n <menu-item-list class=\"child-list\" *ngIf=\"menuItem.children && menuItem.children.length\" [items]=\"menuItem.children\"\r\n [direction]=\"direction\" [labelsVisible]=\"labelsVisible\" [activeItem]=\"activeItem\" [showIcons]=\"false\">\r\n </menu-item-list>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #menuItemLink let-menuItem=\"menuItem\">\r\n <tld-menu-item-link [menuItem]=\"menuItem\" [direction]=\"direction\" [labelsVisible]=\"labelsVisible\"\r\n [activeItem]=\"activeItem\" [showIcons]=\"showIcons\"></tld-menu-item-link>\r\n</ng-template>", styles: [":host{margin:1em 0;display:inline-block}:host::ng-deep .menu-list-wrapper .menu-item-list-title{margin-bottom:1em;font-size:1rem;font-weight:500;line-height:1.5rem}:host::ng-deep .menu-list-wrapper .text-center{text-align:center}:host::ng-deep .menu-list-wrapper tld-menu-item-link+tld-menu-item-link,:host::ng-deep .menu-list-wrapper tld-menu-item-link+.menu-item,:host::ng-deep .menu-list-wrapper .menu-item+tld-menu-item-link,:host::ng-deep .menu-list-wrapper .menu-item+.menu-item{margin-top:1.5625em}:host::ng-deep .menu-list-wrapper .menu-item{cursor:pointer;font-style:normal;color:var(--base-30);text-decoration:none;align-items:center!important;font-weight:400;background:none;border:none}:host::ng-deep .menu-list-wrapper .menu-item:focus-visible{outline:black solid 2px}:host::ng-deep .menu-list-wrapper .menu-item:not(button):hover{font-weight:600}:host::ng-deep .menu-list-wrapper .menu-item.active-menu-item,:host::ng-deep .menu-list-wrapper .menu-item.active-menu-item mat-icon,:host::ng-deep .menu-list-wrapper .menu-item.active-menu-item:hover{color:var(--primary-accent)!important;font-weight:600}:host::ng-deep .menu-list-wrapper .menu-item span{display:inline-block}:host::ng-deep .menu-list-wrapper .menu-item .menu-item-title{display:flex;flex-direction:row;flex-grow:100;align-items:start}:host::ng-deep .menu-list-wrapper .menu-item .menu-item-title .title-content{display:block}:host::ng-deep .menu-list-wrapper .menu-item .menu-item-title .title-content:before{display:block;content:attr(content);font-weight:600;height:0;overflow:hidden;visibility:hidden}:host.child-list{margin-top:1rem;margin-bottom:1rem}:host.child-list .menu-item+.menu-item{margin-top:.5rem}::ng-deep .menu-tooltip{left:.625rem;font-family:Roboto;font-style:normal;font-weight:400;font-size:.75rem;line-height:1.25rem;color:var(--base-70);border-radius:.25rem;position:relative}::ng-deep .menu-tooltip:after{width:0;height:0;content:\"\";position:absolute;border-left:.5rem solid transparent;border-right:.5rem solid transparent;border-bottom:.5rem solid var(--menu-border-dark-color);left:-.75rem;top:calc(50% - .25rem);transform:rotate(270deg);overflow:initial}menu-item-list{padding-left:3rem;margin:0}\n"], dependencies: [{ kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: MenuItemListComponent, selector: "menu-item-list", inputs: ["direction", "labelsVisible", "activeItem", "showIcons", "showChildren", "items", "menuItemGroup"], outputs: ["toggleExpand"] }, { kind: "component", type: MenuIconComponent, selector: "tld-menu-icon", inputs: ["menuItem"] }, { kind: "component", type: MenuItemLinkComponent, selector: "tld-menu-item-link", inputs: ["direction", "labelsVisible", "activeItem", "showIcons", "menuItem"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
246
367
|
}
|
|
247
368
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemListComponent, decorators: [{
|
|
248
369
|
type: Component,
|
|
249
|
-
args: [{ selector: 'menu-item-list', template: "<div class=\"menu-list-wrapper\">\r\n <div *ngIf=\"titleKey && showTitle && labelsVisible\" fxLayoutAlign=\"start center\" class=\"menu-item-list-title\">\r\n {{ titleKey | translate }}\r\n </div>\r\n <div fxLayout=\"column\" [fxLayoutAlign]=\"menuLayoutDirection\" class=\"menu-item-list\">\r\n <ng-container *ngFor=\"let menuItem of items\">\r\n <ng-container\r\n *ngTemplateOutlet=\"!showChildren || !menuItem.children || menuItem?.children?.length === 0 ? menuItemLink : itemWithChildren; context: {menuItem: menuItem}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-template #itemWithChildren let-menuItem=\"menuItem\">\r\n <button [fxLayout]=\"menuItemLayout\" [class.text-center]=\"menuItemLayout === 'column'\" class=\"text-m menu-item\"\r\n [matTooltip]=\"!labelsVisible ? (menuItem.title | translate) : ''\" matTooltipPosition=\"after\"\r\n [fxLayoutAlign]=\"menuLayoutDirection\" matTooltipClass=\"menu-tooltip\" fxLayoutGap=\"0.375rem\"\r\n [class.active-menu-item]=\"menuItem === activeItem\" (click)=\"toggleItemExpand($event,menuItem)\">\r\n <ng-container *ngIf=\"showIcons && menuItem.icon\">\r\n <tld-menu-icon [menuItem]=\"menuItem\"></tld-menu-icon>\r\n </ng-container>\r\n <span *ngIf=\"labelsVisible\" class=\"menu-item-title\">\r\n <span class=\"title-content\">{{ menuItem.title | translate }}</span></span>\r\n <span class=\"material-icons\" *ngIf=\"showChildren && menuItem.children\">\r\n {{menuItem.expanded? 'expand_more' : 'navigate_next'}}\r\n </span>\r\n </button>\r\n <ng-container *ngIf=\"showChildren && menuItem.expanded\">\r\n <menu-item-list class=\"child-list\" *ngIf=\"menuItem.children && menuItem.children.length\" [items]=\"menuItem.children\"\r\n [direction]=\"direction\" [labelsVisible]=\"labelsVisible\" [activeItem]=\"activeItem\" [showIcons]=\"false\">\r\n </menu-item-list>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #menuItemLink let-menuItem=\"menuItem\">\r\n <tld-menu-item-link [menuItem]=\"menuItem\" [direction]=\"direction\" [labelsVisible]=\"labelsVisible\"\r\n [activeItem]=\"activeItem\" [showIcons]=\"showIcons\"></tld-menu-item-link>\r\n</ng-template
|
|
370
|
+
args: [{ selector: 'menu-item-list', template: "<div class=\"menu-list-wrapper\">\r\n <div *ngIf=\"titleKey && showTitle && labelsVisible\" fxLayoutAlign=\"start center\" class=\"menu-item-list-title\">\r\n {{ titleKey | translate }}\r\n </div>\r\n <div fxLayout=\"column\" [fxLayoutAlign]=\"menuLayoutDirection\" class=\"menu-item-list\">\r\n <ng-container *ngFor=\"let menuItem of items\">\r\n <ng-container\r\n *ngTemplateOutlet=\"!showChildren || !menuItem.children || menuItem?.children?.length === 0 ? menuItemLink : itemWithChildren; context: {menuItem: menuItem}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<ng-template #itemWithChildren let-menuItem=\"menuItem\">\r\n <button [fxLayout]=\"menuItemLayout\" [class.text-center]=\"menuItemLayout === 'column'\" class=\"text-m menu-item\"\r\n [matTooltip]=\"!labelsVisible ? (menuItem.title | translate) : ''\" matTooltipPosition=\"after\"\r\n [fxLayoutAlign]=\"menuLayoutDirection\" matTooltipClass=\"menu-tooltip\" fxLayoutGap=\"0.375rem\"\r\n [class.active-menu-item]=\"menuItem === activeItem\" (click)=\"toggleItemExpand($event,menuItem)\">\r\n <ng-container *ngIf=\"showIcons && menuItem.icon\">\r\n <tld-menu-icon [menuItem]=\"menuItem\"></tld-menu-icon>\r\n </ng-container>\r\n <span *ngIf=\"labelsVisible\" class=\"menu-item-title\">\r\n <span class=\"title-content\">{{ menuItem.title | translate }}</span></span>\r\n <span class=\"material-icons\" *ngIf=\"showChildren && menuItem.children\">\r\n {{menuItem.expanded? 'expand_more' : 'navigate_next'}}\r\n </span>\r\n </button>\r\n <ng-container *ngIf=\"showChildren && menuItem.expanded\">\r\n <menu-item-list class=\"child-list\" *ngIf=\"menuItem.children && menuItem.children.length\" [items]=\"menuItem.children\"\r\n [direction]=\"direction\" [labelsVisible]=\"labelsVisible\" [activeItem]=\"activeItem\" [showIcons]=\"false\">\r\n </menu-item-list>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #menuItemLink let-menuItem=\"menuItem\">\r\n <tld-menu-item-link [menuItem]=\"menuItem\" [direction]=\"direction\" [labelsVisible]=\"labelsVisible\"\r\n [activeItem]=\"activeItem\" [showIcons]=\"showIcons\"></tld-menu-item-link>\r\n</ng-template>", styles: [":host{margin:1em 0;display:inline-block}:host::ng-deep .menu-list-wrapper .menu-item-list-title{margin-bottom:1em;font-size:1rem;font-weight:500;line-height:1.5rem}:host::ng-deep .menu-list-wrapper .text-center{text-align:center}:host::ng-deep .menu-list-wrapper tld-menu-item-link+tld-menu-item-link,:host::ng-deep .menu-list-wrapper tld-menu-item-link+.menu-item,:host::ng-deep .menu-list-wrapper .menu-item+tld-menu-item-link,:host::ng-deep .menu-list-wrapper .menu-item+.menu-item{margin-top:1.5625em}:host::ng-deep .menu-list-wrapper .menu-item{cursor:pointer;font-style:normal;color:var(--base-30);text-decoration:none;align-items:center!important;font-weight:400;background:none;border:none}:host::ng-deep .menu-list-wrapper .menu-item:focus-visible{outline:black solid 2px}:host::ng-deep .menu-list-wrapper .menu-item:not(button):hover{font-weight:600}:host::ng-deep .menu-list-wrapper .menu-item.active-menu-item,:host::ng-deep .menu-list-wrapper .menu-item.active-menu-item mat-icon,:host::ng-deep .menu-list-wrapper .menu-item.active-menu-item:hover{color:var(--primary-accent)!important;font-weight:600}:host::ng-deep .menu-list-wrapper .menu-item span{display:inline-block}:host::ng-deep .menu-list-wrapper .menu-item .menu-item-title{display:flex;flex-direction:row;flex-grow:100;align-items:start}:host::ng-deep .menu-list-wrapper .menu-item .menu-item-title .title-content{display:block}:host::ng-deep .menu-list-wrapper .menu-item .menu-item-title .title-content:before{display:block;content:attr(content);font-weight:600;height:0;overflow:hidden;visibility:hidden}:host.child-list{margin-top:1rem;margin-bottom:1rem}:host.child-list .menu-item+.menu-item{margin-top:.5rem}::ng-deep .menu-tooltip{left:.625rem;font-family:Roboto;font-style:normal;font-weight:400;font-size:.75rem;line-height:1.25rem;color:var(--base-70);border-radius:.25rem;position:relative}::ng-deep .menu-tooltip:after{width:0;height:0;content:\"\";position:absolute;border-left:.5rem solid transparent;border-right:.5rem solid transparent;border-bottom:.5rem solid var(--menu-border-dark-color);left:-.75rem;top:calc(50% - .25rem);transform:rotate(270deg);overflow:initial}menu-item-list{padding-left:3rem;margin:0}\n"] }]
|
|
250
371
|
}], propDecorators: { direction: [{
|
|
251
372
|
type: Input
|
|
252
373
|
}], labelsVisible: [{
|
|
@@ -266,153 +387,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
266
387
|
}] } });
|
|
267
388
|
|
|
268
389
|
class MenuColumnsComponent {
|
|
269
|
-
get
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
get mergedGroups() { return this._mergedGroups; }
|
|
278
|
-
get allRootItems() {
|
|
279
|
-
const allItems = this.mergedGroups.map(map => map.items);
|
|
280
|
-
let newArray = [];
|
|
281
|
-
allItems.forEach((array) => { newArray = newArray.concat(array); });
|
|
282
|
-
return newArray;
|
|
390
|
+
get active() { return this._active; }
|
|
391
|
+
set active(value) {
|
|
392
|
+
this._active = value;
|
|
393
|
+
if (!value) {
|
|
394
|
+
this.activeItem = undefined;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
this.elementExpanded(this.active?.root);
|
|
283
398
|
}
|
|
284
|
-
|
|
285
|
-
|
|
399
|
+
get mergedGroups() { return this.menuItemsService.mergedGroups; }
|
|
400
|
+
constructor(router, menuSharedConfig, menuItemsService) {
|
|
286
401
|
this.router = router;
|
|
287
402
|
this.menuSharedConfig = menuSharedConfig;
|
|
403
|
+
this.menuItemsService = menuItemsService;
|
|
288
404
|
this.direction = MenuLayoutDirection.column;
|
|
289
|
-
this.hideSelectedCustomId = false;
|
|
290
|
-
this.strapiGroupBase = {};
|
|
291
|
-
this.strapiDataLocation = StrapiDataLocation.END;
|
|
292
405
|
this.labelsVisible = true;
|
|
293
|
-
this._menuItemGroups = [];
|
|
294
|
-
this.subscribedToStrapi = false;
|
|
295
|
-
this.strapiItems = [];
|
|
296
|
-
this._mergedGroups = [];
|
|
297
406
|
this.subscriptions = [];
|
|
298
|
-
this.isActiveMatchOptions = {
|
|
299
|
-
matrixParams: 'exact',
|
|
300
|
-
queryParams: 'exact',
|
|
301
|
-
paths: 'exact',
|
|
302
|
-
fragment: 'exact'
|
|
303
|
-
};
|
|
304
407
|
}
|
|
305
408
|
ngOnInit() {
|
|
306
|
-
this.
|
|
307
|
-
this.getStrapiData();
|
|
409
|
+
this.activeItem = this.active.root;
|
|
308
410
|
}
|
|
309
411
|
ngOnDestroy() {
|
|
310
412
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
311
|
-
if (this.subscribedToStrapi) {
|
|
312
|
-
this.strapiService.unsubscribe();
|
|
313
|
-
}
|
|
314
413
|
}
|
|
315
414
|
elementExpanded(element) {
|
|
316
|
-
if (!this.
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
// if active item is expanded, most likely some of his child should be active, or if it is collapsed, most likely parent should be active if no route change.
|
|
320
|
-
if (element !== this.activeItem && !element.children?.includes(this.activeItem)) {
|
|
415
|
+
if (!this.active || !element) {
|
|
321
416
|
return;
|
|
322
417
|
}
|
|
323
|
-
this.
|
|
324
|
-
|
|
325
|
-
getStrapiData() {
|
|
326
|
-
if (!this.menuSharedConfig?.disableStrapi) {
|
|
327
|
-
this.subscribedToStrapi = true;
|
|
328
|
-
this.strapiService.getMenuItems().subscribe(this.loadData.bind(this));
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
loadData(data) {
|
|
332
|
-
// hide custom id based on input param
|
|
333
|
-
this.strapiItems = (this.hideSelectedCustomId && this.customId) ? data.filter(item => item.customId !== this.customId) : data;
|
|
334
|
-
this._strapiGroup = {
|
|
335
|
-
...this.strapiGroupBase,
|
|
336
|
-
items: this.strapiItems
|
|
337
|
-
};
|
|
338
|
-
if (this.strapiDataLocation === StrapiDataLocation.START) {
|
|
339
|
-
this._mergedGroups = [this.strapiGroup, ...this.menuItemGroups];
|
|
418
|
+
if (this.showChildren && element.expanded && element === this.active.root) {
|
|
419
|
+
this.activeItem = this.active.child;
|
|
340
420
|
}
|
|
341
|
-
else
|
|
342
|
-
this.
|
|
343
|
-
}
|
|
344
|
-
this.changeActiveElement();
|
|
345
|
-
}
|
|
346
|
-
subscribeOnRouteChange() {
|
|
347
|
-
const subscription = this.router.events
|
|
348
|
-
.pipe(filter(e => e instanceof NavigationEnd))
|
|
349
|
-
.subscribe(() => { this.changeActiveElement(); });
|
|
350
|
-
this.subscriptions.push(subscription);
|
|
351
|
-
}
|
|
352
|
-
changeActiveElement() {
|
|
353
|
-
this.activeItem = this.findActiveElement(this.allRootItems);
|
|
354
|
-
}
|
|
355
|
-
/** Finds active element from whole list. RouterLink has priority over custom Id. */
|
|
356
|
-
// at this version, child elements should not have customId, since that property comes from strapi and strapi provides only one level structure
|
|
357
|
-
findActiveElement(list) {
|
|
358
|
-
if (!list) {
|
|
359
|
-
return null;
|
|
360
|
-
}
|
|
361
|
-
let customIdElement = null;
|
|
362
|
-
for (const item of list) {
|
|
363
|
-
// Child element has priority over parent, so need to check if any child is active
|
|
364
|
-
if (this.isElementRouterLinkActive(item)) {
|
|
365
|
-
// If has children and they are visible, return active child or current item
|
|
366
|
-
return this.showChildren && item.expanded ? this.findActiveElement(item.children) ?? item : item;
|
|
367
|
-
}
|
|
368
|
-
// if selected custom id element is hidden, no need to look for it and set it to active;
|
|
369
|
-
else if (!this.hideSelectedCustomId && this.isElementCustomIdActive(item)) {
|
|
370
|
-
customIdElement = item;
|
|
371
|
-
}
|
|
372
|
-
else if (this.showChildren && item.children?.length) {
|
|
373
|
-
const activeChild = this.findActiveElement(item.children);
|
|
374
|
-
if (activeChild) {
|
|
375
|
-
return activeChild;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
421
|
+
else {
|
|
422
|
+
this.activeItem = this.active.root;
|
|
378
423
|
}
|
|
379
|
-
return customIdElement;
|
|
380
424
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
// return item.customId;
|
|
384
|
-
// }
|
|
385
|
-
isElementCustomIdActive(element) {
|
|
386
|
-
return this.customId && element.customId === this.customId;
|
|
387
|
-
}
|
|
388
|
-
isElementRouterLinkActive(element) {
|
|
389
|
-
const routerLinkActiveOptions = element.routerLinkActiveOptions ?? this.menuSharedConfig.activeMatchOptions ?? this.isActiveMatchOptions;
|
|
390
|
-
return this.router.isActive(element.link, routerLinkActiveOptions);
|
|
391
|
-
}
|
|
392
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuColumnsComponent, deps: [{ token: StarpiMenuService }, { token: i2$2.Router }, { token: MENU_SHARED_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuColumnsComponent, selector: "menu-columns", inputs: { direction: "direction", hideSelectedCustomId: "hideSelectedCustomId", strapiGroupBase: "strapiGroupBase", strapiDataLocation: "strapiDataLocation", labelsVisible: "labelsVisible", showChildren: "showChildren", menuItemGroups: "menuItemGroups" }, ngImport: i0, template: "<ng-container *ngFor=\"let group of mergedGroups\">\r\n <menu-item-list *ngIf=\"group.items.length\" [activeItem]=\"activeItem\" [direction]=\"direction\" (toggleExpand)=\"elementExpanded($event)\"\r\n [labelsVisible]=\"labelsVisible\" [menuItemGroup]=\"group\" [items]=\"group.items\" [showChildren]=\"showChildren\">\r\n </menu-item-list>\r\n <div class=\"divider\" *ngIf=\"group.bottomDivider\">\r\n <mat-divider></mat-divider>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:inline-block}:host menu-item-list{display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MenuItemListComponent, selector: "menu-item-list", inputs: ["direction", "labelsVisible", "activeItem", "showIcons", "showChildren", "items", "menuItemGroup"], outputs: ["toggleExpand"] }] }); }
|
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuColumnsComponent, deps: [{ token: i1$1.Router }, { token: MENU_SHARED_CONFIG, optional: true }, { token: MenuItemsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuColumnsComponent, selector: "menu-columns", inputs: { direction: "direction", labelsVisible: "labelsVisible", showChildren: "showChildren", active: "active" }, ngImport: i0, template: "<ng-container *ngFor=\"let group of mergedGroups\">\r\n <menu-item-list *ngIf=\"group.items.length\" [activeItem]=\"activeItem\" [direction]=\"direction\"\r\n (toggleExpand)=\"elementExpanded($event)\" [labelsVisible]=\"labelsVisible\" [menuItemGroup]=\"group\"\r\n [items]=\"group.items\" [showChildren]=\"showChildren\">\r\n </menu-item-list>\r\n <div class=\"divider\" *ngIf=\"group.bottomDivider\">\r\n <mat-divider></mat-divider>\r\n </div>\r\n</ng-container>", styles: [":host{display:inline-block}:host menu-item-list{display:block}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MenuItemListComponent, selector: "menu-item-list", inputs: ["direction", "labelsVisible", "activeItem", "showIcons", "showChildren", "items", "menuItemGroup"], outputs: ["toggleExpand"] }] }); }
|
|
394
427
|
}
|
|
395
428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuColumnsComponent, decorators: [{
|
|
396
429
|
type: Component,
|
|
397
|
-
args: [{ selector: 'menu-columns', template: "<ng-container *ngFor=\"let group of mergedGroups\">\r\n <menu-item-list *ngIf=\"group.items.length\" [activeItem]=\"activeItem\" [direction]=\"direction\"
|
|
398
|
-
}], ctorParameters: function () { return [{ type:
|
|
430
|
+
args: [{ selector: 'menu-columns', template: "<ng-container *ngFor=\"let group of mergedGroups\">\r\n <menu-item-list *ngIf=\"group.items.length\" [activeItem]=\"activeItem\" [direction]=\"direction\"\r\n (toggleExpand)=\"elementExpanded($event)\" [labelsVisible]=\"labelsVisible\" [menuItemGroup]=\"group\"\r\n [items]=\"group.items\" [showChildren]=\"showChildren\">\r\n </menu-item-list>\r\n <div class=\"divider\" *ngIf=\"group.bottomDivider\">\r\n <mat-divider></mat-divider>\r\n </div>\r\n</ng-container>", styles: [":host{display:inline-block}:host menu-item-list{display:block}\n"] }]
|
|
431
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: undefined, decorators: [{
|
|
399
432
|
type: Optional
|
|
400
433
|
}, {
|
|
401
434
|
type: Inject,
|
|
402
435
|
args: [MENU_SHARED_CONFIG]
|
|
403
|
-
}] }]; }, propDecorators: { direction: [{
|
|
404
|
-
type: Input
|
|
405
|
-
}], hideSelectedCustomId: [{
|
|
406
|
-
type: Input
|
|
407
|
-
}], strapiGroupBase: [{
|
|
408
|
-
type: Input
|
|
409
|
-
}], strapiDataLocation: [{
|
|
436
|
+
}] }, { type: MenuItemsService }]; }, propDecorators: { direction: [{
|
|
410
437
|
type: Input
|
|
411
438
|
}], labelsVisible: [{
|
|
412
439
|
type: Input
|
|
413
440
|
}], showChildren: [{
|
|
414
441
|
type: Input
|
|
415
|
-
}],
|
|
442
|
+
}], active: [{
|
|
416
443
|
type: Input
|
|
417
444
|
}] } });
|
|
418
445
|
|
|
@@ -425,10 +452,11 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
425
452
|
get sideNavWidth() {
|
|
426
453
|
return this.collapsed ? this.menuSettings.collapsedWidth : this.menuSettings.expandedWidth;
|
|
427
454
|
}
|
|
428
|
-
constructor(strapiLinkService, domService, menuSharedConfig) {
|
|
429
|
-
super();
|
|
455
|
+
constructor(strapiLinkService, domService, menuItems, menuSharedConfig) {
|
|
456
|
+
super(menuItems);
|
|
430
457
|
this.strapiLinkService = strapiLinkService;
|
|
431
458
|
this.domService = domService;
|
|
459
|
+
this.menuItems = menuItems;
|
|
432
460
|
this.COLLAPSED_LOCAL_STORAGE_KEY = "TLD_MENU_SIDE_NAV_COLLAPSED";
|
|
433
461
|
//#region Plausible event variables for collapse button
|
|
434
462
|
this.COLLAPSE_PLAUSIBLE_EVENT_ID = "collapseMenu";
|
|
@@ -458,6 +486,7 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
458
486
|
this.baseUrl = menuSharedConfig.baseUrl || '';
|
|
459
487
|
}
|
|
460
488
|
ngOnInit() {
|
|
489
|
+
super.ngOnInit();
|
|
461
490
|
this.getColapsedFromLocalStorage();
|
|
462
491
|
}
|
|
463
492
|
logoClick(event) {
|
|
@@ -479,13 +508,13 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
479
508
|
}
|
|
480
509
|
this.domService.localStorage.setItem(this.COLLAPSED_LOCAL_STORAGE_KEY, this.collapsed.toString());
|
|
481
510
|
}
|
|
482
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SideNavMenuComponent, deps: [{ token: i1.StrapiLinkService }, { token: i2.DOMService }, { token: MENU_SHARED_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
483
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: SideNavMenuComponent, selector: "lib-side-nav-menu", inputs: { menuSettings: "menuSettings" }, usesInheritance: true, ngImport: i0, template: "<div class=\"menu-container\" [style.width]=\"sideNavWidth\" fxLayout=\"column\" [class.collapsed]=\"collapsed\">\r\n <div class=\"content\" fxLayout=\"column\" fxFlexFill>\r\n <a [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"
|
|
511
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SideNavMenuComponent, deps: [{ token: i1.StrapiLinkService }, { token: i2.DOMService }, { token: MenuItemsService }, { token: MENU_SHARED_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
512
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: SideNavMenuComponent, selector: "lib-side-nav-menu", inputs: { menuSettings: "menuSettings" }, usesInheritance: true, ngImport: i0, template: "<div class=\"menu-container\" [style.width]=\"sideNavWidth\" fxLayout=\"column\" [class.collapsed]=\"collapsed\">\r\n <div class=\"content\" fxLayout=\"column\" fxFlexFill>\r\n <a [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"\r\n [attr.aria-label]=\"'MENU.ARIA_LABELS.LOGO' | translate\" (click)=\"logoClick($event)\" fxLayoutAlign=\"center center\"\r\n fxFlexOffset=\"1em\">\r\n <img class=\"menu-logo\" [src]=\"menuLogoImage\" alt=\"\" />\r\n </a>\r\n <div class=\"menu-wrapper\" fxLayout=\"column\" fxFlex>\r\n <menu-columns [direction]=\"direction\" role=\"navigation\" fxFlex [labelsVisible]=\"!collapsed\" [showChildren]=\"false\"\r\n [active]=\"active\"></menu-columns>\r\n <div fxLayoutAlign=\"center center\">\r\n <button [libPlausibleEvent]=\"COLLAPSE_PLAUSIBLE_EVENT\" class=\"collapse-btn\" [disableRipple]=\"true\"\r\n *ngIf=\"!collapsed; else expandButton\" (click)=\"toggleCollapse()\" mat-button>\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n <span> {{ \"MENU.COLLAPSE\" | translate }} </span>\r\n </button>\r\n <ng-template #expandButton>\r\n <button class=\"toggler\" [libPlausibleEvent]=\"EXPAND_PLAUSIBLE_EVENT\" mat-icon-button\r\n (click)=\"toggleCollapse()\">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>", styles: [".menu-container{height:100%;overflow:auto;background:var(--base-100);border-right:1px solid var(--base-70)}.menu-container .content{padding:0 .8em}.menu-container .content .menu-logo{margin:auto;max-width:100%}.menu-container .divider{width:100%;margin:0}:host ::ng-deep .collapsed .menu-item{padding:calc(.125em + 1px)}:host ::ng-deep .collapsed .menu-item.active-menu-item{padding:.125em;border:1px solid var(--primary-accent);border-radius:var(--default-border-radius)}:host ::ng-deep button.collapse-btn{background-color:transparent;font-size:.8125rem;font-weight:400;line-height:1.25rem;letter-spacing:0px;text-align:left;padding:0!important}:host::ng-deep button.collapse-btn,:host::ng-deep button.toggler{margin-bottom:1em}:host::ng-deep button.collapse-btn .mat-mdc-button-persistent-ripple,:host::ng-deep button.toggler .mat-mdc-button-persistent-ripple{display:none}\n"], dependencies: [{ kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$2.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "directive", type: i2$2.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.PlausibleEventDirective, selector: "[libPlausibleEvent]", inputs: ["libPlausibleEvent"] }, { kind: "component", type: MenuColumnsComponent, selector: "menu-columns", inputs: ["direction", "labelsVisible", "showChildren", "active"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
484
513
|
}
|
|
485
514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: SideNavMenuComponent, decorators: [{
|
|
486
515
|
type: Component,
|
|
487
|
-
args: [{ selector: 'lib-side-nav-menu', template: "<div class=\"menu-container\" [style.width]=\"sideNavWidth\" fxLayout=\"column\" [class.collapsed]=\"collapsed\">\r\n <div class=\"content\" fxLayout=\"column\" fxFlexFill>\r\n <a [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"
|
|
488
|
-
}], ctorParameters: function () { return [{ type: i1.StrapiLinkService }, { type: i2.DOMService }, { type: undefined, decorators: [{
|
|
516
|
+
args: [{ selector: 'lib-side-nav-menu', template: "<div class=\"menu-container\" [style.width]=\"sideNavWidth\" fxLayout=\"column\" [class.collapsed]=\"collapsed\">\r\n <div class=\"content\" fxLayout=\"column\" fxFlexFill>\r\n <a [libPlausibleEvent]=\"LOGOCLICK_PLAUSIBLE_EVENT\" fxFlex=\"3.125em\" [href]=\"baseUrl\"\r\n [attr.aria-label]=\"'MENU.ARIA_LABELS.LOGO' | translate\" (click)=\"logoClick($event)\" fxLayoutAlign=\"center center\"\r\n fxFlexOffset=\"1em\">\r\n <img class=\"menu-logo\" [src]=\"menuLogoImage\" alt=\"\" />\r\n </a>\r\n <div class=\"menu-wrapper\" fxLayout=\"column\" fxFlex>\r\n <menu-columns [direction]=\"direction\" role=\"navigation\" fxFlex [labelsVisible]=\"!collapsed\" [showChildren]=\"false\"\r\n [active]=\"active\"></menu-columns>\r\n <div fxLayoutAlign=\"center center\">\r\n <button [libPlausibleEvent]=\"COLLAPSE_PLAUSIBLE_EVENT\" class=\"collapse-btn\" [disableRipple]=\"true\"\r\n *ngIf=\"!collapsed; else expandButton\" (click)=\"toggleCollapse()\" mat-button>\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n <span> {{ \"MENU.COLLAPSE\" | translate }} </span>\r\n </button>\r\n <ng-template #expandButton>\r\n <button class=\"toggler\" [libPlausibleEvent]=\"EXPAND_PLAUSIBLE_EVENT\" mat-icon-button\r\n (click)=\"toggleCollapse()\">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>", styles: [".menu-container{height:100%;overflow:auto;background:var(--base-100);border-right:1px solid var(--base-70)}.menu-container .content{padding:0 .8em}.menu-container .content .menu-logo{margin:auto;max-width:100%}.menu-container .divider{width:100%;margin:0}:host ::ng-deep .collapsed .menu-item{padding:calc(.125em + 1px)}:host ::ng-deep .collapsed .menu-item.active-menu-item{padding:.125em;border:1px solid var(--primary-accent);border-radius:var(--default-border-radius)}:host ::ng-deep button.collapse-btn{background-color:transparent;font-size:.8125rem;font-weight:400;line-height:1.25rem;letter-spacing:0px;text-align:left;padding:0!important}:host::ng-deep button.collapse-btn,:host::ng-deep button.toggler{margin-bottom:1em}:host::ng-deep button.collapse-btn .mat-mdc-button-persistent-ripple,:host::ng-deep button.toggler .mat-mdc-button-persistent-ripple{display:none}\n"] }]
|
|
517
|
+
}], ctorParameters: function () { return [{ type: i1.StrapiLinkService }, { type: i2.DOMService }, { type: MenuItemsService }, { type: undefined, decorators: [{
|
|
489
518
|
type: Optional
|
|
490
519
|
}, {
|
|
491
520
|
type: Inject,
|
|
@@ -495,8 +524,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
495
524
|
}] } });
|
|
496
525
|
|
|
497
526
|
class ModalNavMenuComponent extends NavBaseComponent {
|
|
498
|
-
constructor() {
|
|
499
|
-
super();
|
|
527
|
+
constructor(menuItems) {
|
|
528
|
+
super(menuItems);
|
|
529
|
+
this.menuItems = menuItems;
|
|
500
530
|
this.menuDialogSettings = {
|
|
501
531
|
showMenuTitle: false,
|
|
502
532
|
fullScreen: true
|
|
@@ -509,13 +539,13 @@ class ModalNavMenuComponent extends NavBaseComponent {
|
|
|
509
539
|
close() {
|
|
510
540
|
this.closeButtonClick.emit(null);
|
|
511
541
|
}
|
|
512
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ModalNavMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
513
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: ModalNavMenuComponent, selector: "lib-modal-nav-menu", inputs: { menuDialogSettings: "menuDialogSettings", showChildren: "showChildren" }, outputs: { closeButtonClick: "closeButtonClick" }, usesInheritance: true, ngImport: i0, template: "<div class=\"content menu-modal\" fxLayout=\"row\" fxFlexFill>\r\n <div fxLayout=\"column\" [class.full-screen]=\"menuDialogSettings.fullScreen\">\r\n <div
|
|
542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ModalNavMenuComponent, deps: [{ token: MenuItemsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
543
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: ModalNavMenuComponent, selector: "lib-modal-nav-menu", inputs: { menuDialogSettings: "menuDialogSettings", showChildren: "showChildren" }, outputs: { closeButtonClick: "closeButtonClick" }, usesInheritance: true, ngImport: i0, template: "<div class=\"content menu-modal\" fxLayout=\"row\" fxFlexFill>\r\n <div fxLayout=\"column\" [class.full-screen]=\"menuDialogSettings.fullScreen\">\r\n <div fxLayout=\"row\" class=\"menu-header\">\r\n <img [src]=\"menuDialogSettings.logo\" *ngIf=\"menuDialogSettings.logo\" alt=\"\">\r\n <span *ngIf=\"menuDialogSettings.showMenuTitle\" fxLayoutAlign=\"start center\" fxFlex>{{\r\n \"MENU.MENU\" | translate\r\n }}</span>\r\n <span *ngIf=\"menuDialogSettings.showCloseMenuButton\" (click)=\"close()\" class=\"close-icon\" fxFlex\r\n fxLayoutAlign=\"end center\">\r\n <mat-icon>close</mat-icon>\r\n </span>\r\n </div>\r\n <ng-content select=\"[top]\"></ng-content>\r\n <menu-columns [showChildren]=\"showChildren\" [direction]=\"direction\" [active]=\"active\">\r\n </menu-columns>\r\n <ng-content select=\"[bottom]\"></ng-content>\r\n </div>\r\n</div>", styles: [".menu-modal{background-color:var(--base-100);padding:1.375rem 1.5rem}.close-icon{cursor:pointer}.menu-header{font-style:normal;font-weight:500;font-size:1.3125rem;line-height:1.75rem;text-align:center;margin-bottom:1em;color:var(--menu-dark-color)}.close-icon>mat-icon{transform:scale(1.5)}\n"], dependencies: [{ kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$2.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MenuColumnsComponent, selector: "menu-columns", inputs: ["direction", "labelsVisible", "showChildren", "active"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
514
544
|
}
|
|
515
545
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: ModalNavMenuComponent, decorators: [{
|
|
516
546
|
type: Component,
|
|
517
|
-
args: [{ selector: 'lib-modal-nav-menu', template: "<div class=\"content menu-modal\" fxLayout=\"row\" fxFlexFill>\r\n <div fxLayout=\"column\" [class.full-screen]=\"menuDialogSettings.fullScreen\">\r\n <div
|
|
518
|
-
}], ctorParameters: function () { return []; }, propDecorators: { menuDialogSettings: [{
|
|
547
|
+
args: [{ selector: 'lib-modal-nav-menu', template: "<div class=\"content menu-modal\" fxLayout=\"row\" fxFlexFill>\r\n <div fxLayout=\"column\" [class.full-screen]=\"menuDialogSettings.fullScreen\">\r\n <div fxLayout=\"row\" class=\"menu-header\">\r\n <img [src]=\"menuDialogSettings.logo\" *ngIf=\"menuDialogSettings.logo\" alt=\"\">\r\n <span *ngIf=\"menuDialogSettings.showMenuTitle\" fxLayoutAlign=\"start center\" fxFlex>{{\r\n \"MENU.MENU\" | translate\r\n }}</span>\r\n <span *ngIf=\"menuDialogSettings.showCloseMenuButton\" (click)=\"close()\" class=\"close-icon\" fxFlex\r\n fxLayoutAlign=\"end center\">\r\n <mat-icon>close</mat-icon>\r\n </span>\r\n </div>\r\n <ng-content select=\"[top]\"></ng-content>\r\n <menu-columns [showChildren]=\"showChildren\" [direction]=\"direction\" [active]=\"active\">\r\n </menu-columns>\r\n <ng-content select=\"[bottom]\"></ng-content>\r\n </div>\r\n</div>", styles: [".menu-modal{background-color:var(--base-100);padding:1.375rem 1.5rem}.close-icon{cursor:pointer}.menu-header{font-style:normal;font-weight:500;font-size:1.3125rem;line-height:1.75rem;text-align:center;margin-bottom:1em;color:var(--menu-dark-color)}.close-icon>mat-icon{transform:scale(1.5)}\n"] }]
|
|
548
|
+
}], ctorParameters: function () { return [{ type: MenuItemsService }]; }, propDecorators: { menuDialogSettings: [{
|
|
519
549
|
type: Input
|
|
520
550
|
}], showChildren: [{
|
|
521
551
|
type: Input
|
|
@@ -537,9 +567,8 @@ var TitlePlacement;
|
|
|
537
567
|
TitlePlacement["right"] = "right";
|
|
538
568
|
})(TitlePlacement || (TitlePlacement = {}));
|
|
539
569
|
|
|
540
|
-
class MenuItemIconComponent
|
|
570
|
+
class MenuItemIconComponent {
|
|
541
571
|
constructor(iconService, router) {
|
|
542
|
-
super();
|
|
543
572
|
this.iconService = iconService;
|
|
544
573
|
this.router = router;
|
|
545
574
|
this.menuSettings = {
|
|
@@ -579,13 +608,13 @@ class MenuItemIconComponent extends NavBaseComponent {
|
|
|
579
608
|
this.iconService.registerIcons({ [this.iconName]: menuLogo });
|
|
580
609
|
}
|
|
581
610
|
}
|
|
582
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemIconComponent, deps: [{ token: i2.IconService }, { token:
|
|
583
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuItemIconComponent, selector: "lib-menu-item-icon", inputs: { menuSettings: "menuSettings", menuDialogSettings: "menuDialogSettings", showChildren: "showChildren", direction: "direction" }, viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: ["menuTrigger"], descendants: true }],
|
|
611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemIconComponent, deps: [{ token: i2.IconService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
612
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MenuItemIconComponent, selector: "lib-menu-item-icon", inputs: { menuSettings: "menuSettings", menuDialogSettings: "menuDialogSettings", showChildren: "showChildren", direction: "direction" }, viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0, template: "<button class=\"content text-l\" mat-button [disableRipple]=\"true\" #menuTrigger=\"matMenuTrigger\"\r\n [matMenuTriggerFor]=\"menu\" [libPlausibleEvent]=\"PLAUSIBLE_EVENT\">\r\n <span fxLayout=\"row\" fxLayoutGap=\"1.5em\" fxLayoutAlign=\"center center\">\r\n <span *ngIf=\"menuSettings.titlePlacement !== TITLE_PLACEMENT_NONE\" [fxFlexOrder]=\"\r\n menuSettings.titlePlacement === TITLE_PLACEMENT_LEFT ? 1 : 2\r\n \" class=\"menu-label\">{{ \"MENU.MENU\" | translate }}</span>\r\n <mat-icon [fxFlexOrder]=\"\r\n menuSettings.titlePlacement === TITLE_PLACEMENT_LEFT ? 2 : 1\r\n \" [svgIcon]=\"iconName\">\r\n </mat-icon>\r\n </span>\r\n</button>\r\n\r\n<mat-menu [hasBackdrop]=\"true\" #menu class=\"mobile-menu-dialog {{\r\n menuDialogSettings.fullScreen ? 'full-screen' : 'minimized-screen'\r\n }}\">\r\n <!-- Click method so that menu does not get closed when clicking outside of items-->\r\n <lib-modal-nav-menu (click)=\"$event.stopPropagation()\" (closeButtonClick)=\"closeMenu()\"\r\n [menuDialogSettings]=\"menuDialogSettings\" [direction]=\"direction\" [showChildren]=\"showChildren\">\r\n <ng-content top select=\"[top]\"></ng-content>\r\n <ng-content bottom select=\"[bottom]\"></ng-content>\r\n </lib-modal-nav-menu>\r\n</mat-menu>", styles: [".content{gap:1.5em;cursor:pointer}button.mat-mdc-icon-button{width:inherit}:host::ng-deep button span.mat-button-focus-overlay{opacity:0!important}::ng-deep lib-modal-nav-menu>.content.menu-modal>div.full-screen{width:100%}::ng-deep lib-modal-nav-menu>.content.menu-modal>div.full-screen .menu-list-wrapper .menu-item{width:100%}::ng-deep div:has(.mat-mdc-menu-panel.mobile-menu-dialog.full-screen){width:100%;max-width:100%}::ng-deep .mat-mdc-menu-panel.mobile-menu-dialog.full-screen{width:100vw;margin-top:-2.5em;max-width:none}\n"], dependencies: [{ kind: "directive", type: i2$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$2.DefaultFlexOrderDirective, selector: " [fxFlexOrder], [fxFlexOrder.xs], [fxFlexOrder.sm], [fxFlexOrder.md], [fxFlexOrder.lg], [fxFlexOrder.xl], [fxFlexOrder.lt-sm], [fxFlexOrder.lt-md], [fxFlexOrder.lt-lg], [fxFlexOrder.lt-xl], [fxFlexOrder.gt-xs], [fxFlexOrder.gt-sm], [fxFlexOrder.gt-md], [fxFlexOrder.gt-lg]", inputs: ["fxFlexOrder", "fxFlexOrder.xs", "fxFlexOrder.sm", "fxFlexOrder.md", "fxFlexOrder.lg", "fxFlexOrder.xl", "fxFlexOrder.lt-sm", "fxFlexOrder.lt-md", "fxFlexOrder.lt-lg", "fxFlexOrder.lt-xl", "fxFlexOrder.gt-xs", "fxFlexOrder.gt-sm", "fxFlexOrder.gt-md", "fxFlexOrder.gt-lg"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i7$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i2.PlausibleEventDirective, selector: "[libPlausibleEvent]", inputs: ["libPlausibleEvent"] }, { kind: "component", type: ModalNavMenuComponent, selector: "lib-modal-nav-menu", inputs: ["menuDialogSettings", "showChildren"], outputs: ["closeButtonClick"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
|
|
584
613
|
}
|
|
585
614
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuItemIconComponent, decorators: [{
|
|
586
615
|
type: Component,
|
|
587
|
-
args: [{ selector: 'lib-menu-item-icon', template: "<button class=\"content text-l\" mat-button [disableRipple]=\"true\" #menuTrigger=\"matMenuTrigger\"\r\n [matMenuTriggerFor]=\"menu\" [libPlausibleEvent]=\"PLAUSIBLE_EVENT\">\r\n <span fxLayout=\"row\" fxLayoutGap=\"1.5em\" fxLayoutAlign=\"center center\">\r\n <span *ngIf=\"menuSettings.titlePlacement !== TITLE_PLACEMENT_NONE\" [fxFlexOrder]=\"\r\n menuSettings.titlePlacement === TITLE_PLACEMENT_LEFT ? 1 : 2\r\n \" class=\"menu-label\">{{ \"MENU.MENU\" | translate }}</span>\r\n <mat-icon [fxFlexOrder]=\"\r\n menuSettings.titlePlacement === TITLE_PLACEMENT_LEFT ? 2 : 1\r\n \" [svgIcon]=\"iconName\">\r\n </mat-icon>\r\n </span>\r\n</button>\r\n\r\n<mat-menu [hasBackdrop]=\"true\" #menu class=\"mobile-menu-dialog {{\r\n menuDialogSettings.fullScreen ? 'full-screen' : 'minimized-screen'\r\n }}\">\r\n <!-- Click method so that menu does not get closed when clicking outside of items-->\r\n <lib-modal-nav-menu (click)=\"$event.stopPropagation()\" (closeButtonClick)=\"closeMenu()\"
|
|
588
|
-
}], ctorParameters: function () { return [{ type: i2.IconService }, { type:
|
|
616
|
+
args: [{ selector: 'lib-menu-item-icon', template: "<button class=\"content text-l\" mat-button [disableRipple]=\"true\" #menuTrigger=\"matMenuTrigger\"\r\n [matMenuTriggerFor]=\"menu\" [libPlausibleEvent]=\"PLAUSIBLE_EVENT\">\r\n <span fxLayout=\"row\" fxLayoutGap=\"1.5em\" fxLayoutAlign=\"center center\">\r\n <span *ngIf=\"menuSettings.titlePlacement !== TITLE_PLACEMENT_NONE\" [fxFlexOrder]=\"\r\n menuSettings.titlePlacement === TITLE_PLACEMENT_LEFT ? 1 : 2\r\n \" class=\"menu-label\">{{ \"MENU.MENU\" | translate }}</span>\r\n <mat-icon [fxFlexOrder]=\"\r\n menuSettings.titlePlacement === TITLE_PLACEMENT_LEFT ? 2 : 1\r\n \" [svgIcon]=\"iconName\">\r\n </mat-icon>\r\n </span>\r\n</button>\r\n\r\n<mat-menu [hasBackdrop]=\"true\" #menu class=\"mobile-menu-dialog {{\r\n menuDialogSettings.fullScreen ? 'full-screen' : 'minimized-screen'\r\n }}\">\r\n <!-- Click method so that menu does not get closed when clicking outside of items-->\r\n <lib-modal-nav-menu (click)=\"$event.stopPropagation()\" (closeButtonClick)=\"closeMenu()\"\r\n [menuDialogSettings]=\"menuDialogSettings\" [direction]=\"direction\" [showChildren]=\"showChildren\">\r\n <ng-content top select=\"[top]\"></ng-content>\r\n <ng-content bottom select=\"[bottom]\"></ng-content>\r\n </lib-modal-nav-menu>\r\n</mat-menu>", styles: [".content{gap:1.5em;cursor:pointer}button.mat-mdc-icon-button{width:inherit}:host::ng-deep button span.mat-button-focus-overlay{opacity:0!important}::ng-deep lib-modal-nav-menu>.content.menu-modal>div.full-screen{width:100%}::ng-deep lib-modal-nav-menu>.content.menu-modal>div.full-screen .menu-list-wrapper .menu-item{width:100%}::ng-deep div:has(.mat-mdc-menu-panel.mobile-menu-dialog.full-screen){width:100%;max-width:100%}::ng-deep .mat-mdc-menu-panel.mobile-menu-dialog.full-screen{width:100vw;margin-top:-2.5em;max-width:none}\n"] }]
|
|
617
|
+
}], ctorParameters: function () { return [{ type: i2.IconService }, { type: i1$1.Router }]; }, propDecorators: { menuTrigger: [{
|
|
589
618
|
type: ViewChild,
|
|
590
619
|
args: ['menuTrigger']
|
|
591
620
|
}], menuSettings: [{
|
|
@@ -695,5 +724,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
695
724
|
* Generated bundle index. Do not edit.
|
|
696
725
|
*/
|
|
697
726
|
|
|
698
|
-
export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MenuColumnsComponent, MenuItemIconComponent, MenuLayoutDirection, MenuModule, ModalNavMenuComponent, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, TitlePlacement };
|
|
727
|
+
export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MenuColumnsComponent, MenuItemIconComponent, MenuItemsService, MenuLayoutDirection, MenuModule, ModalNavMenuComponent, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, TitlePlacement };
|
|
699
728
|
//# sourceMappingURL=tilde-nlp-ngx-menu.mjs.map
|