@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.
@@ -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 { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { createPortal as c } from "react-dom";
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 l = (e) => ({
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
- }), u = [{
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 d({ dashboardId: d, dashboardName: p, isOpen: m, onClose: h }) {
30
- let { shares: g, loading: _, fetchShares: v, shareWithUser: y, shareWithGroup: b, updateShare: x, revokeShare: S, revokeAllShares: C } = t(), w = e(), [T, E] = a(""), [D, O] = a(null), [k, A] = a("VIEW"), [j, M] = a(""), [N, P] = a(!1);
31
- r(() => {
32
- m && d && (v(d), M(`${window.location.origin}/dashboard/${d}?shared=true`));
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
- m,
35
- d,
36
- v
35
+ h,
36
+ f,
37
+ y
37
38
  ]);
38
- let F = n(async () => {
39
- if (!D) return;
40
- w("bigconsole.dashboard.share_clicked", {
41
- dashboardId: d,
42
- permission: k,
43
- recipientType: D.type
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
- D.type === "USER" ? e = await y(d, D.id, k) : D.type === "GROUP" && (e = await b(d, D.id, k)), e && w("bigconsole.dashboard.shared", {
47
- dashboardId: d,
48
- permission: k,
49
- recipientType: D.type
50
- }), O(null), E("");
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
- d,
53
- w,
54
- D,
55
- k,
56
- b,
57
- y
58
- ]), I = n(async (e, t) => {
59
- await x({
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
- }, [x]), L = n(async (e) => {
64
- window.confirm("Are you sure you want to revoke this access?") && await S(e);
65
- }, [S]), R = n(async () => {
66
- window.confirm("Are you sure you want to revoke all shared access?") && await C(d);
67
- }, [d, C]), z = n(async () => {
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(j), P(!0), setTimeout(() => P(!1), 2e3);
70
+ await navigator.clipboard.writeText(M), F(!0), setTimeout(() => F(!1), 2e3);
70
71
  } catch {}
71
- }, [j]), B = T ? [
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(T.toLowerCase()) || e.email?.toLowerCase().includes(T.toLowerCase())) : [], V = typeof document < "u" && document.documentElement.classList.contains("dark"), H = i(() => l(V), [V]);
95
- return m ? c(/* @__PURE__ */ o("div", {
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: h,
110
- children: /* @__PURE__ */ s("div", {
110
+ onClick: g,
111
+ children: /* @__PURE__ */ c("div", {
111
112
  style: {
112
113
  width: "520px",
113
114
  maxHeight: "80vh",
114
- backgroundColor: H.bgPrimary,
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: H.textPrimary
121
+ color: G.textPrimary
121
122
  },
122
123
  onClick: (e) => e.stopPropagation(),
123
- children: [/* @__PURE__ */ s("div", {
124
- style: {
125
- padding: "20px 24px",
126
- borderBottom: `1px solid ${H.borderDefault}`,
127
- display: "flex",
128
- alignItems: "center",
129
- justifyContent: "space-between",
130
- backgroundColor: H.bgPrimary
131
- },
132
- children: [/* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h3", {
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
- margin: 0,
135
- fontSize: "18px",
136
- fontWeight: 600,
137
- color: H.textPrimary
165
+ display: "flex",
166
+ gap: "4px",
167
+ padding: "0 24px",
168
+ borderBottom: `1px solid ${G.borderDefault}`,
169
+ backgroundColor: G.bgPrimary
138
170
  },
139
- children: "Share Dashboard"
140
- }), /* @__PURE__ */ o("p", {
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
- margin: "4px 0 0",
143
- fontSize: "13px",
144
- color: H.textSecondary
189
+ overflowY: "auto",
190
+ maxHeight: "calc(80vh - 160px)",
191
+ backgroundColor: G.bgPrimary
145
192
  },
146
- children: p
147
- })] }), /* @__PURE__ */ o("button", {
148
- onClick: h,
193
+ children: /* @__PURE__ */ s(n, {
194
+ dashboardId: f,
195
+ colors: G
196
+ })
197
+ }),
198
+ I === "people" && /* @__PURE__ */ c("div", {
149
199
  style: {
150
- background: "none",
151
- border: "none",
152
- fontSize: "24px",
153
- cursor: "pointer",
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
- }), /* @__PURE__ */ s("div", {
161
- style: {
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
- flex: 1,
190
- padding: "10px 12px",
191
- border: `1px solid ${H.borderDefault}`,
192
- borderRadius: "6px",
210
+ display: "block",
211
+ marginBottom: "8px",
193
212
  fontSize: "13px",
194
- backgroundColor: H.bgSecondary,
195
- color: H.textPrimary
196
- }
197
- }), /* @__PURE__ */ o("button", {
198
- onClick: z,
213
+ fontWeight: 600,
214
+ color: G.textPrimary
215
+ },
216
+ children: "Share Link"
217
+ }), /* @__PURE__ */ c("div", {
199
218
  style: {
200
- padding: "10px 16px",
201
- backgroundColor: N ? H.statusSuccessBg : H.actionPrimaryBg,
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: N ? "Copied!" : "Copy"
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 ${H.borderDefault}`,
229
+ border: `1px solid ${G.borderDefault}`,
314
230
  borderRadius: "6px",
315
231
  fontSize: "13px",
316
- backgroundColor: H.bgPrimary,
317
- color: H.textPrimary
318
- },
319
- children: u.map((e) => /* @__PURE__ */ o("option", {
320
- value: e.value,
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: D ? H.actionPrimaryBg : H.bgTertiary,
330
- color: D ? "white" : H.textSecondary,
239
+ backgroundColor: P ? G.statusSuccessBg : G.actionPrimaryBg,
240
+ color: "white",
331
241
  border: "none",
332
242
  borderRadius: "6px",
333
- cursor: D ? "pointer" : "not-allowed",
243
+ cursor: "pointer",
334
244
  fontSize: "13px",
335
- fontWeight: 500
245
+ fontWeight: 500,
246
+ minWidth: "80px"
336
247
  },
337
- children: "Share"
338
- })
339
- ]
340
- })]
341
- }),
342
- /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ s("div", {
343
- style: {
344
- display: "flex",
345
- alignItems: "center",
346
- justifyContent: "space-between",
347
- marginBottom: "12px"
348
- },
349
- children: [/* @__PURE__ */ s("label", {
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
- fontSize: "13px",
352
- fontWeight: 600,
353
- color: H.textPrimary
382
+ display: "flex",
383
+ alignItems: "center",
384
+ justifyContent: "space-between",
385
+ marginBottom: "12px"
354
386
  },
355
- children: [
356
- "People with Access (",
357
- g.length,
358
- ")"
359
- ]
360
- }), g.length > 0 && /* @__PURE__ */ o("button", {
361
- onClick: R,
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
- padding: "4px 8px",
364
- backgroundColor: "transparent",
365
- color: H.statusErrorText,
366
- border: "none",
367
- cursor: "pointer",
368
- fontSize: "12px"
412
+ color: G.textSecondary,
413
+ fontSize: "13px"
369
414
  },
370
- children: "Revoke All"
371
- })]
372
- }), _ && g.length === 0 ? /* @__PURE__ */ o("p", {
373
- style: {
374
- color: H.textSecondary,
375
- fontSize: "13px"
376
- },
377
- children: "Loading..."
378
- }) : g.length === 0 ? /* @__PURE__ */ o("p", {
379
- style: {
380
- color: H.textSecondary,
381
- fontSize: "13px"
382
- },
383
- children: "No one has access to this dashboard yet."
384
- }) : /* @__PURE__ */ o("div", {
385
- style: {
386
- display: "flex",
387
- flexDirection: "column",
388
- gap: "8px"
389
- },
390
- children: g.map((e) => /* @__PURE__ */ o(f, {
391
- share: e,
392
- onUpdatePermission: I,
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 f({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
403
- return /* @__PURE__ */ s("div", {
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__ */ s("div", {
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__ */ o("div", {
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__ */ s("div", { children: [/* @__PURE__ */ o("div", {
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__ */ s("div", {
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__ */ s("div", {
489
+ }), /* @__PURE__ */ c("div", {
451
490
  style: {
452
491
  display: "flex",
453
492
  alignItems: "center",
454
493
  gap: "8px"
455
494
  },
456
- children: [/* @__PURE__ */ o("select", {
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: u.map((e) => /* @__PURE__ */ o("option", {
506
+ children: d.map((e) => /* @__PURE__ */ s("option", {
468
507
  value: e.value,
469
508
  children: e.label
470
509
  }, e.value))
471
- }), /* @__PURE__ */ o("button", {
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 { d as default };
527
+ export { f as default };
489
528
 
490
529
  //# sourceMappingURL=ShareDialog.js.map