@handled-ai/design-system 0.8.0 → 0.9.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/README.md +14 -4
- package/dist/charts/bar-chart-component.d.ts +24 -0
- package/dist/charts/bar-chart-component.js +123 -0
- package/dist/charts/bar-chart-component.js.map +1 -0
- package/dist/charts/chart-tooltip.d.ts +26 -0
- package/dist/charts/chart-tooltip.js +69 -0
- package/dist/charts/chart-tooltip.js.map +1 -0
- package/dist/charts/chart.d.ts +64 -0
- package/dist/charts/chart.js +285 -0
- package/dist/charts/chart.js.map +1 -0
- package/dist/charts/donut-chart.d.ts +21 -0
- package/dist/charts/donut-chart.js +96 -0
- package/dist/charts/donut-chart.js.map +1 -0
- package/dist/charts/index.d.ts +11 -0
- package/dist/charts/index.js +10 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/pipeline-overview.d.ts +76 -0
- package/dist/charts/pipeline-overview.js +372 -0
- package/dist/charts/pipeline-overview.js.map +1 -0
- package/dist/charts/sankey-chart.d.ts +52 -0
- package/dist/charts/sankey-chart.js +219 -0
- package/dist/charts/sankey-chart.js.map +1 -0
- package/dist/charts/top-line-metrics.d.ts +26 -0
- package/dist/charts/top-line-metrics.js +224 -0
- package/dist/charts/top-line-metrics.js.map +1 -0
- package/dist/charts/trend-area-chart.d.ts +21 -0
- package/dist/charts/trend-area-chart.js +150 -0
- package/dist/charts/trend-area-chart.js.map +1 -0
- package/dist/charts/volume-analysis-chart.d.ts +19 -0
- package/dist/charts/volume-analysis-chart.js +121 -0
- package/dist/charts/volume-analysis-chart.js.map +1 -0
- package/dist/components/activity-detail.d.ts +38 -0
- package/dist/components/activity-detail.js +163 -0
- package/dist/components/activity-detail.js.map +1 -0
- package/dist/components/activity-log.d.ts +21 -0
- package/dist/components/activity-log.js +61 -0
- package/dist/components/activity-log.js.map +1 -0
- package/dist/components/agent-popover.d.ts +71 -0
- package/dist/components/agent-popover.js +282 -0
- package/dist/components/agent-popover.js.map +1 -0
- package/dist/components/agent-widget.d.ts +24 -0
- package/dist/components/agent-widget.js +117 -0
- package/dist/components/agent-widget.js.map +1 -0
- package/dist/components/avatar.d.ts +13 -0
- package/dist/components/avatar.js +140 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +75 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +13 -0
- package/dist/components/button.js +83 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +11 -0
- package/dist/components/card.js +119 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/contact-list.d.ts +34 -0
- package/dist/components/contact-list.js +84 -0
- package/dist/components/contact-list.js.map +1 -0
- package/dist/components/dashboard-cards.d.ts +10 -0
- package/dist/components/dashboard-cards.js +164 -0
- package/dist/components/dashboard-cards.js.map +1 -0
- package/dist/components/data-table-display.d.ts +19 -0
- package/dist/components/data-table-display.js +109 -0
- package/dist/components/data-table-display.js.map +1 -0
- package/dist/components/data-table-filter.d.ts +18 -0
- package/dist/components/data-table-filter.js +107 -0
- package/dist/components/data-table-filter.js.map +1 -0
- package/dist/components/data-table-quick-views.d.ts +13 -0
- package/dist/components/data-table-quick-views.js +90 -0
- package/dist/components/data-table-quick-views.js.map +1 -0
- package/dist/components/data-table-toolbar.d.ts +18 -0
- package/dist/components/data-table-toolbar.js +45 -0
- package/dist/components/data-table-toolbar.js.map +1 -0
- package/dist/components/data-table.d.ts +39 -0
- package/dist/components/data-table.js +821 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/detail-view.d.ts +44 -0
- package/dist/components/detail-view.js +165 -0
- package/dist/components/detail-view.js.map +1 -0
- package/dist/components/dialog.d.ts +19 -0
- package/dist/components/dialog.js +188 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +27 -0
- package/dist/components/dropdown-menu.js +279 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/entity-panel.d.ts +69 -0
- package/dist/components/entity-panel.js +584 -0
- package/dist/components/entity-panel.js.map +1 -0
- package/dist/components/inbox-row.d.ts +27 -0
- package/dist/components/inbox-row.js +139 -0
- package/dist/components/inbox-row.js.map +1 -0
- package/dist/components/inbox-toolbar.d.ts +21 -0
- package/dist/components/inbox-toolbar.js +203 -0
- package/dist/components/inbox-toolbar.js.map +1 -0
- package/dist/components/input.d.ts +5 -0
- package/dist/components/input.js +50 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/insights-filter-bar.d.ts +21 -0
- package/dist/components/insights-filter-bar.js +99 -0
- package/dist/components/insights-filter-bar.js.map +1 -0
- package/dist/components/item-list-display.d.ts +22 -0
- package/dist/components/item-list-display.js +240 -0
- package/dist/components/item-list-display.js.map +1 -0
- package/dist/components/item-list-filter.d.ts +16 -0
- package/dist/components/item-list-filter.js +87 -0
- package/dist/components/item-list-filter.js.map +1 -0
- package/dist/components/item-list-toolbar.d.ts +25 -0
- package/dist/components/item-list-toolbar.js +79 -0
- package/dist/components/item-list-toolbar.js.map +1 -0
- package/dist/components/item-list.d.ts +20 -0
- package/dist/components/item-list.js +702 -0
- package/dist/components/item-list.js.map +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +55 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/message.d.ts +23 -0
- package/dist/components/message.js +117 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/metric-card.d.ts +25 -0
- package/dist/components/metric-card.js +107 -0
- package/dist/components/metric-card.js.map +1 -0
- package/dist/components/performance-metrics-table.d.ts +38 -0
- package/dist/components/performance-metrics-table.js +342 -0
- package/dist/components/performance-metrics-table.js.map +1 -0
- package/dist/components/preview-list.d.ts +14 -0
- package/dist/components/preview-list.js +83 -0
- package/dist/components/preview-list.js.map +1 -0
- package/dist/components/progress.d.ts +6 -0
- package/dist/components/progress.js +69 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/quick-action-chat-area.d.ts +24 -0
- package/dist/components/quick-action-chat-area.js +178 -0
- package/dist/components/quick-action-chat-area.js.map +1 -0
- package/dist/components/quick-action-modal.d.ts +30 -0
- package/dist/components/quick-action-modal.js +288 -0
- package/dist/components/quick-action-modal.js.map +1 -0
- package/dist/components/quick-action-sidebar-nav.d.ts +51 -0
- package/dist/components/quick-action-sidebar-nav.js +528 -0
- package/dist/components/quick-action-sidebar-nav.js.map +1 -0
- package/dist/components/recommended-actions-section.d.ts +23 -0
- package/dist/components/recommended-actions-section.js +215 -0
- package/dist/components/recommended-actions-section.js.map +1 -0
- package/dist/components/report-card.d.ts +26 -0
- package/dist/components/report-card.js +69 -0
- package/dist/components/report-card.js.map +1 -0
- package/dist/components/score-analysis-modal.d.ts +26 -0
- package/dist/components/score-analysis-modal.js +141 -0
- package/dist/components/score-analysis-modal.js.map +1 -0
- package/dist/components/score-breakdown.d.ts +17 -0
- package/dist/components/score-breakdown.js +162 -0
- package/dist/components/score-breakdown.js.map +1 -0
- package/dist/components/score-feedback.d.ts +40 -0
- package/dist/components/score-feedback.js +209 -0
- package/dist/components/score-feedback.js.map +1 -0
- package/dist/components/score-ring.d.ts +14 -0
- package/dist/components/score-ring.js +79 -0
- package/dist/components/score-ring.js.map +1 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +101 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +17 -0
- package/dist/components/select.js +228 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +61 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.js +168 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +73 -0
- package/dist/components/sidebar.js +723 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/signal-feedback-inline.d.ts +51 -0
- package/dist/components/signal-feedback-inline.js +548 -0
- package/dist/components/signal-feedback-inline.js.map +1 -0
- package/dist/components/simple-data-table.d.ts +15 -0
- package/dist/components/simple-data-table.js +91 -0
- package/dist/components/simple-data-table.js.map +1 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +44 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/status-badge.d.ts +10 -0
- package/dist/components/status-badge.js +82 -0
- package/dist/components/status-badge.js.map +1 -0
- package/dist/components/styled-bar-list.d.ts +20 -0
- package/dist/components/styled-bar-list.js +59 -0
- package/dist/components/styled-bar-list.js.map +1 -0
- package/dist/components/suggested-actions.d.ts +110 -0
- package/dist/components/suggested-actions.js +1538 -0
- package/dist/components/suggested-actions.js.map +1 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +147 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +14 -0
- package/dist/components/tabs.js +129 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.js +47 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/timeline-activity.d.ts +34 -0
- package/dist/components/timeline-activity.js +181 -0
- package/dist/components/timeline-activity.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +93 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/view-mode-toggle.d.ts +16 -0
- package/dist/components/view-mode-toggle.js +24 -0
- package/dist/components/view-mode-toggle.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +21 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +68 -1878
- package/dist/index.js +69 -10918
- package/dist/index.js.map +1 -1
- package/dist/lib/icons.d.ts +18 -0
- package/dist/lib/icons.js +21 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/prototype/index.d.ts +20 -0
- package/dist/prototype/index.js +8 -0
- package/dist/prototype/index.js.map +1 -0
- package/dist/prototype/prototype-accounts-view.d.ts +22 -0
- package/dist/prototype/prototype-accounts-view.js +70 -0
- package/dist/prototype/prototype-accounts-view.js.map +1 -0
- package/dist/prototype/prototype-admin-view.d.ts +21 -0
- package/dist/prototype/prototype-admin-view.js +53 -0
- package/dist/prototype/prototype-admin-view.js.map +1 -0
- package/dist/prototype/prototype-config.d.ts +226 -0
- package/dist/prototype/prototype-config.js +1 -0
- package/dist/prototype/prototype-config.js.map +1 -0
- package/dist/prototype/prototype-inbox-view.d.ts +48 -0
- package/dist/prototype/prototype-inbox-view.js +701 -0
- package/dist/prototype/prototype-inbox-view.js.map +1 -0
- package/dist/prototype/prototype-insights-view.d.ts +23 -0
- package/dist/prototype/prototype-insights-view.js +335 -0
- package/dist/prototype/prototype-insights-view.js.map +1 -0
- package/dist/prototype/prototype-shell.d.ts +40 -0
- package/dist/prototype/prototype-shell.js +190 -0
- package/dist/prototype/prototype-shell.js.map +1 -0
- package/dist/prototype/prototype-work-queue-view.d.ts +8 -0
- package/dist/prototype/prototype-work-queue-view.js +17 -0
- package/dist/prototype/prototype-work-queue-view.js.map +1 -0
- package/dist/three/agent-orb.d.ts +39 -0
- package/dist/three/agent-orb.js +500 -0
- package/dist/three/agent-orb.js.map +1 -0
- package/dist/three/index.d.ts +2 -0
- package/dist/three/index.js +2 -0
- package/dist/three/index.js.map +1 -0
- package/package.json +98 -17
- package/src/charts/bar-chart-component.tsx +150 -0
- package/src/charts/chart-tooltip.tsx +86 -0
- package/src/charts/chart.tsx +371 -0
- package/src/charts/donut-chart.tsx +112 -0
- package/src/charts/index.ts +13 -0
- package/src/charts/pipeline-overview.tsx +476 -0
- package/src/charts/sankey-chart.tsx +290 -0
- package/src/charts/top-line-metrics.tsx +261 -0
- package/src/charts/trend-area-chart.tsx +150 -0
- package/src/charts/volume-analysis-chart.tsx +124 -0
- package/src/components/activity-detail.tsx +233 -0
- package/src/components/activity-log.tsx +89 -0
- package/src/components/agent-popover.tsx +373 -0
- package/src/components/agent-widget.tsx +163 -0
- package/src/components/avatar.tsx +109 -0
- package/src/components/badge.tsx +48 -0
- package/src/components/button.tsx +59 -0
- package/src/components/card.tsx +92 -0
- package/src/components/contact-list.tsx +121 -0
- package/src/components/dashboard-cards.tsx +170 -0
- package/src/components/data-table-display.tsx +139 -0
- package/src/components/data-table-filter.tsx +138 -0
- package/src/components/data-table-quick-views.tsx +103 -0
- package/src/components/data-table-toolbar.tsx +56 -0
- package/src/components/data-table.tsx +915 -0
- package/src/components/detail-view.tsx +237 -0
- package/src/components/dialog.tsx +158 -0
- package/src/components/dropdown-menu.tsx +257 -0
- package/src/components/entity-panel.tsx +767 -0
- package/src/components/inbox-row.tsx +132 -0
- package/src/components/inbox-toolbar.tsx +213 -0
- package/src/components/input.tsx +21 -0
- package/src/components/insights-filter-bar.tsx +132 -0
- package/src/components/item-list-display.tsx +278 -0
- package/src/components/item-list-filter.tsx +118 -0
- package/src/components/item-list-toolbar.tsx +97 -0
- package/src/components/item-list.tsx +843 -0
- package/src/components/label.tsx +24 -0
- package/src/components/message.tsx +83 -0
- package/src/components/metric-card.tsx +178 -0
- package/src/components/performance-metrics-table.tsx +442 -0
- package/src/components/preview-list.tsx +62 -0
- package/src/components/progress.tsx +31 -0
- package/src/components/quick-action-chat-area.tsx +156 -0
- package/src/components/quick-action-modal.tsx +331 -0
- package/src/components/quick-action-sidebar-nav.tsx +592 -0
- package/src/components/recommended-actions-section.tsx +258 -0
- package/src/components/report-card.tsx +106 -0
- package/src/components/score-analysis-modal.tsx +172 -0
- package/src/components/score-breakdown.tsx +179 -0
- package/src/components/score-feedback.tsx +288 -0
- package/src/components/score-ring.tsx +87 -0
- package/src/components/scroll-area.tsx +58 -0
- package/src/components/select.tsx +190 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.tsx +143 -0
- package/src/components/sidebar.tsx +726 -0
- package/src/components/signal-feedback-inline.tsx +591 -0
- package/src/components/simple-data-table.tsx +124 -0
- package/src/components/skeleton.tsx +15 -0
- package/src/components/status-badge.tsx +63 -0
- package/src/components/styled-bar-list.tsx +70 -0
- package/src/components/suggested-actions.tsx +1985 -0
- package/src/components/table.tsx +116 -0
- package/src/components/tabs.tsx +91 -0
- package/src/components/textarea.tsx +18 -0
- package/src/components/timeline-activity.tsx +234 -0
- package/src/components/tooltip.tsx +57 -0
- package/src/components/view-mode-toggle.tsx +39 -0
- package/src/hooks/use-mobile.ts +21 -0
- package/src/index.ts +77 -0
- package/src/lib/icons.ts +18 -0
- package/src/lib/utils.ts +6 -0
- package/src/prototype/index.ts +11 -0
- package/src/prototype/prototype-accounts-view.tsx +112 -0
- package/src/prototype/prototype-admin-view.tsx +67 -0
- package/src/prototype/prototype-config.ts +243 -0
- package/src/prototype/prototype-inbox-view.tsx +810 -0
- package/src/prototype/prototype-insights-view.tsx +379 -0
- package/src/prototype/prototype-shell.tsx +219 -0
- package/src/prototype/prototype-work-queue-view.tsx +30 -0
- package/src/styles/globals.css +299 -0
- package/src/three/agent-orb.tsx +557 -0
- package/src/three/index.ts +5 -0
- package/src/types/r3f.d.ts +8 -0
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import {
|
|
26
|
+
AlertCircle,
|
|
27
|
+
ChevronDown,
|
|
28
|
+
Mail,
|
|
29
|
+
MessageSquare,
|
|
30
|
+
Phone,
|
|
31
|
+
SearchX
|
|
32
|
+
} from "lucide-react";
|
|
33
|
+
import { cn } from "../lib/utils.js";
|
|
34
|
+
import { Badge } from "./badge.js";
|
|
35
|
+
import {
|
|
36
|
+
ItemListToolbar
|
|
37
|
+
} from "./item-list-toolbar.js";
|
|
38
|
+
const QUEUE_ITEMS = [
|
|
39
|
+
{
|
|
40
|
+
id: "REF-1894",
|
|
41
|
+
patient: "James Liu",
|
|
42
|
+
source: "Cedars",
|
|
43
|
+
specialty: "Oncology",
|
|
44
|
+
stage: "E&B Verified",
|
|
45
|
+
risk: "At Risk",
|
|
46
|
+
attempts: 2,
|
|
47
|
+
owner: "Jessica Wong",
|
|
48
|
+
aging: "Aging 18h",
|
|
49
|
+
contactSignals: { phone: true, email: false, message: false }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "REF-1903",
|
|
53
|
+
patient: "Michael Brown",
|
|
54
|
+
source: "Providence",
|
|
55
|
+
specialty: "Orthopedics",
|
|
56
|
+
stage: "E&B Verified",
|
|
57
|
+
risk: "Stable",
|
|
58
|
+
attempts: 1,
|
|
59
|
+
owner: "Sarah Johnson",
|
|
60
|
+
aging: "New today",
|
|
61
|
+
contactSignals: { phone: false, email: true, message: false }
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "REF-1910",
|
|
65
|
+
patient: "Samantha Rodriguez",
|
|
66
|
+
source: "Kaiser",
|
|
67
|
+
specialty: "Rheumatology",
|
|
68
|
+
stage: "E&B Verified",
|
|
69
|
+
risk: "At Risk",
|
|
70
|
+
attempts: 4,
|
|
71
|
+
owner: "Michael Chen",
|
|
72
|
+
aging: "Aging 36h",
|
|
73
|
+
contactSignals: { phone: true, email: true, message: true }
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "REF-1916",
|
|
77
|
+
patient: "Christopher Davis",
|
|
78
|
+
source: "USC",
|
|
79
|
+
specialty: "Gastroenterology",
|
|
80
|
+
stage: "E&B Verified",
|
|
81
|
+
risk: "Stable",
|
|
82
|
+
attempts: 1,
|
|
83
|
+
owner: "Daniel Kim",
|
|
84
|
+
aging: "New 6h ago",
|
|
85
|
+
contactSignals: { phone: false, email: true, message: true }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "REF-1924",
|
|
89
|
+
patient: "Lisa Anderson",
|
|
90
|
+
source: "CHLA",
|
|
91
|
+
specialty: "Pediatric Surgery",
|
|
92
|
+
stage: "E&B Verified",
|
|
93
|
+
risk: "Watch",
|
|
94
|
+
attempts: 1,
|
|
95
|
+
owner: "Jennifer Davis",
|
|
96
|
+
aging: "New 8h ago",
|
|
97
|
+
contactSignals: { phone: true, email: false, message: true }
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "REF-1901",
|
|
101
|
+
patient: "Sarah Chen",
|
|
102
|
+
source: "CHLA",
|
|
103
|
+
specialty: "Pediatrics",
|
|
104
|
+
stage: "Contacted",
|
|
105
|
+
risk: "Stable",
|
|
106
|
+
attempts: 1,
|
|
107
|
+
owner: "Daniel Kim",
|
|
108
|
+
aging: "New today",
|
|
109
|
+
contactSignals: { phone: true, email: false, message: false }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "REF-1908",
|
|
113
|
+
patient: "David Smith",
|
|
114
|
+
source: "USC",
|
|
115
|
+
specialty: "Dermatology",
|
|
116
|
+
stage: "Contacted",
|
|
117
|
+
risk: "Stable",
|
|
118
|
+
attempts: 2,
|
|
119
|
+
owner: "Jennifer Davis",
|
|
120
|
+
aging: "New 3h ago",
|
|
121
|
+
contactSignals: { phone: false, email: true, message: true }
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "REF-1913",
|
|
125
|
+
patient: "Olivia Martinez",
|
|
126
|
+
source: "Providence",
|
|
127
|
+
specialty: "Cardiology",
|
|
128
|
+
stage: "Contacted",
|
|
129
|
+
risk: "At Risk",
|
|
130
|
+
attempts: 3,
|
|
131
|
+
owner: "Jessica Wong",
|
|
132
|
+
aging: "Aging 24h",
|
|
133
|
+
contactSignals: { phone: true, email: true, message: false }
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "REF-1919",
|
|
137
|
+
patient: "Kevin Nguyen",
|
|
138
|
+
source: "Kaiser",
|
|
139
|
+
specialty: "Nephrology",
|
|
140
|
+
stage: "Contacted",
|
|
141
|
+
risk: "Stable",
|
|
142
|
+
attempts: 1,
|
|
143
|
+
owner: "Sarah Johnson",
|
|
144
|
+
aging: "New 5h ago",
|
|
145
|
+
contactSignals: { phone: true, email: false, message: true }
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "REF-1923",
|
|
149
|
+
patient: "Rachel Kim",
|
|
150
|
+
source: "UCLA Health",
|
|
151
|
+
specialty: "Hematology",
|
|
152
|
+
stage: "Contacted",
|
|
153
|
+
risk: "Watch",
|
|
154
|
+
attempts: 2,
|
|
155
|
+
owner: "Michael Chen",
|
|
156
|
+
aging: "New 7h ago",
|
|
157
|
+
contactSignals: { phone: false, email: true, message: true }
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "REF-1926",
|
|
161
|
+
patient: "Brian Foster",
|
|
162
|
+
source: "Cedars",
|
|
163
|
+
specialty: "Vascular Surgery",
|
|
164
|
+
stage: "Contacted",
|
|
165
|
+
risk: "Stable",
|
|
166
|
+
attempts: 1,
|
|
167
|
+
owner: "Daniel Kim",
|
|
168
|
+
aging: "New today",
|
|
169
|
+
contactSignals: { phone: false, email: false, message: true }
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: "REF-1931",
|
|
173
|
+
patient: "Jasmine Patel",
|
|
174
|
+
source: "Dignity Health",
|
|
175
|
+
specialty: "Pulmonology",
|
|
176
|
+
stage: "Pending Intake",
|
|
177
|
+
risk: "Watch",
|
|
178
|
+
attempts: 2,
|
|
179
|
+
owner: "Sarah Johnson",
|
|
180
|
+
aging: "Aging 14h",
|
|
181
|
+
contactSignals: { phone: true, email: true, message: false }
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: "REF-1933",
|
|
185
|
+
patient: "Evan Torres",
|
|
186
|
+
source: "Sutter",
|
|
187
|
+
specialty: "Neurology",
|
|
188
|
+
stage: "Pending Intake",
|
|
189
|
+
risk: "Stable",
|
|
190
|
+
attempts: 1,
|
|
191
|
+
owner: "Jessica Wong",
|
|
192
|
+
aging: "New 2h ago",
|
|
193
|
+
contactSignals: { phone: false, email: true, message: true }
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "REF-1940",
|
|
197
|
+
patient: "Natalie Brooks",
|
|
198
|
+
source: "MemorialCare",
|
|
199
|
+
specialty: "Pain Management",
|
|
200
|
+
stage: "Pending Scheduling",
|
|
201
|
+
risk: "Watch",
|
|
202
|
+
attempts: 2,
|
|
203
|
+
owner: "Jennifer Davis",
|
|
204
|
+
aging: "Aging 20h",
|
|
205
|
+
contactSignals: { phone: true, email: false, message: true }
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "REF-1942",
|
|
209
|
+
patient: "Carlos Rivera",
|
|
210
|
+
source: "Providence",
|
|
211
|
+
specialty: "Urology",
|
|
212
|
+
stage: "Pending Scheduling",
|
|
213
|
+
risk: "Stable",
|
|
214
|
+
attempts: 1,
|
|
215
|
+
owner: "Daniel Kim",
|
|
216
|
+
aging: "New 5h ago",
|
|
217
|
+
contactSignals: { phone: false, email: true, message: false }
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: "REF-1946",
|
|
221
|
+
patient: "Alyssa Wright",
|
|
222
|
+
source: "UCLA Health",
|
|
223
|
+
specialty: "Referrals",
|
|
224
|
+
stage: "Referrals",
|
|
225
|
+
risk: "Stable",
|
|
226
|
+
attempts: 1,
|
|
227
|
+
owner: "Michael Chen",
|
|
228
|
+
aging: "New today",
|
|
229
|
+
contactSignals: { phone: false, email: true, message: true }
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: "REF-1948",
|
|
233
|
+
patient: "Marcus Lopez",
|
|
234
|
+
source: "Cedars",
|
|
235
|
+
specialty: "Referrals",
|
|
236
|
+
stage: "Referrals",
|
|
237
|
+
risk: "At Risk",
|
|
238
|
+
attempts: 4,
|
|
239
|
+
owner: "Jessica Wong",
|
|
240
|
+
aging: "Aging 30h",
|
|
241
|
+
contactSignals: { phone: true, email: true, message: false }
|
|
242
|
+
}
|
|
243
|
+
];
|
|
244
|
+
const STAGE_ORDER = [
|
|
245
|
+
"Referrals",
|
|
246
|
+
"E&B Verified",
|
|
247
|
+
"Contacted",
|
|
248
|
+
"Pending Intake",
|
|
249
|
+
"Pending Scheduling"
|
|
250
|
+
];
|
|
251
|
+
const RISK_ORDER = ["At Risk", "Watch", "Stable"];
|
|
252
|
+
const FILTER_CATEGORIES = [
|
|
253
|
+
{
|
|
254
|
+
id: "stage",
|
|
255
|
+
label: "Queue stage",
|
|
256
|
+
options: STAGE_ORDER
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: "risk",
|
|
260
|
+
label: "Risk level",
|
|
261
|
+
options: RISK_ORDER
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: "owner",
|
|
265
|
+
label: "Assignee",
|
|
266
|
+
options: [...new Set(QUEUE_ITEMS.map((item) => item.owner))]
|
|
267
|
+
}
|
|
268
|
+
];
|
|
269
|
+
const QUICK_VIEW_DEFINITIONS = [
|
|
270
|
+
{
|
|
271
|
+
id: "referrals",
|
|
272
|
+
label: "Referrals",
|
|
273
|
+
matches: (item) => item.stage === "Referrals"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
id: "contact-attempted",
|
|
277
|
+
label: "Contact Attempted",
|
|
278
|
+
matches: (item) => item.stage === "E&B Verified" || item.stage === "Contacted"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: "pending-intake",
|
|
282
|
+
label: "Pending Intake",
|
|
283
|
+
matches: (item) => item.stage === "Pending Intake"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: "pending-scheduling",
|
|
287
|
+
label: "Pending Scheduling",
|
|
288
|
+
matches: (item) => item.stage === "Pending Scheduling"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: "needs-escalation",
|
|
292
|
+
label: "Needs Escalation",
|
|
293
|
+
matches: (item) => item.attempts >= 4 || item.risk === "At Risk"
|
|
294
|
+
}
|
|
295
|
+
];
|
|
296
|
+
const DEFAULT_DISPLAY_STATE = {
|
|
297
|
+
viewMode: "list",
|
|
298
|
+
grouping: "stage",
|
|
299
|
+
subGrouping: "none",
|
|
300
|
+
ordering: "priority",
|
|
301
|
+
orderingDirection: "desc",
|
|
302
|
+
showContactSignals: true,
|
|
303
|
+
showOwner: true,
|
|
304
|
+
showStatus: true
|
|
305
|
+
};
|
|
306
|
+
function toggleFilterValue(current, categoryId, option) {
|
|
307
|
+
var _a;
|
|
308
|
+
const selected = (_a = current[categoryId]) != null ? _a : [];
|
|
309
|
+
const hasOption = selected.includes(option);
|
|
310
|
+
return __spreadProps(__spreadValues({}, current), {
|
|
311
|
+
[categoryId]: hasOption ? selected.filter((value) => value !== option) : [...selected, option]
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function matchesCategoryFilter(item, categoryId, selectedOptions) {
|
|
315
|
+
if (selectedOptions.length === 0) {
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
switch (categoryId) {
|
|
319
|
+
case "stage":
|
|
320
|
+
return selectedOptions.includes(item.stage);
|
|
321
|
+
case "risk":
|
|
322
|
+
return selectedOptions.includes(item.risk);
|
|
323
|
+
case "owner":
|
|
324
|
+
return selectedOptions.includes(item.owner);
|
|
325
|
+
default:
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function getRiskDotColor(risk) {
|
|
330
|
+
switch (risk) {
|
|
331
|
+
case "At Risk":
|
|
332
|
+
return "bg-red-500";
|
|
333
|
+
case "Watch":
|
|
334
|
+
return "bg-orange-400";
|
|
335
|
+
case "Stable":
|
|
336
|
+
default:
|
|
337
|
+
return "bg-muted-foreground/30";
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
const AVATAR_COLORS = [
|
|
341
|
+
"bg-blue-100 text-blue-700",
|
|
342
|
+
"bg-emerald-100 text-emerald-700",
|
|
343
|
+
"bg-purple-100 text-purple-700",
|
|
344
|
+
"bg-amber-100 text-amber-700",
|
|
345
|
+
"bg-rose-100 text-rose-700",
|
|
346
|
+
"bg-cyan-100 text-cyan-700"
|
|
347
|
+
];
|
|
348
|
+
function getAvatarColor(name) {
|
|
349
|
+
return AVATAR_COLORS[name.charCodeAt(0) % AVATAR_COLORS.length];
|
|
350
|
+
}
|
|
351
|
+
function WorkItemCard({ item, display }) {
|
|
352
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border bg-card p-3 shadow-sm transition-shadow hover:shadow-md", children: [
|
|
353
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
354
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] text-muted-foreground", children: item.id }),
|
|
355
|
+
/* @__PURE__ */ jsx(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
className: cn(
|
|
359
|
+
"h-2 w-2 rounded-full",
|
|
360
|
+
getRiskDotColor(item.risk)
|
|
361
|
+
)
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
] }),
|
|
365
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-sm font-medium text-foreground", children: item.patient }),
|
|
366
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 text-xs text-muted-foreground", children: [
|
|
367
|
+
"via ",
|
|
368
|
+
item.source,
|
|
369
|
+
" \u2192 ",
|
|
370
|
+
item.specialty
|
|
371
|
+
] }),
|
|
372
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
373
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
374
|
+
item.risk === "At Risk" ? /* @__PURE__ */ jsxs(
|
|
375
|
+
Badge,
|
|
376
|
+
{
|
|
377
|
+
variant: "outline",
|
|
378
|
+
className: "h-5 gap-1 rounded-full border-red-200 bg-red-50 px-1.5 text-[10px] font-medium text-red-700 shadow-none",
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "h-3 w-3" }),
|
|
381
|
+
"At Risk"
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
) : null,
|
|
385
|
+
/* @__PURE__ */ jsx(
|
|
386
|
+
"span",
|
|
387
|
+
{
|
|
388
|
+
className: cn(
|
|
389
|
+
"inline-flex h-5 items-center rounded border px-1.5 text-[10px] font-semibold",
|
|
390
|
+
item.attempts >= 4 ? "border-red-200 bg-red-50 text-red-700" : item.attempts === 3 ? "border-amber-200 bg-amber-50 text-amber-700" : "border-border bg-muted text-muted-foreground"
|
|
391
|
+
),
|
|
392
|
+
children: item.attempts >= 4 ? "4+" : item.attempts
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
] }),
|
|
396
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground", children: item.aging })
|
|
397
|
+
] }),
|
|
398
|
+
display.showOwner ? /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-1.5 border-t border-border/60 pt-2", children: [
|
|
399
|
+
/* @__PURE__ */ jsx(
|
|
400
|
+
"div",
|
|
401
|
+
{
|
|
402
|
+
className: cn(
|
|
403
|
+
"flex h-5 w-5 items-center justify-center rounded text-[9px] font-semibold",
|
|
404
|
+
getAvatarColor(item.owner)
|
|
405
|
+
),
|
|
406
|
+
children: item.owner.charAt(0)
|
|
407
|
+
}
|
|
408
|
+
),
|
|
409
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: item.owner })
|
|
410
|
+
] }) : null
|
|
411
|
+
] });
|
|
412
|
+
}
|
|
413
|
+
function ItemList() {
|
|
414
|
+
const [selectedFilters, setSelectedFilters] = React.useState({});
|
|
415
|
+
const [activeQuickView, setActiveQuickView] = React.useState(
|
|
416
|
+
"contact-attempted"
|
|
417
|
+
);
|
|
418
|
+
const [display, setDisplay] = React.useState(DEFAULT_DISPLAY_STATE);
|
|
419
|
+
const [expandedGroups, setExpandedGroups] = React.useState({});
|
|
420
|
+
const quickViews = React.useMemo(
|
|
421
|
+
() => QUICK_VIEW_DEFINITIONS.map((definition) => ({
|
|
422
|
+
id: definition.id,
|
|
423
|
+
label: definition.label,
|
|
424
|
+
count: QUEUE_ITEMS.filter(definition.matches).length
|
|
425
|
+
})),
|
|
426
|
+
[]
|
|
427
|
+
);
|
|
428
|
+
const filteredItems = React.useMemo(() => {
|
|
429
|
+
const quickViewFilter = QUICK_VIEW_DEFINITIONS.find(
|
|
430
|
+
(definition) => definition.id === activeQuickView
|
|
431
|
+
);
|
|
432
|
+
return QUEUE_ITEMS.filter((item) => {
|
|
433
|
+
if (quickViewFilter && !quickViewFilter.matches(item)) {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
return Object.entries(selectedFilters).every(
|
|
437
|
+
([categoryId, options]) => matchesCategoryFilter(item, categoryId, options)
|
|
438
|
+
);
|
|
439
|
+
});
|
|
440
|
+
}, [activeQuickView, selectedFilters]);
|
|
441
|
+
const groupedItems = React.useMemo(() => {
|
|
442
|
+
var _a;
|
|
443
|
+
const groups = /* @__PURE__ */ new Map();
|
|
444
|
+
for (const item of filteredItems) {
|
|
445
|
+
const key = display.grouping === "stage" ? item.stage : display.grouping === "owner" ? item.owner : item.risk;
|
|
446
|
+
const current = (_a = groups.get(key)) != null ? _a : [];
|
|
447
|
+
current.push(item);
|
|
448
|
+
groups.set(key, current);
|
|
449
|
+
}
|
|
450
|
+
const entries = Array.from(groups.entries());
|
|
451
|
+
entries.sort(([groupA], [groupB]) => {
|
|
452
|
+
if (display.grouping === "stage") {
|
|
453
|
+
return STAGE_ORDER.indexOf(groupA) - STAGE_ORDER.indexOf(groupB);
|
|
454
|
+
}
|
|
455
|
+
if (display.grouping === "risk") {
|
|
456
|
+
return RISK_ORDER.indexOf(groupA) - RISK_ORDER.indexOf(groupB);
|
|
457
|
+
}
|
|
458
|
+
return groupA.localeCompare(groupB);
|
|
459
|
+
});
|
|
460
|
+
return entries.map(([group, items]) => ({
|
|
461
|
+
key: group.toLowerCase().replace(/\s+/g, "-"),
|
|
462
|
+
label: group,
|
|
463
|
+
items
|
|
464
|
+
}));
|
|
465
|
+
}, [display.grouping, filteredItems]);
|
|
466
|
+
React.useEffect(() => {
|
|
467
|
+
setExpandedGroups((previous) => {
|
|
468
|
+
const next = {};
|
|
469
|
+
groupedItems.forEach((group) => {
|
|
470
|
+
var _a;
|
|
471
|
+
next[group.key] = (_a = previous[group.key]) != null ? _a : true;
|
|
472
|
+
});
|
|
473
|
+
return next;
|
|
474
|
+
});
|
|
475
|
+
}, [groupedItems]);
|
|
476
|
+
return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden bg-background", children: [
|
|
477
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border px-6 py-4", children: /* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold tracking-tight text-foreground", children: "Patient Inventory" }) }),
|
|
478
|
+
/* @__PURE__ */ jsx(
|
|
479
|
+
ItemListToolbar,
|
|
480
|
+
{
|
|
481
|
+
quickViews,
|
|
482
|
+
activeQuickView,
|
|
483
|
+
onQuickViewChange: setActiveQuickView,
|
|
484
|
+
filterCategories: FILTER_CATEGORIES,
|
|
485
|
+
selectedFilters,
|
|
486
|
+
onToggleFilter: (categoryId, option) => setSelectedFilters(
|
|
487
|
+
(previous) => toggleFilterValue(previous, categoryId, option)
|
|
488
|
+
),
|
|
489
|
+
onClearFilters: () => setSelectedFilters({}),
|
|
490
|
+
display,
|
|
491
|
+
onDisplayChange: setDisplay,
|
|
492
|
+
onResetDisplay: () => setDisplay(DEFAULT_DISPLAY_STATE)
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: groupedItems.length > 0 ? display.viewMode === "board" ? (
|
|
496
|
+
/* Board View */
|
|
497
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-4 overflow-x-auto p-4", children: groupedItems.map((group) => /* @__PURE__ */ jsxs(
|
|
498
|
+
"div",
|
|
499
|
+
{
|
|
500
|
+
className: "flex w-[280px] shrink-0 flex-col",
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center justify-between px-1", children: [
|
|
503
|
+
/* @__PURE__ */ jsx("h4", { className: "truncate text-sm font-semibold uppercase text-muted-foreground", children: group.label }),
|
|
504
|
+
/* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground", children: group.items.length })
|
|
505
|
+
] }),
|
|
506
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
507
|
+
group.items.map((item) => /* @__PURE__ */ jsx(
|
|
508
|
+
WorkItemCard,
|
|
509
|
+
{
|
|
510
|
+
item,
|
|
511
|
+
display
|
|
512
|
+
},
|
|
513
|
+
item.id
|
|
514
|
+
)),
|
|
515
|
+
group.items.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-24 items-center justify-center rounded-lg border-2 border-dashed border-border bg-muted/30", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground/50", children: "No items" }) }) : null
|
|
516
|
+
] })
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
group.key
|
|
520
|
+
)) })
|
|
521
|
+
) : (
|
|
522
|
+
/* List View */
|
|
523
|
+
groupedItems.map((group) => {
|
|
524
|
+
const isExpanded = expandedGroups[group.key];
|
|
525
|
+
return /* @__PURE__ */ jsxs(
|
|
526
|
+
"div",
|
|
527
|
+
{
|
|
528
|
+
className: "last:border-b-0",
|
|
529
|
+
children: [
|
|
530
|
+
/* @__PURE__ */ jsxs(
|
|
531
|
+
"button",
|
|
532
|
+
{
|
|
533
|
+
type: "button",
|
|
534
|
+
onClick: () => setExpandedGroups((previous) => __spreadProps(__spreadValues({}, previous), {
|
|
535
|
+
[group.key]: !previous[group.key]
|
|
536
|
+
})),
|
|
537
|
+
className: "flex w-full cursor-pointer select-none items-center gap-2 border-b border-border bg-muted/30 px-4 py-2 text-left transition-colors hover:bg-muted/50",
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ jsx(
|
|
540
|
+
ChevronDown,
|
|
541
|
+
{
|
|
542
|
+
className: cn(
|
|
543
|
+
"h-3.5 w-3.5 text-muted-foreground transition-transform",
|
|
544
|
+
!isExpanded && "-rotate-90"
|
|
545
|
+
)
|
|
546
|
+
}
|
|
547
|
+
),
|
|
548
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-bold uppercase tracking-wider text-muted-foreground", children: group.label }),
|
|
549
|
+
/* @__PURE__ */ jsx("span", { className: "rounded border border-border bg-background px-1.5 py-0 text-[10px] font-medium text-muted-foreground", children: group.items.length })
|
|
550
|
+
]
|
|
551
|
+
}
|
|
552
|
+
),
|
|
553
|
+
isExpanded ? /* @__PURE__ */ jsx("div", { children: group.items.map((item) => /* @__PURE__ */ jsxs(
|
|
554
|
+
"div",
|
|
555
|
+
{
|
|
556
|
+
className: "group flex cursor-pointer items-center gap-3 border-b border-border/50 px-4 py-2.5 text-sm transition-colors hover:bg-muted/40",
|
|
557
|
+
children: [
|
|
558
|
+
/* @__PURE__ */ jsx("span", { className: "w-[80px] shrink-0 font-mono text-xs text-muted-foreground/80", children: item.id }),
|
|
559
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsx(
|
|
560
|
+
"div",
|
|
561
|
+
{
|
|
562
|
+
className: cn(
|
|
563
|
+
"h-2 w-2 rounded-full",
|
|
564
|
+
getRiskDotColor(item.risk)
|
|
565
|
+
)
|
|
566
|
+
}
|
|
567
|
+
) }),
|
|
568
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 truncate font-semibold text-sm text-foreground", children: [
|
|
569
|
+
item.patient,
|
|
570
|
+
" ",
|
|
571
|
+
/* @__PURE__ */ jsxs("span", { className: "font-normal text-muted-foreground", children: [
|
|
572
|
+
"via ",
|
|
573
|
+
item.source,
|
|
574
|
+
" \u2192 ",
|
|
575
|
+
item.specialty
|
|
576
|
+
] })
|
|
577
|
+
] }),
|
|
578
|
+
/* @__PURE__ */ jsx("div", { className: "hidden w-[80px] shrink-0 items-center md:flex", children: item.risk === "At Risk" ? /* @__PURE__ */ jsxs(
|
|
579
|
+
Badge,
|
|
580
|
+
{
|
|
581
|
+
variant: "outline",
|
|
582
|
+
className: "h-5 gap-1 rounded-full border-red-200 bg-red-50 px-1.5 text-[10px] font-medium text-red-700 shadow-none",
|
|
583
|
+
children: [
|
|
584
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "h-3 w-3" }),
|
|
585
|
+
"At Risk"
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
) : null }),
|
|
589
|
+
display.showContactSignals ? /* @__PURE__ */ jsxs("div", { className: "hidden items-center gap-3 text-muted-foreground/40 md:flex", children: [
|
|
590
|
+
/* @__PURE__ */ jsx(Phone, { className: "h-3.5 w-3.5 cursor-pointer transition-colors hover:text-foreground" }),
|
|
591
|
+
/* @__PURE__ */ jsx(Mail, { className: "h-3.5 w-3.5 cursor-pointer transition-colors hover:text-foreground" }),
|
|
592
|
+
/* @__PURE__ */ jsx(MessageSquare, { className: "h-3.5 w-3.5 cursor-pointer transition-colors hover:text-foreground" })
|
|
593
|
+
] }) : null,
|
|
594
|
+
/* @__PURE__ */ jsx("div", { className: "hidden w-[60px] shrink-0 items-center justify-center md:flex", children: /* @__PURE__ */ jsx(
|
|
595
|
+
"span",
|
|
596
|
+
{
|
|
597
|
+
className: cn(
|
|
598
|
+
"inline-flex h-5 items-center justify-center rounded border px-2 text-xs font-semibold",
|
|
599
|
+
item.attempts >= 4 ? "border-red-300 bg-red-100 text-red-700" : item.attempts === 3 ? "border-amber-300 bg-amber-100 text-amber-700" : "border-border bg-muted text-muted-foreground"
|
|
600
|
+
),
|
|
601
|
+
children: item.attempts >= 4 ? "4+" : item.attempts
|
|
602
|
+
}
|
|
603
|
+
) }),
|
|
604
|
+
display.showOwner ? /* @__PURE__ */ jsx("div", { className: "hidden w-[120px] shrink-0 items-center gap-2 lg:flex", children: /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium text-foreground", children: item.owner }) }) : null,
|
|
605
|
+
display.showStatus ? /* @__PURE__ */ jsx("div", { className: "hidden w-[140px] shrink-0 items-center justify-end gap-2 sm:flex", children: /* @__PURE__ */ jsx("span", { className: "truncate rounded bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: item.stage }) }) : null,
|
|
606
|
+
/* @__PURE__ */ jsx("div", { className: "w-[80px] shrink-0 text-right text-xs text-muted-foreground", children: item.aging })
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
item.id
|
|
610
|
+
)) }) : null
|
|
611
|
+
]
|
|
612
|
+
},
|
|
613
|
+
group.key
|
|
614
|
+
);
|
|
615
|
+
})
|
|
616
|
+
) : /* @__PURE__ */ jsxs("div", { className: "flex h-56 flex-col items-center justify-center gap-1 text-muted-foreground", children: [
|
|
617
|
+
/* @__PURE__ */ jsx(SearchX, { className: "h-7 w-7 opacity-40" }),
|
|
618
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "No queue items found" }),
|
|
619
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs", children: "Try a different quick view or clear your filters." })
|
|
620
|
+
] }) })
|
|
621
|
+
] });
|
|
622
|
+
}
|
|
623
|
+
function GroupedListView({
|
|
624
|
+
groups,
|
|
625
|
+
renderRow,
|
|
626
|
+
getItemKey,
|
|
627
|
+
selectedKey,
|
|
628
|
+
onItemClick,
|
|
629
|
+
emptyMessage = "No items found",
|
|
630
|
+
className
|
|
631
|
+
}) {
|
|
632
|
+
const [expandedGroups, setExpandedGroups] = React.useState(() => {
|
|
633
|
+
const init = {};
|
|
634
|
+
groups.forEach((g) => {
|
|
635
|
+
init[g.key] = true;
|
|
636
|
+
});
|
|
637
|
+
return init;
|
|
638
|
+
});
|
|
639
|
+
React.useEffect(() => {
|
|
640
|
+
setExpandedGroups((prev) => {
|
|
641
|
+
const next = {};
|
|
642
|
+
groups.forEach((g) => {
|
|
643
|
+
var _a;
|
|
644
|
+
next[g.key] = (_a = prev[g.key]) != null ? _a : true;
|
|
645
|
+
});
|
|
646
|
+
return next;
|
|
647
|
+
});
|
|
648
|
+
}, [groups]);
|
|
649
|
+
if (groups.length === 0 || groups.every((g) => g.items.length === 0)) {
|
|
650
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex h-56 flex-col items-center justify-center gap-1 text-muted-foreground", className), children: [
|
|
651
|
+
/* @__PURE__ */ jsx(SearchX, { className: "h-7 w-7 opacity-40" }),
|
|
652
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: emptyMessage })
|
|
653
|
+
] });
|
|
654
|
+
}
|
|
655
|
+
return /* @__PURE__ */ jsx("div", { className, children: groups.map((group) => {
|
|
656
|
+
var _a;
|
|
657
|
+
const isExpanded = (_a = expandedGroups[group.key]) != null ? _a : true;
|
|
658
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
659
|
+
/* @__PURE__ */ jsxs(
|
|
660
|
+
"button",
|
|
661
|
+
{
|
|
662
|
+
type: "button",
|
|
663
|
+
onClick: () => setExpandedGroups((prev) => __spreadProps(__spreadValues({}, prev), { [group.key]: !prev[group.key] })),
|
|
664
|
+
className: "flex w-full cursor-pointer select-none items-center gap-2 border-b border-border bg-muted/30 px-4 py-2 text-left transition-colors hover:bg-muted/50",
|
|
665
|
+
children: [
|
|
666
|
+
/* @__PURE__ */ jsx(
|
|
667
|
+
ChevronDown,
|
|
668
|
+
{
|
|
669
|
+
className: cn(
|
|
670
|
+
"h-3.5 w-3.5 text-muted-foreground transition-transform",
|
|
671
|
+
!isExpanded && "-rotate-90"
|
|
672
|
+
)
|
|
673
|
+
}
|
|
674
|
+
),
|
|
675
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-bold uppercase tracking-wider text-muted-foreground", children: group.label }),
|
|
676
|
+
/* @__PURE__ */ jsx("span", { className: "rounded border border-border bg-background px-1.5 py-0 text-[10px] font-medium text-muted-foreground", children: group.items.length })
|
|
677
|
+
]
|
|
678
|
+
}
|
|
679
|
+
),
|
|
680
|
+
isExpanded && group.items.map((item, idx) => {
|
|
681
|
+
const key = getItemKey(item);
|
|
682
|
+
return /* @__PURE__ */ jsx(
|
|
683
|
+
"div",
|
|
684
|
+
{
|
|
685
|
+
onClick: () => onItemClick == null ? void 0 : onItemClick(item),
|
|
686
|
+
className: cn(
|
|
687
|
+
"flex items-center gap-3 px-4 py-2.5 border-b border-border/50 text-[13px] cursor-pointer transition-colors",
|
|
688
|
+
selectedKey === key ? "bg-muted/30 border-l-2 border-l-primary" : "border-l-2 border-l-transparent hover:bg-muted/40"
|
|
689
|
+
),
|
|
690
|
+
children: renderRow(item, idx)
|
|
691
|
+
},
|
|
692
|
+
key
|
|
693
|
+
);
|
|
694
|
+
})
|
|
695
|
+
] }, group.key);
|
|
696
|
+
}) });
|
|
697
|
+
}
|
|
698
|
+
export {
|
|
699
|
+
GroupedListView,
|
|
700
|
+
ItemList
|
|
701
|
+
};
|
|
702
|
+
//# sourceMappingURL=item-list.js.map
|