@elevasis/ui 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/index.js +2 -2
- package/dist/{chunk-AWT255UH.js → chunk-2IJCM3VQ.js} +37 -37
- package/dist/chunk-5COLSYBE.js +199 -0
- package/dist/{chunk-RMPXGBNI.js → chunk-5JSR6TL5.js} +2 -2
- package/dist/chunk-BAGYETKM.js +635 -0
- package/dist/{chunk-L3GVDMCA.js → chunk-C27LLJM6.js} +3 -195
- package/dist/{chunk-O4UB5DQQ.js → chunk-F2J7675J.js} +1 -1
- package/dist/chunk-ITCEULI5.js +238 -0
- package/dist/{chunk-4WKWLFBZ.js → chunk-P5EWG45B.js} +1 -1
- package/dist/{chunk-BS4J2LAW.js → chunk-QTD5HPKD.js} +1 -1
- package/dist/{chunk-ZVJKIJFG.js → chunk-RCQPWA5X.js} +13 -42
- package/dist/chunk-TLAIQC7B.js +6382 -0
- package/dist/{chunk-FEZZ3IDU.js → chunk-TXPUIHX2.js} +10 -10
- package/dist/{chunk-L4XXM55J.js → chunk-W4VYXIN7.js} +142 -3
- package/dist/chunk-WJ7W7JU4.js +2115 -0
- package/dist/{chunk-YNGQ7U5H.js → chunk-WLNEJ6JJ.js} +2 -2
- package/dist/{chunk-4INR75ZS.js → chunk-Y2SYGFRF.js} +589 -65
- package/dist/components/index.d.ts +333 -73
- package/dist/components/index.js +838 -686
- package/dist/features/auth/index.d.ts +125 -0
- package/dist/features/auth/index.js +2 -2
- package/dist/features/dashboard/index.d.ts +28 -2
- package/dist/features/dashboard/index.js +21 -635
- package/dist/features/monitoring/index.d.ts +28 -1
- package/dist/features/monitoring/index.js +19 -529
- package/dist/features/operations/index.d.ts +51 -8
- package/dist/features/operations/index.js +25 -3760
- package/dist/features/settings/index.d.ts +153 -1
- package/dist/features/settings/index.js +19 -1438
- package/dist/hooks/index.d.ts +262 -25
- package/dist/hooks/index.js +12 -8
- package/dist/hooks/published.d.ts +137 -25
- package/dist/hooks/published.js +11 -7
- package/dist/index.d.ts +310 -28
- package/dist/index.js +12 -11
- package/dist/initialization/index.d.ts +125 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +6 -5
- package/dist/organization/index.js +1 -2
- package/dist/profile/index.d.ts +125 -0
- package/dist/provider/index.d.ts +48 -3
- package/dist/provider/index.js +10 -4
- package/dist/provider/published.d.ts +48 -3
- package/dist/provider/published.js +8 -2
- package/dist/supabase/index.d.ts +242 -0
- package/dist/theme/index.js +2 -2
- package/dist/types/index.d.ts +126 -1
- package/package.json +1 -1
- package/dist/chunk-LR4WVA7W.js +0 -682
- package/dist/chunk-R7WLWGPO.js +0 -126
- package/dist/chunk-TCKIAHDC.js +0 -2626
- package/dist/chunk-V7XHGJQZ.js +0 -145
- package/dist/{chunk-WWEMNIHW.js → chunk-YYBM5LNJ.js} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NavigationButton } from './chunk-NNKKBSJN.js';
|
|
2
|
-
import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding, sidebarBottomSectionHeight } from './chunk-QJ2S46NI.js';
|
|
3
2
|
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
3
|
+
import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding } from './chunk-QJ2S46NI.js';
|
|
4
4
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { createContext, memo, useEffect, createElement, useContext, useRef, useLayoutEffect, useState } from 'react';
|
|
@@ -389,6 +389,7 @@ var SubLinkItem = ({ linkItem, currentPath }) => {
|
|
|
389
389
|
{
|
|
390
390
|
to: linkItem.link,
|
|
391
391
|
onClick: linkItem.onClick,
|
|
392
|
+
"data-onboarding-tour-id": linkItem.dataOnboardingTourId,
|
|
392
393
|
style: {
|
|
393
394
|
display: "block",
|
|
394
395
|
textDecoration: "none",
|
|
@@ -956,199 +957,6 @@ var Sidebar = memo(function Sidebar2({
|
|
|
956
957
|
/* @__PURE__ */ jsx(SidebarBottomSection, { user, onLogout, onAccountClick })
|
|
957
958
|
] });
|
|
958
959
|
});
|
|
959
|
-
var SubshellContainer = ({ children, className }) => {
|
|
960
|
-
return /* @__PURE__ */ jsx(
|
|
961
|
-
"div",
|
|
962
|
-
{
|
|
963
|
-
className,
|
|
964
|
-
style: {
|
|
965
|
-
display: "flex",
|
|
966
|
-
height: "100%",
|
|
967
|
-
width: "100%",
|
|
968
|
-
position: "relative"
|
|
969
|
-
},
|
|
970
|
-
children
|
|
971
|
-
}
|
|
972
|
-
);
|
|
973
|
-
};
|
|
974
|
-
var SubshellRightSideContainer = ({ children, className }) => {
|
|
975
|
-
return /* @__PURE__ */ jsx(
|
|
976
|
-
"div",
|
|
977
|
-
{
|
|
978
|
-
className,
|
|
979
|
-
style: {
|
|
980
|
-
flex: 1,
|
|
981
|
-
minWidth: 0,
|
|
982
|
-
display: "flex",
|
|
983
|
-
flexDirection: "column",
|
|
984
|
-
overflow: "hidden"
|
|
985
|
-
},
|
|
986
|
-
children
|
|
987
|
-
}
|
|
988
|
-
);
|
|
989
|
-
};
|
|
990
|
-
var mdSpacing = 16;
|
|
991
|
-
var SubshellContentContainer = ({ children, className }) => {
|
|
992
|
-
return /* @__PURE__ */ jsx(
|
|
993
|
-
"div",
|
|
994
|
-
{
|
|
995
|
-
className,
|
|
996
|
-
style: {
|
|
997
|
-
display: "flex",
|
|
998
|
-
flexDirection: "column",
|
|
999
|
-
flex: 1,
|
|
1000
|
-
overflowX: "clip",
|
|
1001
|
-
overflowY: "auto",
|
|
1002
|
-
minWidth: 0,
|
|
1003
|
-
minHeight: 0,
|
|
1004
|
-
padding: "var(--mantine-spacing-md)",
|
|
1005
|
-
paddingTop: `${topbarHeight + mdSpacing}px`
|
|
1006
|
-
},
|
|
1007
|
-
children
|
|
1008
|
-
}
|
|
1009
|
-
);
|
|
1010
|
-
};
|
|
1011
|
-
var SubshellSidebar = ({
|
|
1012
|
-
children,
|
|
1013
|
-
className,
|
|
1014
|
-
width,
|
|
1015
|
-
collapsible = true,
|
|
1016
|
-
defaultOpen = true
|
|
1017
|
-
}) => {
|
|
1018
|
-
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
1019
|
-
const effectiveWidth = collapsible && !isOpen ? 0 : width;
|
|
1020
|
-
if (!collapsible) {
|
|
1021
|
-
return /* @__PURE__ */ jsx(
|
|
1022
|
-
"aside",
|
|
1023
|
-
{
|
|
1024
|
-
className,
|
|
1025
|
-
style: {
|
|
1026
|
-
width: `${width}px`,
|
|
1027
|
-
flexShrink: 0,
|
|
1028
|
-
display: "flex",
|
|
1029
|
-
flexDirection: "column",
|
|
1030
|
-
backgroundColor: "color-mix(in srgb, var(--glass-background) 80%, transparent)",
|
|
1031
|
-
backdropFilter: "var(--glass-blur)",
|
|
1032
|
-
WebkitBackdropFilter: "var(--glass-blur)",
|
|
1033
|
-
borderRight: "1px solid var(--color-border)",
|
|
1034
|
-
boxShadow: "var(--card-shadow)",
|
|
1035
|
-
clipPath: "inset(-100px -100px -100px 0)",
|
|
1036
|
-
minHeight: `calc(100vh - ${topbarHeight}px)`,
|
|
1037
|
-
marginTop: `${topbarHeight}px`,
|
|
1038
|
-
fontFamily: "var(--elevasis-font-family-subtitle)"
|
|
1039
|
-
},
|
|
1040
|
-
children
|
|
1041
|
-
}
|
|
1042
|
-
);
|
|
1043
|
-
}
|
|
1044
|
-
return /* @__PURE__ */ jsxs(
|
|
1045
|
-
"div",
|
|
1046
|
-
{
|
|
1047
|
-
style: {
|
|
1048
|
-
position: "relative",
|
|
1049
|
-
flexShrink: 0,
|
|
1050
|
-
marginTop: `${topbarHeight}px`,
|
|
1051
|
-
minHeight: `calc(100vh - ${topbarHeight}px)`
|
|
1052
|
-
},
|
|
1053
|
-
children: [
|
|
1054
|
-
/* @__PURE__ */ jsx(
|
|
1055
|
-
"aside",
|
|
1056
|
-
{
|
|
1057
|
-
className,
|
|
1058
|
-
style: {
|
|
1059
|
-
width: `${effectiveWidth}px`,
|
|
1060
|
-
flexShrink: 0,
|
|
1061
|
-
display: "flex",
|
|
1062
|
-
flexDirection: "column",
|
|
1063
|
-
backgroundColor: "color-mix(in srgb, var(--glass-background) 80%, transparent)",
|
|
1064
|
-
backdropFilter: "var(--glass-blur)",
|
|
1065
|
-
WebkitBackdropFilter: "var(--glass-blur)",
|
|
1066
|
-
borderRight: isOpen ? "1px solid var(--color-border)" : "none",
|
|
1067
|
-
boxShadow: isOpen ? "var(--card-shadow)" : "none",
|
|
1068
|
-
clipPath: isOpen ? "inset(-100px -100px -100px 0)" : "none",
|
|
1069
|
-
height: "100%",
|
|
1070
|
-
fontFamily: "var(--elevasis-font-family-subtitle)",
|
|
1071
|
-
overflow: "hidden",
|
|
1072
|
-
transition: `width ${sidebarTransitionDuration}ms var(--easing)`
|
|
1073
|
-
},
|
|
1074
|
-
children: /* @__PURE__ */ jsx(
|
|
1075
|
-
"div",
|
|
1076
|
-
{
|
|
1077
|
-
style: {
|
|
1078
|
-
width: `${width}px`,
|
|
1079
|
-
flexShrink: 0,
|
|
1080
|
-
display: "flex",
|
|
1081
|
-
flexDirection: "column",
|
|
1082
|
-
opacity: isOpen ? 1 : 0,
|
|
1083
|
-
transition: `opacity var(--duration-fast) var(--easing)`
|
|
1084
|
-
},
|
|
1085
|
-
children
|
|
1086
|
-
}
|
|
1087
|
-
)
|
|
1088
|
-
}
|
|
1089
|
-
),
|
|
1090
|
-
/* @__PURE__ */ jsx(
|
|
1091
|
-
"button",
|
|
1092
|
-
{
|
|
1093
|
-
onClick: () => setIsOpen((prev) => !prev),
|
|
1094
|
-
style: {
|
|
1095
|
-
position: "absolute",
|
|
1096
|
-
right: 0,
|
|
1097
|
-
bottom: 0,
|
|
1098
|
-
transform: "translateX(100%)",
|
|
1099
|
-
width: "20px",
|
|
1100
|
-
// Match the live height of the outer Sidebar's bottom profile section.
|
|
1101
|
-
// SidebarBottomSection publishes --elevasis-sidebar-bottom-section-height
|
|
1102
|
-
// via ResizeObserver so this follows its actual height through
|
|
1103
|
-
// collapse/expand transitions. Falls back to the expanded-state
|
|
1104
|
-
// constant when rendered outside a Sidebar layout.
|
|
1105
|
-
height: `var(--elevasis-sidebar-bottom-section-height, ${sidebarBottomSectionHeight}px)`,
|
|
1106
|
-
display: "flex",
|
|
1107
|
-
alignItems: "center",
|
|
1108
|
-
justifyContent: "center",
|
|
1109
|
-
backgroundColor: "color-mix(in srgb, var(--glass-background) 80%, transparent)",
|
|
1110
|
-
backdropFilter: "var(--glass-blur)",
|
|
1111
|
-
WebkitBackdropFilter: "var(--glass-blur)",
|
|
1112
|
-
border: "1px solid var(--color-border)",
|
|
1113
|
-
borderLeft: "none",
|
|
1114
|
-
borderBottom: "none",
|
|
1115
|
-
borderRadius: "0 4px 0 0",
|
|
1116
|
-
cursor: "pointer",
|
|
1117
|
-
color: "var(--color-text-subtle)",
|
|
1118
|
-
padding: 0,
|
|
1119
|
-
zIndex: 10,
|
|
1120
|
-
transition: `color var(--duration-fast) var(--easing)`
|
|
1121
|
-
},
|
|
1122
|
-
"aria-label": isOpen ? "Collapse sidebar" : "Expand sidebar",
|
|
1123
|
-
children: /* @__PURE__ */ jsx(
|
|
1124
|
-
"svg",
|
|
1125
|
-
{
|
|
1126
|
-
width: "6",
|
|
1127
|
-
height: "10",
|
|
1128
|
-
viewBox: "0 0 8 12",
|
|
1129
|
-
fill: "none",
|
|
1130
|
-
style: {
|
|
1131
|
-
transform: isOpen ? void 0 : "rotate(180deg)",
|
|
1132
|
-
transition: `transform var(--duration-fast) var(--easing)`
|
|
1133
|
-
},
|
|
1134
|
-
children: /* @__PURE__ */ jsx(
|
|
1135
|
-
"path",
|
|
1136
|
-
{
|
|
1137
|
-
d: "M6 1L1 6L6 11",
|
|
1138
|
-
stroke: "currentColor",
|
|
1139
|
-
strokeWidth: "1.5",
|
|
1140
|
-
strokeLinecap: "round",
|
|
1141
|
-
strokeLinejoin: "round"
|
|
1142
|
-
}
|
|
1143
|
-
)
|
|
1144
|
-
}
|
|
1145
|
-
)
|
|
1146
|
-
}
|
|
1147
|
-
)
|
|
1148
|
-
]
|
|
1149
|
-
}
|
|
1150
|
-
);
|
|
1151
|
-
};
|
|
1152
960
|
|
|
1153
961
|
// src/components/layout/sub-shell/constants.ts
|
|
1154
962
|
var subsidebarWidth = 200;
|
|
@@ -1242,4 +1050,4 @@ var Topbar = ({ version, leftContent, children }) => {
|
|
|
1242
1050
|
] });
|
|
1243
1051
|
};
|
|
1244
1052
|
|
|
1245
|
-
export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider,
|
|
1053
|
+
export { AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, Topbar, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse };
|
|
@@ -2,7 +2,7 @@ import { useCyberColors } from './chunk-JHVKGZ2P.js';
|
|
|
2
2
|
import { GlowDot } from './chunk-MCA6LOGM.js';
|
|
3
3
|
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-F6RBK7NJ.js';
|
|
4
4
|
import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-XA34RETF.js';
|
|
5
|
-
import { glassBase } from './chunk-
|
|
5
|
+
import { glassBase } from './chunk-TXPUIHX2.js';
|
|
6
6
|
import { memo, useMemo, useEffect, useState, useCallback, Fragment } from 'react';
|
|
7
7
|
import { Paper, Stack, Text, Group, Badge, Box, useComputedColorScheme, Card, ActionIcon, Loader, SegmentedControl } from '@mantine/core';
|
|
8
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer } from './chunk-5COLSYBE.js';
|
|
2
|
+
import { ApiClientProvider, useApiClient } from './chunk-NVOCKXUQ.js';
|
|
3
|
+
import { OrganizationProvider } from './chunk-W4VYXIN7.js';
|
|
4
|
+
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-IOKL7BKE.js';
|
|
5
|
+
import { useInitialization, InitializationProvider } from './chunk-TUXTSEAF.js';
|
|
6
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
7
|
+
import { ProfileProvider, ElevasisServiceProvider } from './chunk-QEPXAWE2.js';
|
|
8
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
9
|
+
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
10
|
+
import { createContext, lazy, useContext, useMemo, useCallback, Suspense, useRef } from 'react';
|
|
11
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
13
|
+
|
|
14
|
+
var consoleAdapter = {
|
|
15
|
+
success(title, message) {
|
|
16
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
17
|
+
},
|
|
18
|
+
error(title, message) {
|
|
19
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
20
|
+
},
|
|
21
|
+
info(title, message) {
|
|
22
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
23
|
+
},
|
|
24
|
+
warning(title, message) {
|
|
25
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
26
|
+
},
|
|
27
|
+
apiError(error) {
|
|
28
|
+
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
29
|
+
const title = getErrorTitle(code);
|
|
30
|
+
const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
|
|
31
|
+
console.warn(`[Notification][API Error] ${title}: ${formatted}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var NotificationContext = createContext(consoleAdapter);
|
|
35
|
+
function NotificationProvider({ adapter, children }) {
|
|
36
|
+
return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
|
|
37
|
+
}
|
|
38
|
+
function useNotificationAdapter() {
|
|
39
|
+
return useContext(NotificationContext);
|
|
40
|
+
}
|
|
41
|
+
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-I32JCNE7.js').then((m) => ({ default: m.CoreAuthKitInner })));
|
|
42
|
+
var defaultQueryClient = null;
|
|
43
|
+
function getDefaultQueryClient() {
|
|
44
|
+
if (!defaultQueryClient) {
|
|
45
|
+
defaultQueryClient = new QueryClient({
|
|
46
|
+
defaultOptions: { queries: { retry: 1 } }
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return defaultQueryClient;
|
|
50
|
+
}
|
|
51
|
+
var consoleNotificationAdapter = {
|
|
52
|
+
success(title, message) {
|
|
53
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
54
|
+
},
|
|
55
|
+
error(title, message) {
|
|
56
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
57
|
+
},
|
|
58
|
+
info(title, message) {
|
|
59
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
60
|
+
},
|
|
61
|
+
warning(title, message) {
|
|
62
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
63
|
+
},
|
|
64
|
+
apiError(error) {
|
|
65
|
+
console.warn(`[Notification][API Error]`, error);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
function ElevasisCoreProvider({
|
|
69
|
+
auth,
|
|
70
|
+
queryClient,
|
|
71
|
+
apiUrl,
|
|
72
|
+
onError,
|
|
73
|
+
notifications,
|
|
74
|
+
children
|
|
75
|
+
}) {
|
|
76
|
+
if (auth.mode === "apiKey") {
|
|
77
|
+
throw new Error(
|
|
78
|
+
`ElevasisCoreProvider: auth mode 'apiKey' is not yet implemented. Only 'authkit' mode is supported.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
|
|
82
|
+
const content = apiUrl ? /* @__PURE__ */ jsx(ServiceStack, { apiUrl, onError, notifications, children }) : children;
|
|
83
|
+
const AuthInner = /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) });
|
|
84
|
+
return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: AuthInner });
|
|
85
|
+
}
|
|
86
|
+
function ServiceStack({
|
|
87
|
+
apiUrl,
|
|
88
|
+
onError,
|
|
89
|
+
notifications,
|
|
90
|
+
children
|
|
91
|
+
}) {
|
|
92
|
+
const { getAccessToken } = useAuthContext();
|
|
93
|
+
const orgIdRef = useRef(null);
|
|
94
|
+
const getOrganizationId = useRef(() => orgIdRef.current).current;
|
|
95
|
+
return /* @__PURE__ */ jsx(
|
|
96
|
+
ApiClientProvider,
|
|
97
|
+
{
|
|
98
|
+
getAccessToken,
|
|
99
|
+
getOrganizationId,
|
|
100
|
+
isOrganizationReady: false,
|
|
101
|
+
onError,
|
|
102
|
+
children: /* @__PURE__ */ jsx(ServiceStackInner, { apiUrl, orgIdRef, notifications, children })
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function ServiceStackInner({
|
|
107
|
+
apiUrl,
|
|
108
|
+
orgIdRef,
|
|
109
|
+
notifications,
|
|
110
|
+
children
|
|
111
|
+
}) {
|
|
112
|
+
const { apiRequest } = useApiClient(apiUrl);
|
|
113
|
+
const resolvedNotifications = notifications ?? consoleNotificationAdapter;
|
|
114
|
+
return /* @__PURE__ */ jsx(ProfileProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrganizationProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrgServiceBridge, { orgIdRef, apiRequest, notifications: resolvedNotifications, children }) }) });
|
|
115
|
+
}
|
|
116
|
+
function OrgServiceBridge({
|
|
117
|
+
orgIdRef,
|
|
118
|
+
apiRequest,
|
|
119
|
+
notifications,
|
|
120
|
+
children
|
|
121
|
+
}) {
|
|
122
|
+
const { currentWorkOSOrganizationId, isInitializing, isOrgRefreshing } = useOrganization();
|
|
123
|
+
orgIdRef.current = currentWorkOSOrganizationId;
|
|
124
|
+
const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
|
|
125
|
+
return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: currentWorkOSOrganizationId, isReady, children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) }) });
|
|
126
|
+
}
|
|
127
|
+
function createUseFeatureAccess({
|
|
128
|
+
useInitialization: useInitialization2,
|
|
129
|
+
useOrganization: useOrganization2
|
|
130
|
+
}) {
|
|
131
|
+
return function useFeatureAccess2() {
|
|
132
|
+
const { profile, organizationReady } = useInitialization2();
|
|
133
|
+
const { currentMembership } = useOrganization2();
|
|
134
|
+
const { orgConfig, membershipConfig } = useMemo(() => {
|
|
135
|
+
const organizationConfig = currentMembership?.organization?.config;
|
|
136
|
+
const memberConfig = currentMembership?.config;
|
|
137
|
+
return { orgConfig: organizationConfig, membershipConfig: memberConfig };
|
|
138
|
+
}, [currentMembership]);
|
|
139
|
+
const userConfig = profile?.config;
|
|
140
|
+
const checkFeature = useCallback(
|
|
141
|
+
(featureKey) => {
|
|
142
|
+
const key = featureKey;
|
|
143
|
+
if (profile?.is_platform_admin) {
|
|
144
|
+
return { allowed: true, restrictedBy: null };
|
|
145
|
+
}
|
|
146
|
+
const membershipValue = membershipConfig?.features?.[key];
|
|
147
|
+
if (membershipValue === false) return { allowed: false, restrictedBy: "membership" };
|
|
148
|
+
return { allowed: true, restrictedBy: null };
|
|
149
|
+
},
|
|
150
|
+
[profile?.is_platform_admin, membershipConfig]
|
|
151
|
+
);
|
|
152
|
+
const hasFeature = useCallback((featureKey) => checkFeature(featureKey).allowed, [checkFeature]);
|
|
153
|
+
return {
|
|
154
|
+
orgConfig,
|
|
155
|
+
membershipConfig,
|
|
156
|
+
userConfig,
|
|
157
|
+
hasFeature,
|
|
158
|
+
checkFeature,
|
|
159
|
+
isReady: organizationReady
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
var useFeatureAccess = createUseFeatureAccess({
|
|
164
|
+
useInitialization,
|
|
165
|
+
useOrganization
|
|
166
|
+
});
|
|
167
|
+
var ElevasisFeaturesContext = createContext(null);
|
|
168
|
+
function useElevasisFeatures() {
|
|
169
|
+
const context = useContext(ElevasisFeaturesContext);
|
|
170
|
+
if (!context) {
|
|
171
|
+
throw new Error(
|
|
172
|
+
"useElevasisFeatures must be used within an ElevasisFeaturesProvider. Wrap your app (or the relevant subtree) with <ElevasisFeaturesProvider>."
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
return context;
|
|
176
|
+
}
|
|
177
|
+
function getEnabledFeatures(features, hasFeature) {
|
|
178
|
+
return features.filter((feature) => hasFeature(feature.key));
|
|
179
|
+
}
|
|
180
|
+
function getNavItems(features) {
|
|
181
|
+
return features.flatMap((feature) => feature.navEntry ? [feature.navEntry] : []);
|
|
182
|
+
}
|
|
183
|
+
function ElevasisFeaturesProvider({ features, children }) {
|
|
184
|
+
const { hasFeature } = useFeatureAccess();
|
|
185
|
+
const enabledFeatures = useMemo(() => getEnabledFeatures(features, hasFeature), [features, hasFeature]);
|
|
186
|
+
const navItems = useMemo(() => getNavItems(enabledFeatures), [enabledFeatures]);
|
|
187
|
+
const getFeature = useCallback(
|
|
188
|
+
(key) => features.find((feature) => feature.key === key),
|
|
189
|
+
[features]
|
|
190
|
+
);
|
|
191
|
+
const isFeatureEnabled = useCallback(
|
|
192
|
+
(key) => enabledFeatures.some((feature) => feature.key === key),
|
|
193
|
+
[enabledFeatures]
|
|
194
|
+
);
|
|
195
|
+
const value = useMemo(
|
|
196
|
+
() => ({
|
|
197
|
+
navItems,
|
|
198
|
+
enabledFeatures,
|
|
199
|
+
allFeatures: features,
|
|
200
|
+
isFeatureEnabled,
|
|
201
|
+
getFeature
|
|
202
|
+
}),
|
|
203
|
+
[navItems, enabledFeatures, features, isFeatureEnabled, getFeature]
|
|
204
|
+
);
|
|
205
|
+
return /* @__PURE__ */ jsx(ElevasisFeaturesContext.Provider, { value, children });
|
|
206
|
+
}
|
|
207
|
+
function isRouteMatch(currentPath, route) {
|
|
208
|
+
return currentPath.startsWith(route);
|
|
209
|
+
}
|
|
210
|
+
function resolveFeatureShellFeature(features, currentPath) {
|
|
211
|
+
for (const feature of features) {
|
|
212
|
+
if (!feature.sidebar || !feature.subshellRoutes?.length) {
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (feature.subshellRoutes.some((route) => isRouteMatch(currentPath, route))) {
|
|
216
|
+
return feature;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
function FeatureShell({ children }) {
|
|
222
|
+
const { enabledFeatures } = useElevasisFeatures();
|
|
223
|
+
const { currentPath } = useRouterContext();
|
|
224
|
+
const matchedFeature = useMemo(
|
|
225
|
+
() => resolveFeatureShellFeature(enabledFeatures, currentPath),
|
|
226
|
+
[enabledFeatures, currentPath]
|
|
227
|
+
);
|
|
228
|
+
if (!matchedFeature?.sidebar) {
|
|
229
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
230
|
+
}
|
|
231
|
+
const SidebarComponent = matchedFeature.sidebar;
|
|
232
|
+
return /* @__PURE__ */ jsxs(SubshellContainer, { children: [
|
|
233
|
+
/* @__PURE__ */ jsx(SubshellSidebar, { width: 250, children: /* @__PURE__ */ jsx(SidebarComponent, {}) }),
|
|
234
|
+
/* @__PURE__ */ jsx(SubshellRightSideContainer, { children })
|
|
235
|
+
] });
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, createUseFeatureAccess, useElevasisFeatures, useNotificationAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-JHVKGZ2P.js';
|
|
2
2
|
import { CardHeader, EmptyState } from './chunk-MCA6LOGM.js';
|
|
3
|
-
import { useResourcesHealth } from './chunk-
|
|
3
|
+
import { useResourcesHealth } from './chunk-RCQPWA5X.js';
|
|
4
4
|
import { getTimeRangeDates, formatBucketTime } from './chunk-LXHZYSMQ.js';
|
|
5
5
|
import { Paper, Center, Loader, Group } from '@mantine/core';
|
|
6
6
|
import { IconActivity, IconChartBar } from '@tabler/icons-react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getTimeRangeDates, observabilityKeys } from './chunk-LXHZYSMQ.js';
|
|
2
2
|
import { GRAPH_CONSTANTS } from './chunk-F6RBK7NJ.js';
|
|
3
|
-
import { useNotificationAdapter } from './chunk-
|
|
3
|
+
import { useNotificationAdapter } from './chunk-ITCEULI5.js';
|
|
4
4
|
import { HTTP_HEADERS } from './chunk-NVOCKXUQ.js';
|
|
5
5
|
import { STALE_TIME_MONITORING, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, getErrorInfo, formatErrorMessage, getErrorTitle, STALE_TIME_DEFAULT, STALE_TIME_ADMIN, APIClientError } from './chunk-IOKL7BKE.js';
|
|
6
6
|
import { useStableAccessToken } from './chunk-ALA56RGZ.js';
|
|
@@ -1997,42 +1997,6 @@ function useSortedData(data, defaultColumn, accessors, defaultDirection = "desc"
|
|
|
1997
1997
|
const sorted = useMemo(() => sortData(data, sort, accessors), [data, sort, accessors]);
|
|
1998
1998
|
return { sorted, sort, toggleSort };
|
|
1999
1999
|
}
|
|
2000
|
-
function createUseFeatureAccess({
|
|
2001
|
-
useInitialization,
|
|
2002
|
-
useOrganization: useOrganization2
|
|
2003
|
-
}) {
|
|
2004
|
-
return function useFeatureAccess() {
|
|
2005
|
-
const { profile, organizationReady } = useInitialization();
|
|
2006
|
-
const { currentMembership } = useOrganization2();
|
|
2007
|
-
const { orgConfig, membershipConfig } = useMemo(() => {
|
|
2008
|
-
const organizationConfig = currentMembership?.organization?.config;
|
|
2009
|
-
const memberConfig = currentMembership?.config;
|
|
2010
|
-
return { orgConfig: organizationConfig, membershipConfig: memberConfig };
|
|
2011
|
-
}, [currentMembership]);
|
|
2012
|
-
const userConfig = profile?.config;
|
|
2013
|
-
const checkFeature = useCallback(
|
|
2014
|
-
(featureKey) => {
|
|
2015
|
-
const key = featureKey;
|
|
2016
|
-
if (profile?.is_platform_admin) {
|
|
2017
|
-
return { allowed: true, restrictedBy: null };
|
|
2018
|
-
}
|
|
2019
|
-
const membershipValue = membershipConfig?.features?.[key];
|
|
2020
|
-
if (membershipValue === false) return { allowed: false, restrictedBy: "membership" };
|
|
2021
|
-
return { allowed: true, restrictedBy: null };
|
|
2022
|
-
},
|
|
2023
|
-
[profile?.is_platform_admin, membershipConfig]
|
|
2024
|
-
);
|
|
2025
|
-
const hasFeature = useCallback((featureKey) => checkFeature(featureKey).allowed, [checkFeature]);
|
|
2026
|
-
return {
|
|
2027
|
-
orgConfig,
|
|
2028
|
-
membershipConfig,
|
|
2029
|
-
userConfig,
|
|
2030
|
-
hasFeature,
|
|
2031
|
-
checkFeature,
|
|
2032
|
-
isReady: organizationReady
|
|
2033
|
-
};
|
|
2034
|
-
};
|
|
2035
|
-
}
|
|
2036
2000
|
function useSSEConnection({
|
|
2037
2001
|
manager,
|
|
2038
2002
|
connectionKey,
|
|
@@ -2260,7 +2224,9 @@ function useExecutionPanelState({
|
|
|
2260
2224
|
manager,
|
|
2261
2225
|
apiUrl,
|
|
2262
2226
|
limit,
|
|
2263
|
-
onConnectionStatus
|
|
2227
|
+
onConnectionStatus,
|
|
2228
|
+
selectedId: controlledSelectedId,
|
|
2229
|
+
onSelectedIdChange
|
|
2264
2230
|
}) {
|
|
2265
2231
|
const queryClient = useQueryClient();
|
|
2266
2232
|
const navigate = useNavigate();
|
|
@@ -2268,17 +2234,22 @@ function useExecutionPanelState({
|
|
|
2268
2234
|
const [resourceStatusFilter, setResourceStatusFilter] = useState("all");
|
|
2269
2235
|
const { data: executionsData, isLoading, isFetched } = useExecutions(resourceId, resourceStatusFilter, limit);
|
|
2270
2236
|
const { liveExecutions, connected, runningCount, streamingLogs } = useExecutionLogSSE(resourceId, manager, apiUrl);
|
|
2237
|
+
const isControlled = controlledSelectedId !== void 0;
|
|
2271
2238
|
const search = useSearch({ strict: false });
|
|
2272
|
-
const selectedId = search.exec;
|
|
2239
|
+
const selectedId = isControlled ? controlledSelectedId ?? void 0 : search.exec;
|
|
2273
2240
|
const setSelectedId = useCallback(
|
|
2274
2241
|
(id) => {
|
|
2242
|
+
if (isControlled) {
|
|
2243
|
+
onSelectedIdChange?.(id ?? null);
|
|
2244
|
+
return;
|
|
2245
|
+
}
|
|
2275
2246
|
void navigate({
|
|
2276
2247
|
to: ".",
|
|
2277
2248
|
search: { exec: id },
|
|
2278
2249
|
replace: true
|
|
2279
2250
|
});
|
|
2280
2251
|
},
|
|
2281
|
-
[navigate]
|
|
2252
|
+
[isControlled, navigate, onSelectedIdChange]
|
|
2282
2253
|
);
|
|
2283
2254
|
const executions = executionsData?.executions || [];
|
|
2284
2255
|
const prevExecutionCountRef = useRef(0);
|
|
@@ -3161,7 +3132,7 @@ function useBatchTelemetry() {
|
|
|
3161
3132
|
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
3162
3133
|
return useQuery({
|
|
3163
3134
|
queryKey: ["acq-batch-telemetry", organizationId],
|
|
3164
|
-
queryFn: () => apiRequest("/acquisition/
|
|
3135
|
+
queryFn: () => apiRequest("/acquisition/lists/telemetry"),
|
|
3165
3136
|
enabled: isReady
|
|
3166
3137
|
});
|
|
3167
3138
|
}
|
|
@@ -3205,4 +3176,4 @@ function useDeleteDeal() {
|
|
|
3205
3176
|
});
|
|
3206
3177
|
}
|
|
3207
3178
|
|
|
3208
|
-
export { CredentialNameSchema, OperationsService, UuidSchema, calibrationKeys,
|
|
3179
|
+
export { CredentialNameSchema, OperationsService, UuidSchema, calibrationKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, isSessionCapable, operationsKeys, scheduleKeys, sessionsKeys, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, sortData, useActivities, useActivityTrend, useAllCalibrationProjects, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompleteDealTask, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateDealNote, useCreateDealTask, useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useDashboardMetrics, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteDeal, useDeleteExecution, useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteRun, useExecuteWorkflow, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphStats, useListSchedules, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, usePaginationState, usePatchTask, usePauseSchedule, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResources, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTestNotification, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateProject, useUpdateSchedule, useWarningNotification };
|