@elevasis/ui 2.30.0 → 2.32.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.
Files changed (130) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/app/index.css +38 -0
  3. package/dist/app/index.d.ts +190 -9
  4. package/dist/app/index.js +7 -6
  5. package/dist/charts/index.js +4 -5
  6. package/dist/{chunk-HXZQWMKE.js → chunk-2RJMVWFJ.js} +1 -6
  7. package/dist/{chunk-4VQ2PXMI.js → chunk-3FV6HBXS.js} +4 -4
  8. package/dist/{chunk-CW3UNAF2.js → chunk-4DYOXEH6.js} +410 -5
  9. package/dist/{chunk-JKTPRYGV.js → chunk-4MFNGNHF.js} +123 -192
  10. package/dist/{chunk-HYLERWRO.js → chunk-4QK76KIF.js} +7 -7
  11. package/dist/chunk-5FJJ72HU.js +13 -0
  12. package/dist/chunk-5J4PDX26.js +112 -0
  13. package/dist/{chunk-4SY6BTVZ.js → chunk-6DWD423K.js} +12 -9
  14. package/dist/{chunk-3GV5NHSS.js → chunk-7KZINJLP.js} +78 -232
  15. package/dist/{chunk-6WXDE5LZ.js → chunk-EPTHX4VZ.js} +1 -1
  16. package/dist/{chunk-6EFVZV6X.js → chunk-GCOQ3TBG.js} +243 -254
  17. package/dist/{chunk-LRZFLK2F.js → chunk-IQHU7O5Y.js} +4 -4
  18. package/dist/{chunk-X2SUMO3P.js → chunk-IZWTVFJ2.js} +16 -3
  19. package/dist/{chunk-IKQ42WHU.js → chunk-JFL3GRD4.js} +1 -1
  20. package/dist/{chunk-4FZYEEPK.js → chunk-LLRXA7D7.js} +5 -6
  21. package/dist/chunk-MOY4VOHF.js +347 -0
  22. package/dist/{chunk-XQQEKWTL.js → chunk-N55DVMAG.js} +6 -2
  23. package/dist/{chunk-7E3FUTND.js → chunk-ND5TDV2J.js} +1 -1
  24. package/dist/{chunk-WF227UBV.js → chunk-QQHOKTJA.js} +4 -4
  25. package/dist/{chunk-A7B7HLDF.js → chunk-QTI3KC7D.js} +5884 -515
  26. package/dist/chunk-QXCDKE2O.js +486 -0
  27. package/dist/chunk-R2XR4FCV.js +48 -0
  28. package/dist/chunk-R66W5UDG.js +26 -0
  29. package/dist/{chunk-T5Z7G2J2.js → chunk-RQA2EVN3.js} +6 -16
  30. package/dist/{chunk-SKXXT3E2.js → chunk-RQTWIXJ5.js} +4 -4
  31. package/dist/chunk-T35FWDAB.js +4342 -0
  32. package/dist/{chunk-DWK2QIAK.js → chunk-TYRUKGGD.js} +1 -1
  33. package/dist/{chunk-CN2HC4D4.js → chunk-UFTM5SZZ.js} +2 -2
  34. package/dist/{chunk-JCGD4GM6.js → chunk-UROTM5OR.js} +14 -1
  35. package/dist/{chunk-6YT4IKJ7.js → chunk-VNAZTCHA.js} +15 -0
  36. package/dist/{chunk-KVJ3LFH2.js → chunk-VNFR57DF.js} +4 -24
  37. package/dist/{chunk-SBCIB5TZ.js → chunk-VRNMNB3O.js} +6 -7
  38. package/dist/chunk-WQPX44YM.js +1626 -0
  39. package/dist/{chunk-T2PAD63Y.js → chunk-XZGSCABI.js} +1 -1
  40. package/dist/chunk-YLQEVSOR.js +299 -0
  41. package/dist/{chunk-P5WYW2GI.js → chunk-ZQOKIGZP.js} +152 -306
  42. package/dist/components/index.css +38 -0
  43. package/dist/components/index.d.ts +334 -38
  44. package/dist/components/index.js +42 -42
  45. package/dist/components/navigation/index.css +38 -0
  46. package/dist/components/navigation/index.js +3 -2
  47. package/dist/execution/index.d.ts +9 -3
  48. package/dist/features/auth/index.css +38 -0
  49. package/dist/features/auth/index.d.ts +212 -14
  50. package/dist/features/auth/index.js +41 -9
  51. package/dist/features/clients/index.css +649 -0
  52. package/dist/features/clients/index.d.ts +86 -0
  53. package/dist/features/clients/index.js +720 -0
  54. package/dist/features/crm/index.css +38 -0
  55. package/dist/features/crm/index.d.ts +228 -20
  56. package/dist/features/crm/index.js +20 -17
  57. package/dist/features/dashboard/index.css +38 -0
  58. package/dist/features/dashboard/index.d.ts +78 -3
  59. package/dist/features/dashboard/index.js +16 -16
  60. package/dist/features/delivery/index.css +38 -0
  61. package/dist/features/delivery/index.d.ts +201 -18
  62. package/dist/features/delivery/index.js +20 -18
  63. package/dist/features/knowledge/index.css +38 -0
  64. package/dist/features/knowledge/index.d.ts +20 -18
  65. package/dist/features/knowledge/index.js +116 -578
  66. package/dist/features/lead-gen/index.css +38 -0
  67. package/dist/features/lead-gen/index.d.ts +59 -51
  68. package/dist/features/lead-gen/index.js +20 -18
  69. package/dist/features/monitoring/index.css +38 -0
  70. package/dist/features/monitoring/index.d.ts +20 -18
  71. package/dist/features/monitoring/index.js +19 -18
  72. package/dist/features/monitoring/requests/index.css +38 -0
  73. package/dist/features/monitoring/requests/index.d.ts +21 -19
  74. package/dist/features/monitoring/requests/index.js +17 -15
  75. package/dist/features/operations/index.css +38 -0
  76. package/dist/features/operations/index.d.ts +945 -45
  77. package/dist/features/operations/index.js +24 -26
  78. package/dist/features/seo/index.d.ts +20 -18
  79. package/dist/features/seo/index.js +1 -1
  80. package/dist/features/settings/index.css +38 -0
  81. package/dist/features/settings/index.d.ts +201 -18
  82. package/dist/features/settings/index.js +18 -16
  83. package/dist/hooks/delivery/index.css +38 -0
  84. package/dist/hooks/delivery/index.d.ts +200 -0
  85. package/dist/hooks/delivery/index.js +2 -2
  86. package/dist/hooks/index.css +38 -0
  87. package/dist/hooks/index.d.ts +825 -47
  88. package/dist/hooks/index.js +14 -13
  89. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +194 -3
  90. package/dist/hooks/published.css +38 -0
  91. package/dist/hooks/published.d.ts +825 -47
  92. package/dist/hooks/published.js +14 -13
  93. package/dist/index.css +38 -0
  94. package/dist/index.d.ts +1506 -1212
  95. package/dist/index.js +15 -14
  96. package/dist/initialization/index.d.ts +181 -0
  97. package/dist/knowledge/index.d.ts +813 -1068
  98. package/dist/knowledge/index.js +7370 -2869
  99. package/dist/{chunk-CLUP5H3C.js → knowledge-search-index-5KYPO746.js} +441 -963
  100. package/dist/layout/index.d.ts +6 -0
  101. package/dist/layout/index.js +4 -5
  102. package/dist/organization/index.css +38 -0
  103. package/dist/profile/index.d.ts +181 -0
  104. package/dist/provider/index.css +38 -0
  105. package/dist/provider/index.d.ts +909 -1156
  106. package/dist/provider/index.js +11 -10
  107. package/dist/provider/published.css +38 -0
  108. package/dist/provider/published.d.ts +906 -1153
  109. package/dist/provider/published.js +7 -6
  110. package/dist/supabase/index.d.ts +349 -0
  111. package/dist/test-utils/index.d.ts +16 -9
  112. package/dist/test-utils/index.js +39 -32
  113. package/dist/test-utils/setup.js +1 -1
  114. package/dist/theme/index.js +3 -3
  115. package/dist/theme/presets/index.js +1 -1
  116. package/dist/types/index.d.ts +378 -5
  117. package/dist/utils/index.d.ts +78 -3
  118. package/dist/utils/index.js +1 -1
  119. package/dist/vite/index.js +2 -2
  120. package/dist/vite-plugin-knowledge/index.js +1 -1
  121. package/package.json +47 -37
  122. package/src/provider/README.md +5 -5
  123. package/dist/chunk-2DIYILF7.js +0 -413
  124. package/dist/chunk-3MDNBHVB.js +0 -3868
  125. package/dist/chunk-6IXOKUBC.js +0 -347
  126. package/dist/chunk-AKOD52HS.js +0 -739
  127. package/dist/chunk-ECNNI3NT.js +0 -6
  128. package/dist/chunk-JDNEWB5F.js +0 -10
  129. package/dist/chunk-NITGGYH2.js +0 -476
  130. package/dist/chunk-OAVTMITG.js +0 -13
