@elevasis/ui 2.11.0 → 2.12.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 (39) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/{chunk-BSCTPKXM.js → chunk-235RO24Z.js} +1 -1
  3. package/dist/{chunk-TNOIOBYI.js → chunk-7PLBPEBW.js} +2 -2
  4. package/dist/{chunk-KDAOCM66.js → chunk-ETWKPFOO.js} +1 -1
  5. package/dist/{chunk-XYSMBMAR.js → chunk-F6SMVMFC.js} +2 -2
  6. package/dist/{chunk-BLQLWIOW.js → chunk-GHCYUZZE.js} +8 -8
  7. package/dist/{chunk-23PZ57GB.js → chunk-ISVFJCPP.js} +1 -1
  8. package/dist/{chunk-AQDBRRZD.js → chunk-MISBW6WW.js} +1 -1
  9. package/dist/{chunk-DJBORKTR.js → chunk-PXFV47B3.js} +1 -1
  10. package/dist/{chunk-BDENEI4Q.js → chunk-TXZXMTZB.js} +135 -90
  11. package/dist/{chunk-24UMQV5B.js → chunk-TYWZABTP.js} +65 -43
  12. package/dist/{chunk-DOFVHWAP.js → chunk-WM7JTTPX.js} +22 -1
  13. package/dist/{chunk-L34DFR2K.js → chunk-ZKCQEHEJ.js} +3 -3
  14. package/dist/components/index.d.ts +172 -0
  15. package/dist/components/index.js +15 -15
  16. package/dist/features/auth/index.d.ts +85 -0
  17. package/dist/features/crm/index.d.ts +87 -0
  18. package/dist/features/crm/index.js +4 -4
  19. package/dist/features/dashboard/index.js +4 -4
  20. package/dist/features/delivery/index.d.ts +132 -26
  21. package/dist/features/delivery/index.js +4 -4
  22. package/dist/features/lead-gen/index.js +7 -7
  23. package/dist/features/monitoring/index.js +5 -5
  24. package/dist/features/operations/index.js +6 -6
  25. package/dist/features/settings/index.d.ts +85 -0
  26. package/dist/features/settings/index.js +5 -5
  27. package/dist/hooks/index.d.ts +197 -2
  28. package/dist/hooks/index.js +3 -3
  29. package/dist/hooks/published.d.ts +197 -2
  30. package/dist/hooks/published.js +3 -3
  31. package/dist/index.d.ts +197 -2
  32. package/dist/index.js +4 -4
  33. package/dist/initialization/index.d.ts +85 -0
  34. package/dist/profile/index.d.ts +85 -0
  35. package/dist/provider/index.js +2 -2
  36. package/dist/supabase/index.d.ts +166 -0
  37. package/dist/theme/index.js +2 -2
  38. package/dist/types/index.d.ts +86 -1
  39. package/package.json +3 -3
package/dist/app/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ElevasisUIProvider } from '../chunk-DJBORKTR.js';
2
- import '../chunk-24UMQV5B.js';
1
+ import { ElevasisUIProvider } from '../chunk-PXFV47B3.js';
2
+ import '../chunk-TYWZABTP.js';
3
3
  import '../chunk-F4TPY6YL.js';
4
4
  import '../chunk-R7WLWGPO.js';
5
5
  import '../chunk-SZHARWKU.js';
@@ -3,7 +3,7 @@ import { CustomModal } from './chunk-GBMNCNHX.js';
3
3
  import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-STZJ7SY5.js';
4
4
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
5
5
  import { formatDuration } from './chunk-GHIPBT5V.js';
6
- import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-DOFVHWAP.js';
6
+ import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-WM7JTTPX.js';
7
7
  import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
8
8
  import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-SQQGLGHW.js';
9
9
  import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
@@ -1,11 +1,11 @@
1
- import { ResourceExecuteDialog } from './chunk-L34DFR2K.js';
1
+ import { ResourceExecuteDialog } from './chunk-ZKCQEHEJ.js';
2
2
  import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
3
3
  import { PageContainer } from './chunk-BZZCNLT6.js';
4
4
  import { SubshellNavItem } from './chunk-CEWTOKE7.js';
