@elevasis/ui 2.22.0 → 2.24.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 (57) hide show
  1. package/dist/app/index.d.ts +2915 -0
  2. package/dist/app/index.js +5 -4
  3. package/dist/{chunk-3HEUGBOT.js → chunk-2WZ635SS.js} +2 -2
  4. package/dist/{chunk-GJ7EIABJ.js → chunk-4NWNS7TX.js} +1 -1
  5. package/dist/{chunk-LKVBEE63.js → chunk-FUEXGRFR.js} +2 -2
  6. package/dist/{chunk-6IA2OMAE.js → chunk-HC2KV6BU.js} +9 -0
  7. package/dist/{chunk-IBUYJXA3.js → chunk-KCJ6VATY.js} +1133 -578
  8. package/dist/{chunk-WWJ6S2HQ.js → chunk-KLFIJDTD.js} +1 -1
  9. package/dist/{chunk-COG4ABRI.js → chunk-M2HWJY6O.js} +704 -375
  10. package/dist/{chunk-LVJGPE6H.js → chunk-MTR6AN2C.js} +3 -12
  11. package/dist/chunk-OWHQ65EQ.js +211 -0
  12. package/dist/{chunk-XOTJNW4Q.js → chunk-QIW6OCEI.js} +18 -1
  13. package/dist/{chunk-B4FHWKEF.js → chunk-QULLZ5PE.js} +193 -10
  14. package/dist/{chunk-QZJM3RYI.js → chunk-SNHGSCKH.js} +1 -1
  15. package/dist/{chunk-LVUCBY7X.js → chunk-UDJE54WN.js} +85 -3
  16. package/dist/{chunk-IOTLB6ND.js → chunk-VGNAV3TH.js} +406 -195
  17. package/dist/{chunk-BSZRKBAW.js → chunk-YBZT7MJR.js} +3 -3
  18. package/dist/{chunk-SQ5JGELM.js → chunk-ZDKQNQ4X.js} +19 -1
  19. package/dist/components/index.d.ts +500 -466
  20. package/dist/components/index.js +75 -32
  21. package/dist/components/navigation/index.js +2 -2
  22. package/dist/features/auth/index.d.ts +472 -389
  23. package/dist/features/crm/index.d.ts +468 -391
  24. package/dist/features/crm/index.js +8 -8
  25. package/dist/features/dashboard/index.js +8 -8
  26. package/dist/features/delivery/index.d.ts +466 -383
  27. package/dist/features/delivery/index.js +8 -8
  28. package/dist/features/lead-gen/index.d.ts +213 -65
  29. package/dist/features/lead-gen/index.js +9 -8
  30. package/dist/features/monitoring/index.js +9 -9
  31. package/dist/features/monitoring/requests/index.js +7 -7
  32. package/dist/features/operations/index.js +11 -10
  33. package/dist/features/settings/index.d.ts +472 -389
  34. package/dist/features/settings/index.js +9 -9
  35. package/dist/hooks/delivery/index.d.ts +466 -383
  36. package/dist/hooks/index.d.ts +967 -744
  37. package/dist/hooks/index.js +7 -7
  38. package/dist/hooks/published.d.ts +967 -744
  39. package/dist/hooks/published.js +7 -7
  40. package/dist/index.d.ts +1360 -1069
  41. package/dist/index.js +8 -8
  42. package/dist/initialization/index.d.ts +472 -389
  43. package/dist/organization/index.d.ts +11 -1
  44. package/dist/organization/index.js +2 -2
  45. package/dist/profile/index.d.ts +472 -389
  46. package/dist/provider/index.d.ts +3132 -169
  47. package/dist/provider/index.js +6 -6
  48. package/dist/provider/published.d.ts +3098 -168
  49. package/dist/provider/published.js +3 -3
  50. package/dist/supabase/index.d.ts +577 -413
  51. package/dist/test-utils/index.d.ts +21 -1
  52. package/dist/test-utils/index.js +13 -4
  53. package/dist/theme/index.js +2 -2
  54. package/dist/types/index.d.ts +472 -389
  55. package/package.json +2 -2
  56. package/src/test-utils/README.md +2 -0
  57. /package/dist/{chunk-ZBCTB5CA.js → chunk-EIOJNUPL.js} +0 -0
