@burdenoff/microfe-bigconsole 2026.624.2 → 2026.626.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 +175 -118
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- 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
|
@@ -2,8 +2,8 @@ import e from "./TemplatePicker/TemplatePicker.js";
|
|
|
2
2
|
import "./TemplatePicker/index.js";
|
|
3
3
|
import { memo as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
4
|
import { Copy as o, LayoutDashboard as s, Plus as c, Tag as l, X as u } from "lucide-react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Badge as d, Button as f, Dialog as p, DialogContent as m, DialogDescription as h, DialogFooter as g, DialogHeader as _, DialogTitle as v, Input as y, Spinner as b, Textarea as x } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
7
7
|
//#region src/bigconsole/components/dashboard/CreateDashboardDialog.tsx
|
|
8
8
|
var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, showTemplates: D = !0 }) {
|
|
9
9
|
let [O, k] = a("blank"), [A, j] = a(""), [M, N] = a(""), [P, F] = a([]), [I, L] = a(""), [R, z] = a(null), [B, V] = a(null), H = i(null);
|
|
@@ -63,24 +63,24 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
63
63
|
R,
|
|
64
64
|
E
|
|
65
65
|
]);
|
|
66
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ S(p, {
|
|
67
67
|
open: t,
|
|
68
68
|
onOpenChange: (e) => !e && !w && T(),
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ C(m, {
|
|
70
70
|
style: {
|
|
71
71
|
maxWidth: O === "template" ? "900px" : "480px",
|
|
72
72
|
padding: 0,
|
|
73
73
|
transition: "max-width 0.2s ease"
|
|
74
74
|
},
|
|
75
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ S(_, {
|
|
76
76
|
style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
|
|
77
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ C("div", {
|
|
78
78
|
style: {
|
|
79
79
|
display: "flex",
|
|
80
80
|
alignItems: "center",
|
|
81
81
|
gap: "var(--space-formGap)"
|
|
82
82
|
},
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ S("div", {
|
|
84
84
|
style: {
|
|
85
85
|
display: "flex",
|
|
86
86
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -91,12 +91,12 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
91
91
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
92
92
|
boxShadow: "var(--shadow-elevation-2)"
|
|
93
93
|
},
|
|
94
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ S(s, { style: {
|
|
95
95
|
height: "var(--size-icon-lg)",
|
|
96
96
|
width: "var(--size-icon-lg)",
|
|
97
97
|
color: "var(--color-action-primary-text)"
|
|
98
98
|
} })
|
|
99
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S(v, {
|
|
100
100
|
style: {
|
|
101
101
|
fontSize: "var(--font-size-heading-h4)",
|
|
102
102
|
fontWeight: "var(--font-weight-bold)",
|
|
@@ -104,7 +104,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
104
104
|
margin: 0
|
|
105
105
|
},
|
|
106
106
|
children: "Create New Dashboard"
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ S(h, {
|
|
108
108
|
style: {
|
|
109
109
|
fontSize: "var(--font-size-body-sm)",
|
|
110
110
|
color: "var(--color-text-secondary)",
|
|
@@ -113,12 +113,12 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
113
113
|
children: "Create a new dashboard to visualize your data"
|
|
114
114
|
})] })]
|
|
115
115
|
})
|
|
116
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ C("form", {
|
|
117
117
|
onSubmit: q,
|
|
118
118
|
children: [
|
|
119
|
-
D && /* @__PURE__ */
|
|
119
|
+
D && /* @__PURE__ */ S("div", {
|
|
120
120
|
style: { padding: "var(--space-pagePadding) var(--space-pagePadding) 0" },
|
|
121
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ C("div", {
|
|
122
122
|
style: {
|
|
123
123
|
display: "flex",
|
|
124
124
|
gap: "var(--space-controlGap)",
|
|
@@ -126,7 +126,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
126
126
|
backgroundColor: "var(--color-bg-sunken)",
|
|
127
127
|
borderRadius: "var(--radius-button)"
|
|
128
128
|
},
|
|
129
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ C("button", {
|
|
130
130
|
type: "button",
|
|
131
131
|
onClick: () => {
|
|
132
132
|
k("blank"), z(null);
|
|
@@ -148,11 +148,11 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
148
148
|
boxShadow: O === "blank" ? "var(--shadow-elevation-1)" : "none",
|
|
149
149
|
transition: "all 0.15s ease"
|
|
150
150
|
},
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ S(c, { style: {
|
|
152
152
|
height: "var(--size-icon-sm)",
|
|
153
153
|
width: "var(--size-icon-sm)"
|
|
154
154
|
} }), "Blank Dashboard"]
|
|
155
|
-
}), /* @__PURE__ */
|
|
155
|
+
}), /* @__PURE__ */ C("button", {
|
|
156
156
|
type: "button",
|
|
157
157
|
onClick: () => k("template"),
|
|
158
158
|
style: {
|
|
@@ -172,32 +172,32 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
172
172
|
boxShadow: O === "template" ? "var(--shadow-elevation-1)" : "none",
|
|
173
173
|
transition: "all 0.15s ease"
|
|
174
174
|
},
|
|
175
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ S(o, { style: {
|
|
176
176
|
height: "var(--size-icon-sm)",
|
|
177
177
|
width: "var(--size-icon-sm)"
|
|
178
178
|
} }), "From Template"]
|
|
179
179
|
})]
|
|
180
180
|
})
|
|
181
181
|
}),
|
|
182
|
-
O === "template" && /* @__PURE__ */
|
|
182
|
+
O === "template" && /* @__PURE__ */ S("div", {
|
|
183
183
|
style: {
|
|
184
184
|
padding: "var(--space-pagePadding)",
|
|
185
185
|
maxHeight: "400px",
|
|
186
186
|
overflowY: "auto"
|
|
187
187
|
},
|
|
188
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ S(e, {
|
|
189
189
|
selectedTemplateId: R?.id,
|
|
190
190
|
onSelect: K,
|
|
191
191
|
compact: !0
|
|
192
192
|
})
|
|
193
193
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ C("div", {
|
|
195
195
|
style: { padding: "var(--space-pagePadding)" },
|
|
196
196
|
children: [
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ C("div", {
|
|
198
198
|
style: { marginBottom: "var(--space-formGap)" },
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ C("label", {
|
|
201
201
|
htmlFor: "dashboard-name",
|
|
202
202
|
style: {
|
|
203
203
|
display: "block",
|
|
@@ -206,7 +206,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
206
206
|
color: "var(--color-text-primary)",
|
|
207
207
|
marginBottom: "var(--space-controlGap)"
|
|
208
208
|
},
|
|
209
|
-
children: ["Dashboard Name", /* @__PURE__ */
|
|
209
|
+
children: ["Dashboard Name", /* @__PURE__ */ S("span", {
|
|
210
210
|
style: {
|
|
211
211
|
color: "var(--color-status-error-text)",
|
|
212
212
|
marginLeft: "var(--space-controlGap)"
|
|
@@ -214,7 +214,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
214
214
|
children: "*"
|
|
215
215
|
})]
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ S(y, {
|
|
218
218
|
ref: H,
|
|
219
219
|
id: "dashboard-name",
|
|
220
220
|
type: "text",
|
|
@@ -230,7 +230,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
230
230
|
borderColor: B ? "var(--color-status-error-border)" : void 0
|
|
231
231
|
}
|
|
232
232
|
}),
|
|
233
|
-
B && /* @__PURE__ */
|
|
233
|
+
B && /* @__PURE__ */ S("p", {
|
|
234
234
|
style: {
|
|
235
235
|
fontSize: "var(--font-size-body-sm)",
|
|
236
236
|
color: "var(--color-status-error-text)",
|
|
@@ -241,9 +241,9 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
241
241
|
})
|
|
242
242
|
]
|
|
243
243
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ C("div", {
|
|
245
245
|
style: { marginBottom: "var(--space-formGap)" },
|
|
246
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ C("label", {
|
|
247
247
|
htmlFor: "dashboard-description",
|
|
248
248
|
style: {
|
|
249
249
|
display: "block",
|
|
@@ -252,7 +252,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
252
252
|
color: "var(--color-text-primary)",
|
|
253
253
|
marginBottom: "var(--space-controlGap)"
|
|
254
254
|
},
|
|
255
|
-
children: ["Description", /* @__PURE__ */
|
|
255
|
+
children: ["Description", /* @__PURE__ */ S("span", {
|
|
256
256
|
style: {
|
|
257
257
|
color: "var(--color-text-muted)",
|
|
258
258
|
fontWeight: "var(--font-weight-regular)",
|
|
@@ -260,7 +260,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
260
260
|
},
|
|
261
261
|
children: "(optional)"
|
|
262
262
|
})]
|
|
263
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ S(x, {
|
|
264
264
|
id: "dashboard-description",
|
|
265
265
|
value: M,
|
|
266
266
|
onChange: (e) => N(e.target.value),
|
|
@@ -273,8 +273,8 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
273
273
|
}
|
|
274
274
|
})]
|
|
275
275
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ C("div", { children: [
|
|
277
|
+
/* @__PURE__ */ C("label", {
|
|
278
278
|
htmlFor: "dashboard-tags",
|
|
279
279
|
style: {
|
|
280
280
|
display: "flex",
|
|
@@ -286,12 +286,12 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
286
286
|
marginBottom: "var(--space-controlGap)"
|
|
287
287
|
},
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ S(l, { style: {
|
|
290
290
|
height: "var(--size-icon-sm)",
|
|
291
291
|
width: "var(--size-icon-sm)"
|
|
292
292
|
} }),
|
|
293
293
|
"Tags",
|
|
294
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ S("span", {
|
|
295
295
|
style: {
|
|
296
296
|
color: "var(--color-text-muted)",
|
|
297
297
|
fontWeight: "var(--font-weight-regular)"
|
|
@@ -300,14 +300,14 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
300
300
|
})
|
|
301
301
|
]
|
|
302
302
|
}),
|
|
303
|
-
P.length > 0 && /* @__PURE__ */
|
|
303
|
+
P.length > 0 && /* @__PURE__ */ S("div", {
|
|
304
304
|
style: {
|
|
305
305
|
display: "flex",
|
|
306
306
|
flexWrap: "wrap",
|
|
307
307
|
gap: "var(--space-controlGap)",
|
|
308
308
|
marginBottom: "var(--space-controlGap)"
|
|
309
309
|
},
|
|
310
|
-
children: P.map((e) => /* @__PURE__ */
|
|
310
|
+
children: P.map((e) => /* @__PURE__ */ C(d, {
|
|
311
311
|
variant: "secondary",
|
|
312
312
|
style: {
|
|
313
313
|
display: "flex",
|
|
@@ -315,7 +315,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
315
315
|
gap: "4px",
|
|
316
316
|
paddingRight: "4px"
|
|
317
317
|
},
|
|
318
|
-
children: [e, /* @__PURE__ */
|
|
318
|
+
children: [e, /* @__PURE__ */ S("button", {
|
|
319
319
|
type: "button",
|
|
320
320
|
onClick: () => W(e),
|
|
321
321
|
disabled: w,
|
|
@@ -333,19 +333,19 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
333
333
|
},
|
|
334
334
|
onMouseOver: (e) => e.currentTarget.style.opacity = "1",
|
|
335
335
|
onMouseOut: (e) => e.currentTarget.style.opacity = "0.7",
|
|
336
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ S(u, { style: {
|
|
337
337
|
height: "12px",
|
|
338
338
|
width: "12px"
|
|
339
339
|
} })
|
|
340
340
|
})]
|
|
341
341
|
}, e))
|
|
342
342
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ C("div", {
|
|
344
344
|
style: {
|
|
345
345
|
display: "flex",
|
|
346
346
|
gap: "var(--space-controlGap)"
|
|
347
347
|
},
|
|
348
|
-
children: [/* @__PURE__ */
|
|
348
|
+
children: [/* @__PURE__ */ S(y, {
|
|
349
349
|
id: "dashboard-tags",
|
|
350
350
|
type: "text",
|
|
351
351
|
value: I,
|
|
@@ -358,7 +358,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
358
358
|
height: "var(--size-controlHeight-md)",
|
|
359
359
|
fontSize: "var(--font-size-body-sm)"
|
|
360
360
|
}
|
|
361
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ S(f, {
|
|
362
362
|
type: "button",
|
|
363
363
|
variant: "outline",
|
|
364
364
|
onClick: U,
|
|
@@ -367,7 +367,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
367
367
|
children: "Add"
|
|
368
368
|
})]
|
|
369
369
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ S("p", {
|
|
371
371
|
style: {
|
|
372
372
|
fontSize: "var(--font-size-body-xs)",
|
|
373
373
|
color: "var(--color-text-muted)",
|
|
@@ -378,7 +378,7 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
378
378
|
] })
|
|
379
379
|
]
|
|
380
380
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ C(g, {
|
|
382
382
|
style: {
|
|
383
383
|
padding: "var(--space-formGap) var(--space-pagePadding)",
|
|
384
384
|
borderTop: "1px solid var(--color-border)",
|
|
@@ -387,37 +387,37 @@ var w = t(function({ isOpen: t, isCreating: w = !1, onClose: T, onCreate: E, sho
|
|
|
387
387
|
justifyContent: "flex-end",
|
|
388
388
|
gap: "var(--space-controlGap)"
|
|
389
389
|
},
|
|
390
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ S(f, {
|
|
391
391
|
type: "button",
|
|
392
392
|
variant: "outline",
|
|
393
393
|
onClick: T,
|
|
394
394
|
disabled: w,
|
|
395
395
|
style: { height: "var(--size-controlHeight-md)" },
|
|
396
396
|
children: "Cancel"
|
|
397
|
-
}), /* @__PURE__ */
|
|
397
|
+
}), /* @__PURE__ */ S(f, {
|
|
398
398
|
type: "submit",
|
|
399
399
|
disabled: w || !A.trim(),
|
|
400
400
|
style: {
|
|
401
401
|
height: "var(--size-controlHeight-md)",
|
|
402
402
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
403
403
|
},
|
|
404
|
-
children: w ? /* @__PURE__ */
|
|
404
|
+
children: w ? /* @__PURE__ */ C("span", {
|
|
405
405
|
style: {
|
|
406
406
|
display: "flex",
|
|
407
407
|
alignItems: "center",
|
|
408
408
|
gap: "var(--space-iconGap)"
|
|
409
409
|
},
|
|
410
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ S(b, { style: {
|
|
411
411
|
height: "var(--size-icon-sm)",
|
|
412
412
|
width: "var(--size-icon-sm)"
|
|
413
413
|
} }), "Creating..."]
|
|
414
|
-
}) : /* @__PURE__ */
|
|
414
|
+
}) : /* @__PURE__ */ C("span", {
|
|
415
415
|
style: {
|
|
416
416
|
display: "flex",
|
|
417
417
|
alignItems: "center",
|
|
418
418
|
gap: "var(--space-iconGap)"
|
|
419
419
|
},
|
|
420
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ S(c, { style: {
|
|
421
421
|
height: "var(--size-icon-sm)",
|
|
422
422
|
width: "var(--size-icon-sm)"
|
|
423
423
|
} }), "Create Dashboard"]
|
|
@@ -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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"}
|