@elevasis/ui 1.26.1 → 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 +3 -3
- 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
package/dist/chunk-R7WLWGPO.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { ApiClientProvider, useApiClient } from './chunk-NVOCKXUQ.js';
|
|
2
|
-
import { OrganizationProvider } from './chunk-V7XHGJQZ.js';
|
|
3
|
-
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-IOKL7BKE.js';
|
|
4
|
-
import { InitializationProvider } from './chunk-TUXTSEAF.js';
|
|
5
|
-
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
6
|
-
import { ProfileProvider, ElevasisServiceProvider } from './chunk-QEPXAWE2.js';
|
|
7
|
-
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
8
|
-
import { createContext, lazy, useContext, Suspense, useRef } from 'react';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
10
|
-
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
11
|
-
|
|
12
|
-
var consoleAdapter = {
|
|
13
|
-
success(title, message) {
|
|
14
|
-
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
15
|
-
},
|
|
16
|
-
error(title, message) {
|
|
17
|
-
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
18
|
-
},
|
|
19
|
-
info(title, message) {
|
|
20
|
-
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
21
|
-
},
|
|
22
|
-
warning(title, message) {
|
|
23
|
-
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
24
|
-
},
|
|
25
|
-
apiError(error) {
|
|
26
|
-
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
27
|
-
const title = getErrorTitle(code);
|
|
28
|
-
const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
|
|
29
|
-
console.warn(`[Notification][API Error] ${title}: ${formatted}`);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var NotificationContext = createContext(consoleAdapter);
|
|
33
|
-
function NotificationProvider({ adapter, children }) {
|
|
34
|
-
return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
|
|
35
|
-
}
|
|
36
|
-
function useNotificationAdapter() {
|
|
37
|
-
return useContext(NotificationContext);
|
|
38
|
-
}
|
|
39
|
-
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-I32JCNE7.js').then((m) => ({ default: m.CoreAuthKitInner })));
|
|
40
|
-
var defaultQueryClient = null;
|
|
41
|
-
function getDefaultQueryClient() {
|
|
42
|
-
if (!defaultQueryClient) {
|
|
43
|
-
defaultQueryClient = new QueryClient({
|
|
44
|
-
defaultOptions: { queries: { retry: 1 } }
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return defaultQueryClient;
|
|
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
|
-
};
|
|
66
|
-
function ElevasisCoreProvider({
|
|
67
|
-
auth,
|
|
68
|
-
queryClient,
|
|
69
|
-
apiUrl,
|
|
70
|
-
onError,
|
|
71
|
-
notifications,
|
|
72
|
-
children
|
|
73
|
-
}) {
|
|
74
|
-
if (auth.mode === "apiKey") {
|
|
75
|
-
throw new Error(
|
|
76
|
-
`ElevasisCoreProvider: auth mode 'apiKey' is not yet implemented. Only 'authkit' mode is supported.`
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
|
|
80
|
-
const content = apiUrl ? /* @__PURE__ */ jsx(ServiceStack, { apiUrl, onError, notifications, children }) : children;
|
|
81
|
-
const AuthInner = /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) });
|
|
82
|
-
return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: AuthInner });
|
|
83
|
-
}
|
|
84
|
-
function ServiceStack({
|
|
85
|
-
apiUrl,
|
|
86
|
-
onError,
|
|
87
|
-
notifications,
|
|
88
|
-
children
|
|
89
|
-
}) {
|
|
90
|
-
const { getAccessToken } = useAuthContext();
|
|
91
|
-
const orgIdRef = useRef(null);
|
|
92
|
-
const getOrganizationId = useRef(() => orgIdRef.current).current;
|
|
93
|
-
return /* @__PURE__ */ jsx(
|
|
94
|
-
ApiClientProvider,
|
|
95
|
-
{
|
|
96
|
-
getAccessToken,
|
|
97
|
-
getOrganizationId,
|
|
98
|
-
isOrganizationReady: false,
|
|
99
|
-
onError,
|
|
100
|
-
children: /* @__PURE__ */ jsx(ServiceStackInner, { apiUrl, orgIdRef, notifications, children })
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
function ServiceStackInner({
|
|
105
|
-
apiUrl,
|
|
106
|
-
orgIdRef,
|
|
107
|
-
notifications,
|
|
108
|
-
children
|
|
109
|
-
}) {
|
|
110
|
-
const { apiRequest } = useApiClient(apiUrl);
|
|
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 }) }) });
|
|
113
|
-
}
|
|
114
|
-
function OrgServiceBridge({
|
|
115
|
-
orgIdRef,
|
|
116
|
-
apiRequest,
|
|
117
|
-
notifications,
|
|
118
|
-
children
|
|
119
|
-
}) {
|
|
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 }) }) });
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter };
|