@@ -1,24 +1,26 @@
1
1
  import { useBreadcrumbs } from '../chunk-DDZOHLHB.js';
2
2
  import '../chunk-6Z3G4U2R.js';
3
- export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-LVJGPE6H.js';
4
- export { LEAD_GEN_ROUTE_LINKS, LIST_TEMPLATE_OPTIONS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, buildListConfig, getEnrichmentColor, getStatusColor, leadGenManifest, useDeleteLists } from '../chunk-COG4ABRI.js';
5
- export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, operationsManifest, useNewKnowledgeMapLayout } from '../chunk-IBUYJXA3.js';
3
+ export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-MTR6AN2C.js';
4
+ export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, getEnrichmentColor, getStatusColor, leadGenManifest, useDeleteLists } from '../chunk-M2HWJY6O.js';
5
+ export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CheckpointGroup, CollapsibleJsonSection, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecutionErrorSection, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, ResourceDefinitionSection, ResourceErrorState, ResourceFilter, ResourceHeader, ResourceNotFoundState, SessionMemory, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, operationsManifest, useNewKnowledgeMapLayout } from '../chunk-KCJ6VATY.js';
6
6
  import '../chunk-ROSMICXG.js';
7
7
  import '../chunk-3JCMO7SD.js';
8
8
  import '../chunk-ZTWA5H77.js';
9
- import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton } from '../chunk-LKVBEE63.js';
10
- export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, FormFieldRenderer, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, RunResourceButton, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, ZodFormRenderer, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-LKVBEE63.js';
9
+ import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton } from '../chunk-FUEXGRFR.js';
10
+ export { AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, EmptyVisualizer, ExecutionStats, ExecutionStatusBadge, FormFieldRenderer, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, RunResourceButton, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowExecutionTimeline, ZodFormRenderer, getGraphBackgroundStyles, useGraphBackgroundStyles, useGraphTheme } from '../chunk-FUEXGRFR.js';
11
11
  import '../chunk-442LZPIR.js';
12
- import { NotificationList } from '../chunk-WWJ6S2HQ.js';
13
- export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList, monitoringManifest } from '../chunk-WWJ6S2HQ.js';
14
- export { ResourceHealthPanel } from '../chunk-GJ7EIABJ.js';
12
+ import '../chunk-OWHQ65EQ.js';
13
+ import { NotificationList } from '../chunk-KLFIJDTD.js';
14
+ export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList, monitoringManifest } from '../chunk-KLFIJDTD.js';
15
+ export { ResourceHealthPanel } from '../chunk-4NWNS7TX.js';
15
16
  export { ResourceHealthChart, getHealthColor } from '../chunk-LGKLC5MG.js';
16
17
  import '../chunk-TSSKOQBX.js';
17
18
  export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-BIWHHWCJ.js';
18
- import { showAuthError } from '../chunk-BSZRKBAW.js';
19
- export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipFeaturePanel, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, WebhookUrlDisplayModal, settingsManifest, showAuthError } from '../chunk-BSZRKBAW.js';
19
+ import { showAuthError } from '../chunk-YBZT7MJR.js';
20
+ export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipFeaturePanel, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, WebhookUrlDisplayModal, settingsManifest, showAuthError } from '../chunk-YBZT7MJR.js';
20
21
  import { AppShellLoader } from '../chunk-M25JL54Z.js';
21
- export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, TasksDueWidget, crmManifest, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-IOTLB6ND.js';
22
+ import { ActionFormButton, ActionButton } from '../chunk-VGNAV3TH.js';
23
+ export { ActivityFeedWidget, CrmOverview, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, crmManifest, useCrmPipelineSummary, useCrmQuickMetrics, useRecentCrmActivity } from '../chunk-VGNAV3TH.js';
22
24
  import '../chunk-BZZCNLT6.js';
23
25
  export { SortableHeader, TableSelectionToolbar } from '../chunk-TUMSNGTX.js';
24
26
  import '../chunk-CEWTOKE7.js';
@@ -27,10 +29,10 @@ import { FilterBar } from '../chunk-PDHTXPSF.js';
27
29
  export { FilterBar } from '../chunk-PDHTXPSF.js';
