@elevasis/ui 2.73.0 → 2.75.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 +58 -0
- package/dist/app/index.js +9 -10
- package/dist/auth/index.js +5 -6
- package/dist/charts/index.js +5 -6
- package/dist/chunk-2GIJBHZT.js +60 -0
- package/dist/{chunk-Z4ICFQXG.js → chunk-2ZRY3ARL.js} +1 -1
- package/dist/{chunk-5B2ZFO44.js → chunk-3H5DIJN7.js} +1 -1
- package/dist/{chunk-LZT2H2MA.js → chunk-47YJVIZE.js} +36 -43
- package/dist/{chunk-3TS5U5BL.js → chunk-5RH6NYZH.js} +1 -1
- package/dist/chunk-5SLRGUC4.js +224 -0
- package/dist/{chunk-JYBJMVNY.js → chunk-5VF5LPYS.js} +1 -1
- package/dist/{chunk-SWKAH2YM.js → chunk-6BJ5HMMC.js} +282 -553
- package/dist/{chunk-NI37YNRP.js → chunk-7OOFMEX6.js} +11 -5
- package/dist/{chunk-IBCEAVB2.js → chunk-A2SB32YV.js} +65 -5
- package/dist/{chunk-CJ2232PQ.js → chunk-CRPH5AAB.js} +1 -1
- package/dist/chunk-D3XXPCCK.js +69 -0
- package/dist/chunk-DMSTDZCJ.js +305 -0
- package/dist/chunk-DTEGVSJ6.js +645 -0
- package/dist/chunk-DVAOCHIF.js +165 -0
- package/dist/chunk-G7O4CBMC.js +231 -0
- package/dist/{chunk-IGBPWD6S.js → chunk-GDTK33QT.js} +5 -3
- package/dist/chunk-ICHDIVQO.js +54 -0
- package/dist/{chunk-U2H3TIHD.js → chunk-IYATYH5I.js} +2 -52
- package/dist/chunk-L3NBMLRN.js +49 -0
- package/dist/{chunk-LEPYXLJ2.js → chunk-LFLM723H.js} +1 -1
- package/dist/chunk-M6VAZAQW.js +45 -0
- package/dist/{chunk-AJOVWB47.js → chunk-MLHZUN2X.js} +6 -3
- package/dist/chunk-N6K2Q5BM.js +393 -0
- package/dist/chunk-NMHQAYZU.js +439 -0
- package/dist/chunk-NYIIRZSA.js +286 -0
- package/dist/{chunk-ETN3TTRT.js → chunk-OGHTJKBV.js} +115 -8
- package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
- package/dist/chunk-QFS2GZMV.js +515 -0
- package/dist/{chunk-OCVSPAKM.js → chunk-SB3IHM5Y.js} +1150 -4346
- package/dist/{chunk-4CW2C5BD.js → chunk-SEYOVNS5.js} +1 -1
- package/dist/chunk-SN7X5N2A.js +116 -0
- package/dist/{chunk-PQ4B62HH.js → chunk-TX3UHDL5.js} +2 -2
- package/dist/chunk-VM2OWOXL.js +24 -0
- package/dist/{chunk-ZDKPHFTH.js → chunk-VWGCURZF.js} +5 -3
- package/dist/chunk-WDBNW44Z.js +49 -0
- package/dist/chunk-YQQ5GRUR.js +21 -0
- package/dist/{chunk-NHNTX6ZL.js → chunk-ZG6YJUT4.js} +3 -2
- package/dist/components/index.d.ts +228 -6
- package/dist/components/index.js +321 -35
- package/dist/components/navigation/index.js +6 -7
- package/dist/features/auth/index.d.ts +78 -2
- package/dist/features/auth/index.js +18 -9
- package/dist/features/clients/index.js +7 -7
- package/dist/features/content/index.d.ts +226 -5
- package/dist/features/content/index.js +270 -19
- package/dist/features/crm/index.d.ts +58 -0
- package/dist/features/crm/index.js +10 -8
- package/dist/features/dashboard/index.js +9 -8
- package/dist/features/delivery/index.d.ts +58 -0
- package/dist/features/delivery/index.js +23 -7
- package/dist/features/knowledge/index.js +5 -6
- package/dist/features/lead-gen/index.d.ts +9 -15
- package/dist/features/lead-gen/index.js +12 -8
- package/dist/features/monitoring/index.js +11 -9
- package/dist/features/monitoring/requests/index.js +8 -7
- package/dist/features/operations/index.js +15 -11
- package/dist/features/public-agent-chat/index.js +3 -1
- package/dist/features/settings/index.d.ts +66 -3
- package/dist/features/settings/index.js +9 -8
- package/dist/hooks/access/index.js +5 -6
- package/dist/hooks/delivery/index.d.ts +58 -0
- package/dist/hooks/delivery/index.js +3 -2
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -1
- package/dist/hooks/published.d.ts +181 -5
- package/dist/hooks/published.js +22 -6
- package/dist/initialization/index.d.ts +58 -0
- package/dist/knowledge/index.js +167 -11
- package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
- package/dist/layout/index.js +8 -9
- package/dist/profile/index.d.ts +58 -0
- package/dist/provider/index.d.ts +77 -1
- package/dist/provider/index.js +5 -6
- package/dist/provider/published.d.ts +105 -1
- package/dist/provider/published.js +5 -6
- package/dist/test-utils/index.d.ts +16 -5
- package/dist/test-utils/index.js +17 -18
- package/dist/types/index.d.ts +73 -1
- package/dist/utils/index.d.ts +83 -3
- package/dist/utils/index.js +1 -1
- package/package.json +10 -5
- package/dist/chunk-6M6OLGQY.js +0 -36
- package/dist/chunk-MKH2KOAO.js +0 -39
- package/dist/hooks/index.css +0 -659
- package/dist/hooks/index.d.ts +0 -14073
- package/dist/hooks/index.js +0 -27
- package/dist/supabase/index.d.ts +0 -7118
- package/dist/supabase/index.js +0 -3
- package/dist/typeform/index.d.ts +0 -462
- package/dist/typeform/index.js +0 -2051
- package/dist/typeform/schemas.d.ts +0 -67
- package/dist/typeform/schemas.js +0 -2
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createElevasisQueryClient } from '../chunk-
|
|
2
|
-
export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-
|
|
1
|
+
export { createElevasisQueryClient } from '../chunk-3H5DIJN7.js';
|
|
2
|
+
export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-ZG6YJUT4.js';
|
|
3
3
|
import '../chunk-DD3CCMCZ.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-A2SB32YV.js';
|
|
5
5
|
import '../chunk-Y6I3IC45.js';
|
|
6
6
|
import '../chunk-6SSQGWK7.js';
|
|
7
7
|
import '../chunk-TVTSASST.js';
|
package/dist/app/index.d.ts
CHANGED
|
@@ -1462,6 +1462,64 @@ type Database = {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
];
|
|
1464
1464
|
};
|
|
1465
|
+
content_distribution_metrics: {
|
|
1466
|
+
Row: {
|
|
1467
|
+
captured_at: string;
|
|
1468
|
+
created_at: string;
|
|
1469
|
+
distribution_id: string;
|
|
1470
|
+
id: string;
|
|
1471
|
+
metrics: Json;
|
|
1472
|
+
organization_id: string;
|
|
1473
|
+
raw: Json;
|
|
1474
|
+
source: string;
|
|
1475
|
+
source_execution_id: string | null;
|
|
1476
|
+
};
|
|
1477
|
+
Insert: {
|
|
1478
|
+
captured_at?: string;
|
|
1479
|
+
created_at?: string;
|
|
1480
|
+
distribution_id: string;
|
|
1481
|
+
id?: string;
|
|
1482
|
+
metrics?: Json;
|
|
1483
|
+
organization_id: string;
|
|
1484
|
+
raw?: Json;
|
|
1485
|
+
source: string;
|
|
1486
|
+
source_execution_id?: string | null;
|
|
1487
|
+
};
|
|
1488
|
+
Update: {
|
|
1489
|
+
captured_at?: string;
|
|
1490
|
+
created_at?: string;
|
|
1491
|
+
distribution_id?: string;
|
|
1492
|
+
id?: string;
|
|
1493
|
+
metrics?: Json;
|
|
1494
|
+
organization_id?: string;
|
|
1495
|
+
raw?: Json;
|
|
1496
|
+
source?: string;
|
|
1497
|
+
source_execution_id?: string | null;
|
|
1498
|
+
};
|
|
1499
|
+
Relationships: [
|
|
1500
|
+
{
|
|
1501
|
+
foreignKeyName: "content_distribution_metrics_distribution_fkey";
|
|
1502
|
+
columns: ["distribution_id", "organization_id"];
|
|
1503
|
+
isOneToOne: false;
|
|
1504
|
+
referencedRelation: "content_distributions";
|
|
1505
|
+
referencedColumns: ["id", "organization_id"];
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
foreignKeyName: "content_distribution_metrics_organization_id_fkey";
|
|
1509
|
+
columns: ["organization_id"];
|
|
1510
|
+
isOneToOne: false;
|
|
1511
|
+
referencedRelation: "organizations";
|
|
1512
|
+
referencedColumns: ["id"];
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
|
|
1516
|
+
columns: ["source_execution_id"];
|
|
1517
|
+
isOneToOne: false;
|
|
1518
|
+
referencedRelation: "execution_logs";
|
|
1519
|
+
referencedColumns: ["execution_id"];
|
|
1520
|
+
}
|
|
1521
|
+
];
|
|
1522
|
+
};
|
|
1465
1523
|
content_distributions: {
|
|
1466
1524
|
Row: {
|
|
1467
1525
|
adapted_body: string | null;
|
package/dist/app/index.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { AppErrorBoundary } from '../chunk-
|
|
2
|
-
import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
import { AppErrorBoundary } from '../chunk-LFLM723H.js';
|
|
2
|
+
import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-CRPH5AAB.js';
|
|
3
|
+
import '../chunk-2ZRY3ARL.js';
|
|
4
|
+
import '../chunk-5RH6NYZH.js';
|
|
5
5
|
import '../chunk-BZZCNLT6.js';
|
|
6
|
-
import { useSessionCheck, ElevasisSystemsProvider, useElevasisSystems, SystemShell, ElevasisUIProvider } from '../chunk-
|
|
6
|
+
import { useSessionCheck, ElevasisSystemsProvider, useElevasisSystems, SystemShell, ElevasisUIProvider } from '../chunk-SB3IHM5Y.js';
|
|
7
7
|
import '../chunk-R6NMRXNO.js';
|
|
8
8
|
import '../chunk-RBGVNPA6.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-NHNTX6ZL.js';
|
|
9
|
+
import '../chunk-ZG6YJUT4.js';
|
|
11
10
|
import '../chunk-L7BZZ4SI.js';
|
|
12
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-ICHDIVQO.js';
|
|
13
12
|
import '../chunk-MISHPEJX.js';
|
|
14
13
|
import '../chunk-62GVNH5U.js';
|
|
15
14
|
import { useInitialization } from '../chunk-P45GQ3ZW.js';
|
|
16
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-2GIJBHZT.js';
|
|
17
16
|
import '../chunk-3KMDHCAR.js';
|
|
18
17
|
import { TanStackRouterBridge, ScrollToTop } from '../chunk-2IFYDILW.js';
|
|
19
18
|
import '../chunk-BLXJEIQS.js';
|
|
@@ -21,7 +20,7 @@ import '../chunk-UD657ICS.js';
|
|
|
21
20
|
import '../chunk-DD3CCMCZ.js';
|
|
22
21
|
import '../chunk-RNP5R5I3.js';
|
|
23
22
|
import '../chunk-RT4KRGZT.js';
|
|
24
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-A2SB32YV.js';
|
|
25
24
|
import '../chunk-Y6I3IC45.js';
|
|
26
25
|
import '../chunk-6SSQGWK7.js';
|
|
27
26
|
import '../chunk-BI5VDO2K.js';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export { AccessGuard, AccessKeys, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-
|
|
1
|
+
export { AccessGuard, AccessKeys, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-SB3IHM5Y.js';
|
|
2
2
|
import '../chunk-R6NMRXNO.js';
|
|
3
3
|
import '../chunk-RBGVNPA6.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-NHNTX6ZL.js';
|
|
4
|
+
import '../chunk-ZG6YJUT4.js';
|
|
6
5
|
import '../chunk-L7BZZ4SI.js';
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-ICHDIVQO.js';
|
|
8
7
|
import '../chunk-MISHPEJX.js';
|
|
9
8
|
import '../chunk-62GVNH5U.js';
|
|
10
9
|
import '../chunk-P45GQ3ZW.js';
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-2GIJBHZT.js';
|
|
12
11
|
import '../chunk-3KMDHCAR.js';
|
|
13
12
|
import '../chunk-2IFYDILW.js';
|
|
14
13
|
import '../chunk-BLXJEIQS.js';
|
|
@@ -16,7 +15,7 @@ import '../chunk-UD657ICS.js';
|
|
|
16
15
|
import '../chunk-DD3CCMCZ.js';
|
|
17
16
|
import '../chunk-RNP5R5I3.js';
|
|
18
17
|
import '../chunk-RT4KRGZT.js';
|
|
19
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-A2SB32YV.js';
|
|
20
19
|
import '../chunk-Y6I3IC45.js';
|
|
21
20
|
import '../chunk-6SSQGWK7.js';
|
|
22
21
|
import '../chunk-BI5VDO2K.js';
|
package/dist/charts/index.js
CHANGED
|
@@ -1,14 +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-SB3IHM5Y.js';
|
|
2
2
|
import '../chunk-R6NMRXNO.js';
|
|
3
3
|
import '../chunk-RBGVNPA6.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-NHNTX6ZL.js';
|
|
4
|
+
import '../chunk-ZG6YJUT4.js';
|
|
6
5
|
import '../chunk-L7BZZ4SI.js';
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-ICHDIVQO.js';
|
|
8
7
|
import '../chunk-MISHPEJX.js';
|
|
9
8
|
import '../chunk-62GVNH5U.js';
|
|
10
9
|
import '../chunk-P45GQ3ZW.js';
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-2GIJBHZT.js';
|
|
12
11
|
import '../chunk-3KMDHCAR.js';
|
|
13
12
|
import '../chunk-2IFYDILW.js';
|
|
14
13
|
import '../chunk-BLXJEIQS.js';
|
|
@@ -16,7 +15,7 @@ import '../chunk-UD657ICS.js';
|
|
|
16
15
|
import '../chunk-DD3CCMCZ.js';
|
|
17
16
|
import '../chunk-RNP5R5I3.js';
|
|
18
17
|
import '../chunk-RT4KRGZT.js';
|
|
19
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-A2SB32YV.js';
|
|
20
19
|
import '../chunk-Y6I3IC45.js';
|
|
21
20
|
import '../chunk-6SSQGWK7.js';
|
|
22
21
|
import '../chunk-BI5VDO2K.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UuidSchema } from './chunk-TVTSASST.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
var SessionIdParamSchema = z.object({
|
|
5
|
+
sessionId: UuidSchema
|
|
6
|
+
}).strict();
|
|
7
|
+
var ExecutionIdParamsSchema = z.object({
|
|
8
|
+
sessionId: UuidSchema,
|
|
9
|
+
executionId: UuidSchema
|
|
10
|
+
}).strict();
|
|
11
|
+
var CreateSessionSchema = z.object({
|
|
12
|
+
resourceId: z.string().min(1).max(100),
|
|
13
|
+
userId: UuidSchema.optional(),
|
|
14
|
+
metadata: z.any().optional()
|
|
15
|
+
}).strict();
|
|
16
|
+
z.object({
|
|
17
|
+
input: z.unknown().refine(
|
|
18
|
+
(val) => {
|
|
19
|
+
let text;
|
|
20
|
+
if (typeof val === "string") {
|
|
21
|
+
text = val;
|
|
22
|
+
} else if (val && typeof val === "object" && "message" in val) {
|
|
23
|
+
text = String(val.message);
|
|
24
|
+
} else {
|
|
25
|
+
text = JSON.stringify(val);
|
|
26
|
+
}
|
|
27
|
+
return text.length > 0 && text.length <= 1e5;
|
|
28
|
+
},
|
|
29
|
+
{ message: "Input must be between 1 and 100,000 characters" }
|
|
30
|
+
),
|
|
31
|
+
metadata: z.any().optional()
|
|
32
|
+
}).strict();
|
|
33
|
+
z.object({
|
|
34
|
+
userId: UuidSchema.optional(),
|
|
35
|
+
resourceId: z.string().optional(),
|
|
36
|
+
limit: z.coerce.number().int().min(1).max(100).default(20)
|
|
37
|
+
}).strict();
|
|
38
|
+
z.object({
|
|
39
|
+
limit: z.coerce.number().int().min(1).max(100).default(100),
|
|
40
|
+
cursor: z.coerce.number().int().min(0).optional()
|
|
41
|
+
}).strict();
|
|
42
|
+
var WebSocketSessionTurnSchema = z.object({
|
|
43
|
+
type: z.literal("session:turn"),
|
|
44
|
+
input: z.unknown().refine(
|
|
45
|
+
(val) => {
|
|
46
|
+
let text;
|
|
47
|
+
if (typeof val === "string") {
|
|
48
|
+
text = val;
|
|
49
|
+
} else if (val && typeof val === "object" && "message" in val) {
|
|
50
|
+
text = String(val.message);
|
|
51
|
+
} else {
|
|
52
|
+
text = JSON.stringify(val) || "";
|
|
53
|
+
}
|
|
54
|
+
return text && text.length > 0 && text.length <= 1e5;
|
|
55
|
+
},
|
|
56
|
+
{ message: "Input must be between 1 and 100,000 characters" }
|
|
57
|
+
)
|
|
58
|
+
}).strict();
|
|
59
|
+
|
|
60
|
+
export { CreateSessionSchema, ExecutionIdParamsSchema, SessionIdParamSchema, WebSocketSessionTurnSchema };
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { LEAD_GEN_API_INTERFACE } from './chunk-
|
|
1
|
+
import { LEAD_GEN_API_INTERFACE } from './chunk-TX3UHDL5.js';
|
|
2
|
+
import { useListMembers, useListMember, useTransitionListMember, useDeriveActions, useArtifacts } from './chunk-DVAOCHIF.js';
|
|
3
|
+
import { useCredentials, useVerifyCredential } from './chunk-G7O4CBMC.js';
|
|
4
|
+
import { useTableSort, sortData, useCompanyFacets, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-NYIIRZSA.js';
|
|
5
|
+
import { getSystemApiInterfaceReadiness } from './chunk-L3NBMLRN.js';
|
|
2
6
|
import { sanitizeInput } from './chunk-3MEXPLWT.js';
|
|
7
|
+
import { useTableSelection } from './chunk-WDBNW44Z.js';
|
|
3
8
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
4
9
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
5
10
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
6
|
-
import { LeadGenSidebarMiddle, SubshellContentContainer, PageTitleCaption, acquisitionListKeys, useOptionalElevasisSystems, getAllBuildTemplates, getLeadGenStageCatalog, useListsTelemetry, useLists, useAccess, AccessKeys, CenteredErrorState, StatCard,
|
|
7
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
11
|
+
import { LeadGenSidebarMiddle, SubshellContentContainer, PageTitleCaption, acquisitionListKeys, useOptionalElevasisSystems, getAllBuildTemplates, getLeadGenStageCatalog, useListsTelemetry, useLists, useAccess, AccessKeys, CenteredErrorState, StatCard, usePaginationState, EmptyState, CustomModal, useListActions, useList, useListProgress, useListExecutions, useDeleteList, useExecuteAsync, SystemReadinessAlert, useCreateList, JsonViewer, useWorkflowExecution, useInFlightExecutions, useExecutionSSE, useListRecords } from './chunk-SB3IHM5Y.js';
|
|
12
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-ICHDIVQO.js';
|
|
8
13
|
import { SubshellSidebarSection } from './chunk-MISHPEJX.js';
|
|
9
14
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
10
|
-
import {
|
|
15
|
+
import { getSystem } from './chunk-A2SB32YV.js';
|
|
11
16
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
12
17
|
import { Stack, Group, Title, Text, Alert, Button, Collapse, Paper, Anchor, Center, Loader, SimpleGrid, Table, Badge, TextInput, Select, Checkbox, Pagination, ActionIcon, Tooltip, Tabs, ThemeIcon, Box, Textarea, Card, SegmentedControl, UnstyledButton, Pill, Drawer, JsonInput, Switch, NumberInput, MultiSelect, TagsInput, ScrollArea } from '@mantine/core';
|
|
13
18
|
import { IconTarget, IconAlertCircle, IconPlayerPlay, IconArrowRight, IconListDetails, IconPlus, IconAlertTriangle, IconSearch, IconList, IconExternalLink, IconCopy, IconTrash, IconBuilding, IconUsers, IconBolt, IconLayoutDashboard, IconBuildingFactory2, IconArrowLeft, IconSparkles, IconAddressBook, IconSettings, IconChevronDown, IconChevronRight, IconRefresh, IconMail, IconUser, IconDatabase } from '@tabler/icons-react';
|
|
@@ -519,43 +524,33 @@ function toBuildStepDefinition(step) {
|
|
|
519
524
|
}
|
|
520
525
|
function getDefaultBuildTemplateId(model, templates) {
|
|
521
526
|
const configuredId = getSystem(model, "sales.lead-gen")?.config?.defaultBuildTemplateId;
|
|
522
|
-
if (typeof configuredId === "string" && templates.some((template) => template.id === configuredId))
|
|
527
|
+
if (typeof configuredId === "string" && templates.some((template) => template.id === configuredId))
|
|
528
|
+
return configuredId;
|
|
523
529
|
return templates[0]?.id;
|
|
524
530
|
}
|
|
525
531
|
function getDefaultBuildSteps(templates, defaultBuildTemplateId) {
|
|
526
532
|
const template = templates.find((item) => item.id === defaultBuildTemplateId) ?? templates[0];
|
|
527
533
|
return template?.steps.map((step) => toBuildStepDefinition(step)) ?? [];
|
|
528
534
|
}
|
|
529
|
-
function summarizeReadinessIssues(issues) {
|
|
530
|
-
return issues[0]?.message;
|
|
531
|
-
}
|
|
532
535
|
function getLeadGenApiInterfaceReadiness(model) {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
declared: false,
|
|
539
|
-
ready: false,
|
|
540
|
-
reason: "No Organization Model is available for lead-gen System Interface readiness.",
|
|
541
|
-
issues: [
|
|
542
|
-
{
|
|
543
|
-
family: "SYSTEM_INTERFACE_MISSING",
|
|
544
|
-
code: "missing-organization-model",
|
|
545
|
-
message: "No Organization Model is available for lead-gen System Interface readiness."
|
|
546
|
-
}
|
|
547
|
-
]
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
const readiness = computeInterfaceReadiness(model, LEAD_GEN_API_INTERFACE);
|
|
536
|
+
const readiness = getSystemApiInterfaceReadiness(
|
|
537
|
+
model,
|
|
538
|
+
LEAD_GEN_API_INTERFACE.systemPath,
|
|
539
|
+
LEAD_GEN_API_INTERFACE.interfaceKey
|
|
540
|
+
);
|
|
551
541
|
return {
|
|
542
|
+
...readiness,
|
|
552
543
|
systemPath: LEAD_GEN_API_INTERFACE.systemPath,
|
|
553
544
|
interfaceKey: LEAD_GEN_API_INTERFACE.interfaceKey,
|
|
554
|
-
readinessProfile: readiness.readinessProfile,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
545
|
+
readinessProfile: model ? readiness.readinessProfile : LEAD_GEN_API_INTERFACE.readinessProfile,
|
|
546
|
+
reason: model ? readiness.reason : "No Organization Model is available for lead-gen System Interface readiness.",
|
|
547
|
+
issues: model ? readiness.issues : [
|
|
548
|
+
{
|
|
549
|
+
family: "SYSTEM_INTERFACE_MISSING",
|
|
550
|
+
code: "missing-organization-model",
|
|
551
|
+
message: "No Organization Model is available for lead-gen System Interface readiness."
|
|
552
|
+
}
|
|
553
|
+
]
|
|
559
554
|
};
|
|
560
555
|
}
|
|
561
556
|
function useLeadGenConfig() {
|
|
@@ -1349,16 +1344,6 @@ function ListMemberDrawer({ memberId, memberKind, listId, onClose }) {
|
|
|
1349
1344
|
}
|
|
1350
1345
|
);
|
|
1351
1346
|
}
|
|
1352
|
-
function LeadGenReadinessAlert({
|
|
1353
|
-
canUseApiActions,
|
|
1354
|
-
reason
|
|
1355
|
-
}) {
|
|
1356
|
-
if (canUseApiActions) return null;
|
|
1357
|
-
return /* @__PURE__ */ jsxs(Alert, { icon: /* @__PURE__ */ jsx(IconAlertCircle, { size: 16 }), color: "yellow", variant: "light", children: [
|
|
1358
|
-
"Lead-gen API actions are disabled until System Interface readiness passes. Read-only list detail can still render when data is available.",
|
|
1359
|
-
reason ? ` ${reason}` : ""
|
|
1360
|
-
] });
|
|
1361
|
-
}
|
|
1362
1347
|
function formatDateTime2(value) {
|
|
1363
1348
|
if (!value) return "Not yet";
|
|
1364
1349
|
return new Date(value).toLocaleString("en-US", {
|
|
@@ -3482,7 +3467,15 @@ function LeadGenListDetailPage({
|
|
|
3482
3467
|
backButton
|
|
3483
3468
|
] })
|
|
3484
3469
|
] }),
|
|
3485
|
-
/* @__PURE__ */ jsx(
|
|
3470
|
+
/* @__PURE__ */ jsx(
|
|
3471
|
+
SystemReadinessAlert,
|
|
3472
|
+
{
|
|
3473
|
+
ready: canUseApiActions,
|
|
3474
|
+
actionLabel: "Lead-gen API actions",
|
|
3475
|
+
fallbackNote: "Read-only list detail can still render when data is available.",
|
|
3476
|
+
reason: apiDisabledReason
|
|
3477
|
+
}
|
|
3478
|
+
),
|
|
3486
3479
|
headerActions ? /* @__PURE__ */ jsx(Group, { gap: "xs", children: headerActions }) : null,
|
|
3487
3480
|
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onChange: handleTabChange, keepMounted: false, children: [
|
|
3488
3481
|
/* @__PURE__ */ jsxs(Tabs.List, { children: [
|
|
@@ -4525,4 +4518,4 @@ function LeadGenContactsPage({ extraColumns, replaceDefaultColumns } = {}) {
|
|
|
4525
4518
|
] }) });
|
|
4526
4519
|
}
|
|
4527
4520
|
|
|
4528
|
-
export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage,
|
|
4521
|
+
export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarTop, ListBuilderIndexPage, ListBuilderPage, ORPHAN_STAGE_ORDER, StepConfigForm, TabSection, deriveBusinessProgress, formatDate, getEnrichmentColor, getEnrichmentStatus, getLeadGenApiInterfaceReadiness, getLeadGenExportWorkflowId, getStateKeyColor, getStatusColor, getStepActionLabel, isLeadGenExportAction, resolveBuildPlanSteps, resolveBuildState, sortStageKeys, useDeleteLists, useLeadGenConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAppearance } from './chunk-
|
|
1
|
+
import { useAppearance } from './chunk-SB3IHM5Y.js';
|
|
2
2
|
import { topbarHeight } from './chunk-MISHPEJX.js';
|
|
3
3
|
import { Stack, Title, Button } from '@mantine/core';
|
|
4
4
|
import { IconAlertCircle } from '@tabler/icons-react';
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { showApiErrorNotification } from './chunk-ICHDIVQO.js';
|
|
2
|
+
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
3
|
+
import { useQuery, useQueries, useMutation } from '@tanstack/react-query';
|
|
4
|
+
|
|
5
|
+
// src/hooks/cloud-storage/queryKeys.ts
|
|
6
|
+
var cloudStorageKeys = {
|
|
7
|
+
all: ["cloud-storage"],
|
|
8
|
+
folders: () => [...cloudStorageKeys.all, "folders"],
|
|
9
|
+
folder: (organizationId, filters) => [...cloudStorageKeys.folders(), organizationId, filters],
|
|
10
|
+
thumbnails: () => [...cloudStorageKeys.all, "thumbnails"],
|
|
11
|
+
/**
|
|
12
|
+
* One key per resolved batch (at most `THUMBNAIL_BATCH_SIZE` ids) -- `useQueries`
|
|
13
|
+
* issues one query per batch, so the batch's own id list is part of its key.
|
|
14
|
+
*/
|
|
15
|
+
thumbnailBatch: (organizationId, credentialName, batchFileIds) => [...cloudStorageKeys.thumbnails(), organizationId, credentialName, batchFileIds],
|
|
16
|
+
temporaryLinks: () => [...cloudStorageKeys.all, "temporary-links"],
|
|
17
|
+
/**
|
|
18
|
+
* Keyed per file. Shared by every consumer that needs the original's bytes --
|
|
19
|
+
* measuring, cropping, and previewing all read this one key, so a selected
|
|
20
|
+
* image resolves one link and downloads once rather than three times.
|
|
21
|
+
*/
|
|
22
|
+
temporaryLinkFor: (organizationId, credentialName, fileId) => [...cloudStorageKeys.temporaryLinks(), organizationId, credentialName, fileId],
|
|
23
|
+
imageDimensions: () => [...cloudStorageKeys.all, "image-dimensions"],
|
|
24
|
+
/**
|
|
25
|
+
* Keyed per file rather than per set -- dimensions are measured one file at a time
|
|
26
|
+
* and a measured file stays measured no matter what else is selected alongside it.
|
|
27
|
+
*/
|
|
28
|
+
imageDimensionsFor: (organizationId, credentialName, fileId) => [...cloudStorageKeys.imageDimensions(), organizationId, credentialName, fileId]
|
|
29
|
+
};
|
|
30
|
+
function useCloudStorageFolder(params) {
|
|
31
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
32
|
+
const { credentialName, folderPath, cursor } = params;
|
|
33
|
+
return useQuery({
|
|
34
|
+
queryKey: cloudStorageKeys.folder(workOSOrganizationId ?? void 0, { credentialName, folderPath, cursor }),
|
|
35
|
+
queryFn: async () => {
|
|
36
|
+
const searchParams = new URLSearchParams({ credentialName });
|
|
37
|
+
if (folderPath) searchParams.set("folderPath", folderPath);
|
|
38
|
+
if (cursor) searchParams.set("cursor", cursor);
|
|
39
|
+
return apiRequest(`/integrations/dropbox/files?${searchParams.toString()}`);
|
|
40
|
+
},
|
|
41
|
+
enabled: isReady && !!credentialName
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
var THUMBNAIL_BATCH_SIZE = 25;
|
|
45
|
+
function chunkIntoBatches(items, size) {
|
|
46
|
+
if (size <= 0) {
|
|
47
|
+
return items.length ? [items] : [];
|
|
48
|
+
}
|
|
49
|
+
const batches = [];
|
|
50
|
+
for (let i = 0; i < items.length; i += size) {
|
|
51
|
+
batches.push(items.slice(i, i + size));
|
|
52
|
+
}
|
|
53
|
+
return batches;
|
|
54
|
+
}
|
|
55
|
+
function mergeThumbnailBatches(batches) {
|
|
56
|
+
const thumbnails = {};
|
|
57
|
+
let connected = false;
|
|
58
|
+
for (const batch of batches) {
|
|
59
|
+
if (!batch) continue;
|
|
60
|
+
Object.assign(thumbnails, batch.thumbnails);
|
|
61
|
+
if (batch.connected) connected = true;
|
|
62
|
+
}
|
|
63
|
+
return { thumbnails, connected };
|
|
64
|
+
}
|
|
65
|
+
function useCloudStorageThumbnails(credentialName, fileIds) {
|
|
66
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
67
|
+
const batches = chunkIntoBatches(fileIds, THUMBNAIL_BATCH_SIZE);
|
|
68
|
+
const results = useQueries({
|
|
69
|
+
queries: batches.map((batchIds) => ({
|
|
70
|
+
queryKey: cloudStorageKeys.thumbnailBatch(workOSOrganizationId ?? void 0, credentialName, batchIds),
|
|
71
|
+
queryFn: async () => {
|
|
72
|
+
const searchParams = new URLSearchParams({ credentialName, ids: batchIds.join(",") });
|
|
73
|
+
return apiRequest(
|
|
74
|
+
`/integrations/dropbox/thumbnails?${searchParams.toString()}`
|
|
75
|
+
);
|
|
76
|
+
},
|
|
77
|
+
enabled: isReady && !!credentialName && batchIds.length > 0
|
|
78
|
+
}))
|
|
79
|
+
});
|
|
80
|
+
const { thumbnails, connected } = mergeThumbnailBatches(results.map((result) => result.data));
|
|
81
|
+
return {
|
|
82
|
+
thumbnails,
|
|
83
|
+
connected,
|
|
84
|
+
isLoading: results.some((result) => result.isLoading)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
var TEMPORARY_LINK_STALE_MS = 60 * 60 * 1e3;
|
|
88
|
+
function useCloudStorageTemporaryLinks(credentialName, fileIds) {
|
|
89
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
90
|
+
const results = useQueries({
|
|
91
|
+
queries: fileIds.map((fileId) => ({
|
|
92
|
+
queryKey: cloudStorageKeys.temporaryLinkFor(workOSOrganizationId ?? void 0, credentialName, fileId),
|
|
93
|
+
queryFn: async () => {
|
|
94
|
+
const searchParams = new URLSearchParams({ credentialName, id: fileId });
|
|
95
|
+
const response = await apiRequest(
|
|
96
|
+
`/integrations/dropbox/temporary-link?${searchParams.toString()}`
|
|
97
|
+
);
|
|
98
|
+
return response.link;
|
|
99
|
+
},
|
|
100
|
+
enabled: isReady && !!credentialName && !!fileId,
|
|
101
|
+
staleTime: TEMPORARY_LINK_STALE_MS
|
|
102
|
+
}))
|
|
103
|
+
});
|
|
104
|
+
const links = {};
|
|
105
|
+
results.forEach((result, index) => {
|
|
106
|
+
const fileId = fileIds[index];
|
|
107
|
+
if (fileId !== void 0 && result.data !== void 0) links[fileId] = result.data;
|
|
108
|
+
});
|
|
109
|
+
return { links, isLoading: results.some((result) => result.isLoading) };
|
|
110
|
+
}
|
|
111
|
+
function measureImageDimensions(url) {
|
|
112
|
+
return new Promise((resolve) => {
|
|
113
|
+
const image = new Image();
|
|
114
|
+
image.onload = () => resolve({ width: image.naturalWidth, height: image.naturalHeight });
|
|
115
|
+
image.onerror = () => resolve(null);
|
|
116
|
+
image.src = url;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function useCloudStorageImageDimensions(credentialName, fileIds) {
|
|
120
|
+
const { isReady, workOSOrganizationId } = useElevasisServices();
|
|
121
|
+
const { links, isLoading: isResolvingLinks } = useCloudStorageTemporaryLinks(credentialName, fileIds);
|
|
122
|
+
const results = useQueries({
|
|
123
|
+
queries: fileIds.map((fileId) => {
|
|
124
|
+
const link = links[fileId];
|
|
125
|
+
return {
|
|
126
|
+
queryKey: cloudStorageKeys.imageDimensionsFor(workOSOrganizationId ?? void 0, credentialName, fileId),
|
|
127
|
+
queryFn: async () => link ? measureImageDimensions(link) : null,
|
|
128
|
+
// `link === undefined` means the link query has not settled; `null` means it
|
|
129
|
+
// settled with nothing, which is a measurable outcome (`null` dimensions).
|
|
130
|
+
enabled: isReady && !!credentialName && !!fileId && link !== void 0,
|
|
131
|
+
// The underlying file does not change size, so re-measuring on every remount
|
|
132
|
+
// would re-download the original for a value that cannot have moved.
|
|
133
|
+
staleTime: 60 * 60 * 1e3
|
|
134
|
+
};
|
|
135
|
+
})
|
|
136
|
+
});
|
|
137
|
+
const dimensions = {};
|
|
138
|
+
results.forEach((result, index) => {
|
|
139
|
+
const fileId = fileIds[index];
|
|
140
|
+
if (fileId !== void 0 && result.data !== void 0) dimensions[fileId] = result.data;
|
|
141
|
+
});
|
|
142
|
+
return { dimensions, isLoading: isResolvingLinks || results.some((result) => result.isLoading) };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/hooks/storage/queryKeys.ts
|
|
146
|
+
var storageKeys = {
|
|
147
|
+
all: ["storage"],
|
|
148
|
+
signedUrls: () => [...storageKeys.all, "signed-urls"],
|
|
149
|
+
/**
|
|
150
|
+
* Keyed per object rather than per set, so a path already signed stays signed no
|
|
151
|
+
* matter what else is requested alongside it -- the same reason
|
|
152
|
+
* `cloudStorageKeys.temporaryLinkFor` is per file.
|
|
153
|
+
*/
|
|
154
|
+
signedUrlFor: (organizationId, bucket, path) => [...storageKeys.signedUrls(), organizationId, bucket, path]
|
|
155
|
+
};
|
|
156
|
+
async function blobToBase64(blob) {
|
|
157
|
+
const dataUrl = await new Promise((resolve, reject) => {
|
|
158
|
+
const reader = new FileReader();
|
|
159
|
+
reader.onload = () => resolve(reader.result);
|
|
160
|
+
reader.onerror = () => reject(reader.error ?? new Error("Failed to read the file"));
|
|
161
|
+
reader.readAsDataURL(blob);
|
|
162
|
+
});
|
|
163
|
+
const comma = dataUrl.indexOf(",");
|
|
164
|
+
if (comma === -1) throw new Error("Unreadable data URL while encoding the upload");
|
|
165
|
+
return dataUrl.slice(comma + 1);
|
|
166
|
+
}
|
|
167
|
+
function useUploadStorageFile() {
|
|
168
|
+
const { apiRequest } = useElevasisServices();
|
|
169
|
+
return useMutation({
|
|
170
|
+
mutationFn: async ({
|
|
171
|
+
bucket,
|
|
172
|
+
path,
|
|
173
|
+
file,
|
|
174
|
+
contentType,
|
|
175
|
+
upsert
|
|
176
|
+
}) => {
|
|
177
|
+
const content = await blobToBase64(file);
|
|
178
|
+
return apiRequest("/storage/upload", {
|
|
179
|
+
method: "POST",
|
|
180
|
+
body: JSON.stringify({
|
|
181
|
+
bucket,
|
|
182
|
+
path,
|
|
183
|
+
content,
|
|
184
|
+
contentType: contentType ?? file.type,
|
|
185
|
+
...upsert === void 0 ? {} : { upsert }
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
onError: (error) => {
|
|
190
|
+
console.error("Failed to upload file to storage:", error);
|
|
191
|
+
showApiErrorNotification(error);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function storageObjectRefKey(ref) {
|
|
196
|
+
return `${ref.bucket}/${ref.path}`;
|
|
197
|
+
}
|
|
198
|
+
var SIGNED_URL_EXPIRES_IN_SECONDS = 60 * 60;
|
|
199
|
+
var SIGNED_URL_STALE_MS = (SIGNED_URL_EXPIRES_IN_SECONDS - 5 * 60) * 1e3;
|
|
200
|
+
function useStorageSignedUrls(refs) {
|
|
201
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
202
|
+
const results = useQueries({
|
|
203
|
+
queries: refs.map(({ bucket, path }) => ({
|
|
204
|
+
queryKey: storageKeys.signedUrlFor(workOSOrganizationId ?? void 0, bucket, path),
|
|
205
|
+
queryFn: async () => {
|
|
206
|
+
const response = await apiRequest("/storage/signed-url", {
|
|
207
|
+
method: "POST",
|
|
208
|
+
body: JSON.stringify({ bucket, path, expiresIn: SIGNED_URL_EXPIRES_IN_SECONDS })
|
|
209
|
+
});
|
|
210
|
+
return response.signedUrl;
|
|
211
|
+
},
|
|
212
|
+
enabled: isReady && !!bucket && !!path,
|
|
213
|
+
staleTime: SIGNED_URL_STALE_MS
|
|
214
|
+
}))
|
|
215
|
+
});
|
|
216
|
+
const urls = {};
|
|
217
|
+
results.forEach((result, index) => {
|
|
218
|
+
const ref = refs[index];
|
|
219
|
+
if (ref !== void 0 && typeof result.data === "string") urls[storageObjectRefKey(ref)] = result.data;
|
|
220
|
+
});
|
|
221
|
+
return { urls, isLoading: results.some((result) => result.isLoading) };
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export { SIGNED_URL_EXPIRES_IN_SECONDS, TEMPORARY_LINK_STALE_MS, THUMBNAIL_BATCH_SIZE, chunkIntoBatches, cloudStorageKeys, measureImageDimensions, mergeThumbnailBatches, storageKeys, storageObjectRefKey, useCloudStorageFolder, useCloudStorageImageDimensions, useCloudStorageTemporaryLinks, useCloudStorageThumbnails, useStorageSignedUrls, useUploadStorageFile };
|