@cannyminds/dms-file-viewers 0.20.0 → 0.22.0

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.
Files changed (31) hide show
  1. package/dist/{chunk-26SS5FLZ.js → chunk-BYCREULH.js} +381 -359
  2. package/dist/chunk-BYCREULH.js.map +1 -0
  3. package/dist/{chunk-IY5EEUCU.mjs → chunk-UFPC67AQ.mjs} +298 -276
  4. package/dist/chunk-UFPC67AQ.mjs.map +1 -0
  5. package/dist/components/viewers/AudioViewer.d.mts +1 -1
  6. package/dist/components/viewers/AudioViewer.d.ts +1 -1
  7. package/dist/components/viewers/DefaultViewer.d.mts +1 -1
  8. package/dist/components/viewers/DefaultViewer.d.ts +1 -1
  9. package/dist/components/viewers/ImageViewer.d.mts +1 -1
  10. package/dist/components/viewers/ImageViewer.d.ts +1 -1
  11. package/dist/components/viewers/PDFViewer.d.mts +5 -2
  12. package/dist/components/viewers/PDFViewer.d.ts +5 -2
  13. package/dist/components/viewers/PDFViewer.js +2 -2
  14. package/dist/components/viewers/PDFViewer.mjs +1 -1
  15. package/dist/components/viewers/TIFFViewer.d.mts +1 -1
  16. package/dist/components/viewers/TIFFViewer.d.ts +1 -1
  17. package/dist/components/viewers/TextViewer.d.mts +1 -1
  18. package/dist/components/viewers/TextViewer.d.ts +1 -1
  19. package/dist/components/viewers/VideoViewer.d.mts +1 -1
  20. package/dist/components/viewers/VideoViewer.d.ts +1 -1
  21. package/dist/index.d.mts +2 -2
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +19 -24
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +18 -23
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/{types-DFkMK86Q.d.mts → types-BnnKCdrQ.d.mts} +2 -0
  28. package/dist/{types-DFkMK86Q.d.ts → types-BnnKCdrQ.d.ts} +2 -0
  29. package/package.json +45 -45
  30. package/dist/chunk-26SS5FLZ.js.map +0 -1
  31. package/dist/chunk-IY5EEUCU.mjs.map +0 -1
