@handled-ai/design-system 0.5.0 → 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.js CHANGED
@@ -2809,7 +2809,24 @@ function isRowMatchingCategoryFilter(row, categoryId, options) {
2809
2809
  return true;
2810
2810
  }
2811
2811
  }
2812
- function DataTable({ onRowClick } = {}) {
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 ROWS.filter((row) => {
2858
+ return resolvedRows.filter((row) => {
2842
2859
  var _a, _b;
2843
- const quickViewMatches = activeQuickView ? (_b = (_a = QUICK_VIEW_FILTERS[activeQuickView]) == null ? void 0 : _a.call(QUICK_VIEW_FILTERS, row)) != null ? _b : true : true;
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: FILTER_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: QUICK_VIEWS,
3044
- moreViews: MORE_QUICK_VIEWS,
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: "truncate font-medium text-slate-600",
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: "truncate" }, dp.label)), /* @__PURE__ */ React56.createElement("span", { className: "text-foreground font-semibold shrink-0" }, dp.value));
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" }, (() => {
@@ -5418,6 +5447,15 @@ function PipelineOverview({
5418
5447
  ...flowNodes,
5419
5448
  ...dropOffNodes
5420
5449
  ];
5450
+ const nodeIds = new Set(nodes.map((n) => n.id));
5451
+ for (const link of flowLinks) {
5452
+ for (const endpoint of [link.source, link.target]) {
5453
+ if (!nodeIds.has(endpoint)) {
5454
+ nodes.push({ id: endpoint, nodeColor: dropOffNodeColor != null ? dropOffNodeColor : "#F59E0B" });
5455
+ nodeIds.add(endpoint);
5456
+ }
5457
+ }
5458
+ }
5421
5459
  const links = [];
5422
5460
  const firstFlowNode = (_f = (_e = flowNodes[0]) == null ? void 0 : _e.id) != null ? _f : "Contacted";
5423
5461
  segments.forEach((segment) => {
@@ -6063,6 +6101,8 @@ function QuickActionSidebarNav(_a) {
6063
6101
  className,
6064
6102
  brandLabel = "ACME CO",
6065
6103
  brandSubtitle = "Placeholder",
6104
+ brandImage,
6105
+ hideQuickAction,
6066
6106
  navSections = DEFAULT_NAV_SECTIONS,
6067
6107
  activeItemId = "inbox",
6068
6108
  activeVariant = "default",
@@ -6076,6 +6116,8 @@ function QuickActionSidebarNav(_a) {
6076
6116
  "className",
6077
6117
  "brandLabel",
6078
6118
  "brandSubtitle",
6119
+ "brandImage",
6120
+ "hideQuickAction",
6079
6121
  "navSections",
6080
6122
  "activeItemId",
6081
6123
  "activeVariant",
@@ -6107,7 +6149,7 @@ function QuickActionSidebarNav(_a) {
6107
6149
  isCollapsed ? "justify-center h-16 px-2" : "h-20 px-5"
6108
6150
  )
6109
6151
  },
6110
- !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)))),
6111
6153
  /* @__PURE__ */ React56.createElement(
6112
6154
  "button",
6113
6155
  {
@@ -6135,7 +6177,7 @@ function QuickActionSidebarNav(_a) {
6135
6177
  }
6136
6178
  ));
6137
6179
  })),
6138
- /* @__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(
6139
6181
  "button",
6140
6182
  {
6141
6183
  type: "button",
@@ -6162,7 +6204,7 @@ function QuickActionSidebarNav(_a) {
6162
6204
  ), /* @__PURE__ */ React56.createElement("span", { className: "text-sm font-medium" }, "Quick Action")),
6163
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")
6164
6206
  )),
6165
- 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(
6166
6208
  "button",
6167
6209
  {
6168
6210
  type: "button",
@@ -6216,7 +6258,7 @@ function QuickActionSidebarNav(_a) {
6216
6258
  /* @__PURE__ */ React56.createElement("span", null, item.label)
6217
6259
  ));
6218
6260
  }))))