28
30
  import { CustomModal } from '../chunk-KVJ3LFH2.js';
29
31
  export { ConfirmationInputModal, ConfirmationModal, CustomModal } from '../chunk-KVJ3LFH2.js';
30
- import '../chunk-QZJM3RYI.js';
32
+ import '../chunk-SNHGSCKH.js';
31
33
  export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-E4WQGJNS.js';
32
34
  import '../chunk-7M2VOCYN.js';
33
- import { useCommandViewLayout, useOrganizationPermissions, useCreateOrgRole, usePermissionCatalog, useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useDealNotes, useCreateDealNote, useDeals, useSyncDealStage, dealKeys, useMarkAllAsRead, useNotifications } from '../chunk-B4FHWKEF.js';
35
+ import { useCommandViewLayout, useOrganizationPermissions, useCreateOrgRole, usePermissionCatalog, useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useDealNotes, useCreateDealNote, useDeals, useTransitionItem, dealKeys, useMarkAllAsRead, useNotifications } from '../chunk-QULLZ5PE.js';
34
36
  import '../chunk-BRXELOHC.js';
35
37
  import '../chunk-QSTH6T77.js';
36
38
  import { showSuccessNotification, showErrorNotification, showApiErrorNotification } from '../chunk-Z6FAH4XV.js';
@@ -38,12 +40,12 @@ export { showApiErrorNotification, showErrorNotification, showInfoNotification,
38
40
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS } from '../chunk-22UVE3RA.js';
39
41
  export { Graph_module_css_default as graphStyles } from '../chunk-22UVE3RA.js';
40
42
  import '../chunk-3ZMAGTWF.js';
41
- import '../chunk-ZBCTB5CA.js';
42
- import '../chunk-3HEUGBOT.js';
43
- import '../chunk-XOTJNW4Q.js';
43
+ import '../chunk-EIOJNUPL.js';
44
+ import '../chunk-2WZ635SS.js';
45
+ import '../chunk-QIW6OCEI.js';
44
46
  import '../chunk-WLOQ4IBG.js';
45
47
  import '../chunk-AXXTN44Z.js';
46
- import '../chunk-LVUCBY7X.js';
48
+ import { useCrmActions, deriveActions } from '../chunk-UDJE54WN.js';
47
49
  import '../chunk-LJWV4TWV.js';
48
50
  import { SubshellContentContainer } from '../chunk-TKAYX2SP.js';
49
51
  import { ListSkeleton, EmptyState, PageTitleCaption, StatCard, CenteredErrorState, CardHeader, ActivityTimeline } from '../chunk-XUYBOO32.js';
@@ -54,8 +56,8 @@ export { NavigationButton } from '../chunk-NYBEU5TE.js';
54
56
  import '../chunk-T6INEVX6.js';
55
57
  import '../chunk-2IFYDILW.js';
56
58
  import { useRouterContext } from '../chunk-Q7DJKLEN.js';
57
- export { RoleBadge } from '../chunk-SQ5JGELM.js';
58
- import '../chunk-6IA2OMAE.js';
59
+ export { RoleBadge } from '../chunk-ZDKQNQ4X.js';
60
+ import '../chunk-HC2KV6BU.js';
59
61
  import { useAppearance } from '../chunk-QJ2KCHKX.js';
60
62
  import '../chunk-HQ7M6PBW.js';
61
63
  import '../chunk-DT3QYZVU.js';
@@ -74,7 +76,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
74
76
  import { Stack, Group, ThemeIcon, Text, Badge, Box, Card, Title, Checkbox, Tooltip, Center, TextInput, Textarea, Loader, Alert, Button, Table, ActionIcon, Paper, Code, CopyButton, SimpleGrid, Pagination, SegmentedControl, Switch, Select, Divider, Menu, Timeline, Tabs, ScrollArea, Breadcrumbs as Breadcrumbs$1, Drawer, Popover, Indicator } from '@mantine/core';
