@burdenoff/microfe-bigconsole 2026.812.2 → 2026.827.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/components/builder/inspector/LayoutSection.js +71 -0
- package/dist/bigconsole/components/builder/inspector/LayoutSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/index.js +1 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +137 -121
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +204 -93
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +259 -133
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +87 -39
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +88 -68
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +213 -199
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +46 -27
- package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +44 -47
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/proposalSource.js +31 -24
- package/dist/bigconsole/customWidget/proposalSource.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +74 -64
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useDataSinkOperations.js +2 -2
- package/dist/bigconsole/hooks/useDataSinkOperations.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +386 -316
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +251 -206
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +646 -378
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +153 -108
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/utils/format.js +18 -0
- package/dist/bigconsole/utils/format.js.map +1 -0
- package/dist/bigconsole/utils/widgetPositioning.js +1 -1
- package/dist/generated/wspace-operations.js +1 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,8 @@ import "../../../hooks/index.js";
|
|
|
4
4
|
import n from "./EmbedTab.js";
|
|
5
5
|
import { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
|
|
6
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
-
import { createPortal as
|
|
7
|
+
import { createPortal as ee } from "react-dom";
|
|
8
|
+
import { formatDistanceToNow as l } from "date-fns";
|
|
8
9
|
//#region src/bigconsole/components/dashboard/ShareDialog/ShareDialog.tsx
|
|
9
10
|
var u = (e) => ({
|
|
10
11
|
bgPrimary: e ? "#1a1a2e" : "#ffffff",
|
|
@@ -18,7 +19,23 @@ var u = (e) => ({
|
|
|
18
19
|
actionPrimaryBgHover: "#4f46e5",
|
|
19
20
|
statusSuccessBg: "#22c55e",
|
|
20
21
|
statusErrorText: "#ef4444"
|
|
21
|
-
}), d = [
|
|
22
|
+
}), d = [
|
|
23
|
+
{
|
|
24
|
+
value: "PRIVATE",
|
|
25
|
+
label: "Private",
|
|
26
|
+
description: "Only people added below"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "WORKSPACE",
|
|
30
|
+
label: "Workspace",
|
|
31
|
+
description: "Anyone in this workspace"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
value: "PUBLIC",
|
|
35
|
+
label: "Public",
|
|
36
|
+
description: "Anyone with the link"
|
|
37
|
+
}
|
|
38
|
+
], f = [{
|
|
22
39
|
value: "VIEW",
|
|
23
40
|
label: "View",
|
|
24
41
|
description: "Can view the dashboard"
|
|
@@ -27,49 +44,60 @@ var u = (e) => ({
|
|
|
27
44
|
label: "Edit",
|
|
28
45
|
description: "Can edit widgets, layout, and share"
|
|
29
46
|
}];
|
|
30
|
-
function
|
|
31
|
-
let { shares:
|
|
47
|
+
function p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility: _, onVisibilityChange: v, canChangeVisibility: y = !0 }) {
|
|
48
|
+
let { shares: b, loading: x, fetchShares: S, shareWithUser: C, shareWithGroup: w, updateShare: T, revokeShare: E, revokeAllShares: D } = t(), O = e(), [k, A] = o(""), [j, M] = o(null), [N, P] = o("VIEW"), [F, I] = o(""), [L, R] = o(!1), [z, B] = o("people"), [V, H] = o(!1), [U, W] = o(null);
|
|
32
49
|
i(() => {
|
|
33
|
-
|
|
50
|
+
m && l && (S(l), I(`${window.location.origin}/dashboard/${l}?shared=true`));
|
|
34
51
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
52
|
+
m,
|
|
53
|
+
l,
|
|
54
|
+
S
|
|
38
55
|
]);
|
|
39
|
-
let
|
|
40
|
-
if (!
|
|
41
|
-
|
|
42
|
-
dashboardId:
|
|
43
|
-
permission:
|
|
44
|
-
recipientType:
|
|
56
|
+
let G = r(async () => {
|
|
57
|
+
if (!j) return;
|
|
58
|
+
O("bigconsole.dashboard.share_clicked", {
|
|
59
|
+
dashboardId: l,
|
|
60
|
+
permission: N,
|
|
61
|
+
recipientType: j.type
|
|
45
62
|
});
|
|
46
63
|
let e = null;
|
|
47
|
-
|
|
48
|
-
dashboardId:
|
|
49
|
-
permission:
|
|
50
|
-
recipientType:
|
|
51
|
-
}),
|
|
64
|
+
j.type === "USER" ? e = await C(l, j.id, N) : j.type === "GROUP" && (e = await w(l, j.id, N)), e && O("bigconsole.dashboard.shared", {
|
|
65
|
+
dashboardId: l,
|
|
66
|
+
permission: N,
|
|
67
|
+
recipientType: j.type
|
|
68
|
+
}), M(null), A("");
|
|
52
69
|
}, [
|
|
53
|
-
|
|
54
|
-
T,
|
|
70
|
+
l,
|
|
55
71
|
O,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
j,
|
|
73
|
+
N,
|
|
74
|
+
w,
|
|
75
|
+
C
|
|
76
|
+
]), K = r(async (e, t) => {
|
|
77
|
+
await T({
|
|
61
78
|
id: e,
|
|
62
79
|
permission: t
|
|
63
80
|
});
|
|
64
|
-
}, [
|
|
65
|
-
window.confirm("Are you sure you want to revoke this access?") && await
|
|
66
|
-
}, [
|
|
67
|
-
window.confirm("Are you sure you want to revoke all shared access?") && await
|
|
68
|
-
}, [
|
|
81
|
+
}, [T]), q = r(async (e) => {
|
|
82
|
+
window.confirm("Are you sure you want to revoke this access?") && await E(e);
|
|
83
|
+
}, [E]), J = r(async () => {
|
|
84
|
+
window.confirm("Are you sure you want to revoke all shared access?") && await D(l);
|
|
85
|
+
}, [l, D]), Y = r(async (e) => {
|
|
86
|
+
if (!(!v || e === _)) {
|
|
87
|
+
W(null), H(!0);
|
|
88
|
+
try {
|
|
89
|
+
await v(e);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
W(e instanceof Error ? e.message : "Could not update general access.");
|
|
92
|
+
} finally {
|
|
93
|
+
H(!1);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, [v, _]), X = r(async () => {
|
|
69
97
|
try {
|
|
70
|
-
await navigator.clipboard.writeText(
|
|
98
|
+
await navigator.clipboard.writeText(F), R(!0), setTimeout(() => R(!1), 2e3);
|
|
71
99
|
} catch {}
|
|
72
|
-
}, [
|
|
100
|
+
}, [F]), Z = k ? [
|
|
73
101
|
{
|
|
74
102
|
id: "user-1",
|
|
75
103
|
name: "John Doe",
|
|
@@ -92,8 +120,8 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
92
120
|
name: "Editors",
|
|
93
121
|
type: "GROUP"
|
|
94
122
|
}
|
|
95
|
-
].filter((e) => e.name.toLowerCase().includes(
|
|
96
|
-
return
|
|
123
|
+
].filter((e) => e.name.toLowerCase().includes(k.toLowerCase()) || e.email?.toLowerCase().includes(k.toLowerCase())) : [], Q = typeof document < "u" && document.documentElement.classList.contains("dark"), $ = a(() => u(Q), [Q]);
|
|
124
|
+
return m ? ee(/* @__PURE__ */ s("div", {
|
|
97
125
|
style: {
|
|
98
126
|
position: "fixed",
|
|
99
127
|
top: 0,
|
|
@@ -121,13 +149,13 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
121
149
|
maxHeight: "85vh",
|
|
122
150
|
display: "flex",
|
|
123
151
|
flexDirection: "column",
|
|
124
|
-
backgroundColor:
|
|
152
|
+
backgroundColor: $.bgPrimary,
|
|
125
153
|
borderRadius: "var(--radius-card)",
|
|
126
154
|
boxShadow: "var(--shadow-elevation-3)",
|
|
127
155
|
overflow: "hidden",
|
|
128
156
|
position: "relative",
|
|
129
157
|
zIndex: 1e5,
|
|
130
|
-
color:
|
|
158
|
+
color: $.textPrimary
|
|
131
159
|
},
|
|
132
160
|
onClick: (e) => e.stopPropagation(),
|
|
133
161
|
children: [
|
|
@@ -135,11 +163,11 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
135
163
|
style: {
|
|
136
164
|
flexShrink: 0,
|
|
137
165
|
padding: "20px 24px",
|
|
138
|
-
borderBottom: `1px solid ${
|
|
166
|
+
borderBottom: `1px solid ${$.borderDefault}`,
|
|
139
167
|
display: "flex",
|
|
140
168
|
alignItems: "center",
|
|
141
169
|
justifyContent: "space-between",
|
|
142
|
-
backgroundColor:
|
|
170
|
+
backgroundColor: $.bgPrimary
|
|
143
171
|
},
|
|
144
172
|
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h2", {
|
|
145
173
|
id: "share-dialog-title",
|
|
@@ -147,16 +175,16 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
147
175
|
margin: 0,
|
|
148
176
|
fontSize: "18px",
|
|
149
177
|
fontWeight: 600,
|
|
150
|
-
color:
|
|
178
|
+
color: $.textPrimary
|
|
151
179
|
},
|
|
152
180
|
children: "Share Dashboard"
|
|
153
181
|
}), /* @__PURE__ */ s("p", {
|
|
154
182
|
style: {
|
|
155
183
|
margin: "4px 0 0",
|
|
156
184
|
fontSize: "13px",
|
|
157
|
-
color:
|
|
185
|
+
color: $.textSecondary
|
|
158
186
|
},
|
|
159
|
-
children:
|
|
187
|
+
children: p
|
|
160
188
|
})] }), /* @__PURE__ */ s("button", {
|
|
161
189
|
onClick: g,
|
|
162
190
|
style: {
|
|
@@ -164,7 +192,7 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
164
192
|
border: "none",
|
|
165
193
|
fontSize: "24px",
|
|
166
194
|
cursor: "pointer",
|
|
167
|
-
color:
|
|
195
|
+
color: $.textSecondary,
|
|
168
196
|
padding: "4px",
|
|
169
197
|
lineHeight: 1
|
|
170
198
|
},
|
|
@@ -179,20 +207,20 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
179
207
|
display: "flex",
|
|
180
208
|
gap: "4px",
|
|
181
209
|
padding: "0 24px",
|
|
182
|
-
borderBottom: `1px solid ${
|
|
183
|
-
backgroundColor:
|
|
210
|
+
borderBottom: `1px solid ${$.borderDefault}`,
|
|
211
|
+
backgroundColor: $.bgPrimary
|
|
184
212
|
},
|
|
185
213
|
children: ["people", "embed"].map((e) => /* @__PURE__ */ s("button", {
|
|
186
214
|
type: "button",
|
|
187
215
|
role: "tab",
|
|
188
|
-
"aria-selected":
|
|
189
|
-
onClick: () =>
|
|
216
|
+
"aria-selected": z === e,
|
|
217
|
+
onClick: () => B(e),
|
|
190
218
|
style: {
|
|
191
219
|
padding: "10px 12px",
|
|
192
220
|
background: "none",
|
|
193
221
|
border: "none",
|
|
194
|
-
borderBottom: `2px solid ${
|
|
195
|
-
color:
|
|
222
|
+
borderBottom: `2px solid ${z === e ? $.actionPrimaryBg : "transparent"}`,
|
|
223
|
+
color: z === e ? $.textPrimary : $.textSecondary,
|
|
196
224
|
fontSize: "13px",
|
|
197
225
|
fontWeight: 600,
|
|
198
226
|
cursor: "pointer"
|
|
@@ -200,24 +228,86 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
200
228
|
children: e === "people" ? "People" : "Publish to web"
|
|
201
229
|
}, e))
|
|
202
230
|
}),
|
|
203
|
-
|
|
231
|
+
z === "embed" && /* @__PURE__ */ s("div", {
|
|
204
232
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
205
|
-
style: { backgroundColor:
|
|
233
|
+
style: { backgroundColor: $.bgPrimary },
|
|
206
234
|
children: /* @__PURE__ */ s(n, {
|
|
207
|
-
dashboardId:
|
|
208
|
-
colors:
|
|
235
|
+
dashboardId: l,
|
|
236
|
+
colors: $
|
|
209
237
|
})
|
|
210
238
|
}),
|
|
211
|
-
|
|
239
|
+
z === "people" && /* @__PURE__ */ c("div", {
|
|
212
240
|
className: "flex min-h-0 flex-1 flex-col gap-section-gap overflow-y-auto p-card-padding",
|
|
213
|
-
style: { backgroundColor:
|
|
241
|
+
style: { backgroundColor: $.bgPrimary },
|
|
214
242
|
children: [
|
|
243
|
+
_ && v && /* @__PURE__ */ c("section", {
|
|
244
|
+
"aria-labelledby": "share-visibility-heading",
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ s("h3", {
|
|
247
|
+
id: "share-visibility-heading",
|
|
248
|
+
className: "mb-form-gap text-sm font-semibold",
|
|
249
|
+
style: { color: $.textPrimary },
|
|
250
|
+
children: "General access"
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ c("div", {
|
|
253
|
+
style: {
|
|
254
|
+
display: "flex",
|
|
255
|
+
alignItems: "center",
|
|
256
|
+
gap: "8px",
|
|
257
|
+
flexWrap: "wrap"
|
|
258
|
+
},
|
|
259
|
+
children: [/* @__PURE__ */ s("select", {
|
|
260
|
+
"aria-label": "General access",
|
|
261
|
+
"data-testid": "share-visibility",
|
|
262
|
+
value: _,
|
|
263
|
+
disabled: !y || V,
|
|
264
|
+
onChange: (e) => void Y(e.target.value),
|
|
265
|
+
style: {
|
|
266
|
+
padding: "10px 12px",
|
|
267
|
+
border: `1px solid ${$.borderDefault}`,
|
|
268
|
+
borderRadius: "6px",
|
|
269
|
+
fontSize: "13px",
|
|
270
|
+
backgroundColor: $.bgPrimary,
|
|
271
|
+
color: $.textPrimary,
|
|
272
|
+
cursor: !y || V ? "not-allowed" : "pointer",
|
|
273
|
+
opacity: !y || V ? .6 : 1
|
|
274
|
+
},
|
|
275
|
+
children: d.map((e) => /* @__PURE__ */ s("option", {
|
|
276
|
+
value: e.value,
|
|
277
|
+
children: e.label
|
|
278
|
+
}, e.value))
|
|
279
|
+
}), /* @__PURE__ */ s("span", {
|
|
280
|
+
style: {
|
|
281
|
+
fontSize: "12px",
|
|
282
|
+
color: $.textSecondary
|
|
283
|
+
},
|
|
284
|
+
children: d.find((e) => e.value === _)?.description
|
|
285
|
+
})]
|
|
286
|
+
}),
|
|
287
|
+
!y && /* @__PURE__ */ s("p", {
|
|
288
|
+
style: {
|
|
289
|
+
margin: "6px 0 0",
|
|
290
|
+
fontSize: "11px",
|
|
291
|
+
color: $.textSecondary
|
|
292
|
+
},
|
|
293
|
+
children: "You don't have permission to change general access."
|
|
294
|
+
}),
|
|
295
|
+
U && /* @__PURE__ */ s("p", {
|
|
296
|
+
style: {
|
|
297
|
+
margin: "6px 0 0",
|
|
298
|
+
fontSize: "11px",
|
|
299
|
+
color: $.statusErrorText
|
|
300
|
+
},
|
|
301
|
+
children: U
|
|
302
|
+
})
|
|
303
|
+
]
|
|
304
|
+
}),
|
|
215
305
|
/* @__PURE__ */ c("section", {
|
|
216
306
|
"aria-labelledby": "share-link-heading",
|
|
217
307
|
children: [/* @__PURE__ */ s("h3", {
|
|
218
308
|
id: "share-link-heading",
|
|
219
309
|
className: "mb-form-gap text-sm font-semibold",
|
|
220
|
-
style: { color:
|
|
310
|
+
style: { color: $.textPrimary },
|
|
221
311
|
children: "Share link"
|
|
222
312
|
}), /* @__PURE__ */ c("div", {
|
|
223
313
|
style: {
|
|
@@ -227,22 +317,22 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
227
317
|
},
|
|
228
318
|
children: [/* @__PURE__ */ s("input", {
|
|
229
319
|
type: "text",
|
|
230
|
-
value:
|
|
320
|
+
value: F,
|
|
231
321
|
readOnly: !0,
|
|
232
322
|
style: {
|
|
233
323
|
flex: 1,
|
|
234
324
|
padding: "10px 12px",
|
|
235
|
-
border: `1px solid ${
|
|
325
|
+
border: `1px solid ${$.borderDefault}`,
|
|
236
326
|
borderRadius: "6px",
|
|
237
327
|
fontSize: "13px",
|
|
238
|
-
backgroundColor:
|
|
239
|
-
color:
|
|
328
|
+
backgroundColor: $.bgSecondary,
|
|
329
|
+
color: $.textPrimary
|
|
240
330
|
}
|
|
241
331
|
}), /* @__PURE__ */ s("button", {
|
|
242
|
-
onClick:
|
|
332
|
+
onClick: X,
|
|
243
333
|
style: {
|
|
244
334
|
padding: "10px 16px",
|
|
245
|
-
backgroundColor:
|
|
335
|
+
backgroundColor: L ? $.statusSuccessBg : $.actionPrimaryBg,
|
|
246
336
|
color: "var(--color-action-primary-text)",
|
|
247
337
|
border: "none",
|
|
248
338
|
borderRadius: "6px",
|
|
@@ -251,7 +341,7 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
251
341
|
fontWeight: 500,
|
|
252
342
|
minWidth: "80px"
|
|
253
343
|
},
|
|
254
|
-
children:
|
|
344
|
+
children: L ? "Copied!" : "Copy"
|
|
255
345
|
})]
|
|
256
346
|
})]
|
|
257
347
|
}),
|
|
@@ -260,7 +350,7 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
260
350
|
children: [/* @__PURE__ */ s("h3", {
|
|
261
351
|
id: "share-invite-heading",
|
|
262
352
|
className: "mb-form-gap text-sm font-semibold",
|
|
263
|
-
style: { color:
|
|
353
|
+
style: { color: $.textPrimary },
|
|
264
354
|
children: "Invite people"
|
|
265
355
|
}), /* @__PURE__ */ c("div", {
|
|
266
356
|
style: {
|
|
@@ -277,37 +367,37 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
277
367
|
},
|
|
278
368
|
children: [/* @__PURE__ */ s("input", {
|
|
279
369
|
type: "text",
|
|
280
|
-
value:
|
|
370
|
+
value: j ? j.name : k,
|
|
281
371
|
onChange: (e) => {
|
|
282
|
-
|
|
372
|
+
A(e.target.value), M(null);
|
|
283
373
|
},
|
|
284
374
|
placeholder: "Search by name or email...",
|
|
285
375
|
style: {
|
|
286
376
|
width: "100%",
|
|
287
377
|
padding: "10px 12px",
|
|
288
|
-
border: `1px solid ${
|
|
378
|
+
border: `1px solid ${$.borderDefault}`,
|
|
289
379
|
borderRadius: "6px",
|
|
290
380
|
fontSize: "13px",
|
|
291
|
-
backgroundColor:
|
|
292
|
-
color:
|
|
381
|
+
backgroundColor: $.bgPrimary,
|
|
382
|
+
color: $.textPrimary
|
|
293
383
|
}
|
|
294
|
-
}),
|
|
384
|
+
}), k && !j && Z.length > 0 && /* @__PURE__ */ s("div", {
|
|
295
385
|
style: {
|
|
296
386
|
position: "absolute",
|
|
297
387
|
top: "100%",
|
|
298
388
|
left: 0,
|
|
299
389
|
right: 0,
|
|
300
390
|
marginTop: "4px",
|
|
301
|
-
backgroundColor:
|
|
302
|
-
border: `1px solid ${
|
|
391
|
+
backgroundColor: $.bgPrimary,
|
|
392
|
+
border: `1px solid ${$.borderDefault}`,
|
|
303
393
|
borderRadius: "6px",
|
|
304
394
|
boxShadow: "var(--shadow-elevation-3)",
|
|
305
395
|
zIndex: 100001,
|
|
306
396
|
maxHeight: "200px",
|
|
307
397
|
overflowY: "auto"
|
|
308
398
|
},
|
|
309
|
-
children:
|
|
310
|
-
onClick: () =>
|
|
399
|
+
children: Z.map((e) => /* @__PURE__ */ c("button", {
|
|
400
|
+
onClick: () => M(e),
|
|
311
401
|
style: {
|
|
312
402
|
display: "block",
|
|
313
403
|
width: "100%",
|
|
@@ -316,28 +406,28 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
316
406
|
backgroundColor: "transparent",
|
|
317
407
|
border: "none",
|
|
318
408
|
cursor: "pointer",
|
|
319
|
-
borderBottom: `1px solid ${
|
|
409
|
+
borderBottom: `1px solid ${$.borderDefault}`
|
|
320
410
|
},
|
|
321
411
|
children: [
|
|
322
412
|
/* @__PURE__ */ s("div", {
|
|
323
413
|
style: {
|
|
324
414
|
fontSize: "13px",
|
|
325
415
|
fontWeight: 500,
|
|
326
|
-
color:
|
|
416
|
+
color: $.textPrimary
|
|
327
417
|
},
|
|
328
418
|
children: e.name
|
|
329
419
|
}),
|
|
330
420
|
e.email && /* @__PURE__ */ s("div", {
|
|
331
421
|
style: {
|
|
332
422
|
fontSize: "11px",
|
|
333
|
-
color:
|
|
423
|
+
color: $.textSecondary
|
|
334
424
|
},
|
|
335
425
|
children: e.email
|
|
336
426
|
}),
|
|
337
427
|
/* @__PURE__ */ s("span", {
|
|
338
428
|
style: {
|
|
339
429
|
fontSize: "10px",
|
|
340
|
-
color:
|
|
430
|
+
color: $.textTertiary,
|
|
341
431
|
textTransform: "uppercase"
|
|
342
432
|
},
|
|
343
433
|
children: e.type
|
|
@@ -347,31 +437,31 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
347
437
|
})]
|
|
348
438
|
}),
|
|
349
439
|
/* @__PURE__ */ s("select", {
|
|
350
|
-
value:
|
|
351
|
-
onChange: (e) =>
|
|
440
|
+
value: N,
|
|
441
|
+
onChange: (e) => P(e.target.value),
|
|
352
442
|
style: {
|
|
353
443
|
padding: "10px 12px",
|
|
354
|
-
border: `1px solid ${
|
|
444
|
+
border: `1px solid ${$.borderDefault}`,
|
|
355
445
|
borderRadius: "6px",
|
|
356
446
|
fontSize: "13px",
|
|
357
|
-
backgroundColor:
|
|
358
|
-
color:
|
|
447
|
+
backgroundColor: $.bgPrimary,
|
|
448
|
+
color: $.textPrimary
|
|
359
449
|
},
|
|
360
|
-
children:
|
|
450
|
+
children: f.map((e) => /* @__PURE__ */ s("option", {
|
|
361
451
|
value: e.value,
|
|
362
452
|
children: e.label
|
|
363
453
|
}, e.value))
|
|
364
454
|
}),
|
|
365
455
|
/* @__PURE__ */ s("button", {
|
|
366
|
-
onClick:
|
|
367
|
-
disabled: !
|
|
456
|
+
onClick: G,
|
|
457
|
+
disabled: !j || x,
|
|
368
458
|
style: {
|
|
369
459
|
padding: "10px 16px",
|
|
370
|
-
backgroundColor:
|
|
371
|
-
color:
|
|
460
|
+
backgroundColor: j ? $.actionPrimaryBg : $.bgTertiary,
|
|
461
|
+
color: j ? "var(--color-action-primary-text)" : $.textSecondary,
|
|
372
462
|
border: "none",
|
|
373
463
|
borderRadius: "6px",
|
|
374
|
-
cursor:
|
|
464
|
+
cursor: j ? "pointer" : "not-allowed",
|
|
375
465
|
fontSize: "13px",
|
|
376
466
|
fontWeight: 500
|
|
377
467
|
},
|
|
@@ -394,33 +484,33 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
394
484
|
children: [/* @__PURE__ */ c("h3", {
|
|
395
485
|
id: "share-access-heading",
|
|
396
486
|
className: "text-sm font-semibold",
|
|
397
|
-
style: { color:
|
|
487
|
+
style: { color: $.textPrimary },
|
|
398
488
|
children: [
|
|
399
489
|
"People with access (",
|
|
400
|
-
|
|
490
|
+
b.length,
|
|
401
491
|
")"
|
|
402
492
|
]
|
|
403
|
-
}),
|
|
404
|
-
onClick:
|
|
493
|
+
}), b.length > 0 && /* @__PURE__ */ s("button", {
|
|
494
|
+
onClick: J,
|
|
405
495
|
style: {
|
|
406
496
|
padding: "4px 8px",
|
|
407
497
|
backgroundColor: "transparent",
|
|
408
|
-
color:
|
|
498
|
+
color: $.statusErrorText,
|
|
409
499
|
border: "none",
|
|
410
500
|
cursor: "pointer",
|
|
411
501
|
fontSize: "12px"
|
|
412
502
|
},
|
|
413
503
|
children: "Revoke All"
|
|
414
504
|
})]
|
|
415
|
-
}),
|
|
505
|
+
}), x && b.length === 0 ? /* @__PURE__ */ s("p", {
|
|
416
506
|
style: {
|
|
417
|
-
color:
|
|
507
|
+
color: $.textSecondary,
|
|
418
508
|
fontSize: "13px"
|
|
419
509
|
},
|
|
420
510
|
children: "Loading..."
|
|
421
|
-
}) :
|
|
511
|
+
}) : b.length === 0 ? /* @__PURE__ */ s("p", {
|
|
422
512
|
style: {
|
|
423
|
-
color:
|
|
513
|
+
color: $.textSecondary,
|
|
424
514
|
fontSize: "13px"
|
|
425
515
|
},
|
|
426
516
|
children: "No one has access to this dashboard yet."
|
|
@@ -430,11 +520,11 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
430
520
|
flexDirection: "column",
|
|
431
521
|
gap: "8px"
|
|
432
522
|
},
|
|
433
|
-
children:
|
|
523
|
+
children: b.map((e) => /* @__PURE__ */ s(h, {
|
|
434
524
|
share: e,
|
|
435
|
-
onUpdatePermission:
|
|
436
|
-
onRevoke:
|
|
437
|
-
colors:
|
|
525
|
+
onUpdatePermission: K,
|
|
526
|
+
onRevoke: q,
|
|
527
|
+
colors: $
|
|
438
528
|
}, e.id))
|
|
439
529
|
})]
|
|
440
530
|
})
|
|
@@ -444,7 +534,25 @@ function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
|
444
534
|
})
|
|
445
535
|
}), document.body) : null;
|
|
446
536
|
}
|
|
447
|
-
function
|
|
537
|
+
function m(e) {
|
|
538
|
+
if (!e) return {
|
|
539
|
+
label: "No expiry",
|
|
540
|
+
expired: !1
|
|
541
|
+
};
|
|
542
|
+
let t = new Date(e);
|
|
543
|
+
return Number.isNaN(t.getTime()) ? {
|
|
544
|
+
label: "No expiry",
|
|
545
|
+
expired: !1
|
|
546
|
+
} : t.getTime() <= Date.now() ? {
|
|
547
|
+
label: `Expired ${l(t, { addSuffix: !0 })}`,
|
|
548
|
+
expired: !0
|
|
549
|
+
} : {
|
|
550
|
+
label: `Expires ${l(t, { addSuffix: !0 })}`,
|
|
551
|
+
expired: !1
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
555
|
+
let i = m(e.expiresAt);
|
|
448
556
|
return /* @__PURE__ */ c("div", {
|
|
449
557
|
style: {
|
|
450
558
|
display: "flex",
|
|
@@ -496,40 +604,58 @@ function p({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
496
604
|
style: {
|
|
497
605
|
display: "flex",
|
|
498
606
|
alignItems: "center",
|
|
499
|
-
gap: "8px"
|
|
607
|
+
gap: "8px",
|
|
608
|
+
flexWrap: "wrap"
|
|
500
609
|
},
|
|
501
|
-
children: [
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
children:
|
|
515
|
-
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
610
|
+
children: [
|
|
611
|
+
/* @__PURE__ */ s("span", {
|
|
612
|
+
"data-testid": "share-expiry",
|
|
613
|
+
title: e.expiresAt ? new Date(e.expiresAt).toLocaleString() : "Access does not expire",
|
|
614
|
+
style: {
|
|
615
|
+
fontSize: "11px",
|
|
616
|
+
padding: "4px 8px",
|
|
617
|
+
borderRadius: "999px",
|
|
618
|
+
whiteSpace: "nowrap",
|
|
619
|
+
backgroundColor: r.bgTertiary,
|
|
620
|
+
color: i.expired ? r.statusErrorText : r.textSecondary,
|
|
621
|
+
fontWeight: i.expired ? 600 : 400
|
|
622
|
+
},
|
|
623
|
+
children: i.label
|
|
624
|
+
}),
|
|
625
|
+
/* @__PURE__ */ s("select", {
|
|
626
|
+
value: e.permission,
|
|
627
|
+
onChange: (n) => t(e.id, n.target.value),
|
|
628
|
+
style: {
|
|
629
|
+
padding: "6px 10px",
|
|
630
|
+
border: `1px solid ${r.borderDefault}`,
|
|
631
|
+
borderRadius: "4px",
|
|
632
|
+
fontSize: "12px",
|
|
633
|
+
backgroundColor: r.bgPrimary,
|
|
634
|
+
color: r.textPrimary
|
|
635
|
+
},
|
|
636
|
+
children: f.map((e) => /* @__PURE__ */ s("option", {
|
|
637
|
+
value: e.value,
|
|
638
|
+
children: e.label
|
|
639
|
+
}, e.value))
|
|
640
|
+
}),
|
|
641
|
+
/* @__PURE__ */ s("button", {
|
|
642
|
+
onClick: () => n(e.id),
|
|
643
|
+
style: {
|
|
644
|
+
padding: "6px 10px",
|
|
645
|
+
backgroundColor: "transparent",
|
|
646
|
+
color: r.statusErrorText,
|
|
647
|
+
border: `1px solid ${r.statusErrorText}`,
|
|
648
|
+
borderRadius: "4px",
|
|
649
|
+
cursor: "pointer",
|
|
650
|
+
fontSize: "12px"
|
|
651
|
+
},
|
|
652
|
+
children: "Revoke"
|
|
653
|
+
})
|
|
654
|
+
]
|
|
529
655
|
})]
|
|
530
656
|
});
|
|
531
657
|
}
|
|
532
658
|
//#endregion
|
|
533
|
-
export {
|
|
659
|
+
export { p as default };
|
|
534
660
|
|
|
535
661
|
//# sourceMappingURL=ShareDialog.js.map
|