@arbidocs/blocks 0.5.119 → 0.5.120
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-546ILGLW.cjs → ConnectedNativeDocxComparison-SGE4R3M4.cjs} +6 -6
- package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs.map → ConnectedNativeDocxComparison-SGE4R3M4.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs → ConnectedStreamedWordArtifact-6MCLJRIT.cjs} +6 -6
- package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs.map → ConnectedStreamedWordArtifact-6MCLJRIT.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-ZSBZBGFK.cjs → DocumentReviewCard-BPIAJJED.cjs} +14 -14
- package/dist/{DocumentReviewCard-ZSBZBGFK.cjs.map → DocumentReviewCard-BPIAJJED.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-6UKR5WEF.cjs → FilesViewerDialog-67WK3TZC.cjs} +11 -11
- package/dist/{FilesViewerDialog-6UKR5WEF.cjs.map → FilesViewerDialog-67WK3TZC.cjs.map} +1 -1
- package/dist/agents/index.cjs +185 -185
- package/dist/agents/tasks/ConversationListView.js +10 -2
- package/dist/agents/tasks/ConversationListView.js.map +2 -2
- package/dist/agents/tasks/TaskTable.js +5 -4
- package/dist/agents/tasks/TaskTable.js.map +2 -2
- package/dist/agents/tasks/WorkflowsTable.js +4 -5
- package/dist/agents/tasks/WorkflowsTable.js.map +2 -2
- package/dist/agents/tasks/taskColumns.js +1 -1
- package/dist/agents/tasks/taskColumns.js.map +1 -1
- package/dist/agents/tasks/taskTableLabels.js +1 -1
- package/dist/agents/tasks/taskTableLabels.js.map +1 -1
- package/dist/agents/tasks/workflowTableLabels.js +1 -1
- package/dist/agents/tasks/workflowTableLabels.js.map +1 -1
- package/dist/{chunk-P77YTTJ3.cjs → chunk-3GWWOYGS.cjs} +4 -4
- package/dist/{chunk-P77YTTJ3.cjs.map → chunk-3GWWOYGS.cjs.map} +1 -1
- package/dist/{chunk-HB2O4THB.cjs → chunk-5IZFSAEZ.cjs} +4 -4
- package/dist/{chunk-HB2O4THB.cjs.map → chunk-5IZFSAEZ.cjs.map} +1 -1
- package/dist/{chunk-DDIW4HLU.cjs → chunk-775S43W7.cjs} +19 -10
- package/dist/chunk-775S43W7.cjs.map +1 -0
- package/dist/{chunk-Y24V6HPR.cjs → chunk-BP3IJ34D.cjs} +4 -4
- package/dist/{chunk-Y24V6HPR.cjs.map → chunk-BP3IJ34D.cjs.map} +1 -1
- package/dist/{chunk-TT4IF52H.cjs → chunk-BUVIBHFU.cjs} +37 -38
- package/dist/chunk-BUVIBHFU.cjs.map +1 -0
- package/dist/{chunk-OEREKAAP.cjs → chunk-CKCG4NDB.cjs} +8 -8
- package/dist/{chunk-OEREKAAP.cjs.map → chunk-CKCG4NDB.cjs.map} +1 -1
- package/dist/{chunk-YGXOKB5Z.cjs → chunk-DFBDQKGE.cjs} +4 -4
- package/dist/{chunk-YGXOKB5Z.cjs.map → chunk-DFBDQKGE.cjs.map} +1 -1
- package/dist/{chunk-VGCTYTEW.cjs → chunk-ECLUFKYR.cjs} +4 -4
- package/dist/{chunk-VGCTYTEW.cjs.map → chunk-ECLUFKYR.cjs.map} +1 -1
- package/dist/{chunk-CPG7II4E.cjs → chunk-HA66DHW6.cjs} +28 -28
- package/dist/{chunk-CPG7II4E.cjs.map → chunk-HA66DHW6.cjs.map} +1 -1
- package/dist/{chunk-57NHXEU2.cjs → chunk-MXBXZXXQ.cjs} +5 -5
- package/dist/{chunk-57NHXEU2.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
- package/dist/{chunk-NNUK5ZM7.cjs → chunk-NLSWDP42.cjs} +9 -17
- package/dist/chunk-NLSWDP42.cjs.map +1 -0
- package/dist/{chunk-B2HNNG25.cjs → chunk-Q6CLWOP2.cjs} +29 -29
- package/dist/{chunk-B2HNNG25.cjs.map → chunk-Q6CLWOP2.cjs.map} +1 -1
- package/dist/{chunk-R7CJEIA5.cjs → chunk-QQWHG3KF.cjs} +5 -6
- package/dist/chunk-QQWHG3KF.cjs.map +1 -0
- package/dist/{chunk-VLCY46K6.cjs → chunk-TG2GM7WJ.cjs} +4 -3
- package/dist/chunk-TG2GM7WJ.cjs.map +1 -0
- package/dist/{chunk-QHOHDNBU.cjs → chunk-VZCPMXWC.cjs} +4 -4
- package/dist/{chunk-QHOHDNBU.cjs.map → chunk-VZCPMXWC.cjs.map} +1 -1
- package/dist/{chunk-NIE3N6OM.cjs → chunk-W6INT5GS.cjs} +5 -5
- package/dist/{chunk-NIE3N6OM.cjs.map → chunk-W6INT5GS.cjs.map} +1 -1
- package/dist/{chunk-ZPPMAL5P.cjs → chunk-WQMR3O2D.cjs} +6 -10
- package/dist/chunk-WQMR3O2D.cjs.map +1 -0
- package/dist/{chunk-SB4M3ITT.cjs → chunk-X36UR4A7.cjs} +173 -56
- package/dist/chunk-X36UR4A7.cjs.map +1 -0
- package/dist/{chunk-XKVPSOKP.cjs → chunk-YYSBWMDJ.cjs} +4 -4
- package/dist/{chunk-XKVPSOKP.cjs.map → chunk-YYSBWMDJ.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +3 -3
- package/dist/collaboration/sharing/ShareControl.js +10 -2
- package/dist/collaboration/sharing/ShareControl.js.map +2 -2
- package/dist/components/SharedCell.d.ts +2 -4
- package/dist/components/SharedCell.js +4 -8
- package/dist/components/SharedCell.js.map +2 -2
- package/dist/connect/docx.cjs +9 -9
- package/dist/connect/index.cjs +595 -567
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +9 -9
- package/dist/connection/facts/factPageColumns.js +3 -9
- package/dist/connection/facts/factPageColumns.js.map +2 -2
- package/dist/connection/files/grid/cells.js +1 -3
- package/dist/connection/files/grid/cells.js.map +2 -2
- package/dist/connection/files/grid/documentColumns.js +3 -2
- package/dist/connection/files/grid/documentColumns.js.map +2 -2
- package/dist/connection/sharing/WorkspaceMembersList.d.ts +4 -0
- package/dist/connection/sharing/WorkspaceMembersList.js +34 -0
- package/dist/connection/sharing/WorkspaceMembersList.js.map +7 -0
- package/dist/connection/shell/ConnectedAppShell.js +4 -0
- package/dist/connection/shell/ConnectedAppShell.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +3 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/ViewerPdfPane.js +20 -2
- package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
- package/dist/connection/viewer/pdf/PdfPassageHighlights.d.ts +12 -0
- package/dist/connection/viewer/pdf/PdfPassageHighlights.js +36 -0
- package/dist/connection/viewer/pdf/PdfPassageHighlights.js.map +7 -0
- package/dist/connection/viewer/pdf/passageHighlights.d.ts +26 -0
- package/dist/connection/viewer/pdf/passageHighlights.js +40 -0
- package/dist/connection/viewer/pdf/passageHighlights.js.map +7 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.d.ts +9 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.js +47 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.js.map +7 -0
- package/dist/connection/workflows/workflowsPageLabels.js +1 -1
- package/dist/connection/workflows/workflowsPageLabels.js.map +1 -1
- package/dist/embed/index.cjs +13 -13
- package/dist/facts/factColumns.js +3 -3
- package/dist/facts/factColumns.js.map +1 -1
- package/dist/facts/index.cjs +42 -42
- package/dist/files/HtmlViewerParts.js +7 -15
- package/dist/files/HtmlViewerParts.js.map +2 -2
- package/dist/files/index.cjs +223 -223
- package/dist/index.cjs +238 -238
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +24 -24
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-DDIW4HLU.cjs.map +0 -1
- package/dist/chunk-NNUK5ZM7.cjs.map +0 -1
- package/dist/chunk-R7CJEIA5.cjs.map +0 -1
- package/dist/chunk-SB4M3ITT.cjs.map +0 -1
- package/dist/chunk-TT4IF52H.cjs.map +0 -1
- package/dist/chunk-VLCY46K6.cjs.map +0 -1
- package/dist/chunk-ZPPMAL5P.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var react = require('react');
|
|
5
4
|
var ui = require('@arbidocs/react/ui');
|
|
5
|
+
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
|
|
8
8
|
// src/components/SharedCell.tsx
|
|
@@ -12,8 +12,7 @@ function SharedCellComponent({
|
|
|
12
12
|
disabled = false,
|
|
13
13
|
disabledTooltip,
|
|
14
14
|
tooltipActive,
|
|
15
|
-
tooltipInactive
|
|
16
|
-
workspaceLabel
|
|
15
|
+
tooltipInactive
|
|
17
16
|
}) {
|
|
18
17
|
const isShared = item.shared ?? item.is_shared ?? false;
|
|
19
18
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -22,16 +21,14 @@ function SharedCellComponent({
|
|
|
22
21
|
className: "flex justify-center items-center h-full",
|
|
23
22
|
"data-testid": `shared-cell-${item.external_id}`,
|
|
24
23
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
-
ui.
|
|
24
|
+
ui.SharingEntity,
|
|
26
25
|
{
|
|
27
|
-
|
|
26
|
+
shared: isShared,
|
|
28
27
|
onToggle,
|
|
29
28
|
disabled,
|
|
30
29
|
disabledTooltip,
|
|
31
|
-
showLabel: false,
|
|
32
30
|
tooltipActive,
|
|
33
31
|
tooltipInactive,
|
|
34
|
-
workspaceLabel,
|
|
35
32
|
"data-testid": `${isShared ? "active-share-button" : "inactive-share-button"}`
|
|
36
33
|
}
|
|
37
34
|
)
|
|
@@ -46,11 +43,10 @@ function arePropsEqual(prevProps, nextProps) {
|
|
|
46
43
|
if (prevProps.disabledTooltip !== nextProps.disabledTooltip) return false;
|
|
47
44
|
if (prevProps.tooltipActive !== nextProps.tooltipActive) return false;
|
|
48
45
|
if (prevProps.tooltipInactive !== nextProps.tooltipInactive) return false;
|
|
49
|
-
if (prevProps.workspaceLabel !== nextProps.workspaceLabel) return false;
|
|
50
46
|
return true;
|
|
51
47
|
}
|
|
52
48
|
var SharedCell = react.memo(SharedCellComponent, arePropsEqual);
|
|
53
49
|
|
|
54
50
|
exports.SharedCell = SharedCell;
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-WQMR3O2D.cjs.map
|
|
52
|
+
//# sourceMappingURL=chunk-WQMR3O2D.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SharedCell.tsx"],"names":["jsx","SharingEntity","memo"],"mappings":";;;;;;;AA2BA,SAAS,mBAAA,CAA0C;AAAA,EACjD,IAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,eAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,EAAuB;AACrB,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,MAAA,IAAU,IAAA,CAAK,SAAA,IAAa,KAAA;AAElD,EAAA,uBACEA,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,yCAAA;AAAA,MACV,aAAA,EAAa,CAAA,YAAA,EAAe,IAAA,CAAK,WAAW,CAAA,CAAA;AAAA,MAE5C,QAAA,kBAAAA,cAAA;AAAA,QAACC,gBAAA;AAAA,QAAA;AAAA,UACC,MAAA,EAAQ,QAAA;AAAA,UACR,QAAA;AAAA,UACA,QAAA;AAAA,UACA,eAAA;AAAA,UACA,aAAA;AAAA,UACA,eAAA;AAAA,UACA,aAAA,EAAa,CAAA,EAAG,QAAA,GAAW,qBAAA,GAAwB,uBAAuB,CAAA;AAAA;AAAA;AAC5E;AAAA,GACF;AAEJ;AAGA,SAAS,aAAA,CACP,WACA,SAAA,EACS;AACT,EAAA,IAAI,UAAU,IAAA,CAAK,WAAA,KAAgB,SAAA,CAAU,IAAA,CAAK,aAAa,OAAO,KAAA;AACtE,EAAA,IAAI,UAAU,IAAA,CAAK,MAAA,KAAW,SAAA,CAAU,IAAA,CAAK,QAAQ,OAAO,KAAA;AAC5D,EAAA,IAAI,UAAU,IAAA,CAAK,SAAA,KAAc,SAAA,CAAU,IAAA,CAAK,WAAW,OAAO,KAAA;AAClE,EAAA,IAAI,SAAA,CAAU,QAAA,KAAa,SAAA,CAAU,QAAA,EAAU,OAAO,KAAA;AACtD,EAAA,IAAI,SAAA,CAAU,eAAA,KAAoB,SAAA,CAAU,eAAA,EAAiB,OAAO,KAAA;AACpE,EAAA,IAAI,SAAA,CAAU,aAAA,KAAkB,SAAA,CAAU,aAAA,EAAe,OAAO,KAAA;AAChE,EAAA,IAAI,SAAA,CAAU,eAAA,KAAoB,SAAA,CAAU,eAAA,EAAiB,OAAO,KAAA;AAEpE,EAAA,OAAO,IAAA;AACT;AAEO,IAAM,UAAA,GAAaC,UAAA,CAAK,mBAAA,EAAqB,aAAa","file":"chunk-WQMR3O2D.cjs","sourcesContent":["/**\n * SharedCell Component\n *\n * Generic grid cell renderer for shared/private visibility state.\n * Works with any entity that has an external_id and shared/is_shared field.\n * Shown as the Sharing badge (Only me / Workspace); clicking it toggles.\n */\n\nimport { SharingEntity } from '@arbidocs/react/ui'\nimport { memo } from 'react'\n\nexport interface SharedItem {\n external_id: string\n shared?: boolean | null\n is_shared?: boolean | null\n}\n\nexport interface SharedCellProps<T extends SharedItem> {\n item: T\n onToggle: (shouldShare: boolean) => void\n disabled?: boolean\n disabledTooltip?: string\n /** Replaces the default tooltips (e.g. documents say who can see the file). */\n tooltipActive?: string\n tooltipInactive?: string\n}\n\nfunction SharedCellComponent<T extends SharedItem>({\n item,\n onToggle,\n disabled = false,\n disabledTooltip,\n tooltipActive,\n tooltipInactive,\n}: SharedCellProps<T>) {\n const isShared = item.shared ?? item.is_shared ?? false\n\n return (\n <div\n className=\"flex justify-center items-center h-full\"\n data-testid={`shared-cell-${item.external_id}`}\n >\n <SharingEntity\n shared={isShared}\n onToggle={onToggle}\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n tooltipActive={tooltipActive}\n tooltipInactive={tooltipInactive}\n data-testid={`${isShared ? 'active-share-button' : 'inactive-share-button'}`}\n />\n </div>\n )\n}\n\n// Type-safe memo wrapper\nfunction arePropsEqual<T extends SharedItem>(\n prevProps: SharedCellProps<T>,\n nextProps: SharedCellProps<T>\n): boolean {\n if (prevProps.item.external_id !== nextProps.item.external_id) return false\n if (prevProps.item.shared !== nextProps.item.shared) return false\n if (prevProps.item.is_shared !== nextProps.item.is_shared) return false\n if (prevProps.disabled !== nextProps.disabled) return false\n if (prevProps.disabledTooltip !== nextProps.disabledTooltip) return false\n if (prevProps.tooltipActive !== nextProps.tooltipActive) return false\n if (prevProps.tooltipInactive !== nextProps.tooltipInactive) return false\n // Note: onToggle is not compared as it should be stable (useCallback)\n return true\n}\n\nexport const SharedCell = memo(SharedCellComponent, arePropsEqual) as typeof SharedCellComponent\n"]}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
var chunk4CIVQWAX_cjs = require('./chunk-4CIVQWAX.cjs');
|
|
5
5
|
var chunkPL7HUTM3_cjs = require('./chunk-PL7HUTM3.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkDFBDQKGE_cjs = require('./chunk-DFBDQKGE.cjs');
|
|
7
7
|
var chunkKXIRVKCJ_cjs = require('./chunk-KXIRVKCJ.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
8
|
+
var chunkBUVIBHFU_cjs = require('./chunk-BUVIBHFU.cjs');
|
|
9
|
+
var chunkNLSWDP42_cjs = require('./chunk-NLSWDP42.cjs');
|
|
10
|
+
var chunkECLUFKYR_cjs = require('./chunk-ECLUFKYR.cjs');
|
|
11
11
|
var chunkYYPZOEED_cjs = require('./chunk-YYPZOEED.cjs');
|
|
12
12
|
var chunkGNZAH6UI_cjs = require('./chunk-GNZAH6UI.cjs');
|
|
13
13
|
var chunkJH6JTI76_cjs = require('./chunk-JH6JTI76.cjs');
|
|
@@ -15,7 +15,7 @@ var chunkDTMBAFIL_cjs = require('./chunk-DTMBAFIL.cjs');
|
|
|
15
15
|
var chunkMZZ3SBQL_cjs = require('./chunk-MZZ3SBQL.cjs');
|
|
16
16
|
var chunkMNIQDXM6_cjs = require('./chunk-MNIQDXM6.cjs');
|
|
17
17
|
var chunkE3Y7RI3J_cjs = require('./chunk-E3Y7RI3J.cjs');
|
|
18
|
-
var
|
|
18
|
+
var chunkTG2GM7WJ_cjs = require('./chunk-TG2GM7WJ.cjs');
|
|
19
19
|
var chunkEG7EJFUE_cjs = require('./chunk-EG7EJFUE.cjs');
|
|
20
20
|
var chunkHQDR43JC_cjs = require('./chunk-HQDR43JC.cjs');
|
|
21
21
|
var chunkJR2YSBD5_cjs = require('./chunk-JR2YSBD5.cjs');
|
|
@@ -194,13 +194,13 @@ function ViewerRelatedDocuments({ document: document2 }) {
|
|
|
194
194
|
);
|
|
195
195
|
if (!related) return null;
|
|
196
196
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
197
|
-
|
|
197
|
+
chunkBUVIBHFU_cjs.RelatedDocumentsCell,
|
|
198
198
|
{
|
|
199
199
|
currentDoc: document2,
|
|
200
200
|
related,
|
|
201
201
|
viewingDocumentId: viewerOpen ? viewingId : null,
|
|
202
202
|
onDocumentClick: (id) => session.setViewingDocument({ id, page: null }),
|
|
203
|
-
onDelete: (doc) =>
|
|
203
|
+
onDelete: (doc) => chunkDFBDQKGE_cjs.useFilesDialogs.getState().requestDelete(doc),
|
|
204
204
|
onCompare
|
|
205
205
|
}
|
|
206
206
|
);
|
|
@@ -327,7 +327,7 @@ function useViewedDocument(documentId) {
|
|
|
327
327
|
const documentData = record?.external_id === documentId ? record : void 0;
|
|
328
328
|
const { data: tags } = chunkHQDR43JC_cjs.useConnectedTags();
|
|
329
329
|
const labelSummaries = React.useMemo(
|
|
330
|
-
() =>
|
|
330
|
+
() => chunkNLSWDP42_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkNLSWDP42_cjs.isDocumentLabel)),
|
|
331
331
|
[documentData, tags]
|
|
332
332
|
);
|
|
333
333
|
const fileName = documentData?.file_name;
|
|
@@ -881,7 +881,7 @@ function PassageTagPanel({
|
|
|
881
881
|
[workspaceTags]
|
|
882
882
|
);
|
|
883
883
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
884
|
-
|
|
884
|
+
chunkNLSWDP42_cjs.TagPassagePanel,
|
|
885
885
|
{
|
|
886
886
|
pageNumber,
|
|
887
887
|
preview,
|
|
@@ -1006,7 +1006,7 @@ var ParsedPassage = React.memo(function ParsedPassage2({
|
|
|
1006
1006
|
];
|
|
1007
1007
|
}) : [];
|
|
1008
1008
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1009
|
-
|
|
1009
|
+
chunkNLSWDP42_cjs.HtmlPassage,
|
|
1010
1010
|
{
|
|
1011
1011
|
chunkId,
|
|
1012
1012
|
highlight: isStrong ? "strong" : isLight ? "light" : void 0,
|
|
@@ -1182,11 +1182,11 @@ function useDocumentLabels(documentId, doctags, orderedChunkIds) {
|
|
|
1182
1182
|
const workspaceTags = React.useMemo(() => allTags.filter(isDocumentTag), [allTags]);
|
|
1183
1183
|
const documentDoctags = React.useMemo(() => doctags ?? [], [doctags]);
|
|
1184
1184
|
const tagSummaries = React.useMemo(
|
|
1185
|
-
() =>
|
|
1185
|
+
() => chunkNLSWDP42_cjs.summariseDocTags(documentDoctags, workspaceTags),
|
|
1186
1186
|
[documentDoctags, workspaceTags]
|
|
1187
1187
|
);
|
|
1188
1188
|
const labelSummaries = React.useMemo(
|
|
1189
|
-
() =>
|
|
1189
|
+
() => chunkNLSWDP42_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkNLSWDP42_cjs.isDocumentLabel)),
|
|
1190
1190
|
[documentDoctags, workspaceTags]
|
|
1191
1191
|
);
|
|
1192
1192
|
const labelsByChunk = React.useMemo(() => {
|
|
@@ -1694,14 +1694,14 @@ function ParsedTextView({
|
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
1696
|
}, [maxPageNumber, onLoadSuccess]);
|
|
1697
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1697
|
+
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading parsed document..." });
|
|
1698
1698
|
if (error) {
|
|
1699
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1699
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
|
|
1700
1700
|
}
|
|
1701
1701
|
const taggingChunk = labels.taggingChunkId ? processedChunks.flatMap((page) => page.chunks).find((c) => c.chunkExtId === labels.taggingChunkId) : void 0;
|
|
1702
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1702
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNLSWDP42_cjs.HtmlViewerRoot, { children: [
|
|
1703
1703
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1704
|
-
|
|
1704
|
+
chunkNLSWDP42_cjs.DocumentLabelBar,
|
|
1705
1705
|
{
|
|
1706
1706
|
summaries: labels.labelSummaries,
|
|
1707
1707
|
activeTagExtId: labels.activeTagExtId,
|
|
@@ -1726,15 +1726,15 @@ function ParsedTextView({
|
|
|
1726
1726
|
}
|
|
1727
1727
|
),
|
|
1728
1728
|
!citation.factCitationActive && citation.runStartIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1729
|
-
|
|
1729
|
+
chunkNLSWDP42_cjs.CitedRunNav,
|
|
1730
1730
|
{
|
|
1731
1731
|
position: citation.runCursor + 1,
|
|
1732
1732
|
total: citation.runStartIds.length,
|
|
1733
1733
|
onStep: citation.gotoRun
|
|
1734
1734
|
}
|
|
1735
1735
|
),
|
|
1736
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1737
|
-
|
|
1736
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1737
|
+
chunkNLSWDP42_cjs.HtmlPage,
|
|
1738
1738
|
{
|
|
1739
1739
|
pageNumber: page.pageNumber,
|
|
1740
1740
|
totalPages,
|
|
@@ -1775,9 +1775,109 @@ function ParsedTextView({
|
|
|
1775
1775
|
})
|
|
1776
1776
|
},
|
|
1777
1777
|
pageIndex
|
|
1778
|
-
)) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1778
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.HtmlViewerEmpty, {}) })
|
|
1779
1779
|
] });
|
|
1780
1780
|
}
|
|
1781
|
+
function PdfPassageHighlights({
|
|
1782
|
+
boxes,
|
|
1783
|
+
activeId,
|
|
1784
|
+
onActiveDrawn
|
|
1785
|
+
}) {
|
|
1786
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", "data-testid": "pdf-passage-highlights", children: boxes.map(({ chunkId, box: [x0, y0, x1, y1], highlight }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1787
|
+
"div",
|
|
1788
|
+
{
|
|
1789
|
+
ref: chunkId === activeId ? (element) => {
|
|
1790
|
+
if (element) onActiveDrawn(element);
|
|
1791
|
+
} : void 0,
|
|
1792
|
+
"data-testid": "pdf-passage-highlight",
|
|
1793
|
+
"data-chunk-id": chunkId,
|
|
1794
|
+
"data-highlight": highlight,
|
|
1795
|
+
className: ui.cn(
|
|
1796
|
+
// multiplied, so the page's text stays as dark as it was under the wash
|
|
1797
|
+
"absolute rounded-sm mix-blend-multiply",
|
|
1798
|
+
highlight === "strong" ? "bg-ai-soft ring-1 ring-ai-accent/50" : "bg-ai-soft/60"
|
|
1799
|
+
),
|
|
1800
|
+
style: {
|
|
1801
|
+
left: `${x0 * 100}%`,
|
|
1802
|
+
top: `${y0 * 100}%`,
|
|
1803
|
+
width: `${(x1 - x0) * 100}%`,
|
|
1804
|
+
height: `${(y1 - y0) * 100}%`
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
chunkId
|
|
1808
|
+
)) });
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
// src/connection/viewer/pdf/passageHighlights.ts
|
|
1812
|
+
function passageHighlight(chunkId, { cited, active }) {
|
|
1813
|
+
if (cited.size > 0) {
|
|
1814
|
+
if (!cited.has(chunkId)) return null;
|
|
1815
|
+
return chunkId === active ? "strong" : "light";
|
|
1816
|
+
}
|
|
1817
|
+
return chunkId === active ? "light" : null;
|
|
1818
|
+
}
|
|
1819
|
+
function asBox(bbox) {
|
|
1820
|
+
if (!bbox || bbox.length !== 4 || !bbox.every(Number.isFinite)) return null;
|
|
1821
|
+
const [x0, y0, x1, y1] = bbox;
|
|
1822
|
+
if (x1 <= x0 || y1 <= y0) return null;
|
|
1823
|
+
return [x0, y0, x1, y1];
|
|
1824
|
+
}
|
|
1825
|
+
function isWholePage([x0, y0, x1, y1]) {
|
|
1826
|
+
return x0 <= 0 && y0 <= 0 && x1 >= 1 && y1 >= 1;
|
|
1827
|
+
}
|
|
1828
|
+
function passageBoxesByPage(pages, state) {
|
|
1829
|
+
const byPage = /* @__PURE__ */ new Map();
|
|
1830
|
+
if (state.cited.size === 0 && !state.active) return byPage;
|
|
1831
|
+
for (const page of pages) {
|
|
1832
|
+
if (page.pageNumber === null) continue;
|
|
1833
|
+
for (const chunk of page.chunks) {
|
|
1834
|
+
const chunkId = chunk.chunkExtId;
|
|
1835
|
+
if (!chunkId) continue;
|
|
1836
|
+
const highlight = passageHighlight(chunkId, state);
|
|
1837
|
+
const box = highlight && asBox(chunk.pageBbox);
|
|
1838
|
+
if (!highlight || !box || isWholePage(box)) continue;
|
|
1839
|
+
const boxes = byPage.get(page.pageNumber) ?? [];
|
|
1840
|
+
boxes.push({ chunkId, box, highlight });
|
|
1841
|
+
byPage.set(page.pageNumber, boxes);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
return byPage;
|
|
1845
|
+
}
|
|
1846
|
+
var NONE2 = [];
|
|
1847
|
+
var NO_FOOTNOTES = {};
|
|
1848
|
+
function usePdfPassageHighlights(documentId) {
|
|
1849
|
+
const citedIds = chunk4CIVQWAX_cjs.useViewerPassageCitation()?.highlighted ?? NONE2;
|
|
1850
|
+
const cited = React.useMemo(() => new Set(citedIds), [citedIds]);
|
|
1851
|
+
const active = react.useArbiSessionState((s) => s.viewingDocument?.passageId ?? null);
|
|
1852
|
+
const { data: parsed } = react.useParsedDocument(documentId, "final", {
|
|
1853
|
+
enabled: cited.size > 0 || !!active
|
|
1854
|
+
});
|
|
1855
|
+
const { processedChunks } = viewers.useProcessedChunks(parsed?.chunks, NO_FOOTNOTES);
|
|
1856
|
+
const boxesByPage = React.useMemo(
|
|
1857
|
+
() => passageBoxesByPage(processedChunks, { cited, active }),
|
|
1858
|
+
[processedChunks, cited, active]
|
|
1859
|
+
);
|
|
1860
|
+
const centredFor = React.useRef(null);
|
|
1861
|
+
const activeKey = active ? `${documentId}:${active}` : null;
|
|
1862
|
+
React.useEffect(() => {
|
|
1863
|
+
if (!activeKey) centredFor.current = null;
|
|
1864
|
+
}, [activeKey]);
|
|
1865
|
+
const centre = React.useCallback(
|
|
1866
|
+
(element) => {
|
|
1867
|
+
if (!activeKey || centredFor.current === activeKey) return;
|
|
1868
|
+
centredFor.current = activeKey;
|
|
1869
|
+
element.scrollIntoView?.({ block: "center", behavior: "smooth" });
|
|
1870
|
+
},
|
|
1871
|
+
[activeKey]
|
|
1872
|
+
);
|
|
1873
|
+
return React.useCallback(
|
|
1874
|
+
(pageNumber) => {
|
|
1875
|
+
const boxes = boxesByPage.get(pageNumber);
|
|
1876
|
+
return boxes ? /* @__PURE__ */ jsxRuntime.jsx(PdfPassageHighlights, { boxes, activeId: active, onActiveDrawn: centre }) : null;
|
|
1877
|
+
},
|
|
1878
|
+
[boxesByPage, active, centre]
|
|
1879
|
+
);
|
|
1880
|
+
}
|
|
1781
1881
|
var AnnotatedPdfViewer = React.lazy(
|
|
1782
1882
|
() => import('./document-tools/viewer/index.cjs').then((m) => ({ default: m.AnnotatedPdfViewer }))
|
|
1783
1883
|
);
|
|
@@ -1800,7 +1900,24 @@ function SessionPdfViewer(props) {
|
|
|
1800
1900
|
},
|
|
1801
1901
|
[session, viewingId]
|
|
1802
1902
|
);
|
|
1803
|
-
|
|
1903
|
+
const passageHighlights = usePdfPassageHighlights(viewingId);
|
|
1904
|
+
const { renderPageOverlay: modeOverlay } = props;
|
|
1905
|
+
const renderPageOverlay = React.useCallback(
|
|
1906
|
+
(page) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1907
|
+
passageHighlights(page.pageNumber),
|
|
1908
|
+
modeOverlay?.(page)
|
|
1909
|
+
] }),
|
|
1910
|
+
[passageHighlights, modeOverlay]
|
|
1911
|
+
);
|
|
1912
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1913
|
+
viewers.PdfViewer,
|
|
1914
|
+
{
|
|
1915
|
+
...props,
|
|
1916
|
+
renderPageOverlay,
|
|
1917
|
+
onPageChange,
|
|
1918
|
+
disableFontFace: !!isDetached
|
|
1919
|
+
}
|
|
1920
|
+
);
|
|
1804
1921
|
}
|
|
1805
1922
|
function ViewerPdfPane({
|
|
1806
1923
|
documentId,
|
|
@@ -1825,7 +1942,7 @@ function ViewerPdfPane({
|
|
|
1825
1942
|
const showMarkup = markup.hasMarkup && !markup.showOriginal;
|
|
1826
1943
|
if (isDownloadOnly) {
|
|
1827
1944
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1828
|
-
|
|
1945
|
+
chunkNLSWDP42_cjs.ViewerPreviewUnavailable,
|
|
1829
1946
|
{
|
|
1830
1947
|
extension: fileExtension(documentData?.file_name),
|
|
1831
1948
|
onDownload
|
|
@@ -1835,29 +1952,29 @@ function ViewerPdfPane({
|
|
|
1835
1952
|
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...";
|
|
1836
1953
|
const errorLabel = isVideo ? "Failed to load video" : isAudio ? "Failed to load audio" : isImage ? "Failed to load image" : "Failed to load PDF";
|
|
1837
1954
|
if (isDocx && !pdfSnapshotNumber && documentData && !["completed", "low-content", "failed"].includes(documentData.status || "")) {
|
|
1838
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1955
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
|
|
1839
1956
|
}
|
|
1840
1957
|
if (isDocx && !pdfSnapshotNumber && documentData?.status === "failed") {
|
|
1841
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1958
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "PDF conversion failed. Open the Word editor or download the document." });
|
|
1842
1959
|
}
|
|
1843
|
-
if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1960
|
+
if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: loadingLabel });
|
|
1844
1961
|
if (pdfError) {
|
|
1845
1962
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1846
|
-
|
|
1963
|
+
chunkNLSWDP42_cjs.ViewerLoadError,
|
|
1847
1964
|
{
|
|
1848
1965
|
message: isVideo || isAudio || isImage ? `${errorLabel} \u2014 download it instead.` : "Couldn't display the PDF \u2014 download it instead.",
|
|
1849
1966
|
onDownload
|
|
1850
1967
|
}
|
|
1851
1968
|
);
|
|
1852
1969
|
}
|
|
1853
|
-
if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1970
|
+
if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: loadingLabel });
|
|
1854
1971
|
if (isVideo) return /* @__PURE__ */ jsxRuntime.jsx(viewers.VideoViewer, { blob: pdfBlob, title: documentData?.file_name || "Video" });
|
|
1855
1972
|
if (isAudio) return /* @__PURE__ */ jsxRuntime.jsx(viewers.AudioViewer, { blob: pdfBlob, title: documentData?.file_name || "Audio" });
|
|
1856
1973
|
if (isImage) {
|
|
1857
1974
|
return /* @__PURE__ */ jsxRuntime.jsx(viewers.ImageViewer, { blob: pdfBlob, alt: documentData?.file_name || "Document image" });
|
|
1858
1975
|
}
|
|
1859
1976
|
if (signatureFlow?.kind === "prepare") {
|
|
1860
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1977
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1861
1978
|
SignatureRequestEditor,
|
|
1862
1979
|
{
|
|
1863
1980
|
...viewerProps,
|
|
@@ -1875,7 +1992,7 @@ function ViewerPdfPane({
|
|
|
1875
1992
|
}
|
|
1876
1993
|
if (signatureFlow?.kind === "sign" && currentUserId) {
|
|
1877
1994
|
const { currentPage: _page, scrollTrigger: _trigger, ...guidedProps } = viewerProps;
|
|
1878
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1995
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1879
1996
|
GuidedSigningViewer,
|
|
1880
1997
|
{
|
|
1881
1998
|
...guidedProps,
|
|
@@ -1889,7 +2006,7 @@ function ViewerPdfPane({
|
|
|
1889
2006
|
) });
|
|
1890
2007
|
}
|
|
1891
2008
|
if (placingSignature) {
|
|
1892
|
-
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2009
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1893
2010
|
SignaturePlacementViewer,
|
|
1894
2011
|
{
|
|
1895
2012
|
...viewerProps,
|
|
@@ -1905,7 +2022,7 @@ function ViewerPdfPane({
|
|
|
1905
2022
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1906
2023
|
React.Suspense,
|
|
1907
2024
|
{
|
|
1908
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2025
|
+
fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
|
|
1909
2026
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1910
2027
|
AnnotatedPdfViewer,
|
|
1911
2028
|
{
|
|
@@ -1931,12 +2048,12 @@ function ViewerPdfPane({
|
|
|
1931
2048
|
return /* @__PURE__ */ jsxRuntime.jsx(SessionPdfViewer, { ...viewerProps, file: pdfBlob });
|
|
1932
2049
|
}
|
|
1933
2050
|
var StreamedWordArtifact = React.lazy(
|
|
1934
|
-
() => import('./ConnectedStreamedWordArtifact-
|
|
2051
|
+
() => import('./ConnectedStreamedWordArtifact-6MCLJRIT.cjs').then((m) => ({
|
|
1935
2052
|
default: m.ConnectedStreamedWordArtifact
|
|
1936
2053
|
}))
|
|
1937
2054
|
);
|
|
1938
2055
|
var NativeDocxComparison = React.lazy(
|
|
1939
|
-
() => import('./ConnectedNativeDocxComparison-
|
|
2056
|
+
() => import('./ConnectedNativeDocxComparison-SGE4R3M4.cjs').then((m) => ({
|
|
1940
2057
|
default: m.ConnectedNativeDocxComparison
|
|
1941
2058
|
}))
|
|
1942
2059
|
);
|
|
@@ -2157,15 +2274,15 @@ function DocumentViewerContent({
|
|
|
2157
2274
|
};
|
|
2158
2275
|
const documentTitle = streamingDoc?.title || draftDoc?.title || documentData?.doc_metadata?.title || documentData?.file_name || "Document";
|
|
2159
2276
|
const pageNav = totalPages > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2160
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2277
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
|
|
2161
2278
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2162
|
-
|
|
2279
|
+
chunkNLSWDP42_cjs.PdfPageNav,
|
|
2163
2280
|
{
|
|
2164
2281
|
canPrev: (viewingDocumentPage || 1) > 1,
|
|
2165
2282
|
canNext: (viewingDocumentPage || 1) < totalPages,
|
|
2166
2283
|
onPrev: () => stepPage(-1),
|
|
2167
2284
|
onNext: () => stepPage(1),
|
|
2168
|
-
counter: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
|
+
counter: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
|
|
2169
2286
|
}
|
|
2170
2287
|
)
|
|
2171
2288
|
] });
|
|
@@ -2189,14 +2306,14 @@ function DocumentViewerContent({
|
|
|
2189
2306
|
);
|
|
2190
2307
|
const titleBlock = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2191
2308
|
isDraft ? /* @__PURE__ */ jsxRuntime.jsx(ViewerDraftTitle, { documentId }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2192
|
-
|
|
2309
|
+
chunkNLSWDP42_cjs.ViewerTitle,
|
|
2193
2310
|
{
|
|
2194
2311
|
title: documentTitle,
|
|
2195
2312
|
versionLabel: currentVersionLabel,
|
|
2196
2313
|
shrink: !!liveKind || isCompact
|
|
2197
2314
|
}
|
|
2198
2315
|
),
|
|
2199
|
-
isCompact && !isDraft && documentData?.shared && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2316
|
+
isCompact && !isDraft && documentData?.shared && /* @__PURE__ */ jsxRuntime.jsx(ui.SharingEntity, { shared: true, variant: "icon", "data-testid": "document-shared-status" }),
|
|
2200
2317
|
isCompact && activeTab === "pdf" && pdfBlob && markup.hasMarkup && !annotating && !placingSignature && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2201
2318
|
chunkYYPZOEED_cjs.MarkupViewNote,
|
|
2202
2319
|
{
|
|
@@ -2216,7 +2333,7 @@ function DocumentViewerContent({
|
|
|
2216
2333
|
/* @__PURE__ */ jsxRuntime.jsx(ViewerDraftKind, { documentId })
|
|
2217
2334
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2218
2335
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2219
|
-
|
|
2336
|
+
chunkNLSWDP42_cjs.ViewerTabBar,
|
|
2220
2337
|
{
|
|
2221
2338
|
tabs: viewerTabs.filter((tab) => tab.id !== "versions"),
|
|
2222
2339
|
activeId: activeTab,
|
|
@@ -2316,7 +2433,7 @@ function DocumentViewerContent({
|
|
|
2316
2433
|
}
|
|
2317
2434
|
),
|
|
2318
2435
|
activeTab === "pdf" && isImage && pdfBlob && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2319
|
-
|
|
2436
|
+
chunkNLSWDP42_cjs.ViewerImageActions,
|
|
2320
2437
|
{
|
|
2321
2438
|
compact: isCompact,
|
|
2322
2439
|
onUseAsReference: support.useImageAsReference ? () => support.useImageAsReference(documentId) : void 0,
|
|
@@ -2381,11 +2498,11 @@ function DocumentViewerContent({
|
|
|
2381
2498
|
}
|
|
2382
2499
|
),
|
|
2383
2500
|
documentId && doc.workspaceId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2384
|
-
|
|
2501
|
+
chunkTG2GM7WJ_cjs.ShareControl,
|
|
2385
2502
|
{
|
|
2386
2503
|
state: documentData?.shared ? "shared" : "private",
|
|
2387
2504
|
onToggle: share,
|
|
2388
|
-
disabled: !
|
|
2505
|
+
disabled: !chunkNLSWDP42_cjs.canChangeVisibility(documentData, currentUserId),
|
|
2389
2506
|
disabledTooltip: "Only the owner can change visibility",
|
|
2390
2507
|
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",
|
|
2391
2508
|
variant: "outline",
|
|
@@ -2529,7 +2646,7 @@ function DocumentViewerContent({
|
|
|
2529
2646
|
onZoomChange: setZoom
|
|
2530
2647
|
};
|
|
2531
2648
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2532
|
-
|
|
2649
|
+
chunkNLSWDP42_cjs.ViewerFrame,
|
|
2533
2650
|
{
|
|
2534
2651
|
frameRef: containerRef,
|
|
2535
2652
|
contentId: documentId,
|
|
@@ -2574,7 +2691,7 @@ function DocumentViewerContent({
|
|
|
2574
2691
|
)
|
|
2575
2692
|
),
|
|
2576
2693
|
children: [
|
|
2577
|
-
isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2694
|
+
isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2578
2695
|
NativeDocxComparison,
|
|
2579
2696
|
{
|
|
2580
2697
|
baseId: compareDocumentId,
|
|
@@ -2584,9 +2701,9 @@ function DocumentViewerContent({
|
|
|
2584
2701
|
) }),
|
|
2585
2702
|
isCaptureDraft && /* @__PURE__ */ jsxRuntime.jsx(ViewerCaptureDraft, { documentId }),
|
|
2586
2703
|
!isCaptureDraft && (activeTab === "pdf" || isMedia && activeTab === "html") && (!isArtifact || isDocx && !isDraft && !isStreaming && !liveKind) && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(chunkDTMBAFIL_cjs.ViewerPane, { hidden: activeTab !== "pdf", children: [
|
|
2587
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2704
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.DocumentLabelBar, { summaries: labelSummaries }),
|
|
2588
2705
|
!isMedia && !isImage && signatureBanner,
|
|
2589
|
-
activeTab === "pdf" && pdfBlob && !pdfVerified && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2706
|
+
activeTab === "pdf" && pdfBlob && !pdfVerified && /* @__PURE__ */ jsxRuntime.jsxs(chunkNLSWDP42_cjs.ViewerMessage, { children: [
|
|
2590
2707
|
"Offline copy: its version cannot be verified. Reconnect before signing.",
|
|
2591
2708
|
" ",
|
|
2592
2709
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void blobs.retryPdf(), className: "underline", children: "Retry loading the current PDF" })
|
|
@@ -2599,7 +2716,7 @@ function DocumentViewerContent({
|
|
|
2599
2716
|
onOpenVersion: (n) => setSnapshotDocumentId(`${documentId}@v${n}`)
|
|
2600
2717
|
}
|
|
2601
2718
|
),
|
|
2602
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2719
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2603
2720
|
ViewerPdfPane,
|
|
2604
2721
|
{
|
|
2605
2722
|
documentId,
|
|
@@ -2638,10 +2755,10 @@ function DocumentViewerContent({
|
|
|
2638
2755
|
}
|
|
2639
2756
|
),
|
|
2640
2757
|
activeTab === "edit" && isArtifact && liveKind && /* @__PURE__ */ jsxRuntime.jsx(chunkEG7EJFUE_cjs.ArtifactCodeView, { source: liveSource, fileName: documentData?.file_name ?? void 0 }),
|
|
2641
|
-
activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2758
|
+
activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
|
|
2642
2759
|
isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkYYPZOEED_cjs.SignedEditNote, {}),
|
|
2643
2760
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2644
|
-
|
|
2761
|
+
chunkECLUFKYR_cjs.ConnectedNativeDocxEditor,
|
|
2645
2762
|
{
|
|
2646
2763
|
documentId: snapshotDocumentId || documentId,
|
|
2647
2764
|
title: documentTitle,
|
|
@@ -2682,12 +2799,12 @@ function DocumentViewerContent({
|
|
|
2682
2799
|
onOpenTranslation: (id) => setViewingDocumentId(id)
|
|
2683
2800
|
}
|
|
2684
2801
|
),
|
|
2685
|
-
activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2686
|
-
activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2802
|
+
activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
|
|
2803
|
+
activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
|
|
2687
2804
|
signatureBanner,
|
|
2688
2805
|
isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkYYPZOEED_cjs.SignedEditNote, {}),
|
|
2689
2806
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2690
|
-
|
|
2807
|
+
chunkECLUFKYR_cjs.ConnectedNativeDocxEditor,
|
|
2691
2808
|
{
|
|
2692
2809
|
documentId: snapshotDocumentId || documentId,
|
|
2693
2810
|
title: documentTitle,
|
|
@@ -2697,7 +2814,7 @@ function DocumentViewerContent({
|
|
|
2697
2814
|
`${snapshotDocumentId || documentId}-${snapshotDocumentId ? "snapshot" : "live"}`
|
|
2698
2815
|
)
|
|
2699
2816
|
] }),
|
|
2700
|
-
streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2817
|
+
streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2701
2818
|
StreamedWordArtifact,
|
|
2702
2819
|
{
|
|
2703
2820
|
documentId: documentId.startsWith("doc-") ? documentId : void 0,
|
|
@@ -2707,7 +2824,7 @@ function DocumentViewerContent({
|
|
|
2707
2824
|
},
|
|
2708
2825
|
documentId
|
|
2709
2826
|
) }),
|
|
2710
|
-
!isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkDTMBAFIL_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2827
|
+
!isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkDTMBAFIL_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkNLSWDP42_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2711
2828
|
ParsedTextView,
|
|
2712
2829
|
{
|
|
2713
2830
|
documentId: pdfSnapshotId || documentId,
|
|
@@ -2723,5 +2840,5 @@ function DocumentViewerContent({
|
|
|
2723
2840
|
}
|
|
2724
2841
|
|
|
2725
2842
|
exports.ConnectedDocumentViewer = ConnectedDocumentViewer;
|
|
2726
|
-
//# sourceMappingURL=chunk-
|
|
2727
|
-
//# sourceMappingURL=chunk-
|
|
2843
|
+
//# sourceMappingURL=chunk-X36UR4A7.cjs.map
|
|
2844
|
+
//# sourceMappingURL=chunk-X36UR4A7.cjs.map
|