@elevasis/ui 2.15.0 → 2.17.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/index.js +3 -2
- package/dist/app/index.js +9 -7
- package/dist/auth/index.js +4 -3
- package/dist/charts/index.js +11 -10
- package/dist/{chunk-C7BX547M.js → chunk-2TDZBYXI.js} +9 -3
- package/dist/{chunk-5IBTTMWX.js → chunk-34NQLV2W.js} +2 -2
- package/dist/{chunk-FL67C3WY.js → chunk-6IA2OMAE.js} +1 -1
- package/dist/{chunk-L4XXM55J.js → chunk-7YQKVWSD.js} +1 -1
- package/dist/{chunk-XJ7KC54A.js → chunk-ABUDMATM.js} +7 -8
- package/dist/{chunk-TUXTSEAF.js → chunk-DK2HVHCY.js} +1 -1
- package/dist/{chunk-GHIPBT5V.js → chunk-E4WQGJNS.js} +1 -1
- package/dist/{chunk-5SXYCICG.js → chunk-FNWWVX5N.js} +8 -6
- package/dist/{chunk-IOKL7BKE.js → chunk-GCBWGGI6.js} +133 -1
- package/dist/chunk-GRGRBWIO.js +383 -0
- package/dist/{chunk-SLVC5OJ2.js → chunk-HQ7M6PBW.js} +1 -1
- package/dist/chunk-IRW7JMQ4.js +28 -0
- package/dist/{chunk-YNPVQDNB.js → chunk-JU6UB4YA.js} +4 -4
- package/dist/{chunk-SFW573HS.js → chunk-MDO4UCEJ.js} +4 -4
- package/dist/{chunk-STZJ7SY5.js → chunk-MJ6YV2B5.js} +3 -2
- package/dist/{chunk-D7HBX5US.js → chunk-MUZIYL5Q.js} +5 -4
- package/dist/{chunk-DKQQK3WX.js → chunk-OCCZRPER.js} +1 -1
- package/dist/{chunk-FFXHKADZ.js → chunk-OXWQQCDR.js} +13 -32
- package/dist/{chunk-ZB5GAV7J.js → chunk-P3TFNFZS.js} +6 -5
- package/dist/{chunk-QEPXAWE2.js → chunk-QHSW4WHM.js} +3 -26
- package/dist/{chunk-LXHZYSMQ.js → chunk-QSTH6T77.js} +2 -52
- package/dist/{chunk-U2RXVZGY.js → chunk-R7GKX4HW.js} +66 -461
- package/dist/{chunk-X75JEGHS.js → chunk-S6CYH4RI.js} +7 -6
- package/dist/{chunk-MTJ43R2E.js → chunk-SLH2QLKV.js} +1 -1
- package/dist/{chunk-32NXXCQU.js → chunk-TP5NMF6K.js} +6 -7
- package/dist/{chunk-SQQGLGHW.js → chunk-TTP62HWW.js} +3 -3
- package/dist/{chunk-NVOCKXUQ.js → chunk-VDM6DQES.js} +1 -1
- package/dist/chunk-ZTWA5H77.js +94 -0
- package/dist/components/index.d.ts +2640 -2640
- package/dist/components/index.js +38 -35
- package/dist/execution/index.js +2 -2
- package/dist/features/auth/index.js +5 -4
- package/dist/features/crm/index.d.ts +51 -51
- package/dist/features/crm/index.js +21 -19
- package/dist/features/dashboard/index.js +23 -21
- package/dist/features/delivery/index.d.ts +2604 -2604
- package/dist/features/delivery/index.js +21 -19
- package/dist/features/lead-gen/index.js +29 -26
- package/dist/features/monitoring/index.js +26 -24
- package/dist/features/monitoring/requests/index.d.ts +26 -26
- package/dist/features/monitoring/requests/index.js +21 -19
- package/dist/features/operations/index.d.ts +10 -10
- package/dist/features/operations/index.js +28 -25
- package/dist/features/seo/index.js +1 -1
- package/dist/features/settings/index.d.ts +34 -34
- package/dist/features/settings/index.js +22 -20
- package/dist/hooks/delivery/index.css +589 -0
- package/dist/hooks/delivery/index.d.ts +3044 -0
- package/dist/hooks/delivery/index.js +4 -0
- package/dist/hooks/index.d.ts +3103 -3120
- package/dist/hooks/index.js +20 -18
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +506 -0
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -0
- package/dist/hooks/published.d.ts +3103 -3120
- package/dist/hooks/published.js +20 -18
- package/dist/index.d.ts +3409 -3361
- package/dist/index.js +21 -19
- package/dist/initialization/index.js +4 -3
- package/dist/layout/index.js +3 -3
- package/dist/organization/index.js +4 -3
- package/dist/profile/index.js +2 -1
- package/dist/provider/ElevasisServiceContext.d.ts +54 -0
- package/dist/provider/ElevasisServiceContext.js +1 -0
- package/dist/provider/index.d.ts +244 -240
- package/dist/provider/index.js +17 -16
- package/dist/provider/published.d.ts +244 -240
- package/dist/provider/published.js +15 -14
- package/dist/types/index.d.ts +2349 -2332
- package/dist/utils/index.d.ts +73 -1
- package/dist/utils/index.js +2 -1
- package/dist/zustand/index.d.ts +7 -7
- package/package.json +3 -3
- package/dist/{chunk-4BF74JVD.js → chunk-6GUW5GGF.js} +1 -1
- package/dist/{chunk-ELJIFLCB.js → chunk-KRWALB24.js} +6 -6
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-GCBWGGI6.js';
|
|
2
|
+
import { useElevasisServices } from './chunk-IRW7JMQ4.js';
|
|
3
|
+
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
4
|
+
import { notifications } from '@mantine/notifications';
|
|
5
|
+
|
|
6
|
+
var showInfoNotification = (message) => {
|
|
7
|
+
notifications.show({
|
|
8
|
+
title: "Info",
|
|
9
|
+
message,
|
|
10
|
+
autoClose: 5e3,
|
|
11
|
+
color: "blue",
|
|
12
|
+
position: "top-right"
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var showSuccessNotification = (message) => {
|
|
16
|
+
notifications.show({
|
|
17
|
+
title: "Action Successful",
|
|
18
|
+
message,
|
|
19
|
+
autoClose: 5e3,
|
|
20
|
+
color: "green",
|
|
21
|
+
position: "top-right"
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var showErrorNotification = (error) => {
|
|
25
|
+
if (error instanceof Error) {
|
|
26
|
+
error = error.message;
|
|
27
|
+
}
|
|
28
|
+
notifications.show({
|
|
29
|
+
title: "Action Failed",
|
|
30
|
+
message: error,
|
|
31
|
+
autoClose: 5e3,
|
|
32
|
+
color: "red",
|
|
33
|
+
position: "top-right"
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var showWarningNotification = (message) => {
|
|
37
|
+
notifications.show({
|
|
38
|
+
title: "Warning",
|
|
39
|
+
message,
|
|
40
|
+
autoClose: 5e3,
|
|
41
|
+
color: "orange",
|
|
42
|
+
position: "top-right"
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var showApiErrorNotification = (error) => {
|
|
46
|
+
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
47
|
+
notifications.show({
|
|
48
|
+
title: getErrorTitle(code),
|
|
49
|
+
message: formatErrorMessage(message, requestId, fields, retryAfter),
|
|
50
|
+
autoClose: retryAfter ? retryAfter * 1e3 : 5e3,
|
|
51
|
+
color: "red",
|
|
52
|
+
position: "top-right"
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var milestoneKeys = {
|
|
56
|
+
all: ["project-milestones"],
|
|
57
|
+
lists: () => [...milestoneKeys.all, "list"],
|
|
58
|
+
list: (orgId, filters) => [...milestoneKeys.all, "list", orgId, filters],
|
|
59
|
+
details: () => [...milestoneKeys.all, "detail"],
|
|
60
|
+
detail: (id) => [...milestoneKeys.all, "detail", id]
|
|
61
|
+
};
|
|
62
|
+
function useMilestones(filters = {}) {
|
|
63
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
64
|
+
return useQuery({
|
|
65
|
+
queryKey: milestoneKeys.list(organizationId, filters),
|
|
66
|
+
queryFn: async () => {
|
|
67
|
+
const res = await apiRequest(`/projects/${filters.projectId}/milestones`);
|
|
68
|
+
return res.milestones;
|
|
69
|
+
},
|
|
70
|
+
enabled: isReady && !!filters.projectId
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function useCreateMilestone() {
|
|
74
|
+
const { apiRequest } = useElevasisServices();
|
|
75
|
+
const queryClient = useQueryClient();
|
|
76
|
+
return useMutation({
|
|
77
|
+
mutationFn: async (params) => {
|
|
78
|
+
const { project_id, ...body } = params;
|
|
79
|
+
if (!project_id) throw new Error("project_id is required to create a milestone");
|
|
80
|
+
const res = await apiRequest(`/projects/${project_id}/milestones`, {
|
|
81
|
+
method: "POST",
|
|
82
|
+
body: JSON.stringify(body)
|
|
83
|
+
});
|
|
84
|
+
return res.milestone;
|
|
85
|
+
},
|
|
86
|
+
onSuccess: (data) => {
|
|
87
|
+
queryClient.invalidateQueries({ queryKey: milestoneKeys.all });
|
|
88
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
89
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
90
|
+
},
|
|
91
|
+
onError: (error) => {
|
|
92
|
+
showApiErrorNotification(error);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function useUpdateMilestone() {
|
|
97
|
+
const { apiRequest } = useElevasisServices();
|
|
98
|
+
const queryClient = useQueryClient();
|
|
99
|
+
return useMutation({
|
|
100
|
+
mutationFn: async (params) => {
|
|
101
|
+
const res = await apiRequest(`/milestones/${params.id}`, {
|
|
102
|
+
method: "PATCH",
|
|
103
|
+
body: JSON.stringify(params.updates)
|
|
104
|
+
});
|
|
105
|
+
return res.milestone;
|
|
106
|
+
},
|
|
107
|
+
onSuccess: (data) => {
|
|
108
|
+
queryClient.invalidateQueries({ queryKey: milestoneKeys.all });
|
|
109
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
110
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
111
|
+
},
|
|
112
|
+
onError: (error) => {
|
|
113
|
+
showApiErrorNotification(error);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function useDeleteMilestone() {
|
|
118
|
+
const { apiRequest } = useElevasisServices();
|
|
119
|
+
const queryClient = useQueryClient();
|
|
120
|
+
return useMutation({
|
|
121
|
+
mutationFn: async (params) => {
|
|
122
|
+
await apiRequest(`/milestones/${params.id}`, {
|
|
123
|
+
method: "DELETE"
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
onSuccess: (_, params) => {
|
|
127
|
+
queryClient.invalidateQueries({ queryKey: milestoneKeys.all });
|
|
128
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
129
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(params.projectId) });
|
|
130
|
+
},
|
|
131
|
+
onError: (error) => {
|
|
132
|
+
showApiErrorNotification(error);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
var taskKeys = {
|
|
137
|
+
all: ["project-tasks"],
|
|
138
|
+
lists: () => [...taskKeys.all, "list"],
|
|
139
|
+
list: (orgId, filters) => [...taskKeys.all, "list", orgId, filters],
|
|
140
|
+
details: () => [...taskKeys.all, "detail"],
|
|
141
|
+
detail: (id) => [...taskKeys.all, "detail", id]
|
|
142
|
+
};
|
|
143
|
+
function useTasks(filters = {}) {
|
|
144
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
145
|
+
return useQuery({
|
|
146
|
+
queryKey: taskKeys.list(organizationId, filters),
|
|
147
|
+
queryFn: async () => {
|
|
148
|
+
const params = new URLSearchParams();
|
|
149
|
+
if (filters.status) params.set("status", filters.status);
|
|
150
|
+
if (filters.milestoneId) params.set("milestone_id", filters.milestoneId);
|
|
151
|
+
const qs = params.toString();
|
|
152
|
+
const base = `/projects/${filters.projectId}/tasks`;
|
|
153
|
+
const path = qs ? `${base}?${qs}` : base;
|
|
154
|
+
const res = await apiRequest(path);
|
|
155
|
+
return res.tasks;
|
|
156
|
+
},
|
|
157
|
+
enabled: isReady && !!filters.projectId
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function useCreateTask() {
|
|
161
|
+
const { apiRequest } = useElevasisServices();
|
|
162
|
+
const queryClient = useQueryClient();
|
|
163
|
+
return useMutation({
|
|
164
|
+
mutationFn: async (params) => {
|
|
165
|
+
const res = await apiRequest("/project-tasks", {
|
|
166
|
+
method: "POST",
|
|
167
|
+
body: JSON.stringify(params)
|
|
168
|
+
});
|
|
169
|
+
return res.task;
|
|
170
|
+
},
|
|
171
|
+
onSuccess: (data) => {
|
|
172
|
+
queryClient.invalidateQueries({ queryKey: taskKeys.all });
|
|
173
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
174
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
175
|
+
},
|
|
176
|
+
onError: (error) => {
|
|
177
|
+
showApiErrorNotification(error);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function useUpdateTask() {
|
|
182
|
+
const { apiRequest } = useElevasisServices();
|
|
183
|
+
const queryClient = useQueryClient();
|
|
184
|
+
return useMutation({
|
|
185
|
+
mutationFn: async (params) => {
|
|
186
|
+
const res = await apiRequest(`/project-tasks/${params.id}`, {
|
|
187
|
+
method: "PATCH",
|
|
188
|
+
body: JSON.stringify(params.updates)
|
|
189
|
+
});
|
|
190
|
+
return res.task;
|
|
191
|
+
},
|
|
192
|
+
onSuccess: (data) => {
|
|
193
|
+
queryClient.invalidateQueries({ queryKey: taskKeys.all });
|
|
194
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
195
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
196
|
+
},
|
|
197
|
+
onError: (error) => {
|
|
198
|
+
showApiErrorNotification(error);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function useDeleteTask() {
|
|
203
|
+
const { apiRequest } = useElevasisServices();
|
|
204
|
+
const queryClient = useQueryClient();
|
|
205
|
+
return useMutation({
|
|
206
|
+
mutationFn: async (params) => {
|
|
207
|
+
await apiRequest(`/project-tasks/${params.id}`, {
|
|
208
|
+
method: "DELETE"
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
onSuccess: (_, params) => {
|
|
212
|
+
queryClient.invalidateQueries({ queryKey: taskKeys.all });
|
|
213
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
214
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(params.projectId) });
|
|
215
|
+
},
|
|
216
|
+
onError: (error) => {
|
|
217
|
+
showApiErrorNotification(error);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
var noteKeys = {
|
|
222
|
+
all: ["project-notes"],
|
|
223
|
+
lists: () => [...noteKeys.all, "list"],
|
|
224
|
+
list: (orgId, filters) => [...noteKeys.all, "list", orgId, filters],
|
|
225
|
+
details: () => [...noteKeys.all, "detail"],
|
|
226
|
+
detail: (id) => [...noteKeys.all, "detail", id]
|
|
227
|
+
};
|
|
228
|
+
function useProjectNotes(filters = {}) {
|
|
229
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
230
|
+
return useQuery({
|
|
231
|
+
queryKey: noteKeys.list(organizationId, filters),
|
|
232
|
+
queryFn: async () => {
|
|
233
|
+
const res = await apiRequest(`/projects/${filters.projectId}/notes`);
|
|
234
|
+
return res.notes;
|
|
235
|
+
},
|
|
236
|
+
enabled: isReady && !!filters.projectId
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
function useCreateNote() {
|
|
240
|
+
const { apiRequest } = useElevasisServices();
|
|
241
|
+
const queryClient = useQueryClient();
|
|
242
|
+
return useMutation({
|
|
243
|
+
mutationFn: async (params) => {
|
|
244
|
+
const res = await apiRequest("/project-notes", {
|
|
245
|
+
method: "POST",
|
|
246
|
+
body: JSON.stringify(params)
|
|
247
|
+
});
|
|
248
|
+
return res.note;
|
|
249
|
+
},
|
|
250
|
+
onSuccess: (data) => {
|
|
251
|
+
queryClient.invalidateQueries({ queryKey: noteKeys.all });
|
|
252
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
253
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.project_id) });
|
|
254
|
+
},
|
|
255
|
+
onError: (error) => {
|
|
256
|
+
showApiErrorNotification(error);
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// src/hooks/delivery/useProjects.ts
|
|
262
|
+
var projectKeys = {
|
|
263
|
+
all: ["projects"],
|
|
264
|
+
lists: () => [...projectKeys.all, "list"],
|
|
265
|
+
list: (orgId, filters) => [...projectKeys.all, "list", orgId, filters],
|
|
266
|
+
details: () => [...projectKeys.all, "detail"],
|
|
267
|
+
detail: (id) => [...projectKeys.all, "detail", id],
|
|
268
|
+
milestones: (id) => [...projectKeys.all, id, "milestones"],
|
|
269
|
+
tasks: (id) => [...projectKeys.all, id, "tasks"]
|
|
270
|
+
};
|
|
271
|
+
function useProjects(filters = {}) {
|
|
272
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
273
|
+
return useQuery({
|
|
274
|
+
queryKey: projectKeys.list(organizationId, filters),
|
|
275
|
+
queryFn: async () => {
|
|
276
|
+
const params = new URLSearchParams();
|
|
277
|
+
if (filters.kind) params.set("kind", filters.kind);
|
|
278
|
+
const qs = params.toString();
|
|
279
|
+
const path = qs ? `/projects?${qs}` : "/projects";
|
|
280
|
+
const res = await apiRequest(path);
|
|
281
|
+
return res.projects;
|
|
282
|
+
},
|
|
283
|
+
enabled: isReady
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function useProject(id) {
|
|
287
|
+
const { apiRequest, isReady, organizationId } = useElevasisServices();
|
|
288
|
+
return useQuery({
|
|
289
|
+
queryKey: [...projectKeys.detail(id), organizationId],
|
|
290
|
+
queryFn: async () => {
|
|
291
|
+
try {
|
|
292
|
+
const res = await apiRequest(`/projects/${id}`);
|
|
293
|
+
return res.project;
|
|
294
|
+
} catch (err) {
|
|
295
|
+
if (err && typeof err === "object" && "statusCode" in err && err.statusCode === 404) {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
throw err;
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
enabled: isReady && !!id
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
function useProjectMilestones(projectId) {
|
|
305
|
+
const { apiRequest, isReady } = useElevasisServices();
|
|
306
|
+
return useQuery({
|
|
307
|
+
queryKey: projectKeys.milestones(projectId),
|
|
308
|
+
queryFn: async () => {
|
|
309
|
+
const res = await apiRequest(`/projects/${projectId}/milestones`);
|
|
310
|
+
return res.milestones;
|
|
311
|
+
},
|
|
312
|
+
enabled: isReady && !!projectId
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function useProjectTasks(projectId) {
|
|
316
|
+
const { apiRequest, isReady } = useElevasisServices();
|
|
317
|
+
return useQuery({
|
|
318
|
+
queryKey: projectKeys.tasks(projectId),
|
|
319
|
+
queryFn: async () => {
|
|
320
|
+
const res = await apiRequest(`/projects/${projectId}/tasks`);
|
|
321
|
+
return res.tasks;
|
|
322
|
+
},
|
|
323
|
+
enabled: isReady && !!projectId
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
function useCreateProject() {
|
|
327
|
+
const { apiRequest } = useElevasisServices();
|
|
328
|
+
const queryClient = useQueryClient();
|
|
329
|
+
return useMutation({
|
|
330
|
+
mutationFn: async (params) => {
|
|
331
|
+
const res = await apiRequest("/projects", {
|
|
332
|
+
method: "POST",
|
|
333
|
+
body: JSON.stringify(params)
|
|
334
|
+
});
|
|
335
|
+
return res.project;
|
|
336
|
+
},
|
|
337
|
+
onSuccess: () => {
|
|
338
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
339
|
+
},
|
|
340
|
+
onError: (error) => {
|
|
341
|
+
showApiErrorNotification(error);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function useUpdateProject() {
|
|
346
|
+
const { apiRequest } = useElevasisServices();
|
|
347
|
+
const queryClient = useQueryClient();
|
|
348
|
+
return useMutation({
|
|
349
|
+
mutationFn: async (params) => {
|
|
350
|
+
const res = await apiRequest(`/projects/${params.id}`, {
|
|
351
|
+
method: "PATCH",
|
|
352
|
+
body: JSON.stringify(params.updates)
|
|
353
|
+
});
|
|
354
|
+
return res.project;
|
|
355
|
+
},
|
|
356
|
+
onSuccess: (data) => {
|
|
357
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
358
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.detail(data.id) });
|
|
359
|
+
},
|
|
360
|
+
onError: (error) => {
|
|
361
|
+
showApiErrorNotification(error);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
function useDeleteProject() {
|
|
366
|
+
const { apiRequest } = useElevasisServices();
|
|
367
|
+
const queryClient = useQueryClient();
|
|
368
|
+
return useMutation({
|
|
369
|
+
mutationFn: async (id) => {
|
|
370
|
+
await apiRequest(`/projects/${id}`, {
|
|
371
|
+
method: "DELETE"
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
onSuccess: () => {
|
|
375
|
+
queryClient.invalidateQueries({ queryKey: projectKeys.all });
|
|
376
|
+
},
|
|
377
|
+
onError: (error) => {
|
|
378
|
+
showApiErrorNotification(error);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export { milestoneKeys, noteKeys, projectKeys, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, taskKeys, useCreateMilestone, useCreateNote, useCreateProject, useCreateTask, useDeleteMilestone, useDeleteProject, useDeleteTask, useMilestones, useProject, useProjectMilestones, useProjectNotes, useProjectTasks, useProjects, useTasks, useUpdateMilestone, useUpdateProject, useUpdateTask };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/provider/ElevasisServiceContext.tsx
|
|
5
|
+
var ElevasisServiceContext = createContext(null);
|
|
6
|
+
function useElevasisServices() {
|
|
7
|
+
const ctx = useContext(ElevasisServiceContext);
|
|
8
|
+
if (!ctx) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"useElevasisServices must be used within an ElevasisServiceProvider or an ElevasisUIProvider with apiUrl configured."
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return ctx;
|
|
14
|
+
}
|
|
15
|
+
function ElevasisServiceProvider({
|
|
16
|
+
apiRequest,
|
|
17
|
+
organizationId,
|
|
18
|
+
isReady,
|
|
19
|
+
children
|
|
20
|
+
}) {
|
|
21
|
+
const value = useMemo(
|
|
22
|
+
() => ({ apiRequest, organizationId, isReady }),
|
|
23
|
+
[apiRequest, organizationId, isReady]
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ jsx(ElevasisServiceContext.Provider, { value, children });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { ElevasisServiceContext, ElevasisServiceProvider, useElevasisServices };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-
|
|
2
|
-
import { useResourcesHealth } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-MJ6YV2B5.js';
|
|
2
|
+
import { useResourcesHealth } from './chunk-R7GKX4HW.js';
|
|
3
|
+
import { CardHeader, EmptyState } from './chunk-TTP62HWW.js';
|
|
4
|
+
import { getTimeRangeDates, formatBucketTime } from './chunk-GCBWGGI6.js';
|
|
5
5
|
import { Paper, Center, Loader, Group } from '@mantine/core';
|
|
6
6
|
import { IconActivity, IconChartBar } from '@tabler/icons-react';
|
|
7
7
|
import { useMemo } from 'react';
|
|
@@ -4,12 +4,12 @@ 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, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-
|
|
7
|
+
import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-R7GKX4HW.js';
|
|
8
8
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
9
|
-
import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-
|
|
10
|
-
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-IOKL7BKE.js';
|
|
11
|
-
import { useElevasisServices } from './chunk-QEPXAWE2.js';
|
|
9
|
+
import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-TTP62HWW.js';
|
|
12
10
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
11
|
+
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-GCBWGGI6.js';
|
|
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';
|
|
15
15
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CardHeader, CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-
|
|
1
|
+
import { useErrorTrends } from './chunk-QSTH6T77.js';
|
|
2
|
+
import { CardHeader, CenteredErrorState, TrendIndicator, EmptyState, StatCard } from './chunk-TTP62HWW.js';
|
|
3
|
+
import { getTimeRangeLabel, getTimeRangeDates, formatBucketTime } from './chunk-GCBWGGI6.js';
|
|
3
4
|
import { useRef, useState, useLayoutEffect, useEffect, useMemo, useCallback } from 'react';
|
|
4
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
6
|
import { useComputedColorScheme, Group, Text, Box, Stack, Center, Loader, Paper, Button, NumberFormatter, Badge, Space, Tooltip as Tooltip$1, SimpleGrid, Alert, SegmentedControl } from '@mantine/core';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { ResourceExecuteDialog } from './chunk-
|
|
1
|
+
import { ResourceExecuteDialog } from './chunk-OXWQQCDR.js';
|
|
2
2
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
3
3
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
4
4
|
import { SubshellNavItem } from './chunk-CEWTOKE7.js';
|
|
5
5
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
6
6
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
7
7
|
import { CustomModal } from './chunk-GBMNCNHX.js';
|
|
8
|
-
import {
|
|
8
|
+
import { acquisitionListKeys, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-R7GKX4HW.js';
|
|
9
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-GRGRBWIO.js';
|
|
9
10
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
10
|
-
import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-
|
|
11
|
-
import { useElevasisServices } from './chunk-QEPXAWE2.js';
|
|
11
|
+
import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-TTP62HWW.js';
|
|
12
12
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
13
|
+
import { useElevasisServices } from './chunk-IRW7JMQ4.js';
|
|
13
14
|
import { Stack, Paper, Text, Anchor, Group, Title, ActionIcon, Divider, Box, SimpleGrid, Badge, Card, Button, Center, Loader, Alert, Table, Progress, TextInput, Checkbox, Pagination, Textarea, Select, Code, Modal } from '@mantine/core';
|
|
14
15
|
import { IconLayoutGrid, IconList, IconBuilding, IconAddressBook, IconMailCheck, IconTarget, IconExternalLink, IconX, IconAlertCircle, IconPlayerPlay, IconArrowRight, IconQuestionMark, IconChecklist, IconPlus, IconSearch, IconSparkles, IconAlertTriangle, IconArrowLeft, IconClockHour4, IconBuildingFactory2, IconUsers } from '@tabler/icons-react';
|
|
15
16
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
|
|
2
2
|
import { SubshellLoader } from './chunk-ADSSLKKP.js';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-ABUDMATM.js';
|
|
4
|
+
import { ResourceHealthPanel } from './chunk-JU6UB4YA.js';
|
|
5
|
+
import { useCyberColors, CyberDonut } from './chunk-MJ6YV2B5.js';
|
|
6
|
+
import { AppShellLoader } from './chunk-M25JL54Z.js';
|
|
4
7
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
5
8
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
6
9
|
import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { getResourceStatusColor, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-GHIPBT5V.js';
|
|
11
|
-
import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, useBulkDeleteExecutions } from './chunk-U2RXVZGY.js';
|
|
10
|
+
import { getResourceStatusColor, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-E4WQGJNS.js';
|
|
11
|
+
import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, useBulkDeleteExecutions } from './chunk-R7GKX4HW.js';
|
|
12
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-GRGRBWIO.js';
|
|
12
13
|
import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
|
|
13
14
|
import { useMergedExecution } from './chunk-3ZMAGTWF.js';
|
|
14
|
-
import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-
|
|
15
|
+
import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-2TDZBYXI.js';
|
|
15
16
|
import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
|
|
16
|
-
import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-
|
|
17
|
+
import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-TTP62HWW.js';
|
|
17
18
|
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
18
19
|
import { NavigationButton } from './chunk-NYBEU5TE.js';
|
|
19
|
-
import {
|
|
20
|
+
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
20
21
|
import { useAppearance } from './chunk-QJ2KCHKX.js';
|
|
21
22
|
import { topbarHeight } from './chunk-DT3QYZVU.js';
|
|
22
|
-
import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, DOMAIN_MAP, getNodeId, PAGE_SIZE_DEFAULT } from './chunk-
|
|
23
|
-
import {
|
|
23
|
+
import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, DOMAIN_MAP, getNodeId, PAGE_SIZE_DEFAULT, debounce } from './chunk-GCBWGGI6.js';
|
|
24
|
+
import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-KRWALB24.js';
|
|
25
|
+
import { useInitialization } from './chunk-DK2HVHCY.js';
|
|
24
26
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
25
|
-
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
26
27
|
import { z } from 'zod';
|
|
27
28
|
import { Stack, Group, Text, Badge, Title, Textarea, Alert, Button, ActionIcon, Collapse, Card, ThemeIcon, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, Menu, useMantineTheme, UnstyledButton, Select, RangeSlider, Loader, Box, Progress, Tabs, Pagination, TextInput, Modal, LoadingOverlay, SegmentedControl, Switch, ScrollArea, MultiSelect } from '@mantine/core';
|
|
28
29
|
import { IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconAlertCircle, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCircleCheck, IconCategory, IconDatabase, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleX, IconCircleDashed, IconExternalLink, IconTopologyStar3, IconInfoCircle, IconPlus, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconActivityHeartbeat, IconClockPause, IconArrowsMaximize, IconShare2, IconHistory } from '@tabler/icons-react';
|
|
@@ -39,26 +40,6 @@ import cytoscape from 'cytoscape';
|
|
|
39
40
|
import { create } from 'zustand';
|
|
40
41
|
import { formatDistanceToNow } from 'date-fns';
|
|
41
42
|
|
|
42
|
-
// ../core/src/platform/utils/debounce.ts
|
|
43
|
-
function debounce(fn, wait) {
|
|
44
|
-
let timeoutId = null;
|
|
45
|
-
const debounced = (...args) => {
|
|
46
|
-
if (timeoutId !== null) {
|
|
47
|
-
clearTimeout(timeoutId);
|
|
48
|
-
}
|
|
49
|
-
timeoutId = setTimeout(() => {
|
|
50
|
-
fn(...args);
|
|
51
|
-
timeoutId = null;
|
|
52
|
-
}, wait);
|
|
53
|
-
};
|
|
54
|
-
debounced.cancel = () => {
|
|
55
|
-
if (timeoutId !== null) {
|
|
56
|
-
clearTimeout(timeoutId);
|
|
57
|
-
timeoutId = null;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return debounced;
|
|
61
|
-
}
|
|
62
43
|
var ModelIdSchema = z.string().trim().min(1).max(100).regex(/^[a-z0-9]+(?:[-._][a-z0-9]+)*$/, "IDs must be lowercase and use -, _, or . separators");
|
|
63
44
|
var LabelSchema = z.string().trim().min(1).max(120);
|
|
64
45
|
var DescriptionSchema = z.string().trim().min(1).max(2e3);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ApiClientProvider, useApiClient } from './chunk-
|
|
2
|
-
import { OrganizationProvider } from './chunk-
|
|
3
|
-
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-
|
|
4
|
-
import { InitializationProvider } from './chunk-
|
|
1
|
+
import { ApiClientProvider, useApiClient } from './chunk-VDM6DQES.js';
|
|
2
|
+
import { OrganizationProvider } from './chunk-6IA2OMAE.js';
|
|
3
|
+
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-GCBWGGI6.js';
|
|
4
|
+
import { InitializationProvider } from './chunk-DK2HVHCY.js';
|
|
5
5
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
6
|
-
import { ProfileProvider
|
|
6
|
+
import { ProfileProvider } from './chunk-QHSW4WHM.js';
|
|
7
|
+
import { ElevasisServiceProvider } from './chunk-IRW7JMQ4.js';
|
|
7
8
|
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
8
9
|
import { createContext, lazy, useContext, Suspense, useRef } from 'react';
|
|
9
10
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
+
import { ElevasisServiceContext } from './chunk-IRW7JMQ4.js';
|
|
1
2
|
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
2
|
-
import { createContext, useContext,
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var ElevasisServiceContext = createContext(null);
|
|
6
|
-
function useElevasisServices() {
|
|
7
|
-
const ctx = useContext(ElevasisServiceContext);
|
|
8
|
-
if (!ctx) {
|
|
9
|
-
throw new Error(
|
|
10
|
-
"useElevasisServices must be used within an ElevasisServiceProvider or an ElevasisUIProvider with apiUrl configured."
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
return ctx;
|
|
14
|
-
}
|
|
15
|
-
function ElevasisServiceProvider({
|
|
16
|
-
apiRequest,
|
|
17
|
-
organizationId,
|
|
18
|
-
isReady,
|
|
19
|
-
children
|
|
20
|
-
}) {
|
|
21
|
-
const value = useMemo(
|
|
22
|
-
() => ({ apiRequest, organizationId, isReady }),
|
|
23
|
-
[apiRequest, organizationId, isReady]
|
|
24
|
-
);
|
|
25
|
-
return /* @__PURE__ */ jsx(ElevasisServiceContext.Provider, { value, children });
|
|
26
|
-
}
|
|
3
|
+
import { createContext, useContext, useState, useEffect, createElement } from 'react';
|
|
27
4
|
|
|
28
5
|
// src/profile/services/UserProfileService.ts
|
|
29
6
|
var UserProfileService = class {
|
|
@@ -173,4 +150,4 @@ function ProfileProvider({ apiRequest, children }) {
|
|
|
173
150
|
return createElement(ProfileContext.Provider, { value }, children);
|
|
174
151
|
}
|
|
175
152
|
|
|
176
|
-
export {
|
|
153
|
+
export { ProfileProvider, UserProfileService, useProfile, useUserProfile };
|