@databricks/appkit-ui 0.17.0 → 0.19.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/CLAUDE.md +9 -1
- package/dist/cli/commands/plugin/create/scaffold.js +2 -8
- package/dist/cli/commands/plugin/create/scaffold.js.map +1 -1
- package/dist/react/charts/base.js +3 -2
- package/dist/react/charts/base.js.map +1 -1
- package/dist/react/charts/normalize.d.ts.map +1 -1
- package/dist/react/charts/normalize.js +3 -1
- package/dist/react/charts/normalize.js.map +1 -1
- package/dist/react/charts/options.d.ts +1 -0
- package/dist/react/charts/options.d.ts.map +1 -1
- package/dist/react/charts/options.js +13 -8
- package/dist/react/charts/options.js.map +1 -1
- package/dist/react/charts/utils.d.ts.map +1 -1
- package/dist/react/charts/utils.js +23 -1
- package/dist/react/charts/utils.js.map +1 -1
- package/dist/react/file-browser/directory-list.d.ts +54 -0
- package/dist/react/file-browser/directory-list.d.ts.map +1 -0
- package/dist/react/file-browser/directory-list.js +74 -0
- package/dist/react/file-browser/directory-list.js.map +1 -0
- package/dist/react/file-browser/file-breadcrumb.d.ts +25 -0
- package/dist/react/file-browser/file-breadcrumb.d.ts.map +1 -0
- package/dist/react/file-browser/file-breadcrumb.js +27 -0
- package/dist/react/file-browser/file-breadcrumb.js.map +1 -0
- package/dist/react/file-browser/file-entry.d.ts +27 -0
- package/dist/react/file-browser/file-entry.d.ts.map +1 -0
- package/dist/react/file-browser/file-entry.js +31 -0
- package/dist/react/file-browser/file-entry.js.map +1 -0
- package/dist/react/file-browser/file-preview-panel.d.ts +42 -0
- package/dist/react/file-browser/file-preview-panel.d.ts.map +1 -0
- package/dist/react/file-browser/file-preview-panel.js +135 -0
- package/dist/react/file-browser/file-preview-panel.js.map +1 -0
- package/dist/react/file-browser/index.d.ts +7 -0
- package/dist/react/file-browser/index.js +6 -0
- package/dist/react/file-browser/new-folder-input.d.ts +36 -0
- package/dist/react/file-browser/new-folder-input.d.ts.map +1 -0
- package/dist/react/file-browser/new-folder-input.js +52 -0
- package/dist/react/file-browser/new-folder-input.js.map +1 -0
- package/dist/react/file-browser/types.d.ts +52 -0
- package/dist/react/file-browser/types.d.ts.map +1 -0
- package/dist/react/genie/genie-chart-inference.d.ts +17 -0
- package/dist/react/genie/genie-chart-inference.d.ts.map +1 -0
- package/dist/react/genie/genie-chart-inference.js +75 -0
- package/dist/react/genie/genie-chart-inference.js.map +1 -0
- package/dist/react/genie/genie-chat-message-list.js +1 -1
- package/dist/react/genie/genie-chat-message.d.ts.map +1 -1
- package/dist/react/genie/genie-chat-message.js +27 -16
- package/dist/react/genie/genie-chat-message.js.map +1 -1
- package/dist/react/genie/genie-query-transform.d.ts +31 -0
- package/dist/react/genie/genie-query-transform.d.ts.map +1 -0
- package/dist/react/genie/genie-query-transform.js +79 -0
- package/dist/react/genie/genie-query-transform.js.map +1 -0
- package/dist/react/genie/genie-query-visualization.d.ts +25 -0
- package/dist/react/genie/genie-query-visualization.d.ts.map +1 -0
- package/dist/react/genie/genie-query-visualization.js +79 -0
- package/dist/react/genie/genie-query-visualization.js.map +1 -0
- package/dist/react/genie/index.d.ts +4 -1
- package/dist/react/genie/index.js +3 -0
- package/dist/react/genie/types.d.ts +2 -2
- package/dist/react/genie/types.d.ts.map +1 -1
- package/dist/react/index.d.ts +13 -2
- package/dist/react/index.js +16 -6
- package/dist/react/lib/format.d.ts +14 -0
- package/dist/react/lib/format.d.ts.map +1 -0
- package/dist/react/lib/format.js +17 -1
- package/dist/react/lib/format.js.map +1 -1
- package/dist/react/table/data-table.js +2 -2
- package/dist/react/table/table-wrapper.js +1 -1
- package/dist/react/ui/breadcrumb.js +1 -1
- package/dist/react/ui/index.js +5 -5
- package/dist/react/ui/navigation-menu.js +1 -1
- package/dist/react/ui/sidebar.js +1 -1
- package/dist/shared/src/genie.d.ts +16 -2
- package/dist/shared/src/genie.d.ts.map +1 -1
- package/dist/shared/src/index.d.ts +1 -1
- package/docs/api/appkit/Class.Plugin.md +60 -12
- package/docs/api/appkit/Class.ResourceRegistry.md +3 -3
- package/docs/api/appkit/Function.createApp.md +3 -3
- package/docs/api/appkit/Interface.PluginManifest.md +9 -3
- package/docs/api/appkit/TypeAlias.PluginData.md +45 -0
- package/docs/api/appkit/TypeAlias.ToPlugin.md +1 -1
- package/docs/api/appkit-ui/files/DirectoryList.md +36 -0
- package/docs/api/appkit-ui/files/FileBreadcrumb.md +27 -0
- package/docs/api/appkit-ui/files/FileEntry.md +27 -0
- package/docs/api/appkit-ui/files/FilePreviewPanel.md +32 -0
- package/docs/api/appkit-ui/files/NewFolderInput.md +30 -0
- package/docs/api/appkit-ui/genie/GenieQueryVisualization.md +29 -0
- package/docs/api/appkit.md +1 -0
- package/docs/configuration.md +15 -0
- package/docs/plugins/custom-plugins.md +4 -13
- package/docs/plugins/files.md +350 -0
- package/docs/plugins.md +2 -1
- package/llms.txt +9 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -18,14 +18,27 @@ import { DonutChart, PieChart } from "./charts/pie/index.js";
|
|
|
18
18
|
import { RadarChart } from "./charts/radar/index.js";
|
|
19
19
|
import { ScatterChart } from "./charts/scatter/index.js";
|
|
20
20
|
import "./charts/index.js";
|
|
21
|
+
import { formatFileSize } from "./lib/format.js";
|
|
21
22
|
import { cn } from "./lib/utils.js";
|
|
22
23
|
import { Button, buttonVariants } from "./ui/button.js";
|
|
24
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./ui/card.js";
|
|
25
|
+
import { Skeleton } from "./ui/skeleton.js";
|
|
26
|
+
import { FileEntry } from "./file-browser/file-entry.js";
|
|
27
|
+
import { DirectoryList } from "./file-browser/directory-list.js";
|
|
28
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./ui/breadcrumb.js";
|
|
29
|
+
import { FileBreadcrumb } from "./file-browser/file-breadcrumb.js";
|
|
30
|
+
import { FilePreviewPanel } from "./file-browser/file-preview-panel.js";
|
|
31
|
+
import { NewFolderInput } from "./file-browser/new-folder-input.js";
|
|
32
|
+
import "./file-browser/index.js";
|
|
33
|
+
import { inferChartType } from "./genie/genie-chart-inference.js";
|
|
23
34
|
import { GenieChatInput } from "./genie/genie-chat-input.js";
|
|
24
35
|
import { ScrollArea, ScrollBar } from "./ui/scroll-area.js";
|
|
25
|
-
import { Skeleton } from "./ui/skeleton.js";
|
|
26
36
|
import { Spinner } from "./ui/spinner.js";
|
|
27
37
|
import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar.js";
|
|
28
|
-
import {
|
|
38
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./ui/table.js";
|
|
39
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
40
|
+
import { transformGenieData } from "./genie/genie-query-transform.js";
|
|
41
|
+
import { GenieQueryVisualization } from "./genie/genie-query-visualization.js";
|
|
29
42
|
import { GenieChatMessage } from "./genie/genie-chat-message.js";
|
|
30
43
|
import { GenieChatMessageList } from "./genie/genie-chat-message-list.js";
|
|
31
44
|
import { useGenieChat } from "./genie/use-genie-chat.js";
|
|
@@ -36,7 +49,6 @@ import { PortalContainerContext, PortalContainerProvider, usePortalContainer, us
|
|
|
36
49
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./ui/dropdown-menu.js";
|
|
37
50
|
import { Input } from "./ui/input.js";
|
|
38
51
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./ui/select.js";
|
|
39
|
-
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./ui/table.js";
|
|
40
52
|
import { Checkbox } from "./ui/checkbox.js";
|
|
41
53
|
import { DataTable } from "./table/data-table.js";
|
|
42
54
|
import "./table/index.js";
|
|
@@ -45,7 +57,6 @@ import { Alert, AlertDescription, AlertTitle } from "./ui/alert.js";
|
|
|
45
57
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./ui/alert-dialog.js";
|
|
46
58
|
import { AspectRatio } from "./ui/aspect-ratio.js";
|
|
47
59
|
import { Badge, badgeVariants } from "./ui/badge.js";
|
|
48
|
-
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./ui/breadcrumb.js";
|
|
49
60
|
import { Separator } from "./ui/separator.js";
|
|
50
61
|
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./ui/button-group.js";
|
|
51
62
|
import { Calendar, CalendarDayButton } from "./ui/calendar.js";
|
|
@@ -79,9 +90,8 @@ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupActio
|
|
|
79
90
|
import { Slider } from "./ui/slider.js";
|
|
80
91
|
import { Toaster } from "./ui/sonner.js";
|
|
81
92
|
import { Switch } from "./ui/switch.js";
|
|
82
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
83
93
|
import { Toggle, toggleVariants } from "./ui/toggle.js";
|
|
84
94
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
|
|
85
95
|
import "./ui/index.js";
|
|
86
96
|
|
|
87
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BaseChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartWrapper, Checkbox, Collapsible, CollapsibleContent, 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, DATE_FIELD_PATTERNS, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, 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, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenieChat, GenieChatInput, GenieChatMessage, GenieChatMessageList, HeatmapChart, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, 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, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatLabel, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
|
|
97
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BaseChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartWrapper, Checkbox, Collapsible, CollapsibleContent, 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, DATE_FIELD_PATTERNS, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectoryList, DonutChart, 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, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileBreadcrumb, FileEntry, FilePreviewPanel, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenieChat, GenieChatInput, GenieChatMessage, GenieChatMessageList, GenieQueryVisualization, HeatmapChart, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewFolderInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, 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, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatFileSize, formatLabel, inferChartType, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, transformGenieData, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/react/lib/format.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Formats byte values into human-readable file sizes
|
|
4
|
+
* @param bytes - The file size in bytes
|
|
5
|
+
* @returns Formatted string (e.g., "1.5 KB", "3.2 MB")
|
|
6
|
+
* @example
|
|
7
|
+
* formatFileSize(512) // "512 B"
|
|
8
|
+
* formatFileSize(1536) // "1.5 KB"
|
|
9
|
+
* formatFileSize(2621440) // "2.5 MB"
|
|
10
|
+
*/
|
|
11
|
+
declare function formatFileSize(bytes: number | undefined): string;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { formatFileSize };
|
|
14
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","names":[],"sources":["../../../src/react/lib/format.ts"],"mappings":";;;;;;;;;;iBAiEgB,cAAA,CAAe,KAAA"}
|
package/dist/react/lib/format.js
CHANGED
|
@@ -34,9 +34,25 @@ function formatChartValue(value, fieldName) {
|
|
|
34
34
|
function formatFieldLabel(field) {
|
|
35
35
|
return field.replace(/[^a-zA-Z0-9_-]/g, "").replace(/([A-Z])/g, " $1").replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()).trim();
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Formats byte values into human-readable file sizes
|
|
39
|
+
* @param bytes - The file size in bytes
|
|
40
|
+
* @returns Formatted string (e.g., "1.5 KB", "3.2 MB")
|
|
41
|
+
* @example
|
|
42
|
+
* formatFileSize(512) // "512 B"
|
|
43
|
+
* formatFileSize(1536) // "1.5 KB"
|
|
44
|
+
* formatFileSize(2621440) // "2.5 MB"
|
|
45
|
+
*/
|
|
46
|
+
function formatFileSize(bytes) {
|
|
47
|
+
if (bytes === void 0 || bytes === null) return "Unknown";
|
|
48
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
49
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
50
|
+
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
51
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
52
|
+
}
|
|
37
53
|
/** Regex for validating field names */
|
|
38
54
|
const SAFE_KEY_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
39
55
|
|
|
40
56
|
//#endregion
|
|
41
|
-
export { SAFE_KEY_REGEX, formatChartValue, formatFieldLabel };
|
|
57
|
+
export { SAFE_KEY_REGEX, formatChartValue, formatFieldLabel, formatFileSize };
|
|
42
58
|
//# sourceMappingURL=format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","names":[],"sources":["../../../src/react/lib/format.ts"],"sourcesContent":["/**\n * Formats numeric values based on field name context\n * @param value - The numeric value to format\n * @param fieldName - The field name to determine formatting\n * @returns Formatted string representation\n * @example\n * formatChartValue(1234.56, \"cost\") // \"$1,234.56\"\n * formatChartValue(5000, \"users\") // \"5.0k\"\n * formatChartValue(42.7, \"percentage\") // \"42.7\"\n */\nexport function formatChartValue(value: number, fieldName: string): string {\n if (\n fieldName.toLowerCase().includes(\"cost\") ||\n fieldName.toLowerCase().includes(\"price\") ||\n fieldName.toLowerCase().includes(\"spend\") ||\n fieldName.toLowerCase().includes(\"revenue\") ||\n fieldName.toLowerCase().includes(\"usd\")\n ) {\n return new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }).format(value);\n }\n\n if (value >= 1000) {\n return new Intl.NumberFormat(\"en-US\", {\n notation: \"compact\",\n maximumFractionDigits: 1,\n }).format(value);\n }\n\n return value.toLocaleString(\"en-US\", {\n maximumFractionDigits: 2,\n });\n}\n\n/**\n * Converts field names to human-readable labels\n * @param field - Field name in camelCase or snake_case\n * @returns Formatted label with proper capitalization\n * @example\n * formatFieldLabel(\"totalCost\") // \"Total Cost\"\n * formatFieldLabel(\"user_name\") // \"User Name\"\n * formatFieldLabel(\"revenue\") // \"Revenue\"\n */\nexport function formatFieldLabel(field: string): string {\n const safe = field.replace(/[^a-zA-Z0-9_-]/g, \"\");\n return safe\n .replace(/([A-Z])/g, \" $1\")\n .replace(/_/g, \" \")\n .replace(/\\b\\w/g, (l) => l.toUpperCase())\n .trim();\n}\n\n/** Regex for validating field names */\nexport const SAFE_KEY_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,iBAAiB,OAAe,WAA2B;AACzE,KACE,UAAU,aAAa,CAAC,SAAS,OAAO,IACxC,UAAU,aAAa,CAAC,SAAS,QAAQ,IACzC,UAAU,aAAa,CAAC,SAAS,QAAQ,IACzC,UAAU,aAAa,CAAC,SAAS,UAAU,IAC3C,UAAU,aAAa,CAAC,SAAS,MAAM,CAEvC,QAAO,IAAI,KAAK,aAAa,SAAS;EACpC,OAAO;EACP,UAAU;EACV,uBAAuB;EACvB,uBAAuB;EACxB,CAAC,CAAC,OAAO,MAAM;AAGlB,KAAI,SAAS,IACX,QAAO,IAAI,KAAK,aAAa,SAAS;EACpC,UAAU;EACV,uBAAuB;EACxB,CAAC,CAAC,OAAO,MAAM;AAGlB,QAAO,MAAM,eAAe,SAAS,EACnC,uBAAuB,GACxB,CAAC;;;;;;;;;;;AAYJ,SAAgB,iBAAiB,OAAuB;AAEtD,QADa,MAAM,QAAQ,mBAAmB,GAAG,CAE9C,QAAQ,YAAY,MAAM,CAC1B,QAAQ,MAAM,IAAI,CAClB,QAAQ,UAAU,MAAM,EAAE,aAAa,CAAC,CACxC,MAAM;;;
|
|
1
|
+
{"version":3,"file":"format.js","names":[],"sources":["../../../src/react/lib/format.ts"],"sourcesContent":["/**\n * Formats numeric values based on field name context\n * @param value - The numeric value to format\n * @param fieldName - The field name to determine formatting\n * @returns Formatted string representation\n * @example\n * formatChartValue(1234.56, \"cost\") // \"$1,234.56\"\n * formatChartValue(5000, \"users\") // \"5.0k\"\n * formatChartValue(42.7, \"percentage\") // \"42.7\"\n */\nexport function formatChartValue(value: number, fieldName: string): string {\n if (\n fieldName.toLowerCase().includes(\"cost\") ||\n fieldName.toLowerCase().includes(\"price\") ||\n fieldName.toLowerCase().includes(\"spend\") ||\n fieldName.toLowerCase().includes(\"revenue\") ||\n fieldName.toLowerCase().includes(\"usd\")\n ) {\n return new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }).format(value);\n }\n\n if (value >= 1000) {\n return new Intl.NumberFormat(\"en-US\", {\n notation: \"compact\",\n maximumFractionDigits: 1,\n }).format(value);\n }\n\n return value.toLocaleString(\"en-US\", {\n maximumFractionDigits: 2,\n });\n}\n\n/**\n * Converts field names to human-readable labels\n * @param field - Field name in camelCase or snake_case\n * @returns Formatted label with proper capitalization\n * @example\n * formatFieldLabel(\"totalCost\") // \"Total Cost\"\n * formatFieldLabel(\"user_name\") // \"User Name\"\n * formatFieldLabel(\"revenue\") // \"Revenue\"\n */\nexport function formatFieldLabel(field: string): string {\n const safe = field.replace(/[^a-zA-Z0-9_-]/g, \"\");\n return safe\n .replace(/([A-Z])/g, \" $1\")\n .replace(/_/g, \" \")\n .replace(/\\b\\w/g, (l) => l.toUpperCase())\n .trim();\n}\n\n/**\n * Formats byte values into human-readable file sizes\n * @param bytes - The file size in bytes\n * @returns Formatted string (e.g., \"1.5 KB\", \"3.2 MB\")\n * @example\n * formatFileSize(512) // \"512 B\"\n * formatFileSize(1536) // \"1.5 KB\"\n * formatFileSize(2621440) // \"2.5 MB\"\n */\nexport function formatFileSize(bytes: number | undefined): string {\n if (bytes === undefined || bytes === null) return \"Unknown\";\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;\n}\n\n/** Regex for validating field names */\nexport const SAFE_KEY_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,iBAAiB,OAAe,WAA2B;AACzE,KACE,UAAU,aAAa,CAAC,SAAS,OAAO,IACxC,UAAU,aAAa,CAAC,SAAS,QAAQ,IACzC,UAAU,aAAa,CAAC,SAAS,QAAQ,IACzC,UAAU,aAAa,CAAC,SAAS,UAAU,IAC3C,UAAU,aAAa,CAAC,SAAS,MAAM,CAEvC,QAAO,IAAI,KAAK,aAAa,SAAS;EACpC,OAAO;EACP,UAAU;EACV,uBAAuB;EACvB,uBAAuB;EACxB,CAAC,CAAC,OAAO,MAAM;AAGlB,KAAI,SAAS,IACX,QAAO,IAAI,KAAK,aAAa,SAAS;EACpC,UAAU;EACV,uBAAuB;EACxB,CAAC,CAAC,OAAO,MAAM;AAGlB,QAAO,MAAM,eAAe,SAAS,EACnC,uBAAuB,GACxB,CAAC;;;;;;;;;;;AAYJ,SAAgB,iBAAiB,OAAuB;AAEtD,QADa,MAAM,QAAQ,mBAAmB,GAAG,CAE9C,QAAQ,YAAY,MAAM,CAC1B,QAAQ,MAAM,IAAI,CAClB,QAAQ,UAAU,MAAM,EAAE,aAAa,CAAC,CACxC,MAAM;;;;;;;;;;;AAYX,SAAgB,eAAe,OAAmC;AAChE,KAAI,UAAU,UAAa,UAAU,KAAM,QAAO;AAClD,KAAI,QAAQ,KAAM,QAAO,GAAG,MAAM;AAClC,KAAI,QAAQ,OAAO,KAAM,QAAO,IAAI,QAAQ,MAAM,QAAQ,EAAE,CAAC;AAC7D,KAAI,QAAQ,OAAO,OAAO,KACxB,QAAO,IAAI,SAAS,OAAO,OAAO,QAAQ,EAAE,CAAC;AAC/C,QAAO,IAAI,SAAS,OAAO,OAAO,OAAO,QAAQ,EAAE,CAAC;;;AAItD,MAAa,iBAAiB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Button } from "../ui/button.js";
|
|
2
1
|
import { formatFieldLabel } from "../lib/format.js";
|
|
2
|
+
import { Button } from "../ui/button.js";
|
|
3
|
+
import { Table as Table$1, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table.js";
|
|
3
4
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from "../ui/dropdown-menu.js";
|
|
4
5
|
import { Input } from "../ui/input.js";
|
|
5
6
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select.js";
|
|
6
|
-
import { Table as Table$1, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table.js";
|
|
7
7
|
import { TableWrapper } from "./table-wrapper.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { ChevronDown } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAnalyticsQuery } from "../hooks/use-analytics-query.js";
|
|
2
|
-
import { Button } from "../ui/button.js";
|
|
3
2
|
import { SAFE_KEY_REGEX, formatChartValue, formatFieldLabel } from "../lib/format.js";
|
|
3
|
+
import { Button } from "../ui/button.js";
|
|
4
4
|
import { Checkbox } from "../ui/checkbox.js";
|
|
5
5
|
import { EmptyState } from "./empty.js";
|
|
6
6
|
import { ErrorState } from "./error.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
3
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
5
|
|
|
6
6
|
//#region src/react/ui/breadcrumb.tsx
|
|
7
7
|
/** Navigation component showing the current page's location in the site hierarchy */
|
package/dist/react/ui/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { Button, buttonVariants } from "./button.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
|
|
3
3
|
import { Skeleton } from "./skeleton.js";
|
|
4
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./breadcrumb.js";
|
|
5
|
+
import { ScrollArea, ScrollBar } from "./scroll-area.js";
|
|
4
6
|
import { Spinner } from "./spinner.js";
|
|
5
7
|
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
6
|
-
import {
|
|
8
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./table.js";
|
|
9
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|
|
7
10
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
8
11
|
import { Input } from "./input.js";
|
|
9
12
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
|
|
10
|
-
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./table.js";
|
|
11
13
|
import { Checkbox } from "./checkbox.js";
|
|
12
14
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./accordion.js";
|
|
13
15
|
import { Alert, AlertDescription, AlertTitle } from "./alert.js";
|
|
14
16
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./alert-dialog.js";
|
|
15
17
|
import { AspectRatio } from "./aspect-ratio.js";
|
|
16
18
|
import { Badge, badgeVariants } from "./badge.js";
|
|
17
|
-
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./breadcrumb.js";
|
|
18
19
|
import { Separator } from "./separator.js";
|
|
19
20
|
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./button-group.js";
|
|
20
21
|
import { Calendar, CalendarDayButton } from "./calendar.js";
|
|
@@ -48,6 +49,5 @@ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupActio
|
|
|
48
49
|
import { Slider } from "./slider.js";
|
|
49
50
|
import { Toaster } from "./sonner.js";
|
|
50
51
|
import { Switch } from "./switch.js";
|
|
51
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|
|
52
52
|
import { Toggle, toggleVariants } from "./toggle.js";
|
|
53
53
|
import { ToggleGroup, ToggleGroupItem } from "./toggle-group.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
3
|
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
5
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
6
6
|
|
|
7
7
|
//#region src/react/ui/navigation-menu.tsx
|
package/dist/react/ui/sidebar.js
CHANGED
|
@@ -10,9 +10,9 @@ import { useIsMobile } from "../hooks/use-mobile.js";
|
|
|
10
10
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
11
11
|
import * as React$1 from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { PanelLeftIcon } from "lucide-react";
|
|
13
14
|
import { Slot } from "@radix-ui/react-slot";
|
|
14
15
|
import { cva } from "class-variance-authority";
|
|
15
|
-
import { PanelLeftIcon } from "lucide-react";
|
|
16
16
|
|
|
17
17
|
//#region src/react/ui/sidebar.tsx
|
|
18
18
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
@@ -15,7 +15,7 @@ type GenieStreamEvent = {
|
|
|
15
15
|
type: "query_result";
|
|
16
16
|
attachmentId: string;
|
|
17
17
|
statementId: string;
|
|
18
|
-
data:
|
|
18
|
+
data: GenieStatementResponse;
|
|
19
19
|
} | {
|
|
20
20
|
type: "error";
|
|
21
21
|
error: string;
|
|
@@ -26,6 +26,20 @@ type GenieStreamEvent = {
|
|
|
26
26
|
nextPageToken: string | null; /** Total messages returned in this initial load */
|
|
27
27
|
loadedCount: number;
|
|
28
28
|
};
|
|
29
|
+
/** Shape of the Databricks SQL statement_response returned by Genie queries */
|
|
30
|
+
interface GenieStatementResponse {
|
|
31
|
+
manifest: {
|
|
32
|
+
schema: {
|
|
33
|
+
columns: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
type_name: string;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
result: {
|
|
40
|
+
data_array: (string | null)[][];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
29
43
|
/** Cleaned response — subset of SDK GenieMessage */
|
|
30
44
|
interface GenieMessageResponse {
|
|
31
45
|
messageId: string;
|
|
@@ -50,5 +64,5 @@ interface GenieAttachmentResponse {
|
|
|
50
64
|
suggestedQuestions?: string[];
|
|
51
65
|
}
|
|
52
66
|
//#endregion
|
|
53
|
-
export { GenieAttachmentResponse, GenieMessageResponse, GenieStreamEvent };
|
|
67
|
+
export { GenieAttachmentResponse, GenieMessageResponse, GenieStatementResponse, GenieStreamEvent };
|
|
54
68
|
//# sourceMappingURL=genie.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genie.d.ts","names":[],"sources":["../../../../shared/src/genie.ts"],"mappings":";;KACY,gBAAA;EAEN,IAAA;EACA,cAAA;EACA,SAAA;EACA,OAAA;AAAA;EAEA,IAAA;EAAgB,MAAA;AAAA;EAChB,IAAA;EAAwB,OAAA,EAAS,oBAAA;AAAA;EAEjC,IAAA;EACA,YAAA;EACA,WAAA;EACA,IAAA;AAAA;
|
|
1
|
+
{"version":3,"file":"genie.d.ts","names":[],"sources":["../../../../shared/src/genie.ts"],"mappings":";;KACY,gBAAA;EAEN,IAAA;EACA,cAAA;EACA,SAAA;EACA,OAAA;AAAA;EAEA,IAAA;EAAgB,MAAA;AAAA;EAChB,IAAA;EAAwB,OAAA,EAAS,oBAAA;AAAA;EAEjC,IAAA;EACA,YAAA;EACA,WAAA;EACA,IAAA,EAAM,sBAAA;AAAA;EAEN,IAAA;EAAe,KAAA;AAAA;EAEf,IAAA;EACA,cAAA;EACA,OAAA,UAEA;EAAA,aAAA,iBAEW;EAAX,WAAA;AAAA;;UAIW,sBAAA;EACf,QAAA;IACE,MAAA;MACE,OAAA,EAAS,KAAA;QAAQ,IAAA;QAAc,SAAA;MAAA;IAAA;EAAA;EAGnC,MAAA;IACE,UAAA;EAAA;AAAA;;UAKa,oBAAA;EACf,SAAA;EACA,cAAA;EACA,OAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA,GAAc,uBAAA;EACd,KAAA;AAAA;AAAA,UAGe,uBAAA;EACf,YAAA;EACA,KAAA;IACE,KAAA;IACA,WAAA;IACA,KAAA;IACA,WAAA;EAAA;EAEF,IAAA;IAAS,OAAA;EAAA;EACT,kBAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./plugin.js";
|
|
2
2
|
import "./cache.js";
|
|
3
3
|
import "./execute.js";
|
|
4
|
-
import { GenieAttachmentResponse, GenieMessageResponse, GenieStreamEvent } from "./genie.js";
|
|
4
|
+
import { GenieAttachmentResponse, GenieMessageResponse, GenieStatementResponse, GenieStreamEvent } from "./genie.js";
|
|
5
5
|
import { SQLBinaryMarker, SQLBooleanMarker, SQLDateMarker, SQLNumberMarker, SQLStringMarker, SQLTimestampMarker, SQLTypeMarker } from "./sql/types.js";
|
|
6
6
|
import { isSQLTypeMarker, sql } from "./sql/helpers.js";
|
|
7
7
|
import "./tunnel.js";
|
|
@@ -32,7 +32,6 @@ const myManifest: PluginManifest = {
|
|
|
32
32
|
|
|
33
33
|
class MyPlugin extends Plugin<MyConfig> {
|
|
34
34
|
static manifest = myManifest;
|
|
35
|
-
name = 'myPlugin';
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
```
|
|
@@ -56,8 +55,7 @@ const myManifest: PluginManifest = {
|
|
|
56
55
|
};
|
|
57
56
|
|
|
58
57
|
class MyPlugin extends Plugin<MyConfig> {
|
|
59
|
-
static manifest = myManifest
|
|
60
|
-
name = 'myPlugin';
|
|
58
|
+
static manifest = myManifest<"myPlugin">;
|
|
61
59
|
|
|
62
60
|
// Runtime method: converts optional resources to required based on config
|
|
63
61
|
static getResourceRequirements(config: MyConfig) {
|
|
@@ -253,7 +251,7 @@ A proxied plugin instance that executes as the user
|
|
|
253
251
|
|
|
254
252
|
#### Throws[](#throws "Direct link to Throws")
|
|
255
253
|
|
|
256
|
-
|
|
254
|
+
AuthenticationError if user token is not available in request headers (production only). In development mode (`NODE_ENV=development`), falls back to the service principal instead of throwing.
|
|
257
255
|
|
|
258
256
|
***
|
|
259
257
|
|
|
@@ -267,6 +265,10 @@ userKey?: string): Promise<T | undefined>;
|
|
|
267
265
|
|
|
268
266
|
```
|
|
269
267
|
|
|
268
|
+
Execute a function with the plugin's interceptor chain.
|
|
269
|
+
|
|
270
|
+
All errors are caught and `undefined` is returned (production-safe). Route handlers should check for `undefined` and respond with an appropriate error status.
|
|
271
|
+
|
|
270
272
|
#### Type Parameters[](#type-parameters-1 "Direct link to Type Parameters")
|
|
271
273
|
|
|
272
274
|
| Type Parameter |
|
|
@@ -338,7 +340,6 @@ The returned object becomes the plugin's public API on the AppKit instance (e.g.
|
|
|
338
340
|
|
|
339
341
|
```ts
|
|
340
342
|
class MyPlugin extends Plugin {
|
|
341
|
-
name = "myPlugin";
|
|
342
343
|
private getData() { return []; }
|
|
343
344
|
|
|
344
345
|
exports() {
|
|
@@ -381,6 +382,26 @@ BasePlugin.getEndpoints
|
|
|
381
382
|
|
|
382
383
|
***
|
|
383
384
|
|
|
385
|
+
### getSkipBodyParsingPaths()[](#getskipbodyparsingpaths "Direct link to getSkipBodyParsingPaths()")
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
getSkipBodyParsingPaths(): ReadonlySet<string>;
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
#### Returns[](#returns-7 "Direct link to Returns")
|
|
393
|
+
|
|
394
|
+
`ReadonlySet`<`string`>
|
|
395
|
+
|
|
396
|
+
#### Implementation of[](#implementation-of-4 "Direct link to Implementation of")
|
|
397
|
+
|
|
398
|
+
```ts
|
|
399
|
+
BasePlugin.getSkipBodyParsingPaths
|
|
400
|
+
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
***
|
|
404
|
+
|
|
384
405
|
### injectRoutes()[](#injectroutes "Direct link to injectRoutes()")
|
|
385
406
|
|
|
386
407
|
```ts
|
|
@@ -394,11 +415,11 @@ injectRoutes(_: Router): void;
|
|
|
394
415
|
| --------- | -------- |
|
|
395
416
|
| `_` | `Router` |
|
|
396
417
|
|
|
397
|
-
#### Returns[](#returns-
|
|
418
|
+
#### Returns[](#returns-8 "Direct link to Returns")
|
|
398
419
|
|
|
399
420
|
`void`
|
|
400
421
|
|
|
401
|
-
#### Implementation of[](#implementation-of-
|
|
422
|
+
#### Implementation of[](#implementation-of-5 "Direct link to Implementation of")
|
|
402
423
|
|
|
403
424
|
```ts
|
|
404
425
|
BasePlugin.injectRoutes
|
|
@@ -421,12 +442,39 @@ protected registerEndpoint(name: string, path: string): void;
|
|
|
421
442
|
| `name` | `string` |
|
|
422
443
|
| `path` | `string` |
|
|
423
444
|
|
|
424
|
-
#### Returns[](#returns-
|
|
445
|
+
#### Returns[](#returns-9 "Direct link to Returns")
|
|
425
446
|
|
|
426
447
|
`void`
|
|
427
448
|
|
|
428
449
|
***
|
|
429
450
|
|
|
451
|
+
### resolveUserId()[](#resolveuserid "Direct link to resolveUserId()")
|
|
452
|
+
|
|
453
|
+
```ts
|
|
454
|
+
protected resolveUserId(req: Request): string;
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Resolve the effective user ID from a request.
|
|
459
|
+
|
|
460
|
+
Returns the `x-forwarded-user` header when present. In development mode (`NODE_ENV=development`) falls back to the current context user ID so that callers outside an active `runInUserContext` scope still get a consistent value.
|
|
461
|
+
|
|
462
|
+
#### Parameters[](#parameters-6 "Direct link to Parameters")
|
|
463
|
+
|
|
464
|
+
| Parameter | Type |
|
|
465
|
+
| --------- | --------- |
|
|
466
|
+
| `req` | `Request` |
|
|
467
|
+
|
|
468
|
+
#### Returns[](#returns-10 "Direct link to Returns")
|
|
469
|
+
|
|
470
|
+
`string`
|
|
471
|
+
|
|
472
|
+
#### Throws[](#throws-1 "Direct link to Throws")
|
|
473
|
+
|
|
474
|
+
AuthenticationError in production when no user header is present.
|
|
475
|
+
|
|
476
|
+
***
|
|
477
|
+
|
|
430
478
|
### route()[](#route "Direct link to route()")
|
|
431
479
|
|
|
432
480
|
```ts
|
|
@@ -440,14 +488,14 @@ protected route<_TResponse>(router: Router, config: RouteConfig): void;
|
|
|
440
488
|
| -------------- |
|
|
441
489
|
| `_TResponse` |
|
|
442
490
|
|
|
443
|
-
#### Parameters[](#parameters-
|
|
491
|
+
#### Parameters[](#parameters-7 "Direct link to Parameters")
|
|
444
492
|
|
|
445
493
|
| Parameter | Type |
|
|
446
494
|
| --------- | ------------- |
|
|
447
495
|
| `router` | `Router` |
|
|
448
496
|
| `config` | `RouteConfig` |
|
|
449
497
|
|
|
450
|
-
#### Returns[](#returns-
|
|
498
|
+
#### Returns[](#returns-11 "Direct link to Returns")
|
|
451
499
|
|
|
452
500
|
`void`
|
|
453
501
|
|
|
@@ -460,11 +508,11 @@ setup(): Promise<void>;
|
|
|
460
508
|
|
|
461
509
|
```
|
|
462
510
|
|
|
463
|
-
#### Returns[](#returns-
|
|
511
|
+
#### Returns[](#returns-12 "Direct link to Returns")
|
|
464
512
|
|
|
465
513
|
`Promise`<`void`>
|
|
466
514
|
|
|
467
|
-
#### Implementation of[](#implementation-of-
|
|
515
|
+
#### Implementation of[](#implementation-of-6 "Direct link to Implementation of")
|
|
468
516
|
|
|
469
517
|
```ts
|
|
470
518
|
BasePlugin.setup
|
|
@@ -43,9 +43,9 @@ Collects and registers resource requirements from an array of plugins. For each
|
|
|
43
43
|
|
|
44
44
|
#### Parameters[](#parameters "Direct link to Parameters")
|
|
45
45
|
|
|
46
|
-
| Parameter | Type
|
|
47
|
-
| ------------ |
|
|
48
|
-
| `rawPlugins` | `PluginData
|
|
46
|
+
| Parameter | Type | Description |
|
|
47
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
|
|
48
|
+
| `rawPlugins` | [`PluginData`](./docs/api/appkit/TypeAlias.PluginData.md)<`PluginConstructor`, `unknown`, `string`>\[] | Array of plugin data entries from createApp configuration |
|
|
49
49
|
|
|
50
50
|
#### Returns[](#returns-2 "Direct link to Returns")
|
|
51
51
|
|
|
@@ -16,9 +16,9 @@ Initializes telemetry, cache, and service context, then registers plugins in pha
|
|
|
16
16
|
|
|
17
17
|
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
18
18
|
|
|
19
|
-
| Type Parameter
|
|
20
|
-
|
|
|
21
|
-
| `T` *extends* `PluginData
|
|
19
|
+
| Type Parameter |
|
|
20
|
+
| -------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `T` *extends* [`PluginData`](./docs/api/appkit/TypeAlias.PluginData.md)<`PluginConstructor`, `unknown`, `string`>\[] |
|
|
22
22
|
|
|
23
23
|
## Parameters[](#parameters "Direct link to Parameters")
|
|
24
24
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
# Interface: PluginManifest
|
|
1
|
+
# Interface: PluginManifest\<TName>
|
|
2
2
|
|
|
3
3
|
Plugin manifest that declares metadata and resource requirements. Attached to plugin classes as a static property.
|
|
4
4
|
|
|
5
|
+
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
6
|
+
|
|
7
|
+
| Type Parameter | Default type |
|
|
8
|
+
| -------------------------- | ------------ |
|
|
9
|
+
| `TName` *extends* `string` | `string` |
|
|
10
|
+
|
|
5
11
|
## Properties[](#properties "Direct link to Properties")
|
|
6
12
|
|
|
7
13
|
### author?[](#author "Direct link to author?")
|
|
@@ -89,11 +95,11 @@ optional license: string;
|
|
|
89
95
|
### name[](#name "Direct link to name")
|
|
90
96
|
|
|
91
97
|
```ts
|
|
92
|
-
name:
|
|
98
|
+
name: TName;
|
|
93
99
|
|
|
94
100
|
```
|
|
95
101
|
|
|
96
|
-
Plugin identifier
|
|
102
|
+
Plugin identifier — the single source of truth for the plugin's name
|
|
97
103
|
|
|
98
104
|
***
|
|
99
105
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Type Alias: PluginData\<T, U, N>
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
type PluginData<T, U, N> = {
|
|
5
|
+
config: U;
|
|
6
|
+
name: N;
|
|
7
|
+
plugin: T;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
13
|
+
|
|
14
|
+
| Type Parameter |
|
|
15
|
+
| -------------- |
|
|
16
|
+
| `T` |
|
|
17
|
+
| `U` |
|
|
18
|
+
| `N` |
|
|
19
|
+
|
|
20
|
+
## Properties[](#properties "Direct link to Properties")
|
|
21
|
+
|
|
22
|
+
### config[](#config "Direct link to config")
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
config: U;
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### name[](#name "Direct link to name")
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
name: N;
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### plugin[](#plugin "Direct link to plugin")
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
plugin: T;
|
|
44
|
+
|
|
45
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# DirectoryList
|
|
2
|
+
|
|
3
|
+
Card-wrapped directory listing with loading, error, and empty states
|
|
4
|
+
|
|
5
|
+
## DirectoryList[](#directorylist-1 "Direct link to DirectoryList")
|
|
6
|
+
|
|
7
|
+
Card-wrapped directory listing with loading, error, and empty states
|
|
8
|
+
|
|
9
|
+
**Source:** [`packages/appkit-ui/src/react/file-browser/directory-list.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/file-browser/directory-list.tsx)
|
|
10
|
+
|
|
11
|
+
### Props[](#props "Direct link to Props")
|
|
12
|
+
|
|
13
|
+
| Prop | Type | Required | Default | Description |
|
|
14
|
+
| -------------------- | ------------------------------------------------------------------------------------------------ | -------- | ------- | ---------------------------------------------------------------------------------- |
|
|
15
|
+
| `entries` | `DirectoryEntry[]` | ✓ | - | Directory entries to display |
|
|
16
|
+
| `loading` | `boolean` | | - | Whether the directory is currently loading |
|
|
17
|
+
| `error` | `string \| null` | | - | Error message to display |
|
|
18
|
+
| `onEntryClick` | `(entry: DirectoryEntry) => void` | ✓ | - | Called when an entry is clicked |
|
|
19
|
+
| `onNavigateToParent` | `(() => void)` | | - | Called when the back/parent button is clicked |
|
|
20
|
+
| `onRetry` | `(() => void)` | | - | Called when the retry button is clicked |
|
|
21
|
+
| `isAtRoot` | `boolean` | | - | Whether the user is at the root directory (hides back button) |
|
|
22
|
+
| `selectedPath` | `string \| null` | | - | Currently selected file path for highlighting |
|
|
23
|
+
| `resolveEntryPath` | `(entry: DirectoryEntry) => string` | ✓ | - | Resolves a DirectoryEntry to its full path |
|
|
24
|
+
| `headerContent` | `ReactNode` | | - | Content rendered between the back button and the entry list (e.g., NewFolderInput) |
|
|
25
|
+
| `hasCurrentPath` | `boolean` | | - | Whether a current path is set (affects empty state message) |
|
|
26
|
+
| `formatSize` | `((bytes: number) => string)` | | - | Custom file size formatter |
|
|
27
|
+
| `labels` | `Pick<FileBrowserLabels, "backToParent" \| "emptyDirectory" \| "noVolumeConfigured" \| "retry">` | | - | Customizable labels |
|
|
28
|
+
|
|
29
|
+
### Usage[](#usage "Direct link to Usage")
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { DirectoryList } from '@databricks/appkit-ui';
|
|
33
|
+
|
|
34
|
+
<DirectoryList /* props */ />
|
|
35
|
+
|
|
36
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# FileBreadcrumb
|
|
2
|
+
|
|
3
|
+
Path-aware breadcrumb navigation built on top of Breadcrumb primitives
|
|
4
|
+
|
|
5
|
+
## FileBreadcrumb[](#filebreadcrumb-1 "Direct link to FileBreadcrumb")
|
|
6
|
+
|
|
7
|
+
Path-aware breadcrumb navigation built on top of Breadcrumb primitives
|
|
8
|
+
|
|
9
|
+
**Source:** [`packages/appkit-ui/src/react/file-browser/file-breadcrumb.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/file-browser/file-breadcrumb.tsx)
|
|
10
|
+
|
|
11
|
+
### Props[](#props "Direct link to Props")
|
|
12
|
+
|
|
13
|
+
| Prop | Type | Required | Default | Description |
|
|
14
|
+
| --------------------- | ------------------------- | -------- | ------- | -------------------------------------------------------------------- |
|
|
15
|
+
| `rootLabel` | `string` | ✓ | - | Label for the root breadcrumb item |
|
|
16
|
+
| `segments` | `string[]` | ✓ | - | Path segments after the root |
|
|
17
|
+
| `onNavigateToRoot` | `() => void` | ✓ | - | Called when the root breadcrumb is clicked |
|
|
18
|
+
| `onNavigateToSegment` | `(index: number) => void` | ✓ | - | Called when a segment breadcrumb is clicked (receives segment index) |
|
|
19
|
+
|
|
20
|
+
### Usage[](#usage "Direct link to Usage")
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { FileBreadcrumb } from '@databricks/appkit-ui';
|
|
24
|
+
|
|
25
|
+
<FileBreadcrumb /* props */ />
|
|
26
|
+
|
|
27
|
+
```
|