@elevasis/ui 2.33.2 → 2.34.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 (73) hide show
  1. package/dist/api/index.d.ts +9 -2
  2. package/dist/api/index.js +1 -1
  3. package/dist/app/index.css +452 -0
  4. package/dist/app/index.d.ts +1250 -3
  5. package/dist/app/index.js +144 -8
  6. package/dist/charts/index.js +2 -3
  7. package/dist/{chunk-VGU4ZFYZ.js → chunk-3AJVNMY5.js} +45 -28
  8. package/dist/chunk-3QXJK5IY.js +25 -0
  9. package/dist/chunk-4O4MII5S.js +4716 -0
  10. package/dist/{chunk-KW7ZNQD7.js → chunk-5EYJ2GIN.js} +4 -8
  11. package/dist/{chunk-OIBHQH5Q.js → chunk-BPQVTIUP.js} +12 -3
  12. package/dist/{chunk-52K5RFDH.js → chunk-DTFKWZ7A.js} +1098 -2280
  13. package/dist/{chunk-EPTHX4VZ.js → chunk-HRWLKKWM.js} +11 -2
  14. package/dist/{chunk-ZMK5Z6KE.js → chunk-IGDYWFNE.js} +2 -2
  15. package/dist/{chunk-44I4LOH6.js → chunk-IVGI4GDL.js} +3 -3
  16. package/dist/{chunk-4DYOXEH6.js → chunk-LAWLB6CT.js} +1 -1
  17. package/dist/{chunk-TGVAIWIL.js → chunk-LRWTWOGP.js} +3 -3
  18. package/dist/{chunk-O56ESZCQ.js → chunk-MP3GPBPX.js} +3 -3
  19. package/dist/{chunk-T3J6U77J.js → chunk-NLBQTDOW.js} +12 -17
  20. package/dist/{chunk-IBWMR4TI.js → chunk-O6JXQ6UQ.js} +1 -2
  21. package/dist/{chunk-TBVLQRXT.js → chunk-OBBQ2JCM.js} +3 -3
  22. package/dist/{chunk-GWGQI6V4.js → chunk-PLP3NYPL.js} +80 -171
  23. package/dist/{chunk-Z2K2EAPL.js → chunk-RIAXZ6AH.js} +5 -6
  24. package/dist/chunk-SDXSB3HN.js +425 -0
  25. package/dist/{chunk-JA5ECJJB.js → chunk-VTXTZXAU.js} +156 -4
  26. package/dist/{chunk-32I2RCGC.js → chunk-W73ZABT6.js} +1 -1
  27. package/dist/{chunk-2ZZ72TAB.js → chunk-WU4FNWCW.js} +3 -3
  28. package/dist/{chunk-A4VDJJCV.js → chunk-YNWZIWJL.js} +4 -5
  29. package/dist/components/index.d.ts +0 -23
  30. package/dist/components/index.js +27 -448
  31. package/dist/components/navigation/index.js +4 -6
  32. package/dist/features/clients/index.js +7 -12
  33. package/dist/features/crm/index.js +9 -14
  34. package/dist/features/dashboard/index.d.ts +0 -23
  35. package/dist/features/dashboard/index.js +9 -14
  36. package/dist/features/delivery/index.js +8 -13
  37. package/dist/features/knowledge/index.js +5 -7
  38. package/dist/features/lead-gen/index.js +9 -14
  39. package/dist/features/monitoring/index.js +10 -15
  40. package/dist/features/monitoring/requests/index.js +7 -12
  41. package/dist/features/operations/index.d.ts +44 -35
  42. package/dist/features/operations/index.js +12 -17
  43. package/dist/features/settings/index.js +8 -13
  44. package/dist/hooks/index.d.ts +20 -27
  45. package/dist/hooks/index.js +7 -12
  46. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +20 -27
  47. package/dist/hooks/published.d.ts +20 -27
  48. package/dist/hooks/published.js +7 -12
  49. package/dist/index.d.ts +53 -38
  50. package/dist/index.js +8 -13
  51. package/dist/knowledge/index.d.ts +30 -38
  52. package/dist/knowledge/index.js +36 -200
  53. package/dist/{knowledge-search-index-VMAW7FLR.js → knowledge-search-index-ORIJCEZX.js} +3 -3
  54. package/dist/organization/index.js +1 -2
  55. package/dist/provider/index.d.ts +24 -31
  56. package/dist/provider/index.js +6 -11
  57. package/dist/provider/published.d.ts +24 -31
  58. package/dist/provider/published.js +5 -9
  59. package/dist/test-utils/index.d.ts +2 -0
  60. package/dist/test-utils/index.js +14 -2
  61. package/dist/test-utils/setup.js +38 -0
  62. package/dist/types/index.d.ts +20 -27
  63. package/dist/utils/index.d.ts +0 -23
  64. package/dist/zustand/index.d.ts +15 -2
  65. package/dist/zustand/index.js +35 -1
  66. package/package.json +4 -4
  67. package/dist/chunk-HUJCU55S.js +0 -159
  68. package/dist/chunk-IOXOPMYS.js +0 -145
  69. package/dist/chunk-J2UD7BOH.js +0 -347
  70. package/dist/chunk-QDFJSUG3.js +0 -13
  71. package/dist/chunk-SZHARWKU.js +0 -15
  72. package/dist/chunk-WKW6B5ID.js +0 -29
  73. package/dist/chunk-XCYKC6OZ.js +0 -1
