@arbidocs/blocks 0.4.61 → 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/agents/index.cjs +218 -218
- package/dist/agents/index.js +2 -2
- package/dist/{chunk-FA2QTFCK.cjs → chunk-HAADKDRN.cjs} +3 -3
- package/dist/{chunk-FA2QTFCK.cjs.map → chunk-HAADKDRN.cjs.map} +1 -1
- package/dist/{chunk-LYE6BPBE.js → chunk-V34YFQ5Q.js} +3 -3
- package/dist/{chunk-LYE6BPBE.js.map → chunk-V34YFQ5Q.js.map} +1 -1
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/ExportParts.d.ts +12 -6
- package/dist/files/TransferParts.d.ts +97 -0
- package/dist/files/bulk/BulkActionsBar.d.ts +5 -1
- package/dist/files/cells/RelatedDocsCell.d.ts +6 -2
- package/dist/files/index.cjs +397 -65
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.d.ts +1 -0
- package/dist/files/index.js +392 -68
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +264 -264
- package/dist/index.js +3 -3
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/package.json +4 -4
package/dist/files/index.cjs
CHANGED
|
@@ -8,9 +8,9 @@ var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
|
|
|
8
8
|
var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
|
|
9
9
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
10
10
|
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
11
|
-
require('../chunk-C54XEN5T.cjs');
|
|
12
11
|
require('../chunk-FX3K6LNZ.cjs');
|
|
13
12
|
require('../chunk-PPCATBOY.cjs');
|
|
13
|
+
require('../chunk-C54XEN5T.cjs');
|
|
14
14
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
15
15
|
var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
|
|
16
16
|
var chunk2ZTONLT5_cjs = require('../chunk-2ZTONLT5.cjs');
|
|
@@ -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__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
1171
1173
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1172
1174
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: l.export }),
|
|
1173
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { className: "bg-accent px-2.5 py-0.5 text-accent-foreground hover:bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: l.selected(selectedCount) }) })
|
|
1175
|
+
selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { className: "bg-accent px-2.5 py-0.5 text-accent-foreground hover:bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: l.selected(selectedCount) }) })
|
|
1174
1176
|
] }),
|
|
1175
1177
|
workspace && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-1.5 text-sm font-normal text-muted-foreground", children: [
|
|
1176
1178
|
/* @__PURE__ */ jsxRuntime.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: lucideReact.Download,
|
|
1202
|
+
title: l.downloadToComputer,
|
|
1203
|
+
description: l.downloadDescription
|
|
1204
|
+
},
|
|
1205
|
+
{ value: "copy", icon: lucideReact.Copy, title: l.copyToWorkspace, description: l.copyDescription },
|
|
1206
|
+
{
|
|
1207
|
+
value: "move",
|
|
1208
|
+
icon: lucideReact.FolderInput,
|
|
1209
|
+
title: l.moveToWorkspace,
|
|
1210
|
+
description: moveDisabledReason ?? l.moveDescription,
|
|
1211
|
+
disabledReason: moveDisabledReason
|
|
1212
|
+
}
|
|
1213
|
+
];
|
|
1194
1214
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { children: [
|
|
1195
1215
|
/* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.exportMethod }),
|
|
1196
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1216
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1197
1217
|
ui.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__ */ jsxRuntime.jsx(lucideReact.Download, { className: "size-4" }),
|
|
1213
|
-
l.downloadToComputer
|
|
1214
|
-
]
|
|
1215
|
-
}
|
|
1216
|
-
),
|
|
1217
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: l.downloadDescription }),
|
|
1218
|
-
mode === "download" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", onClick: (e) => e.stopPropagation(), children: [
|
|
1219
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-foreground", children: l.exportColumns }),
|
|
1220
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1221
|
-
"select",
|
|
1222
|
+
children: options.map((option) => {
|
|
1223
|
+
const Icon = option.icon;
|
|
1224
|
+
const disabled = !!option.disabledReason;
|
|
1225
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1226
|
+
"div",
|
|
1227
|
+
{
|
|
1228
|
+
className: ui.cn(card, disabled && "cursor-not-allowed opacity-60 hover:bg-muted"),
|
|
1229
|
+
children: [
|
|
1230
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
+
ui.RadioGroupItem,
|
|
1222
1232
|
{
|
|
1223
|
-
value:
|
|
1224
|
-
|
|
1225
|
-
className: "mt-1
|
|
1226
|
-
|
|
1227
|
-
children: [
|
|
1228
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "visible", children: l.columnsVisible }),
|
|
1229
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: l.columnsAll }),
|
|
1230
|
-
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.
|
|
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__ */ jsxRuntime.jsxs("div", { className: "flex-1", onClick: () => !disabled && onModeChange(option.value), children: [
|
|
1240
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1241
|
+
ui.Label,
|
|
1242
|
+
{
|
|
1243
|
+
htmlFor: `export-mode-${option.value}`,
|
|
1244
|
+
className: "flex cursor-pointer items-center gap-2 font-medium",
|
|
1245
|
+
children: [
|
|
1246
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }),
|
|
1247
|
+
option.title
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: option.description }),
|
|
1252
|
+
option.value === "download" && mode === "download" && showColumns && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", onClick: (e) => e.stopPropagation(), children: [
|
|
1253
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-foreground", children: l.exportColumns }),
|
|
1254
|
+
/* @__PURE__ */ jsxRuntime.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": chunkMHVNT4J3_cjs.testIdOr(columnsTestId, { testId: "export-columns-selector" }),
|
|
1261
|
+
children: [
|
|
1262
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "visible", children: l.columnsVisible }),
|
|
1263
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: l.columnsAll }),
|
|
1264
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "files", children: l.columnsFiles })
|
|
1265
|
+
]
|
|
1266
|
+
}
|
|
1267
|
+
),
|
|
1268
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-scope", children: [
|
|
1452
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.what }),
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1454
|
+
ui.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__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1460
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1461
|
+
ui.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__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `transfer-scope-${c.value}`, className: "cursor-pointer", children: c.title }),
|
|
1470
|
+
c.value === "label" && scope === "label" && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-kinds", children: [
|
|
1494
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.include }),
|
|
1495
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(
|
|
1498
|
+
"div",
|
|
1499
|
+
{
|
|
1500
|
+
className: "flex items-center gap-2 rounded-md bg-muted px-3 py-2",
|
|
1501
|
+
children: [
|
|
1502
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1503
|
+
ui.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__ */ jsxRuntime.jsx(ui.Label, { htmlFor: id, className: "flex-1 cursor-pointer", children: option.label }),
|
|
1512
|
+
option.count !== void 0 && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": testId, children: [
|
|
1536
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: title }),
|
|
1537
|
+
help && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm text-muted-foreground", children: help }),
|
|
1538
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.RadioGroup, { value, onValueChange: (v) => onChange(v), className: "space-y-2", children: choices.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1539
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1540
|
+
ui.RadioGroupItem,
|
|
1541
|
+
{
|
|
1542
|
+
value: c.value,
|
|
1543
|
+
id: `${testId}-${c.value}`,
|
|
1544
|
+
"data-testid": `${testId}-${c.value}`
|
|
1545
|
+
}
|
|
1546
|
+
),
|
|
1547
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.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__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-plan-summary", children: [
|
|
1600
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.summary }),
|
|
1601
|
+
isLoading && lines.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
1602
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
1603
|
+
l.summaryLoading
|
|
1604
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1 text-sm", children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2", children: [
|
|
1605
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }),
|
|
1606
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: line })
|
|
1607
|
+
] }, line)) }),
|
|
1608
|
+
warnings.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-2 space-y-1 text-sm", "data-testid": "transfer-plan-warnings", children: warnings.map((warning) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2", children: [
|
|
1609
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "mt-0.5 size-4 shrink-0 text-yellow-text" }),
|
|
1610
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-progress", children: [
|
|
1627
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: title }),
|
|
1628
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Progress, { value: percent, className: "h-2" }),
|
|
1629
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
|
|
1637
|
+
onCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1638
|
+
ui.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__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.jsxs(
|
|
1659
|
+
"div",
|
|
1660
|
+
{
|
|
1661
|
+
className: ui.cn("flex items-center gap-3 rounded-lg bg-muted p-3 text-sm"),
|
|
1662
|
+
"data-testid": "transfer-resume-banner",
|
|
1663
|
+
children: [
|
|
1664
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-4 shrink-0 text-yellow-text" }),
|
|
1665
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children: message }),
|
|
1666
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1667
|
+
ui.Button,
|
|
1668
|
+
{
|
|
1669
|
+
size: "sm",
|
|
1670
|
+
onClick: onResume,
|
|
1671
|
+
disabled: isResuming,
|
|
1672
|
+
"data-testid": "transfer-resume-button",
|
|
1673
|
+
children: [
|
|
1674
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.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",
|
|
@@ -3751,6 +4038,8 @@ function RelatedDocsCell({
|
|
|
3751
4038
|
parent,
|
|
3752
4039
|
attachments,
|
|
3753
4040
|
madeFrom = [],
|
|
4041
|
+
copies = [],
|
|
4042
|
+
getRelation,
|
|
3754
4043
|
duplicates,
|
|
3755
4044
|
similar,
|
|
3756
4045
|
renderDoc,
|
|
@@ -3763,15 +4052,33 @@ function RelatedDocsCell({
|
|
|
3763
4052
|
const [open, setOpen] = react.useState(false);
|
|
3764
4053
|
const attachmentCount = attachments.length;
|
|
3765
4054
|
const madeFromCount = madeFrom.length;
|
|
4055
|
+
const copyCount = copies.length;
|
|
3766
4056
|
const dupeCount = duplicates.length;
|
|
3767
4057
|
const simCount = similar.length;
|
|
3768
|
-
if (!parent && attachmentCount === 0 && madeFromCount === 0 && dupeCount === 0 && simCount === 0)
|
|
4058
|
+
if (!parent && attachmentCount === 0 && madeFromCount === 0 && copyCount === 0 && dupeCount === 0 && simCount === 0)
|
|
3769
4059
|
return null;
|
|
3770
4060
|
const row = (doc, action) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3771
4061
|
renderDoc(doc),
|
|
3772
4062
|
action
|
|
3773
4063
|
] }, getKey(doc));
|
|
3774
4064
|
const switchAction = (doc) => /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { icon: lucideReact.ArrowRightLeft, label: "Switch to", onClick: () => onSwitchTo(doc) });
|
|
4065
|
+
const derivedRow = (doc) => {
|
|
4066
|
+
const relation = getRelation?.(doc);
|
|
4067
|
+
return row(
|
|
4068
|
+
doc,
|
|
4069
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4070
|
+
relation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4071
|
+
"span",
|
|
4072
|
+
{
|
|
4073
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
4074
|
+
"data-slot": "related-docs-relation",
|
|
4075
|
+
children: relation
|
|
4076
|
+
}
|
|
4077
|
+
),
|
|
4078
|
+
switchAction(doc)
|
|
4079
|
+
] })
|
|
4080
|
+
);
|
|
4081
|
+
};
|
|
3775
4082
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { open, onOpenChange: setOpen, children: [
|
|
3776
4083
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3777
4084
|
"button",
|
|
@@ -3794,6 +4101,7 @@ function RelatedDocsCell({
|
|
|
3794
4101
|
}
|
|
3795
4102
|
),
|
|
3796
4103
|
/* @__PURE__ */ jsxRuntime.jsx(RelatedBadge, { icon: lucideReact.GitFork, count: madeFromCount, label: "made from" }),
|
|
4104
|
+
/* @__PURE__ */ jsxRuntime.jsx(RelatedBadge, { icon: lucideReact.Copy, count: copyCount, label: copyCount === 1 ? "copy" : "copies" }),
|
|
3797
4105
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3798
4106
|
RelatedBadge,
|
|
3799
4107
|
{
|
|
@@ -3809,7 +4117,8 @@ function RelatedDocsCell({
|
|
|
3809
4117
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-h-[400px] w-[320px] overflow-y-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
3810
4118
|
parent && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CornerDownRight, title: "Parent", count: 1, children: row(parent, switchAction(parent)) }),
|
|
3811
4119
|
attachmentCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CornerRightDown, title: "Attachments", count: attachmentCount, children: attachments.map((doc) => row(doc, switchAction(doc))) }),
|
|
3812
|
-
madeFromCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.GitFork, title: "Made from", count: madeFromCount, children: madeFrom.map(
|
|
4120
|
+
madeFromCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.GitFork, title: "Made from", count: madeFromCount, children: madeFrom.map(derivedRow) }),
|
|
4121
|
+
copyCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.Copy, title: "Copies made from it", count: copyCount, children: copies.map(derivedRow) }),
|
|
3813
4122
|
dupeCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CopyX, title: "Duplicates", count: dupeCount, children: duplicates.map(
|
|
3814
4123
|
(doc) => row(
|
|
3815
4124
|
doc,
|
|
@@ -4246,6 +4555,7 @@ var DEFAULT_BULK_ACTIONS_LABELS = {
|
|
|
4246
4555
|
more: "More",
|
|
4247
4556
|
folder: "Folder",
|
|
4248
4557
|
export: "Export",
|
|
4558
|
+
production: "Production set",
|
|
4249
4559
|
reprocess: "Reprocess",
|
|
4250
4560
|
removeOffline: "Remove offline",
|
|
4251
4561
|
useOffline: "Use Offline",
|
|
@@ -4262,6 +4572,7 @@ function BulkActionsBar({
|
|
|
4262
4572
|
onLabel,
|
|
4263
4573
|
onMoveToFolder,
|
|
4264
4574
|
onExport,
|
|
4575
|
+
onProduce,
|
|
4265
4576
|
onReprocess,
|
|
4266
4577
|
reprocessLabel,
|
|
4267
4578
|
onToggleOffline,
|
|
@@ -4286,6 +4597,7 @@ function BulkActionsBar({
|
|
|
4286
4597
|
moveFolder: chunkMHVNT4J3_cjs.testIdOr(testIds?.moveFolder, { testId: "bulk-move-folder-button" }),
|
|
4287
4598
|
share: chunkMHVNT4J3_cjs.testIdOr(testIds?.share, { testId: "bulk-shared-toggle" }),
|
|
4288
4599
|
export: chunkMHVNT4J3_cjs.testIdOr(testIds?.export, { testId: "bulk-export-button" }),
|
|
4600
|
+
production: chunkMHVNT4J3_cjs.testIdOr(testIds?.production, { testId: "bulk-production-button" }),
|
|
4289
4601
|
reprocess: chunkMHVNT4J3_cjs.testIdOr(testIds?.reprocess, { testId: "bulk-reprocess-button" }),
|
|
4290
4602
|
offline: chunkMHVNT4J3_cjs.testIdOr(testIds?.offline, { testId: "bulk-offline-button" }),
|
|
4291
4603
|
delete: chunkMHVNT4J3_cjs.testIdOr(testIds?.delete, { testId: "bulk-delete-button" })
|
|
@@ -4425,6 +4737,18 @@ function BulkActionsBar({
|
|
|
4425
4737
|
]
|
|
4426
4738
|
}
|
|
4427
4739
|
),
|
|
4740
|
+
onProduce && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4741
|
+
ui.DropdownMenuItem,
|
|
4742
|
+
{
|
|
4743
|
+
onClick: onProduce,
|
|
4744
|
+
disabled: noSelection || !isOnline,
|
|
4745
|
+
"data-testid": ids.production,
|
|
4746
|
+
children: [
|
|
4747
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "mr-2 h-4 w-4" }),
|
|
4748
|
+
l.production
|
|
4749
|
+
]
|
|
4750
|
+
}
|
|
4751
|
+
),
|
|
4428
4752
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4429
4753
|
ui.DropdownMenuItem,
|
|
4430
4754
|
{
|
|
@@ -6955,6 +7279,7 @@ exports.DEFAULT_LABEL_MULTI_SELECT_LABELS = DEFAULT_LABEL_MULTI_SELECT_LABELS;
|
|
|
6955
7279
|
exports.DEFAULT_MOVE_TO_FOLDER_LABELS = DEFAULT_MOVE_TO_FOLDER_LABELS;
|
|
6956
7280
|
exports.DEFAULT_TAG_MANAGER_LABELS = DEFAULT_TAG_MANAGER_LABELS;
|
|
6957
7281
|
exports.DEFAULT_TAG_PASSAGE_PANEL_LABELS = DEFAULT_TAG_PASSAGE_PANEL_LABELS;
|
|
7282
|
+
exports.DEFAULT_TRANSFER_LABELS = DEFAULT_TRANSFER_LABELS;
|
|
6958
7283
|
exports.DEFAULT_UPLOAD_FOOTER_LABELS = DEFAULT_UPLOAD_FOOTER_LABELS;
|
|
6959
7284
|
exports.DEFAULT_UPLOAD_PARTS_LABELS = DEFAULT_UPLOAD_PARTS_LABELS;
|
|
6960
7285
|
exports.DEFAULT_UPLOAD_SOURCES_LABELS = DEFAULT_UPLOAD_SOURCES_LABELS;
|
|
@@ -7065,6 +7390,13 @@ exports.TagFormSharedToggle = TagFormSharedToggle;
|
|
|
7065
7390
|
exports.TagManager = TagManager;
|
|
7066
7391
|
exports.TagPassagePanel = TagPassagePanel;
|
|
7067
7392
|
exports.TaskSection = TaskSection;
|
|
7393
|
+
exports.TransferConflictChooser = TransferConflictChooser;
|
|
7394
|
+
exports.TransferKindsPicker = TransferKindsPicker;
|
|
7395
|
+
exports.TransferPlanSummary = TransferPlanSummary;
|
|
7396
|
+
exports.TransferProgressView = TransferProgressView;
|
|
7397
|
+
exports.TransferReferencesChooser = TransferReferencesChooser;
|
|
7398
|
+
exports.TransferResumeBanner = TransferResumeBanner;
|
|
7399
|
+
exports.TransferScopeChooser = TransferScopeChooser;
|
|
7068
7400
|
exports.TranslationBadge = TranslationBadge;
|
|
7069
7401
|
exports.TranslationCompareTable = TranslationCompareTable;
|
|
7070
7402
|
exports.UploadBrowseButtons = UploadBrowseButtons;
|