@elevasis/ui 1.12.0 → 1.14.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/{CoreAuthKitInner-3J4RVQO6.js → CoreAuthKitInner-I32JCNE7.js} +1 -1
- package/dist/auth/context.js +1 -1
- package/dist/auth/index.js +5 -5
- package/dist/charts/index.js +7 -7
- package/dist/{chunk-WUQWCUCB.js → chunk-3VTC7OWU.js} +2 -2
- package/dist/{chunk-FWZJH3TL.js → chunk-ALA56RGZ.js} +1 -1
- package/dist/{chunk-GZVH423C.js → chunk-BK4EIWNU.js} +11 -5
- package/dist/{chunk-7PLEQFHO.js → chunk-BRJ3QZ4E.js} +1 -1
- package/dist/{chunk-I427OSNH.js → chunk-BUN337J3.js} +37 -32
- package/dist/{chunk-3PURTICE.js → chunk-CKFTPEBC.js} +2 -2
- package/dist/{chunk-ARZM3OTI.js → chunk-EQNXEBGZ.js} +1 -1
- package/dist/{chunk-VUFYYNTF.js → chunk-F5BVI434.js} +11 -5
- package/dist/{chunk-3I2LOKQU.js → chunk-GU46QC4Z.js} +2 -2
- package/dist/{chunk-2YBPRE6H.js → chunk-HGNP6EVB.js} +3 -4
- package/dist/{chunk-C27QFR3V.js → chunk-LP6CQOHV.js} +6 -6
- package/dist/{chunk-7RAT54LF.js → chunk-M3WZAG5D.js} +1 -1
- package/dist/{chunk-MHQ42SD2.js → chunk-MJ7SDCIL.js} +4 -4
- package/dist/{chunk-JGJSZ3UE.js → chunk-NJJ3NQ7B.js} +1 -1
- package/dist/chunk-QJ2KCHKX.js +17 -0
- package/dist/{chunk-CC6BRHQK.js → chunk-RM6ACTB3.js} +2 -2
- package/dist/{chunk-HRG3KPL6.js → chunk-TBRTRBJV.js} +3 -15
- package/dist/{chunk-6TMW6VQ2.js → chunk-V5GGPIDD.js} +2 -2
- package/dist/components/index.js +20 -19
- package/dist/hooks/index.css +45 -45
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +14 -13
- package/dist/hooks/published.css +45 -45
- package/dist/hooks/published.js +13 -12
- package/dist/index.css +45 -45
- package/dist/index.d.ts +45 -50
- package/dist/index.js +16 -15
- package/dist/initialization/index.js +4 -4
- package/dist/layout/index.js +3 -2
- package/dist/organization/index.d.ts +5 -2
- package/dist/organization/index.js +4 -4
- package/dist/profile/index.d.ts +14 -4
- package/dist/profile/index.js +2 -2
- package/dist/provider/index.css +45 -45
- package/dist/provider/index.d.ts +26 -44
- package/dist/provider/index.js +8 -7
- package/dist/provider/published.d.ts +18 -38
- package/dist/provider/published.js +6 -7
- package/dist/supabase/index.js +2 -2
- package/package.json +1 -1
- package/dist/provider/published.css +0 -44
package/dist/auth/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AuthProvider, useAuthContext } from '../chunk-
|
|
1
|
+
export { AuthProvider, useAuthContext } from '../chunk-BRJ3QZ4E.js';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AdminGuard, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck } from '../chunk-
|
|
2
|
-
export { useStableAccessToken } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { AdminGuard, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck } from '../chunk-V5GGPIDD.js';
|
|
2
|
+
export { useStableAccessToken } from '../chunk-ALA56RGZ.js';
|
|
3
|
+
import '../chunk-3VTC7OWU.js';
|
|
4
|
+
import '../chunk-BK4EIWNU.js';
|
|
5
5
|
import '../chunk-DD3CCMCZ.js';
|
|
6
|
-
export { AuthProvider, useAuthContext } from '../chunk-
|
|
6
|
+
export { AuthProvider, useAuthContext } from '../chunk-BRJ3QZ4E.js';
|
package/dist/charts/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { ActivityTrendChart, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-
|
|
1
|
+
export { ActivityTrendChart, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-RM6ACTB3.js';
|
|
2
2
|
import '../chunk-YHTK43DV.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-EQNXEBGZ.js';
|
|
4
4
|
import '../chunk-LHQTTUL2.js';
|
|
5
5
|
import '../chunk-ELJIFLCB.js';
|
|
6
6
|
import '../chunk-SZHARWKU.js';
|
|
7
7
|
import '../chunk-FCFLBMVI.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-V5GGPIDD.js';
|
|
9
|
+
import '../chunk-ALA56RGZ.js';
|
|
10
|
+
import '../chunk-3VTC7OWU.js';
|
|
11
|
+
import '../chunk-BK4EIWNU.js';
|
|
12
12
|
import '../chunk-DD3CCMCZ.js';
|
|
13
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-BRJ3QZ4E.js';
|
|
14
14
|
import '../chunk-Q7DJKLEN.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useProfile } from './chunk-
|
|
1
|
+
import { useProfile } from './chunk-BK4EIWNU.js';
|
|
2
2
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
3
|
-
import { useAuthContext } from './chunk-
|
|
3
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
4
4
|
import { createContext, useContext, useMemo, useCallback, createElement } from 'react';
|
|
5
5
|
|
|
6
6
|
var InitializationContext = createContext(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAuthContext } from './chunk-
|
|
1
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
2
2
|
import { createContext, useContext, useMemo, useState, useEffect, createElement } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ function useElevasisServices() {
|
|
|
7
7
|
const ctx = useContext(ElevasisServiceContext);
|
|
8
8
|
if (!ctx) {
|
|
9
9
|
throw new Error(
|
|
10
|
-
"useElevasisServices must be used within an ElevasisServiceProvider or an
|
|
10
|
+
"useElevasisServices must be used within an ElevasisServiceProvider or an ElevasisUIProvider with apiUrl configured."
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
13
|
return ctx;
|
|
@@ -90,7 +90,13 @@ var UserProfileService = class {
|
|
|
90
90
|
};
|
|
91
91
|
var useUserProfile = (options) => {
|
|
92
92
|
const { user, isLoading: authLoading } = useAuthContext();
|
|
93
|
-
const
|
|
93
|
+
const serviceCtx = useContext(ElevasisServiceContext);
|
|
94
|
+
const apiRequest = options?.apiRequest ?? serviceCtx?.apiRequest;
|
|
95
|
+
if (!apiRequest) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
"useUserProfile: no apiRequest available. Either pass it via options or use within ElevasisServiceProvider."
|
|
98
|
+
);
|
|
99
|
+
}
|
|
94
100
|
const [profile, setProfile] = useState(null);
|
|
95
101
|
const [loading, setLoading] = useState(true);
|
|
96
102
|
const [error, setError] = useState(null);
|
|
@@ -156,8 +162,8 @@ function useProfile() {
|
|
|
156
162
|
}
|
|
157
163
|
return ctx;
|
|
158
164
|
}
|
|
159
|
-
function ProfileProvider({ children }) {
|
|
160
|
-
const value = useUserProfile();
|
|
165
|
+
function ProfileProvider({ apiRequest, children }) {
|
|
166
|
+
const value = useUserProfile({ apiRequest });
|
|
161
167
|
return createElement(ProfileContext.Provider, { value }, children);
|
|
162
168
|
}
|
|
163
169
|
|
|
@@ -6,7 +6,7 @@ function useAuthContext() {
|
|
|
6
6
|
const ctx = useContext(AuthContext);
|
|
7
7
|
if (!ctx) {
|
|
8
8
|
throw new Error(
|
|
9
|
-
"useAuthContext must be used within an AuthProvider. Wrap your app with <
|
|
9
|
+
"useAuthContext must be used within an AuthProvider. Wrap your app with <ElevasisUIProvider> or a custom AuthProvider."
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
12
|
return ctx;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ElevasisLoader } from './chunk-SZHARWKU.js';
|
|
3
|
-
import { OrganizationProvider } from './chunk-2YBPRE6H.js';
|
|
1
|
+
import { OrganizationProvider } from './chunk-HGNP6EVB.js';
|
|
4
2
|
import { ApiClientProvider, useApiClient } from './chunk-RULQSZYX.js';
|
|
5
3
|
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-FCFLBMVI.js';
|
|
6
|
-
import { InitializationProvider } from './chunk-
|
|
7
|
-
import {
|
|
4
|
+
import { InitializationProvider } from './chunk-3VTC7OWU.js';
|
|
5
|
+
import { ProfileProvider, ElevasisServiceProvider } from './chunk-BK4EIWNU.js';
|
|
8
6
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
9
|
-
import { useAuthContext } from './chunk-
|
|
7
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
10
8
|
import { createContext, lazy, useContext, Suspense, useRef } from 'react';
|
|
11
|
-
import { jsx
|
|
9
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
10
|
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
13
|
-
import { Loader } from '@mantine/core';
|
|
14
11
|
|
|
15
12
|
var consoleAdapter = {
|
|
16
13
|
success(title, message) {
|
|
@@ -39,7 +36,7 @@ function NotificationProvider({ adapter, children }) {
|
|
|
39
36
|
function useNotificationAdapter() {
|
|
40
37
|
return useContext(NotificationContext);
|
|
41
38
|
}
|
|
42
|
-
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-
|
|
39
|
+
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-I32JCNE7.js').then((m) => ({ default: m.CoreAuthKitInner })));
|
|
43
40
|
var defaultQueryClient = null;
|
|
44
41
|
function getDefaultQueryClient() {
|
|
45
42
|
if (!defaultQueryClient) {
|
|
@@ -49,13 +46,29 @@ function getDefaultQueryClient() {
|
|
|
49
46
|
}
|
|
50
47
|
return defaultQueryClient;
|
|
51
48
|
}
|
|
49
|
+
var consoleNotificationAdapter = {
|
|
50
|
+
success(title, message) {
|
|
51
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
52
|
+
},
|
|
53
|
+
error(title, message) {
|
|
54
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
55
|
+
},
|
|
56
|
+
info(title, message) {
|
|
57
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
58
|
+
},
|
|
59
|
+
warning(title, message) {
|
|
60
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
61
|
+
},
|
|
62
|
+
apiError(error) {
|
|
63
|
+
console.warn(`[Notification][API Error]`, error);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
52
66
|
function ElevasisCoreProvider({
|
|
53
67
|
auth,
|
|
54
68
|
queryClient,
|
|
55
69
|
apiUrl,
|
|
56
70
|
onError,
|
|
57
71
|
notifications,
|
|
58
|
-
appearance,
|
|
59
72
|
children
|
|
60
73
|
}) {
|
|
61
74
|
if (auth.mode === "apiKey") {
|
|
@@ -64,15 +77,11 @@ function ElevasisCoreProvider({
|
|
|
64
77
|
);
|
|
65
78
|
}
|
|
66
79
|
const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
|
|
67
|
-
const
|
|
68
|
-
background: appearance?.background ?? /* @__PURE__ */ jsx(AppBackground, {}),
|
|
69
|
-
loader: appearance?.loader ?? /* @__PURE__ */ jsx(Loader, { size: "lg", loaders: { elevasis: ElevasisLoader }, type: "elevasis" })
|
|
70
|
-
};
|
|
71
|
-
const content = apiUrl ? /* @__PURE__ */ jsx(CoreServiceBridge, { apiUrl, onError, notifications, children }) : children;
|
|
80
|
+
const content = apiUrl ? /* @__PURE__ */ jsx(ServiceStack, { apiUrl, onError, notifications, children }) : children;
|
|
72
81
|
const AuthInner = /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) });
|
|
73
|
-
return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children:
|
|
82
|
+
return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: AuthInner });
|
|
74
83
|
}
|
|
75
|
-
function
|
|
84
|
+
function ServiceStack({
|
|
76
85
|
apiUrl,
|
|
77
86
|
onError,
|
|
78
87
|
notifications,
|
|
@@ -88,34 +97,30 @@ function CoreServiceBridge({
|
|
|
88
97
|
getOrganizationId,
|
|
89
98
|
isOrganizationReady: false,
|
|
90
99
|
onError,
|
|
91
|
-
children: /* @__PURE__ */ jsx(
|
|
100
|
+
children: /* @__PURE__ */ jsx(ServiceStackInner, { apiUrl, orgIdRef, notifications, children })
|
|
92
101
|
}
|
|
93
102
|
);
|
|
94
103
|
}
|
|
95
|
-
function
|
|
104
|
+
function ServiceStackInner({
|
|
96
105
|
apiUrl,
|
|
97
106
|
orgIdRef,
|
|
98
107
|
notifications,
|
|
99
108
|
children
|
|
100
109
|
}) {
|
|
101
110
|
const { apiRequest } = useApiClient(apiUrl);
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
function OrgIdBridge({ orgIdRef, children }) {
|
|
105
|
-
const { currentWorkOSOrganizationId, isInitializing, isOrgRefreshing } = useOrganization();
|
|
106
|
-
const { apiRequest } = useElevasisServices();
|
|
107
|
-
orgIdRef.current = currentWorkOSOrganizationId;
|
|
108
|
-
const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
|
|
109
|
-
return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: currentWorkOSOrganizationId, isReady, children });
|
|
111
|
+
const resolvedNotifications = notifications ?? consoleNotificationAdapter;
|
|
112
|
+
return /* @__PURE__ */ jsx(ProfileProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrganizationProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrgServiceBridge, { orgIdRef, apiRequest, notifications: resolvedNotifications, children }) }) });
|
|
110
113
|
}
|
|
111
|
-
function
|
|
114
|
+
function OrgServiceBridge({
|
|
115
|
+
orgIdRef,
|
|
116
|
+
apiRequest,
|
|
112
117
|
notifications,
|
|
113
118
|
children
|
|
114
119
|
}) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return /* @__PURE__ */ jsx(
|
|
120
|
+
const { currentWorkOSOrganizationId, isInitializing, isOrgRefreshing } = useOrganization();
|
|
121
|
+
orgIdRef.current = currentWorkOSOrganizationId;
|
|
122
|
+
const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
|
|
123
|
+
return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: currentWorkOSOrganizationId, isReady, children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) }) });
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useUserProfile } from './chunk-
|
|
2
|
-
import { useAuthContext } from './chunk-
|
|
1
|
+
import { useUserProfile } from './chunk-BK4EIWNU.js';
|
|
2
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
3
3
|
import { useMemo, useCallback } from 'react';
|
|
4
4
|
|
|
5
5
|
function createUseAppInitialization(useOrgInitialization) {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-WNRHQAJA.js';
|
|
2
|
-
import {
|
|
2
|
+
import { AppBackground } from './chunk-TBRTRBJV.js';
|
|
3
|
+
import { ElevasisLoader } from './chunk-SZHARWKU.js';
|
|
4
|
+
import { ElevasisCoreProvider } from './chunk-BUN337J3.js';
|
|
5
|
+
import { AppearanceProvider } from './chunk-QJ2KCHKX.js';
|
|
3
6
|
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-FCFLBMVI.js';
|
|
4
7
|
import { useMemo, useEffect } from 'react';
|
|
5
|
-
import { mergeThemeOverrides, MantineProvider } from '@mantine/core';
|
|
8
|
+
import { Loader, mergeThemeOverrides, MantineProvider } from '@mantine/core';
|
|
6
9
|
import '@mantine/core/styles.css';
|
|
7
10
|
import '@mantine/notifications/styles.css';
|
|
8
11
|
import { notifications } from '@mantine/notifications';
|
|
@@ -36,6 +39,10 @@ var mantineAdapter = {
|
|
|
36
39
|
function ElevasisUIProvider({ theme, children, ...coreProps }) {
|
|
37
40
|
const resolvedColorScheme = theme?.colorScheme ?? "dark";
|
|
38
41
|
const activePresets = theme?.presets ?? PRESETS;
|
|
42
|
+
const resolvedAppearance = {
|
|
43
|
+
background: theme?.background ?? /* @__PURE__ */ jsx(AppBackground, {}),
|
|
44
|
+
loader: theme?.loader ?? /* @__PURE__ */ jsx(Loader, { size: "xl", loaders: { elevasis: ElevasisLoader }, type: "elevasis" })
|
|
45
|
+
};
|
|
39
46
|
const preset = useMemo(() => getPreset(theme?.preset ?? "default", theme?.presets), [theme?.preset, theme?.presets]);
|
|
40
47
|
useEffect(() => {
|
|
41
48
|
if (!preset.fontImports?.length) return;
|
|
@@ -80,10 +87,9 @@ function ElevasisUIProvider({ theme, children, ...coreProps }) {
|
|
|
80
87
|
theme: resolvedTheme,
|
|
81
88
|
defaultColorScheme: resolvedColorScheme,
|
|
82
89
|
cssVariablesResolver,
|
|
83
|
-
children: /* @__PURE__ */ jsx(PresetsProvider, { value: activePresets, children: /* @__PURE__ */ jsx(ElevasisCoreProvider, { notifications: mantineAdapter, ...coreProps, children }) })
|
|
90
|
+
children: /* @__PURE__ */ jsx(PresetsProvider, { value: activePresets, children: /* @__PURE__ */ jsx(AppearanceProvider, { value: resolvedAppearance, children: /* @__PURE__ */ jsx(ElevasisCoreProvider, { notifications: mantineAdapter, ...coreProps, children }) }) })
|
|
84
91
|
}
|
|
85
92
|
);
|
|
86
93
|
}
|
|
87
|
-
var ElevasisProvider = ElevasisUIProvider;
|
|
88
94
|
|
|
89
|
-
export {
|
|
95
|
+
export { ElevasisUIProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useUserProfile } from './chunk-
|
|
2
|
-
import { useAuthContext } from './chunk-
|
|
1
|
+
import { useUserProfile } from './chunk-BK4EIWNU.js';
|
|
2
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
3
3
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
|
|
5
5
|
// src/organization/store/organizationsSlice.ts
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useProfile } from './chunk-BK4EIWNU.js';
|
|
2
2
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
3
|
-
import { useAuthContext } from './chunk-
|
|
3
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
4
4
|
import { useState, useRef, useEffect, useCallback, createElement } from 'react';
|
|
5
5
|
import { useQueryClient } from '@tanstack/react-query';
|
|
6
6
|
|
|
7
|
-
function OrganizationProvider({ children }) {
|
|
7
|
+
function OrganizationProvider({ apiRequest, children }) {
|
|
8
8
|
const { user, organizationId: workosOrgId } = useAuthContext();
|
|
9
|
-
const { apiRequest } = useElevasisServices();
|
|
10
9
|
const { profile } = useProfile();
|
|
11
10
|
const queryClient = useQueryClient();
|
|
12
11
|
const [memberships, setMemberships] = useState([]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { getTimeRangeDates, observabilityKeys } from './chunk-
|
|
2
|
-
import { useSupabase } from './chunk-
|
|
1
|
+
import { getTimeRangeDates, observabilityKeys } from './chunk-EQNXEBGZ.js';
|
|
2
|
+
import { useSupabase } from './chunk-NJJ3NQ7B.js';
|
|
3
3
|
import { GRAPH_CONSTANTS } from './chunk-F6RBK7NJ.js';
|
|
4
|
-
import { useNotificationAdapter } from './chunk-
|
|
4
|
+
import { useNotificationAdapter } from './chunk-BUN337J3.js';
|
|
5
5
|
import { HTTP_HEADERS } from './chunk-RULQSZYX.js';
|
|
6
6
|
import { STALE_TIME_MONITORING, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_DEFAULT, STALE_TIME_ADMIN } from './chunk-FCFLBMVI.js';
|
|
7
|
-
import { useStableAccessToken } from './chunk-
|
|
8
|
-
import { useElevasisServices } from './chunk-
|
|
7
|
+
import { useStableAccessToken } from './chunk-ALA56RGZ.js';
|
|
8
|
+
import { useElevasisServices } from './chunk-BK4EIWNU.js';
|
|
9
9
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
10
|
-
import { useAuthContext } from './chunk-
|
|
10
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
11
11
|
import { useQuery, useQueryClient, useMutation, useQueries } from '@tanstack/react-query';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { useState, useCallback, useMemo, useRef, useEffect, useId } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NavigationButton } from './chunk-YHTK43DV.js';
|
|
2
|
-
import { useAppearance } from './chunk-HRG3KPL6.js';
|
|
3
2
|
import { ElevasisLoader } from './chunk-SZHARWKU.js';
|
|
3
|
+
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
4
4
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { Collapse, HoverCard, Stack, Group, Text, UnstyledButton, Tooltip, ScrollArea, Menu, Avatar, Container, Loader, Title, Button, Box, Center, useMantineColorScheme, Switch, Code } from '@mantine/core';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CredentialNameSchema, UuidSchema, useErrorNotification } from './chunk-
|
|
2
|
-
import { getTimeRangeDates } from './chunk-
|
|
3
|
-
import { useNotificationAdapter } from './chunk-
|
|
1
|
+
import { CredentialNameSchema, UuidSchema, useErrorNotification } from './chunk-LP6CQOHV.js';
|
|
2
|
+
import { getTimeRangeDates } from './chunk-EQNXEBGZ.js';
|
|
3
|
+
import { useNotificationAdapter } from './chunk-BUN337J3.js';
|
|
4
4
|
import { GC_TIME_SHORT, STALE_TIME_MONITORING, GC_TIME_MEDIUM, STALE_TIME_DEFAULT, getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-FCFLBMVI.js';
|
|
5
|
-
import { useElevasisServices } from './chunk-
|
|
5
|
+
import { useElevasisServices } from './chunk-BK4EIWNU.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { create } from 'zustand';
|
|
8
8
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/provider/AppearanceContext.tsx
|
|
5
|
+
var AppearanceContext = createContext(null);
|
|
6
|
+
function AppearanceProvider({ value, children }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(AppearanceContext.Provider, { value, children });
|
|
8
|
+
}
|
|
9
|
+
function useAppearance() {
|
|
10
|
+
const ctx = useContext(AppearanceContext);
|
|
11
|
+
if (!ctx) {
|
|
12
|
+
throw new Error("useAppearance must be used within an AppearanceProvider (ElevasisCoreProvider)");
|
|
13
|
+
}
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { AppearanceProvider, useAppearance };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getTimeRangeLabel, getTimeRangeDates, useErrorTrends, formatBucketTime } from './chunk-
|
|
1
|
+
import { getTimeRangeLabel, getTimeRangeDates, useErrorTrends, formatBucketTime } from './chunk-EQNXEBGZ.js';
|
|
2
2
|
import { ResourceStatusColors } from './chunk-ELJIFLCB.js';
|
|
3
3
|
import { getErrorInfo, getErrorTitle, getResourceIcon } from './chunk-FCFLBMVI.js';
|
|
4
|
-
import { useAuthContext } from './chunk-
|
|
4
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
5
5
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
6
6
|
import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
7
7
|
import { useComputedColorScheme, Group, Text, Box, Stack, Center, Title, Button, Loader, Badge, Collapse, ScrollArea, Card, Skeleton, Select, Alert, Code, ThemeIcon, Paper, Grid, NumberFormatter, Space, Tooltip as Tooltip$1, SimpleGrid, SegmentedControl } from '@mantine/core';
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
1
|
import { useComputedColorScheme } from '@mantine/core';
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
3
|
|
|
5
|
-
// src/
|
|
6
|
-
var AppearanceContext = createContext(null);
|
|
7
|
-
function AppearanceProvider({ value, children }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(AppearanceContext.Provider, { value, children });
|
|
9
|
-
}
|
|
10
|
-
function useAppearance() {
|
|
11
|
-
const ctx = useContext(AppearanceContext);
|
|
12
|
-
if (!ctx) {
|
|
13
|
-
throw new Error("useAppearance must be used within an AppearanceProvider (ElevasisCoreProvider)");
|
|
14
|
-
}
|
|
15
|
-
return ctx;
|
|
16
|
-
}
|
|
4
|
+
// src/components/layout/backgrounds/PerspectiveGrid.tsx
|
|
17
5
|
function PerspectiveGrid({
|
|
18
6
|
glowColor = "rgba(123, 123, 123, 0.1)",
|
|
19
7
|
className
|
|
@@ -292,4 +280,4 @@ function AppBackground({ children }) {
|
|
|
292
280
|
] });
|
|
293
281
|
}
|
|
294
282
|
|
|
295
|
-
export { AppBackground,
|
|
283
|
+
export { AppBackground, FilmGrain, FloatingOrbs, PerspectiveGrid, RadiantGlow };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useInitialization } from './chunk-
|
|
2
|
-
import { useAuthContext } from './chunk-
|
|
1
|
+
import { useInitialization } from './chunk-3VTC7OWU.js';
|
|
2
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
4
|
import { useQueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { useNavigate, useLocation } from '@tanstack/react-router';
|
package/dist/components/index.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { useCyberColors, EmptyState, CyberLegendItem, CyberAreaChart, APIErrorAlert, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, ContextViewer, JsonViewer, StyledMarkdown, PageTitleCaption, StatCard, CyberDonut, CollapsibleSection, ListSkeleton } from '../chunk-
|
|
2
|
-
export { APIErrorAlert, CardHeader, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-
|
|
3
|
-
import { SubshellLoader, SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer, PageContainer, AppShellLoader, SubshellSidebarSection, CollapsibleSidebarGroup, SidebarListItem } from '../chunk-
|
|
1
|
+
import { useCyberColors, EmptyState, CyberLegendItem, CyberAreaChart, APIErrorAlert, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, ContextViewer, JsonViewer, StyledMarkdown, PageTitleCaption, StatCard, CyberDonut, CollapsibleSection, ListSkeleton } from '../chunk-RM6ACTB3.js';
|
|
2
|
+
export { APIErrorAlert, CardHeader, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-RM6ACTB3.js';
|
|
3
|
+
import { SubshellLoader, SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer, PageContainer, AppShellLoader, SubshellSidebarSection, CollapsibleSidebarGroup, SidebarListItem } from '../chunk-M3WZAG5D.js';
|
|
4
4
|
export { NavigationButton } from '../chunk-YHTK43DV.js';
|
|
5
|
-
import { useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, useDeleteCredential, useCreateCredential, useCredentials, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, showApiErrorNotification, showSuccessNotification, CredentialSchemas, showErrorNotification } from '../chunk-
|
|
6
|
-
export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-
|
|
7
|
-
import { useCommandViewLayout, useResourcesHealth, useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications, useSubmitAction, useDeleteTask, useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useDeploymentDocs, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useCommandQueueTotals } from '../chunk-
|
|
8
|
-
import { getTimeRangeDates, formatBucketTime } from '../chunk-
|
|
9
|
-
import '../chunk-
|
|
5
|
+
import { useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, useDeleteCredential, useCreateCredential, useCredentials, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, showApiErrorNotification, showSuccessNotification, CredentialSchemas, showErrorNotification } from '../chunk-MJ7SDCIL.js';
|
|
6
|
+
export { showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification } from '../chunk-MJ7SDCIL.js';
|
|
7
|
+
import { useCommandViewLayout, useResourcesHealth, useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications, useSubmitAction, useDeleteTask, useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useDeploymentDocs, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useCommandQueueTotals } from '../chunk-LP6CQOHV.js';
|
|
8
|
+
import { getTimeRangeDates, formatBucketTime } from '../chunk-EQNXEBGZ.js';
|
|
9
|
+
import '../chunk-NJJ3NQ7B.js';
|
|
10
10
|
import '../chunk-LHQTTUL2.js';
|
|
11
11
|
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS, useFitViewTrigger, useGraphHighlighting, calculateGraphHeight } from '../chunk-F6RBK7NJ.js';
|
|
12
12
|
export { Graph_module_css_default as graphStyles } from '../chunk-F6RBK7NJ.js';
|
|
13
13
|
import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent, getResourceStatusColor } from '../chunk-XA34RETF.js';
|
|
14
14
|
export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-XA34RETF.js';
|
|
15
15
|
import { ResourceStatusColors, toWorkflowLogMessages } from '../chunk-ELJIFLCB.js';
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
16
|
+
import '../chunk-GU46QC4Z.js';
|
|
17
|
+
import '../chunk-CKFTPEBC.js';
|
|
18
18
|
import '../chunk-RNP5R5I3.js';
|
|
19
|
-
import '../chunk-
|
|
19
|
+
import '../chunk-F5BVI434.js';
|
|
20
20
|
import '../chunk-WNRHQAJA.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import { useAppearance } from '../chunk-HRG3KPL6.js';
|
|
21
|
+
import '../chunk-TBRTRBJV.js';
|
|
23
22
|
import { ElevasisLoader } from '../chunk-SZHARWKU.js';
|
|
24
23
|
export { ElevasisLoader } from '../chunk-SZHARWKU.js';
|
|
25
|
-
import '../chunk-
|
|
24
|
+
import '../chunk-BUN337J3.js';
|
|
25
|
+
import { useAppearance } from '../chunk-QJ2KCHKX.js';
|
|
26
|
+
import '../chunk-HGNP6EVB.js';
|
|
26
27
|
import '../chunk-RULQSZYX.js';
|
|
27
28
|
import { getResourceIcon, getResourceColor, formatChartAxisDate, PAGE_SIZE_DEFAULT, getErrorInfo, formatErrorMessage, formatDateTime } from '../chunk-FCFLBMVI.js';
|
|
28
|
-
import '../chunk-
|
|
29
|
-
import '../chunk-
|
|
30
|
-
import { useInitialization } from '../chunk-
|
|
31
|
-
import { useElevasisServices } from '../chunk-
|
|
29
|
+
import '../chunk-V5GGPIDD.js';
|
|
30
|
+
import '../chunk-ALA56RGZ.js';
|
|
31
|
+
import { useInitialization } from '../chunk-3VTC7OWU.js';
|
|
32
|
+
import { useElevasisServices } from '../chunk-BK4EIWNU.js';
|
|
32
33
|
import { useOrganization } from '../chunk-DD3CCMCZ.js';
|
|
33
|
-
import '../chunk-
|
|
34
|
+
import '../chunk-BRJ3QZ4E.js';
|
|
34
35
|
import { useRouterContext } from '../chunk-Q7DJKLEN.js';
|
|
35
36
|
import { z } from 'zod';
|
|
36
37
|
import { Paper, Stack, Text, Group, Badge, Box, ThemeIcon, useComputedColorScheme, Card, ActionIcon, Modal, Center, Space, Button, Title, TextInput, Table, Textarea, Radio, Checkbox, Select, NumberInput, Tooltip, Loader, SegmentedControl, NumberFormatter, Alert, Switch, Pagination, UnstyledButton, Divider, ScrollArea, Popover, Indicator, Menu, Accordion, Collapse, SimpleGrid, CopyButton, Code, useMantineTheme, Timeline, RangeSlider, Progress, PasswordInput, Anchor } from '@mantine/core';
|
package/dist/hooks/index.css
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
/* src/components/display/ElevasisLoader.module.css */
|
|
2
|
-
.wrapper {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
width: var(--loader-size);
|
|
7
|
-
height: var(--loader-size);
|
|
8
|
-
overflow: visible;
|
|
9
|
-
}
|
|
10
|
-
.loader {
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
display: block;
|
|
14
|
-
overflow: visible;
|
|
15
|
-
}
|
|
16
|
-
.chevron {
|
|
17
|
-
stroke: var(--loader-color);
|
|
18
|
-
stroke-width: 2;
|
|
19
|
-
stroke-linecap: square;
|
|
20
|
-
stroke-linejoin: miter;
|
|
21
|
-
fill: none;
|
|
22
|
-
opacity: 0.15;
|
|
23
|
-
animation: chevronPulse 2s ease-in-out infinite;
|
|
24
|
-
filter: drop-shadow(0 0 1.5px var(--loader-color));
|
|
25
|
-
}
|
|
26
|
-
.c1 {
|
|
27
|
-
animation-delay: 0s;
|
|
28
|
-
}
|
|
29
|
-
.c2 {
|
|
30
|
-
animation-delay: 0.2s;
|
|
31
|
-
}
|
|
32
|
-
.c3 {
|
|
33
|
-
animation-delay: 0.4s;
|
|
34
|
-
}
|
|
35
|
-
@keyframes chevronPulse {
|
|
36
|
-
0%, 100% {
|
|
37
|
-
opacity: 0.12;
|
|
38
|
-
filter: drop-shadow(0 0 1px var(--loader-color));
|
|
39
|
-
}
|
|
40
|
-
40%, 60% {
|
|
41
|
-
opacity: 1;
|
|
42
|
-
filter: drop-shadow(0 0 3px var(--loader-color));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
1
|
/* src/theme/custom.css */
|
|
47
2
|
.mantine-Accordion-control:hover {
|
|
48
3
|
background-color: var(--color-surface-hover);
|
|
@@ -108,6 +63,51 @@
|
|
|
108
63
|
outline: none;
|
|
109
64
|
}
|
|
110
65
|
|
|
66
|
+
/* src/components/display/ElevasisLoader.module.css */
|
|
67
|
+
.wrapper {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
width: var(--loader-size);
|
|
72
|
+
height: var(--loader-size);
|
|
73
|
+
overflow: visible;
|
|
74
|
+
}
|
|
75
|
+
.loader {
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
display: block;
|
|
79
|
+
overflow: visible;
|
|
80
|
+
}
|
|
81
|
+
.chevron {
|
|
82
|
+
stroke: var(--loader-color);
|
|
83
|
+
stroke-width: 2;
|
|
84
|
+
stroke-linecap: square;
|
|
85
|
+
stroke-linejoin: miter;
|
|
86
|
+
fill: none;
|
|
87
|
+
opacity: 0.15;
|
|
88
|
+
animation: chevronPulse 2s ease-in-out infinite;
|
|
89
|
+
filter: drop-shadow(0 0 1.5px var(--loader-color));
|
|
90
|
+
}
|
|
91
|
+
.c1 {
|
|
92
|
+
animation-delay: 0s;
|
|
93
|
+
}
|
|
94
|
+
.c2 {
|
|
95
|
+
animation-delay: 0.2s;
|
|
96
|
+
}
|
|
97
|
+
.c3 {
|
|
98
|
+
animation-delay: 0.4s;
|
|
99
|
+
}
|
|
100
|
+
@keyframes chevronPulse {
|
|
101
|
+
0%, 100% {
|
|
102
|
+
opacity: 0.12;
|
|
103
|
+
filter: drop-shadow(0 0 1px var(--loader-color));
|
|
104
|
+
}
|
|
105
|
+
40%, 60% {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
filter: drop-shadow(0 0 3px var(--loader-color));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
111
|
/* src/graph/Graph.module.css */
|
|
112
112
|
@keyframes edgeFlow {
|
|
113
113
|
0% {
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -6128,7 +6128,7 @@ declare function useUpdateWebhookEndpoint(): _tanstack_react_query.UseMutationRe
|
|
|
6128
6128
|
* Provides a ready-to-use apiRequest function and organization state.
|
|
6129
6129
|
*
|
|
6130
6130
|
* For standalone usage (testing, embedding), use ElevasisServiceProvider directly.
|
|
6131
|
-
* For standard SDK usage,
|
|
6131
|
+
* For standard SDK usage, ElevasisUIProvider composes this automatically when apiUrl is provided.
|
|
6132
6132
|
*/
|
|
6133
6133
|
interface ElevasisServiceContextValue {
|
|
6134
6134
|
apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
|
|
@@ -6140,7 +6140,7 @@ interface ElevasisServiceContextValue {
|
|
|
6140
6140
|
* Hook to access the ElevasisServiceProvider context.
|
|
6141
6141
|
* Provides apiRequest, organizationId, and isReady.
|
|
6142
6142
|
*
|
|
6143
|
-
* Throws if used outside of an ElevasisServiceProvider or
|
|
6143
|
+
* Throws if used outside of an ElevasisServiceProvider or ElevasisUIProvider (with apiUrl).
|
|
6144
6144
|
*/
|
|
6145
6145
|
declare function useElevasisServices(): ElevasisServiceContextValue;
|
|
6146
6146
|
|