@elevasis/ui 2.18.0 → 2.20.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-I32JCNE7.js → CoreAuthKitInner-QC62UHTZ.js} +1 -0
- package/dist/api/index.js +3 -2
- package/dist/app/index.js +6 -5
- package/dist/auth/context.js +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/charts/index.js +4 -3
- package/dist/{chunk-LT33DSMO.js → chunk-2CFOFSSG.js} +4 -4
- package/dist/chunk-3JCMO7SD.js +14 -0
- package/dist/chunk-7XKCG5CT.js +125 -0
- package/dist/{chunk-SQPM2QDH.js → chunk-BHR7IV72.js} +3 -2
- package/dist/{chunk-DDZMBNTY.js → chunk-CTTY6FUT.js} +2 -2
- package/dist/chunk-DRQPEMJI.js +42 -0
- package/dist/{chunk-EY322HXF.js → chunk-FMFX4K6E.js} +19 -6
- package/dist/{chunk-UA36WILN.js → chunk-GP3AFJYG.js} +145 -211
- package/dist/{chunk-P6TC4K7I.js → chunk-GTYUP7MB.js} +4 -4
- package/dist/chunk-HJ4CJIWN.js +38 -0
- package/dist/chunk-I2KLQ2HA.js +19 -0
- package/dist/{chunk-B6FIIEFO.js → chunk-JR5WNTLA.js} +128 -117
- package/dist/{chunk-A2AZY5SF.js → chunk-LR5CRY5A.js} +1 -1
- package/dist/{chunk-GRGRBWIO.js → chunk-M7W7CGPL.js} +1 -1
- package/dist/{chunk-SS2UVUSG.js → chunk-MZFJWCPH.js} +73 -121
- package/dist/{chunk-P3TFNFZS.js → chunk-OUYH2SBS.js} +3 -3
- package/dist/{chunk-66VY5EMV.js → chunk-PJVG3ISO.js} +5 -5
- package/dist/{chunk-I3LQGLUC.js → chunk-Q4QJOSVS.js} +1 -1
- package/dist/{chunk-R73EHHPN.js → chunk-Q5HC6ENG.js} +18 -2
- package/dist/{chunk-VDM6DQES.js → chunk-R7OJCNL3.js} +1 -1
- package/dist/{chunk-6RWMRQN5.js → chunk-TIIPYB2Z.js} +1 -1
- package/dist/{chunk-34NQLV2W.js → chunk-TO7QXDBX.js} +3 -3
- package/dist/{chunk-WP3IYOVJ.js → chunk-YP6T426C.js} +107 -56
- package/dist/{chunk-FM6LSZ45.js → chunk-ZE2KQSHL.js} +4 -4
- package/dist/components/chat/index.js +1 -0
- package/dist/components/index.d.ts +218 -2808
- package/dist/components/index.js +26 -25
- package/dist/components/navigation/index.js +1 -0
- package/dist/execution/index.js +1 -0
- package/dist/features/auth/index.js +1 -0
- package/dist/features/crm/index.d.ts +54 -53
- package/dist/features/crm/index.js +12 -11
- package/dist/features/dashboard/index.js +13 -12
- package/dist/features/delivery/index.d.ts +2642 -2605
- package/dist/features/delivery/index.js +12 -11
- package/dist/features/lead-gen/index.js +12 -22
- package/dist/features/monitoring/index.js +14 -13
- package/dist/features/monitoring/requests/index.d.ts +38 -27
- package/dist/features/monitoring/requests/index.js +213 -106
- package/dist/features/operations/index.d.ts +8 -26
- package/dist/features/operations/index.js +16 -15
- package/dist/features/seo/index.js +1 -0
- package/dist/features/settings/index.d.ts +36 -37
- package/dist/features/settings/index.js +13 -12
- package/dist/graph/index.js +1 -0
- package/dist/hooks/delivery/index.d.ts +2712 -2699
- package/dist/hooks/delivery/index.js +3 -2
- package/dist/hooks/index.d.ts +1674 -4617
- package/dist/hooks/index.js +11 -10
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -0
- package/dist/hooks/published.d.ts +1674 -4617
- package/dist/hooks/published.js +11 -10
- package/dist/index.d.ts +773 -3635
- package/dist/index.js +12 -11
- package/dist/initialization/index.js +1 -0
- package/dist/layout/index.d.ts +14 -2
- package/dist/layout/index.js +2 -1
- package/dist/organization/index.js +1 -0
- package/dist/profile/index.js +1 -0
- package/dist/provider/ElevasisServiceContext.js +1 -0
- package/dist/provider/index.d.ts +320 -249
- package/dist/provider/index.js +9 -8
- package/dist/provider/published.d.ts +320 -249
- package/dist/provider/published.js +6 -5
- package/dist/router/context.js +1 -0
- package/dist/router/index.js +1 -0
- package/dist/sse/index.d.ts +1 -6
- package/dist/sse/index.js +1 -1
- package/dist/supabase/index.js +1 -0
- package/dist/test-utils/index.d.ts +117 -0
- package/dist/test-utils/index.js +136 -0
- package/dist/test-utils/setup-integration.d.ts +2 -0
- package/dist/test-utils/setup-integration.js +26 -0
- package/dist/test-utils/setup.d.ts +2 -0
- package/dist/test-utils/setup.js +47 -0
- package/dist/theme/index.js +3 -2
- package/dist/typeform/index.js +1 -0
- package/dist/typeform/schemas.js +1 -0
- package/dist/types/index.d.ts +1604 -2489
- package/dist/utils/index.d.ts +32 -1
- package/dist/utils/index.js +2 -1
- package/dist/zustand/index.d.ts +4 -8
- package/dist/zustand/index.js +2 -0
- package/package.json +33 -5
- package/src/test-utils/README.md +5 -0
- package/dist/chunk-ADSSLKKP.js +0 -10
- /package/dist/{chunk-GCBWGGI6.js → chunk-OD7GWIZS.js} +0 -0
package/dist/api/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../chunk-XCYKC6OZ.js';
|
|
2
|
-
export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-R7OJCNL3.js';
|
|
3
|
+
import '../chunk-OD7GWIZS.js';
|
|
4
4
|
import '../chunk-KRWALB24.js';
|
|
5
5
|
import '../chunk-DD3CCMCZ.js';
|
|
6
|
+
import '../chunk-I2KLQ2HA.js';
|
package/dist/app/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { ElevasisUIProvider } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { ElevasisUIProvider } from '../chunk-TO7QXDBX.js';
|
|
2
|
+
import '../chunk-Q5HC6ENG.js';
|
|
3
3
|
import '../chunk-WLOQ4IBG.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-OUYH2SBS.js';
|
|
5
5
|
import '../chunk-SZHARWKU.js';
|
|
6
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-R7OJCNL3.js';
|
|
7
7
|
import '../chunk-6IA2OMAE.js';
|
|
8
8
|
import '../chunk-QJ2KCHKX.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-OD7GWIZS.js';
|
|
10
10
|
import '../chunk-KRWALB24.js';
|
|
11
11
|
import { useInitialization } from '../chunk-DK2HVHCY.js';
|
|
12
12
|
import '../chunk-DD3CCMCZ.js';
|
|
13
13
|
import '../chunk-QHSW4WHM.js';
|
|
14
14
|
import '../chunk-IRW7JMQ4.js';
|
|
15
15
|
import '../chunk-BRJ3QZ4E.js';
|
|
16
|
+
import '../chunk-I2KLQ2HA.js';
|
|
16
17
|
import { useCallback, useEffect } from 'react';
|
|
17
18
|
import { RouterProvider } from '@tanstack/react-router';
|
|
18
19
|
import { Notifications } from '@mantine/notifications';
|
package/dist/auth/context.js
CHANGED
package/dist/auth/index.js
CHANGED
package/dist/charts/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-
|
|
1
|
+
export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-CTTY6FUT.js';
|
|
2
2
|
import '../chunk-QSTH6T77.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-BHR7IV72.js';
|
|
4
4
|
import '../chunk-SZHARWKU.js';
|
|
5
5
|
import '../chunk-3KMDHCAR.js';
|
|
6
6
|
import '../chunk-NYBEU5TE.js';
|
|
7
7
|
import '../chunk-2IFYDILW.js';
|
|
8
8
|
import '../chunk-Q7DJKLEN.js';
|
|
9
9
|
import '../chunk-DT3QYZVU.js';
|
|
10
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-OD7GWIZS.js';
|
|
11
11
|
import '../chunk-KRWALB24.js';
|
|
12
12
|
import '../chunk-SLH2QLKV.js';
|
|
13
13
|
import '../chunk-DK2HVHCY.js';
|
|
@@ -15,3 +15,4 @@ import '../chunk-DD3CCMCZ.js';
|
|
|
15
15
|
import '../chunk-QHSW4WHM.js';
|
|
16
16
|
import '../chunk-IRW7JMQ4.js';
|
|
17
17
|
import '../chunk-BRJ3QZ4E.js';
|
|
18
|
+
import '../chunk-I2KLQ2HA.js';
|
|
@@ -4,11 +4,11 @@ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
|
4
4
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
5
5
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
6
6
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
7
|
-
import { useDealTasksDue, useDealsLookup, useCreateDealTask, useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany } from './chunk-
|
|
7
|
+
import { useDealTasksDue, useDealsLookup, useCreateDealTask, useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany } from './chunk-FMFX4K6E.js';
|
|
8
8
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
9
|
-
import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-
|
|
9
|
+
import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-BHR7IV72.js';
|
|
10
10
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
11
|
-
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-
|
|
11
|
+
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-OD7GWIZS.js';
|
|
12
12
|
import { useElevasisServices } from './chunk-IRW7JMQ4.js';
|
|
13
13
|
import { Box, Stack, Group, Text, Badge, Center, Loader, UnstyledButton, Button, Modal, Title, Select, TextInput, Textarea, Paper, Alert, SimpleGrid, Table, Checkbox, Pagination, ActionIcon, Tabs, Card, Code, Divider, Anchor } from '@mantine/core';
|
|
14
14
|
import { IconLayoutGrid, IconColumns, IconFileInvoice, IconAddressBook, IconTrophy, IconClockExclamation, IconUser, IconPlus, IconChecklist, IconAlertCircle, IconHistory, IconSearch, IconTargetArrow, IconAlertTriangle, IconArrowLeft, IconFileText, IconTrash, IconX, IconBuilding, IconCheckbox, IconCalendar, IconMail, IconPhone, IconArrowRight, IconNote } from '@tabler/icons-react';
|
|
@@ -642,7 +642,7 @@ function CrmOverview({
|
|
|
642
642
|
getDealValue,
|
|
643
643
|
renderActions
|
|
644
644
|
}) {
|
|
645
|
-
const rightSection = renderActions ? renderActions() : /* @__PURE__ */ jsx(Button, { leftSection: /* @__PURE__ */ jsx(IconColumns, { size: 16 }), variant: "light", size: "
|
|
645
|
+
const rightSection = renderActions ? renderActions() : /* @__PURE__ */ jsx(Button, { leftSection: /* @__PURE__ */ jsx(IconColumns, { size: 16 }), variant: "light", size: "xs", onClick: onGoToPipeline, children: "Go to Pipeline" });
|
|
646
646
|
return /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
647
647
|
/* @__PURE__ */ jsx(
|
|
648
648
|
PageTitleCaption,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
2
|
+
import { Center, Box } from '@mantine/core';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function SubshellLoader() {
|
|
6
|
+
const { loader } = useAppearance();
|
|
7
|
+
return /* @__PURE__ */ jsx(Center, { mih: "calc(100vh - 70px)", children: loader });
|
|
8
|
+
}
|
|
9
|
+
function SubshellSidebarLoader({ padding = "sm" }) {
|
|
10
|
+
const { loader } = useAppearance();
|
|
11
|
+
return /* @__PURE__ */ jsx(Box, { style: { flex: 1, minHeight: 0, display: "flex" }, children: /* @__PURE__ */ jsx(Center, { p: padding, style: { flex: 1, minHeight: 0 }, children: loader }) });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { SubshellLoader, SubshellSidebarLoader };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { http, HttpResponse } from 'msw';
|
|
2
|
+
import { setupServer } from 'msw/node';
|
|
3
|
+
|
|
4
|
+
// src/test-utils/mocks/handlers.ts
|
|
5
|
+
var API_BASE = "http://localhost:5170/api";
|
|
6
|
+
var SUPABASE_BASE = "https://eoavcmtocongsqzwxgdp.supabase.co/rest/v1";
|
|
7
|
+
var handlers = [
|
|
8
|
+
http.post(`${API_BASE}/organizations`, async ({ request }) => {
|
|
9
|
+
const body = await request.json();
|
|
10
|
+
return HttpResponse.json({
|
|
11
|
+
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
12
|
+
name: body.name,
|
|
13
|
+
status: "active",
|
|
14
|
+
is_test: false,
|
|
15
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
16
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
17
|
+
metadata: null
|
|
18
|
+
});
|
|
19
|
+
}),
|
|
20
|
+
http.put(`${API_BASE}/organizations/:id`, async ({ request, params }) => {
|
|
21
|
+
const body = await request.json();
|
|
22
|
+
return HttpResponse.json({
|
|
23
|
+
id: params.id,
|
|
24
|
+
name: body.name,
|
|
25
|
+
workos_org_id: "wos_123",
|
|
26
|
+
status: "active",
|
|
27
|
+
is_test: false,
|
|
28
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
30
|
+
});
|
|
31
|
+
}),
|
|
32
|
+
http.post(`${API_BASE}/users`, async ({ request }) => {
|
|
33
|
+
const body = await request.json();
|
|
34
|
+
return HttpResponse.json({
|
|
35
|
+
id: "user-123",
|
|
36
|
+
email: body.email,
|
|
37
|
+
first_name: body.first_name ?? null,
|
|
38
|
+
last_name: body.last_name ?? null,
|
|
39
|
+
is_platform_admin: body.is_platform_admin ?? false,
|
|
40
|
+
is_active: true,
|
|
41
|
+
workos_user_id: "wos_user_123",
|
|
42
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
43
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
44
|
+
});
|
|
45
|
+
}),
|
|
46
|
+
http.put(`${API_BASE}/users/:workosUserId`, async ({ request, params }) => {
|
|
47
|
+
const body = await request.json();
|
|
48
|
+
return HttpResponse.json({
|
|
49
|
+
id: "user-123",
|
|
50
|
+
email: "test@example.com",
|
|
51
|
+
first_name: body.firstName ?? null,
|
|
52
|
+
last_name: body.lastName ?? null,
|
|
53
|
+
is_platform_admin: false,
|
|
54
|
+
is_active: true,
|
|
55
|
+
workos_user_id: params.workosUserId,
|
|
56
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
57
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
58
|
+
});
|
|
59
|
+
}),
|
|
60
|
+
http.delete(`${API_BASE}/users/:workosUserId`, () => HttpResponse.json({ success: true })),
|
|
61
|
+
http.get(
|
|
62
|
+
`${SUPABASE_BASE}/users`,
|
|
63
|
+
() => HttpResponse.json([
|
|
64
|
+
{
|
|
65
|
+
id: "user-123",
|
|
66
|
+
email: "test@example.com",
|
|
67
|
+
first_name: "Updated",
|
|
68
|
+
last_name: "User",
|
|
69
|
+
is_platform_admin: false,
|
|
70
|
+
is_active: true,
|
|
71
|
+
workos_user_id: "wos_user_123",
|
|
72
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
73
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
74
|
+
last_login_at: null,
|
|
75
|
+
org_memberships: []
|
|
76
|
+
}
|
|
77
|
+
])
|
|
78
|
+
),
|
|
79
|
+
http.patch(`${SUPABASE_BASE}/users`, () => HttpResponse.json([])),
|
|
80
|
+
http.post(`${API_BASE}/api-keys`, async ({ request }) => {
|
|
81
|
+
const body = await request.json();
|
|
82
|
+
return HttpResponse.json({
|
|
83
|
+
id: "key-123",
|
|
84
|
+
name: body.name,
|
|
85
|
+
key: "sk_test_1234567890abcdef",
|
|
86
|
+
message: "API key created successfully"
|
|
87
|
+
});
|
|
88
|
+
}),
|
|
89
|
+
http.get(`${API_BASE}/api-keys`, () => HttpResponse.json({ keys: [] })),
|
|
90
|
+
http.delete(`${API_BASE}/api-keys/:id`, () => HttpResponse.json({ success: true })),
|
|
91
|
+
http.post(`${API_BASE}/credentials`, async ({ request }) => {
|
|
92
|
+
const body = await request.json();
|
|
93
|
+
return HttpResponse.json({ id: "cred-123", name: body.name });
|
|
94
|
+
}),
|
|
95
|
+
http.get(`${API_BASE}/credentials`, () => HttpResponse.json({ credentials: [] })),
|
|
96
|
+
http.delete(`${API_BASE}/credentials/:id`, () => HttpResponse.json({ success: true })),
|
|
97
|
+
http.post(`${API_BASE}/invitations`, async ({ request }) => {
|
|
98
|
+
const body = await request.json();
|
|
99
|
+
return HttpResponse.json({
|
|
100
|
+
id: "inv-123",
|
|
101
|
+
email: body.email,
|
|
102
|
+
role_slug: body.roleSlug,
|
|
103
|
+
organization_id: body.organizationId,
|
|
104
|
+
invitation_state: "pending",
|
|
105
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
106
|
+
expires_at: new Date(Date.now() + 7 * 24 * 60 * 60 * 1e3).toISOString()
|
|
107
|
+
});
|
|
108
|
+
}),
|
|
109
|
+
http.delete(`${API_BASE}/invitations/:invId`, () => HttpResponse.json({ success: true })),
|
|
110
|
+
http.post(`${API_BASE}/invitations/:invId/resend`, () => HttpResponse.json({ success: true })),
|
|
111
|
+
http.get(`${SUPABASE_BASE}/org_invitations`, () => HttpResponse.json([])),
|
|
112
|
+
http.get(
|
|
113
|
+
`${API_BASE}/user`,
|
|
114
|
+
() => HttpResponse.json({
|
|
115
|
+
id: "test-user",
|
|
116
|
+
email: "test@example.com",
|
|
117
|
+
first_name: "Test",
|
|
118
|
+
last_name: "User",
|
|
119
|
+
is_platform_admin: false
|
|
120
|
+
})
|
|
121
|
+
)
|
|
122
|
+
];
|
|
123
|
+
var server = setupServer(...handlers);
|
|
124
|
+
|
|
125
|
+
export { handlers, server };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
2
2
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
3
|
-
import { getErrorInfo, getErrorTitle, getResourceIcon, formatTimeAgo } from './chunk-
|
|
3
|
+
import { getErrorInfo, getErrorTitle, getResourceIcon, formatTimeAgo } from './chunk-OD7GWIZS.js';
|
|
4
4
|
import { ResourceStatusColors } from './chunk-KRWALB24.js';
|
|
5
5
|
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
6
6
|
import { Center, Stack, Title, Text, Button, Box, Loader, Badge, Group, Collapse, ScrollArea, Card, Select, Alert, Code, ThemeIcon, Paper, Grid, Timeline, Space } from '@mantine/core';
|
|
@@ -699,7 +699,8 @@ var STATUS_COLORS = {
|
|
|
699
699
|
call_note: "blue",
|
|
700
700
|
status_update: "green",
|
|
701
701
|
issue: "yellow",
|
|
702
|
-
blocker: "red"
|
|
702
|
+
blocker: "red",
|
|
703
|
+
agent_learning: "grape"
|
|
703
704
|
};
|
|
704
705
|
function StatusBadge({ status, ...props }) {
|
|
705
706
|
const label = status.split("_").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useErrorTrends } from './chunk-QSTH6T77.js';
|
|
2
|
-
import { CardHeader, CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-
|
|
3
|
-
import { getTimeRangeLabel, getTimeRangeDates, formatBucketTime } from './chunk-
|
|
2
|
+
import { CardHeader, CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-BHR7IV72.js';
|
|
3
|
+
import { getTimeRangeLabel, getTimeRangeDates, formatBucketTime } from './chunk-OD7GWIZS.js';
|
|
4
4
|
import { useRef, useState, useLayoutEffect, useEffect, useMemo, useCallback } from 'react';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { useComputedColorScheme, Group, Text, Box, Stack, Center, Loader, Paper, Button, NumberFormatter, Badge, Space, Tooltip as Tooltip$1, SimpleGrid, Alert, SegmentedControl } from '@mantine/core';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
// src/test-utils/mocks/workos.ts
|
|
4
|
+
var mockWorkOSUser = {
|
|
5
|
+
id: "user_123",
|
|
6
|
+
email: "test@example.com",
|
|
7
|
+
firstName: "Test",
|
|
8
|
+
lastName: "User",
|
|
9
|
+
emailVerified: true,
|
|
10
|
+
profilePictureUrl: null,
|
|
11
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
12
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
13
|
+
};
|
|
14
|
+
var mockUseAuth = {
|
|
15
|
+
user: null,
|
|
16
|
+
isLoading: false,
|
|
17
|
+
signIn: vi.fn(),
|
|
18
|
+
signOut: vi.fn(),
|
|
19
|
+
getAccessToken: vi.fn().mockResolvedValue("mock-access-token"),
|
|
20
|
+
organizationId: "test-org-id",
|
|
21
|
+
canRecover: vi.fn(() => false)
|
|
22
|
+
};
|
|
23
|
+
function createMockUseAuth(overrides = {}) {
|
|
24
|
+
return {
|
|
25
|
+
...mockUseAuth,
|
|
26
|
+
...overrides
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
var mockAuthenticatedUser = () => createMockUseAuth({
|
|
30
|
+
user: mockWorkOSUser,
|
|
31
|
+
isLoading: false
|
|
32
|
+
});
|
|
33
|
+
var mockUnauthenticatedUser = () => createMockUseAuth({
|
|
34
|
+
user: null,
|
|
35
|
+
isLoading: false
|
|
36
|
+
});
|
|
37
|
+
var mockAuthLoading = () => createMockUseAuth({
|
|
38
|
+
user: null,
|
|
39
|
+
isLoading: true
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export { createMockUseAuth, mockAuthLoading, mockAuthenticatedUser, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useSupabase } from './chunk-BRXELOHC.js';
|
|
2
2
|
import { observabilityKeys } from './chunk-QSTH6T77.js';
|
|
3
|
-
import { showApiErrorNotification, showSuccessNotification, projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-
|
|
3
|
+
import { showApiErrorNotification, showSuccessNotification, projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-M7W7CGPL.js';
|
|
4
4
|
import { GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
5
|
-
import { useOptionalElevasisFeatures } from './chunk-
|
|
6
|
-
import { useNotificationAdapter } from './chunk-
|
|
7
|
-
import { HTTP_HEADERS } from './chunk-
|
|
8
|
-
import { UuidSchema, ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, CredentialNameSchema, REFETCH_INTERVAL_DASHBOARD, getTimeRangeDates, STALE_TIME_MONITORING, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_DEFAULT, STALE_TIME_ADMIN, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-
|
|
5
|
+
import { useOptionalElevasisFeatures } from './chunk-LR5CRY5A.js';
|
|
6
|
+
import { useNotificationAdapter } from './chunk-OUYH2SBS.js';
|
|
7
|
+
import { HTTP_HEADERS } from './chunk-R7OJCNL3.js';
|
|
8
|
+
import { UuidSchema, ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, CredentialNameSchema, REFETCH_INTERVAL_DASHBOARD, getTimeRangeDates, STALE_TIME_MONITORING, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_DEFAULT, STALE_TIME_ADMIN, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-OD7GWIZS.js';
|
|
9
9
|
import { useStableAccessToken } from './chunk-SLH2QLKV.js';
|
|
10
10
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
11
11
|
import { useElevasisServices } from './chunk-IRW7JMQ4.js';
|
|
@@ -2401,6 +2401,19 @@ function useUpdateRequestStatus() {
|
|
|
2401
2401
|
}
|
|
2402
2402
|
});
|
|
2403
2403
|
}
|
|
2404
|
+
function useDeleteRequest() {
|
|
2405
|
+
const { apiRequest } = useElevasisServices();
|
|
2406
|
+
const queryClient = useQueryClient();
|
|
2407
|
+
return useMutation({
|
|
2408
|
+
mutationFn: async (id) => {
|
|
2409
|
+
await apiRequest(`/requests/${id}`, { method: "DELETE" });
|
|
2410
|
+
return id;
|
|
2411
|
+
},
|
|
2412
|
+
onSuccess: () => {
|
|
2413
|
+
queryClient.invalidateQueries({ queryKey: requestsKeys.lists() });
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2404
2417
|
function useExecutionPanelState({
|
|
2405
2418
|
resourceId,
|
|
2406
2419
|
manager,
|
|
@@ -4397,4 +4410,4 @@ function useProjectRealtime(projectId) {
|
|
|
4397
4410
|
});
|
|
4398
4411
|
}
|
|
4399
4412
|
|
|
4400
|
-
export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, operationsKeys, projectActivityKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useList, useListApiKeys, useListDeployments, useListExecutions, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, useProjectActivities, useProjectRealtime, useReactivateMembership, useRecentExecutionsByResource, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateMemberConfig, useUpdateRequestStatus, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification };
|
|
4413
|
+
export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, operationsKeys, projectActivityKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useList, useListApiKeys, useListDeployments, useListExecutions, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, useProjectActivities, useProjectRealtime, useReactivateMembership, useRecentExecutionsByResource, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateMemberConfig, useUpdateRequestStatus, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification };
|