@@ -1,79 +1,60 @@
1
- import { DEFAULT_ORGANIZATION_MODEL_PROSPECTING, PROSPECTING_STEPS } from './chunk-NITGGYH2.js';
1
+ import { SalesSidebar, LeadGenSidebarMiddle } from './chunk-MOY4VOHF.js';
2
2
  import { sanitizeInput } from './chunk-3MEXPLWT.js';
3
+ import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
3
4
  import { PageContainer } from './chunk-BZZCNLT6.js';
4
5
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
5
- import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
6
- import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
7
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
8
- import { CustomModal } from './chunk-KVJ3LFH2.js';
9
- import { acquisitionListKeys, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useWorkflowExecution, useList, useListProgress, useListExecutions, useDeleteList, useCompanyFacets, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts, useCredentials, useVerifyCredential, useInFlightExecutions, useListRecords, useCompany, useContact, useExecutionSSE, useListMembers, useListMember, useTransitionListMember, useDeriveActions, useArtifacts } from './chunk-6EFVZV6X.js';
10
- import { showApiErrorNotification, showSuccessNotification } from './chunk-T2PAD63Y.js';
11
- import { PageTitleCaption, CenteredErrorState, StatCard, CardHeader, EmptyState, JsonViewer } from './chunk-6WXDE5LZ.js';
12
- import { useListActions, LEAD_GEN_STAGE_CATALOG, LEAD_GEN_PIPELINE_DEFINITIONS, findPipeline } from './chunk-AKOD52HS.js';
7
+ import { CustomModal } from './chunk-R66W5UDG.js';
8
+ import { acquisitionListKeys, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useWorkflowExecution, useList, useListProgress, useListExecutions, useDeleteList, useCompanyFacets, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts, useCredentials, useVerifyCredential, useInFlightExecutions, useListRecords, useExecutionSSE, useListMembers, useListMember, useTransitionListMember, useDeriveActions, useArtifacts } from './chunk-GCOQ3TBG.js';
9
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-XZGSCABI.js';
10
+ import { PageTitleCaption, CenteredErrorState, StatCard, CardHeader, EmptyState, JsonViewer } from './chunk-EPTHX4VZ.js';
11
+ import { useListActions } from './chunk-YLQEVSOR.js';
13
12
  import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
