@seliseblocks/genesis-os 4.2.9 → 4.3.1

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.
@@ -9146,7 +9146,8 @@ var INLINE_LIMIT = 3;
9146
9146
  var ProjectCard = ({
9147
9147
  project,
9148
9148
  projects,
9149
- isShared
9149
+ isShared,
9150
+ canOpen = true
9150
9151
  }) => {
9151
9152
  const navigate = useNavigate();
9152
9153
  const { setTenantGroup, setSelectedProject } = useProjectStore();
@@ -9194,17 +9195,35 @@ var ProjectCard = ({
9194
9195
  RenderAlternatively,
9195
9196
  {
9196
9197
  condition: isShared,
9197
- whenTrue: /* @__PURE__ */ jsxs(
9198
- Badge,
9199
- {
9200
- variant: "outline",
9201
- className: "flex items-center gap-1 shrink-0",
9202
- children: [
9203
- /* @__PURE__ */ jsx(UsersRound, { size: 16 }),
9204
- "Shared"
9205
- ]
9206
- }
9207
- ),
9198
+ whenTrue: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
9199
+ /* @__PURE__ */ jsxs(
9200
+ Badge,
9201
+ {
9202
+ variant: "outline",
9203
+ className: "flex items-center gap-1 shrink-0",
9204
+ children: [
9205
+ /* @__PURE__ */ jsx(UsersRound, { size: 16 }),
9206
+ "Shared"
9207
+ ]
9208
+ }
9209
+ ),
9210
+ canOpen && /* @__PURE__ */ jsxs(Tooltip, { children: [
9211
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
9212
+ Button,
9213
+ {
9214
+ size: "icon",
9215
+ "data-testid": "project-card-open-shared",
9216
+ variant: "ghost",
9217
+ className: "text-primary hover:bg-primary/10 h-8 w-8 shrink-0 transition-colors",
9218
+ disabled: isDisabled || isFetching,
9219
+ onClick: onConfigureClick,
9220
+ "aria-label": "Open shared project",
9221
+ children: /* @__PURE__ */ jsx(Settings2, { size: 16 })
9222
+ }
9223
+ ) }),
9224
+ /* @__PURE__ */ jsx(TooltipContent, { children: "Open Project" })
9225
+ ] })
9226
+ ] }),
9208
9227
  whenFalse: /* @__PURE__ */ jsxs(Tooltip, { children: [
9209
9228
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
9210
9229
  Button,
@@ -9283,6 +9302,7 @@ var cardVariants = {
9283
9302
  }
9284
9303
  })
9285
9304
  };
9305
+ var canOpenProject = (group) => !group.isShared || !group.accessPolicies || group.accessPolicies.length > 0;
9286
9306
  var SelfProjectLoading = () => {
9287
9307
  return /* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: ["sk-1", "sk-2", "sk-3", "sk-4", "sk-5", "sk-6", "sk-7", "sk-8"].map(
9288
9308
  (itemKey) => /* @__PURE__ */ jsx(ProjectCardLoadingSkeleton, {}, itemKey)
@@ -9325,7 +9345,8 @@ var SelfProject = ({ canCreateProject = false }) => {
9325
9345
  {
9326
9346
  project: project.projects[0],
9327
9347
  projects: project.projects,
9328
- isShared: project.isShared
9348
+ isShared: project.isShared,
9349
+ canOpen: canOpenProject(project)
9329
9350
  }
9330
9351
  )
9331
9352
  },
@@ -12320,5 +12341,5 @@ var TablePagination2 = React8.forwardRef(
12320
12341
  TablePagination2.displayName = "TablePagination";
12321
12342
 
12322
12343
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSwitcher, ArchiveProject, AspectRatio, AuthLayout, Avatar, AvatarFallback, AvatarImage, BackToConsoleNavigator, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CallbackPage, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmationModal, ConsoleHeader, ConsoleLayout, ConsolePage, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyToClipboardButton, CopyableSnippet, DEFAULT_KANBAN_COLUMNS, DashboardHeader, DashboardLayout, DashboardOverview, DashboardRoute, DashboardSectionCard, DataTable, DataTableHeaderCell, DateRangePicker, DesktopMenuItem, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditProject, EditProjectDialog, EditProjectForm, EnvironmentCard, EnvironmentList, ErrorBoundary, ErrorDisplay, ErrorDisplayWithCard, FileInput, FileUploader, FileUploaderContent, FileUploaderItem, FilterControls, FilterToolBarMobileView, FilterToolbar, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, ImportFileModalContent, InfiniteScroll, InfiniteScroller, InfoTooltip, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, KanbanBoard, KanbanBoardColumn, KanbanBoardContainer, KanbanTaskCard, Label, LanguageSelector, LoadingButton, LoginPage, Logo, MaskedText, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MobileMenuItem, MultiSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Notification, OidcLayout, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, ProfilePage, Progress, ProjectActions, ProjectCardLoadingSkeleton, ProjectDetail, ProjectList, ProjectOverview, ProjectRepoList, PublicLayout, RadioGroup4 as RadioGroup, RadioGroupItem, RenderAlternatively, RenderConditionally, ResizableHandle, ResizablePanel, ResizablePanelGroup, RightSidePanel, RightSidePanelBody, RightSidePanelClose, RightSidePanelDescription, RightSidePanelFooter, RightSidePanelHeader, RightSidePanelProvider, RightSidePanelTitle, RightSidePanelTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectedEnvironment, SelectedProject, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarCollapsedTooltip, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDesktop, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarMobileView, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableLoadingSkeleton, TablePagination2 as TablePagination, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeSwitcher, Timeline, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserDropdownMenu, WizardHorizontalTrackBar, WizardStepContent, WizardStepIndicator, WizardStepViewport, WizardStepperProvider, WizardVerticalTrackBar, badgeVariants, buttonVariants, editProjectFormDefaultValues, editProjectFormSchema, filteredAppSwitcherData, hasDraggableData, kanbanKeyboardCoordinateGetter, navigationMenuTriggerStyle, paginationQueryParsers, sidebarCollapsedTooltipClass, sortQueryParsers, spinnerVariants, toggleVariants, useFileUpload, useFormField, useNotificationSocket, useOidcContext, usePaginationQueryParams, useRightSidePanel, useSortQueryParams, useWizardStepper };
12323
- //# sourceMappingURL=chunk-5D4AQMX5.js.map
12324
- //# sourceMappingURL=chunk-5D4AQMX5.js.map
12344
+ //# sourceMappingURL=chunk-X35MVDEU.js.map
12345
+ //# sourceMappingURL=chunk-X35MVDEU.js.map