@crmy/web 0.5.5 → 0.5.6

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 (121) hide show
  1. package/dist/assets/index-CskfWp8E.js +560 -0
  2. package/dist/assets/index-D763l57m.css +1 -0
  3. package/{index.html → dist/index.html} +2 -1
  4. package/package.json +4 -1
  5. package/postcss.config.js +0 -6
  6. package/src/App.tsx +0 -158
  7. package/src/api/client.ts +0 -82
  8. package/src/api/hooks.ts +0 -689
  9. package/src/components/CustomFields.tsx +0 -240
  10. package/src/components/NavLink.tsx +0 -28
  11. package/src/components/crm/AIFab.tsx +0 -37
  12. package/src/components/crm/AccountDrawer.tsx +0 -372
  13. package/src/components/crm/ActivityTimeline.tsx +0 -115
  14. package/src/components/crm/AssignmentDrawer.tsx +0 -396
  15. package/src/components/crm/BriefingPanel.tsx +0 -217
  16. package/src/components/crm/CommandPalette.tsx +0 -254
  17. package/src/components/crm/ContactAvatar.tsx +0 -49
  18. package/src/components/crm/ContactDrawer.tsx +0 -438
  19. package/src/components/crm/ContextPanel.tsx +0 -200
  20. package/src/components/crm/CrmWidgets.tsx +0 -417
  21. package/src/components/crm/DrawerShell.tsx +0 -77
  22. package/src/components/crm/ListToolbar.tsx +0 -252
  23. package/src/components/crm/OpportunityDrawer.tsx +0 -372
  24. package/src/components/crm/PaginationBar.tsx +0 -111
  25. package/src/components/crm/QuickAddDrawer.tsx +0 -652
  26. package/src/components/crm/ShortcutsOverlay.tsx +0 -65
  27. package/src/components/crm/UseCaseDrawer.tsx +0 -454
  28. package/src/components/layout/MobileNav.tsx +0 -49
  29. package/src/components/layout/Sidebar.tsx +0 -157
  30. package/src/components/layout/TopBar.tsx +0 -54
  31. package/src/components/settings/ActorsSettings.tsx +0 -1190
  32. package/src/components/ui/accordion.tsx +0 -52
  33. package/src/components/ui/alert-dialog.tsx +0 -104
  34. package/src/components/ui/alert.tsx +0 -43
  35. package/src/components/ui/aspect-ratio.tsx +0 -5
  36. package/src/components/ui/avatar.tsx +0 -38
  37. package/src/components/ui/badge.tsx +0 -29
  38. package/src/components/ui/breadcrumb.tsx +0 -90
  39. package/src/components/ui/button.tsx +0 -47
  40. package/src/components/ui/calendar.tsx +0 -54
  41. package/src/components/ui/card.tsx +0 -43
  42. package/src/components/ui/carousel.tsx +0 -224
  43. package/src/components/ui/chart.tsx +0 -303
  44. package/src/components/ui/checkbox.tsx +0 -26
  45. package/src/components/ui/collapsible.tsx +0 -9
  46. package/src/components/ui/command.tsx +0 -132
  47. package/src/components/ui/context-menu.tsx +0 -178
  48. package/src/components/ui/date-picker.tsx +0 -313
  49. package/src/components/ui/dialog.tsx +0 -95
  50. package/src/components/ui/drawer.tsx +0 -87
  51. package/src/components/ui/dropdown-menu.tsx +0 -179
  52. package/src/components/ui/form.tsx +0 -129
  53. package/src/components/ui/hover-card.tsx +0 -27
  54. package/src/components/ui/input-otp.tsx +0 -61
  55. package/src/components/ui/input.tsx +0 -22
  56. package/src/components/ui/label.tsx +0 -17
  57. package/src/components/ui/menubar.tsx +0 -207
  58. package/src/components/ui/navigation-menu.tsx +0 -120
  59. package/src/components/ui/pagination.tsx +0 -81
  60. package/src/components/ui/popover.tsx +0 -29
  61. package/src/components/ui/progress.tsx +0 -23
  62. package/src/components/ui/radio-group.tsx +0 -36
  63. package/src/components/ui/resizable.tsx +0 -37
  64. package/src/components/ui/scroll-area.tsx +0 -38
  65. package/src/components/ui/select.tsx +0 -143
  66. package/src/components/ui/separator.tsx +0 -20
  67. package/src/components/ui/sheet.tsx +0 -107
  68. package/src/components/ui/sidebar.tsx +0 -637
  69. package/src/components/ui/skeleton.tsx +0 -7
  70. package/src/components/ui/slider.tsx +0 -23
  71. package/src/components/ui/sonner.tsx +0 -24
  72. package/src/components/ui/switch.tsx +0 -27
  73. package/src/components/ui/table.tsx +0 -72
  74. package/src/components/ui/tabs.tsx +0 -53
  75. package/src/components/ui/textarea.tsx +0 -21
  76. package/src/components/ui/toast.tsx +0 -111
  77. package/src/components/ui/toaster.tsx +0 -24
  78. package/src/components/ui/toggle-group.tsx +0 -49
  79. package/src/components/ui/toggle.tsx +0 -37
  80. package/src/components/ui/tooltip.tsx +0 -28
  81. package/src/components/ui/use-toast.ts +0 -1
  82. package/src/components/ui/utils.ts +0 -9
  83. package/src/contexts/AgentSettingsContext.tsx +0 -24
  84. package/src/hooks/use-mobile.tsx +0 -19
  85. package/src/hooks/use-toast.ts +0 -186
  86. package/src/hooks/useKeyboardShortcuts.ts +0 -95
  87. package/src/hooks/useTheme.ts +0 -24
  88. package/src/index.css +0 -245
  89. package/src/lib/entityColors.ts +0 -18
  90. package/src/lib/stageConfig.ts +0 -32
  91. package/src/lib/utils.ts +0 -6
  92. package/src/main.tsx +0 -25
  93. package/src/pages/Accounts.tsx +0 -205
  94. package/src/pages/Activities.tsx +0 -251
  95. package/src/pages/Agent.tsx +0 -237
  96. package/src/pages/AgentSettings.tsx +0 -544
  97. package/src/pages/Assignments.tsx +0 -750
  98. package/src/pages/Contacts.tsx +0 -200
  99. package/src/pages/Dashboard.tsx +0 -143
  100. package/src/pages/Inbox.tsx +0 -615
  101. package/src/pages/NotFound.tsx +0 -24
  102. package/src/pages/Opportunities.tsx +0 -386
  103. package/src/pages/SearchResults.tsx +0 -49
  104. package/src/pages/Settings.tsx +0 -1884
  105. package/src/pages/UseCases.tsx +0 -396
  106. package/src/pages/auth/Login.tsx +0 -261
  107. package/src/pages/hitl/HITL.tsx +0 -101
  108. package/src/store/appStore.ts +0 -103
  109. package/src/vite-env.d.ts +0 -14
  110. package/tailwind.config.js +0 -121
  111. package/tsconfig.json +0 -24
  112. package/vite.config.ts +0 -27
  113. /package/{public → dist}/android-chrome-192x192.png +0 -0
  114. /package/{public → dist}/android-chrome-512x512.png +0 -0
  115. /package/{public → dist}/apple-touch-icon.png +0 -0
  116. /package/{src/assets/crmy-logo.png → dist/assets/crmy-logo-DWN0xBPW.png} +0 -0
  117. /package/{public → dist}/favicon-16x16.png +0 -0
  118. /package/{public → dist}/favicon-32x32.png +0 -0
  119. /package/{public → dist}/favicon.ico +0 -0
  120. /package/{public → dist}/favicon.svg +0 -0
  121. /package/{public → dist}/site.webmanifest +0 -0
