@lincros-ui/components 0.2.17 → 0.2.19
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.cjs +30 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
|
42
42
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
43
43
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
44
44
|
import { Link, useLocation, Navigate, useNavigate } from 'react-router-dom';
|
|
45
|
-
import {
|
|
45
|
+
import { canAccessMenu } from '@/lib/menu-permissions';
|
|
46
46
|
import { useEditor, EditorContent } from '@tiptap/react';
|
|
47
47
|
import StarterKit from '@tiptap/starter-kit';
|
|
48
48
|
import Image2 from '@tiptap/extension-image';
|
|
@@ -4763,6 +4763,15 @@ var SSOLoadingOverlay = memo(({
|
|
|
4763
4763
|
});
|
|
4764
4764
|
var SSOLoadingOverlay_default = SSOLoadingOverlay;
|
|
4765
4765
|
SSOLoadingOverlay.displayName = "SSOLoadingOverlay";
|
|
4766
|
+
|
|
4767
|
+
// src/menu-permissions.ts
|
|
4768
|
+
var MenuPermissionLevel = /* @__PURE__ */ ((MenuPermissionLevel2) => {
|
|
4769
|
+
MenuPermissionLevel2["ALL"] = "ALL";
|
|
4770
|
+
MenuPermissionLevel2["ADMIN_ONLY"] = "ADMIN_ONLY";
|
|
4771
|
+
MenuPermissionLevel2["MANAGER_OR_ADMIN"] = "MANAGER_OR_ADMIN";
|
|
4772
|
+
MenuPermissionLevel2["MASTER_TENANT_ONLY"] = "MASTER_TENANT_ONLY";
|
|
4773
|
+
return MenuPermissionLevel2;
|
|
4774
|
+
})(MenuPermissionLevel || {});
|
|
4766
4775
|
var STORAGE_KEY = "sidebar-expanded-menus";
|
|
4767
4776
|
function useSidebarState(routePaths) {
|
|
4768
4777
|
const location = useLocation();
|
|
@@ -5123,59 +5132,59 @@ function ControlSidebar({
|
|
|
5123
5132
|
title: "Dashboard",
|
|
5124
5133
|
url: routePaths.DASHBOARD,
|
|
5125
5134
|
icon: Monitor,
|
|
5126
|
-
permission:
|
|
5135
|
+
permission: "ALL" /* ALL */
|
|
5127
5136
|
},
|
|
5128
5137
|
{
|
|
5129
5138
|
title: "Monitoramento de Rotas",
|
|
5130
5139
|
url: routePaths.ROUTE_MONITORING,
|
|
5131
5140
|
icon: Navigation,
|
|
5132
|
-
permission:
|
|
5141
|
+
permission: "ADMIN_ONLY" /* ADMIN_ONLY */
|
|
5133
5142
|
},
|
|
5134
5143
|
{
|
|
5135
5144
|
title: "Alertas",
|
|
5136
5145
|
url: routePaths.ALERTS,
|
|
5137
5146
|
icon: Bell,
|
|
5138
|
-
permission:
|
|
5147
|
+
permission: "ALL" /* ALL */
|
|
5139
5148
|
},
|
|
5140
5149
|
{
|
|
5141
5150
|
title: "Relat\xF3rios",
|
|
5142
5151
|
url: routePaths.REPORTS,
|
|
5143
5152
|
icon: BarChart3,
|
|
5144
|
-
permission:
|
|
5153
|
+
permission: "ALL" /* ALL */
|
|
5145
5154
|
},
|
|
5146
5155
|
{
|
|
5147
5156
|
title: "Configura\xE7\xF5es",
|
|
5148
5157
|
icon: Settings,
|
|
5149
|
-
permission:
|
|
5158
|
+
permission: "ADMIN_ONLY" /* ADMIN_ONLY */,
|
|
5150
5159
|
subItems: [
|
|
5151
5160
|
{
|
|
5152
5161
|
title: "Configura\xE7\xF5es Gerais",
|
|
5153
5162
|
url: routePaths.SETTINGS,
|
|
5154
5163
|
icon: Settings,
|
|
5155
|
-
permission:
|
|
5164
|
+
permission: "ALL" /* ALL */
|
|
5156
5165
|
},
|
|
5157
5166
|
{
|
|
5158
5167
|
title: "Usu\xE1rios",
|
|
5159
5168
|
icon: Users,
|
|
5160
|
-
permission:
|
|
5169
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */,
|
|
5161
5170
|
subItems: [
|
|
5162
5171
|
{
|
|
5163
5172
|
title: "Gest\xE3o de Usu\xE1rios",
|
|
5164
5173
|
url: routePaths.USER_MANAGEMENT,
|
|
5165
5174
|
icon: UserCheck,
|
|
5166
|
-
permission:
|
|
5175
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5167
5176
|
},
|
|
5168
5177
|
{
|
|
5169
5178
|
title: "Perfis de Usu\xE1rio",
|
|
5170
5179
|
url: routePaths.USER_PROFILES,
|
|
5171
5180
|
icon: UserCog,
|
|
5172
|
-
permission:
|
|
5181
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5173
5182
|
},
|
|
5174
5183
|
{
|
|
5175
5184
|
title: "Permiss\xF5es",
|
|
5176
5185
|
url: routePaths.PERMISSIONS_MANAGEMENT,
|
|
5177
5186
|
icon: Shield,
|
|
5178
|
-
permission:
|
|
5187
|
+
permission: "ADMIN_ONLY" /* ADMIN_ONLY */
|
|
5179
5188
|
}
|
|
5180
5189
|
]
|
|
5181
5190
|
},
|
|
@@ -5183,30 +5192,30 @@ function ControlSidebar({
|
|
|
5183
5192
|
title: "Motoristas",
|
|
5184
5193
|
url: routePaths.MOTORISTAS,
|
|
5185
5194
|
icon: Car,
|
|
5186
|
-
permission:
|
|
5195
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5187
5196
|
},
|
|
5188
5197
|
{
|
|
5189
5198
|
title: "WhatsApp",
|
|
5190
5199
|
icon: MessageCircle,
|
|
5191
|
-
permission:
|
|
5200
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */,
|
|
5192
5201
|
subItems: [
|
|
5193
5202
|
{
|
|
5194
5203
|
title: "Configura\xE7\xF5es",
|
|
5195
5204
|
url: routePaths.WHATSAPP_CONFIG,
|
|
5196
5205
|
icon: Settings,
|
|
5197
|
-
permission:
|
|
5206
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5198
5207
|
},
|
|
5199
5208
|
{
|
|
5200
5209
|
title: "Triggers de Fluxo",
|
|
5201
5210
|
url: routePaths.WHATSAPP_TRIGGERS,
|
|
5202
5211
|
icon: Workflow,
|
|
5203
|
-
permission:
|
|
5212
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5204
5213
|
},
|
|
5205
5214
|
{
|
|
5206
5215
|
title: "Monitoramento",
|
|
5207
5216
|
url: routePaths.WHATSAPP_MONITORING,
|
|
5208
5217
|
icon: Monitor,
|
|
5209
|
-
permission:
|
|
5218
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5210
5219
|
}
|
|
5211
5220
|
]
|
|
5212
5221
|
},
|
|
@@ -5215,7 +5224,7 @@ function ControlSidebar({
|
|
|
5215
5224
|
title: "Unidades de Neg\xF3cio",
|
|
5216
5225
|
url: routePaths.UNIDADES_NEGOCIO,
|
|
5217
5226
|
icon: Building2,
|
|
5218
|
-
permission:
|
|
5227
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5219
5228
|
}
|
|
5220
5229
|
],
|
|
5221
5230
|
...isMasterTenant ? [
|
|
@@ -5223,7 +5232,7 @@ function ControlSidebar({
|
|
|
5223
5232
|
title: "Tenants",
|
|
5224
5233
|
url: routePaths.TENANT_MANAGEMENT,
|
|
5225
5234
|
icon: Database,
|
|
5226
|
-
permission:
|
|
5235
|
+
permission: "ADMIN_ONLY" /* ADMIN_ONLY */
|
|
5227
5236
|
}
|
|
5228
5237
|
] : []
|
|
5229
5238
|
]
|
|
@@ -5231,19 +5240,19 @@ function ControlSidebar({
|
|
|
5231
5240
|
{
|
|
5232
5241
|
title: "Automa\xE7\xE3o",
|
|
5233
5242
|
icon: Bot,
|
|
5234
|
-
permission:
|
|
5243
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */,
|
|
5235
5244
|
subItems: [
|
|
5236
5245
|
{
|
|
5237
5246
|
title: "Fluxos de Automa\xE7\xE3o",
|
|
5238
5247
|
url: routePaths.FLOWS,
|
|
5239
5248
|
icon: Workflow,
|
|
5240
|
-
permission:
|
|
5249
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5241
5250
|
},
|
|
5242
5251
|
{
|
|
5243
5252
|
title: "Credenciais",
|
|
5244
5253
|
url: routePaths.CREDENTIALS,
|
|
5245
5254
|
icon: Key,
|
|
5246
|
-
permission:
|
|
5255
|
+
permission: "MANAGER_OR_ADMIN" /* MANAGER_OR_ADMIN */
|
|
5247
5256
|
}
|
|
5248
5257
|
]
|
|
5249
5258
|
}
|
|
@@ -11786,6 +11795,6 @@ function Toaster() {
|
|
|
11786
11795
|
] });
|
|
11787
11796
|
}
|
|
11788
11797
|
|
|
11789
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithIcon, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatContainer, ChatHeader, ChatInput, ChatLayout, ChatMessages, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ControlSidebar, CountBadge, CustomSidebarMenuSub, CustomSidebarMenuSubButton, CustomSidebarMenuSubItem, DEFAULT_WEBHOOK_CONFIG, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMaximizableContent, 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, EventInspector, FilterBar_default as FilterBar, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenericFilterBar, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputWithLabel, Label3 as Label, Loading, MCPCategoryToNodeType, MCPSubtypeToIcon, MainLayout, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBubble, MessageHistory, MessageInput, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationBadge, PageHeader, Pagination, PaginationContent, PaginationControls, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordResetModal, Popover, PopoverContent, PopoverTrigger, Progress, ProtectedRoute, QRCodeModal, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, RichTextRenderer, SSOError_default as SSOError, SSOLoadingOverlay_default as SSOLoadingOverlay, SSOLoginButton_default as SSOLoginButton, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SendMessageModal, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, StandardPageLayout, StatusBadge, StatusIndicator_default as StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipButton, TooltipContent, TooltipProvider, TooltipTrigger, TypingIndicator, ViewToggle_default as ViewToggle, WEBHOOK_TEST_EVENTS, WebhookConfigModal, WebhookEventCard, WebhookEventMapper, WebhookFlowLink, WebhookLogsViewer, WebhookMetricsChart, WebhookMetricsMapper, WebhookSubscriptionMapper, WebhookTestModal, WebhookTimeline, WhatsAppHealthMonitor, badgeVariants, beautifyString, buttonVariants, calculateProcessingTime, capitalizeFirst, cn, formatDate, formatDateTime, formatEventType, formatLocalDate, formatLocalDateTime, formatLocalTime, formatStatus, formatTime, getEventTypeVariant, getMetricColor, getNodeBorderStyles, getNodeIconColor, getNodeIconTextColor, getStatusVariant, getTimelineColor, isValidWebhookPayload, sizeConfig as loadingSizes, navigationMenuTriggerStyle, sanitizeWebhookUrl, toCamelCase, toSnakeCase, toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast, validateUrl };
|
|
11798
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithIcon, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatContainer, ChatHeader, ChatInput, ChatLayout, ChatMessages, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ControlSidebar, CountBadge, CustomSidebarMenuSub, CustomSidebarMenuSubButton, CustomSidebarMenuSubItem, DEFAULT_WEBHOOK_CONFIG, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMaximizableContent, 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, EventInspector, FilterBar_default as FilterBar, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenericFilterBar, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputWithLabel, Label3 as Label, Loading, MCPCategoryToNodeType, MCPSubtypeToIcon, MainLayout, MenuPermissionLevel, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBubble, MessageHistory, MessageInput, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationBadge, PageHeader, Pagination, PaginationContent, PaginationControls, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordResetModal, Popover, PopoverContent, PopoverTrigger, Progress, ProtectedRoute, QRCodeModal, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, RichTextRenderer, SSOError_default as SSOError, SSOLoadingOverlay_default as SSOLoadingOverlay, SSOLoginButton_default as SSOLoginButton, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SendMessageModal, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, StandardPageLayout, StatusBadge, StatusIndicator_default as StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipButton, TooltipContent, TooltipProvider, TooltipTrigger, TypingIndicator, ViewToggle_default as ViewToggle, WEBHOOK_TEST_EVENTS, WebhookConfigModal, WebhookEventCard, WebhookEventMapper, WebhookFlowLink, WebhookLogsViewer, WebhookMetricsChart, WebhookMetricsMapper, WebhookSubscriptionMapper, WebhookTestModal, WebhookTimeline, WhatsAppHealthMonitor, badgeVariants, beautifyString, buttonVariants, calculateProcessingTime, capitalizeFirst, cn, formatDate, formatDateTime, formatEventType, formatLocalDate, formatLocalDateTime, formatLocalTime, formatStatus, formatTime, getEventTypeVariant, getMetricColor, getNodeBorderStyles, getNodeIconColor, getNodeIconTextColor, getStatusVariant, getTimelineColor, isValidWebhookPayload, sizeConfig as loadingSizes, navigationMenuTriggerStyle, sanitizeWebhookUrl, toCamelCase, toSnakeCase, toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast, validateUrl };
|
|
11790
11799
|
//# sourceMappingURL=index.js.map
|
|
11791
11800
|
//# sourceMappingURL=index.js.map
|