sass-cms-template-common 0.0.0 → 0.0.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/dist/index.d.ts CHANGED
@@ -6,7 +6,13 @@ import { ReactNode } from 'react';
6
6
  import { RefAttributes } from 'react';
7
7
  import { Theme } from '@mui/material/styles';
8
8
 
9
- export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notifications, profile, navBlocks, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, LinkComponent, }: AppShellProps): JSX.Element;
9
+ /**
10
+ * Navegación lateral por defecto.
11
+ * `module` debe coincidir exactamente con `module` en POST /auth/modulesAvailable.
12
+ */
13
+ export declare const ACCOUNT_NAV_BLOCKS: NavBlock[];
14
+
15
+ export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, LinkComponent, permissions, }: AppShellProps): JSX.Element;
10
16
 
11
17
  export declare type AppShellProps = {
12
18
  pathname: string;
@@ -15,7 +21,6 @@ export declare type AppShellProps = {
15
21
  notificationUnreadCount: number;
16
22
  notifications: DashboardNotification[];
17
23
  profile: ProfileGetResponse;
18
- navBlocks: NavBlock[];
19
24
  primaryLogo: ReactNode;
20
25
  brandLogo?: ReactNode;
21
26
  selectedPublicationId?: string;
@@ -23,6 +28,7 @@ export declare type AppShellProps = {
23
28
  resolvePublicationImageUrl?: (imagePath: string) => string;
24
29
  profileAvatarOptions?: ProfileAvatarOptions;
25
30
  LinkComponent?: CmsLinkComponent;
31
+ permissions: Array<NavItemPermissions>;
26
32
  };
27
33
 
28
34
  export declare type CmsLinkComponent = ElementType<CmsLinkProps & RefAttributes<HTMLAnchorElement>>;
@@ -85,14 +91,19 @@ export declare const LIB_VERSION: "0.0.0";
85
91
 
86
92
  export declare const MENU_BG = "#ECEDF6";
87
93
 
88
- export declare type NavBlock = NavLinkItem[] | {
89
- divider: true;
94
+ export declare type NavBlock = NavLinkItem;
95
+
96
+ export declare type NavItemPermissions = {
97
+ module: string;
98
+ isNew: boolean;
90
99
  };
91
100
 
92
101
  export declare type NavLinkItem = {
93
102
  label: string;
94
103
  href: string;
95
104
  icon: ElementType;
105
+ /** Clave de POST /auth/modulesAvailable (p. ej. `NEWSWIRES`, `MENUS`) */
106
+ module: string;
96
107
  badge?: string;
97
108
  children?: NavLinkItem[];
98
109
  defaultOpen?: boolean;
@@ -230,13 +241,13 @@ export declare function resolveCmsAssetUrl(path: string, cmsOrigin?: string): st
230
241
 
231
242
  export declare function resolveCmsOrigin(cmsOrigin?: string): string;
232
243
 
233
- export declare function Sidebar({ open, pathname, navBlocks, LinkComponent, }: SidebarProps): JSX.Element;
244
+ export declare function Sidebar({ open, pathname, permissions, LinkComponent, }: SidebarProps): JSX.Element;
234
245
 
235
246
  export declare type SidebarProps = {
236
247
  open: boolean;
237
248
  pathname: string;
238
- navBlocks: NavBlock[];
239
249
  LinkComponent?: CmsLinkComponent;
250
+ permissions: Array<NavItemPermissions>;
240
251
  };
241
252
 
242
253
  export declare type SiteSection = {