@gouvfr-lasuite/ui-kit 0.22.0 → 0.23.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/dist/PdfPreview-C_MtPFTn.cjs +2 -0
- package/dist/{PdfPreview-CnHLGN5f.cjs.map → PdfPreview-C_MtPFTn.cjs.map} +1 -1
- package/dist/{PdfPreview-BOIgXF66.js → PdfPreview-tZ18gLC7.js} +75 -77
- package/dist/{PdfPreview-BOIgXF66.js.map → PdfPreview-tZ18gLC7.js.map} +1 -1
- package/dist/ZoomPlus-CiQptg56.cjs +23 -0
- package/dist/ZoomPlus-CiQptg56.cjs.map +1 -0
- package/dist/ZoomPlus-pBCoSTnV.js +467 -0
- package/dist/ZoomPlus-pBCoSTnV.js.map +1 -0
- package/dist/icons.cjs +2 -0
- package/dist/icons.cjs.map +1 -0
- package/dist/icons.d.ts +728 -0
- package/dist/icons.js +3919 -0
- package/dist/icons.js.map +1 -0
- package/dist/index-CkP5ZmRC.cjs +87 -0
- package/dist/index-CkP5ZmRC.cjs.map +1 -0
- package/dist/index-DYZlJwgm.js +24750 -0
- package/dist/index-DYZlJwgm.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -505
- package/dist/index.js +114 -360
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/PdfPreview-CnHLGN5f.cjs +0 -2
- package/dist/index-BwV1Jx-_.js +0 -28003
- package/dist/index-BwV1Jx-_.js.map +0 -1
- package/dist/index-Bwp4cywr.cjs +0 -108
- package/dist/index-Bwp4cywr.cjs.map +0 -1
- package/dist/pdf.worker.mjs +0 -58008
- package/dist/storybook/preview-files/pdf_with_js.pdf +0 -0
- package/dist/storybook/preview-files/pdf_with_js_link.pdf +0 -0
- package/dist/storybook/preview-files/pdf_with_links.pdf +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as I, useCallback as u, useRef as b, useEffect as S, useMemo as
|
|
3
|
-
import { useQuery as
|
|
4
|
-
import { Thumbnail as
|
|
5
|
-
import "
|
|
6
|
-
import "react-pdf/dist/Page/TextLayer.css";
|
|
7
|
-
import "react-virtualized/styles.css";
|
|
1
|
+
import { j as n, I as oe } from "./ZoomPlus-pBCoSTnV.js";
|
|
2
|
+
import { useState as I, useCallback as u, useRef as b, useEffect as S, useMemo as W, useImperativeHandle as ie } from "react";
|
|
3
|
+
import { useQuery as ce } from "@tanstack/react-query";
|
|
4
|
+
import { Thumbnail as ae, Page as le, pdfjs as de, Document as ue } from "react-pdf";
|
|
5
|
+
import { O as pe, T as fe, a as E, b as A, c as $, L as he, Z as we, u as Y, D as me, I as ge, d as ve } from "./index-DYZlJwgm.js";
|
|
8
6
|
import { AutoSizer as J, List as X } from "react-virtualized";
|
|
9
7
|
import { Button as _e, Input as xe, useModals as Pe } from "@gouvfr-lasuite/cunningham-react";
|
|
10
8
|
typeof URL.parse > "u" && (URL.parse = function(t, e) {
|
|
@@ -17,8 +15,8 @@ typeof URL.parse > "u" && (URL.parse = function(t, e) {
|
|
|
17
15
|
const z = Promise;
|
|
18
16
|
typeof z.withResolvers > "u" && (z.withResolvers = function() {
|
|
19
17
|
let t, e;
|
|
20
|
-
return { promise: new Promise((a,
|
|
21
|
-
t = a, e =
|
|
18
|
+
return { promise: new Promise((a, s) => {
|
|
19
|
+
t = a, e = s;
|
|
22
20
|
}), resolve: t, reject: e };
|
|
23
21
|
});
|
|
24
22
|
const Re = ({
|
|
@@ -26,21 +24,21 @@ const Re = ({
|
|
|
26
24
|
currentPage: e,
|
|
27
25
|
scrollToPage: r
|
|
28
26
|
}) => {
|
|
29
|
-
const [a,
|
|
27
|
+
const [a, s] = I("1"), i = u(
|
|
30
28
|
(h) => {
|
|
31
29
|
const x = Math.max(1, Math.min(t, h));
|
|
32
|
-
|
|
30
|
+
s(String(x)), r(x);
|
|
33
31
|
},
|
|
34
32
|
[t, r]
|
|
35
33
|
), p = u(
|
|
36
|
-
({ numPages: h }) => (
|
|
34
|
+
({ numPages: h }) => (s("1"), h),
|
|
37
35
|
[]
|
|
38
36
|
), R = (h) => {
|
|
39
|
-
|
|
37
|
+
s(h.target.value);
|
|
40
38
|
}, m = () => {
|
|
41
39
|
const h = parseInt(a, 10);
|
|
42
40
|
if (isNaN(h)) {
|
|
43
|
-
|
|
41
|
+
s(String(e));
|
|
44
42
|
return;
|
|
45
43
|
}
|
|
46
44
|
i(h);
|
|
@@ -57,7 +55,7 @@ const Re = ({
|
|
|
57
55
|
goToPage: i,
|
|
58
56
|
onDocumentLoadSuccess: p,
|
|
59
57
|
pageInputValue: a,
|
|
60
|
-
setPageInputValue:
|
|
58
|
+
setPageInputValue: s,
|
|
61
59
|
handlePageInputChange: R,
|
|
62
60
|
handlePageInputSubmit: m,
|
|
63
61
|
handlePageInputKeyDown: f,
|
|
@@ -65,8 +63,8 @@ const Re = ({
|
|
|
65
63
|
};
|
|
66
64
|
}, O = 1.414;
|
|
67
65
|
function je() {
|
|
68
|
-
const t = b(null), e = b(/* @__PURE__ */ new Map()), r = b(/* @__PURE__ */ new Map()), [a,
|
|
69
|
-
t.current = f, e.current = /* @__PURE__ */ new Map(), r.current = /* @__PURE__ */ new Map(),
|
|
66
|
+
const t = b(null), e = b(/* @__PURE__ */ new Map()), r = b(/* @__PURE__ */ new Map()), [a, s] = I(() => /* @__PURE__ */ new Map()), i = u((f) => {
|
|
67
|
+
t.current = f, e.current = /* @__PURE__ */ new Map(), r.current = /* @__PURE__ */ new Map(), s(/* @__PURE__ */ new Map());
|
|
70
68
|
}, []), p = u((f) => {
|
|
71
69
|
const g = t.current;
|
|
72
70
|
if (!g || r.current.has(f))
|
|
@@ -75,8 +73,8 @@ function je() {
|
|
|
75
73
|
if (N)
|
|
76
74
|
return N;
|
|
77
75
|
const h = g.getPage(f).then((x) => {
|
|
78
|
-
const l = x.getViewport({ scale: 1 }),
|
|
79
|
-
|
|
76
|
+
const l = x.getViewport({ scale: 1 }), o = new Map(r.current);
|
|
77
|
+
o.set(f, { w: l.width, h: l.height }), r.current = o, s(o);
|
|
80
78
|
}).catch((x) => {
|
|
81
79
|
console.warn(`Failed to fetch dimensions for PDF page ${f}`, x);
|
|
82
80
|
}).finally(() => {
|
|
@@ -100,10 +98,10 @@ function je() {
|
|
|
100
98
|
};
|
|
101
99
|
}
|
|
102
100
|
function Ie(t) {
|
|
103
|
-
const [e, r] = I(!0), [a,
|
|
101
|
+
const [e, r] = I(!0), [a, s] = I(t.isOpen);
|
|
104
102
|
return S(() => {
|
|
105
103
|
let i;
|
|
106
|
-
return t.isOpen ? (r(!1), i = setTimeout(() =>
|
|
104
|
+
return t.isOpen ? (r(!1), i = setTimeout(() => s(!0), pe)) : (s(!1), i = setTimeout(() => r(!0), fe * 1.1)), () => clearTimeout(i);
|
|
107
105
|
}, [t.isOpen]), e ? null : /* @__PURE__ */ n.jsx(be, { ...t, isOpen: a });
|
|
108
106
|
}
|
|
109
107
|
function be({
|
|
@@ -111,7 +109,7 @@ function be({
|
|
|
111
109
|
currentPage: e,
|
|
112
110
|
goToPage: r,
|
|
113
111
|
isOpen: a,
|
|
114
|
-
pageDimensions:
|
|
112
|
+
pageDimensions: s,
|
|
115
113
|
requestPageDimension: i
|
|
116
114
|
}) {
|
|
117
115
|
const p = b(null), R = b(!1), [m, f] = I(e - 1);
|
|
@@ -126,13 +124,13 @@ function be({
|
|
|
126
124
|
}, [e]);
|
|
127
125
|
const g = u(
|
|
128
126
|
(l) => {
|
|
129
|
-
const
|
|
130
|
-
return
|
|
127
|
+
const o = s.get(l + 1);
|
|
128
|
+
return o ? o.h / o.w : O;
|
|
131
129
|
},
|
|
132
|
-
[
|
|
130
|
+
[s]
|
|
133
131
|
), N = u(
|
|
134
132
|
({ index: l }) => {
|
|
135
|
-
const _ = E * g(l) +
|
|
133
|
+
const _ = E * g(l) + $ + A;
|
|
136
134
|
return l === t - 1 ? _ + A : _;
|
|
137
135
|
},
|
|
138
136
|
[g, t]
|
|
@@ -140,18 +138,18 @@ function be({
|
|
|
140
138
|
S(() => {
|
|
141
139
|
var l;
|
|
142
140
|
(l = p.current) == null || l.recomputeRowHeights();
|
|
143
|
-
}, [
|
|
141
|
+
}, [s, t]);
|
|
144
142
|
const h = u(
|
|
145
143
|
({
|
|
146
144
|
overscanStartIndex: l,
|
|
147
|
-
overscanStopIndex:
|
|
145
|
+
overscanStopIndex: o
|
|
148
146
|
}) => {
|
|
149
|
-
for (let _ = l; _ <=
|
|
147
|
+
for (let _ = l; _ <= o; _++)
|
|
150
148
|
i(_ + 1);
|
|
151
149
|
m !== void 0 && f(void 0);
|
|
152
150
|
},
|
|
153
151
|
[i, m]
|
|
154
|
-
), x = ({ index: l, key:
|
|
152
|
+
), x = ({ index: l, key: o, style: _ }) => {
|
|
155
153
|
const P = l + 1, k = g(l), y = /* @__PURE__ */ n.jsx(
|
|
156
154
|
"div",
|
|
157
155
|
{
|
|
@@ -179,7 +177,7 @@ function be({
|
|
|
179
177
|
"aria-label": `Go to page ${P}`,
|
|
180
178
|
children: [
|
|
181
179
|
/* @__PURE__ */ n.jsx(
|
|
182
|
-
|
|
180
|
+
ae,
|
|
183
181
|
{
|
|
184
182
|
pageNumber: P,
|
|
185
183
|
width: E,
|
|
@@ -191,22 +189,22 @@ function be({
|
|
|
191
189
|
}
|
|
192
190
|
)
|
|
193
191
|
},
|
|
194
|
-
|
|
192
|
+
o
|
|
195
193
|
);
|
|
196
194
|
};
|
|
197
195
|
return /* @__PURE__ */ n.jsx(
|
|
198
196
|
"div",
|
|
199
197
|
{
|
|
200
198
|
className: `pdf-preview__sidebar${a ? "" : " pdf-preview__sidebar--closed"}`,
|
|
201
|
-
children: /* @__PURE__ */ n.jsx(J, { children: ({ height: l, width:
|
|
199
|
+
children: /* @__PURE__ */ n.jsx(J, { children: ({ height: l, width: o }) => /* @__PURE__ */ n.jsx(
|
|
202
200
|
X,
|
|
203
201
|
{
|
|
204
202
|
ref: p,
|
|
205
203
|
height: l,
|
|
206
|
-
width:
|
|
204
|
+
width: o,
|
|
207
205
|
rowCount: t,
|
|
208
206
|
rowHeight: N,
|
|
209
|
-
estimatedRowSize: E * O +
|
|
207
|
+
estimatedRowSize: E * O + $ + A,
|
|
210
208
|
overscanRowCount: 5,
|
|
211
209
|
rowRenderer: x,
|
|
212
210
|
scrollToIndex: m,
|
|
@@ -223,7 +221,7 @@ function Ne({
|
|
|
223
221
|
pageInputValue: e,
|
|
224
222
|
onToggleSidebar: r,
|
|
225
223
|
onPageInputChange: a,
|
|
226
|
-
onPageInputSubmit:
|
|
224
|
+
onPageInputSubmit: s,
|
|
227
225
|
onPageInputKeyDown: i,
|
|
228
226
|
onZoomIn: p,
|
|
229
227
|
onZoomReset: R,
|
|
@@ -238,7 +236,7 @@ function Ne({
|
|
|
238
236
|
onClick: r,
|
|
239
237
|
"aria-label": "Toggle sidebar",
|
|
240
238
|
size: "small",
|
|
241
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
239
|
+
icon: /* @__PURE__ */ n.jsx(he, {})
|
|
242
240
|
}
|
|
243
241
|
),
|
|
244
242
|
/* @__PURE__ */ n.jsx("div", { className: "file-preview__controls__separator" }),
|
|
@@ -249,7 +247,7 @@ function Ne({
|
|
|
249
247
|
variant: "classic",
|
|
250
248
|
value: e,
|
|
251
249
|
onChange: a,
|
|
252
|
-
onBlur:
|
|
250
|
+
onBlur: s,
|
|
253
251
|
onKeyDown: i,
|
|
254
252
|
"aria-label": "Current page",
|
|
255
253
|
size: e.length || 1
|
|
@@ -262,7 +260,7 @@ function Ne({
|
|
|
262
260
|
] }) }),
|
|
263
261
|
/* @__PURE__ */ n.jsx("div", { className: "file-preview__controls__separator" }),
|
|
264
262
|
/* @__PURE__ */ n.jsx(
|
|
265
|
-
|
|
263
|
+
we,
|
|
266
264
|
{
|
|
267
265
|
zoomOut: m,
|
|
268
266
|
zoomIn: p,
|
|
@@ -273,9 +271,9 @@ function Ne({
|
|
|
273
271
|
}
|
|
274
272
|
function Te(t, e = 300) {
|
|
275
273
|
let r;
|
|
276
|
-
const a = (...
|
|
274
|
+
const a = (...s) => {
|
|
277
275
|
r !== void 0 && clearTimeout(r), r = setTimeout(() => {
|
|
278
|
-
t(...
|
|
276
|
+
t(...s);
|
|
279
277
|
}, e);
|
|
280
278
|
};
|
|
281
279
|
return a.cancel = () => {
|
|
@@ -301,23 +299,23 @@ function ye({
|
|
|
301
299
|
zoom: e,
|
|
302
300
|
onCurrentPageChange: r,
|
|
303
301
|
onClick: a,
|
|
304
|
-
pageDimensions:
|
|
302
|
+
pageDimensions: s,
|
|
305
303
|
requestPageDimension: i,
|
|
306
304
|
ensurePageDimensions: p,
|
|
307
305
|
ref: R
|
|
308
306
|
}) {
|
|
309
|
-
const m = b(null), f = b(e), [g, N] = I(0), h = b(0), x = b(0), l = Se(),
|
|
307
|
+
const m = b(null), f = b(e), [g, N] = I(0), h = b(0), x = b(0), l = Se(), o = W(() => q + Q > l.width ? l.width - Q : q, [l.width]), _ = u(
|
|
310
308
|
(c) => {
|
|
311
|
-
const d =
|
|
309
|
+
const d = s.get(c + 1);
|
|
312
310
|
return d ? d.h / d.w : O;
|
|
313
311
|
},
|
|
314
|
-
[
|
|
312
|
+
[s]
|
|
315
313
|
), P = u(
|
|
316
314
|
(c) => {
|
|
317
|
-
const d =
|
|
315
|
+
const d = o * _(c) * e, w = M * e;
|
|
318
316
|
return c === t - 1 ? d + 2 * w : d + w;
|
|
319
317
|
},
|
|
320
|
-
[
|
|
318
|
+
[o, _, e, t]
|
|
321
319
|
), k = u(
|
|
322
320
|
({ index: c }) => P(c),
|
|
323
321
|
[P]
|
|
@@ -328,8 +326,8 @@ function ye({
|
|
|
328
326
|
const d = e / f.current, w = Math.round(g * d);
|
|
329
327
|
m.current.scrollToPosition(w), f.current = e;
|
|
330
328
|
}
|
|
331
|
-
}, [e,
|
|
332
|
-
const y =
|
|
329
|
+
}, [e, o, s, t]);
|
|
330
|
+
const y = W(() => {
|
|
333
331
|
if (t === 0) return 1;
|
|
334
332
|
const c = g + h.current / 2;
|
|
335
333
|
let d = 0;
|
|
@@ -354,14 +352,14 @@ function ye({
|
|
|
354
352
|
let C = 0;
|
|
355
353
|
for (let L = 0; L < c - 1; L++) {
|
|
356
354
|
const D = j.get(L + 1), K = D ? D.h / D.w : O;
|
|
357
|
-
C +=
|
|
355
|
+
C += o * K * e + M * e;
|
|
358
356
|
}
|
|
359
357
|
m.current.scrollToPosition(C);
|
|
360
358
|
});
|
|
361
359
|
},
|
|
362
|
-
[p,
|
|
360
|
+
[p, o, e]
|
|
363
361
|
);
|
|
364
|
-
|
|
362
|
+
ie(R, () => ({ scrollToPage: F }), [F]);
|
|
365
363
|
const U = u(
|
|
366
364
|
({
|
|
367
365
|
scrollTop: c,
|
|
@@ -384,7 +382,7 @@ function ye({
|
|
|
384
382
|
"div",
|
|
385
383
|
{
|
|
386
384
|
className: "pdf-preview__page-skeleton pdf-preview__page-skeleton--measured",
|
|
387
|
-
style: { height:
|
|
385
|
+
style: { height: o * j * e, width: o * e }
|
|
388
386
|
}
|
|
389
387
|
);
|
|
390
388
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -398,10 +396,10 @@ function ye({
|
|
|
398
396
|
paddingBottom: c === t - 1 ? M * e : 0
|
|
399
397
|
},
|
|
400
398
|
children: /* @__PURE__ */ n.jsx(
|
|
401
|
-
|
|
399
|
+
le,
|
|
402
400
|
{
|
|
403
401
|
pageNumber: c + 1,
|
|
404
|
-
width:
|
|
402
|
+
width: o,
|
|
405
403
|
scale: e,
|
|
406
404
|
loading: C
|
|
407
405
|
}
|
|
@@ -411,7 +409,7 @@ function ye({
|
|
|
411
409
|
);
|
|
412
410
|
};
|
|
413
411
|
return /* @__PURE__ */ n.jsx("div", { className: "pdf-preview__container", onClick: a, children: /* @__PURE__ */ n.jsx(J, { children: ({ height: c, width: d }) => {
|
|
414
|
-
const w = Math.max(d,
|
|
412
|
+
const w = Math.max(d, o * e);
|
|
415
413
|
return /* @__PURE__ */ n.jsx(
|
|
416
414
|
"div",
|
|
417
415
|
{
|
|
@@ -428,7 +426,7 @@ function ye({
|
|
|
428
426
|
width: w,
|
|
429
427
|
rowCount: t,
|
|
430
428
|
rowHeight: k,
|
|
431
|
-
estimatedRowSize:
|
|
429
|
+
estimatedRowSize: o * O * e + M * e,
|
|
432
430
|
overscanRowCount: 3,
|
|
433
431
|
onScroll: U,
|
|
434
432
|
onRowsRendered: B,
|
|
@@ -475,18 +473,18 @@ const Ce = ["https:", "http:"], ke = () => {
|
|
|
475
473
|
wasmUrl: "/wasm/",
|
|
476
474
|
isEvalSupported: !1
|
|
477
475
|
};
|
|
478
|
-
function
|
|
476
|
+
function Ue({
|
|
479
477
|
src: t,
|
|
480
478
|
onThumbailSidebarOpen: e,
|
|
481
|
-
pdfWorkerSrc: r =
|
|
479
|
+
pdfWorkerSrc: r = me
|
|
482
480
|
}) {
|
|
483
|
-
|
|
484
|
-
const { t: a } = Y(), [
|
|
485
|
-
|
|
481
|
+
de.GlobalWorkerOptions.workerSrc = r;
|
|
482
|
+
const { t: a } = Y(), [s, i] = I(1), [p, R] = I(null), [m, f] = I(1), [g, N] = I(!1), h = b(null), { handlePdfClick: x } = ke(), [l, o] = I(1), { pageDimensions: _, requestPageDimension: P, ensurePageDimensions: k, setPdf: y } = je(), F = u(() => {
|
|
483
|
+
o((v) => Math.min(3, v + 0.25));
|
|
486
484
|
}, []), U = u(() => {
|
|
487
|
-
|
|
485
|
+
o((v) => Math.max(0.5, v - 0.25));
|
|
488
486
|
}, []), B = u(() => {
|
|
489
|
-
|
|
487
|
+
o(1);
|
|
490
488
|
}, []), G = u(() => {
|
|
491
489
|
N((v) => (e == null || e(!v), !v));
|
|
492
490
|
}, []), c = u((v) => {
|
|
@@ -501,11 +499,11 @@ function Ge({
|
|
|
501
499
|
handlePageInputSubmit: D,
|
|
502
500
|
handlePageInputKeyDown: K,
|
|
503
501
|
onItemClick: ee
|
|
504
|
-
} = Re({ numPages:
|
|
502
|
+
} = Re({ numPages: s, currentPage: m, scrollToPage: c });
|
|
505
503
|
S(() => {
|
|
506
504
|
C(String(m));
|
|
507
505
|
}, [m, C]);
|
|
508
|
-
const { data: Z, error: H } =
|
|
506
|
+
const { data: Z, error: H } = ce({
|
|
509
507
|
queryKey: ["pdf", t],
|
|
510
508
|
queryFn: async ({ signal: v }) => {
|
|
511
509
|
const T = await fetch(t, {
|
|
@@ -514,8 +512,8 @@ function Ge({
|
|
|
514
512
|
});
|
|
515
513
|
if (!T.ok)
|
|
516
514
|
throw new Error(`Failed to fetch PDF: ${T.status}`);
|
|
517
|
-
const re = await T.blob(),
|
|
518
|
-
return new File([re],
|
|
515
|
+
const re = await T.blob(), se = t.split("/").pop() || "document.pdf";
|
|
516
|
+
return new File([re], se, { type: "application/pdf" });
|
|
519
517
|
},
|
|
520
518
|
staleTime: 1 / 0
|
|
521
519
|
}), te = u(
|
|
@@ -535,16 +533,16 @@ function Ge({
|
|
|
535
533
|
}, []);
|
|
536
534
|
if (console.log(H), H != null && H.message || p === "generic")
|
|
537
535
|
return /* @__PURE__ */ n.jsxs("div", { className: "file-preview-unsupported", "data-preview-backdrop": "true", children: [
|
|
538
|
-
/* @__PURE__ */ n.jsx("div", { className: "file-preview-unsupported__icon", children: /* @__PURE__ */ n.jsx(
|
|
536
|
+
/* @__PURE__ */ n.jsx("div", { className: "file-preview-unsupported__icon", children: /* @__PURE__ */ n.jsx(ge, { name: "error", type: oe.OUTLINED, size: 48 }) }),
|
|
539
537
|
/* @__PURE__ */ n.jsx("p", { className: "file-preview-unsupported__title", children: a("components.filePreview.error.title") }),
|
|
540
538
|
/* @__PURE__ */ n.jsx("p", { className: "file-preview-unsupported__description", children: a("components.filePreview.error.description") })
|
|
541
539
|
] });
|
|
542
540
|
if (p === "outdated")
|
|
543
|
-
return /* @__PURE__ */ n.jsx(
|
|
541
|
+
return /* @__PURE__ */ n.jsx(ve, {});
|
|
544
542
|
const V = /* @__PURE__ */ n.jsx("div", { className: "pdf-preview__container-skeleton", children: /* @__PURE__ */ n.jsx("div", { className: "pdf-preview__page-skeleton" }) });
|
|
545
543
|
return /* @__PURE__ */ n.jsxs("div", { className: "pdf-preview", children: [
|
|
546
544
|
/* @__PURE__ */ n.jsx("div", { className: "pdf-preview__body", "data-preview-backdrop": "true", children: Z ? /* @__PURE__ */ n.jsxs(
|
|
547
|
-
|
|
545
|
+
ue,
|
|
548
546
|
{
|
|
549
547
|
file: Z,
|
|
550
548
|
onLoadSuccess: te,
|
|
@@ -556,7 +554,7 @@ function Ge({
|
|
|
556
554
|
/* @__PURE__ */ n.jsx(
|
|
557
555
|
Ie,
|
|
558
556
|
{
|
|
559
|
-
numPages:
|
|
557
|
+
numPages: s,
|
|
560
558
|
currentPage: m,
|
|
561
559
|
goToPage: d,
|
|
562
560
|
isOpen: g,
|
|
@@ -568,7 +566,7 @@ function Ge({
|
|
|
568
566
|
ye,
|
|
569
567
|
{
|
|
570
568
|
ref: h,
|
|
571
|
-
numPages:
|
|
569
|
+
numPages: s,
|
|
572
570
|
zoom: l,
|
|
573
571
|
onCurrentPageChange: f,
|
|
574
572
|
onClick: x,
|
|
@@ -583,7 +581,7 @@ function Ge({
|
|
|
583
581
|
/* @__PURE__ */ n.jsx(
|
|
584
582
|
Ne,
|
|
585
583
|
{
|
|
586
|
-
numPages:
|
|
584
|
+
numPages: s,
|
|
587
585
|
pageInputValue: j,
|
|
588
586
|
onToggleSidebar: G,
|
|
589
587
|
onPageInputChange: L,
|
|
@@ -597,7 +595,7 @@ function Ge({
|
|
|
597
595
|
] });
|
|
598
596
|
}
|
|
599
597
|
export {
|
|
600
|
-
|
|
601
|
-
|
|
598
|
+
Ue as PdfPreview,
|
|
599
|
+
Ue as default
|
|
602
600
|
};
|
|
603
|
-
//# sourceMappingURL=PdfPreview-
|
|
601
|
+
//# sourceMappingURL=PdfPreview-tZ18gLC7.js.map
|