@arbidocs/blocks 0.4.62 → 0.4.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/files/ExportParts.d.ts +12 -6
- package/dist/files/TransferParts.d.ts +97 -0
- package/dist/files/index.cjs +357 -62
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +352 -65
- package/dist/files/index.js.map +1 -1
- package/package.json +4 -4
package/dist/files/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { documentGridLayoutProps, resolveDocumentGridLayout, type DocumentGridLa
|
|
|
10
10
|
export { RejectedFilesList, SelectedFilesList, UploadErrorMessage, UploadProgress, DEFAULT_UPLOAD_PARTS_LABELS, type RejectedFilesTestIds, type SelectedFilesTestIds, type UploadPartsLabels, type RejectedFile, type RejectedFilesListProps, type SelectedFilesListProps, type UploadProgressProps, } from './UploadParts';
|
|
11
11
|
export { UploadFrame, UploadDropArea, UploadBrowseButtons, UploadSourcePicker, UploadUrlButton, UploadSourceSection, DEFAULT_UPLOAD_SOURCES_LABELS, type UploadFrameProps, type UploadDropAreaProps, type UploadBrowseButtonsProps, type UploadSourceOption, type UploadSourcePickerProps, type UploadUrlButtonProps, type UploadSourceSectionProps, type UploadSourcesLabels, } from './UploadSources';
|
|
12
12
|
export { ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, DEFAULT_EXPORT_LABELS, type ExportLabels, type ExportResultsTestIds, type ExportColumnsMode, type ExportFooterProps, type ExportMethodChooserProps, type ExportMode, type ExportModalTitleProps, type ExportResultRowView, type ExportResultsReportProps, type ExportWorkspaceOption, type ExportWorkspacePickerProps, } from './ExportParts';
|
|
13
|
+
export { DEFAULT_TRANSFER_LABELS, TransferConflictChooser, TransferKindsPicker, TransferPlanSummary, TransferProgressView, TransferReferencesChooser, TransferResumeBanner, TransferScopeChooser, type TransferConflictChoice, type TransferKindOption, type TransferKindsPickerProps, type TransferLabelOption, type TransferLabels, type TransferPlanSummaryProps, type TransferProgressViewProps, type TransferReferencesChoice, type TransferScopeChoice, type TransferScopeChooserProps, } from './TransferParts';
|
|
13
14
|
export { PdfPageNav, ViewerZoomControl, ViewerFrame, ViewerImageActions, ViewerMessage, ViewerTitle, DEFAULT_VIEWER_LABELS, type PdfPageNavProps, type ViewerZoomControlProps, type ViewerFrameTestIds, type ViewerLabels, type ViewerFrameProps, type ViewerImageActionsProps, type ViewerTitleProps, } from './ViewerChrome';
|
|
14
15
|
export { ViewerHeaderStart, ViewerHeaderEnd, ViewerStatusNote, ViewerPane, ViewerRenderedPane, } from './ViewerLayout';
|
|
15
16
|
export { MoveToFolderDialog, DEFAULT_MOVE_TO_FOLDER_LABELS, type MoveToFolderDialogProps, type MoveToFolderLabels, type MoveToFolderTestIds, } from './MoveToFolderDialog';
|
package/dist/files/index.js
CHANGED
|
@@ -17,8 +17,8 @@ import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-CPMNAJLF.
|
|
|
17
17
|
import '../chunk-TJMKFY5P.js';
|
|
18
18
|
import { testIdOr } from '../chunk-7F6CBP3Z.js';
|
|
19
19
|
import { memo, useState, useRef, useEffect, forwardRef, useMemo, useCallback } from 'react';
|
|
20
|
-
import { Check, Minus, PencilLine, Loader2, UploadCloud, Folder, LoaderCircle, Sparkles, AlertCircle, X, FolderOpen, Upload, FileText, FolderPlus, Globe, Download,
|
|
21
|
-
import { cn, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Tooltip, TooltipTrigger, TooltipContent, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem,
|
|
20
|
+
import { Check, Minus, PencilLine, Loader2, UploadCloud, Folder, LoaderCircle, Sparkles, AlertCircle, X, FolderOpen, Upload, FileText, FolderPlus, Globe, Download, Copy, FolderInput, Users, XCircle, AlertTriangle, CheckCircle2, Info, RotateCcw, Share2, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, CopyX, Plus, Tags, StickyNote, Columns2, ChevronDown, BookMarked, ExternalLink, Square, RefreshCw, Settings, Unplug, CalendarDays, CheckCircle, CircleSlash, Hourglass, Mail, CornerDownRight, CornerRightDown, GitFork, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, Pencil, Trash2, SquareCheckBig, NotebookPen, MoreHorizontal, ArrowRightFromLine, Hash, ArrowDownToLine, Tag, Bot, Calendar, Search, List, Columns3, Save, Undo2, CheckIcon, ArrowUpDown, FolderUp, FileX, ChevronsUpDown, Table2, ArrowRightLeft } from 'lucide-react';
|
|
21
|
+
import { cn, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Tooltip, TooltipTrigger, TooltipContent, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Checkbox, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DialogHeader, CommandSeparator, getTagTypeIcon, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Switch } from '@arbidocs/react/ui';
|
|
22
22
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
23
23
|
import { cva } from 'class-variance-authority';
|
|
24
24
|
|
|
@@ -1138,18 +1138,20 @@ function UploadSourceSection({
|
|
|
1138
1138
|
);
|
|
1139
1139
|
}
|
|
1140
1140
|
var DEFAULT_EXPORT_LABELS = {
|
|
1141
|
-
export: "Export",
|
|
1141
|
+
export: "Export, copy or move",
|
|
1142
1142
|
selected: (count) => `${count} selected`,
|
|
1143
|
-
exportMethod: "
|
|
1144
|
-
downloadToComputer: "Download
|
|
1145
|
-
downloadDescription: "
|
|
1146
|
-
|
|
1143
|
+
exportMethod: "Where to",
|
|
1144
|
+
downloadToComputer: "Download as files",
|
|
1145
|
+
downloadDescription: "A ZIP with the files (every version), one data file per kind (JSON) and a manifest",
|
|
1146
|
+
copyToWorkspace: "Copy to another workspace",
|
|
1147
|
+
copyDescription: "Re-encrypted for the target workspace; nothing changes here",
|
|
1148
|
+
moveToWorkspace: "Move to another workspace",
|
|
1149
|
+
moveDescription: "Copied first, then removed from here \u2014 only what you may delete here",
|
|
1150
|
+
exportColumns: "Document table (index.csv)",
|
|
1147
1151
|
columnsVisible: "Visible columns (from current table view)",
|
|
1148
1152
|
columnsAll: "All columns (including hidden)",
|
|
1149
|
-
columnsFiles: "
|
|
1150
|
-
columnsHelp: "
|
|
1151
|
-
exportToWorkspace: "Export to Another Workspace",
|
|
1152
|
-
exportToWorkspaceDescription: "Copy documents to another workspace in ARBI",
|
|
1153
|
+
columnsFiles: "None (files and data only)",
|
|
1154
|
+
columnsHelp: "Which document columns go into index.csv",
|
|
1153
1155
|
selectTargetWorkspace: "Select Target Workspace",
|
|
1154
1156
|
noOtherWorkspaces: "No other workspaces available",
|
|
1155
1157
|
member: "member",
|
|
@@ -1170,7 +1172,7 @@ function ExportModalTitle({
|
|
|
1170
1172
|
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
1171
1173
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1172
1174
|
/* @__PURE__ */ jsx("span", { children: l.export }),
|
|
1173
|
-
/* @__PURE__ */ jsx(Badge, { className: "bg-accent px-2.5 py-0.5 text-accent-foreground hover:bg-accent", children: /* @__PURE__ */ jsx("span", { className: "font-semibold", children: l.selected(selectedCount) }) })
|
|
1175
|
+
selectedCount > 0 && /* @__PURE__ */ jsx(Badge, { className: "bg-accent px-2.5 py-0.5 text-accent-foreground hover:bg-accent", children: /* @__PURE__ */ jsx("span", { className: "font-semibold", children: l.selected(selectedCount) }) })
|
|
1174
1176
|
] }),
|
|
1175
1177
|
workspace && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5 text-sm font-normal text-muted-foreground", children: [
|
|
1176
1178
|
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: workspace.icon }),
|
|
@@ -1186,73 +1188,91 @@ function ExportMethodChooser({
|
|
|
1186
1188
|
onModeChange,
|
|
1187
1189
|
columnsMode,
|
|
1188
1190
|
onColumnsModeChange,
|
|
1191
|
+
showColumns = true,
|
|
1192
|
+
moveDisabledReason,
|
|
1189
1193
|
labels,
|
|
1190
1194
|
columnsTestId
|
|
1191
1195
|
}) {
|
|
1192
1196
|
const l = { ...DEFAULT_EXPORT_LABELS, ...labels };
|
|
1193
1197
|
const card = "flex cursor-pointer items-start space-x-3 rounded-lg bg-muted p-4 transition-colors hover:bg-accent";
|
|
1198
|
+
const options = [
|
|
1199
|
+
{
|
|
1200
|
+
value: "download",
|
|
1201
|
+
icon: Download,
|
|
1202
|
+
title: l.downloadToComputer,
|
|
1203
|
+
description: l.downloadDescription
|
|
1204
|
+
},
|
|
1205
|
+
{ value: "copy", icon: Copy, title: l.copyToWorkspace, description: l.copyDescription },
|
|
1206
|
+
{
|
|
1207
|
+
value: "move",
|
|
1208
|
+
icon: FolderInput,
|
|
1209
|
+
title: l.moveToWorkspace,
|
|
1210
|
+
description: moveDisabledReason ?? l.moveDescription,
|
|
1211
|
+
disabledReason: moveDisabledReason
|
|
1212
|
+
}
|
|
1213
|
+
];
|
|
1194
1214
|
return /* @__PURE__ */ jsxs(ModalSection, { children: [
|
|
1195
1215
|
/* @__PURE__ */ jsx(ModalSectionTitle, { children: l.exportMethod }),
|
|
1196
|
-
/* @__PURE__ */
|
|
1216
|
+
/* @__PURE__ */ jsx(
|
|
1197
1217
|
RadioGroup,
|
|
1198
1218
|
{
|
|
1199
1219
|
value: mode,
|
|
1200
1220
|
onValueChange: (v) => onModeChange(v),
|
|
1201
1221
|
className: "space-y-3",
|
|
1202
|
-
children:
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
/* @__PURE__ */ jsx(Download, { className: "size-4" }),
|
|
1213
|
-
l.downloadToComputer
|
|
1214
|
-
]
|
|
1215
|
-
}
|
|
1216
|
-
),
|
|
1217
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: l.downloadDescription }),
|
|
1218
|
-
mode === "download" && /* @__PURE__ */ jsxs("div", { className: "mt-3", onClick: (e) => e.stopPropagation(), children: [
|
|
1219
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-foreground", children: l.exportColumns }),
|
|
1220
|
-
/* @__PURE__ */ jsxs(
|
|
1221
|
-
"select",
|
|
1222
|
+
children: options.map((option) => {
|
|
1223
|
+
const Icon = option.icon;
|
|
1224
|
+
const disabled = !!option.disabledReason;
|
|
1225
|
+
return /* @__PURE__ */ jsxs(
|
|
1226
|
+
"div",
|
|
1227
|
+
{
|
|
1228
|
+
className: cn(card, disabled && "cursor-not-allowed opacity-60 hover:bg-muted"),
|
|
1229
|
+
children: [
|
|
1230
|
+
/* @__PURE__ */ jsx(
|
|
1231
|
+
RadioGroupItem,
|
|
1222
1232
|
{
|
|
1223
|
-
value:
|
|
1224
|
-
|
|
1225
|
-
className: "mt-1
|
|
1226
|
-
|
|
1227
|
-
children: [
|
|
1228
|
-
/* @__PURE__ */ jsx("option", { value: "visible", children: l.columnsVisible }),
|
|
1229
|
-
/* @__PURE__ */ jsx("option", { value: "all", children: l.columnsAll }),
|
|
1230
|
-
/* @__PURE__ */ jsx("option", { value: "files", children: l.columnsFiles })
|
|
1231
|
-
]
|
|
1233
|
+
value: option.value,
|
|
1234
|
+
id: `export-mode-${option.value}`,
|
|
1235
|
+
className: "mt-1",
|
|
1236
|
+
disabled
|
|
1232
1237
|
}
|
|
1233
1238
|
),
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
children:
|
|
1247
|
-
|
|
1248
|
-
l.
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1239
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", onClick: () => !disabled && onModeChange(option.value), children: [
|
|
1240
|
+
/* @__PURE__ */ jsxs(
|
|
1241
|
+
Label,
|
|
1242
|
+
{
|
|
1243
|
+
htmlFor: `export-mode-${option.value}`,
|
|
1244
|
+
className: "flex cursor-pointer items-center gap-2 font-medium",
|
|
1245
|
+
children: [
|
|
1246
|
+
/* @__PURE__ */ jsx(Icon, { className: "size-4" }),
|
|
1247
|
+
option.title
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: option.description }),
|
|
1252
|
+
option.value === "download" && mode === "download" && showColumns && /* @__PURE__ */ jsxs("div", { className: "mt-3", onClick: (e) => e.stopPropagation(), children: [
|
|
1253
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-foreground", children: l.exportColumns }),
|
|
1254
|
+
/* @__PURE__ */ jsxs(
|
|
1255
|
+
"select",
|
|
1256
|
+
{
|
|
1257
|
+
value: columnsMode,
|
|
1258
|
+
onChange: (e) => onColumnsModeChange(e.target.value),
|
|
1259
|
+
className: "mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm pointer-coarse:min-h-11",
|
|
1260
|
+
"data-testid": testIdOr(columnsTestId, { testId: "export-columns-selector" }),
|
|
1261
|
+
children: [
|
|
1262
|
+
/* @__PURE__ */ jsx("option", { value: "visible", children: l.columnsVisible }),
|
|
1263
|
+
/* @__PURE__ */ jsx("option", { value: "all", children: l.columnsAll }),
|
|
1264
|
+
/* @__PURE__ */ jsx("option", { value: "files", children: l.columnsFiles })
|
|
1265
|
+
]
|
|
1266
|
+
}
|
|
1267
|
+
),
|
|
1268
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-muted-foreground", children: l.columnsHelp })
|
|
1269
|
+
] })
|
|
1270
|
+
] })
|
|
1271
|
+
]
|
|
1272
|
+
},
|
|
1273
|
+
option.value
|
|
1274
|
+
);
|
|
1275
|
+
})
|
|
1256
1276
|
}
|
|
1257
1277
|
)
|
|
1258
1278
|
] });
|
|
@@ -1393,6 +1413,273 @@ function ExportFooter({
|
|
|
1393
1413
|
)
|
|
1394
1414
|
] });
|
|
1395
1415
|
}
|
|
1416
|
+
var DEFAULT_TRANSFER_LABELS = {
|
|
1417
|
+
what: "What",
|
|
1418
|
+
scopeSelection: (count) => `The ${count} selected`,
|
|
1419
|
+
scopeLabel: "Everything with a label",
|
|
1420
|
+
scopeAll: "Everything in this workspace",
|
|
1421
|
+
chooseLabel: "Label",
|
|
1422
|
+
include: "Include",
|
|
1423
|
+
references: "Documents they cite",
|
|
1424
|
+
referencesInclude: "Bring them along",
|
|
1425
|
+
referencesLink: "Leave them here (the citation keeps pointing here)",
|
|
1426
|
+
referencesHelp: "Notes, conversations and automations can cite documents outside your selection.",
|
|
1427
|
+
conflicts: "Already in the target",
|
|
1428
|
+
conflictSkip: "Skip it (same-named file or automation, identical note)",
|
|
1429
|
+
conflictKeepBoth: 'Keep both \u2014 the copy is renamed "name (2)"',
|
|
1430
|
+
summary: "This will include",
|
|
1431
|
+
summaryLoading: "Working out what is included\u2026",
|
|
1432
|
+
hide: "Close \u2014 it keeps going",
|
|
1433
|
+
cancelJob: "Stop",
|
|
1434
|
+
resume: "Resume"
|
|
1435
|
+
};
|
|
1436
|
+
function TransferScopeChooser({
|
|
1437
|
+
scope,
|
|
1438
|
+
onScopeChange,
|
|
1439
|
+
selectedCount,
|
|
1440
|
+
labelOptions,
|
|
1441
|
+
labelId,
|
|
1442
|
+
onLabelChange,
|
|
1443
|
+
labels
|
|
1444
|
+
}) {
|
|
1445
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1446
|
+
const choices = [
|
|
1447
|
+
{ value: "selection", title: l.scopeSelection(selectedCount), hidden: selectedCount === 0 },
|
|
1448
|
+
{ value: "label", title: l.scopeLabel, disabled: labelOptions.length === 0 },
|
|
1449
|
+
{ value: "all", title: l.scopeAll }
|
|
1450
|
+
];
|
|
1451
|
+
return /* @__PURE__ */ jsxs(ModalSection, { "data-testid": "transfer-scope", children: [
|
|
1452
|
+
/* @__PURE__ */ jsx(ModalSectionTitle, { children: l.what }),
|
|
1453
|
+
/* @__PURE__ */ jsx(
|
|
1454
|
+
RadioGroup,
|
|
1455
|
+
{
|
|
1456
|
+
value: scope,
|
|
1457
|
+
onValueChange: (v) => onScopeChange(v),
|
|
1458
|
+
className: "space-y-2",
|
|
1459
|
+
children: choices.filter((c) => !c.hidden).map((c) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1460
|
+
/* @__PURE__ */ jsx(
|
|
1461
|
+
RadioGroupItem,
|
|
1462
|
+
{
|
|
1463
|
+
value: c.value,
|
|
1464
|
+
id: `transfer-scope-${c.value}`,
|
|
1465
|
+
disabled: c.disabled,
|
|
1466
|
+
"data-testid": `transfer-scope-${c.value}`
|
|
1467
|
+
}
|
|
1468
|
+
),
|
|
1469
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: `transfer-scope-${c.value}`, className: "cursor-pointer", children: c.title }),
|
|
1470
|
+
c.value === "label" && scope === "label" && /* @__PURE__ */ jsx(
|
|
1471
|
+
"select",
|
|
1472
|
+
{
|
|
1473
|
+
"aria-label": l.chooseLabel,
|
|
1474
|
+
value: labelId ?? "",
|
|
1475
|
+
onChange: (e) => onLabelChange(e.target.value),
|
|
1476
|
+
className: "min-w-0 flex-1 rounded-md border border-input bg-background px-2 py-1 text-sm pointer-coarse:min-h-11",
|
|
1477
|
+
"data-testid": "transfer-scope-label-select",
|
|
1478
|
+
children: labelOptions.map((option) => /* @__PURE__ */ jsx("option", { value: option.id, children: option.name }, option.id))
|
|
1479
|
+
}
|
|
1480
|
+
)
|
|
1481
|
+
] }, c.value))
|
|
1482
|
+
}
|
|
1483
|
+
)
|
|
1484
|
+
] });
|
|
1485
|
+
}
|
|
1486
|
+
function TransferKindsPicker({
|
|
1487
|
+
options,
|
|
1488
|
+
selected,
|
|
1489
|
+
onToggle,
|
|
1490
|
+
labels
|
|
1491
|
+
}) {
|
|
1492
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1493
|
+
return /* @__PURE__ */ jsxs(ModalSection, { "data-testid": "transfer-kinds", children: [
|
|
1494
|
+
/* @__PURE__ */ jsx(ModalSectionTitle, { children: l.include }),
|
|
1495
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: options.map((option) => {
|
|
1496
|
+
const id = `transfer-kind-${option.kind}`;
|
|
1497
|
+
return /* @__PURE__ */ jsxs(
|
|
1498
|
+
"div",
|
|
1499
|
+
{
|
|
1500
|
+
className: "flex items-center gap-2 rounded-md bg-muted px-3 py-2",
|
|
1501
|
+
children: [
|
|
1502
|
+
/* @__PURE__ */ jsx(
|
|
1503
|
+
Checkbox,
|
|
1504
|
+
{
|
|
1505
|
+
id,
|
|
1506
|
+
checked: selected.includes(option.kind),
|
|
1507
|
+
onCheckedChange: (checked) => onToggle(option.kind, checked === true),
|
|
1508
|
+
"data-testid": id
|
|
1509
|
+
}
|
|
1510
|
+
),
|
|
1511
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: id, className: "flex-1 cursor-pointer", children: option.label }),
|
|
1512
|
+
option.count !== void 0 && /* @__PURE__ */ jsx(
|
|
1513
|
+
"span",
|
|
1514
|
+
{
|
|
1515
|
+
className: "text-sm tabular-nums text-muted-foreground",
|
|
1516
|
+
"data-testid": `${id}-count`,
|
|
1517
|
+
children: option.count
|
|
1518
|
+
}
|
|
1519
|
+
)
|
|
1520
|
+
]
|
|
1521
|
+
},
|
|
1522
|
+
option.kind
|
|
1523
|
+
);
|
|
1524
|
+
}) })
|
|
1525
|
+
] });
|
|
1526
|
+
}
|
|
1527
|
+
function ChoiceRows({
|
|
1528
|
+
title,
|
|
1529
|
+
value,
|
|
1530
|
+
onChange,
|
|
1531
|
+
choices,
|
|
1532
|
+
help,
|
|
1533
|
+
testId
|
|
1534
|
+
}) {
|
|
1535
|
+
return /* @__PURE__ */ jsxs(ModalSection, { "data-testid": testId, children: [
|
|
1536
|
+
/* @__PURE__ */ jsx(ModalSectionTitle, { children: title }),
|
|
1537
|
+
help && /* @__PURE__ */ jsx("p", { className: "mb-2 text-sm text-muted-foreground", children: help }),
|
|
1538
|
+
/* @__PURE__ */ jsx(RadioGroup, { value, onValueChange: (v) => onChange(v), className: "space-y-2", children: choices.map((c) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1539
|
+
/* @__PURE__ */ jsx(
|
|
1540
|
+
RadioGroupItem,
|
|
1541
|
+
{
|
|
1542
|
+
value: c.value,
|
|
1543
|
+
id: `${testId}-${c.value}`,
|
|
1544
|
+
"data-testid": `${testId}-${c.value}`
|
|
1545
|
+
}
|
|
1546
|
+
),
|
|
1547
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: `${testId}-${c.value}`, className: "cursor-pointer", children: c.title })
|
|
1548
|
+
] }, c.value)) })
|
|
1549
|
+
] });
|
|
1550
|
+
}
|
|
1551
|
+
function TransferReferencesChooser({
|
|
1552
|
+
value,
|
|
1553
|
+
onChange,
|
|
1554
|
+
labels
|
|
1555
|
+
}) {
|
|
1556
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1557
|
+
return /* @__PURE__ */ jsx(
|
|
1558
|
+
ChoiceRows,
|
|
1559
|
+
{
|
|
1560
|
+
title: l.references,
|
|
1561
|
+
help: l.referencesHelp,
|
|
1562
|
+
value,
|
|
1563
|
+
onChange,
|
|
1564
|
+
testId: "transfer-references",
|
|
1565
|
+
choices: [
|
|
1566
|
+
{ value: "include", title: l.referencesInclude },
|
|
1567
|
+
{ value: "link", title: l.referencesLink }
|
|
1568
|
+
]
|
|
1569
|
+
}
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
function TransferConflictChooser({
|
|
1573
|
+
value,
|
|
1574
|
+
onChange,
|
|
1575
|
+
labels
|
|
1576
|
+
}) {
|
|
1577
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1578
|
+
return /* @__PURE__ */ jsx(
|
|
1579
|
+
ChoiceRows,
|
|
1580
|
+
{
|
|
1581
|
+
title: l.conflicts,
|
|
1582
|
+
value,
|
|
1583
|
+
onChange,
|
|
1584
|
+
testId: "transfer-conflict",
|
|
1585
|
+
choices: [
|
|
1586
|
+
{ value: "skip", title: l.conflictSkip },
|
|
1587
|
+
{ value: "keep_both", title: l.conflictKeepBoth }
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
function TransferPlanSummary({
|
|
1593
|
+
lines,
|
|
1594
|
+
warnings,
|
|
1595
|
+
isLoading,
|
|
1596
|
+
labels
|
|
1597
|
+
}) {
|
|
1598
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1599
|
+
return /* @__PURE__ */ jsxs(ModalSection, { "data-testid": "transfer-plan-summary", children: [
|
|
1600
|
+
/* @__PURE__ */ jsx(ModalSectionTitle, { children: l.summary }),
|
|
1601
|
+
isLoading && lines.length === 0 ? /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
1602
|
+
/* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }),
|
|
1603
|
+
l.summaryLoading
|
|
1604
|
+
] }) : /* @__PURE__ */ jsx("ul", { className: "space-y-1 text-sm", children: lines.map((line) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-2", children: [
|
|
1605
|
+
/* @__PURE__ */ jsx(Info, { className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }),
|
|
1606
|
+
/* @__PURE__ */ jsx("span", { children: line })
|
|
1607
|
+
] }, line)) }),
|
|
1608
|
+
warnings.length > 0 && /* @__PURE__ */ jsx("ul", { className: "mt-2 space-y-1 text-sm", "data-testid": "transfer-plan-warnings", children: warnings.map((warning) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-2", children: [
|
|
1609
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "mt-0.5 size-4 shrink-0 text-yellow-text" }),
|
|
1610
|
+
/* @__PURE__ */ jsx("span", { children: warning })
|
|
1611
|
+
] }, warning)) })
|
|
1612
|
+
] });
|
|
1613
|
+
}
|
|
1614
|
+
function TransferProgressView({
|
|
1615
|
+
title,
|
|
1616
|
+
processed,
|
|
1617
|
+
total,
|
|
1618
|
+
phaseLabel,
|
|
1619
|
+
onHide,
|
|
1620
|
+
onCancel,
|
|
1621
|
+
isCancelling,
|
|
1622
|
+
labels
|
|
1623
|
+
}) {
|
|
1624
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1625
|
+
const percent = total > 0 ? Math.min(100, Math.round(processed / total * 100)) : 0;
|
|
1626
|
+
return /* @__PURE__ */ jsxs(ModalSection, { "data-testid": "transfer-progress", children: [
|
|
1627
|
+
/* @__PURE__ */ jsx(ModalSectionTitle, { children: title }),
|
|
1628
|
+
/* @__PURE__ */ jsx(Progress, { value: percent, className: "h-2" }),
|
|
1629
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-2 text-sm text-muted-foreground", "data-testid": "transfer-progress-text", children: [
|
|
1630
|
+
phaseLabel,
|
|
1631
|
+
" \xB7 ",
|
|
1632
|
+
processed,
|
|
1633
|
+
" / ",
|
|
1634
|
+
total
|
|
1635
|
+
] }),
|
|
1636
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
|
|
1637
|
+
onCancel && /* @__PURE__ */ jsx(
|
|
1638
|
+
Button,
|
|
1639
|
+
{
|
|
1640
|
+
variant: "outline",
|
|
1641
|
+
onClick: onCancel,
|
|
1642
|
+
disabled: isCancelling,
|
|
1643
|
+
"data-testid": "transfer-cancel-button",
|
|
1644
|
+
children: l.cancelJob
|
|
1645
|
+
}
|
|
1646
|
+
),
|
|
1647
|
+
onHide && /* @__PURE__ */ jsx(Button, { onClick: onHide, "data-testid": "transfer-hide-button", children: l.hide })
|
|
1648
|
+
] })
|
|
1649
|
+
] });
|
|
1650
|
+
}
|
|
1651
|
+
function TransferResumeBanner({
|
|
1652
|
+
message,
|
|
1653
|
+
onResume,
|
|
1654
|
+
isResuming,
|
|
1655
|
+
labels
|
|
1656
|
+
}) {
|
|
1657
|
+
const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
|
|
1658
|
+
return /* @__PURE__ */ jsxs(
|
|
1659
|
+
"div",
|
|
1660
|
+
{
|
|
1661
|
+
className: cn("flex items-center gap-3 rounded-lg bg-muted p-3 text-sm"),
|
|
1662
|
+
"data-testid": "transfer-resume-banner",
|
|
1663
|
+
children: [
|
|
1664
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "size-4 shrink-0 text-yellow-text" }),
|
|
1665
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: message }),
|
|
1666
|
+
/* @__PURE__ */ jsxs(
|
|
1667
|
+
Button,
|
|
1668
|
+
{
|
|
1669
|
+
size: "sm",
|
|
1670
|
+
onClick: onResume,
|
|
1671
|
+
disabled: isResuming,
|
|
1672
|
+
"data-testid": "transfer-resume-button",
|
|
1673
|
+
children: [
|
|
1674
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "size-4" }),
|
|
1675
|
+
l.resume
|
|
1676
|
+
]
|
|
1677
|
+
}
|
|
1678
|
+
)
|
|
1679
|
+
]
|
|
1680
|
+
}
|
|
1681
|
+
);
|
|
1682
|
+
}
|
|
1396
1683
|
var DEFAULT_VIEWER_LABELS = {
|
|
1397
1684
|
shared: "Shared",
|
|
1398
1685
|
useAsReference: "Use as reference",
|
|
@@ -6930,6 +7217,6 @@ function ExplorerDragPreview({ icon, title, count }) {
|
|
|
6930
7217
|
] });
|
|
6931
7218
|
}
|
|
6932
7219
|
|
|
6933
|
-
export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CalendarImportRow, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_CALENDAR_IMPORT_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPLORER_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_FOLDER_FILTER_LABELS, DEFAULT_FOLDER_PICKER_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_LABEL_MULTI_SELECT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_UPLOAD_FOOTER_LABELS, DEFAULT_UPLOAD_PARTS_LABELS, DEFAULT_UPLOAD_SOURCES_LABELS, DEFAULT_URL_INPUT_DIALOG_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DocStatusIcon, DocTagBar, DocTagBreadcrumb, DocTagCreateLink, DocTagEmpty, DocTagFieldIcon, DocTagFieldRow, DocTagNavigator, DocTagPopover, DocTagToggle, DocTagUnsavedFooter, DocTagValueInput, DocumentGrid, DocumentNameCellFrame, DocumentRowMenu, ExplorerDragPreview, ExplorerDropOverlay, ExplorerEmpty, ExplorerFileTile, ExplorerFileTooltip, ExplorerFolderTile, ExplorerFrame, ExplorerLoadingTiles, ExplorerMarquee, ExplorerScroller, ExplorerStage, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldAttribution, FieldFolderSelect, FieldFolderValue, FieldLabelsSelect, FieldNativeSelect, FieldRow, FieldValue, FieldWithAttribution, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesFilterBar, FilesModalFooter, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesTagsButton, FilesToolbar, FilesViewCenter, FolderBreadcrumb2 as FolderBreadcrumb, FolderCell, FolderCommandList, FolderFilterButton, FolderPickerRow, FolderSummary, FolderTree, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, LabelMultiSelectView, LabelPickerList, MediaPreviewView, MoveToFolderDialog, PassageStepper, PdfPageNav, RejectedFilesList, RelatedDocsCell, SelectedFilesList, StatusPill, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TranslationBadge, TranslationCompareTable, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadDropzone, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialogView, VendorLogo, ViewSelectorMenu, ViewerFrame, ViewerHeaderEnd, ViewerHeaderStart, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPane, ViewerPreviewUnavailable, ViewerRenderedPane, ViewerStatusNote, ViewerTabBar, ViewerTitle, ViewerZoomControl, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, labelChipClampHeight, resolveDocumentGridLayout, sortFields };
|
|
7220
|
+
export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CalendarImportRow, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_CALENDAR_IMPORT_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPLORER_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_FOLDER_FILTER_LABELS, DEFAULT_FOLDER_PICKER_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_LABEL_MULTI_SELECT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_TRANSFER_LABELS, DEFAULT_UPLOAD_FOOTER_LABELS, DEFAULT_UPLOAD_PARTS_LABELS, DEFAULT_UPLOAD_SOURCES_LABELS, DEFAULT_URL_INPUT_DIALOG_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DocStatusIcon, DocTagBar, DocTagBreadcrumb, DocTagCreateLink, DocTagEmpty, DocTagFieldIcon, DocTagFieldRow, DocTagNavigator, DocTagPopover, DocTagToggle, DocTagUnsavedFooter, DocTagValueInput, DocumentGrid, DocumentNameCellFrame, DocumentRowMenu, ExplorerDragPreview, ExplorerDropOverlay, ExplorerEmpty, ExplorerFileTile, ExplorerFileTooltip, ExplorerFolderTile, ExplorerFrame, ExplorerLoadingTiles, ExplorerMarquee, ExplorerScroller, ExplorerStage, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldAttribution, FieldFolderSelect, FieldFolderValue, FieldLabelsSelect, FieldNativeSelect, FieldRow, FieldValue, FieldWithAttribution, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesFilterBar, FilesModalFooter, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesTagsButton, FilesToolbar, FilesViewCenter, FolderBreadcrumb2 as FolderBreadcrumb, FolderCell, FolderCommandList, FolderFilterButton, FolderPickerRow, FolderSummary, FolderTree, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, LabelMultiSelectView, LabelPickerList, MediaPreviewView, MoveToFolderDialog, PassageStepper, PdfPageNav, RejectedFilesList, RelatedDocsCell, SelectedFilesList, StatusPill, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TransferConflictChooser, TransferKindsPicker, TransferPlanSummary, TransferProgressView, TransferReferencesChooser, TransferResumeBanner, TransferScopeChooser, TranslationBadge, TranslationCompareTable, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadDropzone, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialogView, VendorLogo, ViewSelectorMenu, ViewerFrame, ViewerHeaderEnd, ViewerHeaderStart, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPane, ViewerPreviewUnavailable, ViewerRenderedPane, ViewerStatusNote, ViewerTabBar, ViewerTitle, ViewerZoomControl, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, labelChipClampHeight, resolveDocumentGridLayout, sortFields };
|
|
6934
7221
|
//# sourceMappingURL=index.js.map
|
|
6935
7222
|
//# sourceMappingURL=index.js.map
|