@elevasis/ui 2.9.1 → 2.10.1
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/app/index.css +137 -0
- package/dist/app/index.d.ts +223 -0
- package/dist/app/index.js +95 -0
- package/dist/charts/index.js +3 -2
- package/dist/{chunk-NYMKWGKN.js → chunk-4BF74JVD.js} +110 -7
- package/dist/{chunk-47YILFON.js → chunk-6PNHW4X2.js} +159 -144
- package/dist/chunk-ADSSLKKP.js +10 -0
- package/dist/chunk-AEBKE4IX.js +13 -0
- package/dist/{chunk-C2OFFC7J.js → chunk-AL23U6C3.js} +3 -2
- package/dist/{chunk-27COZ5AH.js → chunk-CEWTOKE7.js} +3 -50
- package/dist/{chunk-AQQYVAFK.js → chunk-CLXMNMIS.js} +8 -7
- package/dist/{chunk-4PHPENKX.js → chunk-E3IFHX6A.js} +27 -377
- package/dist/{chunk-CYXZHBP4.js → chunk-F4TPY6YL.js} +14 -3
- package/dist/chunk-G2TDX3W6.js +5 -0
- package/dist/{chunk-CTWYIRKW.js → chunk-GJVGV7QZ.js} +24 -34
- package/dist/chunk-IIMU5YAJ.js +53 -0
- package/dist/{chunk-VNUOQQNY.js → chunk-KYOF6NYW.js} +2 -2
- package/dist/{chunk-W4VYXIN7.js → chunk-L4XXM55J.js} +3 -142
- package/dist/{chunk-YCHZ4U5V.js → chunk-LPSBID5V.js} +5 -13
- package/dist/{chunk-F5QSLYUB.js → chunk-LW5NKRI7.js} +1189 -1300
- package/dist/{chunk-KGEYEUR5.js → chunk-M6ZZ2FW5.js} +7 -6
- package/dist/{chunk-OPT74SGF.js → chunk-N5CLIRBS.js} +31 -176
- package/dist/chunk-R7WLWGPO.js +126 -0
- package/dist/{chunk-Y3D3WFJG.js → chunk-SQQGLGHW.js} +2 -11
- package/dist/{chunk-KFICYU6S.js → chunk-STZJ7SY5.js} +1 -1
- package/dist/chunk-SZHARWKU.js +15 -0
- package/dist/{chunk-7PDDPNQS.js → chunk-TSX4I3NW.js} +3 -3
- package/dist/chunk-V7XHGJQZ.js +145 -0
- package/dist/{chunk-UE5QQDCR.js → chunk-WHQXDETX.js} +5 -5
- package/dist/{chunk-4JPW5U5I.js → chunk-XB4NWSI3.js} +53 -54
- package/dist/{chunk-ZZ35VSNF.js → chunk-YQLE5HR5.js} +4 -4
- package/dist/components/index.d.ts +6 -253
- package/dist/components/index.js +31 -25
- package/dist/features/auth/index.d.ts +0 -107
- package/dist/features/auth/index.js +0 -1
- package/dist/features/crm/index.d.ts +3 -136
- package/dist/features/crm/index.js +14 -9
- package/dist/features/dashboard/index.js +13 -9
- package/dist/features/delivery/index.d.ts +3 -137
- package/dist/features/delivery/index.js +15 -9
- package/dist/features/lead-gen/index.d.ts +3 -29
- package/dist/features/lead-gen/index.js +20 -14
- package/dist/features/monitoring/index.d.ts +3 -30
- package/dist/features/monitoring/index.js +14 -10
- package/dist/features/operations/index.d.ts +18 -1324
- package/dist/features/operations/index.js +18 -13
- package/dist/features/seo/index.d.ts +3 -30
- package/dist/features/seo/index.js +3 -2
- package/dist/features/settings/index.d.ts +6 -146
- package/dist/features/settings/index.js +13 -9
- package/dist/hooks/index.d.ts +10 -1403
- package/dist/hooks/index.js +11 -7
- package/dist/hooks/published.d.ts +10 -1403
- package/dist/hooks/published.js +11 -7
- package/dist/index.d.ts +97 -1510
- package/dist/index.js +12 -8
- package/dist/initialization/index.d.ts +3 -117
- package/dist/layout/index.d.ts +12 -2
- package/dist/layout/index.js +5 -4
- package/dist/organization/index.d.ts +3 -10
- package/dist/organization/index.js +2 -1
- package/dist/profile/index.d.ts +0 -107
- package/dist/provider/index.d.ts +45 -65
- package/dist/provider/index.js +10 -6
- package/dist/provider/published.d.ts +45 -65
- package/dist/provider/published.js +6 -3
- package/dist/supabase/index.d.ts +0 -209
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +3 -3
- package/dist/typeform/index.js +10 -10
- package/dist/types/index.d.ts +68 -1738
- package/package.json +20 -4
- package/src/app/README.md +24 -0
- package/dist/chunk-IDACMRGQ.js +0 -115
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
2
|
+
import { Center } 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
|
+
|
|
10
|
+
export { SubshellLoader };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElevasisFeaturesProvider } from './chunk-N5CLIRBS.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function createTestFeaturesProvider({
|
|
5
|
+
organizationModel,
|
|
6
|
+
features = []
|
|
7
|
+
} = {}) {
|
|
8
|
+
return function TestFeaturesProvider({ children }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(ElevasisFeaturesProvider, { features, organizationModel, children });
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { createTestFeaturesProvider };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
2
|
+
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
2
3
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
3
4
|
import { Stack } from '@mantine/core';
|
|
4
5
|
import { IconSearch, IconChartBar, IconTrendingUp } from '@tabler/icons-react';
|
|
@@ -37,7 +38,7 @@ var SEOSidebar = () => {
|
|
|
37
38
|
// src/features/seo/manifest.ts
|
|
38
39
|
var seoManifest = {
|
|
39
40
|
key: "seo",
|
|
40
|
-
|
|
41
|
+
featureId: "seo",
|
|
41
42
|
sidebar: SEOSidebar,
|
|
42
43
|
subshellRoutes: ["/seo"]
|
|
43
44
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { subshellNavItemIconSize
|
|
2
|
-
import { UnstyledButton, Stack, Group, Text
|
|
1
|
+
import { subshellNavItemIconSize } from './chunk-DT3QYZVU.js';
|
|
2
|
+
import { UnstyledButton, Stack, Group, Text } from '@mantine/core';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var activeColor = "var(--color-primary)";
|
|
@@ -105,52 +105,5 @@ var SubshellNavItem = ({
|
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
};
|
|
108
|
-
var SubshellSidebarSection = ({
|
|
109
|
-
icon: Icon,
|
|
110
|
-
label,
|
|
111
|
-
rightSection,
|
|
112
|
-
withTopBorder = false
|
|
113
|
-
}) => {
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
115
|
-
Box,
|
|
116
|
-
{
|
|
117
|
-
p: "sm",
|
|
118
|
-
style: {
|
|
119
|
-
borderTop: withTopBorder ? "1px solid var(--color-border)" : void 0,
|
|
120
|
-
borderBottom: "1px solid var(--color-border)"
|
|
121
|
-
},
|
|
122
|
-
children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
123
|
-
/* @__PURE__ */ jsx(
|
|
124
|
-
ThemeIcon,
|
|
125
|
-
{
|
|
126
|
-
variant: "light",
|
|
127
|
-
size: sidebarIconSize,
|
|
128
|
-
style: {
|
|
129
|
-
backgroundColor: "var(--color-surface)",
|
|
130
|
-
color: "var(--color-primary)",
|
|
131
|
-
flexShrink: 0
|
|
132
|
-
},
|
|
133
|
-
children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, stroke: sidebarIconStroke })
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
/* @__PURE__ */ jsx(
|
|
137
|
-
Box,
|
|
138
|
-
{
|
|
139
|
-
c: "var(--color-text)",
|
|
140
|
-
style: {
|
|
141
|
-
fontFamily: "var(--elevasis-font-family-subtitle)",
|
|
142
|
-
flex: 1,
|
|
143
|
-
fontSize: "var(--mantine-font-size-md)",
|
|
144
|
-
fontWeight: 500,
|
|
145
|
-
lineHeight: 1.2
|
|
146
|
-
},
|
|
147
|
-
children: label
|
|
148
|
-
}
|
|
149
|
-
),
|
|
150
|
-
rightSection
|
|
151
|
-
] })
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
108
|
|
|
156
|
-
export { SubshellNavItem
|
|
109
|
+
export { SubshellNavItem };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { DELIVERY_PROJECTS_VIEW_CAPABILITY_ID, PROJECTS_FEATURE_ID } from './chunk-G2TDX3W6.js';
|
|
1
2
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
2
3
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
3
|
-
import {
|
|
4
|
+
import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
5
|
+
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
4
6
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
5
7
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
6
|
-
import { useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProject, useProjectNotes,
|
|
8
|
+
import { useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProject, useProjectNotes, useUpdateMilestone, useCreateNote } from './chunk-E3IFHX6A.js';
|
|
7
9
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
8
|
-
import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-
|
|
10
|
+
import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-SQQGLGHW.js';
|
|
9
11
|
import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate } from './chunk-IOKL7BKE.js';
|
|
10
12
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
11
13
|
import { SimpleGrid, Card, Stack, Group, ThemeIcon, Text, RingProgress, Paper, Timeline, Badge, Collapse, ActionIcon, Select, TextInput, Center, Loader, Table, Checkbox, Pagination, Title, Button, Alert, CopyButton, Tooltip, Divider, Tabs, Textarea } from '@mantine/core';
|
|
@@ -329,9 +331,8 @@ var ProjectsSidebar = ({ children } = {}) => {
|
|
|
329
331
|
};
|
|
330
332
|
var deliveryManifest = {
|
|
331
333
|
key: "delivery",
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
capabilityIds: ["delivery.projects.view"],
|
|
334
|
+
featureId: PROJECTS_FEATURE_ID,
|
|
335
|
+
capabilityIds: [DELIVERY_PROJECTS_VIEW_CAPABILITY_ID],
|
|
335
336
|
navEntry: {
|
|
336
337
|
label: "Projects",
|
|
337
338
|
icon: IconBriefcase,
|
|
@@ -713,7 +714,7 @@ function AddNoteModal({ opened, onClose, projectId }) {
|
|
|
713
714
|
function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
|
|
714
715
|
const { data: project, isLoading, error } = useProject(projectId);
|
|
715
716
|
const { data: notes } = useProjectNotes({ projectId });
|
|
716
|
-
const { mutate: deleteProject, isPending: isDeleting } =
|
|
717
|
+
const { mutate: deleteProject, isPending: isDeleting } = useDeleteProject();
|
|
717
718
|
const [addNoteOpen, setAddNoteOpen] = useState(false);
|
|
718
719
|
const [deleteModalOpen, setDeleteModalOpen] = useState(false);
|
|
719
720
|
if (isLoading) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getTimeRangeDates, observabilityKeys } from './chunk-LXHZYSMQ.js';
|
|
2
2
|
import { GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
3
|
-
import { useNotificationAdapter } from './chunk-
|
|
3
|
+
import { useNotificationAdapter } from './chunk-R7WLWGPO.js';
|
|
4
4
|
import { HTTP_HEADERS } from './chunk-NVOCKXUQ.js';
|
|
5
5
|
import { REFETCH_INTERVAL_DASHBOARD, 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, getErrorInfo, formatErrorMessage, getErrorTitle, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-IOKL7BKE.js';
|
|
6
6
|
import { useStableAccessToken } from './chunk-MTJ43R2E.js';
|
|
@@ -2697,19 +2697,6 @@ function useResourceExecutions({ resourceId, timeRange, enabled = true }) {
|
|
|
2697
2697
|
staleTime: STALE_TIME_MONITORING
|
|
2698
2698
|
});
|
|
2699
2699
|
}
|
|
2700
|
-
|
|
2701
|
-
// src/hooks/operations/calibration/queryKeys.ts
|
|
2702
|
-
var calibrationKeys = {
|
|
2703
|
-
all: ["calibration"],
|
|
2704
|
-
// Projects
|
|
2705
|
-
projects: (org) => [...calibrationKeys.all, "projects", org],
|
|
2706
|
-
projectsByResource: (org, resourceId, resourceType) => [...calibrationKeys.all, "projects", org, resourceId, resourceType],
|
|
2707
|
-
project: (org, projectId) => [...calibrationKeys.all, "project", org, projectId],
|
|
2708
|
-
// Runs
|
|
2709
|
-
runs: (org, projectId) => [...calibrationKeys.all, "runs", org, projectId],
|
|
2710
|
-
run: (org, runId) => [...calibrationKeys.all, "run", org, runId],
|
|
2711
|
-
runFull: (org, runId) => [...calibrationKeys.all, "run-full", org, runId]
|
|
2712
|
-
};
|
|
2713
2700
|
var showInfoNotification = (message) => {
|
|
2714
2701
|
notifications.show({
|
|
2715
2702
|
title: "Info",
|
|
@@ -3104,43 +3091,6 @@ function useListDeployments() {
|
|
|
3104
3091
|
}
|
|
3105
3092
|
});
|
|
3106
3093
|
}
|
|
3107
|
-
var dealKeys = {
|
|
3108
|
-
all: ["deals"],
|
|
3109
|
-
lists: () => [...dealKeys.all, "list"],
|
|
3110
|
-
list: (orgId, filters) => [...dealKeys.all, "list", orgId, filters],
|
|
3111
|
-
details: () => [...dealKeys.all, "detail"],
|
|
3112
|
-
detail: (id) => [...dealKeys.all, "detail", id]
|
|
3113
|
-
};
|
|
3114
|
-
function useDeals(filters = {}) {
|
|
3115
|
-
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
3116
|
-
return useQuery({
|
|
3117
|
-
queryKey: dealKeys.list(organizationId, filters),
|
|
3118
|
-
queryFn: async () => {
|
|
3119
|
-
const params = new URLSearchParams();
|
|
3120
|
-
if (filters.stage) params.set("stage", filters.stage);
|
|
3121
|
-
if (filters.search) params.set("search", filters.search);
|
|
3122
|
-
const qs = params.toString();
|
|
3123
|
-
const data = await apiRequest(`/deals${qs ? `?${qs}` : ""}`);
|
|
3124
|
-
return data;
|
|
3125
|
-
},
|
|
3126
|
-
enabled: isReady
|
|
3127
|
-
});
|
|
3128
|
-
}
|
|
3129
|
-
function useDeleteDeal() {
|
|
3130
|
-
const { apiRequest, organizationId } = useElevasisServices();
|
|
3131
|
-
const queryClient = useQueryClient();
|
|
3132
|
-
return useMutation({
|
|
3133
|
-
mutationFn: async (dealId) => {
|
|
3134
|
-
await apiRequest(`/deals/${dealId}`, { method: "DELETE" });
|
|
3135
|
-
},
|
|
3136
|
-
onSuccess: () => {
|
|
3137
|
-
queryClient.invalidateQueries({ queryKey: ["deals", organizationId] });
|
|
3138
|
-
},
|
|
3139
|
-
onError: (error) => {
|
|
3140
|
-
showApiErrorNotification(error);
|
|
3141
|
-
}
|
|
3142
|
-
});
|
|
3143
|
-
}
|
|
3144
3094
|
function useSyncDealStage() {
|
|
3145
3095
|
const { apiRequest, organizationId } = useElevasisServices();
|
|
3146
3096
|
const queryClient = useQueryClient();
|
|
@@ -3639,235 +3589,6 @@ function useDeleteContacts() {
|
|
|
3639
3589
|
}
|
|
3640
3590
|
});
|
|
3641
3591
|
}
|
|
3642
|
-
function useCalibrationRunFull(runId) {
|
|
3643
|
-
const { apiRequest, organizationId, isReady } = useElevasisServices();
|
|
3644
|
-
return useQuery({
|
|
3645
|
-
queryKey: calibrationKeys.runFull(organizationId ?? "none", runId),
|
|
3646
|
-
queryFn: async () => {
|
|
3647
|
-
const response = await apiRequest(`/calibration/runs/${runId}/full`);
|
|
3648
|
-
return response;
|
|
3649
|
-
},
|
|
3650
|
-
enabled: isReady && !!runId && !!organizationId
|
|
3651
|
-
});
|
|
3652
|
-
}
|
|
3653
|
-
function useCalibrationRuns(projectId) {
|
|
3654
|
-
const { apiRequest, organizationId, isReady } = useElevasisServices();
|
|
3655
|
-
return useQuery({
|
|
3656
|
-
queryKey: calibrationKeys.runs(organizationId ?? "none", projectId),
|
|
3657
|
-
queryFn: async () => {
|
|
3658
|
-
const response = await apiRequest(`/calibration/runs?projectId=${projectId}`);
|
|
3659
|
-
return response.runs;
|
|
3660
|
-
},
|
|
3661
|
-
enabled: isReady && !!projectId && !!organizationId
|
|
3662
|
-
});
|
|
3663
|
-
}
|
|
3664
|
-
function useCalibrationRun(runId) {
|
|
3665
|
-
const { apiRequest, organizationId, isReady } = useElevasisServices();
|
|
3666
|
-
return useQuery({
|
|
3667
|
-
queryKey: calibrationKeys.run(organizationId ?? "none", runId),
|
|
3668
|
-
queryFn: async () => {
|
|
3669
|
-
const response = await apiRequest(`/calibration/runs/${runId}`);
|
|
3670
|
-
return response.run;
|
|
3671
|
-
},
|
|
3672
|
-
enabled: isReady && !!runId && !!organizationId
|
|
3673
|
-
});
|
|
3674
|
-
}
|
|
3675
|
-
function useCreateRun() {
|
|
3676
|
-
const { apiRequest, organizationId } = useElevasisServices();
|
|
3677
|
-
const queryClient = useQueryClient();
|
|
3678
|
-
return useMutation({
|
|
3679
|
-
mutationFn: async (input) => {
|
|
3680
|
-
const response = await apiRequest("/calibration/runs", {
|
|
3681
|
-
method: "POST",
|
|
3682
|
-
body: JSON.stringify(input)
|
|
3683
|
-
});
|
|
3684
|
-
return response.run;
|
|
3685
|
-
},
|
|
3686
|
-
onSuccess: (data) => {
|
|
3687
|
-
queryClient.invalidateQueries({
|
|
3688
|
-
queryKey: calibrationKeys.runs(organizationId ?? "none", data.projectId)
|
|
3689
|
-
});
|
|
3690
|
-
},
|
|
3691
|
-
onError: (error) => {
|
|
3692
|
-
showApiErrorNotification(error);
|
|
3693
|
-
}
|
|
3694
|
-
});
|
|
3695
|
-
}
|
|
3696
|
-
function useExecuteRun() {
|
|
3697
|
-
const { apiRequest, organizationId } = useElevasisServices();
|
|
3698
|
-
const queryClient = useQueryClient();
|
|
3699
|
-
return useMutation({
|
|
3700
|
-
mutationFn: async (runId) => {
|
|
3701
|
-
await apiRequest(`/calibration/runs/${runId}/execute`, {
|
|
3702
|
-
method: "POST"
|
|
3703
|
-
});
|
|
3704
|
-
},
|
|
3705
|
-
onSuccess: (_, runId) => {
|
|
3706
|
-
queryClient.invalidateQueries({
|
|
3707
|
-
queryKey: calibrationKeys.run(organizationId ?? "none", runId)
|
|
3708
|
-
});
|
|
3709
|
-
},
|
|
3710
|
-
onError: (error) => {
|
|
3711
|
-
showApiErrorNotification(error);
|
|
3712
|
-
}
|
|
3713
|
-
});
|
|
3714
|
-
}
|
|
3715
|
-
function useDeleteRun() {
|
|
3716
|
-
const { apiRequest, organizationId } = useElevasisServices();
|
|
3717
|
-
const queryClient = useQueryClient();
|
|
3718
|
-
return useMutation({
|
|
3719
|
-
mutationFn: async ({ runId }) => {
|
|
3720
|
-
await apiRequest(`/calibration/runs/${runId}`, {
|
|
3721
|
-
method: "DELETE"
|
|
3722
|
-
});
|
|
3723
|
-
},
|
|
3724
|
-
onSuccess: (_, { projectId }) => {
|
|
3725
|
-
queryClient.invalidateQueries({
|
|
3726
|
-
queryKey: calibrationKeys.runs(organizationId ?? "none", projectId)
|
|
3727
|
-
});
|
|
3728
|
-
},
|
|
3729
|
-
onError: (error) => {
|
|
3730
|
-
showApiErrorNotification(error);
|
|
3731
|
-
}
|
|
3732
|
-
});
|
|
3733
|
-
}
|
|
3734
|
-
function useGradeRun() {
|
|
3735
|
-
const { apiRequest, organizationId } = useElevasisServices();
|
|
3736
|
-
const queryClient = useQueryClient();
|
|
3737
|
-
return useMutation({
|
|
3738
|
-
mutationFn: async ({
|
|
3739
|
-
runId,
|
|
3740
|
-
rubric,
|
|
3741
|
-
graderModel
|
|
3742
|
-
}) => {
|
|
3743
|
-
await apiRequest(`/calibration/runs/${runId}/grade`, {
|
|
3744
|
-
method: "POST",
|
|
3745
|
-
body: JSON.stringify({ rubric, graderModel })
|
|
3746
|
-
});
|
|
3747
|
-
},
|
|
3748
|
-
onSuccess: (_, { runId }) => {
|
|
3749
|
-
queryClient.invalidateQueries({
|
|
3750
|
-
queryKey: calibrationKeys.run(organizationId ?? "none", runId)
|
|
3751
|
-
});
|
|
3752
|
-
queryClient.invalidateQueries({
|
|
3753
|
-
queryKey: calibrationKeys.runFull(organizationId ?? "none", runId)
|
|
3754
|
-
});
|
|
3755
|
-
},
|
|
3756
|
-
onError: (error) => {
|
|
3757
|
-
showApiErrorNotification(error);
|
|
3758
|
-
}
|
|
3759
|
-
});
|
|
3760
|
-
}
|
|
3761
|
-
function useCalibrationSSE({ runId, manager, apiUrl, enabled = true }) {
|
|
3762
|
-
const queryClient = useQueryClient();
|
|
3763
|
-
const { isReady: isOrganizationReady, organizationId } = useElevasisServices();
|
|
3764
|
-
const { currentMembership } = useOrganization();
|
|
3765
|
-
const currentWorkOSOrganizationId = currentMembership?.organization?.workos_org_id;
|
|
3766
|
-
const [progress, setProgress] = useState({
|
|
3767
|
-
connected: false,
|
|
3768
|
-
events: [],
|
|
3769
|
-
isComplete: false
|
|
3770
|
-
});
|
|
3771
|
-
const sseUrl = `${apiUrl}/api/calibration/runs/${runId}/sse`;
|
|
3772
|
-
const headers = useMemo(() => {
|
|
3773
|
-
const h = {};
|
|
3774
|
-
if (currentWorkOSOrganizationId) h[HTTP_HEADERS.WORKOS_ORGANIZATION_ID] = currentWorkOSOrganizationId;
|
|
3775
|
-
return h;
|
|
3776
|
-
}, [currentWorkOSOrganizationId]);
|
|
3777
|
-
const handleMessage = useCallback(
|
|
3778
|
-
(data) => {
|
|
3779
|
-
try {
|
|
3780
|
-
const event = JSON.parse(data);
|
|
3781
|
-
setProgress((prev) => {
|
|
3782
|
-
const newProgress = {
|
|
3783
|
-
...prev,
|
|
3784
|
-
events: [...prev.events, event]
|
|
3785
|
-
};
|
|
3786
|
-
switch (event.type) {
|
|
3787
|
-
case "connected":
|
|
3788
|
-
newProgress.connected = true;
|
|
3789
|
-
break;
|
|
3790
|
-
case "calibration-completed":
|
|
3791
|
-
newProgress.isComplete = true;
|
|
3792
|
-
newProgress.summary = event.summary;
|
|
3793
|
-
queryClient.invalidateQueries({
|
|
3794
|
-
queryKey: calibrationKeys.run(currentWorkOSOrganizationId || "none", runId)
|
|
3795
|
-
});
|
|
3796
|
-
queryClient.invalidateQueries({
|
|
3797
|
-
queryKey: calibrationKeys.runFull(currentWorkOSOrganizationId || "none", runId)
|
|
3798
|
-
});
|
|
3799
|
-
break;
|
|
3800
|
-
case "calibration-failed":
|
|
3801
|
-
newProgress.isComplete = true;
|
|
3802
|
-
newProgress.error = event.error;
|
|
3803
|
-
queryClient.invalidateQueries({
|
|
3804
|
-
queryKey: calibrationKeys.run(currentWorkOSOrganizationId || "none", runId)
|
|
3805
|
-
});
|
|
3806
|
-
queryClient.invalidateQueries({
|
|
3807
|
-
queryKey: calibrationKeys.runFull(currentWorkOSOrganizationId || "none", runId)
|
|
3808
|
-
});
|
|
3809
|
-
break;
|
|
3810
|
-
}
|
|
3811
|
-
return newProgress;
|
|
3812
|
-
});
|
|
3813
|
-
} catch {
|
|
3814
|
-
}
|
|
3815
|
-
},
|
|
3816
|
-
[queryClient, currentWorkOSOrganizationId, runId]
|
|
3817
|
-
);
|
|
3818
|
-
const { connected, error } = useSSEConnection({
|
|
3819
|
-
manager,
|
|
3820
|
-
connectionKey: `calibration-${runId}`,
|
|
3821
|
-
url: sseUrl,
|
|
3822
|
-
enabled: enabled && !!runId && !!currentWorkOSOrganizationId && isOrganizationReady,
|
|
3823
|
-
headers,
|
|
3824
|
-
onmessage: handleMessage,
|
|
3825
|
-
onopen: (response) => {
|
|
3826
|
-
if (response.ok) {
|
|
3827
|
-
setProgress((prev) => ({ ...prev, connected: true }));
|
|
3828
|
-
}
|
|
3829
|
-
return void 0;
|
|
3830
|
-
},
|
|
3831
|
-
onerror: () => {
|
|
3832
|
-
setProgress((prev) => ({ ...prev, connected: false }));
|
|
3833
|
-
},
|
|
3834
|
-
onclose: () => {
|
|
3835
|
-
setProgress((prev) => ({ ...prev, connected: false }));
|
|
3836
|
-
}
|
|
3837
|
-
});
|
|
3838
|
-
useEffect(() => {
|
|
3839
|
-
setProgress((prev) => ({ ...prev, connected }));
|
|
3840
|
-
}, [connected]);
|
|
3841
|
-
useEffect(() => {
|
|
3842
|
-
if (error) {
|
|
3843
|
-
setProgress((prev) => ({ ...prev, error }));
|
|
3844
|
-
}
|
|
3845
|
-
}, [error]);
|
|
3846
|
-
useEffect(() => {
|
|
3847
|
-
return () => {
|
|
3848
|
-
setProgress({
|
|
3849
|
-
connected: false,
|
|
3850
|
-
events: [],
|
|
3851
|
-
isComplete: false
|
|
3852
|
-
});
|
|
3853
|
-
};
|
|
3854
|
-
}, [runId, organizationId, isOrganizationReady]);
|
|
3855
|
-
const disconnect = useCallback(() => {
|
|
3856
|
-
manager.closeConnection(`calibration-${runId}`);
|
|
3857
|
-
}, [manager, runId]);
|
|
3858
|
-
const reset = useCallback(() => {
|
|
3859
|
-
setProgress({
|
|
3860
|
-
connected: false,
|
|
3861
|
-
events: [],
|
|
3862
|
-
isComplete: false
|
|
3863
|
-
});
|
|
3864
|
-
}, []);
|
|
3865
|
-
return {
|
|
3866
|
-
...progress,
|
|
3867
|
-
disconnect,
|
|
3868
|
-
reset
|
|
3869
|
-
};
|
|
3870
|
-
}
|
|
3871
3592
|
|
|
3872
3593
|
// src/hooks/settings/webhooks/webhookEndpointService.ts
|
|
3873
3594
|
var WebhookEndpointService = class {
|
|
@@ -3983,109 +3704,38 @@ function useListWebhookEndpoints() {
|
|
|
3983
3704
|
});
|
|
3984
3705
|
}
|
|
3985
3706
|
|
|
3986
|
-
// src/hooks/
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
});
|
|
3997
|
-
}
|
|
3998
|
-
function useCalibrationProjects(resourceId, resourceType) {
|
|
3999
|
-
const { apiRequest, organizationId, isReady } = useElevasisServices();
|
|
4000
|
-
return useQuery({
|
|
4001
|
-
queryKey: calibrationKeys.projectsByResource(organizationId ?? "none", resourceId, resourceType),
|
|
4002
|
-
queryFn: async () => {
|
|
4003
|
-
const response = await apiRequest(
|
|
4004
|
-
`/calibration/projects?resourceId=${resourceId}&resourceType=${resourceType}`
|
|
4005
|
-
);
|
|
4006
|
-
return response.projects;
|
|
4007
|
-
},
|
|
4008
|
-
enabled: isReady && !!resourceId && !!resourceType && !!organizationId
|
|
4009
|
-
});
|
|
4010
|
-
}
|
|
4011
|
-
function useCalibrationProject(projectId) {
|
|
4012
|
-
const { apiRequest, organizationId, isReady } = useElevasisServices();
|
|
3707
|
+
// src/hooks/acquisition/useDeals.ts
|
|
3708
|
+
var dealKeys = {
|
|
3709
|
+
all: ["deals"],
|
|
3710
|
+
lists: () => [...dealKeys.all, "list"],
|
|
3711
|
+
list: (orgId, filters) => [...dealKeys.all, "list", orgId, filters],
|
|
3712
|
+
details: () => [...dealKeys.all, "detail"],
|
|
3713
|
+
detail: (id) => [...dealKeys.all, "detail", id]
|
|
3714
|
+
};
|
|
3715
|
+
function useDeals(filters = {}) {
|
|
3716
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
4013
3717
|
return useQuery({
|
|
4014
|
-
queryKey:
|
|
3718
|
+
queryKey: dealKeys.list(organizationId, filters),
|
|
4015
3719
|
queryFn: async () => {
|
|
4016
|
-
const
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
function useCreateProject() {
|
|
4023
|
-
const { apiRequest, organizationId } = useElevasisServices();
|
|
4024
|
-
const queryClient = useQueryClient();
|
|
4025
|
-
return useMutation({
|
|
4026
|
-
mutationFn: async (input) => {
|
|
4027
|
-
const response = await apiRequest("/calibration/projects", {
|
|
4028
|
-
method: "POST",
|
|
4029
|
-
body: JSON.stringify(input)
|
|
4030
|
-
});
|
|
4031
|
-
return response.project;
|
|
4032
|
-
},
|
|
4033
|
-
onSuccess: (data) => {
|
|
4034
|
-
queryClient.invalidateQueries({
|
|
4035
|
-
queryKey: calibrationKeys.projects(organizationId ?? "none")
|
|
4036
|
-
});
|
|
4037
|
-
queryClient.invalidateQueries({
|
|
4038
|
-
queryKey: calibrationKeys.projectsByResource(organizationId ?? "none", data.resourceId, data.resourceType)
|
|
4039
|
-
});
|
|
3720
|
+
const params = new URLSearchParams();
|
|
3721
|
+
if (filters.stage) params.set("stage", filters.stage);
|
|
3722
|
+
if (filters.search) params.set("search", filters.search);
|
|
3723
|
+
const qs = params.toString();
|
|
3724
|
+
const data = await apiRequest(`/deals${qs ? `?${qs}` : ""}`);
|
|
3725
|
+
return data;
|
|
4040
3726
|
},
|
|
4041
|
-
|
|
4042
|
-
showApiErrorNotification(error);
|
|
4043
|
-
}
|
|
3727
|
+
enabled: isReady
|
|
4044
3728
|
});
|
|
4045
3729
|
}
|
|
4046
|
-
function
|
|
3730
|
+
function useDeleteDeal() {
|
|
4047
3731
|
const { apiRequest, organizationId } = useElevasisServices();
|
|
4048
3732
|
const queryClient = useQueryClient();
|
|
4049
3733
|
return useMutation({
|
|
4050
|
-
mutationFn: async ({
|
|
4051
|
-
|
|
4052
|
-
...input
|
|
4053
|
-
}) => {
|
|
4054
|
-
const response = await apiRequest(`/calibration/projects/${id}`, {
|
|
4055
|
-
method: "PATCH",
|
|
4056
|
-
body: JSON.stringify(input)
|
|
4057
|
-
});
|
|
4058
|
-
return response.project;
|
|
4059
|
-
},
|
|
4060
|
-
onSuccess: (data) => {
|
|
4061
|
-
queryClient.invalidateQueries({
|
|
4062
|
-
queryKey: calibrationKeys.projects(organizationId ?? "none")
|
|
4063
|
-
});
|
|
4064
|
-
queryClient.invalidateQueries({
|
|
4065
|
-
queryKey: calibrationKeys.projectsByResource(organizationId ?? "none", data.resourceId, data.resourceType)
|
|
4066
|
-
});
|
|
4067
|
-
queryClient.invalidateQueries({
|
|
4068
|
-
queryKey: calibrationKeys.project(organizationId ?? "none", data.id)
|
|
4069
|
-
});
|
|
4070
|
-
},
|
|
4071
|
-
onError: (error) => {
|
|
4072
|
-
showApiErrorNotification(error);
|
|
4073
|
-
}
|
|
4074
|
-
});
|
|
4075
|
-
}
|
|
4076
|
-
function useDeleteProject() {
|
|
4077
|
-
const { apiRequest } = useElevasisServices();
|
|
4078
|
-
const queryClient = useQueryClient();
|
|
4079
|
-
return useMutation({
|
|
4080
|
-
mutationFn: async (id) => {
|
|
4081
|
-
await apiRequest(`/calibration/projects/${id}`, {
|
|
4082
|
-
method: "DELETE"
|
|
4083
|
-
});
|
|
3734
|
+
mutationFn: async (dealId) => {
|
|
3735
|
+
await apiRequest(`/deals/${dealId}`, { method: "DELETE" });
|
|
4084
3736
|
},
|
|
4085
3737
|
onSuccess: () => {
|
|
4086
|
-
queryClient.invalidateQueries({
|
|
4087
|
-
queryKey: calibrationKeys.all
|
|
4088
|
-
});
|
|
3738
|
+
queryClient.invalidateQueries({ queryKey: ["deals", organizationId] });
|
|
4089
3739
|
},
|
|
4090
3740
|
onError: (error) => {
|
|
4091
3741
|
showApiErrorNotification(error);
|
|
@@ -4613,7 +4263,7 @@ function useProject(id) {
|
|
|
4613
4263
|
enabled: isReady && !!id
|
|
4614
4264
|
});
|
|
4615
4265
|
}
|
|
4616
|
-
function
|
|
4266
|
+
function useCreateProject() {
|
|
4617
4267
|
const { apiRequest } = useElevasisServices();
|
|
4618
4268
|
const queryClient = useQueryClient();
|
|
4619
4269
|
return useMutation({
|
|
@@ -4632,7 +4282,7 @@ function useCreateProject2() {
|
|
|
4632
4282
|
}
|
|
4633
4283
|
});
|
|
4634
4284
|
}
|
|
4635
|
-
function
|
|
4285
|
+
function useUpdateProject() {
|
|
4636
4286
|
const { apiRequest } = useElevasisServices();
|
|
4637
4287
|
const queryClient = useQueryClient();
|
|
4638
4288
|
return useMutation({
|
|
@@ -4652,7 +4302,7 @@ function useUpdateProject2() {
|
|
|
4652
4302
|
}
|
|
4653
4303
|
});
|
|
4654
4304
|
}
|
|
4655
|
-
function
|
|
4305
|
+
function useDeleteProject() {
|
|
4656
4306
|
const { apiRequest } = useElevasisServices();
|
|
4657
4307
|
const queryClient = useQueryClient();
|
|
4658
4308
|
return useMutation({
|
|
@@ -4833,4 +4483,4 @@ function useCreateNote() {
|
|
|
4833
4483
|
});
|
|
4834
4484
|
}
|
|
4835
4485
|
|
|
4836
|
-
export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys,
|
|
4486
|
+
export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, milestoneKeys, noteKeys, operationsKeys, projectKeys, scheduleKeys, sessionsKeys, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, sortData, taskKeys, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivityFilters, useActivityTrend, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateMilestone, useCreateNote, useCreateProject, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteProject, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteTask2, useDeleteWebhookEndpoint, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteWorkflow, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useList, useListApiKeys, useListDeployments, useListExecutions, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useMilestones, useNotificationCount, useNotifications, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, useProject, useProjectNotes, useProjects, useReactivateMembership, useRecentExecutionsByResource, 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, useTasks, useTestNotification, useTimeRangeDates, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateMemberConfig, useUpdateMilestone, useUpdateProject, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification };
|
|
@@ -119,9 +119,11 @@ function PerspectiveGrid({
|
|
|
119
119
|
glowColor: glowColorProp,
|
|
120
120
|
lineColor: lineColorProp,
|
|
121
121
|
prominentGlow = false,
|
|
122
|
+
lineIntensity = 100,
|
|
122
123
|
className
|
|
123
124
|
}) {
|
|
124
|
-
const
|
|
125
|
+
const rawLineColor = lineColorProp ?? "color-mix(in srgb, var(--color-text-subtle) 7%, transparent)";
|
|
126
|
+
const lineColor = lineIntensity < 100 ? `color-mix(in srgb, ${rawLineColor} ${lineIntensity}%, transparent)` : rawLineColor;
|
|
125
127
|
const glowColor = glowColorProp ?? (prominentGlow ? PROMINENT_DEFAULT_GLOW : SUBTLE_DEFAULT_GLOW);
|
|
126
128
|
const glowHeight = prominentGlow ? "70%" : "60%";
|
|
127
129
|
const glowGradient = prominentGlow ? `radial-gradient(ellipse 100% 80% at 50% 110%, ${glowColor} -10%, transparent 50%)` : `radial-gradient(ellipse 90% 75% at 50% 112%, ${glowColor} -15%, transparent 45%)`;
|
|
@@ -487,13 +489,22 @@ function FloatingMotes({
|
|
|
487
489
|
}
|
|
488
490
|
function CyberBackground({
|
|
489
491
|
variant,
|
|
490
|
-
perspectiveGridRadialGlowIntensity
|
|
492
|
+
perspectiveGridRadialGlowIntensity,
|
|
493
|
+
perspectiveGridLineIntensity
|
|
491
494
|
}) {
|
|
492
495
|
const defaultIntensity = variant === "chrome" ? 22 : variant === "void" ? 24 : variant === "volt" ? 25 : 28;
|
|
493
496
|
const intensity = perspectiveGridRadialGlowIntensity ?? defaultIntensity;
|
|
494
497
|
const glowColor = `color-mix(in srgb, var(--color-primary) ${intensity}%, transparent)`;
|
|
495
498
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
496
|
-
/* @__PURE__ */ jsx(
|
|
499
|
+
/* @__PURE__ */ jsx(
|
|
500
|
+
PerspectiveGrid,
|
|
501
|
+
{
|
|
502
|
+
lineColor: "var(--color-border)",
|
|
503
|
+
prominentGlow: true,
|
|
504
|
+
glowColor,
|
|
505
|
+
lineIntensity: perspectiveGridLineIntensity
|
|
506
|
+
}
|
|
507
|
+
),
|
|
497
508
|
/* @__PURE__ */ jsx(RadiantGlow, {}),
|
|
498
509
|
/* @__PURE__ */ jsx(FloatingOrbs, {}),
|
|
499
510
|
/* @__PURE__ */ jsx(FloatingMotes, {}),
|