@handled-ai/design-system 0.17.1 → 0.18.1
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/charts/empty-chart-state.d.ts +11 -0
- package/dist/charts/empty-chart-state.js +70 -0
- package/dist/charts/empty-chart-state.js.map +1 -0
- package/dist/charts/index.d.ts +1 -0
- package/dist/charts/index.js +1 -0
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/pipeline-overview.d.ts +2 -1
- package/dist/charts/pipeline-overview.js +29 -1
- package/dist/charts/pipeline-overview.js.map +1 -1
- package/dist/components/actor-byline.d.ts +3 -0
- package/dist/components/actor-byline.js +5 -0
- package/dist/components/actor-byline.js.map +1 -0
- package/dist/components/days-open-cell.d.ts +16 -0
- package/dist/components/days-open-cell.js +73 -0
- package/dist/components/days-open-cell.js.map +1 -0
- package/dist/components/detail-drawer.d.ts +16 -0
- package/dist/components/detail-drawer.js +45 -0
- package/dist/components/detail-drawer.js.map +1 -0
- package/dist/components/feedback-primitives.d.ts +66 -0
- package/dist/components/feedback-primitives.js +295 -0
- package/dist/components/feedback-primitives.js.map +1 -0
- package/dist/components/insights-filter-bar.d.ts +2 -1
- package/dist/components/insights-filter-bar.js +13 -5
- package/dist/components/insights-filter-bar.js.map +1 -1
- package/dist/components/linked-entity-cell.d.ts +14 -0
- package/dist/components/linked-entity-cell.js +96 -0
- package/dist/components/linked-entity-cell.js.map +1 -0
- package/dist/components/metric-card.d.ts +14 -1
- package/dist/components/metric-card.js +86 -0
- package/dist/components/metric-card.js.map +1 -1
- package/dist/components/performance-metrics-table.d.ts +2 -1
- package/dist/components/performance-metrics-table.js +78 -46
- package/dist/components/performance-metrics-table.js.map +1 -1
- package/dist/components/pill.d.ts +26 -0
- package/dist/components/pill.js +77 -0
- package/dist/components/pill.js.map +1 -0
- package/dist/components/quick-segment.d.ts +13 -0
- package/dist/components/quick-segment.js +96 -0
- package/dist/components/quick-segment.js.map +1 -0
- package/dist/components/score-why-chips.d.ts +8 -17
- package/dist/components/score-why-chips.js +266 -180
- package/dist/components/score-why-chips.js.map +1 -1
- package/dist/components/signal-priority-popover.d.ts +17 -0
- package/dist/components/signal-priority-popover.js +247 -0
- package/dist/components/signal-priority-popover.js.map +1 -0
- package/dist/components/user-display.d.ts +22 -0
- package/dist/components/user-display.js +138 -0
- package/dist/components/user-display.js.map +1 -0
- package/dist/components/user-pill.d.ts +3 -0
- package/dist/components/user-pill.js +5 -0
- package/dist/components/user-pill.js.map +1 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/user-display.d.ts +31 -0
- package/dist/lib/user-display.js +57 -0
- package/dist/lib/user-display.js.map +1 -0
- package/dist/prototype/index.d.ts +2 -1
- package/dist/prototype/prototype-accounts-view.d.ts +2 -1
- package/dist/prototype/prototype-admin-view.d.ts +2 -1
- package/dist/prototype/prototype-config.d.ts +15 -332
- package/dist/prototype/prototype-inbox-view.d.ts +2 -1
- package/dist/prototype/prototype-inbox-view.js +11 -12
- package/dist/prototype/prototype-inbox-view.js.map +1 -1
- package/dist/prototype/prototype-insights-view.d.ts +2 -1
- package/dist/prototype/prototype-shell.d.ts +2 -1
- package/dist/signal-priority-popover-DQ_VuHac.d.ts +390 -0
- package/package.json +1 -1
- package/src/charts/__tests__/insights-charts.test.tsx +62 -0
- package/src/charts/empty-chart-state.tsx +44 -0
- package/src/charts/index.ts +1 -0
- package/src/charts/pipeline-overview.tsx +38 -1
- package/src/components/__tests__/contextual-quick-action-launcher.test.tsx +99 -188
- package/src/components/__tests__/feedback-primitives.test.tsx +509 -0
- package/src/components/__tests__/insights-primitives.test.tsx +117 -0
- package/src/components/__tests__/performance-metrics-table.test.tsx +54 -0
- package/src/components/__tests__/score-why-chips.test.tsx +540 -0
- package/src/components/__tests__/signal-priority-popover.test.tsx +312 -0
- package/src/components/__tests__/user-display.test.tsx +75 -0
- package/src/components/actor-byline.tsx +1 -0
- package/src/components/days-open-cell.tsx +50 -0
- package/src/components/detail-drawer.tsx +60 -0
- package/src/components/feedback-primitives.tsx +424 -0
- package/src/components/insights-filter-bar.tsx +13 -4
- package/src/components/linked-entity-cell.tsx +74 -0
- package/src/components/metric-card.tsx +82 -0
- package/src/components/performance-metrics-table.tsx +99 -63
- package/src/components/pill.tsx +67 -0
- package/src/components/quick-segment.tsx +68 -0
- package/src/components/score-why-chips.tsx +413 -203
- package/src/components/signal-priority-popover.tsx +359 -0
- package/src/components/user-display.tsx +96 -0
- package/src/components/user-pill.tsx +1 -0
- package/src/index.ts +11 -0
- package/src/lib/__tests__/user-display.test.ts +85 -0
- package/src/lib/user-display.ts +88 -0
- package/src/prototype/__tests__/detail-view-score-why.test.tsx +33 -29
- package/src/prototype/__tests__/detail-view-title-slots.test.tsx +65 -0
- package/src/prototype/prototype-config.ts +28 -4
- package/src/prototype/prototype-inbox-view.tsx +8 -10
- package/src/prototype/__tests__/detail-view-title-subtext.test.tsx +0 -72
|
@@ -1,334 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
1
|
+
import 'react';
|
|
2
|
+
import '../components/quick-action-sidebar-nav.js';
|
|
3
|
+
import '../components/score-breakdown.js';
|
|
4
|
+
import '../components/suggested-actions.js';
|
|
5
|
+
import '../components/detail-view.js';
|
|
6
|
+
import '../components/inbox-toolbar.js';
|
|
7
|
+
import '../components/data-table-filter.js';
|
|
8
|
+
import '../components/data-table.js';
|
|
9
|
+
import '../components/metric-card.js';
|
|
10
|
+
import '../charts/pipeline-overview.js';
|
|
11
|
+
import '../components/timeline-activity.js';
|
|
12
|
+
import '../components/signal-feedback-inline.js';
|
|
13
|
+
import 'lucide-react';
|
|
14
|
+
export { A as AccountFilterTab, a as AccountsViewConfig, b as AdminTab, c as AdminViewConfig, B as BriefStyleVariant, E as EntityPanelConfig, d as EntityPanelSection, I as InboxDetailSections, e as InboxSortOption, f as InboxViewConfig, g as InsightsCustomTab, h as InsightsViewConfig, i as PrototypeBrandConfig, j as PrototypeConfig, Q as QueueItem, l as SignalScoreData, m as SignalScoreExplanationBucket, n as SignalScoreExplanationSignal, o as SignalScoreUrgencyLabel, W as WorkQueueViewConfig } from '../signal-priority-popover-DQ_VuHac.js';
|
|
15
|
+
import '../components/feedback-primitives.js';
|
|
14
16
|
import '../components/quick-action-modal.js';
|
|
15
17
|
import '../components/data-table-condition-filter.js';
|
|
16
|
-
|
|
17
|
-
interface PrototypeBrandConfig {
|
|
18
|
-
name: string;
|
|
19
|
-
logo?: string;
|
|
20
|
-
assistantName?: string;
|
|
21
|
-
}
|
|
22
|
-
interface QueueItem {
|
|
23
|
-
id: string;
|
|
24
|
-
title: string;
|
|
25
|
-
details: string;
|
|
26
|
-
statusColor: string;
|
|
27
|
-
time: string;
|
|
28
|
-
company: string;
|
|
29
|
-
tag1: string;
|
|
30
|
-
}
|
|
31
|
-
type SignalScoreUrgencyLabel = "Low" | "Medium" | "High" | "Urgent";
|
|
32
|
-
interface SignalScoreExplanationSignal {
|
|
33
|
-
id?: string;
|
|
34
|
-
label: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
source?: string;
|
|
37
|
-
time?: string;
|
|
38
|
-
metric?: string;
|
|
39
|
-
}
|
|
40
|
-
interface SignalScoreExplanationBucket {
|
|
41
|
-
key: string;
|
|
42
|
-
label: string;
|
|
43
|
-
kind: "signal" | "factor" | "merged";
|
|
44
|
-
score?: number;
|
|
45
|
-
classification?: string;
|
|
46
|
-
rationale?: string;
|
|
47
|
-
evidence?: string[];
|
|
48
|
-
signals?: SignalScoreExplanationSignal[];
|
|
49
|
-
primaryMetricLabel?: string;
|
|
50
|
-
primaryMetricValue?: string;
|
|
51
|
-
signalCount?: number;
|
|
52
|
-
signalIds?: string[];
|
|
53
|
-
primarySignalId?: string;
|
|
54
|
-
factorKeys?: string[];
|
|
55
|
-
}
|
|
56
|
-
interface SignalScoreData {
|
|
57
|
-
score: number;
|
|
58
|
-
factors: ScoreFactor[];
|
|
59
|
-
whyNow: string;
|
|
60
|
-
evidence: string[];
|
|
61
|
-
confidence: number;
|
|
62
|
-
urgencyLabel?: SignalScoreUrgencyLabel;
|
|
63
|
-
urgencyExplanation?: string;
|
|
64
|
-
explanationBuckets?: SignalScoreExplanationBucket[];
|
|
65
|
-
onFactorFeedback?: (factorKey: string, type: "up" | "down" | null, detail?: string) => void;
|
|
66
|
-
/** @deprecated The compact score UX no longer renders score-level thumbs by default. */
|
|
67
|
-
onScoreFeedback?: (type: "up" | "down", pills: string[], detail: string) => void;
|
|
68
|
-
onApproveFeedback?: (reasons: string[], detail: string) => void;
|
|
69
|
-
onDismissFeedback?: (reasons: string[], detail: string, subReason?: string) => void;
|
|
70
|
-
/** @deprecated The compact score UX no longer renders score-level thumbs by default. */
|
|
71
|
-
initialScoreFeedback?: {
|
|
72
|
-
type: "up" | "down";
|
|
73
|
-
pills: string[];
|
|
74
|
-
detail: string;
|
|
75
|
-
} | null;
|
|
76
|
-
initialFactorFeedback?: Record<string, {
|
|
77
|
-
type: "up" | "down";
|
|
78
|
-
detail: string;
|
|
79
|
-
}>;
|
|
80
|
-
/** AI-generated signal brief text. When present, rendered in a dedicated section. */
|
|
81
|
-
signalBrief?: string;
|
|
82
|
-
/** Compact label for time-remaining chip (e.g., "13 days left"). */
|
|
83
|
-
timeChipLabel?: string;
|
|
84
|
-
/** Expanded detail for time chip popover (e.g., "Day 2 of 14 · Event detected on May 1"). */
|
|
85
|
-
timeChipDetail?: string;
|
|
86
|
-
}
|
|
87
|
-
interface InboxSortOption {
|
|
88
|
-
id: string;
|
|
89
|
-
label: string;
|
|
90
|
-
}
|
|
91
|
-
/** Controls the visual prominence of the signal brief section. */
|
|
92
|
-
type BriefStyleVariant = "default" | "prominent";
|
|
93
|
-
interface InboxDetailSections {
|
|
94
|
-
signalBrief?: boolean;
|
|
95
|
-
suggestedActions?: boolean;
|
|
96
|
-
timeline?: boolean;
|
|
97
|
-
}
|
|
98
|
-
interface InboxViewConfig {
|
|
99
|
-
items: QueueItem[];
|
|
100
|
-
filterCategories?: InboxFilterCategory[];
|
|
101
|
-
detailSections?: InboxDetailSections;
|
|
102
|
-
accountContacts?: SuggestedContact[];
|
|
103
|
-
buildAccountContacts?: (item: QueueItem) => SuggestedContact[];
|
|
104
|
-
emailSignature?: string | React.ReactNode;
|
|
105
|
-
buildSuggestedActions?: (item: QueueItem) => SuggestedAction[];
|
|
106
|
-
buildSourceItems?: (item: QueueItem) => SourceDef[];
|
|
107
|
-
getSignalScore?: (company: string, item?: QueueItem) => SignalScoreData;
|
|
108
|
-
getTimelineEvents?: (item: QueueItem) => TimelineEvent[];
|
|
109
|
-
iconMap?: Record<string, string>;
|
|
110
|
-
hideToolbarActions?: boolean;
|
|
111
|
-
hideHoverActions?: boolean;
|
|
112
|
-
onSuggestedActionFeedback?: (actionId: number | string, feedback: string, actionTitle?: string) => void;
|
|
113
|
-
/** @deprecated The compact score UX no longer renders score-level thumbs by default. */
|
|
114
|
-
onScoreFeedback?: (type: "up" | "down", pills: string[], detail: string) => void;
|
|
115
|
-
onOpenSignalBucket?: (args: {
|
|
116
|
-
item: QueueItem;
|
|
117
|
-
bucketKey: string;
|
|
118
|
-
signalId: string;
|
|
119
|
-
}) => void;
|
|
120
|
-
buildEntityChips?: (item: QueueItem) => Array<{
|
|
121
|
-
id: string;
|
|
122
|
-
label: string;
|
|
123
|
-
avatarLetter: string;
|
|
124
|
-
onClick?: () => void;
|
|
125
|
-
}>;
|
|
126
|
-
quickFilterTabs?: Array<{
|
|
127
|
-
id: string;
|
|
128
|
-
label: string;
|
|
129
|
-
matchValue?: string;
|
|
130
|
-
count?: number;
|
|
131
|
-
}>;
|
|
132
|
-
hideAccountsButton?: boolean;
|
|
133
|
-
accountDetailsLabel?: string;
|
|
134
|
-
onSignalApprove?: (item: QueueItem) => void | Promise<boolean>;
|
|
135
|
-
getSignalApprovalState?: (item: QueueItem) => ApprovalState | undefined;
|
|
136
|
-
signalLabels?: {
|
|
137
|
-
approveButton?: string;
|
|
138
|
-
dismissButton?: string;
|
|
139
|
-
approvedStatus?: string;
|
|
140
|
-
dismissedStatus?: string;
|
|
141
|
-
opportunityCreated?: string;
|
|
142
|
-
confirmPrompt?: string;
|
|
143
|
-
creatingStatus?: string;
|
|
144
|
-
};
|
|
145
|
-
/** When true, the approve/create-opportunity button is hidden but the dismiss button remains. */
|
|
146
|
-
hideApproveButton?: boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Override the copy used in the detail panel "Signal brief" section.
|
|
149
|
-
* Useful when the prototype represents an internal ops inbox rather than
|
|
150
|
-
* an outbound sales signal — the default heading and intro line are
|
|
151
|
-
* written for the latter.
|
|
152
|
-
*/
|
|
153
|
-
signalBriefCopy?: {
|
|
154
|
-
/** Section heading (default: "Signal brief"). Pass an empty string to hide. */
|
|
155
|
-
heading?: string;
|
|
156
|
-
/**
|
|
157
|
-
* Introductory line rendered above the per-item `whyNow` text.
|
|
158
|
-
* Receives the `QueueItem` so the caller can interpolate the company
|
|
159
|
-
* name or other fields. Pass `null` (or a function returning `null`)
|
|
160
|
-
* to suppress the intro line entirely.
|
|
161
|
-
*/
|
|
162
|
-
intro?: string | ((item: QueueItem) => string | null) | null;
|
|
163
|
-
};
|
|
164
|
-
/** Controls the visual prominence of the signal brief section.
|
|
165
|
-
* - "default": current styling (muted intro, text-foreground/90 brief)
|
|
166
|
-
* - "prominent": standard foreground color, text-base size for the brief
|
|
167
|
-
*/
|
|
168
|
-
briefStyleVariant?: BriefStyleVariant;
|
|
169
|
-
/** Render extra content at the end of the detail view, below the suggested actions section. */
|
|
170
|
-
renderDetailExtra?: (item: QueueItem) => React.ReactNode;
|
|
171
|
-
/** Render extra content inline with the detail title. */
|
|
172
|
-
renderTitleExtra?: (item: QueueItem) => React.ReactNode;
|
|
173
|
-
/** Render supporting content below the detail title. */
|
|
174
|
-
renderTitleSubtext?: (item: QueueItem) => React.ReactNode;
|
|
175
|
-
/** Render content between the signal brief text and the signal score bar (e.g. "Signals on Case" chips). */
|
|
176
|
-
renderBeforeScore?: (item: QueueItem) => React.ReactNode;
|
|
177
|
-
/** Render content between the signal score section and the activity timeline (e.g. OpportunityPanel). */
|
|
178
|
-
renderAfterScore?: (item: QueueItem) => React.ReactNode;
|
|
179
|
-
/** Formatted string for "Last activity X ago" in the collapsed timeline header. If omitted, falls back to the first event's time. */
|
|
180
|
-
lastActivityTime?: string;
|
|
181
|
-
/** Sort options for the inbox. When provided, a sort dropdown is rendered in the split view toolbar. */
|
|
182
|
-
sortOptions?: InboxSortOption[];
|
|
183
|
-
/** Currently active sort option id. */
|
|
184
|
-
activeSortId?: string;
|
|
185
|
-
/** Callback when the user changes the sort option. */
|
|
186
|
-
onSortChange?: (sortId: string) => void;
|
|
187
|
-
}
|
|
188
|
-
interface InsightsCustomTab {
|
|
189
|
-
id: string;
|
|
190
|
-
label: string;
|
|
191
|
-
icon?: React.ComponentType<{
|
|
192
|
-
className?: string;
|
|
193
|
-
}>;
|
|
194
|
-
content: React.ReactNode;
|
|
195
|
-
}
|
|
196
|
-
interface InsightsViewConfig {
|
|
197
|
-
customTabs?: InsightsCustomTab[];
|
|
198
|
-
tabs?: {
|
|
199
|
-
overview?: boolean;
|
|
200
|
-
analytics?: boolean;
|
|
201
|
-
};
|
|
202
|
-
coaching?: {
|
|
203
|
-
enabled?: boolean;
|
|
204
|
-
message?: string;
|
|
205
|
-
};
|
|
206
|
-
metrics?: MetricCardProps[];
|
|
207
|
-
expandedMetrics?: MetricCardProps[];
|
|
208
|
-
dashboardCards?: {
|
|
209
|
-
topTasks?: boolean;
|
|
210
|
-
upcomingMeetings?: boolean;
|
|
211
|
-
recentlyCompleted?: boolean;
|
|
212
|
-
checkIns?: boolean;
|
|
213
|
-
};
|
|
214
|
-
analytics?: {
|
|
215
|
-
pipeline?: {
|
|
216
|
-
stages: PipelineStage[];
|
|
217
|
-
stageMetrics: Record<string, PipelineStageMetrics>;
|
|
218
|
-
stageTimings: (PipelineStageTiming | null)[];
|
|
219
|
-
filterBreakdowns?: Record<string, Record<string, Record<string, number>>>;
|
|
220
|
-
};
|
|
221
|
-
volumeChart?: {
|
|
222
|
-
data: Record<string, unknown>[];
|
|
223
|
-
dataKeys: Array<{
|
|
224
|
-
key: string;
|
|
225
|
-
color: string;
|
|
226
|
-
}>;
|
|
227
|
-
filterOptions?: Array<{
|
|
228
|
-
label: string;
|
|
229
|
-
value: string;
|
|
230
|
-
}>;
|
|
231
|
-
};
|
|
232
|
-
donutChart?: {
|
|
233
|
-
data: Array<{
|
|
234
|
-
name: string;
|
|
235
|
-
value: number;
|
|
236
|
-
color: string;
|
|
237
|
-
}>;
|
|
238
|
-
centerLabel?: number;
|
|
239
|
-
};
|
|
240
|
-
trendChart?: {
|
|
241
|
-
data: Record<string, unknown>[];
|
|
242
|
-
series: Array<{
|
|
243
|
-
dataKey: string;
|
|
244
|
-
color: string;
|
|
245
|
-
}>;
|
|
246
|
-
xAxisKey?: string;
|
|
247
|
-
height?: number;
|
|
248
|
-
toggleOptions?: string[];
|
|
249
|
-
};
|
|
250
|
-
barChart?: {
|
|
251
|
-
data: Record<string, unknown>[];
|
|
252
|
-
bars: Array<{
|
|
253
|
-
dataKey: string;
|
|
254
|
-
color: string;
|
|
255
|
-
name: string;
|
|
256
|
-
icon?: LucideIcon;
|
|
257
|
-
}>;
|
|
258
|
-
};
|
|
259
|
-
barList?: {
|
|
260
|
-
data: Array<{
|
|
261
|
-
name: string;
|
|
262
|
-
value: number;
|
|
263
|
-
}>;
|
|
264
|
-
valueFormatter?: (v: number) => string;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
interface AccountFilterTab {
|
|
269
|
-
label: string;
|
|
270
|
-
count?: number;
|
|
271
|
-
variant?: "default" | "attention" | "ghost";
|
|
272
|
-
}
|
|
273
|
-
interface AccountsViewConfig {
|
|
274
|
-
filterTabs?: AccountFilterTab[];
|
|
275
|
-
rows?: DataRow[];
|
|
276
|
-
filterCategories?: DataTableFilterCategory[];
|
|
277
|
-
quickViews?: string[];
|
|
278
|
-
moreQuickViews?: string[];
|
|
279
|
-
quickViewFilters?: Record<string, (row: DataRow) => boolean>;
|
|
280
|
-
iconMap?: {
|
|
281
|
-
salesforce?: string;
|
|
282
|
-
};
|
|
283
|
-
entityUrlBuilder?: (row: DataRow) => string;
|
|
284
|
-
onScoreFactorFeedback?: (account: string, scoreType: string, factorKey: string, type: "up" | "down" | null, detail?: string) => void;
|
|
285
|
-
onScoreApproveFeedback?: (account: string, scoreType: string, reasons: string[], detail: string) => void;
|
|
286
|
-
onScoreDismissFeedback?: (account: string, scoreType: string, reasons: string[], detail: string) => void;
|
|
287
|
-
}
|
|
288
|
-
interface WorkQueueViewConfig {
|
|
289
|
-
[key: string]: unknown;
|
|
290
|
-
}
|
|
291
|
-
interface AdminTab {
|
|
292
|
-
id: string;
|
|
293
|
-
label: string;
|
|
294
|
-
icon?: React.ComponentType<{
|
|
295
|
-
className?: string;
|
|
296
|
-
}>;
|
|
297
|
-
content: React.ReactNode;
|
|
298
|
-
}
|
|
299
|
-
interface AdminViewConfig {
|
|
300
|
-
/** View title displayed in the header. Defaults to "Admin". */
|
|
301
|
-
title?: string;
|
|
302
|
-
/** Icon displayed next to the title. */
|
|
303
|
-
icon?: React.ComponentType<{
|
|
304
|
-
className?: string;
|
|
305
|
-
}>;
|
|
306
|
-
tabs: AdminTab[];
|
|
307
|
-
/** Which tab is active initially. Defaults to first tab's id. */
|
|
308
|
-
defaultTab?: string;
|
|
309
|
-
}
|
|
310
|
-
interface EntityPanelSection {
|
|
311
|
-
type: "details" | "contacts" | "recentActivity" | "connectedApps" | "systemActivity";
|
|
312
|
-
props?: Record<string, unknown>;
|
|
313
|
-
}
|
|
314
|
-
interface EntityPanelConfig {
|
|
315
|
-
sections?: EntityPanelSection[];
|
|
316
|
-
icons?: Record<string, string>;
|
|
317
|
-
}
|
|
318
|
-
interface PrototypeConfig {
|
|
319
|
-
brand?: PrototypeBrandConfig;
|
|
320
|
-
sidebar: SidebarNavSection[];
|
|
321
|
-
views: {
|
|
322
|
-
inbox?: InboxViewConfig;
|
|
323
|
-
insights?: InsightsViewConfig;
|
|
324
|
-
accounts?: AccountsViewConfig;
|
|
325
|
-
workQueue?: WorkQueueViewConfig;
|
|
326
|
-
admin?: AdminViewConfig;
|
|
327
|
-
};
|
|
328
|
-
defaultView: string;
|
|
329
|
-
entityPanel?: EntityPanelConfig;
|
|
330
|
-
/** Sidebar item IDs that trigger view navigation. Defaults to keys of `views`. */
|
|
331
|
-
navigableViews?: string[];
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export type { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig };
|
|
@@ -3,7 +3,8 @@ import { ApprovalState, OpportunityPreview } from '../components/signal-feedback
|
|
|
3
3
|
import { SourceDef } from '../components/detail-view.js';
|
|
4
4
|
import { SuggestedAction, SuggestedContact } from '../components/suggested-actions.js';
|
|
5
5
|
import { TimelineEvent } from '../components/timeline-activity.js';
|
|
6
|
-
import { QueueItem, InboxDetailSections, SignalScoreData, InboxViewConfig, BriefStyleVariant } from '
|
|
6
|
+
import { Q as QueueItem, I as InboxDetailSections, l as SignalScoreData, f as InboxViewConfig, B as BriefStyleVariant } from '../signal-priority-popover-DQ_VuHac.js';
|
|
7
|
+
import '../components/feedback-primitives.js';
|
|
7
8
|
import '../components/quick-action-sidebar-nav.js';
|
|
8
9
|
import '../components/quick-action-modal.js';
|
|
9
10
|
import '../components/score-breakdown.js';
|
|
@@ -55,7 +55,8 @@ import {
|
|
|
55
55
|
} from "../components/inbox-toolbar.js";
|
|
56
56
|
import { GroupedListView } from "../components/item-list.js";
|
|
57
57
|
import { SignalApproval } from "../components/signal-feedback-inline.js";
|
|
58
|
-
import { ScoreWhyChips
|
|
58
|
+
import { ScoreWhyChips } from "../components/score-why-chips.js";
|
|
59
|
+
import { SignalPriorityPopover } from "../components/signal-priority-popover.js";
|
|
59
60
|
import {
|
|
60
61
|
SuggestedActions
|
|
61
62
|
} from "../components/suggested-actions.js";
|
|
@@ -118,15 +119,12 @@ function DetailView({
|
|
|
118
119
|
onRequestApproval,
|
|
119
120
|
attentionCount
|
|
120
121
|
}) {
|
|
121
|
-
var _a, _b, _c;
|
|
122
|
+
var _a, _b, _c, _d, _e;
|
|
122
123
|
const [showTimeline, setShowTimeline] = React.useState(false);
|
|
123
124
|
const [extraActions, setExtraActions] = React.useState([]);
|
|
124
|
-
const [priorityOpen, setPriorityOpen] = React.useState(false);
|
|
125
|
-
const priorityPanelId = React.useId();
|
|
126
125
|
React.useEffect(() => {
|
|
127
126
|
setShowTimeline(false);
|
|
128
127
|
setExtraActions([]);
|
|
129
|
-
setPriorityOpen(false);
|
|
130
128
|
}, [item.id]);
|
|
131
129
|
const signalData = React.useMemo(
|
|
132
130
|
() => getSignalScore(item.company, item),
|
|
@@ -201,16 +199,18 @@ function DetailView({
|
|
|
201
199
|
] }),
|
|
202
200
|
/* @__PURE__ */ jsxs("div", { className: "mb-6 flex flex-wrap items-center gap-2", children: [
|
|
203
201
|
/* @__PURE__ */ jsx(
|
|
204
|
-
|
|
202
|
+
SignalPriorityPopover,
|
|
205
203
|
{
|
|
206
204
|
score: signalData.score,
|
|
207
205
|
urgencyLabel: signalData.urgencyLabel,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
urgencyExplanation: (_a = signalData.urgencyExplanation) != null ? _a : signalData.signalBrief,
|
|
207
|
+
factors: (_b = signalData.priorityFactors) != null ? _b : [],
|
|
208
|
+
metaText: void 0,
|
|
209
|
+
feedbackChips: signalData.priorityFeedbackChips,
|
|
210
|
+
onFeedbackSubmit: signalData.onPriorityFeedback
|
|
211
211
|
}
|
|
212
212
|
),
|
|
213
|
-
signalData.timeChipLabel && /* @__PURE__ */ jsx(Badge, { variant: "outline", title: (
|
|
213
|
+
signalData.timeChipLabel && /* @__PURE__ */ jsx(Badge, { variant: "outline", title: (_c = signalData.timeChipDetail) != null ? _c : void 0, children: signalData.timeChipLabel }),
|
|
214
214
|
/* @__PURE__ */ jsxs(
|
|
215
215
|
"button",
|
|
216
216
|
{
|
|
@@ -226,7 +226,6 @@ function DetailView({
|
|
|
226
226
|
),
|
|
227
227
|
renderMetadataExtra == null ? void 0 : renderMetadataExtra(item)
|
|
228
228
|
] }),
|
|
229
|
-
priorityOpen && /* @__PURE__ */ jsx(SignalPriorityPanel, { id: priorityPanelId, signalData, className: "mb-6" }),
|
|
230
229
|
sections.signalBrief && (() => {
|
|
231
230
|
var _a2;
|
|
232
231
|
const briefHeading = (_a2 = signalBriefCopy == null ? void 0 : signalBriefCopy.heading) != null ? _a2 : "Signal brief";
|
|
@@ -266,7 +265,7 @@ function DetailView({
|
|
|
266
265
|
] }),
|
|
267
266
|
!showTimeline && (lastActivityTime || timelineEvents.length > 0 && timelineEvents[0].time) && /* @__PURE__ */ jsxs("span", { className: "text-[11px] text-muted-foreground/60", children: [
|
|
268
267
|
"\xB7 Last activity ",
|
|
269
|
-
(
|
|
268
|
+
(_e = lastActivityTime != null ? lastActivityTime : (_d = timelineEvents[0]) == null ? void 0 : _d.time) != null ? _e : ""
|
|
270
269
|
] })
|
|
271
270
|
] }),
|
|
272
271
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|