@@ -38,7 +38,8 @@ var StablePDFViewer = React.memo(({
38
38
  onHighlighterClick,
39
39
  onStampClick,
40
40
  onSignatureClick,
41
- permissions
41
+ permissions,
42
+ hideInternalLoading
42
43
  }) => {
43
44
  return /* @__PURE__ */ jsx(
44
45
  HeadlessPDFViewer,
@@ -54,7 +55,8 @@ var StablePDFViewer = React.memo(({
54
55
  onHighlighterClick,
55
56
  onStampClick,
56
57
  onSignatureClick,
57
- permissions
58
+ permissions,
59
+ hideInternalLoading
58
60
  }
59
61
  );
60
62
  });
@@ -118,6 +120,7 @@ var PDFToolbar = React2.memo(
118
120
  disabledHistory,
119
121
  disabledDownload,
120
122
  disabledPrint,
123
+ disabledCopy,
121
124
  disabledHighlighter,
122
125
  disabledStamp,
123
126
  disabledSignature,
@@ -136,9 +139,12 @@ var PDFToolbar = React2.memo(
136
139
  onRotateLeft,
137
140
  onRotateRight,
138
141
  onDownloadClick,
142
+ onDownloadWithAnnotations,
143
+ onDownloadWithoutAnnotations,
139
144
  onPrintClick,
140
145
  onPrintWithAnnotations,
141
146
  onPrintWithoutAnnotations,
147
+ onCopyClick,
142
148
  onMetadataClick,
143
149
  onPropertiesClick,
144
150
  onTagsClick,
@@ -153,9 +159,11 @@ var PDFToolbar = React2.memo(
153
159
  onSaveAnnotations
154
160
  }) => {
155
161
  const [isPrintMenuOpen, setIsPrintMenuOpen] = useState(false);
162
+ const [isDownloadMenuOpen, setIsDownloadMenuOpen] = useState(false);
156
163
  const [isAnnotationMenuOpen, setIsAnnotationMenuOpen] = useState(false);
157
164
  const [isViewMenuOpen, setIsViewMenuOpen] = useState(false);
158
165
  const printMenuRef = useRef(null);
166
+ const downloadMenuRef = useRef(null);
159
167
  const annotationMenuRef = useRef(null);
160
168
  const viewMenuRef = useRef(null);
161
169
  useEffect(() => {
@@ -163,6 +171,9 @@ var PDFToolbar = React2.memo(
163
171
  if (printMenuRef.current && !printMenuRef.current.contains(event.target)) {
164
172
  setIsPrintMenuOpen(false);
165
173
  }
174
+ if (downloadMenuRef.current && !downloadMenuRef.current.contains(event.target)) {
175
+ setIsDownloadMenuOpen(false);
176
+ }
166
177
  if (annotationMenuRef.current && !annotationMenuRef.current.contains(event.target)) {
167
178
  setIsAnnotationMenuOpen(false);
168
179
  }
@@ -181,12 +192,20 @@ var PDFToolbar = React2.memo(
181
192
  setIsPrintMenuOpen(false);
182
193
  onPrintWithoutAnnotations?.();
183
194
  };
195
+ const handleDownloadWithAnnotations = () => {
196
+ setIsDownloadMenuOpen(false);
197
+ onDownloadWithAnnotations?.();
198
+ };
199
+ const handleDownloadWithoutAnnotations = () => {
200
+ setIsDownloadMenuOpen(false);
201
+ onDownloadWithoutAnnotations?.();
202
+ };
184
203
  const [activeMode, setActiveMode] = useState("view");
185
204
  return /* @__PURE__ */ jsxs("div", { className: "pdf-viewer-toolbar-container", children: [
186
205
  /* @__PURE__ */ jsxs("div", { className: "pdf-viewer-toolbar", children: [
187
206
  /* @__PURE__ */ jsxs("div", { className: "toolbar-left", children: [
188
207
  showPageNavigation && /* @__PURE__ */ jsxs("div", { className: "toolbar-section", children: [
189
- /* @__PURE__ */ jsx2(Tooltip, { title: "First Page", children: /* @__PURE__ */ jsx2(
208
+ /* @__PURE__ */ jsx2(Tooltip, { title: "First Page", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
190
209
  "button",
191
210
  {
192
211
  className: "toolbar-button",
@@ -194,8 +213,8 @@ var PDFToolbar = React2.memo(
194
213
  disabled: currentPage <= 1,
195
214
  children: /* @__PURE__ */ jsx2(FirstPageIcon, { fontSize: "small" })
196
215
  }
197
- ) }),
198
- /* @__PURE__ */ jsx2(Tooltip, { title: "Previous Page", children: /* @__PURE__ */ jsx2(
216
+ ) }) }),
217
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Previous Page", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
199
218
  "button",
200
219
  {
201
220
  className: "toolbar-button",
@@ -203,24 +222,16 @@ var PDFToolbar = React2.memo(
203
222
  disabled: currentPage <= 1,
204
223
  children: /* @__PURE__ */ jsx2(ChevronLeftIcon, { fontSize: "small" })
205
224
  }
206
- ) }),
207
- /* @__PURE__ */ jsx2(
208
- "input",
209
- {
210
- type: "number",
211
- className: "page-input",
212
- value: currentPage,
213
- onChange: onPageInput,
214
- onKeyPress: onPageInputKeyPress,
215
- min: 1,
216
- max: totalPages || void 0
217
- }
218
- ),
219
- showPageCount && /* @__PURE__ */ jsxs("span", { className: "page-info", children: [
220
- "/ ",
221
- totalPages || "..."
225
+ ) }) }),
226
+ /* @__PURE__ */ jsxs("span", { className: "page-info", style: { display: "flex", alignItems: "center", margin: "0 8px", fontSize: "14px", fontWeight: 500 }, children: [
227
+ currentPage,
228
+ " ",
229
+ showPageCount && /* @__PURE__ */ jsxs("span", { style: { color: "#6b7280", marginLeft: "4px" }, children: [
230
+ "/ ",
231
+ totalPages || "..."
232
+ ] })
222
233
  ] }),
223
- /* @__PURE__ */ jsx2(Tooltip, { title: "Next Page", children: /* @__PURE__ */ jsx2(
234
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Next Page", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
224
235
  "button",
225
236
  {
226
237
  className: "toolbar-button",
@@ -228,8 +239,8 @@ var PDFToolbar = React2.memo(
228
239
  disabled: currentPage >= totalPages,
229
240
  children: /* @__PURE__ */ jsx2(ChevronRightIcon, { fontSize: "small" })
230
241
  }
231
- ) }),
232
- /* @__PURE__ */ jsx2(Tooltip, { title: "Last Page", children: /* @__PURE__ */ jsx2(
242
+ ) }) }),
243
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Last Page", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
233
244
  "button",
234
245
  {
235
246
  className: "toolbar-button",
@@ -237,7 +248,7 @@ var PDFToolbar = React2.memo(
237
248
  disabled: currentPage >= totalPages,
238
249
  children: /* @__PURE__ */ jsx2(LastPageIcon, { fontSize: "small" })
239
250
  }
240
- ) })
251
+ ) }) })
241
252
  ] }),
242
253
  showZoomControls && /* @__PURE__ */ jsxs(Fragment, { children: [
243
254
  /* @__PURE__ */ jsx2("div", { className: "toolbar-separator" }),
@@ -402,27 +413,51 @@ var PDFToolbar = React2.memo(
402
413
  /* @__PURE__ */ jsx2("div", { className: "toolbar-right", children: (hasUnsavedAnnotations || showDownload || showPrint || showMetadata || showProperties || showTags || showHistory) && /* @__PURE__ */ jsxs(Fragment, { children: [
403
414
  /* @__PURE__ */ jsx2("div", { className: "toolbar-separator" }),
404
415
  /* @__PURE__ */ jsxs("div", { className: "toolbar-section", children: [
405
- showDownload && /* @__PURE__ */ jsx2(Tooltip, { title: "Download", children: /* @__PURE__ */ jsx2(
406
- "button",
407
- {
408
- className: "toolbar-button",
409
- onClick: onDownloadClick,
410
- disabled: disabledDownload,
411
- children: /* @__PURE__ */ jsx2(DownloadIcon, { fontSize: "small" })
412
- }
413
- ) }),
416
+ showDownload && /* @__PURE__ */ jsxs("div", { className: "toolbar-dropdown-container", ref: downloadMenuRef, children: [
417
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Download", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsxs(
418
+ "button",
419
+ {
420
+ className: `toolbar-button toolbar-dropdown-button ${isDownloadMenuOpen ? "toolbar-button-active" : ""}`,
421
+ onClick: () => setIsDownloadMenuOpen(!isDownloadMenuOpen),
422
+ disabled: disabledDownload,
423
+ children: [
424
+ /* @__PURE__ */ jsx2(DownloadIcon, { fontSize: "small" }),
425
+ /* @__PURE__ */ jsx2(KeyboardArrowDownIcon, { fontSize: "small", style: { marginLeft: -4 } })
426
+ ]
427
+ }
428
+ ) }) }),
429
+ isDownloadMenuOpen && /* @__PURE__ */ jsxs("div", { className: "toolbar-dropdown-menu", children: [
430
+ /* @__PURE__ */ jsx2(
431
+ "button",
432
+ {
433
+ className: "toolbar-dropdown-item",
434
+ onClick: handleDownloadWithoutAnnotations,
435
+ children: /* @__PURE__ */ jsx2("span", { children: "Download Document Only" })
436
+ }
437
+ ),
438
+ /* @__PURE__ */ jsx2(
439
+ "button",
440
+ {
441
+ className: "toolbar-dropdown-item",
442
+ onClick: handleDownloadWithAnnotations,
443
+ children: /* @__PURE__ */ jsx2("span", { children: "Download with Annotations" })
444
+ }
445
+ )
446
+ ] })
447
+ ] }),
414
448
  showPrint && /* @__PURE__ */ jsxs("div", { className: "toolbar-dropdown-container", ref: printMenuRef, children: [
415
- /* @__PURE__ */ jsx2(Tooltip, { title: "Print", children: /* @__PURE__ */ jsxs(
449
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Print", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsxs(
416
450
  "button",
417
451
  {
418
452
  className: `toolbar-button toolbar-dropdown-button ${isPrintMenuOpen ? "toolbar-button-active" : ""}`,
419
453
  onClick: () => setIsPrintMenuOpen(!isPrintMenuOpen),
454
+ disabled: disabledPrint,
420
455
  children: [
421
456
  /* @__PURE__ */ jsx2(PrintIcon, { fontSize: "small" }),
422
457
  /* @__PURE__ */ jsx2(KeyboardArrowDownIcon, { fontSize: "small", style: { marginLeft: -4 } })
423
458
  ]
424
459
  }
425
- ) }),
460
+ ) }) }),
426
461
  isPrintMenuOpen && /* @__PURE__ */ jsxs("div", { className: "toolbar-dropdown-menu", children: [
427
462
  /* @__PURE__ */ jsx2(
428
463
  "button",
@@ -442,7 +477,7 @@ var PDFToolbar = React2.memo(
442
477
  )
443
478
  ] })
444
479
  ] }),
445
- showMetadata && /* @__PURE__ */ jsx2(Tooltip, { title: "Metadata", children: /* @__PURE__ */ jsx2(
480
+ showMetadata && /* @__PURE__ */ jsx2(Tooltip, { title: "Metadata", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
446
481
  "button",
447
482
  {
448
483
  className: "toolbar-button",
@@ -450,8 +485,8 @@ var PDFToolbar = React2.memo(
450
485
  disabled: disabledMetadata,
451
486
  children: /* @__PURE__ */ jsx2(DescriptionIcon, { fontSize: "small" })
452
487
  }
453
- ) }),
454
- showProperties && /* @__PURE__ */ jsx2(Tooltip, { title: "Properties", children: /* @__PURE__ */ jsx2(
488
+ ) }) }),
489
+ showProperties && /* @__PURE__ */ jsx2(Tooltip, { title: "Properties", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
455
490
  "button",
456
491
  {
457
492
  className: "toolbar-button",
@@ -459,8 +494,8 @@ var PDFToolbar = React2.memo(
459
494
  disabled: disabledProperties,
460
495
  children: /* @__PURE__ */ jsx2(InfoIcon, { fontSize: "small" })
461
496
  }
462
- ) }),
463
- showTags && /* @__PURE__ */ jsx2(Tooltip, { title: "Tags", children: /* @__PURE__ */ jsx2(
497
+ ) }) }),
498
+ showTags && /* @__PURE__ */ jsx2(Tooltip, { title: "Tags", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
464
499
  "button",
465
500
  {
466
501
  className: "toolbar-button",
@@ -468,8 +503,8 @@ var PDFToolbar = React2.memo(
468
503
  disabled: disabledTags,
469
504
  children: /* @__PURE__ */ jsx2(LocalOffer, { fontSize: "small" })
470
505
  }
471
- ) }),
472
- showHistory && /* @__PURE__ */ jsx2(Tooltip, { title: "Version History", children: /* @__PURE__ */ jsx2(
506
+ ) }) }),
507
+ showHistory && /* @__PURE__ */ jsx2(Tooltip, { title: "Version History", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
473
508
  "button",
474
509
  {
475
510
  className: "toolbar-button",
@@ -477,12 +512,12 @@ var PDFToolbar = React2.memo(
477
512
  disabled: disabledHistory,
478
513
  children: /* @__PURE__ */ jsx2(HistoryIcon, { fontSize: "small" })
479
514
  }
480
- ) })
515
+ ) }) })
481
516
  ] })
