@arbidocs/blocks 0.4.155 → 0.4.157
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/{ConnectedNativeDocxComparison-OLWRQSRS.js → ConnectedNativeDocxComparison-2PLOOXSH.js} +6 -6
- package/dist/{ConnectedNativeDocxComparison-OLWRQSRS.js.map → ConnectedNativeDocxComparison-2PLOOXSH.js.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs → ConnectedNativeDocxComparison-S25BPUH5.cjs} +7 -7
- package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs.map → ConnectedNativeDocxComparison-S25BPUH5.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js → ConnectedNativeDocxEditor-JJAGMHZC.js} +4 -4
- package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js.map → ConnectedNativeDocxEditor-JJAGMHZC.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs → ConnectedNativeDocxEditor-YA4HWLY4.cjs} +6 -6
- package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs.map → ConnectedNativeDocxEditor-YA4HWLY4.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-5DK6QGYN.cjs → ConnectedStreamedWordArtifact-EXYZAU4Y.cjs} +7 -7
- package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js → ConnectedStreamedWordArtifact-YAAXY5KY.js} +6 -6
- package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js.map → ConnectedStreamedWordArtifact-YAAXY5KY.js.map} +1 -1
- package/dist/{NativeDocxEditor-XT5ZLFGU.js → NativeDocxEditor-JBQMH3MP.js} +3 -3
- package/dist/{NativeDocxEditor-XT5ZLFGU.js.map → NativeDocxEditor-JBQMH3MP.js.map} +1 -1
- package/dist/{NativeDocxEditor-5VBNM5I7.cjs → NativeDocxEditor-M3I776GD.cjs} +7 -7
- package/dist/{NativeDocxEditor-5VBNM5I7.cjs.map → NativeDocxEditor-M3I776GD.cjs.map} +1 -1
- package/dist/{chunk-MF5KQ4PS.js → chunk-2CWM2CFZ.js} +4 -4
- package/dist/{chunk-MF5KQ4PS.js.map → chunk-2CWM2CFZ.js.map} +1 -1
- package/dist/{chunk-6HMCF4AJ.js → chunk-5ZIYPZYE.js} +1033 -5
- package/dist/chunk-5ZIYPZYE.js.map +1 -0
- package/dist/{chunk-KHXEIEXN.js → chunk-7IRSCMNK.js} +3 -3
- package/dist/{chunk-KHXEIEXN.js.map → chunk-7IRSCMNK.js.map} +1 -1
- package/dist/{chunk-TZOQKV64.js → chunk-EWCJXUBP.js} +3 -3
- package/dist/{chunk-TZOQKV64.js.map → chunk-EWCJXUBP.js.map} +1 -1
- package/dist/{chunk-CU6LDQ57.js → chunk-F3EZDBDJ.js} +4 -4
- package/dist/{chunk-CU6LDQ57.js.map → chunk-F3EZDBDJ.js.map} +1 -1
- package/dist/{chunk-W7CWGURO.js → chunk-FTZ45WHY.js} +6 -685
- package/dist/chunk-FTZ45WHY.js.map +1 -0
- package/dist/{chunk-CQCNU5KT.cjs → chunk-IJEISII2.cjs} +6 -6
- package/dist/{chunk-CQCNU5KT.cjs.map → chunk-IJEISII2.cjs.map} +1 -1
- package/dist/{chunk-NPR5BGFF.cjs → chunk-JSQEAPTC.cjs} +26 -14
- package/dist/chunk-JSQEAPTC.cjs.map +1 -0
- package/dist/{chunk-MUDEL7UL.cjs → chunk-NPLGB4LI.cjs} +4 -703
- package/dist/chunk-NPLGB4LI.cjs.map +1 -0
- package/dist/{chunk-265GOG4W.js → chunk-ONTUMV74.js} +26 -14
- package/dist/chunk-ONTUMV74.js.map +1 -0
- package/dist/chunk-OTU5KGQ6.cjs +18 -0
- package/dist/{chunk-HUATKA3M.cjs.map → chunk-OTU5KGQ6.cjs.map} +1 -1
- package/dist/{chunk-GO3BN76C.js → chunk-PGOSIJ2I.js} +3 -3
- package/dist/{chunk-GO3BN76C.js.map → chunk-PGOSIJ2I.js.map} +1 -1
- package/dist/{chunk-WV4TD2HZ.cjs → chunk-QJFJ5JBF.cjs} +1055 -2
- package/dist/chunk-QJFJ5JBF.cjs.map +1 -0
- package/dist/chunk-S74QMZVZ.cjs +18 -0
- package/dist/{chunk-C3SMTA3C.cjs.map → chunk-S74QMZVZ.cjs.map} +1 -1
- package/dist/{chunk-KUT2Y7JF.cjs → chunk-TQIY2SVY.cjs} +5 -5
- package/dist/{chunk-KUT2Y7JF.cjs.map → chunk-TQIY2SVY.cjs.map} +1 -1
- package/dist/{chunk-757OYF6G.cjs → chunk-VY4UFXTM.cjs} +4 -4
- package/dist/{chunk-757OYF6G.cjs.map → chunk-VY4UFXTM.cjs.map} +1 -1
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/docx.js +6 -6
- package/dist/connect/index.cjs +626 -66
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +564 -9
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +43 -43
- package/dist/connect/viewer.js +5 -5
- package/dist/connection/files/index.d.ts +5 -0
- package/dist/connection/files/support.d.ts +2 -0
- package/dist/connection/files/upload/AddFromAccountsButton.d.ts +16 -0
- package/dist/connection/files/upload/ConnectedUpload.d.ts +36 -0
- package/dist/connection/files/upload/ConnectedUploadDropzone.d.ts +36 -0
- package/dist/connection/files/upload/EmptyWorkspaceUpload.d.ts +13 -0
- package/dist/connection/files/upload/useAddFromUrls.d.ts +13 -0
- package/dist/docx/index.cjs +47 -47
- package/dist/docx/index.js +3 -3
- package/dist/files/PrivacyExplainerModal.d.ts +8 -0
- package/dist/files/ShareToggle.d.ts +8 -0
- package/dist/files/UrlInputDialog.d.ts +24 -0
- package/dist/files/index.cjs +298 -278
- package/dist/files/index.d.ts +4 -0
- package/dist/files/index.js +2 -2
- package/dist/files/media-preview.d.ts +24 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +96 -29
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +98 -31
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.cjs +96 -29
- package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.js +98 -31
- package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.cjs +98 -33
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.js +99 -34
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.cts → session-WGvWs6yO.d.cts} +22 -4
- package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.ts → session-WGvWs6yO.d.ts} +22 -4
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-5DK6QGYN.cjs.map +0 -1
- package/dist/chunk-265GOG4W.js.map +0 -1
- package/dist/chunk-6HMCF4AJ.js.map +0 -1
- package/dist/chunk-C3SMTA3C.cjs +0 -18
- package/dist/chunk-HUATKA3M.cjs +0 -18
- package/dist/chunk-MUDEL7UL.cjs.map +0 -1
- package/dist/chunk-NPR5BGFF.cjs.map +0 -1
- package/dist/chunk-W7CWGURO.js.map +0 -1
- package/dist/chunk-WV4TD2HZ.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { FailedStageIcon } from './chunk-
|
|
2
|
+
import { FailedStageIcon } from './chunk-5ZIYPZYE.js';
|
|
3
3
|
import { ModalBreadcrumbHeader } from './chunk-RC6VTY2H.js';
|
|
4
4
|
import { ShareControl } from './chunk-K4BGOPGG.js';
|
|
5
5
|
import { LabelPickerList } from './chunk-SDOEHEJP.js';
|
|
@@ -10,9 +10,9 @@ import { GridView } from './chunk-N5YEF3LC.js';
|
|
|
10
10
|
import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
|
|
11
11
|
import { ModalSection, ModalSectionTitle, ModalHeader } from './chunk-TX2ZICS7.js';
|
|
12
12
|
import { formatCount } from './chunk-OXF2IFXG.js';
|
|
13
|
-
import { cn,
|
|
13
|
+
import { cn, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Button, Checkbox, Progress, getEntityColor, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, Popover, PopoverTrigger, PopoverContent, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Input, DialogHeader, Command, CommandList, CommandGroup, CommandItem, CommandSeparator, getTagTypeIcon, Switch, CommandInput, CommandEmpty } from '@arbidocs/react/ui';
|
|
14
14
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
|
-
import { Check,
|
|
15
|
+
import { Check, Download, Copy, FolderInput, Users, XCircle, AlertTriangle, CheckCircle2, Loader2, Info, RotateCcw, Share2, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, Tags, StickyNote, FolderOpen, X, Upload, ChevronDown, ExternalLink, Square, RefreshCw, Settings, Unplug, CheckCircle, CircleSlash, AlertCircle, Hourglass, LoaderCircle, CornerDownRight, CornerRightDown, GitFork, CopyX, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, Pencil, FileDown, Trash2, SquareCheckBig, NotebookPen, MoreHorizontal, ArrowRightFromLine, Hash, ArrowDownToLine, Plus, Tag, Bot, Calendar, Search, Folder, List, Sparkles, Columns3, Save, Undo2, CheckIcon, ArrowUpDown, PencilLine, FolderUp, BookMarked, FileX, Table2, ArrowRightLeft, ChevronsUpDown } from 'lucide-react';
|
|
16
16
|
import { memo, useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
17
17
|
|
|
18
18
|
function FilesToolbar({
|
|
@@ -90,420 +90,6 @@ function documentGridLayoutProps(layout, presets) {
|
|
|
90
90
|
height: layout === "modal" ? presets.modalHeight ?? "50vh" : "100%"
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
var DEFAULT_UPLOAD_PARTS_LABELS = {
|
|
94
|
-
rejectedReasons: {
|
|
95
|
-
too_large: "The following files exceed the 1 GB size limit:",
|
|
96
|
-
unsupported: "The following files are not in a supported format (PDF, DOC(X), PPT(X), XLS(X), RTF, TXT, MD, HTML, images, audio, video, email, Outlook archive (.pst/.ost), or ZIP):",
|
|
97
|
-
empty: "The following files are empty (0 bytes):",
|
|
98
|
-
no_extension: "The following files have no file extension:",
|
|
99
|
-
empty_zip: "The following ZIP archives contain no supported files:",
|
|
100
|
-
zip_error: "The following ZIP archives could not be processed:"
|
|
101
|
-
},
|
|
102
|
-
rejectedFallback: "The following files cannot be uploaded:",
|
|
103
|
-
clearRejected: "Clear rejected files",
|
|
104
|
-
selectedFiles: (count) => `Selected Files (${count})`,
|
|
105
|
-
total: (size) => `Total: ${size}`,
|
|
106
|
-
clearAll: "Clear All",
|
|
107
|
-
remove: (fileName) => `Remove ${fileName}`,
|
|
108
|
-
uploadComplete: (entity) => `Upload complete! Processing ${entity} in the background...`,
|
|
109
|
-
uploading: (count, entity) => `Uploading ${count} ${entity}...`,
|
|
110
|
-
uploadedIndexing: "Files uploaded successfully. ARBI is now indexing them in the background.",
|
|
111
|
-
afterUpload: "After upload completes, ARBI will index files in the background."
|
|
112
|
-
};
|
|
113
|
-
function mergeUploadLabels(labels) {
|
|
114
|
-
return {
|
|
115
|
-
...DEFAULT_UPLOAD_PARTS_LABELS,
|
|
116
|
-
...labels,
|
|
117
|
-
rejectedReasons: {
|
|
118
|
-
...DEFAULT_UPLOAD_PARTS_LABELS.rejectedReasons,
|
|
119
|
-
...labels?.rejectedReasons
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function UploadErrorMessage({
|
|
124
|
-
message,
|
|
125
|
-
className,
|
|
126
|
-
testId
|
|
127
|
-
}) {
|
|
128
|
-
return /* @__PURE__ */ jsxs(
|
|
129
|
-
"div",
|
|
130
|
-
{
|
|
131
|
-
role: "alert",
|
|
132
|
-
className: cn("mt-6 flex items-center gap-2 rounded-lg bg-red-bg p-3", className),
|
|
133
|
-
"data-testid": testIdOr(testId, { testId: "error-message" }),
|
|
134
|
-
children: [
|
|
135
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "size-5 shrink-0 text-red-text" }),
|
|
136
|
-
/* @__PURE__ */ jsx("p", { className: "text-base text-red-text", children: message })
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
function RejectedFilesList({ files, onClear, labels, testIds }) {
|
|
142
|
-
if (files.length === 0) return null;
|
|
143
|
-
const l = mergeUploadLabels(labels);
|
|
144
|
-
const byReason = /* @__PURE__ */ new Map();
|
|
145
|
-
for (const file of files) {
|
|
146
|
-
const reason = typeof file === "string" ? "unsupported" : file.reason || "unsupported";
|
|
147
|
-
const name = typeof file === "string" ? file : file.name;
|
|
148
|
-
byReason.set(reason, [...byReason.get(reason) ?? [], name]);
|
|
149
|
-
}
|
|
150
|
-
return /* @__PURE__ */ jsx(
|
|
151
|
-
"div",
|
|
152
|
-
{
|
|
153
|
-
className: "mt-4 rounded-lg bg-red-bg p-3",
|
|
154
|
-
"data-testid": testIdOr(testIds?.root, { testId: "rejected-files-list" }),
|
|
155
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
156
|
-
/* @__PURE__ */ jsx(AlertCircle, { className: "mt-0.5 size-5 shrink-0 text-red-text" }),
|
|
157
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1", children: Array.from(byReason.entries()).map(([reason, names], groupIndex) => /* @__PURE__ */ jsxs("div", { className: groupIndex > 0 ? "mt-3" : "", children: [
|
|
158
|
-
/* @__PURE__ */ jsx("p", { className: "mb-2 text-sm font-medium text-red-text", children: l.rejectedReasons[reason] ?? l.rejectedFallback }),
|
|
159
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: names.map((name, index) => /* @__PURE__ */ jsx(
|
|
160
|
-
"div",
|
|
161
|
-
{
|
|
162
|
-
className: "rounded-md bg-background/60 p-2",
|
|
163
|
-
"data-testid": testIdOr(testIds?.item?.(groupIndex, index), {
|
|
164
|
-
testId: `rejected-file-item-${groupIndex}-${index}`
|
|
165
|
-
}),
|
|
166
|
-
children: /* @__PURE__ */ jsx("span", { className: "text-sm text-red-text", children: name })
|
|
167
|
-
},
|
|
168
|
-
index
|
|
169
|
-
)) })
|
|
170
|
-
] }, reason)) }),
|
|
171
|
-
/* @__PURE__ */ jsx(
|
|
172
|
-
Button,
|
|
173
|
-
{
|
|
174
|
-
variant: "ghost",
|
|
175
|
-
size: "icon",
|
|
176
|
-
onClick: onClear,
|
|
177
|
-
"aria-label": l.clearRejected,
|
|
178
|
-
className: "size-6 text-red-text hover:text-red-text pointer-coarse:size-11",
|
|
179
|
-
"data-testid": testIdOr(testIds?.clear, { testId: "clear-rejected-files-button" }),
|
|
180
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
] })
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
function folderPathOf(file) {
|
|
188
|
-
const rel = file.webkitRelativePath;
|
|
189
|
-
if (!rel) return null;
|
|
190
|
-
const slash = rel.lastIndexOf("/");
|
|
191
|
-
return slash > 0 ? rel.substring(0, slash) : null;
|
|
192
|
-
}
|
|
193
|
-
function SelectedFilesList({
|
|
194
|
-
files,
|
|
195
|
-
onRemoveFile,
|
|
196
|
-
onClearAll,
|
|
197
|
-
formatFileSize,
|
|
198
|
-
renderFileIcon,
|
|
199
|
-
labels,
|
|
200
|
-
testIds
|
|
201
|
-
}) {
|
|
202
|
-
if (files.length === 0) return null;
|
|
203
|
-
const l = mergeUploadLabels(labels);
|
|
204
|
-
const total = files.reduce((sum, f) => sum + f.size, 0);
|
|
205
|
-
return /* @__PURE__ */ jsxs(
|
|
206
|
-
"div",
|
|
207
|
-
{
|
|
208
|
-
className: "mt-2 sm:mt-6",
|
|
209
|
-
"data-testid": testIdOr(testIds?.root, { testId: "selected-files-list" }),
|
|
210
|
-
children: [
|
|
211
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between gap-3", children: [
|
|
212
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col sm:flex-row sm:items-center sm:gap-4", children: [
|
|
213
|
-
/* @__PURE__ */ jsx("h4", { className: "text-base font-medium", children: l.selectedFiles(files.length) }),
|
|
214
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.total(formatFileSize(total)) })
|
|
215
|
-
] }),
|
|
216
|
-
onClearAll && /* @__PURE__ */ jsxs(
|
|
217
|
-
Button,
|
|
218
|
-
{
|
|
219
|
-
variant: "ghost",
|
|
220
|
-
size: "sm",
|
|
221
|
-
onClick: onClearAll,
|
|
222
|
-
className: "h-8 shrink-0 whitespace-nowrap text-muted-foreground hover:text-foreground pointer-coarse:h-11",
|
|
223
|
-
"data-testid": testIdOr(testIds?.clearAll, { testId: "clear-all-files-button" }),
|
|
224
|
-
children: [
|
|
225
|
-
l.clearAll,
|
|
226
|
-
/* @__PURE__ */ jsx(X, { className: "ml-1 hidden size-4 sm:block" })
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
)
|
|
230
|
-
] }),
|
|
231
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-1 overflow-y-auto overscroll-contain pr-1 sm:max-h-[300px]", children: files.map((file, index) => {
|
|
232
|
-
const folder = folderPathOf(file);
|
|
233
|
-
return /* @__PURE__ */ jsxs(
|
|
234
|
-
"div",
|
|
235
|
-
{
|
|
236
|
-
className: "flex min-w-0 items-center gap-2 rounded-lg bg-muted p-3",
|
|
237
|
-
"data-testid": testIdOr(testIds?.item?.(index), {
|
|
238
|
-
testId: `selected-file-item-${index}`
|
|
239
|
-
}),
|
|
240
|
-
children: [
|
|
241
|
-
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: renderFileIcon(file.name) }),
|
|
242
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
243
|
-
/* @__PURE__ */ jsx("span", { className: "block truncate text-base", title: file.name, children: file.name }),
|
|
244
|
-
folder && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
|
|
245
|
-
/* @__PURE__ */ jsx(FolderOpen, { className: "size-3" }),
|
|
246
|
-
folder
|
|
247
|
-
] })
|
|
248
|
-
] }),
|
|
249
|
-
/* @__PURE__ */ jsx(
|
|
250
|
-
Button,
|
|
251
|
-
{
|
|
252
|
-
variant: "ghost",
|
|
253
|
-
size: "icon",
|
|
254
|
-
onClick: () => onRemoveFile(index),
|
|
255
|
-
"aria-label": l.remove(file.name),
|
|
256
|
-
className: "size-6 shrink-0 pointer-coarse:size-11",
|
|
257
|
-
"data-testid": testIdOr(testIds?.remove?.(index), {
|
|
258
|
-
testId: `remove-file-button-${index}`
|
|
259
|
-
}),
|
|
260
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
]
|
|
264
|
-
},
|
|
265
|
-
index
|
|
266
|
-
);
|
|
267
|
-
}) })
|
|
268
|
-
]
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
function UploadProgress({
|
|
273
|
-
fileCount,
|
|
274
|
-
entityLabel,
|
|
275
|
-
percentage,
|
|
276
|
-
batchInfo,
|
|
277
|
-
labels,
|
|
278
|
-
testId
|
|
279
|
-
}) {
|
|
280
|
-
const l = mergeUploadLabels(labels);
|
|
281
|
-
const isComplete = percentage >= 100;
|
|
282
|
-
return /* @__PURE__ */ jsxs("div", { className: "text-center", "data-testid": testIdOr(testId, { testId: "upload-progress" }), children: [
|
|
283
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-lg font-medium", children: isComplete ? l.uploadComplete(entityLabel) : l.uploading(fileCount, entityLabel) }),
|
|
284
|
-
/* @__PURE__ */ jsxs("div", { className: "mx-auto mb-4 max-w-md", children: [
|
|
285
|
-
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
286
|
-
/* @__PURE__ */ jsx(Progress, { value: percentage, className: "h-3" }),
|
|
287
|
-
batchInfo && batchInfo.total > 1 && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": "true", children: Array.from({ length: batchInfo.total - 1 }, (_, i) => /* @__PURE__ */ jsx(
|
|
288
|
-
"span",
|
|
289
|
-
{
|
|
290
|
-
className: "absolute top-0 h-full w-px bg-background/50",
|
|
291
|
-
style: { left: `${(i + 1) / batchInfo.total * 100}%` }
|
|
292
|
-
},
|
|
293
|
-
i
|
|
294
|
-
)) })
|
|
295
|
-
] }),
|
|
296
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 flex items-center justify-center text-sm text-muted-foreground", children: /* @__PURE__ */ jsxs("span", { children: [
|
|
297
|
-
Math.round(percentage),
|
|
298
|
-
"%"
|
|
299
|
-
] }) })
|
|
300
|
-
] }),
|
|
301
|
-
/* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: isComplete ? l.uploadedIndexing : l.afterUpload })
|
|
302
|
-
] });
|
|
303
|
-
}
|
|
304
|
-
var DEFAULT_UPLOAD_SOURCES_LABELS = {
|
|
305
|
-
uploadFiles: "Choose files",
|
|
306
|
-
uploadFolder: "Choose a folder"
|
|
307
|
-
};
|
|
308
|
-
function UploadFrame({ isCompact, isDimmed, className, children }) {
|
|
309
|
-
return /* @__PURE__ */ jsx(
|
|
310
|
-
"div",
|
|
311
|
-
{
|
|
312
|
-
"data-slot": "upload-frame",
|
|
313
|
-
className: cn(
|
|
314
|
-
"relative flex w-full flex-col items-center",
|
|
315
|
-
isCompact ? "gap-4" : "gap-6",
|
|
316
|
-
isDimmed && "opacity-50",
|
|
317
|
-
className
|
|
318
|
-
),
|
|
319
|
-
children
|
|
320
|
-
}
|
|
321
|
-
);
|
|
322
|
-
}
|
|
323
|
-
function UploadDropArea({
|
|
324
|
-
isActive,
|
|
325
|
-
isDisabled,
|
|
326
|
-
isProcessing,
|
|
327
|
-
processingMessage,
|
|
328
|
-
isCompact,
|
|
329
|
-
title,
|
|
330
|
-
subtitle,
|
|
331
|
-
onDrag,
|
|
332
|
-
onDrop,
|
|
333
|
-
onClick,
|
|
334
|
-
actions,
|
|
335
|
-
testId = "upload-dropzone-area"
|
|
336
|
-
}) {
|
|
337
|
-
const active = isActive && !isDisabled;
|
|
338
|
-
return /* @__PURE__ */ jsxs(
|
|
339
|
-
"div",
|
|
340
|
-
{
|
|
341
|
-
"data-slot": "upload-drop-area",
|
|
342
|
-
"data-testid": testId,
|
|
343
|
-
onDragEnter: onDrag,
|
|
344
|
-
onDragLeave: onDrag,
|
|
345
|
-
onDragOver: onDrag,
|
|
346
|
-
onDrop,
|
|
347
|
-
onClick,
|
|
348
|
-
className: cn(
|
|
349
|
-
"relative flex w-full flex-col items-center justify-center rounded-lg border text-center transition-colors",
|
|
350
|
-
active ? "border-dashed border-primary bg-accent" : "border-border bg-card shadow-xs hover:border-ring/50 hover:bg-accent/40",
|
|
351
|
-
isDisabled || isProcessing ? "cursor-not-allowed" : "cursor-pointer",
|
|
352
|
-
isCompact ? "min-h-[150px] p-4" : "min-h-[200px] p-5",
|
|
353
|
-
// Touch screens cannot drag files in: the area stays in the DOM (assistive tech, e2e) but
|
|
354
|
-
// the "Choose files / folder" buttons are the whole affordance.
|
|
355
|
-
"pointer-coarse:sr-only"
|
|
356
|
-
),
|
|
357
|
-
children: [
|
|
358
|
-
isProcessing && /* @__PURE__ */ jsxs(
|
|
359
|
-
"div",
|
|
360
|
-
{
|
|
361
|
-
role: "status",
|
|
362
|
-
className: "absolute inset-0 z-10 flex flex-col items-center justify-center rounded-lg bg-background/80",
|
|
363
|
-
children: [
|
|
364
|
-
/* @__PURE__ */ jsx(Loader2, { className: "mb-3 size-8 animate-spin text-primary" }),
|
|
365
|
-
/* @__PURE__ */ jsx("div", { className: "progress-bar-processing mb-3 h-1.5 w-48 rounded-sm" }),
|
|
366
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: processingMessage })
|
|
367
|
-
]
|
|
368
|
-
}
|
|
369
|
-
),
|
|
370
|
-
/* @__PURE__ */ jsx(
|
|
371
|
-
"div",
|
|
372
|
-
{
|
|
373
|
-
className: cn(
|
|
374
|
-
"mb-2 flex items-center justify-center rounded-full bg-muted text-muted-foreground",
|
|
375
|
-
isCompact ? "size-11" : "size-10",
|
|
376
|
-
active && "bg-primary/10 text-primary"
|
|
377
|
-
),
|
|
378
|
-
children: /* @__PURE__ */ jsx(Upload, { className: "size-5" })
|
|
379
|
-
}
|
|
380
|
-
),
|
|
381
|
-
/* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
382
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: subtitle }),
|
|
383
|
-
actions
|
|
384
|
-
]
|
|
385
|
-
}
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
function UploadBrowseButtons({
|
|
389
|
-
onFiles,
|
|
390
|
-
onFolder,
|
|
391
|
-
isDisabled,
|
|
392
|
-
layout = "inline",
|
|
393
|
-
labels
|
|
394
|
-
}) {
|
|
395
|
-
const l = { ...DEFAULT_UPLOAD_SOURCES_LABELS, ...labels };
|
|
396
|
-
const isInline = layout === "inline";
|
|
397
|
-
const size = isInline ? "sm" : "default";
|
|
398
|
-
const width = isInline ? void 0 : "w-full";
|
|
399
|
-
return /* @__PURE__ */ jsxs(
|
|
400
|
-
"div",
|
|
401
|
-
{
|
|
402
|
-
"data-slot": "upload-browse-buttons",
|
|
403
|
-
className: isInline ? "mt-3 flex flex-wrap items-center justify-center gap-2" : "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
404
|
-
children: [
|
|
405
|
-
/* @__PURE__ */ jsxs(
|
|
406
|
-
Button,
|
|
407
|
-
{
|
|
408
|
-
variant: isInline ? "outline" : "default",
|
|
409
|
-
size,
|
|
410
|
-
className: width,
|
|
411
|
-
onClick: onFiles,
|
|
412
|
-
disabled: isDisabled,
|
|
413
|
-
"data-testid": "upload-files-button",
|
|
414
|
-
children: [
|
|
415
|
-
/* @__PURE__ */ jsx(FileText, { className: "mr-2 size-4" }),
|
|
416
|
-
l.uploadFiles
|
|
417
|
-
]
|
|
418
|
-
}
|
|
419
|
-
),
|
|
420
|
-
/* @__PURE__ */ jsxs(
|
|
421
|
-
Button,
|
|
422
|
-
{
|
|
423
|
-
variant: "outline",
|
|
424
|
-
size,
|
|
425
|
-
className: width,
|
|
426
|
-
onClick: onFolder,
|
|
427
|
-
disabled: isDisabled,
|
|
428
|
-
"data-testid": "upload-folder-button",
|
|
429
|
-
children: [
|
|
430
|
-
/* @__PURE__ */ jsx(FolderPlus, { className: "mr-2 size-4" }),
|
|
431
|
-
l.uploadFolder
|
|
432
|
-
]
|
|
433
|
-
}
|
|
434
|
-
)
|
|
435
|
-
]
|
|
436
|
-
}
|
|
437
|
-
);
|
|
438
|
-
}
|
|
439
|
-
function UploadSourcePicker({ options, isDisabled }) {
|
|
440
|
-
return /* @__PURE__ */ jsx(
|
|
441
|
-
"div",
|
|
442
|
-
{
|
|
443
|
-
"data-slot": "upload-source-picker",
|
|
444
|
-
className: "flex w-full flex-col gap-2",
|
|
445
|
-
"data-testid": "upload-source-picker",
|
|
446
|
-
children: options.map((o) => {
|
|
447
|
-
const button = /* @__PURE__ */ jsxs(
|
|
448
|
-
Button,
|
|
449
|
-
{
|
|
450
|
-
variant: "outline",
|
|
451
|
-
onClick: o.onClick,
|
|
452
|
-
disabled: isDisabled,
|
|
453
|
-
"data-testid": `upload-source-pick-${o.key}`,
|
|
454
|
-
className: "h-auto w-full justify-start gap-3 px-4 py-3 text-left",
|
|
455
|
-
children: [
|
|
456
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground [&_svg]:size-5", children: o.icon }),
|
|
457
|
-
/* @__PURE__ */ jsxs("span", { className: "flex flex-col", children: [
|
|
458
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: o.label }),
|
|
459
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-normal text-muted-foreground", children: o.description })
|
|
460
|
-
] })
|
|
461
|
-
]
|
|
462
|
-
}
|
|
463
|
-
);
|
|
464
|
-
return /* @__PURE__ */ jsx("span", { className: "contents", children: o.wrap ? o.wrap(button) : button }, o.key);
|
|
465
|
-
})
|
|
466
|
-
}
|
|
467
|
-
);
|
|
468
|
-
}
|
|
469
|
-
function UploadUrlButton({
|
|
470
|
-
isCompact,
|
|
471
|
-
isDisabled,
|
|
472
|
-
label = "Add from URL",
|
|
473
|
-
onClick
|
|
474
|
-
}) {
|
|
475
|
-
return /* @__PURE__ */ jsxs(
|
|
476
|
-
Button,
|
|
477
|
-
{
|
|
478
|
-
variant: "outline",
|
|
479
|
-
size: isCompact ? "sm" : "default",
|
|
480
|
-
disabled: isDisabled,
|
|
481
|
-
onClick,
|
|
482
|
-
"data-testid": "upload-url-button",
|
|
483
|
-
children: [
|
|
484
|
-
/* @__PURE__ */ jsx(Globe, { className: "mr-2 size-4" }),
|
|
485
|
-
label
|
|
486
|
-
]
|
|
487
|
-
}
|
|
488
|
-
);
|
|
489
|
-
}
|
|
490
|
-
function UploadSourceSection({
|
|
491
|
-
testId,
|
|
492
|
-
className,
|
|
493
|
-
isIsolated,
|
|
494
|
-
children
|
|
495
|
-
}) {
|
|
496
|
-
return /* @__PURE__ */ jsx(
|
|
497
|
-
"div",
|
|
498
|
-
{
|
|
499
|
-
"data-slot": "upload-source-section",
|
|
500
|
-
"data-testid": testId,
|
|
501
|
-
className,
|
|
502
|
-
onClick: isIsolated ? (e) => e.stopPropagation() : void 0,
|
|
503
|
-
children
|
|
504
|
-
}
|
|
505
|
-
);
|
|
506
|
-
}
|
|
507
93
|
var DEFAULT_EXPORT_LABELS = {
|
|
508
94
|
export: "Export, copy or move",
|
|
509
95
|
selected: (count) => `${count} selected`,
|
|
@@ -1857,131 +1443,6 @@ function ViewerLoadError({
|
|
|
1857
1443
|
}
|
|
1858
1444
|
);
|
|
1859
1445
|
}
|
|
1860
|
-
var DEFAULT_UPLOAD_FOOTER_LABELS = {
|
|
1861
|
-
skipDuplicates: "Skip duplicates",
|
|
1862
|
-
skipDuplicatesActive: "Skip identical files already in the workspace",
|
|
1863
|
-
skipDuplicatesInactive: "Allow uploading identical files",
|
|
1864
|
-
autoRename: "Auto-rename",
|
|
1865
|
-
autoRenameActive: "Generate a descriptive title via AI instead of using the filename",
|
|
1866
|
-
autoRenameInactive: "Keep the original filename",
|
|
1867
|
-
titleInstruction: "Title instruction",
|
|
1868
|
-
titleInstructionPlaceholder: "Optional: how should AI name these documents?"
|
|
1869
|
-
};
|
|
1870
|
-
function UploadContainer({
|
|
1871
|
-
children,
|
|
1872
|
-
className = "p-4 sm:p-6",
|
|
1873
|
-
testId
|
|
1874
|
-
}) {
|
|
1875
|
-
return /* @__PURE__ */ jsx(
|
|
1876
|
-
"div",
|
|
1877
|
-
{
|
|
1878
|
-
className,
|
|
1879
|
-
"data-slot": "upload-container",
|
|
1880
|
-
"data-testid": testIdOr(testId, { testId: "upload-container" }),
|
|
1881
|
-
children
|
|
1882
|
-
}
|
|
1883
|
-
);
|
|
1884
|
-
}
|
|
1885
|
-
function UploadShareNote({
|
|
1886
|
-
description,
|
|
1887
|
-
children,
|
|
1888
|
-
compact = false,
|
|
1889
|
-
testId
|
|
1890
|
-
}) {
|
|
1891
|
-
const id = testIdOr(testId, { testId: "share-toggle" });
|
|
1892
|
-
if (compact) {
|
|
1893
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1894
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { "data-testid": id, children }) }),
|
|
1895
|
-
/* @__PURE__ */ jsx(TooltipContent, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ jsx("p", { className: "text-sm", children: description }) })
|
|
1896
|
-
] });
|
|
1897
|
-
}
|
|
1898
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-muted p-4", "data-testid": id, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
1899
|
-
children,
|
|
1900
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
1901
|
-
] }) });
|
|
1902
|
-
}
|
|
1903
|
-
var TOGGLE_COLORS = { text: "text-primary", bg: "bg-primary" };
|
|
1904
|
-
function UploadFooterBar({
|
|
1905
|
-
skipDuplicates,
|
|
1906
|
-
onSkipDuplicatesChange,
|
|
1907
|
-
autoRename,
|
|
1908
|
-
onAutoRenameChange,
|
|
1909
|
-
autoRenameInstruction,
|
|
1910
|
-
onAutoRenameInstructionChange,
|
|
1911
|
-
shareToggle,
|
|
1912
|
-
children,
|
|
1913
|
-
className,
|
|
1914
|
-
labels,
|
|
1915
|
-
testIds
|
|
1916
|
-
}) {
|
|
1917
|
-
const l = { ...DEFAULT_UPLOAD_FOOTER_LABELS, ...labels };
|
|
1918
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1919
|
-
/* @__PURE__ */ jsxs(
|
|
1920
|
-
"div",
|
|
1921
|
-
{
|
|
1922
|
-
className: cn(
|
|
1923
|
-
"flex shrink-0 flex-wrap items-center gap-x-3 gap-y-2 border-t border-border bg-background px-4 py-3 sm:px-6",
|
|
1924
|
-
className
|
|
1925
|
-
),
|
|
1926
|
-
"data-testid": testIdOr(testIds?.bar, { testId: "upload-footer-bar" }),
|
|
1927
|
-
children: [
|
|
1928
|
-
/* @__PURE__ */ jsx(
|
|
1929
|
-
IconToggle,
|
|
1930
|
-
{
|
|
1931
|
-
icon: CopyX,
|
|
1932
|
-
isActive: skipDuplicates,
|
|
1933
|
-
onToggle: onSkipDuplicatesChange,
|
|
1934
|
-
colors: TOGGLE_COLORS,
|
|
1935
|
-
showLabel: true,
|
|
1936
|
-
label: l.skipDuplicates,
|
|
1937
|
-
tooltipActive: l.skipDuplicatesActive,
|
|
1938
|
-
tooltipInactive: l.skipDuplicatesInactive,
|
|
1939
|
-
"data-testid": testIdOr(testIds?.skipDuplicates, { testId: "toggle-skip-duplicates" })
|
|
1940
|
-
}
|
|
1941
|
-
),
|
|
1942
|
-
/* @__PURE__ */ jsx(
|
|
1943
|
-
IconToggle,
|
|
1944
|
-
{
|
|
1945
|
-
icon: Sparkles,
|
|
1946
|
-
isActive: autoRename,
|
|
1947
|
-
onToggle: onAutoRenameChange,
|
|
1948
|
-
colors: TOGGLE_COLORS,
|
|
1949
|
-
showLabel: true,
|
|
1950
|
-
label: l.autoRename,
|
|
1951
|
-
tooltipActive: l.autoRenameActive,
|
|
1952
|
-
tooltipInactive: l.autoRenameInactive,
|
|
1953
|
-
"data-testid": testIdOr(testIds?.autoRename, { testId: "toggle-auto-rename" })
|
|
1954
|
-
}
|
|
1955
|
-
),
|
|
1956
|
-
/* @__PURE__ */ jsx("div", { className: "hidden flex-1 sm:block" }),
|
|
1957
|
-
shareToggle,
|
|
1958
|
-
/* @__PURE__ */ jsx("div", { className: "w-full sm:w-auto max-sm:[&>button]:w-full", children })
|
|
1959
|
-
]
|
|
1960
|
-
}
|
|
1961
|
-
),
|
|
1962
|
-
autoRename && /* @__PURE__ */ jsxs(
|
|
1963
|
-
"div",
|
|
1964
|
-
{
|
|
1965
|
-
className: "shrink-0 border-t border-border bg-background px-4 py-3 sm:px-6",
|
|
1966
|
-
"data-testid": testIdOr(testIds?.settingsPanel, { testId: "upload-settings-panel" }),
|
|
1967
|
-
children: [
|
|
1968
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "auto-rename-instruction", className: "text-sm font-medium", children: l.titleInstruction }),
|
|
1969
|
-
/* @__PURE__ */ jsx(
|
|
1970
|
-
Textarea,
|
|
1971
|
-
{
|
|
1972
|
-
id: "auto-rename-instruction",
|
|
1973
|
-
value: autoRenameInstruction,
|
|
1974
|
-
onChange: (e) => onAutoRenameInstructionChange(e.target.value),
|
|
1975
|
-
placeholder: l.titleInstructionPlaceholder,
|
|
1976
|
-
className: "mt-1 min-h-[60px] text-sm",
|
|
1977
|
-
"data-testid": testIdOr(testIds?.instruction, { testId: "auto-rename-instruction" })
|
|
1978
|
-
}
|
|
1979
|
-
)
|
|
1980
|
-
]
|
|
1981
|
-
}
|
|
1982
|
-
)
|
|
1983
|
-
] });
|
|
1984
|
-
}
|
|
1985
1446
|
var DEFAULT_TAG_PASSAGE_PANEL_LABELS = {
|
|
1986
1447
|
title: "Tag Passage",
|
|
1987
1448
|
page: (n) => `Page ${n}`,
|
|
@@ -2551,146 +2012,6 @@ function TaskSection({
|
|
|
2551
2012
|
hasItems && isExpanded && children
|
|
2552
2013
|
] });
|
|
2553
2014
|
}
|
|
2554
|
-
var DEFAULT_URL_INPUT_DIALOG_LABELS = {
|
|
2555
|
-
title: "Add from the internet",
|
|
2556
|
-
description: "Enter one or more URLs to download documents \u2014 paste several separated by commas or new lines.",
|
|
2557
|
-
supports: "Supports PDF, Word, PowerPoint, Excel, RTF, TXT, MD, HTML, ZIP, and audio/video links (YouTube et al.).",
|
|
2558
|
-
url: (position) => position === null ? "URL " : `URL ${position}`,
|
|
2559
|
-
placeholder: "https://example.com/document.pdf or a YouTube / audio / video link",
|
|
2560
|
-
removeUrl: (position) => `Remove URL ${position}`,
|
|
2561
|
-
addAnother: "Add Another URL",
|
|
2562
|
-
adding: "Adding\u2026",
|
|
2563
|
-
addDocuments: "Add Documents",
|
|
2564
|
-
mediaPreview: "Media preview"
|
|
2565
|
-
};
|
|
2566
|
-
function UrlInputDialogView({
|
|
2567
|
-
open,
|
|
2568
|
-
onOpenChange,
|
|
2569
|
-
trigger,
|
|
2570
|
-
title,
|
|
2571
|
-
urls,
|
|
2572
|
-
errors,
|
|
2573
|
-
onUrlChange,
|
|
2574
|
-
onUrlPaste,
|
|
2575
|
-
onAddUrl,
|
|
2576
|
-
onRemoveUrl,
|
|
2577
|
-
renderPreview,
|
|
2578
|
-
submitError,
|
|
2579
|
-
isSubmitting,
|
|
2580
|
-
onSubmit,
|
|
2581
|
-
labels,
|
|
2582
|
-
testIds
|
|
2583
|
-
}) {
|
|
2584
|
-
const l = { ...DEFAULT_URL_INPUT_DIALOG_LABELS, ...labels };
|
|
2585
|
-
return /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange, children: [
|
|
2586
|
-
trigger !== void 0 && /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: trigger }),
|
|
2587
|
-
/* @__PURE__ */ jsxs(
|
|
2588
|
-
DialogContent,
|
|
2589
|
-
{
|
|
2590
|
-
presentation: "sheet",
|
|
2591
|
-
className: "flex flex-col gap-0 overflow-hidden p-0 sm:max-w-[525px]",
|
|
2592
|
-
"data-testid": testIdOr(testIds?.modal, { testId: "upload-modal-internet" }),
|
|
2593
|
-
children: [
|
|
2594
|
-
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: title ?? l.title }) }),
|
|
2595
|
-
/* @__PURE__ */ jsxs("div", { className: "px-6 pb-6", children: [
|
|
2596
|
-
/* @__PURE__ */ jsxs(DialogDescription, { className: "pt-4 text-sm text-muted-foreground", children: [
|
|
2597
|
-
l.description,
|
|
2598
|
-
/* @__PURE__ */ jsx("span", { className: "mt-1 block text-xs", children: l.supports })
|
|
2599
|
-
] }),
|
|
2600
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 py-4", children: [
|
|
2601
|
-
urls.map((url, index) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
2602
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2603
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
2604
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: `url-${index}`, className: "text-sm", children: l.url(urls.length > 1 ? index + 1 : null) }),
|
|
2605
|
-
/* @__PURE__ */ jsx(
|
|
2606
|
-
Input,
|
|
2607
|
-
{
|
|
2608
|
-
id: `url-${index}`,
|
|
2609
|
-
type: "text",
|
|
2610
|
-
placeholder: l.placeholder,
|
|
2611
|
-
value: url,
|
|
2612
|
-
onChange: (e) => onUrlChange(index, e.target.value),
|
|
2613
|
-
onPaste: (e) => {
|
|
2614
|
-
e.preventDefault();
|
|
2615
|
-
onUrlPaste(index, e.clipboardData.getData("text"));
|
|
2616
|
-
},
|
|
2617
|
-
className: cn(errors[index] && "border-red-border")
|
|
2618
|
-
}
|
|
2619
|
-
),
|
|
2620
|
-
errors[index] && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-red-text", children: errors[index] })
|
|
2621
|
-
] }),
|
|
2622
|
-
urls.length > 1 && /* @__PURE__ */ jsx(
|
|
2623
|
-
Button,
|
|
2624
|
-
{
|
|
2625
|
-
type: "button",
|
|
2626
|
-
variant: "ghost",
|
|
2627
|
-
size: "icon",
|
|
2628
|
-
onClick: () => onRemoveUrl(index),
|
|
2629
|
-
className: "mt-6",
|
|
2630
|
-
"aria-label": l.removeUrl(index + 1),
|
|
2631
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
2632
|
-
}
|
|
2633
|
-
)
|
|
2634
|
-
] }),
|
|
2635
|
-
renderPreview?.(url, index)
|
|
2636
|
-
] }, index)),
|
|
2637
|
-
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: onAddUrl, className: "w-full", children: [
|
|
2638
|
-
/* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
2639
|
-
l.addAnother
|
|
2640
|
-
] })
|
|
2641
|
-
] }),
|
|
2642
|
-
submitError && /* @__PURE__ */ jsx(
|
|
2643
|
-
"p",
|
|
2644
|
-
{
|
|
2645
|
-
className: "text-sm text-red-text",
|
|
2646
|
-
"data-testid": testIdOr(testIds?.submitError, { testId: "url-submit-error" }),
|
|
2647
|
-
children: submitError
|
|
2648
|
-
}
|
|
2649
|
-
),
|
|
2650
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2", children: /* @__PURE__ */ jsx(
|
|
2651
|
-
Button,
|
|
2652
|
-
{
|
|
2653
|
-
onClick: onSubmit,
|
|
2654
|
-
disabled: isSubmitting,
|
|
2655
|
-
"data-testid": testIdOr(testIds?.submit, { testId: "url-submit-button" }),
|
|
2656
|
-
children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2657
|
-
/* @__PURE__ */ jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
2658
|
-
l.adding
|
|
2659
|
-
] }) : l.addDocuments
|
|
2660
|
-
}
|
|
2661
|
-
) })
|
|
2662
|
-
] })
|
|
2663
|
-
]
|
|
2664
|
-
}
|
|
2665
|
-
)
|
|
2666
|
-
] });
|
|
2667
|
-
}
|
|
2668
|
-
function UrlDialogTitle({ icon, workspaceName, labels }) {
|
|
2669
|
-
const l = { ...DEFAULT_URL_INPUT_DIALOG_LABELS, ...labels };
|
|
2670
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 items-center", icon ? "gap-3" : "gap-2"), children: [
|
|
2671
|
-
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
2672
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", title: workspaceName, children: workspaceName }),
|
|
2673
|
-
/* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: "/" }),
|
|
2674
|
-
/* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: l.title })
|
|
2675
|
-
] });
|
|
2676
|
-
}
|
|
2677
|
-
function MediaPreviewView({ kind, src, testId, labels }) {
|
|
2678
|
-
const l = { ...DEFAULT_URL_INPUT_DIALOG_LABELS, ...labels };
|
|
2679
|
-
return /* @__PURE__ */ jsxs("div", { className: "mt-2 overflow-hidden rounded-md border", "data-testid": testId, children: [
|
|
2680
|
-
kind === "youtube" && /* @__PURE__ */ jsx(
|
|
2681
|
-
"iframe",
|
|
2682
|
-
{
|
|
2683
|
-
className: "aspect-video w-full",
|
|
2684
|
-
src,
|
|
2685
|
-
title: l.mediaPreview,
|
|
2686
|
-
allow: "accelerometer; encrypted-media; picture-in-picture",
|
|
2687
|
-
allowFullScreen: true
|
|
2688
|
-
}
|
|
2689
|
-
),
|
|
2690
|
-
kind === "video" && /* @__PURE__ */ jsx("video", { className: "max-h-56 w-full bg-black", src, controls: true, preload: "metadata" }),
|
|
2691
|
-
kind === "audio" && /* @__PURE__ */ jsx("audio", { className: "w-full p-2", src, controls: true, preload: "metadata" })
|
|
2692
|
-
] });
|
|
2693
|
-
}
|
|
2694
2015
|
function RelatedBadge({
|
|
2695
2016
|
icon: Icon,
|
|
2696
2017
|
count,
|
|
@@ -5734,6 +5055,6 @@ function DocStatusIcon({
|
|
|
5734
5055
|
);
|
|
5735
5056
|
}
|
|
5736
5057
|
|
|
5737
|
-
export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_TRANSFER_LABELS,
|
|
5738
|
-
//# sourceMappingURL=chunk-
|
|
5739
|
-
//# sourceMappingURL=chunk-
|
|
5058
|
+
export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_TRANSFER_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DocStatusIcon, DocTagBar, DocTagBreadcrumb, DocTagCreateLink, DocTagEmpty, DocTagFieldIcon, DocTagFieldRow, DocTagNavigator, DocTagPopover, DocTagToggle, DocTagUnsavedFooter, DocTagValueInput, DocumentGrid, DocumentLabelBar, DocumentNameCellFrame, DocumentRowMenu, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldRow, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesToolbar, FolderSummary, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, MoveToFolderDialog, PassageStepper, PdfPageNav, RelatedDocsCell, SELECTION_COL_ID, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TransferConflictChooser, TransferKindsPicker, TransferPlanSummary, TransferProgressView, TransferReferencesChooser, TransferResumeBanner, TransferScopeChooser, ViewSelectorMenu, ViewerControlBar, ViewerFrame, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPreviewUnavailable, ViewerTabBar, ViewerTitle, ViewerZoomControl, applyColumnLayout, applyViewColumns, captureColumnWidths, columnItems, columnsMatch, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, isDocumentLabel, pinnedLeftColumns, resolveDocumentGridLayout, sortFields, summariseDocTags, toggleColumn, upsertView, useGridViews, visibleColumns, widthsMatch };
|
|
5059
|
+
//# sourceMappingURL=chunk-FTZ45WHY.js.map
|
|
5060
|
+
//# sourceMappingURL=chunk-FTZ45WHY.js.map
|