75
77
  import { IconBrain, IconDatabase, IconMessage, IconAlertCircle, IconCircleX, IconCircleCheck, IconBolt, IconHandClick, IconClock, IconWebhook, IconExternalLink, IconLock, IconPencil, IconKey, IconCalendar, IconTrash, IconAlertTriangle, IconExclamationMark, IconShieldLock, IconCheck, IconCopy, IconPlus, IconRocket, IconRefresh, IconPower, IconPlayerPlay, IconTag, IconCalendarRepeat, IconCalendarEvent, IconCalendarTime, IconRobot, IconGitBranch, IconSettings, IconDotsVertical, IconPlayerPause, IconPlayerStop, IconCalendarDue, IconCalendarStats, IconCalendarOff, IconListCheck, IconBell } from '@tabler/icons-react';
76
78
  import { useForm } from '@mantine/form';
77
- import { memo, forwardRef, useMemo, useImperativeHandle, useRef, useEffect, useState, useCallback } from 'react';
79
+ import { memo, forwardRef, useMemo, useImperativeHandle, useRef, useEffect, useState, useCallback, Component } from 'react';
78
80
  import { z } from 'zod';
79
81
  import { useDisclosure } from '@mantine/hooks';
80
82
  import { useQueryClient, useQuery } from '@tanstack/react-query';
@@ -3044,6 +3046,23 @@ function CrashErrorFallback({ error, componentStack, eventId, appVersion }) {
3044
3046
  }
3045
3047
  );
3046
3048
  }
3049
+ var AppErrorBoundary = class extends Component {
3050
+ state = { error: null, componentStack: "" };
3051
+ static getDerivedStateFromError(error) {
3052
+ return { error };
3053
+ }
3054
+ componentDidCatch(error, errorInfo) {
3055
+ this.setState({ componentStack: errorInfo.componentStack ?? "" });
3056
+ this.props.onError?.(error, errorInfo);
3057
+ }
3058
+ render() {
3059
+ if (this.state.error !== null) {
3060
+ const props = { error: this.state.error, componentStack: this.state.componentStack };
3061
+ return this.props.fallback ? this.props.fallback(props) : /* @__PURE__ */ jsx(CrashErrorFallback, { ...props, appVersion: this.props.appVersion });
3062
+ }
3063
+ return this.props.children;
3064
+ }
3065
+ };
3047
3066
  function RichTextEditor({ content, onChange, placeholder }) {
3048
3067
  const editor = useEditor({
3049
3068
  extensions: [
@@ -3278,6 +3297,10 @@ var Breadcrumbs = (props) => {
3278
3297
  }
3279
3298
  );
3280
3299
  };
3300
+ function formatStateLabel(stateKey) {
3301
+ if (!stateKey) return "No state";
3302
+ return stateKey.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
3303
+ }
3281
3304
  function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
3282
3305
  const contactFirstName = deal.contact?.first_name || "";
3283
3306
  const contactLastName = deal.contact?.last_name || "";
@@ -3286,7 +3309,8 @@ function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
3286
3309
  const companyName = deal.contact?.company?.name || deal.discovery_data?.company || deal.contact_email?.split("@")[1] || null;
3287
3310
  const hasInitialFee = typeof deal.initial_fee === "number" && deal.initial_fee > 0;
3288
3311
  const hasMonthlyFee = typeof deal.monthly_fee === "number" && deal.monthly_fee > 0;
3289
- const stageColor = (deal.cached_stage ? config[deal.cached_stage]?.color : null) ?? "gray";
3312
+ const stageColor = (deal.stage_key ? config[deal.stage_key]?.color : null) ?? "gray";
3313
+ const stateLabel = formatStateLabel(deal.state_key);
3290
3314
  return /* @__PURE__ */ jsx(
3291
3315
  Paper,
3292
3316
  {
@@ -3304,6 +3328,10 @@ function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
3304
3328
  onClick: () => onClick(deal),
3305
3329
  children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
3306
3330
  /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, lineClamp: 1, children: displayName }),
3331
+ /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", lineClamp: 1, children: [
3332
+ "State: ",
3333
+ stateLabel
3334
+ ] }),
3307
3335
  companyName && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 1, children: companyName }),
