@tilde-nlp/ngx-menu 8.1.14 → 8.1.16

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/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import * as i21 from '@tilde-nlp/ngx-common';
6
6
  import { PlausibleEvent, IconService, DOMService } from '@tilde-nlp/ngx-common';
7
7
  import { StrapiSubscriptionService, StrapiApiConfig, StrapiLinkService, PlaceholderComponentBase, StrapiVariablesService } from '@tilde-nlp/ngx-strapi';
8
8
  import * as rxjs from 'rxjs';
9
- import { Observable, Subscription } from 'rxjs';
9
+ import { Observable, Subscription, Subject } from 'rxjs';
10
10
  import * as i12 from '@angular/router';
11
11
  import { IsActiveMatchOptions, Router } from '@angular/router';
12
12
  import * as _tilde_nlp_ngx_menu from '@tilde-nlp/ngx-menu';
@@ -60,6 +60,7 @@ interface SideNavSettings {
60
60
  disableLogoNavigation?: boolean;
61
61
  expandableMenuChildren?: boolean;
62
62
  useLargeLoginButton?: boolean;
63
+ openExternalLinksInSameTab?: boolean;
63
64
  menuVersion?: MENU_VERSION;
64
65
  }
65
66
 
@@ -236,11 +237,27 @@ declare class NavBaseComponent implements OnInit, OnDestroy {
236
237
  static ɵcmp: i0.ɵɵComponentDeclaration<NavBaseComponent, "nav-base", never, { "direction": { "alias": "direction"; "required": false; }; }, {}, never, never, false, never>;
237
238
  }
238
239
 
