@elevasis/ui 2.75.0 → 2.76.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 -3
- package/dist/app/index.d.ts +277 -249
- package/dist/app/index.js +12 -11
- package/dist/auth/index.js +6 -7
- package/dist/charts/index.js +6 -7
- package/dist/{chunk-CRPH5AAB.js → chunk-2GIHWU5O.js} +4 -3
- package/dist/chunk-2Y6AKWGU.js +42 -0
- package/dist/chunk-3QYRZSHP.js +854 -0
- package/dist/{chunk-L3NBMLRN.js → chunk-3RK2NNJX.js} +1 -1
- package/dist/{chunk-R6NMRXNO.js → chunk-4WLAVUPS.js} +1 -1
- package/dist/{chunk-DTEGVSJ6.js → chunk-5R4I2PAN.js} +9 -43
- package/dist/chunk-6B4ZPBQJ.js +7 -0
- package/dist/{chunk-QFS2GZMV.js → chunk-73G3I5HJ.js} +160 -160
- package/dist/{chunk-7OOFMEX6.js → chunk-BFLYDVEN.js} +28 -41
- package/dist/{chunk-VWGCURZF.js → chunk-BG6PWDJ3.js} +381 -381
- package/dist/{chunk-5VF5LPYS.js → chunk-BV2RNLPP.js} +1 -1
- package/dist/{chunk-NMHQAYZU.js → chunk-CTT4RDXE.js} +150 -151
- package/dist/chunk-E2LJ3FRA.js +237 -0
- package/dist/{chunk-5RH6NYZH.js → chunk-EFQLXRYT.js} +1 -2
- package/dist/{chunk-M6VAZAQW.js → chunk-EVNLJHDD.js} +3 -3
- package/dist/{chunk-NYIIRZSA.js → chunk-GDQQX5SL.js} +4 -42
- package/dist/{chunk-IYATYH5I.js → chunk-GFSOQH3N.js} +1 -1
- package/dist/{chunk-G7O4CBMC.js → chunk-H5AEYSVX.js} +164 -3
- package/dist/{chunk-ZFISGKYW.js → chunk-IIEZXXDD.js} +1 -1
- package/dist/{chunk-5SLRGUC4.js → chunk-INCEZAM3.js} +1 -1
- package/dist/{chunk-ZG6YJUT4.js → chunk-JZQNUQE4.js} +1 -1
- package/dist/{chunk-SB3IHM5Y.js → chunk-K55TU6CC.js} +2023 -1700
- package/dist/chunk-KB5CAN5D.js +33 -0
- package/dist/{chunk-OGHTJKBV.js → chunk-KMA4FOSV.js} +5682 -5675
- package/dist/{chunk-ICHDIVQO.js → chunk-KXNRTJAE.js} +1 -1
- package/dist/{chunk-MLHZUN2X.js → chunk-MGAELVTZ.js} +12 -12
- package/dist/chunk-MKH2KOAO.js +39 -0
- package/dist/{chunk-6BJ5HMMC.js → chunk-NAPXMYFW.js} +35 -362
- package/dist/{chunk-GDTK33QT.js → chunk-OGG3QJYW.js} +14 -5
- package/dist/{chunk-SN7X5N2A.js → chunk-P6HHXMLJ.js} +1 -1
- package/dist/{chunk-SEYOVNS5.js → chunk-QAILYRC2.js} +1 -1
- package/dist/{chunk-RBGVNPA6.js → chunk-RXZ3XDBM.js} +1 -1
- package/dist/{chunk-2ZRY3ARL.js → chunk-SPW6UA6B.js} +1 -1
- package/dist/{chunk-3H5DIJN7.js → chunk-SVZR4GYA.js} +1 -1
- package/dist/{chunk-47YJVIZE.js → chunk-UEY4AB3R.js} +789 -66
- package/dist/{chunk-LFLM723H.js → chunk-UL6MPMKY.js} +1 -1
- package/dist/{chunk-TX3UHDL5.js → chunk-WELN7DDV.js} +2 -2
- package/dist/{chunk-D3XXPCCK.js → chunk-WJN2VVVJ.js} +1 -1
- package/dist/{chunk-DMSTDZCJ.js → chunk-XODQUPFW.js} +11 -11
- package/dist/components/index.d.ts +135 -25
- package/dist/components/index.js +2165 -1996
- package/dist/components/navigation/index.js +7 -8
- package/dist/features/auth/index.d.ts +35 -3716
- package/dist/features/auth/index.js +9 -10
- package/dist/features/clients/index.js +18 -12
- package/dist/features/content/index.js +27 -27
- package/dist/features/crm/index.css +59 -59
- package/dist/features/crm/index.d.ts +18 -1
- package/dist/features/crm/index.js +13 -11
- package/dist/features/dashboard/index.css +59 -59
- package/dist/features/dashboard/index.js +8 -9
- package/dist/features/delivery/index.d.ts +3 -0
- package/dist/features/delivery/index.js +21 -20
- package/dist/features/knowledge/index.js +6 -7
- package/dist/features/lead-gen/index.css +59 -59
- package/dist/features/lead-gen/index.d.ts +3903 -2
- package/dist/features/lead-gen/index.js +15 -13
- package/dist/features/monitoring/index.js +10 -11
- package/dist/features/monitoring/requests/index.css +59 -59
- package/dist/features/monitoring/requests/index.js +8 -9
- package/dist/features/notes/index.js +4 -4
- package/dist/features/operations/index.css +59 -59
- package/dist/features/operations/index.js +13 -15
- package/dist/features/seo/index.css +659 -0
- package/dist/features/seo/index.d.ts +3962 -1
- package/dist/features/seo/index.js +31 -2
- package/dist/features/settings/index.css +59 -59
- package/dist/features/settings/index.d.ts +79 -3742
- package/dist/features/settings/index.js +10 -12
- package/dist/hooks/access/index.js +6 -7
- package/dist/hooks/delivery/index.css +59 -59
- package/dist/hooks/delivery/index.d.ts +13 -4
- package/dist/hooks/delivery/index.js +3 -3
- package/dist/hooks/published.d.ts +63 -25
- package/dist/hooks/published.js +19 -19
- package/dist/initialization/index.d.ts +35 -3716
- package/dist/knowledge/index.js +11 -11
- package/dist/layout/index.d.ts +55 -2
- package/dist/layout/index.js +10 -10
- package/dist/organization/index.css +59 -59
- package/dist/profile/index.d.ts +64 -3716
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.js +6 -7
- package/dist/provider/published.d.ts +3 -0
- package/dist/provider/published.js +6 -7
- package/dist/test-utils/index.js +3 -3
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/index.js +1 -1
- package/dist/types/index.d.ts +298 -251
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +5 -9
- package/src/hooks/README.md +22 -23
- package/dist/chunk-6ZAP3FOA.js +0 -93
- package/dist/chunk-AH52XQB7.js +0 -1
- package/dist/chunk-DVAOCHIF.js +0 -165
- package/dist/chunk-MISHPEJX.js +0 -244
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -879
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +0 -2
- /package/dist/{chunk-A2SB32YV.js → chunk-5ZK7K7YP.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { showApiErrorNotification } from './chunk-
|
|
1
|
+
import { showApiErrorNotification } from './chunk-KXNRTJAE.js';
|
|
2
2
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
3
3
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
4
4
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { deriveActions } from './chunk-GDQQX5SL.js';
|
|
2
|
+
import { acquisitionListKeys, useNotificationAdapter } from './chunk-K55TU6CC.js';
|
|
3
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-KXNRTJAE.js';
|
|
2
4
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
3
5
|
import { CredentialNameSchema, UuidSchema } from './chunk-TVTSASST.js';
|
|
6
|
+
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
4
7
|
import { z } from 'zod';
|
|
5
|
-
import {
|
|
8
|
+
import { useMemo } from 'react';
|
|
6
9
|
import { notifications } from '@mantine/notifications';
|
|
7
10
|
|
|
8
11
|
var CredentialTypeSchema = z.enum([
|
|
@@ -80,6 +83,126 @@ var CredentialSchemas = {
|
|
|
80
83
|
VerifyResponse: VerifyCredentialResponseSchema
|
|
81
84
|
};
|
|
82
85
|
|
|
86
|
+
// src/hooks/lead-gen/useListMembers.ts
|
|
87
|
+
var leadGenListMemberKeys = {
|
|
88
|
+
all: ["lead-gen-list-members"],
|
|
89
|
+
list: (organizationId, listId) => [...leadGenListMemberKeys.all, organizationId, "list", listId],
|
|
90
|
+
detail: (organizationId, memberId) => [...leadGenListMemberKeys.all, organizationId, "detail", memberId]
|
|
91
|
+
};
|
|
92
|
+
function useListMembers({ listId }) {
|
|
93
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
94
|
+
return useQuery({
|
|
95
|
+
queryKey: leadGenListMemberKeys.list(workOSOrganizationId, listId),
|
|
96
|
+
queryFn: () => apiRequest(`/acquisition/lists/${listId}/members`),
|
|
97
|
+
enabled: isReady && !!listId
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function useListMember(memberId) {
|
|
101
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
102
|
+
return useQuery({
|
|
103
|
+
queryKey: leadGenListMemberKeys.detail(workOSOrganizationId, memberId),
|
|
104
|
+
queryFn: () => apiRequest(`/acquisition/list-members/${memberId}`),
|
|
105
|
+
enabled: isReady && !!memberId
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
var leadGenArtifactKeys = {
|
|
109
|
+
all: ["lead-gen-artifacts"],
|
|
110
|
+
// ownerId is nullable/undefined here to match CreateArtifactRequest -- an
|
|
111
|
+
// 'organization'-owned artifact has no single owning entity row. See
|
|
112
|
+
// CreateArtifactRequestSchema (business/acquisition/api-schemas.ts).
|
|
113
|
+
list: (organizationId, ownerKind, ownerId) => [...leadGenArtifactKeys.all, organizationId, ownerKind, ownerId]
|
|
114
|
+
};
|
|
115
|
+
function useArtifacts({ ownerKind, ownerId }) {
|
|
116
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
117
|
+
return useQuery({
|
|
118
|
+
queryKey: leadGenArtifactKeys.list(workOSOrganizationId, ownerKind, ownerId),
|
|
119
|
+
queryFn: () => apiRequest(
|
|
120
|
+
`/acquisition/artifacts?ownerKind=${encodeURIComponent(ownerKind)}&ownerId=${encodeURIComponent(ownerId)}`
|
|
121
|
+
),
|
|
122
|
+
enabled: isReady && !!ownerId
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function useCreateArtifact() {
|
|
126
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
127
|
+
const queryClient = useQueryClient();
|
|
128
|
+
return useMutation({
|
|
129
|
+
mutationFn: (body) => apiRequest("/acquisition/artifacts", {
|
|
130
|
+
method: "POST",
|
|
131
|
+
body: JSON.stringify(body)
|
|
132
|
+
}),
|
|
133
|
+
onSuccess: (_, variables) => {
|
|
134
|
+
queryClient.invalidateQueries({
|
|
135
|
+
queryKey: leadGenArtifactKeys.list(workOSOrganizationId, variables.ownerKind, variables.ownerId)
|
|
136
|
+
});
|
|
137
|
+
showSuccessNotification("Artifact created");
|
|
138
|
+
},
|
|
139
|
+
onError: (error) => {
|
|
140
|
+
showApiErrorNotification(error);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function useTransitionListMember() {
|
|
145
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
146
|
+
const queryClient = useQueryClient();
|
|
147
|
+
return useMutation({
|
|
148
|
+
mutationFn: async (input) => {
|
|
149
|
+
const { memberId, pipelineKey, stageKey, stateKey, reason, expectedUpdatedAt } = input;
|
|
150
|
+
await apiRequest(`/acquisition/list-members/${memberId}/transition`, {
|
|
151
|
+
method: "PATCH",
|
|
152
|
+
body: JSON.stringify({
|
|
153
|
+
pipelineKey,
|
|
154
|
+
stageKey,
|
|
155
|
+
...stateKey !== void 0 ? { stateKey } : {},
|
|
156
|
+
...reason !== void 0 ? { reason } : {},
|
|
157
|
+
...expectedUpdatedAt !== void 0 ? { expectedUpdatedAt } : {}
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
onSuccess: (_, variables) => {
|
|
162
|
+
queryClient.invalidateQueries({
|
|
163
|
+
queryKey: leadGenListMemberKeys.detail(workOSOrganizationId, variables.memberId)
|
|
164
|
+
});
|
|
165
|
+
if (variables.listId) {
|
|
166
|
+
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, variables.listId) });
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
onError: (error) => {
|
|
170
|
+
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.all });
|
|
171
|
+
showApiErrorNotification(error);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function useDeriveActions(item) {
|
|
176
|
+
return useMemo(() => {
|
|
177
|
+
if (!item) return [];
|
|
178
|
+
if (item.pipeline_key !== "lead-gen") {
|
|
179
|
+
return deriveActions(item);
|
|
180
|
+
}
|
|
181
|
+
return [];
|
|
182
|
+
}, [item]);
|
|
183
|
+
}
|
|
184
|
+
function useUpdateListStatus() {
|
|
185
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
186
|
+
const queryClient = useQueryClient();
|
|
187
|
+
return useMutation({
|
|
188
|
+
mutationFn: async (input) => {
|
|
189
|
+
await apiRequest(`/acquisition/lists/${input.listId}/status`, {
|
|
190
|
+
method: "PATCH",
|
|
191
|
+
body: JSON.stringify({ status: input.status })
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
onSuccess: (_, variables) => {
|
|
195
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
|
|
196
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, variables.listId) });
|
|
197
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
198
|
+
},
|
|
199
|
+
onError: (error) => {
|
|
200
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
201
|
+
showApiErrorNotification(error);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
83
206
|
// src/hooks/settings/credentials/credentialService.ts
|
|
84
207
|
var CredentialService = class {
|
|
85
208
|
constructor(apiRequest) {
|
|
@@ -228,4 +351,42 @@ function useUpdateCredential() {
|
|
|
228
351
|
});
|
|
229
352
|
}
|
|
230
353
|
|
|
231
|
-
|
|
354
|
+
// src/hooks/lead-gen/useTransitionListCompany.ts
|
|
355
|
+
var leadGenListCompanyKeys = {
|
|
356
|
+
all: ["lead-gen-list-companies"],
|
|
357
|
+
detail: (organizationId, listCompanyId) => [...leadGenListCompanyKeys.all, organizationId, "detail", listCompanyId]
|
|
358
|
+
};
|
|
359
|
+
function useTransitionListCompany() {
|
|
360
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
361
|
+
const queryClient = useQueryClient();
|
|
362
|
+
return useMutation({
|
|
363
|
+
mutationFn: async (input) => {
|
|
364
|
+
const { listCompanyId, pipelineKey, stageKey, stateKey, reason, expectedUpdatedAt } = input;
|
|
365
|
+
await apiRequest(`/acquisition/list-companies/${listCompanyId}/transition`, {
|
|
366
|
+
method: "PATCH",
|
|
367
|
+
body: JSON.stringify({
|
|
368
|
+
pipelineKey,
|
|
369
|
+
stageKey,
|
|
370
|
+
...stateKey !== void 0 ? { stateKey } : {},
|
|
371
|
+
...reason !== void 0 ? { reason } : {},
|
|
372
|
+
...expectedUpdatedAt !== void 0 ? { expectedUpdatedAt } : {}
|
|
373
|
+
})
|
|
374
|
+
});
|
|
375
|
+
},
|
|
376
|
+
onSuccess: (_, variables) => {
|
|
377
|
+
queryClient.invalidateQueries({
|
|
378
|
+
queryKey: leadGenListCompanyKeys.detail(workOSOrganizationId, variables.listCompanyId)
|
|
379
|
+
});
|
|
380
|
+
if (variables.listId) {
|
|
381
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
382
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, variables.listId) });
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
onError: (error) => {
|
|
386
|
+
queryClient.invalidateQueries({ queryKey: leadGenListCompanyKeys.all });
|
|
387
|
+
showApiErrorNotification(error);
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export { CredentialSchemas, CredentialService, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, useArtifacts, useCreateArtifact, useCreateCredential, useCredentials, useDeleteCredential, useDeriveActions, useListMember, useListMembers, useTransitionListCompany, useTransitionListMember, useUpdateCredential, useUpdateListStatus, useVerifyCredential };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
2
|
-
import { APIClientError } from './chunk-
|
|
2
|
+
import { APIClientError } from './chunk-5ZK7K7YP.js';
|
|
3
3
|
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|