5
5
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
7
7
  import { CustomModal } from './chunk-GBMNCNHX.js';
8
- import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-DOFVHWAP.js';
8
+ import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-WM7JTTPX.js';
9
9
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
10
10
  import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-SQQGLGHW.js';
11
11
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
@@ -1,4 +1,4 @@
1
- import { usePresetsContext } from './chunk-24UMQV5B.js';
1
+ import { usePresetsContext } from './chunk-TYWZABTP.js';
2
2
  import { useMemo } from 'react';
3
3
 
4
4
  var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
@@ -1,8 +1,8 @@
1
1
  import { FilterBar } from './chunk-PDHTXPSF.js';
2
2
  import { CustomModal } from './chunk-GBMNCNHX.js';
3
3
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
4
- import { useAvailablePresets } from './chunk-KDAOCM66.js';
5
- import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-DOFVHWAP.js';
4
+ import { useAvailablePresets } from './chunk-ETWKPFOO.js';
5
+ import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-WM7JTTPX.js';
6
6
  import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-SQQGLGHW.js';
7
7
  import { formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-IOKL7BKE.js';
8
8
  import { useInitialization } from './chunk-TUXTSEAF.js';
@@ -2,10 +2,10 @@ import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
2
2
  import { useCyberColors, HeroStatsRow } from './chunk-STZJ7SY5.js';
3
3
  import { AppShellCenteredContainer, AppShellLoader } from './chunk-YEX4MQSY.js';
4
4
  import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-GHIPBT5V.js';
5
- import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-DOFVHWAP.js';
5
+ import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-WM7JTTPX.js';
6
6
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
7
7
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
8
- import { glassBase } from './chunk-24UMQV5B.js';
8
+ import { glassBase } from './chunk-TYWZABTP.js';
9
9
  import { GlowDot, CardHeader, EmptyState, PageTitleCaption, TabCountBadge } from './chunk-SQQGLGHW.js';
10
10
  import { ResourceStatusColors } from './chunk-ELJIFLCB.js';
11
11
  import { formatTimeAgo, formatRelativeTime } from './chunk-IOKL7BKE.js';
@@ -16,6 +16,7 @@ import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
16
16
  import { Position, Handle, getSmoothStepPath, BaseEdge as BaseEdge$1, EdgeLabelRenderer, Panel, useReactFlow, Controls, ReactFlowProvider, ReactFlow } from '@xyflow/react';
17
17
  import { IconPlayerPlay, IconPlayerStop, IconArrowsSplit, IconSquare, IconFocus2, IconArrowUpRight, IconLayoutDashboard, IconActivity, IconAlertTriangle, IconHandStop, IconCalendarEvent, IconCircleCheck, IconBrain, IconGitBranch } from '@tabler/icons-react';
18
18
  import '@xyflow/react/dist/style.css';
19
+ import { z } from 'zod';
19
20
  import { notifications } from '@mantine/notifications';
20
21
  import { useForm } from '@mantine/form';
21
22
  import '@mantine/charts/styles.css';
@@ -1398,6 +1399,7 @@ function ZodFormRenderer({
1398
1399
  /* @__PURE__ */ jsx(Button, { type: "submit", loading: isPending, fullWidth: true, children: submitLabel })
1399
1400
  ] }) });
1400
1401
  }
