@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.5
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 +149 -140
- package/dist/bigconsole/assistant/assistantProduct.js +4 -1
- package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
- package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
- package/dist/bigconsole/assistant/pageContext.js +6 -1
- package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
- package/dist/bigconsole/assistant/pageControls.js +169 -0
- package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
- package/dist/bigconsole/assistant/previewControl.js +10 -0
- package/dist/bigconsole/assistant/recordAdapters.js +27 -26
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
- package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +9 -9
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
- package/dist/bigconsole/components/common/SortBySelect.js +29 -0
- package/dist/bigconsole/components/common/index.d.ts +1 -0
- package/dist/bigconsole/components/common/index.js +1 -0
- 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 +15 -15
- 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 +153 -153
- 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 +134 -134
- 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 +46 -46
- 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 +51 -50
- 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 +77 -76
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
- 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 +507 -499
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +14 -14
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +68 -67
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
- package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
- 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/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/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/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/constants/backendErrors.js +94 -0
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
- package/dist/bigconsole/hooks/useDrilldown.js +3 -3
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
- package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
- package/dist/bigconsole/pages/DashboardsPage.js +269 -221
- package/dist/bigconsole/pages/DataParsersPage.js +180 -157
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
- package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +335 -299
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +279 -265
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +107 -88
- package/dist/bigconsole/pages/SettingsPage.js +179 -173
- 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 +34 -34
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/store/widgetStore.d.ts +12 -0
- package/dist/bigconsole/store/widgetStore.js +3 -1
- package/dist/bigconsole/utils/backendError.d.ts +18 -0
- package/dist/bigconsole/utils/backendError.js +42 -0
- package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
- package/dist/bigconsole/utils/dashboardList.js +15 -0
- package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
- package/dist/bigconsole/utils/dataSinkList.js +15 -0
- package/dist/bigconsole/utils/formDirty.d.ts +82 -0
- package/dist/bigconsole/utils/formDirty.js +21 -0
- package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
- package/dist/bigconsole/utils/insightsDraft.js +8 -0
- package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
- package/dist/bigconsole/utils/layoutBaseline.js +96 -0
- package/dist/bigconsole/utils/listSort.d.ts +80 -0
- package/dist/bigconsole/utils/listSort.js +85 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
- package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
- package/dist/bigconsole/workflowOpen.js +15 -14
- package/package.json +3 -3
|
@@ -3,32 +3,32 @@ import "../common/index.js";
|
|
|
3
3
|
import t from "./StoreTemplatePicker.js";
|
|
4
4
|
import { TemplateInstallOptions as n } from "./TemplateInstallOptions.js";
|
|
5
5
|
import { TemplateLayoutPreview as r } from "./TemplateLayoutPreview.js";
|
|
6
|
-
import { templateInputDefaults as
|
|
7
|
-
import
|
|
8
|
-
import { memo as
|
|
9
|
-
import { Copy as
|
|
10
|
-
import { Badge as
|
|
11
|
-
import { Fragment as pe, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
|
+
import { templateInputDefaults as ee, templateInputError as te } from "../../utils/templateInstallInputs.js";
|
|
7
|
+
import ne from "../../hooks/useStoreDashboardTemplates.js";
|
|
8
|
+
import { memo as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
9
|
+
import { Copy as re, LayoutDashboard as ie, Plus as l, Tag as ae, X as oe } from "lucide-react";
|
|
10
|
+
import { Badge as se, Button as u, Dialog as ce, DialogContent as le, DialogDescription as ue, DialogFooter as de, DialogHeader as fe, DialogTitle as d, Input as f, Spinner as p, Textarea as pe } from "@burdenoff/fe-libs/ui";
|
|
12
11
|
import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
13
|
import { useActiveContext as he } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextProvider";
|
|
14
14
|
//#region src/bigconsole/components/dashboard/CreateDashboardDialog.tsx
|
|
15
|
-
var _ =
|
|
16
|
-
let { t: S } = me(), { templates: ge, loading: _e, error: C, fetchTemplateContent: w, installTemplate: T } =
|
|
15
|
+
var _ = i(function({ isOpen: i, isCreating: _ = !1, onClose: v, onCreate: y, showTemplates: b = !0, onTemplateInstalled: x }) {
|
|
16
|
+
let { t: S } = me(), { templates: ge, loading: _e, error: C, fetchTemplateContent: w, installTemplate: T } = ne({ autoLoad: b }), [E, D] = c(!1), { workspaceId: O } = he(), k = s(O);
|
|
17
17
|
k.current = O;
|
|
18
|
-
let [ve, A] =
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
let [ve, A] = c(null), [ye, be] = c(null), [j, M] = c(!1), [N, P] = c({}), [F, I] = c({}), [L, R] = c("blank"), [z, B] = c(""), [V, H] = c(""), [U, W] = c([]), [G, K] = c(""), [q, J] = c(null), [Y, X] = c(null), Z = s(null), Q = ye === `${q?.id}:${O}` ? ve : null;
|
|
19
|
+
o(() => {
|
|
20
|
+
i && (R("blank"), B(""), H(""), W([]), K(""), J(null), X(null), setTimeout(() => {
|
|
21
21
|
Z.current?.focus();
|
|
22
22
|
}, 100));
|
|
23
|
-
}, [
|
|
24
|
-
let $ =
|
|
23
|
+
}, [i]);
|
|
24
|
+
let $ = a(() => {
|
|
25
25
|
let e = G.trim().toLowerCase();
|
|
26
26
|
e && !U.includes(e) && U.length < 10 && (W((t) => [...t, e]), K(""));
|
|
27
27
|
}, [G, U]);
|
|
28
|
-
|
|
28
|
+
o(() => {
|
|
29
29
|
let e = !1;
|
|
30
|
-
if (A(null), P({}), I({}), M(!!q), !(!q || !
|
|
31
|
-
e || (A(t), be(`${q.id}:${O}`), M(!1), I(t ?
|
|
30
|
+
if (A(null), P({}), I({}), M(!!q), !(!q || !i)) return w(q.id).then((t) => {
|
|
31
|
+
e || (A(t), be(`${q.id}:${O}`), M(!1), I(t ? ee(t.requiredInputs) : {}), t || X(S("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed.")));
|
|
32
32
|
}), () => {
|
|
33
33
|
e = !0;
|
|
34
34
|
};
|
|
@@ -36,20 +36,20 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
36
36
|
q,
|
|
37
37
|
w,
|
|
38
38
|
O,
|
|
39
|
-
|
|
39
|
+
i,
|
|
40
40
|
S
|
|
41
41
|
]);
|
|
42
|
-
let xe =
|
|
42
|
+
let xe = a((e) => {
|
|
43
43
|
W((t) => t.filter((t) => t !== e));
|
|
44
|
-
}, []), Se =
|
|
44
|
+
}, []), Se = a((e) => {
|
|
45
45
|
e.key === "Enter" ? (e.preventDefault(), $()) : e.key === "Backspace" && !G && U.length > 0 && W((e) => e.slice(0, -1));
|
|
46
46
|
}, [
|
|
47
47
|
$,
|
|
48
48
|
G,
|
|
49
49
|
U.length
|
|
50
|
-
]), Ce =
|
|
50
|
+
]), Ce = a((e) => {
|
|
51
51
|
J(e), X(null), B(e.name), H(e.description || "");
|
|
52
|
-
}, []), we =
|
|
52
|
+
}, []), we = a(async (e) => {
|
|
53
53
|
if (e.preventDefault(), L === "template" && !q) {
|
|
54
54
|
X(S("bigconsole.dashboards.createDialog.error.selectTemplate", "Please select a template"));
|
|
55
55
|
return;
|
|
@@ -79,7 +79,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
79
79
|
X(S("bigconsole.dashboards.createDialog.error.noDefinition", "This template has no dashboard definition attached and cannot be installed."));
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
let n =
|
|
82
|
+
let n = te(e.requiredInputs, F, S);
|
|
83
83
|
if (n) {
|
|
84
84
|
X(n);
|
|
85
85
|
return;
|
|
@@ -138,10 +138,10 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
138
138
|
x,
|
|
139
139
|
S
|
|
140
140
|
]);
|
|
141
|
-
return /* @__PURE__ */ h(
|
|
142
|
-
open:
|
|
141
|
+
return /* @__PURE__ */ h(ce, {
|
|
142
|
+
open: i,
|
|
143
143
|
onOpenChange: (e) => !e && !_ && !E && v(),
|
|
144
|
-
children: /* @__PURE__ */ g(
|
|
144
|
+
children: /* @__PURE__ */ g(le, {
|
|
145
145
|
style: {
|
|
146
146
|
maxWidth: L === "template" ? "900px" : "480px",
|
|
147
147
|
width: "calc(100vw - 2 * var(--space-pagePadding))",
|
|
@@ -151,7 +151,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
151
151
|
overflow: "hidden",
|
|
152
152
|
padding: 0
|
|
153
153
|
},
|
|
154
|
-
children: [/* @__PURE__ */ h(
|
|
154
|
+
children: [/* @__PURE__ */ h(fe, {
|
|
155
155
|
style: {
|
|
156
156
|
padding: "var(--space-pagePadding) var(--space-pagePadding) 0",
|
|
157
157
|
flexShrink: 0
|
|
@@ -173,7 +173,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
173
173
|
borderRadius: "var(--radius-card)",
|
|
174
174
|
backgroundColor: "var(--color-bg-accentSubtle)"
|
|
175
175
|
},
|
|
176
|
-
children: /* @__PURE__ */ h(
|
|
176
|
+
children: /* @__PURE__ */ h(ie, {
|
|
177
177
|
"aria-hidden": "true",
|
|
178
178
|
style: {
|
|
179
179
|
height: "var(--size-icon-lg)",
|
|
@@ -181,7 +181,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
181
181
|
color: "var(--color-action-primary-bg)"
|
|
182
182
|
}
|
|
183
183
|
})
|
|
184
|
-
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(
|
|
184
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(d, {
|
|
185
185
|
style: {
|
|
186
186
|
fontSize: "var(--font-size-heading-h4)",
|
|
187
187
|
fontWeight: "var(--font-weight-bold)",
|
|
@@ -189,7 +189,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
189
189
|
margin: 0
|
|
190
190
|
},
|
|
191
191
|
children: S("bigconsole.dashboards.createDialog.title", "Create New Dashboard")
|
|
192
|
-
}), /* @__PURE__ */ h(
|
|
192
|
+
}), /* @__PURE__ */ h(ue, {
|
|
193
193
|
style: {
|
|
194
194
|
fontSize: "var(--font-size-body-sm)",
|
|
195
195
|
color: "var(--color-text-secondary)",
|
|
@@ -249,7 +249,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
249
249
|
boxShadow: L === "blank" ? "var(--shadow-elevation-1)" : "none",
|
|
250
250
|
transition: "all 0.15s ease"
|
|
251
251
|
},
|
|
252
|
-
children: [/* @__PURE__ */ h(
|
|
252
|
+
children: [/* @__PURE__ */ h(l, { style: {
|
|
253
253
|
height: "var(--size-icon-sm)",
|
|
254
254
|
width: "var(--size-icon-sm)"
|
|
255
255
|
} }), S("bigconsole.dashboards.createDialog.tab.blank", "Blank Dashboard")]
|
|
@@ -274,7 +274,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
274
274
|
boxShadow: L === "template" ? "var(--shadow-elevation-1)" : "none",
|
|
275
275
|
transition: "all 0.15s ease"
|
|
276
276
|
},
|
|
277
|
-
children: [/* @__PURE__ */ h(
|
|
277
|
+
children: [/* @__PURE__ */ h(re, { style: {
|
|
278
278
|
height: "var(--size-icon-sm)",
|
|
279
279
|
width: "var(--size-icon-sm)"
|
|
280
280
|
} }), S("bigconsole.dashboards.createDialog.tab.template", "From Template")]
|
|
@@ -297,7 +297,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
297
297
|
}),
|
|
298
298
|
L === "template" && q && /* @__PURE__ */ g("div", {
|
|
299
299
|
style: { padding: "var(--space-pagePadding)" },
|
|
300
|
-
children: [j && /* @__PURE__ */ h(
|
|
300
|
+
children: [j && /* @__PURE__ */ h(p, {}), Q && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, { content: Q }), /* @__PURE__ */ h(n, {
|
|
301
301
|
content: Q,
|
|
302
302
|
bindings: N,
|
|
303
303
|
onBindingChange: (e, t) => P((n) => ({
|
|
@@ -342,7 +342,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
342
342
|
children: "*"
|
|
343
343
|
})]
|
|
344
344
|
}),
|
|
345
|
-
/* @__PURE__ */ h(
|
|
345
|
+
/* @__PURE__ */ h(f, {
|
|
346
346
|
ref: Z,
|
|
347
347
|
id: "dashboard-name",
|
|
348
348
|
type: "text",
|
|
@@ -388,7 +388,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
388
388
|
},
|
|
389
389
|
children: S("bigconsole.dashboards.createDialog.field.optional", "(optional)")
|
|
390
390
|
})]
|
|
391
|
-
}), /* @__PURE__ */ h(
|
|
391
|
+
}), /* @__PURE__ */ h(pe, {
|
|
392
392
|
id: "dashboard-description",
|
|
393
393
|
value: V,
|
|
394
394
|
onChange: (e) => H(e.target.value),
|
|
@@ -414,7 +414,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
414
414
|
marginBottom: "var(--space-controlGap)"
|
|
415
415
|
},
|
|
416
416
|
children: [
|
|
417
|
-
/* @__PURE__ */ h(
|
|
417
|
+
/* @__PURE__ */ h(ae, { style: {
|
|
418
418
|
height: "var(--size-icon-sm)",
|
|
419
419
|
width: "var(--size-icon-sm)"
|
|
420
420
|
} }),
|
|
@@ -435,7 +435,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
435
435
|
gap: "var(--space-controlGap)",
|
|
436
436
|
marginBottom: "var(--space-controlGap)"
|
|
437
437
|
},
|
|
438
|
-
children: U.map((e) => /* @__PURE__ */ g(
|
|
438
|
+
children: U.map((e) => /* @__PURE__ */ g(se, {
|
|
439
439
|
variant: "secondary",
|
|
440
440
|
style: {
|
|
441
441
|
display: "flex",
|
|
@@ -461,7 +461,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
461
461
|
},
|
|
462
462
|
onMouseOver: (e) => e.currentTarget.style.opacity = "1",
|
|
463
463
|
onMouseOut: (e) => e.currentTarget.style.opacity = "0.7",
|
|
464
|
-
children: /* @__PURE__ */ h(
|
|
464
|
+
children: /* @__PURE__ */ h(oe, { style: {
|
|
465
465
|
height: "12px",
|
|
466
466
|
width: "12px"
|
|
467
467
|
} })
|
|
@@ -473,7 +473,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
473
473
|
display: "flex",
|
|
474
474
|
gap: "var(--space-controlGap)"
|
|
475
475
|
},
|
|
476
|
-
children: [/* @__PURE__ */ h(
|
|
476
|
+
children: [/* @__PURE__ */ h(f, {
|
|
477
477
|
id: "dashboard-tags",
|
|
478
478
|
type: "text",
|
|
479
479
|
value: G,
|
|
@@ -486,7 +486,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
486
486
|
height: "var(--size-controlHeight-md)",
|
|
487
487
|
fontSize: "var(--font-size-body-sm)"
|
|
488
488
|
}
|
|
489
|
-
}), /* @__PURE__ */ h(
|
|
489
|
+
}), /* @__PURE__ */ h(u, {
|
|
490
490
|
type: "button",
|
|
491
491
|
variant: "outline",
|
|
492
492
|
onClick: $,
|
|
@@ -508,7 +508,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
508
508
|
})
|
|
509
509
|
})
|
|
510
510
|
]
|
|
511
|
-
}), /* @__PURE__ */ g(
|
|
511
|
+
}), /* @__PURE__ */ g(de, {
|
|
512
512
|
style: {
|
|
513
513
|
padding: "var(--space-formGap) var(--space-pagePadding)",
|
|
514
514
|
borderTop: "1px solid var(--color-border)",
|
|
@@ -518,14 +518,14 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
518
518
|
justifyContent: "flex-end",
|
|
519
519
|
gap: "var(--space-controlGap)"
|
|
520
520
|
},
|
|
521
|
-
children: [/* @__PURE__ */ h(
|
|
521
|
+
children: [/* @__PURE__ */ h(u, {
|
|
522
522
|
type: "button",
|
|
523
523
|
variant: "outline",
|
|
524
524
|
onClick: v,
|
|
525
525
|
disabled: _ || E,
|
|
526
526
|
style: { height: "var(--size-controlHeight-md)" },
|
|
527
527
|
children: S("bigconsole.dashboards.createDialog.action.cancel", "Cancel")
|
|
528
|
-
}), /* @__PURE__ */ h(
|
|
528
|
+
}), /* @__PURE__ */ h(u, {
|
|
529
529
|
type: "submit",
|
|
530
530
|
disabled: _ || E || !z.trim() || L === "template" && (!q || !Q || j),
|
|
531
531
|
style: {
|
|
@@ -538,7 +538,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
538
538
|
alignItems: "center",
|
|
539
539
|
gap: "var(--space-iconGap)"
|
|
540
540
|
},
|
|
541
|
-
children: [/* @__PURE__ */ h(
|
|
541
|
+
children: [/* @__PURE__ */ h(p, { style: {
|
|
542
542
|
height: "var(--size-icon-sm)",
|
|
543
543
|
width: "var(--size-icon-sm)"
|
|
544
544
|
} }), S("bigconsole.dashboards.createDialog.action.creating", "Creating...")]
|
|
@@ -548,7 +548,7 @@ var _ = a(function({ isOpen: a, isCreating: _ = !1, onClose: v, onCreate: y, sho
|
|
|
548
548
|
alignItems: "center",
|
|
549
549
|
gap: "var(--space-iconGap)"
|
|
550
550
|
},
|
|
551
|
-
children: [/* @__PURE__ */ h(
|
|
551
|
+
children: [/* @__PURE__ */ h(l, { style: {
|
|
552
552
|
height: "var(--size-icon-sm)",
|
|
553
553
|
width: "var(--size-icon-sm)"
|
|
554
554
|
} }), S("bigconsole.dashboards.createDialog.action.create", "Create Dashboard")]
|
|
@@ -33,8 +33,8 @@ import { memo as p, useCallback as m, useEffect as de, useMemo as fe, useRef as
|
|
|
33
33
|
import { usePermissions as pe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
34
34
|
import { Plus as me } from "lucide-react";
|
|
35
35
|
import { Button as _ } from "@burdenoff/fe-libs/ui";
|
|
36
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
37
36
|
import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
37
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
38
38
|
//#region src/bigconsole/components/dashboard/DashboardCanvas.tsx
|
|
39
39
|
var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _e, isSaving: ve = !1, onExport: ye, onPublishTemplate: be, pages: S = [], activePageId: xe, onPageChange: Se, onPagesReorder: C, onPageAdd: Ce, onPageRename: we, onPageDuplicate: Te, onPageDelete: Ee, showFilters: De = !0, showPageTabs: Oe = !0, enableCrossFilter: ke = !0 }) {
|
|
40
40
|
let { t: w } = he(), T = h(null), E = h(null), [D, Ae] = g(1200), [je, O] = g(!1), [k, A] = g(null), [j, M] = g(!1), [Me, N] = g(null), [P, Ne] = g(null), F = t((e) => e.viewMode === "edit"), I = t((e) => e.currentDashboard), L = I?.pages.find((e) => e.id === b)?.gridColumns ?? 12, { updateDashboard: R } = c({ skipFetch: !0 }), { hasPermission: Pe } = pe(), Fe = Pe(u.DASHBOARD_UPDATE), Ie = P?.id === p ? P.value : I?.id === p ? I.visibility : void 0, Le = m(async (e) => {
|
|
@@ -62,7 +62,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
62
62
|
}, [K]), { createWidget: q } = s(b, p, { skipFetch: !0 }), J = e((e) => e.widgets), Y = fe(() => {
|
|
63
63
|
let e = Array.from(J.values());
|
|
64
64
|
return b ? e.filter((e) => e.pageId === b) : e;
|
|
65
|
-
}, [J, b]), He = e((e) => e.selectedWidgetId), X = e((e) => e.selectWidget),
|
|
65
|
+
}, [J, b]), He = e((e) => e.selectedWidgetId), X = e((e) => e.selectWidget), Ue = e((e) => e.addWidget), Z = e((e) => e.updateWidgetPosition), We = e((e) => e.configPanelOpen), Ge = e((e) => e.closeConfigPanel);
|
|
66
66
|
de(() => {
|
|
67
67
|
let e = T.current;
|
|
68
68
|
if (!e) return;
|
|
@@ -75,18 +75,18 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
75
75
|
}
|
|
76
76
|
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
77
77
|
}, []);
|
|
78
|
-
let
|
|
78
|
+
let Ke = m((e) => {
|
|
79
79
|
e.forEach((e) => {
|
|
80
|
-
|
|
80
|
+
Z(e.i, {
|
|
81
81
|
x: e.x,
|
|
82
82
|
y: e.y,
|
|
83
83
|
width: e.w,
|
|
84
84
|
height: e.h
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
|
-
}, [
|
|
87
|
+
}, [Z]), qe = m((e) => {
|
|
88
88
|
X(e);
|
|
89
|
-
}, [X]),
|
|
89
|
+
}, [X]), Q = m(async (e, t) => {
|
|
90
90
|
A(null);
|
|
91
91
|
let n = t?.definition || (e.type ? a(e.type) : null), r = d(), i = {
|
|
92
92
|
width: Math.min(n?.defaultSize?.width ?? 4, L),
|
|
@@ -147,21 +147,21 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
147
147
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
148
148
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
Ue(c), X(c.id);
|
|
151
151
|
}, [
|
|
152
152
|
p,
|
|
153
153
|
b,
|
|
154
154
|
q,
|
|
155
|
-
|
|
155
|
+
Ue,
|
|
156
156
|
X,
|
|
157
157
|
Y,
|
|
158
158
|
L,
|
|
159
159
|
w
|
|
160
|
-
]),
|
|
160
|
+
]), Je = m((e) => {
|
|
161
161
|
M(!0), N(e);
|
|
162
|
-
}, []),
|
|
162
|
+
}, []), Ye = m(() => {
|
|
163
163
|
M(!1), N(null);
|
|
164
|
-
}, []),
|
|
164
|
+
}, []), Xe = m((e) => {
|
|
165
165
|
e.preventDefault(), M(!1), N(null);
|
|
166
166
|
try {
|
|
167
167
|
let t = e.dataTransfer.getData("application/json");
|
|
@@ -187,7 +187,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
187
187
|
width: c.width,
|
|
188
188
|
height: c.height
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
Q({
|
|
191
191
|
type: r.type,
|
|
192
192
|
title: r.name || i.name,
|
|
193
193
|
config: r.defaultConfig || i.defaultConfig
|
|
@@ -200,20 +200,20 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
200
200
|
}
|
|
201
201
|
}, [
|
|
202
202
|
D,
|
|
203
|
-
|
|
203
|
+
Q,
|
|
204
204
|
L
|
|
205
|
-
]),
|
|
205
|
+
]), Ze = m((e) => {
|
|
206
206
|
e.preventDefault(), e.dataTransfer.dropEffect = "copy";
|
|
207
|
-
}, []),
|
|
207
|
+
}, []), Qe = m((e, t) => {
|
|
208
208
|
let n = t || a(e);
|
|
209
|
-
|
|
209
|
+
Q({
|
|
210
210
|
type: e,
|
|
211
211
|
title: n.name,
|
|
212
212
|
config: n.defaultConfig
|
|
213
213
|
});
|
|
214
|
-
}, [
|
|
214
|
+
}, [Q]), $e = m(() => {
|
|
215
215
|
W();
|
|
216
|
-
}, [W]),
|
|
216
|
+
}, [W]), et = m(() => {
|
|
217
217
|
U && W(), window.requestAnimationFrame(() => {
|
|
218
218
|
let e = w("bigconsole.dashboards.widgetPalette.searchPlaceholder", "Search widgets...");
|
|
219
219
|
document.querySelector(`input[placeholder="${e}"]`)?.focus();
|
|
@@ -222,7 +222,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
222
222
|
U,
|
|
223
223
|
W,
|
|
224
224
|
w
|
|
225
|
-
]), { exportPNG:
|
|
225
|
+
]), { exportPNG: tt, exportPDF: $, isExporting: nt } = l({
|
|
226
226
|
containerRef: E,
|
|
227
227
|
name: x || "dashboard"
|
|
228
228
|
});
|
|
@@ -232,8 +232,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
232
232
|
/* @__PURE__ */ v(te, {
|
|
233
233
|
dashboardId: p,
|
|
234
234
|
title: x,
|
|
235
|
-
onAddWidget:
|
|
236
|
-
onTogglePalette:
|
|
235
|
+
onAddWidget: et,
|
|
236
|
+
onTogglePalette: $e,
|
|
237
237
|
isPaletteOpen: G,
|
|
238
238
|
onPaste: ge,
|
|
239
239
|
onSave: _e,
|
|
@@ -241,11 +241,11 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
241
241
|
onExport: ye,
|
|
242
242
|
onPublishTemplate: be,
|
|
243
243
|
onExportImage: m(() => {
|
|
244
|
-
et();
|
|
245
|
-
}, [et]),
|
|
246
|
-
onExportPdf: m(() => {
|
|
247
244
|
tt();
|
|
248
245
|
}, [tt]),
|
|
246
|
+
onExportPdf: m(() => {
|
|
247
|
+
$();
|
|
248
|
+
}, [$]),
|
|
249
249
|
isExportingImage: nt,
|
|
250
250
|
onShare: () => O(!0)
|
|
251
251
|
}),
|
|
@@ -295,13 +295,13 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
295
295
|
}),
|
|
296
296
|
/* @__PURE__ */ y("div", {
|
|
297
297
|
"data-testid": "dashboard-canvas-panes",
|
|
298
|
-
className: `flex flex-1 min-w-0 overflow-hidden ${
|
|
298
|
+
className: `flex flex-1 min-w-0 overflow-hidden ${We ? "lg:mr-[var(--bc-inspector-width,420px)]" : ""}`,
|
|
299
299
|
children: [F && /* @__PURE__ */ v(se, {
|
|
300
300
|
isOpen: G,
|
|
301
|
-
onClose:
|
|
302
|
-
onWidgetSelect:
|
|
303
|
-
onDragStart:
|
|
304
|
-
onDragEnd:
|
|
301
|
+
onClose: $e,
|
|
302
|
+
onWidgetSelect: Qe,
|
|
303
|
+
onDragStart: Je,
|
|
304
|
+
onDragEnd: Ye,
|
|
305
305
|
installedWidgets: Re,
|
|
306
306
|
installedWidgetsLoading: ze,
|
|
307
307
|
definitions: Be
|
|
@@ -312,8 +312,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
312
312
|
"data-section-emphasis": "primary",
|
|
313
313
|
"data-testid": "dashboard-board",
|
|
314
314
|
className: "relative min-w-0 flex-1 overflow-auto border-2 border-transparent bg-bg-sunken motion-safe:transition-[border-color,background-color]",
|
|
315
|
-
onDrop:
|
|
316
|
-
onDragOver:
|
|
315
|
+
onDrop: Xe,
|
|
316
|
+
onDragOver: Ze,
|
|
317
317
|
onClick: () => {
|
|
318
318
|
F && X(null);
|
|
319
319
|
},
|
|
@@ -365,8 +365,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
365
365
|
cols: L,
|
|
366
366
|
isEditMode: F,
|
|
367
367
|
width: D,
|
|
368
|
-
onLayoutChange:
|
|
369
|
-
onWidgetSelect:
|
|
368
|
+
onLayoutChange: Ke,
|
|
369
|
+
onWidgetSelect: qe,
|
|
370
370
|
selectedWidgetId: He
|
|
371
371
|
})
|
|
372
372
|
}) : /* @__PURE__ */ v("div", {
|
|
@@ -379,7 +379,7 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
379
379
|
title: w("bigconsole.dashboards.canvas.noWidgetsTitle", "No widgets yet"),
|
|
380
380
|
description: w("bigconsole.dashboards.canvas.noWidgetsDescription", "Add widgets to build your dashboard. Click the \"Add Widget\" button to get started."),
|
|
381
381
|
children: F && /* @__PURE__ */ y(_, {
|
|
382
|
-
onClick:
|
|
382
|
+
onClick: et,
|
|
383
383
|
children: [/* @__PURE__ */ v(me, { className: "size-4" }), w("bigconsole.dashboards.canvas.addWidget", "Add Widget")]
|
|
384
384
|
})
|
|
385
385
|
})
|
|
@@ -388,8 +388,8 @@ var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _
|
|
|
388
388
|
})]
|
|
389
389
|
}),
|
|
390
390
|
/* @__PURE__ */ v(ue, {
|
|
391
|
-
isOpen:
|
|
392
|
-
onClose:
|
|
391
|
+
isOpen: We,
|
|
392
|
+
onClose: Ge
|
|
393
393
|
}),
|
|
394
394
|
/* @__PURE__ */ v(oe, {
|
|
395
395
|
dashboardId: p,
|