@burdenoff/microfe-bigconsole 2026.1004.2 → 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.
Files changed (150) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.d.ts +1 -1
  2. package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
  3. package/dist/bigconsole/BigConsoleRoutes.js +15 -1
  4. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  5. package/dist/bigconsole/components/DrilldownModal.d.ts.map +1 -1
  6. package/dist/bigconsole/components/DrilldownModal.js +54 -53
  7. package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
  8. package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +3 -1
  9. package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts.map +1 -1
  10. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +40 -39
  11. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
  12. package/dist/bigconsole/components/dashboard/DashboardCanvas.d.ts.map +1 -1
  13. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +184 -177
  14. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  15. package/dist/bigconsole/components/dashboard/DashboardGrid.d.ts.map +1 -1
  16. package/dist/bigconsole/components/dashboard/DashboardGrid.js +40 -22
  17. package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
  18. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.d.ts.map +1 -1
  19. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +31 -25
  20. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
  21. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts +1 -1
  22. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts.map +1 -1
  23. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +115 -80
  24. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
  25. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.d.ts.map +1 -1
  26. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +177 -146
  27. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  28. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts +1 -1
  29. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts.map +1 -1
  30. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +375 -325
  31. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
  32. package/dist/bigconsole/components/datasink/CacheTTLSelector.d.ts.map +1 -1
  33. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +7 -1
  34. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  35. package/dist/bigconsole/components/parser/ParserSelector.d.ts +3 -1
  36. package/dist/bigconsole/components/parser/ParserSelector.d.ts.map +1 -1
  37. package/dist/bigconsole/components/parser/ParserSelector.js +94 -94
  38. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  39. package/dist/bigconsole/components/pipeline/PipelineCard.d.ts.map +1 -1
  40. package/dist/bigconsole/components/pipeline/PipelineCard.js +111 -89
  41. package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
  42. package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts +8 -0
  43. package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts.map +1 -0
  44. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +52 -0
  45. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js.map +1 -0
  46. package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
  47. package/dist/bigconsole/components/widgets/PropertiesPanel.js +257 -221
  48. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  49. package/dist/bigconsole/components/widgets/WidgetHeader.d.ts +1 -0
  50. package/dist/bigconsole/components/widgets/WidgetHeader.d.ts.map +1 -1
  51. package/dist/bigconsole/components/widgets/WidgetHeader.js +29 -29
  52. package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
  53. package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts +2 -0
  54. package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts.map +1 -1
  55. package/dist/bigconsole/components/widgets/WidgetWrapper.js +247 -239
  56. package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
  57. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.d.ts.map +1 -1
  58. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +6 -4
  59. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
  60. package/dist/bigconsole/components/widgets/states/EmptyState.d.ts +1 -0
  61. package/dist/bigconsole/components/widgets/states/EmptyState.d.ts.map +1 -1
  62. package/dist/bigconsole/components/widgets/states/EmptyState.js +4 -4
  63. package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
  64. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts +7 -0
  65. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts.map +1 -0
  66. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js +94 -0
  67. package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js.map +1 -0
  68. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts +7 -0
  69. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts.map +1 -0
  70. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +101 -0
  71. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js.map +1 -0
  72. package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts +16 -0
  73. package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts.map +1 -0
  74. package/dist/bigconsole/hooks/useBigConsoleSettings.js +57 -0
  75. package/dist/bigconsole/hooks/useBigConsoleSettings.js.map +1 -0
  76. package/dist/bigconsole/hooks/useDashboardOperations.d.ts.map +1 -1
  77. package/dist/bigconsole/hooks/useDashboardOperations.js +102 -79
  78. package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
  79. package/dist/bigconsole/hooks/useExportDashboard.d.ts +3 -1
  80. package/dist/bigconsole/hooks/useExportDashboard.d.ts.map +1 -1
  81. package/dist/bigconsole/hooks/useExportDashboard.js +23 -13
  82. package/dist/bigconsole/hooks/useExportDashboard.js.map +1 -1
  83. package/dist/bigconsole/hooks/useFilterUrlSync.d.ts +18 -0
  84. package/dist/bigconsole/hooks/useFilterUrlSync.d.ts.map +1 -1
  85. package/dist/bigconsole/hooks/useFilterUrlSync.js +87 -57
  86. package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
  87. package/dist/bigconsole/hooks/useGlobalFilters.d.ts.map +1 -1
  88. package/dist/bigconsole/hooks/useGlobalFilters.js +39 -29
  89. package/dist/bigconsole/hooks/useGlobalFilters.js.map +1 -1
  90. package/dist/bigconsole/hooks/usePageOperations.d.ts.map +1 -1
  91. package/dist/bigconsole/hooks/usePageOperations.js +1 -0
  92. package/dist/bigconsole/hooks/usePageOperations.js.map +1 -1
  93. package/dist/bigconsole/hooks/usePipelineOperations.d.ts.map +1 -1
  94. package/dist/bigconsole/hooks/usePipelineOperations.js +114 -112
  95. package/dist/bigconsole/hooks/usePipelineOperations.js.map +1 -1
  96. package/dist/bigconsole/hooks/useShareRecipients.d.ts +22 -0
  97. package/dist/bigconsole/hooks/useShareRecipients.d.ts.map +1 -0
  98. package/dist/bigconsole/hooks/useShareRecipients.js +198 -0
  99. package/dist/bigconsole/hooks/useShareRecipients.js.map +1 -0
  100. package/dist/bigconsole/pages/DashboardBuilderPage.d.ts.map +1 -1
  101. package/dist/bigconsole/pages/DashboardBuilderPage.js +198 -193
  102. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  103. package/dist/bigconsole/pages/DashboardViewPage.d.ts.map +1 -1
  104. package/dist/bigconsole/pages/DashboardViewPage.js +171 -167
  105. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  106. package/dist/bigconsole/pages/DashboardsPage.d.ts.map +1 -1
  107. package/dist/bigconsole/pages/DashboardsPage.js +313 -266
  108. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  109. package/dist/bigconsole/pages/DataSinkBuilderPage.d.ts.map +1 -1
  110. package/dist/bigconsole/pages/DataSinkBuilderPage.js +84 -79
  111. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  112. package/dist/bigconsole/pages/DataSinkViewPage.d.ts.map +1 -1
  113. package/dist/bigconsole/pages/DataSinkViewPage.js +267 -257
  114. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  115. package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
  116. package/dist/bigconsole/pages/InsightsPage.js +465 -402
  117. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  118. package/dist/bigconsole/pages/PipelineBuilderPage.d.ts.map +1 -1
  119. package/dist/bigconsole/pages/PipelineBuilderPage.js +169 -157
  120. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  121. package/dist/bigconsole/pages/PipelineViewPage.d.ts.map +1 -1
  122. package/dist/bigconsole/pages/PipelineViewPage.js +370 -230
  123. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  124. package/dist/bigconsole/pages/PipelinesPage.d.ts.map +1 -1
  125. package/dist/bigconsole/pages/PipelinesPage.js +181 -151
  126. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  127. package/dist/bigconsole/pages/SettingsPage.d.ts.map +1 -1
  128. package/dist/bigconsole/pages/SettingsPage.js +188 -208
  129. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  130. package/dist/bigconsole/pages/WidgetDemoPage.d.ts.map +1 -1
  131. package/dist/bigconsole/pages/WidgetDemoPage.js +134 -117
  132. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  133. package/dist/bigconsole/pages/WorkflowViewPage.d.ts.map +1 -1
  134. package/dist/bigconsole/pages/WorkflowViewPage.js +315 -267
  135. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  136. package/dist/bigconsole/pages/WorkflowsPage.d.ts.map +1 -1
  137. package/dist/bigconsole/pages/WorkflowsPage.js +4 -3
  138. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  139. package/dist/bigconsole/types/index.d.ts +4 -0
  140. package/dist/bigconsole/types/index.d.ts.map +1 -1
  141. package/dist/generated/wspace-operations.d.ts +148 -0
  142. package/dist/generated/wspace-operations.d.ts.map +1 -1
  143. package/dist/generated/wspace-operations.js +172 -133
  144. package/dist/generated/wspace-operations.js.map +1 -1
  145. package/dist/generated/wspace-types.d.ts +21 -0
  146. package/dist/generated/wspace-types.d.ts.map +1 -1
  147. package/dist/generated/wspace-types.js.map +1 -1
  148. package/dist/microfe-bigconsole.css +1 -1
  149. package/dist/translations/en.d.ts.map +1 -1
  150. package/package.json +3 -3
