@elevasis/ui 1.2.1 → 1.3.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/api/hooks/useApiClient.d.ts +54 -0
- package/dist/api/hooks/useApiClient.d.ts.map +1 -0
- package/dist/api/hooks/useApiClient.js +185 -0
- package/dist/api/index.d.ts +49 -11
- package/dist/api/index.js +3 -2
- package/dist/auth/index.d.ts +88 -2
- package/dist/auth/index.js +5 -1
- package/dist/{chunk-5UWFGBFM.js → chunk-4KAG5U7A.js} +18 -4
- package/dist/chunk-4VGWQ5AN.js +91 -0
- package/dist/{chunk-JKERRYVS.js → chunk-BLO4SISK.js} +7 -3
- package/dist/chunk-BWCC6ZJC.js +202 -0
- package/dist/{chunk-WNWKOCGJ.js → chunk-BZTA7IIL.js} +1 -1
- package/dist/chunk-DD3CCMCZ.js +15 -0
- package/dist/{chunk-GEFB5YIR.js → chunk-EZMRFWZQ.js} +1 -1
- package/dist/chunk-FDCVFCOQ.js +105 -0
- package/dist/chunk-FLJXZ7YC.js +150 -0
- package/dist/{chunk-7AI5ZYJ4.js → chunk-JVAZHVNV.js} +2 -94
- package/dist/{chunk-ZGHDPDTF.js → chunk-JYSYHVLU.js} +3 -3
- package/dist/{chunk-J3FALDQE.js → chunk-NXHL23JW.js} +7 -13
- package/dist/{chunk-OUHGHTE7.js → chunk-O3PY6B6E.js} +3 -2
- package/dist/{chunk-ZQVPUAGR.js → chunk-OLD3NQLI.js} +33 -31
- package/dist/{chunk-B64YDSAY.js → chunk-PCBXNHKY.js} +53 -97
- package/dist/chunk-QQOLC46E.js +75 -0
- package/dist/chunk-RNP5R5I3.js +1 -0
- package/dist/{chunk-YULUKCS6.js → chunk-SITSZUFW.js} +1 -1
- package/dist/chunk-TIRMFDM4.js +33 -0
- package/dist/{chunk-PYL4XW6H.js → chunk-TMFCNFLW.js} +1 -1
- package/dist/{chunk-S66I2PYB.js → chunk-TN3PU2WK.js} +1 -1
- package/dist/components/command-queue/index.js +6 -4
- package/dist/components/index.js +9 -7
- package/dist/components/notifications/index.js +4 -3
- package/dist/display/index.js +3 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +5 -4
- package/dist/hooks/published.d.ts +1 -1
- package/dist/hooks/published.js +4 -3
- package/dist/index.d.ts +447 -117
- package/dist/index.js +22 -16
- package/dist/initialization/index.d.ts +49 -1
- package/dist/initialization/index.js +5 -2
- package/dist/organization/index.d.ts +61 -2
- package/dist/organization/index.js +5 -2
- package/dist/profile/index.d.ts +30 -2
- package/dist/profile/index.js +2 -1
- package/dist/provider/index.d.ts +112 -27
- package/dist/provider/index.js +11 -6
- package/dist/provider/published.d.ts +85 -13
- package/dist/provider/published.js +10 -4
- package/dist/utils/index.js +2 -1
- package/package.json +17 -4
- package/dist/chunk-GDV44UWF.js +0 -138
- package/dist/chunk-HBRMWW6V.js +0 -43
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OrganizationProvider } from './chunk-FLJXZ7YC.js';
|
|
2
|
+
import { ApiClientProvider, createUseApiClient } from './chunk-BWCC6ZJC.js';
|
|
3
|
+
import { NotificationProvider } from './chunk-TIRMFDM4.js';
|
|
3
4
|
import { OAuthProvider } from './chunk-QSVZP2NU.js';
|
|
5
|
+
import { InitializationProvider } from './chunk-QQOLC46E.js';
|
|
6
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
7
|
+
import { ProfileProvider } from './chunk-4KAG5U7A.js';
|
|
8
|
+
import { ElevasisServiceProvider } from './chunk-KA7LO7U5.js';
|
|
4
9
|
import { useAuthContext } from './chunk-7PLEQFHO.js';
|
|
5
10
|
import { lazy, Suspense, useRef } from 'react';
|
|
6
11
|
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
7
|
-
import { jsx } from 'react/jsx-runtime';
|
|
12
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
8
13
|
|
|
9
14
|
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-KM72EYJS.js').then((m) => ({ default: m.CoreAuthKitInner })));
|
|
10
15
|
var defaultQueryClient = null;
|
|
@@ -19,11 +24,10 @@ function getDefaultQueryClient() {
|
|
|
19
24
|
var defaultUseOrganizations = () => ({ isInitializing: false, isOrgRefreshing: false });
|
|
20
25
|
function ElevasisCoreProvider({
|
|
21
26
|
auth,
|
|
22
|
-
organizationId = null,
|
|
23
27
|
queryClient,
|
|
24
28
|
apiUrl,
|
|
25
29
|
onError,
|
|
26
|
-
|
|
30
|
+
notifications,
|
|
27
31
|
children
|
|
28
32
|
}) {
|
|
29
33
|
if (auth.mode === "apiKey") {
|
|
@@ -32,16 +36,7 @@ function ElevasisCoreProvider({
|
|
|
32
36
|
);
|
|
33
37
|
}
|
|
34
38
|
const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
|
|
35
|
-
const content = apiUrl ? /* @__PURE__ */ jsx(
|
|
36
|
-
CoreServiceBridge,
|
|
37
|
-
{
|
|
38
|
-
apiUrl,
|
|
39
|
-
organizationId,
|
|
40
|
-
isOrganizationReady,
|
|
41
|
-
onError,
|
|
42
|
-
children
|
|
43
|
-
}
|
|
44
|
-
) : children;
|
|
39
|
+
const content = apiUrl ? /* @__PURE__ */ jsx(CoreServiceBridge, { apiUrl, onError, notifications, children }) : children;
|
|
45
40
|
const AuthInner = auth.mode === "authkit" ? /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) }) : /* @__PURE__ */ jsx(CoreOAuthInner, { auth, children: content });
|
|
46
41
|
return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: AuthInner });
|
|
47
42
|
}
|
|
@@ -50,40 +45,47 @@ function CoreOAuthInner({ auth, children }) {
|
|
|
50
45
|
}
|
|
51
46
|
function CoreServiceBridge({
|
|
52
47
|
apiUrl,
|
|
53
|
-
organizationId,
|
|
54
|
-
isOrganizationReady,
|
|
55
48
|
onError,
|
|
49
|
+
notifications,
|
|
56
50
|
children
|
|
57
51
|
}) {
|
|
58
52
|
const { getAccessToken } = useAuthContext();
|
|
53
|
+
const orgIdRef = useRef(null);
|
|
54
|
+
const getOrganizationId = useRef(() => orgIdRef.current).current;
|
|
59
55
|
return /* @__PURE__ */ jsx(
|
|
60
56
|
ApiClientProvider,
|
|
61
57
|
{
|
|
62
58
|
getAccessToken,
|
|
63
|
-
|
|
64
|
-
isOrganizationReady:
|
|
59
|
+
getOrganizationId,
|
|
60
|
+
isOrganizationReady: false,
|
|
65
61
|
onError,
|
|
66
|
-
children: /* @__PURE__ */ jsx(CoreServiceBridgeInner, { apiUrl,
|
|
62
|
+
children: /* @__PURE__ */ jsx(CoreServiceBridgeInner, { apiUrl, orgIdRef, notifications, children })
|
|
67
63
|
}
|
|
68
64
|
);
|
|
69
65
|
}
|
|
70
66
|
function CoreServiceBridgeInner({
|
|
71
67
|
apiUrl,
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
orgIdRef,
|
|
69
|
+
notifications,
|
|
74
70
|
children
|
|
75
71
|
}) {
|
|
76
72
|
const useApiClient = useRef(createUseApiClient(defaultUseOrganizations, apiUrl)).current;
|
|
77
73
|
const { apiRequest } = useApiClient();
|
|
78
|
-
return /* @__PURE__ */ jsx(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
return /* @__PURE__ */ jsx(ElevasisServiceProvider, { apiRequest, organizationId: null, isReady: false, children: /* @__PURE__ */ jsx(ProfileProvider, { children: /* @__PURE__ */ jsx(OrganizationProvider, { children: /* @__PURE__ */ jsx(OrgIdBridge, { orgIdRef, children: /* @__PURE__ */ jsx(CoreNotificationLayer, { notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) }) }) }) }) });
|
|
75
|
+
}
|
|
76
|
+
function OrgIdBridge({ orgIdRef, children }) {
|
|
77
|
+
const { currentWorkOSOrganizationId } = useOrganization();
|
|
78
|
+
orgIdRef.current = currentWorkOSOrganizationId;
|
|
79
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
80
|
+
}
|
|
81
|
+
function CoreNotificationLayer({
|
|
82
|
+
notifications,
|
|
83
|
+
children
|
|
84
|
+
}) {
|
|
85
|
+
if (notifications) {
|
|
86
|
+
return /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children });
|
|
87
|
+
}
|
|
88
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
export { ElevasisCoreProvider };
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { OAuthProvider } from './chunk-QSVZP2NU.js';
|
|
5
|
-
import { useAuthContext } from './chunk-7PLEQFHO.js';
|
|
6
|
-
import { useMemo, useEffect, useRef } from 'react';
|
|
1
|
+
import { ElevasisCoreProvider } from './chunk-OLD3NQLI.js';
|
|
2
|
+
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-4VGWQ5AN.js';
|
|
3
|
+
import { useMemo, useEffect } from 'react';
|
|
7
4
|
import { Tooltip, Text, Tabs, Table, Stack, SimpleGrid, Select, Combobox, SegmentedControl, ScrollArea, Paper, Popover, Notification, Modal, Menu, Input, HoverCard, Group, Grid, Flex, Code, Divider, Card, Button, Accordion, createTheme, mergeThemeOverrides, MantineProvider } from '@mantine/core';
|
|
8
|
-
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
9
|
-
import { AuthKitProvider } from '@workos-inc/authkit-react';
|
|
10
5
|
import '@mantine/core/styles.css';
|
|
11
6
|
import '@mantine/notifications/styles.css';
|
|
7
|
+
import { notifications } from '@mantine/notifications';
|
|
12
8
|
import { jsx } from 'react/jsx-runtime';
|
|
13
9
|
|
|
14
10
|
var DEFAULT_SIZE = "sm";
|
|
@@ -1366,32 +1362,55 @@ function createCssVariablesResolver(tokens, preset) {
|
|
|
1366
1362
|
dark: { ...darkShades, ...darkDefaults, ...flat, ...dark }
|
|
1367
1363
|
});
|
|
1368
1364
|
}
|
|
1369
|
-
var
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1365
|
+
var mantineNotificationAdapter = {
|
|
1366
|
+
success(title, message) {
|
|
1367
|
+
notifications.show({
|
|
1368
|
+
title,
|
|
1369
|
+
message,
|
|
1370
|
+
autoClose: 5e3,
|
|
1371
|
+
color: "green",
|
|
1372
|
+
position: "top-right"
|
|
1373
|
+
});
|
|
1374
|
+
},
|
|
1375
|
+
error(title, message) {
|
|
1376
|
+
notifications.show({
|
|
1377
|
+
title,
|
|
1378
|
+
message,
|
|
1379
|
+
autoClose: 5e3,
|
|
1380
|
+
color: "red",
|
|
1381
|
+
position: "top-right"
|
|
1382
|
+
});
|
|
1383
|
+
},
|
|
1384
|
+
info(title, message) {
|
|
1385
|
+
notifications.show({
|
|
1386
|
+
title,
|
|
1387
|
+
message,
|
|
1388
|
+
autoClose: 5e3,
|
|
1389
|
+
color: "blue",
|
|
1390
|
+
position: "top-right"
|
|
1391
|
+
});
|
|
1392
|
+
},
|
|
1393
|
+
warning(title, message) {
|
|
1394
|
+
notifications.show({
|
|
1395
|
+
title,
|
|
1396
|
+
message,
|
|
1397
|
+
autoClose: 5e3,
|
|
1398
|
+
color: "orange",
|
|
1399
|
+
position: "top-right"
|
|
1400
|
+
});
|
|
1401
|
+
},
|
|
1402
|
+
apiError(error) {
|
|
1403
|
+
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
1404
|
+
notifications.show({
|
|
1405
|
+
title: getErrorTitle(code),
|
|
1406
|
+
message: formatErrorMessage(message, requestId, fields, retryAfter),
|
|
1407
|
+
autoClose: retryAfter ? retryAfter * 1e3 : 5e3,
|
|
1408
|
+
color: "red",
|
|
1409
|
+
position: "top-right"
|
|
1374
1410
|
});
|
|
1375
1411
|
}
|
|
1376
|
-
|
|
1377
|
-
}
|
|
1378
|
-
var defaultUseOrganizations = () => ({ isInitializing: false, isOrgRefreshing: false });
|
|
1379
|
-
function ElevasisUIProvider({
|
|
1380
|
-
auth,
|
|
1381
|
-
theme,
|
|
1382
|
-
organizationId = null,
|
|
1383
|
-
queryClient,
|
|
1384
|
-
apiUrl,
|
|
1385
|
-
onError,
|
|
1386
|
-
isOrganizationReady,
|
|
1387
|
-
children
|
|
1388
|
-
}) {
|
|
1389
|
-
if (auth.mode === "apiKey") {
|
|
1390
|
-
throw new Error(
|
|
1391
|
-
`ElevasisUIProvider: auth mode 'apiKey' is not yet implemented. Only 'authkit' and 'oauth' modes are supported.`
|
|
1392
|
-
);
|
|
1393
|
-
}
|
|
1394
|
-
const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
|
|
1412
|
+
};
|
|
1413
|
+
function ElevasisUIProvider({ theme, children, ...coreProps }) {
|
|
1395
1414
|
const resolvedColorScheme = theme?.colorScheme ?? "dark";
|
|
1396
1415
|
const preset = useMemo(() => getPreset(theme?.preset ?? "default"), [theme?.preset]);
|
|
1397
1416
|
useEffect(() => {
|
|
@@ -1426,79 +1445,16 @@ function ElevasisUIProvider({
|
|
|
1426
1445
|
() => createCssVariablesResolver(theme?.tokens, theme?.preset),
|
|
1427
1446
|
[theme?.tokens, theme?.preset]
|
|
1428
1447
|
);
|
|
1429
|
-
const content = apiUrl ? /* @__PURE__ */ jsx(
|
|
1430
|
-
ServiceBridge,
|
|
1431
|
-
{
|
|
1432
|
-
apiUrl,
|
|
1433
|
-
organizationId,
|
|
1434
|
-
isOrganizationReady,
|
|
1435
|
-
onError,
|
|
1436
|
-
children
|
|
1437
|
-
}
|
|
1438
|
-
) : children;
|
|
1439
|
-
const AuthInner = auth.mode === "authkit" ? /* @__PURE__ */ jsx(AuthKitInner, { auth, children: content }) : /* @__PURE__ */ jsx(OAuthInner, { auth, children: content });
|
|
1440
1448
|
return /* @__PURE__ */ jsx(
|
|
1441
1449
|
MantineProvider,
|
|
1442
1450
|
{
|
|
1443
1451
|
theme: resolvedTheme,
|
|
1444
1452
|
defaultColorScheme: resolvedColorScheme,
|
|
1445
1453
|
cssVariablesResolver,
|
|
1446
|
-
children: /* @__PURE__ */ jsx(
|
|
1447
|
-
}
|
|
1448
|
-
);
|
|
1449
|
-
}
|
|
1450
|
-
function AuthKitInner({ auth, children }) {
|
|
1451
|
-
return /* @__PURE__ */ jsx(
|
|
1452
|
-
AuthKitProvider,
|
|
1453
|
-
{
|
|
1454
|
-
clientId: auth.clientId,
|
|
1455
|
-
apiHostname: auth.apiHostname ?? "api.workos.com",
|
|
1456
|
-
redirectUri: auth.redirectUri,
|
|
1457
|
-
devMode: auth.devMode ?? false,
|
|
1458
|
-
children: /* @__PURE__ */ jsx(WorkOSAuthBridge, { children })
|
|
1459
|
-
}
|
|
1460
|
-
);
|
|
1461
|
-
}
|
|
1462
|
-
function OAuthInner({ auth, children }) {
|
|
1463
|
-
return /* @__PURE__ */ jsx(OAuthProvider, { config: auth, children });
|
|
1464
|
-
}
|
|
1465
|
-
function ServiceBridge({
|
|
1466
|
-
apiUrl,
|
|
1467
|
-
organizationId,
|
|
1468
|
-
isOrganizationReady,
|
|
1469
|
-
onError,
|
|
1470
|
-
children
|
|
1471
|
-
}) {
|
|
1472
|
-
const { getAccessToken } = useAuthContext();
|
|
1473
|
-
return /* @__PURE__ */ jsx(
|
|
1474
|
-
ApiClientProvider,
|
|
1475
|
-
{
|
|
1476
|
-
getAccessToken,
|
|
1477
|
-
organizationId,
|
|
1478
|
-
isOrganizationReady: isOrganizationReady ?? !!organizationId,
|
|
1479
|
-
onError,
|
|
1480
|
-
children: /* @__PURE__ */ jsx(ServiceBridgeInner, { apiUrl, organizationId, isOrganizationReady, children })
|
|
1481
|
-
}
|
|
1482
|
-
);
|
|
1483
|
-
}
|
|
1484
|
-
function ServiceBridgeInner({
|
|
1485
|
-
apiUrl,
|
|
1486
|
-
organizationId,
|
|
1487
|
-
isOrganizationReady,
|
|
1488
|
-
children
|
|
1489
|
-
}) {
|
|
1490
|
-
const useApiClient = useRef(createUseApiClient(defaultUseOrganizations, apiUrl)).current;
|
|
1491
|
-
const { apiRequest } = useApiClient();
|
|
1492
|
-
return /* @__PURE__ */ jsx(
|
|
1493
|
-
ElevasisServiceProvider,
|
|
1494
|
-
{
|
|
1495
|
-
apiRequest,
|
|
1496
|
-
organizationId,
|
|
1497
|
-
isReady: isOrganizationReady ?? !!organizationId,
|
|
1498
|
-
children
|
|
1454
|
+
children: /* @__PURE__ */ jsx(ElevasisCoreProvider, { notifications: mantineNotificationAdapter, ...coreProps, children })
|
|
1499
1455
|
}
|
|
1500
1456
|
);
|
|
1501
1457
|
}
|
|
1502
1458
|
var ElevasisProvider = ElevasisUIProvider;
|
|
1503
1459
|
|
|
1504
|
-
export { ElevasisProvider, ElevasisUIProvider, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride };
|
|
1460
|
+
export { ElevasisProvider, ElevasisUIProvider, createCssVariablesResolver, generateShades, getPreset, mantineNotificationAdapter, mantineThemeOverride };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
2
|
+
import { useProfile } from './chunk-4KAG5U7A.js';
|
|
3
|
+
import { useAuthContext } from './chunk-7PLEQFHO.js';
|
|
4
|
+
import { createContext, useContext, useMemo, useCallback, createElement } from 'react';
|
|
5
|
+
|
|
6
|
+
var InitializationContext = createContext(null);
|
|
7
|
+
function useInitialization() {
|
|
8
|
+
const ctx = useContext(InitializationContext);
|
|
9
|
+
if (!ctx) {
|
|
10
|
+
throw new Error(
|
|
11
|
+
"useInitialization must be used within an InitializationProvider. Wrap your app (or the relevant subtree) with <InitializationProvider>."
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
16
|
+
function InitializationProvider({ children }) {
|
|
17
|
+
const { user, isLoading: authLoading } = useAuthContext();
|
|
18
|
+
const { profile, loading: profileLoading, error: profileError, refetch } = useProfile();
|
|
19
|
+
const {
|
|
20
|
+
isInitializing: orgInitializing,
|
|
21
|
+
isOrgRefreshing: orgLoading,
|
|
22
|
+
error: orgErrorMsg,
|
|
23
|
+
currentWorkOSOrganizationId,
|
|
24
|
+
memberships,
|
|
25
|
+
retry: orgRetry
|
|
26
|
+
} = useOrganization();
|
|
27
|
+
const isInitializing = authLoading || profileLoading || orgInitializing || orgLoading;
|
|
28
|
+
const userReady = !authLoading && !profileLoading && !!user && !!profile && !profileError;
|
|
29
|
+
const organizationReady = userReady && !orgInitializing && !orgLoading && !!currentWorkOSOrganizationId && !orgErrorMsg;
|
|
30
|
+
const allReady = organizationReady;
|
|
31
|
+
const error = useMemo(() => {
|
|
32
|
+
if (profileError) {
|
|
33
|
+
return {
|
|
34
|
+
layer: "profile",
|
|
35
|
+
message: "Failed to load user profile",
|
|
36
|
+
originalError: profileError
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (orgErrorMsg) {
|
|
40
|
+
return {
|
|
41
|
+
layer: "organization",
|
|
42
|
+
message: orgErrorMsg,
|
|
43
|
+
originalError: new Error(orgErrorMsg)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (userReady && !orgInitializing && !orgLoading && !currentWorkOSOrganizationId && memberships.length > 0) {
|
|
47
|
+
return {
|
|
48
|
+
layer: "organization",
|
|
49
|
+
message: "No organization membership found. Please contact your administrator for an invitation."
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}, [profileError, orgErrorMsg, userReady, orgInitializing, orgLoading, currentWorkOSOrganizationId, memberships]);
|
|
54
|
+
const retry = useCallback(async () => {
|
|
55
|
+
if (profileError && refetch) {
|
|
56
|
+
await refetch();
|
|
57
|
+
}
|
|
58
|
+
await orgRetry();
|
|
59
|
+
}, [profileError, refetch, orgRetry]);
|
|
60
|
+
const value = useMemo(
|
|
61
|
+
() => ({
|
|
62
|
+
userReady,
|
|
63
|
+
organizationReady,
|
|
64
|
+
allReady,
|
|
65
|
+
isInitializing,
|
|
66
|
+
error,
|
|
67
|
+
retry,
|
|
68
|
+
profile
|
|
69
|
+
}),
|
|
70
|
+
[userReady, organizationReady, allReady, isInitializing, error, retry, profile]
|
|
71
|
+
);
|
|
72
|
+
return createElement(InitializationContext.Provider, { value }, children);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { InitializationContext, InitializationProvider, useInitialization };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-4VGWQ5AN.js';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var consoleAdapter = {
|
|
6
|
+
success(title, message) {
|
|
7
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
8
|
+
},
|
|
9
|
+
error(title, message) {
|
|
10
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
11
|
+
},
|
|
12
|
+
info(title, message) {
|
|
13
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
14
|
+
},
|
|
15
|
+
warning(title, message) {
|
|
16
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
17
|
+
},
|
|
18
|
+
apiError(error) {
|
|
19
|
+
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
20
|
+
const title = getErrorTitle(code);
|
|
21
|
+
const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
|
|
22
|
+
console.warn(`[Notification][API Error] ${title}: ${formatted}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var NotificationContext = createContext(consoleAdapter);
|
|
26
|
+
function NotificationProvider({ adapter, children }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
|
|
28
|
+
}
|
|
29
|
+
function useNotificationAdapter() {
|
|
30
|
+
return useContext(NotificationContext);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { NotificationProvider, useNotificationAdapter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications } from './chunk-
|
|
1
|
+
import { useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications } from './chunk-BLO4SISK.js';
|
|
2
2
|
import { UnstyledButton, Group, Box, Stack, Text, Center, Loader, Button, Divider, ScrollArea, Popover, Tooltip, Indicator, ActionIcon } from '@mantine/core';
|
|
3
3
|
import { IconCircle, IconCircleFilled, IconBell } from '@tabler/icons-react';
|
|
4
4
|
import { formatDistanceToNow } from 'date-fns';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomModal } from './chunk-
|
|
1
|
+
import { CustomModal } from './chunk-JYSYHVLU.js';
|
|
2
2
|
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
3
3
|
import { memo, useState, useCallback, cloneElement, useRef, useEffect, useMemo } from 'react';
|
|
4
4
|
import { Stack, Group, Text, Tooltip, ActionIcon, Paper, Textarea, Box, Collapse, Center, Space, Button, Title, TextInput, Alert, Badge, Progress, Loader } from '@mantine/core';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { ActionModal, TaskCard, getIcon, iconMap } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { ActionModal, TaskCard, getIcon, iconMap } from '../../chunk-JYSYHVLU.js';
|
|
2
|
+
import '../../chunk-NXHL23JW.js';
|
|
3
3
|
export { FormFieldRenderer } from '../../chunk-PSLKGOBZ.js';
|
|
4
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-O3PY6B6E.js';
|
|
5
5
|
import '../../chunk-3KMDHCAR.js';
|
|
6
6
|
import '../../chunk-YZ6GTZXL.js';
|
|
7
|
+
import '../../chunk-TIRMFDM4.js';
|
|
8
|
+
import '../../chunk-JVAZHVNV.js';
|
|
9
|
+
import '../../chunk-4VGWQ5AN.js';
|
|
7
10
|
import '../../chunk-KA7LO7U5.js';
|
|
8
|
-
import '../../chunk-7AI5ZYJ4.js';
|
|
9
11
|
import '../../chunk-7PLEQFHO.js';
|
|
10
12
|
import '../../chunk-Q7DJKLEN.js';
|
package/dist/components/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
export { ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, ConfirmationInputModal, ConfirmationModal, MessageBubble } from '../chunk-
|
|
1
|
+
export { ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, ConfirmationInputModal, ConfirmationModal, MessageBubble } from '../chunk-TN3PU2WK.js';
|
|
2
2
|
export { ExecutionLogsTable, ResourceHealthChart, getHealthColor } from '../chunk-NE36BUGQ.js';
|
|
3
3
|
import '../chunk-W7ZBF5AA.js';
|
|
4
|
-
export { ActionModal, CustomModal, TaskCard, getIcon, iconMap } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
export { ActionModal, CustomModal, TaskCard, getIcon, iconMap } from '../chunk-JYSYHVLU.js';
|
|
5
|
+
import '../chunk-NXHL23JW.js';
|
|
6
6
|
export { FormFieldRenderer } from '../chunk-PSLKGOBZ.js';
|
|
7
|
-
export { NotificationBell, NotificationItem, NotificationList, NotificationPanel } from '../chunk-
|
|
8
|
-
import '../chunk-
|
|
7
|
+
export { NotificationBell, NotificationItem, NotificationList, NotificationPanel } from '../chunk-TMFCNFLW.js';
|
|
8
|
+
import '../chunk-BLO4SISK.js';
|
|
9
9
|
export { AgentDefinitionDisplay, CollapsibleJsonSection, ConfigCard, ContractDisplay, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, ResourceDefinitionSection, ToolsListDisplay, WorkflowDefinitionDisplay, useNewKnowledgeMapLayout } from '../chunk-OXVOHOP3.js';
|
|
10
10
|
import '../chunk-6BJOYF6E.js';
|
|
11
11
|
import '../chunk-HUWJXLLF.js';
|
|
12
|
-
export { APIErrorAlert, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, NavigationButton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-
|
|
12
|
+
export { APIErrorAlert, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, NavigationButton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-O3PY6B6E.js';
|
|
13
13
|
export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
|
|
14
14
|
import '../chunk-YZ6GTZXL.js';
|
|
15
|
+
import '../chunk-TIRMFDM4.js';
|
|
16
|
+
import '../chunk-JVAZHVNV.js';
|
|
17
|
+
import '../chunk-4VGWQ5AN.js';
|
|
15
18
|
import '../chunk-KA7LO7U5.js';
|
|
16
|
-
import '../chunk-7AI5ZYJ4.js';
|
|
17
19
|
import '../chunk-7PLEQFHO.js';
|
|
18
20
|
import '../chunk-Q7DJKLEN.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { NotificationBell, NotificationItem, NotificationList, NotificationPanel } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { NotificationBell, NotificationItem, NotificationList, NotificationPanel } from '../../chunk-TMFCNFLW.js';
|
|
2
|
+
import '../../chunk-BLO4SISK.js';
|
|
3
|
+
import '../../chunk-TIRMFDM4.js';
|
|
4
|
+
import '../../chunk-4VGWQ5AN.js';
|
|
3
5
|
import '../../chunk-KA7LO7U5.js';
|
|
4
|
-
import '../../chunk-7AI5ZYJ4.js';
|
package/dist/display/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { APIErrorAlert, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, NavigationButton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-
|
|
1
|
+
export { APIErrorAlert, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, NavigationButton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-O3PY6B6E.js';
|
|
2
2
|
export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
|
|
3
3
|
import '../chunk-YZ6GTZXL.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-JVAZHVNV.js';
|
|
5
|
+
import '../chunk-4VGWQ5AN.js';
|
|
5
6
|
import '../chunk-7PLEQFHO.js';
|
|
6
7
|
import '../chunk-Q7DJKLEN.js';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1740,7 +1740,7 @@ declare function useGetExecutionHistory(scheduleId: string | undefined, options?
|
|
|
1740
1740
|
executions: {
|
|
1741
1741
|
id: string;
|
|
1742
1742
|
createdAt: string;
|
|
1743
|
-
status: "
|
|
1743
|
+
status: "completed" | "failed" | "running" | "cancelled";
|
|
1744
1744
|
step: number | null;
|
|
1745
1745
|
itemLabel: string | null;
|
|
1746
1746
|
duration: number | null;
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../chunk-Q47SPRY7.js';
|
|
2
|
-
export { OperationsService, executionsKeys, observabilityKeys, scheduleKeys, useActivities, useActivityTrend, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutions, useGetExecutionHistory, useGetSchedule, useListSchedules, usePauseSchedule, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useTopFailingResources, useUnresolveError, useUpdateAnchor, useUpdateSchedule } from '../chunk-
|
|
3
|
-
export { useCommandQueue, useCommandQueueTotals, useDeleteTask, usePatchTask, useSubmitAction } from '../chunk-
|
|
4
|
-
export { useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications } from '../chunk-
|
|
2
|
+
export { OperationsService, executionsKeys, observabilityKeys, scheduleKeys, useActivities, useActivityTrend, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutions, useGetExecutionHistory, useGetSchedule, useListSchedules, usePauseSchedule, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useTopFailingResources, useUnresolveError, useUpdateAnchor, useUpdateSchedule } from '../chunk-BZTA7IIL.js';
|
|
3
|
+
export { useCommandQueue, useCommandQueueTotals, useDeleteTask, usePatchTask, useSubmitAction } from '../chunk-NXHL23JW.js';
|
|
4
|
+
export { useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications } from '../chunk-BLO4SISK.js';
|
|
5
|
+
import '../chunk-TIRMFDM4.js';
|
|
6
|
+
import '../chunk-4VGWQ5AN.js';
|
|
5
7
|
import '../chunk-KA7LO7U5.js';
|
|
6
|
-
import '../chunk-7AI5ZYJ4.js';
|
|
@@ -1225,7 +1225,7 @@ declare function useGetExecutionHistory(scheduleId: string | undefined, options?
|
|
|
1225
1225
|
executions: {
|
|
1226
1226
|
id: string;
|
|
1227
1227
|
createdAt: string;
|
|
1228
|
-
status: "
|
|
1228
|
+
status: "completed" | "failed" | "running" | "cancelled";
|
|
1229
1229
|
step: number | null;
|
|
1230
1230
|
itemLabel: string | null;
|
|
1231
1231
|
duration: number | null;
|
package/dist/hooks/published.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { OperationsService, executionsKeys, observabilityKeys, scheduleKeys, useActivities, useActivityTrend, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutions, useGetExecutionHistory, useGetSchedule, useListSchedules, usePauseSchedule, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useTopFailingResources, useUnresolveError, useUpdateAnchor, useUpdateSchedule } from '../chunk-
|
|
2
|
-
export { useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications } from '../chunk-
|
|
1
|
+
export { OperationsService, executionsKeys, observabilityKeys, scheduleKeys, useActivities, useActivityTrend, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutions, useGetExecutionHistory, useGetSchedule, useListSchedules, usePauseSchedule, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useTopFailingResources, useUnresolveError, useUpdateAnchor, useUpdateSchedule } from '../chunk-BZTA7IIL.js';
|
|
2
|
+
export { useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications } from '../chunk-BLO4SISK.js';
|
|
3
|
+
import '../chunk-TIRMFDM4.js';
|
|
4
|
+
import '../chunk-4VGWQ5AN.js';
|
|
3
5
|
import '../chunk-KA7LO7U5.js';
|
|
4
|
-
import '../chunk-7AI5ZYJ4.js';
|