482
517
  ] }) })
483
518
  ] }),
484
519
  activeMode === "annotate" && showAnnotations && /* @__PURE__ */ jsxs("div", { className: "pdf-viewer-secondary-toolbar", children: [
485
- /* @__PURE__ */ jsx2(Tooltip, { title: "Highlight", children: /* @__PURE__ */ jsx2(
520
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Highlight", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
486
521
  "button",
487
522
  {
488
523
  className: `toolbar-button ${isHighlighterActive ? "toolbar-button-active" : ""}`,
@@ -490,8 +525,8 @@ var PDFToolbar = React2.memo(
490
525
  disabled: disabledHighlighter,
491
526
  children: /* @__PURE__ */ jsx2(HighlightIcon, { fontSize: "small" })
492
527
  }
493
- ) }),
494
- /* @__PURE__ */ jsx2(Tooltip, { title: "Stamp", children: /* @__PURE__ */ jsx2(
528
+ ) }) }),
529
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Stamp", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
495
530
  "button",
496
531
  {
497
532
  className: `toolbar-button ${isStampActive ? "toolbar-button-active" : ""}`,
@@ -499,8 +534,8 @@ var PDFToolbar = React2.memo(
499
534
  disabled: disabledStamp,
500
535
  children: /* @__PURE__ */ jsx2(ApprovalIcon, { fontSize: "small" })
501
536
  }
502
- ) }),
503
- /* @__PURE__ */ jsx2(Tooltip, { title: "Signature", children: /* @__PURE__ */ jsx2(
537
+ ) }) }),
538
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Signature", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
504
539
  "button",