package/dist/app/index.js CHANGED
@@ -1,26 +1,44 @@
1
- import { ElevasisUIProvider } from '../chunk-OIBHQH5Q.js';
1
+ import { AppErrorBoundary } from '../chunk-SDXSB3HN.js';
2
+ import { SidebarProvider, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer } from '../chunk-V6SZ4ECN.js';
3
+ import '../chunk-N55DVMAG.js';
4
+ import '../chunk-X4WBGKJQ.js';
5
+ import '../chunk-IIMU5YAJ.js';
6
+ import '../chunk-RYTEQBAO.js';
7
+ import '../chunk-BZZCNLT6.js';
8
+ import { ElevasisUIProvider } from '../chunk-BPQVTIUP.js';
2
9
  import '../chunk-RQA2EVN3.js';
3
10
  import '../chunk-3FV6HBXS.js';
4
11
  import '../chunk-WLOQ4IBG.js';
5
- import '../chunk-GWGQI6V4.js';
6
- import '../chunk-SZHARWKU.js';
7
- import '../chunk-52K5RFDH.js';
12
+ import { SystemShell } from '../chunk-PLP3NYPL.js';
13
+ import '../chunk-HRWLKKWM.js';
14
+ import '../chunk-3KMDHCAR.js';
15
+ import { ElevasisSystemsProvider, useElevasisSystems } from '../chunk-O6JXQ6UQ.js';
16
+ import '../chunk-TKAYX2SP.js';
17
+ import '../chunk-NYBEU5TE.js';
18
+ import { listAllSystems } from '../chunk-DTFKWZ7A.js';
8
19
  import '../chunk-ND5TDV2J.js';
9
- import '../chunk-HUJCU55S.js';
20
+ import { TanStackRouterBridge, ScrollToTop } from '../chunk-2IFYDILW.js';
21
+ import '../chunk-Q7DJKLEN.js';
22
+ import '../chunk-VTXTZXAU.js';
10
23
  import '../chunk-E565XMTQ.js';
24
+ import '../chunk-JBWJ6WHZ.js';
25
+ import '../chunk-DT3QYZVU.js';
26
+ import '../chunk-RNP5R5I3.js';
11
27
  import '../chunk-2RJMVWFJ.js';
12
28
  import '../chunk-KRWALB24.js';
29
+ import { useSessionCheck } from '../chunk-VKIZUUPM.js';
13
30
  import { useInitialization } from '../chunk-533DUEQY.js';
14
31
  import '../chunk-DD3CCMCZ.js';
15
32
  import '../chunk-2Q2JQSQO.js';
16
33
  import '../chunk-KJ3QUBNU.js';
17
34
  import '../chunk-BRJ3QZ4E.js';
