@elevasis/ui 2.30.0 → 2.31.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 (109) hide show
  1. package/dist/{CoreAuthKitInner-QC62UHTZ.js → CoreAuthKitInner-KSEGSB67.js} +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/app/index.d.ts +122 -1
  4. package/dist/app/index.js +7 -7
  5. package/dist/auth/context.js +1 -1
  6. package/dist/auth/index.js +1 -1
  7. package/dist/charts/index.js +4 -4
  8. package/dist/{chunk-T5Z7G2J2.js → chunk-3BAPR3KA.js} +1 -1
  9. package/dist/{chunk-4VQ2PXMI.js → chunk-3FV6HBXS.js} +4 -4
  10. package/dist/{chunk-2DIYILF7.js → chunk-542WPQU2.js} +2 -2
  11. package/dist/{chunk-SBCIB5TZ.js → chunk-5LJAEZMA.js} +5 -5
  12. package/dist/{chunk-T2PAD63Y.js → chunk-7HMCB26R.js} +1 -1
  13. package/dist/chunk-7KC4P3AU.js +357 -0
  14. package/dist/{chunk-AKOD52HS.js → chunk-CQZ3DNQY.js} +4 -3
  15. package/dist/{chunk-I2KLQ2HA.js → chunk-DZTG5IAC.js} +7 -1
  16. package/dist/{chunk-JCGD4GM6.js → chunk-GRDLB6LM.js} +1 -0
  17. package/dist/{chunk-JKTPRYGV.js → chunk-HQGF4ATG.js} +9 -55
  18. package/dist/{chunk-SKXXT3E2.js → chunk-HYNYEBHM.js} +4 -4
  19. package/dist/{chunk-6EFVZV6X.js → chunk-JKSUN5GN.js} +718 -64
  20. package/dist/{chunk-LRZFLK2F.js → chunk-L2NVFLXU.js} +3 -3
  21. package/dist/{chunk-6WXDE5LZ.js → chunk-L3BVJWML.js} +1 -1
  22. package/dist/{chunk-3MDNBHVB.js → chunk-MVFCLZSK.js} +690 -221
  23. package/dist/{chunk-HYLERWRO.js → chunk-ND42LPY4.js} +6 -6
  24. package/dist/{chunk-CLUP5H3C.js → chunk-O2QOPJI5.js} +360 -126
  25. package/dist/{chunk-X2SUMO3P.js → chunk-P55BJZZW.js} +2 -1
  26. package/dist/{chunk-4FZYEEPK.js → chunk-Q6OYNEGR.js} +5 -5
  27. package/dist/{chunk-4SY6BTVZ.js → chunk-QDEETKYT.js} +4 -1
  28. package/dist/{chunk-IKQ42WHU.js → chunk-QHEWXU7I.js} +1 -1
  29. package/dist/chunk-R2XR4FCV.js +48 -0
  30. package/dist/chunk-R66W5UDG.js +26 -0
  31. package/dist/{chunk-3GV5NHSS.js → chunk-SHQXMW4F.js} +39 -211
  32. package/dist/{chunk-A7B7HLDF.js → chunk-T3IPHEYJ.js} +1889 -301
  33. package/dist/{chunk-7E3FUTND.js → chunk-TOIXUWR6.js} +1 -1
  34. package/dist/{chunk-NITGGYH2.js → chunk-TVRQ6AQI.js} +1 -1
  35. package/dist/{chunk-CN2HC4D4.js → chunk-UFTM5SZZ.js} +2 -2
  36. package/dist/{chunk-KVJ3LFH2.js → chunk-VNFR57DF.js} +4 -24
  37. package/dist/{chunk-P5WYW2GI.js → chunk-Y4FWCG7Y.js} +150 -305
  38. package/dist/components/chat/index.js +1 -1
  39. package/dist/components/index.d.ts +205 -11
  40. package/dist/components/index.js +38 -35
  41. package/dist/components/navigation/index.js +1 -1
  42. package/dist/execution/index.d.ts +2 -1
  43. package/dist/execution/index.js +1 -1
  44. package/dist/features/auth/index.d.ts +121 -0
  45. package/dist/features/auth/index.js +1 -1
  46. package/dist/features/clients/index.css +611 -0
  47. package/dist/features/clients/index.d.ts +86 -0
  48. package/dist/features/clients/index.js +719 -0
  49. package/dist/features/crm/index.d.ts +148 -2
  50. package/dist/features/crm/index.js +18 -16
  51. package/dist/features/dashboard/index.d.ts +36 -1
  52. package/dist/features/dashboard/index.js +14 -14
  53. package/dist/features/delivery/index.d.ts +121 -0
  54. package/dist/features/delivery/index.js +18 -16
  55. package/dist/features/knowledge/index.js +43 -20
  56. package/dist/features/lead-gen/index.d.ts +17 -11
  57. package/dist/features/lead-gen/index.js +19 -17
  58. package/dist/features/monitoring/index.js +17 -16
  59. package/dist/features/monitoring/requests/index.js +14 -13
  60. package/dist/features/operations/index.d.ts +38 -2
  61. package/dist/features/operations/index.js +22 -21
  62. package/dist/features/seo/index.js +1 -1
  63. package/dist/features/settings/index.d.ts +121 -0
  64. package/dist/features/settings/index.js +16 -15
  65. package/dist/graph/index.js +1 -1
  66. package/dist/hooks/delivery/index.d.ts +140 -0
  67. package/dist/hooks/delivery/index.js +3 -3
  68. package/dist/hooks/index.d.ts +583 -19
  69. package/dist/hooks/index.js +12 -12
  70. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +82 -1
  71. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -1
  72. package/dist/hooks/published.d.ts +583 -19
  73. package/dist/hooks/published.js +12 -12
  74. package/dist/index.d.ts +680 -21
  75. package/dist/index.js +13 -13
  76. package/dist/initialization/index.d.ts +121 -0
  77. package/dist/initialization/index.js +1 -1
  78. package/dist/knowledge/index.d.ts +97 -1
  79. package/dist/knowledge/index.js +1692 -1039
  80. package/dist/layout/index.d.ts +6 -0
  81. package/dist/layout/index.js +4 -4
  82. package/dist/organization/index.js +1 -1
  83. package/dist/profile/index.d.ts +121 -0
  84. package/dist/profile/index.js +1 -1
  85. package/dist/provider/ElevasisServiceContext.js +1 -1
  86. package/dist/provider/index.d.ts +218 -2
  87. package/dist/provider/index.js +10 -10
  88. package/dist/provider/published.d.ts +218 -2
  89. package/dist/provider/published.js +7 -7
  90. package/dist/router/context.js +1 -1
  91. package/dist/router/index.js +1 -1
  92. package/dist/sse/index.js +1 -1
  93. package/dist/supabase/index.d.ts +232 -0
  94. package/dist/supabase/index.js +1 -1
  95. package/dist/test-utils/index.js +3 -3
  96. package/dist/test-utils/setup-integration.js +1 -1
  97. package/dist/test-utils/setup.js +2 -2
  98. package/dist/theme/index.js +4 -4
  99. package/dist/theme/presets/index.js +2 -2
  100. package/dist/typeform/index.js +1 -1
  101. package/dist/typeform/schemas.js +1 -1
  102. package/dist/types/index.d.ts +204 -1
  103. package/dist/utils/index.d.ts +36 -1
  104. package/dist/utils/index.js +2 -2
  105. package/dist/vite/index.js +3 -3
  106. package/dist/vite-plugin-knowledge/index.js +2 -2
  107. package/dist/zustand/index.js +1 -1
  108. package/package.json +13 -4
  109. /package/dist/{chunk-HXZQWMKE.js → chunk-XQHZBA65.js} +0 -0