14
- import { useRouterContext } from './chunk-Q7DJKLEN.js';
13
+ import { PROSPECTING_STEPS, LEAD_GEN_STAGE_CATALOG, LEAD_GEN_PIPELINE_DEFINITIONS, findPipeline } from './chunk-T35FWDAB.js';
15
14
  import { isStepStartedContext, isStepCompletedContext, isStepFailedContext } from './chunk-KRWALB24.js';
16
15
  import { useElevasisServices } from './chunk-KJ3QUBNU.js';
17
- import { Stack, Group, Title, Text, Alert, Button, Collapse, Paper, Anchor, ActionIcon, Divider, Box, SimpleGrid, Badge, Card, Center, Loader, Table, TextInput, Select, Checkbox, Pagination, Textarea, Tooltip, Tabs, ThemeIcon, Pill, SegmentedControl, UnstyledButton, Drawer, JsonInput, Switch, NumberInput, MultiSelect, TagsInput, ScrollArea, Progress } from '@mantine/core';
18
- import { IconLayoutGrid, IconList, IconBuilding, IconAddressBook, IconTarget, IconExternalLink, IconX, IconAlertCircle, IconPlayerPlay, IconArrowRight, IconSparkles, IconListDetails, IconPlus, IconSearch, IconAlertTriangle, IconLayoutDashboard, IconBolt, IconCopy, IconUsers, IconTrash, IconBuildingFactory2, IconArrowLeft, IconChevronDown, IconChevronRight, IconRefresh, IconSettings, IconCircleCheck, IconCircleDot, IconTerminal2, IconProgressCheck, IconMail, IconUser, IconDatabase } from '@tabler/icons-react';
16
+ import { Stack, Group, Title, Text, Alert, Button, Collapse, Paper, Anchor, Center, Loader, SimpleGrid, Card, Table, Badge, TextInput, Select, Checkbox, Pagination, Textarea, ActionIcon, Tooltip, Tabs, ThemeIcon, Box, Pill, SegmentedControl, UnstyledButton, Drawer, JsonInput, Switch, NumberInput, MultiSelect, TagsInput, ScrollArea, Progress } from '@mantine/core';
17
+ import { IconTarget, IconAlertCircle, IconPlayerPlay, IconArrowRight, IconSparkles, IconListDetails, IconPlus, IconSearch, IconList, IconExternalLink, IconAlertTriangle, IconLayoutDashboard, IconBolt, IconCopy, IconBuilding, IconUsers, IconTrash, IconBuildingFactory2, IconArrowLeft, IconChevronDown, IconChevronRight, IconRefresh, IconAddressBook, IconSettings, IconCircleCheck, IconCircleDot, IconTerminal2, IconProgressCheck, IconMail, IconUser, IconDatabase } from '@tabler/icons-react';
19
18
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
- import { Link, useNavigate, useSearch } from '@tanstack/react-router';
21
19
  import { useState, useRef, useMemo, useEffect, Fragment as Fragment$1, useCallback } from 'react';
22
20
  import { useForm } from '@mantine/form';
23
21
  import { zod4Resolver } from 'mantine-form-zod-resolver';
22
+ import { Link, useNavigate, useSearch } from '@tanstack/react-router';
24
23
  import { useQueryClient, useMutation } from '@tanstack/react-query';
25
24
 
26
25
  var LeadGenSidebarTop = () => {
27
26
  return /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconTarget, label: "Lead Gen" });
28
27
  };
29
- var LEAD_GEN_ITEMS = [
30
- { label: "Overview", to: "/lead-gen", icon: IconLayoutGrid, exact: true },
31
- { label: "Lists", to: "/lead-gen/lists", icon: IconList, exact: false },
32
- { label: "Companies", to: "/lead-gen/companies", icon: IconBuilding, exact: false },
33
- { label: "Contacts", to: "/lead-gen/contacts", icon: IconAddressBook, exact: false }
34
- ];
35
- var LeadGenSidebarMiddle = ({ items = LEAD_GEN_ITEMS } = {}) => {
36
- const { currentPath, navigate } = useRouterContext();
37
- return /* @__PURE__ */ jsx(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: items.map((item) => {
38
- const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
39
- return /* @__PURE__ */ jsx(
40
- SubshellNavItem,
41
- {
42
- icon: item.icon,
43
- label: item.label,
44
- isActive,
45
- href: item.to,
46
- onClick: () => navigate(item.to)
47
- },
48
- item.to
49
- );
50
- }) }) });
51
- };
52
28
  var LeadGenSidebar = ({ children } = {}) => {
53
29
  return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
54
30
  /* @__PURE__ */ jsx(LeadGenSidebarTop, {}),
55
31
  children ?? /* @__PURE__ */ jsx(LeadGenSidebarMiddle, {})
56
32
  ] });
57
33
  };
58
- var leadGenManifest = {
59
- key: "lead-gen",
60
- featureId: "sales.lead-gen",
61
- capabilityIds: ["leadgen.lists.manage"],
62
- icon: IconTarget,
63
- sidebar: LeadGenSidebar
64
- };
65
34
 
