@seliseblocks/genesis-os 4.2.3 → 4.2.5
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/{chunk-FZ2R62Q6.js → chunk-575VJQ2U.js} +15 -4
- package/dist/chunk-575VJQ2U.js.map +1 -0
- package/dist/{chunk-5W2NUWTD.js → chunk-7EFD3LDX.js} +3 -3
- package/dist/{chunk-5W2NUWTD.js.map → chunk-7EFD3LDX.js.map} +1 -1
- package/dist/{chunk-Z7POHR7A.js → chunk-PRSVTYXS.js} +142 -101
- package/dist/chunk-PRSVTYXS.js.map +1 -0
- package/dist/{chunk-PNNMTGAJ.cjs → chunk-QYN3AEU5.cjs} +8 -8
- package/dist/{chunk-PNNMTGAJ.cjs.map → chunk-QYN3AEU5.cjs.map} +1 -1
- package/dist/{chunk-M3KOYPCN.cjs → chunk-ROV7S3SC.cjs} +15 -4
- package/dist/chunk-ROV7S3SC.cjs.map +1 -0
- package/dist/{chunk-SONN5ZUL.cjs → chunk-T2NGZE5W.cjs} +158 -117
- package/dist/chunk-T2NGZE5W.cjs.map +1 -0
- package/dist/{chunk-GZY23QP3.cjs → chunk-U3WXD3OX.cjs} +4 -3
- package/dist/chunk-U3WXD3OX.cjs.map +1 -0
- package/dist/{chunk-RANV4RPG.js → chunk-WPTHBDJO.js} +4 -3
- package/dist/chunk-WPTHBDJO.js.map +1 -0
- package/dist/components/index.cjs +350 -350
- package/dist/components/index.js +4 -4
- package/dist/guards/index.cjs +8 -8
- package/dist/guards/index.js +2 -2
- package/dist/hooks/index.cjs +12 -12
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +383 -383
- package/dist/index.js +4 -4
- package/dist/layouts/index.cjs +11 -11
- package/dist/layouts/index.d.cts +3 -2
- package/dist/layouts/index.d.ts +3 -2
- package/dist/layouts/index.js +4 -4
- package/dist/pages/index.cjs +9 -9
- package/dist/pages/index.js +4 -4
- package/dist/providers/index.cjs +5 -5
- package/dist/providers/index.js +1 -1
- package/package.json +6 -1
- package/dist/chunk-FZ2R62Q6.js.map +0 -1
- package/dist/chunk-GZY23QP3.cjs.map +0 -1
- package/dist/chunk-M3KOYPCN.cjs.map +0 -1
- package/dist/chunk-RANV4RPG.js.map +0 -1
- package/dist/chunk-SONN5ZUL.cjs.map +0 -1
- package/dist/chunk-Z7POHR7A.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, CollapsibleContent, 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, 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, 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 } from './chunk-
|
|
1
|
+
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, CollapsibleContent, 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, 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, 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 } from './chunk-PRSVTYXS.js';
|
|
2
2
|
import './chunk-WSUY6GPC.js';
|
|
3
3
|
import './chunk-RYYFLMEK.js';
|
|
4
4
|
import './chunk-QIHIATNN.js';
|
|
@@ -301,11 +301,11 @@ import './chunk-A4HVLCC2.js';
|
|
|
301
301
|
export { applyColumnFuseFilters, createFuseSearcher, createQueryKeyFactory, defaultFuseSearchOptions, defaultPathSegmentFormatter, fuseFilter, fuseSearch, fuseSearchWithIndex, getPathSegments, useBlocksAppConfigStore, useBoolean, useCopyToClipboard, useCountDown, useDebounce, useDebouncedFuseFilter, useFuseIndex, useFuseSearch, useGetAllServices, useGetBlocksNotificationConfig, useGetMyOrganizations, useGetNotifications, useIcon, useInitiateRedirect, useKeyboardShortcut, useLanguage, useLanguageSwitcher, useLogin, useLogo, useLogout, useMarkAllAsRead, useMarkAsRead, useMediaQuery, usePathSegments, usePopoverWidth, usePrefetchRedirect, useQueryClientKit, useQueryStatesKit, useScopedPath, useTheme } from './chunk-RZ3F7SL3.js';
|
|
302
302
|
export { ErrorTransformer, SERVICE_BASE_URL_KEY, boolean, clearQueryString, compareDates, createCookieStore, createEventEmitter, createSchema, createStorage, debounce, deepClone, deepEqual, deepMerge, domainRegex, formatBytes, formatCurrency, formatDate, formatDuration, formatFileSize, formatFullDate, formatNumber, formatSeconds, generateId, getDomain, getErrorMessage, getForwardedToPath, getProjectBlocksApiUrl, getServiceBaseUrl, getServiceSwaggerUrl, getSubdomain, getUniqueID, groupBy, handleErrorMessages, hasErrorCode, isBoolean, isCreditCard, isEmail, isErrorWithErrors, isNullish, isNumber, isObject, isPhone, isPlainObject, isPostalCode, isPromise, isString, isUrl, isUuid, isValidDate, isValidDomain, isValidSubdomain, memoize, number, omit, parseDateString, parseMongoDBString, parseQueryString, pick, resetQueryString, showErrorToast, showInfoToast, showSuccessToast, sleep, string, stringifyQueryString, subdomainRegex, throttle, uniqueBy } from './chunk-M4AKVWL4.js';
|
|
303
303
|
import './chunk-OGSC2U3E.js';
|
|
304
|
-
export { BlocksAppLayout, DashboardLayoutProvider, QueryProvider, ThemeProvider, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster } from './chunk-
|
|
304
|
+
export { BlocksAppLayout, DashboardLayoutProvider, QueryProvider, ThemeProvider, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster } from './chunk-575VJQ2U.js';
|
|
305
305
|
export { useFilteredMenus, useIsActiveMenu, useIsMobile } from './chunk-NF54AHIF.js';
|
|
306
306
|
export { reducer, toast, useToast } from './chunk-XUQVWFG5.js';
|
|
307
|
-
export { AppLoadingSpinner, AuthResolver, ImpersonationChecker, ImpersonationSynchronizer, ImpersonationTerminator, ProtectedGuard, PublicGuard } from './chunk-
|
|
308
|
-
export { useDisableProject, useGetEnvRepositories, useGetProject, useGetProjects, useImpersonationStatusChecker, useStartImpersonation, useStopImpersonation, useUpdateProject, useUpdateRepositories, useUpdateTenantGroup, useValidateCNameProject } from './chunk-
|
|
307
|
+
export { AppLoadingSpinner, AuthResolver, ImpersonationChecker, ImpersonationSynchronizer, ImpersonationTerminator, ProtectedGuard, PublicGuard } from './chunk-7EFD3LDX.js';
|
|
308
|
+
export { useDisableProject, useGetEnvRepositories, useGetProject, useGetProjects, useImpersonationStatusChecker, useStartImpersonation, useStopImpersonation, useUpdateProject, useUpdateRepositories, useUpdateTenantGroup, useValidateCNameProject } from './chunk-WPTHBDJO.js';
|
|
309
309
|
export { HttpClient, HttpError, createRuntimeEnvGetter, fadeInScale, fadeInUp, fadeTransition, getRuntimeEnv, iamClient, logicClient, motionEase, notificationClient, resolveBaseUrl, resolveEnv, staggerContainer, staggerItem } from './chunk-GWZQFBJ5.js';
|
|
310
310
|
export { cn, getQueryClient } from './chunk-MWEREW2W.js';
|
|
311
311
|
export { CreateAppConfigStore, useAppSettingsStore, useImpersonateStore, useLanguageViewStore, useLayoutSettingsStore, useUserStore } from './chunk-6WBFAHAO.js';
|
package/dist/layouts/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkT2NGZE5W_cjs = require('../chunk-T2NGZE5W.cjs');
|
|
4
4
|
require('../chunk-UHMCEC7M.cjs');
|
|
5
5
|
require('../chunk-JQZAKF5A.cjs');
|
|
6
6
|
require('../chunk-6LW5BPR6.cjs');
|
|
@@ -303,11 +303,11 @@ require('../chunk-BR6HN47Z.cjs');
|
|
|
303
303
|
require('../chunk-FJ4KYZYG.cjs');
|
|
304
304
|
require('../chunk-Z6N3Y5AQ.cjs');
|
|
305
305
|
require('../chunk-OSAQRM46.cjs');
|
|
306
|
-
require('../chunk-
|
|
306
|
+
require('../chunk-ROV7S3SC.cjs');
|
|
307
307
|
require('../chunk-Q7Y32IBM.cjs');
|
|
308
308
|
require('../chunk-ZK3WUWET.cjs');
|
|
309
|
-
require('../chunk-
|
|
310
|
-
require('../chunk-
|
|
309
|
+
require('../chunk-QYN3AEU5.cjs');
|
|
310
|
+
require('../chunk-U3WXD3OX.cjs');
|
|
311
311
|
require('../chunk-HF24SZFI.cjs');
|
|
312
312
|
require('../chunk-SDWR3F3Y.cjs');
|
|
313
313
|
require('../chunk-3VNGGYRG.cjs');
|
|
@@ -318,31 +318,31 @@ require('../chunk-QJOVCH5A.cjs');
|
|
|
318
318
|
|
|
319
319
|
Object.defineProperty(exports, "AuthLayout", {
|
|
320
320
|
enumerable: true,
|
|
321
|
-
get: function () { return
|
|
321
|
+
get: function () { return chunkT2NGZE5W_cjs.AuthLayout; }
|
|
322
322
|
});
|
|
323
323
|
Object.defineProperty(exports, "ConsoleLayout", {
|
|
324
324
|
enumerable: true,
|
|
325
|
-
get: function () { return
|
|
325
|
+
get: function () { return chunkT2NGZE5W_cjs.ConsoleLayout; }
|
|
326
326
|
});
|
|
327
327
|
Object.defineProperty(exports, "DashboardLayout", {
|
|
328
328
|
enumerable: true,
|
|
329
|
-
get: function () { return
|
|
329
|
+
get: function () { return chunkT2NGZE5W_cjs.DashboardLayout; }
|
|
330
330
|
});
|
|
331
331
|
Object.defineProperty(exports, "DashboardRoute", {
|
|
332
332
|
enumerable: true,
|
|
333
|
-
get: function () { return
|
|
333
|
+
get: function () { return chunkT2NGZE5W_cjs.DashboardRoute; }
|
|
334
334
|
});
|
|
335
335
|
Object.defineProperty(exports, "OidcLayout", {
|
|
336
336
|
enumerable: true,
|
|
337
|
-
get: function () { return
|
|
337
|
+
get: function () { return chunkT2NGZE5W_cjs.OidcLayout; }
|
|
338
338
|
});
|
|
339
339
|
Object.defineProperty(exports, "PublicLayout", {
|
|
340
340
|
enumerable: true,
|
|
341
|
-
get: function () { return
|
|
341
|
+
get: function () { return chunkT2NGZE5W_cjs.PublicLayout; }
|
|
342
342
|
});
|
|
343
343
|
Object.defineProperty(exports, "useOidcContext", {
|
|
344
344
|
enumerable: true,
|
|
345
|
-
get: function () { return
|
|
345
|
+
get: function () { return chunkT2NGZE5W_cjs.useOidcContext; }
|
|
346
346
|
});
|
|
347
347
|
//# sourceMappingURL=index.cjs.map
|
|
348
348
|
//# sourceMappingURL=index.cjs.map
|
package/dist/layouts/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
2
3
|
import { M as Menu } from '../menu.types-yxrXcwoj.cjs';
|
|
3
4
|
import { F as ForwardToPaths } from '../navigation.types-AwpRxXxv.cjs';
|
|
4
5
|
import { R as RedirectPaths } from '../types-CHB8UQaS.cjs';
|
|
@@ -65,7 +66,7 @@ declare function OidcLayout({ children, value, }: {
|
|
|
65
66
|
}): React.JSX.Element;
|
|
66
67
|
|
|
67
68
|
declare function PublicLayout({ children }: {
|
|
68
|
-
children?:
|
|
69
|
-
}):
|
|
69
|
+
children?: React__default.ReactNode;
|
|
70
|
+
}): React__default.JSX.Element;
|
|
70
71
|
|
|
71
72
|
export { AuthLayout, ConsoleLayout, type ConsoleLayoutProps, DashboardLayout, type DashboardLayoutProps, DashboardRoute, type DashboardRouteProps, type LayoutProps, type OidcContextValue, OidcLayout, PublicLayout, useOidcContext };
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
2
3
|
import { M as Menu } from '../menu.types-yxrXcwoj.js';
|
|
3
4
|
import { F as ForwardToPaths } from '../navigation.types-AwpRxXxv.js';
|
|
4
5
|
import { R as RedirectPaths } from '../types-CEYlvk68.js';
|
|
@@ -65,7 +66,7 @@ declare function OidcLayout({ children, value, }: {
|
|
|
65
66
|
}): React.JSX.Element;
|
|
66
67
|
|
|
67
68
|
declare function PublicLayout({ children }: {
|
|
68
|
-
children?:
|
|
69
|
-
}):
|
|
69
|
+
children?: React__default.ReactNode;
|
|
70
|
+
}): React__default.JSX.Element;
|
|
70
71
|
|
|
71
72
|
export { AuthLayout, ConsoleLayout, type ConsoleLayoutProps, DashboardLayout, type DashboardLayoutProps, DashboardRoute, type DashboardRouteProps, type LayoutProps, type OidcContextValue, OidcLayout, PublicLayout, useOidcContext };
|
package/dist/layouts/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AuthLayout, ConsoleLayout, DashboardLayout, DashboardRoute, OidcLayout, PublicLayout, useOidcContext } from '../chunk-
|
|
1
|
+
export { AuthLayout, ConsoleLayout, DashboardLayout, DashboardRoute, OidcLayout, PublicLayout, useOidcContext } from '../chunk-PRSVTYXS.js';
|
|
2
2
|
import '../chunk-WSUY6GPC.js';
|
|
3
3
|
import '../chunk-RYYFLMEK.js';
|
|
4
4
|
import '../chunk-QIHIATNN.js';
|
|
@@ -301,11 +301,11 @@ import '../chunk-A4HVLCC2.js';
|
|
|
301
301
|
import '../chunk-RZ3F7SL3.js';
|
|
302
302
|
import '../chunk-M4AKVWL4.js';
|
|
303
303
|
import '../chunk-OGSC2U3E.js';
|
|
304
|
-
import '../chunk-
|
|
304
|
+
import '../chunk-575VJQ2U.js';
|
|
305
305
|
import '../chunk-NF54AHIF.js';
|
|
306
306
|
import '../chunk-XUQVWFG5.js';
|
|
307
|
-
import '../chunk-
|
|
308
|
-
import '../chunk-
|
|
307
|
+
import '../chunk-7EFD3LDX.js';
|
|
308
|
+
import '../chunk-WPTHBDJO.js';
|
|
309
309
|
import '../chunk-GWZQFBJ5.js';
|
|
310
310
|
import '../chunk-MWEREW2W.js';
|
|
311
311
|
import '../chunk-6WBFAHAO.js';
|
package/dist/pages/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkT2NGZE5W_cjs = require('../chunk-T2NGZE5W.cjs');
|
|
4
4
|
require('../chunk-UHMCEC7M.cjs');
|
|
5
5
|
require('../chunk-JQZAKF5A.cjs');
|
|
6
6
|
require('../chunk-6LW5BPR6.cjs');
|
|
@@ -303,11 +303,11 @@ require('../chunk-BR6HN47Z.cjs');
|
|
|
303
303
|
require('../chunk-FJ4KYZYG.cjs');
|
|
304
304
|
require('../chunk-Z6N3Y5AQ.cjs');
|
|
305
305
|
require('../chunk-OSAQRM46.cjs');
|
|
306
|
-
require('../chunk-
|
|
306
|
+
require('../chunk-ROV7S3SC.cjs');
|
|
307
307
|
require('../chunk-Q7Y32IBM.cjs');
|
|
308
308
|
require('../chunk-ZK3WUWET.cjs');
|
|
309
|
-
require('../chunk-
|
|
310
|
-
require('../chunk-
|
|
309
|
+
require('../chunk-QYN3AEU5.cjs');
|
|
310
|
+
require('../chunk-U3WXD3OX.cjs');
|
|
311
311
|
require('../chunk-HF24SZFI.cjs');
|
|
312
312
|
require('../chunk-SDWR3F3Y.cjs');
|
|
313
313
|
require('../chunk-3VNGGYRG.cjs');
|
|
@@ -318,23 +318,23 @@ require('../chunk-QJOVCH5A.cjs');
|
|
|
318
318
|
|
|
319
319
|
Object.defineProperty(exports, "CallbackPage", {
|
|
320
320
|
enumerable: true,
|
|
321
|
-
get: function () { return
|
|
321
|
+
get: function () { return chunkT2NGZE5W_cjs.CallbackPage; }
|
|
322
322
|
});
|
|
323
323
|
Object.defineProperty(exports, "ConsolePage", {
|
|
324
324
|
enumerable: true,
|
|
325
|
-
get: function () { return
|
|
325
|
+
get: function () { return chunkT2NGZE5W_cjs.ConsolePage; }
|
|
326
326
|
});
|
|
327
327
|
Object.defineProperty(exports, "DashboardOverview", {
|
|
328
328
|
enumerable: true,
|
|
329
|
-
get: function () { return
|
|
329
|
+
get: function () { return chunkT2NGZE5W_cjs.DashboardOverview; }
|
|
330
330
|
});
|
|
331
331
|
Object.defineProperty(exports, "LoginPage", {
|
|
332
332
|
enumerable: true,
|
|
333
|
-
get: function () { return
|
|
333
|
+
get: function () { return chunkT2NGZE5W_cjs.LoginPage; }
|
|
334
334
|
});
|
|
335
335
|
Object.defineProperty(exports, "ProfilePage", {
|
|
336
336
|
enumerable: true,
|
|
337
|
-
get: function () { return
|
|
337
|
+
get: function () { return chunkT2NGZE5W_cjs.ProfilePage; }
|
|
338
338
|
});
|
|
339
339
|
//# sourceMappingURL=index.cjs.map
|
|
340
340
|
//# sourceMappingURL=index.cjs.map
|
package/dist/pages/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CallbackPage, ConsolePage, DashboardOverview, LoginPage, ProfilePage } from '../chunk-
|
|
1
|
+
export { CallbackPage, ConsolePage, DashboardOverview, LoginPage, ProfilePage } from '../chunk-PRSVTYXS.js';
|
|
2
2
|
import '../chunk-WSUY6GPC.js';
|
|
3
3
|
import '../chunk-RYYFLMEK.js';
|
|
4
4
|
import '../chunk-QIHIATNN.js';
|
|
@@ -301,11 +301,11 @@ import '../chunk-A4HVLCC2.js';
|
|
|
301
301
|
import '../chunk-RZ3F7SL3.js';
|
|
302
302
|
import '../chunk-M4AKVWL4.js';
|
|
303
303
|
import '../chunk-OGSC2U3E.js';
|
|
304
|
-
import '../chunk-
|
|
304
|
+
import '../chunk-575VJQ2U.js';
|
|
305
305
|
import '../chunk-NF54AHIF.js';
|
|
306
306
|
import '../chunk-XUQVWFG5.js';
|
|
307
|
-
import '../chunk-
|
|
308
|
-
import '../chunk-
|
|
307
|
+
import '../chunk-7EFD3LDX.js';
|
|
308
|
+
import '../chunk-WPTHBDJO.js';
|
|
309
309
|
import '../chunk-GWZQFBJ5.js';
|
|
310
310
|
import '../chunk-MWEREW2W.js';
|
|
311
311
|
import '../chunk-6WBFAHAO.js';
|
package/dist/providers/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkROV7S3SC_cjs = require('../chunk-ROV7S3SC.cjs');
|
|
4
4
|
require('../chunk-Q7Y32IBM.cjs');
|
|
5
5
|
require('../chunk-ZK3WUWET.cjs');
|
|
6
6
|
var chunkSDWR3F3Y_cjs = require('../chunk-SDWR3F3Y.cjs');
|
|
@@ -12,19 +12,19 @@ require('../chunk-QJOVCH5A.cjs');
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "BlocksAppLayout", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkROV7S3SC_cjs.BlocksAppLayout; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DashboardLayoutProvider", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkROV7S3SC_cjs.DashboardLayoutProvider; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "QueryProvider", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkROV7S3SC_cjs.QueryProvider; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkROV7S3SC_cjs.ThemeProvider; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "getQueryClient", {
|
|
30
30
|
enumerable: true,
|
package/dist/providers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BlocksAppLayout, DashboardLayoutProvider, QueryProvider, ThemeProvider } from '../chunk-
|
|
1
|
+
export { BlocksAppLayout, DashboardLayoutProvider, QueryProvider, ThemeProvider } from '../chunk-575VJQ2U.js';
|
|
2
2
|
import '../chunk-NF54AHIF.js';
|
|
3
3
|
import '../chunk-XUQVWFG5.js';
|
|
4
4
|
export { getQueryClient } from '../chunk-MWEREW2W.js';
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seliseblocks/genesis-os",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.5",
|
|
4
4
|
"description": "React app-shell composition package for SELISE Genesis OS",
|
|
5
5
|
"author": "SELISE Blocks",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/SELISEdigitalplatforms/blocks-genesis-react.git",
|
|
10
|
+
"directory": "packages/compose-react"
|
|
11
|
+
},
|
|
7
12
|
"type": "module",
|
|
8
13
|
"sideEffects": false,
|
|
9
14
|
"exports": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/providers/query.provider.tsx","../src/contexts/dashboard-layout/right-side-panel.context.ts","../src/contexts/dashboard-layout/sidebar.context.ts","../src/providers/dashboard-layout.provider.tsx","../src/components/core/toaster/toast.tsx","../src/components/core/toaster/toaster.tsx","../src/providers/blocks-app-layout.provider.tsx","../src/providers/theme.provider.tsx"],"names":["createContext","React","jsx","useState","jsxs","useRef","useEffect"],"mappings":";;;;;;;;;;;;;AAKO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAAkC;AACzE,EAAA,MAAM,cAAc,cAAA,EAAe;AAEnC,EAAA,uBACE,GAAA,CAAC,mBAAA,EAAA,EAAoB,MAAA,EAAQ,WAAA,EAAc,QAAA,EAAS,CAAA;AAExD;ACRO,IAAM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CAAA;AAAA,EAC1B,CAAA,EAAG,CAAC,aAAa,CAAC,CAAA;AAGlB,EAAAA,UAAU,MAAM;AACd,IAAA,IAAI,UAAU,QAAA,EAAU;AACxB,IAAA,MAAM,EAAA,GAAK,MAAA,CAAO,UAAA,CAAW,8BAA8B,CAAA;AAC3D,IAAA,MAAM,OAAA,GAAU,CAAC,KAAA,KAA+B;AAC9C,MAAA,cAAA,CAAe,KAAA,CAAM,OAAA,GAAU,MAAA,GAAS,OAAO,CAAA;AAAA,IACjD,CAAA;AACA,IAAA,EAAA,CAAG,gBAAA,CAAiB,UAAU,OAAO,CAAA;AACrC,IAAA,OAAO,MAAM,EAAA,CAAG,mBAAA,CAAoB,QAAA,EAAU,OAAO,CAAA;AAAA,EACvD,CAAA,EAAG,CAAC,KAAA,EAAO,cAAc,CAAC,CAAA;AAG1B,EAAAA,UAAU,MAAM;AACd,IAAA,IAAI,cAAc,OAAA,EAAS;AACzB,MAAA,aAAA,CAAc,OAAA,GAAU,KAAA;AACxB,MAAA;AAAA,IACF;AACA,IAAA,aAAA,GAAgB,OAAO,aAAa,CAAA;AAAA,EACtC,CAAA,EAAG,CAAC,KAAA,EAAO,aAAA,EAAe,aAAa,CAAC,CAAA;AAExC,EAAA,uBAAOJ,GAAAA,CAAA,QAAA,EAAA,EAAG,QAAA,EAAS,CAAA;AACrB","file":"chunk-FZ2R62Q6.js","sourcesContent":["import { QueryClientProvider } from \"@tanstack/react-query\";\n\nimport { getQueryClient } from \"./query-client\";\nimport type * as React from \"react\";\n\nexport function QueryProvider({ children }: { children: React.ReactNode }) {\n const queryClient = getQueryClient();\n\n return (\n <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>\n );\n}\n","import { createContext } from \"react\";\nimport type { RightSidePanelContextValue } from \"./right-side-panel.types\";\n\nexport const defaultRightSidePanelContextValue: RightSidePanelContextValue = {\n open: false,\n setOpen: () => undefined,\n toggle: () => undefined,\n close: () => undefined,\n sizing: { width: \"24rem\", minWidth: \"20rem\", maxWidth: \"50vw\" },\n liveWidth: \"0px\",\n setLiveWidth: () => undefined,\n resizable: false,\n panelId: \"right-side-panel\",\n isMobile: false,\n topOffset: \"0px\",\n};\n\nexport const RightSidePanelContext = createContext<RightSidePanelContextValue>(\n defaultRightSidePanelContextValue,\n);\n","import { createContext } from \"react\";\n\nexport type SidebarContextValue = {\n isSidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n isSidebarSubMenuOpen: boolean;\n toggleSidebarSubMenu: () => void;\n showSidebarSubMenu: () => void;\n subMenuId: string | null;\n updateSubMenuId: (id: string) => void;\n servicesSearchTerm: string;\n updateServicesSearchTerm: (term: string) => void;\n};\n\nexport const defaultContextValue: SidebarContextValue = {\n isSidebarOpen: false,\n toggleSidebar: () => undefined,\n closeSidebar: () => undefined,\n isSidebarSubMenuOpen: false,\n toggleSidebarSubMenu: () => undefined,\n showSidebarSubMenu: () => undefined,\n subMenuId: null,\n updateSubMenuId: () => undefined,\n servicesSearchTerm: \"\",\n updateServicesSearchTerm: () => undefined,\n};\n\nexport const SidebarContext =\n createContext<SidebarContextValue>(defaultContextValue);\n","import { SidebarContext } from \"@/contexts\";\nimport { useIsActiveMenu } from \"@/hooks/use-menus\";\nimport { useIsMobile } from \"@/hooks/use-mobile\";\nimport { useLayoutSettingsStore } from \"@/store/layout-settings.store\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\n\n// Below this width (but above the mobile breakpoint handled by\n// useIsMobile), the sidebar auto-collapses to icon-only. At/above it,\n// it restores whatever the user last manually chose.\nconst SIDEBAR_COLLAPSE_BREAKPOINT = 1024;\nconst RESIZE_DEBOUNCE_MS = 150;\n\nexport function DashboardLayoutProvider({\n children,\n isOpen,\n isSubMenuOpen = false,\n}: {\n children: React.ReactNode;\n isOpen: boolean;\n isSubMenuOpen?: boolean;\n}) {\n const { isActivePath: isServicesPath } = useIsActiveMenu(\"/app/services\");\n const isMobile = useIsMobile();\n const { layout, setLayoutSetting } = useLayoutSettingsStore();\n const isLeftSidebarOpen = layout.isLeftSidebarOpen;\n\n const [isSidebarSubMenuOpen, setIsSidebarSubMenuOpen] =\n useState(isSubMenuOpen);\n const [subMenuId, setSubMenuId] = useState<string | null>(null);\n const [servicesSearchTerm, setServicesSearchTerm] = useState(\"\");\n\n // Desktop ↔ tablet classification as of the last time this was computed\n // while non-mobile. null forces a fresh evaluation next time (used when\n // coming back from mobile, where width may have jumped any amount).\n const previousRangeRef = useRef<\"desktop\" | \"tablet\" | null>(null);\n const [isTablet, setIsTablet] = useState(false);\n\n // Seed the store from the isOpen prop on first mount, when the store\n // has no preference yet. Subsequent isOpen prop changes are ignored\n // (matches the original useState(isOpen) semantics).\n useEffect(() => {\n if (isLeftSidebarOpen === undefined) {\n setLayoutSetting(\"isLeftSidebarOpen\", isOpen);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Live state: respect the user's manual preference on desktop, but\n // force-closed on tablet (auto-collapse) and mobile.\n const isSidebarOpen = !isMobile && !isTablet && (isLeftSidebarOpen ?? isOpen);\n\n // Tablet-width auto-collapse. Only reacts to actually crossing the\n // breakpoint, not every resize tick, so a manual toggle while inside a\n // given range sticks until the range changes again.\n useEffect(() => {\n if (isMobile) {\n previousRangeRef.current = null;\n setIsTablet(false);\n return;\n }\n\n let debounceTimer: ReturnType<typeof setTimeout>;\n\n const syncToViewport = () => {\n const currentRange: \"desktop\" | \"tablet\" =\n window.innerWidth < SIDEBAR_COLLAPSE_BREAKPOINT ? \"tablet\" : \"desktop\";\n\n if (previousRangeRef.current === currentRange) {\n return;\n }\n previousRangeRef.current = currentRange;\n\n setIsTablet(currentRange === \"tablet\");\n };\n\n const handleResize = () => {\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(syncToViewport, RESIZE_DEBOUNCE_MS);\n };\n\n syncToViewport();\n window.addEventListener(\"resize\", handleResize);\n return () => {\n clearTimeout(debounceTimer);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [isMobile]);\n\n useEffect(() => {\n const menuId = localStorage.getItem(\"subMenuId\");\n if (menuId !== null) {\n setSubMenuId(menuId);\n }\n }, []);\n\n useEffect(() => {\n if (!isMobile && isServicesPath) {\n setIsSidebarSubMenuOpen(true);\n }\n }, [isServicesPath, isMobile]);\n\n useEffect(() => {\n if (isSidebarOpen && !isMobile) {\n setIsSidebarSubMenuOpen(false);\n }\n }, [isSidebarOpen, isMobile]);\n\n const toggleSidebar = useCallback(() => {\n setLayoutSetting(\"isLeftSidebarOpen\", !(isLeftSidebarOpen ?? isOpen));\n setIsSidebarSubMenuOpen(false);\n }, [isLeftSidebarOpen, isOpen, setLayoutSetting]);\n\n const closeSidebar = useCallback(() => {\n setLayoutSetting(\"isLeftSidebarOpen\", false);\n }, [setLayoutSetting]);\n\n const toggleSidebarSubMenu = useCallback(() => {\n setIsSidebarSubMenuOpen((prev) => !prev);\n }, []);\n\n const showSidebarSubMenu = useCallback(() => {\n setIsSidebarSubMenuOpen(true);\n }, []);\n\n const updateSubMenuId = useCallback((id: string) => {\n localStorage.setItem(\"subMenuId\", id);\n setSubMenuId(id);\n setServicesSearchTerm(\"\");\n }, []);\n\n const updateServicesSearchTerm = useCallback((term: string) => {\n setServicesSearchTerm(term);\n }, []);\n\n const contextValue = React.useMemo(\n () => ({\n isSidebarOpen,\n toggleSidebar,\n closeSidebar,\n isSidebarSubMenuOpen,\n toggleSidebarSubMenu,\n showSidebarSubMenu,\n subMenuId,\n updateSubMenuId,\n servicesSearchTerm,\n updateServicesSearchTerm,\n }),\n [\n isSidebarOpen,\n toggleSidebar,\n closeSidebar,\n isSidebarSubMenuOpen,\n toggleSidebarSubMenu,\n showSidebarSubMenu,\n subMenuId,\n updateSubMenuId,\n servicesSearchTerm,\n updateServicesSearchTerm,\n ],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n {children}\n </SidebarContext.Provider>\n );\n}\n","import * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nconst ToastProvider = ToastPrimitives.Provider;\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className,\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n success: \"border-green-500 bg-green-50 text-green-800\",\n warning: \"border-yellow-500 bg-yellow-50 text-yellow-800\",\n info: \"border-blue-500 bg-blue-50 text-blue-800\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className,\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className,\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n","import {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"@/components/core/toaster/toast\";\nimport { useToast } from \"@/hooks/use-toast\";\n\nexport function Toaster() {\n const { toasts } = useToast();\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n}\n","import { Toaster } from \"@/components/core\";\nimport { BlocksAppLayoutContext } from \"@/contexts\";\nimport {\n CreateAppConfigStore,\n type AppConfigStoreState,\n} from \"@/store/app-config.store\";\nimport type { RuntimeKey } from \"@/types\";\nimport { useState } from \"react\";\n\ntype BlocksAppLayoutProps = {\n children: React.ReactNode;\n config: Partial<AppConfigStoreState[\"config\"]>;\n};\n\ndeclare global {\n interface Window {\n __BLOCKS_ENV__?: Partial<Record<RuntimeKey, string>>;\n process?: { env: Partial<Record<RuntimeKey, string>> };\n }\n}\n\n// window is typed Window & typeof globalThis, and @types/node contributes a\n// global `process` whose type this browser shim cannot satisfy. Assign through\n// a plain Window reference so only the declaration above applies.\nconst browserWindow: Window = window;\nbrowserWindow.process = {\n env: window.__BLOCKS_ENV__ as Partial<Record<RuntimeKey, string>>,\n};\n\nexport const BlocksAppLayout = ({ children, config }: BlocksAppLayoutProps) => {\n const [store] = useState(() => CreateAppConfigStore(config));\n if (window && window.process && config) {\n const projectBaseUrlKey =\n config.name === \"blocks-os\"\n ? \"BLOCKS_OS_BASE_URL\"\n : \"BLOCKS_LOGIC_BASE_URL\";\n window.process.env.projectBaseUrl =\n window.process.env[projectBaseUrlKey] ?? \"\";\n\n const userBaseUrlKey = \"BLOCKS_IAM_BASE_URL\";\n window.process.env[\"userBaseUrl\"] = userBaseUrlKey\n ? window.process?.env[userBaseUrlKey] || \"\"\n : \"\";\n\n const notificationBaseUrlKey = \"BLOCKS_LOGIC_BASE_URL\";\n window.process.env[\"notificationBaseUrl\"] = notificationBaseUrlKey\n ? window.process?.env[notificationBaseUrlKey] || \"\"\n : \"\";\n }\n return (\n <BlocksAppLayoutContext.Provider value={store}>\n {children}\n <Toaster />\n </BlocksAppLayoutContext.Provider>\n );\n};\n","import { useEffect, useRef } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { useAppSettingsStore } from \"@/store\";\nimport { applyTheme } from \"@/lib/theme\";\nimport type { Theme } from \"@/lib/theme\";\n\ninterface ThemeProviderProps {\n children: ReactNode;\n /**\n * Seeds the initial theme only when no persisted cookie exists yet.\n * If the user already has a saved preference, it always wins.\n */\n defaultTheme?: Theme;\n /**\n * Fires after every confirmed theme or resolved-theme change.\n * Does NOT fire on initial mount — only on actual changes.\n */\n onThemeChange?: (\n theme: Theme,\n resolvedTheme: Exclude<Theme, \"system\">,\n ) => void;\n}\n\nexport function ThemeProvider({\n children,\n defaultTheme,\n onThemeChange,\n}: ThemeProviderProps) {\n const {\n settings: { theme },\n systemTheme,\n setSettings,\n setSystemTheme,\n } = useAppSettingsStore();\n\n const resolvedTheme: Exclude<Theme, \"system\"> =\n theme === \"system\" ? systemTheme : theme;\n\n // Skip onThemeChange on initial mount — only fire on actual changes\n const isFirstRender = useRef(true);\n\n // ── Seed defaultTheme once on mount, only if no cookie persisted yet ────────\n useEffect(() => {\n if (!defaultTheme) return;\n // Cookie storage is synchronous, so if the cookie exists the store is\n // already rehydrated with the user's saved preference — don't override it\n const hasCookie = document.cookie.includes(\"app-settings-storage=\");\n if (!hasCookie) {\n setSettings({ theme: defaultTheme });\n }\n // Intentionally empty dep array — seed is mount-only, one shot\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // ── Sync resolved theme to DOM ───────────────────────────────────────────────\n useEffect(() => {\n applyTheme(resolvedTheme);\n }, [resolvedTheme]);\n\n // ── App media query listener — active only when theme is \"system\" ─────────────\n useEffect(() => {\n if (theme !== \"system\") return;\n const mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const handler = (event: MediaQueryListEvent) => {\n setSystemTheme(event.matches ? \"dark\" : \"light\");\n };\n mq.addEventListener(\"change\", handler);\n return () => mq.removeEventListener(\"change\", handler);\n }, [theme, setSystemTheme]);\n\n // ── onThemeChange callback — skips initial mount ─────────────────────────────\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n onThemeChange?.(theme, resolvedTheme);\n }, [theme, resolvedTheme, onThemeChange]);\n\n return <>{children}</>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/impersonation.service.ts","../src/hooks/use-impersonation.ts","../src/services/project.service.ts","../src/hooks/use-project.ts"],"names":["iamClient","IMPERSONATE_ENDPOINTS","getRuntimeEnv","useQuery","useQueryClient","useMutation","HttpClient","PROJECT_ENDPOINTS","logicClient","useProjectStore","useEffect","useImpersonateStore"],"mappings":";;;;;;;;;AAQA,IAAM,uBAAN,MAA2B;AAAA,EACzB,mBACE,OAAA,EAC6B;AAC7B,IAAA,OAAOA,2BAAA,CAAU,IAAA,CAAKC,uCAAA,CAAsB,WAAA,EAAa,OAAO,CAAA;AAAA,EAClE;AAAA,EAEA,iBAAA,GAAmC;AAIjC,IAAA,OAAOD,2BAAA,CAAU,IAAA;AAAA,MACfC,uCAAA,CAAsB,kBAAA;AAAA,MACtB,EAAC;AAAA,MACD,MA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nC,CAAA;AAAA,IACH;AAAA,GACD,CAAA;AACH;AAEO,IAAM,iBAAA,GAAoB,CAAC,OAAA,KAAoC;AACpE,EAAA,MAAM,cAAcD,yBAAAA,EAAe;AACnC,EAAA,OAAOC,sBAAAA,CAAY;AAAA,IACjB,WAAA,EAAa,CAAC,YAAA,EAAc,UAAA,EAAY,SAAS,CAAA;AAAA,IACjD,UAAA,EAAY,MAAM,cAAA,CAAe,cAAA,CAAe,OAAO,CAAA;AAAA,IACvD,WAAW,MAAM;AACf,MAAA,WAAA,CAAY,iBAAA,CAAkB;AAAA,QAC5B,QAAA,EAAU,CAAC,YAAA,EAAc,SAAA,EAAW,OAAO;AAAA,OAC5C,CAAA;AACD,MAAA,WAAA,CAAY,kBAAkB,EAAE,QAAA,EAAU,CAAC,YAAA,EAAc,UAAU,GAAG,CAAA;AAAA,IACxE;AAAA,GACD,CAAA;AACH","file":"chunk-GZY23QP3.cjs","sourcesContent":["import { IMPERSONATE_ENDPOINTS } from \"@/constants/endpoint.constant\";\nimport { iamClient } from \"@/lib/http/instances\";\nimport type {\n ImpersonationRequest,\n ImpersonationState,\n ImpersonationStatusResponse,\n} from \"@/models/impersonation.model\";\n\nclass ImpersonationService {\n startImpersonation(\n request: ImpersonationRequest,\n ): Promise<ImpersonationState> {\n return iamClient.post(IMPERSONATE_ENDPOINTS.IMPERSONATE, request);\n }\n\n stopImpersonation(): Promise<void> {\n // Do not run the global 401 → refresh → logout flow for stop. A 401 here\n // usually means impersonation is already ended server-side while the\n // session cookie is still valid for other endpoints (me/status).\n return iamClient.post(\n IMPERSONATE_ENDPOINTS.STOP_IMPERSONATION,\n {},\n undefined,\n { skipTokenRotation: true },\n );\n }\n\n impersonationStatus(): Promise<ImpersonationStatusResponse> {\n return iamClient.post(IMPERSONATE_ENDPOINTS.IMPERSONATION_STATUS, null);\n }\n}\n\nexport const impersonationService = new ImpersonationService();\n","import { getRuntimeEnv } from \"@/lib/runtime-env\";\nimport type { ImpersonationStatusResponse } from \"@/models/impersonation.model\";\nimport { impersonationService } from \"@/services/impersonation.service\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\n\nconst IMPERSONATION_STATUS_QUERY_KEY = [\"blocks-kit-impersonation\", \"status\"];\n\nconst buildStoppedStatus = (): ImpersonationStatusResponse => ({\n impersonated: false,\n originalTenantId: getRuntimeEnv(\"BLOCKS_X_BLOCKS_KEY\") || \"\",\n impersonatedTenantId: null,\n});\n\nexport const useImpersonationStatusChecker = () => {\n return useQuery({\n queryKey: IMPERSONATION_STATUS_QUERY_KEY,\n queryFn: () => impersonationService.impersonationStatus(),\n staleTime: 0,\n refetchOnMount: \"always\",\n });\n};\n\nexport const useStopImpersonation = () => {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationKey: [\"impersonation\", \"stop\"],\n mutationFn: impersonationService.stopImpersonation,\n onSettled: () => {\n queryClient.setQueryData<ImpersonationStatusResponse>(\n IMPERSONATION_STATUS_QUERY_KEY,\n buildStoppedStatus(),\n );\n },\n });\n};\n\nexport const useStartImpersonation = () => {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationKey: [\"impersonation\", \"start\"],\n mutationFn: impersonationService.startImpersonation,\n onSuccess: (_data, variables) => {\n queryClient.setQueryData<ImpersonationStatusResponse>(\n IMPERSONATION_STATUS_QUERY_KEY,\n (current) => ({\n impersonated: true,\n originalTenantId:\n current?.originalTenantId ||\n getRuntimeEnv(\"BLOCKS_X_BLOCKS_KEY\") ||\n \"\",\n impersonatedTenantId: variables.targeted_tenant_id,\n }),\n );\n },\n });\n};\n","import { logicClient } from \"@/lib/http/instances\";\nimport type {\n IProjectGroup,\n IGetProjectResponse,\n IDisableProjectPayload,\n IDisableProjectResponse,\n IUpdateTenantGroupPayload,\n IUpdateProjectResponse,\n IEnvRepository,\n IUpdateProjectPayload,\n IValidateCnameProjectPayload,\n IValidateCnameProjectResponse,\n} from \"@/models\";\nimport { PROJECT_ENDPOINTS } from \"@/constants/endpoint.constant\";\nimport { getRuntimeEnv, HttpClient } from \"@/lib\";\n\n//Exception only for OS.\nconst logicClientForOS = new HttpClient({\n baseURL: () => getRuntimeEnv(\"BLOCKS_LOGIC_BASE_URL\"),\n blocksKey: () => getRuntimeEnv(\"BLOCKS_X_BLOCKS_KEY\"),\n});\n\nexport class ProjectService {\n getProjects(\n page = 0,\n pageSize = 100,\n tenantGroupId = \"\",\n ): Promise<IProjectGroup[]> {\n const url = `${PROJECT_ENDPOINTS.GETS}?page=${page}&pageSize=${pageSize}&tenantGroupId=${tenantGroupId}`;\n return logicClient.get(url);\n }\n\n // Resolves the project from the caller's auth context — there is no parameter\n // to pass; the token's tenant selects the project.\n getProject(): Promise<IGetProjectResponse> {\n return logicClient.get(PROJECT_ENDPOINTS.GET);\n }\n\n getEnvRepositories(): Promise<{\n data: IEnvRepository[];\n errors: unknown | null;\n isSuccess: boolean;\n }> {\n const url = `${PROJECT_ENDPOINTS.REPOS_LIST}`;\n return logicClientForOS.get(url);\n }\n\n repoUpdate(payload: {\n projectKey: string;\n projectEnv: string;\n repoWithDomains: {\n repoId: string;\n repoUrl: string;\n customDeploymentDomain: string;\n }[];\n }): Promise<{\n errors: unknown | null;\n isSuccess: boolean;\n }> {\n return logicClientForOS.post(PROJECT_ENDPOINTS.REPO_UPDATE, payload);\n }\n\n updateTenantGroup(\n payload: IUpdateTenantGroupPayload,\n ): Promise<IUpdateProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.UPDATE_TENANT_GROUP, payload);\n }\n\n updateProject(\n payload: IUpdateProjectPayload,\n ): Promise<IUpdateProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.UPDATE_PROJECT, payload);\n }\n\n disableProject(\n payload: IDisableProjectPayload,\n ): Promise<IDisableProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.DISABLE, payload);\n }\n\n validateCNameProject(\n payload: IValidateCnameProjectPayload,\n ): Promise<IValidateCnameProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.CONFIGURE, payload);\n }\n}\n\nexport const projectService = new ProjectService();\n","import { useEffect } from \"react\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { projectService } from \"@/services/project.service\";\nimport { useProjectStore } from \"@/store/project.store\";\nimport { useImpersonateStore } from \"@/store/impersonate.store\";\nimport type {\n IUpdateProjectPayload,\n IUpdateTenantGroupPayload,\n IValidateCnameProjectPayload,\n} from \"@/models\";\n\nexport const useGetProjects = (options: {\n tenantGroupId?: string;\n enabled?: boolean;\n}) => {\n const setProjects = useProjectStore((state) => state.setProjects);\n const query = useQuery({\n queryKey: [\"identifier\", \"projects\", options?.tenantGroupId],\n queryFn: () => projectService.getProjects(0, 100, options?.tenantGroupId),\n enabled: !!options?.enabled,\n });\n\n useEffect(() => {\n if (!query.data) return;\n const flattenedProjects = query.data.flatMap((group) => group.projects);\n setProjects(flattenedProjects);\n }, [query.data, setProjects]);\n\n return query;\n};\n\nexport const useGetProject = () => {\n const selectedProject = useProjectStore((state) => state.selectedProject);\n const { isImpersonated, impersonatedTenantId, originalTenantId } =\n useImpersonateStore();\n\n // The endpoint answers \"the project of whoever I am\", so the tenant the token is\n // scoped to identifies the response — key the cache on that, not on an id the\n // server never reads. All consumers mount inside ImpersonationChecker, which\n // renders nothing until the store is populated, so this is resolved by the time\n // the query runs.\n const tokenTenantId = isImpersonated\n ? impersonatedTenantId\n : originalTenantId;\n\n return useQuery({\n queryKey: [\"identifier\", \"project\", tokenTenantId],\n queryFn: () => projectService.getProject(),\n // Deliberately unchanged from the previous `Boolean(options.projectId)`, which\n // was fed `selectedProject?.itemId`. It is load-bearing: on project-overview\n // routes ImpersonationTerminator drops the token to root and no project is\n // selected, and this keeps the query idle there. Tightening it to also require\n // the token's tenant to match the selected project is the stricter, more\n // correct rule — but it depends on `selectedProject.tenantId` and the\n // impersonation status endpoint agreeing byte-for-byte, which is unverified.\n // Getting that wrong disables the query permanently and blanks\n // dashboard-overview (`if (!data?.data) return null`).\n enabled: isImpersonated && Boolean(selectedProject?.itemId),\n });\n};\n\nexport const useGetEnvRepositories = (projectKey: string) => {\n return useQuery({\n queryKey: [\"env-repositories\", projectKey],\n queryFn: () => projectService.getEnvRepositories(),\n enabled: !!projectKey,\n });\n};\n\nexport const useUpdateRepositories = () => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"env-repositories\", \"update\"],\n mutationFn: projectService.repoUpdate,\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [\"env-repositories\"] });\n },\n });\n};\nexport const useUpdateTenantGroup = () => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"tenant-group-update\"],\n mutationFn: (payload: IUpdateTenantGroupPayload) =>\n projectService.updateTenantGroup(payload),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\"identifier\", \"tenant-group\"],\n });\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"projects\"] });\n },\n });\n};\n\nexport const useUpdateProject = () => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"project-update\"],\n mutationFn: (payload: IUpdateProjectPayload) =>\n projectService.updateProject(payload),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"project\"] });\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"projects\"] });\n },\n });\n};\n\nexport const useValidateCNameProject = (\n options: IValidateCnameProjectPayload,\n) => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"projects\", options],\n mutationFn: () => projectService.validateCNameProject(options),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\"identifier\", \"project\"],\n });\n },\n });\n};\n\nexport const useDisableProject = (options: { projectKey: string }) => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"projects\", \"disable\"],\n mutationFn: () => projectService.disableProject(options),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\"identifier\", \"project\", options],\n });\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"projects\"] });\n },\n });\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/providers/query.provider.tsx","../src/contexts/dashboard-layout/right-side-panel.context.ts","../src/contexts/dashboard-layout/sidebar.context.ts","../src/providers/dashboard-layout.provider.tsx","../src/components/core/toaster/toast.tsx","../src/components/core/toaster/toaster.tsx","../src/providers/blocks-app-layout.provider.tsx","../src/providers/theme.provider.tsx"],"names":["getQueryClient","jsx","QueryClientProvider","createContext","useIsActiveMenu","useIsMobile","useLayoutSettingsStore","useState","useRef","useEffect","useCallback","React","ToastPrimitives","React2","cn","cva","X","useToast","jsxs","CreateAppConfigStore","BlocksAppLayoutContext","useAppSettingsStore","applyTheme","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAAkC;AACzE,EAAA,MAAM,cAAcA,gCAAA,EAAe;AAEnC,EAAA,uBACEC,cAAA,CAACC,8BAAA,EAAA,EAAoB,MAAA,EAAQ,WAAA,EAAc,QAAA,EAAS,CAAA;AAExD;ACRO,IAAM,iCAAA,GAAgE;AAAA,EAC3E,IAAA,EAAM,KAAA;AAAA,EACN,SAAS,MAAM,MAAA;AAAA,EACf,QAAQ,MAAM,MAAA;AAAA,EACd,OAAO,MAAM,MAAA;AAAA,EACb,QAAQ,EAAE,KAAA,EAAO,SAAS,QAAA,EAAU,OAAA,EAAS,UAAU,MAAA,EAAO;AAAA,EAC9D,SAAA,EAAW,KAAA;AAAA,EACX,cAAc,MAAM,MAAA;AAAA,EACpB,SAAA,EAAW,KAAA;AAAA,EACX,OAAA,EAAS,kBAAA;AAAA,EACT,QAAA,EAAU,KAAA;AAAA,EACV,SAAA,EAAW;AACb;AAEO,IAAM,qBAAA,GAAwBC,oBAAA;AAAA,EACnC;AACF;ACJO,IAAM,mBAAA,GAA2C;AAAA,EACtD,aAAA,EAAe,KAAA;AAAA,EACf,eAAe,MA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AO,MAAM,EAAA,CAAG,mBAAA,CAAoB,QAAA,EAAU,OAAO,CAAA;AAAA,EACvD,CAAA,EAAG,CAAC,KAAA,EAAO,cAAc,CAAC,CAAA;AAG1B,EAAAA,iBAAU,MAAM;AACd,IAAA,IAAI,cAAc,OAAA,EAAS;AACzB,MAAA,aAAA,CAAc,OAAA,GAAU,KAAA;AACxB,MAAA;AAAA,IACF;AACA,IAAA,aAAA,GAAgB,OAAO,aAAa,CAAA;AAAA,EACtC,CAAA,EAAG,CAAC,KAAA,EAAO,aAAA,EAAe,aAAa,CAAC,CAAA;AAExC,EAAA,uBAAOR,cAAAA,CAAAsB,mBAAA,EAAA,EAAG,QAAA,EAAS,CAAA;AACrB","file":"chunk-M3KOYPCN.cjs","sourcesContent":["import { QueryClientProvider } from \"@tanstack/react-query\";\n\nimport { getQueryClient } from \"./query-client\";\nimport type * as React from \"react\";\n\nexport function QueryProvider({ children }: { children: React.ReactNode }) {\n const queryClient = getQueryClient();\n\n return (\n <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>\n );\n}\n","import { createContext } from \"react\";\nimport type { RightSidePanelContextValue } from \"./right-side-panel.types\";\n\nexport const defaultRightSidePanelContextValue: RightSidePanelContextValue = {\n open: false,\n setOpen: () => undefined,\n toggle: () => undefined,\n close: () => undefined,\n sizing: { width: \"24rem\", minWidth: \"20rem\", maxWidth: \"50vw\" },\n liveWidth: \"0px\",\n setLiveWidth: () => undefined,\n resizable: false,\n panelId: \"right-side-panel\",\n isMobile: false,\n topOffset: \"0px\",\n};\n\nexport const RightSidePanelContext = createContext<RightSidePanelContextValue>(\n defaultRightSidePanelContextValue,\n);\n","import { createContext } from \"react\";\n\nexport type SidebarContextValue = {\n isSidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n isSidebarSubMenuOpen: boolean;\n toggleSidebarSubMenu: () => void;\n showSidebarSubMenu: () => void;\n subMenuId: string | null;\n updateSubMenuId: (id: string) => void;\n servicesSearchTerm: string;\n updateServicesSearchTerm: (term: string) => void;\n};\n\nexport const defaultContextValue: SidebarContextValue = {\n isSidebarOpen: false,\n toggleSidebar: () => undefined,\n closeSidebar: () => undefined,\n isSidebarSubMenuOpen: false,\n toggleSidebarSubMenu: () => undefined,\n showSidebarSubMenu: () => undefined,\n subMenuId: null,\n updateSubMenuId: () => undefined,\n servicesSearchTerm: \"\",\n updateServicesSearchTerm: () => undefined,\n};\n\nexport const SidebarContext =\n createContext<SidebarContextValue>(defaultContextValue);\n","import { SidebarContext } from \"@/contexts\";\nimport { useIsActiveMenu } from \"@/hooks/use-menus\";\nimport { useIsMobile } from \"@/hooks/use-mobile\";\nimport { useLayoutSettingsStore } from \"@/store/layout-settings.store\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\n\n// Below this width (but above the mobile breakpoint handled by\n// useIsMobile), the sidebar auto-collapses to icon-only. At/above it,\n// it restores whatever the user last manually chose.\nconst SIDEBAR_COLLAPSE_BREAKPOINT = 1024;\nconst RESIZE_DEBOUNCE_MS = 150;\n\nexport function DashboardLayoutProvider({\n children,\n isOpen,\n isSubMenuOpen = false,\n}: {\n children: React.ReactNode;\n isOpen: boolean;\n isSubMenuOpen?: boolean;\n}) {\n const { isActivePath: isServicesPath } = useIsActiveMenu(\"/app/services\");\n const isMobile = useIsMobile();\n const { layout, setLayoutSetting } = useLayoutSettingsStore();\n const isLeftSidebarOpen = layout.isLeftSidebarOpen;\n\n const [isSidebarSubMenuOpen, setIsSidebarSubMenuOpen] =\n useState(isSubMenuOpen);\n const [subMenuId, setSubMenuId] = useState<string | null>(null);\n const [servicesSearchTerm, setServicesSearchTerm] = useState(\"\");\n\n // Desktop ↔ tablet classification as of the last time this was computed\n // while non-mobile. null forces a fresh evaluation next time (used when\n // coming back from mobile, where width may have jumped any amount).\n const previousRangeRef = useRef<\"desktop\" | \"tablet\" | null>(null);\n const [isTablet, setIsTablet] = useState(false);\n\n // Seed the store from the isOpen prop on first mount, when the store\n // has no preference yet. Subsequent isOpen prop changes are ignored\n // (matches the original useState(isOpen) semantics).\n useEffect(() => {\n if (isLeftSidebarOpen === undefined) {\n setLayoutSetting(\"isLeftSidebarOpen\", isOpen);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Live state: respect the user's manual preference on desktop, but\n // force-closed on tablet (auto-collapse) and mobile.\n const isSidebarOpen = !isMobile && !isTablet && (isLeftSidebarOpen ?? isOpen);\n\n // Tablet-width auto-collapse. Only reacts to actually crossing the\n // breakpoint, not every resize tick, so a manual toggle while inside a\n // given range sticks until the range changes again.\n useEffect(() => {\n if (isMobile) {\n previousRangeRef.current = null;\n setIsTablet(false);\n return;\n }\n\n let debounceTimer: ReturnType<typeof setTimeout>;\n\n const syncToViewport = () => {\n const currentRange: \"desktop\" | \"tablet\" =\n window.innerWidth < SIDEBAR_COLLAPSE_BREAKPOINT ? \"tablet\" : \"desktop\";\n\n if (previousRangeRef.current === currentRange) {\n return;\n }\n previousRangeRef.current = currentRange;\n\n setIsTablet(currentRange === \"tablet\");\n };\n\n const handleResize = () => {\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(syncToViewport, RESIZE_DEBOUNCE_MS);\n };\n\n syncToViewport();\n window.addEventListener(\"resize\", handleResize);\n return () => {\n clearTimeout(debounceTimer);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [isMobile]);\n\n useEffect(() => {\n const menuId = localStorage.getItem(\"subMenuId\");\n if (menuId !== null) {\n setSubMenuId(menuId);\n }\n }, []);\n\n useEffect(() => {\n if (!isMobile && isServicesPath) {\n setIsSidebarSubMenuOpen(true);\n }\n }, [isServicesPath, isMobile]);\n\n useEffect(() => {\n if (isSidebarOpen && !isMobile) {\n setIsSidebarSubMenuOpen(false);\n }\n }, [isSidebarOpen, isMobile]);\n\n const toggleSidebar = useCallback(() => {\n setLayoutSetting(\"isLeftSidebarOpen\", !(isLeftSidebarOpen ?? isOpen));\n setIsSidebarSubMenuOpen(false);\n }, [isLeftSidebarOpen, isOpen, setLayoutSetting]);\n\n const closeSidebar = useCallback(() => {\n setLayoutSetting(\"isLeftSidebarOpen\", false);\n }, [setLayoutSetting]);\n\n const toggleSidebarSubMenu = useCallback(() => {\n setIsSidebarSubMenuOpen((prev) => !prev);\n }, []);\n\n const showSidebarSubMenu = useCallback(() => {\n setIsSidebarSubMenuOpen(true);\n }, []);\n\n const updateSubMenuId = useCallback((id: string) => {\n localStorage.setItem(\"subMenuId\", id);\n setSubMenuId(id);\n setServicesSearchTerm(\"\");\n }, []);\n\n const updateServicesSearchTerm = useCallback((term: string) => {\n setServicesSearchTerm(term);\n }, []);\n\n const contextValue = React.useMemo(\n () => ({\n isSidebarOpen,\n toggleSidebar,\n closeSidebar,\n isSidebarSubMenuOpen,\n toggleSidebarSubMenu,\n showSidebarSubMenu,\n subMenuId,\n updateSubMenuId,\n servicesSearchTerm,\n updateServicesSearchTerm,\n }),\n [\n isSidebarOpen,\n toggleSidebar,\n closeSidebar,\n isSidebarSubMenuOpen,\n toggleSidebarSubMenu,\n showSidebarSubMenu,\n subMenuId,\n updateSubMenuId,\n servicesSearchTerm,\n updateServicesSearchTerm,\n ],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n {children}\n </SidebarContext.Provider>\n );\n}\n","import * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nconst ToastProvider = ToastPrimitives.Provider;\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className,\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n success: \"border-green-500 bg-green-50 text-green-800\",\n warning: \"border-yellow-500 bg-yellow-50 text-yellow-800\",\n info: \"border-blue-500 bg-blue-50 text-blue-800\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className,\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className,\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n","import {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"@/components/core/toaster/toast\";\nimport { useToast } from \"@/hooks/use-toast\";\n\nexport function Toaster() {\n const { toasts } = useToast();\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n}\n","import { Toaster } from \"@/components/core\";\nimport { BlocksAppLayoutContext } from \"@/contexts\";\nimport {\n CreateAppConfigStore,\n type AppConfigStoreState,\n} from \"@/store/app-config.store\";\nimport type { RuntimeKey } from \"@/types\";\nimport { useState } from \"react\";\n\ntype BlocksAppLayoutProps = {\n children: React.ReactNode;\n config: Partial<AppConfigStoreState[\"config\"]>;\n};\n\ndeclare global {\n interface Window {\n __BLOCKS_ENV__?: Partial<Record<RuntimeKey, string>>;\n process?: { env: Partial<Record<RuntimeKey, string>> };\n }\n}\n\n// window is typed Window & typeof globalThis, and @types/node contributes a\n// global `process` whose type this browser shim cannot satisfy. Assign through\n// a plain Window reference so only the declaration above applies.\nconst browserWindow: Window = window;\nbrowserWindow.process = {\n env: window.__BLOCKS_ENV__ as Partial<Record<RuntimeKey, string>>,\n};\n\nexport const BlocksAppLayout = ({ children, config }: BlocksAppLayoutProps) => {\n const [store] = useState(() => CreateAppConfigStore(config));\n if (window && window.process && config) {\n const projectBaseUrlKey =\n config.name === \"blocks-os\"\n ? \"BLOCKS_OS_BASE_URL\"\n : \"BLOCKS_LOGIC_BASE_URL\";\n window.process.env.projectBaseUrl =\n window.process.env[projectBaseUrlKey] ?? \"\";\n\n const userBaseUrlKey = \"BLOCKS_IAM_BASE_URL\";\n window.process.env[\"userBaseUrl\"] = userBaseUrlKey\n ? window.process?.env[userBaseUrlKey] || \"\"\n : \"\";\n\n const notificationBaseUrlKey = \"BLOCKS_LOGIC_BASE_URL\";\n window.process.env[\"notificationBaseUrl\"] = notificationBaseUrlKey\n ? window.process?.env[notificationBaseUrlKey] || \"\"\n : \"\";\n }\n return (\n <BlocksAppLayoutContext.Provider value={store}>\n {children}\n <Toaster />\n </BlocksAppLayoutContext.Provider>\n );\n};\n","import { useEffect, useRef } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { useAppSettingsStore } from \"@/store\";\nimport { applyTheme } from \"@/lib/theme\";\nimport type { Theme } from \"@/lib/theme\";\n\ninterface ThemeProviderProps {\n children: ReactNode;\n /**\n * Seeds the initial theme only when no persisted cookie exists yet.\n * If the user already has a saved preference, it always wins.\n */\n defaultTheme?: Theme;\n /**\n * Fires after every confirmed theme or resolved-theme change.\n * Does NOT fire on initial mount — only on actual changes.\n */\n onThemeChange?: (\n theme: Theme,\n resolvedTheme: Exclude<Theme, \"system\">,\n ) => void;\n}\n\nexport function ThemeProvider({\n children,\n defaultTheme,\n onThemeChange,\n}: ThemeProviderProps) {\n const {\n settings: { theme },\n systemTheme,\n setSettings,\n setSystemTheme,\n } = useAppSettingsStore();\n\n const resolvedTheme: Exclude<Theme, \"system\"> =\n theme === \"system\" ? systemTheme : theme;\n\n // Skip onThemeChange on initial mount — only fire on actual changes\n const isFirstRender = useRef(true);\n\n // ── Seed defaultTheme once on mount, only if no cookie persisted yet ────────\n useEffect(() => {\n if (!defaultTheme) return;\n // Cookie storage is synchronous, so if the cookie exists the store is\n // already rehydrated with the user's saved preference — don't override it\n const hasCookie = document.cookie.includes(\"app-settings-storage=\");\n if (!hasCookie) {\n setSettings({ theme: defaultTheme });\n }\n // Intentionally empty dep array — seed is mount-only, one shot\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // ── Sync resolved theme to DOM ───────────────────────────────────────────────\n useEffect(() => {\n applyTheme(resolvedTheme);\n }, [resolvedTheme]);\n\n // ── App media query listener — active only when theme is \"system\" ─────────────\n useEffect(() => {\n if (theme !== \"system\") return;\n const mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const handler = (event: MediaQueryListEvent) => {\n setSystemTheme(event.matches ? \"dark\" : \"light\");\n };\n mq.addEventListener(\"change\", handler);\n return () => mq.removeEventListener(\"change\", handler);\n }, [theme, setSystemTheme]);\n\n // ── onThemeChange callback — skips initial mount ─────────────────────────────\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n onThemeChange?.(theme, resolvedTheme);\n }, [theme, resolvedTheme, onThemeChange]);\n\n return <>{children}</>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/impersonation.service.ts","../src/hooks/use-impersonation.ts","../src/services/project.service.ts","../src/hooks/use-project.ts"],"names":["useQuery","useQueryClient","useMutation"],"mappings":";;;;;;;AAQA,IAAM,uBAAN,MAA2B;AAAA,EACzB,mBACE,OAAA,EAC6B;AAC7B,IAAA,OAAO,SAAA,CAAU,IAAA,CAAK,qBAAA,CAAsB,WAAA,EAAa,OAAO,CAAA;AAAA,EAClE;AAAA,EAEA,iBAAA,GAAmC;AAIjC,IAAA,OAAO,SAAA,CAAU,IAAA;AAAA,MACf,qBAAA,CAAsB,kBAAA;AAAA,MACtB,EAAC;AAAA,MACD,MAAA;AAAA,MACA,EAAE,mBAAmB,IAAA;AAAK,KAC5B;AAAA,EACF;AAAA,EAEA,mBAAA,GAA4D;AAC1D,IAAA,OAAO,SAAA,CAAU,IAAA,CAAK,qBAAA,CAAsB,oBAAA,EAAsB,IAAI,CAAA;AAAA,EACxE;AACF,CAAA;AAEO,IAAM,oBAAA,GAAuB,IAAI,oBAAA,EAAqB;AC3B7D,IAAM,8BAAA,GAAiC,CAAC,0BAAA,EAA4B,QAAQ,CAAA;AAE5E,IAAM,qBAAqB,OAAoC;AAAA,EAC7D,YAAA,EAAc,KAAA;AAAA,EACd,gBAAA,EAAkB,aAAA,CAAc,qBAAqB,CAAA,IAAK,EAAA;AAAA,EAC1D,oBAAA,EAAsB;AACxB,CAAA,CAAA;AAEO,IAAM,gCAAgC,MAAM;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.js","sourcesContent":["import { IMPERSONATE_ENDPOINTS } from \"@/constants/endpoint.constant\";\nimport { iamClient } from \"@/lib/http/instances\";\nimport type {\n ImpersonationRequest,\n ImpersonationState,\n ImpersonationStatusResponse,\n} from \"@/models/impersonation.model\";\n\nclass ImpersonationService {\n startImpersonation(\n request: ImpersonationRequest,\n ): Promise<ImpersonationState> {\n return iamClient.post(IMPERSONATE_ENDPOINTS.IMPERSONATE, request);\n }\n\n stopImpersonation(): Promise<void> {\n // Do not run the global 401 → refresh → logout flow for stop. A 401 here\n // usually means impersonation is already ended server-side while the\n // session cookie is still valid for other endpoints (me/status).\n return iamClient.post(\n IMPERSONATE_ENDPOINTS.STOP_IMPERSONATION,\n {},\n undefined,\n { skipTokenRotation: true },\n );\n }\n\n impersonationStatus(): Promise<ImpersonationStatusResponse> {\n return iamClient.post(IMPERSONATE_ENDPOINTS.IMPERSONATION_STATUS, null);\n }\n}\n\nexport const impersonationService = new ImpersonationService();\n","import { getRuntimeEnv } from \"@/lib/runtime-env\";\nimport type { ImpersonationStatusResponse } from \"@/models/impersonation.model\";\nimport { impersonationService } from \"@/services/impersonation.service\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\n\nconst IMPERSONATION_STATUS_QUERY_KEY = [\"blocks-kit-impersonation\", \"status\"];\n\nconst buildStoppedStatus = (): ImpersonationStatusResponse => ({\n impersonated: false,\n originalTenantId: getRuntimeEnv(\"BLOCKS_X_BLOCKS_KEY\") || \"\",\n impersonatedTenantId: null,\n});\n\nexport const useImpersonationStatusChecker = () => {\n return useQuery({\n queryKey: IMPERSONATION_STATUS_QUERY_KEY,\n queryFn: () => impersonationService.impersonationStatus(),\n staleTime: 0,\n refetchOnMount: \"always\",\n });\n};\n\nexport const useStopImpersonation = () => {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationKey: [\"impersonation\", \"stop\"],\n mutationFn: impersonationService.stopImpersonation,\n onSettled: () => {\n queryClient.setQueryData<ImpersonationStatusResponse>(\n IMPERSONATION_STATUS_QUERY_KEY,\n buildStoppedStatus(),\n );\n },\n });\n};\n\nexport const useStartImpersonation = () => {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationKey: [\"impersonation\", \"start\"],\n mutationFn: impersonationService.startImpersonation,\n onSuccess: (_data, variables) => {\n queryClient.setQueryData<ImpersonationStatusResponse>(\n IMPERSONATION_STATUS_QUERY_KEY,\n (current) => ({\n impersonated: true,\n originalTenantId:\n current?.originalTenantId ||\n getRuntimeEnv(\"BLOCKS_X_BLOCKS_KEY\") ||\n \"\",\n impersonatedTenantId: variables.targeted_tenant_id,\n }),\n );\n },\n });\n};\n","import { logicClient } from \"@/lib/http/instances\";\nimport type {\n IProjectGroup,\n IGetProjectResponse,\n IDisableProjectPayload,\n IDisableProjectResponse,\n IUpdateTenantGroupPayload,\n IUpdateProjectResponse,\n IEnvRepository,\n IUpdateProjectPayload,\n IValidateCnameProjectPayload,\n IValidateCnameProjectResponse,\n} from \"@/models\";\nimport { PROJECT_ENDPOINTS } from \"@/constants/endpoint.constant\";\nimport { getRuntimeEnv, HttpClient } from \"@/lib\";\n\n//Exception only for OS.\nconst logicClientForOS = new HttpClient({\n baseURL: () => getRuntimeEnv(\"BLOCKS_LOGIC_BASE_URL\"),\n blocksKey: () => getRuntimeEnv(\"BLOCKS_X_BLOCKS_KEY\"),\n});\n\nexport class ProjectService {\n getProjects(\n page = 0,\n pageSize = 100,\n tenantGroupId = \"\",\n ): Promise<IProjectGroup[]> {\n const url = `${PROJECT_ENDPOINTS.GETS}?page=${page}&pageSize=${pageSize}&tenantGroupId=${tenantGroupId}`;\n return logicClient.get(url);\n }\n\n // Resolves the project from the caller's auth context — there is no parameter\n // to pass; the token's tenant selects the project.\n getProject(): Promise<IGetProjectResponse> {\n return logicClient.get(PROJECT_ENDPOINTS.GET);\n }\n\n getEnvRepositories(): Promise<{\n data: IEnvRepository[];\n errors: unknown | null;\n isSuccess: boolean;\n }> {\n const url = `${PROJECT_ENDPOINTS.REPOS_LIST}`;\n return logicClientForOS.get(url);\n }\n\n repoUpdate(payload: {\n projectKey: string;\n projectEnv: string;\n repoWithDomains: {\n repoId: string;\n repoUrl: string;\n customDeploymentDomain: string;\n }[];\n }): Promise<{\n errors: unknown | null;\n isSuccess: boolean;\n }> {\n return logicClientForOS.post(PROJECT_ENDPOINTS.REPO_UPDATE, payload);\n }\n\n updateTenantGroup(\n payload: IUpdateTenantGroupPayload,\n ): Promise<IUpdateProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.UPDATE_TENANT_GROUP, payload);\n }\n\n updateProject(\n payload: IUpdateProjectPayload,\n ): Promise<IUpdateProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.UPDATE_PROJECT, payload);\n }\n\n disableProject(\n payload: IDisableProjectPayload,\n ): Promise<IDisableProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.DISABLE, payload);\n }\n\n validateCNameProject(\n payload: IValidateCnameProjectPayload,\n ): Promise<IValidateCnameProjectResponse> {\n return logicClient.post(PROJECT_ENDPOINTS.CONFIGURE, payload);\n }\n}\n\nexport const projectService = new ProjectService();\n","import { useEffect } from \"react\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { projectService } from \"@/services/project.service\";\nimport { useProjectStore } from \"@/store/project.store\";\nimport { useImpersonateStore } from \"@/store/impersonate.store\";\nimport type {\n IUpdateProjectPayload,\n IUpdateTenantGroupPayload,\n IValidateCnameProjectPayload,\n} from \"@/models\";\n\nexport const useGetProjects = (options: {\n tenantGroupId?: string;\n enabled?: boolean;\n}) => {\n const setProjects = useProjectStore((state) => state.setProjects);\n const query = useQuery({\n queryKey: [\"identifier\", \"projects\", options?.tenantGroupId],\n queryFn: () => projectService.getProjects(0, 100, options?.tenantGroupId),\n enabled: !!options?.enabled,\n });\n\n useEffect(() => {\n if (!query.data) return;\n const flattenedProjects = query.data.flatMap((group) => group.projects);\n setProjects(flattenedProjects);\n }, [query.data, setProjects]);\n\n return query;\n};\n\nexport const useGetProject = () => {\n const selectedProject = useProjectStore((state) => state.selectedProject);\n const { isImpersonated, impersonatedTenantId, originalTenantId } =\n useImpersonateStore();\n\n // The endpoint answers \"the project of whoever I am\", so the tenant the token is\n // scoped to identifies the response — key the cache on that, not on an id the\n // server never reads. All consumers mount inside ImpersonationChecker, which\n // renders nothing until the store is populated, so this is resolved by the time\n // the query runs.\n const tokenTenantId = isImpersonated\n ? impersonatedTenantId\n : originalTenantId;\n\n return useQuery({\n queryKey: [\"identifier\", \"project\", tokenTenantId],\n queryFn: () => projectService.getProject(),\n // Deliberately unchanged from the previous `Boolean(options.projectId)`, which\n // was fed `selectedProject?.itemId`. It is load-bearing: on project-overview\n // routes ImpersonationTerminator drops the token to root and no project is\n // selected, and this keeps the query idle there. Tightening it to also require\n // the token's tenant to match the selected project is the stricter, more\n // correct rule — but it depends on `selectedProject.tenantId` and the\n // impersonation status endpoint agreeing byte-for-byte, which is unverified.\n // Getting that wrong disables the query permanently and blanks\n // dashboard-overview (`if (!data?.data) return null`).\n enabled: isImpersonated && Boolean(selectedProject?.itemId),\n });\n};\n\nexport const useGetEnvRepositories = (projectKey: string) => {\n return useQuery({\n queryKey: [\"env-repositories\", projectKey],\n queryFn: () => projectService.getEnvRepositories(),\n enabled: !!projectKey,\n });\n};\n\nexport const useUpdateRepositories = () => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"env-repositories\", \"update\"],\n mutationFn: projectService.repoUpdate,\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [\"env-repositories\"] });\n },\n });\n};\nexport const useUpdateTenantGroup = () => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"tenant-group-update\"],\n mutationFn: (payload: IUpdateTenantGroupPayload) =>\n projectService.updateTenantGroup(payload),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\"identifier\", \"tenant-group\"],\n });\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"projects\"] });\n },\n });\n};\n\nexport const useUpdateProject = () => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"project-update\"],\n mutationFn: (payload: IUpdateProjectPayload) =>\n projectService.updateProject(payload),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"project\"] });\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"projects\"] });\n },\n });\n};\n\nexport const useValidateCNameProject = (\n options: IValidateCnameProjectPayload,\n) => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"projects\", options],\n mutationFn: () => projectService.validateCNameProject(options),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\"identifier\", \"project\"],\n });\n },\n });\n};\n\nexport const useDisableProject = (options: { projectKey: string }) => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationKey: [\"identifier\", \"projects\", \"disable\"],\n mutationFn: () => projectService.disableProject(options),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\"identifier\", \"project\", options],\n });\n queryClient.invalidateQueries({ queryKey: [\"identifier\", \"projects\"] });\n },\n });\n};\n"]}
|