1402
+ var isZodSchema = (value) => value instanceof z.ZodType;
1401
1403
  function RunResourceButton({
1402
1404
  resourceId,
1403
1405
  resourceType,
@@ -1439,12 +1441,10 @@ function RunResourceButton({
1439
1441
  );
1440
1442
  const handleClick = useCallback(() => {
1441
1443
  const result = getInput();
1442
- if ("schema" in result) {
1443
- const withSchema = result;
1444
- setModalState({
1445
- schema: withSchema.schema,
1446
- defaults: "defaults" in result ? result.defaults : void 0
1447
- });
1444
+ const maybeSchema = result.schema;
1445
+ if (isZodSchema(maybeSchema)) {
1446
+ const defaults = result.defaults;
1447
+ setModalState({ schema: maybeSchema, defaults });
1448
1448
  } else {
1449
1449
  void handleExecute(result);
1450
1450
  }
@@ -1,5 +1,5 @@
1
1
  import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-STZJ7SY5.js';
2
- import { useResourcesHealth } from './chunk-DOFVHWAP.js';
2
+ import { useResourcesHealth } from './chunk-WM7JTTPX.js';
3
3
  import { getTimeRangeDates, formatBucketTime } from './chunk-LXHZYSMQ.js';
4
4
  import { CardHeader, EmptyState } from './chunk-SQQGLGHW.js';
5
5
  import { Paper, Center, Loader, Group } from '@mantine/core';
@@ -4,7 +4,7 @@ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
4
4
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
5
5
  import { FilterBar } from './chunk-PDHTXPSF.js';
6
6
  import { CustomModal } from './chunk-GBMNCNHX.js';
7
- import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-DOFVHWAP.js';
7
+ import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-WM7JTTPX.js';
8
8
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
9
  import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-SQQGLGHW.js';
10
10
  import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-IOKL7BKE.js';
@@ -1,4 +1,4 @@
1
- import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-24UMQV5B.js';
1
+ import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-TYWZABTP.js';
2
2
  import { AppBackground } from './chunk-F4TPY6YL.js';
3
3
  import { ElevasisCoreProvider } from './chunk-R7WLWGPO.js';
4
4
  import { ElevasisLoader } from './chunk-SZHARWKU.js';
@@ -5,19 +5,92 @@ import { SubshellNavItem } from './chunk-CEWTOKE7.js';
5
5
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
7
7
  import { CustomModal } from './chunk-GBMNCNHX.js';
8
- import { useCreateTask, useCreateMilestone, useProjectMilestones, useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProjectRealtime, useProject, useProjectTasks, useProjectNotes, useUpdateMilestone, useProjectActivities, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-DOFVHWAP.js';
8
+ import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProjectRealtime, useProject, useProjectTasks, useProjectNotes, useUpdateMilestone, useProjectActivities, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-WM7JTTPX.js';
9
9
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
10
10
  import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-SQQGLGHW.js';
11
11
  import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-IOKL7BKE.js';
12
12
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
13
13
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
14
14
  import { useState, useMemo, useCallback } from 'react';
15
- import { Modal, Stack, Title, TextInput, Textarea, Select, Group, Button, SimpleGrid, Card, ThemeIcon, Text, RingProgress, Paper, Timeline, Badge, Collapse, ActionIcon, Center, Loader, Table, Checkbox, Pagination, Alert, CopyButton, Tooltip, Divider, Tabs, Anchor, Chip } from '@mantine/core';
16
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
- import { IconNotes, IconBriefcase, IconChecklist, IconFlag, IconHeartbeat, IconFileText, IconCalendar, IconInbox, IconLock, IconAlertTriangle, IconCircleCheck, IconClock, IconChevronDown, IconChevronRight, IconDownload, IconListCheck, IconMessageCircle, IconSearch, IconArrowLeft, IconCheck, IconCopy, IconX, IconPlus, IconTerminal2, IconCurrencyDollar, IconBuilding } from '@tabler/icons-react';
15
+ import { Stack, Text, Group, Checkbox, ActionIcon, TextInput, Button, Modal, Title, Textarea, Select, SimpleGrid, Card, ThemeIcon, RingProgress, Paper, Timeline, Badge, Collapse, Center, Loader, Table, Pagination, Alert, CopyButton, Tooltip, Divider, Tabs, Anchor, Chip } from '@mantine/core';
16
+ import { IconNotes, IconBriefcase, IconChecklist, IconFlag, IconX, IconPlus, IconHeartbeat, IconFileText, IconCalendar, IconInbox, IconLock, IconAlertTriangle, IconCircleCheck, IconClock, IconChevronDown, IconChevronRight, IconDownload, IconListCheck, IconMessageCircle, IconSearch, IconArrowLeft, IconCheck, IconCopy, IconTerminal2, IconCurrencyDollar, IconBuilding } from '@tabler/icons-react';
17
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
18
18
  import { useDisclosure, useClipboard } from '@mantine/hooks';
19
19
  import { useQueryClient, useMutation } from '@tanstack/react-query';
20
20
 
21
+ function Checklist({ items, onToggle, onAdd, onRemove }) {
22
+ const [adding, setAdding] = useState(false);
23
+ const [newItemLabel, setNewItemLabel] = useState("");
24
+ function commitAdd() {
25
+ const label = newItemLabel.trim();
26
+ if (label) onAdd(label);
27
+ setNewItemLabel("");
28
+ }
29
+ const completedCount = items.filter((item) => item.completed).length;
30
+ return /* @__PURE__ */ jsxs(Stack, { gap: "xs", mt: "sm", children: [
31
+ items.length > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
32
+ completedCount,
33
+ "/",
34
+ items.length,
35
+ " complete"
36
+ ] }),
37
+ items.map((item) => /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
38
+ /* @__PURE__ */ jsx(
39
+ Checkbox,
40
+ {
41
+ size: "xs",
42
+ checked: item.completed,
43
+ onChange: () => onToggle(item.id),
44
+ label: /* @__PURE__ */ jsx(
45
+ Text,
46
+ {
47
+ size: "sm",
48
+ td: item.completed ? "line-through" : void 0,
49
+ c: item.completed ? "dimmed" : "var(--color-text-subtle)",
50
+ children: item.label
51
+ }
52
+ ),
53
+ styles: { input: { cursor: "pointer" }, label: { cursor: "pointer" } }
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "xs", onClick: () => onRemove(item.id), style: { opacity: 0.4 }, children: /* @__PURE__ */ jsx(IconX, { size: 12 }) })
57
+ ] }, item.id)),
58
+ adding ? /* @__PURE__ */ jsx(
59
+ TextInput,
60
+ {
61
+ size: "xs",
62
+ placeholder: "Item label...",
63
+ value: newItemLabel,
64
+ onChange: (event) => setNewItemLabel(event.target.value),
65
+ onKeyDown: (event) => {
66
+ if (event.key === "Enter") {
67
+ commitAdd();
68
+ setAdding(false);
69
+ }
70
+ if (event.key === "Escape") {
71
+ setNewItemLabel("");
72
+ setAdding(false);
73
+ }
74
+ },
75
+ onBlur: () => {
76
+ if (newItemLabel.trim()) commitAdd();
77
+ setAdding(false);
78
+ },
79
+ autoFocus: true,
80
+ style: { maxWidth: 250 }
81
+ }
82
+ ) : /* @__PURE__ */ jsx(Group, { children: /* @__PURE__ */ jsx(
83
+ Button,
84
+ {
85
+ variant: "subtle",
86
+ size: "compact-xs",
87
+ leftSection: /* @__PURE__ */ jsx(IconPlus, { size: 12 }),
88
+ onClick: () => setAdding(true),
89
+ children: "Add item"
90
+ }
91
+ ) })
92
+ ] });
93
+ }
21
94
  var TASK_TYPE_OPTIONS = [
22
95
  { value: "documentation", label: "Documentation" },
23
96
  { value: "code", label: "Code" },
@@ -355,7 +428,20 @@ function MilestoneTimeline({ milestones, tasks }) {
355
428
  );
356
429
  }) }) });
