@burdenoff/microfe-bigconsole 2026.624.2 → 2026.625.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/BigConsoleRoutes.js +93 -93
- package/dist/bigconsole/assistant/assistantApi.js +215 -0
- package/dist/bigconsole/assistant/assistantApi.js.map +1 -0
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +119 -0
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -0
- package/dist/bigconsole/assistant/index.js +2 -0
- package/dist/bigconsole/assistant/pageContext.js +51 -0
- package/dist/bigconsole/assistant/pageContext.js.map +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +48 -48
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +52 -52
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +33 -33
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +179 -179
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +38 -38
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +32 -32
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +31 -31
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +98 -98
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ExportParserDialog.js +31 -31
- package/dist/bigconsole/components/parser/ImportParserDialog.js +162 -162
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +79 -79
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +307 -307
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js +222 -222
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetTypeSelector.js +23 -23
- package/dist/bigconsole/index.js +3 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.js +74 -74
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +168 -189
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +266 -310
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +148 -194
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -246
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -231
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +173 -219
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/HomePage.js +125 -141
- package/dist/bigconsole/pages/HomePage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +159 -184
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +401 -393
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +220 -201
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +212 -206
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +204 -181
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +107 -150
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +184 -171
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +69 -81
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +230 -216
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +106 -149
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/generated/wspace-operations.js +87 -36
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +6 -2
|
@@ -5,142 +5,142 @@ import n from "./SavedViewsDropdown/SavedViewsDropdown.js";
|
|
|
5
5
|
import "./SavedViewsDropdown/index.js";
|
|
6
6
|
import { memo as r, useCallback as i } from "react";
|
|
7
7
|
import { Clipboard as a, Download as o, Eye as s, FileText as c, Image as l, Minus as u, PanelLeft as d, PanelLeftClose as f, Pencil as p, Plus as m, RotateCcw as h, Save as g, Share2 as _ } from "lucide-react";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Button as v, Spinner as y, Tooltip as b, TooltipContent as x, TooltipProvider as S, TooltipTrigger as C } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
10
10
|
//#region src/bigconsole/components/dashboard/DashboardToolbar.tsx
|
|
11
11
|
var D = r(function({ dashboardId: r, title: D, onAddWidget: O, onTogglePalette: k, isPaletteOpen: A = !1, onPaste: j, onSave: M, isSaving: N = !1, onExport: P, onExportImage: F, onExportPdf: I, isExportingImage: L = !1, onShare: R }) {
|
|
12
12
|
let z = t((e) => e.viewMode === "edit"), B = t((e) => e.toggleViewMode), V = t((e) => e.zoomLevel), H = t((e) => e.setZoomLevel), U = !!e((e) => e.clipboardWidgetId), W = i(() => {
|
|
13
13
|
U && j && j();
|
|
14
14
|
}, [U, j]);
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ T(S, { children: /* @__PURE__ */ E("div", {
|
|
16
16
|
className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 py-2 bg-bg-surface border-b",
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ E("div", {
|
|
19
19
|
className: "flex min-w-0 items-center gap-4",
|
|
20
|
-
children: [D && /* @__PURE__ */
|
|
20
|
+
children: [D && /* @__PURE__ */ T("h1", {
|
|
21
21
|
className: "min-w-0 truncate text-lg font-semibold",
|
|
22
22
|
title: D,
|
|
23
23
|
children: D
|
|
24
|
-
}), r && /* @__PURE__ */
|
|
24
|
+
}), r && /* @__PURE__ */ T(n, { dashboardId: r })]
|
|
25
25
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ E("div", {
|
|
27
27
|
className: "flex flex-shrink-0 items-center gap-1",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */ b
|
|
29
|
+
/* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
30
30
|
asChild: !0,
|
|
31
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ T(v, {
|
|
32
32
|
variant: "ghost",
|
|
33
33
|
size: "icon-sm",
|
|
34
34
|
onClick: () => H(Math.max(50, V - 10)),
|
|
35
35
|
disabled: V <= 50,
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ T(u, { className: "size-4" })
|
|
37
37
|
})
|
|
38
|
-
}), /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ T(x, { children: "Zoom out" })] }),
|
|
39
|
+
/* @__PURE__ */ E("span", {
|
|
40
40
|
className: "text-sm text-text-secondary w-12 text-center",
|
|
41
41
|
children: [V, "%"]
|
|
42
42
|
}),
|
|
43
|
-
/* @__PURE__ */ b
|
|
43
|
+
/* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
44
44
|
asChild: !0,
|
|
45
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ T(v, {
|
|
46
46
|
variant: "ghost",
|
|
47
47
|
size: "icon-sm",
|
|
48
48
|
onClick: () => H(Math.min(200, V + 10)),
|
|
49
49
|
disabled: V >= 200,
|
|
50
|
-
children: /* @__PURE__ */
|
|
50
|
+
children: /* @__PURE__ */ T(m, { className: "size-4" })
|
|
51
51
|
})
|
|
52
|
-
}), /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ b
|
|
52
|
+
}), /* @__PURE__ */ T(x, { children: "Zoom in" })] }),
|
|
53
|
+
/* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
54
54
|
asChild: !0,
|
|
55
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ E(v, {
|
|
56
56
|
variant: "ghost",
|
|
57
57
|
size: "sm",
|
|
58
58
|
onClick: () => H(100),
|
|
59
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ T(h, { className: "size-3.5 mr-1" }), "Reset"]
|
|
60
60
|
})
|
|
61
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ T(x, { children: "Reset zoom to 100%" })] })
|
|
62
62
|
]
|
|
63
63
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ E("div", {
|
|
65
65
|
className: "flex flex-wrap items-center justify-end gap-2",
|
|
66
66
|
children: [
|
|
67
|
-
z && /* @__PURE__ */
|
|
68
|
-
k && /* @__PURE__ */ b
|
|
67
|
+
z && /* @__PURE__ */ E(w, { children: [
|
|
68
|
+
k && /* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
69
69
|
asChild: !0,
|
|
70
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ E(v, {
|
|
71
71
|
variant: A ? "secondary" : "outline",
|
|
72
72
|
size: "sm",
|
|
73
73
|
onClick: k,
|
|
74
|
-
children: [
|
|
74
|
+
children: [T(A ? f : d, { className: "size-4" }), "Widgets"]
|
|
75
75
|
})
|
|
76
|
-
}), /* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */ b
|
|
76
|
+
}), /* @__PURE__ */ T(x, { children: A ? "Hide widget palette" : "Show widget palette for drag & drop" })] }),
|
|
77
|
+
/* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
78
78
|
asChild: !0,
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ E(v, {
|
|
80
80
|
variant: "ghost",
|
|
81
81
|
size: "sm",
|
|
82
82
|
onClick: W,
|
|
83
83
|
disabled: !U,
|
|
84
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ T(a, { className: "size-4" }), "Paste"]
|
|
85
85
|
})
|
|
86
|
-
}), /* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
86
|
+
}), /* @__PURE__ */ T(x, { children: "Paste widget from clipboard" })] }),
|
|
87
|
+
/* @__PURE__ */ E(v, {
|
|
88
88
|
size: "sm",
|
|
89
89
|
onClick: O,
|
|
90
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ T(m, { className: "size-4" }), "Add Widget"]
|
|
91
91
|
})
|
|
92
92
|
] }),
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ T(v, {
|
|
94
94
|
variant: z ? "secondary" : "outline",
|
|
95
95
|
size: "sm",
|
|
96
96
|
onClick: B,
|
|
97
|
-
children: z ? /* @__PURE__ */
|
|
97
|
+
children: z ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(s, { className: "size-4" }), "Preview"] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(p, { className: "size-4" }), "Edit"] })
|
|
98
98
|
}),
|
|
99
|
-
M && /* @__PURE__ */
|
|
99
|
+
M && /* @__PURE__ */ T(v, {
|
|
100
100
|
variant: "outline",
|
|
101
101
|
size: "sm",
|
|
102
102
|
onClick: M,
|
|
103
103
|
disabled: N,
|
|
104
|
-
children: N ? /* @__PURE__ */
|
|
104
|
+
children: N ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(y, { className: "size-4" }), "Saving..."] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(g, { className: "size-4" }), "Save"] })
|
|
105
105
|
}),
|
|
106
|
-
R && /* @__PURE__ */ b
|
|
106
|
+
R && /* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
107
107
|
asChild: !0,
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ E(v, {
|
|
109
109
|
variant: "outline",
|
|
110
110
|
size: "sm",
|
|
111
111
|
onClick: R,
|
|
112
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ T(_, { className: "size-4" }), "Share"]
|
|
113
113
|
})
|
|
114
|
-
}), /* @__PURE__ */
|
|
115
|
-
P && /* @__PURE__ */ b
|
|
114
|
+
}), /* @__PURE__ */ T(x, { children: "Share dashboard with others" })] }),
|
|
115
|
+
P && /* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
116
116
|
asChild: !0,
|
|
117
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ E(v, {
|
|
118
118
|
variant: "outline",
|
|
119
119
|
size: "sm",
|
|
120
120
|
onClick: P,
|
|
121
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ T(o, { className: "size-4" }), "Export"]
|
|
122
122
|
})
|
|
123
|
-
}), /* @__PURE__ */
|
|
124
|
-
F && /* @__PURE__ */ b
|
|
123
|
+
}), /* @__PURE__ */ T(x, { children: "Export dashboard to JSON" })] }),
|
|
124
|
+
F && /* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
125
125
|
asChild: !0,
|
|
126
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ T(v, {
|
|
127
127
|
variant: "outline",
|
|
128
128
|
size: "icon-sm",
|
|
129
129
|
onClick: F,
|
|
130
130
|
disabled: L,
|
|
131
|
-
children:
|
|
131
|
+
children: T(L ? y : l, { className: "size-4" })
|
|
132
132
|
})
|
|
133
|
-
}), /* @__PURE__ */
|
|
134
|
-
I && /* @__PURE__ */ b
|
|
133
|
+
}), /* @__PURE__ */ T(x, { children: "Export board as PNG image" })] }),
|
|
134
|
+
I && /* @__PURE__ */ E(b, { children: [/* @__PURE__ */ T(C, {
|
|
135
135
|
asChild: !0,
|
|
136
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ T(v, {
|
|
137
137
|
variant: "outline",
|
|
138
138
|
size: "icon-sm",
|
|
139
139
|
onClick: I,
|
|
140
140
|
disabled: L,
|
|
141
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ T(c, { className: "size-4" })
|
|
142
142
|
})
|
|
143
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ T(x, { children: "Export board as PDF" })] })
|
|
144
144
|
]
|
|
145
145
|
})
|
|
146
146
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrilldownBreadcrumb.js","names":[],"sources":["../../../../src/bigconsole/components/dashboard/DrilldownBreadcrumb.tsx"],"sourcesContent":["/**\n * DrilldownBreadcrumb Component\n *\n * Displays a breadcrumb trail showing the drilldown navigation path.\n * Allows users to navigate back up the drilldown hierarchy.\n *\n * URL Parameters Used:\n * - drilldown_depth: Current depth in drilldown hierarchy\n * - drilldown_parent: Parent dashboard ID\n * - drilldown_path: JSON array of dashboard IDs in the path\n */\n\nimport { memo, useCallback, useEffect, useState } from 'react';\nimport { useBigConsoleNavigate } from '../../context';\nimport { useFilterUrlSync } from '../../hooks/useFilterUrlSync';\nimport { useDashboardStore } from '../../store';\nimport { ChevronRight, Home, ArrowLeft } from 'lucide-react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface DrilldownBreadcrumbProps {\n /** Additional CSS classes */\n className?: string;\n /** Current dashboard ID */\n currentDashboardId?: string;\n /** Current dashboard name */\n currentDashboardName?: string;\n /** Whether to show the home/root link */\n showHome?: boolean;\n /** Base path for dashboard URLs */\n basePath?: string;\n}\n\ninterface BreadcrumbItem {\n id: string;\n name: string;\n href: string;\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport const DrilldownBreadcrumb = memo(function DrilldownBreadcrumb({\n className = '',\n currentDashboardId,\n currentDashboardName,\n showHome = true,\n basePath = '/bigconsole/dashboards',\n}: DrilldownBreadcrumbProps) {\n const navigate = useBigConsoleNavigate();\n const { getDrilldownMetadata, isInDrilldown, drilldownDepth } = useFilterUrlSync();\n\n // Get dashboards from store for name lookup\n const dashboards = useDashboardStore((state) => state.dashboards);\n\n const [breadcrumbs, setBreadcrumbs] = useState<BreadcrumbItem[]>([]);\n\n // Build breadcrumb items from path\n useEffect(() => {\n if (!isInDrilldown) {\n setBreadcrumbs([]);\n return;\n }\n\n const metadata = getDrilldownMetadata();\n const { path } = metadata;\n\n if (path.length === 0) {\n setBreadcrumbs([]);\n return;\n }\n\n // Map path IDs to breadcrumb items\n const items: BreadcrumbItem[] = path.map((dashboardId) => {\n // Try to find dashboard name in store\n const dashboard = dashboards.get(dashboardId);\n const name = dashboard?.name || `Dashboard ${dashboardId.slice(0, 8)}...`;\n\n return {\n id: dashboardId,\n name,\n href: `${basePath}/${dashboardId}`,\n };\n });\n\n setBreadcrumbs(items);\n }, [isInDrilldown, getDrilldownMetadata, dashboards, basePath]);\n\n // Handle navigation to a breadcrumb item\n const handleNavigate = useCallback(\n (item: BreadcrumbItem, index: number) => {\n // Build URL preserving context up to this point\n const metadata = getDrilldownMetadata();\n const newPath = metadata.path.slice(0, index);\n const newDepth = index;\n\n // Build URL with updated drilldown params\n const url = new URL(item.href, window.location.origin);\n url.searchParams.set('drilldown_depth', String(newDepth));\n if (newPath.length > 0) {\n url.searchParams.set('drilldown_path', encodeURIComponent(JSON.stringify(newPath)));\n }\n if (index > 0 && newPath.length > 0) {\n url.searchParams.set('drilldown_parent', newPath[newPath.length - 1]);\n }\n\n navigate(url.pathname + url.search);\n },\n [getDrilldownMetadata, navigate]\n );\n\n // Handle back button click\n const handleBack = useCallback(() => {\n const metadata = getDrilldownMetadata();\n\n if (metadata.parent) {\n // Navigate to parent dashboard\n const newPath = metadata.path.slice(0, -1);\n const newDepth = metadata.depth - 1;\n\n const url = new URL(`${basePath}/${metadata.parent}`, window.location.origin);\n url.searchParams.set('drilldown_depth', String(newDepth));\n if (newPath.length > 0) {\n url.searchParams.set('drilldown_path', encodeURIComponent(JSON.stringify(newPath)));\n url.searchParams.set('drilldown_parent', newPath[newPath.length - 1]);\n }\n\n navigate(url.pathname + url.search);\n } else if (breadcrumbs.length > 0) {\n // Navigate to last breadcrumb\n const lastBreadcrumb = breadcrumbs[breadcrumbs.length - 1];\n handleNavigate(lastBreadcrumb, breadcrumbs.length - 1);\n }\n }, [getDrilldownMetadata, basePath, navigate, breadcrumbs, handleNavigate]);\n\n // Handle home click\n const handleHomeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n navigate(basePath);\n },\n [navigate, basePath]\n );\n\n // Don't render if not in drilldown mode\n if (!isInDrilldown) {\n return null;\n }\n\n return (\n <nav\n className={`flex items-center gap-2 px-4 py-2 bg-bg-surface border-b border-border-default ${className}`}\n aria-label=\"Drilldown breadcrumb\"\n >\n {/* Back button */}\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"flex items-center gap-1 px-2 py-1 text-sm font-medium text-action-primary-bg hover:bg-action-primary-bg/10 rounded-md transition-colors\"\n aria-label=\"Go back\"\n >\n <ArrowLeft className=\"w-4 h-4\" />\n <span className=\"hidden sm:inline\">Back</span>\n </button>\n\n <span className=\"text-border-default\">|</span>\n\n {/* Home link */}\n {showHome && (\n <>\n <a\n href={basePath}\n onClick={handleHomeClick}\n className=\"flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary transition-colors\"\n aria-label=\"Home\"\n >\n <Home className=\"w-4 h-4\" />\n <span className=\"hidden sm:inline\">Dashboards</span>\n </a>\n <ChevronRight className=\"w-4 h-4 text-text-tertiary\" />\n </>\n )}\n\n {/* Breadcrumb items */}\n {breadcrumbs.map((item, index) => (\n <div key={item.id} className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => handleNavigate(item, index)}\n className=\"text-sm text-text-secondary hover:text-text-primary hover:underline transition-colors max-w-[150px] truncate\"\n title={item.name}\n >\n {item.name}\n </button>\n <ChevronRight className=\"w-4 h-4 text-text-tertiary\" />\n </div>\n ))}\n\n {/* Current dashboard (non-clickable) */}\n {currentDashboardName && (\n <span className=\"text-sm font-medium text-text-primary max-w-[200px] truncate\" title={currentDashboardName}>\n {currentDashboardName}\n </span>\n )}\n\n {/* Depth indicator */}\n <span className=\"ml-auto text-xs text-text-tertiary bg-bg-sunken px-2 py-0.5 rounded\"
|
|
1
|
+
{"version":3,"file":"DrilldownBreadcrumb.js","names":[],"sources":["../../../../src/bigconsole/components/dashboard/DrilldownBreadcrumb.tsx"],"sourcesContent":["/**\n * DrilldownBreadcrumb Component\n *\n * Displays a breadcrumb trail showing the drilldown navigation path.\n * Allows users to navigate back up the drilldown hierarchy.\n *\n * URL Parameters Used:\n * - drilldown_depth: Current depth in drilldown hierarchy\n * - drilldown_parent: Parent dashboard ID\n * - drilldown_path: JSON array of dashboard IDs in the path\n */\n\nimport { memo, useCallback, useEffect, useState } from 'react';\nimport { useBigConsoleNavigate } from '../../context';\nimport { useFilterUrlSync } from '../../hooks/useFilterUrlSync';\nimport { useDashboardStore } from '../../store';\nimport { ChevronRight, Home, ArrowLeft } from 'lucide-react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface DrilldownBreadcrumbProps {\n /** Additional CSS classes */\n className?: string;\n /** Current dashboard ID */\n currentDashboardId?: string;\n /** Current dashboard name */\n currentDashboardName?: string;\n /** Whether to show the home/root link */\n showHome?: boolean;\n /** Base path for dashboard URLs */\n basePath?: string;\n}\n\ninterface BreadcrumbItem {\n id: string;\n name: string;\n href: string;\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport const DrilldownBreadcrumb = memo(function DrilldownBreadcrumb({\n className = '',\n currentDashboardId,\n currentDashboardName,\n showHome = true,\n basePath = '/bigconsole/dashboards',\n}: DrilldownBreadcrumbProps) {\n const navigate = useBigConsoleNavigate();\n const { getDrilldownMetadata, isInDrilldown, drilldownDepth } = useFilterUrlSync();\n\n // Get dashboards from store for name lookup\n const dashboards = useDashboardStore((state) => state.dashboards);\n\n const [breadcrumbs, setBreadcrumbs] = useState<BreadcrumbItem[]>([]);\n\n // Build breadcrumb items from path\n useEffect(() => {\n if (!isInDrilldown) {\n setBreadcrumbs([]);\n return;\n }\n\n const metadata = getDrilldownMetadata();\n const { path } = metadata;\n\n if (path.length === 0) {\n setBreadcrumbs([]);\n return;\n }\n\n // Map path IDs to breadcrumb items\n const items: BreadcrumbItem[] = path.map((dashboardId) => {\n // Try to find dashboard name in store\n const dashboard = dashboards.get(dashboardId);\n const name = dashboard?.name || `Dashboard ${dashboardId.slice(0, 8)}...`;\n\n return {\n id: dashboardId,\n name,\n href: `${basePath}/${dashboardId}`,\n };\n });\n\n setBreadcrumbs(items);\n }, [isInDrilldown, getDrilldownMetadata, dashboards, basePath]);\n\n // Handle navigation to a breadcrumb item\n const handleNavigate = useCallback(\n (item: BreadcrumbItem, index: number) => {\n // Build URL preserving context up to this point\n const metadata = getDrilldownMetadata();\n const newPath = metadata.path.slice(0, index);\n const newDepth = index;\n\n // Build URL with updated drilldown params\n const url = new URL(item.href, window.location.origin);\n url.searchParams.set('drilldown_depth', String(newDepth));\n if (newPath.length > 0) {\n url.searchParams.set('drilldown_path', encodeURIComponent(JSON.stringify(newPath)));\n }\n if (index > 0 && newPath.length > 0) {\n url.searchParams.set('drilldown_parent', newPath[newPath.length - 1]);\n }\n\n navigate(url.pathname + url.search);\n },\n [getDrilldownMetadata, navigate]\n );\n\n // Handle back button click\n const handleBack = useCallback(() => {\n const metadata = getDrilldownMetadata();\n\n if (metadata.parent) {\n // Navigate to parent dashboard\n const newPath = metadata.path.slice(0, -1);\n const newDepth = metadata.depth - 1;\n\n const url = new URL(`${basePath}/${metadata.parent}`, window.location.origin);\n url.searchParams.set('drilldown_depth', String(newDepth));\n if (newPath.length > 0) {\n url.searchParams.set('drilldown_path', encodeURIComponent(JSON.stringify(newPath)));\n url.searchParams.set('drilldown_parent', newPath[newPath.length - 1]);\n }\n\n navigate(url.pathname + url.search);\n } else if (breadcrumbs.length > 0) {\n // Navigate to last breadcrumb\n const lastBreadcrumb = breadcrumbs[breadcrumbs.length - 1];\n handleNavigate(lastBreadcrumb, breadcrumbs.length - 1);\n }\n }, [getDrilldownMetadata, basePath, navigate, breadcrumbs, handleNavigate]);\n\n // Handle home click\n const handleHomeClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n navigate(basePath);\n },\n [navigate, basePath]\n );\n\n // Don't render if not in drilldown mode\n if (!isInDrilldown) {\n return null;\n }\n\n return (\n <nav\n className={`flex items-center gap-2 px-4 py-2 bg-bg-surface border-b border-border-default ${className}`}\n aria-label=\"Drilldown breadcrumb\"\n >\n {/* Back button */}\n <button\n type=\"button\"\n onClick={handleBack}\n className=\"flex items-center gap-1 px-2 py-1 text-sm font-medium text-action-primary-bg hover:bg-action-primary-bg/10 rounded-md transition-colors\"\n aria-label=\"Go back\"\n >\n <ArrowLeft className=\"w-4 h-4\" />\n <span className=\"hidden sm:inline\">Back</span>\n </button>\n\n <span className=\"text-border-default\">|</span>\n\n {/* Home link */}\n {showHome && (\n <>\n <a\n href={basePath}\n onClick={handleHomeClick}\n className=\"flex items-center gap-1 text-sm text-text-secondary hover:text-text-primary transition-colors\"\n aria-label=\"Home\"\n >\n <Home className=\"w-4 h-4\" />\n <span className=\"hidden sm:inline\">Dashboards</span>\n </a>\n <ChevronRight className=\"w-4 h-4 text-text-tertiary\" />\n </>\n )}\n\n {/* Breadcrumb items */}\n {breadcrumbs.map((item, index) => (\n <div key={item.id} className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => handleNavigate(item, index)}\n className=\"text-sm text-text-secondary hover:text-text-primary hover:underline transition-colors max-w-[150px] truncate\"\n title={item.name}\n >\n {item.name}\n </button>\n <ChevronRight className=\"w-4 h-4 text-text-tertiary\" />\n </div>\n ))}\n\n {/* Current dashboard (non-clickable) */}\n {currentDashboardName && (\n <span className=\"text-sm font-medium text-text-primary max-w-[200px] truncate\" title={currentDashboardName}>\n {currentDashboardName}\n </span>\n )}\n\n {/* Depth indicator */}\n <span className=\"ml-auto text-xs text-text-tertiary bg-bg-sunken px-2 py-0.5 rounded\">\n Level {drilldownDepth}\n </span>\n </nav>\n );\n});\n\nexport default DrilldownBreadcrumb;\n"],"mappings":"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"}
|
|
@@ -2,8 +2,8 @@ import e from "../../hooks/useExportDashboard.js";
|
|
|
2
2
|
import "../../hooks/index.js";
|
|
3
3
|
import { memo as t, useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
4
|
import { Check as a, Download as o, FileJson as s } from "lucide-react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Dialog as c, DialogContent as l, DialogDescription as u, DialogTitle as d, Spinner as f } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
7
7
|
//#region src/bigconsole/components/dashboard/ExportDashboardDialog.tsx
|
|
8
8
|
var g = {
|
|
9
9
|
dialogContent: {
|
|
@@ -169,7 +169,7 @@ var g = {
|
|
|
169
169
|
cursor: "not-allowed"
|
|
170
170
|
}
|
|
171
171
|
}, _ = t(function({ checked: e, onChange: t, disabled: n, label: r, description: i }) {
|
|
172
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ h("div", {
|
|
173
173
|
style: {
|
|
174
174
|
...g.optionItem,
|
|
175
175
|
...e ? g.optionItemActive : {},
|
|
@@ -177,22 +177,22 @@ var g = {
|
|
|
177
177
|
cursor: n ? "not-allowed" : "pointer"
|
|
178
178
|
},
|
|
179
179
|
onClick: () => !n && t(!e),
|
|
180
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ m("div", {
|
|
181
181
|
style: {
|
|
182
182
|
...g.checkbox,
|
|
183
183
|
...e ? g.checkboxChecked : {}
|
|
184
184
|
},
|
|
185
|
-
children: e && /* @__PURE__ */
|
|
185
|
+
children: e && /* @__PURE__ */ m(a, { style: {
|
|
186
186
|
width: "14px",
|
|
187
187
|
height: "14px",
|
|
188
188
|
color: "var(--color-action-primary-text)"
|
|
189
189
|
} })
|
|
190
|
-
}), /* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ h("div", {
|
|
191
191
|
style: g.optionText,
|
|
192
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ m("p", {
|
|
193
193
|
style: g.optionLabel,
|
|
194
194
|
children: r
|
|
195
|
-
}), /* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ m("p", {
|
|
196
196
|
style: g.optionDescription,
|
|
197
197
|
children: i
|
|
198
198
|
})]
|
|
@@ -219,87 +219,87 @@ var g = {
|
|
|
219
219
|
b,
|
|
220
220
|
y
|
|
221
221
|
]);
|
|
222
|
-
return a ? /* @__PURE__ */
|
|
222
|
+
return a ? /* @__PURE__ */ m(c, {
|
|
223
223
|
open: t,
|
|
224
224
|
onOpenChange: (e) => !e && !D && y(),
|
|
225
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ h(l, {
|
|
226
226
|
style: g.dialogContent,
|
|
227
227
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ h("div", {
|
|
229
229
|
style: g.header,
|
|
230
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ m("div", {
|
|
231
231
|
style: g.iconWrapper,
|
|
232
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ m(s, { style: {
|
|
233
233
|
width: "22px",
|
|
234
234
|
height: "22px"
|
|
235
235
|
} })
|
|
236
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ h("div", {
|
|
237
237
|
style: g.headerText,
|
|
238
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ m(d, {
|
|
239
239
|
asChild: !0,
|
|
240
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ m("h2", {
|
|
241
241
|
style: g.title,
|
|
242
242
|
children: "Export Dashboard"
|
|
243
243
|
})
|
|
244
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ m(u, {
|
|
245
245
|
asChild: !0,
|
|
246
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ m("p", {
|
|
247
247
|
style: g.description,
|
|
248
248
|
children: "Export your dashboard configuration to a JSON file."
|
|
249
249
|
})
|
|
250
250
|
})]
|
|
251
251
|
})]
|
|
252
252
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ h("div", {
|
|
254
254
|
style: g.content,
|
|
255
255
|
children: [
|
|
256
|
-
v && /* @__PURE__ */
|
|
256
|
+
v && /* @__PURE__ */ h("div", {
|
|
257
257
|
style: g.dashboardInfo,
|
|
258
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ m("p", {
|
|
259
259
|
style: g.dashboardLabel,
|
|
260
260
|
children: "Exporting:"
|
|
261
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ m("p", {
|
|
262
262
|
style: g.dashboardName,
|
|
263
263
|
children: v
|
|
264
264
|
})]
|
|
265
265
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ m("p", {
|
|
267
267
|
style: g.optionsTitle,
|
|
268
268
|
children: "Export Options"
|
|
269
269
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ m(_, {
|
|
271
271
|
checked: x,
|
|
272
272
|
onChange: S,
|
|
273
273
|
disabled: D,
|
|
274
274
|
label: "Include Data Source References",
|
|
275
275
|
description: "Store data source names for reference (IDs are not transferred)"
|
|
276
276
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ m(_, {
|
|
278
278
|
checked: C,
|
|
279
279
|
onChange: w,
|
|
280
280
|
disabled: D,
|
|
281
281
|
label: "Include Webhook Mappings",
|
|
282
282
|
description: "Export webhook configurations (URLs will need to be reconfigured)"
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ m(_, {
|
|
285
285
|
checked: T,
|
|
286
286
|
onChange: E,
|
|
287
287
|
disabled: D,
|
|
288
288
|
label: "Format JSON (Pretty Print)",
|
|
289
289
|
description: "Makes the export file human-readable (larger file size)"
|
|
290
290
|
}),
|
|
291
|
-
O && /* @__PURE__ */
|
|
291
|
+
O && /* @__PURE__ */ m("div", {
|
|
292
292
|
style: g.error,
|
|
293
|
-
children: /* @__PURE__ */
|
|
293
|
+
children: /* @__PURE__ */ m("p", {
|
|
294
294
|
style: g.errorText,
|
|
295
295
|
children: O.message
|
|
296
296
|
})
|
|
297
297
|
})
|
|
298
298
|
]
|
|
299
299
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ h("div", {
|
|
301
301
|
style: g.footer,
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ m("button", {
|
|
303
303
|
style: g.cancelButton,
|
|
304
304
|
onClick: y,
|
|
305
305
|
disabled: D,
|
|
@@ -310,7 +310,7 @@ var g = {
|
|
|
310
310
|
e.currentTarget.style.backgroundColor = "var(--color-bg-surface)";
|
|
311
311
|
},
|
|
312
312
|
children: "Cancel"
|
|
313
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ m("button", {
|
|
314
314
|
style: {
|
|
315
315
|
...g.exportButton,
|
|
316
316
|
...D ? g.exportButtonDisabled : {}
|
|
@@ -323,10 +323,10 @@ var g = {
|
|
|
323
323
|
onMouseLeave: (e) => {
|
|
324
324
|
D || (e.currentTarget.style.opacity = "1");
|
|
325
325
|
},
|
|
326
|
-
children: D ? /* @__PURE__ */
|
|
326
|
+
children: D ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(f, { style: {
|
|
327
327
|
width: "16px",
|
|
328
328
|
height: "16px"
|
|
329
|
-
} }), "Exporting..."] }) : /* @__PURE__ */
|
|
329
|
+
} }), "Exporting..."] }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(o, { style: {
|
|
330
330
|
width: "16px",
|
|
331
331
|
height: "16px"
|
|
332
332
|
} }), "Download Export"] })
|