505
540
  {
506
541
  className: "toolbar-button",
@@ -508,10 +543,10 @@ var PDFToolbar = React2.memo(
508
543
  disabled: disabledSignature,
509
544
  children: /* @__PURE__ */ jsx2(DrawIcon, { fontSize: "small" })
510
545
  }
511
- ) }),
546
+ ) }) }),
512
547
  hasUnsavedAnnotations && canSaveAnnotations !== false && onSaveAnnotations && /* @__PURE__ */ jsxs(Fragment, { children: [
513
548
  /* @__PURE__ */ jsx2("div", { style: { width: 1, height: 24, backgroundColor: "#e5e7eb", margin: "0 8px" } }),
514
- /* @__PURE__ */ jsx2(Tooltip, { title: "Save Annotations", children: /* @__PURE__ */ jsxs(
549
+ /* @__PURE__ */ jsx2(Tooltip, { title: "Save Annotations", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsxs(
515
550
  "button",
516
551
  {
517
552
  className: "toolbar-button",
@@ -528,7 +563,8 @@ var PDFToolbar = React2.memo(
528
563
  backgroundColor: hasUnsavedAnnotations ? "#eff6ff" : "transparent",
529
564
  fontSize: "14px",
530
565
  fontWeight: 500,
531
- width: "auto"
566
+ width: "auto",
567
+ cursor: isSavingAnnotations ? "not-allowed" : "pointer"
532
568
  },
533
569
  children: [
534
570
  isSavingAnnotations ? /* @__PURE__ */ jsx2("svg", { width: "16", height: "16", viewBox: "0 0 24 24", style: { animation: "spin 1s linear infinite" }, children: /* @__PURE__ */ jsx2("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", fill: "none", strokeDasharray: "31.4", strokeDashoffset: "10" }) }) : /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
@@ -539,7 +575,7 @@ var PDFToolbar = React2.memo(
539
575
  /* @__PURE__ */ jsx2("span", { children: isSavingAnnotations ? "Saving..." : "Save" })
540
576
  ]
541
577
  }
542
- ) })
578
+ ) }) })
543
579
  ] })
544
580
  ] }),
545
581
  activeMode === "redact" && showAnnotations && /* @__PURE__ */ jsx2("div", { className: "pdf-viewer-secondary-toolbar", children: /* @__PURE__ */ jsx2(Tooltip, { title: "Redact Text", children: /* @__PURE__ */ jsx2("button", { className: "toolbar-button", children: /* @__PURE__ */ jsx2(AutoFixHighIcon, { fontSize: "small" }) }) }) })
@@ -1246,6 +1282,8 @@ var PDFViewerContent = forwardRef(
1246
1282
  onTagsClick,
1247
1283
  onHistoryClick,
1248
1284
  onDownloadClick,
1285
+ onDownloadWithAnnotations,
1286
+ onDownloadWithoutAnnotations,
1249
1287
  onPrintClick,
1250
1288
  initialSearchText,
1251
1289
  initialSearchPages,
@@ -1261,12 +1299,14 @@ var PDFViewerContent = forwardRef(
1261
1299
  hasUnsavedAnnotations,
1262
1300
  isSavingAnnotations,
1263
1301
  canSaveAnnotations,
1264
- onSaveAnnotations
1302
+ onSaveAnnotations,
1303
+ loading
1265
1304
  } = props;
1266
1305
  const [pdfBuffer, setPdfBuffer] = useState4(null);
1267
1306
  const [state, setState] = useState4("idle");
1268
1307
  const [error, setError] = useState4(null);
1269
1308
  const pdfViewerRef = useRef3(null);
1309
+ const [isInternalReady, setIsInternalReady] = useState4(false);
1270
1310
  const [internalHighlighterActive, setInternalHighlighterActive] = useState4(false);
1271
1311
  const [internalStampActive, setInternalStampActive] = useState4(false);
1272
1312
  const highlighterActive = isHighlighterActive !== void 0 ? isHighlighterActive : internalHighlighterActive;
@@ -1452,17 +1492,25 @@ var PDFViewerContent = forwardRef(
1452
1492
  pdfViewerRef.current?.print?.print();
1453
1493
  },
1454
1494
  handlePrintWithAnnotations: async () => {
1455
- console.log("\u{1F5A8}\uFE0F Print with Annotations clicked");
1456
- console.log("pdfViewerRef.current:", pdfViewerRef.current);
1457
- console.log("pdfViewerRef.current?.print:", pdfViewerRef.current?.print);
1458
1495
  await pdfViewerRef.current?.print?.printWithAnnotations?.();
1459
1496
  },
1460
1497
  handlePrintWithoutAnnotations: async () => {
1461
- console.log("\u{1F5A8}\uFE0F Print without Annotations clicked");
1462
- console.log("pdfViewerRef.current:", pdfViewerRef.current);
1463
- console.log("pdfViewerRef.current?.print:", pdfViewerRef.current?.print);
1464
1498
  await pdfViewerRef.current?.print?.printWithoutAnnotations?.();
1465
1499
  },
1500
+ handleDownloadWithAnnotations: async () => {
1501
+ if (onDownloadWithAnnotations) {
1502
+ onDownloadWithAnnotations();
1503
+ } else {
1504
+ await pdfViewerRef.current?.download?.downloadWithAnnotations?.(resolvedFileName);
1505
+ }
1506
+ },
1507
+ handleDownloadWithoutAnnotations: async () => {
1508
+ if (onDownloadWithoutAnnotations) {
1509
+ onDownloadWithoutAnnotations();
1510
+ } else {
1511
+ await pdfViewerRef.current?.download?.downloadWithoutAnnotations?.(resolvedFileName);
1512
+ }
1513
+ },
1466
1514
  handleHighlighterClick: () => {
1467
1515
  if (highlighterActive) {
1468
1516
  pdfViewerRef.current?.annotation?.deactivateHighlighter();
@@ -1491,21 +1539,14 @@ var PDFViewerContent = forwardRef(
1491
1539
  },
1492
1540
  handleSignatureClick: () => {
1493
1541
  },
1542
+ handleCopy: () => {
1543
+ pdfViewerRef.current?.selection.copy();
1544
+ },
1494
1545
  handleToggleFullScreen
1495
1546
  }),
1496
- [isSidebarOpen, totalPages, handleToggleFullScreen, highlighterActive, stampActive]
1547
+ [isSidebarOpen, totalPages, handleToggleFullScreen, highlighterActive, stampActive, onDownloadWithAnnotations, onDownloadWithoutAnnotations]
1497
1548
  );
