@elevasis/ui 2.31.0 → 2.33.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 (169) hide show
  1. package/dist/{CoreAuthKitInner-KSEGSB67.js → CoreAuthKitInner-QC62UHTZ.js} +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/app/index.css +38 -0
  4. package/dist/app/index.d.ts +69 -9
  5. package/dist/app/index.js +7 -6
  6. package/dist/auth/context.js +1 -1
  7. package/dist/auth/index.js +1 -1
  8. package/dist/charts/index.js +5 -6
  9. package/dist/{chunk-JKSUN5GN.js → chunk-2GMF5IRF.js} +81 -746
  10. package/dist/{chunk-XQHZBA65.js → chunk-2RJMVWFJ.js} +1 -6
  11. package/dist/{chunk-CW3UNAF2.js → chunk-4DYOXEH6.js} +410 -5
  12. package/dist/{chunk-HQGF4ATG.js → chunk-52NLZN6Z.js} +118 -141
  13. package/dist/chunk-AHCKOU2M.js +13 -0
  14. package/dist/chunk-CLDCYJQT.js +1 -0
  15. package/dist/chunk-DWXDNT7P.js +145 -0
  16. package/dist/chunk-E4T2N7P7.js +124 -0
  17. package/dist/{chunk-HYNYEBHM.js → chunk-E7C4XEWH.js} +3 -3
  18. package/dist/{chunk-L3BVJWML.js → chunk-EPTHX4VZ.js} +1 -1
  19. package/dist/{chunk-QDEETKYT.js → chunk-FFPHJBJC.js} +9 -9
  20. package/dist/chunk-GNRMB6DC.js +5126 -0
  21. package/dist/{chunk-DZTG5IAC.js → chunk-I2KLQ2HA.js} +1 -7
  22. package/dist/{chunk-Q6OYNEGR.js → chunk-IUKFNASA.js} +5 -6
  23. package/dist/{chunk-QHEWXU7I.js → chunk-JFL3GRD4.js} +1 -1
  24. package/dist/{chunk-T3IPHEYJ.js → chunk-JHT5JIJ3.js} +4410 -566
  25. package/dist/{chunk-L2NVFLXU.js → chunk-MHLZ4F4N.js} +4 -4
  26. package/dist/{chunk-XQQEKWTL.js → chunk-N55DVMAG.js} +6 -2
  27. package/dist/{chunk-TOIXUWR6.js → chunk-ND5TDV2J.js} +1 -1
  28. package/dist/{chunk-5LJAEZMA.js → chunk-NOIRGGW2.js} +5 -6
  29. package/dist/{chunk-7KC4P3AU.js → chunk-QNOVUCSV.js} +2 -12
  30. package/dist/{chunk-3BAPR3KA.js → chunk-RQA2EVN3.js} +5 -15
  31. package/dist/{chunk-ND42LPY4.js → chunk-TKF5S4XP.js} +6 -6
  32. package/dist/{chunk-DWK2QIAK.js → chunk-TYRUKGGD.js} +1 -1
  33. package/dist/{chunk-Y4FWCG7Y.js → chunk-UVFOURXR.js} +8 -7
  34. package/dist/chunk-UW7IV2Y3.js +447 -0
  35. package/dist/{chunk-P55BJZZW.js → chunk-V6SZ4ECN.js} +20 -5
  36. package/dist/{chunk-6YT4IKJ7.js → chunk-VNAZTCHA.js} +15 -0
  37. package/dist/chunk-XG57WXOL.js +85 -0
  38. package/dist/{chunk-SHQXMW4F.js → chunk-XOFSMJLF.js} +46 -28
  39. package/dist/{chunk-7HMCB26R.js → chunk-XZGSCABI.js} +1 -1
  40. package/dist/chunk-YAQ25UNM.js +2126 -0
  41. package/dist/chunk-ZGTDKH3P.js +467 -0
  42. package/dist/components/chat/index.js +1 -1
  43. package/dist/components/index.css +38 -0
  44. package/dist/components/index.d.ts +262 -51
  45. package/dist/components/index.js +37 -39
  46. package/dist/components/navigation/index.css +38 -0
  47. package/dist/components/navigation/index.js +5 -3
  48. package/dist/execution/index.d.ts +11 -2
  49. package/dist/execution/index.js +1 -1
  50. package/dist/features/auth/index.css +38 -0
  51. package/dist/features/auth/index.d.ts +91 -14
  52. package/dist/features/auth/index.js +42 -10
  53. package/dist/features/clients/index.css +38 -0
  54. package/dist/features/clients/index.d.ts +1 -1
  55. package/dist/features/clients/index.js +17 -15
  56. package/dist/features/crm/index.css +38 -0
  57. package/dist/features/crm/index.d.ts +80 -18
  58. package/dist/features/crm/index.js +17 -15
  59. package/dist/features/dashboard/index.css +38 -0
  60. package/dist/features/dashboard/index.d.ts +174 -25
  61. package/dist/features/dashboard/index.js +17 -16
  62. package/dist/features/delivery/index.css +38 -0
  63. package/dist/features/delivery/index.d.ts +80 -18
  64. package/dist/features/delivery/index.js +16 -15
  65. package/dist/features/knowledge/index.css +38 -0
  66. package/dist/features/knowledge/index.d.ts +20 -18
  67. package/dist/features/knowledge/index.js +114 -609
  68. package/dist/features/lead-gen/index.css +38 -0
  69. package/dist/features/lead-gen/index.d.ts +45 -43
  70. package/dist/features/lead-gen/index.js +17 -16
  71. package/dist/features/monitoring/index.css +38 -0
  72. package/dist/features/monitoring/index.d.ts +20 -18
  73. package/dist/features/monitoring/index.js +18 -17
  74. package/dist/features/monitoring/requests/index.css +38 -0
  75. package/dist/features/monitoring/requests/index.d.ts +23 -21
  76. package/dist/features/monitoring/requests/index.js +16 -14
  77. package/dist/features/operations/index.css +38 -0
  78. package/dist/features/operations/index.d.ts +1299 -66
  79. package/dist/features/operations/index.js +22 -24
  80. package/dist/features/seo/index.d.ts +20 -18
  81. package/dist/features/seo/index.js +2 -2
  82. package/dist/features/settings/index.css +38 -0
  83. package/dist/features/settings/index.d.ts +80 -18
  84. package/dist/features/settings/index.js +17 -15
  85. package/dist/graph/index.js +1 -1
  86. package/dist/hooks/delivery/index.css +38 -0
  87. package/dist/hooks/delivery/index.d.ts +60 -0
  88. package/dist/hooks/delivery/index.js +3 -3
  89. package/dist/hooks/index.css +38 -0
  90. package/dist/hooks/index.d.ts +492 -89
  91. package/dist/hooks/index.js +15 -13
  92. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +332 -33
  93. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -1
  94. package/dist/hooks/published.css +38 -0
  95. package/dist/hooks/published.d.ts +492 -89
  96. package/dist/hooks/published.js +15 -13
  97. package/dist/index.css +38 -0
  98. package/dist/index.d.ts +1353 -1349
  99. package/dist/index.js +16 -14
  100. package/dist/initialization/index.d.ts +60 -0
  101. package/dist/initialization/index.js +1 -1
  102. package/dist/knowledge/index.d.ts +1217 -1292
  103. package/dist/knowledge/index.js +6538 -2198
  104. package/dist/knowledge-search-index-P7PR626V.js +1514 -0
  105. package/dist/layout/index.js +3 -4
  106. package/dist/organization/index.css +38 -0
  107. package/dist/organization/index.js +1 -1
  108. package/dist/profile/index.d.ts +60 -0
  109. package/dist/profile/index.js +1 -1
  110. package/dist/provider/ElevasisServiceContext.js +1 -1
  111. package/dist/provider/index.css +38 -0
  112. package/dist/provider/index.d.ts +1068 -1246
  113. package/dist/provider/index.js +12 -10
  114. package/dist/provider/published.css +38 -0
  115. package/dist/provider/published.d.ts +1065 -1243
  116. package/dist/provider/published.js +9 -7
  117. package/dist/router/context.js +1 -1
  118. package/dist/router/index.js +1 -1
  119. package/dist/sse/index.js +1 -1
  120. package/dist/supabase/index.d.ts +117 -0
  121. package/dist/supabase/index.js +1 -1
  122. package/dist/test-utils/index.d.ts +16 -9
  123. package/dist/test-utils/index.js +40 -33
  124. package/dist/test-utils/setup-integration.js +1 -1
  125. package/dist/test-utils/setup.js +1 -1
  126. package/dist/theme/index.js +3 -3
  127. package/dist/theme/presets/index.js +1 -1
  128. package/dist/typeform/index.js +1 -1
  129. package/dist/typeform/schemas.js +1 -1
  130. package/dist/types/index.d.ts +394 -35
  131. package/dist/utils/index.d.ts +174 -25
  132. package/dist/utils/index.js +2 -2
  133. package/dist/vite/index.js +1 -1
  134. package/dist/vite-plugin-knowledge/index.js +1 -1
  135. package/dist/zustand/index.js +1 -1
  136. package/package.json +10 -9
  137. package/src/README.md +29 -29
  138. package/src/api/README.md +18 -18
  139. package/src/app/README.md +24 -24
  140. package/src/auth/README.md +18 -18
  141. package/src/components/README.md +24 -24
  142. package/src/execution/README.md +16 -16
  143. package/src/features/README.md +28 -28
  144. package/src/graph/README.md +16 -16
  145. package/src/hooks/README.md +23 -23
  146. package/src/initialization/README.md +19 -19
  147. package/src/knowledge/README.md +31 -31
  148. package/src/organization/README.md +18 -18
  149. package/src/profile/README.md +19 -19
  150. package/src/provider/README.md +32 -32
  151. package/src/router/README.md +18 -18
  152. package/src/sse/README.md +13 -13
  153. package/src/test-utils/README.md +7 -7
  154. package/src/theme/README.md +23 -23
  155. package/src/theme/presets/README.md +19 -19
  156. package/src/types/README.md +16 -16
  157. package/src/utils/README.md +18 -18
  158. package/src/zustand/README.md +18 -18
  159. package/dist/chunk-542WPQU2.js +0 -413
  160. package/dist/chunk-6IXOKUBC.js +0 -347
  161. package/dist/chunk-CQZ3DNQY.js +0 -740
  162. package/dist/chunk-ECNNI3NT.js +0 -6
  163. package/dist/chunk-GRDLB6LM.js +0 -160
  164. package/dist/chunk-JDNEWB5F.js +0 -10
  165. package/dist/chunk-MVFCLZSK.js +0 -4337
  166. package/dist/chunk-O2QOPJI5.js +0 -2235
  167. package/dist/chunk-OAVTMITG.js +0 -13
  168. package/dist/chunk-TVRQ6AQI.js +0 -476
  169. package/dist/chunk-WF227UBV.js +0 -48