357
430
  }
431
+ function parseChecklist(task) {
432
+ const raw = task.checklist;
433
+ if (!Array.isArray(raw)) return [];
434
+ return raw;
435
+ }
358
436
  function TaskCard({ task }) {
437
+ const { mutate: updateTask } = useUpdateTask();
438
+ const items = parseChecklist(task);
439
+ function saveChecklist(updated) {
440
+ const updates = {
441
+ checklist: updated
442
+ };
443
+ updateTask({ id: task.id, updates });
444
+ }
359
445
  return /* @__PURE__ */ jsx(Card, { withBorder: true, radius: "sm", p: "sm", children: /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
360
446
  /* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "nowrap", children: [
361
447
  /* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", style: { minWidth: 0 }, children: [
@@ -381,7 +467,22 @@ function TaskCard({ task }) {
381
467
  task.due_date && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
382
468
  "Due ",
383
469
  new Date(task.due_date).toLocaleDateString()
384
- ] })
470
+ ] }),
471
+ items.length > 0 && /* @__PURE__ */ jsx(
472
+ Checklist,
473
+ {
474
+ items,
475
+ onToggle: (itemId) => {
476
+ saveChecklist(items.map((item) => item.id === itemId ? { ...item, completed: !item.completed } : item));
477
+ },
478
+ onAdd: (label) => {
479
+ saveChecklist([...items, { id: crypto.randomUUID(), label, completed: false }]);
480
+ },
481
+ onRemove: (itemId) => {
482
+ saveChecklist(items.filter((item) => item.id !== itemId));
483
+ }
484
+ }
485
+ )
385
486
  ] }) });