1498
1549
  useEffect4(() => {
1499
- console.log(
1500
- "came",
1501
- initialSearchText,
1502
- pdfViewerRef.current,
1503
- hasExecutedInitialSearch.current,
1504
- "state:",
1505
- state,
1506
- "totalPages:",
1507
- totalPages
1508
- );
1509
1550
  if (!initialSearchText || hasExecutedInitialSearch.current) return;
1510
1551
  const isPDFReady = state === "ready";
1511
1552
  const isPagesInitialized = totalPages > 0;
@@ -1574,6 +1615,29 @@ var PDFViewerContent = forwardRef(
1574
1615
  observer.observe(document.body, { childList: true, subtree: true });
1575
1616
  return () => observer.disconnect();
1576
1617
  }, [state]);
1618
+ useEffect4(() => {
1619
+ if (state !== "ready") return;
1620
+ const checkInternalReadiness = async () => {
1621
+ if (!pdfViewerRef.current) return;
1622
+ try {
1623
+ const count = pdfViewerRef.current.navigation?.getTotalPages?.();
1624
+ if (count && count > 0) {
1625
+ setTotalPages(count);
1626
+ setIsInternalReady(true);
1627
+ return;
1628
+ }
1629
+ const docInfo = pdfViewerRef.current?.document?.getDocumentInfo?.();
1630
+ if (docInfo && docInfo.totalPages > 0) {
1631
+ setTotalPages(docInfo.totalPages);
1632
+ setIsInternalReady(true);
1633
+ return;
1634
+ }
1635
+ } catch (e) {
1636
+ }
1637
+ };
1638
+ const pollInterval = setInterval(checkInternalReadiness, 100);
1639
+ return () => clearInterval(pollInterval);
1640
+ }, [state]);
1577
1641
  useEffect4(() => {
1578
1642
  if (state !== "ready" || totalPages > 0) return;
1579
1643
  const initializePageCount = async () => {
@@ -1591,64 +1655,31 @@ var PDFViewerContent = forwardRef(
1591
1655
  const viewer = await waitForViewer();
1592
1656
  if (!viewer) return;
1593
1657
  await new Promise((resolve) => requestAnimationFrame(resolve));
1594
- try {
1595
- const count = viewer.navigation?.getTotalPages?.();
1596
- if (count && count > 1) {
1597
- setTotalPages(count);
1598
- return;
1599
- }
1600
- } catch (e) {
1601
- }
1602
- try {
1603
- const results = await viewer.search?.searchText?.("e");
1604
- if (results?.results && results.results.length > 0) {
1605
- const pageIndices = results.results.map((m) => m.pageIndex).filter((idx) => typeof idx === "number");
1606
- const count = Math.max(...pageIndices) + 1;
1607
- viewer.search?.stopSearch?.();
1608
- setTotalPages(count);
1609
- return;
1610
- }
1611
- } catch (error2) {
1612
- }
1613
- await new Promise((resolve) => setTimeout(resolve, 200));
1614
- try {
1615
- const selectors = [
1616
- "[data-page-index]",
1617
- "[data-page-number]",
1618
- ".embedpdf-page",
1619
- '[role="article"]',
1620
- "canvas[data-page]",
1621
- ".react-pdf__Page"
1622
- ];
1623
- for (const selector of selectors) {
1624
- const pages = document.querySelectorAll(selector);
1625
- if (pages.length > 0) {
1626
- setTotalPages(pages.length);
1627
- return;
1628
- }
1629
- }
1630
- } catch (error2) {
1631
- }
1632
1658
  try {
1633
1659
  const count = viewer.navigation?.getTotalPages?.();
1634
1660
  if (count && count > 0) {
1635
1661
  setTotalPages(count);
1662
+ setIsInternalReady(true);
1636
1663
  return;
1637
1664
  }
1638
1665
  } catch (e) {
1639
1666
  }
1640
- console.warn(
1641
- "Could not determine total pages, using fallback value of 1"
1642
- );
1643
- setTotalPages(1);
1644
1667
  };
1645
1668
  initializePageCount();
1646
1669
  }, [state, totalPages]);
1647
1670
  useEffect4(() => {
1648
- if (state === "ready" && pdfViewerRef.current) {
1671
+ if (state === "ready") {
1649
1672
  const updateInfo = () => {
1673
+ if (!pdfViewerRef.current) return;
1650
1674
  const current = pdfViewerRef.current?.navigation.getCurrentPage() || 1;
1651
- const total = pdfViewerRef.current?.navigation.getTotalPages() || 0;
1675
+ const docInfo = pdfViewerRef.current?.document?.getDocumentInfo?.();
1676
+ const navTotal = pdfViewerRef.current?.navigation?.getTotalPages?.();
1677
+ let total = 0;
1678
+ if (docInfo && docInfo.totalPages > 0) {
1679
+ total = docInfo.totalPages;
1680
+ } else if (typeof navTotal === "number" && navTotal > 0) {
1681
+ total = navTotal;
1682
+ }
1652
1683
  const zoomValue = pdfViewerRef.current?.zoom.getZoom();
1653
1684
  const currentSearchState = pdfViewerRef.current?.search.getSearchState();
1654
1685
  setCurrentPage(current);
@@ -1660,7 +1691,8 @@ var PDFViewerContent = forwardRef(
1660
1691
  }
1661
1692
  };
1662
1693
  updateInfo();
1663
- const interval = setInterval(updateInfo, 300);
1694
+ const pollInterval = totalPages === 0 ? 50 : 300;
1695
+ const interval = setInterval(updateInfo, pollInterval);
1664
1696
  return () => clearInterval(interval);
1665
1697
  }
1666
1698
  }, [state, totalPages]);
@@ -1732,8 +1764,11 @@ var PDFViewerContent = forwardRef(
1732
1764
  setSearchQuery("");
1733
1765
  },
1734
1766
  getSearchState: () => pdfViewerRef.current?.search.getSearchState() || null,
1735
- getSelectedText: () => pdfViewerRef.current?.selection.getSelectedText() || "",
1767
+ getSelectedText: async () => {
1768
+ return await pdfViewerRef.current?.selection.getSelectedText() || "";
1769
+ },
1736
1770
  clearSelection: () => pdfViewerRef.current?.selection.clearSelection(),
1771
+ copy: () => pdfViewerRef.current?.selection.copy(),
1737
1772
  rotateForward: () => pdfViewerRef.current?.rotate?.rotateForward(),
1738
1773
  rotateBackward: () => pdfViewerRef.current?.rotate?.rotateBackward(),
1739
1774
  getRotation: () => pdfViewerRef.current?.rotate?.getRotation() || 0,
@@ -1744,6 +1779,12 @@ var PDFViewerContent = forwardRef(
1744
1779
  printWithoutAnnotations: async () => {
1745
1780
  await pdfViewerRef.current?.print?.printWithoutAnnotations?.();
1746
1781
  },
1782
+ downloadWithAnnotations: async (filename) => {
1783
+ await pdfViewerRef.current?.download?.downloadWithAnnotations?.(filename);
1784
+ },
1785
+ downloadWithoutAnnotations: async (filename) => {
1786
+ await pdfViewerRef.current?.download?.downloadWithoutAnnotations?.(filename);
1787
+ },
1747
1788
  get annotation() {
1748
1789
  return pdfViewerRef.current?.annotation;
1749
1790
  },
@@ -1802,7 +1843,6 @@ var PDFViewerContent = forwardRef(
1802
1843
  setIsSearching(true);
1803
1844
  try {
1804
1845
  const results = await pdfViewerRef.current.search.searchText(keyword);
1805
- console.log("Search completed:", results);
1806
1846
  setIsSearching(false);
1807
1847
  const hasValidResults = results?.results && Array.isArray(results.results) && results.results.length > 0;
1808
1848
  if (hasValidResults) {
@@ -1973,44 +2013,31 @@ var PDFViewerContent = forwardRef(
1973
2013
  setPasswordError("");
1974
2014
  }
1975
2015
  }, [passwordResolve]);
1976
- if (state === "loading") {
1977
- return /* @__PURE__ */ jsxs5(
1978
- "div",
1979
- {
1980
- style: {
1981
- display: "flex",
1982
- flexDirection: "column",
1983
- alignItems: "center",
1984
- justifyContent: "center",
1985
- height: "100%",
1986
- gap: "16px"
1987
- },
1988
- children: [
1989
- /* @__PURE__ */ jsx6(
1990
- "div",
1991
- {
1992
- className: "spinner",
1993
- style: {
1994
- width: "48px",
1995
- height: "48px",
1996
- border: "4px solid #f3f3f3",
1997
- borderTop: "4px solid #3498db",
1998
- borderRadius: "50%",
1999
- animation: "spin 1s linear infinite"
2000
- }
2001
- }
2002
- ),
2003
- /* @__PURE__ */ jsx6("p", { children: "Loading PDF..." }),
2004
- /* @__PURE__ */ jsx6("style", { children: `
2005
- @keyframes spin {
2006
- 0% { transform: rotate(0deg); }
2007
- 100% { transform: rotate(360deg); }
2008
- }
2009
- ` })
2010
- ]
2011
- }
2012
- );
2013
- }
2016
+ const LoadingSpinner = ({ fileName: fileName2 }) => /* @__PURE__ */ jsxs5("div", { style: {
2017
+ position: "absolute",
2018
+ inset: 0,
2019
+ zIndex: 50,
2020
+ backgroundColor: "#fff",
2021
+ display: "flex",
2022
+ flexDirection: "column",
2023
+ alignItems: "center",
2024
+ justifyContent: "center"
2025
+ }, children: [
2026
+ /* @__PURE__ */ jsx6("div", { className: "dms-loading-spinner", style: {
2027
+ width: "40px",
2028
+ height: "40px",
2029
+ border: "3px solid #f3f3f3",
2030
+ borderTop: "3px solid #3498db",
2031
+ borderRadius: "50%",
2032
+ animation: "spin 1s linear infinite"
2033
+ } }),
2034
+ fileName2 && /* @__PURE__ */ jsxs5("p", { style: { marginTop: "16px", color: "#666", fontSize: "14px" }, children: [
2035
+ "Loading ",
2036
+ fileName2,
2037
+ "..."
2038
+ ] }),
2039
+ /* @__PURE__ */ jsx6("style", { children: `@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }` })
2040
+ ] });
2014
2041
  if (state === "error" || error) {
2015
2042
  return /* @__PURE__ */ jsx6(
2016
2043
  "div",
@@ -2042,135 +2069,130 @@ var PDFViewerContent = forwardRef(
2042
2069
  }
2043
2070
  );
2044
2071
  }
2045
- if (!pdfBuffer || state !== "ready") {
2046
- return /* @__PURE__ */ jsx6(
2047
- "div",
2048
- {
2049
- style: {
2050
- display: "flex",
2051
- alignItems: "center",
2052
- justifyContent: "center",
2053
- height: "100%"
2054
- },
2055
- children: /* @__PURE__ */ jsx6("p", { children: "Preparing PDF..." })
2056
- }
2057
- );
2058
- }
2059
- return /* @__PURE__ */ jsxs5("div", { ref: containerRef, className: "pdf-viewer-container", children: [
2072
+ const isReady = pdfBuffer && state === "ready";
2073
+ const showOverlay = loading || !isReady || !isInternalReady;
2074
+ return /* @__PURE__ */ jsxs5("div", { ref: containerRef, className: "pdf-viewer-container", style: { position: "relative", height: "100%", width: "100%" }, children: [
2060
2075
  /* @__PURE__ */ jsx6("style", { children: toolbarStyles }),
2061
- /* @__PURE__ */ jsx6(PDFHeader, { fileName: resolvedFileName, fileExtension }),
2062
- /* @__PURE__ */ jsx6(
2063
- PDFToolbar,
2064
- {
2065
- currentPage,
2066
- totalPages,
2067
- zoom,
2068
- isSidebarOpen,
2069
- showPageNavigation,
2070
- showPageCount,
2071
- showZoomControls,
2072
- showSearch,
2073
- showRotation: !toolbar.isHidden("rotation"),
2074
- showMetadata: !toolbar.isHidden("metadata"),
2075
- showProperties: !toolbar.isHidden("properties"),
2076
- showDownload: !toolbar.isHidden("download"),
2077
- showPrint: !toolbar.isHidden("print"),
2078
- showTags: !toolbar.isHidden("tags"),
2079
- showHistory: !toolbar.isHidden("history"),
2080
- disabledRotateLeft: toolbar.isDisabled("rotateLeft"),
2081
- disabledRotateRight: false,
2082
- disabledMetadata: toolbar.isDisabled("metadata"),
2083
- disabledTags: toolbar.isDisabled("tags"),
2084
- disabledProperties: toolbar.isDisabled("properties"),
2085
- disabledHistory: toolbar.isDisabled("history"),
2086
- disabledDownload: toolbar.isDisabled("download"),
2087
- disabledPrint: toolbar.isDisabled("print"),
2088
- onFirstPage: toolbarHandlers.handleFirstPage,
2089
- onPreviousPage: toolbarHandlers.handlePreviousPage,
2090
- onNextPage: toolbarHandlers.handleNextPage,
2091
- onLastPage: toolbarHandlers.handleLastPage,
2092
- onPageInput: toolbarHandlers.handlePageInput,
2093
- onPageInputKeyPress: toolbarHandlers.handlePageInputKeyPress,
2094
- onZoomIn: toolbarHandlers.handleZoomIn,
2095
- onZoomOut: toolbarHandlers.handleZoomOut,
2096
- onFitToWidth: toolbarHandlers.handleFitToWidth,
2097
- onFitToPage: toolbarHandlers.handleFitToPage,
2098
- onToggleSidebar: toolbarHandlers.toggleSidebar,
2099
- onToggleFullScreen: toolbarHandlers.handleToggleFullScreen,
2100
- onRotateLeft: toolbarHandlers.handleRotateLeft,
2101
- onRotateRight: toolbarHandlers.handleRotateRight,
2102
- onDownloadClick: toolbar.getHandler("download", onDownloadClick),
2103
- onPrintClick: toolbar.getHandler("print", onPrintClick || toolbarHandlers.handlePrint),
2104
- onPrintWithAnnotations: toolbarHandlers.handlePrintWithAnnotations,
2105
- onPrintWithoutAnnotations: toolbarHandlers.handlePrintWithoutAnnotations,
2106
- onMetadataClick: toolbar.getHandler("metadata", onMetadataClick),
2107
- onPropertiesClick: toolbar.getHandler(
2108
- "properties",
2109
- onPropertiesClick
2110
- ),
2111
- onTagsClick: toolbar.getHandler("tags", onTagsClick),
2112
- onHistoryClick: toolbar.getHandler("history", onHistoryClick),
2113
- showAnnotations,
2114
- isHighlighterActive: highlighterActive,
2115
- isStampActive: stampActive,
2116
- disabledHighlighter: toolbar.isDisabled("highlighter"),
2117
- disabledStamp: toolbar.isDisabled("stamp"),
2118
- disabledSignature: toolbar.isDisabled("signature"),
2119
- onHighlighterClick: toolbar.getHandler("highlighter", onHighlighterClick || toolbarHandlers.handleHighlighterClick),
2120
- onStampClick: toolbar.getHandler("stamp", onStampClick || toolbarHandlers.handleStampClick),
2121
- onSignatureClick: toolbar.getHandler("signature", onSignatureClick || toolbarHandlers.handleSignatureClick),
2122
- hasUnsavedAnnotations,
2123
- isSavingAnnotations,
2124
- canSaveAnnotations,
2125
- onSaveAnnotations
2126
- }
2127
- ),
2128
- /* @__PURE__ */ jsxs5("div", { className: "pdf-viewer-main", children: [
2129
- /* @__PURE__ */ jsx6("div", { className: "pdf-viewer-viewer-area", children: /* @__PURE__ */ jsx6(
2130
- StablePDFViewer,
2076
+ showOverlay && /* @__PURE__ */ jsx6(LoadingSpinner, { fileName: resolvedFileName }),
2077
+ /* @__PURE__ */ jsxs5("div", { style: { opacity: !showOverlay ? 1 : 0, height: "100%", display: "flex", flexDirection: "column" }, children: [
2078
+ /* @__PURE__ */ jsx6(PDFHeader, { fileName: resolvedFileName, fileExtension }),
2079
+ /* @__PURE__ */ jsx6(
2080
+ PDFToolbar,
2131
2081
  {
2132
- pdfBuffer,
2133
- onPasswordRequest: handlePasswordRequest,
2134
- pdfViewerRef,
2082
+ currentPage,
2083
+ totalPages,
2084
+ zoom,
2085
+ isSidebarOpen,
2086
+ showPageNavigation,
2087
+ showPageCount,
2088
+ showZoomControls,
2089
+ showSearch,
2090
+ showRotation: !toolbar.isHidden("rotation"),
2091
+ showMetadata: !toolbar.isHidden("metadata"),
2092
+ showProperties: !toolbar.isHidden("properties"),
2093
+ showDownload: !toolbar.isHidden("download"),
2094
+ showPrint: !toolbar.isHidden("print"),
2095
+ showTags: !toolbar.isHidden("tags"),
2096
+ showHistory: !toolbar.isHidden("history"),
2097
+ disabledRotateLeft: toolbar.isDisabled("rotateLeft"),
2098
+ disabledRotateRight: false,
2099
+ disabledMetadata: toolbar.isDisabled("metadata"),
2100
+ disabledTags: toolbar.isDisabled("tags"),
2101
+ disabledProperties: toolbar.isDisabled("properties"),
2102
+ disabledHistory: toolbar.isDisabled("history"),
2103
+ disabledDownload: toolbar.isDisabled("download"),
2104
+ disabledPrint: toolbar.isDisabled("print"),
2105
+ onFirstPage: toolbarHandlers.handleFirstPage,
2106
+ onPreviousPage: toolbarHandlers.handlePreviousPage,
2107
+ onNextPage: toolbarHandlers.handleNextPage,
2108
+ onLastPage: toolbarHandlers.handleLastPage,
2109
+ onPageInput: toolbarHandlers.handlePageInput,
2110
+ onPageInputKeyPress: toolbarHandlers.handlePageInputKeyPress,
2111
+ onZoomIn: toolbarHandlers.handleZoomIn,
2112
+ onZoomOut: toolbarHandlers.handleZoomOut,
2113
+ onFitToWidth: toolbarHandlers.handleFitToWidth,
2114
+ onFitToPage: toolbarHandlers.handleFitToPage,
2115
+ onToggleSidebar: toolbarHandlers.toggleSidebar,
2116
+ onToggleFullScreen: toolbarHandlers.handleToggleFullScreen,
2117
+ onRotateLeft: toolbarHandlers.handleRotateLeft,
2118
+ onRotateRight: toolbarHandlers.handleRotateRight,
2119
+ onDownloadClick: toolbar.getHandler("download", onDownloadClick),
2120
+ onDownloadWithAnnotations: toolbarHandlers.handleDownloadWithAnnotations,
2121
+ onDownloadWithoutAnnotations: toolbarHandlers.handleDownloadWithoutAnnotations,
2122
+ onPrintClick: toolbar.getHandler("print", onPrintClick || toolbarHandlers.handlePrint),
2123
+ onPrintWithAnnotations: toolbarHandlers.handlePrintWithAnnotations,
2124
+ onPrintWithoutAnnotations: toolbarHandlers.handlePrintWithoutAnnotations,
2125
+ onCopyClick: toolbarHandlers.handleCopy,
2126
+ onMetadataClick: toolbar.getHandler("metadata", onMetadataClick),
2127
+ onPropertiesClick: toolbar.getHandler(
2128
+ "properties",
2129
+ onPropertiesClick
2130
+ ),
2131
+ onTagsClick: toolbar.getHandler("tags", onTagsClick),
2132
+ onHistoryClick: toolbar.getHandler("history", onHistoryClick),
2135
2133
  showAnnotations,
2136
- userDetails,
2137
- annotationSelectionMenu,
2138
2134
  isHighlighterActive: highlighterActive,
2139
2135
  isStampActive: stampActive,
2140
- onHighlighterClick: onHighlighterClick || toolbarHandlers.handleHighlighterClick,
2141
- onStampClick: onStampClick || toolbarHandlers.handleStampClick,
2142
- onSignatureClick: onSignatureClick || toolbarHandlers.handleSignatureClick,
2143
- permissions: props.permissions
2136
+ disabledHighlighter: toolbar.isDisabled("highlighter"),
2137
+ disabledStamp: toolbar.isDisabled("stamp"),
2138
+ disabledSignature: toolbar.isDisabled("signature"),
2139
+ onHighlighterClick: toolbar.getHandler("highlighter", onHighlighterClick || toolbarHandlers.handleHighlighterClick),
2140
+ onStampClick: toolbar.getHandler("stamp", onStampClick || toolbarHandlers.handleStampClick),
2141
+ onSignatureClick: toolbar.getHandler("signature", onSignatureClick || toolbarHandlers.handleSignatureClick),
2142
+ hasUnsavedAnnotations,
2143
+ isSavingAnnotations,
2144
+ canSaveAnnotations,
2145
+ onSaveAnnotations
2144
2146
  }
2145
- ) }),
2147
+ ),
2148
+ /* @__PURE__ */ jsxs5("div", { className: "pdf-viewer-main", children: [
2149
+ /* @__PURE__ */ jsx6("div", { className: "pdf-viewer-viewer-area", children: /* @__PURE__ */ jsx6(
2150
+ StablePDFViewer,
2151
+ {
2152
+ pdfBuffer: pdfBuffer || new ArrayBuffer(0),
2153
+ onPasswordRequest: handlePasswordRequest,
2154
+ pdfViewerRef,
2155
+ hideInternalLoading: true,
2156
+ showAnnotations,
2157
+ userDetails,
2158
+ annotationSelectionMenu,
2159
+ isHighlighterActive: highlighterActive,
2160
+ isStampActive: stampActive,
2161
+ onHighlighterClick: onHighlighterClick || toolbarHandlers.handleHighlighterClick,
2162
+ onStampClick: onStampClick || toolbarHandlers.handleStampClick,
2163
+ onSignatureClick: onSignatureClick || toolbarHandlers.handleSignatureClick,
2164
+ permissions: props.permissions
2165
+ }
2166
+ ) }),
2167
+ /* @__PURE__ */ jsx6(
2168
+ SearchSidebar,
2169
+ {
2170
+ isOpen: isSidebarOpen,
2171
+ onClose: handleSidebarClose,
2172
+ onSearch: handleSidebarSearch,
2173
+ onSearchResultClick: handleSearchResultClick,
2174
+ onNextResult: handleNextSearchResult,
2175
+ onPreviousResult: handlePreviousSearchResult,
2176
+ currentResultIndex: currentSearchResultIndex,
2177
+ totalResults: totalSearchResults,
2178
+ searchKeyword: searchQuery,
2179
+ searchResults,
2180
+ isSearching
2181
+ }
2182
+ )
2183
+ ] }),
2146
2184
  /* @__PURE__ */ jsx6(
2147
- SearchSidebar,
2185
+ PasswordDialog,
2148
2186
  {
2149
- isOpen: isSidebarOpen,
2150
- onClose: handleSidebarClose,
2151
- onSearch: handleSidebarSearch,
2152
- onSearchResultClick: handleSearchResultClick,
2153
- onNextResult: handleNextSearchResult,
2154
- onPreviousResult: handlePreviousSearchResult,
2155
- currentResultIndex: currentSearchResultIndex,
2156
- totalResults: totalSearchResults,
2157
- searchKeyword: searchQuery,
2158
- searchResults,
2159
- isSearching
2187
+ open: isPasswordDialogOpen,
2188
+ fileName: resolvedFileName,
2189
+ onSubmit: handlePasswordSubmit,
2190
+ onCancel: handlePasswordCancel,
2191
+ error: passwordError,
2192
+ isLoading: isVerifyingPassword
2160
2193
  }
2161
2194
  )
2162
- ] }),
2163
- /* @__PURE__ */ jsx6(
2164
- PasswordDialog,
2165
- {
2166
- open: isPasswordDialogOpen,
2167
- fileName: resolvedFileName,
2168
- onSubmit: handlePasswordSubmit,
2169
- onCancel: handlePasswordCancel,
2170
- error: passwordError,
2171
- isLoading: isVerifyingPassword
2172
- }
2173
- )
2195
+ ] })
2174
2196
  ] });
2175
2197
  }
2176
2198
  );
@@ -2185,4 +2207,4 @@ PDFViewer.displayName = "PDFViewer";
2185
2207
  export {
2186
2208
  PDFViewer
2187
2209
  };
2188
- //# sourceMappingURL=chunk-IY5EEUCU.mjs.map
2210
+ //# sourceMappingURL=chunk-UFPC67AQ.mjs.map