@handled-ai/design-system 0.17.0 → 0.17.2
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/badge.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- 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/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/tabs.d.ts +1 -1
- 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 +6 -3
- package/dist/index.js +12 -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 -328
- package/dist/prototype/prototype-inbox-view.d.ts +8 -3
- package/dist/prototype/prototype-inbox-view.js +24 -13
- 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/components/__tests__/contextual-quick-action-launcher.test.tsx +99 -188
- package/src/components/__tests__/feedback-primitives.test.tsx +509 -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/feedback-primitives.tsx +424 -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 +6 -0
- package/src/lib/__tests__/user-display.test.ts +43 -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 -0
- package/src/prototype/prototype-inbox-view.tsx +25 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { cn } from './lib/utils.js';
|
|
2
2
|
export { BRAND_GRAPHICS, BRAND_ICONS } from './lib/icons.js';
|
|
3
|
+
export { ProfileLike, displayName, getInitials, shortName } from './lib/user-display.js';
|
|
3
4
|
export { useIsMobile } from './hooks/use-mobile.js';
|
|
4
5
|
export { ActivityDetail, ActivityDetailData, ActivityDetailProps, ActivityParticipant, ActivityThreadMessage } from './components/activity-detail.js';
|
|
5
6
|
export { ActivityLog, ActivityLogItem, ActivityLogProps, ActivityRow } from './components/activity-log.js';
|
|
@@ -26,6 +27,8 @@ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, Di
|
|
|
26
27
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/dropdown-menu.js';
|
|
27
28
|
export { EmptyState, EmptyStateProps } from './components/empty-state.js';
|
|
28
29
|
export { ActivityItem, ConnectedApps, EntityActivityItem, EntityDetails, EntityMetadataField, EntityMetadataGrid, EntityPanel, EntityPanelBrandIcons, EntityPanelHeader, EntityPanelTabs, EntitySection, PanelMode, PotentialContacts, RecentActivity, SystemActivity, useEntityPanel } from './components/entity-panel.js';
|
|
30
|
+
export { FeedbackActions, FeedbackActionsProps, FeedbackChipGroup, FeedbackChipGroupProps, FeedbackChipTree, FeedbackFooter, FeedbackFooterProps, FeedbackInput, FeedbackInputProps, FeedbackSubmitData } from './components/feedback-primitives.js';
|
|
31
|
+
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 SignalScoreData, m as SignalScoreExplanationBucket, n as SignalScoreExplanationSignal, o as SignalScoreUrgencyLabel, W as WorkQueueViewConfig } from './signal-priority-popover-DQ_VuHac.js';
|
|
29
32
|
export { FilterChip, FilterChipProps } from './components/filter-chip.js';
|
|
30
33
|
export { InboxGroupHeader, InboxRow, InboxRowProps } from './components/inbox-row.js';
|
|
31
34
|
export { AssigneeFilter, InboxFilterCategory, InboxToolbar, InboxToolbarProps } from './components/inbox-toolbar.js';
|
|
@@ -52,7 +55,7 @@ export { RichTextAction, RichTextToolbar, RichTextToolbarProps } from './compone
|
|
|
52
55
|
export { ScoreAnalysisModal, ScoreAnalysisModalProps, ScoreAnalysisPanel } from './components/score-analysis-modal.js';
|
|
53
56
|
export { ScoreBreakdown, ScoreBreakdownProps, ScoreFactor } from './components/score-breakdown.js';
|
|
54
57
|
export { ScoreFeedback, useScoreFeedback } from './components/score-feedback.js';
|
|
55
|
-
export {
|
|
58
|
+
export { DEFAULT_TONE_CLASS, SIGNAL_TONE_CLASSES, ScoreWhyChips, ScoreWhyChipsProps, getSignalScoreUrgencyLabel, scoreRangeForUrgency } from './components/score-why-chips.js';
|
|
56
59
|
export { ScoreRing, ScoreRingProps, getScoreColor } from './components/score-ring.js';
|
|
57
60
|
export { ScrollArea, ScrollBar } from './components/scroll-area.js';
|
|
58
61
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select.js';
|
|
@@ -75,6 +78,7 @@ export { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants } from './co
|
|
|
75
78
|
export { Textarea } from './components/textarea.js';
|
|
76
79
|
export { TimelineActivity, TimelineActivityProps, TimelineEvent } from './components/timeline-activity.js';
|
|
77
80
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/tooltip.js';
|
|
81
|
+
export { ActorByline, ActorBylineProps, UserPill, UserPillProps } from './components/user-display.js';
|
|
78
82
|
export { VariableAutocomplete, VariableAutocompleteProps, VariableDef, VariableGroup } from './components/variable-autocomplete.js';
|
|
79
83
|
export { ViewMode, ViewModeToggle, ViewModeToggleProps } from './components/view-mode-toggle.js';
|
|
80
84
|
export { VirtualizedDataTable, VirtualizedDataTableProps } from './components/virtualized-data-table.js';
|
|
@@ -88,7 +92,6 @@ export { VolumeAnalysisChart, VolumeAnalysisChartProps, VolumeDataKey } from './
|
|
|
88
92
|
export { MetricCardData, TopLineMetrics, TopLineMetricsProps } from './charts/top-line-metrics.js';
|
|
89
93
|
export { PipelineFilterBreakdown, PipelineOverview, PipelineOverviewProps, PipelineStage, PipelineStageMetrics, PipelineStageTiming } from './charts/pipeline-overview.js';
|
|
90
94
|
export { SankeyChart, SankeyData, SankeyDropOff, SankeyHoverCardData, SankeyLink, SankeyNode, SankeyStageMetrics } from './charts/sankey-chart.js';
|
|
91
|
-
export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig } from './prototype/prototype-config.js';
|
|
92
95
|
export { PrototypeShell, PrototypeShellProps } from './prototype/prototype-shell.js';
|
|
93
96
|
export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype/prototype-inbox-view.js';
|
|
94
97
|
export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype/prototype-insights-view.js';
|
|
@@ -100,5 +103,5 @@ import 'react';
|
|
|
100
103
|
import 'radix-ui';
|
|
101
104
|
import 'class-variance-authority/types';
|
|
102
105
|
import 'class-variance-authority';
|
|
103
|
-
import 'recharts';
|
|
104
106
|
import 'lucide-react';
|
|
107
|
+
import 'recharts';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "./lib/utils.js";
|
|
2
2
|
import { BRAND_ICONS, BRAND_GRAPHICS } from "./lib/icons.js";
|
|
3
|
+
import { displayName, getInitials, shortName } from "./lib/user-display.js";
|
|
3
4
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
4
5
|
export * from "./components/activity-detail.js";
|
|
5
6
|
export * from "./components/activity-log.js";
|
|
@@ -26,6 +27,8 @@ export * from "./components/dialog.js";
|
|
|
26
27
|
export * from "./components/dropdown-menu.js";
|
|
27
28
|
export * from "./components/empty-state.js";
|
|
28
29
|
export * from "./components/entity-panel.js";
|
|
30
|
+
import { FeedbackFooter, FeedbackChipGroup, FeedbackInput, FeedbackActions } from "./components/feedback-primitives.js";
|
|
31
|
+
import { SignalPriorityPopover } from "./components/signal-priority-popover.js";
|
|
29
32
|
export * from "./components/filter-chip.js";
|
|
30
33
|
export * from "./components/inbox-row.js";
|
|
31
34
|
export * from "./components/inbox-toolbar.js";
|
|
@@ -77,6 +80,7 @@ export * from "./components/tabs.js";
|
|
|
77
80
|
export * from "./components/textarea.js";
|
|
78
81
|
export * from "./components/timeline-activity.js";
|
|
79
82
|
export * from "./components/tooltip.js";
|
|
83
|
+
export * from "./components/user-display.js";
|
|
80
84
|
export * from "./components/variable-autocomplete.js";
|
|
81
85
|
export * from "./components/view-mode-toggle.js";
|
|
82
86
|
export * from "./components/virtualized-data-table.js";
|
|
@@ -95,8 +99,16 @@ export {
|
|
|
95
99
|
BrandIcon,
|
|
96
100
|
CollapsibleSection,
|
|
97
101
|
DraftFeedbackInline,
|
|
102
|
+
FeedbackActions,
|
|
103
|
+
FeedbackChipGroup,
|
|
104
|
+
FeedbackFooter,
|
|
105
|
+
FeedbackInput,
|
|
98
106
|
QuickActionModal,
|
|
107
|
+
SignalPriorityPopover,
|
|
99
108
|
cn,
|
|
109
|
+
displayName,
|
|
110
|
+
getInitials,
|
|
111
|
+
shortName,
|
|
100
112
|
useIsMobile
|
|
101
113
|
};
|
|
102
114
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-why-chips\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\nexport { displayName, getInitials, shortName, type ProfileLike } from \"./lib/user-display\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport { FeedbackFooter, FeedbackChipGroup, FeedbackInput, FeedbackActions } from \"./components/feedback-primitives\"\nexport type { FeedbackFooterProps, FeedbackChipTree, FeedbackChipGroupProps, FeedbackInputProps, FeedbackActionsProps, FeedbackSubmitData } from \"./components/feedback-primitives\"\nexport { SignalPriorityPopover } from \"./components/signal-priority-popover\"\nexport type { SignalPriorityPopoverProps, PriorityFactor } from \"./components/signal-priority-popover\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-why-chips\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/user-display\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;AAC5C,SAAS,aAAa,aAAa,iBAAmC;AAGtE,SAAS,mBAAmB;AAG5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,0BAAwD;AACjE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,gBAAgB,mBAAmB,eAAe,uBAAuB;AAElF,SAAS,6BAA6B;AAEtC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAIK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,2BAA2B;AAEpC,SAAS,wBAAwB,iBAAiB;AAElD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified display name and initials utilities for user profiles.
|
|
3
|
+
*
|
|
4
|
+
* Keep this behavior aligned with handled-platform's display-name utility so
|
|
5
|
+
* user labels and avatar fallbacks render consistently across products.
|
|
6
|
+
*/
|
|
7
|
+
interface ProfileLike {
|
|
8
|
+
first_name?: string | null;
|
|
9
|
+
last_name?: string | null;
|
|
10
|
+
name?: string | null;
|
|
11
|
+
email?: string | null;
|
|
12
|
+
avatar_url?: string | null;
|
|
13
|
+
role?: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns the best display name for a profile.
|
|
17
|
+
* Priority: first_name + last_name > first_name > name > email local-part > Unknown user.
|
|
18
|
+
*/
|
|
19
|
+
declare function displayName(profile?: ProfileLike | null): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns up to 2-character initials for avatar display.
|
|
22
|
+
* Priority: first/last initials > split name > first two email local chars > ?.
|
|
23
|
+
*/
|
|
24
|
+
declare function getInitials(profile?: ProfileLike | null): string;
|
|
25
|
+
/**
|
|
26
|
+
* Returns "First L." format for compact display.
|
|
27
|
+
* Falls back to displayName() if last name is unavailable.
|
|
28
|
+
*/
|
|
29
|
+
declare function shortName(profile?: ProfileLike | null): string;
|
|
30
|
+
|
|
31
|
+
export { type ProfileLike, displayName, getInitials, shortName };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function clean(value) {
|
|
2
|
+
const trimmed = value == null ? void 0 : value.trim();
|
|
3
|
+
return trimmed ? trimmed : void 0;
|
|
4
|
+
}
|
|
5
|
+
function emailLocalPart(email) {
|
|
6
|
+
const normalizedEmail = clean(email);
|
|
7
|
+
return (normalizedEmail == null ? void 0 : normalizedEmail.split("@")[0]) || void 0;
|
|
8
|
+
}
|
|
9
|
+
function displayName(profile) {
|
|
10
|
+
var _a;
|
|
11
|
+
const firstName = clean(profile == null ? void 0 : profile.first_name);
|
|
12
|
+
const lastName = clean(profile == null ? void 0 : profile.last_name);
|
|
13
|
+
if (firstName && lastName) {
|
|
14
|
+
return `${firstName} ${lastName}`;
|
|
15
|
+
}
|
|
16
|
+
if (firstName) return firstName;
|
|
17
|
+
const fullName = clean(profile == null ? void 0 : profile.name);
|
|
18
|
+
if (fullName) return fullName;
|
|
19
|
+
return (_a = emailLocalPart(profile == null ? void 0 : profile.email)) != null ? _a : "Unknown user";
|
|
20
|
+
}
|
|
21
|
+
function getInitials(profile) {
|
|
22
|
+
var _a;
|
|
23
|
+
const firstName = clean(profile == null ? void 0 : profile.first_name);
|
|
24
|
+
const lastName = clean(profile == null ? void 0 : profile.last_name);
|
|
25
|
+
if (firstName && lastName) {
|
|
26
|
+
return (firstName[0] + lastName[0]).toUpperCase();
|
|
27
|
+
}
|
|
28
|
+
const fullName = (_a = clean(profile == null ? void 0 : profile.name)) != null ? _a : firstName;
|
|
29
|
+
if (fullName) {
|
|
30
|
+
const parts = fullName.split(/\s+/).filter(Boolean);
|
|
31
|
+
if (parts.length >= 2) {
|
|
32
|
+
return (parts[0][0] + parts[1][0]).toUpperCase();
|
|
33
|
+
}
|
|
34
|
+
if (parts.length === 1 && parts[0].length > 0) {
|
|
35
|
+
return parts[0].slice(0, 2).toUpperCase();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const localPart = emailLocalPart(profile == null ? void 0 : profile.email);
|
|
39
|
+
if (localPart) {
|
|
40
|
+
return localPart.slice(0, 2).toUpperCase();
|
|
41
|
+
}
|
|
42
|
+
return "?";
|
|
43
|
+
}
|
|
44
|
+
function shortName(profile) {
|
|
45
|
+
const firstName = clean(profile == null ? void 0 : profile.first_name);
|
|
46
|
+
const lastName = clean(profile == null ? void 0 : profile.last_name);
|
|
47
|
+
if (firstName && lastName) {
|
|
48
|
+
return `${firstName} ${lastName[0]}.`;
|
|
49
|
+
}
|
|
50
|
+
return displayName(profile);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
displayName,
|
|
54
|
+
getInitials,
|
|
55
|
+
shortName
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=user-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/user-display.ts"],"sourcesContent":["/**\n * Unified display name and initials utilities for user profiles.\n *\n * Keep this behavior aligned with handled-platform's display-name utility so\n * user labels and avatar fallbacks render consistently across products.\n */\nexport interface ProfileLike {\n first_name?: string | null\n last_name?: string | null\n name?: string | null\n email?: string | null\n avatar_url?: string | null\n role?: string | null\n}\n\nfunction clean(value: string | null | undefined): string | undefined {\n const trimmed = value?.trim()\n return trimmed ? trimmed : undefined\n}\n\nfunction emailLocalPart(email: string | null | undefined): string | undefined {\n const normalizedEmail = clean(email)\n return normalizedEmail?.split(\"@\")[0] || undefined\n}\n\n/**\n * Returns the best display name for a profile.\n * Priority: first_name + last_name > first_name > name > email local-part > Unknown user.\n */\nexport function displayName(profile?: ProfileLike | null): string {\n const firstName = clean(profile?.first_name)\n const lastName = clean(profile?.last_name)\n\n if (firstName && lastName) {\n return `${firstName} ${lastName}`\n }\n if (firstName) return firstName\n\n const fullName = clean(profile?.name)\n if (fullName) return fullName\n\n return emailLocalPart(profile?.email) ?? \"Unknown user\"\n}\n\n/**\n * Returns up to 2-character initials for avatar display.\n * Priority: first/last initials > split name > first two email local chars > ?.\n */\nexport function getInitials(profile?: ProfileLike | null): string {\n const firstName = clean(profile?.first_name)\n const lastName = clean(profile?.last_name)\n\n if (firstName && lastName) {\n return (firstName[0] + lastName[0]).toUpperCase()\n }\n\n const fullName = clean(profile?.name) ?? firstName\n if (fullName) {\n const parts = fullName.split(/\\s+/).filter(Boolean)\n if (parts.length >= 2) {\n return (parts[0][0] + parts[1][0]).toUpperCase()\n }\n if (parts.length === 1 && parts[0].length > 0) {\n return parts[0].slice(0, 2).toUpperCase()\n }\n }\n\n const localPart = emailLocalPart(profile?.email)\n if (localPart) {\n return localPart.slice(0, 2).toUpperCase()\n }\n\n return \"?\"\n}\n\n/**\n * Returns \"First L.\" format for compact display.\n * Falls back to displayName() if last name is unavailable.\n */\nexport function shortName(profile?: ProfileLike | null): string {\n const firstName = clean(profile?.first_name)\n const lastName = clean(profile?.last_name)\n\n if (firstName && lastName) {\n return `${firstName} ${lastName[0]}.`\n }\n return displayName(profile)\n}\n"],"mappings":"AAeA,SAAS,MAAM,OAAsD;AACnE,QAAM,UAAU,+BAAO;AACvB,SAAO,UAAU,UAAU;AAC7B;AAEA,SAAS,eAAe,OAAsD;AAC5E,QAAM,kBAAkB,MAAM,KAAK;AACnC,UAAO,mDAAiB,MAAM,KAAK,OAAM;AAC3C;AAMO,SAAS,YAAY,SAAsC;AA7BlE;AA8BE,QAAM,YAAY,MAAM,mCAAS,UAAU;AAC3C,QAAM,WAAW,MAAM,mCAAS,SAAS;AAEzC,MAAI,aAAa,UAAU;AACzB,WAAO,GAAG,SAAS,IAAI,QAAQ;AAAA,EACjC;AACA,MAAI,UAAW,QAAO;AAEtB,QAAM,WAAW,MAAM,mCAAS,IAAI;AACpC,MAAI,SAAU,QAAO;AAErB,UAAO,oBAAe,mCAAS,KAAK,MAA7B,YAAkC;AAC3C;AAMO,SAAS,YAAY,SAAsC;AAhDlE;AAiDE,QAAM,YAAY,MAAM,mCAAS,UAAU;AAC3C,QAAM,WAAW,MAAM,mCAAS,SAAS;AAEzC,MAAI,aAAa,UAAU;AACzB,YAAQ,UAAU,CAAC,IAAI,SAAS,CAAC,GAAG,YAAY;AAAA,EAClD;AAEA,QAAM,YAAW,WAAM,mCAAS,IAAI,MAAnB,YAAwB;AACzC,MAAI,UAAU;AACZ,UAAM,QAAQ,SAAS,MAAM,KAAK,EAAE,OAAO,OAAO;AAClD,QAAI,MAAM,UAAU,GAAG;AACrB,cAAQ,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC,GAAG,YAAY;AAAA,IACjD;AACA,QAAI,MAAM,WAAW,KAAK,MAAM,CAAC,EAAE,SAAS,GAAG;AAC7C,aAAO,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,YAAY;AAAA,IAC1C;AAAA,EACF;AAEA,QAAM,YAAY,eAAe,mCAAS,KAAK;AAC/C,MAAI,WAAW;AACb,WAAO,UAAU,MAAM,GAAG,CAAC,EAAE,YAAY;AAAA,EAC3C;AAEA,SAAO;AACT;AAMO,SAAS,UAAU,SAAsC;AAC9D,QAAM,YAAY,MAAM,mCAAS,UAAU;AAC3C,QAAM,WAAW,MAAM,mCAAS,SAAS;AAEzC,MAAI,aAAa,UAAU;AACzB,WAAO,GAAG,SAAS,IAAI,SAAS,CAAC,CAAC;AAAA,EACpC;AACA,SAAO,YAAY,OAAO;AAC5B;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig } from '
|
|
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, l as SignalScoreData, m as SignalScoreExplanationBucket, n as SignalScoreExplanationSignal, o as SignalScoreUrgencyLabel, W as WorkQueueViewConfig } from '../signal-priority-popover-DQ_VuHac.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';
|
|
@@ -6,6 +6,7 @@ export { PrototypeAccountsView, PrototypeAccountsViewProps } from './prototype-a
|
|
|
6
6
|
export { PrototypeAdminView, PrototypeAdminViewProps } from './prototype-admin-view.js';
|
|
7
7
|
export { PrototypeWorkQueueView, PrototypeWorkQueueViewProps } from './prototype-work-queue-view.js';
|
|
8
8
|
import 'react';
|
|
9
|
+
import '../components/feedback-primitives.js';
|
|
9
10
|
import '../components/quick-action-sidebar-nav.js';
|
|
10
11
|
import '../components/quick-action-modal.js';
|
|
11
12
|
import '../components/score-breakdown.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AccountsViewConfig } from '
|
|
2
|
+
import { a as AccountsViewConfig } from '../signal-priority-popover-DQ_VuHac.js';
|
|
3
3
|
import { DataRow } from '../components/data-table.js';
|
|
4
|
+
import '../components/feedback-primitives.js';
|
|
4
5
|
import '../components/quick-action-sidebar-nav.js';
|
|
5
6
|
import '../components/quick-action-modal.js';
|
|
6
7
|
import '../components/score-breakdown.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdminViewConfig } from '
|
|
2
|
+
import { c as AdminViewConfig } from '../signal-priority-popover-DQ_VuHac.js';
|
|
3
|
+
import '../components/feedback-primitives.js';
|
|
3
4
|
import '../components/quick-action-sidebar-nav.js';
|
|
4
5
|
import '../components/quick-action-modal.js';
|
|
5
6
|
import '../components/score-breakdown.js';
|
|
@@ -1,330 +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 content between the signal brief text and the signal score bar (e.g. "Signals on Case" chips). */
|
|
172
|
-
renderBeforeScore?: (item: QueueItem) => React.ReactNode;
|
|
173
|
-
/** Render content between the signal score section and the activity timeline (e.g. OpportunityPanel). */
|
|
174
|
-
renderAfterScore?: (item: QueueItem) => React.ReactNode;
|
|
175
|
-
/** Formatted string for "Last activity X ago" in the collapsed timeline header. If omitted, falls back to the first event's time. */
|
|
176
|
-
lastActivityTime?: string;
|
|
177
|
-
/** Sort options for the inbox. When provided, a sort dropdown is rendered in the split view toolbar. */
|
|
178
|
-
sortOptions?: InboxSortOption[];
|
|
179
|
-
/** Currently active sort option id. */
|
|
180
|
-
activeSortId?: string;
|
|
181
|
-
/** Callback when the user changes the sort option. */
|
|
182
|
-
onSortChange?: (sortId: string) => void;
|
|
183
|
-
}
|
|
184
|
-
interface InsightsCustomTab {
|
|
185
|
-
id: string;
|
|
186
|
-
label: string;
|
|
187
|
-
icon?: React.ComponentType<{
|
|
188
|
-
className?: string;
|
|
189
|
-
}>;
|
|
190
|
-
content: React.ReactNode;
|
|
191
|
-
}
|
|
192
|
-
interface InsightsViewConfig {
|
|
193
|
-
customTabs?: InsightsCustomTab[];
|
|
194
|
-
tabs?: {
|
|
195
|
-
overview?: boolean;
|
|
196
|
-
analytics?: boolean;
|
|
197
|
-
};
|
|
198
|
-
coaching?: {
|
|
199
|
-
enabled?: boolean;
|
|
200
|
-
message?: string;
|
|
201
|
-
};
|
|
202
|
-
metrics?: MetricCardProps[];
|
|
203
|
-
expandedMetrics?: MetricCardProps[];
|
|
204
|
-
dashboardCards?: {
|
|
205
|
-
topTasks?: boolean;
|
|
206
|
-
upcomingMeetings?: boolean;
|
|
207
|
-
recentlyCompleted?: boolean;
|
|
208
|
-
checkIns?: boolean;
|
|
209
|
-
};
|
|
210
|
-
analytics?: {
|
|
211
|
-
pipeline?: {
|
|
212
|
-
stages: PipelineStage[];
|
|
213
|
-
stageMetrics: Record<string, PipelineStageMetrics>;
|
|
214
|
-
stageTimings: (PipelineStageTiming | null)[];
|
|
215
|
-
filterBreakdowns?: Record<string, Record<string, Record<string, number>>>;
|
|
216
|
-
};
|
|
217
|
-
volumeChart?: {
|
|
218
|
-
data: Record<string, unknown>[];
|
|
219
|
-
dataKeys: Array<{
|
|
220
|
-
key: string;
|
|
221
|
-
color: string;
|
|
222
|
-
}>;
|
|
223
|
-
filterOptions?: Array<{
|
|
224
|
-
label: string;
|
|
225
|
-
value: string;
|
|
226
|
-
}>;
|
|
227
|
-
};
|
|
228
|
-
donutChart?: {
|
|
229
|
-
data: Array<{
|
|
230
|
-
name: string;
|
|
231
|
-
value: number;
|
|
232
|
-
color: string;
|
|
233
|
-
}>;
|
|
234
|
-
centerLabel?: number;
|
|
235
|
-
};
|
|
236
|
-
trendChart?: {
|
|
237
|
-
data: Record<string, unknown>[];
|
|
238
|
-
series: Array<{
|
|
239
|
-
dataKey: string;
|
|
240
|
-
color: string;
|
|
241
|
-
}>;
|
|
242
|
-
xAxisKey?: string;
|
|
243
|
-
height?: number;
|
|
244
|
-
toggleOptions?: string[];
|
|
245
|
-
};
|
|
246
|
-
barChart?: {
|
|
247
|
-
data: Record<string, unknown>[];
|
|
248
|
-
bars: Array<{
|
|
249
|
-
dataKey: string;
|
|
250
|
-
color: string;
|
|
251
|
-
name: string;
|
|
252
|
-
icon?: LucideIcon;
|
|
253
|
-
}>;
|
|
254
|
-
};
|
|
255
|
-
barList?: {
|
|
256
|
-
data: Array<{
|
|
257
|
-
name: string;
|
|
258
|
-
value: number;
|
|
259
|
-
}>;
|
|
260
|
-
valueFormatter?: (v: number) => string;
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
interface AccountFilterTab {
|
|
265
|
-
label: string;
|
|
266
|
-
count?: number;
|
|
267
|
-
variant?: "default" | "attention" | "ghost";
|
|
268
|
-
}
|
|
269
|
-
interface AccountsViewConfig {
|
|
270
|
-
filterTabs?: AccountFilterTab[];
|
|
271
|
-
rows?: DataRow[];
|
|
272
|
-
filterCategories?: DataTableFilterCategory[];
|
|
273
|
-
quickViews?: string[];
|
|
274
|
-
moreQuickViews?: string[];
|
|
275
|
-
quickViewFilters?: Record<string, (row: DataRow) => boolean>;
|
|
276
|
-
iconMap?: {
|
|
277
|
-
salesforce?: string;
|
|
278
|
-
};
|
|
279
|
-
entityUrlBuilder?: (row: DataRow) => string;
|
|
280
|
-
onScoreFactorFeedback?: (account: string, scoreType: string, factorKey: string, type: "up" | "down" | null, detail?: string) => void;
|
|
281
|
-
onScoreApproveFeedback?: (account: string, scoreType: string, reasons: string[], detail: string) => void;
|
|
282
|
-
onScoreDismissFeedback?: (account: string, scoreType: string, reasons: string[], detail: string) => void;
|
|
283
|
-
}
|
|
284
|
-
interface WorkQueueViewConfig {
|
|
285
|
-
[key: string]: unknown;
|
|
286
|
-
}
|
|
287
|
-
interface AdminTab {
|
|
288
|
-
id: string;
|
|
289
|
-
label: string;
|
|
290
|
-
icon?: React.ComponentType<{
|
|
291
|
-
className?: string;
|
|
292
|
-
}>;
|
|
293
|
-
content: React.ReactNode;
|
|
294
|
-
}
|
|
295
|
-
interface AdminViewConfig {
|
|
296
|
-
/** View title displayed in the header. Defaults to "Admin". */
|
|
297
|
-
title?: string;
|
|
298
|
-
/** Icon displayed next to the title. */
|
|
299
|
-
icon?: React.ComponentType<{
|
|
300
|
-
className?: string;
|
|
301
|
-
}>;
|
|
302
|
-
tabs: AdminTab[];
|
|
303
|
-
/** Which tab is active initially. Defaults to first tab's id. */
|
|
304
|
-
defaultTab?: string;
|
|
305
|
-
}
|
|
306
|
-
interface EntityPanelSection {
|
|
307
|
-
type: "details" | "contacts" | "recentActivity" | "connectedApps" | "systemActivity";
|
|
308
|
-
props?: Record<string, unknown>;
|
|
309
|
-
}
|
|
310
|
-
interface EntityPanelConfig {
|
|
311
|
-
sections?: EntityPanelSection[];
|
|
312
|
-
icons?: Record<string, string>;
|
|
313
|
-
}
|
|
314
|
-
interface PrototypeConfig {
|
|
315
|
-
brand?: PrototypeBrandConfig;
|
|
316
|
-
sidebar: SidebarNavSection[];
|
|
317
|
-
views: {
|
|
318
|
-
inbox?: InboxViewConfig;
|
|
319
|
-
insights?: InsightsViewConfig;
|
|
320
|
-
accounts?: AccountsViewConfig;
|
|
321
|
-
workQueue?: WorkQueueViewConfig;
|
|
322
|
-
admin?: AdminViewConfig;
|
|
323
|
-
};
|
|
324
|
-
defaultView: string;
|
|
325
|
-
entityPanel?: EntityPanelConfig;
|
|
326
|
-
/** Sidebar item IDs that trigger view navigation. Defaults to keys of `views`. */
|
|
327
|
-
navigableViews?: string[];
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
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';
|
|
@@ -51,6 +52,10 @@ interface DetailViewProps {
|
|
|
51
52
|
/** Render content between the signal score section and the activity timeline. */
|
|
52
53
|
renderAfterScore?: (item: QueueItem) => React.ReactNode;
|
|
53
54
|
lastActivityTime?: string;
|
|
55
|
+
/** Render extra content inline with the detail title. */
|
|
56
|
+
renderTitleExtra?: (item: QueueItem) => React.ReactNode;
|
|
57
|
+
/** Render supporting content below the detail title. */
|
|
58
|
+
renderTitleSubtext?: (item: QueueItem) => React.ReactNode;
|
|
54
59
|
/** Render extra metadata chips (e.g. assignee) inside the chips row below the title. */
|
|
55
60
|
renderMetadataExtra?: (item: QueueItem) => React.ReactNode;
|
|
56
61
|
onOpenSignalBucket?: (args: {
|
|
@@ -64,7 +69,7 @@ interface DetailViewProps {
|
|
|
64
69
|
/** Number of important/attention-worthy events to highlight on the collapsed timeline header. */
|
|
65
70
|
attentionCount?: number;
|
|
66
71
|
}
|
|
67
|
-
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, renderMetadataExtra, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, }: DetailViewProps): React.JSX.Element;
|
|
68
|
-
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, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
|
|
72
|
+
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, renderTitleSubtext, renderMetadataExtra, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, }: DetailViewProps): React.JSX.Element;
|
|
73
|
+
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, renderTitleExtra, renderTitleSubtext, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
|
|
69
74
|
|
|
70
75
|
export { DetailView, type DetailViewProps, PrototypeInboxView, type PrototypeInboxViewProps };
|