@handled-ai/design-system 0.19.2 → 0.20.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/components/score-why-chips.d.ts +1 -1
- package/dist/components/signal-priority-popover.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/prototype/index.d.ts +1 -1
- package/dist/prototype/prototype-accounts-view.d.ts +1 -1
- package/dist/prototype/prototype-admin-view.d.ts +1 -1
- package/dist/prototype/prototype-config.d.ts +1 -1
- package/dist/prototype/prototype-inbox-view.d.ts +16 -3
- package/dist/prototype/prototype-inbox-view.js +143 -113
- package/dist/prototype/prototype-inbox-view.js.map +1 -1
- package/dist/prototype/prototype-insights-view.d.ts +1 -1
- package/dist/prototype/prototype-shell.d.ts +1 -1
- package/dist/{signal-priority-popover-CZitE9xq.d.ts → signal-priority-popover-BJHd07dU.d.ts} +11 -0
- package/package.json +1 -1
- package/src/components/__tests__/conversation-panel.test.tsx +1 -1
- package/src/prototype/__tests__/detail-view-case-panel-v2.test.tsx +181 -0
- package/src/prototype/__tests__/detail-view-metadata-layout.test.tsx +97 -0
- package/src/prototype/__tests__/detail-view-title-slots.test.tsx +30 -2
- package/src/prototype/prototype-config.ts +11 -0
- package/src/prototype/prototype-inbox-view.tsx +205 -118
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Q as QueueItem, m as SignalScoreData, p as SignalScoreUrgencyLabel } from '../signal-priority-popover-
|
|
2
|
+
import { Q as QueueItem, m as SignalScoreData, p as SignalScoreUrgencyLabel } from '../signal-priority-popover-BJHd07dU.js';
|
|
3
3
|
import './feedback-primitives.js';
|
|
4
4
|
import './quick-action-sidebar-nav.js';
|
|
5
5
|
import './quick-action-modal.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import './feedback-primitives.js';
|
|
3
|
-
export { P as PriorityFactor, S as SignalPriorityPopover, k as SignalPriorityPopoverProps, l as SignalPriorityScoreDisplay } from '../signal-priority-popover-
|
|
3
|
+
export { P as PriorityFactor, S as SignalPriorityPopover, k as SignalPriorityPopoverProps, l as SignalPriorityScoreDisplay } from '../signal-priority-popover-BJHd07dU.js';
|
|
4
4
|
import './quick-action-sidebar-nav.js';
|
|
5
5
|
import './quick-action-modal.js';
|
|
6
6
|
import './score-breakdown.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export { EmptyState, EmptyStateProps } from './components/empty-state.js';
|
|
|
40
40
|
export { ActivityItem, ConnectedApps, EntityActivityItem, EntityDetails, EntityMetadataField, EntityMetadataGrid, EntityPanel, EntityPanelBrandIcons, EntityPanelHeader, EntityPanelTabs, EntitySection, PanelMode, PotentialContacts, RecentActivity, SystemActivity, useEntityPanel } from './components/entity-panel.js';
|
|
41
41
|
export { RelatedRecordActionCard, RelatedRecordActionCardKind, RelatedRecordActionCardProps, RelatedRecordActionIcon } from './components/related-record-action-card.js';
|
|
42
42
|
export { FeedbackActions, FeedbackActionsProps, FeedbackChipGroup, FeedbackChipGroupProps, FeedbackChipTree, FeedbackFooter, FeedbackFooterProps, FeedbackInput, FeedbackInputProps, FeedbackSubmitData, InlineFeedbackControl, InlineFeedbackControlProps, PersistedFeedbackData } from './components/feedback-primitives.js';
|
|
43
|
-
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, P as PriorityFactor, i as PrototypeBrandConfig, j as PrototypeConfig, Q as QueueItem, S as SignalPriorityPopover, k as SignalPriorityPopoverProps, l as SignalPriorityScoreDisplay, m as SignalScoreData, n as SignalScoreExplanationBucket, o as SignalScoreExplanationSignal, p as SignalScoreUrgencyLabel, T as TimelineSystemEventsConfig, W as WorkQueueViewConfig } from './signal-priority-popover-
|
|
43
|
+
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, P as PriorityFactor, i as PrototypeBrandConfig, j as PrototypeConfig, Q as QueueItem, S as SignalPriorityPopover, k as SignalPriorityPopoverProps, l as SignalPriorityScoreDisplay, m as SignalScoreData, n as SignalScoreExplanationBucket, o as SignalScoreExplanationSignal, p as SignalScoreUrgencyLabel, T as TimelineSystemEventsConfig, W as WorkQueueViewConfig } from './signal-priority-popover-BJHd07dU.js';
|
|
44
44
|
export { FilterChip, FilterChipProps } from './components/filter-chip.js';
|
|
45
45
|
export { InboxGroupHeader, InboxRow, InboxRowProps } from './components/inbox-row.js';
|
|
46
46
|
export { AssigneeFilter, InboxFilterCategory, InboxToolbar, InboxToolbarProps } from './components/inbox-toolbar.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, m as SignalScoreData, n as SignalScoreExplanationBucket, o as SignalScoreExplanationSignal, p as SignalScoreUrgencyLabel, T as TimelineSystemEventsConfig, W as WorkQueueViewConfig } from '../signal-priority-popover-
|
|
1
|
+
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, m as SignalScoreData, n as SignalScoreExplanationBucket, o as SignalScoreExplanationSignal, p as SignalScoreUrgencyLabel, T as TimelineSystemEventsConfig, W as WorkQueueViewConfig } from '../signal-priority-popover-BJHd07dU.js';
|
|
2
2
|
export { PrototypeShell, PrototypeShellProps } from './prototype-shell.js';
|
|
3
3
|
export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype-inbox-view.js';
|
|
4
4
|
export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype-insights-view.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { a as AccountsViewConfig } from '../signal-priority-popover-
|
|
2
|
+
import { a as AccountsViewConfig } from '../signal-priority-popover-BJHd07dU.js';
|
|
3
3
|
import { DataRow } from '../components/data-table.js';
|
|
4
4
|
import '../components/feedback-primitives.js';
|
|
5
5
|
import '../components/quick-action-sidebar-nav.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { c as AdminViewConfig } from '../signal-priority-popover-
|
|
2
|
+
import { c as AdminViewConfig } from '../signal-priority-popover-BJHd07dU.js';
|
|
3
3
|
import '../components/feedback-primitives.js';
|
|
4
4
|
import '../components/quick-action-sidebar-nav.js';
|
|
5
5
|
import '../components/quick-action-modal.js';
|
|
@@ -11,7 +11,7 @@ import '../charts/pipeline-overview.js';
|
|
|
11
11
|
import '../components/timeline-activity.js';
|
|
12
12
|
import '../components/signal-feedback-inline.js';
|
|
13
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, m as SignalScoreData, n as SignalScoreExplanationBucket, o as SignalScoreExplanationSignal, p as SignalScoreUrgencyLabel, T as TimelineSystemEventsConfig, W as WorkQueueViewConfig } from '../signal-priority-popover-
|
|
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, m as SignalScoreData, n as SignalScoreExplanationBucket, o as SignalScoreExplanationSignal, p as SignalScoreUrgencyLabel, T as TimelineSystemEventsConfig, W as WorkQueueViewConfig } from '../signal-priority-popover-BJHd07dU.js';
|
|
15
15
|
import '../components/feedback-primitives.js';
|
|
16
16
|
import '../components/quick-action-modal.js';
|
|
17
17
|
import '../components/score-semantics.js';
|
|
@@ -3,7 +3,7 @@ import { OpportunityDraft, ApprovalState, OpportunityPreview } from '../componen
|
|
|
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 { Q as QueueItem, I as InboxDetailSections, m as SignalScoreData, f as InboxViewConfig, B as BriefStyleVariant, T as TimelineSystemEventsConfig } from '../signal-priority-popover-
|
|
6
|
+
import { Q as QueueItem, I as InboxDetailSections, m as SignalScoreData, f as InboxViewConfig, B as BriefStyleVariant, T as TimelineSystemEventsConfig } from '../signal-priority-popover-BJHd07dU.js';
|
|
7
7
|
import '../components/feedback-primitives.js';
|
|
8
8
|
import '../components/quick-action-sidebar-nav.js';
|
|
9
9
|
import '../components/quick-action-modal.js';
|
|
@@ -47,11 +47,17 @@ interface DetailViewProps {
|
|
|
47
47
|
hideApproveButton?: boolean;
|
|
48
48
|
signalBriefCopy?: InboxViewConfig["signalBriefCopy"];
|
|
49
49
|
briefStyleVariant?: BriefStyleVariant;
|
|
50
|
+
/** Opt-in detail panel section ordering. Defaults to the existing layout. */
|
|
51
|
+
sectionLayout?: InboxViewConfig["sectionLayout"];
|
|
50
52
|
renderDetailExtra?: (item: QueueItem) => React.ReactNode;
|
|
51
53
|
/** Render content between the signal brief text and the signal score bar (e.g. "Signals on Case" chips). */
|
|
52
54
|
renderBeforeScore?: (item: QueueItem) => React.ReactNode;
|
|
53
55
|
/** Render content between the signal score section and the activity timeline. */
|
|
54
56
|
renderAfterScore?: (item: QueueItem) => React.ReactNode;
|
|
57
|
+
/** Render primary case-panel content between the opportunity section and comment area. */
|
|
58
|
+
renderPrimaryAction?: (item: QueueItem) => React.ReactNode;
|
|
59
|
+
/** Render case-panel comment content before the activity timeline. */
|
|
60
|
+
renderCommentArea?: (item: QueueItem) => React.ReactNode;
|
|
55
61
|
lastActivityTime?: string;
|
|
56
62
|
/** Render extra content inline with the detail title. */
|
|
57
63
|
renderTitleExtra?: (item: QueueItem) => React.ReactNode;
|
|
@@ -61,6 +67,13 @@ interface DetailViewProps {
|
|
|
61
67
|
renderTitleSubtext?: (item: QueueItem) => React.ReactNode;
|
|
62
68
|
/** Render extra metadata chips (e.g. assignee) inside the chips row below the title. */
|
|
63
69
|
renderMetadataExtra?: (item: QueueItem) => React.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* Where the metadata chips row (priority · deadline · account · renderMetadataExtra) sits.
|
|
72
|
+
* - "default": above the signal brief (legacy layout, unchanged for existing consumers).
|
|
73
|
+
* - "below-brief": moved beneath the brief text, just before `renderBeforeScore`
|
|
74
|
+
* (case-panel redesign — chips + owners read as one block under the brief).
|
|
75
|
+
*/
|
|
76
|
+
metadataLayout?: "default" | "below-brief";
|
|
64
77
|
/** Override the built-in account details metadata button label. */
|
|
65
78
|
accountDetailsButtonLabel?: (item: QueueItem) => React.ReactNode;
|
|
66
79
|
/** Accessible label for the built-in account details metadata button. */
|
|
@@ -88,7 +101,7 @@ interface DetailViewProps {
|
|
|
88
101
|
/** @deprecated Use `timelineSystemEventsConfig.visibleHint`. */
|
|
89
102
|
timelineSystemEventsVisibleHint?: string;
|
|
90
103
|
}
|
|
91
|
-
declare function DetailView({ item, sections, getSignalScore, buildSuggestedActions, buildSourceItems: _buildSourceItems, getTimelineEvents, accountContacts, emailSignature, iconMap, onOpenEntityPanel, onOpenRecentActivity, onSuggestedActionFeedback: _onSuggestedActionFeedback, onScoreFeedback: _onScoreFeedback, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderTitleExtra, renderTitleActionRow, renderTitleSubtext, renderMetadataExtra, accountDetailsButtonLabel, getAccountDetailsButtonAriaLabel, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, timelineSystemEventsConfig: configProp, timelineSystemEventsToggleLabel, timelineSystemEventsStorageKey, timelineSystemEventsDefaultVisible, timelineSystemEventsHiddenHint, timelineSystemEventsVisibleHint, }: DetailViewProps): React.JSX.Element;
|
|
92
|
-
declare function PrototypeInboxView({ items, filterCategories, detailSections, accountContacts, buildAccountContacts, emailSignature, buildSuggestedActions: buildSuggestedActionsProp, buildSourceItems: buildSourceItemsProp, getSignalScore: getSignalScoreProp, getTimelineEvents, iconMap, hideToolbarActions, hideHoverActions, onSuggestedActionFeedback, onScoreFeedback, onOpenSignalBucket, headerActions, onOpenEntityPanel, onOpenRecentActivity, onItemSelect, defaultViewMode, buildEntityChips, quickFilterTabs, hideAccountsButton, accountDetailsLabel, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, timelineSystemEventsConfig, attentionCount, renderTitleExtra, renderTitleActionRow, renderTitleSubtext, accountDetailsButtonLabel, getAccountDetailsButtonAriaLabel, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
|
|
104
|
+
declare function DetailView({ item, sections, getSignalScore, buildSuggestedActions, buildSourceItems: _buildSourceItems, getTimelineEvents, accountContacts, emailSignature, iconMap, onOpenEntityPanel, onOpenRecentActivity, onSuggestedActionFeedback: _onSuggestedActionFeedback, onScoreFeedback: _onScoreFeedback, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, sectionLayout, renderDetailExtra, renderBeforeScore, renderAfterScore, renderPrimaryAction, renderCommentArea, lastActivityTime, renderTitleExtra, renderTitleActionRow, renderTitleSubtext, renderMetadataExtra, metadataLayout, accountDetailsButtonLabel, getAccountDetailsButtonAriaLabel, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, timelineSystemEventsConfig: configProp, timelineSystemEventsToggleLabel, timelineSystemEventsStorageKey, timelineSystemEventsDefaultVisible, timelineSystemEventsHiddenHint, timelineSystemEventsVisibleHint, }: DetailViewProps): React.JSX.Element;
|
|
105
|
+
declare function PrototypeInboxView({ items, filterCategories, detailSections, accountContacts, buildAccountContacts, emailSignature, buildSuggestedActions: buildSuggestedActionsProp, buildSourceItems: buildSourceItemsProp, getSignalScore: getSignalScoreProp, getTimelineEvents, iconMap, hideToolbarActions, hideHoverActions, onSuggestedActionFeedback, onScoreFeedback, onOpenSignalBucket, headerActions, onOpenEntityPanel, onOpenRecentActivity, onItemSelect, defaultViewMode, buildEntityChips, quickFilterTabs, hideAccountsButton, accountDetailsLabel, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, sectionLayout, renderDetailExtra, renderBeforeScore, renderAfterScore, renderPrimaryAction, renderCommentArea, lastActivityTime, timelineSystemEventsConfig, attentionCount, renderTitleExtra, renderTitleActionRow, renderTitleSubtext, accountDetailsButtonLabel, getAccountDetailsButtonAriaLabel, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
|
|
93
106
|
|
|
94
107
|
export { DetailView, type DetailViewProps, PrototypeInboxView, type PrototypeInboxViewProps };
|
|
@@ -206,14 +206,18 @@ function DetailView({
|
|
|
206
206
|
hideApproveButton,
|
|
207
207
|
signalBriefCopy,
|
|
208
208
|
briefStyleVariant = "default",
|
|
209
|
+
sectionLayout = "default",
|
|
209
210
|
renderDetailExtra,
|
|
210
211
|
renderBeforeScore,
|
|
211
212
|
renderAfterScore,
|
|
213
|
+
renderPrimaryAction,
|
|
214
|
+
renderCommentArea,
|
|
212
215
|
lastActivityTime,
|
|
213
216
|
renderTitleExtra,
|
|
214
217
|
renderTitleActionRow,
|
|
215
218
|
renderTitleSubtext,
|
|
216
219
|
renderMetadataExtra,
|
|
220
|
+
metadataLayout = "default",
|
|
217
221
|
accountDetailsButtonLabel,
|
|
218
222
|
getAccountDetailsButtonAriaLabel,
|
|
219
223
|
onOpenSignalBucket,
|
|
@@ -308,6 +312,95 @@ function DetailView({
|
|
|
308
312
|
},
|
|
309
313
|
[suggestedActions]
|
|
310
314
|
);
|
|
315
|
+
const timeChipToneClass = signalData.timeChipTone === "red" ? "border-red-300 bg-red-50 text-red-700 hover:bg-red-50" : signalData.timeChipTone === "amber" ? "border-amber-300 bg-amber-50 text-amber-700 hover:bg-amber-50" : "hover:bg-muted/50";
|
|
316
|
+
const isCasePanelV2 = sectionLayout === "case-panel-v2";
|
|
317
|
+
const v2WhyText = signalData.signalBrief ? signalData.whyNow || signalData.urgencyExplanation : void 0;
|
|
318
|
+
const metadataChips = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
319
|
+
/* @__PURE__ */ jsx(
|
|
320
|
+
SignalPriorityPopover,
|
|
321
|
+
{
|
|
322
|
+
score: signalData.score,
|
|
323
|
+
urgencyLabel: signalData.urgencyLabel,
|
|
324
|
+
urgencyExplanation: (_b = signalData.urgencyExplanation) != null ? _b : signalData.signalBrief,
|
|
325
|
+
scoreDisplay: signalData.priorityScoreDisplay,
|
|
326
|
+
formulaLabel: signalData.priorityFormulaLabel,
|
|
327
|
+
factors: (_c = signalData.priorityFactors) != null ? _c : [],
|
|
328
|
+
metaText: void 0,
|
|
329
|
+
feedbackChips: signalData.priorityFeedbackChips,
|
|
330
|
+
onFeedbackSubmit: signalData.onPriorityFeedback,
|
|
331
|
+
initialFactorFeedback: signalData.initialFactorPopoverFeedback,
|
|
332
|
+
onFactorFeedback: signalData.onFactorFeedback,
|
|
333
|
+
initialPriorityFeedback: signalData.initialPriorityFeedback
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
signalData.timeChipLabel && /* @__PURE__ */ jsx(
|
|
337
|
+
Badge,
|
|
338
|
+
{
|
|
339
|
+
variant: "outline",
|
|
340
|
+
title: (_d = signalData.timeChipDetail) != null ? _d : void 0,
|
|
341
|
+
className: `transition-colors ${timeChipToneClass}`,
|
|
342
|
+
children: signalData.timeChipLabel
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
/* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
346
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
347
|
+
"button",
|
|
348
|
+
{
|
|
349
|
+
type: "button",
|
|
350
|
+
onClick: onOpenEntityPanel,
|
|
351
|
+
className: "group/account ml-1 inline-flex max-w-full items-center gap-2 rounded-md border border-border/60 bg-background px-2 py-1 transition-colors hover:border-border hover:bg-muted/50",
|
|
352
|
+
"aria-label": (_e = getAccountDetailsButtonAriaLabel == null ? void 0 : getAccountDetailsButtonAriaLabel(item)) != null ? _e : `View account details for ${item.company}`,
|
|
353
|
+
children: [
|
|
354
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded bg-foreground text-[9px] font-semibold uppercase leading-none text-background", children: getCompanyInitials(item.company) }),
|
|
355
|
+
accountDetailsButtonLabel ? /* @__PURE__ */ jsx("span", { className: "inline-flex min-w-0 items-center gap-1.5 text-xs font-medium text-foreground", children: accountDetailsButtonLabel(item) }) : /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium text-foreground", children: item.company }),
|
|
356
|
+
/* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
357
|
+
/* @__PURE__ */ jsx(
|
|
358
|
+
"span",
|
|
359
|
+
{
|
|
360
|
+
"aria-hidden": true,
|
|
361
|
+
className: `h-1.5 w-1.5 shrink-0 rounded-full ${(_f = STATUS_DOT_CLASS[item.statusColor]) != null ? _f : "bg-muted-foreground/40"}`
|
|
362
|
+
}
|
|
363
|
+
),
|
|
364
|
+
/* @__PURE__ */ jsx("span", { className: "-ml-1.5 grid grid-cols-[0fr] transition-all duration-200 ease-out group-hover/account:ml-0 group-hover/account:grid-cols-[1fr]", children: /* @__PURE__ */ jsx("span", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "block whitespace-nowrap text-xs font-medium text-muted-foreground/80", children: "View account" }) }) }),
|
|
365
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3 shrink-0 text-muted-foreground/50 transition-transform duration-150 group-hover/account:translate-x-0.5 group-hover/account:text-muted-foreground" })
|
|
366
|
+
] })
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
) }),
|
|
370
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: "Open account panel" })
|
|
371
|
+
] }) }),
|
|
372
|
+
renderMetadataExtra == null ? void 0 : renderMetadataExtra(item)
|
|
373
|
+
] });
|
|
374
|
+
const timelineSection = sections.timeline && timelineEvents.length > 0 ? /* @__PURE__ */ jsx(
|
|
375
|
+
TimelineSection,
|
|
376
|
+
{
|
|
377
|
+
timelineEvents,
|
|
378
|
+
showTimeline,
|
|
379
|
+
setShowTimeline,
|
|
380
|
+
showSystemEvents,
|
|
381
|
+
setShowSystemEvents,
|
|
382
|
+
attentionCount,
|
|
383
|
+
sysEvtConfig,
|
|
384
|
+
lastActivityTime
|
|
385
|
+
}
|
|
386
|
+
) : null;
|
|
387
|
+
const suggestedActionsSection = sections.suggestedActions ? /* @__PURE__ */ jsx(SignalApproval.Gate, { children: /* @__PURE__ */ jsx(
|
|
388
|
+
SuggestedActions,
|
|
389
|
+
{
|
|
390
|
+
actions: suggestedActions,
|
|
391
|
+
accountContacts,
|
|
392
|
+
signature: emailSignature,
|
|
393
|
+
iconMap,
|
|
394
|
+
onDismiss: (id) => console.log("Dismiss action:", id),
|
|
395
|
+
onSend: (id) => console.log("Send action:", id),
|
|
396
|
+
onSaveDraft: (id) => console.log("Save draft:", id),
|
|
397
|
+
onDuplicate: handleDuplicate,
|
|
398
|
+
onOpenAccountDetails: onOpenEntityPanel,
|
|
399
|
+
onOpenRecentActivity,
|
|
400
|
+
onMarkComplete: (id) => console.log("Mark complete:", id),
|
|
401
|
+
onDispatchAgent: (id) => console.log("Dispatch agent:", id)
|
|
402
|
+
}
|
|
403
|
+
) }) : null;
|
|
311
404
|
return /* @__PURE__ */ jsx(
|
|
312
405
|
SignalApproval.Root,
|
|
313
406
|
{
|
|
@@ -330,21 +423,7 @@ function DetailView({
|
|
|
330
423
|
},
|
|
331
424
|
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-3xl p-6 pb-12 md:p-8", children: [
|
|
332
425
|
/* @__PURE__ */ jsxs("div", { className: "pb-8", children: [
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */ jsxs(
|
|
335
|
-
"button",
|
|
336
|
-
{
|
|
337
|
-
type: "button",
|
|
338
|
-
className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",
|
|
339
|
-
children: [
|
|
340
|
-
/* @__PURE__ */ jsx(ArrowLeft, { className: "h-3.5 w-3.5" }),
|
|
341
|
-
"Back"
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
),
|
|
345
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
|
|
346
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: item.company })
|
|
347
|
-
] }),
|
|
426
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 flex items-center gap-2", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: item.company }) }),
|
|
348
427
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 space-y-3", children: [
|
|
349
428
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-start gap-x-3 gap-y-2", children: [
|
|
350
429
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -355,62 +434,7 @@ function DetailView({
|
|
|
355
434
|
] }),
|
|
356
435
|
renderTitleActionRow ? /* @__PURE__ */ jsx("div", { className: "flex w-full flex-wrap items-center gap-2", children: renderTitleActionRow(item) }) : null
|
|
357
436
|
] }),
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
/* @__PURE__ */ jsx(
|
|
360
|
-
SignalPriorityPopover,
|
|
361
|
-
{
|
|
362
|
-
score: signalData.score,
|
|
363
|
-
urgencyLabel: signalData.urgencyLabel,
|
|
364
|
-
urgencyExplanation: (_b = signalData.urgencyExplanation) != null ? _b : signalData.signalBrief,
|
|
365
|
-
scoreDisplay: signalData.priorityScoreDisplay,
|
|
366
|
-
formulaLabel: signalData.priorityFormulaLabel,
|
|
367
|
-
factors: (_c = signalData.priorityFactors) != null ? _c : [],
|
|
368
|
-
metaText: void 0,
|
|
369
|
-
feedbackChips: signalData.priorityFeedbackChips,
|
|
370
|
-
onFeedbackSubmit: signalData.onPriorityFeedback,
|
|
371
|
-
initialFactorFeedback: signalData.initialFactorPopoverFeedback,
|
|
372
|
-
onFactorFeedback: signalData.onFactorFeedback,
|
|
373
|
-
initialPriorityFeedback: signalData.initialPriorityFeedback
|
|
374
|
-
}
|
|
375
|
-
),
|
|
376
|
-
signalData.timeChipLabel && /* @__PURE__ */ jsx(
|
|
377
|
-
Badge,
|
|
378
|
-
{
|
|
379
|
-
variant: "outline",
|
|
380
|
-
title: (_d = signalData.timeChipDetail) != null ? _d : void 0,
|
|
381
|
-
className: "transition-colors hover:bg-muted/50",
|
|
382
|
-
children: signalData.timeChipLabel
|
|
383
|
-
}
|
|
384
|
-
),
|
|
385
|
-
/* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
386
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
387
|
-
"button",
|
|
388
|
-
{
|
|
389
|
-
type: "button",
|
|
390
|
-
onClick: onOpenEntityPanel,
|
|
391
|
-
className: "group/account ml-1 inline-flex max-w-full items-center gap-2 rounded-md border border-border/60 bg-background px-2 py-1 transition-colors hover:border-border hover:bg-muted/50",
|
|
392
|
-
"aria-label": (_e = getAccountDetailsButtonAriaLabel == null ? void 0 : getAccountDetailsButtonAriaLabel(item)) != null ? _e : `View account details for ${item.company}`,
|
|
393
|
-
children: [
|
|
394
|
-
/* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded bg-foreground text-[9px] font-semibold uppercase leading-none text-background", children: getCompanyInitials(item.company) }),
|
|
395
|
-
accountDetailsButtonLabel ? /* @__PURE__ */ jsx("span", { className: "inline-flex min-w-0 items-center gap-1.5 text-xs font-medium text-foreground", children: accountDetailsButtonLabel(item) }) : /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium text-foreground", children: item.company }),
|
|
396
|
-
/* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
397
|
-
/* @__PURE__ */ jsx(
|
|
398
|
-
"span",
|
|
399
|
-
{
|
|
400
|
-
"aria-hidden": true,
|
|
401
|
-
className: `h-1.5 w-1.5 shrink-0 rounded-full ${(_f = STATUS_DOT_CLASS[item.statusColor]) != null ? _f : "bg-muted-foreground/40"}`
|
|
402
|
-
}
|
|
403
|
-
),
|
|
404
|
-
/* @__PURE__ */ jsx("span", { className: "-ml-1.5 grid grid-cols-[0fr] transition-all duration-200 ease-out group-hover/account:ml-0 group-hover/account:grid-cols-[1fr]", children: /* @__PURE__ */ jsx("span", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "block whitespace-nowrap text-xs font-medium text-muted-foreground/80", children: "View account" }) }) }),
|
|
405
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3 shrink-0 text-muted-foreground/50 transition-transform duration-150 group-hover/account:translate-x-0.5 group-hover/account:text-muted-foreground" })
|
|
406
|
-
] })
|
|
407
|
-
]
|
|
408
|
-
}
|
|
409
|
-
) }),
|
|
410
|
-
/* @__PURE__ */ jsx(TooltipContent, { children: "Open account panel" })
|
|
411
|
-
] }) }),
|
|
412
|
-
renderMetadataExtra == null ? void 0 : renderMetadataExtra(item)
|
|
413
|
-
] }),
|
|
437
|
+
!isCasePanelV2 && metadataLayout === "default" ? /* @__PURE__ */ jsx("div", { className: "mb-6 flex flex-wrap items-center gap-2", children: metadataChips }) : null,
|
|
414
438
|
sections.signalBrief && (() => {
|
|
415
439
|
var _a2;
|
|
416
440
|
const briefHeading = (_a2 = signalBriefCopy == null ? void 0 : signalBriefCopy.heading) != null ? _a2 : "Signal brief";
|
|
@@ -421,51 +445,51 @@ function DetailView({
|
|
|
421
445
|
briefHeading ? /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider mb-3", children: briefHeading }) : null,
|
|
422
446
|
briefIntro && !signalData.signalBrief ? /* @__PURE__ */ jsx("p", { className: isProminent ? "text-sm text-foreground/70 leading-relaxed mb-2" : "text-sm text-muted-foreground leading-relaxed mb-2", children: briefIntro }) : null,
|
|
423
447
|
signalData.signalBrief ? /* @__PURE__ */ jsx("p", { className: isProminent ? "text-base text-foreground leading-relaxed mb-4" : "text-sm text-foreground/90 leading-relaxed mb-4", children: signalData.signalBrief }) : /* @__PURE__ */ jsx("p", { className: isProminent ? "text-base text-foreground leading-relaxed mb-4" : "text-sm text-foreground/90 leading-relaxed mb-4", children: signalData.whyNow }),
|
|
424
|
-
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
448
|
+
isCasePanelV2 || metadataLayout === "below-brief" ? /* @__PURE__ */ jsx("div", { className: "mb-4 flex flex-wrap items-center gap-2", children: metadataChips }) : null,
|
|
449
|
+
!isCasePanelV2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
450
|
+
renderBeforeScore == null ? void 0 : renderBeforeScore(item),
|
|
451
|
+
/* @__PURE__ */ jsx(
|
|
452
|
+
ScoreWhyChips,
|
|
453
|
+
{
|
|
454
|
+
item,
|
|
455
|
+
signalData,
|
|
456
|
+
onOpenSignalBucket
|
|
457
|
+
}
|
|
458
|
+
),
|
|
459
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(SignalApproval.Actions, {}) })
|
|
460
|
+
] }) : null
|
|
434
461
|
] });
|
|
435
462
|
})(),
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
463
|
+
isCasePanelV2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
464
|
+
sections.signalBrief ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
465
|
+
renderBeforeScore == null ? void 0 : renderBeforeScore(item),
|
|
466
|
+
v2WhyText ? /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
|
|
467
|
+
/* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider mb-3", children: "The why" }),
|
|
468
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/90 leading-relaxed mb-4", children: v2WhyText })
|
|
469
|
+
] }) : null,
|
|
470
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
|
|
471
|
+
/* @__PURE__ */ jsx(
|
|
472
|
+
ScoreWhyChips,
|
|
473
|
+
{
|
|
474
|
+
item,
|
|
475
|
+
signalData,
|
|
476
|
+
onOpenSignalBucket
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(SignalApproval.Actions, {}) })
|
|
480
|
+
] })
|
|
481
|
+
] }) : null,
|
|
482
|
+
renderAfterScore == null ? void 0 : renderAfterScore(item),
|
|
483
|
+
renderPrimaryAction == null ? void 0 : renderPrimaryAction(item),
|
|
484
|
+
renderCommentArea == null ? void 0 : renderCommentArea(item),
|
|
485
|
+
timelineSection
|
|
486
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
487
|
+
renderAfterScore == null ? void 0 : renderAfterScore(item),
|
|
488
|
+
timelineSection
|
|
489
|
+
] })
|
|
450
490
|
] }),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
{
|
|
454
|
-
actions: suggestedActions,
|
|
455
|
-
accountContacts,
|
|
456
|
-
signature: emailSignature,
|
|
457
|
-
iconMap,
|
|
458
|
-
onDismiss: (id) => console.log("Dismiss action:", id),
|
|
459
|
-
onSend: (id) => console.log("Send action:", id),
|
|
460
|
-
onSaveDraft: (id) => console.log("Save draft:", id),
|
|
461
|
-
onDuplicate: handleDuplicate,
|
|
462
|
-
onOpenAccountDetails: onOpenEntityPanel,
|
|
463
|
-
onOpenRecentActivity,
|
|
464
|
-
onMarkComplete: (id) => console.log("Mark complete:", id),
|
|
465
|
-
onDispatchAgent: (id) => console.log("Dispatch agent:", id)
|
|
466
|
-
}
|
|
467
|
-
) }),
|
|
468
|
-
renderDetailExtra == null ? void 0 : renderDetailExtra(item)
|
|
491
|
+
!isCasePanelV2 ? suggestedActionsSection : null,
|
|
492
|
+
!isCasePanelV2 ? renderDetailExtra == null ? void 0 : renderDetailExtra(item) : null
|
|
469
493
|
] })
|
|
470
494
|
},
|
|
471
495
|
item.id
|
|
@@ -503,9 +527,12 @@ function PrototypeInboxView({
|
|
|
503
527
|
hideApproveButton,
|
|
504
528
|
signalBriefCopy,
|
|
505
529
|
briefStyleVariant,
|
|
530
|
+
sectionLayout,
|
|
506
531
|
renderDetailExtra,
|
|
507
532
|
renderBeforeScore,
|
|
508
533
|
renderAfterScore,
|
|
534
|
+
renderPrimaryAction,
|
|
535
|
+
renderCommentArea,
|
|
509
536
|
lastActivityTime,
|
|
510
537
|
timelineSystemEventsConfig,
|
|
511
538
|
attentionCount,
|
|
@@ -705,9 +732,12 @@ function PrototypeInboxView({
|
|
|
705
732
|
hideApproveButton,
|
|
706
733
|
signalBriefCopy,
|
|
707
734
|
briefStyleVariant,
|
|
735
|
+
sectionLayout,
|
|
708
736
|
renderDetailExtra,
|
|
709
737
|
renderBeforeScore,
|
|
710
738
|
renderAfterScore,
|
|
739
|
+
renderPrimaryAction,
|
|
740
|
+
renderCommentArea,
|
|
711
741
|
lastActivityTime,
|
|
712
742
|
timelineSystemEventsConfig,
|
|
713
743
|
attentionCount,
|