18
35
  import '../chunk-I2KLQ2HA.js';
19
- import { useCallback, useEffect } from 'react';
20
- import { RouterProvider } from '@tanstack/react-router';
36
+ import { useMemo, useCallback, useEffect } from 'react';
37
+ import { useLocation, Outlet, useNavigate, RouterProvider } from '@tanstack/react-router';
21
38
  import { Notifications } from '@mantine/notifications';
22
39
  import { useAuth } from '@workos-inc/authkit-react';
23
40
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
41
+ import { useComputedColorScheme } from '@mantine/core';
24
42
 
25
43
  var DEFAULT_PRESET = "default";
26
44
  var DEFAULT_COLOR_SCHEME = "dark";
@@ -98,5 +116,123 @@ function createElevasisApp(config) {
98
116
  ElevasisApp.displayName = "ElevasisApp";
99
117
  return ElevasisApp;
100
118
  }
119
+ function devOnlySubsectionPaths(organizationModel) {
120
+ return listAllSystems(organizationModel).filter(({ system }) => system.devOnly && (system.ui?.path ?? system.path)).flatMap(({ system }) => {
121
+ const path = system.ui?.path ?? system.path;
122
+ return path ? [path] : [];
123
+ });
124
+ }
125
+ function renderTopbar(topbar, context) {
126
+ return typeof topbar === "function" ? topbar(context) : topbar;
127
+ }
128
+ function ElevasisAuthenticatedShell({
129
+ systems,
130
+ organizationModel,
131
+ logos,
132
+ topbar,
133
+ children,
134
+ fullScreenPaths = ["/login", "/auth-redirect"],
135
+ readyMode = "organization",
136
+ accountPath = "/settings/account",
137
+ signOutReturnTo,
138
+ appVersion,
139
+ timeRange,
140
+ operationsApiUrl,
141
+ operationsSSEManager,
142
+ deliveryApiUrl,
143
+ deliverySSEManager,
144
+ disabledSubsectionPaths,
145
+ isDev = import.meta.env?.DEV ?? false,
146
+ errorFallback,
147
+ onError,
148
+ sidebarLinks
149
+ }) {
150
+ const computedColorScheme = useComputedColorScheme("dark");
151
+ const { user, isLoading, signOut } = useAuth();
152
+ const initialization = useInitialization();
153
+ const location = useLocation();
154
+ const isDark = computedColorScheme === "dark";
155
+ useSessionCheck();
156
+ const resolvedDisabledSubsectionPaths = useMemo(() => {
157
+ if (isDev) return [...disabledSubsectionPaths ?? []];
158
+ return [.../* @__PURE__ */ new Set([...devOnlySubsectionPaths(organizationModel), ...disabledSubsectionPaths ?? []])];
159
+ }, [disabledSubsectionPaths, isDev, organizationModel]);
160
+ const isFullScreenPage = fullScreenPaths.includes(location.pathname);
161
+ const isReady = readyMode === "user" ? initialization.userReady : initialization.allReady;
162
+ const shouldShowSidebar = Boolean(user && !isLoading && !isFullScreenPage && isReady);
163
+ if (!shouldShowSidebar) {
164
+ return /* @__PURE__ */ jsx(TanStackRouterBridge, { children: children ?? /* @__PURE__ */ jsx(Outlet, {}) });
165
+ }
166
+ return /* @__PURE__ */ jsx(TanStackRouterBridge, { children: /* @__PURE__ */ jsx(AppErrorBoundary, { fallback: errorFallback, onError, appVersion, children: /* @__PURE__ */ jsx(SidebarProvider, { children: /* @__PURE__ */ jsx(
167
+ ElevasisSystemsProvider,
168
+ {
169
+ systems,
170
+ organizationModel,
171
+ timeRange,
172
+ operationsApiUrl,
173
+ operationsSSEManager,
174
+ deliveryApiUrl,
175
+ deliverySSEManager,
176
+ disabledSubsectionPaths: resolvedDisabledSubsectionPaths,
177
+ children: /* @__PURE__ */ jsx(
178
+ AuthenticatedShellLayout,
179
+ {
180
+ accountPath,
181
+ children,
182
+ initialization,
183
+ isDark,
184
+ isDev,
185
+ logos,
186
+ sidebarLinks,
187
+ signOutReturnTo,
188
+ signOut,
189
+ topbar,
190
+ user
191
+ }
192
+ )
193
+ }
194
+ ) }) }) });
195
+ }
196
+ function AuthenticatedShellLayout({
197
+ accountPath,
198
+ children,
199
+ initialization,
200
+ isDark,
201
+ isDev,
202
+ logos,
203
+ sidebarLinks,
204
+ signOutReturnTo,
205
+ signOut,
206
+ topbar,
207
+ user
208
+ }) {
209
+ const navigate = useNavigate();
210
+ const { getSidebarLinks } = useElevasisSystems();
211
+ const isPlatformAdmin = Boolean(initialization.profile?.is_platform_admin);
212
+ const projectedLinks = getSidebarLinks({ isPlatformAdmin, isDev });
213
+ const visibleNavItems = sidebarLinks ? sidebarLinks(projectedLinks) : projectedLinks;
214
+ const handleLogout = () => {
215
+ signOutReturnTo ? signOut({ returnTo: signOutReturnTo }) : signOut();
216
+ };
217
+ return /* @__PURE__ */ jsxs(AppShellContainer, { children: [
218
+ /* @__PURE__ */ jsx(
219
+ Sidebar,
220
+ {
221
+ user: user ?? void 0,
222
+ links: visibleNavItems,
223
+ onLogout: handleLogout,
224
+ onAccountClick: () => navigate({ to: accountPath }),
225
+ logo: isDark ? logos?.dark : logos?.light
226
+ }
227
+ ),
228
+ /* @__PURE__ */ jsxs(AppShellRightSideContainer, { children: [
229
+ renderTopbar(topbar, { isDark, user, initialization }),
230
+ /* @__PURE__ */ jsxs(AppShellRightSideOuterContainer, { children: [
231
+ /* @__PURE__ */ jsx(ScrollToTop, {}),
232
+ /* @__PURE__ */ jsx(SystemShell, { children: children ?? /* @__PURE__ */ jsx(Outlet, {}) })
233
+ ] })
234
+ ] })
235
+ ] });
236
+ }
101
237
 