3308
3336
  /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "wrap", children: [
3309
3337
  hasInitialFee && /* @__PURE__ */ jsxs(Badge, { variant: "outline", size: "xs", color: "green", children: [
@@ -3329,6 +3357,8 @@ function DealDrawer({ deal, config, opened, onClose, renderActions }) {
3329
3357
  const [noteBody, setNoteBody] = useState("");
3330
3358
  const { data: notes, isLoading: notesLoading } = useDealNotes(deal?.id ?? "");
3331
3359
  const createNote = useCreateDealNote();
3360
+ const crmActions = useCrmActions();
3361
+ const actions = useMemo(() => deal ? deriveActions(deal, crmActions) : [], [deal, crmActions]);
3332
3362
  if (!deal) return null;
3333
3363
  const contactFirstName = deal.contact?.first_name || "";
3334
3364
  const contactLastName = deal.contact?.last_name || "";
@@ -3336,7 +3366,7 @@ function DealDrawer({ deal, config, opened, onClose, renderActions }) {
3336
3366
  const displayName = contactName || deal.contact_email || "Unknown";
3337
3367
  const email = deal.contact?.email || deal.contact_email || null;
3338
3368
  const companyName = deal.contact?.company?.name || deal.discovery_data?.company || null;
3339
- const stage = deal.cached_stage;
3369
+ const stage = deal.stage_key;
3340
3370
  const badgeColor = (stage ? config?.[stage]?.color : null) ?? "gray";
3341
3371
  const activityLog = deal.activity_log || [];
3342
3372
  const hasInitialFee = typeof deal.initial_fee === "number" && deal.initial_fee > 0;
@@ -3394,7 +3424,13 @@ function DealDrawer({ deal, config, opened, onClose, renderActions }) {
3394
3424
  ] })
3395
3425
  ] })
3396
3426
  ] }),
3397
- renderActions && renderActions(),
3427
+ (actions.length > 0 || renderActions) && /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
3428
+ /* @__PURE__ */ jsx(Title, { order: 5, children: "Actions" }),
3429
+ actions.length > 0 && /* @__PURE__ */ jsx(Group, { gap: "xs", wrap: "wrap", children: actions.map(
3430
+ (action) => action.payloadSchema ? /* @__PURE__ */ jsx(ActionFormButton, { action, dealId: deal.id }, action.key) : /* @__PURE__ */ jsx(ActionButton, { action, dealId: deal.id }, action.key)
3431
+ ) }),
3432
+ renderActions && renderActions()
3433
+ ] }),
3398
3434
  /* @__PURE__ */ jsx(Divider, {}),
3399
3435
  /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
3400
3436
  /* @__PURE__ */ jsx(Title, { order: 5, children: "Notes" }),