@@ -4,7 +4,7 @@ import { useRouterContext } from './chunk-Q7DJKLEN.js';
4
4
  import { useAppearance } from './chunk-E565XMTQ.js';
5
5
  import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding, sidebarGroupChevronSize, sidebarIconInnerSize } from './chunk-DT3QYZVU.js';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { createContext, memo, useEffect, createElement, useContext, useRef, useLayoutEffect, useState } from 'react';
7
+ import { createContext, memo, useEffect, useRef, createElement, useContext, useLayoutEffect, useState } from 'react';
8
8
  import { Collapse, HoverCard, Stack, Group, Text, UnstyledButton, Tooltip, ScrollArea, Menu, Avatar, Box, useMantineColorScheme, Switch, Code } from '@mantine/core';
9
9
  import { IconLayoutSidebarLeftExpand, IconLayoutSidebarLeftCollapse, IconUser, IconLogout, IconChevronDown, IconChevronRight, IconMoonStars, IconSun } from '@tabler/icons-react';
10
10
 
@@ -378,11 +378,18 @@ var isPathActive = (linkPath, currentPath) => {
378
378
  var isOverviewLink = (label, link) => {
379
379
  return label === "Overview" && (link === "/admin" || link === "/operations" || link === "/monitoring" || link === "/settings" || link === "/execution-engine" || link === "/acquisition");
380
380
  };
381
- var SubLinkItem = ({ linkItem, currentPath }) => {
382
- const { Link } = useRouterContext();
381
+ var isLinkItemActive = (linkItem, currentPath) => {
383
382
  const isKnowledgeBaseActive = linkItem.link === "/knowledge" && currentPath.startsWith("/knowledge") && !currentPath.startsWith("/knowledge/command-view");
384
383
  const matchesExtraPath = linkItem.activeMatchPaths?.some((path) => isPathActive(path, currentPath)) ?? false;
385
- const isActive = isKnowledgeBaseActive ? true : linkItem.exact || isOverviewLink(linkItem.label, linkItem.link) ? currentPath === linkItem.link || matchesExtraPath : isPathActive(linkItem.link, currentPath) || matchesExtraPath;
384
+ if (isKnowledgeBaseActive) return true;
385
+ if (linkItem.exact || isOverviewLink(linkItem.label, linkItem.link)) {
386
+ return currentPath === linkItem.link || matchesExtraPath;
387
+ }
388
+ return isPathActive(linkItem.link, currentPath) || matchesExtraPath;
389
+ };
390
+ var SubLinkItem = ({ linkItem, currentPath }) => {
391
+ const { Link } = useRouterContext();
392
+ const isActive = isLinkItemActive(linkItem, currentPath);
386
393
  const activeColor2 = "var(--color-primary)";
387
394
  const activeColorBg = "color-mix(in srgb, var(--color-primary) 10%, transparent)";
388
395
  const defaultColor = "var(--color-text-subtle)";
@@ -565,10 +572,18 @@ var LinksGroup = memo(function LinksGroup2({
565
572
  onToggle();
566
573
  }
567
574
  }, [isCollapsed, opened, onToggle]);
568
- const hasActiveChild = hasLinks && links.some((item) => isPathActive(item.link, currentPath));
575
+ const hasActiveChild = hasLinks && links.some((item) => isLinkItemActive(item, currentPath));
569
576
  const isParentActive = !hasLinks && (link === "/" ? currentPath === "/" : isPathActive(link || "", currentPath));
570
577
  const isIconTextActive = isParentActive || hasActiveChild;
571
578
  const isBackgroundActive = isParentActive || hasActiveChild && !opened;
579
+ const prevPathRef = useRef(null);
580
+ useEffect(() => {
581
+ const pathChanged = prevPathRef.current !== currentPath;
582
+ prevPathRef.current = currentPath;
583
+ if (pathChanged && !isCollapsed && hasActiveChild && !opened && onToggle) {
584
+ onToggle();
585
+ }
586
+ }, [currentPath, hasActiveChild, isCollapsed, opened, onToggle]);
572
587
  const handleMainClick = () => {
573
588
  if (hasLinks && !isCollapsed) {
574
589
  onToggle?.();
@@ -28,6 +28,21 @@ var observabilityKeys = {
28
28
  businessImpact: (organizationId, timeRange) => [...observabilityKeys.all, "business-impact", organizationId, timeRange],
29
29
  // Resources health batch
30
30
  resourcesHealth: (organizationId, resources, startDate, endDate, granularity) => [...observabilityKeys.all, "resources-health", organizationId, resources, startDate, endDate, granularity],
31
+ // System-scoped health from direct/descendant resource descriptors
32
+ systemHealth: (organizationId, systemPath, timeRange, includeDescendants, descendantMode, resourceSet, startDate, endDate, directResources, descendantResources) => [
33
+ ...observabilityKeys.all,
34
+ "system-health",
35
+ organizationId,
36
+ systemPath,
37
+ timeRange,
38
+ includeDescendants,
39
+ descendantMode,
40
+ resourceSet,
41
+ startDate,
42
+ endDate,
43
+ directResources,
44
+ descendantResources
45
+ ],
31
46
  // Unresolved errors dashboard teaser
32
47
  unresolvedErrors: (organizationId, startDate, endDate) => [...observabilityKeys.all, "unresolved-errors", organizationId, startDate, endDate],
33
48
  // Recent executions grouped by resource (dashboard widget)
@@ -0,0 +1,85 @@
1
+ import { useOptionalElevasisSystems } from './chunk-ZGTDKH3P.js';
2
+ import { useRouterContext } from './chunk-Q7DJKLEN.js';
3
+ import { useMemo } from 'react';
4
+
5
+ var useBreadcrumbs = (options = {}) => {
6
+ const { currentPath } = useRouterContext();
7
+ const systemContext = useOptionalElevasisSystems();
8
+ const { labelsByPath = {} } = options;
9
+ return useMemo(() => {
10
+ const shellModel = systemContext?.shellModel;
11
+ const overriddenLabel = labelsByPath[currentPath];
12
+ if (overriddenLabel) {
13
+ return [{ label: overriddenLabel, isActive: true }];
14
+ }
15
+ if (shellModel) {
16
+ const matchedNode = shellModel.findByPath(currentPath);
17
+ if (matchedNode) {
18
+ return shellModel.ancestorsOf(matchedNode.id).map((node, index, items) => ({
19
+ label: labelsByPath[node.path ?? ""] ?? node.label,
20
+ path: index === items.length - 1 ? void 0 : node.path,
21
+ isActive: index === items.length - 1
22
+ }));
23
+ }
24
+ }
25
+ const segments = currentPath.split("/").filter(Boolean);
26
+ if (segments.length === 0) {
27
+ return [{ label: "Dashboard", isActive: true }];
28
+ }
29
+ const breadcrumbs = [{ label: "Dashboard", path: "/" }];
30
+ let currentSegmentPath = "";
31
+ for (let i = 0; i < segments.length; i++) {
32
+ currentSegmentPath += `/${segments[i]}`;
33
+ const isLast = i === segments.length - 1;
34
+ const label = labelsByPath[currentSegmentPath] ?? formatSegmentLabel(segments[i]);
35
+ breadcrumbs.push({
36
+ label,
37
+ path: isLast ? void 0 : currentSegmentPath,
38
+ isActive: isLast
39
+ });
40
+ }
41
+ return breadcrumbs;
42
+ }, [currentPath, systemContext, labelsByPath]);
43
+ };
44
+ function formatSegmentLabel(segment) {
45
+ const decodedSegment = safeDecodeURIComponent(segment);
46
+ const routeLabel = formatRouteIdLabel(decodedSegment);
47
+ if (routeLabel) return routeLabel;
48
+ return titleCaseSegment(decodedSegment);
49
+ }
50
+ function safeDecodeURIComponent(value) {
51
+ try {
52
+ return decodeURIComponent(value);
53
+ } catch {
54
+ return value;
55
+ }
56
+ }
57
+ function formatRouteIdLabel(segment) {
58
+ if (segment.startsWith("group:")) {
59
+ const groupKey = segment.slice("group:".length);
60
+ return groupKey === "graph" ? "Ontology" : titleCaseSegment(groupKey);
61
+ }
62
+ if (segment.startsWith("domain:")) {
63
+ return titleCaseSegment(segment.slice("domain:".length));
64
+ }
65
+ if (segment.startsWith("item:")) {
66
+ const rest = segment.slice("item:".length);
67
+ const separatorIndex = rest.indexOf(":");
68
+ const itemId = separatorIndex === -1 ? rest : rest.slice(separatorIndex + 1);
69
+ return formatOntologyOrIdLabel(itemId);
70
+ }
71
+ if (segment.startsWith("ontology:")) {
72
+ return formatOntologyOrIdLabel(segment);
73
+ }
74
+ return void 0;
75
+ }
76
+ function formatOntologyOrIdLabel(value) {
77
+ const localId = value.includes("/") ? value.slice(value.lastIndexOf("/") + 1) : value;
78
+ const suffix = localId.includes(":") ? localId.slice(localId.lastIndexOf(":") + 1) : localId;
79
+ return titleCaseSegment(suffix);
80
+ }
81
+ function titleCaseSegment(segment) {
82
+ return segment.split("-").flatMap((part) => part.split("_")).flatMap((part) => part.split(".")).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
83
+ }
84
+
85
+ export { useBreadcrumbs };
@@ -1,16 +1,16 @@
1
- import { SalesSidebar, LeadGenSidebarMiddle } from './chunk-7KC4P3AU.js';
2
- import { DEFAULT_ORGANIZATION_MODEL_PROSPECTING, PROSPECTING_STEPS } from './chunk-TVRQ6AQI.js';
1
+ import { SalesSidebar, LeadGenSidebarMiddle } from './chunk-QNOVUCSV.js';
3
2
  import { sanitizeInput } from './chunk-3MEXPLWT.js';
4
3
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
5
4
  import { PageContainer } from './chunk-BZZCNLT6.js';
6
5
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
7
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
8
7
  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';
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-2GMF5IRF.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-UW7IV2Y3.js';
13
12
  import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
13
+ import { PROSPECTING_STEPS, LEAD_GEN_STAGE_CATALOG, LEAD_GEN_PIPELINE_DEFINITIONS, findPipeline } from './chunk-GNRMB6DC.js';
14
14
  import { isStepStartedContext, isStepCompletedContext, isStepFailedContext } from './chunk-KRWALB24.js';
15
15
  import { useElevasisServices } from './chunk-KJ3QUBNU.js';
16
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';
@@ -33,16 +33,28 @@ var LeadGenSidebar = ({ children } = {}) => {
33
33
  };
34
34
 
35
35
  // ../core/src/business/acquisition/build-templates.ts
36
- var PROSPECTING_BUILD_TEMPLATE_OPTIONS = DEFAULT_ORGANIZATION_MODEL_PROSPECTING.buildTemplates.map(
37
- ({ id, label, description }) => ({
38
- id,
39
- label,
40
- description
41
- })
42
- );
43
- 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
+ }));
44
56
  function createBuildPlanSnapshotFromTemplateId(templateId) {
45
- const template = DEFAULT_ORGANIZATION_MODEL_PROSPECTING.buildTemplates.find((item) => item.id === templateId);
57
+ const template = BUILD_TEMPLATE_CATALOG.find((item) => item.id === templateId);
46
58
  if (!template) return null;
47
59
  return {
48
60
  templateId: template.id,
@@ -57,7 +69,7 @@ function createBuildPlanSnapshotFromTemplateId(templateId) {
57
69
  recordsStageKey: step.recordsStageKey ?? step.stageKey,
58
70
  recordSourceStageKey: step.recordSourceStageKey ?? step.recordsStageKey ?? step.stageKey,
59
71
  dependencyMode: step.dependencyMode,
60
- capabilityKey: step.capabilityKey,
72
+ actionKey: step.actionKey,
61
73
  defaultBatchSize: step.defaultBatchSize,
62
74
  maxBatchSize: step.maxBatchSize
63
75
  };
@@ -65,12 +77,18 @@ function createBuildPlanSnapshotFromTemplateId(templateId) {
65
77
  if (step.recordEntity) snapshotStep.recordEntity = step.recordEntity;
66
78
  if (step.dependsOn?.length) snapshotStep.dependsOn = [...step.dependsOn];
67
79
  if (step.credentialRequirements?.length) {
68
- snapshotStep.credentialRequirements = step.credentialRequirements.map((requirement) => ({ ...requirement }));
80
+ snapshotStep.credentialRequirements = step.credentialRequirements.map((requirement) => ({
81
+ ...requirement
82
+ }));
69
83
  }
70
84
  if (step.recordColumns) {
71
85
  snapshotStep.recordColumns = {
72
- ...step.recordColumns.company ? { company: step.recordColumns.company.map((column) => ({ ...column })) } : {},
73
- ...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
+ } : {}
74
92
  };
75
93
  }
76
94
  return snapshotStep;
@@ -374,7 +392,7 @@ function StepConfigForm({
374
392
  // src/features/lead-gen/manifest.ts
375
393
  var leadGenManifest = {
376
394
  key: "lead-gen",
377
- featureId: "sales.lead-gen",
395
+ systemId: "sales.lead-gen",
378
396
  capabilityIds: ["leadgen.lists.manage"],
379
397
  icon: IconTarget,
380
398
  sidebar: SalesSidebar
@@ -2543,7 +2561,7 @@ function getEntityTotal(progress, entity) {
2543
2561
  return entity === "company" ? progress.totalCompanies : progress.totalMembers;
2544
2562
  }
2545
2563
  function findActionForStep(actions, step) {
2546
- 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));
2547
2565
  }
2548
2566
  function normalizeBuildPlanStep(step) {
2549
2567
  const fallback = MVP_BUILD_STEPS.find((item) => item.id === step.id || item.stageKey === step.stageKey);
@@ -2559,7 +2577,7 @@ function normalizeBuildPlanStep(step) {
2559
2577
  recordSourceStageKey: step.recordSourceStageKey,
2560
2578
  dependsOn: step.dependsOn,
2561
2579
  dependencyMode: step.dependencyMode,
2562
- capabilityKey: step.capabilityKey,
2580
+ actionKey: step.actionKey,
2563
2581
  defaultBatchSize: step.defaultBatchSize,
2564
2582
  maxBatchSize: step.maxBatchSize,
2565
2583
  recordColumns: step.recordColumns,
@@ -2646,7 +2664,7 @@ function hasApprovedExportRun(executions) {
2646
2664
  });
2647
2665
  }
2648
2666
  function hasCompletedSourcingRun(step, action, executions) {
2649
- 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));
2650
2668
  }
2651
2669
  function deriveBusinessProgress(list, progress, actions = [], executions = []) {
2652
2670
  const byCompanyStage = { ...progress.byCompanyStage };
@@ -2680,7 +2698,7 @@ function getStepRecommendedAction(step, action, kind) {
2680
2698
  return {
2681
2699
  kind,
2682
2700
  label: getStepActionLabel(kind),
2683
- capabilityKey: action.capabilityKey ?? step.capabilityKey,
2701
+ actionKey: action.actionKey ?? step.actionKey,
2684
2702
  defaultSize: step.defaultBatchSize,
2685
2703
  maxSize: step.maxBatchSize
2686
2704
  };
@@ -2898,7 +2916,7 @@ function hasRunInput(run) {
2898
2916
  const input = getRunInput(run);
2899
2917
  return input !== void 0 && input !== null;
2900
2918
  }
2901
- function sanitizeStepInput(value, _capabilityKey) {
2919
+ function sanitizeStepInput(value, _actionKey) {
2902
2920
  return value;
2903
2921
  }
2904
2922
  function getDefaultStepInput(list, action) {
@@ -3509,7 +3527,7 @@ function StepRecordsPanel({
3509
3527
  const rows = recordsQuery.data?.data ?? [];
3510
3528
  const total = recordsQuery.data?.total ?? 0;
3511
3529
  const totalPages = Math.max(1, Math.ceil(total / RECORDS_PAGE_SIZE));
3512
- 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);
3513
3531
  const approvedCompanyIds = Object.entries(approvalByCompanyId).filter(([, status]) => status === "approved").map(([companyId]) => companyId);
3514
3532
  const rejectedCompanyIds = Object.entries(approvalByCompanyId).filter(([, status]) => status === "rejected").map(([companyId]) => companyId);
3515
3533
  const clickupRequirement = getClickUpRequirement(step);
@@ -3673,7 +3691,7 @@ function BuildTab({
3673
3691
  const selectedStep = steps.find((step) => step.id === selectedStepId) ?? currentStep;
3674
3692
  const selectedStepIndex = selectedStep ? steps.findIndex((step) => step.id === selectedStep.id) : -1;
3675
3693
  const selectedActionKind = selectedStep?.nextActionKind ?? "none";
3676
- const selectedCapabilityKey = selectedStep?.action?.capabilityKey ?? selectedStep?.capabilityKey;
3694
+ const selectedCapabilityKey = selectedStep?.action?.actionKey ?? selectedStep?.actionKey;
3677
3695
  const selectedResourceId = selectedStep?.action?.resourceId ?? null;
3678
3696
  const stepSchema = selectedStep?.action?.schema;
3679
3697
  const stepLayout = selectedStep?.action?.layout;
@@ -3928,7 +3946,7 @@ function BuildTab({
3928
3946
  onVerify: handleVerifyCredential
3929
3947
  }
3930
3948
  ),
3931
- selectedStep.capabilityKey === "lead-gen.export.list" || getClickUpRequirement(selectedStep) ? /* @__PURE__ */ jsx(
3949
+ selectedStep.actionKey === "lead-gen.export.list" || getClickUpRequirement(selectedStep) ? /* @__PURE__ */ jsx(
3932
3950
  TextInput,
3933
3951
  {
3934
3952
  label: "ClickUp List ID",
@@ -1,4 +1,4 @@
1
- import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-XQHZBA65.js';
1
+ import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-2RJMVWFJ.js';
2
2
  import { useElevasisServices } from './chunk-KJ3QUBNU.js';
3
3
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
4
4
  import { notifications } from '@mantine/notifications';