@handled-ai/design-system 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +66 -23
- package/dist/index.js +122 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2809,7 +2809,24 @@ function isRowMatchingCategoryFilter(row, categoryId, options) {
|
|
|
2809
2809
|
return true;
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
|
-
function DataTable({
|
|
2812
|
+
function DataTable({
|
|
2813
|
+
onRowClick,
|
|
2814
|
+
rows: rowsProp,
|
|
2815
|
+
filterCategories: filterCategoriesProp,
|
|
2816
|
+
quickViews: quickViewsProp,
|
|
2817
|
+
moreQuickViews: moreQuickViewsProp,
|
|
2818
|
+
quickViewFilters: quickViewFiltersProp,
|
|
2819
|
+
iconMap,
|
|
2820
|
+
entityUrlBuilder,
|
|
2821
|
+
onScoreFactorFeedback,
|
|
2822
|
+
onScoreApproveFeedback,
|
|
2823
|
+
onScoreDismissFeedback
|
|
2824
|
+
} = {}) {
|
|
2825
|
+
const resolvedRows = rowsProp != null ? rowsProp : ROWS;
|
|
2826
|
+
const resolvedFilterCategories = filterCategoriesProp != null ? filterCategoriesProp : FILTER_CATEGORIES;
|
|
2827
|
+
const resolvedQuickViews = quickViewsProp != null ? quickViewsProp : QUICK_VIEWS;
|
|
2828
|
+
const resolvedMoreQuickViews = moreQuickViewsProp != null ? moreQuickViewsProp : MORE_QUICK_VIEWS;
|
|
2829
|
+
const resolvedQuickViewFilters = quickViewFiltersProp != null ? quickViewFiltersProp : QUICK_VIEW_FILTERS;
|
|
2813
2830
|
const [sorting, setSorting] = React56.useState([]);
|
|
2814
2831
|
const [columnVisibility, setColumnVisibility] = React56.useState(
|
|
2815
2832
|
DEFAULT_COLUMN_VISIBILITY
|
|
@@ -2838,9 +2855,9 @@ function DataTable({ onRowClick } = {}) {
|
|
|
2838
2855
|
});
|
|
2839
2856
|
}, [activeQuickView]);
|
|
2840
2857
|
const filteredRows = React56.useMemo(() => {
|
|
2841
|
-
return
|
|
2858
|
+
return resolvedRows.filter((row) => {
|
|
2842
2859
|
var _a, _b;
|
|
2843
|
-
const quickViewMatches = activeQuickView ? (_b = (_a =
|
|
2860
|
+
const quickViewMatches = activeQuickView ? (_b = (_a = resolvedQuickViewFilters[activeQuickView]) == null ? void 0 : _a.call(resolvedQuickViewFilters, row)) != null ? _b : true : true;
|
|
2844
2861
|
if (!quickViewMatches) {
|
|
2845
2862
|
return false;
|
|
2846
2863
|
}
|
|
@@ -2848,13 +2865,14 @@ function DataTable({ onRowClick } = {}) {
|
|
|
2848
2865
|
([categoryId, options]) => isRowMatchingCategoryFilter(row, categoryId, options)
|
|
2849
2866
|
);
|
|
2850
2867
|
});
|
|
2851
|
-
}, [activeQuickView, selectedFilters]);
|
|
2868
|
+
}, [activeQuickView, selectedFilters, resolvedRows, resolvedQuickViewFilters]);
|
|
2852
2869
|
const columns = React56.useMemo(
|
|
2853
2870
|
() => [
|
|
2854
2871
|
columnHelper.accessor("name", {
|
|
2855
2872
|
header: "Entity",
|
|
2856
2873
|
cell: (info) => {
|
|
2857
2874
|
const row = info.row.original;
|
|
2875
|
+
const sfUrl = entityUrlBuilder == null ? void 0 : entityUrlBuilder(row);
|
|
2858
2876
|
return /* @__PURE__ */ React56.createElement("div", { className: "flex min-w-max items-center gap-3" }, /* @__PURE__ */ React56.createElement(
|
|
2859
2877
|
"div",
|
|
2860
2878
|
{
|
|
@@ -2864,7 +2882,17 @@ function DataTable({ onRowClick } = {}) {
|
|
|
2864
2882
|
)
|
|
2865
2883
|
},
|
|
2866
2884
|
row.name.slice(0, 1)
|
|
2867
|
-
), /* @__PURE__ */ React56.createElement("span", { className: "text-sm font-medium text-foreground" }, row.name))
|
|
2885
|
+
), /* @__PURE__ */ React56.createElement("span", { className: "text-sm font-medium text-foreground" }, row.name), (iconMap == null ? void 0 : iconMap.salesforce) && /* @__PURE__ */ React56.createElement(
|
|
2886
|
+
"a",
|
|
2887
|
+
{
|
|
2888
|
+
href: sfUrl != null ? sfUrl : "#",
|
|
2889
|
+
target: "_blank",
|
|
2890
|
+
rel: "noopener noreferrer",
|
|
2891
|
+
onClick: (e) => e.stopPropagation(),
|
|
2892
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground transition-colors"
|
|
2893
|
+
},
|
|
2894
|
+
/* @__PURE__ */ React56.createElement("img", { src: iconMap.salesforce, alt: "Salesforce", className: "w-4 h-4 object-contain" })
|
|
2895
|
+
));
|
|
2868
2896
|
}
|
|
2869
2897
|
}),
|
|
2870
2898
|
columnHelper.accessor("accountRisks", {
|
|
@@ -2995,7 +3023,7 @@ function DataTable({ onRowClick } = {}) {
|
|
|
2995
3023
|
cell: (info) => /* @__PURE__ */ React56.createElement("span", { className: "rounded-md bg-muted/50 px-2 py-0.5 text-xs font-medium" }, info.getValue())
|
|
2996
3024
|
})
|
|
2997
3025
|
],
|
|
2998
|
-
[]
|
|
3026
|
+
[iconMap, entityUrlBuilder]
|
|
2999
3027
|
);
|
|
3000
3028
|
const table = useReactTable({
|
|
3001
3029
|
data: filteredRows,
|
|
@@ -3025,7 +3053,7 @@ function DataTable({ onRowClick } = {}) {
|
|
|
3025
3053
|
return /* @__PURE__ */ React56.createElement("div", { className: "flex h-full min-h-[560px] flex-col bg-background" }, /* @__PURE__ */ React56.createElement(
|
|
3026
3054
|
DataTableToolbar,
|
|
3027
3055
|
{
|
|
3028
|
-
categories:
|
|
3056
|
+
categories: resolvedFilterCategories,
|
|
3029
3057
|
selectedFilters,
|
|
3030
3058
|
onToggleFilter: toggleCategoryFilter,
|
|
3031
3059
|
sorting,
|
|
@@ -3040,8 +3068,8 @@ function DataTable({ onRowClick } = {}) {
|
|
|
3040
3068
|
), /* @__PURE__ */ React56.createElement(
|
|
3041
3069
|
DataTableQuickViews,
|
|
3042
3070
|
{
|
|
3043
|
-
quickViews:
|
|
3044
|
-
moreViews:
|
|
3071
|
+
quickViews: resolvedQuickViews,
|
|
3072
|
+
moreViews: resolvedMoreQuickViews,
|
|
3045
3073
|
activeView: activeQuickView,
|
|
3046
3074
|
onViewChange: setActiveQuickView
|
|
3047
3075
|
}
|
|
@@ -3096,12 +3124,12 @@ function DataTable({ onRowClick } = {}) {
|
|
|
3096
3124
|
whyNow: data.whyNow,
|
|
3097
3125
|
evidence: data.evidence,
|
|
3098
3126
|
factors: data.factors,
|
|
3099
|
-
onFactorFeedback: (key, type, detail) => console.log("Factor feedback:", { account: scoreModal.row.name, factor: key, type, detail }),
|
|
3127
|
+
onFactorFeedback: onScoreFactorFeedback ? (key, type, detail) => onScoreFactorFeedback(scoreModal.row.name, scoreModal.type, key, type, detail) : (key, type, detail) => console.log("Factor feedback:", { account: scoreModal.row.name, factor: key, type, detail }),
|
|
3100
3128
|
companyName: scoreModal.row.name,
|
|
3101
3129
|
opportunityUrl: `https://acme.lightning.force.com/lightning/r/Opportunity/006${scoreModal.row.id}/view`,
|
|
3102
3130
|
onApprove: () => console.log("Approved signal \u2014 creating opportunity:", { account: scoreModal.row.name, type: scoreModal.type }),
|
|
3103
|
-
onApproveFeedback: (reasons, detail) => console.log("Approval feedback:", { account: scoreModal.row.name, reasons, detail }),
|
|
3104
|
-
onDismiss: (reasons, detail) => console.log("Dismissed signal:", { account: scoreModal.row.name, reasons, detail })
|
|
3131
|
+
onApproveFeedback: onScoreApproveFeedback ? (reasons, detail) => onScoreApproveFeedback(scoreModal.row.name, scoreModal.type, reasons, detail) : (reasons, detail) => console.log("Approval feedback:", { account: scoreModal.row.name, reasons, detail }),
|
|
3132
|
+
onDismiss: onScoreDismissFeedback ? (reasons, detail) => onScoreDismissFeedback(scoreModal.row.name, scoreModal.type, reasons, detail) : (reasons, detail) => console.log("Dismissed signal:", { account: scoreModal.row.name, reasons, detail })
|
|
3105
3133
|
}
|
|
3106
3134
|
);
|
|
3107
3135
|
})());
|
|
@@ -3288,7 +3316,7 @@ function DonutChart({
|
|
|
3288
3316
|
), /* @__PURE__ */ React56.createElement(
|
|
3289
3317
|
"span",
|
|
3290
3318
|
{
|
|
3291
|
-
className: "
|
|
3319
|
+
className: "whitespace-nowrap font-medium text-slate-600",
|
|
3292
3320
|
title: d.name
|
|
3293
3321
|
},
|
|
3294
3322
|
d.name
|
|
@@ -3438,7 +3466,8 @@ function EntityPanelHeader({
|
|
|
3438
3466
|
icon,
|
|
3439
3467
|
title,
|
|
3440
3468
|
badgeLabel,
|
|
3441
|
-
subtitle
|
|
3469
|
+
subtitle,
|
|
3470
|
+
headerAction
|
|
3442
3471
|
}) {
|
|
3443
3472
|
const { isFullscreen, setIsFullscreen, onClose } = useEntityPanel();
|
|
3444
3473
|
return /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between mb-6" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 min-w-0" }, icon != null ? icon : /* @__PURE__ */ React56.createElement(CalendarDays, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React56.createElement("h2", { className: "text-lg font-semibold text-foreground truncate" }, title), badgeLabel && /* @__PURE__ */ React56.createElement(
|
|
@@ -3448,7 +3477,7 @@ function EntityPanelHeader({
|
|
|
3448
3477
|
className: "text-blue-600 border-blue-300 dark:border-blue-700 dark:text-blue-400 shadow-none px-2 py-0.5 text-[11px] font-medium shrink-0"
|
|
3449
3478
|
},
|
|
3450
3479
|
badgeLabel
|
|
3451
|
-
)), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1 shrink-0 ml-4 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(
|
|
3480
|
+
)), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1 shrink-0 ml-4 text-muted-foreground" }, headerAction, /* @__PURE__ */ React56.createElement(
|
|
3452
3481
|
"button",
|
|
3453
3482
|
{
|
|
3454
3483
|
type: "button",
|
|
@@ -4882,7 +4911,7 @@ function MetricCard({
|
|
|
4882
4911
|
// Donut Chart Variant
|
|
4883
4912
|
/* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-4 mt-2 mb-6" }, /* @__PURE__ */ React56.createElement("div", { className: "shrink-0" }, renderDonut()), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col gap-2 flex-1 min-w-0" }, dataPoints.slice(0, 5).map((dp, i) => {
|
|
4884
4913
|
const colors = ["bg-[#166534]", "bg-[#22c55e]", "bg-[#6ee7b7]", "bg-[#ccfbf1]", "bg-[#f1f5f9]"];
|
|
4885
|
-
return /* @__PURE__ */ React56.createElement("div", { key: dp.label, className: "flex items-center justify-between gap-2 text-[11px] font-medium min-w-0" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1.5 text-muted-foreground min-w-0" }, /* @__PURE__ */ React56.createElement("div", { className: cn("w-1.5 h-1.5 rounded-full shrink-0", dp.color ? "" : colors[i % colors.length]), style: dp.color ? { backgroundColor: dp.color } : {} }), /* @__PURE__ */ React56.createElement("span", { className: "
|
|
4914
|
+
return /* @__PURE__ */ React56.createElement("div", { key: dp.label, className: "flex items-center justify-between gap-2 text-[11px] font-medium min-w-0" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1.5 text-muted-foreground min-w-0" }, /* @__PURE__ */ React56.createElement("div", { className: cn("w-1.5 h-1.5 rounded-full shrink-0", dp.color ? "" : colors[i % colors.length]), style: dp.color ? { backgroundColor: dp.color } : {} }), /* @__PURE__ */ React56.createElement("span", { className: "whitespace-nowrap" }, dp.label)), /* @__PURE__ */ React56.createElement("span", { className: "text-foreground font-semibold shrink-0" }, dp.value));
|
|
4886
4915
|
})))
|
|
4887
4916
|
) : title && // Standard Big Number Variant (only if title exists)
|
|
4888
4917
|
/* @__PURE__ */ React56.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-baseline gap-1" }, /* @__PURE__ */ React56.createElement("span", { className: "text-4xl font-bold tracking-tight text-foreground" }, value), unit && /* @__PURE__ */ React56.createElement("span", { className: "text-2xl font-bold tracking-tight text-foreground" }, unit)), subtitle && /* @__PURE__ */ React56.createElement("p", { className: "text-sm font-medium text-muted-foreground mt-1" }, subtitle)), /* @__PURE__ */ React56.createElement("div", { className: "mt-auto flex flex-col gap-1.5" }, change && /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1" }, (() => {
|
|
@@ -6072,6 +6101,8 @@ function QuickActionSidebarNav(_a) {
|
|
|
6072
6101
|
className,
|
|
6073
6102
|
brandLabel = "ACME CO",
|
|
6074
6103
|
brandSubtitle = "Placeholder",
|
|
6104
|
+
brandImage,
|
|
6105
|
+
hideQuickAction,
|
|
6075
6106
|
navSections = DEFAULT_NAV_SECTIONS,
|
|
6076
6107
|
activeItemId = "inbox",
|
|
6077
6108
|
activeVariant = "default",
|
|
@@ -6085,6 +6116,8 @@ function QuickActionSidebarNav(_a) {
|
|
|
6085
6116
|
"className",
|
|
6086
6117
|
"brandLabel",
|
|
6087
6118
|
"brandSubtitle",
|
|
6119
|
+
"brandImage",
|
|
6120
|
+
"hideQuickAction",
|
|
6088
6121
|
"navSections",
|
|
6089
6122
|
"activeItemId",
|
|
6090
6123
|
"activeVariant",
|
|
@@ -6116,7 +6149,7 @@ function QuickActionSidebarNav(_a) {
|
|
|
6116
6149
|
isCollapsed ? "justify-center h-16 px-2" : "h-20 px-5"
|
|
6117
6150
|
)
|
|
6118
6151
|
},
|
|
6119
|
-
!isCollapsed && /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2.5 pr-10" }, /* @__PURE__ */ React56.createElement("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-sidebar-foreground text-sidebar" }, /* @__PURE__ */ React56.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "w-3.5 h-3.5" }, /* @__PURE__ */ React56.createElement("circle", { cx: "12", cy: "12", r: "10" }))), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React56.createElement("span", { className: "text-sm font-bold tracking-tight" }, brandLabel), brandSubtitle && /* @__PURE__ */ React56.createElement("span", { className: "text-[10px] font-medium text-sidebar-foreground/50 uppercase tracking-wide" }, brandSubtitle))),
|
|
6152
|
+
!isCollapsed && /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2.5 pr-10" }, brandImage ? /* @__PURE__ */ React56.createElement("img", { src: brandImage, alt: brandLabel, className: "h-10 object-contain" }) : /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-sidebar-foreground text-sidebar" }, /* @__PURE__ */ React56.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "w-3.5 h-3.5" }, /* @__PURE__ */ React56.createElement("circle", { cx: "12", cy: "12", r: "10" }))), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React56.createElement("span", { className: "text-sm font-bold tracking-tight" }, brandLabel), brandSubtitle && /* @__PURE__ */ React56.createElement("span", { className: "text-[10px] font-medium text-sidebar-foreground/50 uppercase tracking-wide" }, brandSubtitle)))),
|
|
6120
6153
|
/* @__PURE__ */ React56.createElement(
|
|
6121
6154
|
"button",
|
|
6122
6155
|
{
|
|
@@ -6144,7 +6177,7 @@ function QuickActionSidebarNav(_a) {
|
|
|
6144
6177
|
}
|
|
6145
6178
|
));
|
|
6146
6179
|
})),
|
|
6147
|
-
/* @__PURE__ */ React56.createElement("div", { className: cn("px-3 pb-3", isCollapsed ? "hidden" : "block") }, /* @__PURE__ */ React56.createElement(
|
|
6180
|
+
!hideQuickAction && /* @__PURE__ */ React56.createElement("div", { className: cn("px-3 pb-3", isCollapsed ? "hidden" : "block") }, /* @__PURE__ */ React56.createElement(
|
|
6148
6181
|
"button",
|
|
6149
6182
|
{
|
|
6150
6183
|
type: "button",
|
|
@@ -6171,7 +6204,7 @@ function QuickActionSidebarNav(_a) {
|
|
|
6171
6204
|
), /* @__PURE__ */ React56.createElement("span", { className: "text-sm font-medium" }, "Quick Action")),
|
|
6172
6205
|
/* @__PURE__ */ React56.createElement("kbd", { className: "hidden sm:inline-flex items-center gap-0.5 px-1.5 py-0.5 text-[11px] font-mono rounded bg-sidebar-primary-foreground/20 text-sidebar-primary-foreground" }, /* @__PURE__ */ React56.createElement("span", { className: "text-xs" }, "\u2318"), "K")
|
|
6173
6206
|
)),
|
|
6174
|
-
isCollapsed && /* @__PURE__ */ React56.createElement("div", { className: "px-2 pb-3" }, /* @__PURE__ */ React56.createElement(Tooltip4, null, /* @__PURE__ */ React56.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React56.createElement(
|
|
6207
|
+
isCollapsed && !hideQuickAction && /* @__PURE__ */ React56.createElement("div", { className: "px-2 pb-3" }, /* @__PURE__ */ React56.createElement(Tooltip4, null, /* @__PURE__ */ React56.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React56.createElement(
|
|
6175
6208
|
"button",
|
|
6176
6209
|
{
|
|
6177
6210
|
type: "button",
|
|
@@ -6225,7 +6258,7 @@ function QuickActionSidebarNav(_a) {
|
|
|
6225
6258
|
/* @__PURE__ */ React56.createElement("span", null, item.label)
|
|
6226
6259
|
));
|
|
6227
6260
|
}))))
|
|
6228
|
-
), /* @__PURE__ */ React56.createElement(
|
|
6261
|
+
), !hideQuickAction && /* @__PURE__ */ React56.createElement(
|
|
6229
6262
|
QuickActionModal,
|
|
6230
6263
|
{
|
|
6231
6264
|
open: isQuickActionOpen,
|
|
@@ -8911,7 +8944,8 @@ function DetailView({
|
|
|
8911
8944
|
emailSignature,
|
|
8912
8945
|
iconMap,
|
|
8913
8946
|
onOpenEntityPanel,
|
|
8914
|
-
onOpenRecentActivity
|
|
8947
|
+
onOpenRecentActivity,
|
|
8948
|
+
onSuggestedActionFeedback
|
|
8915
8949
|
}) {
|
|
8916
8950
|
const [evidenceExpanded, setEvidenceExpanded] = React56.useState(false);
|
|
8917
8951
|
const [showTimeline, setShowTimeline] = React56.useState(false);
|
|
@@ -8921,6 +8955,10 @@ function DetailView({
|
|
|
8921
8955
|
setEvidenceExpanded(false);
|
|
8922
8956
|
setExtraActions([]);
|
|
8923
8957
|
}, [item.id]);
|
|
8958
|
+
const signalData = React56.useMemo(
|
|
8959
|
+
() => getSignalScore(item.company),
|
|
8960
|
+
[getSignalScore, item.company]
|
|
8961
|
+
);
|
|
8924
8962
|
const suggestedActions = React56.useMemo(
|
|
8925
8963
|
() => [...buildSuggestedActions(item), ...extraActions],
|
|
8926
8964
|
[buildSuggestedActions, item, extraActions]
|
|
@@ -8954,9 +8992,13 @@ function DetailView({
|
|
|
8954
8992
|
console.log("Approved signal:", { taskId: item.id, company: item.company });
|
|
8955
8993
|
},
|
|
8956
8994
|
onApproveFeedback: (reasons, detail) => {
|
|
8995
|
+
var _a;
|
|
8996
|
+
(_a = signalData.onApproveFeedback) == null ? void 0 : _a.call(signalData, reasons, detail);
|
|
8957
8997
|
console.log("Approval feedback:", { taskId: item.id, company: item.company, reasons, detail });
|
|
8958
8998
|
},
|
|
8959
8999
|
onDismiss: (reasons, detail) => {
|
|
9000
|
+
var _a;
|
|
9001
|
+
(_a = signalData.onDismissFeedback) == null ? void 0 : _a.call(signalData, reasons, detail);
|
|
8960
9002
|
console.log("Dismissed signal:", { taskId: item.id, reasons, detail });
|
|
8961
9003
|
}
|
|
8962
9004
|
},
|
|
@@ -8979,7 +9021,7 @@ function DetailView({
|
|
|
8979
9021
|
/* @__PURE__ */ React56.createElement("span", { className: "text-xs font-medium text-foreground" }, item.company),
|
|
8980
9022
|
/* @__PURE__ */ React56.createElement(ChevronRight, { className: "h-3 w-3 text-muted-foreground/50" })
|
|
8981
9023
|
)), sections.signalBrief && (() => {
|
|
8982
|
-
|
|
9024
|
+
var _a;
|
|
8983
9025
|
const pct = signalData.score;
|
|
8984
9026
|
const scoreColor = pct >= 70 ? "text-emerald-600" : pct >= 40 ? "text-amber-600" : "text-red-600";
|
|
8985
9027
|
const barColor = pct >= 70 ? "bg-emerald-500" : pct >= 40 ? "bg-amber-500" : "bg-red-500";
|
|
@@ -9008,7 +9050,7 @@ function DetailView({
|
|
|
9008
9050
|
ScoreBreakdown,
|
|
9009
9051
|
{
|
|
9010
9052
|
factors: signalData.factors,
|
|
9011
|
-
onFactorFeedback: (key, type, detail) => console.log("Signal factor feedback:", { company: item.company, factor: key, type, detail })
|
|
9053
|
+
onFactorFeedback: (_a = signalData.onFactorFeedback) != null ? _a : ((key, type, detail) => console.log("Signal factor feedback:", { company: item.company, factor: key, type, detail }))
|
|
9012
9054
|
}
|
|
9013
9055
|
), /* @__PURE__ */ React56.createElement(SignalApproval.Actions, null))), !evidenceExpanded && /* @__PURE__ */ React56.createElement(SignalApproval.Actions, null));
|
|
9014
9056
|
})(), sections.timeline && timelineEvents.length > 0 && /* @__PURE__ */ React56.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React56.createElement(
|
|
@@ -9051,6 +9093,9 @@ function PrototypeInboxView({
|
|
|
9051
9093
|
getSignalScore: getSignalScoreProp,
|
|
9052
9094
|
getTimelineEvents,
|
|
9053
9095
|
iconMap = {},
|
|
9096
|
+
hideToolbarActions,
|
|
9097
|
+
hideHoverActions,
|
|
9098
|
+
onSuggestedActionFeedback,
|
|
9054
9099
|
headerActions,
|
|
9055
9100
|
onOpenEntityPanel,
|
|
9056
9101
|
onOpenRecentActivity
|
|
@@ -9149,7 +9194,8 @@ function PrototypeInboxView({
|
|
|
9149
9194
|
emailSignature,
|
|
9150
9195
|
iconMap,
|
|
9151
9196
|
onOpenEntityPanel,
|
|
9152
|
-
onOpenRecentActivity
|
|
9197
|
+
onOpenRecentActivity,
|
|
9198
|
+
onSuggestedActionFeedback
|
|
9153
9199
|
};
|
|
9154
9200
|
return /* @__PURE__ */ React56.createElement("div", { className: "flex h-full w-full flex-col" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between border-b border-border bg-background px-4 py-3 shrink-0" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-3" }, inboxViewMode === "detail" ? /* @__PURE__ */ React56.createElement(
|
|
9155
9201
|
"button",
|
|
@@ -9193,7 +9239,7 @@ function PrototypeInboxView({
|
|
|
9193
9239
|
}
|
|
9194
9240
|
)) : (
|
|
9195
9241
|
/* Split view */
|
|
9196
|
-
/* @__PURE__ */ React56.createElement("div", { className: "flex h-full min-h-0 w-full flex-1" }, /* @__PURE__ */ React56.createElement("div", { className: "flex h-full min-w-[380px] w-[380px] flex-col border-r border-border bg-background shadow-sm z-10" }, /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col gap-4 border-b border-border p-4 shrink-0" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(Eye, { className: "w-4 h-4" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(FileText, { className: "w-4 h-4" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(Clock, { className: "w-4 h-4" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(CheckSquare, { className: "w-4 h-4" }))), /* @__PURE__ */ React56.createElement(Button, { size: "sm", className: "h-8 px-4 bg-foreground text-background hover:bg-foreground/90 text-xs font-semibold gap-1.5 rounded-md" }, /* @__PURE__ */ React56.createElement(Plus, { className: "w-4 h-4" }), " Add Task")), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React56.createElement("div", { className: "relative flex-1" }, /* @__PURE__ */ React56.createElement(Filter, { className: "absolute left-2.5 top-1.5 w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React56.createElement(Input, { className: "h-8 pl-8 text-xs bg-background border-border rounded-md shadow-none", placeholder: "Categories" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-8 text-xs font-medium rounded-md shadow-none" }, /* @__PURE__ */ React56.createElement(Building, { className: "w-3.5 h-3.5 mr-1.5" }), " Accounts")), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto pb-1 mt-1 scrollbar-hide" }, /* @__PURE__ */ React56.createElement(Button, { size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-semibold bg-foreground text-background hover:bg-foreground/90 shadow-none" }, "All"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-medium bg-transparent border-border text-muted-foreground hover:text-foreground shadow-none" }, "Outbound (10)"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-medium bg-transparent border-border text-muted-foreground hover:text-foreground shadow-none" }, "Retention (12)"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-medium bg-transparent border-border text-muted-foreground hover:text-foreground shadow-none" }, "Relationship (9)"))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto" }, items.map((item) => /* @__PURE__ */ React56.createElement(
|
|
9242
|
+
/* @__PURE__ */ React56.createElement("div", { className: "flex h-full min-h-0 w-full flex-1" }, /* @__PURE__ */ React56.createElement("div", { className: "flex h-full min-w-[380px] w-[380px] flex-col border-r border-border bg-background shadow-sm z-10" }, /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col gap-4 border-b border-border p-4 shrink-0" }, !hideToolbarActions && /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(Eye, { className: "w-4 h-4" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(FileText, { className: "w-4 h-4" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(Clock, { className: "w-4 h-4" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "icon", className: "h-8 w-8 text-muted-foreground" }, /* @__PURE__ */ React56.createElement(CheckSquare, { className: "w-4 h-4" }))), /* @__PURE__ */ React56.createElement(Button, { size: "sm", className: "h-8 px-4 bg-foreground text-background hover:bg-foreground/90 text-xs font-semibold gap-1.5 rounded-md" }, /* @__PURE__ */ React56.createElement(Plus, { className: "w-4 h-4" }), " Add Task")), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React56.createElement("div", { className: "relative flex-1" }, /* @__PURE__ */ React56.createElement(Filter, { className: "absolute left-2.5 top-1.5 w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React56.createElement(Input, { className: "h-8 pl-8 text-xs bg-background border-border rounded-md shadow-none", placeholder: "Categories" })), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-8 text-xs font-medium rounded-md shadow-none" }, /* @__PURE__ */ React56.createElement(Building, { className: "w-3.5 h-3.5 mr-1.5" }), " Accounts")), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto pb-1 mt-1 scrollbar-hide" }, /* @__PURE__ */ React56.createElement(Button, { size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-semibold bg-foreground text-background hover:bg-foreground/90 shadow-none" }, "All"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-medium bg-transparent border-border text-muted-foreground hover:text-foreground shadow-none" }, "Outbound (10)"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-medium bg-transparent border-border text-muted-foreground hover:text-foreground shadow-none" }, "Retention (12)"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 rounded-full px-3.5 text-[11px] font-medium bg-transparent border-border text-muted-foreground hover:text-foreground shadow-none" }, "Relationship (9)"))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto" }, items.map((item) => /* @__PURE__ */ React56.createElement(
|
|
9197
9243
|
"div",
|
|
9198
9244
|
{
|
|
9199
9245
|
key: item.id,
|
|
@@ -9202,7 +9248,7 @@ function PrototypeInboxView({
|
|
|
9202
9248
|
},
|
|
9203
9249
|
/* @__PURE__ */ React56.createElement("div", { className: "mb-1.5 flex items-center gap-2" }, /* @__PURE__ */ React56.createElement("span", { className: "min-w-0 truncate text-[13px] font-semibold text-foreground leading-tight" }, item.title), selectedTask.id !== item.id && item.tag1 && /* @__PURE__ */ React56.createElement("span", { className: "shrink-0 rounded-md border border-border bg-muted/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground" }, item.tag1), /* @__PURE__ */ React56.createElement("span", { className: "ml-auto shrink-0 text-[10px] font-medium text-muted-foreground/80" }, item.time)),
|
|
9204
9250
|
/* @__PURE__ */ React56.createElement("div", { className: "flex items-start gap-2 mt-2" }, /* @__PURE__ */ React56.createElement("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 mt-1.5 ${item.statusColor === "red" ? "bg-[#f43f5e]" : "bg-[#3b82f6]"}` }), /* @__PURE__ */ React56.createElement("span", { className: "text-xs text-muted-foreground leading-tight" }, item.details)),
|
|
9205
|
-
/* @__PURE__ */ React56.createElement("div", { className: `absolute right-4 bottom-4 flex items-center gap-1.5 bg-background shadow-sm rounded-md px-1 py-0.5 border border-border ${selectedTask.id === item.id ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity"}` }, /* @__PURE__ */ React56.createElement(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded text-muted-foreground hover:text-foreground" }, /* @__PURE__ */ React56.createElement(CheckSquare, { className: "w-3.5 h-3.5" })), /* @__PURE__ */ React56.createElement(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded text-muted-foreground hover:text-foreground" }, /* @__PURE__ */ React56.createElement(Clock, { className: "w-3.5 h-3.5" })))
|
|
9251
|
+
!hideHoverActions && /* @__PURE__ */ React56.createElement("div", { className: `absolute right-4 bottom-4 flex items-center gap-1.5 bg-background shadow-sm rounded-md px-1 py-0.5 border border-border ${selectedTask.id === item.id ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity"}` }, /* @__PURE__ */ React56.createElement(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded text-muted-foreground hover:text-foreground" }, /* @__PURE__ */ React56.createElement(CheckSquare, { className: "w-3.5 h-3.5" })), /* @__PURE__ */ React56.createElement(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 rounded text-muted-foreground hover:text-foreground" }, /* @__PURE__ */ React56.createElement(Clock, { className: "w-3.5 h-3.5" })))
|
|
9206
9252
|
)), /* @__PURE__ */ React56.createElement("div", { className: "p-4" }, /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-8 text-xs font-semibold rounded-md shadow-none" }, "See more")))), /* @__PURE__ */ React56.createElement("div", { className: "flex h-full flex-1 flex-col overflow-hidden bg-background" }, /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto" }, /* @__PURE__ */ React56.createElement(DetailView, __spreadValues({}, detailViewProps)))))
|
|
9207
9253
|
));
|
|
9208
9254
|
}
|
|
@@ -9294,14 +9340,19 @@ function PrototypeInsightsView({
|
|
|
9294
9340
|
analytics,
|
|
9295
9341
|
assistantName,
|
|
9296
9342
|
headerActions,
|
|
9297
|
-
onNavigateToInbox
|
|
9343
|
+
onNavigateToInbox,
|
|
9344
|
+
customTabs
|
|
9298
9345
|
}) {
|
|
9299
|
-
var _a, _b, _c, _d, _e, _f;
|
|
9346
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9300
9347
|
const showOverview = (tabs == null ? void 0 : tabs.overview) !== false;
|
|
9301
9348
|
const showAnalytics = (tabs == null ? void 0 : tabs.analytics) !== false;
|
|
9302
9349
|
const [insightsTab, setInsightsTab] = React56.useState(
|
|
9303
|
-
showOverview ? "overview" : "analytics"
|
|
9350
|
+
showOverview ? "overview" : showAnalytics ? "analytics" : (_b = (_a = customTabs == null ? void 0 : customTabs[0]) == null ? void 0 : _a.id) != null ? _b : "overview"
|
|
9304
9351
|
);
|
|
9352
|
+
const allTabs = [];
|
|
9353
|
+
if (showOverview) allTabs.push({ id: "overview", label: "Overview", icon: BarChart2 });
|
|
9354
|
+
if (showAnalytics) allTabs.push({ id: "analytics", label: "Analytics", icon: TrendingUp });
|
|
9355
|
+
if (customTabs) allTabs.push(...customTabs);
|
|
9305
9356
|
const [showAllMetrics, setShowAllMetrics] = React56.useState(false);
|
|
9306
9357
|
const [showCoaching, setShowCoaching] = React56.useState((coaching == null ? void 0 : coaching.enabled) !== false);
|
|
9307
9358
|
const resolvedMetrics = metrics != null ? metrics : DEFAULT_METRICS;
|
|
@@ -9312,25 +9363,17 @@ function PrototypeInsightsView({
|
|
|
9312
9363
|
recentlyCompleted: (dashboardCards == null ? void 0 : dashboardCards.recentlyCompleted) !== false,
|
|
9313
9364
|
checkIns: (dashboardCards == null ? void 0 : dashboardCards.checkIns) !== false
|
|
9314
9365
|
};
|
|
9315
|
-
return /* @__PURE__ */ React56.createElement("div", { className: "mx-auto max-w-7xl space-y-8 p-6 md:p-8" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React56.createElement("div", null, /* @__PURE__ */ React56.createElement("h2", { className: "mb-1 text-xl font-bold tracking-tight text-foreground" }, "Insights & Overview"), /* @__PURE__ */ React56.createElement("p", { className: "text-sm text-muted-foreground" }, "Monitor your key performance indicators and daily tasks.")), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-3" }, assistantName && /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-8 gap-2 text-xs font-semibold rounded-full px-4 border-foreground text-foreground hover:bg-muted/50" }, /* @__PURE__ */ React56.createElement(MessageCircle, { className: "w-3.5 h-3.5" }), "Talk to ", assistantName), headerActions)),
|
|
9316
|
-
"button",
|
|
9317
|
-
{
|
|
9318
|
-
type: "button",
|
|
9319
|
-
onClick: () => setInsightsTab("overview"),
|
|
9320
|
-
className: `relative px-4 py-2 text-sm font-medium transition-colors ${insightsTab === "overview" ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`
|
|
9321
|
-
},
|
|
9322
|
-
/* @__PURE__ */ React56.createElement("span", { className: "flex items-center gap-2" }, /* @__PURE__ */ React56.createElement(BarChart2, { className: "h-3.5 w-3.5" }), "Overview"),
|
|
9323
|
-
insightsTab === "overview" && /* @__PURE__ */ React56.createElement("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-foreground rounded-full" })
|
|
9324
|
-
), /* @__PURE__ */ React56.createElement(
|
|
9366
|
+
return /* @__PURE__ */ React56.createElement("div", { className: "mx-auto max-w-7xl space-y-8 p-6 md:p-8" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React56.createElement("div", null, /* @__PURE__ */ React56.createElement("h2", { className: "mb-1 text-xl font-bold tracking-tight text-foreground" }, "Insights & Overview"), /* @__PURE__ */ React56.createElement("p", { className: "text-sm text-muted-foreground" }, "Monitor your key performance indicators and daily tasks.")), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-3" }, assistantName && /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-8 gap-2 text-xs font-semibold rounded-full px-4 border-foreground text-foreground hover:bg-muted/50" }, /* @__PURE__ */ React56.createElement(MessageCircle, { className: "w-3.5 h-3.5" }), "Talk to ", assistantName), headerActions)), allTabs.length >= 2 && /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1 border-b border-border" }, allTabs.map((tab) => /* @__PURE__ */ React56.createElement(
|
|
9325
9367
|
"button",
|
|
9326
9368
|
{
|
|
9369
|
+
key: tab.id,
|
|
9327
9370
|
type: "button",
|
|
9328
|
-
onClick: () => setInsightsTab(
|
|
9329
|
-
className: `relative px-4 py-2 text-sm font-medium transition-colors ${insightsTab ===
|
|
9371
|
+
onClick: () => setInsightsTab(tab.id),
|
|
9372
|
+
className: `relative px-4 py-2 text-sm font-medium transition-colors ${insightsTab === tab.id ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`
|
|
9330
9373
|
},
|
|
9331
|
-
/* @__PURE__ */ React56.createElement("span", { className: "flex items-center gap-2" }, /* @__PURE__ */ React56.createElement(
|
|
9332
|
-
insightsTab ===
|
|
9333
|
-
)), insightsTab === "overview" && showOverview && /* @__PURE__ */ React56.createElement(React56.Fragment, null, showCoaching && /* @__PURE__ */ React56.createElement("div", { className: "border border-border rounded-xl p-6 relative bg-card shadow-sm" }, /* @__PURE__ */ React56.createElement(
|
|
9374
|
+
/* @__PURE__ */ React56.createElement("span", { className: "flex items-center gap-2" }, tab.icon && /* @__PURE__ */ React56.createElement(tab.icon, { className: "h-3.5 w-3.5" }), tab.label),
|
|
9375
|
+
insightsTab === tab.id && /* @__PURE__ */ React56.createElement("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-foreground rounded-full" })
|
|
9376
|
+
))), insightsTab === "overview" && showOverview && /* @__PURE__ */ React56.createElement(React56.Fragment, null, showCoaching && /* @__PURE__ */ React56.createElement("div", { className: "border border-border rounded-xl p-6 relative bg-card shadow-sm" }, /* @__PURE__ */ React56.createElement(
|
|
9334
9377
|
Button,
|
|
9335
9378
|
{
|
|
9336
9379
|
variant: "ghost",
|
|
@@ -9339,7 +9382,7 @@ function PrototypeInsightsView({
|
|
|
9339
9382
|
onClick: () => setShowCoaching(false)
|
|
9340
9383
|
},
|
|
9341
9384
|
/* @__PURE__ */ React56.createElement(X, { className: "w-4 h-4" })
|
|
9342
|
-
), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ React56.createElement("h3", { className: "font-bold text-foreground text-sm" }, "Daily Coaching Insight")), /* @__PURE__ */ React56.createElement("p", { className: "text-sm text-muted-foreground leading-relaxed mb-4 max-w-4xl" }, "We analyze your pipeline activity, recent communications, and account health to provide personalized recommendations for your day."), /* @__PURE__ */ React56.createElement("div", { className: "bg-brand-purple/10 rounded-lg p-5 text-[13px] text-foreground font-medium italic border border-brand-purple/20 relative" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute top-0 left-0 w-1 h-full bg-brand-purple rounded-l-lg" }), (
|
|
9385
|
+
), /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ React56.createElement("h3", { className: "font-bold text-foreground text-sm" }, "Daily Coaching Insight")), /* @__PURE__ */ React56.createElement("p", { className: "text-sm text-muted-foreground leading-relaxed mb-4 max-w-4xl" }, "We analyze your pipeline activity, recent communications, and account health to provide personalized recommendations for your day."), /* @__PURE__ */ React56.createElement("div", { className: "bg-brand-purple/10 rounded-lg p-5 text-[13px] text-foreground font-medium italic border border-brand-purple/20 relative" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute top-0 left-0 w-1 h-full bg-brand-purple rounded-l-lg" }), (_c = coaching == null ? void 0 : coaching.message) != null ? _c : "\u201CGreat job catching the churn risk on Lunchclub yesterday. Today, focus on pushing the stalled intake pipeline. Try making 2 more touches on accounts that have gone dark this week.\u201D"), /* @__PURE__ */ React56.createElement("div", { className: "mt-4 flex items-center gap-2" }, /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 text-xs text-muted-foreground hover:text-foreground shadow-none" }, /* @__PURE__ */ React56.createElement(ThumbsUp, { className: "w-3.5 h-3.5 mr-1.5" }), " Helpful"), /* @__PURE__ */ React56.createElement(Button, { variant: "outline", size: "sm", className: "h-7 text-xs text-muted-foreground hover:text-foreground shadow-none" }, /* @__PURE__ */ React56.createElement(ThumbsDown, { className: "w-3.5 h-3.5 mr-1.5" }), " Not Helpful"), /* @__PURE__ */ React56.createElement("div", { className: "relative max-w-sm ml-2 flex-1" }, /* @__PURE__ */ React56.createElement(Input, { placeholder: "Provide additional feedback...", className: "h-7 text-xs shadow-none border-border bg-muted/20 w-full" })))), /* @__PURE__ */ React56.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React56.createElement("h3", { className: "text-sm font-semibold text-foreground uppercase tracking-wider" }, "Key Metrics"), resolvedExpandedMetrics.length > 0 && /* @__PURE__ */ React56.createElement(
|
|
9343
9386
|
Button,
|
|
9344
9387
|
{
|
|
9345
9388
|
variant: "ghost",
|
|
@@ -9362,7 +9405,7 @@ function PrototypeInsightsView({
|
|
|
9362
9405
|
title: "Volume Analysis",
|
|
9363
9406
|
subtitle: "Referral volume broken down by facility over time",
|
|
9364
9407
|
filterOptions: analytics.volumeChart.filterOptions,
|
|
9365
|
-
selectedFilter: (
|
|
9408
|
+
selectedFilter: (_e = (_d = analytics.volumeChart.filterOptions) == null ? void 0 : _d[0]) == null ? void 0 : _e.value
|
|
9366
9409
|
},
|
|
9367
9410
|
/* @__PURE__ */ React56.createElement(
|
|
9368
9411
|
VolumeAnalysisChart,
|
|
@@ -9384,15 +9427,15 @@ function PrototypeInsightsView({
|
|
|
9384
9427
|
title: "Referrals Over Time",
|
|
9385
9428
|
subtitle: "Weekly appointment trends",
|
|
9386
9429
|
toggleOptions: analytics.trendChart.toggleOptions,
|
|
9387
|
-
selectedToggle: (
|
|
9430
|
+
selectedToggle: (_f = analytics.trendChart.toggleOptions) == null ? void 0 : _f[0]
|
|
9388
9431
|
},
|
|
9389
9432
|
/* @__PURE__ */ React56.createElement(
|
|
9390
9433
|
TrendAreaChart,
|
|
9391
9434
|
{
|
|
9392
9435
|
data: analytics.trendChart.data,
|
|
9393
9436
|
series: analytics.trendChart.series,
|
|
9394
|
-
xAxisKey: (
|
|
9395
|
-
height: (
|
|
9437
|
+
xAxisKey: (_g = analytics.trendChart.xAxisKey) != null ? _g : "name",
|
|
9438
|
+
height: (_h = analytics.trendChart.height) != null ? _h : 220
|
|
9396
9439
|
}
|
|
9397
9440
|
)
|
|
9398
9441
|
)), ((analytics == null ? void 0 : analytics.barChart) || (analytics == null ? void 0 : analytics.barList)) && /* @__PURE__ */ React56.createElement("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6" }, (analytics == null ? void 0 : analytics.barChart) && /* @__PURE__ */ React56.createElement(
|
|
@@ -9415,7 +9458,9 @@ function PrototypeInsightsView({
|
|
|
9415
9458
|
data: analytics.barList.data,
|
|
9416
9459
|
valueFormatter: analytics.barList.valueFormatter
|
|
9417
9460
|
}
|
|
9418
|
-
))))
|
|
9461
|
+
)))), customTabs == null ? void 0 : customTabs.map(
|
|
9462
|
+
(tab) => insightsTab === tab.id ? /* @__PURE__ */ React56.createElement("div", { key: tab.id }, tab.content) : null
|
|
9463
|
+
));
|
|
9419
9464
|
}
|
|
9420
9465
|
var DEFAULT_FILTER_TABS = [
|
|
9421
9466
|
{ label: "All Accounts", count: 6, variant: "default" },
|
|
@@ -9425,7 +9470,17 @@ var DEFAULT_FILTER_TABS = [
|
|
|
9425
9470
|
function PrototypeAccountsView({
|
|
9426
9471
|
filterTabs,
|
|
9427
9472
|
headerActions,
|
|
9428
|
-
onRowClick
|
|
9473
|
+
onRowClick,
|
|
9474
|
+
rows,
|
|
9475
|
+
filterCategories,
|
|
9476
|
+
quickViews,
|
|
9477
|
+
moreQuickViews,
|
|
9478
|
+
quickViewFilters,
|
|
9479
|
+
iconMap,
|
|
9480
|
+
entityUrlBuilder,
|
|
9481
|
+
onScoreFactorFeedback,
|
|
9482
|
+
onScoreApproveFeedback,
|
|
9483
|
+
onScoreDismissFeedback
|
|
9429
9484
|
}) {
|
|
9430
9485
|
const tabs = filterTabs != null ? filterTabs : DEFAULT_FILTER_TABS;
|
|
9431
9486
|
return /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col h-full w-full bg-background relative" }, headerActions && /* @__PURE__ */ React56.createElement("div", { className: "absolute top-4 right-4 z-10" }, headerActions), /* @__PURE__ */ React56.createElement("div", { className: "px-4 py-3 border-b border-border flex items-center gap-2 overflow-x-auto shrink-0 mt-2" }, tabs.map((tab, i) => {
|
|
@@ -9436,7 +9491,22 @@ function PrototypeAccountsView({
|
|
|
9436
9491
|
return /* @__PURE__ */ React56.createElement(Button, { key: i, variant: "ghost", size: "sm", className: "h-7 text-xs rounded-md border border-border bg-transparent font-medium" }, tab.label, tab.count != null && /* @__PURE__ */ React56.createElement(Badge, { variant: "secondary", className: "ml-2 h-4 px-1.5 text-[10px]" }, tab.count));
|
|
9437
9492
|
}
|
|
9438
9493
|
return /* @__PURE__ */ React56.createElement(Button, { key: i, variant: "secondary", size: "sm", className: "h-7 text-xs rounded-md bg-muted font-medium" }, tab.label, tab.count != null && /* @__PURE__ */ React56.createElement(Badge, { variant: "outline", className: "ml-2 h-4 px-1.5 text-[10px]" }, tab.count));
|
|
9439
|
-
})), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-auto" }, /* @__PURE__ */ React56.createElement(
|
|
9494
|
+
})), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-auto" }, /* @__PURE__ */ React56.createElement(
|
|
9495
|
+
DataTable,
|
|
9496
|
+
{
|
|
9497
|
+
onRowClick,
|
|
9498
|
+
rows,
|
|
9499
|
+
filterCategories,
|
|
9500
|
+
quickViews,
|
|
9501
|
+
moreQuickViews,
|
|
9502
|
+
quickViewFilters,
|
|
9503
|
+
iconMap,
|
|
9504
|
+
entityUrlBuilder,
|
|
9505
|
+
onScoreFactorFeedback,
|
|
9506
|
+
onScoreApproveFeedback,
|
|
9507
|
+
onScoreDismissFeedback
|
|
9508
|
+
}
|
|
9509
|
+
)));
|
|
9440
9510
|
}
|
|
9441
9511
|
function PrototypeWorkQueueView({
|
|
9442
9512
|
headerActions
|