240
+ declare class MenuAccessibilityService {
241
+ readonly fontSizeLocalStorageKey = "ACCESSIBILITY_FONT_SIZE_IX";
242
+ readonly contrastLocalStorageKey = "ACCESSIBILITY_CONTRAST";
243
+ sizeIncreaseSubject: Subject<boolean>;
244
+ contrastSubject: Subject<string>;
245
+ saveContrast(contrast: string): void;
246
+ getSavedContrast(): string;
247
+ getSavedFontSize(): number;
248
+ saveFontSize(ix: number): void;
249
+ setFontSize(fontSizeIx: number): void;
250
+ setContrast(contrast: string): void;
251
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuAccessibilityService, never>;
252
+ static ɵprov: i0.ɵɵInjectableDeclaration<MenuAccessibilityService>;
253
+ }
254
+
239
255
  declare class SideNavMenuComponent extends NavBaseComponent implements OnInit, OnDestroy {
240
256
  #private;
241
257
  strapiLinkService: StrapiLinkService;
242
258
  readonly domService: DOMService;
243
259
  readonly menuItems: MenuItemsService;
260
+ readonly accessibility: MenuAccessibilityService;
244
261
  get username(): string | undefined;
245
262
  set username(value: string | undefined);
246
263
  menuSettings: SideNavSettings;
@@ -262,13 +279,16 @@ declare class SideNavMenuComponent extends NavBaseComponent implements OnInit, O
262
279
  get menuLogoImage(): string;
263
280
  get sideNavWidth(): string | undefined;
264
281
  get footerItems(): _tilde_nlp_strapi_models.MenuItem[];
265
- constructor(strapiLinkService: StrapiLinkService, domService: DOMService, menuItems: MenuItemsService);
282
+ isViewIncreased: boolean;
283
+ isMobileRes: boolean;
284
+ constructor(strapiLinkService: StrapiLinkService, domService: DOMService, menuItems: MenuItemsService, accessibility: MenuAccessibilityService);
266
285
  ngOnInit(): void;
267
286
  login(): void;
268
287
  logoClick(event: MouseEvent): void;
269
288
  toggleCollapse(): void;
270
289
  linkCallback(link: UserMenuOptionLink): void;
271
290
  changeLanguage(lang: string): void;
291
+ private watchAccessibilityChanges;
272
292
  private getColapsedFromLocalStorage;
273
293
  private setColapsedFromLocalStorage;
274
294
  static ɵfac: i0.ɵɵFactoryDeclaration<SideNavMenuComponent, never>;
@@ -283,6 +303,7 @@ declare class MenuItemListComponent implements OnInit {
283
303
  labelsVisible: boolean;
284
304
  activeItem: CustomMenuItem | undefined;
285
305
  showIcons: boolean;
306
+ openExternalLinksInSameTab: boolean;
286
307
  expandableMenuChildren: boolean;
287
308
  items: CustomMenuItem[];
288
309
  menuItemGroup: MenuItemGroupBase;
@@ -297,7 +318,7 @@ declare class MenuItemListComponent implements OnInit {
297
318
  toggleExpandEvent(item: CustomMenuItem): void;
298
319
  openMenu(): void;
299
320
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemListComponent, never>;
300
- static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemListComponent, "menu-item-list", never, { "direction": { "alias": "direction"; "required": false; }; "labelsVisible": { "alias": "labelsVisible"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "expandableMenuChildren": { "alias": "expandableMenuChildren"; "required": false; }; "items": { "alias": "items"; "required": false; }; "menuItemGroup": { "alias": "menuItemGroup"; "required": false; }; }, { "openMenuTrigger": "openMenuTrigger"; "toggleExpand": "toggleExpand"; }, never, never, false, never>;
321
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemListComponent, "menu-item-list", never, { "direction": { "alias": "direction"; "required": false; }; "labelsVisible": { "alias": "labelsVisible"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "openExternalLinksInSameTab": { "alias": "openExternalLinksInSameTab"; "required": false; }; "expandableMenuChildren": { "alias": "expandableMenuChildren"; "required": false; }; "items": { "alias": "items"; "required": false; }; "menuItemGroup": { "alias": "menuItemGroup"; "required": false; }; }, { "openMenuTrigger": "openMenuTrigger"; "toggleExpand": "toggleExpand"; }, never, never, false, never>;
301
322
  }
302
323
 
303
324
  declare class MenuColumnsComponent implements OnInit {
@@ -307,6 +328,7 @@ declare class MenuColumnsComponent implements OnInit {
307
328
  direction: MenuLayoutDirection;
308
329
  isOpen: boolean;
309
330
  expandableMenuChildren: boolean | undefined;
331
+ openExternalLinksInSameTab: boolean | undefined;
310
332
  toggleCollapseEvent: EventEmitter<any>;
311
333
  private _active;
312
334
  get active(): ActiveMenuItems;
@@ -319,7 +341,7 @@ declare class MenuColumnsComponent implements OnInit {
319
341
  openMenu(): void;
320
342
  private toggleOnMobileSelect;
321
343
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuColumnsComponent, [null, { optional: true; }, null]>;
322
- static ɵcmp: i0.ɵɵComponentDeclaration<MenuColumnsComponent, "menu-columns", never, { "direction": { "alias": "direction"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "expandableMenuChildren": { "alias": "expandableMenuChildren"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, { "toggleCollapseEvent": "toggleCollapseEvent"; }, never, never, false, never>;
344
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuColumnsComponent, "menu-columns", never, { "direction": { "alias": "direction"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "expandableMenuChildren": { "alias": "expandableMenuChildren"; "required": false; }; "openExternalLinksInSameTab": { "alias": "openExternalLinksInSameTab"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, { "toggleCollapseEvent": "toggleCollapseEvent"; }, never, never, false, never>;
323
345
  }
324
346
 
325
347
  declare class MenuIconComponent {
@@ -337,6 +359,7 @@ declare class MenuItemLinkComponent implements OnInit, OnDestroy, PlaceholderCom
337
359
  labelsVisible: boolean;
338
360
  activeItem: CustomMenuItem | undefined;
339
361
  showIcons: boolean;
362
+ openInSameTab: boolean;
340
363
  menuItem: CustomMenuItem;
341
364
  textWithPlaceholders: string;
342
365
  href: string;
@@ -351,7 +374,7 @@ declare class MenuItemLinkComponent implements OnInit, OnDestroy, PlaceholderCom
351
374
  updateTextWithPlaceholders: (textWithReplacedPlaceholders: string) => string;
352
375
  ngOnDestroy(): void;
353
376
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemLinkComponent, never>;
354
- static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemLinkComponent, "tld-menu-item-link", never, { "direction": { "alias": "direction"; "required": false; }; "labelsVisible": { "alias": "labelsVisible"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "menuItem": { "alias": "menuItem"; "required": false; }; }, {}, never, never, false, never>;
377
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemLinkComponent, "tld-menu-item-link", never, { "direction": { "alias": "direction"; "required": false; }; "labelsVisible": { "alias": "labelsVisible"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "openInSameTab": { "alias": "openInSameTab"; "required": false; }; "menuItem": { "alias": "menuItem"; "required": false; }; }, {}, never, never, false, never>;
355
378
  }
356
379
 
357
380
  declare class MenuItemBtnComponent {
@@ -402,12 +425,13 @@ declare class MenuItemWithChildrenComponent {
402
425
  activeItem: CustomMenuItem | undefined;
403
426
  direction: MenuLayoutDirection;
404
427
  expandableMenuChildren: boolean;
428
+ openInSameTab: boolean;
405
429
  openMenu: EventEmitter<void>;
406
430
  toggleExpand: EventEmitter<CustomMenuItem>;
407
431
  toggleMenuExpand(event: MouseEvent, menuItem: CustomMenuItem): void;
408
432
  toggleItemExpand(menuItem: CustomMenuItem): void;
409
433
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemWithChildrenComponent, never>;
410
- static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemWithChildrenComponent, "lib-menu-item-with-children", never, { "menuItem": { "alias": "menuItem"; "required": false; }; "labelsVisible": { "alias": "labelsVisible"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "menuLayoutDirection": { "alias": "menuLayoutDirection"; "required": false; }; "menuItemLayout": { "alias": "menuItemLayout"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "expandableMenuChildren": { "alias": "expandableMenuChildren"; "required": false; }; }, { "openMenu": "openMenu"; "toggleExpand": "toggleExpand"; }, never, never, false, never>;
434
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemWithChildrenComponent, "lib-menu-item-with-children", never, { "menuItem": { "alias": "menuItem"; "required": false; }; "labelsVisible": { "alias": "labelsVisible"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "menuLayoutDirection": { "alias": "menuLayoutDirection"; "required": false; }; "menuItemLayout": { "alias": "menuItemLayout"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "expandableMenuChildren": { "alias": "expandableMenuChildren"; "required": false; }; "openInSameTab": { "alias": "openInSameTab"; "required": false; }; }, { "openMenu": "openMenu"; "toggleExpand": "toggleExpand"; }, never, never, false, never>;
411
435
  }
412
436
 
413
437
  declare class MenuAccessibilityComponent implements OnInit {
@@ -444,5 +468,5 @@ declare const USER_MENU_OPTIONS: {
444
468
  login: (callback: () => void) => UserMenuOption;
445
469
  };
446
470
 
447
- export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MENU_VERSION, MenuColumnsComponent, MenuItemsService, MenuLayoutDirection, MenuModule, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, USER_MENU_OPTIONS };
471
+ export { MENU_ICON_STRAPI_EXTENSION, MENU_SHARED_CONFIG, MENU_VERSION, MenuAccessibilityService, MenuColumnsComponent, MenuItemsService, MenuLayoutDirection, MenuModule, NavBaseComponent, SideNavMenuComponent, StarpiMenuService, StrapiDataLocation, USER_MENU_OPTIONS };
448
472
  export type { ActiveMenuItemConfig, ActiveMenuItems, CustomMenuItem, MenuItemGroup, MenuItemGroupBase, MenuSharedConfig, SideNavSettings, UserMenuOption };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tilde-nlp/ngx-menu",
3
- "version": "8.1.14",
3
+ "version": "8.1.16",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0",
@@ -0,0 +1,206 @@
1
+ @use "sass:map";
2
+ @use "@angular/material" as mat;
3
+
4
+ $_palettes: (
5
+ primary: (
6
+ 0: #000000,
7
+ 10: #1b1b1b,
8
+ 20: #303030,
9
+ 25: #3b3b3b,
10
+ 30: #474747,
11
+ 35: #525252,
12
+ 40: #5e5e5e,
13
+ 50: #777777,
14
+ 60: #919191,
15
+ 70: #ababab,
16
+ 80: #c6c6c6,
17
+ 90: #e2e2e2,
18
+ 95: #f1f1f1,
19
+ 98: #f9f9f9,
20
+ 99: #fcfcfc,
21
+ 100: #ffffff,
22
+ ),
23
+ secondary: (
24
+ 0: #000000,
25
+ 10: #1a1c1c,
26
+ 20: #2f3131,
27
+ 25: #3a3c3c,
28
+ 30: #454747,
29
+ 35: #515353,
30
+ 40: #5d5f5f,
31
+ 50: #767777,
32
+ 60: #909191,
33
+ 70: #aaabab,
34
+ 80: #c6c6c7,
35
+ 90: #e2e2e2,
36
+ 95: #f0f1f1,
37
+ 98: #f9f9f9,
38
+ 99: #fcfcfc,
39
+ 100: #ffffff,
40
+ ),
41
+ tertiary: (
42
+ 0: #000000,
43
+ 10: #1b1b1b,
44
+ 20: #303030,
45
+ 25: #3b3b3b,
46
+ 30: #474747,
47
+ 35: #525252,
48
+ 40: #5e5e5e,
49
+ 50: #777777,
50
+ 60: #919191,
51
+ 70: #ababab,
52
+ 80: #c6c6c6,
53
+ 90: #e2e2e2,
54
+ 95: #f1f1f1,
55
+ 98: #f9f9f9,
56
+ 99: #fcfcfc,
57
+ 100: #ffffff,
58
+ ),
59
+ neutral: (
60
+ 0: #000000,
61
+ 10: #1b1b1b,
62
+ 20: #303030,
63
+ 25: #3b3b3b,
64
+ 30: #474747,
65
+ 35: #525252,
66
+ 40: #5e5e5e,
67
+ 50: #777777,
68
+ 60: #919191,
69
+ 70: #ababab,
70
+ 80: #c6c6c6,
71
+ 90: #e2e2e2,
72
+ 95: #f1f1f1,
73
+ 98: #f9f9f9,
74
+ 99: #fcfcfc,
75
+ 100: #ffffff,
76
+ 4: #0e0e0e,
77
+ 6: #131313,
78
+ 12: #1f1f1f,
79
+ 17: #2a2a2a,
80
+ 22: #353535,
81
+ 24: #393939,
82
+ 87: #dadada,
83
+ 92: #e8e8e8,
84
+ 94: #eeeeee,
85
+ 96: #f3f3f3,
86
+ ),
87
+ neutral-variant: (
88
+ 0: #000000,
89
+ 10: #201a1b,
90
+ 20: #352f30,
91
+ 25: #413a3b,
92
+ 30: #4c4546,
93
+ 35: #585052,
94
+ 40: #645c5e,
95
+ 50: #7e7576,
96
+ 60: #988e90,
97
+ 70: #b3a9aa,
98
+ 80: #cfc4c5,
99
+ 90: #ebe0e1,
100
+ 95: #faeeef,
101
+ 98: #fff8f8,
102
+ 99: #fffbff,
103
+ 100: #ffffff,
104
+ ),
105
+ error: (
106
+ 0: #000000,
107
+ 10: #410002,
108
+ 20: #690005,
109
+ 25: #7e0007,
110
+ 30: #93000a,
111
+ 35: #a80710,
112
+ 40: #ba1a1a,
113
+ 50: #de3730,
114
+ 60: #ff5449,
115
+ 70: #ff897d,
116
+ 80: #ffb4ab,
117
+ 90: #ffdad6,
118
+ 95: #ffedea,
119
+ 98: #fff8f7,
120
+ 99: #fffbff,
121
+ 100: #ffffff,
122
+ ),
123
+ );
124
+
125
+ $_rest: (
126
+ secondary: map.get($_palettes, secondary),
127
+ neutral: map.get($_palettes, neutral),
128
+ neutral-variant: map.get($_palettes, neutral-variant),
129
+ error: map.get($_palettes, error),
130
+ );
131
+
132
+ $primary-palette: map.merge(map.get($_palettes, primary), $_rest);
133
+ $tertiary-palette: map.merge(map.get($_palettes, tertiary), $_rest);
134
+
135
+ html.black-white {
136
+ --base-0: #ffffff !important;
137
+ --base-10: #f1f1f1 !important;
138
+ --base-30: #ababab !important;
139
+ --base-40: #919191 !important;
140
+ --base-65: #5e5e5e !important;
141
+ --base-70: #474747 !important;
142
+ --base-95: #1b1b1b !important;
143
+ --base-100: #000000 !important;
144
+ --neutral-50: #847374 !important;
145
+ --neutral-95: #fbeeee !important;
146
+ --overlay: #181a1b 70% !important;
147
+ --primary-accent: #000000 !important;
148
+ --primary-accent-lighter: #373737 !important;
149
+ --secondary-accent: #ffffff !important;
150
+ --info-primary: #0288d1 !important;
151
+ --info-dark: #014361 !important;
152
+ --info-light: #e5f6fd !important;
153
+ --success-dark: #177d61 !important;
154
+ --success-light: #e1f9f3 !important;
155
+ --warning-dark: #b25300 !important;
156
+ --warning-light: #fff1e5 !important;
157
+ --error-dark: #c42121 !important;
158
+ --error-light: #fdf2f2 !important;
159
+ --gradient: #667680 !important;
160
+ --accent: #000000 !important;
161
+
162
+ --mat-menu-item-label-text-color: #000000 !important;
163
+ --mat-menu-container-color: #e2e2e2 !important;
164
+
165
+ @include mat.dialog-overrides(
166
+ (
167
+ subhead-color: var(--base-0),
168
+ )
169
+ );
170
+
171
+ @include mat.tabs-overrides(
172
+ (
173
+ inactive-label-text-color: var(--base-0),
174
+ inactive-hover-label-text-color: var(--base-0),
175
+ )
176
+ );
177
+
178
+ @include mat.button-overrides((
179
+ outlined-label-text-color: var(--base-0),
180
+ outlined-outline-color: var(--base-0)
181
+ ));
182
+
183
+ @include mat.theme(
184
+ (
185
+ color: (
186
+ primary: $primary-palette,
187
+ tertiary: $tertiary-palette,
188
+ theme-type: light,
189
+ ),
190
+ )
191
+ );
192
+
193
+ body {
194
+ color: var(--base-0) !important;
195
+ background-color: var(--base-100) !important;
196
+ }
197
+
198
+ textarea, input {
199
+ background-color: var(--base-100) !important;
200
+ }
201
+
202
+ .mat-mdc-outlined-button.mat-accent {
203
+ color: var(--base-0) !important;
204
+ border-color: var(--base-0) !important;
205
+ }
206
+ }