@ramses1er/cbk-toolkit 2.0.0 → 2.1.0

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/client.d.ts CHANGED
@@ -12,6 +12,21 @@ interface NavItem {
12
12
  href: string;
13
13
  subItems?: NavItem[];
14
14
  }
15
+ type FooterItem = {
16
+ icon?: IconType;
17
+ label: string;
18
+ href: string;
19
+ } | {
20
+ icon?: IconType;
21
+ label: string;
22
+ confirm: {
23
+ title?: string;
24
+ question: string;
25
+ messageYes: string;
26
+ messageNo: string;
27
+ onAction: () => Promise<void> | void;
28
+ };
29
+ };
15
30
  interface SideNavStaticConfig {
16
31
  brand?: {
17
32
  logo?: ReactNode;
@@ -20,11 +35,7 @@ interface SideNavStaticConfig {
20
35
  };
21
36
  mainItems: NavItem[];
22
37
  title?: string;
23
- footer?: {
24
- icon?: IconType;
25
- label: string;
26
- href: string;
27
- }[];
38
+ footer?: FooterItem[];
28
39
  toggleIcon?: ReactNode;
29
40
  }
30
41
  interface SideNavProps extends SideNavStaticConfig {
@@ -196,4 +207,4 @@ interface RouteGuardProviderProps {
196
207
  declare function RouteGuardProvider({ children, config, useCurrentUser, pagePermissions, deniedPath, }: RouteGuardProviderProps): React$1.JSX.Element;
197
208
  declare function routeGuard(page: string, Component: ComponentType): (props: Record<string, unknown>) => React$1.JSX.Element;
198
209
 
199
- export { AccessDenied, ActionsMenu, ApiError, type Column, Confirmation, DatePicker, type FetcherOptions, FieldContainer, Form, HeaderContent, Input, Label, LoaderSubmit, Loading, Modal, type NavItem, Option, type RouteGuardConfig, RouteGuardProvider, Select, SessionExpired, SideNav, type SideNavProps, type SideNavStaticConfig, Table, type TableAction, TextArea, type UseCurrentUser, createRouteGuardConfig, createSideNav, fetcher, routeGuard };
210
+ export { AccessDenied, ActionsMenu, ApiError, type Column, Confirmation, DatePicker, type FetcherOptions, FieldContainer, type FooterItem, Form, HeaderContent, Input, Label, LoaderSubmit, Loading, Modal, type NavItem, Option, type RouteGuardConfig, RouteGuardProvider, Select, SessionExpired, SideNav, type SideNavProps, type SideNavStaticConfig, Table, type TableAction, TextArea, type UseCurrentUser, createRouteGuardConfig, createSideNav, fetcher, routeGuard };