@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.
- package/dist/assets/index-CskfWp8E.js +560 -0
- package/dist/assets/index-D763l57m.css +1 -0
- package/{index.html → dist/index.html} +2 -1
- package/package.json +4 -1
- package/postcss.config.js +0 -6
- package/src/App.tsx +0 -158
- package/src/api/client.ts +0 -82
- package/src/api/hooks.ts +0 -689
- package/src/components/CustomFields.tsx +0 -240
- package/src/components/NavLink.tsx +0 -28
- package/src/components/crm/AIFab.tsx +0 -37
- package/src/components/crm/AccountDrawer.tsx +0 -372
- package/src/components/crm/ActivityTimeline.tsx +0 -115
- package/src/components/crm/AssignmentDrawer.tsx +0 -396
- package/src/components/crm/BriefingPanel.tsx +0 -217
- package/src/components/crm/CommandPalette.tsx +0 -254
- package/src/components/crm/ContactAvatar.tsx +0 -49
- package/src/components/crm/ContactDrawer.tsx +0 -438
- package/src/components/crm/ContextPanel.tsx +0 -200
- package/src/components/crm/CrmWidgets.tsx +0 -417
- package/src/components/crm/DrawerShell.tsx +0 -77
- package/src/components/crm/ListToolbar.tsx +0 -252
- package/src/components/crm/OpportunityDrawer.tsx +0 -372
- package/src/components/crm/PaginationBar.tsx +0 -111
- package/src/components/crm/QuickAddDrawer.tsx +0 -652
- package/src/components/crm/ShortcutsOverlay.tsx +0 -65
- package/src/components/crm/UseCaseDrawer.tsx +0 -454
- package/src/components/layout/MobileNav.tsx +0 -49
- package/src/components/layout/Sidebar.tsx +0 -157
- package/src/components/layout/TopBar.tsx +0 -54
- package/src/components/settings/ActorsSettings.tsx +0 -1190
- package/src/components/ui/accordion.tsx +0 -52
- package/src/components/ui/alert-dialog.tsx +0 -104
- package/src/components/ui/alert.tsx +0 -43
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/avatar.tsx +0 -38
- package/src/components/ui/badge.tsx +0 -29
- package/src/components/ui/breadcrumb.tsx +0 -90
- package/src/components/ui/button.tsx +0 -47
- package/src/components/ui/calendar.tsx +0 -54
- package/src/components/ui/card.tsx +0 -43
- package/src/components/ui/carousel.tsx +0 -224
- package/src/components/ui/chart.tsx +0 -303
- package/src/components/ui/checkbox.tsx +0 -26
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/command.tsx +0 -132
- package/src/components/ui/context-menu.tsx +0 -178
- package/src/components/ui/date-picker.tsx +0 -313
- package/src/components/ui/dialog.tsx +0 -95
- package/src/components/ui/drawer.tsx +0 -87
- package/src/components/ui/dropdown-menu.tsx +0 -179
- package/src/components/ui/form.tsx +0 -129
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/input-otp.tsx +0 -61
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -17
- package/src/components/ui/menubar.tsx +0 -207
- package/src/components/ui/navigation-menu.tsx +0 -120
- package/src/components/ui/pagination.tsx +0 -81
- package/src/components/ui/popover.tsx +0 -29
- package/src/components/ui/progress.tsx +0 -23
- package/src/components/ui/radio-group.tsx +0 -36
- package/src/components/ui/resizable.tsx +0 -37
- package/src/components/ui/scroll-area.tsx +0 -38
- package/src/components/ui/select.tsx +0 -143
- package/src/components/ui/separator.tsx +0 -20
- package/src/components/ui/sheet.tsx +0 -107
- package/src/components/ui/sidebar.tsx +0 -637
- package/src/components/ui/skeleton.tsx +0 -7
- package/src/components/ui/slider.tsx +0 -23
- package/src/components/ui/sonner.tsx +0 -24
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -72
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -21
- package/src/components/ui/toast.tsx +0 -111
- package/src/components/ui/toaster.tsx +0 -24
- package/src/components/ui/toggle-group.tsx +0 -49
- package/src/components/ui/toggle.tsx +0 -37
- package/src/components/ui/tooltip.tsx +0 -28
- package/src/components/ui/use-toast.ts +0 -1
- package/src/components/ui/utils.ts +0 -9
- package/src/contexts/AgentSettingsContext.tsx +0 -24
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/hooks/use-toast.ts +0 -186
- package/src/hooks/useKeyboardShortcuts.ts +0 -95
- package/src/hooks/useTheme.ts +0 -24
- package/src/index.css +0 -245
- package/src/lib/entityColors.ts +0 -18
- package/src/lib/stageConfig.ts +0 -32
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -25
- package/src/pages/Accounts.tsx +0 -205
- package/src/pages/Activities.tsx +0 -251
- package/src/pages/Agent.tsx +0 -237
- package/src/pages/AgentSettings.tsx +0 -544
- package/src/pages/Assignments.tsx +0 -750
- package/src/pages/Contacts.tsx +0 -200
- package/src/pages/Dashboard.tsx +0 -143
- package/src/pages/Inbox.tsx +0 -615
- package/src/pages/NotFound.tsx +0 -24
- package/src/pages/Opportunities.tsx +0 -386
- package/src/pages/SearchResults.tsx +0 -49
- package/src/pages/Settings.tsx +0 -1884
- package/src/pages/UseCases.tsx +0 -396
- package/src/pages/auth/Login.tsx +0 -261
- package/src/pages/hitl/HITL.tsx +0 -101
- package/src/store/appStore.ts +0 -103
- package/src/vite-env.d.ts +0 -14
- package/tailwind.config.js +0 -121
- package/tsconfig.json +0 -24
- package/vite.config.ts +0 -27
- /package/{public → dist}/android-chrome-192x192.png +0 -0
- /package/{public → dist}/android-chrome-512x512.png +0 -0
- /package/{public → dist}/apple-touch-icon.png +0 -0
- /package/{src/assets/crmy-logo.png → dist/assets/crmy-logo-DWN0xBPW.png} +0 -0
- /package/{public → dist}/favicon-16x16.png +0 -0
- /package/{public → dist}/favicon-32x32.png +0 -0
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/favicon.svg +0 -0
- /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
|
-
}
|