@elevasis/ui 2.0.1 → 2.0.3
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/auth/index.js +1 -2
- package/dist/charts/index.js +7 -9
- package/dist/{chunk-QTD5HPKD.js → chunk-35QO7M43.js} +1 -1
- package/dist/{chunk-QJ2S46NI.js → chunk-DT3QYZVU.js} +2 -2
- package/dist/{chunk-NEST7NA4.js → chunk-H762MTQ5.js} +30 -24
- package/dist/{chunk-YUAE4IVA.js → chunk-KFICYU6S.js} +1 -1
- package/dist/{chunk-RWQIFKMJ.js → chunk-MTJ43R2E.js} +10 -2
- package/dist/{chunk-CD6UPIXK.js → chunk-MVJ4TSSA.js} +20 -110
- package/dist/{chunk-VB4MVOPL.js → chunk-MZPVNRPL.js} +130 -27
- package/dist/{chunk-NNKKBSJN.js → chunk-NYBEU5TE.js} +1 -1
- package/dist/{chunk-2IJCM3VQ.js → chunk-OCP2MBTY.js} +134 -118
- package/dist/{chunk-YVDYRV4Q.js → chunk-OKKGD3S6.js} +3 -3
- package/dist/{chunk-N5BS2VIA.js → chunk-PQNEE57X.js} +6 -6
- package/dist/{chunk-7QNDXJQW.js → chunk-PRLXFMNP.js} +2 -2
- package/dist/{chunk-ZT754TNZ.js → chunk-QITPFGWC.js} +3 -3
- package/dist/{chunk-ZNG35YAN.js → chunk-QRHLV74B.js} +23 -18
- package/dist/{chunk-TXPUIHX2.js → chunk-RB34YOIX.js} +5 -5
- package/dist/{chunk-5COLSYBE.js → chunk-RX4UWZZR.js} +1 -1
- package/dist/{chunk-C27LLJM6.js → chunk-SMJLS23U.js} +2 -2
- package/dist/{chunk-P6EELWRV.js → chunk-TZOGB3X4.js} +2 -2
- package/dist/{chunk-MCA6LOGM.js → chunk-Y3D3WFJG.js} +54 -5
- package/dist/{chunk-YYBM5LNJ.js → chunk-YEX4MQSY.js} +1 -1
- package/dist/components/index.d.ts +18 -14
- package/dist/components/index.js +87 -263
- package/dist/features/auth/index.js +3 -4
- package/dist/features/dashboard/index.d.ts +1 -0
- package/dist/features/dashboard/index.js +15 -17
- package/dist/features/monitoring/index.css +127 -127
- package/dist/features/monitoring/index.d.ts +1 -0
- package/dist/features/monitoring/index.js +16 -18
- package/dist/features/operations/index.d.ts +2 -1
- package/dist/features/operations/index.js +18 -20
- package/dist/features/settings/index.d.ts +1 -0
- package/dist/features/settings/index.js +15 -17
- package/dist/hooks/index.css +127 -127
- package/dist/hooks/index.js +12 -9
- package/dist/hooks/published.css +127 -127
- package/dist/hooks/published.js +11 -8
- package/dist/index.css +118 -118
- package/dist/index.d.ts +14 -2
- package/dist/index.js +13 -12
- package/dist/layout/index.d.ts +20 -44
- package/dist/layout/index.js +6 -6
- package/dist/provider/index.css +127 -59
- package/dist/provider/index.d.ts +14 -2
- package/dist/provider/index.js +10 -6
- package/dist/provider/published.css +126 -0
- package/dist/provider/published.d.ts +14 -2
- package/dist/provider/published.js +8 -3
- package/dist/theme/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ALA56RGZ.js +0 -13
- package/dist/chunk-SZHARWKU.js +0 -15
package/dist/auth/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { AdminGuard, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck } from '../chunk-
|
|
2
|
-
export { useStableAccessToken } from '../chunk-ALA56RGZ.js';
|
|
1
|
+
export { AdminGuard, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-MTJ43R2E.js';
|
|
3
2
|
import '../chunk-TUXTSEAF.js';
|
|
4
3
|
import '../chunk-DD3CCMCZ.js';
|
|
5
4
|
import '../chunk-QEPXAWE2.js';
|
package/dist/charts/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-
|
|
2
|
-
import '../chunk-MCA6LOGM.js';
|
|
3
|
-
import '../chunk-3KMDHCAR.js';
|
|
4
|
-
import '../chunk-NNKKBSJN.js';
|
|
1
|
+
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-KFICYU6S.js';
|
|
5
2
|
import '../chunk-LXHZYSMQ.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-Y3D3WFJG.js';
|
|
4
|
+
import '../chunk-3KMDHCAR.js';
|
|
5
|
+
import '../chunk-NYBEU5TE.js';
|
|
8
6
|
import '../chunk-2IFYDILW.js';
|
|
9
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-ELJIFLCB.js';
|
|
8
|
+
import '../chunk-DT3QYZVU.js';
|
|
10
9
|
import '../chunk-IOKL7BKE.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-ALA56RGZ.js';
|
|
10
|
+
import '../chunk-MTJ43R2E.js';
|
|
13
11
|
import '../chunk-TUXTSEAF.js';
|
|
14
12
|
import '../chunk-DD3CCMCZ.js';
|
|
15
13
|
import '../chunk-QEPXAWE2.js';
|
|
@@ -18,6 +18,6 @@ var sidebarToggleIconSize = 20;
|
|
|
18
18
|
var sidebarSubLinkPaddingY = 6;
|
|
19
19
|
var sidebarSubLinkPaddingX = 10;
|
|
20
20
|
var sidebarGroupChevronSize = 14;
|
|
21
|
-
var
|
|
21
|
+
var subshellNavItemIconSize = 14;
|
|
22
22
|
|
|
23
|
-
export { sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding,
|
|
23
|
+
export { sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, topbarHeight };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
|
|
2
|
-
import { SubshellSidebarSection, SubshellLoader, PageContainer, CollapsibleSidebarGroup,
|
|
3
|
-
import { ResourceHealthPanel } from './chunk-
|
|
2
|
+
import { SubshellSidebarSection, SubshellLoader, PageContainer, CollapsibleSidebarGroup, SubshellNavItem } from './chunk-OCP2MBTY.js';
|
|
3
|
+
import { ResourceHealthPanel } from './chunk-OKKGD3S6.js';
|
|
4
4
|
import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
|
|
5
|
-
import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphFitViewHandler } from './chunk-
|
|
6
|
-
import { useCyberColors, CyberDonut } from './chunk-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { AppShellLoader } from './chunk-YYBM5LNJ.js';
|
|
11
|
-
import { useStatusFilter, useResourceSearch, useResourcesDomainFilters, filterByDomainFilters, useCommandViewDomainFilters } from './chunk-7QNDXJQW.js';
|
|
12
|
-
import { useCommandViewLayout, useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, usePaginationState, useResources, useRecentExecutionsByResource, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStore, useCommandViewStats, useCalibrationProjects, useCalibrationProject, useAllCalibrationProjects, useResourceExecutions, useCheckpointTasks, useCalibrationSSE, useCalibrationRunFull, useExecuteRun, useGradeRun, useCalibrationRuns, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, calibrationKeys, useDeleteProject, useCreateProject, useBulkDeleteExecutions } from './chunk-P6EELWRV.js';
|
|
5
|
+
import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphFitViewHandler } from './chunk-PQNEE57X.js';
|
|
6
|
+
import { useCyberColors, CyberDonut } from './chunk-KFICYU6S.js';
|
|
7
|
+
import { AppShellLoader } from './chunk-YEX4MQSY.js';
|
|
8
|
+
import { useStatusFilter, useResourceSearch, useResourcesDomainFilters, filterByDomainFilters, useCommandViewDomainFilters } from './chunk-PRLXFMNP.js';
|
|
9
|
+
import { useCommandViewLayout, useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, usePaginationState, useResources, useRecentExecutionsByResource, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStore, useCommandViewStats, useCalibrationProjects, useCalibrationProject, useAllCalibrationProjects, useResourceExecutions, useCheckpointTasks, useCalibrationSSE, useCalibrationRunFull, useExecuteRun, useGradeRun, useCalibrationRuns, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, calibrationKeys, useDeleteProject, useCreateProject, useBulkDeleteExecutions } from './chunk-TZOGB3X4.js';
|
|
13
10
|
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS, useGraphHighlighting, calculateGraphHeight } from './chunk-F6RBK7NJ.js';
|
|
14
11
|
import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-XA34RETF.js';
|
|
12
|
+
import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-MZPVNRPL.js';
|
|
13
|
+
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
14
|
+
import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, APIErrorAlert, EmptyState } from './chunk-Y3D3WFJG.js';
|
|
15
|
+
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
16
|
+
import { NavigationButton } from './chunk-NYBEU5TE.js';
|
|
15
17
|
import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-ELJIFLCB.js';
|
|
16
|
-
import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-VB4MVOPL.js';
|
|
17
|
-
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from './chunk-5COLSYBE.js';
|
|
18
18
|
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
19
|
-
import { topbarHeight } from './chunk-
|
|
19
|
+
import { topbarHeight } from './chunk-DT3QYZVU.js';
|
|
20
20
|
import { getResourceIcon, getResourceColor, getErrorInfo, formatErrorMessage, formatRelativeTime, DOMAIN_MAP, getNodeId, PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
|
|
21
21
|
import { useInitialization } from './chunk-TUXTSEAF.js';
|
|
22
22
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
23
23
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
24
24
|
import { Stack, Group, Text, Badge, ThemeIcon, Box, TextInput, Textarea, Radio, Checkbox, Select, NumberInput, Title, Alert, Button, ActionIcon, Collapse, Card, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, Menu, useMantineTheme, UnstyledButton, RangeSlider, Loader, Progress, Tabs, Pagination, Modal, LoadingOverlay, SegmentedControl, Switch, Timeline, ScrollArea, Table } from '@mantine/core';
|
|
25
|
-
import { IconBrain, IconFileText, IconDatabase, IconMessage, IconAlertCircle, IconCircleX, IconCircleCheck, IconBolt, IconHandClick, IconClock, IconWebhook, IconExternalLink, IconMail, IconSend, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCategory, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleDashed, IconPlus, IconAdjustments, IconChartBar, IconReportAnalytics, IconCoin, IconFlask, IconInfoCircle, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconHistory } from '@tabler/icons-react';
|
|
25
|
+
import { IconBrain, IconFileText, IconDatabase, IconMessage, IconAlertCircle, IconCircleX, IconCircleCheck, IconBolt, IconHandClick, IconClock, IconWebhook, IconExternalLink, IconMail, IconSend, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCategory, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleDashed, IconPlus, IconAdjustments, IconChartBar, IconReportAnalytics, IconCoin, IconBriefcase, IconFlask, IconInfoCircle, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconHistory } from '@tabler/icons-react';
|
|
26
26
|
import { useForm } from '@mantine/form';
|
|
27
27
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
28
28
|
import { memo, forwardRef, useMemo, useImperativeHandle, useState, useRef, useCallback, useEffect } from 'react';
|
|
@@ -4534,7 +4534,7 @@ function CommandViewSidebarContent({ timeRange }) {
|
|
|
4534
4534
|
if (!selectedNode || !selectedResourceId) return null;
|
|
4535
4535
|
if (selectedNode.type === "agent") return `/operations/resources/agent/${selectedResourceId}`;
|
|
4536
4536
|
if (selectedNode.type === "workflow") return `/operations/resources/workflow/${selectedResourceId}`;
|
|
4537
|
-
if (selectedNode.type === "human") return `/
|
|
4537
|
+
if (selectedNode.type === "human") return `/operations/command-queue?checkpoint=${selectedResourceId}`;
|
|
4538
4538
|
return null;
|
|
4539
4539
|
};
|
|
4540
4540
|
const resourceUrl = selectedNode?.type === "agent" ? `/operations/resources/agent/${selectedResourceId}` : `/operations/resources/workflow/${selectedResourceId}`;
|
|
@@ -4730,7 +4730,7 @@ function CommandViewSidebarContent({ timeRange }) {
|
|
|
4730
4730
|
padding: "xs",
|
|
4731
4731
|
withBorder: true,
|
|
4732
4732
|
component: "a",
|
|
4733
|
-
href: `/
|
|
4733
|
+
href: `/operations/command-queue?task=${task.id}`,
|
|
4734
4734
|
target: "_blank",
|
|
4735
4735
|
rel: "noopener noreferrer",
|
|
4736
4736
|
style: HOVER_CARD_STYLE,
|
|
@@ -5269,11 +5269,15 @@ function CalibrationSidebar({
|
|
|
5269
5269
|
overflow: "hidden"
|
|
5270
5270
|
},
|
|
5271
5271
|
children: [
|
|
5272
|
-
/* @__PURE__ */
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5272
|
+
/* @__PURE__ */ jsx(
|
|
5273
|
+
SubshellSidebarSection,
|
|
5274
|
+
{
|
|
5275
|
+
icon: IconBriefcase,
|
|
5276
|
+
label: "Projects",
|
|
5277
|
+
rightSection: /* @__PURE__ */ jsx(UnstyledButton, { title: "Refresh projects", onClick: handleRefresh, children: /* @__PURE__ */ jsx(IconRefresh, { size: 14, style: { opacity: 0.6 } }) })
|
|
5278
|
+
}
|
|
5279
|
+
),
|
|
5280
|
+
/* @__PURE__ */ jsx(ScrollArea, { style: { flex: 1, minHeight: 0 }, scrollbarSize: 8, children: isInitialLoading ? /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : projects && projects.length > 0 ? /* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", children: projects.map((project) => /* @__PURE__ */ jsx(
|
|
5277
5281
|
ProjectGroup,
|
|
5278
5282
|
{
|
|
5279
5283
|
project,
|
|
@@ -5285,7 +5289,7 @@ function CalibrationSidebar({
|
|
|
5285
5289
|
onRunClick
|
|
5286
5290
|
},
|
|
5287
5291
|
project.id
|
|
5288
|
-
)) }) : /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { padding:
|
|
5292
|
+
)) }) : /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { padding: theme.spacing.sm }, children: "No projects yet" }) })
|
|
5289
5293
|
]
|
|
5290
5294
|
}
|
|
5291
5295
|
);
|
|
@@ -5321,7 +5325,7 @@ function ProjectGroup({
|
|
|
5321
5325
|
);
|
|
5322
5326
|
}
|
|
5323
5327
|
function RunItem({ run, isActive, onRunClick }) {
|
|
5324
|
-
return /* @__PURE__ */ jsx(
|
|
5328
|
+
return /* @__PURE__ */ jsx(SubshellNavItem, { icon: IconPlayerPlay, label: run.name, isActive, onClick: () => onRunClick(run.id) });
|
|
5325
5329
|
}
|
|
5326
5330
|
function WorkflowExecutionPanel({
|
|
5327
5331
|
resourceId,
|
|
@@ -6652,7 +6656,7 @@ var operationsManifest = {
|
|
|
6652
6656
|
key: "operations",
|
|
6653
6657
|
label: "Operations",
|
|
6654
6658
|
sidebar: OperationsSidebar,
|
|
6655
|
-
subshellRoutes: ["/operations
|
|
6659
|
+
subshellRoutes: ["/operations"],
|
|
6656
6660
|
navEntry: {
|
|
6657
6661
|
label: "Operations",
|
|
6658
6662
|
icon: IconCode,
|
|
@@ -6663,6 +6667,8 @@ var operationsManifest = {
|
|
|
6663
6667
|
{ label: "Resources", link: "/operations/resources" },
|
|
6664
6668
|
{ label: "Command View", link: "/operations/command-view" },
|
|
6665
6669
|
{ label: "Command Queue", link: "/operations/command-queue" },
|
|
6670
|
+
{ label: "Calibration", link: "/operations/calibration" },
|
|
6671
|
+
{ label: "Sessions", link: "/operations/sessions" },
|
|
6666
6672
|
{ label: "Task Scheduler", link: "/operations/task-scheduler" }
|
|
6667
6673
|
]
|
|
6668
6674
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CardHeader, CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-MCA6LOGM.js';
|
|
2
1
|
import { getTimeRangeLabel, getTimeRangeDates, useErrorTrends, formatBucketTime } from './chunk-LXHZYSMQ.js';
|
|
2
|
+
import { CardHeader, CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-Y3D3WFJG.js';
|
|
3
3
|
import { useRef, useState, useLayoutEffect, useEffect, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
import { useComputedColorScheme, Group, Text, Box, Stack, Center, Loader, Paper, Button, NumberFormatter, Badge, Space, Tooltip as Tooltip$1, SimpleGrid, Alert, SegmentedControl } from '@mantine/core';
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { useInitialization } from './chunk-TUXTSEAF.js';
|
|
2
2
|
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
3
|
-
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { useRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import { useQueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { useNavigate, useLocation } from '@tanstack/react-router';
|
|
6
6
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
function useStableAccessToken() {
|
|
9
|
+
const { getAccessToken } = useAuthContext();
|
|
10
|
+
const getAccessTokenRef = useRef(getAccessToken);
|
|
11
|
+
getAccessTokenRef.current = getAccessToken;
|
|
12
|
+
return useCallback(() => {
|
|
13
|
+
return getAccessTokenRef.current();
|
|
14
|
+
}, []);
|
|
15
|
+
}
|
|
8
16
|
function useSessionCheck() {
|
|
9
17
|
const { user } = useAuthContext();
|
|
10
18
|
const queryClient = useQueryClient();
|
|
@@ -105,4 +113,4 @@ function AdminGuard({ children, redirectTo = "/", fallback = null }) {
|
|
|
105
113
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
106
114
|
}
|
|
107
115
|
|
|
108
|
-
export { AdminGuard, ProtectedRoute, useSessionCheck };
|
|
116
|
+
export { AdminGuard, ProtectedRoute, useSessionCheck, useStableAccessToken };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
2
2
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { AppShellLoader } from './chunk-YEX4MQSY.js';
|
|
4
|
+
import { useAvailablePresets } from './chunk-35QO7M43.js';
|
|
5
|
+
import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-PRLXFMNP.js';
|
|
6
|
+
import { useResources, showErrorNotification } from './chunk-TZOGB3X4.js';
|
|
7
|
+
import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-Y3D3WFJG.js';
|
|
8
8
|
import { formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-IOKL7BKE.js';
|
|
9
9
|
import { useInitialization } from './chunk-TUXTSEAF.js';
|
|
10
10
|
import { useElevasisServices } from './chunk-QEPXAWE2.js';
|
|
11
11
|
import { Table, Group, Text, Tooltip, ActionIcon, Stack, Title, Button, Select, TextInput, Alert, PasswordInput, Anchor, Paper, Card, Switch, Badge, Center, Loader, Box, Code, CopyButton, ThemeIcon, useMantineColorScheme, SimpleGrid, UnstyledButton, Divider, Textarea } from '@mantine/core';
|
|
12
|
-
import { IconSettings, IconKey, IconCalendar, IconPencil, IconTrash, IconAlertTriangle, IconInfoCircle, IconExclamationMark, IconPlus, IconAlertCircle, IconUsers, IconSearch, IconBuilding,
|
|
12
|
+
import { IconSettings, IconKey, IconCalendar, IconPencil, IconTrash, IconAlertTriangle, IconInfoCircle, IconExclamationMark, IconPlus, IconAlertCircle, IconUsers, IconSearch, IconBuilding, IconWebhook, IconCheck, IconCopy, IconUser, IconMail, IconRefresh, IconPalette, IconSun, IconEye, IconSparkles, IconTrendingUp, IconClock, IconPlayerPause, IconPlayerPlay, IconActivity, IconBrandDropbox, IconBrandGoogleDrive, IconPlug, IconMoon, IconDeviceDesktop } from '@tabler/icons-react';
|
|
13
13
|
import { z } from 'zod';
|
|
14
14
|
import { useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
15
15
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
16
|
import { useForm } from '@mantine/form';
|
|
17
|
-
import { notifications } from '@mantine/notifications';
|
|
18
17
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
18
|
+
import { notifications } from '@mantine/notifications';
|
|
19
19
|
import { create } from 'zustand';
|
|
20
20
|
|
|
21
21
|
// ../core/src/integrations/oauth/provider-registry.ts
|
|
@@ -546,9 +546,7 @@ function MembershipStatusBadge({ status, size = "sm", variant = "light" }) {
|
|
|
546
546
|
function OrganizationMembershipsList({
|
|
547
547
|
memberships,
|
|
548
548
|
loading,
|
|
549
|
-
error
|
|
550
|
-
onEditRole,
|
|
551
|
-
onLeaveOrganization
|
|
549
|
+
error
|
|
552
550
|
}) {
|
|
553
551
|
const [searchTerm, setSearchTerm] = useState("");
|
|
554
552
|
const [statusFilter, setStatusFilter] = useState("");
|
|
@@ -623,40 +621,7 @@ function OrganizationMembershipsList({
|
|
|
623
621
|
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Badge, { variant: "light", color: "blue", size: "sm", children: row.role }) }),
|
|
624
622
|
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(MembershipStatusBadge, { status: row.status }) }),
|
|
625
623
|
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: row.joinedAt.toLocaleDateString() }) }),
|
|
626
|
-
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */
|
|
627
|
-
row.canEdit && onEditRole && /* @__PURE__ */ jsx(
|
|
628
|
-
ActionIcon,
|
|
629
|
-
{
|
|
630
|
-
variant: "subtle",
|
|
631
|
-
size: "sm",
|
|
632
|
-
color: "blue",
|
|
633
|
-
onClick: () => onEditRole(row.id),
|
|
634
|
-
disabled: row.status !== "active",
|
|
635
|
-
children: /* @__PURE__ */ jsx(IconEdit, { size: 16 })
|
|
636
|
-
}
|
|
637
|
-
),
|
|
638
|
-
row.canRemove && onLeaveOrganization && row.status === "active" && /* @__PURE__ */ jsx(
|
|
639
|
-
ActionIcon,
|
|
640
|
-
{
|
|
641
|
-
variant: "subtle",
|
|
642
|
-
size: "sm",
|
|
643
|
-
color: "red",
|
|
644
|
-
onClick: () => onLeaveOrganization(row.id),
|
|
645
|
-
children: /* @__PURE__ */ jsx(IconUserX, { size: 16 })
|
|
646
|
-
}
|
|
647
|
-
),
|
|
648
|
-
row.status === "inactive" && /* @__PURE__ */ jsx(
|
|
649
|
-
ActionIcon,
|
|
650
|
-
{
|
|
651
|
-
variant: "subtle",
|
|
652
|
-
size: "sm",
|
|
653
|
-
color: "green",
|
|
654
|
-
disabled: true,
|
|
655
|
-
title: "Contact admin to reactivate",
|
|
656
|
-
children: /* @__PURE__ */ jsx(IconUserCheck, { size: 16 })
|
|
657
|
-
}
|
|
658
|
-
)
|
|
659
|
-
] }) })
|
|
624
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Group, { gap: "xs", children: /* @__PURE__ */ jsx(ActionIcon, { variant: "light", size: "sm", color: "gray", title: "Configure member access", children: /* @__PURE__ */ jsx(IconSettings, { size: 14 }) }) }) })
|
|
660
625
|
] }, row.id)) })
|
|
661
626
|
] }) })
|
|
662
627
|
] })
|
|
@@ -758,20 +723,6 @@ function AccountSettings({
|
|
|
758
723
|
}
|
|
759
724
|
});
|
|
760
725
|
const { data: memberships = [], isLoading, error } = useUserMemberships(user?.id || "");
|
|
761
|
-
const handleEditRole = (_membershipId) => {
|
|
762
|
-
notifications.show({
|
|
763
|
-
title: "Edit Role",
|
|
764
|
-
message: "Role editing functionality coming soon",
|
|
765
|
-
color: "blue"
|
|
766
|
-
});
|
|
767
|
-
};
|
|
768
|
-
const handleLeaveOrganization = (_membershipId) => {
|
|
769
|
-
notifications.show({
|
|
770
|
-
title: "Leave Organization",
|
|
771
|
-
message: "Leave organization functionality coming soon",
|
|
772
|
-
color: "orange"
|
|
773
|
-
});
|
|
774
|
-
};
|
|
775
726
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
776
727
|
/* @__PURE__ */ jsx(PageTitleCaption, { title: "Account Settings", caption: "Manage your account and organization memberships" }),
|
|
777
728
|
user && /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
@@ -832,9 +783,7 @@ function AccountSettings({
|
|
|
832
783
|
{
|
|
833
784
|
memberships,
|
|
834
785
|
loading: isLoading,
|
|
835
|
-
error
|
|
836
|
-
onEditRole: handleEditRole,
|
|
837
|
-
onLeaveOrganization: handleLeaveOrganization
|
|
786
|
+
error
|
|
838
787
|
}
|
|
839
788
|
),
|
|
840
789
|
error && /* @__PURE__ */ jsxs(Alert, { icon: /* @__PURE__ */ jsx(IconAlertCircle, { size: 16 }), title: "Error", color: "red", children: [
|
|
@@ -1995,21 +1944,9 @@ function EditCredentialModal({ apiUrl, credential, onClose }) {
|
|
|
1995
1944
|
] }) });
|
|
1996
1945
|
}
|
|
1997
1946
|
var PROVIDER_ICONS = {
|
|
1998
|
-
slack: IconBrandSlack,
|
|
1999
|
-
attio: IconPlug,
|
|
2000
|
-
// Attio doesn't have a brand icon
|
|
2001
1947
|
"google-sheets": IconBrandGoogleDrive,
|
|
2002
|
-
gmail: IconBrandGmail,
|
|
2003
|
-
github: IconBrandGithub,
|
|
2004
|
-
linear: IconRocket,
|
|
2005
1948
|
dropbox: IconBrandDropbox
|
|
2006
1949
|
};
|
|
2007
|
-
var MOCK_PROVIDERS = [
|
|
2008
|
-
{ id: "google-sheets", name: "Google Sheets", available: false },
|
|
2009
|
-
{ id: "gmail", name: "Gmail", available: false },
|
|
2010
|
-
{ id: "github", name: "GitHub", available: false },
|
|
2011
|
-
{ id: "linear", name: "Linear", available: false }
|
|
2012
|
-
];
|
|
2013
1950
|
function OAuthIntegrationsCard({ apiUrl }) {
|
|
2014
1951
|
const [selectedProviderId, setSelectedProviderId] = useState(null);
|
|
2015
1952
|
const [modalOpened, setModalOpened] = useState(false);
|
|
@@ -2030,11 +1967,7 @@ function OAuthIntegrationsCard({ apiUrl }) {
|
|
|
2030
1967
|
setSelectedProviderId(providerId);
|
|
2031
1968
|
setModalOpened(true);
|
|
2032
1969
|
};
|
|
2033
|
-
const
|
|
2034
|
-
...p,
|
|
2035
|
-
available: true
|
|
2036
|
-
}));
|
|
2037
|
-
const allProviders = [...realProviders, ...MOCK_PROVIDERS];
|
|
1970
|
+
const providers = Object.values(OAUTH_PROVIDERS);
|
|
2038
1971
|
const selectedProvider = selectedProviderId ? OAUTH_PROVIDERS[selectedProviderId] : null;
|
|
2039
1972
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2040
1973
|
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
@@ -2042,38 +1975,15 @@ function OAuthIntegrationsCard({ apiUrl }) {
|
|
|
2042
1975
|
/* @__PURE__ */ jsx(Title, { order: 3, children: "OAuth Integrations" }),
|
|
2043
1976
|
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", mt: 4, children: "Connect third-party services using OAuth 2.0" })
|
|
2044
1977
|
] }) }),
|
|
2045
|
-
/* @__PURE__ */ jsx(SimpleGrid, { cols: { base: 1, sm: 2, md: 3 }, children:
|
|
1978
|
+
/* @__PURE__ */ jsx(SimpleGrid, { cols: { base: 1, sm: 2, md: 3 }, children: providers.map((provider) => {
|
|
2046
1979
|
const Icon = PROVIDER_ICONS[provider.id] || IconPlug;
|
|
2047
|
-
return /* @__PURE__ */ jsx(
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
2055
|
-
/* @__PURE__ */ jsx(Group, { justify: "space-between", align: "flex-start", children: /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
|
|
2056
|
-
/* @__PURE__ */ jsx(ThemeIcon, { size: "lg", variant: "light", color: provider.available ? "blue" : "gray", children: /* @__PURE__ */ jsx(Icon, { size: 20 }) }),
|
|
2057
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
2058
|
-
/* @__PURE__ */ jsx(Text, { fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: provider.name }),
|
|
2059
|
-
!provider.available && /* @__PURE__ */ jsx(Badge, { color: "gray", variant: "light", size: "xs", mt: 4, children: "Coming Soon" })
|
|
2060
|
-
] })
|
|
2061
|
-
] }) }),
|
|
2062
|
-
/* @__PURE__ */ jsx(
|
|
2063
|
-
Button,
|
|
2064
|
-
{
|
|
2065
|
-
variant: "filled",
|
|
2066
|
-
size: "sm",
|
|
2067
|
-
onClick: () => handleOpenModal(provider.id),
|
|
2068
|
-
disabled: !provider.available,
|
|
2069
|
-
fullWidth: true,
|
|
2070
|
-
children: "Connect"
|
|
2071
|
-
}
|
|
2072
|
-
)
|
|
2073
|
-
] })
|
|
2074
|
-
},
|
|
2075
|
-
provider.id
|
|
2076
|
-
);
|
|
1980
|
+
return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1981
|
+
/* @__PURE__ */ jsx(Group, { justify: "space-between", align: "flex-start", children: /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
|
|
1982
|
+
/* @__PURE__ */ jsx(ThemeIcon, { size: "lg", variant: "light", color: "blue", children: /* @__PURE__ */ jsx(Icon, { size: 20 }) }),
|
|
1983
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Text, { fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: provider.name }) })
|
|
1984
|
+
] }) }),
|
|
1985
|
+
/* @__PURE__ */ jsx(Button, { variant: "filled", size: "sm", onClick: () => handleOpenModal(provider.id), fullWidth: true, children: "Connect" })
|
|
1986
|
+
] }) }, provider.id);
|
|
2077
1987
|
}) })
|
|
2078
1988
|
] }) }),
|
|
2079
1989
|
/* @__PURE__ */ jsx(
|
|
@@ -2098,7 +2008,7 @@ var settingsManifest = {
|
|
|
2098
2008
|
navEntry: {
|
|
2099
2009
|
label: "Settings",
|
|
2100
2010
|
icon: IconSettings,
|
|
2101
|
-
link: "/settings",
|
|
2011
|
+
link: "/settings/account",
|
|
2102
2012
|
dataOnboardingTourId: "settings-gear",
|
|
2103
2013
|
links: [
|
|
2104
2014
|
{ label: "Account", link: "/settings/account" },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer } from './chunk-
|
|
1
|
+
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer } from './chunk-RX4UWZZR.js';
|
|
2
|
+
import { FeatureUnavailableState } from './chunk-Y3D3WFJG.js';
|
|
2
3
|
import { ApiClientProvider, useApiClient } from './chunk-NVOCKXUQ.js';
|
|
3
4
|
import { OrganizationProvider } from './chunk-W4VYXIN7.js';
|
|
4
5
|
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-IOKL7BKE.js';
|
|
@@ -185,19 +186,118 @@ function useOptionalElevasisFeatures() {
|
|
|
185
186
|
function getEnabledFeatures(features, hasFeature) {
|
|
186
187
|
return features.filter((feature) => hasFeature(feature.key));
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
-
|
|
189
|
+
function normalizeRoutePath(path) {
|
|
190
|
+
const trimmedPath = path.trim();
|
|
191
|
+
if (!trimmedPath || trimmedPath === "/") {
|
|
192
|
+
return "/";
|
|
193
|
+
}
|
|
194
|
+
return trimmedPath.replace(/\/+$/, "") || "/";
|
|
195
|
+
}
|
|
196
|
+
function isRouteMatch(currentPath, route) {
|
|
197
|
+
const normalizedCurrentPath = normalizeRoutePath(currentPath);
|
|
198
|
+
const normalizedRoute = normalizeRoutePath(route);
|
|
199
|
+
return normalizedCurrentPath === normalizedRoute || normalizedCurrentPath.startsWith(`${normalizedRoute}/`);
|
|
200
|
+
}
|
|
201
|
+
function filterNavLinks(links, disabledSubsectionPaths, isFeatureEnabled) {
|
|
202
|
+
return links.flatMap((link) => {
|
|
203
|
+
if (link.featureKey && !isFeatureEnabled(link.featureKey)) {
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
if (disabledSubsectionPaths.some((disabledPath) => isRouteMatch(link.link, disabledPath))) {
|
|
207
|
+
return [];
|
|
208
|
+
}
|
|
209
|
+
const nestedLinks = link.links?.length ? filterNavLinks(link.links, disabledSubsectionPaths, isFeatureEnabled) : void 0;
|
|
210
|
+
return [
|
|
211
|
+
{
|
|
212
|
+
...link,
|
|
213
|
+
links: nestedLinks
|
|
214
|
+
}
|
|
215
|
+
];
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function getNavItems(features, disabledSubsectionPaths, isFeatureEnabled) {
|
|
219
|
+
return features.flatMap((feature) => {
|
|
220
|
+
if (!feature.navEntry) {
|
|
221
|
+
return [];
|
|
222
|
+
}
|
|
223
|
+
const links = feature.navEntry.links?.length ? filterNavLinks(feature.navEntry.links, disabledSubsectionPaths, isFeatureEnabled) : void 0;
|
|
224
|
+
return [
|
|
225
|
+
{
|
|
226
|
+
...feature.navEntry,
|
|
227
|
+
links
|
|
228
|
+
}
|
|
229
|
+
];
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function findMatchingNavLink(links, currentPath) {
|
|
233
|
+
for (const link of links) {
|
|
234
|
+
if (link.links?.length) {
|
|
235
|
+
const nestedLink = findMatchingNavLink(link.links, currentPath);
|
|
236
|
+
if (nestedLink) {
|
|
237
|
+
return nestedLink;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (isRouteMatch(currentPath, link.link)) {
|
|
241
|
+
return link;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
function isHiddenNavLink(link, disabledSubsectionPaths, isFeatureEnabled) {
|
|
247
|
+
if (link.featureKey && !isFeatureEnabled(link.featureKey)) {
|
|
248
|
+
return true;
|
|
249
|
+
}
|
|
250
|
+
return disabledSubsectionPaths.some((disabledPath) => isRouteMatch(link.link, disabledPath));
|
|
251
|
+
}
|
|
252
|
+
function resolveNavRoute(features, currentPath, disabledSubsectionPaths, isFeatureEnabled) {
|
|
253
|
+
for (const feature of features) {
|
|
254
|
+
const navEntry = feature.navEntry;
|
|
255
|
+
const matchesSubshell = feature.subshellRoutes?.some((route) => isRouteMatch(currentPath, route)) ?? false;
|
|
256
|
+
const matchesEntryLink = navEntry?.link ? isRouteMatch(currentPath, navEntry.link) : false;
|
|
257
|
+
const matchedLink = navEntry?.links?.length ? findMatchingNavLink(navEntry.links, currentPath) : null;
|
|
258
|
+
if (!matchesSubshell && !matchesEntryLink && !matchedLink) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (matchedLink && isHiddenNavLink(matchedLink, disabledSubsectionPaths, isFeatureEnabled)) {
|
|
262
|
+
return {
|
|
263
|
+
state: "disabled",
|
|
264
|
+
path: currentPath,
|
|
265
|
+
feature,
|
|
266
|
+
navEntry,
|
|
267
|
+
navLink: matchedLink
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
return {
|
|
271
|
+
state: "enabled",
|
|
272
|
+
path: currentPath,
|
|
273
|
+
feature,
|
|
274
|
+
navEntry,
|
|
275
|
+
navLink: matchedLink ?? void 0
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
state: "missing",
|
|
280
|
+
path: currentPath
|
|
281
|
+
};
|
|
190
282
|
}
|
|
191
283
|
function ElevasisFeaturesProvider({
|
|
192
284
|
features,
|
|
193
285
|
timeRange,
|
|
194
286
|
operationsApiUrl,
|
|
195
287
|
operationsSSEManager,
|
|
288
|
+
disabledSubsectionPaths = [],
|
|
196
289
|
children
|
|
197
290
|
}) {
|
|
198
291
|
const { hasFeature } = useFeatureAccess();
|
|
292
|
+
const normalizedDisabledSubsectionPaths = useMemo(
|
|
293
|
+
() => disabledSubsectionPaths.map((path) => normalizeRoutePath(path)),
|
|
294
|
+
[disabledSubsectionPaths]
|
|
295
|
+
);
|
|
199
296
|
const enabledFeatures = useMemo(() => getEnabledFeatures(features, hasFeature), [features, hasFeature]);
|
|
200
|
-
const navItems = useMemo(
|
|
297
|
+
const navItems = useMemo(
|
|
298
|
+
() => getNavItems(enabledFeatures, normalizedDisabledSubsectionPaths, hasFeature),
|
|
299
|
+
[enabledFeatures, normalizedDisabledSubsectionPaths, hasFeature]
|
|
300
|
+
);
|
|
201
301
|
const getFeature = useCallback(
|
|
202
302
|
(key) => features.find((feature) => feature.key === key),
|
|
203
303
|
[features]
|
|
@@ -206,6 +306,10 @@ function ElevasisFeaturesProvider({
|
|
|
206
306
|
(key) => enabledFeatures.some((feature) => feature.key === key),
|
|
207
307
|
[enabledFeatures]
|
|
208
308
|
);
|
|
309
|
+
const resolveNavRouteByPath = useCallback(
|
|
310
|
+
(path) => resolveNavRoute(enabledFeatures, path, normalizedDisabledSubsectionPaths, isFeatureEnabled),
|
|
311
|
+
[enabledFeatures, normalizedDisabledSubsectionPaths, isFeatureEnabled]
|
|
312
|
+
);
|
|
209
313
|
const value = useMemo(
|
|
210
314
|
() => ({
|
|
211
315
|
navItems,
|
|
@@ -214,38 +318,37 @@ function ElevasisFeaturesProvider({
|
|
|
214
318
|
timeRange,
|
|
215
319
|
operationsApiUrl,
|
|
216
320
|
operationsSSEManager,
|
|
321
|
+
disabledSubsectionPaths: normalizedDisabledSubsectionPaths,
|
|
217
322
|
isFeatureEnabled,
|
|
218
|
-
getFeature
|
|
323
|
+
getFeature,
|
|
324
|
+
resolveNavRoute: resolveNavRouteByPath
|
|
219
325
|
}),
|
|
220
|
-
[
|
|
326
|
+
[
|
|
327
|
+
navItems,
|
|
328
|
+
enabledFeatures,
|
|
329
|
+
features,
|
|
330
|
+
timeRange,
|
|
331
|
+
operationsApiUrl,
|
|
332
|
+
operationsSSEManager,
|
|
333
|
+
normalizedDisabledSubsectionPaths,
|
|
334
|
+
isFeatureEnabled,
|
|
335
|
+
getFeature,
|
|
336
|
+
resolveNavRouteByPath
|
|
337
|
+
]
|
|
221
338
|
);
|
|
222
339
|
return /* @__PURE__ */ jsx(ElevasisFeaturesContext.Provider, { value, children });
|
|
223
340
|
}
|
|
224
|
-
function isRouteMatch(currentPath, route) {
|
|
225
|
-
return currentPath.startsWith(route);
|
|
226
|
-
}
|
|
227
|
-
function resolveFeatureShellFeature(features, currentPath) {
|
|
228
|
-
for (const feature of features) {
|
|
229
|
-
if (!feature.sidebar || !feature.subshellRoutes?.length) {
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
232
|
-
if (feature.subshellRoutes.some((route) => isRouteMatch(currentPath, route))) {
|
|
233
|
-
return feature;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return null;
|
|
237
|
-
}
|
|
238
341
|
function FeatureShell({ children }) {
|
|
239
|
-
const {
|
|
342
|
+
const { resolveNavRoute: resolveNavRoute2 } = useElevasisFeatures();
|
|
240
343
|
const { currentPath } = useRouterContext();
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
if (!
|
|
344
|
+
const routeResolution = resolveNavRoute2(currentPath);
|
|
345
|
+
if (routeResolution.state === "disabled") {
|
|
346
|
+
return /* @__PURE__ */ jsx(FeatureUnavailableState, { path: currentPath });
|
|
347
|
+
}
|
|
348
|
+
if (routeResolution.state !== "enabled" || !routeResolution.feature?.sidebar) {
|
|
246
349
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
247
350
|
}
|
|
248
|
-
const SidebarComponent =
|
|
351
|
+
const SidebarComponent = routeResolution.feature.sidebar;
|
|
249
352
|
return /* @__PURE__ */ jsxs(SubshellContainer, { children: [
|
|
250
353
|
/* @__PURE__ */ jsx(SubshellSidebar, { width: 250, children: /* @__PURE__ */ jsx(SidebarComponent, {}) }),
|
|
251
354
|
/* @__PURE__ */ jsx(SubshellRightSideContainer, { children })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sidebarItemPadding, sidebarItemHeight, sidebarIconSize, sidebarIconStroke, sidebarIconInnerSize } from './chunk-
|
|
1
|
+
import { sidebarItemPadding, sidebarItemHeight, sidebarIconSize, sidebarIconStroke, sidebarIconInnerSize } from './chunk-DT3QYZVU.js';
|
|
2
2
|
import { UnstyledButton, Group, Box, ThemeIcon } from '@mantine/core';
|
|
3
3
|
import { IconChevronRight } from '@tabler/icons-react';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|