102
- export { createElevasisApp };
238
+ export { ElevasisAuthenticatedShell, createElevasisApp };
@@ -1,8 +1,7 @@
1
- export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-4DYOXEH6.js';
1
+ export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-LAWLB6CT.js';
2
2
  import '../chunk-VNAZTCHA.js';
3
- import '../chunk-EPTHX4VZ.js';
3
+ import '../chunk-HRWLKKWM.js';
4
4
  import '../chunk-3KMDHCAR.js';
5
- import '../chunk-SZHARWKU.js';
6
5
  import '../chunk-NYBEU5TE.js';
7
6
  import '../chunk-2IFYDILW.js';
8
7
  import '../chunk-Q7DJKLEN.js';
@@ -1,16 +1,16 @@
1
- import { SalesSidebar, LeadGenSidebarMiddle } from './chunk-J2UD7BOH.js';
1
+ import { canonicalOrganizationModel, PROSPECTING_STEPS as PROSPECTING_STEPS$1, SalesSidebar, LeadGenSidebarMiddle, LEAD_GEN_PIPELINE_DEFINITIONS } from './chunk-4O4MII5S.js';
2
2
  import { sanitizeInput } from './chunk-3MEXPLWT.js';
3
3
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
4
4
  import { PageContainer } from './chunk-BZZCNLT6.js';
5
5
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
6
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
7
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-ZMK5Z6KE.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-IGDYWFNE.js';
9
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-GWGQI6V4.js';
10
+ import { useListActions } from './chunk-PLP3NYPL.js';
11
+ import { PageTitleCaption, CenteredErrorState, StatCard, CardHeader, EmptyState, JsonViewer } from './chunk-HRWLKKWM.js';
12
12
  import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
