@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
package/dist/connect/viewer.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkNPLGB4LI_cjs = require('../chunk-NPLGB4LI.cjs');
|
|
5
5
|
var chunk6I6CVX5G_cjs = require('../chunk-6I6CVX5G.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkQJFJ5JBF_cjs = require('../chunk-QJFJ5JBF.cjs');
|
|
7
7
|
require('../chunk-223D4727.cjs');
|
|
8
8
|
var chunkCB4TIDEX_cjs = require('../chunk-CB4TIDEX.cjs');
|
|
9
9
|
var chunkFM3IRQJW_cjs = require('../chunk-FM3IRQJW.cjs');
|
|
@@ -219,7 +219,7 @@ function useViewedDocument(documentId) {
|
|
|
219
219
|
const documentData = record?.external_id === documentId ? record : void 0;
|
|
220
220
|
const { data: tags } = chunkCB4TIDEX_cjs.useConnectedTags();
|
|
221
221
|
const labelSummaries = React.useMemo(
|
|
222
|
-
() =>
|
|
222
|
+
() => chunkNPLGB4LI_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkNPLGB4LI_cjs.isDocumentLabel)),
|
|
223
223
|
[documentData, tags]
|
|
224
224
|
);
|
|
225
225
|
const fileName = documentData?.file_name;
|
|
@@ -725,7 +725,7 @@ function PassageTagPanel({
|
|
|
725
725
|
[workspaceTags]
|
|
726
726
|
);
|
|
727
727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
728
|
-
|
|
728
|
+
chunkNPLGB4LI_cjs.TagPassagePanel,
|
|
729
729
|
{
|
|
730
730
|
pageNumber,
|
|
731
731
|
preview,
|
|
@@ -850,7 +850,7 @@ var ParsedPassage = React.memo(function ParsedPassage2({
|
|
|
850
850
|
];
|
|
851
851
|
}) : [];
|
|
852
852
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
853
|
-
|
|
853
|
+
chunkNPLGB4LI_cjs.HtmlPassage,
|
|
854
854
|
{
|
|
855
855
|
chunkId,
|
|
856
856
|
highlight: isStrong ? "strong" : isLight ? "light" : void 0,
|
|
@@ -1027,11 +1027,11 @@ function useDocumentLabels(documentId, doctags, orderedChunkIds) {
|
|
|
1027
1027
|
const workspaceTags = React.useMemo(() => allTags.filter(isDocumentTag), [allTags]);
|
|
1028
1028
|
const documentDoctags = React.useMemo(() => doctags ?? [], [doctags]);
|
|
1029
1029
|
const tagSummaries = React.useMemo(
|
|
1030
|
-
() =>
|
|
1030
|
+
() => chunkNPLGB4LI_cjs.summariseDocTags(documentDoctags, workspaceTags),
|
|
1031
1031
|
[documentDoctags, workspaceTags]
|
|
1032
1032
|
);
|
|
1033
1033
|
const labelSummaries = React.useMemo(
|
|
1034
|
-
() =>
|
|
1034
|
+
() => chunkNPLGB4LI_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkNPLGB4LI_cjs.isDocumentLabel)),
|
|
1035
1035
|
[documentDoctags, workspaceTags]
|
|
1036
1036
|
);
|
|
1037
1037
|
const labelsByChunk = React.useMemo(() => {
|
|
@@ -1539,14 +1539,14 @@ function ParsedTextView({
|
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
1541
|
}, [maxPageNumber, onLoadSuccess]);
|
|
1542
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1542
|
+
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading parsed document..." });
|
|
1543
1543
|
if (error) {
|
|
1544
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1544
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
|
|
1545
1545
|
}
|
|
1546
1546
|
const taggingChunk = labels.taggingChunkId ? processedChunks.flatMap((page) => page.chunks).find((c) => c.chunkExtId === labels.taggingChunkId) : void 0;
|
|
1547
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1547
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNPLGB4LI_cjs.HtmlViewerRoot, { children: [
|
|
1548
1548
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1549
|
-
|
|
1549
|
+
chunkNPLGB4LI_cjs.DocumentLabelBar,
|
|
1550
1550
|
{
|
|
1551
1551
|
summaries: labels.labelSummaries,
|
|
1552
1552
|
activeTagExtId: labels.activeTagExtId,
|
|
@@ -1571,15 +1571,15 @@ function ParsedTextView({
|
|
|
1571
1571
|
}
|
|
1572
1572
|
),
|
|
1573
1573
|
!citation.factCitationActive && citation.runStartIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1574
|
-
|
|
1574
|
+
chunkNPLGB4LI_cjs.CitedRunNav,
|
|
1575
1575
|
{
|
|
1576
1576
|
position: citation.runCursor + 1,
|
|
1577
1577
|
total: citation.runStartIds.length,
|
|
1578
1578
|
onStep: citation.gotoRun
|
|
1579
1579
|
}
|
|
1580
1580
|
),
|
|
1581
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1582
|
-
|
|
1581
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1582
|
+
chunkNPLGB4LI_cjs.HtmlPage,
|
|
1583
1583
|
{
|
|
1584
1584
|
pageNumber: page.pageNumber,
|
|
1585
1585
|
totalPages,
|
|
@@ -1620,7 +1620,7 @@ function ParsedTextView({
|
|
|
1620
1620
|
})
|
|
1621
1621
|
},
|
|
1622
1622
|
pageIndex
|
|
1623
|
-
)) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1623
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.HtmlViewerEmpty, {}) })
|
|
1624
1624
|
] });
|
|
1625
1625
|
}
|
|
1626
1626
|
var AnnotatedPdfViewer = React.lazy(
|
|
@@ -1669,7 +1669,7 @@ function ViewerPdfPane({
|
|
|
1669
1669
|
const showMarkup = markup.hasMarkup && !markup.showOriginal;
|
|
1670
1670
|
if (isDownloadOnly) {
|
|
1671
1671
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1672
|
-
|
|
1672
|
+
chunkNPLGB4LI_cjs.ViewerPreviewUnavailable,
|
|
1673
1673
|
{
|
|
1674
1674
|
extension: fileExtension(documentData?.file_name),
|
|
1675
1675
|
onDownload
|
|
@@ -1679,26 +1679,26 @@ function ViewerPdfPane({
|
|
|
1679
1679
|
const loadingLabel = isVideo ? "Loading video..." : isAudio ? "Loading audio..." : isImage ? "Loading image..." : !documentData ? "Loading document..." : ui.friendlyFileType(documentData.file_type, documentData.file_name) === "Text" ? "Loading text..." : "Loading PDF...";
|
|
1680
1680
|
const errorLabel = isVideo ? "Failed to load video" : isAudio ? "Failed to load audio" : isImage ? "Failed to load image" : "Failed to load PDF";
|
|
1681
1681
|
if (isDocx && documentData && !["completed", "low-content", "failed"].includes(documentData.status || "")) {
|
|
1682
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1682
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
|
|
1683
1683
|
}
|
|
1684
|
-
if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1684
|
+
if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: loadingLabel });
|
|
1685
1685
|
if (pdfError) {
|
|
1686
1686
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1687
|
-
|
|
1687
|
+
chunkNPLGB4LI_cjs.ViewerLoadError,
|
|
1688
1688
|
{
|
|
1689
1689
|
message: isVideo || isAudio || isImage ? `${errorLabel} \u2014 download it instead.` : "Couldn't display the PDF \u2014 download it instead.",
|
|
1690
1690
|
onDownload
|
|
1691
1691
|
}
|
|
1692
1692
|
);
|
|
1693
1693
|
}
|
|
1694
|
-
if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1694
|
+
if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: loadingLabel });
|
|
1695
1695
|
if (isVideo) return /* @__PURE__ */ jsxRuntime.jsx(viewers.VideoViewer, { blob: pdfBlob, title: documentData?.file_name || "Video" });
|
|
1696
1696
|
if (isAudio) return /* @__PURE__ */ jsxRuntime.jsx(viewers.AudioViewer, { blob: pdfBlob, title: documentData?.file_name || "Audio" });
|
|
1697
1697
|
if (isImage) {
|
|
1698
1698
|
return /* @__PURE__ */ jsxRuntime.jsx(viewers.ImageViewer, { blob: pdfBlob, alt: documentData?.file_name || "Document image" });
|
|
1699
1699
|
}
|
|
1700
1700
|
if (signatureFlow?.kind === "prepare") {
|
|
1701
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1701
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1702
1702
|
SignatureRequestEditor,
|
|
1703
1703
|
{
|
|
1704
1704
|
...viewerProps,
|
|
@@ -1714,7 +1714,7 @@ function ViewerPdfPane({
|
|
|
1714
1714
|
}
|
|
1715
1715
|
if (signatureFlow?.kind === "sign" && currentUserId) {
|
|
1716
1716
|
const { currentPage: _page, scrollTrigger: _trigger, ...guidedProps } = viewerProps;
|
|
1717
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1717
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1718
1718
|
GuidedSigningViewer,
|
|
1719
1719
|
{
|
|
1720
1720
|
...guidedProps,
|
|
@@ -1728,7 +1728,7 @@ function ViewerPdfPane({
|
|
|
1728
1728
|
) });
|
|
1729
1729
|
}
|
|
1730
1730
|
if (placingSignature) {
|
|
1731
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1731
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1732
1732
|
SignaturePlacementViewer,
|
|
1733
1733
|
{
|
|
1734
1734
|
...viewerProps,
|
|
@@ -1744,7 +1744,7 @@ function ViewerPdfPane({
|
|
|
1744
1744
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1745
1745
|
React.Suspense,
|
|
1746
1746
|
{
|
|
1747
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1747
|
+
fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
|
|
1748
1748
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1749
1749
|
AnnotatedPdfViewer,
|
|
1750
1750
|
{
|
|
@@ -1768,17 +1768,17 @@ function ViewerPdfPane({
|
|
|
1768
1768
|
return /* @__PURE__ */ jsxRuntime.jsx(SessionPdfViewer, { ...viewerProps, file: pdfBlob });
|
|
1769
1769
|
}
|
|
1770
1770
|
var NativeDocxEditor = React.lazy(
|
|
1771
|
-
() => import('../ConnectedNativeDocxEditor-
|
|
1771
|
+
() => import('../ConnectedNativeDocxEditor-YA4HWLY4.cjs').then((m) => ({
|
|
1772
1772
|
default: m.ConnectedNativeDocxEditor
|
|
1773
1773
|
}))
|
|
1774
1774
|
);
|
|
1775
1775
|
var StreamedWordArtifact = React.lazy(
|
|
1776
|
-
() => import('../ConnectedStreamedWordArtifact-
|
|
1776
|
+
() => import('../ConnectedStreamedWordArtifact-EXYZAU4Y.cjs').then((m) => ({
|
|
1777
1777
|
default: m.ConnectedStreamedWordArtifact
|
|
1778
1778
|
}))
|
|
1779
1779
|
);
|
|
1780
1780
|
var NativeDocxComparison = React.lazy(
|
|
1781
|
-
() => import('../ConnectedNativeDocxComparison-
|
|
1781
|
+
() => import('../ConnectedNativeDocxComparison-S25BPUH5.cjs').then((m) => ({
|
|
1782
1782
|
default: m.ConnectedNativeDocxComparison
|
|
1783
1783
|
}))
|
|
1784
1784
|
);
|
|
@@ -1904,15 +1904,15 @@ function DocumentViewerContent({
|
|
|
1904
1904
|
};
|
|
1905
1905
|
const documentTitle = streamingDoc?.title || draftDoc?.title || documentData?.doc_metadata?.title || documentData?.file_name || "Document";
|
|
1906
1906
|
const pageNav = totalPages > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1907
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1907
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
|
|
1908
1908
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1909
|
-
|
|
1909
|
+
chunkNPLGB4LI_cjs.PdfPageNav,
|
|
1910
1910
|
{
|
|
1911
1911
|
canPrev: (viewingDocumentPage || 1) > 1,
|
|
1912
1912
|
canNext: (viewingDocumentPage || 1) < totalPages,
|
|
1913
1913
|
onPrev: () => stepPage(-1),
|
|
1914
1914
|
onNext: () => stepPage(1),
|
|
1915
|
-
counter: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1915
|
+
counter: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
|
|
1916
1916
|
}
|
|
1917
1917
|
)
|
|
1918
1918
|
] });
|
|
@@ -1936,7 +1936,7 @@ function DocumentViewerContent({
|
|
|
1936
1936
|
);
|
|
1937
1937
|
const titleBlock = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1938
1938
|
isDraft ? support.renderDraftTitle?.(documentId) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1939
|
-
|
|
1939
|
+
chunkNPLGB4LI_cjs.ViewerTitle,
|
|
1940
1940
|
{
|
|
1941
1941
|
title: documentTitle,
|
|
1942
1942
|
versionLabel: currentVersionLabel,
|
|
@@ -1961,7 +1961,7 @@ function DocumentViewerContent({
|
|
|
1961
1961
|
// A draft's kind replaces the tabs: neither Versions nor the text view means anything
|
|
1962
1962
|
// before the first save.
|
|
1963
1963
|
support.renderDraftKind?.(documentId)
|
|
1964
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1964
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerTabBar, { tabs: viewerTabs, activeId: activeTab, onChange: handleTabChange }),
|
|
1965
1965
|
!isCompact && titleBlock
|
|
1966
1966
|
] });
|
|
1967
1967
|
const annotatable = documentTools.canAnnotate({
|
|
@@ -2034,7 +2034,7 @@ function DocumentViewerContent({
|
|
|
2034
2034
|
}
|
|
2035
2035
|
),
|
|
2036
2036
|
activeTab === "pdf" && isImage && pdfBlob && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2037
|
-
|
|
2037
|
+
chunkNPLGB4LI_cjs.ViewerImageActions,
|
|
2038
2038
|
{
|
|
2039
2039
|
compact: isCompact,
|
|
2040
2040
|
onUseAsReference: support.useImageAsReference ? () => support.useImageAsReference(documentId) : void 0,
|
|
@@ -2064,7 +2064,7 @@ function DocumentViewerContent({
|
|
|
2064
2064
|
{
|
|
2065
2065
|
state: documentData?.shared ? "shared" : "private",
|
|
2066
2066
|
onToggle: share,
|
|
2067
|
-
disabled: !
|
|
2067
|
+
disabled: !chunkQJFJ5JBF_cjs.canChangeVisibility(documentData, currentUserId),
|
|
2068
2068
|
disabledTooltip: "Only the owner can change visibility",
|
|
2069
2069
|
tooltip: documentData?.shared ? "Shared with the workspace \u2014 click to share with specific people" : "Share with the workspace, then optionally notify specific people by email",
|
|
2070
2070
|
variant: "outline",
|
|
@@ -2162,7 +2162,7 @@ function DocumentViewerContent({
|
|
|
2162
2162
|
onZoomChange: setZoom
|
|
2163
2163
|
};
|
|
2164
2164
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2165
|
-
|
|
2165
|
+
chunkNPLGB4LI_cjs.ViewerFrame,
|
|
2166
2166
|
{
|
|
2167
2167
|
frameRef: containerRef,
|
|
2168
2168
|
contentId: documentId,
|
|
@@ -2207,7 +2207,7 @@ function DocumentViewerContent({
|
|
|
2207
2207
|
)
|
|
2208
2208
|
),
|
|
2209
2209
|
children: [
|
|
2210
|
-
isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2210
|
+
isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2211
2211
|
NativeDocxComparison,
|
|
2212
2212
|
{
|
|
2213
2213
|
baseId: compareDocumentId,
|
|
@@ -2217,7 +2217,7 @@ function DocumentViewerContent({
|
|
|
2217
2217
|
) }),
|
|
2218
2218
|
isCaptureDraft && support.renderCaptureDraft?.(documentId),
|
|
2219
2219
|
!isCaptureDraft && (activeTab === "pdf" || isMedia && activeTab === "html") && !isArtifact && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(chunkUWIILWDI_cjs.ViewerPane, { hidden: activeTab !== "pdf", children: [
|
|
2220
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2220
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.DocumentLabelBar, { summaries: labelSummaries }),
|
|
2221
2221
|
!isMedia && !isImage && signatureBanner,
|
|
2222
2222
|
activeTab === "pdf" && !isMedia && !isImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2223
2223
|
chunkD3WFIFRY_cjs.MarkupNotices,
|
|
@@ -2227,7 +2227,7 @@ function DocumentViewerContent({
|
|
|
2227
2227
|
onOpenVersion: (n) => setSnapshotDocumentId(`${documentId}@v${n}`)
|
|
2228
2228
|
}
|
|
2229
2229
|
),
|
|
2230
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2230
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2231
2231
|
ViewerPdfPane,
|
|
2232
2232
|
{
|
|
2233
2233
|
documentId,
|
|
@@ -2265,7 +2265,7 @@ function DocumentViewerContent({
|
|
|
2265
2265
|
}
|
|
2266
2266
|
),
|
|
2267
2267
|
activeTab === "edit" && isArtifact && liveKind && /* @__PURE__ */ jsxRuntime.jsx(chunk2YV7FBLO_cjs.ArtifactCodeView, { source: liveSource, fileName: documentData?.file_name ?? void 0 }),
|
|
2268
|
-
activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2268
|
+
activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
|
|
2269
2269
|
isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkD3WFIFRY_cjs.SignedEditNote, {}),
|
|
2270
2270
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2271
2271
|
NativeDocxEditor,
|
|
@@ -2308,8 +2308,8 @@ function DocumentViewerContent({
|
|
|
2308
2308
|
onOpenTranslation: (id) => setViewingDocumentId(id)
|
|
2309
2309
|
}
|
|
2310
2310
|
),
|
|
2311
|
-
activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2312
|
-
activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2311
|
+
activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
|
|
2312
|
+
activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
|
|
2313
2313
|
signatureBanner,
|
|
2314
2314
|
isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkD3WFIFRY_cjs.SignedEditNote, {}),
|
|
2315
2315
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2322,7 +2322,7 @@ function DocumentViewerContent({
|
|
|
2322
2322
|
`${snapshotDocumentId || documentId}-${snapshotDocumentId ? "snapshot" : "live"}`
|
|
2323
2323
|
)
|
|
2324
2324
|
] }),
|
|
2325
|
-
streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2325
|
+
streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2326
2326
|
StreamedWordArtifact,
|
|
2327
2327
|
{
|
|
2328
2328
|
documentId: documentId.startsWith("doc-") ? documentId : void 0,
|
|
@@ -2332,7 +2332,7 @@ function DocumentViewerContent({
|
|
|
2332
2332
|
},
|
|
2333
2333
|
documentId
|
|
2334
2334
|
) }),
|
|
2335
|
-
!isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkUWIILWDI_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2335
|
+
!isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkUWIILWDI_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkNPLGB4LI_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2336
2336
|
ParsedTextView,
|
|
2337
2337
|
{
|
|
2338
2338
|
documentId: pdfSnapshotId || documentId,
|
package/dist/connect/viewer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { HtmlPassage, ViewerTitle, ViewerTabBar, ViewerImageActions, ViewerFrame, ViewerMessage, DocumentLabelBar, ViewerControlBar, ViewerZoomControl, PdfPageNav, ViewerPageCounter, summariseDocTags, isDocumentLabel, ViewerPreviewUnavailable, ViewerLoadError, HtmlViewerRoot, CitedRunNav, HtmlViewerSurface, HtmlPage, HtmlViewerEmpty, TagPassagePanel } from '../chunk-
|
|
2
|
+
import { HtmlPassage, ViewerTitle, ViewerTabBar, ViewerImageActions, ViewerFrame, ViewerMessage, DocumentLabelBar, ViewerControlBar, ViewerZoomControl, PdfPageNav, ViewerPageCounter, summariseDocTags, isDocumentLabel, ViewerPreviewUnavailable, ViewerLoadError, HtmlViewerRoot, CitedRunNav, HtmlViewerSurface, HtmlPage, HtmlViewerEmpty, TagPassagePanel } from '../chunk-FTZ45WHY.js';
|
|
3
3
|
import { useDocumentViewerSupport } from '../chunk-EYJMMGXF.js';
|
|
4
|
-
import { canChangeVisibility } from '../chunk-
|
|
4
|
+
import { canChangeVisibility } from '../chunk-5ZIYPZYE.js';
|
|
5
5
|
import '../chunk-RC6VTY2H.js';
|
|
6
6
|
import { useConnectedConversations, useConnectedDocuments, useConnectedTags } from '../chunk-KDLX5AA7.js';
|
|
7
7
|
import { useConnectedWorkspace } from '../chunk-TF7HN5EU.js';
|
|
@@ -1762,17 +1762,17 @@ function ViewerPdfPane({
|
|
|
1762
1762
|
return /* @__PURE__ */ jsx(SessionPdfViewer, { ...viewerProps, file: pdfBlob });
|
|
1763
1763
|
}
|
|
1764
1764
|
var NativeDocxEditor = lazy(
|
|
1765
|
-
() => import('../ConnectedNativeDocxEditor-
|
|
1765
|
+
() => import('../ConnectedNativeDocxEditor-JJAGMHZC.js').then((m) => ({
|
|
1766
1766
|
default: m.ConnectedNativeDocxEditor
|
|
1767
1767
|
}))
|
|
1768
1768
|
);
|
|
1769
1769
|
var StreamedWordArtifact = lazy(
|
|
1770
|
-
() => import('../ConnectedStreamedWordArtifact-
|
|
1770
|
+
() => import('../ConnectedStreamedWordArtifact-YAAXY5KY.js').then((m) => ({
|
|
1771
1771
|
default: m.ConnectedStreamedWordArtifact
|
|
1772
1772
|
}))
|
|
1773
1773
|
);
|
|
1774
1774
|
var NativeDocxComparison = lazy(
|
|
1775
|
-
() => import('../ConnectedNativeDocxComparison-
|
|
1775
|
+
() => import('../ConnectedNativeDocxComparison-2PLOOXSH.js').then((m) => ({
|
|
1776
1776
|
default: m.ConnectedNativeDocxComparison
|
|
1777
1777
|
}))
|
|
1778
1778
|
);
|
|
@@ -3,3 +3,8 @@ export { FileTooltipContent, isActiveDocumentStatus, startMenuItem, type FileTil
|
|
|
3
3
|
export { DocumentSyncGlyph } from './DocumentSyncGlyph';
|
|
4
4
|
export { FilesSupportProvider, useFilesSupport, useOfflineDocumentIds, useViewingDocumentId, type FilesStartItem, type FilesSupport, } from './support';
|
|
5
5
|
export { useFilesStore, usePendingFolders } from './store';
|
|
6
|
+
export { ConnectedUpload, type ConnectedUploadFooterParts, type ConnectedUploadProps, } from './upload/ConnectedUpload';
|
|
7
|
+
export { ConnectedUploadDropzone, type ConnectedUploadDropzoneProps, type UploadSource, } from './upload/ConnectedUploadDropzone';
|
|
8
|
+
export { EmptyWorkspaceUpload, type EmptyWorkspaceUploadProps } from './upload/EmptyWorkspaceUpload';
|
|
9
|
+
export { AddFromAccountsButton } from './upload/AddFromAccountsButton';
|
|
10
|
+
export { useAddFromUrls, type AddFromUrlsOptions } from './upload/useAddFromUrls';
|
|
@@ -24,6 +24,8 @@ export interface FilesSupport {
|
|
|
24
24
|
emailDocument?: (document: WorkspaceDocument) => Promise<void>;
|
|
25
25
|
/** The documents kept on this device for offline use, as a hook. */
|
|
26
26
|
useOfflineDocumentIds?: () => ReadonlySet<string>;
|
|
27
|
+
/** Show how to raise the plan's limits (an upload was refused for them). Absent: not offered. */
|
|
28
|
+
openUpgrade?: () => void;
|
|
27
29
|
/** The document open in the host's viewer, as a hook (its tile is marked); null when closed. */
|
|
28
30
|
useViewingDocumentId?: () => string | null;
|
|
29
31
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AddFromAccountsButton
|
|
3
|
+
*
|
|
4
|
+
* "Add from accounts" shortcut into the accounts (email import) modal, showing
|
|
5
|
+
* the logos of every enabled/visible connector product — Outlook + OneDrive for
|
|
6
|
+
* the Microsoft grant, Gmail + Google Drive for the Google grant, iManage, etc.
|
|
7
|
+
* Renders nothing when no vendor is available/visible. Shared by the documents
|
|
8
|
+
* empty state and the chat empty state so the two stay identical.
|
|
9
|
+
*/
|
|
10
|
+
interface AddFromAccountsButtonProps {
|
|
11
|
+
/** Opens the "Add from Email" modal. */
|
|
12
|
+
onImportFromEmail: () => void;
|
|
13
|
+
'data-testid'?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function AddFromAccountsButton({ onImportFromEmail, 'data-testid': dataTestId, }: AddFromAccountsButtonProps): import("react").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adding documents to the open workspace: choose files (or folders, zip archives, web addresses,
|
|
3
|
+
* the host's connected accounts), see what was refused and why, choose who sees them, upload with
|
|
4
|
+
* progress. The documents get AI titles and the workspace's shared AI fields per its settings; the
|
|
5
|
+
* upload runs with the host's configuration (`configExtId`).
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
import { type UploadSource } from './ConnectedUploadDropzone';
|
|
9
|
+
export interface ConnectedUploadFooterParts {
|
|
10
|
+
/** The upload button. */
|
|
11
|
+
submit: ReactNode;
|
|
12
|
+
shared: boolean;
|
|
13
|
+
onSharedChange: (shared: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface ConnectedUploadProps {
|
|
16
|
+
/** Files chosen before the upload opened (e.g. dropped on a view). */
|
|
17
|
+
initialFiles?: File[];
|
|
18
|
+
/** Web addresses to add as soon as the upload opens. */
|
|
19
|
+
initialUrls?: string[];
|
|
20
|
+
/** The folder the documents go to (files keep their sub-folders below it). */
|
|
21
|
+
folder?: string | null;
|
|
22
|
+
/** Show only this source; absent: a picker of sources. */
|
|
23
|
+
source?: UploadSource | null;
|
|
24
|
+
onPickSource?: (source: UploadSource) => void;
|
|
25
|
+
/** The configuration the documents are processed with. */
|
|
26
|
+
configExtId?: string | null;
|
|
27
|
+
/** Close once uploaded (default true). */
|
|
28
|
+
closeOnUpload?: boolean;
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
onUploadComplete?: () => void;
|
|
31
|
+
/** The host's connected accounts to import from. Absent: not offered. */
|
|
32
|
+
accounts?: ReactNode;
|
|
33
|
+
/** The bar under the chosen files, around the upload button (e.g. processing settings). */
|
|
34
|
+
renderFooter?: (parts: ConnectedUploadFooterParts) => ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export declare function ConnectedUpload({ initialFiles, initialUrls, folder, source, onPickSource, configExtId, closeOnUpload, onClose, onUploadComplete, accounts, renderFooter, }: ConnectedUploadProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where files to upload are chosen: dropped (folders whole, zip archives opened into their files)
|
|
3
|
+
* or picked, checked against what an upload takes. Compact, it is a drop box with the browse
|
|
4
|
+
* buttons inside; otherwise it shows one source (`source`), or a picker of sources (computer, the
|
|
5
|
+
* host's connected accounts, the internet).
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
import { type RefusedUploadFile } from '@arbidocs/react';
|
|
9
|
+
export type UploadSource = 'computer' | 'internet' | 'email';
|
|
10
|
+
export interface ConnectedUploadDropzoneProps {
|
|
11
|
+
onFilesSelected: (files: File[]) => void;
|
|
12
|
+
onFilesRejected?: (refused: RefusedUploadFile[]) => void;
|
|
13
|
+
/** Add from web addresses. Absent: not offered. */
|
|
14
|
+
onUrlsSubmit?: (urls: string[]) => void | boolean | Promise<void | boolean>;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
/** The largest file taken (default 2 GB). */
|
|
18
|
+
maxFileSize?: number;
|
|
19
|
+
title?: string;
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
/** A drop box with the browse buttons inside, for an empty view. */
|
|
22
|
+
compact?: boolean;
|
|
23
|
+
/** Instead of picking files here, open the full upload (e.g. a dialog). */
|
|
24
|
+
onOpenUpload?: () => void;
|
|
25
|
+
/** The workspace the files go to, named in the web-address dialog. */
|
|
26
|
+
workspaceName?: string;
|
|
27
|
+
/** Show only this source; absent: a picker of sources. */
|
|
28
|
+
source?: UploadSource | null;
|
|
29
|
+
/** A source was chosen from the picker. */
|
|
30
|
+
onPickSource?: (source: UploadSource) => void;
|
|
31
|
+
/** The host's connected accounts to import from (the "From accounts" source). Absent: none. */
|
|
32
|
+
accounts?: ReactNode;
|
|
33
|
+
/** An action before "Add from URL" in compact mode (e.g. "Add from accounts"). */
|
|
34
|
+
compactLeadingAction?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export declare function ConnectedUploadDropzone({ onFilesSelected, onFilesRejected, onUrlsSubmit, disabled, className, maxFileSize, title, subtitle, compact, onOpenUpload, workspaceName, source, onPickSource, accounts, compactLeadingAction, }: ConnectedUploadDropzoneProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A workspace with no documents yet: a centred drop box (files, folders, zip archives, web
|
|
3
|
+
* addresses), the host's "Add from accounts" shortcut, and the privacy promises. The same in every
|
|
4
|
+
* view of the files, so they stay identical.
|
|
5
|
+
*/
|
|
6
|
+
export interface EmptyWorkspaceUploadProps {
|
|
7
|
+
onFilesSelected: (files: File[]) => void;
|
|
8
|
+
onUrlsSubmit?: (urls: string[]) => void;
|
|
9
|
+
/** Opens the host's accounts import. Absent: the shortcut is hidden. */
|
|
10
|
+
onImportFromEmail?: () => void;
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function EmptyWorkspaceUpload({ onFilesSelected, onUrlsSubmit, onImportFromEmail, 'data-testid': dataTestId, }: EmptyWorkspaceUploadProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add documents from web addresses, telling the user how it went: the documents the server made,
|
|
3
|
+
* the addresses it skipped, and a zip archive's files (handed to `onZipFiles`, to upload like
|
|
4
|
+
* chosen files). Resolves false when the addresses could not be sent (the dialog stays open).
|
|
5
|
+
*/
|
|
6
|
+
export interface AddFromUrlsOptions {
|
|
7
|
+
/** Shared with the workspace (default true). */
|
|
8
|
+
shared?: boolean;
|
|
9
|
+
configExtId?: string | null;
|
|
10
|
+
/** A zip archive's files, to upload like chosen files. */
|
|
11
|
+
onZipFiles?: (files: File[]) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useAddFromUrls({ shared, configExtId, onZipFiles, }?: AddFromUrlsOptions): (urls: string[]) => Promise<boolean>;
|