@tfw.in/structura-lib 0.2.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.
- package/PRODUCTION_ARCHITECTURE.md +511 -0
- package/README.md +379 -0
- package/SAVE_FUNCTIONALITY_COMPLETE.md +448 -0
- package/dist/cjs/EditableContent.js +150 -0
- package/dist/cjs/HtmlViewer.js +587 -0
- package/dist/cjs/PdfComponents.js +16 -0
- package/dist/cjs/PdfDocumentViewer.js +281 -0
- package/dist/cjs/Structura.js +806 -0
- package/dist/cjs/Table.js +164 -0
- package/dist/cjs/TableCell.js +115 -0
- package/dist/cjs/accuracyMetrics.js +39 -0
- package/dist/cjs/helpers/preprocessData.js +143 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/lib/polyfills.js +15 -0
- package/dist/cjs/lib/utils.js +10 -0
- package/dist/cjs/node_modules/react-icons/fa/index.esm.js +14 -0
- package/dist/cjs/node_modules/react-icons/lib/esm/iconBase.js +69 -0
- package/dist/cjs/node_modules/react-icons/lib/esm/iconContext.js +15 -0
- package/dist/cjs/polyfills.js +19 -0
- package/dist/cjs/route.js +102 -0
- package/dist/cjs/styles.css +7 -0
- package/dist/cjs/styles.css.map +1 -0
- package/dist/cjs/ui/badge.js +34 -0
- package/dist/cjs/ui/button.js +71 -0
- package/dist/cjs/ui/card.js +86 -0
- package/dist/cjs/ui/progress.js +45 -0
- package/dist/cjs/ui/scroll-area.js +62 -0
- package/dist/cjs/ui/tabs.js +60 -0
- package/dist/cjs/worker.js +36 -0
- package/dist/esm/EditableContent.js +161 -0
- package/dist/esm/HtmlViewer.js +640 -0
- package/dist/esm/PdfComponents.js +21 -0
- package/dist/esm/PdfDocumentViewer.js +294 -0
- package/dist/esm/Structura.js +951 -0
- package/dist/esm/Table.js +182 -0
- package/dist/esm/TableCell.js +122 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +305 -0
- package/dist/esm/accuracyMetrics.js +41 -0
- package/dist/esm/helpers/preprocessData.js +152 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/lib/polyfills.js +13 -0
- package/dist/esm/lib/utils.js +8 -0
- package/dist/esm/node_modules/react-icons/fa/index.esm.js +11 -0
- package/dist/esm/node_modules/react-icons/lib/esm/iconBase.js +66 -0
- package/dist/esm/node_modules/react-icons/lib/esm/iconContext.js +12 -0
- package/dist/esm/polyfills.js +17 -0
- package/dist/esm/route.js +154 -0
- package/dist/esm/styles.css +7 -0
- package/dist/esm/styles.css.map +1 -0
- package/dist/esm/types/EditableContent.d.ts +9 -0
- package/dist/esm/types/HtmlViewer.d.ts +10 -0
- package/dist/esm/types/PdfComponents.d.ts +35 -0
- package/dist/esm/types/PdfDocumentViewer.d.ts +22 -0
- package/dist/esm/types/Structura.d.ts +11 -0
- package/dist/esm/types/Table.d.ts +12 -0
- package/dist/esm/types/TableCell.d.ts +13 -0
- package/dist/esm/types/accuracy.d.ts +23 -0
- package/dist/esm/types/accuracyMetrics.d.ts +5 -0
- package/dist/esm/types/helpers/flattenJSON.d.ts +1 -0
- package/dist/esm/types/helpers/hardMerging.d.ts +2 -0
- package/dist/esm/types/helpers/index.d.ts +6 -0
- package/dist/esm/types/helpers/jsonToHtml.d.ts +40 -0
- package/dist/esm/types/helpers/preprocessData.d.ts +3 -0
- package/dist/esm/types/helpers/removeMetadata.d.ts +1 -0
- package/dist/esm/types/helpers/tableProcessor.d.ts +1 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/esm/types/lib/polyfills.d.ts +1 -0
- package/dist/esm/types/lib/utils.d.ts +2 -0
- package/dist/esm/types/polyfills.d.ts +1 -0
- package/dist/esm/types/route.d.ts +45 -0
- package/dist/esm/types/test-app/src/App.d.ts +4 -0
- package/dist/esm/types/test-app/src/main.d.ts +1 -0
- package/dist/esm/types/test-app/vite.config.d.ts +2 -0
- package/dist/esm/types/types.d.ts +23 -0
- package/dist/esm/types/ui/alert.d.ts +8 -0
- package/dist/esm/types/ui/badge.d.ts +9 -0
- package/dist/esm/types/ui/button.d.ts +11 -0
- package/dist/esm/types/ui/card.d.ts +8 -0
- package/dist/esm/types/ui/progress.d.ts +6 -0
- package/dist/esm/types/ui/scroll-area.d.ts +5 -0
- package/dist/esm/types/ui/skeleton.d.ts +2 -0
- package/dist/esm/types/ui/tabs.d.ts +7 -0
- package/dist/esm/types/worker.d.ts +1 -0
- package/dist/esm/ui/badge.js +31 -0
- package/dist/esm/ui/button.js +50 -0
- package/dist/esm/ui/card.js +67 -0
- package/dist/esm/ui/progress.js +26 -0
- package/dist/esm/ui/scroll-area.js +45 -0
- package/dist/esm/ui/tabs.js +39 -0
- package/dist/esm/worker.js +50 -0
- package/dist/index.d.ts +38 -0
- package/package.json +85 -0
- package/server/README.md +203 -0
- package/server/db.js +142 -0
- package/server/server.js +165 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
4
|
+
import './polyfills.js';
|
|
5
|
+
import { Document, Page } from './PdfComponents.js';
|
|
6
|
+
import './worker.js';
|
|
7
|
+
|
|
8
|
+
function PdfDocumentViewer(_ref2) {
|
|
9
|
+
var fileUrl = _ref2.fileUrl,
|
|
10
|
+
allowedPages = _ref2.allowedPages,
|
|
11
|
+
_onLoadSuccess = _ref2.onLoadSuccess,
|
|
12
|
+
onFileUpload = _ref2.onFileUpload,
|
|
13
|
+
onRemovePDF = _ref2.onRemovePDF,
|
|
14
|
+
jsonData = _ref2.jsonData,
|
|
15
|
+
selectedBboxId = _ref2.selectedBboxId,
|
|
16
|
+
onPdfBboxClick = _ref2.onPdfBboxClick;
|
|
17
|
+
// console.log("[PdfDocumentViewer] Props received:", { fileUrl: !!fileUrl, jsonData: !!jsonData, selectedBboxId, onPdfBboxClick: !!onPdfBboxClick, allowedPages });
|
|
18
|
+
var _useState = useState(false),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
isDragging = _useState2[0],
|
|
21
|
+
setIsDragging = _useState2[1];
|
|
22
|
+
var _useState3 = useState({}),
|
|
23
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
|
+
pageScales = _useState4[0],
|
|
25
|
+
setPageScales = _useState4[1]; // To store scale for each page
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
// console.log("[PdfDocumentViewer] pageScales updated:", pageScales);
|
|
28
|
+
}, [pageScales]);
|
|
29
|
+
var handleDragOver = useCallback(function (e) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
setIsDragging(true);
|
|
32
|
+
}, []);
|
|
33
|
+
useCallback(function (e) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
setIsDragging(false);
|
|
36
|
+
}, []);
|
|
37
|
+
var handleDrop = useCallback(function (e) {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
setIsDragging(false);
|
|
40
|
+
// console.log('!!! [PdfDocumentViewer] Drop event triggered');
|
|
41
|
+
// First check if we have drag data (from FileTree)
|
|
42
|
+
e.dataTransfer.getData('text/plain');
|
|
43
|
+
// console.log('!!! [PdfDocumentViewer] Available data types:', e.dataTransfer.types);
|
|
44
|
+
// Handle direct file drops (from computer)
|
|
45
|
+
var files = e.dataTransfer.files;
|
|
46
|
+
if (files.length > 0) {
|
|
47
|
+
var file = files[0];
|
|
48
|
+
// console.log('!!! [PdfDocumentViewer] File dropped:', file.name, file.type);
|
|
49
|
+
if (file.type === "application/pdf") {
|
|
50
|
+
// console.log('!!! [PdfDocumentViewer] Valid PDF file, calling onFileUpload');
|
|
51
|
+
onFileUpload(file);
|
|
52
|
+
} else {
|
|
53
|
+
// console.log('!!! [PdfDocumentViewer] Invalid file type:', file.type);
|
|
54
|
+
alert("Please upload a PDF file");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [onFileUpload]);
|
|
58
|
+
var renderUploadArea = function renderUploadArea() {
|
|
59
|
+
return jsxs("div", {
|
|
60
|
+
className: "structura-upload-container ".concat(isDragging ? 'border-blue-500 bg-blue-50' : ''),
|
|
61
|
+
onDragOver: handleDragOver,
|
|
62
|
+
onDragEnter: function onDragEnter() {
|
|
63
|
+
return setIsDragging(true);
|
|
64
|
+
},
|
|
65
|
+
onDragLeave: function onDragLeave() {
|
|
66
|
+
return setIsDragging(false);
|
|
67
|
+
},
|
|
68
|
+
onDrop: handleDrop,
|
|
69
|
+
onClick: function onClick() {
|
|
70
|
+
var _a;
|
|
71
|
+
return (_a = document.getElementById('file-upload')) === null || _a === void 0 ? void 0 : _a.click();
|
|
72
|
+
},
|
|
73
|
+
children: [jsx("div", {
|
|
74
|
+
className: "structura-upload-icon",
|
|
75
|
+
children: jsx("svg", {
|
|
76
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
77
|
+
fill: "none",
|
|
78
|
+
viewBox: "0 0 24 24",
|
|
79
|
+
stroke: "currentColor",
|
|
80
|
+
children: jsx("path", {
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeLinejoin: "round",
|
|
83
|
+
strokeWidth: 2,
|
|
84
|
+
d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
}), jsx("h3", {
|
|
88
|
+
className: "structura-upload-text",
|
|
89
|
+
children: "Drop PDF Here or Click to Upload"
|
|
90
|
+
}), jsx("p", {
|
|
91
|
+
className: "structura-upload-subtext",
|
|
92
|
+
children: "Drag and drop your PDF document here, or click the button below to browse files"
|
|
93
|
+
}), jsxs("button", {
|
|
94
|
+
className: "structura-upload-button",
|
|
95
|
+
children: ["Upload Document", jsx("input", {
|
|
96
|
+
type: "file",
|
|
97
|
+
id: "file-upload",
|
|
98
|
+
accept: "application/pdf",
|
|
99
|
+
onChange: function onChange(e) {
|
|
100
|
+
// console.log('!!! [PdfDocumentViewer] File input change event');
|
|
101
|
+
if (e.target.files && e.target.files[0]) {
|
|
102
|
+
var file = e.target.files[0];
|
|
103
|
+
// console.log('!!! [PdfDocumentViewer] File selected:', file.name, file.type);
|
|
104
|
+
onFileUpload(file);
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
style: {
|
|
108
|
+
display: 'none'
|
|
109
|
+
}
|
|
110
|
+
})]
|
|
111
|
+
}), jsx("p", {
|
|
112
|
+
className: "structura-format-text",
|
|
113
|
+
children: "Supported format: PDF only"
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
if (!fileUrl) {
|
|
118
|
+
return renderUploadArea();
|
|
119
|
+
}
|
|
120
|
+
// Let parent ScrollArea handle scrolling. Removed overflow-y-auto and maxHeight here.
|
|
121
|
+
return jsxs("div", {
|
|
122
|
+
className: "w-full relative",
|
|
123
|
+
children: [" ", jsxs("div", {
|
|
124
|
+
className: "relative w-full",
|
|
125
|
+
children: [jsxs("div", {
|
|
126
|
+
className: "sticky top-0 z-10 float-right mr-4 mt-4",
|
|
127
|
+
style: {
|
|
128
|
+
right: 'calc(50% - 300px + 1rem)'
|
|
129
|
+
},
|
|
130
|
+
children: [" ", jsx("button", {
|
|
131
|
+
onClick: onRemovePDF,
|
|
132
|
+
className: "p-2 bg-white rounded-full shadow-lg mr-2 text-red-500 hover:text-red-700 hover:bg-gray-50 transition-colors",
|
|
133
|
+
title: "Remove PDF",
|
|
134
|
+
children: jsx("svg", {
|
|
135
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
136
|
+
className: "h-6 w-6",
|
|
137
|
+
fill: "none",
|
|
138
|
+
viewBox: "0 0 24 24",
|
|
139
|
+
stroke: "currentColor",
|
|
140
|
+
children: jsx("path", {
|
|
141
|
+
strokeLinecap: "round",
|
|
142
|
+
strokeLinejoin: "round",
|
|
143
|
+
strokeWidth: 2,
|
|
144
|
+
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})]
|
|
148
|
+
}), jsx(Document, {
|
|
149
|
+
file: fileUrl,
|
|
150
|
+
onLoadSuccess: function onLoadSuccess(_ref3) {
|
|
151
|
+
var numPages = _ref3.numPages;
|
|
152
|
+
// console.log('!!! [PdfDocumentViewer] PDF loaded successfully with', numPages, 'pages');
|
|
153
|
+
_onLoadSuccess(numPages);
|
|
154
|
+
},
|
|
155
|
+
className: "flex flex-col w-full",
|
|
156
|
+
children: allowedPages.map(function (pageNum) {
|
|
157
|
+
var _a;
|
|
158
|
+
var pageIndex = pageNum - 1; // pageNum is 1-indexed
|
|
159
|
+
// Assuming jsonData.children is an array of page blocks, ordered by page number.
|
|
160
|
+
var currentPageData = (_a = jsonData === null || jsonData === void 0 ? void 0 : jsonData.children) === null || _a === void 0 ? void 0 : _a[pageIndex];
|
|
161
|
+
// console.log(`[PdfDocumentViewer] Page ${pageNum}: Attempting to get data from jsonData.children[${pageIndex}]. currentPageData found:`, !!currentPageData);
|
|
162
|
+
// Optional: Validate if it's a 'Page' type block and log a warning if not.
|
|
163
|
+
// This helps ensure that the data structure assumption holds.
|
|
164
|
+
if (currentPageData && currentPageData.block_type !== "Page") ;
|
|
165
|
+
var renderBboxes = function renderBboxes() {
|
|
166
|
+
// console.log(`[PdfDocumentViewer] renderBboxes for page ${pageNum}: hasCurrentPageData=${!!currentPageData}, hasChildren=${!!currentPageData?.children}, hasScale=${!!pageScales[pageNum]}`);
|
|
167
|
+
if (!currentPageData || !currentPageData.children || !pageScales[pageNum]) {
|
|
168
|
+
if (!pageScales[pageNum]) console.warn("[PdfDocumentViewer] No scale for page ".concat(pageNum, " yet."));
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
var scale = pageScales[pageNum];
|
|
172
|
+
// console.log(`[PdfDocumentViewer] Page ${pageNum}: Using scale ${scale}`);
|
|
173
|
+
var bboxesToRender = [];
|
|
174
|
+
function collectBboxes(blocks) {
|
|
175
|
+
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
176
|
+
blocks.forEach(function (block, index) {
|
|
177
|
+
var currentPath = "".concat(path, "/").concat(block.block_type, "[").concat(index, "](").concat(block.id, ")");
|
|
178
|
+
// Assuming block.polygon is number[][] (array of points)
|
|
179
|
+
var points = block.polygon;
|
|
180
|
+
if (points && Array.isArray(points) && points.length >= 2 && block.block_type !== "Page") {
|
|
181
|
+
// Calculate bbox from points
|
|
182
|
+
var x_coords = points.map(function (p) {
|
|
183
|
+
return p[0];
|
|
184
|
+
});
|
|
185
|
+
var y_coords = points.map(function (p) {
|
|
186
|
+
return p[1];
|
|
187
|
+
});
|
|
188
|
+
var x_min = Math.min.apply(Math, _toConsumableArray(x_coords));
|
|
189
|
+
var y_min = Math.min.apply(Math, _toConsumableArray(y_coords));
|
|
190
|
+
var x_max = Math.max.apply(Math, _toConsumableArray(x_coords));
|
|
191
|
+
var y_max = Math.max.apply(Math, _toConsumableArray(y_coords));
|
|
192
|
+
if (x_max <= x_min || y_max <= y_min) {
|
|
193
|
+
console.warn("[PdfDocumentViewer] Page ".concat(pageNum, ": Invalid bbox for block ").concat(block.id, " (path: ").concat(currentPath, ") - [").concat(x_min, ", ").concat(y_min, ", ").concat(x_max, ", ").concat(y_max, "]"));
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
var style = {
|
|
197
|
+
position: 'absolute',
|
|
198
|
+
left: "".concat(x_min * scale, "px"),
|
|
199
|
+
top: "".concat(y_min * scale, "px"),
|
|
200
|
+
width: "".concat((x_max - x_min) * scale, "px"),
|
|
201
|
+
height: "".concat((y_max - y_min) * scale, "px"),
|
|
202
|
+
border: "1px solid ".concat(block.id === selectedBboxId ? 'red' : 'rgba(0, 100, 255, 0.5)'),
|
|
203
|
+
backgroundColor: "".concat(block.id === selectedBboxId ? 'rgba(255, 0, 0, 0.2)' : 'rgba(0, 100, 255, 0.1)'),
|
|
204
|
+
pointerEvents: 'auto',
|
|
205
|
+
boxSizing: 'border-box',
|
|
206
|
+
cursor: 'pointer',
|
|
207
|
+
zIndex: 10 // Ensure bboxes are on top
|
|
208
|
+
};
|
|
209
|
+
if (bboxesToRender.length < 5 || block.id === selectedBboxId) {
|
|
210
|
+
console.log("[PdfDocumentViewer] Page ".concat(pageNum, ": Rendering bbox for ").concat(block.id, " (path: ").concat(currentPath, ")"), {
|
|
211
|
+
x_min: x_min,
|
|
212
|
+
y_min: y_min,
|
|
213
|
+
x_max: x_max,
|
|
214
|
+
y_max: y_max,
|
|
215
|
+
scale: scale,
|
|
216
|
+
finalStyle: style
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
bboxesToRender.push(jsx("div", {
|
|
220
|
+
style: style,
|
|
221
|
+
title: "".concat(block.id, " (").concat(block.block_type, ")"),
|
|
222
|
+
onClick: function onClick(e) {
|
|
223
|
+
e.stopPropagation(); // Prevent clicks from bubbling to parent elements
|
|
224
|
+
if (onPdfBboxClick) {
|
|
225
|
+
// console.log(`[PdfDocumentViewer] Bbox clicked: ${block.id}`);
|
|
226
|
+
onPdfBboxClick(block.id);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}, block.id));
|
|
230
|
+
}
|
|
231
|
+
if (block.children) {
|
|
232
|
+
collectBboxes(block.children, currentPath);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
if (currentPageData.children) {
|
|
237
|
+
// console.log(`[PdfDocumentViewer] Page ${pageNum}: Starting collectBboxes for ${currentPageData.children.length} top-level blocks.`);
|
|
238
|
+
collectBboxes(currentPageData.children);
|
|
239
|
+
}
|
|
240
|
+
// console.log(`[PdfDocumentViewer] Page ${pageNum}: Collected ${bboxesToRender.length} bboxes to render.`);
|
|
241
|
+
return bboxesToRender;
|
|
242
|
+
};
|
|
243
|
+
return (
|
|
244
|
+
// The parent div for a page and its bboxes.
|
|
245
|
+
// It needs a defined width matching the page's render width for correct bbox positioning.
|
|
246
|
+
// Removed 'flex justify-center' to avoid x-offset issues with absolute bboxes.
|
|
247
|
+
// Bboxes are positioned relative to this div.
|
|
248
|
+
jsxs("div", {
|
|
249
|
+
id: "pdf-page-container-".concat(pageNum),
|
|
250
|
+
className: "relative mb-4 shadow-lg mx-auto" // mx-auto will center it if parent is wider
|
|
251
|
+
,
|
|
252
|
+
style: {
|
|
253
|
+
width: "".concat(pageScales[pageNum] ? 600 : 'auto', "px")
|
|
254
|
+
},
|
|
255
|
+
children: [jsx(Page, {
|
|
256
|
+
pageNumber: pageNum,
|
|
257
|
+
width: 600,
|
|
258
|
+
onRenderSuccess: function onRenderSuccess(pageProxy) {
|
|
259
|
+
var viewport = pageProxy.getViewport({
|
|
260
|
+
scale: 1
|
|
261
|
+
});
|
|
262
|
+
var newScale = 600 / viewport.width;
|
|
263
|
+
console.log("[PdfDocumentViewer] Page ".concat(pageNum, ": onRenderSuccess. Natural width: ").concat(viewport.width, ", calculated scale: ").concat(newScale));
|
|
264
|
+
if (pageScales[pageNum] !== newScale) {
|
|
265
|
+
setPageScales(function (prev) {
|
|
266
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty({}, pageNum, newScale));
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
onRenderError: function onRenderError(error) {
|
|
271
|
+
return console.error("[PdfDocumentViewer] Page ".concat(pageNum, ": onRenderError"), error);
|
|
272
|
+
},
|
|
273
|
+
className: "pdf-page-canvas" // Add a class for potential targeting
|
|
274
|
+
}), pageScales[pageNum] ? renderBboxes() : jsxs("div", {
|
|
275
|
+
style: {
|
|
276
|
+
position: 'absolute',
|
|
277
|
+
top: '50%',
|
|
278
|
+
left: '50%',
|
|
279
|
+
transform: 'translate(-50%, -50%)',
|
|
280
|
+
color: 'orange',
|
|
281
|
+
width: '200px',
|
|
282
|
+
textAlign: 'center'
|
|
283
|
+
},
|
|
284
|
+
children: ["Loading page ", pageNum, "..."]
|
|
285
|
+
})]
|
|
286
|
+
}, pageNum)
|
|
287
|
+
);
|
|
288
|
+
})
|
|
289
|
+
}, "".concat(fileUrl))]
|
|
290
|
+
})]
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export { PdfDocumentViewer as default };
|