@burdenoff/microfe-bigconsole 2026.712.1 → 2026.713.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +144 -69
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderCanvas.js +21 -0
- package/dist/bigconsole/components/builder/BuilderCanvas.js.map +1 -0
- package/dist/bigconsole/components/builder/BuilderTopbar.js +33 -0
- package/dist/bigconsole/components/builder/BuilderTopbar.js.map +1 -0
- package/dist/bigconsole/components/builder/DashboardEditorShell.js +20 -0
- package/dist/bigconsole/components/builder/DashboardEditorShell.js.map +1 -0
- package/dist/bigconsole/components/builder/WidgetInspector.js +14 -0
- package/dist/bigconsole/components/builder/WidgetInspector.js.map +1 -0
- package/dist/bigconsole/components/builder/index.js +4 -0
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js +45 -0
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +43 -0
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +124 -0
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js +50 -0
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/index.js +4 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +221 -199
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +145 -102
- package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
- package/dist/bigconsole/components/dashboard/index.js +4 -0
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +529 -742
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +227 -226
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +221 -316
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/utils/widgetBinding.js +115 -0
- package/dist/bigconsole/utils/widgetBinding.js.map +1 -0
- package/package.json +2 -2
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js +0 -883
- package/dist/bigconsole/components/widgets/WidgetConfigDialog.js.map +0 -1
- package/dist/bigconsole/components/widgets/WidgetTypeSelector.js +0 -311
- package/dist/bigconsole/components/widgets/WidgetTypeSelector.js.map +0 -1
|
@@ -11,95 +11,104 @@ import o from "../../hooks/useWidgetOperations.js";
|
|
|
11
11
|
import s from "../../hooks/useDashboardImageExport.js";
|
|
12
12
|
import { useInstalledWidgets as c } from "../../hooks/useInstalledWidgets.js";
|
|
13
13
|
import l from "./DashboardGrid.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import u from "./DashboardToolbar.js";
|
|
15
|
+
import d from "./GlobalFiltersBar/GlobalFiltersBar.js";
|
|
16
16
|
import "./GlobalFiltersBar/index.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import ee from "./LiveBoardBanner.js";
|
|
18
|
+
import te from "./PageTabsManager/PageTabsManager.js";
|
|
19
19
|
import "./PageTabsManager/index.js";
|
|
20
|
-
import
|
|
20
|
+
import ne from "./ShareDialog/ShareDialog.js";
|
|
21
21
|
import "./ShareDialog/index.js";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { calculatePositionFromDrop as
|
|
26
|
-
import { memo as
|
|
27
|
-
import { jsx as
|
|
22
|
+
import re from "./WidgetPalette.js";
|
|
23
|
+
import { WidgetInspector as ie } from "../builder/WidgetInspector.js";
|
|
24
|
+
import "../builder/index.js";
|
|
25
|
+
import { calculatePositionFromDrop as ae, findNextAvailablePosition as oe } from "../../utils/widgetPositioning.js";
|
|
26
|
+
import { memo as f, useCallback as p, useEffect as se, useMemo as ce, useRef as m, useState as h } from "react";
|
|
27
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
28
28
|
//#region src/bigconsole/components/dashboard/DashboardCanvas.tsx
|
|
29
|
-
var
|
|
30
|
-
let
|
|
31
|
-
workspaceId:
|
|
32
|
-
apiGatewayUrl:
|
|
33
|
-
authToken:
|
|
34
|
-
enabled:
|
|
35
|
-
}), { definitions:
|
|
36
|
-
workspaceId:
|
|
37
|
-
apiGatewayUrl:
|
|
38
|
-
authToken:
|
|
39
|
-
enabled:
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
let e = Array.from(
|
|
44
|
-
return
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
let e =
|
|
48
|
-
|
|
29
|
+
var v = f(function({ dashboardId: f, pageId: v, title: y, onPaste: le, onSave: ue, isSaving: de = !1, onExport: fe, pages: b = [], activePageId: pe, onPageChange: me, onPagesReorder: x, onPageAdd: he, onPageRename: ge, onPageDuplicate: _e, onPageDelete: ve, showFilters: ye = !0, showPageTabs: be = !0, enableCrossFilter: xe = !0 }) {
|
|
30
|
+
let S = m(null), C = m(null), [w, Se] = h(1200), [Ce, T] = h(!1), [E, D] = h(null), [O, k] = h(!1), [A, j] = h(null), M = t((e) => e.viewMode === "edit"), { workspaceId: N, apiGatewayUrl: P, authToken: F } = r(), { installedWidgets: we, loading: Te } = c({
|
|
31
|
+
workspaceId: N,
|
|
32
|
+
apiGatewayUrl: P,
|
|
33
|
+
authToken: F,
|
|
34
|
+
enabled: M
|
|
35
|
+
}), { definitions: Ee } = a({
|
|
36
|
+
workspaceId: N,
|
|
37
|
+
apiGatewayUrl: P,
|
|
38
|
+
authToken: F,
|
|
39
|
+
enabled: M
|
|
40
|
+
}), I = t((e) => e.zoomLevel), L = t((e) => e.sidebarCollapsed), R = t((e) => e.toggleSidebar), z = !L, B = t((e) => e.setGlobalFilterValues), De = p((e) => {
|
|
41
|
+
B(e);
|
|
42
|
+
}, [B]), { createWidget: V } = o(v, f, { skipFetch: !0 }), H = e((e) => e.widgets), U = ce(() => {
|
|
43
|
+
let e = Array.from(H.values());
|
|
44
|
+
return v ? e.filter((e) => e.pageId === v) : e;
|
|
45
|
+
}, [H, v]), Oe = e((e) => e.selectedWidgetId), W = e((e) => e.selectWidget), G = e((e) => e.addWidget), K = e((e) => e.updateWidgetPosition), q = e((e) => e.configPanelOpen), ke = e((e) => e.closeConfigPanel);
|
|
46
|
+
se(() => {
|
|
47
|
+
let e = S.current;
|
|
48
|
+
if (!e) return;
|
|
49
|
+
let t = () => {
|
|
50
|
+
Se(e.offsetWidth);
|
|
49
51
|
};
|
|
50
|
-
|
|
52
|
+
if (t(), typeof ResizeObserver < "u") {
|
|
53
|
+
let n = new ResizeObserver(t);
|
|
54
|
+
return n.observe(e), () => n.disconnect();
|
|
55
|
+
}
|
|
56
|
+
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
51
57
|
}, []);
|
|
52
|
-
let
|
|
58
|
+
let Ae = p((e) => {
|
|
53
59
|
e.forEach((e) => {
|
|
54
|
-
|
|
60
|
+
K(e.i, {
|
|
55
61
|
x: e.x,
|
|
56
62
|
y: e.y,
|
|
57
63
|
width: e.w,
|
|
58
64
|
height: e.h
|
|
59
65
|
});
|
|
60
66
|
});
|
|
61
|
-
}, [
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
}, [K]), J = p((e) => {
|
|
68
|
+
W(e);
|
|
69
|
+
}, [W]), Y = p(async (e, t) => {
|
|
70
|
+
D(null);
|
|
71
|
+
let n = t?.definition || (e.type ? i(e.type) : null), r = {
|
|
72
|
+
width: n?.defaultSize?.width ?? 4,
|
|
73
|
+
height: n?.defaultSize?.height ?? 4
|
|
74
|
+
}, a;
|
|
75
|
+
if (t?.position) a = t.position;
|
|
69
76
|
else {
|
|
70
|
-
let { x: e, y: t } =
|
|
71
|
-
|
|
77
|
+
let { x: e, y: t } = oe(U, r, { cols: 12 });
|
|
78
|
+
a = {
|
|
72
79
|
x: e,
|
|
73
80
|
y: t,
|
|
74
|
-
width:
|
|
75
|
-
height:
|
|
81
|
+
width: r.width,
|
|
82
|
+
height: r.height
|
|
76
83
|
};
|
|
77
84
|
}
|
|
78
|
-
let
|
|
79
|
-
if (
|
|
80
|
-
let t = await
|
|
81
|
-
pageId:
|
|
82
|
-
dashboardId:
|
|
85
|
+
let o = e;
|
|
86
|
+
if (v) {
|
|
87
|
+
let t = await V({
|
|
88
|
+
pageId: v,
|
|
89
|
+
dashboardId: f,
|
|
83
90
|
type: e.type,
|
|
84
91
|
title: e.title || "Untitled Widget",
|
|
85
92
|
description: e.description,
|
|
86
93
|
renderer: e.renderer,
|
|
87
94
|
template: e.template,
|
|
88
95
|
config: e.config || {},
|
|
89
|
-
position:
|
|
96
|
+
position: a,
|
|
90
97
|
refreshInterval: e.refreshInterval ?? void 0,
|
|
91
|
-
dataSinkId:
|
|
92
|
-
parserId:
|
|
98
|
+
dataSinkId: o.dataSinkId,
|
|
99
|
+
parserId: o.parserId
|
|
93
100
|
});
|
|
94
101
|
if (t) {
|
|
95
|
-
|
|
102
|
+
W(t.id);
|
|
96
103
|
return;
|
|
97
104
|
}
|
|
105
|
+
D("Could not create the widget. Check the connection and try again.");
|
|
106
|
+
return;
|
|
98
107
|
}
|
|
99
|
-
let
|
|
108
|
+
let s = {
|
|
100
109
|
id: crypto.randomUUID(),
|
|
101
|
-
dashboardId:
|
|
102
|
-
pageId:
|
|
110
|
+
dashboardId: f,
|
|
111
|
+
pageId: v || "local",
|
|
103
112
|
type: e.type,
|
|
104
113
|
title: e.title || "Untitled Widget",
|
|
105
114
|
description: e.description,
|
|
@@ -107,136 +116,161 @@ var g = u(function({ dashboardId: u, pageId: g, title: _, onPaste: fe, onSave: p
|
|
|
107
116
|
template: e.template,
|
|
108
117
|
refreshInterval: e.refreshInterval,
|
|
109
118
|
config: e.config || {},
|
|
110
|
-
position:
|
|
111
|
-
positionX:
|
|
112
|
-
positionY:
|
|
113
|
-
positionWidth:
|
|
114
|
-
positionHeight:
|
|
115
|
-
dataSinkId:
|
|
116
|
-
parserId:
|
|
119
|
+
position: a,
|
|
120
|
+
positionX: a.x,
|
|
121
|
+
positionY: a.y,
|
|
122
|
+
positionWidth: a.width,
|
|
123
|
+
positionHeight: a.height,
|
|
124
|
+
dataSinkId: o.dataSinkId,
|
|
125
|
+
parserId: o.parserId,
|
|
117
126
|
translations: [],
|
|
118
127
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
119
128
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
120
129
|
};
|
|
121
|
-
|
|
130
|
+
G(s), W(s.id);
|
|
122
131
|
}, [
|
|
123
|
-
|
|
124
|
-
|
|
132
|
+
f,
|
|
133
|
+
v,
|
|
134
|
+
V,
|
|
125
135
|
G,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
j
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
k(!1), A(null);
|
|
135
|
-
}, []), Le = d((e) => {
|
|
136
|
-
e.preventDefault(), k(!1), A(null);
|
|
136
|
+
W,
|
|
137
|
+
U
|
|
138
|
+
]), je = p((e) => {
|
|
139
|
+
k(!0), j(e);
|
|
140
|
+
}, []), Me = p(() => {
|
|
141
|
+
k(!1), j(null);
|
|
142
|
+
}, []), Ne = p((e) => {
|
|
143
|
+
e.preventDefault(), k(!1), j(null);
|
|
137
144
|
try {
|
|
138
145
|
let t = e.dataTransfer.getData("application/json");
|
|
139
146
|
if (!t) return;
|
|
140
|
-
let n = JSON.parse(t)
|
|
141
|
-
n
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
let n = JSON.parse(t);
|
|
148
|
+
if (!n || typeof n != "object" || !("type" in n)) return;
|
|
149
|
+
let r = n, a = i(r.type), o = null;
|
|
150
|
+
r.defaultConfig && r.category && (o = {
|
|
151
|
+
...a,
|
|
152
|
+
name: r.name || a.name,
|
|
153
|
+
category: r.category,
|
|
154
|
+
defaultConfig: r.defaultConfig,
|
|
155
|
+
defaultSize: r.defaultSize || a.defaultSize
|
|
156
|
+
});
|
|
157
|
+
let s = S.current?.getBoundingClientRect();
|
|
158
|
+
if (!s) return;
|
|
159
|
+
let c = {
|
|
160
|
+
width: a.defaultSize.width,
|
|
161
|
+
height: a.defaultSize.height
|
|
162
|
+
}, { x: l, y: u } = ae(e.clientX, e.clientY, s, w, c, { cols: 12 }), d = {
|
|
163
|
+
x: l,
|
|
164
|
+
y: u,
|
|
165
|
+
width: c.width,
|
|
166
|
+
height: c.height
|
|
167
|
+
};
|
|
168
|
+
Y({
|
|
169
|
+
type: r.type,
|
|
170
|
+
title: r.name || a.name,
|
|
171
|
+
config: r.defaultConfig || a.defaultConfig
|
|
172
|
+
}, {
|
|
173
|
+
position: d,
|
|
174
|
+
definition: o
|
|
147
175
|
});
|
|
148
|
-
let o = x.current?.getBoundingClientRect();
|
|
149
|
-
if (!o) return;
|
|
150
|
-
let s = {
|
|
151
|
-
width: r.defaultSize.width,
|
|
152
|
-
height: r.defaultSize.height
|
|
153
|
-
}, { x: c, y: l } = ce(e.clientX, e.clientY, o, C, s, { cols: 12 });
|
|
154
|
-
M({
|
|
155
|
-
x: c,
|
|
156
|
-
y: l,
|
|
157
|
-
width: s.width,
|
|
158
|
-
height: s.height
|
|
159
|
-
}), P(n.type), I(a), w(!0);
|
|
160
176
|
} catch (e) {
|
|
161
177
|
console.error("Failed to handle widget drop:", e);
|
|
162
178
|
}
|
|
163
|
-
}, [
|
|
179
|
+
}, [w, Y]), Pe = p((e) => {
|
|
164
180
|
e.preventDefault(), e.dataTransfer.dropEffect = "copy";
|
|
165
|
-
}, []),
|
|
181
|
+
}, []), Fe = p((e, t) => {
|
|
166
182
|
let n = t || i(e);
|
|
167
|
-
|
|
183
|
+
Y({
|
|
168
184
|
type: e,
|
|
169
185
|
title: n.name,
|
|
170
186
|
config: n.defaultConfig
|
|
171
|
-
})
|
|
172
|
-
}, [
|
|
173
|
-
|
|
174
|
-
}, []),
|
|
175
|
-
|
|
176
|
-
|
|
187
|
+
});
|
|
188
|
+
}, [Y]), X = p(() => {
|
|
189
|
+
R();
|
|
190
|
+
}, [R]), Z = p(() => {
|
|
191
|
+
L && R(), window.requestAnimationFrame(() => {
|
|
192
|
+
document.querySelector("input[placeholder=\"Search widgets...\"]")?.focus();
|
|
193
|
+
});
|
|
194
|
+
}, [L, R]), { exportPNG: Q, exportPDF: $, isExporting: Ie } = s({
|
|
195
|
+
containerRef: C,
|
|
196
|
+
name: y || "dashboard"
|
|
177
197
|
});
|
|
178
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ _("div", {
|
|
179
199
|
className: "flex flex-col h-full min-w-0 overflow-hidden",
|
|
180
200
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
dashboardId:
|
|
183
|
-
title:
|
|
184
|
-
onAddWidget:
|
|
185
|
-
onTogglePalette:
|
|
186
|
-
isPaletteOpen:
|
|
187
|
-
onPaste:
|
|
188
|
-
onSave:
|
|
189
|
-
isSaving:
|
|
190
|
-
onExport:
|
|
191
|
-
onExportImage:
|
|
201
|
+
/* @__PURE__ */ g(u, {
|
|
202
|
+
dashboardId: f,
|
|
203
|
+
title: y,
|
|
204
|
+
onAddWidget: Z,
|
|
205
|
+
onTogglePalette: X,
|
|
206
|
+
isPaletteOpen: z,
|
|
207
|
+
onPaste: le,
|
|
208
|
+
onSave: ue,
|
|
209
|
+
isSaving: de,
|
|
210
|
+
onExport: fe,
|
|
211
|
+
onExportImage: p(() => {
|
|
192
212
|
Q();
|
|
193
213
|
}, [Q]),
|
|
194
|
-
onExportPdf:
|
|
214
|
+
onExportPdf: p(() => {
|
|
195
215
|
$();
|
|
196
216
|
}, [$]),
|
|
197
|
-
isExportingImage:
|
|
217
|
+
isExportingImage: Ie,
|
|
198
218
|
onShare: () => T(!0)
|
|
199
219
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
|
|
202
|
-
|
|
220
|
+
E && /* @__PURE__ */ _("div", {
|
|
221
|
+
className: "flex items-center justify-between gap-3 border-b border-status-error-border bg-status-error-bg px-4 py-2 text-sm text-status-error-text",
|
|
222
|
+
role: "alert",
|
|
223
|
+
children: [/* @__PURE__ */ g("span", { children: E }), /* @__PURE__ */ g("button", {
|
|
224
|
+
type: "button",
|
|
225
|
+
className: "font-medium underline underline-offset-2",
|
|
226
|
+
onClick: () => D(null),
|
|
227
|
+
children: "Dismiss"
|
|
228
|
+
})]
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ g(ee, {
|
|
231
|
+
widgets: U,
|
|
232
|
+
isEditMode: M
|
|
203
233
|
}),
|
|
204
|
-
|
|
205
|
-
dashboardId:
|
|
206
|
-
onFilterChange:
|
|
234
|
+
ye && /* @__PURE__ */ g(d, {
|
|
235
|
+
dashboardId: f,
|
|
236
|
+
onFilterChange: De,
|
|
207
237
|
collapsible: !0
|
|
208
238
|
}),
|
|
209
|
-
|
|
210
|
-
pages:
|
|
211
|
-
activePageId:
|
|
212
|
-
editable:
|
|
213
|
-
onPageSelect:
|
|
214
|
-
onPagesReorder:
|
|
215
|
-
|
|
239
|
+
be && (M || b.length > 0) && /* @__PURE__ */ g(te, {
|
|
240
|
+
pages: b,
|
|
241
|
+
activePageId: pe || b[0]?.id,
|
|
242
|
+
editable: M,
|
|
243
|
+
onPageSelect: me || (() => {}),
|
|
244
|
+
onPagesReorder: x ? (e) => {
|
|
245
|
+
x(e.map((e) => b.find((t) => t.id === e)).filter(Boolean));
|
|
216
246
|
} : void 0,
|
|
217
|
-
onPageCreate:
|
|
218
|
-
onPageRename:
|
|
219
|
-
onPageDuplicate:
|
|
220
|
-
onPageDelete:
|
|
247
|
+
onPageCreate: he,
|
|
248
|
+
onPageRename: ge,
|
|
249
|
+
onPageDuplicate: _e,
|
|
250
|
+
onPageDelete: ve
|
|
221
251
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ _("div", {
|
|
223
253
|
className: "flex flex-1 min-w-0 overflow-hidden",
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
254
|
+
style: {
|
|
255
|
+
marginRight: q ? "var(--bc-inspector-width, 420px)" : void 0,
|
|
256
|
+
transition: "margin-right 0.2s ease"
|
|
257
|
+
},
|
|
258
|
+
children: [M && /* @__PURE__ */ g(re, {
|
|
259
|
+
isOpen: z,
|
|
260
|
+
onClose: X,
|
|
261
|
+
onWidgetSelect: Fe,
|
|
262
|
+
onDragStart: je,
|
|
263
|
+
onDragEnd: Me,
|
|
264
|
+
installedWidgets: we,
|
|
265
|
+
installedWidgetsLoading: Te,
|
|
266
|
+
definitions: Ee
|
|
267
|
+
}), /* @__PURE__ */ _("div", {
|
|
268
|
+
ref: S,
|
|
235
269
|
className: "flex-1 min-w-0 overflow-auto bg-bg-sunken",
|
|
236
|
-
onDrop:
|
|
237
|
-
onDragOver:
|
|
270
|
+
onDrop: Ne,
|
|
271
|
+
onDragOver: Pe,
|
|
238
272
|
onClick: () => {
|
|
239
|
-
|
|
273
|
+
M && W(null);
|
|
240
274
|
},
|
|
241
275
|
style: {
|
|
242
276
|
position: "relative",
|
|
@@ -244,7 +278,7 @@ var g = u(function({ dashboardId: u, pageId: g, title: _, onPaste: fe, onSave: p
|
|
|
244
278
|
backgroundColor: O ? "var(--color-bg-hover)" : void 0,
|
|
245
279
|
transition: "border-color 0.2s, background-color 0.2s"
|
|
246
280
|
},
|
|
247
|
-
children: [O && /* @__PURE__ */
|
|
281
|
+
children: [O && /* @__PURE__ */ g("div", {
|
|
248
282
|
style: {
|
|
249
283
|
position: "absolute",
|
|
250
284
|
top: "50%",
|
|
@@ -258,7 +292,7 @@ var g = u(function({ dashboardId: u, pageId: g, title: _, onPaste: fe, onSave: p
|
|
|
258
292
|
pointerEvents: "none",
|
|
259
293
|
zIndex: 100
|
|
260
294
|
},
|
|
261
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ _("p", {
|
|
262
296
|
style: {
|
|
263
297
|
fontSize: "var(--font-size-body-md)",
|
|
264
298
|
color: "var(--color-text-primary)",
|
|
@@ -266,39 +300,39 @@ var g = u(function({ dashboardId: u, pageId: g, title: _, onPaste: fe, onSave: p
|
|
|
266
300
|
},
|
|
267
301
|
children: [
|
|
268
302
|
"Drop to add ",
|
|
269
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ g("strong", { children: A }),
|
|
270
304
|
" widget"
|
|
271
305
|
]
|
|
272
306
|
})
|
|
273
|
-
}), /* @__PURE__ */
|
|
274
|
-
ref:
|
|
307
|
+
}), /* @__PURE__ */ g("div", {
|
|
308
|
+
ref: C,
|
|
275
309
|
className: "min-h-full origin-top-left transition-transform",
|
|
276
310
|
style: {
|
|
277
|
-
transform: `scale(${
|
|
278
|
-
width: `${100 / (
|
|
311
|
+
transform: `scale(${I / 100})`,
|
|
312
|
+
width: `${100 / (I / 100)}%`
|
|
279
313
|
},
|
|
280
|
-
children:
|
|
281
|
-
enabled:
|
|
314
|
+
children: U.length > 0 ? /* @__PURE__ */ g(n, {
|
|
315
|
+
enabled: xe,
|
|
282
316
|
onCrossFilter: (e) => {},
|
|
283
|
-
children: /* @__PURE__ */
|
|
284
|
-
widgets:
|
|
285
|
-
isEditMode:
|
|
286
|
-
width:
|
|
287
|
-
onLayoutChange:
|
|
288
|
-
onWidgetSelect:
|
|
289
|
-
selectedWidgetId:
|
|
317
|
+
children: /* @__PURE__ */ g(l, {
|
|
318
|
+
widgets: U,
|
|
319
|
+
isEditMode: M,
|
|
320
|
+
width: w,
|
|
321
|
+
onLayoutChange: Ae,
|
|
322
|
+
onWidgetSelect: J,
|
|
323
|
+
selectedWidgetId: Oe
|
|
290
324
|
})
|
|
291
|
-
}) : /* @__PURE__ */
|
|
325
|
+
}) : /* @__PURE__ */ _("div", {
|
|
292
326
|
className: "flex flex-col items-center justify-center min-h-[400px] p-8",
|
|
293
327
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ g("div", {
|
|
295
329
|
className: "w-16 h-16 mb-4 flex items-center justify-center rounded-full bg-bg-surface",
|
|
296
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ g("svg", {
|
|
297
331
|
className: "w-8 h-8 text-text-secondary",
|
|
298
332
|
fill: "none",
|
|
299
333
|
stroke: "currentColor",
|
|
300
334
|
viewBox: "0 0 24 24",
|
|
301
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ g("path", {
|
|
302
336
|
strokeLinecap: "round",
|
|
303
337
|
strokeLinejoin: "round",
|
|
304
338
|
strokeWidth: 2,
|
|
@@ -306,24 +340,24 @@ var g = u(function({ dashboardId: u, pageId: g, title: _, onPaste: fe, onSave: p
|
|
|
306
340
|
})
|
|
307
341
|
})
|
|
308
342
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ g("h3", {
|
|
310
344
|
className: "text-lg font-medium text-text-primary mb-2",
|
|
311
345
|
children: "No widgets yet"
|
|
312
346
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ g("p", {
|
|
314
348
|
className: "text-sm text-text-secondary mb-4 text-center max-w-[300px]",
|
|
315
349
|
children: "Add widgets to build your dashboard. Click the \"Add Widget\" button to get started."
|
|
316
350
|
}),
|
|
317
|
-
|
|
351
|
+
M && /* @__PURE__ */ _("button", {
|
|
318
352
|
type: "button",
|
|
319
|
-
onClick:
|
|
353
|
+
onClick: Z,
|
|
320
354
|
className: "\n inline-flex items-center gap-2\n px-4 py-2\n text-sm font-medium\n text-action-primary-fg\n bg-action-primary-bg\n hover:bg-action-primary-bgHover\n rounded-md\n transition-colors\n ",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ g("svg", {
|
|
322
356
|
className: "w-4 h-4",
|
|
323
357
|
fill: "none",
|
|
324
358
|
stroke: "currentColor",
|
|
325
359
|
viewBox: "0 0 24 24",
|
|
326
|
-
children: /* @__PURE__ */
|
|
360
|
+
children: /* @__PURE__ */ g("path", {
|
|
327
361
|
strokeLinecap: "round",
|
|
328
362
|
strokeLinejoin: "round",
|
|
329
363
|
strokeWidth: 2,
|
|
@@ -336,32 +370,20 @@ var g = u(function({ dashboardId: u, pageId: g, title: _, onPaste: fe, onSave: p
|
|
|
336
370
|
})]
|
|
337
371
|
})]
|
|
338
372
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
isOpen:
|
|
341
|
-
onClose:
|
|
342
|
-
}),
|
|
343
|
-
/* @__PURE__ */ m(oe, {
|
|
344
|
-
isOpen: Te,
|
|
345
|
-
onClose: () => {
|
|
346
|
-
w(!1), M(null), P(null), I(null);
|
|
347
|
-
},
|
|
348
|
-
onSave: Z,
|
|
349
|
-
preselectedType: N || void 0,
|
|
350
|
-
preselectedDefinition: F || void 0,
|
|
351
|
-
dashboardId: u,
|
|
352
|
-
installedWidgets: V,
|
|
353
|
-
definitions: H
|
|
373
|
+
/* @__PURE__ */ g(ie, {
|
|
374
|
+
isOpen: q,
|
|
375
|
+
onClose: ke
|
|
354
376
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
dashboardId:
|
|
357
|
-
dashboardName:
|
|
358
|
-
isOpen:
|
|
377
|
+
/* @__PURE__ */ g(ne, {
|
|
378
|
+
dashboardId: f,
|
|
379
|
+
dashboardName: y || "Dashboard",
|
|
380
|
+
isOpen: Ce,
|
|
359
381
|
onClose: () => T(!1)
|
|
360
382
|
})
|
|
361
383
|
]
|
|
362
384
|
});
|
|
363
385
|
});
|
|
364
386
|
//#endregion
|
|
365
|
-
export {
|
|
387
|
+
export { v as default };
|
|
366
388
|
|
|
367
389
|
//# sourceMappingURL=DashboardCanvas.js.map
|