@@ -0,0 +1,48 @@
1
+ // src/features/delivery/_shared.ts
2
+ var projectStatusColors = {
3
+ active: "blue",
4
+ on_track: "green",
5
+ at_risk: "yellow",
6
+ blocked: "red",
7
+ completed: "teal",
8
+ paused: "gray"
9
+ };
10
+ var milestoneStatusColors = {
11
+ upcoming: "gray",
12
+ in_progress: "blue",
13
+ completed: "green",
14
+ overdue: "red",
15
+ blocked: "orange"
16
+ };
17
+ var taskStatusColors = {
18
+ pending: "gray",
19
+ planned: "gray",
20
+ in_progress: "blue",
21
+ submitted: "yellow",
22
+ approved: "green",
23
+ rejected: "red",
24
+ revision_requested: "orange"
25
+ };
26
+ var taskTypeColors = {
27
+ documentation: "blue",
28
+ code: "violet",
29
+ report: "cyan",
30
+ design: "pink",
31
+ other: "gray"
32
+ };
33
+ var noteTypeColors = {
34
+ call_note: "blue",
35
+ status_update: "green",
36
+ issue: "yellow",
37
+ blocker: "red",
38
+ agent_learning: "grape"
39
+ };
40
+ function formatStatusLabel(status) {
41
+ return status.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
42
+ }
43
+ function calculateProgress(completed, total) {
44
+ if (total === 0) return 0;
45
+ return Math.round(completed / total * 100);
46
+ }
47
+
48
+ export { calculateProgress, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
@@ -0,0 +1,26 @@
1
+ import { Modal } from '@mantine/core';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/components/modal/CustomModal.tsx
5
+ var FULL_SIZE = "80%";
6
+ var CustomModal = ({ children, opened, onClose, loading, style, size }) => {
7
+ const canClose = loading === true ? false : true;
8
+ const resolvedSize = size === "full" ? FULL_SIZE : size;
9
+ return /* @__PURE__ */ jsx(
10
+ Modal,
11
+ {
12
+ opened,
13
+ onClose,
14
+ padding: "xs",
15
+ withCloseButton: false,
16
+ closeOnClickOutside: canClose,
17
+ closeOnEscape: canClose,
18
+ centered: true,
19
+ style,
20
+ size: resolvedSize,
21
+ children
22
+ }
23
+ );
24
+ };
25
+
26
+ export { CustomModal };
@@ -1,67 +1,36 @@
1
- import { DEFAULT_ORGANIZATION_MODEL_PROSPECTING, PROSPECTING_STEPS } from './chunk-NITGGYH2.js';
1
+ import { SalesSidebar, LeadGenSidebarMiddle } from './chunk-7KC4P3AU.js';
2
+ import { DEFAULT_ORGANIZATION_MODEL_PROSPECTING, PROSPECTING_STEPS } from './chunk-TVRQ6AQI.js';
2
3
  import { sanitizeInput } from './chunk-3MEXPLWT.js';
4
+ import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
3
5
  import { PageContainer } from './chunk-BZZCNLT6.js';
4
6
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
5
- import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
6
- import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
7
7
  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';
8
+ import { CustomModal } from './chunk-R66W5UDG.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, useExecutionSSE, useListMembers, useListMember, useTransitionListMember, useDeriveActions, useArtifacts } from './chunk-JKSUN5GN.js';
10
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-7HMCB26R.js';
11
+ import { PageTitleCaption, CenteredErrorState, StatCard, CardHeader, EmptyState, JsonViewer } from './chunk-L3BVJWML.js';
12
+ import { useListActions, LEAD_GEN_STAGE_CATALOG, LEAD_GEN_PIPELINE_DEFINITIONS, findPipeline } from './chunk-CQZ3DNQY.js';
13
13
  import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
14
- import { useRouterContext } from './chunk-Q7DJKLEN.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
36
  var PROSPECTING_BUILD_TEMPLATE_OPTIONS = DEFAULT_ORGANIZATION_MODEL_PROSPECTING.buildTemplates.map(
@@ -401,6 +370,15 @@ function StepConfigForm({
401
370
  )) })
