@elevasis/ui 2.23.0 → 2.25.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.
- package/dist/app/index.d.ts +2915 -0
- package/dist/app/index.js +5 -4
- package/dist/{chunk-7PGEGSUM.js → chunk-7D2HSSIW.js} +2 -2
- package/dist/{chunk-YU6MBDVO.js → chunk-ABV5LDDC.js} +4 -68
- package/dist/chunk-AZXSFDG2.js +474 -0
- package/dist/{chunk-6IA2OMAE.js → chunk-HC2KV6BU.js} +9 -0
- package/dist/{chunk-PXGSJNBH.js → chunk-HVC2BTFO.js} +783 -374
- package/dist/{chunk-3HEUGBOT.js → chunk-LK4MPIMK.js} +2 -2
- package/dist/{chunk-XOTJNW4Q.js → chunk-QIW6OCEI.js} +18 -1
- package/dist/{chunk-GUJUK6EH.js → chunk-QJLRDTYS.js} +198 -2
- package/dist/{chunk-QZJM3RYI.js → chunk-SNHGSCKH.js} +1 -1
- package/dist/{chunk-FXWETLEB.js → chunk-V3UOW2HG.js} +1 -1
- package/dist/{chunk-N6WLOWOD.js → chunk-WSC5LU3U.js} +3 -12
- package/dist/{chunk-EPV7NU2E.js → chunk-WWVSPOJY.js} +385 -188
- package/dist/{chunk-SQ5JGELM.js → chunk-ZDKQNQ4X.js} +19 -1
- package/dist/{chunk-PTUOINQ2.js → chunk-ZGZZIR6K.js} +3 -3
- package/dist/{chunk-D3KQAABP.js → chunk-ZMXZ476Y.js} +1 -1
- package/dist/components/index.d.ts +488 -452
- package/dist/components/index.js +127 -22
- package/dist/components/navigation/index.js +2 -2
- package/dist/features/auth/index.d.ts +463 -377
- package/dist/features/crm/index.d.ts +459 -379
- package/dist/features/crm/index.js +8 -8
- package/dist/features/dashboard/index.js +8 -8
- package/dist/features/delivery/index.d.ts +457 -371
- package/dist/features/delivery/index.js +8 -8
- package/dist/features/lead-gen/index.d.ts +225 -65
- package/dist/features/lead-gen/index.js +8 -8
- package/dist/features/monitoring/index.js +9 -9
- package/dist/features/monitoring/requests/index.js +7 -7
- package/dist/features/operations/index.js +10 -10
- package/dist/features/settings/index.d.ts +463 -377
- package/dist/features/settings/index.js +9 -9
- package/dist/hooks/delivery/index.d.ts +457 -371
- package/dist/hooks/index.d.ts +957 -718
- package/dist/hooks/index.js +7 -7
- package/dist/hooks/published.d.ts +957 -718
- package/dist/hooks/published.js +7 -7
- package/dist/index.d.ts +1327 -1020
- package/dist/index.js +8 -8
- package/dist/initialization/index.d.ts +463 -377
- package/dist/organization/index.d.ts +11 -1
- package/dist/organization/index.js +2 -2
- package/dist/profile/index.d.ts +463 -377
- package/dist/provider/index.d.ts +3132 -169
- package/dist/provider/index.js +6 -6
- package/dist/provider/published.d.ts +3098 -168
- package/dist/provider/published.js +3 -3
- package/dist/supabase/index.d.ts +559 -389
- package/dist/test-utils/index.d.ts +21 -1
- package/dist/test-utils/index.js +13 -4
- package/dist/theme/index.js +2 -2
- package/dist/types/index.d.ts +463 -377
- package/package.json +2 -2
- package/src/test-utils/README.md +2 -0
- package/dist/chunk-LVUCBY7X.js +0 -127
- /package/dist/{chunk-ZBCTB5CA.js → chunk-EIOJNUPL.js} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
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-
|
|
4
|
-
export { LEAD_GEN_ROUTE_LINKS,
|
|
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-
|
|
3
|
+
export { AllTasksPage, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors } from '../chunk-WSC5LU3U.js';
|
|
4
|
+
export { LEAD_GEN_ROUTE_LINKS, LeadGenCompaniesPage, LeadGenContactsPage, LeadGenListDetailPage, LeadGenListsPage, LeadGenOverviewPage, LeadGenRouteShell, LeadGenSidebar, LeadGenSidebarMiddle, LeadGenSidebarTop, getEnrichmentColor, getStatusColor, leadGenManifest, useDeleteLists } from '../chunk-HVC2BTFO.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-ABV5LDDC.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-
|
|
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-
|
|
9
|
+
import { BaseNode, useGraphTheme, BaseEdge, GraphBackground, GraphLegend, GraphFitViewButton } from '../chunk-7D2HSSIW.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-7D2HSSIW.js';
|
|
11
11
|
import '../chunk-442LZPIR.js';
|
|
12
|
-
import { NotificationList } from '../chunk-
|
|
13
|
-
export { ActivityCard, ActivityFilters as ActivityFiltersBar, ActivityTable, BusinessImpactCard, CostBreakdownCard, CostByModelTable, CostMetricsCard, ErrorAnalysisCard, ErrorBreakdownTable, ExecutionBreakdownTable, ExecutionHealthCard, ExecutionLogsFilters as ExecutionLogsFilterBar, ExecutionLogsTable, NotificationItem, NotificationList, monitoringManifest } from '../chunk-
|
|
14
|
-
export { ResourceHealthPanel } from '../chunk-
|
|
12
|
+
import { NotificationList } from '../chunk-V3UOW2HG.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-V3UOW2HG.js';
|
|
14
|
+
export { ResourceHealthPanel } from '../chunk-ZMXZ476Y.js';
|
|
15
15
|
export { ResourceHealthChart, getHealthColor } from '../chunk-LGKLC5MG.js';
|
|
16
16
|
import '../chunk-TSSKOQBX.js';
|
|
17
17
|
export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../chunk-BIWHHWCJ.js';
|
|
18
|
-
import { showAuthError } from '../chunk-
|
|
19
|
-
export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipFeaturePanel, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, WebhookUrlDisplayModal, settingsManifest, showAuthError } from '../chunk-
|
|
18
|
+
import { showAuthError } from '../chunk-ZGZZIR6K.js';
|
|
19
|
+
export { CreateCredentialModal, CredentialList, CredentialSettings, MembershipFeaturePanel, MembershipStatusBadge, OAuthConnectModal, OrganizationMembershipsList, WebhookUrlDisplayModal, settingsManifest, showAuthError } from '../chunk-ZGZZIR6K.js';
|
|
20
20
|
import { AppShellLoader } from '../chunk-M25JL54Z.js';
|
|
21
|
-
|
|
21
|
+
import { ActionFormButton, ActionButton } from '../chunk-WWVSPOJY.js';
|
|
22
|
+
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-WWVSPOJY.js';
|
|
22
23
|
import '../chunk-BZZCNLT6.js';
|
|
23
24
|
export { SortableHeader, TableSelectionToolbar } from '../chunk-TUMSNGTX.js';
|
|
24
25
|
import '../chunk-CEWTOKE7.js';
|
|
@@ -27,10 +28,10 @@ import { FilterBar } from '../chunk-PDHTXPSF.js';
|
|
|
27
28
|
export { FilterBar } from '../chunk-PDHTXPSF.js';
|
|
28
29
|
import { CustomModal } from '../chunk-KVJ3LFH2.js';
|
|
29
30
|
export { ConfirmationInputModal, ConfirmationModal, CustomModal } from '../chunk-KVJ3LFH2.js';
|
|
30
|
-
import '../chunk-
|
|
31
|
+
import '../chunk-SNHGSCKH.js';
|
|
31
32
|
export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-E4WQGJNS.js';
|
|
32
33
|
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,
|
|
34
|
+
import { useCommandViewLayout, useOrganizationPermissions, useCreateOrgRole, usePermissionCatalog, useUpdateApiKey, useDeleteApiKey, useCreateApiKey, useListApiKeys, usePaginationState, useActivateDeployment, useDeactivateDeployment, useDeleteDeployment, useListDeployments, useResources, useCreateSchedule, useListSchedules, usePauseSchedule, useResumeSchedule, useCancelSchedule, useDeleteSchedule, useDealNotes, useCreateDealNote, useTransitionState, useTransitionItem, useDeals, dealKeys, useMarkAllAsRead, useNotifications } from '../chunk-QJLRDTYS.js';
|
|
34
35
|
import '../chunk-BRXELOHC.js';
|
|
35
36
|
import '../chunk-QSTH6T77.js';
|
|
36
37
|
import { showSuccessNotification, showErrorNotification, showApiErrorNotification } from '../chunk-Z6FAH4XV.js';
|
|
@@ -38,12 +39,12 @@ export { showApiErrorNotification, showErrorNotification, showInfoNotification,
|
|
|
38
39
|
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, GRAPH_CONSTANTS } from '../chunk-22UVE3RA.js';
|
|
39
40
|
export { Graph_module_css_default as graphStyles } from '../chunk-22UVE3RA.js';
|
|
40
41
|
import '../chunk-3ZMAGTWF.js';
|
|
41
|
-
import '../chunk-
|
|
42
|
-
import '../chunk-
|
|
43
|
-
import '../chunk-
|
|
42
|
+
import '../chunk-EIOJNUPL.js';
|
|
43
|
+
import '../chunk-LK4MPIMK.js';
|
|
44
|
+
import '../chunk-QIW6OCEI.js';
|
|
44
45
|
import '../chunk-WLOQ4IBG.js';
|
|
45
46
|
import '../chunk-AXXTN44Z.js';
|
|
46
|
-
import '../chunk-
|
|
47
|
+
import { useCrmActions, deriveActions, CRM_PIPELINE_DEFINITION, getValidStatesForStage } from '../chunk-AZXSFDG2.js';
|
|
47
48
|
import '../chunk-LJWV4TWV.js';
|
|
48
49
|
import { SubshellContentContainer } from '../chunk-TKAYX2SP.js';
|
|
49
50
|
import { ListSkeleton, EmptyState, PageTitleCaption, StatCard, CenteredErrorState, CardHeader, ActivityTimeline } from '../chunk-XUYBOO32.js';
|
|
@@ -54,8 +55,8 @@ export { NavigationButton } from '../chunk-NYBEU5TE.js';
|
|
|
54
55
|
import '../chunk-T6INEVX6.js';
|
|
55
56
|
import '../chunk-2IFYDILW.js';
|
|
56
57
|
import { useRouterContext } from '../chunk-Q7DJKLEN.js';
|
|
57
|
-
export { RoleBadge } from '../chunk-
|
|
58
|
-
import '../chunk-
|
|
58
|
+
export { RoleBadge } from '../chunk-ZDKQNQ4X.js';
|
|
59
|
+
import '../chunk-HC2KV6BU.js';
|
|
59
60
|
import { useAppearance } from '../chunk-QJ2KCHKX.js';
|
|
60
61
|
import '../chunk-HQ7M6PBW.js';
|
|
61
62
|
import '../chunk-DT3QYZVU.js';
|
|
@@ -74,7 +75,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
74
75
|
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
76
|
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
77
|
import { useForm } from '@mantine/form';
|
|
77
|
-
import { memo, forwardRef, useMemo, useImperativeHandle, useRef, useEffect, useState, useCallback } from 'react';
|
|
78
|
+
import { memo, forwardRef, useMemo, useImperativeHandle, useRef, useEffect, useState, useCallback, Component } from 'react';
|
|
78
79
|
import { z } from 'zod';
|
|
79
80
|
import { useDisclosure } from '@mantine/hooks';
|
|
80
81
|
import { useQueryClient, useQuery } from '@tanstack/react-query';
|
|
@@ -3044,6 +3045,23 @@ function CrashErrorFallback({ error, componentStack, eventId, appVersion }) {
|
|
|
3044
3045
|
}
|
|
3045
3046
|
);
|
|
3046
3047
|
}
|
|
3048
|
+
var AppErrorBoundary = class extends Component {
|
|
3049
|
+
state = { error: null, componentStack: "" };
|
|
3050
|
+
static getDerivedStateFromError(error) {
|
|
3051
|
+
return { error };
|
|
3052
|
+
}
|
|
3053
|
+
componentDidCatch(error, errorInfo) {
|
|
3054
|
+
this.setState({ componentStack: errorInfo.componentStack ?? "" });
|
|
3055
|
+
this.props.onError?.(error, errorInfo);
|
|
3056
|
+
}
|
|
3057
|
+
render() {
|
|
3058
|
+
if (this.state.error !== null) {
|
|
3059
|
+
const props = { error: this.state.error, componentStack: this.state.componentStack };
|
|
3060
|
+
return this.props.fallback ? this.props.fallback(props) : /* @__PURE__ */ jsx(CrashErrorFallback, { ...props, appVersion: this.props.appVersion });
|
|
3061
|
+
}
|
|
3062
|
+
return this.props.children;
|
|
3063
|
+
}
|
|
3064
|
+
};
|
|
3047
3065
|
function RichTextEditor({ content, onChange, placeholder }) {
|
|
3048
3066
|
const editor = useEditor({
|
|
3049
3067
|
extensions: [
|
|
@@ -3278,6 +3296,10 @@ var Breadcrumbs = (props) => {
|
|
|
3278
3296
|
}
|
|
3279
3297
|
);
|
|
3280
3298
|
};
|
|
3299
|
+
function formatStateLabel(stateKey) {
|
|
3300
|
+
if (!stateKey) return "No state";
|
|
3301
|
+
return stateKey.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
3302
|
+
}
|
|
3281
3303
|
function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
|
|
3282
3304
|
const contactFirstName = deal.contact?.first_name || "";
|
|
3283
3305
|
const contactLastName = deal.contact?.last_name || "";
|
|
@@ -3287,6 +3309,7 @@ function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
|
|
|
3287
3309
|
const hasInitialFee = typeof deal.initial_fee === "number" && deal.initial_fee > 0;
|
|
3288
3310
|
const hasMonthlyFee = typeof deal.monthly_fee === "number" && deal.monthly_fee > 0;
|
|
3289
3311
|
const stageColor = (deal.stage_key ? config[deal.stage_key]?.color : null) ?? "gray";
|
|
3312
|
+
const stateLabel = formatStateLabel(deal.state_key);
|
|
3290
3313
|
return /* @__PURE__ */ jsx(
|
|
3291
3314
|
Paper,
|
|
3292
3315
|
{
|
|
@@ -3304,6 +3327,10 @@ function DealKanbanCard({ deal, config, onClick, onDragStart, onDragEnd }) {
|
|
|
3304
3327
|
onClick: () => onClick(deal),
|
|
3305
3328
|
children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
3306
3329
|
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, lineClamp: 1, children: displayName }),
|
|
3330
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", lineClamp: 1, children: [
|
|
3331
|
+
"State: ",
|
|
3332
|
+
stateLabel
|
|
3333
|
+
] }),
|
|
3307
3334
|
companyName && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 1, children: companyName }),
|
|
3308
3335
|
/* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "wrap", children: [
|
|
3309
3336
|
hasInitialFee && /* @__PURE__ */ jsxs(Badge, { variant: "outline", size: "xs", color: "green", children: [
|
|
@@ -3327,8 +3354,14 @@ function formatStageLabel(stage) {
|
|
|
3327
3354
|
}
|
|
3328
3355
|
function DealDrawer({ deal, config, opened, onClose, renderActions }) {
|
|
3329
3356
|
const [noteBody, setNoteBody] = useState("");
|
|
3357
|
+
const [stagingStage, setStagingStage] = useState("interested");
|
|
3358
|
+
const [stagingState, setStagingState] = useState(null);
|
|
3330
3359
|
const { data: notes, isLoading: notesLoading } = useDealNotes(deal?.id ?? "");
|
|
3331
3360
|
const createNote = useCreateDealNote();
|
|
3361
|
+
const crmActions = useCrmActions();
|
|
3362
|
+
const actions = useMemo(() => deal ? deriveActions(deal, crmActions) : [], [deal, crmActions]);
|
|
3363
|
+
const transitionState = useTransitionState();
|
|
3364
|
+
const transitionItem = useTransitionItem();
|
|
3332
3365
|
if (!deal) return null;
|
|
3333
3366
|
const contactFirstName = deal.contact?.first_name || "";
|
|
3334
3367
|
const contactLastName = deal.contact?.last_name || "";
|
|
@@ -3394,7 +3427,79 @@ function DealDrawer({ deal, config, opened, onClose, renderActions }) {
|
|
|
3394
3427
|
] })
|
|
3395
3428
|
] })
|
|
3396
3429
|
] }),
|
|
3397
|
-
|
|
3430
|
+
deal.stage_key === null ? /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
3431
|
+
/* @__PURE__ */ jsx(Title, { order: 5, children: "Stage this deal" }),
|
|
3432
|
+
/* @__PURE__ */ jsx(
|
|
3433
|
+
Select,
|
|
3434
|
+
{
|
|
3435
|
+
label: "Stage",
|
|
3436
|
+
data: CRM_PIPELINE_DEFINITION.stages.map((s) => ({
|
|
3437
|
+
value: s.stageKey,
|
|
3438
|
+
label: s.label
|
|
3439
|
+
})),
|
|
3440
|
+
value: stagingStage,
|
|
3441
|
+
onChange: (val) => {
|
|
3442
|
+
setStagingStage(val ?? "interested");
|
|
3443
|
+
setStagingState(null);
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
),
|
|
3447
|
+
getValidStatesForStage(CRM_PIPELINE_DEFINITION, stagingStage).length > 0 && /* @__PURE__ */ jsx(
|
|
3448
|
+
Select,
|
|
3449
|
+
{
|
|
3450
|
+
label: "State",
|
|
3451
|
+
clearable: true,
|
|
3452
|
+
data: getValidStatesForStage(CRM_PIPELINE_DEFINITION, stagingStage).map((s) => ({
|
|
3453
|
+
value: s.stateKey,
|
|
3454
|
+
label: s.label
|
|
3455
|
+
})),
|
|
3456
|
+
value: stagingState,
|
|
3457
|
+
onChange: (val) => setStagingState(val)
|
|
3458
|
+
}
|
|
3459
|
+
),
|
|
3460
|
+
/* @__PURE__ */ jsx(Group, { justify: "flex-end", children: /* @__PURE__ */ jsx(
|
|
3461
|
+
Button,
|
|
3462
|
+
{
|
|
3463
|
+
size: "xs",
|
|
3464
|
+
variant: "light",
|
|
3465
|
+
loading: transitionItem.isPending,
|
|
3466
|
+
onClick: () => transitionItem.mutate({
|
|
3467
|
+
dealId: deal.id,
|
|
3468
|
+
pipelineKey: "crm",
|
|
3469
|
+
stageKey: stagingStage,
|
|
3470
|
+
stateKey: stagingState ?? void 0,
|
|
3471
|
+
expectedUpdatedAt: deal.updated_at
|
|
3472
|
+
}),
|
|
3473
|
+
children: "Stage deal"
|
|
3474
|
+
}
|
|
3475
|
+
) })
|
|
3476
|
+
] }) : (() => {
|
|
3477
|
+
const validStates = getValidStatesForStage(CRM_PIPELINE_DEFINITION, deal.stage_key);
|
|
3478
|
+
return validStates.length > 0 ? /* @__PURE__ */ jsx(
|
|
3479
|
+
Select,
|
|
3480
|
+
{
|
|
3481
|
+
label: "State",
|
|
3482
|
+
data: validStates.map((s) => ({ value: s.stateKey, label: s.label })),
|
|
3483
|
+
value: deal.state_key ?? null,
|
|
3484
|
+
disabled: transitionState.isPending,
|
|
3485
|
+
onChange: (val) => {
|
|
3486
|
+
if (val)
|
|
3487
|
+
transitionState.mutate({
|
|
3488
|
+
dealId: deal.id,
|
|
3489
|
+
stateKey: val,
|
|
3490
|
+
expectedUpdatedAt: deal.updated_at
|
|
3491
|
+
});
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
) : null;
|
|
3495
|
+
})(),
|
|
3496
|
+
(actions.length > 0 || renderActions) && /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
3497
|
+
/* @__PURE__ */ jsx(Title, { order: 5, children: "Actions" }),
|
|
3498
|
+
actions.length > 0 && /* @__PURE__ */ jsx(Group, { gap: "xs", wrap: "wrap", children: actions.map(
|
|
3499
|
+
(action) => action.payloadSchema ? /* @__PURE__ */ jsx(ActionFormButton, { action, dealId: deal.id }, action.key) : /* @__PURE__ */ jsx(ActionButton, { action, dealId: deal.id }, action.key)
|
|
3500
|
+
) }),
|
|
3501
|
+
renderActions && renderActions()
|
|
3502
|
+
] }),
|
|
3398
3503
|
/* @__PURE__ */ jsx(Divider, {}),
|
|
3399
3504
|
/* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
3400
3505
|
/* @__PURE__ */ jsx(Title, { order: 5, children: "Notes" }),
|
|
@@ -3702,4 +3807,4 @@ function NotificationBell({ unreadCount, onNavigate }) {
|
|
|
3702
3807
|
] });
|
|
3703
3808
|
}
|
|
3704
3809
|
|
|
3705
|
-
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 };
|
|
3810
|
+
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-
|
|
5
|
-
import '../../chunk-
|
|
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';
|