@burdenoff/microfe-bigconsole 2026.731.5 → 2026.731.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +5 -2
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +308 -0
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -0
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +345 -306
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardEmbedPolicy.js +108 -0
- package/dist/bigconsole/hooks/useDashboardEmbedPolicy.js.map +1 -0
- package/dist/generated/wspace-operations.js +288 -215
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import e from "../../../hooks/useBigConsoleAnalytics.js";
|
|
2
2
|
import t from "../../../hooks/useDashboardSharing.js";
|
|
3
3
|
import "../../../hooks/index.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import n from "./EmbedTab.js";
|
|
5
|
+
import { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as l } from "react-dom";
|
|
7
8
|
//#region src/bigconsole/components/dashboard/ShareDialog/ShareDialog.tsx
|
|
8
|
-
var
|
|
9
|
+
var u = (e) => ({
|
|
9
10
|
bgPrimary: e ? "#1a1a2e" : "#ffffff",
|
|
10
11
|
bgSecondary: e ? "#252542" : "#f4f4f5",
|
|
11
12
|
bgTertiary: e ? "#2d2d4a" : "#e4e4e7",
|
|
@@ -17,7 +18,7 @@ var l = (e) => ({
|
|
|
17
18
|
actionPrimaryBgHover: "#4f46e5",
|
|
18
19
|
statusSuccessBg: "#22c55e",
|
|
19
20
|
statusErrorText: "#ef4444"
|
|
20
|
-
}),
|
|
21
|
+
}), d = [{
|
|
21
22
|
value: "VIEW",
|
|
22
23
|
label: "View",
|
|
23
24
|
description: "Can view the dashboard"
|
|
@@ -26,49 +27,49 @@ var l = (e) => ({
|
|
|
26
27
|
label: "Edit",
|
|
27
28
|
description: "Can edit widgets, layout, and share"
|
|
28
29
|
}];
|
|
29
|
-
function
|
|
30
|
-
let { shares:
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
function f({ dashboardId: f, dashboardName: m, isOpen: h, onClose: g }) {
|
|
31
|
+
let { shares: _, loading: v, fetchShares: y, shareWithUser: b, shareWithGroup: x, updateShare: S, revokeShare: C, revokeAllShares: w } = t(), T = e(), [E, D] = o(""), [O, k] = o(null), [A, j] = o("VIEW"), [M, N] = o(""), [P, F] = o(!1), [I, L] = o("people");
|
|
32
|
+
i(() => {
|
|
33
|
+
h && f && (y(f), N(`${window.location.origin}/dashboard/${f}?shared=true`));
|
|
33
34
|
}, [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
h,
|
|
36
|
+
f,
|
|
37
|
+
y
|
|
37
38
|
]);
|
|
38
|
-
let
|
|
39
|
-
if (!
|
|
40
|
-
|
|
41
|
-
dashboardId:
|
|
42
|
-
permission:
|
|
43
|
-
recipientType:
|
|
39
|
+
let R = r(async () => {
|
|
40
|
+
if (!O) return;
|
|
41
|
+
T("bigconsole.dashboard.share_clicked", {
|
|
42
|
+
dashboardId: f,
|
|
43
|
+
permission: A,
|
|
44
|
+
recipientType: O.type
|
|
44
45
|
});
|
|
45
46
|
let e = null;
|
|
46
|
-
|
|
47
|
-
dashboardId:
|
|
48
|
-
permission:
|
|
49
|
-
recipientType:
|
|
50
|
-
}),
|
|
47
|
+
O.type === "USER" ? e = await b(f, O.id, A) : O.type === "GROUP" && (e = await x(f, O.id, A)), e && T("bigconsole.dashboard.shared", {
|
|
48
|
+
dashboardId: f,
|
|
49
|
+
permission: A,
|
|
50
|
+
recipientType: O.type
|
|
51
|
+
}), k(null), D("");
|
|
51
52
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]),
|
|
59
|
-
await
|
|
53
|
+
f,
|
|
54
|
+
T,
|
|
55
|
+
O,
|
|
56
|
+
A,
|
|
57
|
+
x,
|
|
58
|
+
b
|
|
59
|
+
]), z = r(async (e, t) => {
|
|
60
|
+
await S({
|
|
60
61
|
id: e,
|
|
61
62
|
permission: t
|
|
62
63
|
});
|
|
63
|
-
}, [
|
|
64
|
-
window.confirm("Are you sure you want to revoke this access?") && await
|
|
65
|
-
}, [
|
|
66
|
-
window.confirm("Are you sure you want to revoke all shared access?") && await
|
|
67
|
-
}, [
|
|
64
|
+
}, [S]), B = r(async (e) => {
|
|
65
|
+
window.confirm("Are you sure you want to revoke this access?") && await C(e);
|
|
66
|
+
}, [C]), V = r(async () => {
|
|
67
|
+
window.confirm("Are you sure you want to revoke all shared access?") && await w(f);
|
|
68
|
+
}, [f, w]), H = r(async () => {
|
|
68
69
|
try {
|
|
69
|
-
await navigator.clipboard.writeText(
|
|
70
|
+
await navigator.clipboard.writeText(M), F(!0), setTimeout(() => F(!1), 2e3);
|
|
70
71
|
} catch {}
|
|
71
|
-
}, [
|
|
72
|
+
}, [M]), U = E ? [
|
|
72
73
|
{
|
|
73
74
|
id: "user-1",
|
|
74
75
|
name: "John Doe",
|
|
@@ -91,8 +92,8 @@ function d({ dashboardId: d, dashboardName: p, isOpen: m, onClose: h }) {
|
|
|
91
92
|
name: "Editors",
|
|
92
93
|
type: "GROUP"
|
|
93
94
|
}
|
|
94
|
-
].filter((e) => e.name.toLowerCase().includes(
|
|
95
|
-
return
|
|
95
|
+
].filter((e) => e.name.toLowerCase().includes(E.toLowerCase()) || e.email?.toLowerCase().includes(E.toLowerCase())) : [], W = typeof document < "u" && document.documentElement.classList.contains("dark"), G = a(() => u(W), [W]);
|
|
96
|
+
return h ? l(/* @__PURE__ */ s("div", {
|
|
96
97
|
style: {
|
|
97
98
|
position: "fixed",
|
|
98
99
|
top: 0,
|
|
@@ -106,301 +107,339 @@ function d({ dashboardId: d, dashboardName: p, isOpen: m, onClose: h }) {
|
|
|
106
107
|
zIndex: 99999,
|
|
107
108
|
isolation: "isolate"
|
|
108
109
|
},
|
|
109
|
-
onClick:
|
|
110
|
-
children: /* @__PURE__ */
|
|
110
|
+
onClick: g,
|
|
111
|
+
children: /* @__PURE__ */ c("div", {
|
|
111
112
|
style: {
|
|
112
113
|
width: "520px",
|
|
113
114
|
maxHeight: "80vh",
|
|
114
|
-
backgroundColor:
|
|
115
|
+
backgroundColor: G.bgPrimary,
|
|
115
116
|
borderRadius: "12px",
|
|
116
117
|
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.3)",
|
|
117
118
|
overflow: "hidden",
|
|
118
119
|
position: "relative",
|
|
119
120
|
zIndex: 1e5,
|
|
120
|
-
color:
|
|
121
|
+
color: G.textPrimary
|
|
121
122
|
},
|
|
122
123
|
onClick: (e) => e.stopPropagation(),
|
|
123
|
-
children: [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ c("div", {
|
|
126
|
+
style: {
|
|
127
|
+
padding: "20px 24px",
|
|
128
|
+
borderBottom: `1px solid ${G.borderDefault}`,
|
|
129
|
+
display: "flex",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
justifyContent: "space-between",
|
|
132
|
+
backgroundColor: G.bgPrimary
|
|
133
|
+
},
|
|
134
|
+
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
135
|
+
style: {
|
|
136
|
+
margin: 0,
|
|
137
|
+
fontSize: "18px",
|
|
138
|
+
fontWeight: 600,
|
|
139
|
+
color: G.textPrimary
|
|
140
|
+
},
|
|
141
|
+
children: "Share Dashboard"
|
|
142
|
+
}), /* @__PURE__ */ s("p", {
|
|
143
|
+
style: {
|
|
144
|
+
margin: "4px 0 0",
|
|
145
|
+
fontSize: "13px",
|
|
146
|
+
color: G.textSecondary
|
|
147
|
+
},
|
|
148
|
+
children: m
|
|
149
|
+
})] }), /* @__PURE__ */ s("button", {
|
|
150
|
+
onClick: g,
|
|
151
|
+
style: {
|
|
152
|
+
background: "none",
|
|
153
|
+
border: "none",
|
|
154
|
+
fontSize: "24px",
|
|
155
|
+
cursor: "pointer",
|
|
156
|
+
color: G.textSecondary,
|
|
157
|
+
padding: "4px",
|
|
158
|
+
lineHeight: 1
|
|
159
|
+
},
|
|
160
|
+
children: "×"
|
|
161
|
+
})]
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ s("div", {
|
|
133
164
|
style: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
165
|
+
display: "flex",
|
|
166
|
+
gap: "4px",
|
|
167
|
+
padding: "0 24px",
|
|
168
|
+
borderBottom: `1px solid ${G.borderDefault}`,
|
|
169
|
+
backgroundColor: G.bgPrimary
|
|
138
170
|
},
|
|
139
|
-
children: "
|
|
140
|
-
|
|
171
|
+
children: ["people", "embed"].map((e) => /* @__PURE__ */ s("button", {
|
|
172
|
+
type: "button",
|
|
173
|
+
onClick: () => L(e),
|
|
174
|
+
style: {
|
|
175
|
+
padding: "10px 12px",
|
|
176
|
+
background: "none",
|
|
177
|
+
border: "none",
|
|
178
|
+
borderBottom: `2px solid ${I === e ? G.actionPrimaryBg : "transparent"}`,
|
|
179
|
+
color: I === e ? G.textPrimary : G.textSecondary,
|
|
180
|
+
fontSize: "13px",
|
|
181
|
+
fontWeight: 600,
|
|
182
|
+
cursor: "pointer"
|
|
183
|
+
},
|
|
184
|
+
children: e === "people" ? "People" : "Publish to web"
|
|
185
|
+
}, e))
|
|
186
|
+
}),
|
|
187
|
+
I === "embed" && /* @__PURE__ */ s("div", {
|
|
141
188
|
style: {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
189
|
+
overflowY: "auto",
|
|
190
|
+
maxHeight: "calc(80vh - 160px)",
|
|
191
|
+
backgroundColor: G.bgPrimary
|
|
145
192
|
},
|
|
146
|
-
children:
|
|
147
|
-
|
|
148
|
-
|
|
193
|
+
children: /* @__PURE__ */ s(n, {
|
|
194
|
+
dashboardId: f,
|
|
195
|
+
colors: G
|
|
196
|
+
})
|
|
197
|
+
}),
|
|
198
|
+
I === "people" && /* @__PURE__ */ c("div", {
|
|
149
199
|
style: {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
color: H.textSecondary,
|
|
155
|
-
padding: "4px",
|
|
156
|
-
lineHeight: 1
|
|
200
|
+
padding: "24px",
|
|
201
|
+
overflowY: "auto",
|
|
202
|
+
maxHeight: "calc(80vh - 200px)",
|
|
203
|
+
backgroundColor: G.bgPrimary
|
|
157
204
|
},
|
|
158
|
-
children:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
padding: "24px",
|
|
163
|
-
overflowY: "auto",
|
|
164
|
-
maxHeight: "calc(80vh - 200px)",
|
|
165
|
-
backgroundColor: H.bgPrimary
|
|
166
|
-
},
|
|
167
|
-
children: [
|
|
168
|
-
/* @__PURE__ */ s("div", {
|
|
169
|
-
style: { marginBottom: "24px" },
|
|
170
|
-
children: [/* @__PURE__ */ o("label", {
|
|
171
|
-
style: {
|
|
172
|
-
display: "block",
|
|
173
|
-
marginBottom: "8px",
|
|
174
|
-
fontSize: "13px",
|
|
175
|
-
fontWeight: 600,
|
|
176
|
-
color: H.textPrimary
|
|
177
|
-
},
|
|
178
|
-
children: "Share Link"
|
|
179
|
-
}), /* @__PURE__ */ s("div", {
|
|
180
|
-
style: {
|
|
181
|
-
display: "flex",
|
|
182
|
-
gap: "8px"
|
|
183
|
-
},
|
|
184
|
-
children: [/* @__PURE__ */ o("input", {
|
|
185
|
-
type: "text",
|
|
186
|
-
value: j,
|
|
187
|
-
readOnly: !0,
|
|
205
|
+
children: [
|
|
206
|
+
/* @__PURE__ */ c("div", {
|
|
207
|
+
style: { marginBottom: "24px" },
|
|
208
|
+
children: [/* @__PURE__ */ s("label", {
|
|
188
209
|
style: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
border: `1px solid ${H.borderDefault}`,
|
|
192
|
-
borderRadius: "6px",
|
|
210
|
+
display: "block",
|
|
211
|
+
marginBottom: "8px",
|
|
193
212
|
fontSize: "13px",
|
|
194
|
-
|
|
195
|
-
color:
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
213
|
+
fontWeight: 600,
|
|
214
|
+
color: G.textPrimary
|
|
215
|
+
},
|
|
216
|
+
children: "Share Link"
|
|
217
|
+
}), /* @__PURE__ */ c("div", {
|
|
199
218
|
style: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
color: "white",
|
|
203
|
-
border: "none",
|
|
204
|
-
borderRadius: "6px",
|
|
205
|
-
cursor: "pointer",
|
|
206
|
-
fontSize: "13px",
|
|
207
|
-
fontWeight: 500,
|
|
208
|
-
minWidth: "80px"
|
|
219
|
+
display: "flex",
|
|
220
|
+
gap: "8px"
|
|
209
221
|
},
|
|
210
|
-
children:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
/* @__PURE__ */ s("div", {
|
|
215
|
-
style: { marginBottom: "24px" },
|
|
216
|
-
children: [/* @__PURE__ */ o("label", {
|
|
217
|
-
style: {
|
|
218
|
-
display: "block",
|
|
219
|
-
marginBottom: "8px",
|
|
220
|
-
fontSize: "13px",
|
|
221
|
-
fontWeight: 600,
|
|
222
|
-
color: H.textPrimary
|
|
223
|
-
},
|
|
224
|
-
children: "Add People"
|
|
225
|
-
}), /* @__PURE__ */ s("div", {
|
|
226
|
-
style: {
|
|
227
|
-
display: "flex",
|
|
228
|
-
gap: "8px",
|
|
229
|
-
marginBottom: "8px"
|
|
230
|
-
},
|
|
231
|
-
children: [
|
|
232
|
-
/* @__PURE__ */ s("div", {
|
|
222
|
+
children: [/* @__PURE__ */ s("input", {
|
|
223
|
+
type: "text",
|
|
224
|
+
value: M,
|
|
225
|
+
readOnly: !0,
|
|
233
226
|
style: {
|
|
234
227
|
flex: 1,
|
|
235
|
-
position: "relative"
|
|
236
|
-
},
|
|
237
|
-
children: [/* @__PURE__ */ o("input", {
|
|
238
|
-
type: "text",
|
|
239
|
-
value: D ? D.name : T,
|
|
240
|
-
onChange: (e) => {
|
|
241
|
-
E(e.target.value), O(null);
|
|
242
|
-
},
|
|
243
|
-
placeholder: "Search by name or email...",
|
|
244
|
-
style: {
|
|
245
|
-
width: "100%",
|
|
246
|
-
padding: "10px 12px",
|
|
247
|
-
border: `1px solid ${H.borderDefault}`,
|
|
248
|
-
borderRadius: "6px",
|
|
249
|
-
fontSize: "13px",
|
|
250
|
-
backgroundColor: H.bgPrimary,
|
|
251
|
-
color: H.textPrimary
|
|
252
|
-
}
|
|
253
|
-
}), T && !D && B.length > 0 && /* @__PURE__ */ o("div", {
|
|
254
|
-
style: {
|
|
255
|
-
position: "absolute",
|
|
256
|
-
top: "100%",
|
|
257
|
-
left: 0,
|
|
258
|
-
right: 0,
|
|
259
|
-
marginTop: "4px",
|
|
260
|
-
backgroundColor: H.bgPrimary,
|
|
261
|
-
border: `1px solid ${H.borderDefault}`,
|
|
262
|
-
borderRadius: "6px",
|
|
263
|
-
boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
|
|
264
|
-
zIndex: 100001,
|
|
265
|
-
maxHeight: "200px",
|
|
266
|
-
overflowY: "auto"
|
|
267
|
-
},
|
|
268
|
-
children: B.map((e) => /* @__PURE__ */ s("button", {
|
|
269
|
-
onClick: () => O(e),
|
|
270
|
-
style: {
|
|
271
|
-
display: "block",
|
|
272
|
-
width: "100%",
|
|
273
|
-
padding: "10px 12px",
|
|
274
|
-
textAlign: "left",
|
|
275
|
-
backgroundColor: "transparent",
|
|
276
|
-
border: "none",
|
|
277
|
-
cursor: "pointer",
|
|
278
|
-
borderBottom: `1px solid ${H.borderDefault}`
|
|
279
|
-
},
|
|
280
|
-
children: [
|
|
281
|
-
/* @__PURE__ */ o("div", {
|
|
282
|
-
style: {
|
|
283
|
-
fontSize: "13px",
|
|
284
|
-
fontWeight: 500,
|
|
285
|
-
color: H.textPrimary
|
|
286
|
-
},
|
|
287
|
-
children: e.name
|
|
288
|
-
}),
|
|
289
|
-
e.email && /* @__PURE__ */ o("div", {
|
|
290
|
-
style: {
|
|
291
|
-
fontSize: "11px",
|
|
292
|
-
color: H.textSecondary
|
|
293
|
-
},
|
|
294
|
-
children: e.email
|
|
295
|
-
}),
|
|
296
|
-
/* @__PURE__ */ o("span", {
|
|
297
|
-
style: {
|
|
298
|
-
fontSize: "10px",
|
|
299
|
-
color: H.textTertiary,
|
|
300
|
-
textTransform: "uppercase"
|
|
301
|
-
},
|
|
302
|
-
children: e.type
|
|
303
|
-
})
|
|
304
|
-
]
|
|
305
|
-
}, e.id))
|
|
306
|
-
})]
|
|
307
|
-
}),
|
|
308
|
-
/* @__PURE__ */ o("select", {
|
|
309
|
-
value: k,
|
|
310
|
-
onChange: (e) => A(e.target.value),
|
|
311
|
-
style: {
|
|
312
228
|
padding: "10px 12px",
|
|
313
|
-
border: `1px solid ${
|
|
229
|
+
border: `1px solid ${G.borderDefault}`,
|
|
314
230
|
borderRadius: "6px",
|
|
315
231
|
fontSize: "13px",
|
|
316
|
-
backgroundColor:
|
|
317
|
-
color:
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
children: e.label
|
|
322
|
-
}, e.value))
|
|
323
|
-
}),
|
|
324
|
-
/* @__PURE__ */ o("button", {
|
|
325
|
-
onClick: F,
|
|
326
|
-
disabled: !D || _,
|
|
232
|
+
backgroundColor: G.bgSecondary,
|
|
233
|
+
color: G.textPrimary
|
|
234
|
+
}
|
|
235
|
+
}), /* @__PURE__ */ s("button", {
|
|
236
|
+
onClick: H,
|
|
327
237
|
style: {
|
|
328
238
|
padding: "10px 16px",
|
|
329
|
-
backgroundColor:
|
|
330
|
-
color:
|
|
239
|
+
backgroundColor: P ? G.statusSuccessBg : G.actionPrimaryBg,
|
|
240
|
+
color: "white",
|
|
331
241
|
border: "none",
|
|
332
242
|
borderRadius: "6px",
|
|
333
|
-
cursor:
|
|
243
|
+
cursor: "pointer",
|
|
334
244
|
fontSize: "13px",
|
|
335
|
-
fontWeight: 500
|
|
245
|
+
fontWeight: 500,
|
|
246
|
+
minWidth: "80px"
|
|
336
247
|
},
|
|
337
|
-
children: "
|
|
338
|
-
})
|
|
339
|
-
]
|
|
340
|
-
})
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
248
|
+
children: P ? "Copied!" : "Copy"
|
|
249
|
+
})]
|
|
250
|
+
})]
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ c("div", {
|
|
253
|
+
style: { marginBottom: "24px" },
|
|
254
|
+
children: [/* @__PURE__ */ s("label", {
|
|
255
|
+
style: {
|
|
256
|
+
display: "block",
|
|
257
|
+
marginBottom: "8px",
|
|
258
|
+
fontSize: "13px",
|
|
259
|
+
fontWeight: 600,
|
|
260
|
+
color: G.textPrimary
|
|
261
|
+
},
|
|
262
|
+
children: "Add People"
|
|
263
|
+
}), /* @__PURE__ */ c("div", {
|
|
264
|
+
style: {
|
|
265
|
+
display: "flex",
|
|
266
|
+
gap: "8px",
|
|
267
|
+
marginBottom: "8px"
|
|
268
|
+
},
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ c("div", {
|
|
271
|
+
style: {
|
|
272
|
+
flex: 1,
|
|
273
|
+
position: "relative"
|
|
274
|
+
},
|
|
275
|
+
children: [/* @__PURE__ */ s("input", {
|
|
276
|
+
type: "text",
|
|
277
|
+
value: O ? O.name : E,
|
|
278
|
+
onChange: (e) => {
|
|
279
|
+
D(e.target.value), k(null);
|
|
280
|
+
},
|
|
281
|
+
placeholder: "Search by name or email...",
|
|
282
|
+
style: {
|
|
283
|
+
width: "100%",
|
|
284
|
+
padding: "10px 12px",
|
|
285
|
+
border: `1px solid ${G.borderDefault}`,
|
|
286
|
+
borderRadius: "6px",
|
|
287
|
+
fontSize: "13px",
|
|
288
|
+
backgroundColor: G.bgPrimary,
|
|
289
|
+
color: G.textPrimary
|
|
290
|
+
}
|
|
291
|
+
}), E && !O && U.length > 0 && /* @__PURE__ */ s("div", {
|
|
292
|
+
style: {
|
|
293
|
+
position: "absolute",
|
|
294
|
+
top: "100%",
|
|
295
|
+
left: 0,
|
|
296
|
+
right: 0,
|
|
297
|
+
marginTop: "4px",
|
|
298
|
+
backgroundColor: G.bgPrimary,
|
|
299
|
+
border: `1px solid ${G.borderDefault}`,
|
|
300
|
+
borderRadius: "6px",
|
|
301
|
+
boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
|
|
302
|
+
zIndex: 100001,
|
|
303
|
+
maxHeight: "200px",
|
|
304
|
+
overflowY: "auto"
|
|
305
|
+
},
|
|
306
|
+
children: U.map((e) => /* @__PURE__ */ c("button", {
|
|
307
|
+
onClick: () => k(e),
|
|
308
|
+
style: {
|
|
309
|
+
display: "block",
|
|
310
|
+
width: "100%",
|
|
311
|
+
padding: "10px 12px",
|
|
312
|
+
textAlign: "left",
|
|
313
|
+
backgroundColor: "transparent",
|
|
314
|
+
border: "none",
|
|
315
|
+
cursor: "pointer",
|
|
316
|
+
borderBottom: `1px solid ${G.borderDefault}`
|
|
317
|
+
},
|
|
318
|
+
children: [
|
|
319
|
+
/* @__PURE__ */ s("div", {
|
|
320
|
+
style: {
|
|
321
|
+
fontSize: "13px",
|
|
322
|
+
fontWeight: 500,
|
|
323
|
+
color: G.textPrimary
|
|
324
|
+
},
|
|
325
|
+
children: e.name
|
|
326
|
+
}),
|
|
327
|
+
e.email && /* @__PURE__ */ s("div", {
|
|
328
|
+
style: {
|
|
329
|
+
fontSize: "11px",
|
|
330
|
+
color: G.textSecondary
|
|
331
|
+
},
|
|
332
|
+
children: e.email
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ s("span", {
|
|
335
|
+
style: {
|
|
336
|
+
fontSize: "10px",
|
|
337
|
+
color: G.textTertiary,
|
|
338
|
+
textTransform: "uppercase"
|
|
339
|
+
},
|
|
340
|
+
children: e.type
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
}, e.id))
|
|
344
|
+
})]
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ s("select", {
|
|
347
|
+
value: A,
|
|
348
|
+
onChange: (e) => j(e.target.value),
|
|
349
|
+
style: {
|
|
350
|
+
padding: "10px 12px",
|
|
351
|
+
border: `1px solid ${G.borderDefault}`,
|
|
352
|
+
borderRadius: "6px",
|
|
353
|
+
fontSize: "13px",
|
|
354
|
+
backgroundColor: G.bgPrimary,
|
|
355
|
+
color: G.textPrimary
|
|
356
|
+
},
|
|
357
|
+
children: d.map((e) => /* @__PURE__ */ s("option", {
|
|
358
|
+
value: e.value,
|
|
359
|
+
children: e.label
|
|
360
|
+
}, e.value))
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ s("button", {
|
|
363
|
+
onClick: R,
|
|
364
|
+
disabled: !O || v,
|
|
365
|
+
style: {
|
|
366
|
+
padding: "10px 16px",
|
|
367
|
+
backgroundColor: O ? G.actionPrimaryBg : G.bgTertiary,
|
|
368
|
+
color: O ? "white" : G.textSecondary,
|
|
369
|
+
border: "none",
|
|
370
|
+
borderRadius: "6px",
|
|
371
|
+
cursor: O ? "pointer" : "not-allowed",
|
|
372
|
+
fontSize: "13px",
|
|
373
|
+
fontWeight: 500
|
|
374
|
+
},
|
|
375
|
+
children: "Share"
|
|
376
|
+
})
|
|
377
|
+
]
|
|
378
|
+
})]
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
|
|
350
381
|
style: {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
382
|
+
display: "flex",
|
|
383
|
+
alignItems: "center",
|
|
384
|
+
justifyContent: "space-between",
|
|
385
|
+
marginBottom: "12px"
|
|
354
386
|
},
|
|
355
|
-
children: [
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
387
|
+
children: [/* @__PURE__ */ c("label", {
|
|
388
|
+
style: {
|
|
389
|
+
fontSize: "13px",
|
|
390
|
+
fontWeight: 600,
|
|
391
|
+
color: G.textPrimary
|
|
392
|
+
},
|
|
393
|
+
children: [
|
|
394
|
+
"People with Access (",
|
|
395
|
+
_.length,
|
|
396
|
+
")"
|
|
397
|
+
]
|
|
398
|
+
}), _.length > 0 && /* @__PURE__ */ s("button", {
|
|
399
|
+
onClick: V,
|
|
400
|
+
style: {
|
|
401
|
+
padding: "4px 8px",
|
|
402
|
+
backgroundColor: "transparent",
|
|
403
|
+
color: G.statusErrorText,
|
|
404
|
+
border: "none",
|
|
405
|
+
cursor: "pointer",
|
|
406
|
+
fontSize: "12px"
|
|
407
|
+
},
|
|
408
|
+
children: "Revoke All"
|
|
409
|
+
})]
|
|
410
|
+
}), v && _.length === 0 ? /* @__PURE__ */ s("p", {
|
|
362
411
|
style: {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
color: H.statusErrorText,
|
|
366
|
-
border: "none",
|
|
367
|
-
cursor: "pointer",
|
|
368
|
-
fontSize: "12px"
|
|
412
|
+
color: G.textSecondary,
|
|
413
|
+
fontSize: "13px"
|
|
369
414
|
},
|
|
370
|
-
children: "
|
|
371
|
-
})
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
onRevoke: L,
|
|
394
|
-
colors: H
|
|
395
|
-
}, e.id))
|
|
396
|
-
})] })
|
|
397
|
-
]
|
|
398
|
-
})]
|
|
415
|
+
children: "Loading..."
|
|
416
|
+
}) : _.length === 0 ? /* @__PURE__ */ s("p", {
|
|
417
|
+
style: {
|
|
418
|
+
color: G.textSecondary,
|
|
419
|
+
fontSize: "13px"
|
|
420
|
+
},
|
|
421
|
+
children: "No one has access to this dashboard yet."
|
|
422
|
+
}) : /* @__PURE__ */ s("div", {
|
|
423
|
+
style: {
|
|
424
|
+
display: "flex",
|
|
425
|
+
flexDirection: "column",
|
|
426
|
+
gap: "8px"
|
|
427
|
+
},
|
|
428
|
+
children: _.map((e) => /* @__PURE__ */ s(p, {
|
|
429
|
+
share: e,
|
|
430
|
+
onUpdatePermission: z,
|
|
431
|
+
onRevoke: B,
|
|
432
|
+
colors: G
|
|
433
|
+
}, e.id))
|
|
434
|
+
})] })
|
|
435
|
+
]
|
|
436
|
+
})
|
|
437
|
+
]
|
|
399
438
|
})
|
|
400
439
|
}), document.body) : null;
|
|
401
440
|
}
|
|
402
|
-
function
|
|
403
|
-
return /* @__PURE__ */
|
|
441
|
+
function p({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
442
|
+
return /* @__PURE__ */ c("div", {
|
|
404
443
|
style: {
|
|
405
444
|
display: "flex",
|
|
406
445
|
alignItems: "center",
|
|
@@ -409,13 +448,13 @@ function f({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
409
448
|
backgroundColor: r.bgSecondary,
|
|
410
449
|
borderRadius: "6px"
|
|
411
450
|
},
|
|
412
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ c("div", {
|
|
413
452
|
style: {
|
|
414
453
|
display: "flex",
|
|
415
454
|
alignItems: "center",
|
|
416
455
|
gap: "10px"
|
|
417
456
|
},
|
|
418
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ s("div", {
|
|
419
458
|
style: {
|
|
420
459
|
width: "36px",
|
|
421
460
|
height: "36px",
|
|
@@ -429,14 +468,14 @@ function f({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
429
468
|
fontSize: "14px"
|
|
430
469
|
},
|
|
431
470
|
children: e.recipientType === "USER" ? "U" : "R"
|
|
432
|
-
}), /* @__PURE__ */
|
|
471
|
+
}), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("div", {
|
|
433
472
|
style: {
|
|
434
473
|
fontSize: "13px",
|
|
435
474
|
fontWeight: 500,
|
|
436
475
|
color: r.textPrimary
|
|
437
476
|
},
|
|
438
477
|
children: e.recipientId
|
|
439
|
-
}), /* @__PURE__ */
|
|
478
|
+
}), /* @__PURE__ */ c("div", {
|
|
440
479
|
style: {
|
|
441
480
|
fontSize: "11px",
|
|
442
481
|
color: r.textSecondary
|
|
@@ -447,13 +486,13 @@ function f({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
447
486
|
new Date(e.createdAt).toLocaleDateString()
|
|
448
487
|
]
|
|
449
488
|
})] })]
|
|
450
|
-
}), /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ c("div", {
|
|
451
490
|
style: {
|
|
452
491
|
display: "flex",
|
|
453
492
|
alignItems: "center",
|
|
454
493
|
gap: "8px"
|
|
455
494
|
},
|
|
456
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ s("select", {
|
|
457
496
|
value: e.permission,
|
|
458
497
|
onChange: (n) => t(e.id, n.target.value),
|
|
459
498
|
style: {
|
|
@@ -464,11 +503,11 @@ function f({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
464
503
|
backgroundColor: r.bgPrimary,
|
|
465
504
|
color: r.textPrimary
|
|
466
505
|
},
|
|
467
|
-
children:
|
|
506
|
+
children: d.map((e) => /* @__PURE__ */ s("option", {
|
|
468
507
|
value: e.value,
|
|
469
508
|
children: e.label
|
|
470
509
|
}, e.value))
|
|
471
|
-
}), /* @__PURE__ */
|
|
510
|
+
}), /* @__PURE__ */ s("button", {
|
|
472
511
|
onClick: () => n(e.id),
|
|
473
512
|
style: {
|
|
474
513
|
padding: "6px 10px",
|
|
@@ -485,6 +524,6 @@ function f({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
485
524
|
});
|
|
486
525
|
}
|
|
487
526
|
//#endregion
|
|
488
|
-
export {
|
|
527
|
+
export { f as default };
|
|
489
528
|
|
|
490
529
|
//# sourceMappingURL=ShareDialog.js.map
|