402
371
  ] });
403
372
  }
373
+
374
+ // src/features/lead-gen/manifest.ts
375
+ var leadGenManifest = {
376
+ key: "lead-gen",
377
+ featureId: "sales.lead-gen",
378
+ capabilityIds: ["leadgen.lists.manage"],
379
+ icon: IconTarget,
380
+ sidebar: SalesSidebar
381
+ };
404
382
  var LEAD_GEN_ROUTE_LINKS = [
405
383
  { label: "Overview", to: "/lead-gen" },
406
384
  { label: "Lists", to: "/lead-gen/lists" },
@@ -471,133 +449,6 @@ function getEnrichmentStatus(enrichmentData) {
471
449
  if (website === "failed" || linkedin === "failed") return "failed";
472
450
  return "pending";
473
451
  }
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
452
  function useDeleteLists() {
602
453
  const { apiRequest, workOSOrganizationId } = useElevasisServices();
603
454
  const queryClient = useQueryClient();
@@ -3636,7 +3487,7 @@ function StepRecordsPanel({
3636
3487
  const queryClient = useQueryClient();
3637
3488
  const [page, setPage] = useState(1);
3638
3489
  const [approvalByCompanyId, setApprovalByCompanyId] = useState({});
3639
- const [selectedRecord, setSelectedRecord] = useState(null);
3490
+ const navigate = useNavigate();
3640
3491
  const recordsStageKey = step.recordSourceStageKey ?? step.recordsStageKey ?? step.stageKey;
3641
3492
  const recordsEntity = step.recordEntity ?? step.primaryEntity;
3642
3493
  const columns = step.recordColumns?.[recordsEntity] ?? [];
@@ -3651,14 +3502,9 @@ function StepRecordsPanel({
3651
3502
  workflowId: exportWorkflowId,
3652
3503
  listId: list.id
3653
3504
  });
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
3505
  useEffect(() => {
3659
3506
  setPage(1);
3660
3507
  setApprovalByCompanyId({});
3661
- setSelectedRecord(null);
3662
3508
  }, [step.id]);
3663
3509
  const rows = recordsQuery.data?.data ?? [];
3664
3510
  const total = recordsQuery.data?.total ?? 0;
@@ -3677,10 +3523,10 @@ function StepRecordsPanel({
3677
3523
  };
3678
3524
  const openRecordDetail = (row) => {
3679
3525
  if (row.entity === "company") {
3680
- setSelectedRecord({ entity: "company", id: row.companyId });
3526
+ void navigate({ to: "/crm/companies/$companyId", params: { companyId: row.companyId } });
3681
3527
  return;
3682
3528
  }
3683
- setSelectedRecord({ entity: "contact", id: row.contactId });
3529
+ void navigate({ to: "/crm/contacts/$contactId", params: { contactId: row.contactId } });
3684
3530
  };
3685
3531
  const exportApproved = async () => {
3686
3532
  try {
@@ -3704,7 +3550,6 @@ function StepRecordsPanel({
3704
3550
  showApiErrorNotification(error);
3705
3551
  }
3706
3552
  };
3707
- const selectedRecordIsLoading = selectedRecord?.entity === "company" ? selectedCompanyQuery.isLoading : selectedRecord?.entity === "contact" ? selectedContactQuery.isLoading : false;
3708
3553
  if (!columns.length) {
3709
3554
  return /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No record columns are configured for this step." });
3710
3555
  }
@@ -3803,30 +3648,7 @@ function StepRecordsPanel({
3803
3648
  }
3804
3649
  )
3805
3650
  ] }) : 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
- )
3651
+ ] })
3830
3652
  ] });