@@ -3458,7 +3494,7 @@ function groupDealsByStage(deals, columns) {
3458
3494
  const map = /* @__PURE__ */ new Map();
3459
3495
  for (const stage of columns) map.set(stage, []);
3460
3496
  for (const deal of deals) {
3461
- const key = deal.cached_stage ?? UNSTAGED_KEY;
3497
+ const key = deal.stage_key ?? UNSTAGED_KEY;
3462
3498
  const bucket = map.get(key);
3463
3499
  if (bucket) {
3464
3500
  bucket.push(deal);
@@ -3469,18 +3505,25 @@ function groupDealsByStage(deals, columns) {
3469
3505
  return map;
3470
3506
  }
3471
3507
  function KanbanBoard({ config, renderDrawerActions }) {
3472
- const { data: deals, total, isLoading, error } = useDeals({
3508
+ const {
3509
+ data: deals,
3510
+ total,
3511
+ isLoading,
3512
+ error
3513
+ } = useDeals({
3473
3514
  limit: KANBAN_FETCH_LIMIT,
3474
3515
  offset: 0
3475
3516
  });
3476
- const syncStage = useSyncDealStage();
3517
+ const transitionItem = useTransitionItem();
3477
3518
  const queryClient = useQueryClient();
3478
3519
  const [selectedDeal, setSelectedDeal] = useState(null);
3479
3520
  const [drawerOpen, setDrawerOpen] = useState(false);
3480
3521
  const [dragOverColumn, setDragOverColumn] = useState(null);
3481
3522
  const draggingDealRef = useRef(null);
3482
3523
  const resolvedConfig = config ?? {};
3483
- const configuredStages = Object.keys(resolvedConfig).filter((stage) => Boolean(resolvedConfig[stage]));
3524
+ const configuredStages = Object.keys(resolvedConfig).filter(
3525
+ (stage) => Boolean(resolvedConfig[stage])
3526
+ );
3484
3527
  const columns = [...configuredStages, UNSTAGED_KEY];
3485
3528
  const hasConfig = configuredStages.length > 0;
3486
3529
  const groupedDeals = groupDealsByStage(deals ?? [], columns);
@@ -3509,17 +3552,17 @@ function KanbanBoard({ config, renderDrawerActions }) {
3509
3552
  const deal = draggingDealRef.current;
3510
3553
  draggingDealRef.current = null;
3511
3554
  if (!deal) return;
3512
- if (deal.cached_stage === targetStage) return;
3555
+ if (deal.stage_key === targetStage) return;
3513
3556
  queryClient.setQueriesData({ queryKey: dealKeys.lists() }, (old) => {
3514
3557
  if (!old) return old;
3515
3558
  return {
3516
3559
  ...old,
3517
- data: old.data.map((d) => d.id === deal.id ? { ...d, cached_stage: targetStage } : d)
3560
+ data: old.data.map((d) => d.id === deal.id ? { ...d, stage_key: targetStage } : d)
3518
3561
  };
3519
3562
  });
3520
- syncStage.mutate({ dealId: deal.id, stage: targetStage });
3563
+ transitionItem.mutate({ dealId: deal.id, pipelineKey: "default", stageKey: targetStage });
3521
3564
  },
3522
- [queryClient, syncStage]
3565
+ [queryClient, transitionItem]
3523
3566
  );
3524
3567
  const handleDragEnd = useCallback(() => {
3525
3568
  draggingDealRef.current = null;
@@ -3695,4 +3738,4 @@ function NotificationBell({ unreadCount, onNavigate }) {
3695
3738
  ] });
3696
3739
  }
3697
3740
 
3698
- export { AbsoluteScheduleForm, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, Breadcrumbs, Can, CommandViewEdge, CommandViewGraph, CommandViewNode, CrashErrorFallback, CreateApiKeyModal, CreateRoleModal, CreateScheduleModal, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDrawer, DealKanbanCard, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, EditApiKeyModal, ErrorReportCard, KanbanBoard, MdxRenderer, NoAccessState, NotificationBell, NotificationPanel, PermissionMatrix, RecurringScheduleForm, RelativeScheduleForm, RichTextEditor, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, TaskScheduler, buildErrorReport, mdxComponents };
3741
+ export { AbsoluteScheduleForm, ApiKeyDisplayModal, ApiKeyList, ApiKeySettings, AppErrorBoundary, Breadcrumbs, Can, CommandViewEdge, CommandViewGraph, CommandViewNode, CrashErrorFallback, CreateApiKeyModal, CreateRoleModal, CreateScheduleModal, DEAL_STAGES, DEFAULT_KANBAN_CONFIG, DealDrawer, DealKanbanCard, DeleteScheduleModal, DeploymentDetailModal, DeploymentList, DeploymentSettings, DeploymentStatusBadge, EditApiKeyModal, ErrorReportCard, KanbanBoard, MdxRenderer, NoAccessState, NotificationBell, NotificationPanel, PermissionMatrix, RecurringScheduleForm, RelativeScheduleForm, RichTextEditor, ScheduleCard, ScheduleDetailModal, ScheduleTypeSelector, TaskScheduler, buildErrorReport, mdxComponents };
@@ -1,8 +1,8 @@
1
1
  export { useBreadcrumbs } from '../../chunk-DDZOHLHB.js';
2
2
  import '../../chunk-LJWV4TWV.js';
3
3
  import '../../chunk-Q7DJKLEN.js';
4
- import '../../chunk-SQ5JGELM.js';
5
- import '../../chunk-6IA2OMAE.js';
4
+ import '../../chunk-ZDKQNQ4X.js';
5
+ import '../../chunk-HC2KV6BU.js';
6
6
  import '../../chunk-HQ7M6PBW.js';
7
7
  import '../../chunk-RNP5R5I3.js';
8
8
  import '../../chunk-DK2HVHCY.js';