@@ -1,111 +0,0 @@
1
- // Copyright 2026 CRMy Contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { ChevronLeft, ChevronRight } from 'lucide-react';
5
- import { cn } from '@/lib/utils';
6
-
7
- const PAGE_SIZE_OPTIONS = [25, 50, 100];
8
-
9
- function pageNumbers(current: number, total: number): (number | '...')[] {
10
- if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
11
- const pages: (number | '...')[] = [1];
12
- if (current > 3) pages.push('...');
13
- for (let i = Math.max(2, current - 1); i <= Math.min(total - 1, current + 1); i++) {
14
- pages.push(i);
15
- }
16
- if (current < total - 2) pages.push('...');
17
- pages.push(total);
18
- return pages;
19
- }
20
-
21
- export interface PaginationBarProps {
22
- page: number;
23
- pageSize: number;
24
- total: number;
25
- onPageChange: (page: number) => void;
26
- onPageSizeChange?: (size: number) => void;
27
- className?: string;
28
- }
29
-
30
- export function PaginationBar({ page, pageSize, total, onPageChange, onPageSizeChange, className }: PaginationBarProps) {
31
- if (total <= pageSize) return null;
32
-
33
- const totalPages = Math.ceil(total / pageSize);
34
- const start = (page - 1) * pageSize + 1;
35
- const end = Math.min(page * pageSize, total);
36
- const pages = pageNumbers(page, totalPages);
37
-
38
- return (
39
- <div className={cn('flex flex-wrap items-center justify-between gap-3 pt-3 pb-1', className)}>
40
- {/* Count */}
41
- <span className="text-xs text-muted-foreground whitespace-nowrap">
42
- Showing {start}–{end} of {total}
43
- </span>
44
-
45
- {/* Page buttons */}
46
- <div className="flex items-center gap-0.5">
47
- <button
48
- onClick={() => onPageChange(page - 1)}
49
- disabled={page === 1}
50
- className="p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
51
- aria-label="Previous page"
52
- >
53
- <ChevronLeft className="w-4 h-4" />
54
- </button>
55
-
56
- {pages.map((p, i) =>
57
- p === '...' ? (
58
- <span key={`ellipsis-${i}`} className="w-8 text-center text-xs text-muted-foreground select-none">
59
-
60
- </span>
61
- ) : (
62
- <button
63
- key={p}
64
- onClick={() => onPageChange(p as number)}
65
- className={cn(
66
- 'w-8 h-8 rounded-lg text-xs font-semibold transition-colors',
67
- page === p
68
- ? 'bg-primary text-primary-foreground'
69
- : 'text-muted-foreground hover:text-foreground hover:bg-muted',
70
- )}
71
- >
72
- {p}
73
- </button>
74
- ),
75
- )}
76
-
77
- <button
78
- onClick={() => onPageChange(page + 1)}
79
- disabled={page === totalPages}
80
- className="p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
81
- aria-label="Next page"
82
- >
83
- <ChevronRight className="w-4 h-4" />
84
- </button>
85
- </div>
86
-
87
- {/* Page size */}
88
- {onPageSizeChange && (
89
- <div className="flex items-center gap-1.5">
90
- <span className="text-xs text-muted-foreground">Per page:</span>
91
- <div className="flex items-center gap-0.5 bg-muted rounded-lg p-0.5">
92
- {PAGE_SIZE_OPTIONS.map(size => (
93
- <button
94
- key={size}
95
- onClick={() => { onPageSizeChange(size); onPageChange(1); }}
96
- className={cn(
97
- 'px-2 py-1 rounded-md text-xs font-medium transition-colors',
98
- pageSize === size
99
- ? 'bg-card text-foreground shadow-sm'
100
- : 'text-muted-foreground hover:text-foreground',
101
- )}
102
- >
103
- {size}
104
- </button>
105
- ))}
106
- </div>
107
- </div>
108
- )}
109
- </div>
110
- );
111
- }