66
35
  // ../core/src/business/acquisition/build-templates.ts
67
- var PROSPECTING_BUILD_TEMPLATE_OPTIONS = DEFAULT_ORGANIZATION_MODEL_PROSPECTING.buildTemplates.map(
68
- ({ id, label, description }) => ({
69
- id,
70
- label,
71
- description
72
- })
73
- );
74
- var DEFAULT_PROSPECTING_BUILD_TEMPLATE_ID = DEFAULT_ORGANIZATION_MODEL_PROSPECTING.defaultBuildTemplateId;
36
+ var BUILD_TEMPLATE_CATALOG = [
37
+ {
38
+ id: "local-services",
39
+ label: "Local Services",
40
+ description: "Source, analyze, qualify, and personalize local service businesses for outreach.",
41
+ steps: Object.values(PROSPECTING_STEPS.localServices)
42
+ },
43
+ {
44
+ id: "dtc-subscription-apollo-clickup",
45
+ label: "DTC Subscription (Apollo + ClickUp)",
46
+ description: "Import DTC brand leads from Apollo, crawl their websites, score fit, enrich contacts, and export via ClickUp.",
47
+ steps: Object.values(PROSPECTING_STEPS.dtcApolloClickup)
48
+ }
49
+ ];
50
+ var DEFAULT_PROSPECTING_BUILD_TEMPLATE_ID = "local-services";
51
+ var PROSPECTING_BUILD_TEMPLATE_OPTIONS = BUILD_TEMPLATE_CATALOG.map(({ id, label, description }) => ({
52
+ id,
53
+ label,
54
+ description
55
+ }));
75
56
  function createBuildPlanSnapshotFromTemplateId(templateId) {
76
- const template = DEFAULT_ORGANIZATION_MODEL_PROSPECTING.buildTemplates.find((item) => item.id === templateId);
57
+ const template = BUILD_TEMPLATE_CATALOG.find((item) => item.id === templateId);
77
58
  if (!template) return null;
78
59
  return {
79
60
  templateId: template.id,
@@ -88,7 +69,7 @@ function createBuildPlanSnapshotFromTemplateId(templateId) {
88
69
  recordsStageKey: step.recordsStageKey ?? step.stageKey,
89
70
  recordSourceStageKey: step.recordSourceStageKey ?? step.recordsStageKey ?? step.stageKey,
90
71
  dependencyMode: step.dependencyMode,
91
- capabilityKey: step.capabilityKey,
72
+ actionKey: step.actionKey,
92
73
  defaultBatchSize: step.defaultBatchSize,
93
74
  maxBatchSize: step.maxBatchSize
94
75
  };
@@ -96,12 +77,18 @@ function createBuildPlanSnapshotFromTemplateId(templateId) {
96
77
  if (step.recordEntity) snapshotStep.recordEntity = step.recordEntity;
97
78
  if (step.dependsOn?.length) snapshotStep.dependsOn = [...step.dependsOn];
98
79
  if (step.credentialRequirements?.length) {
99
- snapshotStep.credentialRequirements = step.credentialRequirements.map((requirement) => ({ ...requirement }));
80
+ snapshotStep.credentialRequirements = step.credentialRequirements.map((requirement) => ({
81
+ ...requirement
82
+ }));
100
83
  }
101
84
  if (step.recordColumns) {
102
85
  snapshotStep.recordColumns = {
103
- ...step.recordColumns.company ? { company: step.recordColumns.company.map((column) => ({ ...column })) } : {},
104
- ...step.recordColumns.contact ? { contact: step.recordColumns.contact.map((column) => ({ ...column })) } : {}
86
+ ...step.recordColumns.company ? {
87
+ company: step.recordColumns.company.map((column) => ({ ...column }))
88
+ } : {},
89
+ ...step.recordColumns.contact ? {
90
+ contact: step.recordColumns.contact.map((column) => ({ ...column }))
91
+ } : {}
105
92
  };
106
93
  }
107
94
  return snapshotStep;
@@ -401,6 +388,15 @@ function StepConfigForm({
401
388
  )) })
402
389
  ] });
403
390
  }
