@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.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/README.md +19 -0
- package/dist/bigconsole/BigConsoleRoot.js +88 -82
- package/dist/bigconsole/BigConsoleRoutes.js +163 -136
- package/dist/bigconsole/assistant/assistantProduct.js +1 -4
- package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
- package/dist/bigconsole/assistant/pageContext.js +1 -6
- package/dist/bigconsole/assistant/recordAdapters.js +26 -27
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/index.d.ts +0 -1
- package/dist/bigconsole/components/common/index.js +0 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
- package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
- package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
- package/dist/bigconsole/context/BigConsoleContext.js +47 -30
- package/dist/bigconsole/context/index.d.ts +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
- package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
- package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
- package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
- package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
- package/dist/bigconsole/hooks/useDrilldown.js +68 -67
- package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
- package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
- package/dist/bigconsole/pages/DashboardsPage.js +221 -269
- package/dist/bigconsole/pages/DataParsersPage.js +157 -180
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
- package/dist/bigconsole/pages/DataSinksPage.js +216 -251
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +265 -279
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +88 -107
- package/dist/bigconsole/pages/SettingsPage.js +173 -179
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
- package/dist/bigconsole/store/widgetStore.d.ts +0 -12
- package/dist/bigconsole/store/widgetStore.js +1 -3
- package/dist/bigconsole/types/index.d.ts +17 -2
- package/dist/bigconsole/utils/backendError.d.ts +0 -18
- package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
- package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
- package/dist/bigconsole/utils/index.d.ts +2 -0
- package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
- package/dist/bigconsole/utils/safeUrl.js +93 -0
- package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
- package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
- package/dist/bigconsole/workflowOpen.js +14 -15
- package/dist/generated/wspace-operations.d.ts +138 -8
- package/dist/generated/wspace-operations.js +281 -240
- package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
- package/package.json +9 -5
- package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
- package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
- package/dist/bigconsole/assistant/pageControls.js +0 -169
- package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
- package/dist/bigconsole/assistant/previewControl.js +0 -10
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
- package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
- package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
- package/dist/bigconsole/components/common/SortBySelect.js +0 -29
- package/dist/bigconsole/constants/backendErrors.js +0 -94
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
- package/dist/bigconsole/utils/backendError.js +0 -42
- package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
- package/dist/bigconsole/utils/dashboardList.js +0 -15
- package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
- package/dist/bigconsole/utils/dataSinkList.js +0 -15
- package/dist/bigconsole/utils/formDirty.d.ts +0 -82
- package/dist/bigconsole/utils/formDirty.js +0 -21
- package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
- package/dist/bigconsole/utils/insightsDraft.js +0 -8
- package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
- package/dist/bigconsole/utils/layoutBaseline.js +0 -96
- package/dist/bigconsole/utils/listSort.d.ts +0 -80
- package/dist/bigconsole/utils/listSort.js +0 -85
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
- package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
|
@@ -11,14 +11,14 @@ import { PermissionButton as s } from "@burdenoff/fe-libs/shared/components";
|
|
|
11
11
|
import { usePermissions as c } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
12
|
import { Clipboard as l, Download as u, Eye as d, FileText as f, Image as p, Minus as m, PanelLeft as h, PanelLeftClose as g, Pencil as _, Plus as v, RotateCcw as y, Save as b, Share2 as x, Store as S } from "lucide-react";
|
|
13
13
|
import { Button as C, Spinner as w, Tooltip as T, TooltipContent as E, TooltipProvider as D, TooltipTrigger as O } from "@burdenoff/fe-libs/ui";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
15
|
+
import { useI18n as M } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
16
|
//#region src/bigconsole/components/dashboard/DashboardToolbar.tsx
|
|
17
17
|
var N = a(function({ dashboardId: a, title: N, onAddWidget: P, onTogglePalette: F, isPaletteOpen: I = !1, onPaste: L, onSave: R, isSaving: z = !1, onExport: B, onPublishTemplate: V, onExportImage: H, onExportPdf: U, isExportingImage: W = !1, onShare: G }) {
|
|
18
|
-
let { hasPermission: K } = c(), { t: q } =
|
|
18
|
+
let { hasPermission: K } = c(), { t: q } = M(), J = t((e) => e.viewMode === "edit"), Y = t((e) => e.toggleViewMode), X = t((e) => e.zoomLevel), Z = t((e) => e.setZoomLevel), Q = !!e((e) => e.clipboardWidgetId), $ = o(() => {
|
|
19
19
|
Q && L && L();
|
|
20
20
|
}, [Q, L]);
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ A(D, { children: /* @__PURE__ */ j(n, {
|
|
22
22
|
emphasis: "bare",
|
|
23
23
|
padding: "none",
|
|
24
24
|
"aria-label": N ? `Board toolbar — ${N}` : "Board toolbar",
|
|
@@ -26,156 +26,156 @@ var N = a(function({ dashboardId: a, title: N, onAddWidget: P, onTogglePalette:
|
|
|
26
26
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-4 py-2",
|
|
27
27
|
bodyClassName: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ A("div", {
|
|
30
30
|
className: "flex min-w-0 items-center gap-4",
|
|
31
|
-
children: a && /* @__PURE__ */
|
|
31
|
+
children: a && /* @__PURE__ */ A(i, { dashboardId: a })
|
|
32
32
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ j("div", {
|
|
34
34
|
role: "group",
|
|
35
35
|
"aria-label": "Zoom",
|
|
36
36
|
className: "flex min-w-0 items-center gap-1 border-l border-[var(--color-border-subtle)] pl-4",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
39
39
|
asChild: !0,
|
|
40
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ A(C, {
|
|
41
41
|
variant: "ghost",
|
|
42
42
|
size: "icon-sm",
|
|
43
43
|
onClick: () => Z(Math.max(50, X - 10)),
|
|
44
44
|
disabled: X <= 50,
|
|
45
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ A(m, { className: "size-4" })
|
|
46
46
|
})
|
|
47
|
-
}), /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.zoomOut", "Zoom out") })] }),
|
|
48
|
+
/* @__PURE__ */ j("span", {
|
|
49
49
|
className: "text-sm text-text-secondary w-12 text-center",
|
|
50
50
|
children: [X, "%"]
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
53
53
|
asChild: !0,
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ A(C, {
|
|
55
55
|
variant: "ghost",
|
|
56
56
|
size: "icon-sm",
|
|
57
57
|
onClick: () => Z(Math.min(200, X + 10)),
|
|
58
58
|
disabled: X >= 200,
|
|
59
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ A(v, { className: "size-4" })
|
|
60
60
|
})
|
|
61
|
-
}), /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.zoomIn", "Zoom in") })] }),
|
|
62
|
+
/* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
63
63
|
asChild: !0,
|
|
64
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ j(C, {
|
|
65
65
|
variant: "ghost",
|
|
66
66
|
size: "sm",
|
|
67
67
|
onClick: () => Z(100),
|
|
68
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ A(y, { className: "size-3.5 mr-1" }), q("bigconsole.dashboards.toolbar.reset", "Reset")]
|
|
69
69
|
})
|
|
70
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.resetZoomTooltip", "Reset zoom to 100%") })] })
|
|
71
71
|
]
|
|
72
72
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ j("div", {
|
|
74
74
|
role: "group",
|
|
75
75
|
"aria-label": "Board actions",
|
|
76
76
|
className: "flex min-w-0 flex-wrap items-center justify-end gap-2 border-l border-[var(--color-border-subtle)] pl-4",
|
|
77
77
|
children: [
|
|
78
|
-
J && /* @__PURE__ */
|
|
79
|
-
F && /* @__PURE__ */
|
|
78
|
+
J && /* @__PURE__ */ j(k, { children: [
|
|
79
|
+
F && /* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
80
80
|
asChild: !0,
|
|
81
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ j(C, {
|
|
82
82
|
variant: I ? "secondary" : "outline",
|
|
83
83
|
size: "sm",
|
|
84
84
|
onClick: F,
|
|
85
|
-
children: [
|
|
85
|
+
children: [A(I ? g : h, { className: "size-4" }), q("bigconsole.dashboards.toolbar.widgets", "Widgets")]
|
|
86
86
|
})
|
|
87
|
-
}), /* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ A(E, { children: I ? q("bigconsole.dashboards.toolbar.hidePalette", "Hide widget palette") : q("bigconsole.dashboards.toolbar.showPalette", "Show widget palette for drag & drop") })] }),
|
|
88
|
+
/* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
89
89
|
asChild: !0,
|
|
90
|
-
children: /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ j(C, {
|
|
91
91
|
variant: "ghost",
|
|
92
92
|
size: "sm",
|
|
93
93
|
onClick: $,
|
|
94
94
|
disabled: !Q,
|
|
95
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ A(l, { className: "size-4" }), q("bigconsole.dashboards.toolbar.paste", "Paste")]
|
|
96
96
|
})
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.pasteTooltip", "Paste widget from clipboard") })] }),
|
|
98
|
+
/* @__PURE__ */ A(s, {
|
|
99
99
|
permission: r.WIDGET_CREATE,
|
|
100
100
|
deniedBehavior: "hide",
|
|
101
|
-
children: /* @__PURE__ */
|
|
101
|
+
children: /* @__PURE__ */ j(C, {
|
|
102
102
|
size: "sm",
|
|
103
103
|
onClick: P,
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ A(v, { className: "size-4" }), q("bigconsole.dashboards.toolbar.addWidget", "Add Widget")]
|
|
105
105
|
})
|
|
106
106
|
})
|
|
107
107
|
] }),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ A(C, {
|
|
109
109
|
variant: J ? "secondary" : "outline",
|
|
110
110
|
size: "sm",
|
|
111
111
|
onClick: Y,
|
|
112
|
-
children: J ? /* @__PURE__ */
|
|
112
|
+
children: J ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(d, { className: "size-4" }), q("bigconsole.dashboards.toolbar.preview", "Preview")] }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(_, { className: "size-4" }), q("bigconsole.dashboards.toolbar.edit", "Edit")] })
|
|
113
113
|
}),
|
|
114
|
-
R && /* @__PURE__ */
|
|
114
|
+
R && /* @__PURE__ */ A(C, {
|
|
115
115
|
variant: "outline",
|
|
116
116
|
size: "sm",
|
|
117
117
|
onClick: R,
|
|
118
118
|
disabled: z,
|
|
119
|
-
children: z ? /* @__PURE__ */
|
|
119
|
+
children: z ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(w, { className: "size-4" }), q("bigconsole.dashboards.toolbar.saving", "Saving...")] }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(b, { className: "size-4" }), q("bigconsole.dashboards.toolbar.save", "Save")] })
|
|
120
120
|
}),
|
|
121
|
-
G && /* @__PURE__ */
|
|
121
|
+
G && /* @__PURE__ */ A(s, {
|
|
122
122
|
permission: r.DASHBOARD_SHARE,
|
|
123
123
|
deniedBehavior: "hide",
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
125
125
|
asChild: !0,
|
|
126
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ j(C, {
|
|
127
127
|
variant: "outline",
|
|
128
128
|
size: "sm",
|
|
129
129
|
onClick: G,
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ A(x, { className: "size-4" }), q("bigconsole.dashboards.toolbar.share", "Share")]
|
|
131
131
|
})
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.shareTooltip", "Share dashboard with others") })] })
|
|
133
133
|
}),
|
|
134
|
-
V && /* @__PURE__ */
|
|
134
|
+
V && /* @__PURE__ */ A(s, {
|
|
135
135
|
permission: r.DASHBOARD_PUBLISH,
|
|
136
136
|
deniedBehavior: "hide",
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
138
138
|
asChild: !0,
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ j(C, {
|
|
140
140
|
variant: "outline",
|
|
141
141
|
size: "sm",
|
|
142
142
|
onClick: V,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ A(S, { className: "size-4" }), /* @__PURE__ */ A("span", {
|
|
144
144
|
className: "hidden sm:inline",
|
|
145
145
|
children: q("bigconsole.dashboards.toolbar.publish", "Publish")
|
|
146
146
|
})]
|
|
147
147
|
})
|
|
148
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.publishTooltip", "Publish this dashboard as a reusable template") })] })
|
|
149
149
|
}),
|
|
150
|
-
B && /* @__PURE__ */
|
|
150
|
+
B && /* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
151
151
|
asChild: !0,
|
|
152
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ j(C, {
|
|
153
153
|
variant: "outline",
|
|
154
154
|
size: "sm",
|
|
155
155
|
onClick: B,
|
|
156
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ A(u, { className: "size-4" }), q("bigconsole.dashboards.toolbar.export", "Export")]
|
|
157
157
|
})
|
|
158
|
-
}), /* @__PURE__ */
|
|
159
|
-
H && /* @__PURE__ */
|
|
158
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.exportTooltip", "Export dashboard to JSON") })] }),
|
|
159
|
+
H && /* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
160
160
|
asChild: !0,
|
|
161
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ A(C, {
|
|
162
162
|
variant: "outline",
|
|
163
163
|
size: "icon-sm",
|
|
164
164
|
onClick: H,
|
|
165
165
|
disabled: W,
|
|
166
|
-
children:
|
|
166
|
+
children: A(W ? w : p, { className: "size-4" })
|
|
167
167
|
})
|
|
168
|
-
}), /* @__PURE__ */
|
|
169
|
-
U && /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.exportPngTooltip", "Export board as PNG image") })] }),
|
|
169
|
+
U && /* @__PURE__ */ j(T, { children: [/* @__PURE__ */ A(O, {
|
|
170
170
|
asChild: !0,
|
|
171
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ A(C, {
|
|
172
172
|
variant: "outline",
|
|
173
173
|
size: "icon-sm",
|
|
174
174
|
onClick: U,
|
|
175
175
|
disabled: W,
|
|
176
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ A(f, { className: "size-4" })
|
|
177
177
|
})
|
|
178
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ A(E, { children: q("bigconsole.dashboards.toolbar.exportPdfTooltip", "Export board as PDF") })] })
|
|
179
179
|
]
|
|
180
180
|
})
|
|
181
181
|
]
|
|
@@ -4,75 +4,76 @@ import { useBigConsoleNavigate as t } from "../../context/BigConsoleContext.js";
|
|
|
4
4
|
import "../../context/index.js";
|
|
5
5
|
import { SECTION_FOCUS_RING as n } from "../common/sectionStyles.js";
|
|
6
6
|
import "../common/index.js";
|
|
7
|
-
import r from "../../
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { appendPathSegment as r } from "../../utils/safeUrl.js";
|
|
8
|
+
import i from "../../hooks/useFilterUrlSync.js";
|
|
9
|
+
import { memo as a, useCallback as o, useEffect as s, useState as c } from "react";
|
|
10
|
+
import { ArrowLeft as l, ChevronRight as u, Home as d } from "lucide-react";
|
|
11
11
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
|
+
import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
13
|
//#region src/bigconsole/components/dashboard/DrilldownBreadcrumb.tsx
|
|
13
|
-
var
|
|
14
|
-
let { t:
|
|
15
|
-
|
|
16
|
-
if (!
|
|
17
|
-
|
|
14
|
+
var g = a(function({ className: a = "", currentDashboardId: g, currentDashboardName: _, showHome: v = !0, basePath: y = "/bigconsole/dashboards" }) {
|
|
15
|
+
let { t: b } = h(), x = t(), { getDrilldownMetadata: S, isInDrilldown: C, drilldownDepth: w } = i(), T = e((e) => e.dashboards), [E, D] = c([]);
|
|
16
|
+
s(() => {
|
|
17
|
+
if (!C) {
|
|
18
|
+
D([]);
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
let { path: e } =
|
|
21
|
+
let { path: e } = S();
|
|
21
22
|
if (e.length === 0) {
|
|
22
|
-
|
|
23
|
+
D([]);
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
D(e.map((e) => ({
|
|
26
27
|
id: e,
|
|
27
|
-
name:
|
|
28
|
-
href:
|
|
28
|
+
name: T.get(e)?.name || b("bigconsole.dashboards.drilldownBreadcrumb.fallbackName", "Dashboard {{id}}...", { id: e.slice(0, 8) }),
|
|
29
|
+
href: r(y, e) ?? y
|
|
29
30
|
})));
|
|
30
31
|
}, [
|
|
32
|
+
C,
|
|
31
33
|
S,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
y
|
|
34
|
+
T,
|
|
35
|
+
y,
|
|
36
|
+
b
|
|
36
37
|
]);
|
|
37
|
-
let
|
|
38
|
-
let n =
|
|
39
|
-
i.searchParams.set("drilldown_depth", String(r)), n.length > 0 && i.searchParams.set("drilldown_path", encodeURIComponent(JSON.stringify(n))), t > 0 && n.length > 0 && i.searchParams.set("drilldown_parent", n[n.length - 1]),
|
|
40
|
-
}, [
|
|
38
|
+
let O = o((e, t) => {
|
|
39
|
+
let n = S().path.slice(0, t), r = t, i = new URL(e.href, window.location.origin);
|
|
40
|
+
i.searchParams.set("drilldown_depth", String(r)), n.length > 0 && i.searchParams.set("drilldown_path", encodeURIComponent(JSON.stringify(n))), t > 0 && n.length > 0 && i.searchParams.set("drilldown_parent", n[n.length - 1]), x(i.pathname + i.search);
|
|
41
|
+
}, [S, x]), k = o(() => {
|
|
41
42
|
let e = window.history.state?.idx;
|
|
42
43
|
if (typeof e == "number" && e > 0) {
|
|
43
44
|
window.history.back();
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
let t =
|
|
47
|
+
let t = S();
|
|
47
48
|
if (t.parent) {
|
|
48
|
-
let e = t.path.slice(0, -1), n = t.depth - 1,
|
|
49
|
-
|
|
50
|
-
} else if (
|
|
51
|
-
let e =
|
|
52
|
-
|
|
49
|
+
let e = t.path.slice(0, -1), n = t.depth - 1, i = new URL(r(y, t.parent) ?? y, window.location.origin);
|
|
50
|
+
i.searchParams.set("drilldown_depth", String(n)), e.length > 0 && (i.searchParams.set("drilldown_path", encodeURIComponent(JSON.stringify(e))), i.searchParams.set("drilldown_parent", e[e.length - 1])), x(i.pathname + i.search);
|
|
51
|
+
} else if (E.length > 0) {
|
|
52
|
+
let e = E[E.length - 1];
|
|
53
|
+
O(e, E.length - 1);
|
|
53
54
|
}
|
|
54
55
|
}, [
|
|
56
|
+
S,
|
|
57
|
+
y,
|
|
55
58
|
x,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className: `flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-b border-[var(--color-border-subtle)] bg-bg-sunken px-4 py-1.5 ${i}`,
|
|
65
|
-
"aria-label": y("bigconsole.dashboards.drilldownBreadcrumb.ariaLabel", "Drilldown breadcrumb"),
|
|
59
|
+
E,
|
|
60
|
+
O
|
|
61
|
+
]), A = o((e) => {
|
|
62
|
+
e.preventDefault(), x(y);
|
|
63
|
+
}, [x, y]);
|
|
64
|
+
return C ? /* @__PURE__ */ m("nav", {
|
|
65
|
+
className: `flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-b border-[var(--color-border-subtle)] bg-bg-sunken px-4 py-1.5 ${a}`,
|
|
66
|
+
"aria-label": b("bigconsole.dashboards.drilldownBreadcrumb.ariaLabel", "Drilldown breadcrumb"),
|
|
66
67
|
"data-testid": "drilldown-breadcrumb",
|
|
67
68
|
children: [
|
|
68
69
|
/* @__PURE__ */ m("button", {
|
|
69
70
|
type: "button",
|
|
70
|
-
onClick:
|
|
71
|
+
onClick: k,
|
|
71
72
|
className: `flex min-h-control-sm items-center gap-1 rounded-button px-2 py-1 text-sm font-medium text-text-link motion-safe:transition-colors hover:bg-bg-accentSubtle ${n}`,
|
|
72
|
-
"aria-label":
|
|
73
|
-
children: [/* @__PURE__ */ p(
|
|
73
|
+
"aria-label": b("bigconsole.dashboards.drilldownBreadcrumb.back", "Go back"),
|
|
74
|
+
children: [/* @__PURE__ */ p(l, { className: "w-4 h-4" }), /* @__PURE__ */ p("span", {
|
|
74
75
|
className: "hidden sm:inline",
|
|
75
|
-
children:
|
|
76
|
+
children: b("bigconsole.dashboards.drilldownBreadcrumb.backLabel", "Back")
|
|
76
77
|
})]
|
|
77
78
|
}),
|
|
78
79
|
/* @__PURE__ */ p("span", {
|
|
@@ -80,44 +81,44 @@ var h = i(function({ className: i = "", currentDashboardId: h, currentDashboardN
|
|
|
80
81
|
"aria-hidden": "true",
|
|
81
82
|
children: "|"
|
|
82
83
|
}),
|
|
83
|
-
|
|
84
|
-
href:
|
|
85
|
-
onClick:
|
|
84
|
+
v && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("a", {
|
|
85
|
+
href: y,
|
|
86
|
+
onClick: A,
|
|
86
87
|
className: "flex min-h-control-sm items-center gap-1 rounded-button px-1 text-sm text-text-secondary motion-safe:transition-colors hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
87
|
-
"aria-label":
|
|
88
|
-
children: [/* @__PURE__ */ p(
|
|
88
|
+
"aria-label": b("bigconsole.dashboards.drilldownBreadcrumb.home", "Home"),
|
|
89
|
+
children: [/* @__PURE__ */ p(d, { className: "w-4 h-4" }), /* @__PURE__ */ p("span", {
|
|
89
90
|
className: "hidden sm:inline",
|
|
90
|
-
children:
|
|
91
|
+
children: b("bigconsole.dashboards.drilldownBreadcrumb.dashboards", "Dashboards")
|
|
91
92
|
})]
|
|
92
|
-
}), /* @__PURE__ */ p(
|
|
93
|
+
}), /* @__PURE__ */ p(u, {
|
|
93
94
|
className: "w-4 h-4 shrink-0 text-text-muted",
|
|
94
95
|
"aria-hidden": "true"
|
|
95
96
|
})] }),
|
|
96
|
-
|
|
97
|
+
E.map((e, t) => /* @__PURE__ */ m("div", {
|
|
97
98
|
className: "flex min-w-0 items-center gap-2",
|
|
98
99
|
children: [/* @__PURE__ */ p("button", {
|
|
99
100
|
type: "button",
|
|
100
|
-
onClick: () =>
|
|
101
|
+
onClick: () => O(e, t),
|
|
101
102
|
className: `min-h-control-sm max-w-[150px] truncate rounded-button px-1 text-sm text-text-secondary motion-safe:transition-colors hover:text-text-primary hover:underline ${n}`,
|
|
102
103
|
title: e.name,
|
|
103
104
|
children: e.name
|
|
104
|
-
}), /* @__PURE__ */ p(
|
|
105
|
+
}), /* @__PURE__ */ p(u, {
|
|
105
106
|
className: "w-4 h-4 shrink-0 text-text-muted",
|
|
106
107
|
"aria-hidden": "true"
|
|
107
108
|
})]
|
|
108
109
|
}, e.id)),
|
|
109
|
-
|
|
110
|
+
_ && /* @__PURE__ */ p("span", {
|
|
110
111
|
"aria-current": "page",
|
|
111
112
|
className: "max-w-[200px] truncate text-sm font-medium text-text-primary",
|
|
112
|
-
title:
|
|
113
|
-
children:
|
|
113
|
+
title: _,
|
|
114
|
+
children: _
|
|
114
115
|
}),
|
|
115
116
|
/* @__PURE__ */ p("span", {
|
|
116
117
|
className: "ml-auto shrink-0 rounded-pill bg-bg-surface px-2 py-0.5 text-xs text-text-muted",
|
|
117
|
-
children:
|
|
118
|
+
children: b("bigconsole.dashboards.drilldownBreadcrumb.level", "Level {{depth}}", { depth: w ?? "" })
|
|
118
119
|
})
|
|
119
120
|
]
|
|
120
121
|
}) : null;
|
|
121
122
|
});
|
|
122
123
|
//#endregion
|
|
123
|
-
export {
|
|
124
|
+
export { g as default };
|