@orsetra/shared-ui 1.0.25 → 1.0.26

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.
@@ -11,6 +11,7 @@ import { useIsMobile } from "../../hooks/use-mobile"
11
11
  import { Menu } from "lucide-react"
12
12
 
13
13
  interface LayoutContainerProps {
14
+ main_base_url: string
14
15
  children: React.ReactNode
15
16
  sidebarMenus: SidebarMenus
16
17
  user?: { profile?: { email?: string; preferred_username?: string } } | null
@@ -19,7 +20,7 @@ interface LayoutContainerProps {
19
20
  userMenuConfig?: UserMenuConfig
20
21
  }
21
22
 
22
- function LayoutContent({ children, sidebarMenus, user, onSignOut, mode = 'expanded', userMenuConfig }: LayoutContainerProps) {
23
+ function LayoutContent({ children, sidebarMenus, user, onSignOut, mode = 'expanded', userMenuConfig, main_base_url }: LayoutContainerProps) {
23
24
  const pathname = usePathname()
24
25
  const { setOpen } = useSidebar()
25
26
  const isMobile = useIsMobile()
@@ -69,6 +70,7 @@ function LayoutContent({ children, sidebarMenus, user, onSignOut, mode = 'expand
69
70
 
70
71
  {/* MainSidebar - always available, opens as overlay when isHidden */}
71
72
  <MainSidebar
73
+ main_base_url={main_base_url}
72
74
  isOpen={isMainSidebarOpen}
73
75
  onToggle={handleMainSidebarToggle}
74
76
  onMenuSelect={handleMenuSelect}
@@ -13,6 +13,7 @@ import Link from "next/link"
13
13
  export type SidebarMode = 'expanded' | 'minimized' | 'hidden'
14
14
 
15
15
  interface MainSidebarProps {
16
+ main_base_url: string
16
17
  isOpen: boolean
17
18
  onToggle: () => void
18
19
  onMenuSelect: (menu: string) => void
@@ -23,6 +24,7 @@ interface MainSidebarProps {
23
24
  }
24
25
 
25
26
  export function MainSidebar({
27
+ main_base_url,
26
28
  isOpen,
27
29
  onToggle,
28
30
  onMenuSelect,
@@ -49,7 +51,7 @@ export function MainSidebar({
49
51
  router.push(subMenus[0].href)
50
52
  } else {
51
53
  // Fallback: naviguer vers /{menuId} (ex: /assets-manager)
52
- router.push(`/${menuId}`)
54
+ router.push(`${main_base_url}/${menuId}`)
53
55
  }
54
56
 
55
57
  if (!isMinimized) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",