391
+
392
+ // src/features/lead-gen/manifest.ts
393
+ var leadGenManifest = {
394
+ key: "lead-gen",
395
+ systemId: "sales.lead-gen",
396
+ capabilityIds: ["leadgen.lists.manage"],
397
+ icon: IconTarget,
398
+ sidebar: SalesSidebar
399
+ };
404
400
  var LEAD_GEN_ROUTE_LINKS = [
405
401
  { label: "Overview", to: "/lead-gen" },
406
402
  { label: "Lists", to: "/lead-gen/lists" },
@@ -471,133 +467,6 @@ function getEnrichmentStatus(enrichmentData) {
471
467
  if (website === "failed" || linkedin === "failed") return "failed";
472
468
  return "pending";
473
469
  }
474
- function formatName(parts, fallback) {
475
- const name = parts.filter(Boolean).join(" ").trim();
476
- return name || fallback;
477
- }
478
- function CompanyDetailModal({
479
- company,
480
- onClose
481
- }) {
482
- return /* @__PURE__ */ jsx(CustomModal, { opened: !!company, onClose, size: "xl", children: company ? /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
483
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", children: [
484
- /* @__PURE__ */ jsxs("div", { children: [
485
- /* @__PURE__ */ jsx(Title, { order: 3, children: company.name }),
486
- company.domain ? /* @__PURE__ */ jsxs(Anchor, { href: `https://${company.domain}`, target: "_blank", size: "sm", c: "dimmed", children: [
487
- company.domain,
488
- " ",
489
- /* @__PURE__ */ jsx(IconExternalLink, { size: 12, style: { verticalAlign: "middle" } })
490
- ] }) : null
491
- ] }),
492
- /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", onClick: onClose, children: /* @__PURE__ */ jsx(IconX, { size: 18 }) })
493
- ] }),
494
- /* @__PURE__ */ jsx(Divider, {}),
495
- /* @__PURE__ */ jsxs(Box, { children: [
496
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "xs", children: "Firmographics" }),
497
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 3, children: [
498
- /* @__PURE__ */ jsxs("div", { children: [
499
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Segment" }),
500
- /* @__PURE__ */ jsx(Text, { size: "sm", children: company.segment || "-" })
501
- ] }),
502
- /* @__PURE__ */ jsxs("div", { children: [
503
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Category" }),
504
- /* @__PURE__ */ jsx(Text, { size: "sm", children: company.category || "-" })
505
- ] }),
506
- /* @__PURE__ */ jsxs("div", { children: [
507
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Employees" }),
508
- /* @__PURE__ */ jsx(Text, { size: "sm", children: company.numEmployees || "-" })
509
- ] }),
510
- /* @__PURE__ */ jsxs("div", { children: [
511
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Founded" }),
512
- /* @__PURE__ */ jsx(Text, { size: "sm", children: company.foundedYear || "-" })
513
- ] }),
514
- /* @__PURE__ */ jsxs("div", { children: [
515
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Location" }),
516
- /* @__PURE__ */ jsx(Text, { size: "sm", children: [company.locationCity, company.locationState].filter(Boolean).join(", ") || "-" })
517
- ] }),
518
- /* @__PURE__ */ jsxs("div", { children: [
519
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Contacts" }),
520
- /* @__PURE__ */ jsx(Text, { size: "sm", children: company.contactCount })
521
- ] })
522
- ] })
523
- ] }),
524
- company.enrichmentData ? /* @__PURE__ */ jsxs(Box, { children: [
525
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "xs", children: "Enrichment Data" }),
526
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { whiteSpace: "pre-wrap" }, children: JSON.stringify(company.enrichmentData, null, 2) })
527
- ] }) : null,
528
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
529
- company.linkedinUrl ? /* @__PURE__ */ jsxs(Anchor, { href: company.linkedinUrl, target: "_blank", size: "sm", children: [
530
- "LinkedIn ",
531
- /* @__PURE__ */ jsx(IconExternalLink, { size: 12 })
532
- ] }) : null,
533
- company.website ? /* @__PURE__ */ jsxs(Anchor, { href: company.website, target: "_blank", size: "sm", children: [
534
- "Website ",
535
- /* @__PURE__ */ jsx(IconExternalLink, { size: 12 })
536
- ] }) : null
537
- ] }),
538
- /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
539
- "Created: ",
540
- formatDate(company.createdAt),
541
- company.updatedAt && ` | Updated: ${formatDate(company.updatedAt)}`
542
- ] })
543
- ] }) : null });
544
- }
545
- function ContactDetailModal({
546
- contact,
547
- onClose
548
- }) {
549
- return /* @__PURE__ */ jsx(CustomModal, { opened: !!contact, onClose, size: "xl", children: contact ? /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
550
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", children: [
551
- /* @__PURE__ */ jsxs("div", { children: [
552
- /* @__PURE__ */ jsx(Title, { order: 3, children: formatName([contact.firstName, contact.lastName], contact.email) }),
553
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: contact.email }),
554
- contact.title ? /* @__PURE__ */ jsx(Text, { size: "sm", children: contact.title }) : null
555
- ] }),
556
- /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", onClick: onClose, children: /* @__PURE__ */ jsx(IconX, { size: 18 }) })
557
- ] }),
558
- /* @__PURE__ */ jsx(Divider, {}),
559
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
560
- /* @__PURE__ */ jsx(Badge, { color: getStatusColor(contact.status), children: contact.status }),
561
- contact.openingLine ? /* @__PURE__ */ jsx(Badge, { color: "green", children: "Personalized" }) : null
562
- ] }),
563
- contact.company ? /* @__PURE__ */ jsxs(Box, { children: [
564
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "xs", children: "Company" }),
565
- /* @__PURE__ */ jsxs(Card, { withBorder: true, children: [
566
- /* @__PURE__ */ jsx(Text, { fw: 500, children: contact.company.name }),
567
- contact.company.domain ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: contact.company.domain }) : null
568
- ] })
569
- ] }) : null,
570
- /* @__PURE__ */ jsxs(Box, { children: [
571
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "xs", children: "Contact Information" }),
572
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, children: [
573
- /* @__PURE__ */ jsxs("div", { children: [
574
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Headline" }),
575
- /* @__PURE__ */ jsx(Text, { size: "sm", children: contact.headline || "-" })
576
- ] }),
577
- /* @__PURE__ */ jsxs("div", { children: [
578
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "LinkedIn" }),
579
- contact.linkedinUrl ? /* @__PURE__ */ jsxs(Anchor, { href: contact.linkedinUrl, target: "_blank", size: "sm", children: [
580
- "View Profile ",
581
- /* @__PURE__ */ jsx(IconExternalLink, { size: 12 })
582
- ] }) : /* @__PURE__ */ jsx(Text, { size: "sm", children: "-" })
583
- ] })
584
- ] })
585
- ] }),
586
- contact.filterReason ? /* @__PURE__ */ jsxs(Box, { children: [
587
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "xs", children: "Qualification" }),
588
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "red", children: contact.filterReason })
589
- ] }) : null,
590
- contact.openingLine ? /* @__PURE__ */ jsxs(Box, { children: [
591
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "xs", children: "Personalization" }),
592
- /* @__PURE__ */ jsx(Text, { size: "sm", children: contact.openingLine })
593
- ] }) : null,
594
- /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
595
- "Created: ",
596
- formatDate(contact.createdAt),
597
- contact.updatedAt && ` | Updated: ${formatDate(contact.updatedAt)}`
598
- ] })
599
- ] }) : null });
600
- }
601
470
  function useDeleteLists() {
602
471
  const { apiRequest, workOSOrganizationId } = useElevasisServices();
603
472
  const queryClient = useQueryClient();
@@ -2692,7 +2561,7 @@ function getEntityTotal(progress, entity) {
2692
2561
  return entity === "company" ? progress.totalCompanies : progress.totalMembers;
2693
2562
  }
2694
2563
  function findActionForStep(actions, step) {
2695
- return actions.find((action) => action.capabilityKey === step.capabilityKey) ?? actions.find((action) => action.stagesAffected?.includes(step.stageKey));
2564
+ return actions.find((action) => action.actionKey === step.actionKey) ?? actions.find((action) => action.stagesAffected?.includes(step.stageKey));
2696
2565
  }
2697
2566
  function normalizeBuildPlanStep(step) {
2698
2567
  const fallback = MVP_BUILD_STEPS.find((item) => item.id === step.id || item.stageKey === step.stageKey);
@@ -2708,7 +2577,7 @@ function normalizeBuildPlanStep(step) {
2708
2577
  recordSourceStageKey: step.recordSourceStageKey,
2709
2578
  dependsOn: step.dependsOn,
2710
2579
  dependencyMode: step.dependencyMode,
2711
- capabilityKey: step.capabilityKey,
2580
+ actionKey: step.actionKey,
2712
2581
  defaultBatchSize: step.defaultBatchSize,
2713
2582
  maxBatchSize: step.maxBatchSize,
2714
2583
  recordColumns: step.recordColumns,
@@ -2795,7 +2664,7 @@ function hasApprovedExportRun(executions) {
2795
2664
  });
2796
2665
  }
2797
2666
  function hasCompletedSourcingRun(step, action, executions) {
2798
- return executions.some((run) => isCompletedRun(run) && run.resourceId === (action?.resourceId ?? step.capabilityKey));
2667
+ return executions.some((run) => isCompletedRun(run) && run.resourceId === (action?.resourceId ?? step.actionKey));
2799
2668
  }
2800
2669
  function deriveBusinessProgress(list, progress, actions = [], executions = []) {
2801
2670
  const byCompanyStage = { ...progress.byCompanyStage };
@@ -2829,7 +2698,7 @@ function getStepRecommendedAction(step, action, kind) {
2829
2698
  return {
2830
2699
  kind,
2831
2700
  label: getStepActionLabel(kind),
2832
- capabilityKey: action.capabilityKey ?? step.capabilityKey,
2701
+ actionKey: action.actionKey ?? step.actionKey,
2833
2702
  defaultSize: step.defaultBatchSize,
2834
2703
  maxSize: step.maxBatchSize
2835
2704
  };
@@ -3047,7 +2916,7 @@ function hasRunInput(run) {
3047
2916
  const input = getRunInput(run);
3048
2917
  return input !== void 0 && input !== null;
3049
2918
  }
3050
- function sanitizeStepInput(value, _capabilityKey) {
2919
+ function sanitizeStepInput(value, _actionKey) {
3051
2920
  return value;
3052
2921
  }
3053
2922
  function getDefaultStepInput(list, action) {
@@ -3636,7 +3505,7 @@ function StepRecordsPanel({
3636
3505
  const queryClient = useQueryClient();
3637
3506
  const [page, setPage] = useState(1);
3638
3507
  const [approvalByCompanyId, setApprovalByCompanyId] = useState({});
3639
- const [selectedRecord, setSelectedRecord] = useState(null);
3508
+ const navigate = useNavigate();
3640
3509
  const recordsStageKey = step.recordSourceStageKey ?? step.recordsStageKey ?? step.stageKey;
3641
3510
  const recordsEntity = step.recordEntity ?? step.primaryEntity;
3642
3511
  const columns = step.recordColumns?.[recordsEntity] ?? [];
@@ -3651,19 +3520,14 @@ function StepRecordsPanel({
3651
3520
  workflowId: exportWorkflowId,
3652
3521
  listId: list.id
3653
3522
  });
3654
- const selectedCompanyId = selectedRecord?.entity === "company" ? selectedRecord.id : "";
3655
- const selectedContactId = selectedRecord?.entity === "contact" ? selectedRecord.id : "";
3656
- const selectedCompanyQuery = useCompany(selectedCompanyId);
3657
- const selectedContactQuery = useContact(selectedContactId);
3658
3523
  useEffect(() => {
3659
3524
  setPage(1);
3660
3525
  setApprovalByCompanyId({});
3661
- setSelectedRecord(null);
3662
3526
  }, [step.id]);
3663
3527
  const rows = recordsQuery.data?.data ?? [];
3664
3528
  const total = recordsQuery.data?.total ?? 0;
3665
3529
  const totalPages = Math.max(1, Math.ceil(total / RECORDS_PAGE_SIZE));
3666
- const isReviewExportStep = step.primaryEntity === "company" && (step.capabilityKey === "lead-gen.export.list" || exportWorkflowId === EXPORT_WORKFLOW_ID);
3530
+ const isReviewExportStep = step.primaryEntity === "company" && (step.actionKey === "lead-gen.export.list" || exportWorkflowId === EXPORT_WORKFLOW_ID);
3667
3531
  const approvedCompanyIds = Object.entries(approvalByCompanyId).filter(([, status]) => status === "approved").map(([companyId]) => companyId);
3668
3532
  const rejectedCompanyIds = Object.entries(approvalByCompanyId).filter(([, status]) => status === "rejected").map(([companyId]) => companyId);
3669
3533
  const clickupRequirement = getClickUpRequirement(step);
@@ -3677,10 +3541,10 @@ function StepRecordsPanel({
3677
3541
  };
3678
3542
  const openRecordDetail = (row) => {
3679
3543
  if (row.entity === "company") {
3680
- setSelectedRecord({ entity: "company", id: row.companyId });
3544
+ void navigate({ to: "/crm/companies/$companyId", params: { companyId: row.companyId } });
3681
3545
  return;
3682
3546
  }
3683
- setSelectedRecord({ entity: "contact", id: row.contactId });
3547
+ void navigate({ to: "/crm/contacts/$contactId", params: { contactId: row.contactId } });
3684
3548
  };
3685
3549
  const exportApproved = async () => {
3686
3550
  try {
@@ -3704,7 +3568,6 @@ function StepRecordsPanel({
3704
3568
  showApiErrorNotification(error);
3705
3569
  }
3706
3570
  };
3707
- const selectedRecordIsLoading = selectedRecord?.entity === "company" ? selectedCompanyQuery.isLoading : selectedRecord?.entity === "contact" ? selectedContactQuery.isLoading : false;
3708
3571
  if (!columns.length) {
3709
3572
  return /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No record columns are configured for this step." });
3710
3573
  }
@@ -3803,30 +3666,7 @@ function StepRecordsPanel({
3803
3666
  }
3804
3667
  )
3805
3668
  ] }) : null
3806
- ] }),
3807
- /* @__PURE__ */ jsx(
3808
- CustomModal,
3809
- {
3810
- opened: Boolean(selectedRecord) && selectedRecordIsLoading,
3811
- onClose: () => setSelectedRecord(null),
3812
- size: "xl",
3813
- children: /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) })
3814
- }
3815
- ),
3816
- /* @__PURE__ */ jsx(
3817
- CompanyDetailModal,
3818
- {
3819
- company: selectedRecord?.entity === "company" ? selectedCompanyQuery.data ?? null : null,
3820
- onClose: () => setSelectedRecord(null)
3821
- }
3822
- ),
3823
- /* @__PURE__ */ jsx(
3824
- ContactDetailModal,
3825
- {
3826
- contact: selectedRecord?.entity === "contact" ? selectedContactQuery.data ?? null : null,
3827
- onClose: () => setSelectedRecord(null)
3828
- }
3829
- )
3669
+ ] })
3830
3670
  ] });
