@burdenoff/microfe-bigconsole 2026.1122.1 → 2026.1122.3
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/AsOfProvider.d.ts +7 -0
- package/dist/bigconsole/asof/AsOfProvider.js +5 -2
- package/dist/bigconsole/asof/asOfParam.d.ts +5 -0
- package/dist/bigconsole/asof/asOfParam.js +7 -4
- package/dist/bigconsole/asof/index.d.ts +2 -2
- package/dist/bigconsole/asof/index.js +6 -6
- package/dist/bigconsole/asof/liveOnlySurfaces.d.ts +43 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +133 -127
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +51 -51
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.d.ts +3 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +154 -145
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +302 -294
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +164 -163
- package/dist/bigconsole/pages/DashboardViewPage.js +15 -10
- package/package.json +1 -1
|
@@ -3,14 +3,14 @@ import e from "../../../hooks/useBigConsoleAnalytics.js";
|
|
|
3
3
|
import t from "../../../hooks/useDashboardSharing.js";
|
|
4
4
|
import { EmbedTab as n } from "./EmbedTab.js";
|
|
5
5
|
import { AS_OF_PARAM as r, formatAsOf as i } from "../../../asof/asOfParam.js";
|
|
6
|
-
import { useAsOf as
|
|
7
|
-
import { useShareRecipients as
|
|
8
|
-
import { useBigConsole as
|
|
6
|
+
import { useAsOf as a } from "../../../asof/AsOfProvider.js";
|
|
7
|
+
import { useShareRecipients as ee } from "../../../hooks/useShareRecipients.js";
|
|
8
|
+
import { useBigConsole as o, useBigConsoleBasePath as te } from "../../../context/BigConsoleContext.js";
|
|
9
9
|
import "../../../asof/index.js";
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { ResponsiveDialog as
|
|
10
|
+
import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
11
|
+
import { ResponsiveDialog as ne, ResponsiveDialogContent as d, ResponsiveDialogDescription as re, ResponsiveDialogTitle as ie } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as oe, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
14
|
import { formatDistanceToNow as m } from "date-fns";
|
|
15
15
|
// src/bigconsole/components/dashboard/ShareDialog/ShareDialog.tsx
|
|
16
16
|
var h = {
|
|
@@ -51,29 +51,29 @@ var h = {
|
|
|
51
51
|
description: "Can edit widgets, layout, and share"
|
|
52
52
|
}];
|
|
53
53
|
function v(e) {
|
|
54
|
-
let { workspaceId: t, currentUser: n } =
|
|
54
|
+
let { workspaceId: t, currentUser: n } = o(), r = l(null);
|
|
55
55
|
return /* @__PURE__ */ f(y, {
|
|
56
56
|
...e,
|
|
57
57
|
returnFocusRef: r
|
|
58
58
|
}, `${n?.id ?? ""}|${t ?? ""}|${e.dashboardId}`);
|
|
59
59
|
}
|
|
60
|
-
function y({ dashboardId:
|
|
61
|
-
let { t:
|
|
62
|
-
|
|
60
|
+
function y({ dashboardId: o, dashboardName: l, isOpen: m, onClose: v, visibility: y, onVisibilityChange: b, canChangeVisibility: x = !0, returnFocusRef: S }) {
|
|
61
|
+
let { t: C } = ae(), { shares: w, loading: T, error: ce, fetchShares: E, shareWithUser: D, shareWithGroup: O, updateShare: k, revokeShare: A, revokeAllShares: j } = t(), M = e(), [N, P] = u(""), [F, I] = u(null), [L, le] = u("VIEW"), [R, ue] = u(""), [z, B] = u(!1), [V, H] = u("people"), [U, W] = u(!1), [G, K] = u(null), [q, J] = u(null), Y = a().asOf?.getTime() ?? null, X = Y !== null, Z = ee(m && !X, N), Q = te();
|
|
62
|
+
c(() => {
|
|
63
63
|
let e = !1;
|
|
64
64
|
return Promise.resolve().then(() => {
|
|
65
|
-
e || (
|
|
65
|
+
e || (I(null), P(""), J(null));
|
|
66
66
|
}), () => {
|
|
67
67
|
e = !0;
|
|
68
68
|
};
|
|
69
69
|
}, [
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
Z.owner,
|
|
71
|
+
o,
|
|
72
72
|
m
|
|
73
|
-
]),
|
|
74
|
-
if (m &&
|
|
75
|
-
|
|
76
|
-
let e = new URL(`${Q}/dashboards/${encodeURIComponent(
|
|
73
|
+
]), c(() => {
|
|
74
|
+
if (m && o) {
|
|
75
|
+
X || E(o);
|
|
76
|
+
let e = new URL(`${Q}/dashboards/${encodeURIComponent(o)}`, window.location.origin), t = new URLSearchParams(window.location.search);
|
|
77
77
|
for (let n of [
|
|
78
78
|
"org",
|
|
79
79
|
"workspace",
|
|
@@ -83,81 +83,82 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
83
83
|
let r = t.get(n);
|
|
84
84
|
r && e.searchParams.set(n, r);
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
Z.workspaceId && e.searchParams.set("workspace", Z.workspaceId), Y !== null && e.searchParams.set(r, i(new Date(Y))), ue(e.toString());
|
|
87
87
|
}
|
|
88
88
|
}, [
|
|
89
89
|
m,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
o,
|
|
91
|
+
E,
|
|
92
92
|
Q,
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
Z.workspaceId,
|
|
94
|
+
Y,
|
|
95
|
+
X
|
|
95
96
|
]);
|
|
96
|
-
let
|
|
97
|
-
if (!
|
|
98
|
-
|
|
99
|
-
dashboardId:
|
|
100
|
-
permission:
|
|
101
|
-
recipientType:
|
|
97
|
+
let de = s(async () => {
|
|
98
|
+
if (!F || T || F.workspaceId !== Z.workspaceId) return;
|
|
99
|
+
J(null), M("bigconsole.dashboard.share_clicked", {
|
|
100
|
+
dashboardId: o,
|
|
101
|
+
permission: L,
|
|
102
|
+
recipientType: F.type
|
|
102
103
|
});
|
|
103
104
|
let e = null;
|
|
104
|
-
|
|
105
|
-
dashboardId:
|
|
106
|
-
permission:
|
|
107
|
-
recipientType:
|
|
108
|
-
}), e ? (
|
|
105
|
+
F.type === "USER" ? e = await D(o, F.id, L) : F.type === "GROUP" && (e = await O(o, F.id, L)), e && M("bigconsole.dashboard.shared", {
|
|
106
|
+
dashboardId: o,
|
|
107
|
+
permission: L,
|
|
108
|
+
recipientType: F.type
|
|
109
|
+
}), e ? (I(null), P("")) : J(C("bigconsole.share.error.grantFailed", "Access could not be granted. Review the recipient and try again."));
|
|
109
110
|
}, [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
]),
|
|
120
|
-
await
|
|
111
|
+
Z.workspaceId,
|
|
112
|
+
C,
|
|
113
|
+
T,
|
|
114
|
+
o,
|
|
115
|
+
M,
|
|
116
|
+
F,
|
|
117
|
+
L,
|
|
118
|
+
O,
|
|
119
|
+
D
|
|
120
|
+
]), fe = s(async (e, t) => {
|
|
121
|
+
await k({
|
|
121
122
|
id: e,
|
|
122
123
|
permission: t
|
|
123
124
|
});
|
|
124
|
-
}, [
|
|
125
|
-
window.confirm("Are you sure you want to revoke this access?") && await
|
|
126
|
-
}, [
|
|
127
|
-
window.confirm("Are you sure you want to revoke all shared access?") && await
|
|
128
|
-
}, [
|
|
125
|
+
}, [k]), pe = s(async (e) => {
|
|
126
|
+
window.confirm("Are you sure you want to revoke this access?") && await A(e);
|
|
127
|
+
}, [A]), me = s(async () => {
|
|
128
|
+
window.confirm("Are you sure you want to revoke all shared access?") && await j(o);
|
|
129
|
+
}, [o, j]), he = s(async (e) => {
|
|
129
130
|
if (b && e !== y) {
|
|
130
|
-
|
|
131
|
+
K(null), W(!0);
|
|
131
132
|
try {
|
|
132
133
|
await b(e);
|
|
133
134
|
} catch (e) {
|
|
134
|
-
|
|
135
|
+
K(e instanceof Error ? e.message : "Could not update general access.");
|
|
135
136
|
} finally {
|
|
136
|
-
|
|
137
|
+
W(!1);
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
}, [b, y]),
|
|
140
|
+
}, [b, y]), ge = s(async () => {
|
|
140
141
|
try {
|
|
141
|
-
await navigator.clipboard.writeText(
|
|
142
|
+
await navigator.clipboard.writeText(R), B(!0), setTimeout(() => B(!1), 2e3);
|
|
142
143
|
} catch {
|
|
143
|
-
|
|
144
|
+
J(C("bigconsole.share.error.copyFailed", "The link could not be copied. Select the link and copy it manually."));
|
|
144
145
|
}
|
|
145
|
-
}, [
|
|
146
|
-
return m ? /* @__PURE__ */ f(
|
|
146
|
+
}, [R, C]), $ = Z.results;
|
|
147
|
+
return m ? /* @__PURE__ */ f(ne, {
|
|
147
148
|
open: m,
|
|
148
149
|
onOpenChange: (e) => {
|
|
149
150
|
e || v();
|
|
150
151
|
},
|
|
151
|
-
children: /* @__PURE__ */ p(
|
|
152
|
+
children: /* @__PURE__ */ p(d, {
|
|
152
153
|
showCloseButton: !1,
|
|
153
154
|
"data-testid": "share-dialog",
|
|
154
155
|
className: "flex w-full flex-col gap-0 overflow-hidden rounded-card p-0 sm:w-[calc(100%-2rem)] sm:max-w-[520px]",
|
|
155
156
|
onOpenAutoFocus: () => {
|
|
156
157
|
let e = document.activeElement;
|
|
157
|
-
e instanceof HTMLElement && e !== document.body && !e.closest("[role=dialog]") && (
|
|
158
|
+
e instanceof HTMLElement && e !== document.body && !e.closest("[role=dialog]") && (S.current = e);
|
|
158
159
|
},
|
|
159
160
|
onCloseAutoFocus: (e) => {
|
|
160
|
-
e.preventDefault(),
|
|
161
|
+
e.preventDefault(), S.current?.isConnected && S.current.focus();
|
|
161
162
|
},
|
|
162
163
|
style: {
|
|
163
164
|
maxWidth: "520px",
|
|
@@ -184,16 +185,16 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
184
185
|
color: h.textPrimary
|
|
185
186
|
},
|
|
186
187
|
children: "Share Dashboard"
|
|
187
|
-
}), /* @__PURE__ */ f(
|
|
188
|
+
}), /* @__PURE__ */ f(re, {
|
|
188
189
|
style: {
|
|
189
190
|
margin: "4px 0 0",
|
|
190
191
|
fontSize: "13px",
|
|
191
192
|
color: h.textSecondary
|
|
192
193
|
},
|
|
193
|
-
children:
|
|
194
|
+
children: l
|
|
194
195
|
})] }), /* @__PURE__ */ f("button", {
|
|
195
196
|
type: "button",
|
|
196
|
-
"aria-label":
|
|
197
|
+
"aria-label": C("bigconsole.share.closeLabel", "Close share dialog"),
|
|
197
198
|
onClick: v,
|
|
198
199
|
style: {
|
|
199
200
|
background: "none",
|
|
@@ -207,7 +208,7 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
207
208
|
children: "×"
|
|
208
209
|
})]
|
|
209
210
|
}),
|
|
210
|
-
/* @__PURE__ */ f("div", {
|
|
211
|
+
!X && /* @__PURE__ */ f("div", {
|
|
211
212
|
role: "tablist",
|
|
212
213
|
"aria-label": "Share options",
|
|
213
214
|
style: {
|
|
@@ -221,14 +222,14 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
221
222
|
children: ["people", "embed"].map((e) => /* @__PURE__ */ f("button", {
|
|
222
223
|
type: "button",
|
|
223
224
|
role: "tab",
|
|
224
|
-
"aria-selected":
|
|
225
|
-
onClick: () =>
|
|
225
|
+
"aria-selected": V === e,
|
|
226
|
+
onClick: () => H(e),
|
|
226
227
|
style: {
|
|
227
228
|
padding: "10px 12px",
|
|
228
229
|
background: "none",
|
|
229
230
|
border: "none",
|
|
230
|
-
borderBottom: `2px solid ${
|
|
231
|
-
color:
|
|
231
|
+
borderBottom: `2px solid ${V === e ? h.actionPrimaryBg : "transparent"}`,
|
|
232
|
+
color: V === e ? h.textPrimary : h.textSecondary,
|
|
232
233
|
fontSize: "13px",
|
|
233
234
|
fontWeight: 600,
|
|
234
235
|
cursor: "pointer"
|
|
@@ -236,19 +237,19 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
236
237
|
children: e === "people" ? "People" : "Publish to web"
|
|
237
238
|
}, e))
|
|
238
239
|
}),
|
|
239
|
-
|
|
240
|
+
!X && V === "embed" && /* @__PURE__ */ f("div", {
|
|
240
241
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
241
242
|
style: { backgroundColor: h.bgPrimary },
|
|
242
243
|
children: /* @__PURE__ */ f(n, {
|
|
243
|
-
dashboardId:
|
|
244
|
+
dashboardId: o,
|
|
244
245
|
colors: h
|
|
245
246
|
})
|
|
246
247
|
}),
|
|
247
|
-
|
|
248
|
+
(X || V === "people") && /* @__PURE__ */ p("div", {
|
|
248
249
|
className: "flex min-h-0 flex-1 flex-col gap-section-gap overflow-y-auto p-card-padding",
|
|
249
250
|
style: { backgroundColor: h.bgPrimary },
|
|
250
251
|
children: [
|
|
251
|
-
y && b && /* @__PURE__ */ p("section", {
|
|
252
|
+
!X && y && b && /* @__PURE__ */ p("section", {
|
|
252
253
|
"aria-labelledby": "share-visibility-heading",
|
|
253
254
|
children: [
|
|
254
255
|
/* @__PURE__ */ f("h3", {
|
|
@@ -268,8 +269,8 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
268
269
|
"aria-label": "General access",
|
|
269
270
|
"data-testid": "share-visibility",
|
|
270
271
|
value: y,
|
|
271
|
-
disabled: !
|
|
272
|
-
onChange: (e) => void
|
|
272
|
+
disabled: !x || U,
|
|
273
|
+
onChange: (e) => void he(e.target.value),
|
|
273
274
|
style: {
|
|
274
275
|
padding: "10px 12px",
|
|
275
276
|
border: `1px solid ${h.borderDefault}`,
|
|
@@ -277,8 +278,8 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
277
278
|
fontSize: "13px",
|
|
278
279
|
backgroundColor: h.bgPrimary,
|
|
279
280
|
color: h.textPrimary,
|
|
280
|
-
cursor: !
|
|
281
|
-
opacity: !
|
|
281
|
+
cursor: !x || U ? "not-allowed" : "pointer",
|
|
282
|
+
opacity: !x || U ? .6 : 1
|
|
282
283
|
},
|
|
283
284
|
children: g.map((e) => /* @__PURE__ */ f("option", {
|
|
284
285
|
value: e.value,
|
|
@@ -292,7 +293,7 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
292
293
|
children: g.find((e) => e.value === y)?.description
|
|
293
294
|
})]
|
|
294
295
|
}),
|
|
295
|
-
!
|
|
296
|
+
!x && /* @__PURE__ */ f("p", {
|
|
296
297
|
style: {
|
|
297
298
|
margin: "6px 0 0",
|
|
298
299
|
fontSize: "11px",
|
|
@@ -300,13 +301,13 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
300
301
|
},
|
|
301
302
|
children: "You don't have permission to change general access."
|
|
302
303
|
}),
|
|
303
|
-
|
|
304
|
+
G && /* @__PURE__ */ f("p", {
|
|
304
305
|
style: {
|
|
305
306
|
margin: "6px 0 0",
|
|
306
307
|
fontSize: "11px",
|
|
307
308
|
color: h.statusErrorText
|
|
308
309
|
},
|
|
309
|
-
children:
|
|
310
|
+
children: G
|
|
310
311
|
})
|
|
311
312
|
]
|
|
312
313
|
}),
|
|
@@ -325,7 +326,7 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
325
326
|
},
|
|
326
327
|
children: [/* @__PURE__ */ f("input", {
|
|
327
328
|
type: "text",
|
|
328
|
-
value:
|
|
329
|
+
value: R,
|
|
329
330
|
readOnly: !0,
|
|
330
331
|
style: {
|
|
331
332
|
flex: 1,
|
|
@@ -337,10 +338,10 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
337
338
|
color: h.textPrimary
|
|
338
339
|
}
|
|
339
340
|
}), /* @__PURE__ */ f("button", {
|
|
340
|
-
onClick:
|
|
341
|
+
onClick: ge,
|
|
341
342
|
style: {
|
|
342
343
|
padding: "10px 16px",
|
|
343
|
-
backgroundColor:
|
|
344
|
+
backgroundColor: z ? h.statusSuccessBg : h.actionPrimaryBg,
|
|
344
345
|
color: "var(--color-action-primary-text)",
|
|
345
346
|
border: "none",
|
|
346
347
|
borderRadius: "6px",
|
|
@@ -349,235 +350,242 @@ function y({ dashboardId: a, dashboardName: c, isOpen: m, onClose: v, visibility
|
|
|
349
350
|
fontWeight: 500,
|
|
350
351
|
minWidth: "80px"
|
|
351
352
|
},
|
|
352
|
-
children:
|
|
353
|
+
children: z ? "Copied!" : "Copy"
|
|
353
354
|
})]
|
|
354
355
|
})]
|
|
355
356
|
}),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
style: { color: h.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
/* @__PURE__ */ p(
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
},
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
357
|
+
X ? /* @__PURE__ */ f("p", {
|
|
358
|
+
className: "text-sm",
|
|
359
|
+
style: { color: h.textSecondary },
|
|
360
|
+
"data-testid": "share-past-view-note",
|
|
361
|
+
children: C("bigconsole.share.pastViewNote", "Access and publishing settings apply to the live board, so they are not available while you view a past time. The link above keeps that time.")
|
|
362
|
+
}) : /* @__PURE__ */ p(oe, { children: [
|
|
363
|
+
(ce || q) && /* @__PURE__ */ f("p", {
|
|
364
|
+
role: "alert",
|
|
365
|
+
style: { color: h.statusErrorText },
|
|
366
|
+
children: q || C("bigconsole.share.error.loadFailed", "Dashboard access could not be loaded or updated. Try again.")
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ p("section", {
|
|
369
|
+
"aria-labelledby": "share-invite-heading",
|
|
370
|
+
children: [
|
|
371
|
+
/* @__PURE__ */ f("h3", {
|
|
372
|
+
id: "share-invite-heading",
|
|
373
|
+
className: "mb-form-gap text-sm font-semibold",
|
|
374
|
+
style: { color: h.textPrimary },
|
|
375
|
+
children: "Invite people"
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ f("p", {
|
|
378
|
+
style: {
|
|
379
|
+
color: h.textSecondary,
|
|
380
|
+
fontSize: "13px",
|
|
381
|
+
marginBottom: "8px"
|
|
382
|
+
},
|
|
383
|
+
children: C("bigconsole.share.directory.scopeHint", "Only members and groups from the current workspace are listed.")
|
|
384
|
+
}),
|
|
385
|
+
Z.loading && /* @__PURE__ */ f("p", {
|
|
386
|
+
role: "status",
|
|
387
|
+
children: C("bigconsole.share.directory.loading", "Loading workspace recipients…")
|
|
388
|
+
}),
|
|
389
|
+
Z.error && /* @__PURE__ */ p("div", {
|
|
390
|
+
role: "alert",
|
|
391
|
+
children: [/* @__PURE__ */ f("p", { children: C("bigconsole.share.directory.loadFailed", "The workspace directory could not be loaded. Your access may not allow directory lookup.") }), /* @__PURE__ */ f("button", {
|
|
392
|
+
type: "button",
|
|
393
|
+
onClick: Z.retry,
|
|
394
|
+
children: C("bigconsole.share.directory.retry", "Retry directory")
|
|
395
|
+
})]
|
|
396
|
+
}),
|
|
397
|
+
N && !F && !Z.loading && !Z.error && $.length === 0 && /* @__PURE__ */ f("p", {
|
|
398
|
+
role: "status",
|
|
399
|
+
children: C("bigconsole.share.directory.empty", "No matching workspace members or groups.")
|
|
400
|
+
}),
|
|
401
|
+
Z.hasMoreMembers && /* @__PURE__ */ f("button", {
|
|
385
402
|
type: "button",
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
display: "flex",
|
|
404
|
-
gap: "8px",
|
|
405
|
-
marginBottom: "8px",
|
|
406
|
-
flexWrap: "wrap"
|
|
407
|
-
},
|
|
408
|
-
children: [
|
|
409
|
-
/* @__PURE__ */ p("div", {
|
|
410
|
-
style: {
|
|
411
|
-
flex: 1,
|
|
412
|
-
position: "relative"
|
|
413
|
-
},
|
|
414
|
-
children: [/* @__PURE__ */ f("input", {
|
|
415
|
-
type: "text",
|
|
416
|
-
value: I ? I.name : P,
|
|
417
|
-
onChange: (e) => {
|
|
418
|
-
F(e.target.value), L(null);
|
|
403
|
+
disabled: Z.loading,
|
|
404
|
+
onClick: Z.loadMoreMembers,
|
|
405
|
+
children: C("bigconsole.share.directory.loadMore", "Load more workspace members")
|
|
406
|
+
}),
|
|
407
|
+
Z.hasMoreGroups && /* @__PURE__ */ f("p", { children: C("bigconsole.share.directory.moreGroups", "More groups match. Narrow your search to find a specific group.") }),
|
|
408
|
+
/* @__PURE__ */ p("div", {
|
|
409
|
+
style: {
|
|
410
|
+
display: "flex",
|
|
411
|
+
gap: "8px",
|
|
412
|
+
marginBottom: "8px",
|
|
413
|
+
flexWrap: "wrap"
|
|
414
|
+
},
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ p("div", {
|
|
417
|
+
style: {
|
|
418
|
+
flex: 1,
|
|
419
|
+
position: "relative"
|
|
419
420
|
},
|
|
420
|
-
|
|
421
|
-
|
|
421
|
+
children: [/* @__PURE__ */ f("input", {
|
|
422
|
+
type: "text",
|
|
423
|
+
value: F ? F.name : N,
|
|
424
|
+
onChange: (e) => {
|
|
425
|
+
P(e.target.value), I(null);
|
|
426
|
+
},
|
|
427
|
+
"aria-label": C("bigconsole.share.directory.searchLabel", "Search workspace members and groups"),
|
|
428
|
+
placeholder: C("bigconsole.share.directory.searchPlaceholder", "Search workspace members or groups..."),
|
|
429
|
+
style: {
|
|
430
|
+
width: "100%",
|
|
431
|
+
padding: "10px 12px",
|
|
432
|
+
border: `1px solid ${h.borderDefault}`,
|
|
433
|
+
borderRadius: "6px",
|
|
434
|
+
fontSize: "13px",
|
|
435
|
+
backgroundColor: h.bgPrimary,
|
|
436
|
+
color: h.textPrimary
|
|
437
|
+
}
|
|
438
|
+
}), N && !F && $.length > 0 && /* @__PURE__ */ f("div", {
|
|
439
|
+
style: {
|
|
440
|
+
position: "absolute",
|
|
441
|
+
top: "100%",
|
|
442
|
+
left: 0,
|
|
443
|
+
right: 0,
|
|
444
|
+
marginTop: "4px",
|
|
445
|
+
backgroundColor: h.bgPrimary,
|
|
446
|
+
border: `1px solid ${h.borderDefault}`,
|
|
447
|
+
borderRadius: "6px",
|
|
448
|
+
boxShadow: "var(--shadow-elevation-3)",
|
|
449
|
+
zIndex: 100001,
|
|
450
|
+
maxHeight: "200px",
|
|
451
|
+
overflowY: "auto"
|
|
452
|
+
},
|
|
453
|
+
children: $.map((e) => /* @__PURE__ */ p("button", {
|
|
454
|
+
type: "button",
|
|
455
|
+
onClick: () => I(e),
|
|
456
|
+
style: {
|
|
457
|
+
display: "block",
|
|
458
|
+
width: "100%",
|
|
459
|
+
padding: "10px 12px",
|
|
460
|
+
textAlign: "left",
|
|
461
|
+
backgroundColor: "transparent",
|
|
462
|
+
border: "none",
|
|
463
|
+
cursor: "pointer",
|
|
464
|
+
borderBottom: `1px solid ${h.borderDefault}`
|
|
465
|
+
},
|
|
466
|
+
children: [
|
|
467
|
+
/* @__PURE__ */ f("div", {
|
|
468
|
+
style: {
|
|
469
|
+
fontSize: "13px",
|
|
470
|
+
fontWeight: 500,
|
|
471
|
+
color: h.textPrimary
|
|
472
|
+
},
|
|
473
|
+
children: e.name
|
|
474
|
+
}),
|
|
475
|
+
e.email && /* @__PURE__ */ f("div", {
|
|
476
|
+
style: {
|
|
477
|
+
fontSize: "11px",
|
|
478
|
+
color: h.textSecondary
|
|
479
|
+
},
|
|
480
|
+
children: e.email
|
|
481
|
+
}),
|
|
482
|
+
/* @__PURE__ */ f("span", {
|
|
483
|
+
style: {
|
|
484
|
+
fontSize: "10px",
|
|
485
|
+
color: h.textTertiary,
|
|
486
|
+
textTransform: "uppercase"
|
|
487
|
+
},
|
|
488
|
+
children: e.type
|
|
489
|
+
})
|
|
490
|
+
]
|
|
491
|
+
}, `${e.type}:${e.id}`))
|
|
492
|
+
})]
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ f("select", {
|
|
495
|
+
"aria-label": C("bigconsole.share.permissionLabel", "Access permission"),
|
|
496
|
+
value: L,
|
|
497
|
+
onChange: (e) => le(e.target.value),
|
|
422
498
|
style: {
|
|
423
|
-
width: "100%",
|
|
424
499
|
padding: "10px 12px",
|
|
425
500
|
border: `1px solid ${h.borderDefault}`,
|
|
426
501
|
borderRadius: "6px",
|
|
427
502
|
fontSize: "13px",
|
|
428
503
|
backgroundColor: h.bgPrimary,
|
|
429
504
|
color: h.textPrimary
|
|
430
|
-
}
|
|
431
|
-
|
|
505
|
+
},
|
|
506
|
+
children: _.map((e) => /* @__PURE__ */ f("option", {
|
|
507
|
+
value: e.value,
|
|
508
|
+
children: e.label
|
|
509
|
+
}, e.value))
|
|
510
|
+
}),
|
|
511
|
+
/* @__PURE__ */ f("button", {
|
|
512
|
+
onClick: de,
|
|
513
|
+
disabled: !F || T || F.workspaceId !== Z.workspaceId,
|
|
432
514
|
style: {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
marginTop: "4px",
|
|
438
|
-
backgroundColor: h.bgPrimary,
|
|
439
|
-
border: `1px solid ${h.borderDefault}`,
|
|
515
|
+
padding: "10px 16px",
|
|
516
|
+
backgroundColor: F ? h.actionPrimaryBg : h.bgTertiary,
|
|
517
|
+
color: F ? "var(--color-action-primary-text)" : h.textSecondary,
|
|
518
|
+
border: "none",
|
|
440
519
|
borderRadius: "6px",
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
overflowY: "auto"
|
|
520
|
+
cursor: F ? "pointer" : "not-allowed",
|
|
521
|
+
fontSize: "13px",
|
|
522
|
+
fontWeight: 500
|
|
445
523
|
},
|
|
446
|
-
children:
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
border: "none",
|
|
456
|
-
cursor: "pointer",
|
|
457
|
-
borderBottom: `1px solid ${h.borderDefault}`
|
|
458
|
-
},
|
|
459
|
-
children: [
|
|
460
|
-
/* @__PURE__ */ f("div", {
|
|
461
|
-
style: {
|
|
462
|
-
fontSize: "13px",
|
|
463
|
-
fontWeight: 500,
|
|
464
|
-
color: h.textPrimary
|
|
465
|
-
},
|
|
466
|
-
children: e.name
|
|
467
|
-
}),
|
|
468
|
-
e.email && /* @__PURE__ */ f("div", {
|
|
469
|
-
style: {
|
|
470
|
-
fontSize: "11px",
|
|
471
|
-
color: h.textSecondary
|
|
472
|
-
},
|
|
473
|
-
children: e.email
|
|
474
|
-
}),
|
|
475
|
-
/* @__PURE__ */ f("span", {
|
|
476
|
-
style: {
|
|
477
|
-
fontSize: "10px",
|
|
478
|
-
color: h.textTertiary,
|
|
479
|
-
textTransform: "uppercase"
|
|
480
|
-
},
|
|
481
|
-
children: e.type
|
|
482
|
-
})
|
|
483
|
-
]
|
|
484
|
-
}, `${e.type}:${e.id}`))
|
|
485
|
-
})]
|
|
486
|
-
}),
|
|
487
|
-
/* @__PURE__ */ f("select", {
|
|
488
|
-
"aria-label": w("bigconsole.share.permissionLabel", "Access permission"),
|
|
489
|
-
value: R,
|
|
490
|
-
onChange: (e) => se(e.target.value),
|
|
491
|
-
style: {
|
|
492
|
-
padding: "10px 12px",
|
|
493
|
-
border: `1px solid ${h.borderDefault}`,
|
|
494
|
-
borderRadius: "6px",
|
|
495
|
-
fontSize: "13px",
|
|
496
|
-
backgroundColor: h.bgPrimary,
|
|
497
|
-
color: h.textPrimary
|
|
498
|
-
},
|
|
499
|
-
children: _.map((e) => /* @__PURE__ */ f("option", {
|
|
500
|
-
value: e.value,
|
|
501
|
-
children: e.label
|
|
502
|
-
}, e.value))
|
|
503
|
-
}),
|
|
504
|
-
/* @__PURE__ */ f("button", {
|
|
505
|
-
onClick: le,
|
|
506
|
-
disabled: !I || E || I.workspaceId !== X.workspaceId,
|
|
507
|
-
style: {
|
|
508
|
-
padding: "10px 16px",
|
|
509
|
-
backgroundColor: I ? h.actionPrimaryBg : h.bgTertiary,
|
|
510
|
-
color: I ? "var(--color-action-primary-text)" : h.textSecondary,
|
|
511
|
-
border: "none",
|
|
512
|
-
borderRadius: "6px",
|
|
513
|
-
cursor: I ? "pointer" : "not-allowed",
|
|
514
|
-
fontSize: "13px",
|
|
515
|
-
fontWeight: 500
|
|
516
|
-
},
|
|
517
|
-
children: "Share"
|
|
518
|
-
})
|
|
519
|
-
]
|
|
520
|
-
})
|
|
521
|
-
]
|
|
522
|
-
}),
|
|
523
|
-
/* @__PURE__ */ p("section", {
|
|
524
|
-
"aria-labelledby": "share-access-heading",
|
|
525
|
-
children: [/* @__PURE__ */ p("div", {
|
|
526
|
-
style: {
|
|
527
|
-
display: "flex",
|
|
528
|
-
alignItems: "center",
|
|
529
|
-
justifyContent: "space-between",
|
|
530
|
-
flexWrap: "wrap",
|
|
531
|
-
gap: "8px",
|
|
532
|
-
marginBottom: "12px"
|
|
533
|
-
},
|
|
534
|
-
children: [/* @__PURE__ */ p("h3", {
|
|
535
|
-
id: "share-access-heading",
|
|
536
|
-
className: "text-sm font-semibold",
|
|
537
|
-
style: { color: h.textPrimary },
|
|
538
|
-
children: [
|
|
539
|
-
"People with access (",
|
|
540
|
-
T.length,
|
|
541
|
-
")"
|
|
542
|
-
]
|
|
543
|
-
}), T.length > 0 && /* @__PURE__ */ f("button", {
|
|
544
|
-
onClick: fe,
|
|
524
|
+
children: "Share"
|
|
525
|
+
})
|
|
526
|
+
]
|
|
527
|
+
})
|
|
528
|
+
]
|
|
529
|
+
}),
|
|
530
|
+
/* @__PURE__ */ p("section", {
|
|
531
|
+
"aria-labelledby": "share-access-heading",
|
|
532
|
+
children: [/* @__PURE__ */ p("div", {
|
|
545
533
|
style: {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
534
|
+
display: "flex",
|
|
535
|
+
alignItems: "center",
|
|
536
|
+
justifyContent: "space-between",
|
|
537
|
+
flexWrap: "wrap",
|
|
538
|
+
gap: "8px",
|
|
539
|
+
marginBottom: "12px"
|
|
552
540
|
},
|
|
553
|
-
children: "
|
|
541
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
542
|
+
id: "share-access-heading",
|
|
543
|
+
className: "text-sm font-semibold",
|
|
544
|
+
style: { color: h.textPrimary },
|
|
545
|
+
children: [
|
|
546
|
+
"People with access (",
|
|
547
|
+
w.length,
|
|
548
|
+
")"
|
|
549
|
+
]
|
|
550
|
+
}), w.length > 0 && /* @__PURE__ */ f("button", {
|
|
551
|
+
onClick: me,
|
|
552
|
+
style: {
|
|
553
|
+
padding: "4px 8px",
|
|
554
|
+
backgroundColor: "transparent",
|
|
555
|
+
color: h.statusErrorText,
|
|
556
|
+
border: "none",
|
|
557
|
+
cursor: "pointer",
|
|
558
|
+
fontSize: "12px"
|
|
559
|
+
},
|
|
560
|
+
children: "Revoke All"
|
|
561
|
+
})]
|
|
562
|
+
}), T && w.length === 0 ? /* @__PURE__ */ f("p", {
|
|
563
|
+
style: {
|
|
564
|
+
color: h.textSecondary,
|
|
565
|
+
fontSize: "13px"
|
|
566
|
+
},
|
|
567
|
+
children: "Loading..."
|
|
568
|
+
}) : w.length === 0 ? /* @__PURE__ */ f("p", {
|
|
569
|
+
style: {
|
|
570
|
+
color: h.textSecondary,
|
|
571
|
+
fontSize: "13px"
|
|
572
|
+
},
|
|
573
|
+
children: "No one has access to this dashboard yet."
|
|
574
|
+
}) : /* @__PURE__ */ f("div", {
|
|
575
|
+
style: {
|
|
576
|
+
display: "flex",
|
|
577
|
+
flexDirection: "column",
|
|
578
|
+
gap: "8px"
|
|
579
|
+
},
|
|
580
|
+
children: w.map((e) => /* @__PURE__ */ f(se, {
|
|
581
|
+
share: e,
|
|
582
|
+
onUpdatePermission: fe,
|
|
583
|
+
onRevoke: pe,
|
|
584
|
+
colors: h
|
|
585
|
+
}, e.id))
|
|
554
586
|
})]
|
|
555
|
-
})
|
|
556
|
-
|
|
557
|
-
color: h.textSecondary,
|
|
558
|
-
fontSize: "13px"
|
|
559
|
-
},
|
|
560
|
-
children: "Loading..."
|
|
561
|
-
}) : T.length === 0 ? /* @__PURE__ */ f("p", {
|
|
562
|
-
style: {
|
|
563
|
-
color: h.textSecondary,
|
|
564
|
-
fontSize: "13px"
|
|
565
|
-
},
|
|
566
|
-
children: "No one has access to this dashboard yet."
|
|
567
|
-
}) : /* @__PURE__ */ f("div", {
|
|
568
|
-
style: {
|
|
569
|
-
display: "flex",
|
|
570
|
-
flexDirection: "column",
|
|
571
|
-
gap: "8px"
|
|
572
|
-
},
|
|
573
|
-
children: T.map((e) => /* @__PURE__ */ f(x, {
|
|
574
|
-
share: e,
|
|
575
|
-
onUpdatePermission: ue,
|
|
576
|
-
onRevoke: de,
|
|
577
|
-
colors: h
|
|
578
|
-
}, e.id))
|
|
579
|
-
})]
|
|
580
|
-
})
|
|
587
|
+
})
|
|
588
|
+
] })
|
|
581
589
|
]
|
|
582
590
|
})
|
|
583
591
|
]
|
|
@@ -601,7 +609,7 @@ function b(e) {
|
|
|
601
609
|
expired: !1
|
|
602
610
|
};
|
|
603
611
|
}
|
|
604
|
-
function
|
|
612
|
+
function se({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
605
613
|
let i = b(e.expiresAt);
|
|
606
614
|
return /* @__PURE__ */ p("div", {
|
|
607
615
|
style: {
|