@tilde-nlp/ngx-menu 8.1.57 → 8.1.59

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
@@ -1,5 +1,5 @@
1
1
  import * as _tilde_nlp_strapi_models from '@tilde-nlp/strapi-models';
2
- import { MenuItem, Media } from '@tilde-nlp/strapi-models';
2
+ import { Menu, Media } from '@tilde-nlp/strapi-models';
3
3
  import * as i0 from '@angular/core';
4
4
  import { OnInit, OnDestroy, EventEmitter, ModuleWithProviders } from '@angular/core';
5
5
  import * as i21 from '@tilde-nlp/ngx-common';
@@ -56,6 +56,7 @@ interface UserMenuOptionButton {
56
56
 
57
57
  interface UserMenuOption {
58
58
  label: string;
59
+ permission?: string;
59
60
  icon?: UserMenuOptionIcon;
60
61
  link?: UserMenuOptionLink;
61
62
  button?: UserMenuOptionButton;
@@ -177,12 +178,13 @@ declare class StarpiMenuService {
177
178
  private readonly menuConfig;
178
179
  private readonly iconService;
179
180
  readonly svgIconNamePrefix = "strapi-menu-icon-";
180
- imgBaseUrl: string;
181
+ apiUrl: string;
181
182
  appId: string;
182
- footerItems: MenuItem[];
183
+ strapiMenu: i0.WritableSignal<Menu | null>;
183
184
  constructor(strapiSubscription: StrapiSubscriptionService, menuConfig: MenuSharedConfig, strapiConfig: StrapiApiConfig, iconService: IconService);
184
185
  getMenuItems(): Observable<CustomMenuItem[]>;
185
186
  unsubscribe(): void;
187
+ private registerSvgIcon;
186
188
  private filterMenuItems;
187
189
  private addBaseUrlIfNecessary;
188
190
  private convertToCustomMenuItem;
@@ -202,6 +204,7 @@ declare class MenuItemsService {
202
204
  private readonly strapiService;
203
205
  private readonly _activeElements;
204
206
  get activeElements(): rxjs.Observable<ActiveMenuItems>;
207
+ readonly isMenuLoaded: i0.WritableSignal<boolean>;
205
208
  private strapiItems;
206
209
  private _strapiGroup;
207
210
  private _allRootItems;
@@ -216,7 +219,8 @@ declare class MenuItemsService {
216
219
  private _mergedGroups;
217
220
  get mergedGroups(): MenuItemGroup[];
218
221
  private get menuItemGroups();
219
- get footerItems(): _tilde_nlp_strapi_models.MenuItem[];
222
+ get strapiMenu(): i0.WritableSignal<_tilde_nlp_strapi_models.Menu | null>;
223
+ get strapiApiUrl(): string;
220
224
  constructor(router: Router, config: MenuSharedConfig, strapiService: StarpiMenuService);
221
225
  setMenuItems(config: MenuSharedConfig): void;
222
226
  /** Finds active element from whole list. RouterLink has priority over custom Id. */
@@ -277,9 +281,12 @@ declare class SideNavMenuComponent extends NavBaseComponent implements OnInit, O
277
281
  readonly EXPAND_PLAUSIBLE_EVENT: PlausibleEvent;
278
282
  readonly COLLAPSE_PLAUSIBLE_EVENT: PlausibleEvent;
279
283
  readonly baseUrl: string | undefined;
284
+ isMenuReady: i0.Signal<boolean>;
285
+ userOptions: i0.Signal<UserMenuOption[]>;
280
286
  logoImageSource: i0.Signal<string>;
287
+ strapiMenuTitle: i0.Signal<string | undefined>;
281
288
  get sideNavWidth(): string | undefined;
282
- get footerItems(): _tilde_nlp_strapi_models.MenuItem[];
289
+ get footerItems(): _tilde_nlp_strapi_models.MenuItem[] | undefined;
283
290
  isMobileRes: boolean;
284
291
  isViewIncreased: i0.Signal<boolean>;
285
292
  constructor(strapiLinkService: StrapiLinkService, domService: DOMService, menuItems: MenuItemsService, accessibility: AccessibilityService);
@@ -292,6 +299,7 @@ declare class SideNavMenuComponent extends NavBaseComponent implements OnInit, O
292
299
  private getColapsedFromLocalStorage;
293
300
  private setColapsedFromLocalStorage;
294
301
  private setIcons;
302
+ private hasPermission;
295
303
  static ɵfac: i0.ɵɵFactoryDeclaration<SideNavMenuComponent, never>;
296
304
  static ɵcmp: i0.ɵɵComponentDeclaration<SideNavMenuComponent, "lib-side-nav-menu", never, { "username": { "alias": "username"; "required": false; }; "menuSettings": { "alias": "menuSettings"; "required": false; }; "productName": { "alias": "productName"; "required": false; }; "supportedLanguages": { "alias": "supportedLanguages"; "required": false; }; "useDefaultLanguageSwitcher": { "alias": "useDefaultLanguageSwitcher"; "required": false; }; }, { "changeLanguageEvent": "changeLanguageEvent"; "loginEvent": "loginEvent"; }, never, ["*"], false, never>;
297
305
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tilde-nlp/ngx-menu",
3
- "version": "8.1.57",
3
+ "version": "8.1.59",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0",