@ai-matrx/sharing 0.1.3 → 0.1.5
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/CHANGELOG.md +35 -3
- package/README.md +3 -3
- package/dist/access-react-cant-remove-dialog.cjs +2 -2
- package/dist/access-react-cant-remove-dialog.cjs.map +1 -1
- package/dist/access-react-cant-remove-dialog.d.cts +2 -2
- package/dist/access-react-cant-remove-dialog.d.ts +2 -2
- package/dist/access-react-cant-remove-dialog.js +2 -2
- package/dist/access-react-cant-remove-dialog.js.map +1 -1
- package/dist/access-react.cjs +111 -135
- package/dist/access-react.cjs.map +1 -1
- package/dist/access-react.js +28 -52
- package/dist/access-react.js.map +1 -1
- package/dist/core.cjs +5 -177
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +5 -167
- package/dist/core.js.map +1 -1
- package/dist/react.cjs +259 -258
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +131 -130
- package/dist/react.js.map +1 -1
- package/package.json +5 -5
package/dist/react.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
// src/react/sheet/host.tsx
|
|
4
4
|
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "@ai-matrx/design-system";
|
|
6
|
+
import { Button } from "@ai-matrx/design-system/controls";
|
|
6
7
|
import { copyText } from "@ai-matrx/kit/clipboard";
|
|
7
8
|
import { confirm as kitConfirm } from "@ai-matrx/kit/confirm-opener";
|
|
8
9
|
import { readOrganizationMemberRows } from "@ai-matrx/sharing/core";
|
|
@@ -22,8 +23,7 @@ function DefaultCopyButtons(props) {
|
|
|
22
23
|
Button,
|
|
23
24
|
{
|
|
24
25
|
type: "button",
|
|
25
|
-
variant: "
|
|
26
|
-
size: "sm",
|
|
26
|
+
variant: "quiet",
|
|
27
27
|
className: props.className,
|
|
28
28
|
onClick: () => {
|
|
29
29
|
void copyText(text()).then(() => {
|
|
@@ -35,8 +35,26 @@ function DefaultCopyButtons(props) {
|
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
+
var announced = /* @__PURE__ */ new Set();
|
|
39
|
+
function announceStandIn(port) {
|
|
40
|
+
if (announced.has(port)) return;
|
|
41
|
+
announced.add(port);
|
|
42
|
+
console.warn(
|
|
43
|
+
`[share] The share sheet is using its built-in stand-in for "${port}": the host did not pass it, so that part of the sheet is absent. Pass it with configureShareSheetUi({ ${port} }).`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function StandIn({ port }) {
|
|
47
|
+
useEffect(() => announceStandIn(port), [port]);
|
|
48
|
+
return /* @__PURE__ */ jsx("span", { hidden: true, "data-share-sheet-host": "unconfigured", "data-share-sheet-port": port });
|
|
49
|
+
}
|
|
38
50
|
function DefaultErrorMenu(_props) {
|
|
39
|
-
return
|
|
51
|
+
return /* @__PURE__ */ jsx(StandIn, { port: "ErrorAlchemyMenu" });
|
|
52
|
+
}
|
|
53
|
+
function DefaultPageCaptureButton(_props) {
|
|
54
|
+
return /* @__PURE__ */ jsx(StandIn, { port: "PageCaptureButton" });
|
|
55
|
+
}
|
|
56
|
+
function DefaultEntityDoorControls(_props) {
|
|
57
|
+
return /* @__PURE__ */ jsx(StandIn, { port: "EntityDoorControls" });
|
|
40
58
|
}
|
|
41
59
|
function DefaultInfoHint(props) {
|
|
42
60
|
return /* @__PURE__ */ jsx("span", { title: String(props.text ?? ""), "aria-label": String(props.label ?? "More info"), className: "cursor-help text-muted-foreground", children: "\u24D8" });
|
|
@@ -146,14 +164,23 @@ var DEFAULTS = {
|
|
|
146
164
|
useUserConnections: useDefaultConnections,
|
|
147
165
|
confirm: (o) => kitConfirm(o),
|
|
148
166
|
CopyButtons: DefaultCopyButtons,
|
|
149
|
-
csvExportItem: () =>
|
|
150
|
-
|
|
151
|
-
|
|
167
|
+
csvExportItem: () => {
|
|
168
|
+
announceStandIn("csvExportItem");
|
|
169
|
+
return null;
|
|
170
|
+
},
|
|
171
|
+
jsonExportItem: () => {
|
|
172
|
+
announceStandIn("jsonExportItem");
|
|
173
|
+
return null;
|
|
174
|
+
},
|
|
175
|
+
usePageCapture: () => {
|
|
176
|
+
announceStandIn("usePageCapture");
|
|
177
|
+
return void 0;
|
|
178
|
+
},
|
|
152
179
|
dialogCapture: (input) => input,
|
|
153
|
-
PageCaptureButton:
|
|
180
|
+
PageCaptureButton: DefaultPageCaptureButton,
|
|
154
181
|
ErrorAlchemyMenu: DefaultErrorMenu,
|
|
155
182
|
InfoHint: DefaultInfoHint,
|
|
156
|
-
EntityDoorControls:
|
|
183
|
+
EntityDoorControls: DefaultEntityDoorControls,
|
|
157
184
|
EntityRef: DefaultEntityRef,
|
|
158
185
|
UserAvatarDisplay: DefaultUserAvatar,
|
|
159
186
|
ConnectionsReadNotice: DefaultConnectionsNotice,
|
|
@@ -172,7 +199,7 @@ function shareSheetUi() {
|
|
|
172
199
|
function useToast() {
|
|
173
200
|
return { toast: (o) => ui.toast(o) };
|
|
174
201
|
}
|
|
175
|
-
function
|
|
202
|
+
function shareCopyNotify(message, kind) {
|
|
176
203
|
ui.toast({ title: message, ...kind === "error" ? { variant: "destructive" } : {} });
|
|
177
204
|
}
|
|
178
205
|
var confirm = (options) => ui.confirm(options);
|
|
@@ -186,10 +213,10 @@ var csvExportItem = (...args) => ui.csvExportItem(...args);
|
|
|
186
213
|
var jsonExportItem = (...args) => ui.jsonExportItem(...args);
|
|
187
214
|
var CopyButtons = (p) => /* @__PURE__ */ jsx(ui.CopyButtons, { ...p });
|
|
188
215
|
var PageCaptureButton = (p) => /* @__PURE__ */ jsx(ui.PageCaptureButton, { ...p });
|
|
189
|
-
var
|
|
216
|
+
var ShareErrorAlchemyMenu = (p) => /* @__PURE__ */ jsx(ui.ErrorAlchemyMenu, { ...p });
|
|
190
217
|
var InfoHint = (p) => /* @__PURE__ */ jsx(ui.InfoHint, { ...p });
|
|
191
|
-
var
|
|
192
|
-
var
|
|
218
|
+
var ShareEntityDoorControls = (p) => /* @__PURE__ */ jsx(ui.EntityDoorControls, { ...p });
|
|
219
|
+
var ShareEntityRef = (p) => /* @__PURE__ */ jsx(ui.EntityRef, { ...p });
|
|
193
220
|
var UserAvatarDisplay = (p) => /* @__PURE__ */ jsx(ui.UserAvatarDisplay, { ...p });
|
|
194
221
|
var ConnectionsReadNotice = (p) => /* @__PURE__ */ jsx(ui.ConnectionsReadNotice, { ...p });
|
|
195
222
|
var UserSearchField = (p) => /* @__PURE__ */ jsx(ui.UserSearchField, { ...p });
|
|
@@ -197,6 +224,7 @@ var defaultIdentity = null;
|
|
|
197
224
|
var usePortalContainer = () => ui.usePortalContainer();
|
|
198
225
|
var vaultIdentity = () => {
|
|
199
226
|
if (ui.vaultIdentity) return ui.vaultIdentity;
|
|
227
|
+
announceStandIn("vaultIdentity");
|
|
200
228
|
if (!defaultIdentity) {
|
|
201
229
|
defaultIdentity = createSupabaseIdentity(shareClientForIdentity().auth, {
|
|
202
230
|
redirectTo: () => window.location.href,
|
|
@@ -347,7 +375,7 @@ var ShareTabsTrigger = React.forwardRef(
|
|
|
347
375
|
ShareTabsTrigger.displayName = "ShareTabsTrigger";
|
|
348
376
|
|
|
349
377
|
// src/react/sheet/ShareModal.tsx
|
|
350
|
-
import { Button as Button10 } from "@ai-matrx/design-system";
|
|
378
|
+
import { Button as Button10 } from "@ai-matrx/design-system/controls";
|
|
351
379
|
import {
|
|
352
380
|
Users as Users5,
|
|
353
381
|
Globe as Globe5,
|
|
@@ -851,7 +879,7 @@ import { AlertTriangle as AlertTriangle4, Lock as Lock3 } from "lucide-react";
|
|
|
851
879
|
|
|
852
880
|
// src/react/sheet/PermissionsList.tsx
|
|
853
881
|
import { useState as useState4 } from "react";
|
|
854
|
-
import { Button as Button2 } from "@ai-matrx/design-system";
|
|
882
|
+
import { Button as Button2 } from "@ai-matrx/design-system/controls";
|
|
855
883
|
import { Card } from "@ai-matrx/design-system";
|
|
856
884
|
import { cn } from "@ai-matrx/design-system/cn";
|
|
857
885
|
import { Select, SelectContent, SelectItem, SelectValue } from "@ai-matrx/design-system";
|
|
@@ -1220,7 +1248,7 @@ function PermissionsList({
|
|
|
1220
1248
|
/* @__PURE__ */ jsx4("p", { className: "text-sm font-semibold truncate leading-none", children: getPermissionLabel(permission) }),
|
|
1221
1249
|
permission.grantedToUser?.isGuest && !permission.isPublic ? /* @__PURE__ */ jsx4(GuestBadge, {}) : null,
|
|
1222
1250
|
permission.grantedToOrganization && /* @__PURE__ */ jsx4(
|
|
1223
|
-
|
|
1251
|
+
ShareEntityDoorControls,
|
|
1224
1252
|
{
|
|
1225
1253
|
token: "organization",
|
|
1226
1254
|
id: permission.grantedToOrganization.id,
|
|
@@ -1288,14 +1316,12 @@ function PermissionsList({
|
|
|
1288
1316
|
/* @__PURE__ */ jsx4(
|
|
1289
1317
|
Button2,
|
|
1290
1318
|
{
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
className: "h-7 w-7",
|
|
1319
|
+
icon: isRevoking ? /* @__PURE__ */ jsx4(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx4(X, {}),
|
|
1320
|
+
variant: "quiet",
|
|
1294
1321
|
"aria-label": `Revoke access for ${getPermissionLabel(permission)}`,
|
|
1295
1322
|
title: `Revoke access for ${getPermissionLabel(permission)}`,
|
|
1296
1323
|
onClick: () => setConfirmRevoke({ open: true, permission }),
|
|
1297
|
-
disabled: isUpdating || isRevoking
|
|
1298
|
-
children: isRevoking ? /* @__PURE__ */ jsx4(Loader2, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx4(X, { className: "w-3 h-3" })
|
|
1324
|
+
disabled: isUpdating || isRevoking
|
|
1299
1325
|
}
|
|
1300
1326
|
)
|
|
1301
1327
|
] }) : /* @__PURE__ */ jsx4(Fragment, { children: permission.isPublic ? /* @__PURE__ */ jsx4(PublicBadge, { variant: "compact" }) : /* @__PURE__ */ jsx4(
|
|
@@ -1517,7 +1543,7 @@ function AccessSummaryPanel({
|
|
|
1517
1543
|
children: "Retry"
|
|
1518
1544
|
}
|
|
1519
1545
|
),
|
|
1520
|
-
/* @__PURE__ */ jsx5(
|
|
1546
|
+
/* @__PURE__ */ jsx5(ShareErrorAlchemyMenu, { error })
|
|
1521
1547
|
]
|
|
1522
1548
|
}
|
|
1523
1549
|
);
|
|
@@ -1632,7 +1658,7 @@ function ReasonRow({
|
|
|
1632
1658
|
|
|
1633
1659
|
// src/react/sheet/ShareWithUserTab.tsx
|
|
1634
1660
|
import { useState as useState6, useMemo as useMemo2, useEffect as useEffect6 } from "react";
|
|
1635
|
-
import { Button as Button4 } from "@ai-matrx/design-system";
|
|
1661
|
+
import { Button as Button4 } from "@ai-matrx/design-system/controls";
|
|
1636
1662
|
import { Label as Label2 } from "@ai-matrx/design-system";
|
|
1637
1663
|
import { Select as Select3, SelectContent as SelectContent3, SelectItem as SelectItem3, SelectValue as SelectValue3 } from "@ai-matrx/design-system";
|
|
1638
1664
|
import { SelectTrigger as SelectTrigger3 } from "@ai-matrx/design-system/controls";
|
|
@@ -1671,7 +1697,7 @@ import { readOrganizationMemberRows as readOrganizationMemberRows2 } from "@ai-m
|
|
|
1671
1697
|
import { listTeamMembers, listTeams } from "@ai-matrx/sharing/core";
|
|
1672
1698
|
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
1673
1699
|
import { Building2 as Building22, CheckCircle, Loader2 as Loader23, Users as Users3, XCircle } from "lucide-react";
|
|
1674
|
-
import { Button as Button3 } from "@ai-matrx/design-system";
|
|
1700
|
+
import { Button as Button3 } from "@ai-matrx/design-system/controls";
|
|
1675
1701
|
import { Checkbox } from "@ai-matrx/design-system";
|
|
1676
1702
|
import { Label } from "@ai-matrx/design-system";
|
|
1677
1703
|
import { Select as Select2, SelectContent as SelectContent2, SelectItem as SelectItem2, SelectValue as SelectValue2 } from "@ai-matrx/design-system";
|
|
@@ -1791,21 +1817,19 @@ function AddEveryoneInOrg({
|
|
|
1791
1817
|
};
|
|
1792
1818
|
if (orgs.length === 0) return null;
|
|
1793
1819
|
if (!open) {
|
|
1794
|
-
return /* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsx6(
|
|
1795
1821
|
Button3,
|
|
1796
1822
|
{
|
|
1823
|
+
icon: /* @__PURE__ */ jsx6(Users3, {}),
|
|
1797
1824
|
type: "button",
|
|
1798
1825
|
variant: "outline",
|
|
1799
|
-
className: "w-full
|
|
1826
|
+
className: "w-full",
|
|
1800
1827
|
onClick: () => {
|
|
1801
1828
|
if (!orgId && defaultOrgId && orgs.some((o) => o.id === defaultOrgId))
|
|
1802
1829
|
setOrgId(defaultOrgId);
|
|
1803
1830
|
setOpen(true);
|
|
1804
1831
|
},
|
|
1805
|
-
children:
|
|
1806
|
-
/* @__PURE__ */ jsx6(Users3, { className: "w-4 h-4 mr-2" }),
|
|
1807
|
-
"Add everyone in an organization or team"
|
|
1808
|
-
]
|
|
1832
|
+
children: "Add everyone in an organization or team"
|
|
1809
1833
|
}
|
|
1810
1834
|
);
|
|
1811
1835
|
}
|
|
@@ -1872,14 +1896,14 @@ function AddEveryoneInOrg({
|
|
|
1872
1896
|
orgLabel,
|
|
1873
1897
|
" could not be listed: ",
|
|
1874
1898
|
teamsError,
|
|
1875
|
-
/* @__PURE__ */ jsx6(
|
|
1899
|
+
/* @__PURE__ */ jsx6(ShareErrorAlchemyMenu, { error: teamsError })
|
|
1876
1900
|
] }) : null,
|
|
1877
1901
|
orgId && loadError ? /* @__PURE__ */ jsxs5("p", { className: "type-secondary text-destructive", children: [
|
|
1878
1902
|
"The people in ",
|
|
1879
1903
|
orgName,
|
|
1880
1904
|
" could not be listed: ",
|
|
1881
1905
|
loadError,
|
|
1882
|
-
/* @__PURE__ */ jsx6(
|
|
1906
|
+
/* @__PURE__ */ jsx6(ShareErrorAlchemyMenu, { error: loadError })
|
|
1883
1907
|
] }) : null,
|
|
1884
1908
|
orgId && !loadError && members === null ? /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 type-secondary text-muted-foreground", children: [
|
|
1885
1909
|
/* @__PURE__ */ jsx6(Loader23, { className: "w-3 h-3 animate-spin" }),
|
|
@@ -1943,10 +1967,11 @@ function AddEveryoneInOrg({
|
|
|
1943
1967
|
members && members.length > 0 && (chosen.length > 0 || running) ? /* @__PURE__ */ jsx6(
|
|
1944
1968
|
Button3,
|
|
1945
1969
|
{
|
|
1970
|
+
variant: "primary",
|
|
1946
1971
|
type: "button",
|
|
1947
1972
|
onClick: run,
|
|
1948
1973
|
disabled: running || chosen.length === 0,
|
|
1949
|
-
className: "w-full
|
|
1974
|
+
className: "w-full",
|
|
1950
1975
|
children: running ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
1951
1976
|
/* @__PURE__ */ jsx6(Loader23, { className: "w-4 h-4 mr-2 animate-spin" }),
|
|
1952
1977
|
"Sharing\u2026"
|
|
@@ -2390,9 +2415,10 @@ function ShareWithUserTab({
|
|
|
2390
2415
|
/* @__PURE__ */ jsx7(
|
|
2391
2416
|
Button4,
|
|
2392
2417
|
{
|
|
2418
|
+
variant: "primary",
|
|
2393
2419
|
onClick: handleShare,
|
|
2394
2420
|
disabled: isLoading || !email.trim() || chosenWhy !== null,
|
|
2395
|
-
className: "w-full
|
|
2421
|
+
className: "w-full",
|
|
2396
2422
|
children: isLoading ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
2397
2423
|
/* @__PURE__ */ jsx7(Loader24, { className: "w-4 h-4 mr-2 animate-spin" }),
|
|
2398
2424
|
status.message || "Processing..."
|
|
@@ -2430,7 +2456,7 @@ import {
|
|
|
2430
2456
|
Send,
|
|
2431
2457
|
Trash2
|
|
2432
2458
|
} from "lucide-react";
|
|
2433
|
-
import { Button as Button5 } from "@ai-matrx/design-system";
|
|
2459
|
+
import { Button as Button5 } from "@ai-matrx/design-system/controls";
|
|
2434
2460
|
import { Input as Input2 } from "@ai-matrx/design-system/controls";
|
|
2435
2461
|
import { Label as Label3 } from "@ai-matrx/design-system";
|
|
2436
2462
|
import { Select as Select4, SelectContent as SelectContent4, SelectItem as SelectItem4, SelectValue as SelectValue4 } from "@ai-matrx/design-system";
|
|
@@ -2516,13 +2542,13 @@ function OutsideSharePanel({
|
|
|
2516
2542
|
/* @__PURE__ */ jsxs7("p", { className: "text-sm font-medium text-destructive", children: [
|
|
2517
2543
|
"We could not check who outside this organization can see ",
|
|
2518
2544
|
tableName,
|
|
2519
|
-
/* @__PURE__ */ jsx8(
|
|
2545
|
+
/* @__PURE__ */ jsx8(ShareErrorAlchemyMenu, {})
|
|
2520
2546
|
] }),
|
|
2521
2547
|
/* @__PURE__ */ jsx8("p", { className: "mt-0.5 text-xs text-destructive/80", children: "Nobody was added or removed. This does not mean sharing outside is switched off \u2014 we simply could not look." }),
|
|
2522
2548
|
/* @__PURE__ */ jsx8("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: loadError })
|
|
2523
2549
|
] })
|
|
2524
2550
|
] }),
|
|
2525
|
-
/* @__PURE__ */ jsx8(Button5, {
|
|
2551
|
+
/* @__PURE__ */ jsx8(Button5, { variant: "outline", className: "mt-2", onClick: () => void refresh(), children: "Try again" })
|
|
2526
2552
|
] });
|
|
2527
2553
|
}
|
|
2528
2554
|
if (!state2) {
|
|
@@ -2568,10 +2594,11 @@ function OutsideSharePanel({
|
|
|
2568
2594
|
/* @__PURE__ */ jsx8(SelectContent4, { children: state2.levels.map((l) => /* @__PURE__ */ jsx8(SelectItem4, { value: l.level, children: l.means }, l.level)) })
|
|
2569
2595
|
] })
|
|
2570
2596
|
] }),
|
|
2571
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ jsx8(
|
|
2572
2598
|
Button5,
|
|
2573
2599
|
{
|
|
2574
|
-
|
|
2600
|
+
icon: busy === "invite" ? /* @__PURE__ */ jsx8(Loader25, { className: "animate-spin" }) : /* @__PURE__ */ jsx8(Send, {}),
|
|
2601
|
+
variant: "primary",
|
|
2575
2602
|
disabled: !email.trim() || busy === "invite",
|
|
2576
2603
|
onClick: () => void run("invite", async () => {
|
|
2577
2604
|
const answer = await shareWithOutsidePerson(organizationId, tableId, email.trim(), level);
|
|
@@ -2579,10 +2606,7 @@ function OutsideSharePanel({
|
|
|
2579
2606
|
if (answer.granted) onGranted?.();
|
|
2580
2607
|
return answer;
|
|
2581
2608
|
}),
|
|
2582
|
-
children:
|
|
2583
|
-
busy === "invite" ? /* @__PURE__ */ jsx8(Loader25, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx8(Send, { className: "mr-1.5 h-4 w-4" }),
|
|
2584
|
-
"Share"
|
|
2585
|
-
]
|
|
2609
|
+
children: "Share"
|
|
2586
2610
|
}
|
|
2587
2611
|
)
|
|
2588
2612
|
] }) : null,
|
|
@@ -2601,42 +2625,40 @@ function OutsideSharePanel({
|
|
|
2601
2625
|
/* @__PURE__ */ jsx8("p", { className: "mt-0.5 text-xs text-muted-foreground", children: row.say })
|
|
2602
2626
|
] }),
|
|
2603
2627
|
state2.may_invite ? /* @__PURE__ */ jsxs7("div", { className: "flex flex-shrink-0 gap-1", children: [
|
|
2604
|
-
row.accept_path ? /* @__PURE__ */
|
|
2628
|
+
row.accept_path ? /* @__PURE__ */ jsx8(
|
|
2605
2629
|
Button5,
|
|
2606
2630
|
{
|
|
2607
|
-
|
|
2608
|
-
variant: "
|
|
2631
|
+
icon: copied === row.invitation_id ? /* @__PURE__ */ jsx8(Check, {}) : /* @__PURE__ */ jsx8(Link2, {}),
|
|
2632
|
+
variant: "quiet",
|
|
2609
2633
|
title: "Copy invitation link",
|
|
2610
2634
|
onClick: () => void copyLink(
|
|
2611
2635
|
row.invitation_id,
|
|
2612
2636
|
row.accept_path,
|
|
2613
2637
|
row.email
|
|
2614
2638
|
),
|
|
2615
|
-
children:
|
|
2616
|
-
copied === row.invitation_id ? /* @__PURE__ */ jsx8(Check, { className: "mr-1.5 h-4 w-4" }) : /* @__PURE__ */ jsx8(Link2, { className: "mr-1.5 h-4 w-4" }),
|
|
2617
|
-
/* @__PURE__ */ jsx8("span", { className: "text-xs", children: copied === row.invitation_id ? "Copied" : "Copy link" })
|
|
2618
|
-
]
|
|
2639
|
+
children: /* @__PURE__ */ jsx8("span", { className: "text-xs", children: copied === row.invitation_id ? "Copied" : "Copy link" })
|
|
2619
2640
|
}
|
|
2620
2641
|
) : null,
|
|
2621
2642
|
!row.joined ? /* @__PURE__ */ jsx8(
|
|
2622
2643
|
Button5,
|
|
2623
2644
|
{
|
|
2624
|
-
|
|
2625
|
-
|
|
2645
|
+
icon: busy === `resend:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "animate-spin" }) : /* @__PURE__ */ jsx8(RotateCw, {}),
|
|
2646
|
+
"aria-label": "Send a fresh link",
|
|
2647
|
+
variant: "quiet",
|
|
2626
2648
|
title: "Send a fresh link",
|
|
2627
2649
|
disabled: busy === `resend:${row.invitation_id}`,
|
|
2628
2650
|
onClick: () => void run(
|
|
2629
2651
|
`resend:${row.invitation_id}`,
|
|
2630
2652
|
() => resendOutside(organizationId, row.invitation_id)
|
|
2631
|
-
)
|
|
2632
|
-
children: busy === `resend:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx8(RotateCw, { className: "h-4 w-4" })
|
|
2653
|
+
)
|
|
2633
2654
|
}
|
|
2634
2655
|
) : null,
|
|
2635
2656
|
/* @__PURE__ */ jsx8(
|
|
2636
2657
|
Button5,
|
|
2637
2658
|
{
|
|
2638
|
-
|
|
2639
|
-
|
|
2659
|
+
icon: busy === `revoke:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "animate-spin" }) : /* @__PURE__ */ jsx8(Trash2, {}),
|
|
2660
|
+
"aria-label": row.joined ? "Take their access away" : "Withdraw the invitation",
|
|
2661
|
+
variant: "quiet",
|
|
2640
2662
|
title: row.joined ? "Take their access away" : "Withdraw the invitation",
|
|
2641
2663
|
disabled: busy === `revoke:${row.invitation_id}`,
|
|
2642
2664
|
onClick: () => void (async () => {
|
|
@@ -2651,8 +2673,7 @@ function OutsideSharePanel({
|
|
|
2651
2673
|
`revoke:${row.invitation_id}`,
|
|
2652
2674
|
() => revokeOutside(organizationId, row.invitation_id)
|
|
2653
2675
|
);
|
|
2654
|
-
})()
|
|
2655
|
-
children: busy === `revoke:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx8(Trash2, { className: "h-4 w-4" })
|
|
2676
|
+
})()
|
|
2656
2677
|
}
|
|
2657
2678
|
)
|
|
2658
2679
|
] }) : null
|
|
@@ -2666,7 +2687,7 @@ import { shareWithOutsidePerson as shareWithOutsidePerson2 } from "@ai-matrx/sha
|
|
|
2666
2687
|
// src/react/sheet/WhoCouldSeeOn.tsx
|
|
2667
2688
|
import { useState as useState8 } from "react";
|
|
2668
2689
|
import { History, Loader2 as Loader26 } from "lucide-react";
|
|
2669
|
-
import { Button as Button6 } from "@ai-matrx/design-system";
|
|
2690
|
+
import { Button as Button6 } from "@ai-matrx/design-system/controls";
|
|
2670
2691
|
import { DateTimeField } from "@ai-matrx/design-system/controls";
|
|
2671
2692
|
import { createClient as createClient3, PERMISSION_LEVEL_SHORT_LABELS as PERMISSION_LEVEL_SHORT_LABELS4 } from "@ai-matrx/sharing/core";
|
|
2672
2693
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
@@ -2706,10 +2727,7 @@ function WhoCouldSeeOn({ recordId }) {
|
|
|
2706
2727
|
className: "min-w-0 flex-1"
|
|
2707
2728
|
}
|
|
2708
2729
|
),
|
|
2709
|
-
/* @__PURE__ */
|
|
2710
|
-
busy ? /* @__PURE__ */ jsx9(Loader26, { className: "mr-1 h-3.5 w-3.5 animate-spin" }) : null,
|
|
2711
|
-
"Ask"
|
|
2712
|
-
] })
|
|
2730
|
+
/* @__PURE__ */ jsx9(Button6, { icon: busy ? /* @__PURE__ */ jsx9(Loader26, { className: "animate-spin" }) : null, variant: "outline", disabled: busy || at === "", onClick: () => void ask(), "data-who-could-see-ask": "", children: "Ask" })
|
|
2713
2731
|
] }),
|
|
2714
2732
|
people ? people.length === 0 ? /* @__PURE__ */ jsx9("p", { className: "text-xs text-muted-foreground", children: "Nobody could see it then." }) : /* @__PURE__ */ jsx9("ul", { className: "flex flex-col gap-0.5", "data-who-could-see-list": "", children: people.map((p) => /* @__PURE__ */ jsxs8("li", { className: "flex items-center justify-between gap-2 text-xs", "data-who-could-see-person": p.id ?? "", children: [
|
|
2715
2733
|
/* @__PURE__ */ jsxs8("span", { className: "min-w-0 truncate", children: [
|
|
@@ -2806,7 +2824,7 @@ var SwitchLegacy = React6.forwardRef(({ size = "sm", ...props }, ref) => /* @__P
|
|
|
2806
2824
|
SwitchLegacy.displayName = "SwitchLegacy";
|
|
2807
2825
|
|
|
2808
2826
|
// src/react/sheet/RowControls.tsx
|
|
2809
|
-
import { Button as Button8 } from "@ai-matrx/design-system";
|
|
2827
|
+
import { Button as Button8 } from "@ai-matrx/design-system/controls";
|
|
2810
2828
|
|
|
2811
2829
|
// src/react/sheet/ui/toggle-group.tsx
|
|
2812
2830
|
import {
|
|
@@ -2839,8 +2857,7 @@ import { AlertTriangle as AlertTriangle3 } from "lucide-react";
|
|
|
2839
2857
|
|
|
2840
2858
|
// src/react/sheet/ShareLinkPanel.tsx
|
|
2841
2859
|
import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef2, useState as useState10 } from "react";
|
|
2842
|
-
import { Button as Button7 } from "@ai-matrx/design-system";
|
|
2843
|
-
import { DateTimeField as DateTimeField2, Input as Input3, Select as Select5 } from "@ai-matrx/design-system/controls";
|
|
2860
|
+
import { Button as Button7, DateTimeField as DateTimeField2, Input as Input3, Select as Select5 } from "@ai-matrx/design-system/controls";
|
|
2844
2861
|
import { OutboundLink } from "@ai-matrx/kit/outbound-react";
|
|
2845
2862
|
import { formatAbsoluteDate } from "@ai-matrx/kit/format";
|
|
2846
2863
|
import {
|
|
@@ -2877,7 +2894,7 @@ import { ClipboardFallbackDialog } from "@ai-matrx/design-system";
|
|
|
2877
2894
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2878
2895
|
function useShare() {
|
|
2879
2896
|
const { copyText: copyTextKit } = useClipboard({
|
|
2880
|
-
notify:
|
|
2897
|
+
notify: shareCopyNotify
|
|
2881
2898
|
});
|
|
2882
2899
|
const [copied, setCopied] = useState9(false);
|
|
2883
2900
|
const [fallbackUrl, setFallbackUrl] = useState9(null);
|
|
@@ -3355,17 +3372,15 @@ function ShareLinkPanel({
|
|
|
3355
3372
|
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: hasLink ? `Link is on \xB7 ${activeLinks.length} active` : "Create a link that opens with no sign-in required" })
|
|
3356
3373
|
] })
|
|
3357
3374
|
] }),
|
|
3358
|
-
/* @__PURE__ */
|
|
3375
|
+
/* @__PURE__ */ jsx14(
|
|
3359
3376
|
Button7,
|
|
3360
3377
|
{
|
|
3361
|
-
|
|
3378
|
+
icon: creating ? /* @__PURE__ */ jsx14(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx14(Plus, {}),
|
|
3379
|
+
variant: "primary",
|
|
3362
3380
|
onClick: handleCreate,
|
|
3363
3381
|
disabled: creating,
|
|
3364
3382
|
className: "flex-shrink-0",
|
|
3365
|
-
children:
|
|
3366
|
-
creating ? /* @__PURE__ */ jsx14(Loader27, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx14(Plus, { className: "w-4 h-4" }),
|
|
3367
|
-
/* @__PURE__ */ jsx14("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
|
|
3368
|
-
]
|
|
3383
|
+
children: /* @__PURE__ */ jsx14("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
|
|
3369
3384
|
}
|
|
3370
3385
|
)
|
|
3371
3386
|
] }),
|
|
@@ -3441,14 +3456,13 @@ function ShareLinkPanel({
|
|
|
3441
3456
|
/* @__PURE__ */ jsx14(
|
|
3442
3457
|
Button7,
|
|
3443
3458
|
{
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
className: "
|
|
3459
|
+
icon: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ jsx14(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx14(Copy, {}),
|
|
3460
|
+
variant: "quiet",
|
|
3461
|
+
className: "flex-shrink-0",
|
|
3447
3462
|
onClick: () => copyExtraUrl(`${link.id}:${extra.key}`, extra.url),
|
|
3448
3463
|
disabled: !!unavailableReason,
|
|
3449
3464
|
title: unavailableReason ?? "Copy",
|
|
3450
|
-
"aria-label": `Copy ${extra.label}
|
|
3451
|
-
children: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ jsx14(Check2, { className: "w-4 h-4 text-green-500" }) : /* @__PURE__ */ jsx14(Copy, { className: "w-4 h-4" })
|
|
3465
|
+
"aria-label": `Copy ${extra.label}`
|
|
3452
3466
|
}
|
|
3453
3467
|
)
|
|
3454
3468
|
]
|
|
@@ -3490,39 +3504,37 @@ function ShareLinkPanel({
|
|
|
3490
3504
|
/* @__PURE__ */ jsx14(
|
|
3491
3505
|
Button7,
|
|
3492
3506
|
{
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
className: "
|
|
3507
|
+
icon: copiedId === link.id ? /* @__PURE__ */ jsx14(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx14(Copy, {}),
|
|
3508
|
+
variant: "quiet",
|
|
3509
|
+
className: "flex-shrink-0",
|
|
3496
3510
|
onClick: () => copyLink(link),
|
|
3497
3511
|
disabled: !!unavailableReason,
|
|
3498
3512
|
title: unavailableReason ?? "Copy link",
|
|
3499
|
-
"aria-label": "Copy share link"
|
|
3500
|
-
children: copiedId === link.id ? /* @__PURE__ */ jsx14(Check2, { className: "w-4 h-4 text-green-500" }) : /* @__PURE__ */ jsx14(Copy, { className: "w-4 h-4" })
|
|
3513
|
+
"aria-label": "Copy share link"
|
|
3501
3514
|
}
|
|
3502
3515
|
),
|
|
3503
3516
|
/* @__PURE__ */ jsx14(
|
|
3504
3517
|
Button7,
|
|
3505
3518
|
{
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
className: "
|
|
3519
|
+
icon: refreshing ? /* @__PURE__ */ jsx14(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx14(MessageSquareText, {}),
|
|
3520
|
+
variant: "quiet",
|
|
3521
|
+
className: "flex-shrink-0",
|
|
3509
3522
|
onClick: () => prepareTextShare(link.id),
|
|
3510
3523
|
disabled: !!unavailableReason || refreshing,
|
|
3511
3524
|
title: unavailableReason ?? "Review before sharing by text",
|
|
3512
|
-
"aria-label": "Share by text"
|
|
3513
|
-
children: refreshing ? /* @__PURE__ */ jsx14(Loader27, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx14(MessageSquareText, { className: "w-4 h-4" })
|
|
3525
|
+
"aria-label": "Share by text"
|
|
3514
3526
|
}
|
|
3515
3527
|
),
|
|
3516
3528
|
/* @__PURE__ */ jsx14(
|
|
3517
3529
|
Button7,
|
|
3518
3530
|
{
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3531
|
+
icon: /* @__PURE__ */ jsx14(Trash22, {}),
|
|
3532
|
+
removes: true,
|
|
3533
|
+
variant: "quiet",
|
|
3534
|
+
className: "flex-shrink-0",
|
|
3522
3535
|
onClick: () => setRevokeTarget(link),
|
|
3523
3536
|
title: "Turn off link",
|
|
3524
|
-
"aria-label": "Turn off share link"
|
|
3525
|
-
children: /* @__PURE__ */ jsx14(Trash22, { className: "w-4 h-4" })
|
|
3537
|
+
"aria-label": "Turn off share link"
|
|
3526
3538
|
}
|
|
3527
3539
|
)
|
|
3528
3540
|
] })
|
|
@@ -3535,21 +3547,18 @@ function ShareLinkPanel({
|
|
|
3535
3547
|
className: "flex items-center justify-between gap-2 text-xs text-destructive",
|
|
3536
3548
|
children: [
|
|
3537
3549
|
/* @__PURE__ */ jsx14("span", { children: shareError }),
|
|
3538
|
-
/* @__PURE__ */
|
|
3550
|
+
/* @__PURE__ */ jsx14(
|
|
3539
3551
|
Button7,
|
|
3540
3552
|
{
|
|
3553
|
+
icon: /* @__PURE__ */ jsx14(RefreshCw, {}),
|
|
3541
3554
|
type: "button",
|
|
3542
3555
|
variant: "outline",
|
|
3543
|
-
size: "sm",
|
|
3544
3556
|
disabled: isLoading,
|
|
3545
3557
|
onClick: () => refresh(),
|
|
3546
|
-
children:
|
|
3547
|
-
/* @__PURE__ */ jsx14(RefreshCw, { className: "mr-1 h-3.5 w-3.5" }),
|
|
3548
|
-
"Refresh"
|
|
3549
|
-
]
|
|
3558
|
+
children: "Refresh"
|
|
3550
3559
|
}
|
|
3551
3560
|
),
|
|
3552
|
-
/* @__PURE__ */ jsx14(
|
|
3561
|
+
/* @__PURE__ */ jsx14(ShareErrorAlchemyMenu, { className: "ml-auto" })
|
|
3553
3562
|
]
|
|
3554
3563
|
}
|
|
3555
3564
|
) : null,
|
|
@@ -3580,18 +3589,16 @@ function ShareLinkPanel({
|
|
|
3580
3589
|
/* @__PURE__ */ jsx14("p", { className: "text-xs font-medium", children: "Message preview" }),
|
|
3581
3590
|
/* @__PURE__ */ jsx14("p", { className: "rounded-md border bg-muted/30 p-3 break-words", children: createSafeShareMessage(urlFor(shareTarget)) })
|
|
3582
3591
|
] }),
|
|
3583
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsx14(
|
|
3584
3593
|
Button7,
|
|
3585
3594
|
{
|
|
3595
|
+
icon: /* @__PURE__ */ jsx14(Copy, {}),
|
|
3586
3596
|
type: "button",
|
|
3587
3597
|
variant: "outline",
|
|
3588
|
-
className: "
|
|
3598
|
+
className: "w-full",
|
|
3589
3599
|
disabled: handoffBusy,
|
|
3590
3600
|
onClick: handleCopyReviewedMessage,
|
|
3591
|
-
children:
|
|
3592
|
-
/* @__PURE__ */ jsx14(Copy, { className: "mr-2 h-4 w-4" }),
|
|
3593
|
-
"Copy message"
|
|
3594
|
-
]
|
|
3601
|
+
children: "Copy message"
|
|
3595
3602
|
}
|
|
3596
3603
|
),
|
|
3597
3604
|
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "You can turn this link off from the share panel at any time." })
|
|
@@ -3793,7 +3800,7 @@ function RowControls({
|
|
|
3793
3800
|
onStopPublishing
|
|
3794
3801
|
}) {
|
|
3795
3802
|
const { copyText: copyText3 } = useClipboard2({
|
|
3796
|
-
notify:
|
|
3803
|
+
notify: shareCopyNotify
|
|
3797
3804
|
});
|
|
3798
3805
|
const { toast } = useToast();
|
|
3799
3806
|
const [caps, setCaps] = useState13(null);
|
|
@@ -3819,7 +3826,7 @@ function RowControls({
|
|
|
3819
3826
|
return /* @__PURE__ */ jsxs13("p", { className: "rounded-lg border border-destructive/20 bg-destructive/10 p-3 text-xs text-destructive-ink", children: [
|
|
3820
3827
|
"Couldn't read this item's sharing options: ",
|
|
3821
3828
|
capsError,
|
|
3822
|
-
/* @__PURE__ */ jsx17(
|
|
3829
|
+
/* @__PURE__ */ jsx17(ShareErrorAlchemyMenu, { error: capsError })
|
|
3823
3830
|
] });
|
|
3824
3831
|
}
|
|
3825
3832
|
if (childRecord) return null;
|
|
@@ -3968,12 +3975,12 @@ function RowControls({
|
|
|
3968
3975
|
/* @__PURE__ */ jsx17(
|
|
3969
3976
|
Button8,
|
|
3970
3977
|
{
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3978
|
+
icon: copied ? /* @__PURE__ */ jsx17(Check3, {}) : /* @__PURE__ */ jsx17(Copy2, {}),
|
|
3979
|
+
"aria-label": "Copy web address",
|
|
3980
|
+
variant: "quiet",
|
|
3981
|
+
className: "flex-shrink-0",
|
|
3974
3982
|
onClick: () => void copyAddress(),
|
|
3975
|
-
title: "Copy web address"
|
|
3976
|
-
children: copied ? /* @__PURE__ */ jsx17(Check3, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx17(Copy2, { className: "h-3.5 w-3.5" })
|
|
3983
|
+
title: "Copy web address"
|
|
3977
3984
|
}
|
|
3978
3985
|
)
|
|
3979
3986
|
] })
|
|
@@ -4134,7 +4141,7 @@ function WhoCanSeeThis({
|
|
|
4134
4141
|
// src/react/sheet/SecureLinkPanel.tsx
|
|
4135
4142
|
import { useCallback as useCallback8, useEffect as useEffect12, useRef as useRef3, useState as useState15 } from "react";
|
|
4136
4143
|
import { Loader2 as Loader210, Mail as Mail3, MessageSquare as MessageSquare3, ShieldCheck } from "lucide-react";
|
|
4137
|
-
import { Button as Button9 } from "@ai-matrx/design-system";
|
|
4144
|
+
import { Button as Button9 } from "@ai-matrx/design-system/controls";
|
|
4138
4145
|
import { Checkbox as Checkbox2 } from "@ai-matrx/design-system";
|
|
4139
4146
|
import { Input as Input4 } from "@ai-matrx/design-system/controls";
|
|
4140
4147
|
import { Label as Label4 } from "@ai-matrx/design-system";
|
|
@@ -4349,7 +4356,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4349
4356
|
] }) : email.trim() !== "" ? /* @__PURE__ */ jsx19("p", { className: "text-xs text-amber-700 dark:text-amber-400", children: "Without a mobile number, the link and the code both go by email \u2014 anyone who can read that inbox could open it." }) : null,
|
|
4350
4357
|
optionsError ? /* @__PURE__ */ jsxs15("p", { className: "text-xs text-destructive", children: [
|
|
4351
4358
|
optionsError,
|
|
4352
|
-
/* @__PURE__ */ jsx19(
|
|
4359
|
+
/* @__PURE__ */ jsx19(ShareErrorAlchemyMenu, { error: optionsError, operation: "Load the secure-link options" })
|
|
4353
4360
|
] }) : null,
|
|
4354
4361
|
protectedFields.length > 0 ? /* @__PURE__ */ jsxs15("fieldset", { className: "space-y-2", children: [
|
|
4355
4362
|
/* @__PURE__ */ jsxs15("legend", { className: "text-xs font-medium", children: [
|
|
@@ -4388,10 +4395,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4388
4395
|
}
|
|
4389
4396
|
)
|
|
4390
4397
|
] }),
|
|
4391
|
-
/* @__PURE__ */
|
|
4392
|
-
sending ? /* @__PURE__ */ jsx19(Loader210, { className: "mr-2 h-4 w-4 animate-spin" }) : null,
|
|
4393
|
-
"Send secure link"
|
|
4394
|
-
] }),
|
|
4398
|
+
/* @__PURE__ */ jsx19(Button9, { icon: sending ? /* @__PURE__ */ jsx19(Loader210, { className: "animate-spin" }) : null, variant: "primary", className: "w-full", onClick: send, disabled: !canSend, children: "Send secure link" }),
|
|
4395
4399
|
result ? /* @__PURE__ */ jsxs15(
|
|
4396
4400
|
"div",
|
|
4397
4401
|
{
|
|
@@ -4414,7 +4418,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4414
4418
|
row.field_keys.length > 0 ? ` \xB7 with ${row.field_keys.join(", ")}` : ""
|
|
4415
4419
|
] })
|
|
4416
4420
|
] }),
|
|
4417
|
-
row.status === "pending" ? /* @__PURE__ */ jsx19(Button9, {
|
|
4421
|
+
row.status === "pending" ? /* @__PURE__ */ jsx19(Button9, { variant: "outline", onClick: () => void turnOff(row), children: "Turn off" }) : null
|
|
4418
4422
|
] }, row.id)) })
|
|
4419
4423
|
] }) : null
|
|
4420
4424
|
] });
|
|
@@ -4573,7 +4577,7 @@ function ShareModal({
|
|
|
4573
4577
|
/* @__PURE__ */ jsxs16("p", { className: "text-xs text-destructive/80 mt-0.5", children: [
|
|
4574
4578
|
ownerError,
|
|
4575
4579
|
" ",
|
|
4576
|
-
/* @__PURE__ */ jsx20(
|
|
4580
|
+
/* @__PURE__ */ jsx20(ShareErrorAlchemyMenu, { error: ownerError })
|
|
4577
4581
|
] })
|
|
4578
4582
|
] })
|
|
4579
4583
|
] }) : /* @__PURE__ */ jsxs16("div", { className: "p-3 rounded-lg border bg-muted/30 flex items-start gap-2", children: [
|
|
@@ -4600,7 +4604,7 @@ function ShareModal({
|
|
|
4600
4604
|
/* @__PURE__ */ jsx20(PageCaptureButton, { size: "xs" })
|
|
4601
4605
|
] }),
|
|
4602
4606
|
/* @__PURE__ */ jsx20(DialogDescription, { asChild: true, children: /* @__PURE__ */ jsx20("div", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx20(
|
|
4603
|
-
|
|
4607
|
+
ShareEntityRef,
|
|
4604
4608
|
{
|
|
4605
4609
|
token: resourceType,
|
|
4606
4610
|
id: resourceId,
|
|
@@ -4610,18 +4614,15 @@ function ShareModal({
|
|
|
4610
4614
|
}
|
|
4611
4615
|
) }) })
|
|
4612
4616
|
] }),
|
|
4613
|
-
/* @__PURE__ */
|
|
4617
|
+
/* @__PURE__ */ jsx20(
|
|
4614
4618
|
Button10,
|
|
4615
4619
|
{
|
|
4620
|
+
icon: emailingLink ? /* @__PURE__ */ jsx20(Loader211, { className: "animate-spin" }) : emailSent ? /* @__PURE__ */ jsx20(CheckCircle3, { className: "text-green-500" }) : /* @__PURE__ */ jsx20(Mail4, {}),
|
|
4616
4621
|
variant: "outline",
|
|
4617
|
-
size: "sm",
|
|
4618
4622
|
onClick: handleEmailLink,
|
|
4619
4623
|
disabled: emailingLink,
|
|
4620
4624
|
className: "flex-shrink-0",
|
|
4621
|
-
children:
|
|
4622
|
-
emailingLink ? /* @__PURE__ */ jsx20(Loader211, { className: "h-4 w-4 animate-spin" }) : emailSent ? /* @__PURE__ */ jsx20(CheckCircle3, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ jsx20(Mail4, { className: "h-4 w-4" }),
|
|
4623
|
-
/* @__PURE__ */ jsx20("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
|
|
4624
|
-
]
|
|
4625
|
+
children: /* @__PURE__ */ jsx20("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
|
|
4625
4626
|
}
|
|
4626
4627
|
)
|
|
4627
4628
|
] }) }),
|
|
@@ -4630,7 +4631,7 @@ function ShareModal({
|
|
|
4630
4631
|
/* @__PURE__ */ jsx20("p", { className: "text-sm font-medium", children: "Sharing is unavailable" }),
|
|
4631
4632
|
/* @__PURE__ */ jsxs16("p", { className: "text-xs text-muted-foreground max-w-sm", children: [
|
|
4632
4633
|
configError,
|
|
4633
|
-
/* @__PURE__ */ jsx20(
|
|
4634
|
+
/* @__PURE__ */ jsx20(ShareErrorAlchemyMenu, { error: configError })
|
|
4634
4635
|
] })
|
|
4635
4636
|
] }),
|
|
4636
4637
|
!configError && resolvingOwner && /* @__PURE__ */ jsxs16("div", { className: "flex-1 space-y-3 py-4", "aria-busy": "true", children: [
|
|
@@ -4796,7 +4797,7 @@ function ShareModal({
|
|
|
4796
4797
|
),
|
|
4797
4798
|
error && /* @__PURE__ */ jsxs16("div", { className: "mt-3 p-2.5 bg-destructive/10 border border-destructive/20 rounded-md flex-shrink-0", children: [
|
|
4798
4799
|
/* @__PURE__ */ jsx20("p", { className: "text-sm text-destructive", children: error }),
|
|
4799
|
-
/* @__PURE__ */ jsx20(
|
|
4800
|
+
/* @__PURE__ */ jsx20(ShareErrorAlchemyMenu, { error })
|
|
4800
4801
|
] })
|
|
4801
4802
|
] }) });
|
|
4802
4803
|
}
|