@burdenoff/microfe-bigconsole 2026.1004.3 → 2026.1004.4
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/BigConsoleRoutes.d.ts +1 -1
- package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
- package/dist/bigconsole/BigConsoleRoutes.js +15 -1
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.d.ts.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +54 -53
- package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +3 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +40 -39
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +184 -177
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +40 -22
- package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +31 -25
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +115 -80
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +177 -146
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +375 -325
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.d.ts.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +7 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.d.ts +3 -1
- package/dist/bigconsole/components/parser/ParserSelector.d.ts.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +94 -94
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.d.ts.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +111 -89
- package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts +8 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts.map +1 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +52 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js.map +1 -0
- package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +257 -221
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts +1 -0
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +29 -29
- package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts +2 -0
- package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +247 -239
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +6 -4
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.d.ts +1 -0
- package/dist/bigconsole/components/widgets/states/EmptyState.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +4 -4
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts +7 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js +94 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts +7 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +101 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js.map +1 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts +16 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.js +57 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.js.map +1 -0
- package/dist/bigconsole/hooks/useDashboardOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +102 -79
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.d.ts +3 -1
- package/dist/bigconsole/hooks/useExportDashboard.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.js +23 -13
- package/dist/bigconsole/hooks/useExportDashboard.js.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.d.ts +18 -0
- package/dist/bigconsole/hooks/useFilterUrlSync.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.js +87 -57
- package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +39 -29
- package/dist/bigconsole/hooks/useGlobalFilters.js.map +1 -1
- package/dist/bigconsole/hooks/usePageOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/usePageOperations.js +1 -0
- package/dist/bigconsole/hooks/usePageOperations.js.map +1 -1
- package/dist/bigconsole/hooks/usePipelineOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/usePipelineOperations.js +114 -112
- package/dist/bigconsole/hooks/usePipelineOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useShareRecipients.d.ts +22 -0
- package/dist/bigconsole/hooks/useShareRecipients.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useShareRecipients.js +198 -0
- package/dist/bigconsole/hooks/useShareRecipients.js.map +1 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +198 -193
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +171 -167
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +313 -266
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +84 -79
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +267 -257
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +465 -402
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +169 -157
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +370 -230
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +181 -151
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +188 -208
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +134 -117
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +315 -267
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +4 -3
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/types/index.d.ts +4 -0
- package/dist/bigconsole/types/index.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +148 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +172 -133
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +21 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/microfe-bigconsole.css +1 -1
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import e from "../../../
|
|
2
|
-
import
|
|
1
|
+
import { useBigConsole as e, useBigConsoleBasePath as t } from "../../../context/BigConsoleContext.js";
|
|
2
|
+
import n from "../../../hooks/useBigConsoleAnalytics.js";
|
|
3
|
+
import r from "../../../hooks/useDashboardSharing.js";
|
|
3
4
|
import "../../../hooks/index.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import i from "./EmbedTab.js";
|
|
6
|
+
import { useShareRecipients as a } from "../../../hooks/useShareRecipients.js";
|
|
7
|
+
import { useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
8
|
+
import { ResponsiveDialog as ee, ResponsiveDialogContent as u, ResponsiveDialogDescription as d, ResponsiveDialogTitle as te } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
+
import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { formatDistanceToNow as m } from "date-fns";
|
|
9
12
|
//#region src/bigconsole/components/dashboard/ShareDialog/ShareDialog.tsx
|
|
10
|
-
var
|
|
11
|
-
bgPrimary:
|
|
12
|
-
bgSecondary:
|
|
13
|
-
bgTertiary:
|
|
14
|
-
textPrimary:
|
|
15
|
-
textSecondary:
|
|
16
|
-
textTertiary:
|
|
17
|
-
borderDefault:
|
|
18
|
-
actionPrimaryBg: "
|
|
19
|
-
actionPrimaryBgHover: "
|
|
20
|
-
statusSuccessBg: "
|
|
21
|
-
statusErrorText: "
|
|
22
|
-
}
|
|
13
|
+
var h = {
|
|
14
|
+
bgPrimary: "var(--color-bg-surface)",
|
|
15
|
+
bgSecondary: "var(--color-bg-sunken)",
|
|
16
|
+
bgTertiary: "var(--color-bg-canvas)",
|
|
17
|
+
textPrimary: "var(--color-text-primary)",
|
|
18
|
+
textSecondary: "var(--color-text-secondary)",
|
|
19
|
+
textTertiary: "var(--color-text-muted)",
|
|
20
|
+
borderDefault: "var(--color-border-default)",
|
|
21
|
+
actionPrimaryBg: "var(--color-action-primary-bg)",
|
|
22
|
+
actionPrimaryBgHover: "var(--color-action-primary-bgHover)",
|
|
23
|
+
statusSuccessBg: "var(--color-status-success-bg)",
|
|
24
|
+
statusErrorText: "var(--color-status-error-text)"
|
|
25
|
+
}, g = [
|
|
23
26
|
{
|
|
24
27
|
value: "PRIVATE",
|
|
25
28
|
label: "Private",
|
|
@@ -35,7 +38,7 @@ var u = (e) => ({
|
|
|
35
38
|
label: "Public",
|
|
36
39
|
description: "Anyone with the link"
|
|
37
40
|
}
|
|
38
|
-
],
|
|
41
|
+
], _ = [{
|
|
39
42
|
value: "VIEW",
|
|
40
43
|
label: "View",
|
|
41
44
|
description: "Can view the dashboard"
|
|
@@ -44,162 +47,167 @@ var u = (e) => ({
|
|
|
44
47
|
label: "Edit",
|
|
45
48
|
description: "Can edit widgets, layout, and share"
|
|
46
49
|
}];
|
|
47
|
-
function
|
|
48
|
-
let {
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
function v(t) {
|
|
51
|
+
let { workspaceId: n, currentUser: r } = e(), i = c(null);
|
|
52
|
+
return /* @__PURE__ */ f(y, {
|
|
53
|
+
...t,
|
|
54
|
+
returnFocusRef: i
|
|
55
|
+
}, `${r?.id ?? ""}|${n ?? ""}|${t.dashboardId}`);
|
|
56
|
+
}
|
|
57
|
+
function y({ dashboardId: e, dashboardName: c, isOpen: m, onClose: v, visibility: y, onVisibilityChange: b, canChangeVisibility: x = !0, returnFocusRef: S }) {
|
|
58
|
+
let { t: C } = ne(), { shares: w, loading: T, error: ie, fetchShares: E, shareWithUser: D, shareWithGroup: O, updateShare: k, revokeShare: A, revokeAllShares: j } = r(), M = n(), [N, P] = l(""), [F, I] = l(null), [L, R] = l("VIEW"), [z, ae] = l(""), [B, V] = l(!1), [H, U] = l("people"), [W, G] = l(!1), [K, q] = l(null), [J, Y] = l(null), X = a(m, N), Z = t();
|
|
59
|
+
s(() => {
|
|
60
|
+
let e = !1;
|
|
61
|
+
return Promise.resolve().then(() => {
|
|
62
|
+
e || (I(null), P(""), Y(null));
|
|
63
|
+
}), () => {
|
|
64
|
+
e = !0;
|
|
65
|
+
};
|
|
66
|
+
}, [
|
|
67
|
+
X.owner,
|
|
68
|
+
e,
|
|
69
|
+
m
|
|
70
|
+
]), s(() => {
|
|
71
|
+
if (m && e) {
|
|
72
|
+
E(e);
|
|
73
|
+
let t = new URL(`${Z}/dashboards/${encodeURIComponent(e)}`, window.location.origin), n = new URLSearchParams(window.location.search);
|
|
74
|
+
for (let e of [
|
|
75
|
+
"org",
|
|
76
|
+
"workspace",
|
|
77
|
+
"project",
|
|
78
|
+
"tenant"
|
|
79
|
+
]) {
|
|
80
|
+
let r = n.get(e);
|
|
81
|
+
r && t.searchParams.set(e, r);
|
|
82
|
+
}
|
|
83
|
+
X.workspaceId && t.searchParams.set("workspace", X.workspaceId), ae(t.toString());
|
|
84
|
+
}
|
|
51
85
|
}, [
|
|
52
86
|
m,
|
|
53
|
-
|
|
54
|
-
|
|
87
|
+
e,
|
|
88
|
+
E,
|
|
89
|
+
Z,
|
|
90
|
+
X.workspaceId
|
|
55
91
|
]);
|
|
56
|
-
let
|
|
57
|
-
if (!
|
|
58
|
-
|
|
59
|
-
dashboardId:
|
|
60
|
-
permission:
|
|
61
|
-
recipientType:
|
|
92
|
+
let oe = o(async () => {
|
|
93
|
+
if (!F || T || F.workspaceId !== X.workspaceId) return;
|
|
94
|
+
Y(null), M("bigconsole.dashboard.share_clicked", {
|
|
95
|
+
dashboardId: e,
|
|
96
|
+
permission: L,
|
|
97
|
+
recipientType: F.type
|
|
62
98
|
});
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
dashboardId:
|
|
66
|
-
permission:
|
|
67
|
-
recipientType:
|
|
68
|
-
}),
|
|
99
|
+
let t = null;
|
|
100
|
+
if (F.type === "USER" ? t = await D(e, F.id, L) : F.type === "GROUP" && (t = await O(e, F.id, L)), t && M("bigconsole.dashboard.shared", {
|
|
101
|
+
dashboardId: e,
|
|
102
|
+
permission: L,
|
|
103
|
+
recipientType: F.type
|
|
104
|
+
}), !t) {
|
|
105
|
+
Y(C("bigconsole.share.error.grantFailed", "Access could not be granted. Review the recipient and try again."));
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
I(null), P("");
|
|
69
109
|
}, [
|
|
70
|
-
|
|
110
|
+
X.workspaceId,
|
|
111
|
+
C,
|
|
112
|
+
T,
|
|
113
|
+
e,
|
|
114
|
+
M,
|
|
115
|
+
F,
|
|
116
|
+
L,
|
|
71
117
|
O,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
C
|
|
76
|
-
]), K = r(async (e, t) => {
|
|
77
|
-
await T({
|
|
118
|
+
D
|
|
119
|
+
]), se = o(async (e, t) => {
|
|
120
|
+
await k({
|
|
78
121
|
id: e,
|
|
79
122
|
permission: t
|
|
80
123
|
});
|
|
81
|
-
}, [
|
|
82
|
-
window.confirm("Are you sure you want to revoke this access?") && await
|
|
83
|
-
}, [
|
|
84
|
-
window.confirm("Are you sure you want to revoke all shared access?") && await
|
|
85
|
-
}, [
|
|
86
|
-
if (!(!
|
|
87
|
-
|
|
124
|
+
}, [k]), Q = o(async (e) => {
|
|
125
|
+
window.confirm("Are you sure you want to revoke this access?") && await A(e);
|
|
126
|
+
}, [A]), ce = o(async () => {
|
|
127
|
+
window.confirm("Are you sure you want to revoke all shared access?") && await j(e);
|
|
128
|
+
}, [e, j]), le = o(async (e) => {
|
|
129
|
+
if (!(!b || e === y)) {
|
|
130
|
+
q(null), G(!0);
|
|
88
131
|
try {
|
|
89
|
-
await
|
|
132
|
+
await b(e);
|
|
90
133
|
} catch (e) {
|
|
91
|
-
|
|
134
|
+
q(e instanceof Error ? e.message : "Could not update general access.");
|
|
92
135
|
} finally {
|
|
93
|
-
|
|
136
|
+
G(!1);
|
|
94
137
|
}
|
|
95
138
|
}
|
|
96
|
-
}, [
|
|
139
|
+
}, [b, y]), ue = o(async () => {
|
|
97
140
|
try {
|
|
98
|
-
await navigator.clipboard.writeText(
|
|
99
|
-
} catch {
|
|
100
|
-
|
|
101
|
-
{
|
|
102
|
-
id: "user-1",
|
|
103
|
-
name: "John Doe",
|
|
104
|
-
email: "john@example.com",
|
|
105
|
-
type: "USER"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id: "user-2",
|
|
109
|
-
name: "Jane Smith",
|
|
110
|
-
email: "jane@example.com",
|
|
111
|
-
type: "USER"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "group-admin",
|
|
115
|
-
name: "Administrators",
|
|
116
|
-
type: "GROUP"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: "group-editor",
|
|
120
|
-
name: "Editors",
|
|
121
|
-
type: "GROUP"
|
|
141
|
+
await navigator.clipboard.writeText(z), V(!0), setTimeout(() => V(!1), 2e3);
|
|
142
|
+
} catch {
|
|
143
|
+
Y(C("bigconsole.share.error.copyFailed", "The link could not be copied. Select the link and copy it manually."));
|
|
122
144
|
}
|
|
123
|
-
|
|
124
|
-
return m ?
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
left: 0,
|
|
129
|
-
right: 0,
|
|
130
|
-
bottom: 0,
|
|
131
|
-
backgroundColor: "var(--color-overlay-scrim)",
|
|
132
|
-
display: "flex",
|
|
133
|
-
alignItems: "center",
|
|
134
|
-
justifyContent: "center",
|
|
135
|
-
padding: "var(--space-formGap)",
|
|
136
|
-
zIndex: 99999,
|
|
137
|
-
isolation: "isolate"
|
|
145
|
+
}, [z, C]), $ = X.results;
|
|
146
|
+
return m ? /* @__PURE__ */ f(ee, {
|
|
147
|
+
open: m,
|
|
148
|
+
onOpenChange: (e) => {
|
|
149
|
+
e || v();
|
|
138
150
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
children: /* @__PURE__ */ c("div", {
|
|
142
|
-
role: "dialog",
|
|
143
|
-
"aria-modal": "true",
|
|
144
|
-
"aria-labelledby": "share-dialog-title",
|
|
151
|
+
children: /* @__PURE__ */ p(u, {
|
|
152
|
+
showCloseButton: !1,
|
|
145
153
|
"data-testid": "share-dialog",
|
|
154
|
+
className: "flex w-full flex-col gap-0 overflow-hidden rounded-card p-0 sm:w-[calc(100%-2rem)] sm:max-w-[520px]",
|
|
155
|
+
onOpenAutoFocus: () => {
|
|
156
|
+
let e = document.activeElement;
|
|
157
|
+
e instanceof HTMLElement && e !== document.body && !e.closest("[role=dialog]") && (S.current = e);
|
|
158
|
+
},
|
|
159
|
+
onCloseAutoFocus: (e) => {
|
|
160
|
+
e.preventDefault(), S.current?.isConnected && S.current.focus();
|
|
161
|
+
},
|
|
146
162
|
style: {
|
|
147
|
-
width: "100%",
|
|
148
163
|
maxWidth: "520px",
|
|
149
|
-
maxHeight: "
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
backgroundColor: $.bgPrimary,
|
|
153
|
-
borderRadius: "var(--radius-card)",
|
|
154
|
-
boxShadow: "var(--shadow-elevation-3)",
|
|
155
|
-
overflow: "hidden",
|
|
156
|
-
position: "relative",
|
|
157
|
-
zIndex: 1e5,
|
|
158
|
-
color: $.textPrimary
|
|
164
|
+
maxHeight: "85dvh",
|
|
165
|
+
backgroundColor: h.bgPrimary,
|
|
166
|
+
color: h.textPrimary
|
|
159
167
|
},
|
|
160
|
-
onClick: (e) => e.stopPropagation(),
|
|
161
168
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ p("div", {
|
|
163
170
|
style: {
|
|
164
171
|
flexShrink: 0,
|
|
165
172
|
padding: "20px 24px",
|
|
166
|
-
borderBottom: `1px solid ${
|
|
173
|
+
borderBottom: `1px solid ${h.borderDefault}`,
|
|
167
174
|
display: "flex",
|
|
168
175
|
alignItems: "center",
|
|
169
176
|
justifyContent: "space-between",
|
|
170
|
-
backgroundColor:
|
|
177
|
+
backgroundColor: h.bgPrimary
|
|
171
178
|
},
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
-
id: "share-dialog-title",
|
|
179
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f(te, {
|
|
174
180
|
style: {
|
|
175
181
|
margin: 0,
|
|
176
182
|
fontSize: "18px",
|
|
177
183
|
fontWeight: 600,
|
|
178
|
-
color:
|
|
184
|
+
color: h.textPrimary
|
|
179
185
|
},
|
|
180
186
|
children: "Share Dashboard"
|
|
181
|
-
}), /* @__PURE__ */
|
|
187
|
+
}), /* @__PURE__ */ f(d, {
|
|
182
188
|
style: {
|
|
183
189
|
margin: "4px 0 0",
|
|
184
190
|
fontSize: "13px",
|
|
185
|
-
color:
|
|
191
|
+
color: h.textSecondary
|
|
186
192
|
},
|
|
187
|
-
children:
|
|
188
|
-
})] }), /* @__PURE__ */
|
|
189
|
-
|
|
193
|
+
children: c
|
|
194
|
+
})] }), /* @__PURE__ */ f("button", {
|
|
195
|
+
type: "button",
|
|
196
|
+
"aria-label": C("bigconsole.share.closeLabel", "Close share dialog"),
|
|
197
|
+
onClick: v,
|
|
190
198
|
style: {
|
|
191
199
|
background: "none",
|
|
192
200
|
border: "none",
|
|
193
201
|
fontSize: "24px",
|
|
194
202
|
cursor: "pointer",
|
|
195
|
-
color:
|
|
203
|
+
color: h.textSecondary,
|
|
196
204
|
padding: "4px",
|
|
197
205
|
lineHeight: 1
|
|
198
206
|
},
|
|
199
207
|
children: "×"
|
|
200
208
|
})]
|
|
201
209
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ f("div", {
|
|
203
211
|
role: "tablist",
|
|
204
212
|
"aria-label": "Share options",
|
|
205
213
|
style: {
|
|
@@ -207,20 +215,20 @@ function p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility
|
|
|
207
215
|
display: "flex",
|
|
208
216
|
gap: "4px",
|
|
209
217
|
padding: "0 24px",
|
|
210
|
-
borderBottom: `1px solid ${
|
|
211
|
-
backgroundColor:
|
|
218
|
+
borderBottom: `1px solid ${h.borderDefault}`,
|
|
219
|
+
backgroundColor: h.bgPrimary
|
|
212
220
|
},
|
|
213
|
-
children: ["people", "embed"].map((e) => /* @__PURE__ */
|
|
221
|
+
children: ["people", "embed"].map((e) => /* @__PURE__ */ f("button", {
|
|
214
222
|
type: "button",
|
|
215
223
|
role: "tab",
|
|
216
|
-
"aria-selected":
|
|
217
|
-
onClick: () =>
|
|
224
|
+
"aria-selected": H === e,
|
|
225
|
+
onClick: () => U(e),
|
|
218
226
|
style: {
|
|
219
227
|
padding: "10px 12px",
|
|
220
228
|
background: "none",
|
|
221
229
|
border: "none",
|
|
222
|
-
borderBottom: `2px solid ${
|
|
223
|
-
color:
|
|
230
|
+
borderBottom: `2px solid ${H === e ? h.actionPrimaryBg : "transparent"}`,
|
|
231
|
+
color: H === e ? h.textPrimary : h.textSecondary,
|
|
224
232
|
fontSize: "13px",
|
|
225
233
|
fontWeight: 600,
|
|
226
234
|
cursor: "pointer"
|
|
@@ -228,111 +236,111 @@ function p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility
|
|
|
228
236
|
children: e === "people" ? "People" : "Publish to web"
|
|
229
237
|
}, e))
|
|
230
238
|
}),
|
|
231
|
-
|
|
239
|
+
H === "embed" && /* @__PURE__ */ f("div", {
|
|
232
240
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
233
|
-
style: { backgroundColor:
|
|
234
|
-
children: /* @__PURE__ */
|
|
235
|
-
dashboardId:
|
|
236
|
-
colors:
|
|
241
|
+
style: { backgroundColor: h.bgPrimary },
|
|
242
|
+
children: /* @__PURE__ */ f(i, {
|
|
243
|
+
dashboardId: e,
|
|
244
|
+
colors: h
|
|
237
245
|
})
|
|
238
246
|
}),
|
|
239
|
-
|
|
247
|
+
H === "people" && /* @__PURE__ */ p("div", {
|
|
240
248
|
className: "flex min-h-0 flex-1 flex-col gap-section-gap overflow-y-auto p-card-padding",
|
|
241
|
-
style: { backgroundColor:
|
|
249
|
+
style: { backgroundColor: h.bgPrimary },
|
|
242
250
|
children: [
|
|
243
|
-
|
|
251
|
+
y && b && /* @__PURE__ */ p("section", {
|
|
244
252
|
"aria-labelledby": "share-visibility-heading",
|
|
245
253
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ f("h3", {
|
|
247
255
|
id: "share-visibility-heading",
|
|
248
256
|
className: "mb-form-gap text-sm font-semibold",
|
|
249
|
-
style: { color:
|
|
257
|
+
style: { color: h.textPrimary },
|
|
250
258
|
children: "General access"
|
|
251
259
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ p("div", {
|
|
253
261
|
style: {
|
|
254
262
|
display: "flex",
|
|
255
263
|
alignItems: "center",
|
|
256
264
|
gap: "8px",
|
|
257
265
|
flexWrap: "wrap"
|
|
258
266
|
},
|
|
259
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ f("select", {
|
|
260
268
|
"aria-label": "General access",
|
|
261
269
|
"data-testid": "share-visibility",
|
|
262
|
-
value:
|
|
263
|
-
disabled: !
|
|
264
|
-
onChange: (e) => void
|
|
270
|
+
value: y,
|
|
271
|
+
disabled: !x || W,
|
|
272
|
+
onChange: (e) => void le(e.target.value),
|
|
265
273
|
style: {
|
|
266
274
|
padding: "10px 12px",
|
|
267
|
-
border: `1px solid ${
|
|
275
|
+
border: `1px solid ${h.borderDefault}`,
|
|
268
276
|
borderRadius: "6px",
|
|
269
277
|
fontSize: "13px",
|
|
270
|
-
backgroundColor:
|
|
271
|
-
color:
|
|
272
|
-
cursor: !
|
|
273
|
-
opacity: !
|
|
278
|
+
backgroundColor: h.bgPrimary,
|
|
279
|
+
color: h.textPrimary,
|
|
280
|
+
cursor: !x || W ? "not-allowed" : "pointer",
|
|
281
|
+
opacity: !x || W ? .6 : 1
|
|
274
282
|
},
|
|
275
|
-
children:
|
|
283
|
+
children: g.map((e) => /* @__PURE__ */ f("option", {
|
|
276
284
|
value: e.value,
|
|
277
285
|
children: e.label
|
|
278
286
|
}, e.value))
|
|
279
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ f("span", {
|
|
280
288
|
style: {
|
|
281
289
|
fontSize: "12px",
|
|
282
|
-
color:
|
|
290
|
+
color: h.textSecondary
|
|
283
291
|
},
|
|
284
|
-
children:
|
|
292
|
+
children: g.find((e) => e.value === y)?.description
|
|
285
293
|
})]
|
|
286
294
|
}),
|
|
287
|
-
!
|
|
295
|
+
!x && /* @__PURE__ */ f("p", {
|
|
288
296
|
style: {
|
|
289
297
|
margin: "6px 0 0",
|
|
290
298
|
fontSize: "11px",
|
|
291
|
-
color:
|
|
299
|
+
color: h.textSecondary
|
|
292
300
|
},
|
|
293
301
|
children: "You don't have permission to change general access."
|
|
294
302
|
}),
|
|
295
|
-
|
|
303
|
+
K && /* @__PURE__ */ f("p", {
|
|
296
304
|
style: {
|
|
297
305
|
margin: "6px 0 0",
|
|
298
306
|
fontSize: "11px",
|
|
299
|
-
color:
|
|
307
|
+
color: h.statusErrorText
|
|
300
308
|
},
|
|
301
|
-
children:
|
|
309
|
+
children: K
|
|
302
310
|
})
|
|
303
311
|
]
|
|
304
312
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ p("section", {
|
|
306
314
|
"aria-labelledby": "share-link-heading",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
308
316
|
id: "share-link-heading",
|
|
309
317
|
className: "mb-form-gap text-sm font-semibold",
|
|
310
|
-
style: { color:
|
|
318
|
+
style: { color: h.textPrimary },
|
|
311
319
|
children: "Share link"
|
|
312
|
-
}), /* @__PURE__ */
|
|
320
|
+
}), /* @__PURE__ */ p("div", {
|
|
313
321
|
style: {
|
|
314
322
|
display: "flex",
|
|
315
323
|
gap: "8px",
|
|
316
324
|
flexWrap: "wrap"
|
|
317
325
|
},
|
|
318
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ f("input", {
|
|
319
327
|
type: "text",
|
|
320
|
-
value:
|
|
328
|
+
value: z,
|
|
321
329
|
readOnly: !0,
|
|
322
330
|
style: {
|
|
323
331
|
flex: 1,
|
|
324
332
|
padding: "10px 12px",
|
|
325
|
-
border: `1px solid ${
|
|
333
|
+
border: `1px solid ${h.borderDefault}`,
|
|
326
334
|
borderRadius: "6px",
|
|
327
335
|
fontSize: "13px",
|
|
328
|
-
backgroundColor:
|
|
329
|
-
color:
|
|
336
|
+
backgroundColor: h.bgSecondary,
|
|
337
|
+
color: h.textPrimary
|
|
330
338
|
}
|
|
331
|
-
}), /* @__PURE__ */
|
|
332
|
-
onClick:
|
|
339
|
+
}), /* @__PURE__ */ f("button", {
|
|
340
|
+
onClick: ue,
|
|
333
341
|
style: {
|
|
334
342
|
padding: "10px 16px",
|
|
335
|
-
backgroundColor:
|
|
343
|
+
backgroundColor: B ? h.statusSuccessBg : h.actionPrimaryBg,
|
|
336
344
|
color: "var(--color-action-primary-text)",
|
|
337
345
|
border: "none",
|
|
338
346
|
borderRadius: "6px",
|
|
@@ -341,138 +349,180 @@ function p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility
|
|
|
341
349
|
fontWeight: 500,
|
|
342
350
|
minWidth: "80px"
|
|
343
351
|
},
|
|
344
|
-
children:
|
|
352
|
+
children: B ? "Copied!" : "Copy"
|
|
345
353
|
})]
|
|
346
354
|
})]
|
|
347
355
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
356
|
+
(ie || J) && /* @__PURE__ */ f("p", {
|
|
357
|
+
role: "alert",
|
|
358
|
+
style: { color: h.statusErrorText },
|
|
359
|
+
children: J || C("bigconsole.share.error.loadFailed", "Dashboard access could not be loaded or updated. Try again.")
|
|
360
|
+
}),
|
|
361
|
+
/* @__PURE__ */ p("section", {
|
|
349
362
|
"aria-labelledby": "share-invite-heading",
|
|
350
|
-
children: [
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
363
|
+
children: [
|
|
364
|
+
/* @__PURE__ */ f("h3", {
|
|
365
|
+
id: "share-invite-heading",
|
|
366
|
+
className: "mb-form-gap text-sm font-semibold",
|
|
367
|
+
style: { color: h.textPrimary },
|
|
368
|
+
children: "Invite people"
|
|
369
|
+
}),
|
|
370
|
+
/* @__PURE__ */ f("p", {
|
|
371
|
+
style: {
|
|
372
|
+
color: h.textSecondary,
|
|
373
|
+
fontSize: "13px",
|
|
374
|
+
marginBottom: "8px"
|
|
375
|
+
},
|
|
376
|
+
children: C("bigconsole.share.directory.scopeHint", "Only members and groups from the current workspace are listed.")
|
|
377
|
+
}),
|
|
378
|
+
X.loading && /* @__PURE__ */ f("p", {
|
|
379
|
+
role: "status",
|
|
380
|
+
children: C("bigconsole.share.directory.loading", "Loading workspace recipients…")
|
|
381
|
+
}),
|
|
382
|
+
X.error && /* @__PURE__ */ p("div", {
|
|
383
|
+
role: "alert",
|
|
384
|
+
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", {
|
|
385
|
+
type: "button",
|
|
386
|
+
onClick: X.retry,
|
|
387
|
+
children: C("bigconsole.share.directory.retry", "Retry directory")
|
|
388
|
+
})]
|
|
389
|
+
}),
|
|
390
|
+
N && !F && !X.loading && !X.error && $.length === 0 && /* @__PURE__ */ f("p", {
|
|
391
|
+
role: "status",
|
|
392
|
+
children: C("bigconsole.share.directory.empty", "No matching workspace members or groups.")
|
|
393
|
+
}),
|
|
394
|
+
X.hasMoreMembers && /* @__PURE__ */ f("button", {
|
|
395
|
+
type: "button",
|
|
396
|
+
disabled: X.loading,
|
|
397
|
+
onClick: X.loadMoreMembers,
|
|
398
|
+
children: C("bigconsole.share.directory.loadMore", "Load more workspace members")
|
|
399
|
+
}),
|
|
400
|
+
X.hasMoreGroups && /* @__PURE__ */ f("p", { children: C("bigconsole.share.directory.moreGroups", "More groups match. Narrow your search to find a specific group.") }),
|
|
401
|
+
/* @__PURE__ */ p("div", {
|
|
402
|
+
style: {
|
|
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"
|
|
373
413
|
},
|
|
374
|
-
|
|
414
|
+
children: [/* @__PURE__ */ f("input", {
|
|
415
|
+
type: "text",
|
|
416
|
+
value: F ? F.name : N,
|
|
417
|
+
onChange: (e) => {
|
|
418
|
+
P(e.target.value), I(null);
|
|
419
|
+
},
|
|
420
|
+
"aria-label": C("bigconsole.share.directory.searchLabel", "Search workspace members and groups"),
|
|
421
|
+
placeholder: C("bigconsole.share.directory.searchPlaceholder", "Search workspace members or groups..."),
|
|
422
|
+
style: {
|
|
423
|
+
width: "100%",
|
|
424
|
+
padding: "10px 12px",
|
|
425
|
+
border: `1px solid ${h.borderDefault}`,
|
|
426
|
+
borderRadius: "6px",
|
|
427
|
+
fontSize: "13px",
|
|
428
|
+
backgroundColor: h.bgPrimary,
|
|
429
|
+
color: h.textPrimary
|
|
430
|
+
}
|
|
431
|
+
}), N && !F && $.length > 0 && /* @__PURE__ */ f("div", {
|
|
432
|
+
style: {
|
|
433
|
+
position: "absolute",
|
|
434
|
+
top: "100%",
|
|
435
|
+
left: 0,
|
|
436
|
+
right: 0,
|
|
437
|
+
marginTop: "4px",
|
|
438
|
+
backgroundColor: h.bgPrimary,
|
|
439
|
+
border: `1px solid ${h.borderDefault}`,
|
|
440
|
+
borderRadius: "6px",
|
|
441
|
+
boxShadow: "var(--shadow-elevation-3)",
|
|
442
|
+
zIndex: 100001,
|
|
443
|
+
maxHeight: "200px",
|
|
444
|
+
overflowY: "auto"
|
|
445
|
+
},
|
|
446
|
+
children: $.map((e) => /* @__PURE__ */ p("button", {
|
|
447
|
+
type: "button",
|
|
448
|
+
onClick: () => I(e),
|
|
449
|
+
style: {
|
|
450
|
+
display: "block",
|
|
451
|
+
width: "100%",
|
|
452
|
+
padding: "10px 12px",
|
|
453
|
+
textAlign: "left",
|
|
454
|
+
backgroundColor: "transparent",
|
|
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": C("bigconsole.share.permissionLabel", "Access permission"),
|
|
489
|
+
value: L,
|
|
490
|
+
onChange: (e) => R(e.target.value),
|
|
375
491
|
style: {
|
|
376
|
-
width: "100%",
|
|
377
492
|
padding: "10px 12px",
|
|
378
|
-
border: `1px solid ${
|
|
493
|
+
border: `1px solid ${h.borderDefault}`,
|
|
379
494
|
borderRadius: "6px",
|
|
380
495
|
fontSize: "13px",
|
|
381
|
-
backgroundColor:
|
|
382
|
-
color:
|
|
383
|
-
}
|
|
384
|
-
|
|
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: oe,
|
|
506
|
+
disabled: !F || T || F.workspaceId !== X.workspaceId,
|
|
385
507
|
style: {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
marginTop: "4px",
|
|
391
|
-
backgroundColor: $.bgPrimary,
|
|
392
|
-
border: `1px solid ${$.borderDefault}`,
|
|
508
|
+
padding: "10px 16px",
|
|
509
|
+
backgroundColor: F ? h.actionPrimaryBg : h.bgTertiary,
|
|
510
|
+
color: F ? "var(--color-action-primary-text)" : h.textSecondary,
|
|
511
|
+
border: "none",
|
|
393
512
|
borderRadius: "6px",
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
overflowY: "auto"
|
|
513
|
+
cursor: F ? "pointer" : "not-allowed",
|
|
514
|
+
fontSize: "13px",
|
|
515
|
+
fontWeight: 500
|
|
398
516
|
},
|
|
399
|
-
children:
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
padding: "10px 12px",
|
|
405
|
-
textAlign: "left",
|
|
406
|
-
backgroundColor: "transparent",
|
|
407
|
-
border: "none",
|
|
408
|
-
cursor: "pointer",
|
|
409
|
-
borderBottom: `1px solid ${$.borderDefault}`
|
|
410
|
-
},
|
|
411
|
-
children: [
|
|
412
|
-
/* @__PURE__ */ s("div", {
|
|
413
|
-
style: {
|
|
414
|
-
fontSize: "13px",
|
|
415
|
-
fontWeight: 500,
|
|
416
|
-
color: $.textPrimary
|
|
417
|
-
},
|
|
418
|
-
children: e.name
|
|
419
|
-
}),
|
|
420
|
-
e.email && /* @__PURE__ */ s("div", {
|
|
421
|
-
style: {
|
|
422
|
-
fontSize: "11px",
|
|
423
|
-
color: $.textSecondary
|
|
424
|
-
},
|
|
425
|
-
children: e.email
|
|
426
|
-
}),
|
|
427
|
-
/* @__PURE__ */ s("span", {
|
|
428
|
-
style: {
|
|
429
|
-
fontSize: "10px",
|
|
430
|
-
color: $.textTertiary,
|
|
431
|
-
textTransform: "uppercase"
|
|
432
|
-
},
|
|
433
|
-
children: e.type
|
|
434
|
-
})
|
|
435
|
-
]
|
|
436
|
-
}, e.id))
|
|
437
|
-
})]
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */ s("select", {
|
|
440
|
-
value: N,
|
|
441
|
-
onChange: (e) => P(e.target.value),
|
|
442
|
-
style: {
|
|
443
|
-
padding: "10px 12px",
|
|
444
|
-
border: `1px solid ${$.borderDefault}`,
|
|
445
|
-
borderRadius: "6px",
|
|
446
|
-
fontSize: "13px",
|
|
447
|
-
backgroundColor: $.bgPrimary,
|
|
448
|
-
color: $.textPrimary
|
|
449
|
-
},
|
|
450
|
-
children: f.map((e) => /* @__PURE__ */ s("option", {
|
|
451
|
-
value: e.value,
|
|
452
|
-
children: e.label
|
|
453
|
-
}, e.value))
|
|
454
|
-
}),
|
|
455
|
-
/* @__PURE__ */ s("button", {
|
|
456
|
-
onClick: G,
|
|
457
|
-
disabled: !j || x,
|
|
458
|
-
style: {
|
|
459
|
-
padding: "10px 16px",
|
|
460
|
-
backgroundColor: j ? $.actionPrimaryBg : $.bgTertiary,
|
|
461
|
-
color: j ? "var(--color-action-primary-text)" : $.textSecondary,
|
|
462
|
-
border: "none",
|
|
463
|
-
borderRadius: "6px",
|
|
464
|
-
cursor: j ? "pointer" : "not-allowed",
|
|
465
|
-
fontSize: "13px",
|
|
466
|
-
fontWeight: 500
|
|
467
|
-
},
|
|
468
|
-
children: "Share"
|
|
469
|
-
})
|
|
470
|
-
]
|
|
471
|
-
})]
|
|
517
|
+
children: "Share"
|
|
518
|
+
})
|
|
519
|
+
]
|
|
520
|
+
})
|
|
521
|
+
]
|
|
472
522
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ p("section", {
|
|
474
524
|
"aria-labelledby": "share-access-heading",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ p("div", {
|
|
476
526
|
style: {
|
|
477
527
|
display: "flex",
|
|
478
528
|
alignItems: "center",
|
|
@@ -481,50 +531,50 @@ function p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility
|
|
|
481
531
|
gap: "8px",
|
|
482
532
|
marginBottom: "12px"
|
|
483
533
|
},
|
|
484
|
-
children: [/* @__PURE__ */
|
|
534
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
485
535
|
id: "share-access-heading",
|
|
486
536
|
className: "text-sm font-semibold",
|
|
487
|
-
style: { color:
|
|
537
|
+
style: { color: h.textPrimary },
|
|
488
538
|
children: [
|
|
489
539
|
"People with access (",
|
|
490
|
-
|
|
540
|
+
w.length,
|
|
491
541
|
")"
|
|
492
542
|
]
|
|
493
|
-
}),
|
|
494
|
-
onClick:
|
|
543
|
+
}), w.length > 0 && /* @__PURE__ */ f("button", {
|
|
544
|
+
onClick: ce,
|
|
495
545
|
style: {
|
|
496
546
|
padding: "4px 8px",
|
|
497
547
|
backgroundColor: "transparent",
|
|
498
|
-
color:
|
|
548
|
+
color: h.statusErrorText,
|
|
499
549
|
border: "none",
|
|
500
550
|
cursor: "pointer",
|
|
501
551
|
fontSize: "12px"
|
|
502
552
|
},
|
|
503
553
|
children: "Revoke All"
|
|
504
554
|
})]
|
|
505
|
-
}),
|
|
555
|
+
}), T && w.length === 0 ? /* @__PURE__ */ f("p", {
|
|
506
556
|
style: {
|
|
507
|
-
color:
|
|
557
|
+
color: h.textSecondary,
|
|
508
558
|
fontSize: "13px"
|
|
509
559
|
},
|
|
510
560
|
children: "Loading..."
|
|
511
|
-
}) :
|
|
561
|
+
}) : w.length === 0 ? /* @__PURE__ */ f("p", {
|
|
512
562
|
style: {
|
|
513
|
-
color:
|
|
563
|
+
color: h.textSecondary,
|
|
514
564
|
fontSize: "13px"
|
|
515
565
|
},
|
|
516
566
|
children: "No one has access to this dashboard yet."
|
|
517
|
-
}) : /* @__PURE__ */
|
|
567
|
+
}) : /* @__PURE__ */ f("div", {
|
|
518
568
|
style: {
|
|
519
569
|
display: "flex",
|
|
520
570
|
flexDirection: "column",
|
|
521
571
|
gap: "8px"
|
|
522
572
|
},
|
|
523
|
-
children:
|
|
573
|
+
children: w.map((e) => /* @__PURE__ */ f(re, {
|
|
524
574
|
share: e,
|
|
525
|
-
onUpdatePermission:
|
|
526
|
-
onRevoke:
|
|
527
|
-
colors:
|
|
575
|
+
onUpdatePermission: se,
|
|
576
|
+
onRevoke: Q,
|
|
577
|
+
colors: h
|
|
528
578
|
}, e.id))
|
|
529
579
|
})]
|
|
530
580
|
})
|
|
@@ -532,9 +582,9 @@ function p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility
|
|
|
532
582
|
})
|
|
533
583
|
]
|
|
534
584
|
})
|
|
535
|
-
})
|
|
585
|
+
}) : null;
|
|
536
586
|
}
|
|
537
|
-
function
|
|
587
|
+
function b(e) {
|
|
538
588
|
if (!e) return {
|
|
539
589
|
label: "No expiry",
|
|
540
590
|
expired: !1
|
|
@@ -544,16 +594,16 @@ function m(e) {
|
|
|
544
594
|
label: "No expiry",
|
|
545
595
|
expired: !1
|
|
546
596
|
} : t.getTime() <= Date.now() ? {
|
|
547
|
-
label: `Expired ${
|
|
597
|
+
label: `Expired ${m(t, { addSuffix: !0 })}`,
|
|
548
598
|
expired: !0
|
|
549
599
|
} : {
|
|
550
|
-
label: `Expires ${
|
|
600
|
+
label: `Expires ${m(t, { addSuffix: !0 })}`,
|
|
551
601
|
expired: !1
|
|
552
602
|
};
|
|
553
603
|
}
|
|
554
|
-
function
|
|
555
|
-
let i =
|
|
556
|
-
return /* @__PURE__ */
|
|
604
|
+
function re({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
605
|
+
let i = b(e.expiresAt);
|
|
606
|
+
return /* @__PURE__ */ p("div", {
|
|
557
607
|
style: {
|
|
558
608
|
display: "flex",
|
|
559
609
|
alignItems: "center",
|
|
@@ -562,13 +612,13 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
562
612
|
backgroundColor: r.bgSecondary,
|
|
563
613
|
borderRadius: "6px"
|
|
564
614
|
},
|
|
565
|
-
children: [/* @__PURE__ */
|
|
615
|
+
children: [/* @__PURE__ */ p("div", {
|
|
566
616
|
style: {
|
|
567
617
|
display: "flex",
|
|
568
618
|
alignItems: "center",
|
|
569
619
|
gap: "10px"
|
|
570
620
|
},
|
|
571
|
-
children: [/* @__PURE__ */
|
|
621
|
+
children: [/* @__PURE__ */ f("div", {
|
|
572
622
|
style: {
|
|
573
623
|
width: "36px",
|
|
574
624
|
height: "36px",
|
|
@@ -582,14 +632,14 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
582
632
|
fontSize: "14px"
|
|
583
633
|
},
|
|
584
634
|
children: e.recipientType === "USER" ? "U" : "R"
|
|
585
|
-
}), /* @__PURE__ */
|
|
635
|
+
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
|
|
586
636
|
style: {
|
|
587
637
|
fontSize: "13px",
|
|
588
638
|
fontWeight: 500,
|
|
589
639
|
color: r.textPrimary
|
|
590
640
|
},
|
|
591
641
|
children: e.recipientId
|
|
592
|
-
}), /* @__PURE__ */
|
|
642
|
+
}), /* @__PURE__ */ p("div", {
|
|
593
643
|
style: {
|
|
594
644
|
fontSize: "11px",
|
|
595
645
|
color: r.textSecondary
|
|
@@ -600,7 +650,7 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
600
650
|
new Date(e.createdAt).toLocaleDateString()
|
|
601
651
|
]
|
|
602
652
|
})] })]
|
|
603
|
-
}), /* @__PURE__ */
|
|
653
|
+
}), /* @__PURE__ */ p("div", {
|
|
604
654
|
style: {
|
|
605
655
|
display: "flex",
|
|
606
656
|
alignItems: "center",
|
|
@@ -608,7 +658,7 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
608
658
|
flexWrap: "wrap"
|
|
609
659
|
},
|
|
610
660
|
children: [
|
|
611
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ f("span", {
|
|
612
662
|
"data-testid": "share-expiry",
|
|
613
663
|
title: e.expiresAt ? new Date(e.expiresAt).toLocaleString() : "Access does not expire",
|
|
614
664
|
style: {
|
|
@@ -622,7 +672,7 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
622
672
|
},
|
|
623
673
|
children: i.label
|
|
624
674
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ f("select", {
|
|
626
676
|
value: e.permission,
|
|
627
677
|
onChange: (n) => t(e.id, n.target.value),
|
|
628
678
|
style: {
|
|
@@ -633,12 +683,12 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
633
683
|
backgroundColor: r.bgPrimary,
|
|
634
684
|
color: r.textPrimary
|
|
635
685
|
},
|
|
636
|
-
children:
|
|
686
|
+
children: _.map((e) => /* @__PURE__ */ f("option", {
|
|
637
687
|
value: e.value,
|
|
638
688
|
children: e.label
|
|
639
689
|
}, e.value))
|
|
640
690
|
}),
|
|
641
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ f("button", {
|
|
642
692
|
onClick: () => n(e.id),
|
|
643
693
|
style: {
|
|
644
694
|
padding: "6px 10px",
|
|
@@ -656,6 +706,6 @@ function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
|
|
|
656
706
|
});
|
|
657
707
|
}
|
|
658
708
|
//#endregion
|
|
659
|
-
export {
|
|
709
|
+
export { v as default };
|
|
660
710
|
|
|
661
711
|
//# sourceMappingURL=ShareDialog.js.map
|