386
487
  }
387
488
  var ProjectsSidebarTop = () => {
@@ -877,7 +978,9 @@ function InlineResumeContextEditor({ task, projectId }) {
877
978
  autosize: true,
878
979
  value: currentState,
879
980
  onChange: (e) => setCurrentState(e.target.value),
880
- onBlur: () => save({ current_state: currentState || void 0 })
981
+ onBlur: () => {
982
+ if (currentState !== (ctx.current_state ?? "")) save({ current_state: currentState });
983
+ }
881
984
  }
882
985
  ),
883
986
  /* @__PURE__ */ jsx(
@@ -890,7 +993,9 @@ function InlineResumeContextEditor({ task, projectId }) {
890
993
  autosize: true,
891
994
  value: nextSteps,
892
995
  onChange: (e) => setNextSteps(e.target.value),
893
- onBlur: () => save({ next_steps: nextSteps || void 0 })
996
+ onBlur: () => {
997
+ if (nextSteps !== (ctx.next_steps ?? "")) save({ next_steps: nextSteps });
998
+ }
894
999
  }
895
1000
  ),
896
1001
  /* @__PURE__ */ jsx(
@@ -903,7 +1008,10 @@ function InlineResumeContextEditor({ task, projectId }) {
903
1008
  autosize: true,
904
1009
  value: filesModified,
905
1010
  onChange: (e) => setFilesModified(e.target.value),
906
- onBlur: () => save({ files_modified: filesModified || void 0 })
1011
+ onBlur: () => {
1012
+ const original = typeof ctx.files_modified === "string" ? ctx.files_modified : "";
1013
+ if (filesModified !== original) save({ files_modified: filesModified });
1014
+ }
907
1015
  }
908
1016
  )
909
1017
  ] }) })
@@ -915,16 +1023,14 @@ var noteTypeOptions = [
915
1023
  { value: "issue", label: "Issue" },
916
1024
  { value: "blocker", label: "Blocker" }
917
1025
  ];