6219
- ), /* @__PURE__ */ React56.createElement(
6261
+ ), !hideQuickAction && /* @__PURE__ */ React56.createElement(
6220
6262
  QuickActionModal,
6221
6263
  {
6222
6264
  open: isQuickActionOpen,
@@ -8902,7 +8944,8 @@ function DetailView({
8902
8944
  emailSignature,
8903
8945
  iconMap,
8904
8946
  onOpenEntityPanel,
8905
- onOpenRecentActivity
8947
+ onOpenRecentActivity,
8948
+ onSuggestedActionFeedback
8906
8949
  }) {
8907
8950
  const [evidenceExpanded, setEvidenceExpanded] = React56.useState(false);
8908
8951
  const [showTimeline, setShowTimeline] = React56.useState(false);
@@ -8912,6 +8955,10 @@ function DetailView({
8912
8955
  setEvidenceExpanded(false);
8913
8956
  setExtraActions([]);
8914
8957
  }, [item.id]);
8958
+ const signalData = React56.useMemo(
8959
+ () => getSignalScore(item.company),
8960
+ [getSignalScore, item.company]
8961
+ );
8915
8962
  const suggestedActions = React56.useMemo(
8916
8963
  () => [...buildSuggestedActions(item), ...extraActions],
8917
8964
  [buildSuggestedActions, item, extraActions]
@@ -8945,9 +8992,13 @@ function DetailView({
8945
8992
  console.log("Approved signal:", { taskId: item.id, company: item.company });
8946
8993
  },
8947
8994
  onApproveFeedback: (reasons, detail) => {
8995
+ var _a;
8996
+ (_a = signalData.onApproveFeedback) == null ? void 0 : _a.call(signalData, reasons, detail);
8948
8997
  console.log("Approval feedback:", { taskId: item.id, company: item.company, reasons, detail });
8949
8998
  },
8950
8999
  onDismiss: (reasons, detail) => {
9000
+ var _a;
9001
+ (_a = signalData.onDismissFeedback) == null ? void 0 : _a.call(signalData, reasons, detail);
8951
9002
  console.log("Dismissed signal:", { taskId: item.id, reasons, detail });
8952
9003
  }
8953
9004
  },
@@ -8970,7 +9021,7 @@ function DetailView({
8970
9021
  /* @__PURE__ */ React56.createElement("span", { className: "text-xs font-medium text-foreground" }, item.company),
8971
9022
  /* @__PURE__ */ React56.createElement(ChevronRight, { className: "h-3 w-3 text-muted-foreground/50" })
8972
9023
  )), sections.signalBrief && (() => {
8973
- const signalData = getSignalScore(item.company);
9024
+ var _a;
8974
9025
  const pct = signalData.score;
8975
9026
  const scoreColor = pct >= 70 ? "text-emerald-600" : pct >= 40 ? "text-amber-600" : "text-red-600";
8976
9027
  const barColor = pct >= 70 ? "bg-emerald-500" : pct >= 40 ? "bg-amber-500" : "bg-red-500";
@@ -8999,7 +9050,7 @@ function DetailView({
8999
9050
  ScoreBreakdown,
9000
9051
  {
9001
9052
  factors: signalData.factors,
9002
- 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 }))
9003
9054
  }
9004
9055
  ), /* @__PURE__ */ React56.createElement(SignalApproval.Actions, null))), !evidenceExpanded && /* @__PURE__ */ React56.createElement(SignalApproval.Actions, null));
9005
9056
  })(), sections.timeline && timelineEvents.length > 0 && /* @__PURE__ */ React56.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React56.createElement(
@@ -9042,6 +9093,9 @@ function PrototypeInboxView({
9042
9093
  getSignalScore: getSignalScoreProp,
9043
9094
  getTimelineEvents,
9044
9095
  iconMap = {},
9096
+ hideToolbarActions,
9097
+ hideHoverActions,
9098
+ onSuggestedActionFeedback,
9045
9099
  headerActions,
9046
9100
  onOpenEntityPanel,
9047
9101
  onOpenRecentActivity
@@ -9140,7 +9194,8 @@ function PrototypeInboxView({
9140
9194
  emailSignature,
9141
9195
  iconMap,
9142
9196
  onOpenEntityPanel,
9143
- onOpenRecentActivity
9197
+ onOpenRecentActivity,
9198
+ onSuggestedActionFeedback
9144
9199
  };
9145
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(
9146
9201
  "button",
@@ -9184,7 +9239,7 @@ function PrototypeInboxView({
9184
9239
  }
9185
9240
  )) : (
9186
9241
  /* Split view */
9187
- /* @__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(
9188
9243
  "div",
9189
9244
  {
9190
9245
  key: item.id,
@@ -9193,7 +9248,7 @@ function PrototypeInboxView({
9193
9248
  },
9194
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)),
9195
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)),
9196
- /* @__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" })))
9197
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)))))
9198
9253
  ));
9199
9254
  }
@@ -9285,14 +9340,19 @@ function PrototypeInsightsView({
9285
9340
  analytics,
9286
9341
  assistantName,
9287
9342
  headerActions,
9288
- onNavigateToInbox
9343
+ onNavigateToInbox,
9344
+ customTabs
9289
9345
  }) {
9290
- var _a, _b, _c, _d, _e, _f;
9346
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9291
9347
  const showOverview = (tabs == null ? void 0 : tabs.overview) !== false;
9292
9348
  const showAnalytics = (tabs == null ? void 0 : tabs.analytics) !== false;
9293
9349
  const [insightsTab, setInsightsTab] = React56.useState(
9294
- showOverview ? "overview" : "analytics"
9350
+ showOverview ? "overview" : showAnalytics ? "analytics" : (_b = (_a = customTabs == null ? void 0 : customTabs[0]) == null ? void 0 : _a.id) != null ? _b : "overview"
9295
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);
9296
9356
  const [showAllMetrics, setShowAllMetrics] = React56.useState(false);
9297
9357
  const [showCoaching, setShowCoaching] = React56.useState((coaching == null ? void 0 : coaching.enabled) !== false);
9298
9358
  const resolvedMetrics = metrics != null ? metrics : DEFAULT_METRICS;
@@ -9303,25 +9363,17 @@ function PrototypeInsightsView({
9303
9363
  recentlyCompleted: (dashboardCards == null ? void 0 : dashboardCards.recentlyCompleted) !== false,
9304
9364
  checkIns: (dashboardCards == null ? void 0 : dashboardCards.checkIns) !== false
9305
9365
  };
9306
- 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)), showOverview && showAnalytics && /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1 border-b border-border" }, /* @__PURE__ */ React56.createElement(
9307
- "button",
9308
- {
9309
- type: "button",
9310
- onClick: () => setInsightsTab("overview"),
9311
- className: `relative px-4 py-2 text-sm font-medium transition-colors ${insightsTab === "overview" ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`
9312
- },
9313
- /* @__PURE__ */ React56.createElement("span", { className: "flex items-center gap-2" }, /* @__PURE__ */ React56.createElement(BarChart2, { className: "h-3.5 w-3.5" }), "Overview"),
9314
- insightsTab === "overview" && /* @__PURE__ */ React56.createElement("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-foreground rounded-full" })
9315
- ), /* @__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(
9316
9367
  "button",
9317
9368
  {
9369
+ key: tab.id,
9318
9370
  type: "button",
9319
- onClick: () => setInsightsTab("analytics"),
9320
- className: `relative px-4 py-2 text-sm font-medium transition-colors ${insightsTab === "analytics" ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`
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"}`
9321
9373
  },
9322
- /* @__PURE__ */ React56.createElement("span", { className: "flex items-center gap-2" }, /* @__PURE__ */ React56.createElement(TrendingUp, { className: "h-3.5 w-3.5" }), "Analytics"),
9323
- insightsTab === "analytics" && /* @__PURE__ */ React56.createElement("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-foreground rounded-full" })
9324
- )), 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(
9325
9377
  Button,
9326
9378
  {
9327
9379
  variant: "ghost",
@@ -9330,7 +9382,7 @@ function PrototypeInsightsView({
9330
9382
  onClick: () => setShowCoaching(false)
9331
9383
  },
9332
9384
  /* @__PURE__ */ React56.createElement(X, { className: "w-4 h-4" })
9333
- ), /* @__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" }), (_a = coaching == null ? void 0 : coaching.message) != null ? _a : "\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(
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(
9334
9386
  Button,
9335
9387
  {
9336
9388
  variant: "ghost",
@@ -9353,7 +9405,7 @@ function PrototypeInsightsView({
9353
9405
  title: "Volume Analysis",
9354
9406
  subtitle: "Referral volume broken down by facility over time",
9355
9407
  filterOptions: analytics.volumeChart.filterOptions,
9356
- selectedFilter: (_c = (_b = analytics.volumeChart.filterOptions) == null ? void 0 : _b[0]) == null ? void 0 : _c.value
9408
+ selectedFilter: (_e = (_d = analytics.volumeChart.filterOptions) == null ? void 0 : _d[0]) == null ? void 0 : _e.value
9357
9409
  },
9358
9410
  /* @__PURE__ */ React56.createElement(
9359
9411
  VolumeAnalysisChart,
@@ -9375,15 +9427,15 @@ function PrototypeInsightsView({
9375
9427
  title: "Referrals Over Time",
9376
9428
  subtitle: "Weekly appointment trends",
9377
9429
  toggleOptions: analytics.trendChart.toggleOptions,
9378
- selectedToggle: (_d = analytics.trendChart.toggleOptions) == null ? void 0 : _d[0]
9430
+ selectedToggle: (_f = analytics.trendChart.toggleOptions) == null ? void 0 : _f[0]
9379
9431
  },
9380
9432
  /* @__PURE__ */ React56.createElement(
9381
9433
  TrendAreaChart,
9382
9434
  {
9383
9435
  data: analytics.trendChart.data,
9384
9436
  series: analytics.trendChart.series,
9385
- xAxisKey: (_e = analytics.trendChart.xAxisKey) != null ? _e : "name",
9386
- height: (_f = analytics.trendChart.height) != null ? _f : 220
9437
+ xAxisKey: (_g = analytics.trendChart.xAxisKey) != null ? _g : "name",
9438
+ height: (_h = analytics.trendChart.height) != null ? _h : 220
9387
9439
  }
9388
9440
  )
9389
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(
@@ -9406,7 +9458,9 @@ function PrototypeInsightsView({
9406
9458
  data: analytics.barList.data,
9407
9459
  valueFormatter: analytics.barList.valueFormatter
9408
9460
  }
9409
- )))));
9461
+ )))), customTabs == null ? void 0 : customTabs.map(
9462
+ (tab) => insightsTab === tab.id ? /* @__PURE__ */ React56.createElement("div", { key: tab.id }, tab.content) : null
9463
+ ));
9410
9464
  }
9411
9465
  var DEFAULT_FILTER_TABS = [
9412
9466
  { label: "All Accounts", count: 6, variant: "default" },
@@ -9416,7 +9470,17 @@ var DEFAULT_FILTER_TABS = [
9416
9470
  function PrototypeAccountsView({
9417
9471
  filterTabs,
9418
9472
  headerActions,
9419
- onRowClick
9473
+ onRowClick,
9474
+ rows,
9475
+ filterCategories,
9476
+ quickViews,
9477
+ moreQuickViews,
9478
+ quickViewFilters,
9479
+ iconMap,
9480
+ entityUrlBuilder,
9481
+ onScoreFactorFeedback,
9482
+ onScoreApproveFeedback,
9483
+ onScoreDismissFeedback
9420
9484
  }) {
9421
9485
  const tabs = filterTabs != null ? filterTabs : DEFAULT_FILTER_TABS;
9422
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) => {
@@ -9427,7 +9491,22 @@ function PrototypeAccountsView({
9427
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));
9428
9492
  }
9429
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));
9430
- })), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-auto" }, /* @__PURE__ */ React56.createElement(DataTable, { onRowClick })));
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
+ )));
9431
9510
  }
9432
9511
  function PrototypeWorkQueueView({
9433
9512
  headerActions