@tilde-nlp/ngx-menu 4.0.0 → 4.1.2
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 +27 -124
- package/esm2022/lib/components/menu-icon/menu-icon.component.mjs +4 -4
- package/esm2022/lib/components/menu-item-icon/menu-item-icon.component.mjs +6 -8
- package/esm2022/lib/components/menu-item-link/menu-item-link.component.mjs +4 -4
- package/esm2022/lib/components/menu-item-list/menu-item-list.component.mjs +11 -10
- package/esm2022/lib/components/modal-nav-menu/modal-nav-menu.component.mjs +15 -13
- package/esm2022/lib/components/nav-base/nav-base.component.mjs +22 -18
- package/esm2022/lib/components/side-nav-menu/side-nav-menu.component.mjs +17 -14
- package/esm2022/lib/menu.module.mjs +5 -5
- 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 +5 -5
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/tilde-nlp-ngx-menu.mjs +228 -198
- 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,21 +1,22 @@
|
|
|
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$1 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
|
+
import * as i2$3 from '@angular/flex-layout/extended';
|
|
19
20
|
import * as i4 from '@angular/material/tooltip';
|
|
20
21
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
21
22
|
import * as i7 from '@ngx-translate/core';
|
|
@@ -23,7 +24,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
23
24
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
24
25
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
25
26
|
import { MatListModule } from '@angular/material/list';
|
|
26
|
-
import * as i7$
|
|
27
|
+
import * as i7$2 from '@angular/material/menu';
|
|
27
28
|
import { MatMenuModule } from '@angular/material/menu';
|
|
28
29
|
import { HttpClientModule } from '@angular/common/http';
|
|
29
30
|
|
|
@@ -36,37 +37,6 @@ var StrapiDataLocation;
|
|
|
36
37
|
StrapiDataLocation[StrapiDataLocation["END"] = 1] = "END";
|
|
37
38
|
})(StrapiDataLocation || (StrapiDataLocation = {}));
|
|
38
39
|
|
|
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
40
|
const MENU_ICON_STRAPI_EXTENSION = ".svg";
|
|
71
41
|
|
|
72
42
|
class StarpiMenuService {
|
|
@@ -135,10 +105,10 @@ class StarpiMenuService {
|
|
|
135
105
|
customId: item.customId
|
|
136
106
|
};
|
|
137
107
|
}
|
|
138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
139
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.
|
|
108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: StarpiMenuService, deps: [{ token: i1.StrapiSubscriptionService }, { token: MENU_SHARED_CONFIG, optional: true }, { token: STRAPI_API_CONFIG_TOKEN }, { token: i2.IconService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
109
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: StarpiMenuService, providedIn: 'root' }); }
|
|
140
110
|
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: StarpiMenuService, decorators: [{
|
|
142
112
|
type: Injectable,
|
|
143
113
|
args: [{
|
|
144
114
|
providedIn: 'root'
|
|
@@ -153,6 +123,158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
153
123
|
args: [STRAPI_API_CONFIG_TOKEN]
|
|
154
124
|
}] }, { type: i2.IconService }]; } });
|
|
155
125
|
|
|
126
|
+
class MenuItemsService {
|
|
127
|
+
get activeElements() { return this._activeElements.asObservable(); }
|
|
128
|
+
get allRootItems() { return this._allRootItems; }
|
|
129
|
+
get strapiGroup() { return this._strapiGroup; }
|
|
130
|
+
get customId() { return this.menuSharedConfig?.customId; }
|
|
131
|
+
get hideSelectedCustomId() { return this.menuSharedConfig?.hideSelectedCustomId; }
|
|
132
|
+
get strapiGroupBase() { return this.menuSharedConfig?.strapiGroupBase; }
|
|
133
|
+
get strapiDataLocation() { return this.menuSharedConfig?.strapiDataLocation ?? StrapiDataLocation.END; }
|
|
134
|
+
get mergedGroups() { return this._mergedGroups; }
|
|
135
|
+
get menuItemGroups() { return this.menuSharedConfig.itemGroups; }
|
|
136
|
+
constructor(router, menuSharedConfig, strapiService) {
|
|
137
|
+
this.router = router;
|
|
138
|
+
this.menuSharedConfig = menuSharedConfig;
|
|
139
|
+
this.strapiService = strapiService;
|
|
140
|
+
this._activeElements = new BehaviorSubject({});
|
|
141
|
+
this.strapiItems = [];
|
|
142
|
+
this.isActiveMatchOptions = {
|
|
143
|
+
matrixParams: 'exact',
|
|
144
|
+
queryParams: 'exact',
|
|
145
|
+
paths: 'exact',
|
|
146
|
+
fragment: 'exact'
|
|
147
|
+
};
|
|
148
|
+
this._mergedGroups = [];
|
|
149
|
+
this.getStrapiData();
|
|
150
|
+
this.subscribeToRouteChanges();
|
|
151
|
+
}
|
|
152
|
+
subscribeToRouteChanges() {
|
|
153
|
+
this.router.events
|
|
154
|
+
.pipe(filter(e => e instanceof NavigationEnd))
|
|
155
|
+
.subscribe(() => { this.updateActive(); });
|
|
156
|
+
}
|
|
157
|
+
updateActive() {
|
|
158
|
+
const items = this.allRootItems;
|
|
159
|
+
const root = this.findActiveElement(items, false);
|
|
160
|
+
const child = this.findActiveElement(items, true);
|
|
161
|
+
this._activeElements.next({ root, child });
|
|
162
|
+
}
|
|
163
|
+
/** Finds active element from whole list. RouterLink has priority over custom Id. */
|
|
164
|
+
// at this version, child elements should not have customId, since that property comes from strapi and strapi provides only one level structure
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
166
|
+
findActiveElement(items, includeChildren) {
|
|
167
|
+
if (!items?.length) {
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
let customIdElement;
|
|
171
|
+
for (const item of items) {
|
|
172
|
+
// Child element has priority over parent, so need to check if any child is active
|
|
173
|
+
if (this.isElementRouterLinkActive(item)) {
|
|
174
|
+
// If has children and they are visible, return active child or current item
|
|
175
|
+
return includeChildren ? this.findActiveElement(item.children, includeChildren) ?? item : item;
|
|
176
|
+
}
|
|
177
|
+
// if selected custom id element is hidden, no need to look for it and set it to active;
|
|
178
|
+
else if (!this.hideSelectedCustomId && this.isElementCustomIdActive(item)) {
|
|
179
|
+
customIdElement = item;
|
|
180
|
+
}
|
|
181
|
+
else if (includeChildren && item.children?.length) {
|
|
182
|
+
const activeChild = this.findActiveElement(item.children, includeChildren);
|
|
183
|
+
if (activeChild) {
|
|
184
|
+
return activeChild;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return customIdElement;
|
|
189
|
+
}
|
|
190
|
+
getStrapiData() {
|
|
191
|
+
if (!this.menuSharedConfig?.disableStrapi) {
|
|
192
|
+
this.strapiService.getMenuItems().subscribe(this.loadData.bind(this));
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.loadData([]);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
loadData(data) {
|
|
199
|
+
// hide custom id based on input param
|
|
200
|
+
this.strapiItems = (this.hideSelectedCustomId && this.customId) ? data.filter(item => item.customId !== this.customId) : data;
|
|
201
|
+
this._strapiGroup = {
|
|
202
|
+
...this.strapiGroupBase,
|
|
203
|
+
items: this.strapiItems
|
|
204
|
+
};
|
|
205
|
+
if (this.strapiDataLocation === StrapiDataLocation.START) {
|
|
206
|
+
this._mergedGroups = [this.strapiGroup, ...this.menuItemGroups ?? []];
|
|
207
|
+
}
|
|
208
|
+
else if (this.strapiDataLocation === StrapiDataLocation.END) {
|
|
209
|
+
this._mergedGroups = [...this.menuItemGroups ?? [], this.strapiGroup];
|
|
210
|
+
}
|
|
211
|
+
const allItems = this.mergedGroups.map(map => map.items);
|
|
212
|
+
let newArray = [];
|
|
213
|
+
allItems.forEach((array) => { newArray = newArray.concat(array); });
|
|
214
|
+
this._allRootItems = newArray;
|
|
215
|
+
this.updateActive();
|
|
216
|
+
}
|
|
217
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
|
+
// private isMenuItem(item: any): item is MenuItems {
|
|
219
|
+
// return item.customId;
|
|
220
|
+
// }
|
|
221
|
+
isElementCustomIdActive(element) {
|
|
222
|
+
return this.customId && element.customId === this.customId;
|
|
223
|
+
}
|
|
224
|
+
isElementRouterLinkActive(element) {
|
|
225
|
+
const routerLinkActiveOptions = element.routerLinkActiveOptions ?? this.menuSharedConfig.activeMatchOptions ?? this.isActiveMatchOptions;
|
|
226
|
+
return this.router.isActive(element.link, routerLinkActiveOptions);
|
|
227
|
+
}
|
|
228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemsService, deps: [{ token: i1$1.Router }, { token: MENU_SHARED_CONFIG, optional: true }, { token: StarpiMenuService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
229
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemsService, providedIn: 'root' }); }
|
|
230
|
+
}
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemsService, decorators: [{
|
|
232
|
+
type: Injectable,
|
|
233
|
+
args: [{
|
|
234
|
+
providedIn: 'root'
|
|
235
|
+
}]
|
|
236
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: undefined, decorators: [{
|
|
237
|
+
type: Optional
|
|
238
|
+
}, {
|
|
239
|
+
type: Inject,
|
|
240
|
+
args: [MENU_SHARED_CONFIG]
|
|
241
|
+
}] }, { type: StarpiMenuService }]; } });
|
|
242
|
+
|
|
243
|
+
/** This component is created to help nest some common input params through nav components. */
|
|
244
|
+
class NavBaseComponent {
|
|
245
|
+
constructor(menuItemsService) {
|
|
246
|
+
this.menuItemsService = menuItemsService;
|
|
247
|
+
}
|
|
248
|
+
ngOnInit() {
|
|
249
|
+
this.initBase();
|
|
250
|
+
}
|
|
251
|
+
initBase() {
|
|
252
|
+
this.activeItemSubscription = this.menuItemsService.activeElements.subscribe((active) => {
|
|
253
|
+
this.active = active;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
ngOnDestroy() {
|
|
257
|
+
this.destroyBase();
|
|
258
|
+
}
|
|
259
|
+
destroyBase() {
|
|
260
|
+
this.activeItemSubscription?.unsubscribe();
|
|
261
|
+
}
|
|
262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavBaseComponent, deps: [{ token: MenuItemsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NavBaseComponent, selector: "nav-base", inputs: { direction: "direction" }, ngImport: i0, template: "<p>nav-base works!</p>\r\n", styles: [""] }); }
|
|
264
|
+
}
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavBaseComponent, decorators: [{
|
|
266
|
+
type: Component,
|
|
267
|
+
args: [{ selector: 'nav-base', template: "<p>nav-base works!</p>\r\n" }]
|
|
268
|
+
}], ctorParameters: function () { return [{ type: MenuItemsService }]; }, propDecorators: { direction: [{
|
|
269
|
+
type: Input
|
|
270
|
+
}] } });
|
|
271
|
+
|
|
272
|
+
var MenuLayoutDirection;
|
|
273
|
+
(function (MenuLayoutDirection) {
|
|
274
|
+
MenuLayoutDirection["column"] = "column";
|
|
275
|
+
MenuLayoutDirection["row"] = "row";
|
|
276
|
+
})(MenuLayoutDirection || (MenuLayoutDirection = {}));
|
|
277
|
+
|
|
156
278
|
class MenuIconComponent {
|
|
157
279
|
constructor() {
|
|
158
280
|
this.svgExtension = MENU_ICON_STRAPI_EXTENSION;
|
|
@@ -161,10 +283,10 @@ class MenuIconComponent {
|
|
|
161
283
|
isIconMediaType(icon) {
|
|
162
284
|
return typeof icon !== "string";
|
|
163
285
|
}
|
|
164
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
165
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
286
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
287
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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
288
|
}
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuIconComponent, decorators: [{
|
|
168
290
|
type: Component,
|
|
169
291
|
args: [{ selector: 'tld-menu-icon', 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"] }]
|
|
170
292
|
}], propDecorators: { menuItem: [{
|
|
@@ -195,10 +317,10 @@ class MenuItemLinkComponent {
|
|
|
195
317
|
ngOnDestroy() {
|
|
196
318
|
this.placeholderService.unregister(this.placeholderServiceId);
|
|
197
319
|
}
|
|
198
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
199
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
320
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemLinkComponent, deps: [{ token: i1.StrapiLinkService }, { token: i1.StrapiVariablesService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: i7.TranslatePipe, name: "translate" }] }); }
|
|
200
322
|
}
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemLinkComponent, decorators: [{
|
|
202
324
|
type: Component,
|
|
203
325
|
args: [{ selector: 'tld-menu-item-link', 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" }]
|
|
204
326
|
}], ctorParameters: function () { return [{ type: i1.StrapiLinkService }, { type: i1.StrapiVariablesService }]; }, propDecorators: { direction: [{
|
|
@@ -241,12 +363,12 @@ class MenuItemListComponent {
|
|
|
241
363
|
menuItem.expanded = !menuItem.expanded;
|
|
242
364
|
this.toggleExpand.next(menuItem);
|
|
243
365
|
}
|
|
244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
245
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
366
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
367
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 [ngClass.lt-md]=\"'mob-menu-item'\" [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}.mob-menu-item{width:100%}\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$3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.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: i7.TranslatePipe, name: "translate" }] }); }
|
|
246
368
|
}
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemListComponent, decorators: [{
|
|
248
370
|
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
|
|
371
|
+
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 [ngClass.lt-md]=\"'mob-menu-item'\" [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}.mob-menu-item{width:100%}\n"] }]
|
|
250
372
|
}], propDecorators: { direction: [{
|
|
251
373
|
type: Input
|
|
252
374
|
}], labelsVisible: [{
|
|
@@ -266,153 +388,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
266
388
|
}] } });
|
|
267
389
|
|
|
268
390
|
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;
|
|
391
|
+
get active() { return this._active; }
|
|
392
|
+
set active(value) {
|
|
393
|
+
this._active = value;
|
|
394
|
+
if (!value) {
|
|
395
|
+
this.activeItem = undefined;
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
this.elementExpanded(this.active?.root);
|
|
283
399
|
}
|
|
284
|
-
|
|
285
|
-
|
|
400
|
+
get mergedGroups() { return this.menuItemsService.mergedGroups; }
|
|
401
|
+
constructor(router, menuSharedConfig, menuItemsService) {
|
|
286
402
|
this.router = router;
|
|
287
403
|
this.menuSharedConfig = menuSharedConfig;
|
|
404
|
+
this.menuItemsService = menuItemsService;
|
|
288
405
|
this.direction = MenuLayoutDirection.column;
|
|
289
|
-
this.hideSelectedCustomId = false;
|
|
290
|
-
this.strapiGroupBase = {};
|
|
291
|
-
this.strapiDataLocation = StrapiDataLocation.END;
|
|
292
406
|
this.labelsVisible = true;
|
|
293
|
-
this._menuItemGroups = [];
|
|
294
|
-
this.subscribedToStrapi = false;
|
|
295
|
-
this.strapiItems = [];
|
|
296
|
-
this._mergedGroups = [];
|
|
297
407
|
this.subscriptions = [];
|
|
298
|
-
this.isActiveMatchOptions = {
|
|
299
|
-
matrixParams: 'exact',
|
|
300
|
-
queryParams: 'exact',
|
|
301
|
-
paths: 'exact',
|
|
302
|
-
fragment: 'exact'
|
|
303
|
-
};
|
|
304
408
|
}
|
|
305
409
|
ngOnInit() {
|
|
306
|
-
this.
|
|
307
|
-
this.getStrapiData();
|
|
410
|
+
this.activeItem = this.active.root;
|
|
308
411
|
}
|
|
309
412
|
ngOnDestroy() {
|
|
310
413
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
311
|
-
if (this.subscribedToStrapi) {
|
|
312
|
-
this.strapiService.unsubscribe();
|
|
313
|
-
}
|
|
314
414
|
}
|
|
315
415
|
elementExpanded(element) {
|
|
316
|
-
if (!this.
|
|
416
|
+
if (!this.active || !element) {
|
|
317
417
|
return;
|
|
318
418
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
return;
|
|
419
|
+
if (this.showChildren && element.expanded && element === this.active.root) {
|
|
420
|
+
this.activeItem = this.active.child;
|
|
322
421
|
}
|
|
323
|
-
|
|
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];
|
|
340
|
-
}
|
|
341
|
-
else if (this.strapiDataLocation === StrapiDataLocation.END) {
|
|
342
|
-
this._mergedGroups = [...this.menuItemGroups, this.strapiGroup];
|
|
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
|
-
}
|
|
422
|
+
else {
|
|
423
|
+
this.activeItem = this.active.root;
|
|
378
424
|
}
|
|
379
|
-
return customIdElement;
|
|
380
|
-
}
|
|
381
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
382
|
-
// private isMenuItem(item: any): item is MenuItems {
|
|
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
425
|
}
|
|
392
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuColumnsComponent, deps: [{ token: i1$1.Router }, { token: MENU_SHARED_CONFIG, optional: true }, { token: MenuItemsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
427
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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
428
|
}
|
|
395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuColumnsComponent, decorators: [{
|
|
396
430
|
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:
|
|
431
|
+
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"] }]
|
|
432
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: undefined, decorators: [{
|
|
399
433
|
type: Optional
|
|
400
434
|
}, {
|
|
401
435
|
type: Inject,
|
|
402
436
|
args: [MENU_SHARED_CONFIG]
|
|
403
|
-
}] }]; }, propDecorators: { direction: [{
|
|
404
|
-
type: Input
|
|
405
|
-
}], hideSelectedCustomId: [{
|
|
406
|
-
type: Input
|
|
407
|
-
}], strapiGroupBase: [{
|
|
408
|
-
type: Input
|
|
409
|
-
}], strapiDataLocation: [{
|
|
437
|
+
}] }, { type: MenuItemsService }]; }, propDecorators: { direction: [{
|
|
410
438
|
type: Input
|
|
411
439
|
}], labelsVisible: [{
|
|
412
440
|
type: Input
|
|
413
441
|
}], showChildren: [{
|
|
414
442
|
type: Input
|
|
415
|
-
}],
|
|
443
|
+
}], active: [{
|
|
416
444
|
type: Input
|
|
417
445
|
}] } });
|
|
418
446
|
|
|
@@ -425,10 +453,11 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
425
453
|
get sideNavWidth() {
|
|
426
454
|
return this.collapsed ? this.menuSettings.collapsedWidth : this.menuSettings.expandedWidth;
|
|
427
455
|
}
|
|
428
|
-
constructor(strapiLinkService, domService, menuSharedConfig) {
|
|
429
|
-
super();
|
|
456
|
+
constructor(strapiLinkService, domService, menuItems, menuSharedConfig) {
|
|
457
|
+
super(menuItems);
|
|
430
458
|
this.strapiLinkService = strapiLinkService;
|
|
431
459
|
this.domService = domService;
|
|
460
|
+
this.menuItems = menuItems;
|
|
432
461
|
this.COLLAPSED_LOCAL_STORAGE_KEY = "TLD_MENU_SIDE_NAV_COLLAPSED";
|
|
433
462
|
//#region Plausible event variables for collapse button
|
|
434
463
|
this.COLLAPSE_PLAUSIBLE_EVENT_ID = "collapseMenu";
|
|
@@ -458,6 +487,7 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
458
487
|
this.baseUrl = menuSharedConfig.baseUrl || '';
|
|
459
488
|
}
|
|
460
489
|
ngOnInit() {
|
|
490
|
+
super.ngOnInit();
|
|
461
491
|
this.getColapsedFromLocalStorage();
|
|
462
492
|
}
|
|
463
493
|
logoClick(event) {
|
|
@@ -479,13 +509,13 @@ class SideNavMenuComponent extends NavBaseComponent {
|
|
|
479
509
|
}
|
|
480
510
|
this.domService.localStorage.setItem(this.COLLAPSED_LOCAL_STORAGE_KEY, this.collapsed.toString());
|
|
481
511
|
}
|
|
482
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
483
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
512
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SideNavMenuComponent, deps: [{ token: i1.StrapiLinkService }, { token: i2.DOMService }, { token: MenuItemsService }, { token: MENU_SHARED_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
513
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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$1.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.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: i7.TranslatePipe, name: "translate" }] }); }
|
|
484
514
|
}
|
|
485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SideNavMenuComponent, decorators: [{
|
|
486
516
|
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: [{
|
|
517
|
+
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"] }]
|
|
518
|
+
}], ctorParameters: function () { return [{ type: i1.StrapiLinkService }, { type: i2.DOMService }, { type: MenuItemsService }, { type: undefined, decorators: [{
|
|
489
519
|
type: Optional
|
|
490
520
|
}, {
|
|
491
521
|
type: Inject,
|
|
@@ -495,8 +525,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
495
525
|
}] } });
|
|
496
526
|
|
|
497
527
|
class ModalNavMenuComponent extends NavBaseComponent {
|
|
498
|
-
constructor() {
|
|
499
|
-
super();
|
|
528
|
+
constructor(menuItems) {
|
|
529
|
+
super(menuItems);
|
|
530
|
+
this.menuItems = menuItems;
|
|
500
531
|
this.menuDialogSettings = {
|
|
501
532
|
showMenuTitle: false,
|
|
502
533
|
fullScreen: true
|
|
@@ -509,13 +540,13 @@ class ModalNavMenuComponent extends NavBaseComponent {
|
|
|
509
540
|
close() {
|
|
510
541
|
this.closeButtonClick.emit(null);
|
|
511
542
|
}
|
|
512
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
513
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
543
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ModalNavMenuComponent, deps: [{ token: MenuItemsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
544
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: i7.TranslatePipe, name: "translate" }] }); }
|
|
514
545
|
}
|
|
515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ModalNavMenuComponent, decorators: [{
|
|
516
547
|
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: [{
|
|
548
|
+
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"] }]
|
|
549
|
+
}], ctorParameters: function () { return [{ type: MenuItemsService }]; }, propDecorators: { menuDialogSettings: [{
|
|
519
550
|
type: Input
|
|
520
551
|
}], showChildren: [{
|
|
521
552
|
type: Input
|
|
@@ -537,9 +568,8 @@ var TitlePlacement;
|
|
|
537
568
|
TitlePlacement["right"] = "right";
|
|
538
569
|
})(TitlePlacement || (TitlePlacement = {}));
|
|
539
570
|
|
|
540
|
-
class MenuItemIconComponent
|
|
571
|
+
class MenuItemIconComponent {
|
|
541
572
|
constructor(iconService, router) {
|
|
542
|
-
super();
|
|
543
573
|
this.iconService = iconService;
|
|
544
574
|
this.router = router;
|
|
545
575
|
this.menuSettings = {
|
|
@@ -579,13 +609,13 @@ class MenuItemIconComponent extends NavBaseComponent {
|
|
|
579
609
|
this.iconService.registerIcons({ [this.iconName]: menuLogo });
|
|
580
610
|
}
|
|
581
611
|
}
|
|
582
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
583
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.
|
|
612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemIconComponent, deps: [{ token: i2.IconService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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$1.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$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i7$2.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: i7.TranslatePipe, name: "translate" }] }); }
|
|
584
614
|
}
|
|
585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemIconComponent, decorators: [{
|
|
586
616
|
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:
|
|
617
|
+
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"] }]
|
|
618
|
+
}], ctorParameters: function () { return [{ type: i2.IconService }, { type: i1$1.Router }]; }, propDecorators: { menuTrigger: [{
|
|
589
619
|
type: ViewChild,
|
|
590
620
|
args: ['menuTrigger']
|
|
591
621
|
}], menuSettings: [{
|
|
@@ -607,8 +637,8 @@ class MenuModule {
|
|
|
607
637
|
]
|
|
608
638
|
};
|
|
609
639
|
}
|
|
610
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
611
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.
|
|
640
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
641
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, declarations: [SideNavMenuComponent,
|
|
612
642
|
ModalNavMenuComponent,
|
|
613
643
|
MenuItemIconComponent,
|
|
614
644
|
NavBaseComponent,
|
|
@@ -631,7 +661,7 @@ class MenuModule {
|
|
|
631
661
|
ModalNavMenuComponent,
|
|
632
662
|
MenuItemIconComponent,
|
|
633
663
|
MenuColumnsComponent] }); }
|
|
634
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.
|
|
664
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, providers: [
|
|
635
665
|
StarpiMenuService
|
|
636
666
|
], imports: [HttpClientModule,
|
|
637
667
|
FlexLayoutModule,
|
|
@@ -647,7 +677,7 @@ class MenuModule {
|
|
|
647
677
|
TranslateModule,
|
|
648
678
|
PlausibleModule] }); }
|
|
649
679
|
}
|
|
650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, decorators: [{
|
|
651
681
|
type: NgModule,
|
|
652
682
|
args: [{
|
|
653
683
|
declarations: [
|
|
@@ -695,5 +725,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
695
725
|
* Generated bundle index. Do not edit.
|
|
696
726
|
*/
|
|
697
727
|
|
|
698
|
-
export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MenuColumnsComponent, MenuItemIconComponent, MenuLayoutDirection, MenuModule, ModalNavMenuComponent, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, TitlePlacement };
|
|
728
|
+
export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MenuColumnsComponent, MenuItemIconComponent, MenuItemsService, MenuLayoutDirection, MenuModule, ModalNavMenuComponent, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, TitlePlacement };
|
|
699
729
|
//# sourceMappingURL=tilde-nlp-ngx-menu.mjs.map
|