@burdenoff/microfe-bigconsole 2026.805.3 → 2026.812.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js +118 -106
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +54 -50
- package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderCanvas.js +2 -2
- package/dist/bigconsole/components/builder/BuilderCanvas.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderTopbar.js +3 -3
- package/dist/bigconsole/components/builder/BuilderTopbar.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js +24 -25
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +40 -29
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +135 -97
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js +58 -44
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js.map +1 -1
- package/dist/bigconsole/components/common/Section.js +70 -0
- package/dist/bigconsole/components/common/Section.js.map +1 -0
- package/dist/bigconsole/components/common/index.js +2 -0
- package/dist/bigconsole/components/common/sectionStyles.js +42 -0
- package/dist/bigconsole/components/common/sectionStyles.js.map +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +209 -193
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +213 -231
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +12 -18
- package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +109 -102
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +81 -70
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +125 -159
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +25 -23
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +3 -3
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +5 -3
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +170 -284
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +147 -151
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js +45 -53
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +157 -148
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +17 -8
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -95
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +20 -18
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js +26 -58
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +307 -231
- package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +29 -29
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +78 -79
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +33 -34
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +79 -56
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +75 -65
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +20 -19
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js.map +1 -1
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +127 -171
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +263 -243
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +65 -66
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +121 -127
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +33 -26
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +3 -3
- package/dist/bigconsole/components/datasink/SetupStateBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +95 -95
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js.map +1 -1
- package/dist/bigconsole/components/parser/DataSinkSelector.js +154 -123
- package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ExpressionEditor.js +3 -3
- package/dist/bigconsole/components/parser/ExpressionEditor.js.map +1 -1
- package/dist/bigconsole/components/parser/ImportParserDialog.js +235 -275
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserCard.js +133 -114
- package/dist/bigconsole/components/parser/ParserCard.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +191 -174
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +2 -2
- package/dist/bigconsole/components/parser/ParserStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserTypeBadge.js +4 -4
- package/dist/bigconsole/components/parser/ParserTypeBadge.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +134 -89
- package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +77 -64
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +7 -10
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewContent.js +31 -32
- package/dist/bigconsole/components/preview/AiPreviewContent.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +152 -106
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +193 -152
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/previewShared.js +41 -23
- package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +342 -308
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +262 -238
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +783 -867
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js +7 -5
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +7 -8
- package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +4 -4
- package/dist/bigconsole/components/widgets/WidgetRegistry.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +8 -7
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +2 -2
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +11 -5
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +19 -15
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +154 -102
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/CircularGauge.js +36 -32
- package/dist/bigconsole/components/widgets/gauge/CircularGauge.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +85 -60
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +64 -35
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/LinearGauge.js +46 -45
- package/dist/bigconsole/components/widgets/gauge/LinearGauge.js.map +1 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +35 -24
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +2 -2
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +153 -90
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListConfig.js +8 -2
- package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js.map +1 -1
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +1 -1
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +14 -4
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +112 -89
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +21 -13
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/index.js +4 -4
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +3 -3
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +34 -25
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressWidget.js +129 -114
- package/dist/bigconsole/components/widgets/progress/ProgressWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +3 -3
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +6 -4
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/ErrorState.js +7 -5
- package/dist/bigconsole/components/widgets/states/ErrorState.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/LoadingState.js +5 -4
- package/dist/bigconsole/components/widgets/states/LoadingState.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +10 -4
- package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableHeader.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +3 -3
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +2 -2
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js.map +1 -1
- package/dist/bigconsole/components/widgets/utils/targetProgress.js +13 -0
- package/dist/bigconsole/components/widgets/utils/targetProgress.js.map +1 -0
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +112 -85
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +28 -20
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +92 -77
- package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +70 -51
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +16 -17
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +6 -4
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +360 -338
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/hooks/useModalFocusTrap.js +53 -0
- package/dist/bigconsole/hooks/useModalFocusTrap.js.map +1 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.js +209 -203
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +126 -120
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +838 -800
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +263 -315
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +301 -341
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +346 -339
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +356 -458
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSourcesPage.js +7 -2
- package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
- package/dist/bigconsole/pages/HomePage.js +186 -193
- package/dist/bigconsole/pages/HomePage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +887 -740
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +679 -637
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +368 -342
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +537 -444
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +412 -377
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +248 -298
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +251 -153
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +381 -371
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +171 -286
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,32 +5,32 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
|
5
5
|
//#region src/bigconsole/components/dashboard/StoreTemplatePicker.tsx
|
|
6
6
|
var c = {
|
|
7
7
|
textAlign: "left",
|
|
8
|
-
padding: "var(--space-
|
|
9
|
-
borderRadius: "var(--radius-
|
|
8
|
+
padding: "var(--space-cardPadding)",
|
|
9
|
+
borderRadius: "var(--radius-card)",
|
|
10
10
|
border: "1px solid var(--color-border-default)",
|
|
11
|
-
background: "var(--color-surface
|
|
11
|
+
background: "var(--color-bg-surface)",
|
|
12
12
|
cursor: "pointer",
|
|
13
13
|
display: "flex",
|
|
14
14
|
flexDirection: "column",
|
|
15
|
-
gap: "var(--space-
|
|
15
|
+
gap: "var(--space-controlGap)",
|
|
16
16
|
transition: "all 0.15s ease"
|
|
17
17
|
}, l = e(function({ templates: e, loading: l, error: u, selectedTemplateId: d, onSelect: f }) {
|
|
18
18
|
return l ? /* @__PURE__ */ o("div", {
|
|
19
19
|
style: {
|
|
20
20
|
display: "flex",
|
|
21
21
|
justifyContent: "center",
|
|
22
|
-
padding: "var(--space-
|
|
22
|
+
padding: "var(--space-pagePadding)"
|
|
23
23
|
},
|
|
24
24
|
children: /* @__PURE__ */ o(a, {})
|
|
25
25
|
}) : u ? /* @__PURE__ */ s("div", {
|
|
26
26
|
style: {
|
|
27
|
-
padding: "var(--space-
|
|
28
|
-
color: "var(--color-text
|
|
27
|
+
padding: "var(--space-cardPadding)",
|
|
28
|
+
color: "var(--color-status-error-text)"
|
|
29
29
|
},
|
|
30
30
|
children: ["Could not load templates from the store: ", u]
|
|
31
31
|
}) : e.length === 0 ? /* @__PURE__ */ s("div", {
|
|
32
32
|
style: {
|
|
33
|
-
padding: "var(--space-
|
|
33
|
+
padding: "var(--space-pagePadding)",
|
|
34
34
|
textAlign: "center",
|
|
35
35
|
color: "var(--color-text-muted)"
|
|
36
36
|
},
|
|
@@ -38,13 +38,13 @@ var c = {
|
|
|
38
38
|
/* @__PURE__ */ o(n, { style: {
|
|
39
39
|
height: "var(--size-icon-lg)",
|
|
40
40
|
width: "var(--size-icon-lg)",
|
|
41
|
-
margin: "0 auto var(--space-
|
|
41
|
+
margin: "0 auto var(--space-formGap)"
|
|
42
42
|
} }),
|
|
43
43
|
/* @__PURE__ */ o("div", { children: "No dashboard templates published yet" }),
|
|
44
44
|
/* @__PURE__ */ o("div", {
|
|
45
45
|
style: {
|
|
46
|
-
fontSize: "var(--font-size-sm)",
|
|
47
|
-
marginTop: "var(--space-
|
|
46
|
+
fontSize: "var(--font-size-body-sm)",
|
|
47
|
+
marginTop: "var(--space-iconGap)"
|
|
48
48
|
},
|
|
49
49
|
children: "Templates published to the store will appear here."
|
|
50
50
|
})
|
|
@@ -52,8 +52,8 @@ var c = {
|
|
|
52
52
|
}) : /* @__PURE__ */ o("div", {
|
|
53
53
|
style: {
|
|
54
54
|
display: "grid",
|
|
55
|
-
gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))",
|
|
56
|
-
gap: "var(--space-
|
|
55
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(min(220px, 100%), 1fr))",
|
|
56
|
+
gap: "var(--space-formGap)"
|
|
57
57
|
},
|
|
58
58
|
children: e.map((e) => {
|
|
59
59
|
let a = e.id === d;
|
|
@@ -63,15 +63,16 @@ var c = {
|
|
|
63
63
|
"aria-pressed": a,
|
|
64
64
|
style: {
|
|
65
65
|
...c,
|
|
66
|
-
borderColor: a ? "var(--color-border
|
|
67
|
-
|
|
66
|
+
borderColor: a ? "var(--color-action-primary-border)" : "var(--color-border-subtle)",
|
|
67
|
+
backgroundColor: a ? "var(--color-bg-accentSubtle)" : "var(--color-bg-surface)",
|
|
68
|
+
boxShadow: a ? "0 0 0 2px var(--color-action-primary-bg)" : "none"
|
|
68
69
|
},
|
|
69
70
|
children: [
|
|
70
71
|
/* @__PURE__ */ s("div", {
|
|
71
72
|
style: {
|
|
72
73
|
display: "flex",
|
|
73
74
|
alignItems: "center",
|
|
74
|
-
gap: "var(--space-
|
|
75
|
+
gap: "var(--space-iconGap)"
|
|
75
76
|
},
|
|
76
77
|
children: [/* @__PURE__ */ o(n, { style: {
|
|
77
78
|
height: "var(--size-icon-sm)",
|
|
@@ -83,7 +84,7 @@ var c = {
|
|
|
83
84
|
}),
|
|
84
85
|
/* @__PURE__ */ o("div", {
|
|
85
86
|
style: {
|
|
86
|
-
fontSize: "var(--font-size-sm)",
|
|
87
|
+
fontSize: "var(--font-size-body-sm)",
|
|
87
88
|
color: "var(--color-text-muted)",
|
|
88
89
|
display: "-webkit-box",
|
|
89
90
|
WebkitLineClamp: 2,
|
|
@@ -96,8 +97,9 @@ var c = {
|
|
|
96
97
|
style: {
|
|
97
98
|
display: "flex",
|
|
98
99
|
alignItems: "center",
|
|
99
|
-
gap: "var(--space-
|
|
100
|
+
gap: "var(--space-controlGap)",
|
|
100
101
|
marginTop: "auto",
|
|
102
|
+
flexWrap: "wrap",
|
|
101
103
|
fontSize: "var(--font-size-xs)",
|
|
102
104
|
color: "var(--color-text-muted)"
|
|
103
105
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreTemplatePicker.js","names":[],"sources":["../../../../src/bigconsole/components/dashboard/StoreTemplatePicker.tsx"],"sourcesContent":["/**\n * StoreTemplatePicker\n *\n * Renders dashboard templates published to the global store as selectable\n * cards. Replaces the workspace-table-backed TemplatePicker for the \"From\n * Template\" flow, which surfaced nothing because no workspace templates have\n * ever been authored.\n *\n * @module bigconsole/components/dashboard/StoreTemplatePicker\n */\nimport { Badge, Spinner } from '@burdenoff/fe-libs/ui';\nimport { Download, LayoutTemplate, Star } from 'lucide-react';\nimport { type FC, memo } from 'react';\n\nimport type { StoreDashboardTemplate } from '../../hooks/useStoreDashboardTemplates';\n\nexport interface StoreTemplatePickerProps {\n templates: StoreDashboardTemplate[];\n loading: boolean;\n error: string | null;\n selectedTemplateId?: string;\n onSelect: (template: StoreDashboardTemplate) => void;\n}\n\nconst cardBase: React.CSSProperties = {\n textAlign: 'left',\n padding: 'var(--space-
|
|
1
|
+
{"version":3,"file":"StoreTemplatePicker.js","names":[],"sources":["../../../../src/bigconsole/components/dashboard/StoreTemplatePicker.tsx"],"sourcesContent":["/**\n * StoreTemplatePicker\n *\n * Renders dashboard templates published to the global store as selectable\n * cards. Replaces the workspace-table-backed TemplatePicker for the \"From\n * Template\" flow, which surfaced nothing because no workspace templates have\n * ever been authored.\n *\n * @module bigconsole/components/dashboard/StoreTemplatePicker\n */\nimport { Badge, Spinner } from '@burdenoff/fe-libs/ui';\nimport { Download, LayoutTemplate, Star } from 'lucide-react';\nimport { type FC, memo } from 'react';\n\nimport type { StoreDashboardTemplate } from '../../hooks/useStoreDashboardTemplates';\n\nexport interface StoreTemplatePickerProps {\n templates: StoreDashboardTemplate[];\n loading: boolean;\n error: string | null;\n selectedTemplateId?: string;\n onSelect: (template: StoreDashboardTemplate) => void;\n}\n\nconst cardBase: React.CSSProperties = {\n textAlign: 'left',\n padding: 'var(--space-cardPadding)',\n borderRadius: 'var(--radius-card)',\n border: '1px solid var(--color-border-default)',\n background: 'var(--color-bg-surface)',\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'column',\n gap: 'var(--space-controlGap)',\n transition: 'all 0.15s ease',\n};\n\nexport const StoreTemplatePicker: FC<StoreTemplatePickerProps> = memo(function StoreTemplatePicker({\n templates,\n loading,\n error,\n selectedTemplateId,\n onSelect,\n}) {\n if (loading) {\n return (\n <div style={{ display: 'flex', justifyContent: 'center', padding: 'var(--space-pagePadding)' }}>\n <Spinner />\n </div>\n );\n }\n\n if (error) {\n return (\n <div style={{ padding: 'var(--space-cardPadding)', color: 'var(--color-status-error-text)' }}>\n Could not load templates from the store: {error}\n </div>\n );\n }\n\n if (templates.length === 0) {\n return (\n <div\n style={{\n padding: 'var(--space-pagePadding)',\n textAlign: 'center',\n color: 'var(--color-text-muted)',\n }}\n >\n <LayoutTemplate\n style={{\n height: 'var(--size-icon-lg)',\n width: 'var(--size-icon-lg)',\n margin: '0 auto var(--space-formGap)',\n }}\n />\n <div>No dashboard templates published yet</div>\n <div style={{ fontSize: 'var(--font-size-body-sm)', marginTop: 'var(--space-iconGap)' }}>\n Templates published to the store will appear here.\n </div>\n </div>\n );\n }\n\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(min(220px, 100%), 1fr))',\n gap: 'var(--space-formGap)',\n }}\n >\n {templates.map((template) => {\n const selected = template.id === selectedTemplateId;\n return (\n <button\n key={template.id}\n type=\"button\"\n onClick={() => onSelect(template)}\n aria-pressed={selected}\n style={{\n ...cardBase,\n // Selection needs to survive a glance across a 900px grid: brand\n // border + ring + tinted surface, not a 1-step elevation alone.\n borderColor: selected ? 'var(--color-action-primary-border)' : 'var(--color-border-subtle)',\n backgroundColor: selected ? 'var(--color-bg-accentSubtle)' : 'var(--color-bg-surface)',\n boxShadow: selected ? '0 0 0 2px var(--color-action-primary-bg)' : 'none',\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center', gap: 'var(--space-iconGap)' }}>\n <LayoutTemplate style={{ height: 'var(--size-icon-sm)', width: 'var(--size-icon-sm)' }} />\n <span style={{ fontWeight: 'var(--font-weight-medium)' }}>{template.name}</span>\n </div>\n\n <div\n style={{\n fontSize: 'var(--font-size-body-sm)',\n color: 'var(--color-text-muted)',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n }}\n >\n {template.description || 'No description provided'}\n </div>\n\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 'var(--space-controlGap)',\n marginTop: 'auto',\n flexWrap: 'wrap',\n // `--font-size-body-xs` does not exist in the token build — using it\n // drops the declaration and the row silently inherits body size.\n fontSize: 'var(--font-size-xs)',\n color: 'var(--color-text-muted)',\n }}\n >\n {template.requiresPurchase ? (\n <Badge variant=\"secondary\">${template.price}</Badge>\n ) : (\n <Badge variant=\"secondary\">Free</Badge>\n )}\n {template.downloads > 0 && (\n <span style={{ display: 'inline-flex', alignItems: 'center', gap: '2px' }}>\n <Download style={{ height: '12px', width: '12px' }} />\n {template.downloads}\n </span>\n )}\n {template.rating ? (\n <span style={{ display: 'inline-flex', alignItems: 'center', gap: '2px' }}>\n <Star style={{ height: '12px', width: '12px' }} />\n {template.rating.toFixed(1)}\n </span>\n ) : null}\n </div>\n </button>\n );\n })}\n </div>\n );\n});\n\nexport default StoreTemplatePicker;\n"],"mappings":";;;;;AAwBA,IAAM,IAAgC;CACpC,WAAW;CACX,SAAS;CACT,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,eAAe;CACf,KAAK;CACL,YAAY;CACb,EAEY,IAAoD,EAAK,SAA6B,EACjG,cACA,YACA,UACA,uBACA,eACC;AAyCD,QAxCI,IAEA,kBAAC,OAAD;EAAK,OAAO;GAAE,SAAS;GAAQ,gBAAgB;GAAU,SAAS;GAA4B;YAC5F,kBAAC,GAAD,EAAW,CAAA;EACP,CAAA,GAIN,IAEA,kBAAC,OAAD;EAAK,OAAO;GAAE,SAAS;GAA4B,OAAO;GAAkC;YAA5F,CAA8F,6CAClD,EACtC;MAIN,EAAU,WAAW,IAErB,kBAAC,OAAD;EACE,OAAO;GACL,SAAS;GACT,WAAW;GACX,OAAO;GACR;YALH;GAOE,kBAAC,GAAD,EACE,OAAO;IACL,QAAQ;IACR,OAAO;IACP,QAAQ;IACT,EACD,CAAA;GACF,kBAAC,OAAD,EAAA,UAAK,wCAA0C,CAAA;GAC/C,kBAAC,OAAD;IAAK,OAAO;KAAE,UAAU;KAA4B,WAAW;KAAwB;cAAE;IAEnF,CAAA;GACF;MAKR,kBAAC,OAAD;EACE,OAAO;GACL,SAAS;GACT,qBAAqB;GACrB,KAAK;GACN;YAEA,EAAU,KAAK,MAAa;GAC3B,IAAM,IAAW,EAAS,OAAO;AACjC,UACE,kBAAC,UAAD;IAEE,MAAK;IACL,eAAe,EAAS,EAAS;IACjC,gBAAc;IACd,OAAO;KACL,GAAG;KAGH,aAAa,IAAW,uCAAuC;KAC/D,iBAAiB,IAAW,iCAAiC;KAC7D,WAAW,IAAW,6CAA6C;KACpE;cAZH;KAcE,kBAAC,OAAD;MAAK,OAAO;OAAE,SAAS;OAAQ,YAAY;OAAU,KAAK;OAAwB;gBAAlF,CACE,kBAAC,GAAD,EAAgB,OAAO;OAAE,QAAQ;OAAuB,OAAO;OAAuB,EAAI,CAAA,EAC1F,kBAAC,QAAD;OAAM,OAAO,EAAE,YAAY,6BAA6B;iBAAG,EAAS;OAAY,CAAA,CAC5E;;KAEN,kBAAC,OAAD;MACE,OAAO;OACL,UAAU;OACV,OAAO;OACP,SAAS;OACT,iBAAiB;OACjB,iBAAiB;OACjB,UAAU;OACX;gBAEA,EAAS,eAAe;MACrB,CAAA;KAEN,kBAAC,OAAD;MACE,OAAO;OACL,SAAS;OACT,YAAY;OACZ,KAAK;OACL,WAAW;OACX,UAAU;OAGV,UAAU;OACV,OAAO;OACR;gBAXH;OAaG,EAAS,mBACR,kBAAC,GAAD;QAAO,SAAQ;kBAAf,CAA2B,KAAE,EAAS,MAAc;YAEpD,kBAAC,GAAD;QAAO,SAAQ;kBAAY;QAAY,CAAA;OAExC,EAAS,YAAY,KACpB,kBAAC,QAAD;QAAM,OAAO;SAAE,SAAS;SAAe,YAAY;SAAU,KAAK;SAAO;kBAAzE,CACE,kBAAC,GAAD,EAAU,OAAO;SAAE,QAAQ;SAAQ,OAAO;SAAQ,EAAI,CAAA,EACrD,EAAS,UACL;;OAER,EAAS,SACR,kBAAC,QAAD;QAAM,OAAO;SAAE,SAAS;SAAe,YAAY;SAAU,KAAK;SAAO;kBAAzE,CACE,kBAAC,GAAD,EAAM,OAAO;SAAE,QAAQ;SAAQ,OAAO;SAAQ,EAAI,CAAA,EACjD,EAAS,OAAO,QAAQ,EAAE,CACtB;YACL;OACA;;KACC;MA9DF,EAAS,GA8DP;IAEX;EACE,CAAA;EAER"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Section as e } from "../common/Section.js";
|
|
2
|
+
import "../common/index.js";
|
|
3
|
+
import { memo as t, useMemo as n } from "react";
|
|
4
|
+
import { DatabaseZap as r } from "lucide-react";
|
|
5
|
+
import { Button as i } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
7
|
//#region src/bigconsole/components/dashboard/TemplateSetupBanner.tsx
|
|
6
8
|
var o = "templateDataSinkSlot";
|
|
7
9
|
function s(e) {
|
|
@@ -9,71 +11,37 @@ function s(e) {
|
|
|
9
11
|
let t = e.metadata?.[o];
|
|
10
12
|
return typeof t == "string" && t.length > 0 ? t : null;
|
|
11
13
|
}
|
|
12
|
-
var c =
|
|
13
|
-
let { unconnectedCount: l, slots: u } =
|
|
14
|
-
let
|
|
15
|
-
for (let r of
|
|
16
|
-
let
|
|
17
|
-
|
|
14
|
+
var c = t(function({ widgets: t, isEditMode: o = !1, onConnectData: c }) {
|
|
15
|
+
let { unconnectedCount: l, slots: u } = n(() => {
|
|
16
|
+
let e = /* @__PURE__ */ new Set(), n = 0;
|
|
17
|
+
for (let r of t) {
|
|
18
|
+
let t = s(r);
|
|
19
|
+
t && (n += 1, e.add(t));
|
|
18
20
|
}
|
|
19
21
|
return {
|
|
20
22
|
unconnectedCount: n,
|
|
21
|
-
slots: Array.from(
|
|
23
|
+
slots: Array.from(e)
|
|
22
24
|
};
|
|
23
|
-
}, [
|
|
25
|
+
}, [t]);
|
|
24
26
|
if (o || l === 0) return null;
|
|
25
27
|
let d = u.length === 1 ? "data source" : "data sources";
|
|
26
28
|
return /* @__PURE__ */ a("div", {
|
|
27
29
|
role: "status",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ i(n, {
|
|
41
|
-
style: {
|
|
42
|
-
height: "var(--size-icon-sm)",
|
|
43
|
-
width: "var(--size-icon-sm)",
|
|
44
|
-
flexShrink: 0
|
|
45
|
-
},
|
|
46
|
-
"aria-hidden": "true"
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ a("div", {
|
|
49
|
-
style: {
|
|
50
|
-
flex: 1,
|
|
51
|
-
minWidth: 0
|
|
52
|
-
},
|
|
53
|
-
children: [/* @__PURE__ */ i("div", {
|
|
54
|
-
style: { fontWeight: "var(--font-weight-medium)" },
|
|
55
|
-
children: "This dashboard came from a template"
|
|
56
|
-
}), /* @__PURE__ */ a("div", {
|
|
57
|
-
style: { fontSize: "var(--font-size-sm)" },
|
|
58
|
-
children: [
|
|
59
|
-
l,
|
|
60
|
-
" ",
|
|
61
|
-
l === 1 ? "widget needs" : "widgets need",
|
|
62
|
-
" connecting to your data — ",
|
|
63
|
-
u.length,
|
|
64
|
-
" ",
|
|
65
|
-
d,
|
|
66
|
-
" to set up."
|
|
67
|
-
]
|
|
68
|
-
})]
|
|
69
|
-
}),
|
|
70
|
-
c ? /* @__PURE__ */ i(r, {
|
|
30
|
+
className: "mx-card-padding mt-control-gap flex-shrink-0",
|
|
31
|
+
children: /* @__PURE__ */ a(e, {
|
|
32
|
+
tone: "info",
|
|
33
|
+
padding: "compact",
|
|
34
|
+
headingLevel: 3,
|
|
35
|
+
"data-testid": "template-setup-banner",
|
|
36
|
+
icon: /* @__PURE__ */ a(r, { className: "h-icon-sm w-icon-sm" }),
|
|
37
|
+
title: "This dashboard came from a template",
|
|
38
|
+
description: `${l} ${l === 1 ? "widget needs" : "widgets need"} connecting to your data — ${u.length} ${d} to set up.`,
|
|
39
|
+
actions: c ? /* @__PURE__ */ a(i, {
|
|
71
40
|
size: "sm",
|
|
72
41
|
onClick: () => c(u),
|
|
73
|
-
style: { flexShrink: 0 },
|
|
74
42
|
children: "Connect data"
|
|
75
|
-
}) :
|
|
76
|
-
|
|
43
|
+
}) : void 0
|
|
44
|
+
})
|
|
77
45
|
});
|
|
78
46
|
});
|
|
79
47
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateSetupBanner.js","names":[],"sources":["../../../../src/bigconsole/components/dashboard/TemplateSetupBanner.tsx"],"sourcesContent":["/**\n * TemplateSetupBanner\n *\n * Shown on a board installed from a store template that still has widgets\n * without a data source.\n *\n * WHY THIS EXISTS:\n * Template installs deliberately do not require every data-sink slot to be\n * bound up front — a brand-new workspace has no sinks at all, so a hard\n * requirement would make the template gallery unusable for exactly the users\n * it exists to serve. The cost of that choice is that the board renders\n * immediately with some widgets holding no data.\n *\n * A workflow can get away with the equivalent (FluidGrids just toasts \"go\n * configure your credential\") because nothing runs until you press Test. A\n * dashboard renders the instant you open it, so an unconnected widget is\n * visually indistinguishable from a crashed one. This banner is what\n * reframes the screen from \"broken\" to \"setup in progress\", and it does more\n * work for that than any per-widget treatment.\n *\n * It derives its state from the widgets themselves — each widget installed from\n * a template carries its originating slot in `metadata.templateDataSinkSlot` —\n * so it needs no extra query and lights up for any such board.\n *\n * Semantic status tokens only, no raw colors.\n *\n * @module bigconsole/components/dashboard/TemplateSetupBanner\n */\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { DatabaseZap } from 'lucide-react';\nimport { type FC, memo, useMemo } from 'react';\n\nimport type { Widget } from '../../types';\n\n/** Metadata key written by the backend template installer. */\nconst WIDGET_TEMPLATE_SLOT_KEY = 'templateDataSinkSlot';\n\nexport interface TemplateSetupBannerProps {\n widgets: Widget[];\n /** Hidden while editing: the builder has its own binding affordances. */\n isEditMode?: boolean;\n /** Opens the guided connect flow. Omit to render the banner without a CTA. */\n onConnectData?: (slots: string[]) => void;\n}\n\n/** A widget that came from a template and still has no sink bound. */\nfunction needsData(widget: Widget): string | null {\n if (widget.dataSinkId) return null;\n const slot = widget.metadata?.[WIDGET_TEMPLATE_SLOT_KEY];\n return typeof slot === 'string' && slot.length > 0 ? slot : null;\n}\n\nexport const TemplateSetupBanner: FC<TemplateSetupBannerProps> = memo(function TemplateSetupBanner({\n widgets,\n isEditMode = false,\n onConnectData,\n}) {\n const { unconnectedCount, slots } = useMemo(() => {\n const found = new Set<string>();\n let count = 0;\n for (const widget of widgets) {\n const slot = needsData(widget);\n if (!slot) continue;\n count += 1;\n found.add(slot);\n }\n return { unconnectedCount: count, slots: Array.from(found) };\n }, [widgets]);\n\n if (isEditMode || unconnectedCount === 0) return null;\n\n const sourceWord = slots.length === 1 ? 'data source' : 'data sources';\n const widgetWord = unconnectedCount === 1 ? 'widget needs' : 'widgets need';\n\n return (\n <div
|
|
1
|
+
{"version":3,"file":"TemplateSetupBanner.js","names":[],"sources":["../../../../src/bigconsole/components/dashboard/TemplateSetupBanner.tsx"],"sourcesContent":["/**\n * TemplateSetupBanner\n *\n * Shown on a board installed from a store template that still has widgets\n * without a data source.\n *\n * WHY THIS EXISTS:\n * Template installs deliberately do not require every data-sink slot to be\n * bound up front — a brand-new workspace has no sinks at all, so a hard\n * requirement would make the template gallery unusable for exactly the users\n * it exists to serve. The cost of that choice is that the board renders\n * immediately with some widgets holding no data.\n *\n * A workflow can get away with the equivalent (FluidGrids just toasts \"go\n * configure your credential\") because nothing runs until you press Test. A\n * dashboard renders the instant you open it, so an unconnected widget is\n * visually indistinguishable from a crashed one. This banner is what\n * reframes the screen from \"broken\" to \"setup in progress\", and it does more\n * work for that than any per-widget treatment.\n *\n * It derives its state from the widgets themselves — each widget installed from\n * a template carries its originating slot in `metadata.templateDataSinkSlot` —\n * so it needs no extra query and lights up for any such board.\n *\n * Semantic status tokens only, no raw colors.\n *\n * @module bigconsole/components/dashboard/TemplateSetupBanner\n */\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { DatabaseZap } from 'lucide-react';\nimport { type FC, memo, useMemo } from 'react';\n\nimport { Section } from '../common';\nimport type { Widget } from '../../types';\n\n/** Metadata key written by the backend template installer. */\nconst WIDGET_TEMPLATE_SLOT_KEY = 'templateDataSinkSlot';\n\nexport interface TemplateSetupBannerProps {\n widgets: Widget[];\n /** Hidden while editing: the builder has its own binding affordances. */\n isEditMode?: boolean;\n /** Opens the guided connect flow. Omit to render the banner without a CTA. */\n onConnectData?: (slots: string[]) => void;\n}\n\n/** A widget that came from a template and still has no sink bound. */\nfunction needsData(widget: Widget): string | null {\n if (widget.dataSinkId) return null;\n const slot = widget.metadata?.[WIDGET_TEMPLATE_SLOT_KEY];\n return typeof slot === 'string' && slot.length > 0 ? slot : null;\n}\n\nexport const TemplateSetupBanner: FC<TemplateSetupBannerProps> = memo(function TemplateSetupBanner({\n widgets,\n isEditMode = false,\n onConnectData,\n}) {\n const { unconnectedCount, slots } = useMemo(() => {\n const found = new Set<string>();\n let count = 0;\n for (const widget of widgets) {\n const slot = needsData(widget);\n if (!slot) continue;\n count += 1;\n found.add(slot);\n }\n return { unconnectedCount: count, slots: Array.from(found) };\n }, [widgets]);\n\n if (isEditMode || unconnectedCount === 0) return null;\n\n const sourceWord = slots.length === 1 ? 'data source' : 'data sources';\n const widgetWord = unconnectedCount === 1 ? 'widget needs' : 'widgets need';\n\n return (\n <div role=\"status\" className=\"mx-card-padding mt-control-gap flex-shrink-0\">\n <Section\n tone=\"info\"\n padding=\"compact\"\n headingLevel={3}\n data-testid=\"template-setup-banner\"\n icon={<DatabaseZap className=\"h-icon-sm w-icon-sm\" />}\n title=\"This dashboard came from a template\"\n description={`${unconnectedCount} ${widgetWord} connecting to your data — ${slots.length} ${sourceWord} to set up.`}\n actions={\n onConnectData ? (\n <Button size=\"sm\" onClick={() => onConnectData(slots)}>\n Connect data\n </Button>\n ) : undefined\n }\n />\n </div>\n );\n});\n\nexport default TemplateSetupBanner;\n"],"mappings":";;;;;;;AAoCA,IAAM,IAA2B;AAWjC,SAAS,EAAU,GAA+B;AAChD,KAAI,EAAO,WAAY,QAAO;CAC9B,IAAM,IAAO,EAAO,WAAW;AAC/B,QAAO,OAAO,KAAS,YAAY,EAAK,SAAS,IAAI,IAAO;;AAG9D,IAAa,IAAoD,EAAK,SAA6B,EACjG,YACA,gBAAa,IACb,oBACC;CACD,IAAM,EAAE,qBAAkB,aAAU,QAAc;EAChD,IAAM,oBAAQ,IAAI,KAAa,EAC3B,IAAQ;AACZ,OAAK,IAAM,KAAU,GAAS;GAC5B,IAAM,IAAO,EAAU,EAAO;AACzB,SACL,KAAS,GACT,EAAM,IAAI,EAAK;;AAEjB,SAAO;GAAE,kBAAkB;GAAO,OAAO,MAAM,KAAK,EAAM;GAAE;IAC3D,CAAC,EAAQ,CAAC;AAEb,KAAI,KAAc,MAAqB,EAAG,QAAO;CAEjD,IAAM,IAAa,EAAM,WAAW,IAAI,gBAAgB;AAGxD,QACE,kBAAC,OAAD;EAAK,MAAK;EAAS,WAAU;YAC3B,kBAAC,GAAD;GACE,MAAK;GACL,SAAQ;GACR,cAAc;GACd,eAAY;GACZ,MAAM,kBAAC,GAAD,EAAa,WAAU,uBAAwB,CAAA;GACrD,OAAM;GACN,aAAa,GAAG,EAAiB,GAXpB,MAAqB,IAAI,iBAAiB,eAWR,6BAA6B,EAAM,OAAO,GAAG,EAAW;GACvG,SACE,IACE,kBAAC,GAAD;IAAQ,MAAK;IAAK,eAAe,EAAc,EAAM;cAAE;IAE9C,CAAA,GACP,KAAA;GAEN,CAAA;EACE,CAAA;EAER"}
|