@ai-matrx/sharing 0.1.9 → 0.1.11
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 +15 -2
- package/dist/access-react.cjs +71 -12
- package/dist/access-react.cjs.map +1 -1
- package/dist/access-react.d.cts +3 -1
- package/dist/access-react.d.ts +3 -1
- package/dist/access-react.js +85 -25
- package/dist/access-react.js.map +1 -1
- package/dist/react.cjs +269 -288
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +17 -1
- package/dist/react.d.ts +17 -1
- package/dist/react.js +173 -192
- package/dist/react.js.map +1 -1
- package/package.json +5 -5
package/dist/react.cjs
CHANGED
|
@@ -75,6 +75,7 @@ var import_design_system = require("@ai-matrx/design-system");
|
|
|
75
75
|
var import_controls = require("@ai-matrx/design-system/controls");
|
|
76
76
|
var import_clipboard = require("@ai-matrx/kit/clipboard");
|
|
77
77
|
var import_confirm_opener = require("@ai-matrx/kit/confirm-opener");
|
|
78
|
+
var import_clipboard_fallback_opener = require("@ai-matrx/kit/clipboard-fallback-opener");
|
|
78
79
|
var import_core = require("@ai-matrx/sharing/core");
|
|
79
80
|
var import_core2 = require("@ai-matrx/sharing/core");
|
|
80
81
|
var import_vault = require("@ai-matrx/vault");
|
|
@@ -232,6 +233,7 @@ var DEFAULTS = {
|
|
|
232
233
|
useOrganizations: useDefaultOrganizations,
|
|
233
234
|
useUserConnections: useDefaultConnections,
|
|
234
235
|
confirm: (o) => (0, import_confirm_opener.confirm)(o),
|
|
236
|
+
manualCopy: (text, options) => (0, import_clipboard_fallback_opener.openClipboardFallback)(text, options),
|
|
235
237
|
CopyButtons: DefaultCopyButtons,
|
|
236
238
|
csvExportItem: () => {
|
|
237
239
|
announceStandIn("csvExportItem");
|
|
@@ -272,6 +274,7 @@ function shareCopyNotify(message, kind) {
|
|
|
272
274
|
ui.toast({ title: message, ...kind === "error" ? { variant: "destructive" } : {} });
|
|
273
275
|
}
|
|
274
276
|
var confirm = (options) => ui.confirm(options);
|
|
277
|
+
var manualCopy = (text, options = {}) => ui.manualCopy(text, options);
|
|
275
278
|
var useCurrentUserId = () => ui.useCurrentUserId();
|
|
276
279
|
var useNavTree = () => ({ orgs: ui.useOrganizations() });
|
|
277
280
|
var useOrganizationsToCreateIn = () => ({ orgs: ui.useOrganizations() });
|
|
@@ -409,7 +412,7 @@ var import_react18 = require("react");
|
|
|
409
412
|
var import_design_system2 = require("@ai-matrx/design-system");
|
|
410
413
|
|
|
411
414
|
// src/react/sheet/ShareModal.tsx
|
|
412
|
-
var
|
|
415
|
+
var import_design_system24 = require("@ai-matrx/design-system");
|
|
413
416
|
var import_controls19 = require("@ai-matrx/design-system/controls");
|
|
414
417
|
|
|
415
418
|
// src/react/sheet/ui/share-tabs-trigger.tsx
|
|
@@ -904,7 +907,7 @@ function useGrantableLevels(resourceType, resourceId, enabled, refreshKey) {
|
|
|
904
907
|
|
|
905
908
|
// src/react/sheet/ShareModal.tsx
|
|
906
909
|
var import_core35 = require("@ai-matrx/sharing/core");
|
|
907
|
-
var
|
|
910
|
+
var import_design_system25 = require("@ai-matrx/design-system");
|
|
908
911
|
var import_lucide_react15 = require("lucide-react");
|
|
909
912
|
|
|
910
913
|
// src/react/sheet/PermissionsList.tsx
|
|
@@ -2812,29 +2815,22 @@ function PortalConfirmDialog(props) {
|
|
|
2812
2815
|
// src/react/sheet/useShare.tsx
|
|
2813
2816
|
var import_clipboard3 = require("@ai-matrx/kit/clipboard");
|
|
2814
2817
|
var import_react10 = require("react");
|
|
2815
|
-
var
|
|
2816
|
-
var
|
|
2818
|
+
var MANUAL_TITLE = "Copy link";
|
|
2819
|
+
var MANUAL_DESCRIPTION = "Press Cmd/Ctrl+C to copy, or use the Copy button below.";
|
|
2817
2820
|
function useShare() {
|
|
2818
2821
|
const { copyText: copyTextKit } = (0, import_clipboard3.useClipboard)({
|
|
2819
2822
|
notify: shareCopyNotify
|
|
2820
2823
|
});
|
|
2821
2824
|
const [copied, setCopied] = (0, import_react10.useState)(false);
|
|
2822
|
-
const [fallbackUrl, setFallbackUrl] = (0, import_react10.useState)(null);
|
|
2823
|
-
const [fallbackTitle, setFallbackTitle] = (0, import_react10.useState)("Copy link");
|
|
2824
|
-
const [fallbackDescription, setFallbackDescription] = (0, import_react10.useState)(
|
|
2825
|
-
"Press Cmd/Ctrl+C to copy, or use the Copy button below."
|
|
2826
|
-
);
|
|
2827
2825
|
const copy = (0, import_react10.useCallback)(
|
|
2828
2826
|
async (text, fallback) => {
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
fallback?.description ??
|
|
2833
|
-
);
|
|
2834
|
-
setFallbackUrl(text);
|
|
2827
|
+
if (!await copyTextKit(text)) {
|
|
2828
|
+
void manualCopy(text, {
|
|
2829
|
+
title: fallback?.title ?? MANUAL_TITLE,
|
|
2830
|
+
description: fallback?.description ?? MANUAL_DESCRIPTION
|
|
2831
|
+
});
|
|
2835
2832
|
return "manual";
|
|
2836
|
-
}
|
|
2837
|
-
if (!await copyTextKit(text)) return showManualFallback();
|
|
2833
|
+
}
|
|
2838
2834
|
setCopied(true);
|
|
2839
2835
|
window.setTimeout(() => setCopied(false), 2e3);
|
|
2840
2836
|
return "copied";
|
|
@@ -2867,26 +2863,12 @@ function useShare() {
|
|
|
2867
2863
|
},
|
|
2868
2864
|
[copy]
|
|
2869
2865
|
);
|
|
2870
|
-
return {
|
|
2871
|
-
share,
|
|
2872
|
-
copy,
|
|
2873
|
-
copied,
|
|
2874
|
-
fallbackDialog: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2875
|
-
import_design_system20.ClipboardFallbackDialog,
|
|
2876
|
-
{
|
|
2877
|
-
open: fallbackUrl !== null,
|
|
2878
|
-
onOpenChange: (open) => !open && setFallbackUrl(null),
|
|
2879
|
-
url: fallbackUrl ?? "",
|
|
2880
|
-
title: fallbackTitle,
|
|
2881
|
-
description: fallbackDescription
|
|
2882
|
-
}
|
|
2883
|
-
)
|
|
2884
|
-
};
|
|
2866
|
+
return { share, copy, copied, fallbackDialog: null };
|
|
2885
2867
|
}
|
|
2886
2868
|
|
|
2887
2869
|
// src/react/sheet/ShareLinkPanel.tsx
|
|
2888
2870
|
var import_core22 = require("@ai-matrx/sharing/core");
|
|
2889
|
-
var
|
|
2871
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2890
2872
|
function linkListErrorMessage(error) {
|
|
2891
2873
|
return error instanceof Error ? error.message : "We couldn't load this item's share links.";
|
|
2892
2874
|
}
|
|
@@ -2924,7 +2906,7 @@ function ShareLinkPanel({
|
|
|
2924
2906
|
const [shareError, setShareError] = (0, import_react11.useState)(null);
|
|
2925
2907
|
const [refreshing, setRefreshing] = (0, import_react11.useState)(false);
|
|
2926
2908
|
const [handoffBusy, setHandoffBusy] = (0, import_react11.useState)(false);
|
|
2927
|
-
const { share, copy: copyMessage
|
|
2909
|
+
const { share, copy: copyMessage } = useShare();
|
|
2928
2910
|
const resourceKey = `${resourceType}\0${resourceId}`;
|
|
2929
2911
|
const fetchLinks = (0, import_react11.useCallback)(async () => {
|
|
2930
2912
|
const fresh = await (0, import_core21.listShareLinks)(resourceType, resourceId);
|
|
@@ -3271,39 +3253,39 @@ function ShareLinkPanel({
|
|
|
3271
3253
|
}, [shareTarget, refresh, copyMessage, toast, urlFor]);
|
|
3272
3254
|
if (!isOwner) return null;
|
|
3273
3255
|
if (!enabled) {
|
|
3274
|
-
return /* @__PURE__ */ (0,
|
|
3275
|
-
/* @__PURE__ */ (0,
|
|
3276
|
-
/* @__PURE__ */ (0,
|
|
3277
|
-
/* @__PURE__ */ (0,
|
|
3278
|
-
/* @__PURE__ */ (0,
|
|
3256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-2 p-3 bg-muted/30 rounded-lg border", children: [
|
|
3257
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Link2, { className: "w-4 h-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
|
|
3258
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0", children: [
|
|
3259
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-sm font-medium", children: "No-login links aren\u2019t on for this item type" }),
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground", children: "Share it with specific people or an organization instead \u2014 they open it signed in." })
|
|
3279
3261
|
] })
|
|
3280
3262
|
] });
|
|
3281
3263
|
}
|
|
3282
|
-
return /* @__PURE__ */ (0,
|
|
3283
|
-
/* @__PURE__ */ (0,
|
|
3284
|
-
/* @__PURE__ */ (0,
|
|
3285
|
-
/* @__PURE__ */ (0,
|
|
3286
|
-
/* @__PURE__ */ (0,
|
|
3287
|
-
/* @__PURE__ */ (0,
|
|
3288
|
-
/* @__PURE__ */ (0,
|
|
3264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-2.5 p-3 bg-muted/30 rounded-lg border", children: [
|
|
3265
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3266
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
3267
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Link2, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
3268
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0", children: [
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-sm font-medium", children: "Anyone with the link" }),
|
|
3270
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("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" })
|
|
3289
3271
|
] })
|
|
3290
3272
|
] }),
|
|
3291
|
-
/* @__PURE__ */ (0,
|
|
3273
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3292
3274
|
import_controls15.Button,
|
|
3293
3275
|
{
|
|
3294
|
-
icon: creating ? /* @__PURE__ */ (0,
|
|
3276
|
+
icon: creating ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Loader2, { className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Plus, {}),
|
|
3295
3277
|
variant: "primary",
|
|
3296
3278
|
onClick: handleCreate,
|
|
3297
3279
|
disabled: creating,
|
|
3298
3280
|
className: "flex-shrink-0",
|
|
3299
|
-
children: /* @__PURE__ */ (0,
|
|
3281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
|
|
3300
3282
|
}
|
|
3301
3283
|
)
|
|
3302
3284
|
] }),
|
|
3303
|
-
linkSettings ? /* @__PURE__ */ (0,
|
|
3304
|
-
/* @__PURE__ */ (0,
|
|
3305
|
-
/* @__PURE__ */ (0,
|
|
3306
|
-
/* @__PURE__ */ (0,
|
|
3285
|
+
linkSettings ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-3", children: [
|
|
3286
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "flex flex-col gap-1 text-xs", children: [
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "Permission" }),
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3307
3289
|
import_controls15.Select,
|
|
3308
3290
|
{
|
|
3309
3291
|
value: permissionLevel,
|
|
@@ -3316,13 +3298,13 @@ function ShareLinkPanel({
|
|
|
3316
3298
|
}
|
|
3317
3299
|
)
|
|
3318
3300
|
] }),
|
|
3319
|
-
/* @__PURE__ */ (0,
|
|
3320
|
-
/* @__PURE__ */ (0,
|
|
3321
|
-
/* @__PURE__ */ (0,
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "flex flex-col gap-1 text-xs", children: [
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "Expires" }),
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_controls15.DateTimeField, { value: expiresAt, onValueChange: (v) => setExpiresAt(v ?? "") })
|
|
3322
3304
|
] }),
|
|
3323
|
-
/* @__PURE__ */ (0,
|
|
3324
|
-
/* @__PURE__ */ (0,
|
|
3325
|
-
/* @__PURE__ */ (0,
|
|
3305
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "flex flex-col gap-1 text-xs", children: [
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "Max uses" }),
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3326
3308
|
import_controls15.Input,
|
|
3327
3309
|
{
|
|
3328
3310
|
type: "number",
|
|
@@ -3334,45 +3316,45 @@ function ShareLinkPanel({
|
|
|
3334
3316
|
)
|
|
3335
3317
|
] })
|
|
3336
3318
|
] }) : null,
|
|
3337
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
3338
|
-
/* @__PURE__ */ (0,
|
|
3319
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-center py-3 text-xs text-muted-foreground", children: [
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Loader2, { className: "w-3.5 h-3.5 animate-spin mr-2" }),
|
|
3339
3321
|
"Loading links\u2026"
|
|
3340
|
-
] }) : activeLinks.length === 0 && !shareError ? /* @__PURE__ */ (0,
|
|
3322
|
+
] }) : activeLinks.length === 0 && !shareError ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground py-1", children: "No share links yet. Create one to share this with anyone." }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "space-y-1.5", children: activeLinks.map((link) => {
|
|
3341
3323
|
const unavailableReason = (0, import_core22.shareLinkUnavailableReason)(link);
|
|
3342
3324
|
const linkUrl = urlFor(link);
|
|
3343
3325
|
const extras = extraUrls?.(link) ?? [];
|
|
3344
|
-
return /* @__PURE__ */ (0,
|
|
3345
|
-
showLinkDetails ? /* @__PURE__ */ (0,
|
|
3346
|
-
/* @__PURE__ */ (0,
|
|
3347
|
-
/* @__PURE__ */ (0,
|
|
3348
|
-
link.maxUses ? /* @__PURE__ */ (0,
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1", children: [
|
|
3327
|
+
showLinkDetails ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 px-0.5 text-[11px] text-muted-foreground", children: [
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "rounded bg-muted px-1.5 py-0.5 font-medium text-foreground", children: link.permissionLevel === "viewer" ? "Read only" : "Read + write" }),
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: link.expiresAt ? `Expires ${(0, import_format2.formatAbsoluteDate)(link.expiresAt)}` : "No expiry" }),
|
|
3330
|
+
link.maxUses ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: `${link.useCount}/${link.maxUses} uses` }) : null
|
|
3349
3331
|
] }) : null,
|
|
3350
|
-
extras.map((extra) => /* @__PURE__ */ (0,
|
|
3332
|
+
extras.map((extra) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3351
3333
|
"div",
|
|
3352
3334
|
{
|
|
3353
3335
|
className: extra.primary ? "flex items-center gap-1.5 rounded-md border border-primary/30 bg-primary/5 p-1.5" : "flex items-center gap-1.5 rounded-md border bg-background p-1.5",
|
|
3354
3336
|
children: [
|
|
3355
|
-
/* @__PURE__ */ (0,
|
|
3356
|
-
/* @__PURE__ */ (0,
|
|
3337
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col px-1", children: [
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: [
|
|
3357
3339
|
extra.label,
|
|
3358
3340
|
extra.sublabel ? ` \xB7 ${extra.sublabel}` : ""
|
|
3359
3341
|
] }),
|
|
3360
|
-
/* @__PURE__ */ (0,
|
|
3342
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate font-mono text-xs", title: extra.url, children: extra.url })
|
|
3361
3343
|
] }),
|
|
3362
|
-
/* @__PURE__ */ (0,
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3363
3345
|
import_outbound_react.OutboundLink,
|
|
3364
3346
|
{
|
|
3365
3347
|
href: extra.url,
|
|
3366
3348
|
"aria-label": `Open ${extra.label}`,
|
|
3367
3349
|
title: "Open in new tab",
|
|
3368
3350
|
className: "flex h-11 w-11 flex-shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground sm:h-8 sm:w-8",
|
|
3369
|
-
children: /* @__PURE__ */ (0,
|
|
3351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.ExternalLink, { className: "w-4 h-4" })
|
|
3370
3352
|
}
|
|
3371
3353
|
),
|
|
3372
|
-
/* @__PURE__ */ (0,
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3373
3355
|
import_controls15.Button,
|
|
3374
3356
|
{
|
|
3375
|
-
icon: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ (0,
|
|
3357
|
+
icon: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Check, { className: "text-green-500" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Copy, {}),
|
|
3376
3358
|
variant: "quiet",
|
|
3377
3359
|
className: "flex-shrink-0",
|
|
3378
3360
|
onClick: () => copyExtraUrl(`${link.id}:${extra.key}`, extra.url),
|
|
@@ -3385,8 +3367,8 @@ function ShareLinkPanel({
|
|
|
3385
3367
|
},
|
|
3386
3368
|
extra.key
|
|
3387
3369
|
)),
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
3389
|
-
/* @__PURE__ */ (0,
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-1.5 rounded-md border bg-background p-1.5", children: [
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3390
3372
|
import_controls15.Input,
|
|
3391
3373
|
{
|
|
3392
3374
|
mono: true,
|
|
@@ -3396,31 +3378,31 @@ function ShareLinkPanel({
|
|
|
3396
3378
|
onFocus: (e) => e.currentTarget.select()
|
|
3397
3379
|
}
|
|
3398
3380
|
),
|
|
3399
|
-
/* @__PURE__ */ (0,
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3400
3382
|
"span",
|
|
3401
3383
|
{
|
|
3402
3384
|
className: "flex items-center gap-1 text-[10px] text-muted-foreground px-1",
|
|
3403
3385
|
title: `${link.useCount} view${link.useCount === 1 ? "" : "s"}`,
|
|
3404
3386
|
children: [
|
|
3405
|
-
/* @__PURE__ */ (0,
|
|
3387
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Eye, { className: "w-3 h-3" }),
|
|
3406
3388
|
link.useCount
|
|
3407
3389
|
]
|
|
3408
3390
|
}
|
|
3409
3391
|
),
|
|
3410
|
-
showOpenLink ? /* @__PURE__ */ (0,
|
|
3392
|
+
showOpenLink ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3411
3393
|
import_outbound_react.OutboundLink,
|
|
3412
3394
|
{
|
|
3413
3395
|
href: linkUrl,
|
|
3414
3396
|
"aria-label": "Open share link",
|
|
3415
3397
|
title: "Open in new tab",
|
|
3416
3398
|
className: "flex h-11 w-11 flex-shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground sm:h-8 sm:w-8",
|
|
3417
|
-
children: /* @__PURE__ */ (0,
|
|
3399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.ExternalLink, { className: "w-4 h-4" })
|
|
3418
3400
|
}
|
|
3419
3401
|
) : null,
|
|
3420
|
-
/* @__PURE__ */ (0,
|
|
3402
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3421
3403
|
import_controls15.Button,
|
|
3422
3404
|
{
|
|
3423
|
-
icon: copiedId === link.id ? /* @__PURE__ */ (0,
|
|
3405
|
+
icon: copiedId === link.id ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Check, { className: "text-green-500" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Copy, {}),
|
|
3424
3406
|
variant: "quiet",
|
|
3425
3407
|
className: "flex-shrink-0",
|
|
3426
3408
|
onClick: () => copyLink(link),
|
|
@@ -3429,10 +3411,10 @@ function ShareLinkPanel({
|
|
|
3429
3411
|
"aria-label": "Copy share link"
|
|
3430
3412
|
}
|
|
3431
3413
|
),
|
|
3432
|
-
/* @__PURE__ */ (0,
|
|
3414
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3433
3415
|
import_controls15.Button,
|
|
3434
3416
|
{
|
|
3435
|
-
icon: refreshing ? /* @__PURE__ */ (0,
|
|
3417
|
+
icon: refreshing ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Loader2, { className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.MessageSquareText, {}),
|
|
3436
3418
|
variant: "quiet",
|
|
3437
3419
|
className: "flex-shrink-0",
|
|
3438
3420
|
onClick: () => prepareTextShare(link.id),
|
|
@@ -3441,10 +3423,10 @@ function ShareLinkPanel({
|
|
|
3441
3423
|
"aria-label": "Share by text"
|
|
3442
3424
|
}
|
|
3443
3425
|
),
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3445
3427
|
import_controls15.Button,
|
|
3446
3428
|
{
|
|
3447
|
-
icon: /* @__PURE__ */ (0,
|
|
3429
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Trash2, {}),
|
|
3448
3430
|
removes: true,
|
|
3449
3431
|
variant: "quiet",
|
|
3450
3432
|
className: "flex-shrink-0",
|
|
@@ -3456,17 +3438,17 @@ function ShareLinkPanel({
|
|
|
3456
3438
|
] })
|
|
3457
3439
|
] }, link.id);
|
|
3458
3440
|
}) }),
|
|
3459
|
-
shareError ? /* @__PURE__ */ (0,
|
|
3441
|
+
shareError ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3460
3442
|
"div",
|
|
3461
3443
|
{
|
|
3462
3444
|
role: "alert",
|
|
3463
3445
|
className: "flex items-center justify-between gap-2 text-xs text-destructive",
|
|
3464
3446
|
children: [
|
|
3465
|
-
/* @__PURE__ */ (0,
|
|
3466
|
-
/* @__PURE__ */ (0,
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: shareError }),
|
|
3448
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3467
3449
|
import_controls15.Button,
|
|
3468
3450
|
{
|
|
3469
|
-
icon: /* @__PURE__ */ (0,
|
|
3451
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.RefreshCw, {}),
|
|
3470
3452
|
type: "button",
|
|
3471
3453
|
variant: "outline",
|
|
3472
3454
|
disabled: isLoading,
|
|
@@ -3474,41 +3456,41 @@ function ShareLinkPanel({
|
|
|
3474
3456
|
children: "Refresh"
|
|
3475
3457
|
}
|
|
3476
3458
|
),
|
|
3477
|
-
/* @__PURE__ */ (0,
|
|
3459
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ShareErrorAlchemyMenu, { className: "ml-auto" })
|
|
3478
3460
|
]
|
|
3479
3461
|
}
|
|
3480
3462
|
) : null,
|
|
3481
|
-
refreshing && !loading ? /* @__PURE__ */ (0,
|
|
3482
|
-
/* @__PURE__ */ (0,
|
|
3463
|
+
refreshing && !loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", role: "status", children: "Checking current link access" }) : null,
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3483
3465
|
PortalConfirmDialog,
|
|
3484
3466
|
{
|
|
3485
3467
|
open: shareTarget !== null,
|
|
3486
3468
|
onOpenChange: (open) => !open && closeShareReview(),
|
|
3487
3469
|
title: "Review message before sharing",
|
|
3488
3470
|
description: "Anyone with this link can open it without signing in. AI Matrx will prepare the message; it won't send it.",
|
|
3489
|
-
content: shareTarget ? /* @__PURE__ */ (0,
|
|
3490
|
-
/* @__PURE__ */ (0,
|
|
3491
|
-
/* @__PURE__ */ (0,
|
|
3492
|
-
/* @__PURE__ */ (0,
|
|
3493
|
-
/* @__PURE__ */ (0,
|
|
3471
|
+
content: shareTarget ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-3 text-sm", children: [
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("dl", { className: "space-y-1.5 text-xs", children: [
|
|
3473
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex justify-between gap-3", children: [
|
|
3474
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "text-muted-foreground", children: "Access" }),
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "text-right", children: (0, import_core22.describeShareLinkAccess)(shareTarget.permissionLevel) })
|
|
3494
3476
|
] }),
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3496
|
-
/* @__PURE__ */ (0,
|
|
3497
|
-
/* @__PURE__ */ (0,
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex justify-between gap-3", children: [
|
|
3478
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "text-muted-foreground", children: "Expiry" }),
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "text-right", children: (0, import_core22.describeShareLinkExpiry)(shareTarget.expiresAt) })
|
|
3498
3480
|
] }),
|
|
3499
|
-
/* @__PURE__ */ (0,
|
|
3500
|
-
/* @__PURE__ */ (0,
|
|
3501
|
-
/* @__PURE__ */ (0,
|
|
3481
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex justify-between gap-3", children: [
|
|
3482
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "text-muted-foreground", children: "Views" }),
|
|
3483
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "text-right", children: shareTarget.maxUses === null ? `${shareTarget.useCount} used \xB7 no limit` : `${shareTarget.useCount} of ${shareTarget.maxUses} used` })
|
|
3502
3484
|
] })
|
|
3503
3485
|
] }),
|
|
3504
|
-
/* @__PURE__ */ (0,
|
|
3505
|
-
/* @__PURE__ */ (0,
|
|
3506
|
-
/* @__PURE__ */ (0,
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1", children: [
|
|
3487
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs font-medium", children: "Message preview" }),
|
|
3488
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "rounded-md border bg-muted/30 p-3 break-words", children: (0, import_core22.createSafeShareMessage)(urlFor(shareTarget)) })
|
|
3507
3489
|
] }),
|
|
3508
|
-
/* @__PURE__ */ (0,
|
|
3490
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3509
3491
|
import_controls15.Button,
|
|
3510
3492
|
{
|
|
3511
|
-
icon: /* @__PURE__ */ (0,
|
|
3493
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react9.Copy, {}),
|
|
3512
3494
|
type: "button",
|
|
3513
3495
|
variant: "outline",
|
|
3514
3496
|
className: "w-full",
|
|
@@ -3517,7 +3499,7 @@ function ShareLinkPanel({
|
|
|
3517
3499
|
children: "Copy message"
|
|
3518
3500
|
}
|
|
3519
3501
|
),
|
|
3520
|
-
/* @__PURE__ */ (0,
|
|
3502
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground", children: "You can turn this link off from the share panel at any time." })
|
|
3521
3503
|
] }) : null,
|
|
3522
3504
|
confirmLabel: typeof navigator !== "undefined" && typeof navigator.share === "function" ? "Open share options" : "Copy message",
|
|
3523
3505
|
cancelLabel: "Not now",
|
|
@@ -3526,7 +3508,7 @@ function ShareLinkPanel({
|
|
|
3526
3508
|
onConfirm: handleNativeHandoff
|
|
3527
3509
|
}
|
|
3528
3510
|
),
|
|
3529
|
-
/* @__PURE__ */ (0,
|
|
3511
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3530
3512
|
PortalConfirmDialog,
|
|
3531
3513
|
{
|
|
3532
3514
|
open: !!revokeTarget,
|
|
@@ -3537,17 +3519,16 @@ function ShareLinkPanel({
|
|
|
3537
3519
|
variant: "destructive",
|
|
3538
3520
|
onConfirm: handleRevoke
|
|
3539
3521
|
}
|
|
3540
|
-
)
|
|
3541
|
-
fallbackDialog
|
|
3522
|
+
)
|
|
3542
3523
|
] });
|
|
3543
3524
|
}
|
|
3544
3525
|
|
|
3545
3526
|
// src/react/sheet/PublicAccessTab.tsx
|
|
3546
|
-
var
|
|
3527
|
+
var import_design_system20 = require("@ai-matrx/design-system");
|
|
3547
3528
|
var import_core23 = require("@ai-matrx/sharing/core");
|
|
3548
3529
|
var import_core24 = require("@ai-matrx/sharing/core");
|
|
3549
3530
|
var import_core25 = require("@ai-matrx/sharing/core");
|
|
3550
|
-
var
|
|
3531
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3551
3532
|
function anyoneReachWords(typeLabel, reach) {
|
|
3552
3533
|
if (reach.publicPage) return `Anyone, signed in or not, opens this ${typeLabel} at its address as a viewer.`;
|
|
3553
3534
|
return `Everyone signed in to AI Matrx can find and view this ${typeLabel}.` + (reach.noLoginLink ? " People without an account need a no-login link." : " People without an account cannot open it.");
|
|
@@ -3578,13 +3559,13 @@ function PublicAccessTab({
|
|
|
3578
3559
|
};
|
|
3579
3560
|
}, [resourceType]);
|
|
3580
3561
|
const location = (0, import_core25.sharingLocation)(copy?.surface ?? "Anyone link");
|
|
3581
|
-
if (loading) return /* @__PURE__ */ (0,
|
|
3562
|
+
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system20.Skeleton, { className: "h-20 w-full" });
|
|
3582
3563
|
if (capabilitiesError) {
|
|
3583
|
-
return /* @__PURE__ */ (0,
|
|
3584
|
-
/* @__PURE__ */ (0,
|
|
3585
|
-
/* @__PURE__ */ (0,
|
|
3586
|
-
/* @__PURE__ */ (0,
|
|
3587
|
-
/* @__PURE__ */ (0,
|
|
3564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system18.Alert, { variant: "destructive", className: "group", children: [
|
|
3565
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react10.AlertTriangle, { className: "h-4 w-4" }),
|
|
3566
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system18.AlertDescription, { className: "flex items-start gap-2", children: [
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex-1", children: capabilitiesError }),
|
|
3568
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "shrink-0 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3588
3569
|
CopyButtons,
|
|
3589
3570
|
{
|
|
3590
3571
|
size: "xs",
|
|
@@ -3617,7 +3598,7 @@ function PublicAccessTab({
|
|
|
3617
3598
|
] })
|
|
3618
3599
|
] });
|
|
3619
3600
|
}
|
|
3620
|
-
return /* @__PURE__ */ (0,
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "space-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3621
3602
|
ShareLinkPanel,
|
|
3622
3603
|
{
|
|
3623
3604
|
resourceType,
|
|
@@ -3635,7 +3616,7 @@ var import_core31 = require("@ai-matrx/sharing/core");
|
|
|
3635
3616
|
var import_react13 = require("react");
|
|
3636
3617
|
var import_cn3 = require("@ai-matrx/design-system/cn");
|
|
3637
3618
|
var import_core26 = require("@ai-matrx/sharing/core");
|
|
3638
|
-
var
|
|
3619
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3639
3620
|
function SearchEngineIndexedSwitch({
|
|
3640
3621
|
resourceType,
|
|
3641
3622
|
resourceId,
|
|
@@ -3678,14 +3659,14 @@ function SearchEngineIndexedSwitch({
|
|
|
3678
3659
|
};
|
|
3679
3660
|
const followsDefault = state2.value === null;
|
|
3680
3661
|
const id = `indexed-${resourceType}-${resourceId}`;
|
|
3681
|
-
return /* @__PURE__ */ (0,
|
|
3662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3682
3663
|
"span",
|
|
3683
3664
|
{
|
|
3684
3665
|
className: (0, import_cn3.cn)("inline-flex shrink-0 items-center gap-1.5", className),
|
|
3685
3666
|
title: followsDefault ? `Following the default for this type (${state2.type_default ? "indexed" : "not indexed"}).` : "Set for this item.",
|
|
3686
3667
|
children: [
|
|
3687
|
-
/* @__PURE__ */ (0,
|
|
3688
|
-
/* @__PURE__ */ (0,
|
|
3668
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: id, className: "cursor-pointer text-xs text-muted-foreground", children: "Indexed by search engines" }),
|
|
3669
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3689
3670
|
import_controls14.Switch,
|
|
3690
3671
|
{
|
|
3691
3672
|
id,
|
|
@@ -3701,7 +3682,7 @@ function SearchEngineIndexedSwitch({
|
|
|
3701
3682
|
}
|
|
3702
3683
|
|
|
3703
3684
|
// src/react/sheet/RowControls.tsx
|
|
3704
|
-
var
|
|
3685
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3705
3686
|
var SAYS_SLOT_KEYS = [...import_core31.SHOWN_TO_ORDER, "default"];
|
|
3706
3687
|
function RowControls({
|
|
3707
3688
|
resourceType,
|
|
@@ -3739,15 +3720,15 @@ function RowControls({
|
|
|
3739
3720
|
setTimeout(() => setCopied(false), 2e3);
|
|
3740
3721
|
}, [publicUrl, toast]);
|
|
3741
3722
|
if (capsError) {
|
|
3742
|
-
return /* @__PURE__ */ (0,
|
|
3723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "rounded-lg border border-destructive/20 bg-destructive/10 p-3 text-xs text-destructive-ink", children: [
|
|
3743
3724
|
"Couldn't read this item's sharing options: ",
|
|
3744
3725
|
capsError,
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ShareErrorAlchemyMenu, { error: capsError })
|
|
3746
3727
|
] });
|
|
3747
3728
|
}
|
|
3748
3729
|
if (childRecord) return null;
|
|
3749
3730
|
if (!caps) {
|
|
3750
|
-
return /* @__PURE__ */ (0,
|
|
3731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("section", { "aria-hidden": "true", className: "invisible space-y-2 rounded-lg border p-3", "data-row-controls-reserved": "", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex h-8 items-center" }) });
|
|
3751
3732
|
}
|
|
3752
3733
|
const showShownTo = caps.shownToOffered && shownTo !== void 0;
|
|
3753
3734
|
const showPublish = publishable && caps.publishLane !== null;
|
|
@@ -3797,16 +3778,16 @@ function RowControls({
|
|
|
3797
3778
|
setBusy(null);
|
|
3798
3779
|
}
|
|
3799
3780
|
};
|
|
3800
|
-
return /* @__PURE__ */ (0,
|
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3801
3782
|
"section",
|
|
3802
3783
|
{
|
|
3803
3784
|
className: "space-y-2 rounded-lg border bg-muted/30 p-3",
|
|
3804
3785
|
"data-row-controls": true,
|
|
3805
3786
|
"data-published": isPublic ? "true" : "false",
|
|
3806
3787
|
children: [
|
|
3807
|
-
showShownTo && /* @__PURE__ */ (0,
|
|
3808
|
-
/* @__PURE__ */ (0,
|
|
3809
|
-
canChange ? /* @__PURE__ */ (0,
|
|
3788
|
+
showShownTo && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-2", "data-shown-to": shownTo ?? "default", children: [
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs font-medium", children: "Shown to" }),
|
|
3790
|
+
canChange ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3810
3791
|
import_design_system17.ToggleGroup,
|
|
3811
3792
|
{
|
|
3812
3793
|
type: "single",
|
|
@@ -3816,7 +3797,7 @@ function RowControls({
|
|
|
3816
3797
|
onValueChange: (v) => v && void chooseShownTo(v),
|
|
3817
3798
|
"aria-label": "Shown to",
|
|
3818
3799
|
className: "flex-wrap justify-end",
|
|
3819
|
-
children: shownChoices.map((v) => /* @__PURE__ */ (0,
|
|
3800
|
+
children: shownChoices.map((v) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3820
3801
|
import_design_system17.ToggleGroupItem,
|
|
3821
3802
|
{
|
|
3822
3803
|
value: v,
|
|
@@ -3828,16 +3809,16 @@ function RowControls({
|
|
|
3828
3809
|
v
|
|
3829
3810
|
))
|
|
3830
3811
|
}
|
|
3831
|
-
) : /* @__PURE__ */ (0,
|
|
3812
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-muted-foreground", children: shownTo ? import_core31.SHOWN_TO_WORDS[shownTo].label : "The default for this type" })
|
|
3832
3813
|
] }),
|
|
3833
3814
|
showShownTo && // ZERO LAYOUT SHIFT (Arman 2026-10-07): the sentence under "Shown to" changes with every
|
|
3834
3815
|
// choice and each one wraps to a different number of lines on a phone. The slot is a
|
|
3835
3816
|
// one-cell grid holding EVERY sentence, only the current one visible, so its height is the
|
|
3836
3817
|
// tallest one's at any width and nothing below it ever moves. The spinner's place is held
|
|
3837
3818
|
// too (invisible, never removed).
|
|
3838
|
-
/* @__PURE__ */ (0,
|
|
3819
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "grid text-xs text-muted-foreground", "data-shown-to-says-slot": "", children: SAYS_SLOT_KEYS.map((v) => {
|
|
3839
3820
|
const current = (shownTo ?? "default") === v;
|
|
3840
|
-
return /* @__PURE__ */ (0,
|
|
3821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3841
3822
|
"p",
|
|
3842
3823
|
{
|
|
3843
3824
|
className: (0, import_cn4.cn)("col-start-1 row-start-1", !current && "invisible"),
|
|
@@ -3847,7 +3828,7 @@ function RowControls({
|
|
|
3847
3828
|
v === "default" ? "Not set \u2014 the default for this type applies." : import_core31.SHOWN_TO_WORDS[v].says,
|
|
3848
3829
|
" ",
|
|
3849
3830
|
"A list setting, never who may open it.",
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
3831
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3851
3832
|
import_lucide_react11.Loader2,
|
|
3852
3833
|
{
|
|
3853
3834
|
className: (0, import_cn4.cn)(
|
|
@@ -3861,11 +3842,11 @@ function RowControls({
|
|
|
3861
3842
|
v
|
|
3862
3843
|
);
|
|
3863
3844
|
}) }),
|
|
3864
|
-
showPublish && /* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3867
|
-
/* @__PURE__ */ (0,
|
|
3868
|
-
/* @__PURE__ */ (0,
|
|
3845
|
+
showPublish && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_cn4.cn)("space-y-1.5", showShownTo && "border-t pt-2"), children: [
|
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3847
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs font-medium", children: "Published to the web" }),
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "flex items-center gap-3", children: [
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3869
3850
|
SearchEngineIndexedSwitch,
|
|
3870
3851
|
{
|
|
3871
3852
|
resourceType,
|
|
@@ -3873,8 +3854,8 @@ function RowControls({
|
|
|
3873
3854
|
publishedHint: isPublic
|
|
3874
3855
|
}
|
|
3875
3856
|
),
|
|
3876
|
-
busy === "publish" && /* @__PURE__ */ (0,
|
|
3877
|
-
canChange ? /* @__PURE__ */ (0,
|
|
3857
|
+
busy === "publish" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react11.Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
|
|
3858
|
+
canChange ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3878
3859
|
import_controls14.Switch,
|
|
3879
3860
|
{
|
|
3880
3861
|
checked: isPublic,
|
|
@@ -3882,16 +3863,16 @@ function RowControls({
|
|
|
3882
3863
|
disabled: busy === "publish",
|
|
3883
3864
|
"aria-label": "Published to the web"
|
|
3884
3865
|
}
|
|
3885
|
-
) : /* @__PURE__ */ (0,
|
|
3866
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs text-muted-foreground", children: isPublic ? "On" : "Off" })
|
|
3886
3867
|
] })
|
|
3887
3868
|
] }),
|
|
3888
|
-
/* @__PURE__ */ (0,
|
|
3889
|
-
isPublic && publicUrl && /* @__PURE__ */ (0,
|
|
3890
|
-
/* @__PURE__ */ (0,
|
|
3891
|
-
/* @__PURE__ */ (0,
|
|
3869
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-muted-foreground", children: isPublic ? publishSays : `When on: ${publishSays}` }),
|
|
3870
|
+
isPublic && publicUrl && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-1.5 rounded-md border bg-background p-1.5", children: [
|
|
3871
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 flex-1 truncate px-1 font-mono text-xs", children: publicUrl }),
|
|
3872
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3892
3873
|
import_controls16.Button,
|
|
3893
3874
|
{
|
|
3894
|
-
icon: copied ? /* @__PURE__ */ (0,
|
|
3875
|
+
icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react11.Check, {}) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react11.Copy, {}),
|
|
3895
3876
|
"aria-label": "Copy web address",
|
|
3896
3877
|
variant: "quiet",
|
|
3897
3878
|
className: "flex-shrink-0",
|
|
@@ -3907,7 +3888,7 @@ function RowControls({
|
|
|
3907
3888
|
}
|
|
3908
3889
|
|
|
3909
3890
|
// src/react/sheet/WhoCanSeeThis.tsx
|
|
3910
|
-
var
|
|
3891
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3911
3892
|
var LEVEL_WORD = {
|
|
3912
3893
|
viewer: "Viewer",
|
|
3913
3894
|
commenter: "Commenter",
|
|
@@ -3924,7 +3905,7 @@ function WhoCanSeeThis({
|
|
|
3924
3905
|
const { orgs } = useNavTree();
|
|
3925
3906
|
const [pending, setPending] = (0, import_react15.useState)(null);
|
|
3926
3907
|
const [said, setSaid] = (0, import_react15.useState)(null);
|
|
3927
|
-
if (!whoCanSee) return row ? /* @__PURE__ */ (0,
|
|
3908
|
+
if (!whoCanSee) return row ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RowControls, { ...row, canChange }) : null;
|
|
3928
3909
|
const orgName = whoCanSee.organizationName ?? (whoCanSee.organizationId ? orgs.find((o) => o.id === whoCanSee.organizationId)?.name : void 0) ?? "this organization";
|
|
3929
3910
|
const level = whoCanSee.memberDefaultLevel ? LEVEL_WORD[whoCanSee.memberDefaultLevel] ?? whoCanSee.memberDefaultLevel : null;
|
|
3930
3911
|
const options = [
|
|
@@ -3967,15 +3948,15 @@ function WhoCanSeeThis({
|
|
|
3967
3948
|
if (choice === whoCanSee.choice || pending) return;
|
|
3968
3949
|
void apply(choice);
|
|
3969
3950
|
};
|
|
3970
|
-
return /* @__PURE__ */ (0,
|
|
3951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3971
3952
|
"section",
|
|
3972
3953
|
{
|
|
3973
3954
|
className: "space-y-1.5 p-3 bg-muted/30 rounded-lg border",
|
|
3974
3955
|
"data-who-can-see": true,
|
|
3975
3956
|
"data-lane": whoCanSee.choice,
|
|
3976
3957
|
children: [
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
3978
|
-
canChange ? /* @__PURE__ */ (0,
|
|
3958
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs font-medium", children: "Who can see this" }),
|
|
3959
|
+
canChange ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3979
3960
|
"div",
|
|
3980
3961
|
{
|
|
3981
3962
|
role: "radiogroup",
|
|
@@ -3984,8 +3965,8 @@ function WhoCanSeeThis({
|
|
|
3984
3965
|
children: options.map((o) => {
|
|
3985
3966
|
const Icon = o.icon;
|
|
3986
3967
|
const selected = o.choice === whoCanSee.choice;
|
|
3987
|
-
return /* @__PURE__ */ (0,
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
3968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative min-w-0", children: [
|
|
3969
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3989
3970
|
"button",
|
|
3990
3971
|
{
|
|
3991
3972
|
type: "button",
|
|
@@ -3999,7 +3980,7 @@ function WhoCanSeeThis({
|
|
|
3999
3980
|
selected ? "border-primary bg-background" : "border-transparent hover:bg-background/60"
|
|
4000
3981
|
),
|
|
4001
3982
|
children: [
|
|
4002
|
-
pending === o.choice ? /* @__PURE__ */ (0,
|
|
3983
|
+
pending === o.choice ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react12.Loader2, { className: "mt-0.5 h-4 w-4 flex-shrink-0 animate-spin text-primary" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4003
3984
|
Icon,
|
|
4004
3985
|
{
|
|
4005
3986
|
className: (0, import_cn5.cn)(
|
|
@@ -4008,17 +3989,17 @@ function WhoCanSeeThis({
|
|
|
4008
3989
|
)
|
|
4009
3990
|
}
|
|
4010
3991
|
),
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4013
|
-
/* @__PURE__ */ (0,
|
|
4014
|
-
selected && /* @__PURE__ */ (0,
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
3993
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex items-center gap-1 text-sm font-medium", children: [
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "min-w-0 break-words", children: o.label }),
|
|
3995
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react12.Check, { className: "h-3.5 w-3.5 flex-shrink-0 text-primary" })
|
|
4015
3996
|
] }),
|
|
4016
|
-
/* @__PURE__ */ (0,
|
|
3997
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block text-xs text-muted-foreground", children: o.says })
|
|
4017
3998
|
] })
|
|
4018
3999
|
]
|
|
4019
4000
|
}
|
|
4020
4001
|
),
|
|
4021
|
-
o.hint && /* @__PURE__ */ (0,
|
|
4002
|
+
o.hint && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4022
4003
|
InfoHint,
|
|
4023
4004
|
{
|
|
4024
4005
|
text: o.hint,
|
|
@@ -4029,16 +4010,16 @@ function WhoCanSeeThis({
|
|
|
4029
4010
|
] }, o.choice);
|
|
4030
4011
|
})
|
|
4031
4012
|
}
|
|
4032
|
-
) : /* @__PURE__ */ (0,
|
|
4033
|
-
/* @__PURE__ */ (0,
|
|
4013
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "text-sm", "data-who-can-see-text": true, children: [
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "font-medium", children: [
|
|
4034
4015
|
current.label,
|
|
4035
4016
|
"."
|
|
4036
4017
|
] }),
|
|
4037
4018
|
" ",
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4039
|
-
current.hint && /* @__PURE__ */ (0,
|
|
4019
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-xs text-muted-foreground", children: current.says }),
|
|
4020
|
+
current.hint && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(InfoHint, { text: current.hint, label: `About ${current.label}` })
|
|
4040
4021
|
] }),
|
|
4041
|
-
said && /* @__PURE__ */ (0,
|
|
4022
|
+
said && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4042
4023
|
"p",
|
|
4043
4024
|
{
|
|
4044
4025
|
className: (0, import_cn5.cn)(
|
|
@@ -4058,14 +4039,14 @@ function WhoCanSeeThis({
|
|
|
4058
4039
|
var import_react16 = require("react");
|
|
4059
4040
|
var import_lucide_react13 = require("lucide-react");
|
|
4060
4041
|
var import_controls17 = require("@ai-matrx/design-system/controls");
|
|
4061
|
-
var
|
|
4042
|
+
var import_design_system21 = require("@ai-matrx/design-system");
|
|
4062
4043
|
var import_controls18 = require("@ai-matrx/design-system/controls");
|
|
4044
|
+
var import_design_system22 = require("@ai-matrx/design-system");
|
|
4063
4045
|
var import_design_system23 = require("@ai-matrx/design-system");
|
|
4064
|
-
var import_design_system24 = require("@ai-matrx/design-system");
|
|
4065
4046
|
var import_vault2 = require("@ai-matrx/vault");
|
|
4066
4047
|
var import_core33 = require("@ai-matrx/sharing/core");
|
|
4067
4048
|
var import_format3 = require("@ai-matrx/kit/format");
|
|
4068
|
-
var
|
|
4049
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4069
4050
|
var STATUS_WORDS = {
|
|
4070
4051
|
pending: "Waiting to be opened",
|
|
4071
4052
|
viewed: "Opened",
|
|
@@ -4080,7 +4061,7 @@ function when(iso) {
|
|
|
4080
4061
|
return Number.isNaN(d.getTime()) ? "" : d.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" });
|
|
4081
4062
|
}
|
|
4082
4063
|
function SecureLinkPanel(props) {
|
|
4083
|
-
return /* @__PURE__ */ (0,
|
|
4064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_vault2.IdentityGate, { identity: vaultIdentity(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SecureLinkForm, { ...props }) });
|
|
4084
4065
|
}
|
|
4085
4066
|
function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
4086
4067
|
const dispatch = useAppDispatch();
|
|
@@ -4193,18 +4174,18 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4193
4174
|
}
|
|
4194
4175
|
}
|
|
4195
4176
|
const protectedFields = options?.protected_fields ?? [];
|
|
4196
|
-
return /* @__PURE__ */ (0,
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-4", children: [
|
|
4178
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-start gap-2 rounded-lg border border-border bg-muted/30 p-3", children: [
|
|
4179
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.ShieldCheck, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-primary" }),
|
|
4180
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
4200
4181
|
"They get a link that opens once, and a code on a separate channel. No account needed.",
|
|
4201
4182
|
options ? ` The link works for ${(0, import_format3.formatDurationMinutes)(options.link_ttl_minutes, { style: "long" })}.` : ""
|
|
4202
4183
|
] })
|
|
4203
4184
|
] }),
|
|
4204
|
-
/* @__PURE__ */ (0,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1", children: [
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_design_system22.Label, { htmlFor: "secure-email", className: "text-xs", children: "Their email" }),
|
|
4188
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4208
4189
|
import_controls18.Input,
|
|
4209
4190
|
{
|
|
4210
4191
|
id: "secure-email",
|
|
@@ -4216,9 +4197,9 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4216
4197
|
}
|
|
4217
4198
|
)
|
|
4218
4199
|
] }),
|
|
4219
|
-
/* @__PURE__ */ (0,
|
|
4220
|
-
/* @__PURE__ */ (0,
|
|
4221
|
-
/* @__PURE__ */ (0,
|
|
4200
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1", children: [
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_design_system22.Label, { htmlFor: "secure-phone", className: "text-xs", children: "Their mobile, for the code" }),
|
|
4202
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4222
4203
|
import_controls18.Input,
|
|
4223
4204
|
{
|
|
4224
4205
|
id: "secure-phone",
|
|
@@ -4235,9 +4216,9 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4235
4216
|
)
|
|
4236
4217
|
] })
|
|
4237
4218
|
] }),
|
|
4238
|
-
hasBoth ? /* @__PURE__ */ (0,
|
|
4239
|
-
/* @__PURE__ */ (0,
|
|
4240
|
-
/* @__PURE__ */ (0,
|
|
4219
|
+
hasBoth ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-wrap items-center gap-2 text-xs text-muted-foreground", children: [
|
|
4220
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Send the link by" }),
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4241
4222
|
import_design_system17.ToggleGroup,
|
|
4242
4223
|
{
|
|
4243
4224
|
type: "single",
|
|
@@ -4246,35 +4227,35 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4246
4227
|
value: linkChannel,
|
|
4247
4228
|
onValueChange: (v) => v && setLinkChannel(v),
|
|
4248
4229
|
children: [
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4250
|
-
/* @__PURE__ */ (0,
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_design_system17.ToggleGroupItem, { value: "email", "aria-label": "Link by email", children: [
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Mail, { className: "mr-1 h-3.5 w-3.5" }),
|
|
4251
4232
|
" Email"
|
|
4252
4233
|
] }),
|
|
4253
|
-
/* @__PURE__ */ (0,
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4234
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_design_system17.ToggleGroupItem, { value: "sms", "aria-label": "Link by text", children: [
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.MessageSquare, { className: "mr-1 h-3.5 w-3.5" }),
|
|
4255
4236
|
" Text"
|
|
4256
4237
|
] })
|
|
4257
4238
|
]
|
|
4258
4239
|
}
|
|
4259
4240
|
),
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4241
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
4261
4242
|
"and the code by ",
|
|
4262
4243
|
linkChannel === "email" ? "text" : "email",
|
|
4263
4244
|
"."
|
|
4264
4245
|
] })
|
|
4265
|
-
] }) : email.trim() !== "" ? /* @__PURE__ */ (0,
|
|
4266
|
-
optionsError ? /* @__PURE__ */ (0,
|
|
4246
|
+
] }) : email.trim() !== "" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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,
|
|
4247
|
+
optionsError ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "text-xs text-destructive", children: [
|
|
4267
4248
|
optionsError,
|
|
4268
|
-
/* @__PURE__ */ (0,
|
|
4249
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ShareErrorAlchemyMenu, { error: optionsError, operation: "Load the secure-link options" })
|
|
4269
4250
|
] }) : null,
|
|
4270
|
-
protectedFields.length > 0 ? /* @__PURE__ */ (0,
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4251
|
+
protectedFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("fieldset", { className: "space-y-2", children: [
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("legend", { className: "text-xs font-medium", children: [
|
|
4272
4253
|
"Include protected fields from ",
|
|
4273
4254
|
resourceName
|
|
4274
4255
|
] }),
|
|
4275
|
-
protectedFields.map((f) => /* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4277
|
-
|
|
4256
|
+
protectedFields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-start gap-2", children: [
|
|
4257
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4258
|
+
import_design_system21.Checkbox,
|
|
4278
4259
|
{
|
|
4279
4260
|
size: "sm",
|
|
4280
4261
|
id: `secure-field-${f.key}`,
|
|
@@ -4285,16 +4266,16 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4285
4266
|
)
|
|
4286
4267
|
}
|
|
4287
4268
|
),
|
|
4288
|
-
/* @__PURE__ */ (0,
|
|
4289
|
-
/* @__PURE__ */ (0,
|
|
4290
|
-
!f.available && f.reason ? /* @__PURE__ */ (0,
|
|
4269
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
4270
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_design_system22.Label, { htmlFor: `secure-field-${f.key}`, className: "text-sm", children: f.label }),
|
|
4271
|
+
!f.available && f.reason ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-muted-foreground", children: f.reason }) : null
|
|
4291
4272
|
] })
|
|
4292
4273
|
] }, f.key))
|
|
4293
4274
|
] }) : null,
|
|
4294
|
-
/* @__PURE__ */ (0,
|
|
4295
|
-
/* @__PURE__ */ (0,
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4297
|
-
|
|
4275
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1", children: [
|
|
4276
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_design_system22.Label, { htmlFor: "secure-note", className: "text-xs", children: "Message (optional, shown once with it)" }),
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4278
|
+
import_design_system23.Textarea,
|
|
4298
4279
|
{
|
|
4299
4280
|
id: "secure-note",
|
|
4300
4281
|
rows: 2,
|
|
@@ -4304,30 +4285,30 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4304
4285
|
}
|
|
4305
4286
|
)
|
|
4306
4287
|
] }),
|
|
4307
|
-
/* @__PURE__ */ (0,
|
|
4308
|
-
result ? /* @__PURE__ */ (0,
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_controls17.Button, { icon: sending ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react13.Loader2, { className: "animate-spin" }) : null, variant: "primary", className: "w-full", onClick: send, disabled: !canSend, children: "Send secure link" }),
|
|
4289
|
+
result ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4309
4290
|
"div",
|
|
4310
4291
|
{
|
|
4311
4292
|
className: result.tone === "error" ? "rounded-md border border-destructive/30 bg-destructive/10 p-2.5 text-sm text-destructive-ink" : result.tone === "warn" ? "rounded-md border border-amber-500/30 bg-amber-500/10 p-2.5 text-sm" : "rounded-md border border-border bg-muted/40 p-2.5 text-sm",
|
|
4312
4293
|
children: [
|
|
4313
|
-
/* @__PURE__ */ (0,
|
|
4314
|
-
result.remedy ? /* @__PURE__ */ (0,
|
|
4294
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: result.text }),
|
|
4295
|
+
result.remedy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 text-xs opacity-80", children: result.remedy }) : null
|
|
4315
4296
|
]
|
|
4316
4297
|
}
|
|
4317
4298
|
) : null,
|
|
4318
|
-
sent && sent.length > 0 ? /* @__PURE__ */ (0,
|
|
4319
|
-
/* @__PURE__ */ (0,
|
|
4320
|
-
/* @__PURE__ */ (0,
|
|
4321
|
-
/* @__PURE__ */ (0,
|
|
4322
|
-
/* @__PURE__ */ (0,
|
|
4323
|
-
/* @__PURE__ */ (0,
|
|
4299
|
+
sent && sent.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
4300
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "mb-2 text-sm font-medium", children: "Sent securely" }),
|
|
4301
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "divide-y divide-border rounded-lg border border-border", children: sent.map((row) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("li", { className: "flex items-center justify-between gap-2 p-2.5 text-sm", children: [
|
|
4302
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "min-w-0", children: [
|
|
4303
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "truncate", children: row.recipient_email ?? row.recipient_phone }),
|
|
4304
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
4324
4305
|
STATUS_WORDS[row.status] ?? row.status,
|
|
4325
4306
|
row.status === "viewed" && row.viewed_at ? ` ${when(row.viewed_at)}` : "",
|
|
4326
4307
|
row.status === "pending" ? ` \xB7 until ${when(row.expires_at)}` : "",
|
|
4327
4308
|
row.field_keys.length > 0 ? ` \xB7 with ${row.field_keys.join(", ")}` : ""
|
|
4328
4309
|
] })
|
|
4329
4310
|
] }),
|
|
4330
|
-
row.status === "pending" ? /* @__PURE__ */ (0,
|
|
4311
|
+
row.status === "pending" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_controls17.Button, { variant: "outline", onClick: () => void turnOff(row), children: "Turn off" }) : null
|
|
4331
4312
|
] }, row.id)) })
|
|
4332
4313
|
] }) : null
|
|
4333
4314
|
] });
|
|
@@ -4363,7 +4344,7 @@ function useKeepFocusInDialog() {
|
|
|
4363
4344
|
}
|
|
4364
4345
|
|
|
4365
4346
|
// src/react/sheet/ShareModal.tsx
|
|
4366
|
-
var
|
|
4347
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
4367
4348
|
function ShareModal({
|
|
4368
4349
|
levelWording = "roles",
|
|
4369
4350
|
isOpen,
|
|
@@ -4505,44 +4486,44 @@ function ShareModal({
|
|
|
4505
4486
|
const userPermissions = permissions.filter((p) => p.grantedToUserId);
|
|
4506
4487
|
const publicPermission = permissions.find((p) => p.isPublic);
|
|
4507
4488
|
const resourceLabel = resourceNoun ?? (0, import_core35.getResourceTypeLabel)(resourceType);
|
|
4508
|
-
const manageBlockedNotice = ownerUnknown ? /* @__PURE__ */ (0,
|
|
4509
|
-
/* @__PURE__ */ (0,
|
|
4510
|
-
/* @__PURE__ */ (0,
|
|
4511
|
-
/* @__PURE__ */ (0,
|
|
4489
|
+
const manageBlockedNotice = ownerUnknown ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "p-3 rounded-lg border border-destructive/20 bg-destructive/10 flex items-start gap-2", children: [
|
|
4490
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react15.AlertTriangle, { className: "h-4 w-4 text-destructive flex-shrink-0 mt-0.5" }),
|
|
4491
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
4492
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "text-sm font-medium text-destructive", children: [
|
|
4512
4493
|
"Couldn't confirm whether you may change sharing on this",
|
|
4513
4494
|
" ",
|
|
4514
4495
|
resourceLabel.toLowerCase()
|
|
4515
4496
|
] }),
|
|
4516
|
-
/* @__PURE__ */ (0,
|
|
4497
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "text-xs text-destructive/80 mt-0.5", children: [
|
|
4517
4498
|
ownerError,
|
|
4518
4499
|
" ",
|
|
4519
|
-
/* @__PURE__ */ (0,
|
|
4500
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShareErrorAlchemyMenu, { error: ownerError })
|
|
4520
4501
|
] })
|
|
4521
4502
|
] })
|
|
4522
|
-
] }) : /* @__PURE__ */ (0,
|
|
4523
|
-
/* @__PURE__ */ (0,
|
|
4524
|
-
/* @__PURE__ */ (0,
|
|
4525
|
-
/* @__PURE__ */ (0,
|
|
4503
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "p-3 rounded-lg border bg-muted/30 flex items-start gap-2", children: [
|
|
4504
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react15.Lock, { className: "h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
|
|
4505
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
4506
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "text-sm font-medium", children: [
|
|
4526
4507
|
"You need Full access on this ",
|
|
4527
4508
|
resourceLabel.toLowerCase(),
|
|
4528
4509
|
" to change who can see it"
|
|
4529
4510
|
] }),
|
|
4530
|
-
/* @__PURE__ */ (0,
|
|
4511
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Deciding who else may is what Full access means (View < Comment < Edit < Full access). Ask whoever has it, or an owner of the organization. The Access tab still shows you everyone who can reach this and why." })
|
|
4531
4512
|
] })
|
|
4532
4513
|
] });
|
|
4533
|
-
const shareBlockedNotice = grantable.loading ? null : /* @__PURE__ */ (0,
|
|
4534
|
-
/* @__PURE__ */ (0,
|
|
4535
|
-
/* @__PURE__ */ (0,
|
|
4514
|
+
const shareBlockedNotice = grantable.loading ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "p-3 rounded-lg border bg-muted/30 flex items-start gap-2", children: [
|
|
4515
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react15.Lock, { className: "h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
|
|
4516
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm", children: grantable.error ?? grantable.levels.viewer ?? "You need Edit or Full access on this to share it." })
|
|
4536
4517
|
] });
|
|
4537
|
-
return /* @__PURE__ */ (0,
|
|
4538
|
-
/* @__PURE__ */ (0,
|
|
4539
|
-
/* @__PURE__ */ (0,
|
|
4540
|
-
/* @__PURE__ */ (0,
|
|
4518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system2.Dialog, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_design_system2.DialogContent, { ref: keepFocusInside, className: "max-w-2xl max-h-[90dvh] flex flex-col", children: [
|
|
4519
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system2.DialogHeader, { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-start justify-between gap-2 pr-10", children: [
|
|
4520
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
4521
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_design_system2.DialogTitle, { className: "flex items-center gap-1.5", children: [
|
|
4541
4522
|
"Share ",
|
|
4542
4523
|
resourceLabel,
|
|
4543
|
-
/* @__PURE__ */ (0,
|
|
4524
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PageCaptureButton, { size: "xs" })
|
|
4544
4525
|
] }),
|
|
4545
|
-
/* @__PURE__ */ (0,
|
|
4526
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system2.DialogDescription, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4546
4527
|
ShareEntityRef,
|
|
4547
4528
|
{
|
|
4548
4529
|
token: resourceType,
|
|
@@ -4553,61 +4534,61 @@ function ShareModal({
|
|
|
4553
4534
|
}
|
|
4554
4535
|
) }) })
|
|
4555
4536
|
] }),
|
|
4556
|
-
/* @__PURE__ */ (0,
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4557
4538
|
import_controls20.Button,
|
|
4558
4539
|
{
|
|
4559
|
-
icon: emailingLink ? /* @__PURE__ */ (0,
|
|
4540
|
+
icon: emailingLink ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Loader2, { className: "animate-spin" }) : emailSent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.CheckCircle, { className: "text-green-500" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Mail, {}),
|
|
4560
4541
|
variant: "outline",
|
|
4561
4542
|
onClick: handleEmailLink,
|
|
4562
4543
|
disabled: emailingLink,
|
|
4563
4544
|
className: "flex-shrink-0",
|
|
4564
|
-
children: /* @__PURE__ */ (0,
|
|
4545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
|
|
4565
4546
|
}
|
|
4566
4547
|
)
|
|
4567
4548
|
] }) }),
|
|
4568
|
-
configError && /* @__PURE__ */ (0,
|
|
4569
|
-
/* @__PURE__ */ (0,
|
|
4570
|
-
/* @__PURE__ */ (0,
|
|
4571
|
-
/* @__PURE__ */ (0,
|
|
4549
|
+
configError && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex-1 flex flex-col items-center justify-center gap-2 py-10 px-6 text-center", children: [
|
|
4550
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react15.AlertTriangle, { className: "h-8 w-8 text-destructive" }),
|
|
4551
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm font-medium", children: "Sharing is unavailable" }),
|
|
4552
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "text-xs text-muted-foreground max-w-sm", children: [
|
|
4572
4553
|
configError,
|
|
4573
|
-
/* @__PURE__ */ (0,
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShareErrorAlchemyMenu, { error: configError })
|
|
4574
4555
|
] })
|
|
4575
4556
|
] }),
|
|
4576
|
-
!configError && resolvingOwner && /* @__PURE__ */ (0,
|
|
4577
|
-
/* @__PURE__ */ (0,
|
|
4578
|
-
/* @__PURE__ */ (0,
|
|
4579
|
-
/* @__PURE__ */ (0,
|
|
4557
|
+
!configError && resolvingOwner && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex-1 space-y-3 py-4", "aria-busy": "true", children: [
|
|
4558
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system25.Skeleton, { className: "h-9 w-full" }),
|
|
4559
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system25.Skeleton, { className: "h-24 w-full" }),
|
|
4560
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system25.Skeleton, { className: "h-32 w-full" })
|
|
4580
4561
|
] }),
|
|
4581
|
-
!configError && !resolvingOwner && /* @__PURE__ */ (0,
|
|
4582
|
-
|
|
4562
|
+
!configError && !resolvingOwner && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4563
|
+
import_design_system24.Tabs,
|
|
4583
4564
|
{
|
|
4584
4565
|
value: activeTab,
|
|
4585
4566
|
onValueChange: (value) => setActiveTab(value),
|
|
4586
4567
|
className: "flex-1 flex flex-col min-h-0",
|
|
4587
4568
|
children: [
|
|
4588
|
-
/* @__PURE__ */ (0,
|
|
4589
|
-
/* @__PURE__ */ (0,
|
|
4590
|
-
/* @__PURE__ */ (0,
|
|
4591
|
-
/* @__PURE__ */ (0,
|
|
4592
|
-
userPermissions.length > 0 && /* @__PURE__ */ (0,
|
|
4569
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_controls19.TabsList, { fill: true, className: "flex-shrink-0", children: [
|
|
4570
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ShareTabsTrigger, { value: "users", children: [
|
|
4571
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Users, { className: "w-4 h-4" }),
|
|
4572
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "hidden sm:inline", children: "Users" }),
|
|
4573
|
+
userPermissions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-primary/10 rounded-full", children: userPermissions.length })
|
|
4593
4574
|
] }),
|
|
4594
|
-
/* @__PURE__ */ (0,
|
|
4595
|
-
/* @__PURE__ */ (0,
|
|
4596
|
-
/* @__PURE__ */ (0,
|
|
4597
|
-
publicPermission && /* @__PURE__ */ (0,
|
|
4575
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ShareTabsTrigger, { value: "public", children: [
|
|
4576
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.Globe, { className: "w-4 h-4" }),
|
|
4577
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "hidden sm:inline", children: "Anyone link" }),
|
|
4578
|
+
publicPermission && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-green-500/10 rounded-full", children: "\u2022" })
|
|
4598
4579
|
] }),
|
|
4599
|
-
/* @__PURE__ */ (0,
|
|
4600
|
-
/* @__PURE__ */ (0,
|
|
4601
|
-
/* @__PURE__ */ (0,
|
|
4580
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ShareTabsTrigger, { value: "secure", children: [
|
|
4581
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.ShieldCheck, { className: "w-4 h-4" }),
|
|
4582
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "hidden sm:inline", children: "Secure link" })
|
|
4602
4583
|
] }),
|
|
4603
|
-
/* @__PURE__ */ (0,
|
|
4604
|
-
/* @__PURE__ */ (0,
|
|
4605
|
-
/* @__PURE__ */ (0,
|
|
4584
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ShareTabsTrigger, { value: "access", children: [
|
|
4585
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react14.KeyRound, { className: "w-4 h-4" }),
|
|
4586
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "hidden sm:inline", children: "Access" })
|
|
4606
4587
|
] })
|
|
4607
4588
|
] }),
|
|
4608
|
-
/* @__PURE__ */ (0,
|
|
4609
|
-
/* @__PURE__ */ (0,
|
|
4610
|
-
/* @__PURE__ */ (0,
|
|
4589
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dialog-scroll-clear-floating flex-1 mt-3 min-h-0 overflow-y-auto", children: [
|
|
4590
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_design_system24.TabsContent, { value: "users", className: "mt-0 space-y-3", children: [
|
|
4591
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4611
4592
|
WhoCanSeeThis,
|
|
4612
4593
|
{
|
|
4613
4594
|
whoCanSee,
|
|
@@ -4628,9 +4609,9 @@ function ShareModal({
|
|
|
4628
4609
|
}
|
|
4629
4610
|
}
|
|
4630
4611
|
),
|
|
4631
|
-
/* @__PURE__ */ (0,
|
|
4632
|
-
/* @__PURE__ */ (0,
|
|
4633
|
-
!isOwner && !loading && userPermissions.length === 0 ? /* @__PURE__ */ (0,
|
|
4612
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
4613
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-sm font-medium mb-2", children: "Current Access" }),
|
|
4614
|
+
!isOwner && !loading && userPermissions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "rounded-lg border bg-muted/30 p-3 text-xs text-muted-foreground", children: "The list of people with access is visible to the owner and Admins." }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4634
4615
|
PermissionsList,
|
|
4635
4616
|
{
|
|
4636
4617
|
permissions: userPermissions,
|
|
@@ -4645,7 +4626,7 @@ function ShareModal({
|
|
|
4645
4626
|
}
|
|
4646
4627
|
}
|
|
4647
4628
|
),
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4629
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4649
4630
|
OrgAvailabilityNote,
|
|
4650
4631
|
{
|
|
4651
4632
|
permissions: permissions.filter(
|
|
@@ -4655,7 +4636,7 @@ function ShareModal({
|
|
|
4655
4636
|
}
|
|
4656
4637
|
)
|
|
4657
4638
|
] }),
|
|
4658
|
-
canShare ? /* @__PURE__ */ (0,
|
|
4639
|
+
canShare ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4659
4640
|
ShareWithUserTab,
|
|
4660
4641
|
{
|
|
4661
4642
|
levelWording,
|
|
@@ -4689,7 +4670,7 @@ function ShareModal({
|
|
|
4689
4670
|
} : {}
|
|
4690
4671
|
}
|
|
4691
4672
|
) : shareBlockedNotice,
|
|
4692
|
-
outsideShare ? /* @__PURE__ */ (0,
|
|
4673
|
+
outsideShare ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4693
4674
|
OutsideSharePanel,
|
|
4694
4675
|
{
|
|
4695
4676
|
organizationId: outsideShare.organizationId,
|
|
@@ -4700,8 +4681,8 @@ function ShareModal({
|
|
|
4700
4681
|
}
|
|
4701
4682
|
) : null
|
|
4702
4683
|
] }),
|
|
4703
|
-
/* @__PURE__ */ (0,
|
|
4704
|
-
/* @__PURE__ */ (0,
|
|
4684
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_design_system24.TabsContent, { value: "access", className: "mt-0", children: [
|
|
4685
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4705
4686
|
AccessSummaryPanel,
|
|
4706
4687
|
{
|
|
4707
4688
|
entityType: resourceType,
|
|
@@ -4710,9 +4691,9 @@ function ShareModal({
|
|
|
4710
4691
|
refreshToken: permissions.map((p) => `${p.id}:${p.permissionLevel}`).join("|")
|
|
4711
4692
|
}
|
|
4712
4693
|
),
|
|
4713
|
-
resourceType === "record" && isOwner ? /* @__PURE__ */ (0,
|
|
4694
|
+
resourceType === "record" && isOwner ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WhoCouldSeeOn, { recordId: resourceId }) : null
|
|
4714
4695
|
] }),
|
|
4715
|
-
/* @__PURE__ */ (0,
|
|
4696
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system24.TabsContent, { value: "secure", className: "mt-0", children: isOwner ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4716
4697
|
SecureLinkPanel,
|
|
4717
4698
|
{
|
|
4718
4699
|
resourceType,
|
|
@@ -4720,7 +4701,7 @@ function ShareModal({
|
|
|
4720
4701
|
resourceName
|
|
4721
4702
|
}
|
|
4722
4703
|
) : manageBlockedNotice }),
|
|
4723
|
-
/* @__PURE__ */ (0,
|
|
4704
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_design_system24.TabsContent, { value: "public", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4724
4705
|
PublicAccessTab,
|
|
4725
4706
|
{
|
|
4726
4707
|
publicPermission,
|
|
@@ -4734,9 +4715,9 @@ function ShareModal({
|
|
|
4734
4715
|
]
|
|
4735
4716
|
}
|
|
4736
4717
|
),
|
|
4737
|
-
error && /* @__PURE__ */ (0,
|
|
4738
|
-
/* @__PURE__ */ (0,
|
|
4739
|
-
/* @__PURE__ */ (0,
|
|
4718
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "mt-3 p-2.5 bg-destructive/10 border border-destructive/20 rounded-md flex-shrink-0", children: [
|
|
4719
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-destructive", children: error }),
|
|
4720
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShareErrorAlchemyMenu, { error })
|
|
4740
4721
|
] })
|
|
4741
4722
|
] }) });
|
|
4742
4723
|
}
|