@burdenoff/microfe-bigconsole 2026.1118.10 → 2026.1119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/asof/AsOfBanner.d.ts +3 -0
- package/dist/bigconsole/asof/AsOfBanner.js +38 -0
- package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
- package/dist/bigconsole/asof/AsOfControl.js +96 -0
- package/dist/bigconsole/asof/AsOfProvider.d.ts +24 -0
- package/dist/bigconsole/asof/AsOfProvider.js +76 -0
- package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
- package/dist/bigconsole/asof/asOfMessage.js +12 -0
- package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
- package/dist/bigconsole/asof/asOfParam.js +34 -0
- package/dist/bigconsole/asof/index.d.ts +7 -0
- package/dist/bigconsole/asof/index.js +6 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
- package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +345 -306
- package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
- package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
- package/dist/bigconsole/hooks/useWidgetData.js +53 -43
- package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
- package/dist/bigconsole/pages/index.d.ts +1 -1
- package/dist/bigconsole/types/index.d.ts +13 -0
- package/dist/bigconsole/utils/widgetDisplayData.d.ts +6 -0
- package/dist/bigconsole/utils/widgetDisplayData.js +4 -0
- package/dist/generated/wspace-operations.d.ts +47 -0
- package/dist/generated/wspace-operations.js +261 -16
- package/dist/generated/wspace-types.d.ts +78 -0
- package/package.json +1 -1
|
@@ -2,53 +2,55 @@ import { useWidgetStore as e } from "../../store/widgetStore.js";
|
|
|
2
2
|
import "../../store/index.js";
|
|
3
3
|
import t from "../../hooks/useWidgetOperations.js";
|
|
4
4
|
import "../../hooks/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { useAsOf as n } from "../../asof/AsOfProvider.js";
|
|
6
|
+
import "../../asof/index.js";
|
|
7
|
+
import { BIGCONSOLE_PERMISSIONS as r } from "../../../constants/permissions.js";
|
|
8
|
+
import { memo as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
9
|
+
import { usePermissions as l } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import { createPortal as p } from "react-dom";
|
|
10
12
|
// src/bigconsole/components/widgets/WidgetMenu.tsx
|
|
11
|
-
var
|
|
12
|
-
let [
|
|
13
|
+
var m = i(function({ widget: i, isEditMode: m, onRefresh: h, onExportCSV: g, onExportPNG: _, onSpotOutliers: v, onReconcile: y }) {
|
|
14
|
+
let [b, x] = c(!1), [S, C] = c(!1), [w, T] = c({
|
|
13
15
|
top: 0,
|
|
14
16
|
left: 0
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
+
}), E = s(null), D = s(null), { hasPermission: O } = l(), k = O(r.WIDGET_UPDATE), A = O(r.WIDGET_CREATE), j = O(r.WIDGET_DELETE), M = e((e) => e.selectWidget), N = e((e) => e.copyWidget), P = e((e) => e.cutWidget), F = e((e) => e.removeWidget), I = e((e) => e.openConfigPanel), { asOf: L } = n(), { duplicateWidget: R, deleteWidget: z, refreshWidgetData: B } = t(i.pageId, i.dashboardId, { skipFetch: !0 });
|
|
18
|
+
o(() => {
|
|
17
19
|
let e = (e) => {
|
|
18
|
-
|
|
20
|
+
E.current && !E.current.contains(e.target) && D.current && !D.current.contains(e.target) && x(!1);
|
|
19
21
|
};
|
|
20
|
-
return
|
|
22
|
+
return b && document.addEventListener("mousedown", e), () => {
|
|
21
23
|
document.removeEventListener("mousedown", e);
|
|
22
24
|
};
|
|
23
|
-
}, [
|
|
25
|
+
}, [b]), o(() => {
|
|
24
26
|
let e = (e) => {
|
|
25
|
-
e.key === "Escape" && (
|
|
27
|
+
e.key === "Escape" && (x(!1), D.current?.focus());
|
|
26
28
|
};
|
|
27
|
-
return
|
|
29
|
+
return b && document.addEventListener("keydown", e), () => {
|
|
28
30
|
document.removeEventListener("keydown", e);
|
|
29
31
|
};
|
|
30
|
-
}, [
|
|
31
|
-
let
|
|
32
|
-
e.stopPropagation(),
|
|
33
|
-
if (!e &&
|
|
34
|
-
let e =
|
|
35
|
-
n + 160 > window.innerWidth - 10 && (n = window.innerWidth - 160 - 10), n < 10 && (n = 10), t + 320 > window.innerHeight - 10 && (t = e.top - 320 - 4, t < 10 && (t = 10)),
|
|
32
|
+
}, [b]);
|
|
33
|
+
let V = a((e) => {
|
|
34
|
+
e.stopPropagation(), x((e) => {
|
|
35
|
+
if (!e && D.current) {
|
|
36
|
+
let e = D.current.getBoundingClientRect(), t = e.bottom + 4, n = e.right - 160;
|
|
37
|
+
n + 160 > window.innerWidth - 10 && (n = window.innerWidth - 160 - 10), n < 10 && (n = 10), t + 320 > window.innerHeight - 10 && (t = e.top - 320 - 4, t < 10 && (t = 10)), T({
|
|
36
38
|
top: t + window.scrollY,
|
|
37
39
|
left: n + window.scrollX
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
return !e;
|
|
41
43
|
});
|
|
42
|
-
}, []),
|
|
44
|
+
}, []), H = [
|
|
43
45
|
{
|
|
44
46
|
id: "edit",
|
|
45
47
|
label: "Edit Widget",
|
|
46
|
-
icon: /* @__PURE__ */
|
|
48
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
47
49
|
fill: "none",
|
|
48
50
|
stroke: "currentColor",
|
|
49
51
|
viewBox: "0 0 24 24",
|
|
50
52
|
className: "w-4 h-4",
|
|
51
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ d("path", {
|
|
52
54
|
strokeLinecap: "round",
|
|
53
55
|
strokeLinejoin: "round",
|
|
54
56
|
strokeWidth: 2,
|
|
@@ -56,20 +58,20 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
56
58
|
})
|
|
57
59
|
}),
|
|
58
60
|
action: () => {
|
|
59
|
-
|
|
61
|
+
M(i.id), I(), x(!1);
|
|
60
62
|
},
|
|
61
|
-
disabled: !
|
|
62
|
-
permitted:
|
|
63
|
+
disabled: !m,
|
|
64
|
+
permitted: k
|
|
63
65
|
},
|
|
64
66
|
{
|
|
65
67
|
id: "refresh",
|
|
66
68
|
label: "Refresh Data",
|
|
67
|
-
icon: /* @__PURE__ */
|
|
69
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
68
70
|
fill: "none",
|
|
69
71
|
stroke: "currentColor",
|
|
70
72
|
viewBox: "0 0 24 24",
|
|
71
73
|
className: "w-4 h-4",
|
|
72
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ d("path", {
|
|
73
75
|
strokeLinecap: "round",
|
|
74
76
|
strokeLinejoin: "round",
|
|
75
77
|
strokeWidth: 2,
|
|
@@ -77,19 +79,19 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
77
79
|
})
|
|
78
80
|
}),
|
|
79
81
|
action: async () => {
|
|
80
|
-
|
|
82
|
+
x(!1), L || (h ? h() : await B(i.id));
|
|
81
83
|
},
|
|
82
|
-
disabled:
|
|
84
|
+
disabled: !!L
|
|
83
85
|
},
|
|
84
86
|
{
|
|
85
87
|
id: "spotOutliers",
|
|
86
88
|
label: "Spot outliers",
|
|
87
|
-
icon: /* @__PURE__ */
|
|
89
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
88
90
|
fill: "none",
|
|
89
91
|
stroke: "currentColor",
|
|
90
92
|
viewBox: "0 0 24 24",
|
|
91
93
|
className: "w-4 h-4",
|
|
92
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ d("path", {
|
|
93
95
|
strokeLinecap: "round",
|
|
94
96
|
strokeLinejoin: "round",
|
|
95
97
|
strokeWidth: 2,
|
|
@@ -97,19 +99,19 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
97
99
|
})
|
|
98
100
|
}),
|
|
99
101
|
action: () => {
|
|
100
|
-
|
|
102
|
+
x(!1), v?.();
|
|
101
103
|
},
|
|
102
|
-
disabled: !
|
|
104
|
+
disabled: !v
|
|
103
105
|
},
|
|
104
|
-
...
|
|
106
|
+
...y ? [{
|
|
105
107
|
id: "reconcile",
|
|
106
108
|
label: "Reconcile",
|
|
107
|
-
icon: /* @__PURE__ */
|
|
109
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
108
110
|
fill: "none",
|
|
109
111
|
stroke: "currentColor",
|
|
110
112
|
viewBox: "0 0 24 24",
|
|
111
113
|
className: "w-4 h-4",
|
|
112
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ d("path", {
|
|
113
115
|
strokeLinecap: "round",
|
|
114
116
|
strokeLinejoin: "round",
|
|
115
117
|
strokeWidth: 2,
|
|
@@ -117,18 +119,18 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
117
119
|
})
|
|
118
120
|
}),
|
|
119
121
|
action: () => {
|
|
120
|
-
|
|
122
|
+
x(!1), y();
|
|
121
123
|
}
|
|
122
124
|
}] : [],
|
|
123
125
|
{
|
|
124
126
|
id: "exportCSV",
|
|
125
127
|
label: "Export CSV",
|
|
126
|
-
icon: /* @__PURE__ */
|
|
128
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
127
129
|
fill: "none",
|
|
128
130
|
stroke: "currentColor",
|
|
129
131
|
viewBox: "0 0 24 24",
|
|
130
132
|
className: "w-4 h-4",
|
|
131
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ d("path", {
|
|
132
134
|
strokeLinecap: "round",
|
|
133
135
|
strokeLinejoin: "round",
|
|
134
136
|
strokeWidth: 2,
|
|
@@ -136,19 +138,19 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
136
138
|
})
|
|
137
139
|
}),
|
|
138
140
|
action: () => {
|
|
139
|
-
|
|
141
|
+
x(!1), g?.();
|
|
140
142
|
},
|
|
141
|
-
disabled: !
|
|
143
|
+
disabled: !g
|
|
142
144
|
},
|
|
143
145
|
{
|
|
144
146
|
id: "exportPNG",
|
|
145
147
|
label: "Export PNG",
|
|
146
|
-
icon: /* @__PURE__ */
|
|
148
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
147
149
|
fill: "none",
|
|
148
150
|
stroke: "currentColor",
|
|
149
151
|
viewBox: "0 0 24 24",
|
|
150
152
|
className: "w-4 h-4",
|
|
151
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ d("path", {
|
|
152
154
|
strokeLinecap: "round",
|
|
153
155
|
strokeLinejoin: "round",
|
|
154
156
|
strokeWidth: 2,
|
|
@@ -156,26 +158,26 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
156
158
|
})
|
|
157
159
|
}),
|
|
158
160
|
action: () => {
|
|
159
|
-
|
|
161
|
+
x(!1), _?.();
|
|
160
162
|
},
|
|
161
|
-
disabled: !
|
|
163
|
+
disabled: !_
|
|
162
164
|
},
|
|
163
165
|
{
|
|
164
166
|
id: "divider1",
|
|
165
167
|
label: "",
|
|
166
|
-
icon: /* @__PURE__ */ u
|
|
168
|
+
icon: /* @__PURE__ */ d(u, {}),
|
|
167
169
|
action: () => {},
|
|
168
170
|
divider: !0
|
|
169
171
|
},
|
|
170
172
|
{
|
|
171
173
|
id: "copy",
|
|
172
174
|
label: "Copy",
|
|
173
|
-
icon: /* @__PURE__ */
|
|
175
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
174
176
|
fill: "none",
|
|
175
177
|
stroke: "currentColor",
|
|
176
178
|
viewBox: "0 0 24 24",
|
|
177
179
|
className: "w-4 h-4",
|
|
178
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ d("path", {
|
|
179
181
|
strokeLinecap: "round",
|
|
180
182
|
strokeLinejoin: "round",
|
|
181
183
|
strokeWidth: 2,
|
|
@@ -183,20 +185,20 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
183
185
|
})
|
|
184
186
|
}),
|
|
185
187
|
action: () => {
|
|
186
|
-
|
|
188
|
+
N(i.id), x(!1);
|
|
187
189
|
},
|
|
188
|
-
disabled: !
|
|
189
|
-
permitted:
|
|
190
|
+
disabled: !m,
|
|
191
|
+
permitted: A
|
|
190
192
|
},
|
|
191
193
|
{
|
|
192
194
|
id: "cut",
|
|
193
195
|
label: "Cut",
|
|
194
|
-
icon: /* @__PURE__ */
|
|
196
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
195
197
|
fill: "none",
|
|
196
198
|
stroke: "currentColor",
|
|
197
199
|
viewBox: "0 0 24 24",
|
|
198
200
|
className: "w-4 h-4",
|
|
199
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ d("path", {
|
|
200
202
|
strokeLinecap: "round",
|
|
201
203
|
strokeLinejoin: "round",
|
|
202
204
|
strokeWidth: 2,
|
|
@@ -204,20 +206,20 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
204
206
|
})
|
|
205
207
|
}),
|
|
206
208
|
action: () => {
|
|
207
|
-
|
|
209
|
+
P(i.id), x(!1);
|
|
208
210
|
},
|
|
209
|
-
disabled: !
|
|
210
|
-
permitted:
|
|
211
|
+
disabled: !m,
|
|
212
|
+
permitted: A && k
|
|
211
213
|
},
|
|
212
214
|
{
|
|
213
215
|
id: "duplicate",
|
|
214
216
|
label: "Duplicate",
|
|
215
|
-
icon: /* @__PURE__ */
|
|
217
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
216
218
|
fill: "none",
|
|
217
219
|
stroke: "currentColor",
|
|
218
220
|
viewBox: "0 0 24 24",
|
|
219
221
|
className: "w-4 h-4",
|
|
220
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ d("path", {
|
|
221
223
|
strokeLinecap: "round",
|
|
222
224
|
strokeLinejoin: "round",
|
|
223
225
|
strokeWidth: 2,
|
|
@@ -225,34 +227,34 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
225
227
|
})
|
|
226
228
|
}),
|
|
227
229
|
action: async () => {
|
|
228
|
-
|
|
230
|
+
x(!1);
|
|
229
231
|
let e = {
|
|
230
|
-
x: (
|
|
231
|
-
y: (
|
|
232
|
-
width:
|
|
233
|
-
height:
|
|
232
|
+
x: (i.positionX ?? 0) + 1,
|
|
233
|
+
y: (i.positionY ?? 0) + 1,
|
|
234
|
+
width: i.positionWidth ?? 4,
|
|
235
|
+
height: i.positionHeight ?? 4
|
|
234
236
|
};
|
|
235
|
-
await
|
|
237
|
+
await R(i.id, e, `${i.title} (Copy)`);
|
|
236
238
|
},
|
|
237
|
-
disabled: !
|
|
238
|
-
permitted:
|
|
239
|
+
disabled: !m,
|
|
240
|
+
permitted: A
|
|
239
241
|
},
|
|
240
242
|
{
|
|
241
243
|
id: "divider2",
|
|
242
244
|
label: "",
|
|
243
|
-
icon: /* @__PURE__ */ u
|
|
245
|
+
icon: /* @__PURE__ */ d(u, {}),
|
|
244
246
|
action: () => {},
|
|
245
247
|
divider: !0
|
|
246
248
|
},
|
|
247
249
|
{
|
|
248
250
|
id: "delete",
|
|
249
251
|
label: "Delete",
|
|
250
|
-
icon: /* @__PURE__ */
|
|
252
|
+
icon: /* @__PURE__ */ d("svg", {
|
|
251
253
|
fill: "none",
|
|
252
254
|
stroke: "currentColor",
|
|
253
255
|
viewBox: "0 0 24 24",
|
|
254
256
|
className: "w-4 h-4",
|
|
255
|
-
children: /* @__PURE__ */
|
|
257
|
+
children: /* @__PURE__ */ d("path", {
|
|
256
258
|
strokeLinecap: "round",
|
|
257
259
|
strokeLinejoin: "round",
|
|
258
260
|
strokeWidth: 2,
|
|
@@ -261,58 +263,58 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
261
263
|
}),
|
|
262
264
|
action: async () => {
|
|
263
265
|
if (window.confirm("Are you sure you want to delete this widget?")) {
|
|
264
|
-
|
|
265
|
-
let e = await
|
|
266
|
-
|
|
267
|
-
} else
|
|
266
|
+
x(!1);
|
|
267
|
+
let e = await z(i.id);
|
|
268
|
+
i.savedQueryId ? C(!e) : e || F(i.id);
|
|
269
|
+
} else x(!1);
|
|
268
270
|
},
|
|
269
|
-
disabled: !
|
|
271
|
+
disabled: !m,
|
|
270
272
|
destructive: !0,
|
|
271
|
-
permitted:
|
|
273
|
+
permitted: j
|
|
272
274
|
}
|
|
273
|
-
].filter((e) => e.permitted !== !1 && (!
|
|
275
|
+
].filter((e) => e.permitted !== !1 && (!i.savedQueryId || m && e.id === "delete")), U = H.filter((e, t) => {
|
|
274
276
|
if (!e.divider) return !0;
|
|
275
|
-
let n =
|
|
277
|
+
let n = H[t - 1], r = H[t + 1];
|
|
276
278
|
return n !== void 0 && r !== void 0 && !n.divider && !r.divider;
|
|
277
279
|
});
|
|
278
|
-
return
|
|
280
|
+
return U.length ? /* @__PURE__ */ f("div", {
|
|
279
281
|
className: "relative",
|
|
280
282
|
children: [
|
|
281
|
-
|
|
283
|
+
S && /* @__PURE__ */ d("span", {
|
|
282
284
|
role: "alert",
|
|
283
285
|
children: "Could not delete this widget."
|
|
284
286
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
ref:
|
|
287
|
+
/* @__PURE__ */ d("button", {
|
|
288
|
+
ref: D,
|
|
287
289
|
type: "button",
|
|
288
|
-
onClick:
|
|
290
|
+
onClick: V,
|
|
289
291
|
className: `
|
|
290
292
|
p-1.5 rounded-md
|
|
291
293
|
text-text-secondary
|
|
292
294
|
hover:text-text-primary
|
|
293
295
|
hover:bg-bg-sunken
|
|
294
296
|
transition-colors
|
|
295
|
-
${
|
|
297
|
+
${b ? "bg-bg-sunken" : ""}
|
|
296
298
|
`,
|
|
297
299
|
title: "Widget options",
|
|
298
300
|
"aria-haspopup": "menu",
|
|
299
|
-
"aria-expanded":
|
|
300
|
-
children: /* @__PURE__ */
|
|
301
|
+
"aria-expanded": b,
|
|
302
|
+
children: /* @__PURE__ */ f("svg", {
|
|
301
303
|
className: "w-4 h-4",
|
|
302
304
|
fill: "currentColor",
|
|
303
305
|
viewBox: "0 0 24 24",
|
|
304
306
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ d("circle", {
|
|
306
308
|
cx: "12",
|
|
307
309
|
cy: "5",
|
|
308
310
|
r: "2"
|
|
309
311
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ d("circle", {
|
|
311
313
|
cx: "12",
|
|
312
314
|
cy: "12",
|
|
313
315
|
r: "2"
|
|
314
316
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ d("circle", {
|
|
316
318
|
cx: "12",
|
|
317
319
|
cy: "19",
|
|
318
320
|
r: "2"
|
|
@@ -320,18 +322,18 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
320
322
|
]
|
|
321
323
|
})
|
|
322
324
|
}),
|
|
323
|
-
|
|
324
|
-
ref:
|
|
325
|
+
b && p(/* @__PURE__ */ d("div", {
|
|
326
|
+
ref: E,
|
|
325
327
|
style: {
|
|
326
328
|
position: "fixed",
|
|
327
|
-
top:
|
|
328
|
-
left:
|
|
329
|
+
top: w.top,
|
|
330
|
+
left: w.left,
|
|
329
331
|
zIndex: 99999
|
|
330
332
|
},
|
|
331
333
|
className: "\n min-w-[160px]\n py-1\n bg-bg-surface\n border border-border-default\n rounded-lg shadow-lg\n ",
|
|
332
334
|
role: "menu",
|
|
333
335
|
"aria-orientation": "vertical",
|
|
334
|
-
children:
|
|
336
|
+
children: U.map((e) => e.divider ? /* @__PURE__ */ d("div", { className: "my-1 border-t border-border-default" }, e.id) : /* @__PURE__ */ f("button", {
|
|
335
337
|
type: "button",
|
|
336
338
|
onClick: (t) => {
|
|
337
339
|
t.stopPropagation(), e.action();
|
|
@@ -345,10 +347,10 @@ var p = r(function({ widget: r, isEditMode: p, onRefresh: m, onExportCSV: h, onE
|
|
|
345
347
|
${e.destructive ? "text-status-error-text hover:text-status-error-text" : "text-text-primary"}
|
|
346
348
|
`,
|
|
347
349
|
role: "menuitem",
|
|
348
|
-
children: [e.icon, /* @__PURE__ */
|
|
350
|
+
children: [e.icon, /* @__PURE__ */ d("span", { children: e.label })]
|
|
349
351
|
}, e.id))
|
|
350
352
|
}), document.body)
|
|
351
353
|
]
|
|
352
354
|
}) : null;
|
|
353
355
|
});
|
|
354
|
-
export {
|
|
356
|
+
export { m as WidgetMenu, m as default };
|