@@ -1,25 +1,28 @@
1
- import e from "../../../hooks/useBigConsoleAnalytics.js";
2
- import t from "../../../hooks/useDashboardSharing.js";
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 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 ee } from "react-dom";
8
- import { formatDistanceToNow as l } from "date-fns";
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 u = (e) => ({
11
- bgPrimary: e ? "#1a1a2e" : "#ffffff",
12
- bgSecondary: e ? "#252542" : "#f4f4f5",
13
- bgTertiary: e ? "#2d2d4a" : "#e4e4e7",
14
- textPrimary: e ? "#f4f4f5" : "#18181b",
15
- textSecondary: e ? "#a1a1aa" : "#71717a",
16
- textTertiary: e ? "#71717a" : "#a1a1aa",
17
- borderDefault: e ? "#3f3f5c" : "#e4e4e7",
18
- actionPrimaryBg: "#6366f1",
19
- actionPrimaryBgHover: "#4f46e5",
20
- statusSuccessBg: "#22c55e",
21
- statusErrorText: "#ef4444"
22
- }), d = [
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
- ], f = [{
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 p({ dashboardId: l, dashboardName: p, isOpen: m, onClose: g, visibility: _, onVisibilityChange: v, canChangeVisibility: y = !0 }) {
48
- let { shares: b, loading: x, fetchShares: S, shareWithUser: C, shareWithGroup: w, updateShare: T, revokeShare: E, revokeAllShares: D } = t(), O = e(), [k, A] = o(""), [j, M] = o(null), [N, P] = o("VIEW"), [F, I] = o(""), [L, R] = o(!1), [z, B] = o("people"), [V, H] = o(!1), [U, W] = o(null);
49
- i(() => {
50
- m && l && (S(l), I(`${window.location.origin}/dashboard/${l}?shared=true`));
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
- l,
54
- S
87
+ e,
88
+ E,
89
+ Z,
90
+ X.workspaceId
55
91
  ]);
56
- let G = r(async () => {
57
- if (!j) return;
58
- O("bigconsole.dashboard.share_clicked", {
59
- dashboardId: l,
60
- permission: N,
61
- recipientType: j.type
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 e = null;
64
- j.type === "USER" ? e = await C(l, j.id, N) : j.type === "GROUP" && (e = await w(l, j.id, N)), e && O("bigconsole.dashboard.shared", {
65
- dashboardId: l,
66
- permission: N,
67
- recipientType: j.type
68
- }), M(null), A("");
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
- l,
110
+ X.workspaceId,
111
+ C,
112
+ T,
113
+ e,
114
+ M,
115
+ F,
116
+ L,
71
117
  O,
72
- j,
73
- N,
74
- w,
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
- }, [T]), q = r(async (e) => {
82
- window.confirm("Are you sure you want to revoke this access?") && await E(e);
83
- }, [E]), J = r(async () => {
84
- window.confirm("Are you sure you want to revoke all shared access?") && await D(l);
85
- }, [l, D]), Y = r(async (e) => {
86
- if (!(!v || e === _)) {
87
- W(null), H(!0);
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 v(e);
132
+ await b(e);
90
133
  } catch (e) {
91
- W(e instanceof Error ? e.message : "Could not update general access.");
134
+ q(e instanceof Error ? e.message : "Could not update general access.");
92
135
  } finally {
93
- H(!1);
136
+ G(!1);
94
137
  }
95
138
  }
96
- }, [v, _]), X = r(async () => {
139
+ }, [b, y]), ue = o(async () => {
97
140
  try {
98
- await navigator.clipboard.writeText(F), R(!0), setTimeout(() => R(!1), 2e3);
99
- } catch {}
100
- }, [F]), Z = k ? [
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
- ].filter((e) => e.name.toLowerCase().includes(k.toLowerCase()) || e.email?.toLowerCase().includes(k.toLowerCase())) : [], Q = typeof document < "u" && document.documentElement.classList.contains("dark"), $ = a(() => u(Q), [Q]);
124
- return m ? ee(/* @__PURE__ */ s("div", {
125
- style: {
126
- position: "fixed",
127
- top: 0,
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
- onClick: g,
140
- role: "presentation",
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: "85vh",
150
- display: "flex",
151
- flexDirection: "column",
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__ */ c("div", {
169
+ /* @__PURE__ */ p("div", {
163
170
  style: {
164
171
  flexShrink: 0,
165
172
  padding: "20px 24px",
166
- borderBottom: `1px solid ${$.borderDefault}`,
173
+ borderBottom: `1px solid ${h.borderDefault}`,
167
174
  display: "flex",
168
175
  alignItems: "center",
169
176
  justifyContent: "space-between",
170
- backgroundColor: $.bgPrimary
177
+ backgroundColor: h.bgPrimary
171
178
  },
172
- children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h2", {
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: $.textPrimary
184
+ color: h.textPrimary
179
185
  },
180
186
  children: "Share Dashboard"
181
- }), /* @__PURE__ */ s("p", {
187
+ }), /* @__PURE__ */ f(d, {
182
188
  style: {
183
189
  margin: "4px 0 0",
184
190
  fontSize: "13px",
185
- color: $.textSecondary
191
+ color: h.textSecondary
186
192
  },
187
- children: p
188
- })] }), /* @__PURE__ */ s("button", {
189
- onClick: g,
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: $.textSecondary,
203
+ color: h.textSecondary,
196
204
  padding: "4px",
197
205
  lineHeight: 1
198
206
  },
199
207
  children: "×"
200
208
  })]
201
209
  }),
202
- /* @__PURE__ */ s("div", {
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 ${$.borderDefault}`,
211
- backgroundColor: $.bgPrimary
218
+ borderBottom: `1px solid ${h.borderDefault}`,
219
+ backgroundColor: h.bgPrimary
212
220
  },
213
- children: ["people", "embed"].map((e) => /* @__PURE__ */ s("button", {
221
+ children: ["people", "embed"].map((e) => /* @__PURE__ */ f("button", {
214
222
  type: "button",
215
223
  role: "tab",
216
- "aria-selected": z === e,
217
- onClick: () => B(e),
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 ${z === e ? $.actionPrimaryBg : "transparent"}`,
223
- color: z === e ? $.textPrimary : $.textSecondary,
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
- z === "embed" && /* @__PURE__ */ s("div", {
239
+ H === "embed" && /* @__PURE__ */ f("div", {
232
240
  className: "min-h-0 flex-1 overflow-y-auto",
233
- style: { backgroundColor: $.bgPrimary },
234
- children: /* @__PURE__ */ s(n, {
235
- dashboardId: l,
236
- colors: $
241
+ style: { backgroundColor: h.bgPrimary },
242
+ children: /* @__PURE__ */ f(i, {
243
+ dashboardId: e,
244
+ colors: h
237
245
  })
238
246
  }),
239
- z === "people" && /* @__PURE__ */ c("div", {
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: $.bgPrimary },
249
+ style: { backgroundColor: h.bgPrimary },
242
250
  children: [
243
- _ && v && /* @__PURE__ */ c("section", {
251
+ y && b && /* @__PURE__ */ p("section", {
244
252
  "aria-labelledby": "share-visibility-heading",
245
253
  children: [
246
- /* @__PURE__ */ s("h3", {
254
+ /* @__PURE__ */ f("h3", {
247
255
  id: "share-visibility-heading",
248
256
  className: "mb-form-gap text-sm font-semibold",
249
- style: { color: $.textPrimary },
257
+ style: { color: h.textPrimary },
250
258
  children: "General access"
251
259
  }),
252
- /* @__PURE__ */ c("div", {
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__ */ s("select", {
267
+ children: [/* @__PURE__ */ f("select", {
260
268
  "aria-label": "General access",
261
269
  "data-testid": "share-visibility",
262
- value: _,
263
- disabled: !y || V,
264
- onChange: (e) => void Y(e.target.value),
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 ${$.borderDefault}`,
275
+ border: `1px solid ${h.borderDefault}`,
268
276
  borderRadius: "6px",
269
277
  fontSize: "13px",
270
- backgroundColor: $.bgPrimary,
271
- color: $.textPrimary,
272
- cursor: !y || V ? "not-allowed" : "pointer",
273
- opacity: !y || V ? .6 : 1
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: d.map((e) => /* @__PURE__ */ s("option", {
283
+ children: g.map((e) => /* @__PURE__ */ f("option", {
276
284
  value: e.value,
277
285
  children: e.label
278
286
  }, e.value))
279
- }), /* @__PURE__ */ s("span", {
287
+ }), /* @__PURE__ */ f("span", {
280
288
  style: {
281
289
  fontSize: "12px",
282
- color: $.textSecondary
290
+ color: h.textSecondary
283
291
  },
284
- children: d.find((e) => e.value === _)?.description
292
+ children: g.find((e) => e.value === y)?.description
285
293
  })]
286
294
  }),
287
- !y && /* @__PURE__ */ s("p", {
295
+ !x && /* @__PURE__ */ f("p", {
288
296
  style: {
289
297
  margin: "6px 0 0",
290
298
  fontSize: "11px",
291
- color: $.textSecondary
299
+ color: h.textSecondary
292
300
  },
293
301
  children: "You don't have permission to change general access."
294
302
  }),
295
- U && /* @__PURE__ */ s("p", {
303
+ K && /* @__PURE__ */ f("p", {
296
304
  style: {
297
305
  margin: "6px 0 0",
298
306
  fontSize: "11px",
299
- color: $.statusErrorText
307
+ color: h.statusErrorText
300
308
  },
301
- children: U
309
+ children: K
302
310
  })
303
311
  ]
304
312
  }),
305
- /* @__PURE__ */ c("section", {
313
+ /* @__PURE__ */ p("section", {
306
314
  "aria-labelledby": "share-link-heading",
307
- children: [/* @__PURE__ */ s("h3", {
315
+ children: [/* @__PURE__ */ f("h3", {
308
316
  id: "share-link-heading",
309
317
  className: "mb-form-gap text-sm font-semibold",
310
- style: { color: $.textPrimary },
318
+ style: { color: h.textPrimary },
311
319
  children: "Share link"
312
- }), /* @__PURE__ */ c("div", {
320
+ }), /* @__PURE__ */ p("div", {
313
321
  style: {
314
322
  display: "flex",
315
323
  gap: "8px",
316
324
  flexWrap: "wrap"
317
325
  },
318
- children: [/* @__PURE__ */ s("input", {
326
+ children: [/* @__PURE__ */ f("input", {
319
327
  type: "text",
320
- value: F,
328
+ value: z,
321
329
  readOnly: !0,
322
330
  style: {
323
331
  flex: 1,
324
332
  padding: "10px 12px",
325
- border: `1px solid ${$.borderDefault}`,
333
+ border: `1px solid ${h.borderDefault}`,
326
334
  borderRadius: "6px",
327
335
  fontSize: "13px",
328
- backgroundColor: $.bgSecondary,
329
- color: $.textPrimary
336
+ backgroundColor: h.bgSecondary,
337
+ color: h.textPrimary
330
338
  }
331
- }), /* @__PURE__ */ s("button", {
332
- onClick: X,
339
+ }), /* @__PURE__ */ f("button", {
340
+ onClick: ue,
333
341
  style: {
334
342
  padding: "10px 16px",
335
- backgroundColor: L ? $.statusSuccessBg : $.actionPrimaryBg,
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: L ? "Copied!" : "Copy"
352
+ children: B ? "Copied!" : "Copy"
345
353
  })]
346
354
  })]
347
355
  }),
348
- /* @__PURE__ */ c("section", {
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: [/* @__PURE__ */ s("h3", {
351
- id: "share-invite-heading",
352
- className: "mb-form-gap text-sm font-semibold",
353
- style: { color: $.textPrimary },
354
- children: "Invite people"
355
- }), /* @__PURE__ */ c("div", {
356
- style: {
357
- display: "flex",
358
- gap: "8px",
359
- marginBottom: "8px",
360
- flexWrap: "wrap"
361
- },
362
- children: [
363
- /* @__PURE__ */ c("div", {
364
- style: {
365
- flex: 1,
366
- position: "relative"
367
- },
368
- children: [/* @__PURE__ */ s("input", {
369
- type: "text",
370
- value: j ? j.name : k,
371
- onChange: (e) => {
372
- A(e.target.value), M(null);
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
- placeholder: "Search by name or email...",
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 ${$.borderDefault}`,
493
+ border: `1px solid ${h.borderDefault}`,
379
494
  borderRadius: "6px",
380
495
  fontSize: "13px",
381
- backgroundColor: $.bgPrimary,
382
- color: $.textPrimary
383
- }
384
- }), k && !j && Z.length > 0 && /* @__PURE__ */ s("div", {
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
- position: "absolute",
387
- top: "100%",
388
- left: 0,
389
- right: 0,
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
- boxShadow: "var(--shadow-elevation-3)",
395
- zIndex: 100001,
396
- maxHeight: "200px",
397
- overflowY: "auto"
513
+ cursor: F ? "pointer" : "not-allowed",
514
+ fontSize: "13px",
515
+ fontWeight: 500
398
516
  },
399
- children: Z.map((e) => /* @__PURE__ */ c("button", {
400
- onClick: () => M(e),
401
- style: {
402
- display: "block",
403
- width: "100%",
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__ */ c("section", {
523
+ /* @__PURE__ */ p("section", {
474
524
  "aria-labelledby": "share-access-heading",
475
- children: [/* @__PURE__ */ c("div", {
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__ */ c("h3", {
534
+ children: [/* @__PURE__ */ p("h3", {
485
535
  id: "share-access-heading",
486
536
  className: "text-sm font-semibold",
487
- style: { color: $.textPrimary },
537
+ style: { color: h.textPrimary },
488
538
  children: [
489
539
  "People with access (",
490
- b.length,
540
+ w.length,
491
541
  ")"
492
542
  ]
493
- }), b.length > 0 && /* @__PURE__ */ s("button", {
494
- onClick: J,
543
+ }), w.length > 0 && /* @__PURE__ */ f("button", {
544
+ onClick: ce,
495
545
  style: {
496
546
  padding: "4px 8px",
497
547
  backgroundColor: "transparent",
498
- color: $.statusErrorText,
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
- }), x && b.length === 0 ? /* @__PURE__ */ s("p", {
555
+ }), T && w.length === 0 ? /* @__PURE__ */ f("p", {
506
556
  style: {
507
- color: $.textSecondary,
557
+ color: h.textSecondary,
508
558
  fontSize: "13px"
509
559
  },
510
560
  children: "Loading..."
511
- }) : b.length === 0 ? /* @__PURE__ */ s("p", {
561
+ }) : w.length === 0 ? /* @__PURE__ */ f("p", {
512
562
  style: {
513
- color: $.textSecondary,
563
+ color: h.textSecondary,
514
564
  fontSize: "13px"
515
565
  },
516
566
  children: "No one has access to this dashboard yet."
517
- }) : /* @__PURE__ */ s("div", {
567
+ }) : /* @__PURE__ */ f("div", {
518
568
  style: {
519
569
  display: "flex",
520
570
  flexDirection: "column",
521
571
  gap: "8px"
522
572
  },
523
- children: b.map((e) => /* @__PURE__ */ s(h, {
573
+ children: w.map((e) => /* @__PURE__ */ f(re, {
524
574
  share: e,
525
- onUpdatePermission: K,
526
- onRevoke: q,
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
- }), document.body) : null;
585
+ }) : null;
536
586
  }
537
- function m(e) {
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 ${l(t, { addSuffix: !0 })}`,
597
+ label: `Expired ${m(t, { addSuffix: !0 })}`,
548
598
  expired: !0
549
599
  } : {
550
- label: `Expires ${l(t, { addSuffix: !0 })}`,
600
+ label: `Expires ${m(t, { addSuffix: !0 })}`,
551
601
  expired: !1
552
602
  };
553
603
  }
554
- function h({ share: e, onUpdatePermission: t, onRevoke: n, colors: r }) {
555
- let i = m(e.expiresAt);
556
- return /* @__PURE__ */ c("div", {
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__ */ c("div", {
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__ */ s("div", {
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__ */ c("div", { children: [/* @__PURE__ */ s("div", {
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__ */ c("div", {
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__ */ c("div", {
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__ */ s("span", {
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__ */ s("select", {
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: f.map((e) => /* @__PURE__ */ s("option", {
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__ */ s("button", {
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 { p as default };
709
+ export { v as default };
660
710
 
661
711
  //# sourceMappingURL=ShareDialog.js.map