3831
3653
  }
3832
3654
  function BuildTab({
@@ -4551,11 +4373,15 @@ function LeadGenCompaniesPage() {
4551
4373
  const [segmentFilter, setSegmentFilter] = useState(null);
4552
4374
  const [categoryFilter, setCategoryFilter] = useState(null);
4553
4375
  const [statusFilter, setStatusFilter] = useState(null);
4554
- const [selectedCompany, setSelectedCompany] = useState(null);
4555
4376
  const [showBatchDelete, setShowBatchDelete] = useState(false);
4377
+ const navigate = useNavigate();
4556
4378
  const pagination = usePaginationState(PAGE_SIZE_DEFAULT2, [companySearch, segmentFilter, categoryFilter, statusFilter]);
4557
4379
  const { data: companyFacets } = useCompanyFacets();
4558
- const { data: pagedCompanies, isLoading: pagedCompaniesLoading, error: pagedCompaniesError } = useCompanies({
4380
+ const {
4381
+ data: pagedCompanies,
4382
+ isLoading: pagedCompaniesLoading,
4383
+ error: pagedCompaniesError
4384
+ } = useCompanies({
4559
4385
  search: companySearch || void 0,
4560
4386
  segment: segmentFilter || void 0,
4561
4387
  category: categoryFilter || void 0,
@@ -4671,7 +4497,7 @@ function LeadGenCompaniesPage() {
4671
4497
  Table.Tr,
4672
4498
  {
4673
4499
  style: { cursor: "pointer" },
4674
- onClick: () => setSelectedCompany(company),
4500
+ onClick: () => navigate({ to: "/crm/companies/$companyId", params: { companyId: company.id } }),
4675
4501
  children: [
4676
4502
  /* @__PURE__ */ jsx(
4677
4503
  Table.Td,
@@ -4713,7 +4539,6 @@ function LeadGenCompaniesPage() {
4713
4539
  }
4714
4540
  ) }) : null
4715
4541
  ] }) }),
4716
- /* @__PURE__ */ jsx(CompanyDetailModal, { company: selectedCompany, onClose: () => setSelectedCompany(null) }),
4717
4542
  /* @__PURE__ */ jsx(CustomModal, { opened: showBatchDelete, onClose: () => setShowBatchDelete(false), size: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
4718
4543
  /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
4719
4544
  /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20, color: "var(--mantine-color-red-6)" }),
@@ -4736,11 +4561,15 @@ function LeadGenContactsPage() {
4736
4561
  const [contactSearch, setContactSearch] = useState("");
4737
4562
  const [statusFilter, setStatusFilter] = useState(null);
4738
4563
  const [listFilter, setListFilter] = useState(null);
4739
- const [selectedContact, setSelectedContact] = useState(null);
4740
4564
  const [showBatchDelete, setShowBatchDelete] = useState(false);
4565
+ const navigate = useNavigate();
4741
4566
  const pagination = usePaginationState(PAGE_SIZE_DEFAULT3, [contactSearch, statusFilter, listFilter]);
4742
4567
  const { data: lists } = useLists();
4743
- const { data: contacts, isLoading: contactsLoading, error: contactsError } = useContacts({
4568
+ const {
4569
+ data: contacts,
4570
+ isLoading: contactsLoading,
4571
+ error: contactsError
4572
+ } = useContacts({
4744
4573
  search: contactSearch || void 0,
4745
4574
  contactStatus: statusFilter || void 0,
4746
4575
  listId: listFilter || void 0,
@@ -4843,7 +4672,7 @@ function LeadGenContactsPage() {
4843
4672
  Table.Tr,
4844
4673
  {
4845
4674
  style: { cursor: "pointer" },
4846
- onClick: () => setSelectedContact(contact),
4675
+ onClick: () => navigate({ to: "/crm/contacts/$contactId", params: { contactId: contact.id } }),
4847
4676
  children: [
4848
4677
  /* @__PURE__ */ jsx(
4849
4678
  Table.Td,
@@ -4884,7 +4713,6 @@ function LeadGenContactsPage() {
4884
4713
  }
4885
4714
  ) }) : null
4886
4715
  ] }) }),
4887
- /* @__PURE__ */ jsx(ContactDetailModal, { contact: selectedContact, onClose: () => setSelectedContact(null) }),
4888
4716
  /* @__PURE__ */ jsx(CustomModal, { opened: showBatchDelete, onClose: () => setShowBatchDelete(false), size: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
4889
4717
  /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
4890
4718
  /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20, color: "var(--mantine-color-red-6)" }),
@@ -4903,4 +4731,4 @@ function LeadGenContactsPage() {
4903
4731
  ] }) });
4904
4732
  }
4905
4733
 
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 };
4734
+ 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 };