13
- import { PROSPECTING_STEPS, LEAD_GEN_STAGE_CATALOG, LEAD_GEN_PIPELINE_DEFINITIONS, findPipeline } from './chunk-52K5RFDH.js';
13
+ import { PROSPECTING_STEPS, getLeadGenStageCatalog, findPipeline } from './chunk-DTFKWZ7A.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';
@@ -1105,6 +1105,7 @@ function resolveLegacyListMemberPipelineLabel(member) {
1105
1105
  stateLabel: state?.label ?? member.stateKey
1106
1106
  };
1107
1107
  }
1108
+ var LEAD_GEN_STAGE_CATALOG = getLeadGenStageCatalog(canonicalOrganizationModel);
1108
1109
  function formatDateTime(value) {
1109
1110
  if (!value) return "Not yet";
1110
1111
  return new Date(value).toLocaleString("en-US", {
@@ -1251,6 +1252,7 @@ function ListMemberDrawer({ memberId, memberKind, listId, onClose }) {
1251
1252
  }
1252
1253
  );
1253
1254
  }
1255
+ var LEAD_GEN_STAGE_CATALOG2 = getLeadGenStageCatalog(canonicalOrganizationModel);
1254
1256
  function formatEventTime(timestamp) {
1255
1257
  return new Date(timestamp).toLocaleTimeString("en-US", {
1256
1258
  hour12: false,
@@ -1372,7 +1374,7 @@ function getStageProgress(progress, stageKey) {
1372
1374
  return progress?.byCompanyStage[stageKey] ?? progress?.byContactStage[stageKey];
1373
1375
  }
1374
1376
  function getStageLabel(stageKey) {
1375
- return LEAD_GEN_STAGE_CATALOG[stageKey]?.label ?? stageKey;
1377
+ return LEAD_GEN_STAGE_CATALOG2[stageKey]?.label ?? stageKey;
1376
1378
  }
1377
1379
  function getDoneCount(stageProgress) {
1378
1380
  return stageProgress?.attempted ?? 0;
@@ -1704,23 +1706,35 @@ var STAGE_COLOR_SETS = {
1704
1706
  background: "color-mix(in srgb, var(--color-success) 15%, transparent)",
1705
1707
  border: "color-mix(in srgb, var(--color-border) 58%, var(--color-success))",
1706
1708
  text: "var(--color-text)"
1709
+ },
1710
+ disqualified: {
1711
+ accent: "var(--color-error)",
1712
+ background: "color-mix(in srgb, var(--color-error) 10%, transparent)",
1713
+ border: "color-mix(in srgb, var(--color-border) 66%, var(--color-error))",
1714
+ text: "var(--color-text)"
1715
+ },
1716
+ invalid: {
1717
+ accent: "color-mix(in srgb, var(--color-error) 72%, var(--color-text-dimmed))",
1718
+ background: "color-mix(in srgb, var(--color-error) 8%, transparent)",
1719
+ border: "color-mix(in srgb, var(--color-border) 78%, var(--color-error))",
1720
+ text: "var(--color-text)"
1707
1721
  }
1708
1722
  };
1709
1723
  function getLeadGenStageColor(stageKey) {
1710
- if (!LEAD_GEN_STAGE_CATALOG[stageKey]) return FALLBACK_STAGE_COLORS;
1711
1724
  return STAGE_COLOR_SETS[stageKey] ?? FALLBACK_STAGE_COLORS;
1712
1725
  }
1713
1726
  function getLeadGenStageColorVar(stageKey, tone = "accent") {
1714
1727
  return getLeadGenStageColor(stageKey)[tone];
1715
1728
  }
1716
1729
  var FALLBACK_STAGE_ORDER = 1e4;
1730
+ var LEAD_GEN_STAGE_CATALOG3 = getLeadGenStageCatalog(canonicalOrganizationModel);
1717
1731
  function unique(values) {
1718
1732
  return Array.from(new Set(values.filter(Boolean)));
1719
1733
  }
1720
1734
  function configuredStages(pipelineConfig) {
1721
1735
  return (pipelineConfig?.stages ?? []).filter((stage) => stage.enabled !== false).slice().sort((a, b) => {
1722
- const aOrder = a.order ?? LEAD_GEN_STAGE_CATALOG[a.key]?.order ?? FALLBACK_STAGE_ORDER;
1723
- const bOrder = b.order ?? LEAD_GEN_STAGE_CATALOG[b.key]?.order ?? FALLBACK_STAGE_ORDER;
1736
+ const aOrder = a.order ?? LEAD_GEN_STAGE_CATALOG3[a.key]?.order ?? FALLBACK_STAGE_ORDER;
1737
+ const bOrder = b.order ?? LEAD_GEN_STAGE_CATALOG3[b.key]?.order ?? FALLBACK_STAGE_ORDER;
1724
1738
  return aOrder - bOrder || a.key.localeCompare(b.key);
1725
1739
  });
1726
1740
  }
@@ -1751,7 +1765,7 @@ function buildLaneStages({
1751
1765
  const stageKeys = unique([...observedKeys, ...configKeys, ...workflowKeys]);
1752
1766
  return sortStageNodes(
1753
1767
  stageKeys.flatMap((key) => {
1754
- const catalogEntry = LEAD_GEN_STAGE_CATALOG[key];
1768
+ const catalogEntry = LEAD_GEN_STAGE_CATALOG3[key];
1755
1769
  const inferredEntity = catalogEntry?.entity ?? (observedKeys.has(key) ? entity : null);
1756
1770
  if (inferredEntity !== entity) return [];
1757
1771
  return [
@@ -2434,6 +2448,7 @@ function ListBuilderPage({ listId }) {
2434
2448
  }
2435
2449
 
2436
2450
  // src/lib/lead-gen/processing-state.ts
2451
+ var LEAD_GEN_STAGE_CATALOG4 = getLeadGenStageCatalog(canonicalOrganizationModel);
2437
2452
  function isRecord(value) {
2438
2453
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
2439
2454
  }
@@ -2461,7 +2476,7 @@ function parseProcessingState(value) {
2461
2476
  }
2462
2477
  for (const [key, rawStatus] of Object.entries(value)) {
2463
2478
  const parsedStatus = parseProcessingStageStatus(rawStatus);
2464
- const isKnownStage = Boolean(LEAD_GEN_STAGE_CATALOG[key]);
2479
+ const isKnownStage = Boolean(LEAD_GEN_STAGE_CATALOG4[key]);
2465
2480
  if (!parsedStatus) {
2466
2481
  unknownFields[key] = rawStatus;
2467
2482
  continue;
@@ -2492,14 +2507,14 @@ function readLeadGenStateKey(row) {
2492
2507
  }
2493
2508
  function getDisplayLeadGenStageStateFor(row, entity) {
2494
2509
  const parsed = parseProcessingState(readLeadGenProcessingState(row));
2495
- const latest = Object.values(LEAD_GEN_STAGE_CATALOG).filter((stage) => stage.entity === entity && parsed.knownStageStatuses[stage.key]).sort((a, b) => b.order - a.order)[0];
2510
+ const latest = Object.values(LEAD_GEN_STAGE_CATALOG4).filter((stage) => stage.entity === entity && parsed.knownStageStatuses[stage.key]).sort((a, b) => b.order - a.order)[0];
2496
2511
  if (latest) {
2497
2512
  return {
2498
2513
  stageKey: latest.key,
2499
2514
  stageStatus: parsed.knownStageStatuses[latest.key]
2500
2515
  };
2501
2516
  }
2502
- const unknownStageKey = Object.keys(parsed.stageStatuses).find((stageKey) => !LEAD_GEN_STAGE_CATALOG[stageKey]);
2517
+ const unknownStageKey = Object.keys(parsed.stageStatuses).find((stageKey) => !LEAD_GEN_STAGE_CATALOG4[stageKey]);
2503
2518
  if (unknownStageKey) {
2504
2519
  return {
2505
2520
  stageKey: unknownStageKey,
@@ -2507,11 +2522,12 @@ function getDisplayLeadGenStageStateFor(row, entity) {
2507
2522
  };
2508
2523
  }
2509
2524
  const stateKey = readLeadGenStateKey(row);
2510
- return stateKey && LEAD_GEN_STAGE_CATALOG[stateKey] ? { stageKey: stateKey, stageStatus: null } : { stageKey: null, stageStatus: null };
2525
+ return stateKey && LEAD_GEN_STAGE_CATALOG4[stateKey] ? { stageKey: stateKey, stageStatus: null } : { stageKey: null, stageStatus: null };
2511
2526
  }
2512
2527
 
2513
2528
  // src/features/lead-gen/build-state.ts
2514
2529
  var ORPHAN_STAGE_ORDER = 9999;
2530
+ var LEAD_GEN_STAGE_CATALOG5 = getLeadGenStageCatalog(canonicalOrganizationModel);
2515
2531
  function asRecord2(value) {
2516
2532
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
2517
2533
  }
@@ -2525,32 +2541,32 @@ function defineMvpBuildStep(step, emptyBlockedText) {
2525
2541
  }
2526
2542
  var MVP_BUILD_STEPS = [
2527
2543
  defineMvpBuildStep(
2528
- PROSPECTING_STEPS.localServices.sourceCompanies,
2544
+ PROSPECTING_STEPS$1.localServices.sourceCompanies,
2529
2545
  "No company source has been configured or populated yet."
2530
2546
  ),
2531
2547
  defineMvpBuildStep(
2532
- PROSPECTING_STEPS.localServices.analyzeWebsites,
2548
+ PROSPECTING_STEPS$1.localServices.analyzeWebsites,
2533
2549
  "Source companies before website analysis can run."
2534
2550
  ),
2535
2551
  defineMvpBuildStep(
2536
- PROSPECTING_STEPS.localServices.qualifyCompanies,
2552
+ PROSPECTING_STEPS$1.localServices.qualifyCompanies,
2537
2553
  "Analyze websites before qualification can run."
2538
2554
  ),
2539
2555
  defineMvpBuildStep(
2540
- PROSPECTING_STEPS.localServices.findContacts,
2556
+ PROSPECTING_STEPS$1.localServices.findContacts,
2541
2557
  "Qualify companies before contact discovery can run."
2542
2558
  ),
2543
- defineMvpBuildStep(PROSPECTING_STEPS.localServices.verifyEmails, "Find contacts before email verification can run."),
2544
- defineMvpBuildStep(PROSPECTING_STEPS.localServices.personalize, "Verify emails before personalization can run."),
2559
+ defineMvpBuildStep(PROSPECTING_STEPS$1.localServices.verifyEmails, "Find contacts before email verification can run."),
2560
+ defineMvpBuildStep(PROSPECTING_STEPS$1.localServices.personalize, "Verify emails before personalization can run."),
2545
2561
  defineMvpBuildStep(
2546
- PROSPECTING_STEPS.localServices.review,
2562
+ PROSPECTING_STEPS$1.localServices.review,
2547
2563
  "Personalize contacts before records are ready for review."
2548
2564
  )
2549
2565
  ];
2550
2566
  function sortStageKeys(keys) {
2551
2567
  return keys.slice().sort((a, b) => {
2552
- const oa = LEAD_GEN_STAGE_CATALOG[a]?.order ?? ORPHAN_STAGE_ORDER;
2553
- const ob = LEAD_GEN_STAGE_CATALOG[b]?.order ?? ORPHAN_STAGE_ORDER;
2568
+ const oa = LEAD_GEN_STAGE_CATALOG5[a]?.order ?? ORPHAN_STAGE_ORDER;
2569
+ const ob = LEAD_GEN_STAGE_CATALOG5[b]?.order ?? ORPHAN_STAGE_ORDER;
2554
2570
  return oa - ob || a.localeCompare(b);
2555
2571
  });
2556
2572
  }
@@ -2747,6 +2763,7 @@ function resolveBuildState(list, progress, actions) {
2747
2763
  recommendedAction: recommendedStep?.recommendedAction ?? null
2748
2764
  };
2749
2765
  }
2766
+ var LEAD_GEN_STAGE_CATALOG6 = getLeadGenStageCatalog(canonicalOrganizationModel);
2750
2767
  function formatDateTime4(value) {
2751
2768
  if (!value) return "Not yet";
2752
2769
  return new Date(value).toLocaleString("en-US", {
@@ -2778,7 +2795,7 @@ function getStatusColor4(status) {
2778
2795
  }
2779
2796
  }
2780
2797
  function getMemberStateColor2(stateKey) {
2781
- const stage = LEAD_GEN_STAGE_CATALOG[stateKey];
2798
+ const stage = LEAD_GEN_STAGE_CATALOG6[stateKey];
2782
2799
  if (stage?.entity === "contact") return "green";
2783
2800
  if (stage?.entity === "company") return "blue";
2784
2801
  return "gray";
@@ -2786,7 +2803,7 @@ function getMemberStateColor2(stateKey) {
2786
2803
  function displayMemberStageFor(row, kind) {
2787
2804
  const stage = getDisplayLeadGenStageStateFor(row, kind);
2788
2805
  if (!stage.stageKey) return null;
2789
- const catalogStage = LEAD_GEN_STAGE_CATALOG[stage.stageKey];
2806
+ const catalogStage = LEAD_GEN_STAGE_CATALOG6[stage.stageKey];
2790
2807
  return {
2791
2808
  key: stage.stageKey,
2792
2809
  label: catalogStage?.label ?? stage.stageKey
@@ -2982,7 +2999,7 @@ function StageNode({
2982
2999
  fallbackLabel,
2983
3000
  entry
2984
3001
  }) {
2985
- const label = LEAD_GEN_STAGE_CATALOG[stageKey]?.label ?? fallbackLabel ?? stageKey;
3002
+ const label = LEAD_GEN_STAGE_CATALOG6[stageKey]?.label ?? fallbackLabel ?? stageKey;
2986
3003
  const status = getStageStatus(entry);
2987
3004
  const colors = getStageColors(status);
2988
3005
  const total = entry?.total ?? 0;
@@ -3580,7 +3597,7 @@ function StepRecordsPanel({
3580
3597
  if (!rows.length) {
3581
3598
  return /* @__PURE__ */ jsx(Stack, { gap: "xs", children: /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
3582
3599
  "No records found for ",
3583
- LEAD_GEN_STAGE_CATALOG[recordsStageKey]?.label ?? recordsStageKey,
3600
+ LEAD_GEN_STAGE_CATALOG6[recordsStageKey]?.label ?? recordsStageKey,
3584
3601
  "."
3585
3602
  ] }) });
3586
3603
  }
@@ -3593,7 +3610,7 @@ function StepRecordsPanel({
3593
3610
  " ",
3594
3611
  recordsEntity,
3595
3612
  " records from ",
3596
- LEAD_GEN_STAGE_CATALOG[recordsStageKey]?.label ?? recordsStageKey
3613
+ LEAD_GEN_STAGE_CATALOG6[recordsStageKey]?.label ?? recordsStageKey
3597
3614
  ] })
3598
3615
  ] }),
3599
3616
  recordsQuery.isFetching ? /* @__PURE__ */ jsx(Loader, { size: "xs" }) : null
@@ -0,0 +1,25 @@
1
+ import { GC_TIME_LONG, STALE_TIME_DEFAULT } from './chunk-2RJMVWFJ.js';
2
+ import { QueryClient } from '@tanstack/react-query';
3
+
4
+ function createElevasisQueryClient(options = {}) {
5
+ const { defaultOptions, onMutationError, ...queryClientOptions } = options;
6
+ return new QueryClient({
7
+ ...queryClientOptions,
8
+ defaultOptions: {
9
+ ...defaultOptions,
10
+ queries: {
11
+ staleTime: STALE_TIME_DEFAULT,
12
+ gcTime: GC_TIME_LONG,
13
+ retry: 1,
14
+ refetchOnWindowFocus: false,
15
+ ...defaultOptions?.queries
16
+ },
17
+ mutations: {
18
+ ...defaultOptions?.mutations,
19
+ onError: onMutationError ?? defaultOptions?.mutations?.onError
20
+ }
21
+ }
22
+ });
23
+ }
24
+
25
+ export { createElevasisQueryClient };