@restio/ui 0.2.1-20260917153719 → 0.2.1-20261007123729
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 +9 -35
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +11 -47
- package/dist/core.js +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +55 -146
- package/dist/data.js +1 -1
- package/dist/experimental.cjs +2 -1
- package/dist/experimental.d.ts +206 -33
- package/dist/experimental.js +899 -566
- package/dist/framework.cjs +1 -1
- package/dist/framework.d.ts +34 -90
- package/dist/framework.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +92 -268
- package/dist/index.js +1 -1
- package/dist/{src-CIojZORu.js → src-Bzrq1hWW.js} +1450 -1442
- package/dist/{src-Cr-lHp0p.cjs → src-kY7g6XFo.cjs} +47 -45
- package/dist/ui.css +1 -1
- package/package.json +3 -5
package/dist/experimental.js
CHANGED
|
@@ -1,52 +1,114 @@
|
|
|
1
|
-
import { Bt as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { A as Ie, B as fe, Bt as Ee, D as Pe, E as xe, Et as ge, Ft as ue, Ht as Z, I as Fe, It as Oe, Jt as Be, Lt as Te, N as Ae, O as pe, Pt as $e, Rt as _e, T as Le, Wt as te, Y as Ge, Yt as He, f as Ve, jt as me, mt as ke, nt as Ye, pt as qe, q as Ke, qt as ve, rt as Ne, u as Xe, w as Je, wt as Qe, z as Ze } from "./src-Bzrq1hWW.js";
|
|
2
|
+
import { useCallback as y, useEffect as se, useMemo as X, useRef as ie, useState as D } from "react";
|
|
3
|
+
import { createPortal as Ue } from "react-dom";
|
|
4
|
+
var er = { "rst-pip-container": "_rst-pip-container_63eby_1" }, e = Be(), kr = ({ pipWindow: r, className: a, children: i, ...s }) => r ? Ue(/* @__PURE__ */ (0, e.jsx)("div", {
|
|
5
|
+
className: [er["rst-pip-container"], a].filter(Boolean).join(" "),
|
|
6
|
+
...s,
|
|
7
|
+
children: i
|
|
8
|
+
}), r.document.body) : null;
|
|
9
|
+
function Se() {
|
|
10
|
+
return globalThis.documentPictureInPicture;
|
|
7
11
|
}
|
|
8
|
-
function
|
|
12
|
+
function rr() {
|
|
13
|
+
return Se() !== void 0;
|
|
14
|
+
}
|
|
15
|
+
function ar(r, a = document) {
|
|
16
|
+
for (const i of Array.from(a.querySelectorAll('style, link[rel="stylesheet"]'))) r.head.appendChild(i.cloneNode(!0));
|
|
17
|
+
for (const { name: i, value: s } of Array.from(a.documentElement.attributes)) r.documentElement.setAttribute(i, s);
|
|
18
|
+
for (const { name: i, value: s } of Array.from(a.body.attributes)) r.body.setAttribute(i, s);
|
|
19
|
+
}
|
|
20
|
+
function tr(r) {
|
|
21
|
+
const a = r.createElement("style");
|
|
22
|
+
a.textContent = [
|
|
23
|
+
"html, body { height: 100%; margin: 0; }",
|
|
24
|
+
"body {",
|
|
25
|
+
" background-color: var(--rst-backgroundColor-default);",
|
|
26
|
+
" color: var(--rst-fontColor-main);",
|
|
27
|
+
" font: var(--rst-font-body);",
|
|
28
|
+
"}"
|
|
29
|
+
].join(`
|
|
30
|
+
`), r.head.appendChild(a);
|
|
31
|
+
}
|
|
32
|
+
function Nr({ width: r, height: a, copyStyles: i = !0 } = {}) {
|
|
33
|
+
const [s, b] = D(null), [h, p] = D(null), j = ie(null), k = y(async () => {
|
|
34
|
+
const f = Se();
|
|
35
|
+
if (!(!f || j.current)) {
|
|
36
|
+
p(null);
|
|
37
|
+
try {
|
|
38
|
+
const g = await f.requestWindow({
|
|
39
|
+
width: r,
|
|
40
|
+
height: a
|
|
41
|
+
});
|
|
42
|
+
j.current = g, i && ar(g.document), tr(g.document), g.addEventListener("pagehide", () => {
|
|
43
|
+
j.current = null, b(null);
|
|
44
|
+
}), b(g);
|
|
45
|
+
} catch (g) {
|
|
46
|
+
p(g instanceof Error ? `${g.name}: ${g.message}` : String(g));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, [
|
|
50
|
+
r,
|
|
51
|
+
a,
|
|
52
|
+
i
|
|
53
|
+
]), c = y(() => {
|
|
54
|
+
j.current?.close();
|
|
55
|
+
}, []);
|
|
56
|
+
return se(() => () => j.current?.close(), []), {
|
|
57
|
+
pipWindow: s,
|
|
58
|
+
error: h,
|
|
59
|
+
isOpen: s !== null,
|
|
60
|
+
isSupported: rr(),
|
|
61
|
+
open: k,
|
|
62
|
+
close: c
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
var Sr = 1;
|
|
66
|
+
function sr(r, a) {
|
|
67
|
+
const i = r.col + r.w, s = r.row + r.h, b = a.col + a.w, h = a.row + a.h;
|
|
68
|
+
return r.col < b && i > a.col && r.row < h && s > a.row;
|
|
69
|
+
}
|
|
70
|
+
function ye(r) {
|
|
9
71
|
return r.col >= 1 && r.col + r.w - 1 <= 12 && r.row >= 1 && r.row + r.h - 1 <= 30;
|
|
10
72
|
}
|
|
11
|
-
function
|
|
12
|
-
for (const
|
|
13
|
-
if (
|
|
14
|
-
return
|
|
73
|
+
function be(r, a, i) {
|
|
74
|
+
for (const s of a)
|
|
75
|
+
if (s.id !== i && sr(r, s.position))
|
|
76
|
+
return s.id;
|
|
15
77
|
return null;
|
|
16
78
|
}
|
|
17
|
-
function
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
79
|
+
function Me(r, a, i) {
|
|
80
|
+
for (let h = 1; h <= 30 - a + 1; h++) for (let p = 1; p <= 12 - r + 1; p++) {
|
|
81
|
+
const j = {
|
|
20
82
|
col: p,
|
|
21
|
-
row:
|
|
83
|
+
row: h,
|
|
22
84
|
w: r,
|
|
23
|
-
h:
|
|
85
|
+
h: a
|
|
24
86
|
};
|
|
25
|
-
if (!
|
|
87
|
+
if (!be(j, i)) return j;
|
|
26
88
|
}
|
|
27
89
|
return {
|
|
28
90
|
col: 1,
|
|
29
|
-
row:
|
|
91
|
+
row: i.reduce((h, p) => Math.max(h, p.position.row + p.position.h), 1),
|
|
30
92
|
w: r,
|
|
31
|
-
h:
|
|
93
|
+
h: a
|
|
32
94
|
};
|
|
33
95
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
for (const
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
for (const
|
|
41
|
-
|
|
96
|
+
function dr(r, a) {
|
|
97
|
+
const i = {};
|
|
98
|
+
for (const s of r) {
|
|
99
|
+
const b = a[s.dataSourceId];
|
|
100
|
+
if (!b) continue;
|
|
101
|
+
const h = b.data ?? [], p = ke(h.length > 0 ? Object.keys(h[0]) : []), j = Ne(s.columns ?? p), k = /* @__PURE__ */ new Set(), c = [];
|
|
102
|
+
for (const f of j) k.has(f.id) || (k.add(f.id), c.push(f));
|
|
103
|
+
i[s.dataSourceId] = c;
|
|
42
104
|
}
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
var _e = 0;
|
|
46
|
-
function ve() {
|
|
47
|
-
return _e += 1, `widget-${Date.now()}-${_e}`;
|
|
105
|
+
return i;
|
|
48
106
|
}
|
|
107
|
+
var je = 0;
|
|
49
108
|
function we() {
|
|
109
|
+
return je += 1, `widget-${Date.now()}-${je}`;
|
|
110
|
+
}
|
|
111
|
+
function Ce() {
|
|
50
112
|
return {
|
|
51
113
|
version: 1,
|
|
52
114
|
name: "Untitled Dashboard",
|
|
@@ -54,97 +116,97 @@ function we() {
|
|
|
54
116
|
widgets: []
|
|
55
117
|
};
|
|
56
118
|
}
|
|
57
|
-
function
|
|
58
|
-
const [
|
|
59
|
-
|
|
60
|
-
}, []),
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
id:
|
|
64
|
-
title: `New ${
|
|
65
|
-
componentType:
|
|
66
|
-
dataSourceId:
|
|
67
|
-
position:
|
|
119
|
+
function ir(r, a) {
|
|
120
|
+
const [i, s] = D(r ?? Ce), [b, h] = D(null), [p, j] = D(a ? "view" : "edit"), k = ie(!1), c = y(() => {
|
|
121
|
+
k.current = !0;
|
|
122
|
+
}, []), f = y((u, x, W) => {
|
|
123
|
+
s((d) => {
|
|
124
|
+
const C = {
|
|
125
|
+
id: we(),
|
|
126
|
+
title: `New ${u}`,
|
|
127
|
+
componentType: u,
|
|
128
|
+
dataSourceId: x,
|
|
129
|
+
position: W
|
|
68
130
|
};
|
|
69
131
|
return {
|
|
70
|
-
...
|
|
71
|
-
widgets: [...
|
|
132
|
+
...d,
|
|
133
|
+
widgets: [...d.widgets, C]
|
|
72
134
|
};
|
|
73
|
-
}),
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
id:
|
|
78
|
-
position:
|
|
79
|
-
...
|
|
135
|
+
}), c();
|
|
136
|
+
}, [c]), g = y((u) => {
|
|
137
|
+
s((x) => {
|
|
138
|
+
const W = Me(6, 3, x.widgets), d = {
|
|
139
|
+
id: we(),
|
|
140
|
+
position: W,
|
|
141
|
+
...u.widget
|
|
80
142
|
};
|
|
81
143
|
return {
|
|
82
|
-
...
|
|
83
|
-
widgets: [...
|
|
144
|
+
...x,
|
|
145
|
+
widgets: [...x.widgets, d]
|
|
84
146
|
};
|
|
85
|
-
}),
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
...
|
|
89
|
-
widgets:
|
|
90
|
-
})),
|
|
91
|
-
}, [
|
|
92
|
-
|
|
93
|
-
...
|
|
94
|
-
widgets:
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
...
|
|
98
|
-
...
|
|
147
|
+
}), c();
|
|
148
|
+
}, [c]), w = y((u) => {
|
|
149
|
+
s((x) => ({
|
|
150
|
+
...x,
|
|
151
|
+
widgets: x.widgets.filter((W) => W.id !== u)
|
|
152
|
+
})), h((x) => x === u ? null : x), c();
|
|
153
|
+
}, [c]), R = y((u, x) => {
|
|
154
|
+
s((W) => ({
|
|
155
|
+
...W,
|
|
156
|
+
widgets: W.widgets.map((d) => {
|
|
157
|
+
if (d.id !== u) return d;
|
|
158
|
+
const C = {
|
|
159
|
+
...d,
|
|
160
|
+
...x
|
|
99
161
|
};
|
|
100
|
-
if (
|
|
101
|
-
const
|
|
102
|
-
|
|
162
|
+
if (x.dataSourceId && x.dataSourceId !== d.dataSourceId) {
|
|
163
|
+
const P = pe[d.componentType] ?? [];
|
|
164
|
+
C.columns = void 0, C.componentProps = xe(P), C.filters = void 0, C.uiConfig = void 0;
|
|
103
165
|
}
|
|
104
|
-
return
|
|
166
|
+
return C;
|
|
105
167
|
})
|
|
106
|
-
})),
|
|
107
|
-
}, [
|
|
108
|
-
|
|
109
|
-
}, [
|
|
110
|
-
|
|
111
|
-
}, []),
|
|
112
|
-
|
|
113
|
-
...
|
|
114
|
-
name:
|
|
115
|
-
})),
|
|
116
|
-
}, [
|
|
117
|
-
|
|
118
|
-
...
|
|
119
|
-
filters: typeof
|
|
120
|
-
})),
|
|
121
|
-
}, [
|
|
122
|
-
|
|
123
|
-
}, []),
|
|
124
|
-
|
|
168
|
+
})), c();
|
|
169
|
+
}, [c]), o = y((u, x) => {
|
|
170
|
+
R(u, { position: x });
|
|
171
|
+
}, [R]), E = y((u) => {
|
|
172
|
+
h(u);
|
|
173
|
+
}, []), L = i.widgets.find((u) => u.id === b) ?? null, O = y((u) => {
|
|
174
|
+
s((x) => ({
|
|
175
|
+
...x,
|
|
176
|
+
name: u
|
|
177
|
+
})), c();
|
|
178
|
+
}, [c]), t = y((u) => {
|
|
179
|
+
s((x) => ({
|
|
180
|
+
...x,
|
|
181
|
+
filters: typeof u == "function" ? u(x.filters) : u
|
|
182
|
+
})), c();
|
|
183
|
+
}, [c]), l = y((u) => {
|
|
184
|
+
s(u ?? Ce()), h(null), k.current = !1;
|
|
185
|
+
}, []), B = y((u) => {
|
|
186
|
+
s(u), h(null), k.current = !1;
|
|
125
187
|
}, []);
|
|
126
188
|
return {
|
|
127
189
|
state: {
|
|
128
|
-
config:
|
|
129
|
-
selectedWidgetId:
|
|
130
|
-
isDirty:
|
|
190
|
+
config: i,
|
|
191
|
+
selectedWidgetId: b,
|
|
192
|
+
isDirty: k.current
|
|
131
193
|
},
|
|
132
194
|
mode: p,
|
|
133
|
-
setMode:
|
|
134
|
-
addWidget:
|
|
135
|
-
addPrebuiltWidget:
|
|
136
|
-
removeWidget:
|
|
137
|
-
updateWidget:
|
|
138
|
-
moveWidget:
|
|
139
|
-
selectWidget:
|
|
140
|
-
selectedWidget:
|
|
141
|
-
setName:
|
|
142
|
-
setFilters:
|
|
143
|
-
resetConfig:
|
|
144
|
-
loadConfig:
|
|
195
|
+
setMode: j,
|
|
196
|
+
addWidget: f,
|
|
197
|
+
addPrebuiltWidget: g,
|
|
198
|
+
removeWidget: w,
|
|
199
|
+
updateWidget: R,
|
|
200
|
+
moveWidget: o,
|
|
201
|
+
selectWidget: E,
|
|
202
|
+
selectedWidget: L,
|
|
203
|
+
setName: O,
|
|
204
|
+
setFilters: t,
|
|
205
|
+
resetConfig: l,
|
|
206
|
+
loadConfig: B
|
|
145
207
|
};
|
|
146
208
|
}
|
|
147
|
-
var
|
|
209
|
+
var n = {
|
|
148
210
|
"rst-dashboard-builder": "_rst-dashboard-builder_ukxxh_2",
|
|
149
211
|
"rst-dashboard-builder-sidebar": "_rst-dashboard-builder-sidebar_ukxxh_18",
|
|
150
212
|
"rst-dashboard-builder-sidebar-header": "_rst-dashboard-builder-sidebar-header_ukxxh_28",
|
|
@@ -201,331 +263,331 @@ var d = {
|
|
|
201
263
|
"rst-dashboard-builder-template-item": "_rst-dashboard-builder-template-item_ukxxh_705",
|
|
202
264
|
"rst-dashboard-builder-template-item-name": "_rst-dashboard-builder-template-item-name_ukxxh_727",
|
|
203
265
|
"rst-dashboard-builder-template-item-desc": "_rst-dashboard-builder-template-item-desc_ukxxh_733"
|
|
204
|
-
},
|
|
205
|
-
function
|
|
206
|
-
const
|
|
207
|
-
colWidth: (
|
|
266
|
+
}, Q = 12, de = 30, oe = 12;
|
|
267
|
+
function nr({ widgets: r, onMoveWidget: a, onAddWidget: i, onChange: s }) {
|
|
268
|
+
const b = ie(null), [h, p] = D(null), [j, k] = D(null), [c, f] = D(null), [g, w] = D(null), [R, o] = D(!1), [E, L] = D(null), [O, t] = D(null), [l, B] = D(null), [u, x] = D(null), [W, d] = D(!1), C = y(() => b.current ? {
|
|
269
|
+
colWidth: (b.current.getBoundingClientRect().width - oe * (Q - 1)) / Q,
|
|
208
270
|
rowHeight: 92
|
|
209
|
-
} : null, []),
|
|
210
|
-
if (!
|
|
271
|
+
} : null, []), P = y((v, N) => {
|
|
272
|
+
if (!b.current) return {
|
|
211
273
|
col: 1,
|
|
212
274
|
row: 1
|
|
213
275
|
};
|
|
214
|
-
const
|
|
276
|
+
const z = b.current.getBoundingClientRect(), M = (z.width - oe * (Q - 1)) / Q;
|
|
215
277
|
return {
|
|
216
|
-
col: Math.max(1, Math.min(
|
|
217
|
-
row: Math.max(1, Math.min(
|
|
278
|
+
col: Math.max(1, Math.min(Q, Math.round((v - z.left) / (M + oe)) + 1)),
|
|
279
|
+
row: Math.max(1, Math.min(de, Math.round((N - z.top) / 92) + 1))
|
|
218
280
|
};
|
|
219
|
-
}, []),
|
|
220
|
-
if (
|
|
221
|
-
|
|
281
|
+
}, []), U = y((v) => {
|
|
282
|
+
if (v.preventDefault(), v.dataTransfer.types.includes("application/widget-type")) {
|
|
283
|
+
v.dataTransfer.dropEffect = "copy";
|
|
222
284
|
return;
|
|
223
285
|
}
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const
|
|
229
|
-
if (!
|
|
230
|
-
const
|
|
231
|
-
col: Math.max(1, Math.min(
|
|
232
|
-
row: Math.max(1, Math.min(
|
|
233
|
-
w:
|
|
234
|
-
h:
|
|
286
|
+
if (v.dataTransfer.types.includes("application/move-widget") && h && j && c) {
|
|
287
|
+
v.dataTransfer.dropEffect = "move";
|
|
288
|
+
const N = r.find((I) => I.id === h);
|
|
289
|
+
if (!N) return;
|
|
290
|
+
const z = C();
|
|
291
|
+
if (!z) return;
|
|
292
|
+
const M = v.clientX - j.x, G = v.clientY - j.y, ne = Math.round(M / (z.colWidth + oe)), Y = Math.round(G / z.rowHeight), H = {
|
|
293
|
+
col: Math.max(1, Math.min(Q - N.position.w + 1, c.col + ne)),
|
|
294
|
+
row: Math.max(1, Math.min(de - N.position.h + 1, c.row + Y)),
|
|
295
|
+
w: N.position.w,
|
|
296
|
+
h: N.position.h
|
|
235
297
|
};
|
|
236
|
-
|
|
237
|
-
const
|
|
238
|
-
|
|
298
|
+
w(H);
|
|
299
|
+
const T = be(H, r, h);
|
|
300
|
+
o(T !== null);
|
|
239
301
|
}
|
|
240
302
|
}, [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
303
|
+
h,
|
|
304
|
+
j,
|
|
305
|
+
c,
|
|
306
|
+
C,
|
|
245
307
|
r
|
|
246
|
-
]),
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const { col:
|
|
251
|
-
col:
|
|
252
|
-
row:
|
|
308
|
+
]), ee = y((v) => {
|
|
309
|
+
v.preventDefault();
|
|
310
|
+
const N = v.dataTransfer.getData("application/widget-type");
|
|
311
|
+
if (N) {
|
|
312
|
+
const { col: z, row: M } = P(v.clientX, v.clientY), G = {
|
|
313
|
+
col: z,
|
|
314
|
+
row: M,
|
|
253
315
|
w: 4,
|
|
254
316
|
h: 3
|
|
255
317
|
};
|
|
256
|
-
if (
|
|
257
|
-
|
|
318
|
+
if (z + 4 - 1 > Q && (G.col = 9), M + 3 - 1 > de && (G.row = 28), be(G, r)) return;
|
|
319
|
+
i(N, "", G), s();
|
|
258
320
|
return;
|
|
259
321
|
}
|
|
260
|
-
|
|
322
|
+
h && g && (!R && ye(g) && (a(h, g), s()), p(null), k(null), f(null), w(null), o(!1));
|
|
261
323
|
}, [
|
|
262
|
-
R,
|
|
263
|
-
r,
|
|
264
|
-
m,
|
|
265
|
-
c,
|
|
266
|
-
x,
|
|
267
|
-
I,
|
|
268
324
|
P,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
325
|
+
r,
|
|
326
|
+
i,
|
|
327
|
+
s,
|
|
328
|
+
h,
|
|
329
|
+
g,
|
|
330
|
+
R,
|
|
331
|
+
a
|
|
332
|
+
]), re = y((v, N) => {
|
|
333
|
+
v.stopPropagation(), v.dataTransfer.setData("application/move-widget", N.id), v.dataTransfer.effectAllowed = "move", p(N.id), k({
|
|
334
|
+
x: v.clientX,
|
|
335
|
+
y: v.clientY
|
|
336
|
+
}), f({ ...N.position }), w({ ...N.position }), o(!1);
|
|
337
|
+
}, []), _ = y(() => {
|
|
338
|
+
p(null), k(null), f(null), w(null), o(!1);
|
|
339
|
+
}, []), le = y((v, N, z) => {
|
|
340
|
+
v.stopPropagation(), v.preventDefault(), L(N.id), t(z), B({ ...N.position }), x({
|
|
341
|
+
x: v.clientX,
|
|
342
|
+
y: v.clientY
|
|
343
|
+
}), d(!1);
|
|
282
344
|
}, []);
|
|
283
|
-
return
|
|
284
|
-
if (!
|
|
285
|
-
const
|
|
286
|
-
if (!r.find((
|
|
287
|
-
const
|
|
288
|
-
if (!
|
|
289
|
-
const
|
|
290
|
-
let F = { ...
|
|
291
|
-
switch (
|
|
345
|
+
return se(() => {
|
|
346
|
+
if (!E || !O || !l || !u) return;
|
|
347
|
+
const v = (z) => {
|
|
348
|
+
if (!r.find((S) => S.id === E)) return;
|
|
349
|
+
const M = C();
|
|
350
|
+
if (!M) return;
|
|
351
|
+
const G = z.clientX - u.x, ne = z.clientY - u.y, Y = Math.round(G / (M.colWidth + oe)), H = Math.round(ne / M.rowHeight), T = l.col, I = l.row, q = l.w, K = l.h;
|
|
352
|
+
let F = { ...l };
|
|
353
|
+
switch (O) {
|
|
292
354
|
case "e": {
|
|
293
|
-
const
|
|
355
|
+
const S = Math.max(1, Math.min(Q - T + 1, q + Y));
|
|
294
356
|
F = {
|
|
295
357
|
...F,
|
|
296
|
-
w
|
|
358
|
+
w: S
|
|
297
359
|
};
|
|
298
360
|
break;
|
|
299
361
|
}
|
|
300
362
|
case "w": {
|
|
301
|
-
const
|
|
363
|
+
const S = Math.max(1, Math.min(T + q - 1, T + Y)), A = T + q - S;
|
|
302
364
|
F = {
|
|
303
|
-
...
|
|
304
|
-
col:
|
|
305
|
-
w: Math.max(1,
|
|
365
|
+
...l,
|
|
366
|
+
col: S,
|
|
367
|
+
w: Math.max(1, A)
|
|
306
368
|
};
|
|
307
369
|
break;
|
|
308
370
|
}
|
|
309
371
|
case "s": {
|
|
310
|
-
const
|
|
372
|
+
const S = Math.max(1, Math.min(de - I + 1, K + H));
|
|
311
373
|
F = {
|
|
312
|
-
...
|
|
313
|
-
h:
|
|
374
|
+
...l,
|
|
375
|
+
h: S
|
|
314
376
|
};
|
|
315
377
|
break;
|
|
316
378
|
}
|
|
317
379
|
case "n": {
|
|
318
|
-
const
|
|
380
|
+
const S = Math.max(1, Math.min(I + K - 1, I + H)), A = I + K - S;
|
|
319
381
|
F = {
|
|
320
|
-
...
|
|
321
|
-
row:
|
|
322
|
-
h: Math.max(1,
|
|
382
|
+
...l,
|
|
383
|
+
row: S,
|
|
384
|
+
h: Math.max(1, A)
|
|
323
385
|
};
|
|
324
386
|
break;
|
|
325
387
|
}
|
|
326
388
|
case "se": {
|
|
327
|
-
const
|
|
389
|
+
const S = Math.max(1, Math.min(Q - T + 1, q + Y)), A = Math.max(1, Math.min(de - I + 1, K + H));
|
|
328
390
|
F = {
|
|
329
|
-
...
|
|
330
|
-
w,
|
|
331
|
-
h:
|
|
391
|
+
...l,
|
|
392
|
+
w: S,
|
|
393
|
+
h: A
|
|
332
394
|
};
|
|
333
395
|
break;
|
|
334
396
|
}
|
|
335
397
|
case "sw": {
|
|
336
|
-
const
|
|
398
|
+
const S = Math.max(1, Math.min(T + q - 1, T + Y)), A = T + q - S, m = Math.max(1, Math.min(de - I + 1, K + H));
|
|
337
399
|
F = {
|
|
338
|
-
...
|
|
339
|
-
col:
|
|
340
|
-
w: Math.max(1,
|
|
341
|
-
h:
|
|
400
|
+
...l,
|
|
401
|
+
col: S,
|
|
402
|
+
w: Math.max(1, A),
|
|
403
|
+
h: m
|
|
342
404
|
};
|
|
343
405
|
break;
|
|
344
406
|
}
|
|
345
407
|
case "ne": {
|
|
346
|
-
const
|
|
408
|
+
const S = Math.max(1, Math.min(I + K - 1, I + H)), A = I + K - S, m = Math.max(1, Math.min(Q - T + 1, q + Y));
|
|
347
409
|
F = {
|
|
348
|
-
...
|
|
349
|
-
row:
|
|
350
|
-
h: Math.max(1,
|
|
351
|
-
w:
|
|
410
|
+
...l,
|
|
411
|
+
row: S,
|
|
412
|
+
h: Math.max(1, A),
|
|
413
|
+
w: m
|
|
352
414
|
};
|
|
353
415
|
break;
|
|
354
416
|
}
|
|
355
417
|
case "nw": {
|
|
356
|
-
const
|
|
418
|
+
const S = Math.max(1, Math.min(T + q - 1, T + Y)), A = Math.max(1, Math.min(I + K - 1, I + H)), m = T + q - S, $ = I + K - A;
|
|
357
419
|
F = {
|
|
358
|
-
col:
|
|
359
|
-
row:
|
|
360
|
-
w: Math.max(1,
|
|
361
|
-
h: Math.max(1,
|
|
420
|
+
col: S,
|
|
421
|
+
row: A,
|
|
422
|
+
w: Math.max(1, m),
|
|
423
|
+
h: Math.max(1, $)
|
|
362
424
|
};
|
|
363
425
|
break;
|
|
364
426
|
}
|
|
365
427
|
}
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
},
|
|
370
|
-
r.find((
|
|
428
|
+
w(F), p(E);
|
|
429
|
+
const ce = be(F, r, E);
|
|
430
|
+
d(ce !== null), o(ce !== null);
|
|
431
|
+
}, N = () => {
|
|
432
|
+
r.find((z) => z.id === E) && g && !W && ye(g) && (a(E, g), s()), L(null), t(null), B(null), x(null), d(!1), p(null), k(null), f(null), w(null), o(!1);
|
|
371
433
|
};
|
|
372
|
-
return document.addEventListener("mousemove",
|
|
373
|
-
document.removeEventListener("mousemove",
|
|
434
|
+
return document.addEventListener("mousemove", v), document.addEventListener("mouseup", N), () => {
|
|
435
|
+
document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", N);
|
|
374
436
|
};
|
|
375
437
|
}, [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
438
|
+
E,
|
|
439
|
+
O,
|
|
440
|
+
l,
|
|
441
|
+
u,
|
|
380
442
|
r,
|
|
381
|
-
I,
|
|
382
|
-
N,
|
|
383
443
|
g,
|
|
384
|
-
|
|
385
|
-
|
|
444
|
+
W,
|
|
445
|
+
C,
|
|
446
|
+
a,
|
|
447
|
+
s
|
|
386
448
|
]), {
|
|
387
|
-
gridRef:
|
|
388
|
-
draggingWidgetId:
|
|
389
|
-
dragPreviewPos:
|
|
390
|
-
hasCollision:
|
|
391
|
-
resizeCollision:
|
|
392
|
-
handleDragOver:
|
|
393
|
-
handleDrop:
|
|
394
|
-
handleWidgetDragStart:
|
|
395
|
-
handleWidgetDragEnd:
|
|
396
|
-
handleResizeStart:
|
|
397
|
-
pixelToGrid:
|
|
449
|
+
gridRef: b,
|
|
450
|
+
draggingWidgetId: h,
|
|
451
|
+
dragPreviewPos: g,
|
|
452
|
+
hasCollision: R,
|
|
453
|
+
resizeCollision: W,
|
|
454
|
+
handleDragOver: U,
|
|
455
|
+
handleDrop: ee,
|
|
456
|
+
handleWidgetDragStart: re,
|
|
457
|
+
handleWidgetDragEnd: _,
|
|
458
|
+
handleResizeStart: le,
|
|
459
|
+
pixelToGrid: P
|
|
398
460
|
};
|
|
399
461
|
}
|
|
400
|
-
var
|
|
401
|
-
const
|
|
462
|
+
var or = 12, lr = 20, De = ({ widgets: r, selectedWidgetId: a, dataSources: i, onSelectWidget: s, onMoveWidget: b, onRemoveWidget: h, onAddWidget: p, onChange: j, getWidgetActions: k, mode: c = "edit" }) => {
|
|
463
|
+
const f = c === "view", { gridRef: g, draggingWidgetId: w, dragPreviewPos: R, hasCollision: o, handleDragOver: E, handleDrop: L, handleWidgetDragStart: O, handleWidgetDragEnd: t, handleResizeStart: l } = nr({
|
|
402
464
|
widgets: r,
|
|
403
|
-
onMoveWidget:
|
|
465
|
+
onMoveWidget: b,
|
|
404
466
|
onAddWidget: p,
|
|
405
|
-
onChange:
|
|
406
|
-
}),
|
|
407
|
-
|
|
408
|
-
}, [
|
|
409
|
-
|
|
410
|
-
}, [
|
|
411
|
-
const
|
|
467
|
+
onChange: j
|
|
468
|
+
}), B = y((d, C) => {
|
|
469
|
+
d.stopPropagation(), s(C);
|
|
470
|
+
}, [s]), u = y(() => {
|
|
471
|
+
s(null);
|
|
472
|
+
}, [s]), x = y((d) => {
|
|
473
|
+
const C = i[d.dataSourceId]?.data ?? [], P = C.length > 0 ? Object.keys(C[0]) : [];
|
|
412
474
|
return {
|
|
413
|
-
data:
|
|
414
|
-
columns:
|
|
475
|
+
data: C,
|
|
476
|
+
columns: d.columns ?? ke(P)
|
|
415
477
|
};
|
|
416
|
-
}, [
|
|
417
|
-
for (let
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
className:
|
|
478
|
+
}, [i]), W = [];
|
|
479
|
+
for (let d = 1; d <= lr; d++) for (let C = 1; C <= or; C++) {
|
|
480
|
+
const P = f ? n["rst-dashboard-builder-grid-cell-view"] : n["rst-dashboard-builder-grid-cell"];
|
|
481
|
+
W.push(/* @__PURE__ */ (0, e.jsx)("div", {
|
|
482
|
+
className: P,
|
|
421
483
|
style: {
|
|
422
|
-
gridColumn:
|
|
423
|
-
gridRow:
|
|
484
|
+
gridColumn: C,
|
|
485
|
+
gridRow: d
|
|
424
486
|
}
|
|
425
|
-
}, `cell-${
|
|
487
|
+
}, `cell-${d}-${C}`));
|
|
426
488
|
}
|
|
427
489
|
return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
428
|
-
className:
|
|
429
|
-
onClick:
|
|
490
|
+
className: n["rst-dashboard-builder-canvas"],
|
|
491
|
+
onClick: u,
|
|
430
492
|
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
431
|
-
ref:
|
|
432
|
-
className:
|
|
433
|
-
onDragOver:
|
|
434
|
-
onDrop:
|
|
493
|
+
ref: g,
|
|
494
|
+
className: n["rst-dashboard-builder-grid"],
|
|
495
|
+
onDragOver: E,
|
|
496
|
+
onDrop: L,
|
|
435
497
|
children: [
|
|
436
|
-
|
|
498
|
+
W,
|
|
437
499
|
r.length === 0 && /* @__PURE__ */ (0, e.jsx)("div", {
|
|
438
|
-
className:
|
|
500
|
+
className: n["rst-dashboard-builder-grid-empty"],
|
|
439
501
|
children: "Drag a widget from the palette to get started"
|
|
440
502
|
}),
|
|
441
|
-
r.map((
|
|
442
|
-
const
|
|
503
|
+
r.map((d) => {
|
|
504
|
+
const C = !f && d.id === a, P = !f && d.id === w, U = x(d), ee = P && R ? R : d.position, re = P && o;
|
|
443
505
|
return /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
444
506
|
className: [
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
507
|
+
n["rst-dashboard-builder-widget"],
|
|
508
|
+
f ? n["rst-dashboard-builder-widget-view"] : "",
|
|
509
|
+
C ? n["rst-dashboard-builder-widget-selected"] : "",
|
|
510
|
+
P ? n["rst-dashboard-builder-widget-dragging"] : "",
|
|
511
|
+
re ? n["rst-dashboard-builder-widget-collision"] : ""
|
|
450
512
|
].filter(Boolean).join(" "),
|
|
451
513
|
style: {
|
|
452
|
-
gridColumn: `${
|
|
453
|
-
gridRow: `${
|
|
514
|
+
gridColumn: `${ee.col} / span ${ee.w}`,
|
|
515
|
+
gridRow: `${ee.row} / span ${ee.h}`
|
|
454
516
|
},
|
|
455
|
-
draggable: !
|
|
456
|
-
...
|
|
457
|
-
onDragStart: (
|
|
458
|
-
onDragEnd:
|
|
459
|
-
onClick: (
|
|
517
|
+
draggable: !f,
|
|
518
|
+
...f ? {} : {
|
|
519
|
+
onDragStart: (_) => O(_, d),
|
|
520
|
+
onDragEnd: t,
|
|
521
|
+
onClick: (_) => B(_, d.id),
|
|
460
522
|
role: "button",
|
|
461
523
|
tabIndex: 0,
|
|
462
|
-
"aria-label": `Widget: ${
|
|
463
|
-
onKeyDown: (
|
|
464
|
-
(
|
|
524
|
+
"aria-label": `Widget: ${d.title}`,
|
|
525
|
+
onKeyDown: (_) => {
|
|
526
|
+
(_.key === "Enter" || _.key === " ") && (_.preventDefault(), s(d.id)), (_.key === "Delete" || _.key === "Backspace") && (_.preventDefault(), h(d.id), j());
|
|
465
527
|
}
|
|
466
528
|
},
|
|
467
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
468
|
-
id:
|
|
469
|
-
dataSourceId:
|
|
470
|
-
title:
|
|
471
|
-
subtitle:
|
|
472
|
-
icon:
|
|
473
|
-
data:
|
|
474
|
-
columns:
|
|
475
|
-
enableExport:
|
|
476
|
-
enableScreenshot:
|
|
477
|
-
enableExpand:
|
|
478
|
-
enableFilter:
|
|
479
|
-
fieldOptions:
|
|
480
|
-
children: ({ data:
|
|
481
|
-
data:
|
|
482
|
-
columns:
|
|
483
|
-
activeComponent:
|
|
484
|
-
componentProps:
|
|
529
|
+
children: [/* @__PURE__ */ (0, e.jsx)(Xe, {
|
|
530
|
+
id: d.id,
|
|
531
|
+
dataSourceId: d.dataSourceId,
|
|
532
|
+
title: d.title,
|
|
533
|
+
subtitle: d.subtitle,
|
|
534
|
+
icon: d.icon,
|
|
535
|
+
data: U.data,
|
|
536
|
+
columns: U.columns,
|
|
537
|
+
enableExport: k?.(d).enableExport ?? !0,
|
|
538
|
+
enableScreenshot: k?.(d).enableScreenshot ?? !1,
|
|
539
|
+
enableExpand: k?.(d).enableExpand ?? !0,
|
|
540
|
+
enableFilter: k?.(d).enableFilter ?? !1,
|
|
541
|
+
fieldOptions: Ne(U.columns),
|
|
542
|
+
children: ({ data: _ }) => /* @__PURE__ */ (0, e.jsx)(Je, {
|
|
543
|
+
data: _,
|
|
544
|
+
columns: U.columns,
|
|
545
|
+
activeComponent: d.componentType,
|
|
546
|
+
componentProps: d.componentProps,
|
|
485
547
|
showConfigurator: !1
|
|
486
548
|
})
|
|
487
|
-
}), !
|
|
549
|
+
}), !f && C && /* @__PURE__ */ (0, e.jsxs)(e.Fragment, { children: [
|
|
488
550
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
489
|
-
className:
|
|
490
|
-
onMouseDown: (
|
|
551
|
+
className: n["rst-dashboard-builder-resize-handle-n"],
|
|
552
|
+
onMouseDown: (_) => l(_, d, "n")
|
|
491
553
|
}),
|
|
492
554
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
493
|
-
className:
|
|
494
|
-
onMouseDown: (
|
|
555
|
+
className: n["rst-dashboard-builder-resize-handle-s"],
|
|
556
|
+
onMouseDown: (_) => l(_, d, "s")
|
|
495
557
|
}),
|
|
496
558
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
497
|
-
className:
|
|
498
|
-
onMouseDown: (
|
|
559
|
+
className: n["rst-dashboard-builder-resize-handle-e"],
|
|
560
|
+
onMouseDown: (_) => l(_, d, "e")
|
|
499
561
|
}),
|
|
500
562
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
501
|
-
className:
|
|
502
|
-
onMouseDown: (
|
|
563
|
+
className: n["rst-dashboard-builder-resize-handle-w"],
|
|
564
|
+
onMouseDown: (_) => l(_, d, "w")
|
|
503
565
|
}),
|
|
504
566
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
505
|
-
className:
|
|
506
|
-
onMouseDown: (
|
|
567
|
+
className: n["rst-dashboard-builder-resize-handle-ne"],
|
|
568
|
+
onMouseDown: (_) => l(_, d, "ne")
|
|
507
569
|
}),
|
|
508
570
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
509
|
-
className:
|
|
510
|
-
onMouseDown: (
|
|
571
|
+
className: n["rst-dashboard-builder-resize-handle-nw"],
|
|
572
|
+
onMouseDown: (_) => l(_, d, "nw")
|
|
511
573
|
}),
|
|
512
574
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
513
|
-
className:
|
|
514
|
-
onMouseDown: (
|
|
575
|
+
className: n["rst-dashboard-builder-resize-handle-se"],
|
|
576
|
+
onMouseDown: (_) => l(_, d, "se")
|
|
515
577
|
}),
|
|
516
578
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
517
|
-
className:
|
|
518
|
-
onMouseDown: (
|
|
579
|
+
className: n["rst-dashboard-builder-resize-handle-sw"],
|
|
580
|
+
onMouseDown: (_) => l(_, d, "sw")
|
|
519
581
|
})
|
|
520
582
|
] })]
|
|
521
|
-
}, `${
|
|
583
|
+
}, `${d.id}::${d.dataSourceId}`);
|
|
522
584
|
})
|
|
523
585
|
]
|
|
524
586
|
})
|
|
525
587
|
});
|
|
526
588
|
};
|
|
527
|
-
|
|
528
|
-
var
|
|
589
|
+
De.displayName = "BuilderCanvas";
|
|
590
|
+
var cr = [
|
|
529
591
|
{
|
|
530
592
|
type: "table-grid",
|
|
531
593
|
label: "Table",
|
|
@@ -568,349 +630,349 @@ var Xe = [
|
|
|
568
630
|
icon: "chart",
|
|
569
631
|
description: "Single-metric KPI card"
|
|
570
632
|
}
|
|
571
|
-
],
|
|
572
|
-
const
|
|
573
|
-
value:
|
|
574
|
-
label:
|
|
575
|
-
})),
|
|
633
|
+
], ze = ({ widget: r, dataSources: a, onUpdate: i, onRemove: s, onClose: b, onAddWidget: h, prebuiltSections: p, onAddPrebuiltSection: j }) => {
|
|
634
|
+
const k = Object.values(a).map((t) => ({
|
|
635
|
+
value: t.id,
|
|
636
|
+
label: t.name
|
|
637
|
+
})), c = X(() => [{
|
|
576
638
|
value: "",
|
|
577
639
|
id: "none"
|
|
578
|
-
}, ...Object.keys(
|
|
579
|
-
value:
|
|
580
|
-
leadingVisual:
|
|
581
|
-
}))], []),
|
|
582
|
-
if (!
|
|
583
|
-
const
|
|
584
|
-
return
|
|
585
|
-
id:
|
|
586
|
-
header:
|
|
587
|
-
accessorKey:
|
|
640
|
+
}, ...Object.keys(He).map((t) => ({
|
|
641
|
+
value: t,
|
|
642
|
+
leadingVisual: t
|
|
643
|
+
}))], []), f = r?.dataSourceId, g = X(() => {
|
|
644
|
+
if (!f) return [];
|
|
645
|
+
const t = a[f];
|
|
646
|
+
return t ? t.fields.map((l) => ({
|
|
647
|
+
id: l.id,
|
|
648
|
+
header: l.name,
|
|
649
|
+
accessorKey: l.id
|
|
588
650
|
})) : [];
|
|
589
|
-
}, [
|
|
590
|
-
|
|
591
|
-
}, [
|
|
592
|
-
|
|
593
|
-
componentType:
|
|
594
|
-
componentProps:
|
|
651
|
+
}, [f, a]), w = X(() => pe[r?.componentType ?? "table-grid"] ?? [], [r?.componentType]), R = X(() => r?.componentProps ?? xe(w), [r?.componentProps, w]), o = y((t, l) => {
|
|
652
|
+
i({ [t]: l });
|
|
653
|
+
}, [i]), E = y((t) => {
|
|
654
|
+
i({
|
|
655
|
+
componentType: t,
|
|
656
|
+
componentProps: xe(pe[t] ?? [])
|
|
595
657
|
});
|
|
596
|
-
}, [
|
|
597
|
-
|
|
598
|
-
...
|
|
599
|
-
[
|
|
658
|
+
}, [i]), L = y((t, l) => {
|
|
659
|
+
i({ componentProps: {
|
|
660
|
+
...R,
|
|
661
|
+
[t]: l
|
|
600
662
|
} });
|
|
601
|
-
}, [
|
|
663
|
+
}, [R, i]), O = X(() => !p || p.length === 0 ? [] : p.filter((t) => t.version === 1), [p]);
|
|
602
664
|
return r ? /* @__PURE__ */ (0, e.jsxs)("aside", {
|
|
603
|
-
className:
|
|
665
|
+
className: n["rst-dashboard-builder-configurator"],
|
|
604
666
|
"aria-label": "Widget configurator",
|
|
605
667
|
children: [/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
606
|
-
className:
|
|
607
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
668
|
+
className: n["rst-dashboard-builder-configurator-header"],
|
|
669
|
+
children: [/* @__PURE__ */ (0, e.jsx)(te, {
|
|
608
670
|
variant: "heading",
|
|
609
671
|
children: "Configure"
|
|
610
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
672
|
+
}), /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
611
673
|
variant: "invisible",
|
|
612
674
|
size: "small",
|
|
613
675
|
leadingVisual: "close",
|
|
614
|
-
onClick:
|
|
676
|
+
onClick: b,
|
|
615
677
|
"aria-label": "Close configurator"
|
|
616
678
|
})]
|
|
617
679
|
}), /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
618
|
-
className:
|
|
680
|
+
className: n["rst-dashboard-builder-configurator-body"],
|
|
619
681
|
children: [
|
|
620
682
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
621
|
-
className:
|
|
683
|
+
className: n["rst-dashboard-builder-field"],
|
|
622
684
|
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
623
|
-
className:
|
|
685
|
+
className: n["rst-dashboard-builder-field-label"],
|
|
624
686
|
children: "Title"
|
|
625
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
687
|
+
}), /* @__PURE__ */ (0, e.jsx)(_e, {
|
|
626
688
|
value: r.title,
|
|
627
|
-
onChange: (
|
|
689
|
+
onChange: (t) => o("title", t ?? ""),
|
|
628
690
|
placeholder: "Widget title"
|
|
629
691
|
})]
|
|
630
692
|
}),
|
|
631
693
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
632
|
-
className:
|
|
694
|
+
className: n["rst-dashboard-builder-field"],
|
|
633
695
|
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
634
|
-
className:
|
|
696
|
+
className: n["rst-dashboard-builder-field-label"],
|
|
635
697
|
children: "Subtitle"
|
|
636
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
698
|
+
}), /* @__PURE__ */ (0, e.jsx)(_e, {
|
|
637
699
|
value: r.subtitle ?? "",
|
|
638
|
-
onChange: (
|
|
700
|
+
onChange: (t) => o("subtitle", t || void 0),
|
|
639
701
|
placeholder: "Optional subtitle"
|
|
640
702
|
})]
|
|
641
703
|
}),
|
|
642
704
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
643
|
-
className:
|
|
705
|
+
className: n["rst-dashboard-builder-field"],
|
|
644
706
|
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
645
|
-
className:
|
|
707
|
+
className: n["rst-dashboard-builder-field-label"],
|
|
646
708
|
children: "Icon"
|
|
647
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
709
|
+
}), /* @__PURE__ */ (0, e.jsx)(ge, {
|
|
648
710
|
value: r.icon ?? "",
|
|
649
|
-
onChange: (
|
|
650
|
-
options:
|
|
651
|
-
renderList: ({ options:
|
|
652
|
-
options:
|
|
653
|
-
activeIndex: [typeof
|
|
654
|
-
onClick: (
|
|
655
|
-
|
|
711
|
+
onChange: (t) => o("icon", t || void 0),
|
|
712
|
+
options: c,
|
|
713
|
+
renderList: ({ options: t, value: l, onChange: B, onClose: u }) => /* @__PURE__ */ (0, e.jsx)(Te, {
|
|
714
|
+
options: t,
|
|
715
|
+
activeIndex: [typeof l == "string" ? l : ""],
|
|
716
|
+
onClick: (x) => {
|
|
717
|
+
B(x.value), u();
|
|
656
718
|
},
|
|
657
719
|
showFilter: !0
|
|
658
720
|
})
|
|
659
721
|
})]
|
|
660
722
|
}),
|
|
661
723
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
662
|
-
className:
|
|
724
|
+
className: n["rst-dashboard-builder-field"],
|
|
663
725
|
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
664
|
-
className:
|
|
726
|
+
className: n["rst-dashboard-builder-field-label"],
|
|
665
727
|
children: "Data Source"
|
|
666
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
728
|
+
}), /* @__PURE__ */ (0, e.jsx)(ge, {
|
|
667
729
|
value: r.dataSourceId,
|
|
668
|
-
onChange: (
|
|
669
|
-
options:
|
|
730
|
+
onChange: (t) => o("dataSourceId", t),
|
|
731
|
+
options: k
|
|
670
732
|
})]
|
|
671
733
|
}),
|
|
672
|
-
r.dataSourceId &&
|
|
673
|
-
className:
|
|
734
|
+
r.dataSourceId && a[r.dataSourceId] && /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
735
|
+
className: n["rst-dashboard-builder-field"],
|
|
674
736
|
children: [/* @__PURE__ */ (0, e.jsx)("label", {
|
|
675
|
-
className:
|
|
737
|
+
className: n["rst-dashboard-builder-field-label"],
|
|
676
738
|
children: "Columns"
|
|
677
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
678
|
-
options:
|
|
679
|
-
value:
|
|
680
|
-
label:
|
|
739
|
+
}), /* @__PURE__ */ (0, e.jsx)($e, {
|
|
740
|
+
options: a[r.dataSourceId].fields.map((t) => ({
|
|
741
|
+
value: t.id,
|
|
742
|
+
label: t.name
|
|
681
743
|
})),
|
|
682
|
-
value: r.columns?.map((
|
|
683
|
-
onChange: (
|
|
684
|
-
const
|
|
685
|
-
id:
|
|
686
|
-
header:
|
|
687
|
-
accessorKey:
|
|
744
|
+
value: r.columns?.map((t) => t.id).filter(Boolean) ?? a[r.dataSourceId].fields.map((t) => t.id),
|
|
745
|
+
onChange: (t) => {
|
|
746
|
+
const l = a[r.dataSourceId], B = t.map((u) => l.fields.find((x) => x.id === u)).filter(Boolean).map((u) => ({
|
|
747
|
+
id: u.id,
|
|
748
|
+
header: u.name,
|
|
749
|
+
accessorKey: u.id
|
|
688
750
|
}));
|
|
689
|
-
|
|
751
|
+
i({ columns: B.length === l.fields.length ? void 0 : B });
|
|
690
752
|
}
|
|
691
753
|
})]
|
|
692
754
|
}),
|
|
693
755
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
694
|
-
className:
|
|
756
|
+
className: n["rst-dashboard-builder-field"],
|
|
695
757
|
children: [
|
|
696
758
|
/* @__PURE__ */ (0, e.jsx)("label", {
|
|
697
|
-
className:
|
|
759
|
+
className: n["rst-dashboard-builder-field-label"],
|
|
698
760
|
children: "Actions"
|
|
699
761
|
}),
|
|
700
762
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
701
|
-
className:
|
|
702
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
763
|
+
className: n["rst-dashboard-builder-checkbox-row"],
|
|
764
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ue, {
|
|
703
765
|
checked: r.enableExport ?? !0,
|
|
704
|
-
onChange: (
|
|
766
|
+
onChange: (t) => o("enableExport", t)
|
|
705
767
|
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
706
|
-
className:
|
|
768
|
+
className: n["rst-dashboard-builder-checkbox-label"],
|
|
707
769
|
children: "Export CSV"
|
|
708
770
|
})]
|
|
709
771
|
}),
|
|
710
772
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
711
|
-
className:
|
|
712
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
773
|
+
className: n["rst-dashboard-builder-checkbox-row"],
|
|
774
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ue, {
|
|
713
775
|
checked: r.enableScreenshot ?? !1,
|
|
714
|
-
onChange: (
|
|
776
|
+
onChange: (t) => o("enableScreenshot", t)
|
|
715
777
|
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
716
|
-
className:
|
|
778
|
+
className: n["rst-dashboard-builder-checkbox-label"],
|
|
717
779
|
children: "Screenshot"
|
|
718
780
|
})]
|
|
719
781
|
}),
|
|
720
782
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
721
|
-
className:
|
|
722
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
783
|
+
className: n["rst-dashboard-builder-checkbox-row"],
|
|
784
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ue, {
|
|
723
785
|
checked: r.enableExpand ?? !0,
|
|
724
|
-
onChange: (
|
|
786
|
+
onChange: (t) => o("enableExpand", t)
|
|
725
787
|
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
726
|
-
className:
|
|
788
|
+
className: n["rst-dashboard-builder-checkbox-label"],
|
|
727
789
|
children: "Expand"
|
|
728
790
|
})]
|
|
729
791
|
}),
|
|
730
792
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
731
|
-
className:
|
|
732
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
793
|
+
className: n["rst-dashboard-builder-checkbox-row"],
|
|
794
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ue, {
|
|
733
795
|
checked: r.enableFilter ?? !0,
|
|
734
|
-
onChange: (
|
|
796
|
+
onChange: (t) => o("enableFilter", t)
|
|
735
797
|
}), /* @__PURE__ */ (0, e.jsx)("span", {
|
|
736
|
-
className:
|
|
798
|
+
className: n["rst-dashboard-builder-checkbox-label"],
|
|
737
799
|
children: "Filter"
|
|
738
800
|
})]
|
|
739
801
|
})
|
|
740
802
|
]
|
|
741
803
|
}),
|
|
742
|
-
/* @__PURE__ */ (0, e.jsx)("div", { className:
|
|
743
|
-
/* @__PURE__ */ (0, e.jsx)(
|
|
744
|
-
schema:
|
|
745
|
-
values:
|
|
746
|
-
onChange:
|
|
747
|
-
columns:
|
|
804
|
+
/* @__PURE__ */ (0, e.jsx)("div", { className: n["rst-dashboard-builder-configurator-divider"] }),
|
|
805
|
+
/* @__PURE__ */ (0, e.jsx)(Le, {
|
|
806
|
+
schema: w,
|
|
807
|
+
values: R,
|
|
808
|
+
onChange: L,
|
|
809
|
+
columns: g,
|
|
748
810
|
scope: "all",
|
|
749
811
|
componentId: r.componentType,
|
|
750
|
-
onComponentChange:
|
|
751
|
-
componentMetaList:
|
|
812
|
+
onComponentChange: E,
|
|
813
|
+
componentMetaList: Pe
|
|
752
814
|
}, r.dataSourceId ?? "no-ds"),
|
|
753
|
-
/* @__PURE__ */ (0, e.jsx)("div", { className:
|
|
754
|
-
/* @__PURE__ */ (0, e.jsx)(
|
|
815
|
+
/* @__PURE__ */ (0, e.jsx)("div", { className: n["rst-dashboard-builder-configurator-divider"] }),
|
|
816
|
+
/* @__PURE__ */ (0, e.jsx)(Z, {
|
|
755
817
|
variant: "danger",
|
|
756
818
|
size: "small",
|
|
757
819
|
value: "Remove widget",
|
|
758
820
|
leadingVisual: "trash",
|
|
759
|
-
onClick:
|
|
821
|
+
onClick: s
|
|
760
822
|
})
|
|
761
823
|
]
|
|
762
824
|
})]
|
|
763
825
|
}) : /* @__PURE__ */ (0, e.jsxs)("aside", {
|
|
764
|
-
className:
|
|
826
|
+
className: n["rst-dashboard-builder-configurator"],
|
|
765
827
|
"aria-label": "Add widget",
|
|
766
828
|
children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
767
|
-
className:
|
|
768
|
-
children: /* @__PURE__ */ (0, e.jsx)(
|
|
829
|
+
className: n["rst-dashboard-builder-configurator-header"],
|
|
830
|
+
children: /* @__PURE__ */ (0, e.jsx)(te, {
|
|
769
831
|
variant: "heading",
|
|
770
832
|
children: "Add Widget"
|
|
771
833
|
})
|
|
772
834
|
}), /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
773
|
-
className:
|
|
774
|
-
children: [
|
|
775
|
-
className:
|
|
776
|
-
onClick: () =>
|
|
777
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
778
|
-
className:
|
|
779
|
-
children:
|
|
835
|
+
className: n["rst-dashboard-builder-configurator-body"],
|
|
836
|
+
children: [cr.map((t) => /* @__PURE__ */ (0, e.jsxs)("button", {
|
|
837
|
+
className: n["rst-dashboard-builder-add-widget-item"],
|
|
838
|
+
onClick: () => h(t.type),
|
|
839
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ve, { src: t.icon }), /* @__PURE__ */ (0, e.jsxs)("div", { children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
840
|
+
className: n["rst-dashboard-builder-add-widget-item-label"],
|
|
841
|
+
children: t.label
|
|
780
842
|
}), /* @__PURE__ */ (0, e.jsx)("div", {
|
|
781
|
-
className:
|
|
782
|
-
children:
|
|
843
|
+
className: n["rst-dashboard-builder-add-widget-item-desc"],
|
|
844
|
+
children: t.description
|
|
783
845
|
})] })]
|
|
784
|
-
},
|
|
785
|
-
/* @__PURE__ */ (0, e.jsx)("div", { className:
|
|
786
|
-
/* @__PURE__ */ (0, e.jsx)(
|
|
846
|
+
}, t.type)), O.length > 0 && /* @__PURE__ */ (0, e.jsxs)(e.Fragment, { children: [
|
|
847
|
+
/* @__PURE__ */ (0, e.jsx)("div", { className: n["rst-dashboard-builder-configurator-divider"] }),
|
|
848
|
+
/* @__PURE__ */ (0, e.jsx)(te, {
|
|
787
849
|
variant: "heading",
|
|
788
850
|
children: "Pre-built Sections"
|
|
789
851
|
}),
|
|
790
|
-
|
|
791
|
-
className:
|
|
792
|
-
onClick: () =>
|
|
793
|
-
children: [/* @__PURE__ */ (0, e.jsx)(
|
|
794
|
-
className:
|
|
795
|
-
children:
|
|
852
|
+
O.map((t) => /* @__PURE__ */ (0, e.jsxs)("button", {
|
|
853
|
+
className: n["rst-dashboard-builder-add-widget-item"],
|
|
854
|
+
onClick: () => j?.(t),
|
|
855
|
+
children: [/* @__PURE__ */ (0, e.jsx)(ve, { src: "layout" }), /* @__PURE__ */ (0, e.jsxs)("div", { children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
856
|
+
className: n["rst-dashboard-builder-add-widget-item-label"],
|
|
857
|
+
children: t.name
|
|
796
858
|
}), /* @__PURE__ */ (0, e.jsx)("div", {
|
|
797
|
-
className:
|
|
798
|
-
children:
|
|
859
|
+
className: n["rst-dashboard-builder-add-widget-item-desc"],
|
|
860
|
+
children: t.description
|
|
799
861
|
})] })]
|
|
800
|
-
},
|
|
862
|
+
}, t.name))
|
|
801
863
|
] })]
|
|
802
864
|
})]
|
|
803
865
|
});
|
|
804
866
|
};
|
|
805
|
-
|
|
806
|
-
var
|
|
807
|
-
const { state:
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}, [
|
|
811
|
-
const
|
|
812
|
-
|
|
867
|
+
ze.displayName = "WidgetConfigurator";
|
|
868
|
+
var ur = ({ dataSources: r, initialConfig: a, templates: i, prebuiltSections: s, onSave: b, onChange: h, widgetActionDefaults: p, readOnly: j, className: k }) => {
|
|
869
|
+
const { state: c, mode: f, setMode: g, addWidget: w, addPrebuiltWidget: R, removeWidget: o, updateWidget: E, moveWidget: L, selectWidget: O, selectedWidget: t, setName: l, setFilters: B, loadConfig: u } = ir(a, j), [x, W] = D(!1), [d, C] = D("dialog"), [P, U] = D(null), [ee, re] = D(null), [_, le] = D(!1), [v, N] = D(null), z = X(() => dr(c.config.widgets, r), [c.config.widgets, r]), M = f === "view", G = M ? ee : c.config.filters;
|
|
870
|
+
se(() => {
|
|
871
|
+
x && N(G);
|
|
872
|
+
}, [x]);
|
|
873
|
+
const ne = y(() => {
|
|
874
|
+
M ? re(v) : B(v), W(!1);
|
|
813
875
|
}, [
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
876
|
+
v,
|
|
877
|
+
M,
|
|
878
|
+
B
|
|
817
879
|
]);
|
|
818
|
-
|
|
819
|
-
|
|
880
|
+
se(() => {
|
|
881
|
+
M && !_ && (re(c.config.filters), le(!0)), M || le(!1);
|
|
820
882
|
}, [
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
883
|
+
M,
|
|
884
|
+
_,
|
|
885
|
+
c.config.filters
|
|
824
886
|
]);
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
(
|
|
887
|
+
const Y = ie(h);
|
|
888
|
+
Y.current = h;
|
|
889
|
+
const H = y((m, $) => {
|
|
890
|
+
(M ? re : B)((ae) => ({
|
|
829
891
|
...ae ?? {},
|
|
830
|
-
[
|
|
892
|
+
[m]: $
|
|
831
893
|
}));
|
|
832
|
-
}, [
|
|
833
|
-
filters:
|
|
834
|
-
onFilterChange:
|
|
835
|
-
}), [
|
|
836
|
-
value:
|
|
837
|
-
id:
|
|
838
|
-
description:
|
|
839
|
-
})), [
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
894
|
+
}, [M, B]), T = X(() => ({
|
|
895
|
+
filters: G,
|
|
896
|
+
onFilterChange: H
|
|
897
|
+
}), [G, H]), I = X(() => !i || i.length === 0 ? [] : i.filter((m) => m.version === 1), [i]), q = X(() => I.map((m) => ({
|
|
898
|
+
value: m.name,
|
|
899
|
+
id: m.name,
|
|
900
|
+
description: m.description
|
|
901
|
+
})), [I]), K = y((m) => {
|
|
902
|
+
const $ = I.find((J) => J.name === m);
|
|
903
|
+
if (!$) return;
|
|
842
904
|
const ae = {
|
|
843
905
|
version: 1,
|
|
844
|
-
|
|
906
|
+
...$.config
|
|
845
907
|
};
|
|
846
|
-
|
|
847
|
-
}, [
|
|
908
|
+
u(ae);
|
|
909
|
+
}, [I, u]), F = X(() => ({
|
|
848
910
|
enableExport: p?.enableExport ?? !0,
|
|
849
911
|
enableScreenshot: p?.enableScreenshot ?? !1,
|
|
850
912
|
enableExpand: p?.enableExpand ?? !0,
|
|
851
913
|
enableFilter: p?.enableFilter ?? !0
|
|
852
|
-
}), [p]),
|
|
853
|
-
enableExport:
|
|
854
|
-
enableScreenshot:
|
|
855
|
-
enableExpand:
|
|
856
|
-
enableFilter:
|
|
914
|
+
}), [p]), ce = y((m) => ({
|
|
915
|
+
enableExport: m.enableExport ?? F.enableExport,
|
|
916
|
+
enableScreenshot: m.enableScreenshot ?? F.enableScreenshot,
|
|
917
|
+
enableExpand: m.enableExpand ?? F.enableExpand,
|
|
918
|
+
enableFilter: m.enableFilter ?? F.enableFilter
|
|
857
919
|
}), [F]);
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}, [
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
}, [
|
|
920
|
+
se(() => {
|
|
921
|
+
Y.current?.(c.config);
|
|
922
|
+
}, [c.config]);
|
|
923
|
+
const S = [n["rst-dashboard-builder"], k].filter(Boolean).join(" "), A = y(() => {
|
|
924
|
+
b(c.config);
|
|
925
|
+
}, [c.config, b]);
|
|
864
926
|
return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
865
|
-
className:
|
|
927
|
+
className: S,
|
|
866
928
|
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
867
|
-
className:
|
|
929
|
+
className: n["rst-dashboard-builder-main"],
|
|
868
930
|
children: [/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
869
|
-
className:
|
|
931
|
+
className: n["rst-dashboard-builder-toolbar"],
|
|
870
932
|
children: [/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
871
|
-
className:
|
|
872
|
-
children: [
|
|
873
|
-
className:
|
|
874
|
-
children:
|
|
933
|
+
className: n["rst-dashboard-builder-toolbar-left"],
|
|
934
|
+
children: [M ? /* @__PURE__ */ (0, e.jsx)("span", {
|
|
935
|
+
className: n["rst-dashboard-builder-name-display"],
|
|
936
|
+
children: c.config.name
|
|
875
937
|
}) : /* @__PURE__ */ (0, e.jsx)("input", {
|
|
876
|
-
className:
|
|
938
|
+
className: n["rst-dashboard-builder-name-input"],
|
|
877
939
|
type: "text",
|
|
878
|
-
value:
|
|
879
|
-
onChange: (
|
|
940
|
+
value: c.config.name,
|
|
941
|
+
onChange: (m) => l(m.target.value),
|
|
880
942
|
placeholder: "Dashboard name",
|
|
881
943
|
"aria-label": "Dashboard name"
|
|
882
|
-
}), Object.keys(
|
|
944
|
+
}), Object.keys(z).length > 0 && /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
883
945
|
variant: "invisible",
|
|
884
946
|
size: "small",
|
|
885
947
|
leadingVisual: "filter",
|
|
886
|
-
onClick: () =>
|
|
948
|
+
onClick: () => W((m) => !m),
|
|
887
949
|
"aria-label": "Toggle filter panel",
|
|
888
|
-
"aria-pressed":
|
|
950
|
+
"aria-pressed": x
|
|
889
951
|
})]
|
|
890
952
|
}), /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
891
|
-
className:
|
|
953
|
+
className: n["rst-dashboard-builder-toolbar-right"],
|
|
892
954
|
children: [
|
|
893
|
-
|
|
894
|
-
options:
|
|
895
|
-
onChange:
|
|
955
|
+
I.length > 0 && !M && /* @__PURE__ */ (0, e.jsx)(Oe, {
|
|
956
|
+
options: q,
|
|
957
|
+
onChange: K,
|
|
896
958
|
placeholder: "Load Template",
|
|
897
959
|
size: "small"
|
|
898
960
|
}),
|
|
899
|
-
!
|
|
900
|
-
value:
|
|
961
|
+
!j && /* @__PURE__ */ (0, e.jsx)(Ee, {
|
|
962
|
+
value: f,
|
|
901
963
|
options: [{ value: "edit" }, { value: "view" }],
|
|
902
|
-
onChange: (
|
|
964
|
+
onChange: (m) => g(m)
|
|
903
965
|
}),
|
|
904
|
-
!
|
|
966
|
+
!M && /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
905
967
|
variant: "primary",
|
|
906
968
|
size: "small",
|
|
907
969
|
value: "Save",
|
|
908
|
-
onClick:
|
|
970
|
+
onClick: A
|
|
909
971
|
})
|
|
910
972
|
]
|
|
911
973
|
})]
|
|
912
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
913
|
-
value:
|
|
974
|
+
}), /* @__PURE__ */ (0, e.jsx)(Ve, {
|
|
975
|
+
value: T,
|
|
914
976
|
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
915
977
|
style: {
|
|
916
978
|
display: "flex",
|
|
@@ -918,100 +980,100 @@ var Ke = ({ dataSources: r, initialConfig: u, templates: m, prebuiltSections: c,
|
|
|
918
980
|
overflow: "hidden"
|
|
919
981
|
},
|
|
920
982
|
children: [
|
|
921
|
-
/* @__PURE__ */ (0, e.jsx)(
|
|
922
|
-
mode:
|
|
923
|
-
widgets:
|
|
924
|
-
selectedWidgetId:
|
|
983
|
+
/* @__PURE__ */ (0, e.jsx)(De, {
|
|
984
|
+
mode: f,
|
|
985
|
+
widgets: c.config.widgets,
|
|
986
|
+
selectedWidgetId: c.selectedWidgetId,
|
|
925
987
|
dataSources: r,
|
|
926
|
-
onSelectWidget:
|
|
927
|
-
onMoveWidget:
|
|
928
|
-
onRemoveWidget:
|
|
929
|
-
onAddWidget:
|
|
988
|
+
onSelectWidget: O,
|
|
989
|
+
onMoveWidget: L,
|
|
990
|
+
onRemoveWidget: o,
|
|
991
|
+
onAddWidget: w,
|
|
930
992
|
onChange: () => {
|
|
931
993
|
},
|
|
932
|
-
getWidgetActions:
|
|
994
|
+
getWidgetActions: ce
|
|
933
995
|
}),
|
|
934
|
-
|
|
935
|
-
open:
|
|
936
|
-
variant:
|
|
937
|
-
position:
|
|
938
|
-
onClose: () =>
|
|
996
|
+
x && Object.keys(z).length > 0 && /* @__PURE__ */ (0, e.jsxs)(me, {
|
|
997
|
+
open: x,
|
|
998
|
+
variant: d,
|
|
999
|
+
position: d === "dialog" ? "center" : "right",
|
|
1000
|
+
onClose: () => W(!1),
|
|
939
1001
|
closeOnEscape: !0,
|
|
940
|
-
closeOnClickOutside:
|
|
941
|
-
width:
|
|
942
|
-
maxWidth:
|
|
943
|
-
maxHeight:
|
|
1002
|
+
closeOnClickOutside: d === "dialog",
|
|
1003
|
+
width: d === "sidepanel" ? 360 : void 0,
|
|
1004
|
+
maxWidth: d === "dialog" ? 640 : void 0,
|
|
1005
|
+
maxHeight: d === "dialog" ? "80vh" : void 0,
|
|
944
1006
|
"aria-label": "Dashboard filters",
|
|
945
1007
|
children: [
|
|
946
|
-
/* @__PURE__ */ (0, e.jsx)(
|
|
1008
|
+
/* @__PURE__ */ (0, e.jsx)(me.Header, {
|
|
947
1009
|
title: "Filters",
|
|
948
|
-
onClose: () =>
|
|
949
|
-
actions: /* @__PURE__ */ (0, e.jsx)(
|
|
1010
|
+
onClose: () => W(!1),
|
|
1011
|
+
actions: /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
950
1012
|
variant: "invisible",
|
|
951
1013
|
size: "small",
|
|
952
|
-
leadingVisual:
|
|
953
|
-
onClick: () =>
|
|
954
|
-
"aria-label":
|
|
1014
|
+
leadingVisual: d === "dialog" ? "square-half" : "open-center",
|
|
1015
|
+
onClick: () => C((m) => m === "dialog" ? "sidepanel" : "dialog"),
|
|
1016
|
+
"aria-label": d === "dialog" ? "Switch to side panel" : "Switch to dialog"
|
|
955
1017
|
})
|
|
956
1018
|
}),
|
|
957
1019
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
958
|
-
className:
|
|
1020
|
+
className: n["rst-dashboard-builder-filter-body"],
|
|
959
1021
|
children: (() => {
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
1022
|
+
const m = Object.keys(z);
|
|
1023
|
+
if (m.length === 0) return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
962
1024
|
style: { padding: "var(--rst-space-default)" },
|
|
963
1025
|
children: "No data sources to filter."
|
|
964
1026
|
});
|
|
965
|
-
const
|
|
1027
|
+
const $ = P && m.includes(P) ? P : m[0], ae = v?.[$] ?? Ye();
|
|
966
1028
|
return /* @__PURE__ */ (0, e.jsxs)(e.Fragment, { children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
967
|
-
className:
|
|
968
|
-
children:
|
|
969
|
-
value:
|
|
970
|
-
variant:
|
|
1029
|
+
className: n["rst-dashboard-builder-filter-tabs"],
|
|
1030
|
+
children: m.map((J) => /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
1031
|
+
value: J,
|
|
1032
|
+
variant: J === $ ? "base" : "invisible",
|
|
971
1033
|
size: "small",
|
|
972
|
-
onClick: () =>
|
|
973
|
-
children:
|
|
974
|
-
},
|
|
975
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
1034
|
+
onClick: () => U(J),
|
|
1035
|
+
children: J
|
|
1036
|
+
}, J))
|
|
1037
|
+
}), /* @__PURE__ */ (0, e.jsx)(Ge, {
|
|
976
1038
|
filters: ae,
|
|
977
|
-
onChange: (
|
|
978
|
-
...
|
|
979
|
-
[
|
|
1039
|
+
onChange: (J) => N((We) => ({
|
|
1040
|
+
...We ?? {},
|
|
1041
|
+
[$]: J.filters.length === 0 ? null : J
|
|
980
1042
|
})),
|
|
981
|
-
fieldOptions:
|
|
1043
|
+
fieldOptions: z[$]
|
|
982
1044
|
})] });
|
|
983
1045
|
})()
|
|
984
1046
|
}),
|
|
985
|
-
/* @__PURE__ */ (0, e.jsxs)(
|
|
1047
|
+
/* @__PURE__ */ (0, e.jsxs)(me.Footer, { children: [/* @__PURE__ */ (0, e.jsx)(Z, {
|
|
986
1048
|
variant: "invisible",
|
|
987
1049
|
size: "small",
|
|
988
1050
|
value: "Clear",
|
|
989
|
-
onClick: () =>
|
|
990
|
-
}), /* @__PURE__ */ (0, e.jsx)(
|
|
1051
|
+
onClick: () => N({})
|
|
1052
|
+
}), /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
991
1053
|
variant: "primary",
|
|
992
1054
|
size: "small",
|
|
993
1055
|
value: "Apply",
|
|
994
|
-
onClick:
|
|
1056
|
+
onClick: ne
|
|
995
1057
|
})] })
|
|
996
1058
|
]
|
|
997
1059
|
}),
|
|
998
|
-
!
|
|
999
|
-
widget:
|
|
1060
|
+
!M && /* @__PURE__ */ (0, e.jsx)(ze, {
|
|
1061
|
+
widget: t,
|
|
1000
1062
|
dataSources: r,
|
|
1001
|
-
onUpdate: (
|
|
1002
|
-
|
|
1063
|
+
onUpdate: (m) => {
|
|
1064
|
+
t && E(t.id, m);
|
|
1003
1065
|
},
|
|
1004
1066
|
onRemove: () => {
|
|
1005
|
-
|
|
1067
|
+
t && o(t.id);
|
|
1006
1068
|
},
|
|
1007
|
-
onClose: () =>
|
|
1008
|
-
onAddWidget: (
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1069
|
+
onClose: () => O(null),
|
|
1070
|
+
onAddWidget: (m) => {
|
|
1071
|
+
const $ = Object.values(r)[0], ae = Me(6, 3, c.config.widgets);
|
|
1072
|
+
w(m, $?.id ?? "", ae);
|
|
1011
1073
|
},
|
|
1012
|
-
prebuiltSections:
|
|
1013
|
-
onAddPrebuiltSection: (
|
|
1014
|
-
|
|
1074
|
+
prebuiltSections: s,
|
|
1075
|
+
onAddPrebuiltSection: (m) => {
|
|
1076
|
+
R(m);
|
|
1015
1077
|
}
|
|
1016
1078
|
})
|
|
1017
1079
|
]
|
|
@@ -1020,8 +1082,279 @@ var Ke = ({ dataSources: r, initialConfig: u, templates: m, prebuiltSections: c,
|
|
|
1020
1082
|
})
|
|
1021
1083
|
});
|
|
1022
1084
|
};
|
|
1023
|
-
|
|
1085
|
+
ur.displayName = "DashboardBuilder";
|
|
1086
|
+
var he = {
|
|
1087
|
+
"rst-border-beam": "_rst-border-beam_4g5sg_1",
|
|
1088
|
+
"rst-border-beam-effect": "_rst-border-beam-effect_4g5sg_7",
|
|
1089
|
+
"rst-border-beam-ring": "_rst-border-beam-ring_4g5sg_15",
|
|
1090
|
+
"rst-border-beam-spin": "_rst-border-beam-spin_4g5sg_27",
|
|
1091
|
+
"rst-border-beam-travel": "_rst-border-beam-travel_4g5sg_1"
|
|
1092
|
+
};
|
|
1093
|
+
function hr(r) {
|
|
1094
|
+
return [...r].filter((a) => a.color).map((a) => ({
|
|
1095
|
+
...a,
|
|
1096
|
+
percent: Math.min(100, Math.max(0, a.percent))
|
|
1097
|
+
})).sort((a, i) => a.percent - i.percent);
|
|
1098
|
+
}
|
|
1099
|
+
function br(r, a, i, s) {
|
|
1100
|
+
const b = 360 / Math.max(1, s), h = 2 * (a + i);
|
|
1101
|
+
return h <= 0 || r <= 0 ? Math.min(90, b) : Math.min(r / h * 360, b);
|
|
1102
|
+
}
|
|
1103
|
+
function mr(r, a) {
|
|
1104
|
+
const i = Math.max(0, Math.min(a, 360)), s = hr(r);
|
|
1105
|
+
return `conic-gradient(from 0deg, ${s.length ? s.map((b) => `${b.color} ${b.percent / 100 * i}deg`).join(", ") : "var(--rst-borderColor-focus) 0deg"}, transparent ${i}deg, transparent 360deg)`;
|
|
1106
|
+
}
|
|
1107
|
+
var xr = [
|
|
1108
|
+
{
|
|
1109
|
+
color: "transparent",
|
|
1110
|
+
percent: 0
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
color: "var(--rst-borderColor-primary-default)",
|
|
1114
|
+
percent: 70
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
color: "var(--rst-borderColor-focus)",
|
|
1118
|
+
percent: 100
|
|
1119
|
+
}
|
|
1120
|
+
], pr = ({ children: r, color: a = xr, count: i = 1, duration: s = 6, lineWidth: b = 1, outset: h = 0, inset: p = 0, size: j = 120, className: k, style: c, ...f }) => {
|
|
1121
|
+
const g = ie(null), [w, R] = D({
|
|
1122
|
+
radius: "",
|
|
1123
|
+
width: 0,
|
|
1124
|
+
height: 0
|
|
1125
|
+
});
|
|
1126
|
+
se(() => {
|
|
1127
|
+
const t = g.current?.firstElementChild;
|
|
1128
|
+
if (!t || typeof ResizeObserver > "u") return;
|
|
1129
|
+
const l = new ResizeObserver(() => {
|
|
1130
|
+
R({
|
|
1131
|
+
radius: getComputedStyle(t).borderTopLeftRadius,
|
|
1132
|
+
width: t.clientWidth,
|
|
1133
|
+
height: t.clientHeight
|
|
1134
|
+
});
|
|
1135
|
+
});
|
|
1136
|
+
return l.observe(t), () => l.disconnect();
|
|
1137
|
+
}, []);
|
|
1138
|
+
const o = Math.max(1, Math.floor(i)), E = X(() => mr(a, br(j, w.width, w.height, o)), [
|
|
1139
|
+
a,
|
|
1140
|
+
j,
|
|
1141
|
+
w.width,
|
|
1142
|
+
w.height,
|
|
1143
|
+
o
|
|
1144
|
+
]), L = 360 / o, O = Math.hypot(w.width + 2 * h, w.height + 2 * h);
|
|
1145
|
+
return /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
1146
|
+
ref: g,
|
|
1147
|
+
className: [he["rst-border-beam"], k].filter(Boolean).join(" "),
|
|
1148
|
+
style: {
|
|
1149
|
+
"--rst-border-beam-gradient": E,
|
|
1150
|
+
"--rst-border-beam-duration": `${s}s`,
|
|
1151
|
+
"--rst-border-beam-line-width": `${b}px`,
|
|
1152
|
+
"--rst-border-beam-outset": `${h}px`,
|
|
1153
|
+
"--rst-border-beam-inset": `${p}px`,
|
|
1154
|
+
...O > 0 ? { "--rst-border-beam-diagonal": `${O}px` } : {},
|
|
1155
|
+
...w.radius ? { "--rst-border-beam-radius": w.radius } : {},
|
|
1156
|
+
...c
|
|
1157
|
+
},
|
|
1158
|
+
...f,
|
|
1159
|
+
children: [r, /* @__PURE__ */ (0, e.jsx)("span", {
|
|
1160
|
+
className: he["rst-border-beam-effect"],
|
|
1161
|
+
"aria-hidden": "true",
|
|
1162
|
+
children: /* @__PURE__ */ (0, e.jsx)("span", {
|
|
1163
|
+
className: he["rst-border-beam-ring"],
|
|
1164
|
+
children: Array.from({ length: o }, (t, l) => /* @__PURE__ */ (0, e.jsx)("span", {
|
|
1165
|
+
className: he["rst-border-beam-spin"],
|
|
1166
|
+
style: { "--rst-border-beam-offset": `${l * L}deg` }
|
|
1167
|
+
}, l))
|
|
1168
|
+
})
|
|
1169
|
+
})]
|
|
1170
|
+
});
|
|
1171
|
+
};
|
|
1172
|
+
pr.displayName = "BorderBeam";
|
|
1173
|
+
function fr(r) {
|
|
1174
|
+
return r.filter((a) => a.type === "text").map((a) => a.text).join(" ").trim();
|
|
1175
|
+
}
|
|
1176
|
+
function gr(r) {
|
|
1177
|
+
return r.data ?? [];
|
|
1178
|
+
}
|
|
1179
|
+
function Re(r, a) {
|
|
1180
|
+
return r.events?.includes(a) ?? !1;
|
|
1181
|
+
}
|
|
1182
|
+
function _r({ block: r, onBlockEvent: a }) {
|
|
1183
|
+
const i = gr(r), s = r.props ?? {};
|
|
1184
|
+
if (r.component === "form") return /* @__PURE__ */ (0, e.jsx)(vr, {
|
|
1185
|
+
block: r,
|
|
1186
|
+
onBlockEvent: a
|
|
1187
|
+
});
|
|
1188
|
+
if (r.component === "chart") {
|
|
1189
|
+
const b = s.height ?? 16;
|
|
1190
|
+
return /* @__PURE__ */ (0, e.jsx)(qe, {
|
|
1191
|
+
data: i,
|
|
1192
|
+
columns: r.columns,
|
|
1193
|
+
type: s.type ?? "bar",
|
|
1194
|
+
xAxisColumn: s.xAxisColumn,
|
|
1195
|
+
yAxisColumns: s.yAxisColumns,
|
|
1196
|
+
series: s.series,
|
|
1197
|
+
title: s.title,
|
|
1198
|
+
subtitle: s.subtitle,
|
|
1199
|
+
showLegend: s.showLegend,
|
|
1200
|
+
showGrid: s.showGrid,
|
|
1201
|
+
height: b
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
return r.component === "kpi" ? /* @__PURE__ */ (0, e.jsx)(Fe, {
|
|
1205
|
+
data: i[0] ?? {},
|
|
1206
|
+
columns: r.columns,
|
|
1207
|
+
layout: Ie(s.layout)
|
|
1208
|
+
}) : r.component === "card-list" ? /* @__PURE__ */ (0, e.jsx)(Ze, {
|
|
1209
|
+
data: i,
|
|
1210
|
+
columns: r.columns,
|
|
1211
|
+
layout: Ae(s.layout),
|
|
1212
|
+
onCardClick: Re(r, "action") ? (b) => a?.({
|
|
1213
|
+
blockId: r.id,
|
|
1214
|
+
component: "card-list",
|
|
1215
|
+
event: "action",
|
|
1216
|
+
handler: r.handler,
|
|
1217
|
+
values: b
|
|
1218
|
+
}) : void 0
|
|
1219
|
+
}) : /* @__PURE__ */ (0, e.jsx)(Ke, {
|
|
1220
|
+
data: i,
|
|
1221
|
+
columns: r.columns,
|
|
1222
|
+
enableSorting: s.enableSorting !== !1,
|
|
1223
|
+
enableSelection: s.enableSelection === !0,
|
|
1224
|
+
showGrid: s.showGrid ?? "horizontal",
|
|
1225
|
+
columnSizing: "fixed",
|
|
1226
|
+
enableVirtualization: s.enableVirtualization !== !1
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
function vr({ block: r, onBlockEvent: a }) {
|
|
1230
|
+
const [i, s] = D(!1);
|
|
1231
|
+
return Re(r, "submit") ? /* @__PURE__ */ (0, e.jsx)(fe, {
|
|
1232
|
+
data: r.data ?? [{}],
|
|
1233
|
+
columns: r.columns,
|
|
1234
|
+
labelAlign: "top",
|
|
1235
|
+
onSubmit: async (b) => {
|
|
1236
|
+
s(!0);
|
|
1237
|
+
try {
|
|
1238
|
+
await a?.({
|
|
1239
|
+
blockId: r.id,
|
|
1240
|
+
component: "form",
|
|
1241
|
+
event: "submit",
|
|
1242
|
+
handler: r.handler,
|
|
1243
|
+
values: b
|
|
1244
|
+
});
|
|
1245
|
+
} finally {
|
|
1246
|
+
s(!1);
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
actions: [{
|
|
1250
|
+
type: "submit",
|
|
1251
|
+
variant: "primary",
|
|
1252
|
+
value: "Submit",
|
|
1253
|
+
loading: i,
|
|
1254
|
+
disabled: i
|
|
1255
|
+
}, {
|
|
1256
|
+
type: "reset",
|
|
1257
|
+
variant: "invisible",
|
|
1258
|
+
value: "Reset",
|
|
1259
|
+
disabled: i
|
|
1260
|
+
}]
|
|
1261
|
+
}) : /* @__PURE__ */ (0, e.jsx)(fe, {
|
|
1262
|
+
data: r.data ?? [{}],
|
|
1263
|
+
columns: r.columns
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
var V = {
|
|
1267
|
+
"rst-chat": "_rst-chat_12syz_1",
|
|
1268
|
+
"rst-chat-empty": "_rst-chat-empty_12syz_9",
|
|
1269
|
+
"rst-chat-messages": "_rst-chat-messages_12syz_19",
|
|
1270
|
+
"rst-chat-message": "_rst-chat-message_12syz_19",
|
|
1271
|
+
"rst-chat-message-user": "_rst-chat-message-user_12syz_33",
|
|
1272
|
+
"rst-chat-message-assistant": "_rst-chat-message-assistant_12syz_37",
|
|
1273
|
+
"rst-chat-bubble": "_rst-chat-bubble_12syz_41",
|
|
1274
|
+
"rst-chat-bubble-user": "_rst-chat-bubble-user_12syz_51",
|
|
1275
|
+
"rst-chat-bubble-assistant": "_rst-chat-bubble-assistant_12syz_56",
|
|
1276
|
+
"rst-chat-text": "_rst-chat-text_12syz_63",
|
|
1277
|
+
"rst-chat-block": "_rst-chat-block_12syz_68",
|
|
1278
|
+
"rst-chat-block-title": "_rst-chat-block-title_12syz_76",
|
|
1279
|
+
"rst-chat-processing": "_rst-chat-processing_12syz_80",
|
|
1280
|
+
"rst-chat-composer": "_rst-chat-composer_12syz_84"
|
|
1281
|
+
};
|
|
1282
|
+
function Mr({ messages: r, isProcessing: a = !1, inputValue: i, onInputChange: s, onSubmit: b, onKeyDown: h, onBlockEvent: p, emptyStateText: j = "Ask a question to get started.", inputPlaceholder: k = "Ask something...", className: c, renderBlock: f }) {
|
|
1283
|
+
const g = ie(null);
|
|
1284
|
+
se(() => {
|
|
1285
|
+
const o = g.current;
|
|
1286
|
+
o && (o.scrollTop = o.scrollHeight);
|
|
1287
|
+
}, [r, a]);
|
|
1288
|
+
const w = a || i.trim().length === 0, R = (o, E) => o.type === "text" ? /* @__PURE__ */ (0, e.jsx)(te, {
|
|
1289
|
+
variant: "body",
|
|
1290
|
+
className: V["rst-chat-text"],
|
|
1291
|
+
children: o.text
|
|
1292
|
+
}, E) : /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
1293
|
+
className: V["rst-chat-block"],
|
|
1294
|
+
children: [o.block.meta?.title && /* @__PURE__ */ (0, e.jsx)(te, {
|
|
1295
|
+
variant: "label",
|
|
1296
|
+
className: V["rst-chat-block-title"],
|
|
1297
|
+
children: o.block.meta.title
|
|
1298
|
+
}), f ? f(o.block) : /* @__PURE__ */ (0, e.jsx)(_r, {
|
|
1299
|
+
block: o.block,
|
|
1300
|
+
onBlockEvent: p
|
|
1301
|
+
})]
|
|
1302
|
+
}, o.block.id);
|
|
1303
|
+
return /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
1304
|
+
className: [V["rst-chat"], c].filter(Boolean).join(" "),
|
|
1305
|
+
children: [r.length === 0 ? /* @__PURE__ */ (0, e.jsx)("div", {
|
|
1306
|
+
className: V["rst-chat-empty"],
|
|
1307
|
+
children: /* @__PURE__ */ (0, e.jsx)(te, {
|
|
1308
|
+
variant: "body",
|
|
1309
|
+
children: j
|
|
1310
|
+
})
|
|
1311
|
+
}) : /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
1312
|
+
ref: g,
|
|
1313
|
+
className: V["rst-chat-messages"],
|
|
1314
|
+
role: "log",
|
|
1315
|
+
"aria-live": "polite",
|
|
1316
|
+
children: [r.map((o) => /* @__PURE__ */ (0, e.jsx)("article", {
|
|
1317
|
+
className: [V["rst-chat-message"], V[`rst-chat-message-${o.role}`]].join(" "),
|
|
1318
|
+
"aria-label": `${o.role === "user" ? "You" : "Assistant"}: ${fr(o.parts)}`,
|
|
1319
|
+
children: /* @__PURE__ */ (0, e.jsx)("div", {
|
|
1320
|
+
className: [V["rst-chat-bubble"], V[`rst-chat-bubble-${o.role}`]].join(" "),
|
|
1321
|
+
children: o.parts.map(R)
|
|
1322
|
+
})
|
|
1323
|
+
}, o.id)), a && /* @__PURE__ */ (0, e.jsx)("div", {
|
|
1324
|
+
className: V["rst-chat-processing"],
|
|
1325
|
+
children: /* @__PURE__ */ (0, e.jsx)(te, {
|
|
1326
|
+
variant: "caption",
|
|
1327
|
+
children: "Working..."
|
|
1328
|
+
})
|
|
1329
|
+
})]
|
|
1330
|
+
}), /* @__PURE__ */ (0, e.jsxs)("form", {
|
|
1331
|
+
className: V["rst-chat-composer"],
|
|
1332
|
+
onSubmit: (o) => {
|
|
1333
|
+
o.preventDefault(), w || b();
|
|
1334
|
+
},
|
|
1335
|
+
children: [/* @__PURE__ */ (0, e.jsx)(Qe, {
|
|
1336
|
+
value: i,
|
|
1337
|
+
onChange: s,
|
|
1338
|
+
onKeyDown: h,
|
|
1339
|
+
placeholder: k,
|
|
1340
|
+
ariaLabel: "Message",
|
|
1341
|
+
rows: 1,
|
|
1342
|
+
disabled: a
|
|
1343
|
+
}), /* @__PURE__ */ (0, e.jsx)(Z, {
|
|
1344
|
+
type: "submit",
|
|
1345
|
+
variant: "primary",
|
|
1346
|
+
value: "Send",
|
|
1347
|
+
leadingVisual: "send",
|
|
1348
|
+
disabled: w
|
|
1349
|
+
})]
|
|
1350
|
+
})]
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1024
1353
|
export {
|
|
1025
|
-
|
|
1026
|
-
|
|
1354
|
+
pr as BorderBeam,
|
|
1355
|
+
Mr as ChatSurface,
|
|
1356
|
+
Sr as DASHBOARD_CONFIG_VERSION,
|
|
1357
|
+
ur as DashboardBuilder,
|
|
1358
|
+
kr as PipContainer,
|
|
1359
|
+
Nr as usePip
|
|
1027
1360
|
};
|