3831
3671
  }
3832
3672
  function BuildTab({
@@ -3851,7 +3691,7 @@ function BuildTab({
3851
3691
  const selectedStep = steps.find((step) => step.id === selectedStepId) ?? currentStep;
3852
3692
  const selectedStepIndex = selectedStep ? steps.findIndex((step) => step.id === selectedStep.id) : -1;
3853
3693
  const selectedActionKind = selectedStep?.nextActionKind ?? "none";
3854
- const selectedCapabilityKey = selectedStep?.action?.capabilityKey ?? selectedStep?.capabilityKey;
3694
+ const selectedCapabilityKey = selectedStep?.action?.actionKey ?? selectedStep?.actionKey;
3855
3695
  const selectedResourceId = selectedStep?.action?.resourceId ?? null;
3856
3696
  const stepSchema = selectedStep?.action?.schema;
3857
3697
  const stepLayout = selectedStep?.action?.layout;
@@ -4106,7 +3946,7 @@ function BuildTab({
4106
3946
  onVerify: handleVerifyCredential
4107
3947
  }
4108
3948
  ),
4109
- selectedStep.capabilityKey === "lead-gen.export.list" || getClickUpRequirement(selectedStep) ? /* @__PURE__ */ jsx(
3949
+ selectedStep.actionKey === "lead-gen.export.list" || getClickUpRequirement(selectedStep) ? /* @__PURE__ */ jsx(
4110
3950
  TextInput,
4111
3951
  {
4112
3952
  label: "ClickUp List ID",
@@ -4551,11 +4391,15 @@ function LeadGenCompaniesPage() {
4551
4391
  const [segmentFilter, setSegmentFilter] = useState(null);
4552
4392
  const [categoryFilter, setCategoryFilter] = useState(null);
4553
4393
  const [statusFilter, setStatusFilter] = useState(null);
4554
- const [selectedCompany, setSelectedCompany] = useState(null);
4555
4394
  const [showBatchDelete, setShowBatchDelete] = useState(false);
4395
+ const navigate = useNavigate();
4556
4396
  const pagination = usePaginationState(PAGE_SIZE_DEFAULT2, [companySearch, segmentFilter, categoryFilter, statusFilter]);
4557
4397
  const { data: companyFacets } = useCompanyFacets();
4558
- const { data: pagedCompanies, isLoading: pagedCompaniesLoading, error: pagedCompaniesError } = useCompanies({
4398
+ const {
4399
+ data: pagedCompanies,
4400
+ isLoading: pagedCompaniesLoading,
4401
+ error: pagedCompaniesError
4402
+ } = useCompanies({
4559
4403
  search: companySearch || void 0,
4560
4404
  segment: segmentFilter || void 0,
4561
4405
  category: categoryFilter || void 0,
@@ -4671,7 +4515,7 @@ function LeadGenCompaniesPage() {
4671
4515
  Table.Tr,
4672
4516
  {
4673
4517
  style: { cursor: "pointer" },
4674
- onClick: () => setSelectedCompany(company),
4518
+ onClick: () => navigate({ to: "/crm/companies/$companyId", params: { companyId: company.id } }),
4675
4519
  children: [
4676
4520
  /* @__PURE__ */ jsx(
4677
4521
  Table.Td,
@@ -4713,7 +4557,6 @@ function LeadGenCompaniesPage() {
4713
4557
  }
4714
4558
  ) }) : null
4715
4559
  ] }) }),
4716
- /* @__PURE__ */ jsx(CompanyDetailModal, { company: selectedCompany, onClose: () => setSelectedCompany(null) }),
4717
4560
  /* @__PURE__ */ jsx(CustomModal, { opened: showBatchDelete, onClose: () => setShowBatchDelete(false), size: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
4718
4561
  /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
4719
4562
  /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20, color: "var(--mantine-color-red-6)" }),
@@ -4736,11 +4579,15 @@ function LeadGenContactsPage() {
4736
4579
  const [contactSearch, setContactSearch] = useState("");
4737
4580
  const [statusFilter, setStatusFilter] = useState(null);
4738
4581
  const [listFilter, setListFilter] = useState(null);
4739
- const [selectedContact, setSelectedContact] = useState(null);
4740
4582
  const [showBatchDelete, setShowBatchDelete] = useState(false);
4583
+ const navigate = useNavigate();
4741
4584
  const pagination = usePaginationState(PAGE_SIZE_DEFAULT3, [contactSearch, statusFilter, listFilter]);
4742
4585
  const { data: lists } = useLists();
4743
- const { data: contacts, isLoading: contactsLoading, error: contactsError } = useContacts({
4586
+ const {
4587
+ data: contacts,
4588
+ isLoading: contactsLoading,
4589
+ error: contactsError
4590
+ } = useContacts({
4744
4591
  search: contactSearch || void 0,
4745
4592
  contactStatus: statusFilter || void 0,
4746
4593
  listId: listFilter || void 0,
@@ -4843,7 +4690,7 @@ function LeadGenContactsPage() {
4843
4690
  Table.Tr,
4844
4691
  {
4845
4692
  style: { cursor: "pointer" },
4846
- onClick: () => setSelectedContact(contact),
4693
+ onClick: () => navigate({ to: "/crm/contacts/$contactId", params: { contactId: contact.id } }),
4847
4694
  children: [
4848
4695
  /* @__PURE__ */ jsx(
4849
4696
  Table.Td,
@@ -4884,7 +4731,6 @@ function LeadGenContactsPage() {
4884
4731
  }
4885
4732
  ) }) : null
4886
4733
  ] }) }),
4887
- /* @__PURE__ */ jsx(ContactDetailModal, { contact: selectedContact, onClose: () => setSelectedContact(null) }),
4888
4734
  /* @__PURE__ */ jsx(CustomModal, { opened: showBatchDelete, onClose: () => setShowBatchDelete(false), size: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
4889
4735
  /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
4890
4736
  /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20, color: "var(--mantine-color-red-6)" }),
@@ -4903,4 +4749,4 @@ function LeadGenContactsPage() {
4903
4749
  ] }) });
4904
4750
  }
4905
4751
 
4906
- export { CompanyDetailModal, ContactDetailModal, LEAD_GEN_ITEMS, LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, ListBuilderIndexPage, ListBuilderPage, ORPHAN_STAGE_ORDER, RunWorkflowModal, StepConfigForm, TabSection, deriveBusinessProgress, formatDate, getEnrichmentColor, getEnrichmentStatus, getStateKeyColor, getStatusColor, getStepActionLabel, leadGenManifest, resolveBuildPlanSteps, resolveBuildState, sortStageKeys, useDeleteLists };
4752
+ export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarTop, ListBuilderIndexPage, ListBuilderPage, ORPHAN_STAGE_ORDER, RunWorkflowModal, StepConfigForm, TabSection, deriveBusinessProgress, formatDate, getEnrichmentColor, getEnrichmentStatus, getStateKeyColor, getStatusColor, getStepActionLabel, leadGenManifest, resolveBuildPlanSteps, resolveBuildState, sortStageKeys, useDeleteLists };
@@ -1,6 +1,6 @@
1
1
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
2
2
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
3
- import { getErrorInfo, getErrorTitle, getResourceIcon, formatTimeAgo } from './chunk-HXZQWMKE.js';
3
+ import { getErrorInfo, getErrorTitle, getResourceIcon, formatTimeAgo } from './chunk-2RJMVWFJ.js';
4
4
  import { ResourceStatusColors } from './chunk-KRWALB24.js';
5
5
  import { useAuthContext } from './chunk-BRJ3QZ4E.js';
6
6
  import { Center, Stack, Title, Text, Button, Box, Loader, Badge, Group, Collapse, ScrollArea, Card, Select, Alert, Code, ThemeIcon, Paper, Grid, Timeline, Space } from '@mantine/core';