918
- function parseChecklist(milestone) {
1026
+ function parseChecklist2(milestone) {
919
1027
  const raw = milestone.checklist;
920
1028
  if (!Array.isArray(raw)) return [];
921
1029
  return raw;
922
1030
  }
923
1031
  function MilestoneChecklist({ milestone }) {
924
- const items = parseChecklist(milestone);
1032
+ const items = parseChecklist2(milestone);
925
1033
  const { mutate: updateMilestone } = useUpdateMilestone();
926
- const [newItemLabel, setNewItemLabel] = useState("");
927
- const [adding, setAdding] = useState(false);
928
1034
  function saveChecklist(updated) {
929
1035
  const allComplete = updated.length > 0 && updated.every((item) => item.completed);
930
1036
  const wasComplete = milestone.status === "completed";
@@ -940,84 +1046,23 @@ function MilestoneChecklist({ milestone }) {
940
1046
  }
941
1047
  updateMilestone({ id: milestone.id, updates });
942
1048
  }
943
- function toggleItem(itemId) {
944
- const updated = items.map((item) => item.id === itemId ? { ...item, completed: !item.completed } : item);
945
- saveChecklist(updated);
946
- }
947
- function addItem() {
948
- const label = newItemLabel.trim();
949
- if (!label) return;
950
- const newItem = { id: crypto.randomUUID(), label, completed: false };
951
- saveChecklist([...items, newItem]);
952
- setNewItemLabel("");
953
- }
954
- function removeItem(itemId) {
955
- saveChecklist(items.filter((item) => item.id !== itemId));
956
- }
957
- const completedCount = items.filter((item) => item.completed).length;
958
- return /* @__PURE__ */ jsxs(Stack, { gap: "xs", mt: "sm", children: [
959
- items.length > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
960
- completedCount,
961
- "/",
962
- items.length,
963
- " complete"
964
- ] }),
965
- items.map((item) => /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
966
- /* @__PURE__ */ jsx(
967
- Checkbox,
968
- {
969
- size: "xs",
970
- checked: item.completed,
971
- onChange: () => toggleItem(item.id),
972
- label: /* @__PURE__ */ jsx(
973
- Text,
974
- {
975
- size: "sm",
976
- td: item.completed ? "line-through" : void 0,
977
- c: item.completed ? "dimmed" : "var(--color-text-subtle)",
978
- children: item.label
979
- }
980
- ),
981
- styles: { input: { cursor: "pointer" }, label: { cursor: "pointer" } }
982
- }
983
- ),
984
- /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "xs", onClick: () => removeItem(item.id), style: { opacity: 0.4 }, children: /* @__PURE__ */ jsx(IconX, { size: 12 }) })
985
- ] }, item.id)),
986
- adding ? /* @__PURE__ */ jsx(
987
- TextInput,
988
- {
989
- size: "xs",
990
- placeholder: "Item label...",
991
- value: newItemLabel,
992
- onChange: (event) => setNewItemLabel(event.target.value),
993
- onKeyDown: (event) => {
994
- if (event.key === "Enter") {
995
- addItem();
996
- setAdding(false);
997
- }
998
- if (event.key === "Escape") {
999
- setNewItemLabel("");
1000
- setAdding(false);
1001
- }
1002
- },
1003
- onBlur: () => {
1004
- if (newItemLabel.trim()) addItem();
1005
- setAdding(false);
1006
- },
1007
- autoFocus: true,
1008
- style: { maxWidth: 250 }
1009
- }
1010
- ) : /* @__PURE__ */ jsx(Group, { children: /* @__PURE__ */ jsx(
1011
- Button,
1012
- {
1013
- variant: "subtle",
1014
- size: "compact-xs",
1015
- leftSection: /* @__PURE__ */ jsx(IconPlus, { size: 12 }),
1016
- onClick: () => setAdding(true),
1017
- children: "Add item"
1049
+ return /* @__PURE__ */ jsx(
1050
+ Checklist,
1051
+ {
1052
+ items,
1053
+ onToggle: (itemId) => {
1054
+ const updated = items.map((item) => item.id === itemId ? { ...item, completed: !item.completed } : item);
1055
+ saveChecklist(updated);
1056
+ },
1057
+ onAdd: (label) => {
1058
+ const newItem = { id: crypto.randomUUID(), label, completed: false };
1059
+ saveChecklist([...items, newItem]);
1060
+ },
1061
+ onRemove: (itemId) => {
1062
+ saveChecklist(items.filter((item) => item.id !== itemId));
1018
1063
  }
1019
- ) })
1020
- ] });
1064
+ }
1065
+ );
1021
1066
  }
1022
1067
  function AddNoteModal({ opened, onClose, projectId }) {
1023
1068
  const [noteType, setNoteType] = useState("call_note");
@@ -1460,4 +1505,4 @@ function ProjectDetailPage({ projectId, onBack, backLabel = "Projects" }) {
1460
1505
  ] }) }) });
1461
1506
  }
1462
1507
 
1463
- export { AllTasksPage, CreateDeliveryEntityModal, DELIVERY_COMMUNICATION_ITEMS, DELIVERY_PROJECT_ITEMS, DELIVERY_WORK_ITEMS, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
1508
+ export { AllTasksPage, Checklist, CreateDeliveryEntityModal, DELIVERY_COMMUNICATION_ITEMS, DELIVERY_PROJECT_ITEMS, DELIVERY_WORK_ITEMS, HealthStatusCard, MilestoneTimeline, ProjectDetailPage, ProjectsListPage, ProjectsSidebar, ProjectsSidebarMiddle, ProjectsSidebarTop, TaskCard, UpcomingMilestonesPage, calculateProgress, deliveryManifest, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };