@factorialco/f0-react 10.11.2 → 10.12.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/{ChatPostComposerDialog-BEiVsYPd.js → ChatPostComposerDialog-Dxf_Nbbb.js} +2 -2
- package/dist/{CoachmarkProvider-C2cTMKgA.js → CoachmarkProvider-ByfCE0-j.js} +3469 -3414
- package/dist/{DocumentToolbar-DN4zdfiO.js → DocumentToolbar-UFkOiw8e.js} +2 -2
- package/dist/{DocxViewer-DsvcWnn4.js → DocxViewer-BjmzL4sn.js} +1 -1
- package/dist/{F0AiProcessingOverlay-yQIsYRms.js → F0AiProcessingOverlay-B2kWuLdK.js} +1 -1
- package/dist/{F0CanvasPanel-CLp2sCjm.js → F0CanvasPanel-9PijExob.js} +28 -24
- package/dist/F0DocumentViewer-DDaXV0U3.js +3 -0
- package/dist/{F0DocumentViewer-Bd3izb6I.js → F0DocumentViewer-hMDS3Kpg.js} +170 -161
- package/dist/{F0Map-PvG39178.js → F0Map-CznQg3YF.js} +3 -3
- package/dist/{F0VideoPlayer-CQagh8Eo.js → F0VideoPlayer-BByW1cIV.js} +1 -1
- package/dist/F0VideoPlayer-DerqL5g5.js +1 -0
- package/dist/{Map-DY7bI6Hi.js → Map-DZ1yBUGL.js} +3 -3
- package/dist/{PdfThumbnail-BpiRg0m6.js → PdfThumbnail-Dkwm6GDn.js} +1 -1
- package/dist/{SheetViewer-BSwX6EZX.js → SheetViewer-DT6WypD8.js} +3 -3
- package/dist/{TextViewer-K_7wKV8e.js → TextViewer-D8MLMNev.js} +1 -1
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +4 -4
- package/dist/{exports-cU26nMV5.d.ts → exports-0B2luDkl.d.ts} +1 -1
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +6 -6
- package/dist/{index-BDEEuyti.d.ts → index-Bdpf44A3.d.ts} +1 -1
- package/dist/{index-BftFpZQm.d.ts → index-s5SdT3uE.d.ts} +3 -1
- package/dist/{maplibre-DllgtJ_b.js → maplibre-GffVTD0r.js} +1 -1
- package/dist/{pdfWorker-Tv3MY3tw.js → pdfWorker-C3UVNtZV.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/F0DocumentViewer-DcJ7xzOj.js +0 -3
- package/dist/F0VideoPlayer-iAcACeDO.js +0 -1
|
@@ -1,105 +1,105 @@
|
|
|
1
1
|
import { ar as e, b as t, ln as n, rn as r, rr as i, zt as a } from "./popover-B7fqB9lu.js";
|
|
2
2
|
import { I as o } from "./tooltip-TOvfXq9F.js";
|
|
3
|
-
import { Ds as s, Oa as c, So as l, ho as u } from "./F0CanvasPanel-
|
|
3
|
+
import { Ds as s, Oa as c, So as l, ho as u } from "./F0CanvasPanel-9PijExob.js";
|
|
4
4
|
import { W as d, q as f } from "./useData-CAl9SKtE.js";
|
|
5
5
|
import { Er as p, dr as m, t as h } from "./F0Select-By_QpX1S.js";
|
|
6
|
-
import { i as
|
|
7
|
-
import { Suspense as
|
|
8
|
-
import { jsx as
|
|
6
|
+
import { i as ee, n as g, r as _ } from "./pdfWorker-C3UVNtZV.js";
|
|
7
|
+
import { Suspense as v, forwardRef as y, lazy as b, useCallback as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
8
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
9
9
|
import './F0DocumentViewer.css';//#region src/addons/documents/F0DocumentViewer/components/PdfLoadingState.tsx
|
|
10
|
-
var
|
|
10
|
+
var O = ({ label: e, width: t, height: r }) => /* @__PURE__ */ E("div", {
|
|
11
11
|
role: "status",
|
|
12
12
|
"aria-label": e,
|
|
13
13
|
"aria-live": "polite",
|
|
14
14
|
"aria-busy": !0,
|
|
15
15
|
className: "F0DocumentViewer__page mx-auto w-fit px-4 pt-4 last:pb-4",
|
|
16
|
-
children: /* @__PURE__ */
|
|
16
|
+
children: /* @__PURE__ */ E(n, {
|
|
17
17
|
style: {
|
|
18
18
|
width: t,
|
|
19
19
|
height: r
|
|
20
20
|
},
|
|
21
21
|
className: "rounded-lg border border-solid border-f1-border-secondary shadow-md"
|
|
22
22
|
})
|
|
23
|
-
}),
|
|
23
|
+
}), k = ({ label: e, icon: n, onClick: r, size: i = "md" }) => /* @__PURE__ */ E(t, {
|
|
24
24
|
label: e,
|
|
25
25
|
icon: n,
|
|
26
26
|
onClick: r,
|
|
27
27
|
hideLabel: !0,
|
|
28
28
|
variant: "outline",
|
|
29
29
|
size: i
|
|
30
|
-
}),
|
|
31
|
-
let { pdfViewer:
|
|
32
|
-
return /* @__PURE__ */
|
|
30
|
+
}), A = (e) => o("z-10 flex flex-row items-center gap-2", e === "top" ? "F0DocumentViewer__surface sticky top-0 justify-between px-6 py-4" : "absolute bottom-4 left-1/2 w-max max-w-[calc(100%-2rem)] -translate-x-1/2 gap-4 rounded-xl bg-f1-background-inverse p-2 text-f1-foreground-inverse shadow-lg backdrop-blur-sm"), j = (e, t) => o("flex flex-row items-center gap-2", e === "floating" && "dark", t), M = ({ toolbarRef: e, currentPage: t, totalPages: n, hasDocument: i, selectedScale: a, scaleOptions: c, onPreviousPage: ee, onNextPage: g, onZoomIn: _, onZoomOut: v, onScaleChange: y, rotatable: b, onRotate: x, onPrint: S, onDownload: C, actions: w, placement: T }) => {
|
|
31
|
+
let { pdfViewer: O } = r(), M = j(T);
|
|
32
|
+
return /* @__PURE__ */ D("div", {
|
|
33
33
|
ref: e,
|
|
34
34
|
role: "toolbar",
|
|
35
|
-
"aria-label":
|
|
36
|
-
"data-placement":
|
|
37
|
-
className:
|
|
35
|
+
"aria-label": O.toolbar,
|
|
36
|
+
"data-placement": T,
|
|
37
|
+
className: A(T),
|
|
38
38
|
children: [
|
|
39
|
-
i ? /* @__PURE__ */
|
|
39
|
+
i ? /* @__PURE__ */ D("span", {
|
|
40
40
|
"aria-live": "polite",
|
|
41
|
-
className: o("whitespace-nowrap text-sm font-medium",
|
|
41
|
+
className: o("whitespace-nowrap text-sm font-medium", T === "top" ? "text-f1-foreground-secondary" : "pl-2 text-f1-foreground-inverse"),
|
|
42
42
|
children: [
|
|
43
43
|
t,
|
|
44
44
|
" / ",
|
|
45
45
|
n
|
|
46
46
|
]
|
|
47
47
|
}) : null,
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
className:
|
|
50
|
-
children: [/* @__PURE__ */
|
|
51
|
-
label:
|
|
52
|
-
onClick:
|
|
48
|
+
/* @__PURE__ */ D("div", {
|
|
49
|
+
className: M,
|
|
50
|
+
children: [/* @__PURE__ */ E(k, {
|
|
51
|
+
label: O.previousPage,
|
|
52
|
+
onClick: ee,
|
|
53
53
|
icon: p,
|
|
54
54
|
size: "sm"
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
-
label:
|
|
57
|
-
onClick:
|
|
55
|
+
}), /* @__PURE__ */ E(k, {
|
|
56
|
+
label: O.nextPage,
|
|
57
|
+
onClick: g,
|
|
58
58
|
icon: f,
|
|
59
59
|
size: "sm"
|
|
60
60
|
})]
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
className:
|
|
62
|
+
/* @__PURE__ */ D("div", {
|
|
63
|
+
className: M,
|
|
64
64
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
label:
|
|
67
|
-
onClick:
|
|
65
|
+
/* @__PURE__ */ E(k, {
|
|
66
|
+
label: O.zoomOut,
|
|
67
|
+
onClick: v,
|
|
68
68
|
icon: d
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
label:
|
|
72
|
-
onClick:
|
|
70
|
+
/* @__PURE__ */ E(k, {
|
|
71
|
+
label: O.zoomIn,
|
|
72
|
+
onClick: _,
|
|
73
73
|
icon: m
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ E(h, {
|
|
76
76
|
hideLabel: !0,
|
|
77
|
-
label:
|
|
77
|
+
label: O.scaleSelector,
|
|
78
78
|
options: c,
|
|
79
79
|
value: a,
|
|
80
|
-
onChange: (e) =>
|
|
80
|
+
onChange: (e) => y(e)
|
|
81
81
|
})
|
|
82
82
|
]
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
className:
|
|
84
|
+
/* @__PURE__ */ D("div", {
|
|
85
|
+
className: M,
|
|
86
86
|
children: [
|
|
87
|
-
|
|
88
|
-
label:
|
|
89
|
-
onClick:
|
|
87
|
+
b ? /* @__PURE__ */ E(k, {
|
|
88
|
+
label: O.rotate,
|
|
89
|
+
onClick: x,
|
|
90
90
|
icon: u
|
|
91
91
|
}) : null,
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
label:
|
|
94
|
-
onClick:
|
|
92
|
+
/* @__PURE__ */ E(k, {
|
|
93
|
+
label: O.print,
|
|
94
|
+
onClick: S,
|
|
95
95
|
icon: l
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
label:
|
|
99
|
-
onClick:
|
|
97
|
+
/* @__PURE__ */ E(k, {
|
|
98
|
+
label: O.download,
|
|
99
|
+
onClick: C,
|
|
100
100
|
icon: s
|
|
101
101
|
}),
|
|
102
|
-
|
|
102
|
+
w?.map((e, t) => /* @__PURE__ */ E(k, {
|
|
103
103
|
label: e.label,
|
|
104
104
|
onClick: e.onClick,
|
|
105
105
|
icon: e.icon
|
|
@@ -108,32 +108,32 @@ var k = ({ label: e, width: t, height: r }) => /* @__PURE__ */ D("div", {
|
|
|
108
108
|
})
|
|
109
109
|
]
|
|
110
110
|
});
|
|
111
|
-
},
|
|
111
|
+
}, te = (e, t) => t ? (N(e, t) + .001) / t : e, N = (e, t) => Math.round(t * e), ne = (e, t, n) => N(e, n) === N(t, n), re = (e, t = window.devicePixelRatio || 1) => {
|
|
112
112
|
e && e.width !== 0 && e.height !== 0 && (e.style.width = `${e.width / t}px`, e.style.height = `${e.height / t}px`);
|
|
113
113
|
}, P = () => {
|
|
114
114
|
let { pdfViewer: e } = r();
|
|
115
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ D("div", {
|
|
116
116
|
role: "status",
|
|
117
117
|
"aria-busy": "true",
|
|
118
118
|
"aria-live": "polite",
|
|
119
119
|
"aria-label": e.loading,
|
|
120
120
|
className: o("F0DocumentViewer__surface flex h-full w-full flex-col overflow-hidden", "border border-solid border-f1-border-secondary"),
|
|
121
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ D("div", {
|
|
122
122
|
className: "flex flex-row items-center justify-between gap-2 px-6 py-4",
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ E(n, { className: "h-8 w-24 rounded-md" }),
|
|
125
|
+
/* @__PURE__ */ E(n, { className: "h-8 w-40 rounded-md" }),
|
|
126
|
+
/* @__PURE__ */ E(n, { className: "h-8 w-20 rounded-md" })
|
|
127
127
|
]
|
|
128
|
-
}), /* @__PURE__ */
|
|
128
|
+
}), /* @__PURE__ */ E("div", {
|
|
129
129
|
className: "flex flex-1 justify-center p-4",
|
|
130
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ E(n, { className: "h-full w-full max-w-[600px] rounded-md" })
|
|
131
131
|
})]
|
|
132
132
|
});
|
|
133
133
|
}, F = async (e) => {
|
|
134
134
|
let t = await e.saveDocument();
|
|
135
135
|
return new Blob([new Uint8Array(t)], { type: "application/pdf" });
|
|
136
|
-
},
|
|
136
|
+
}, ie = async (e) => {
|
|
137
137
|
if (!e) return;
|
|
138
138
|
let t = URL.createObjectURL(await F(e)), n = document.createElement("iframe");
|
|
139
139
|
n.style.display = "none", n.src = t, n.onload = () => {
|
|
@@ -143,7 +143,7 @@ var k = ({ label: e, width: t, height: r }) => /* @__PURE__ */ D("div", {
|
|
|
143
143
|
};
|
|
144
144
|
n.contentWindow?.addEventListener("afterprint", e), setTimeout(e, 6e4);
|
|
145
145
|
}, document.body.appendChild(n);
|
|
146
|
-
},
|
|
146
|
+
}, ae = async (e, t) => {
|
|
147
147
|
if (!e) return;
|
|
148
148
|
let n = URL.createObjectURL(await F(e)), r = document.createElement("a");
|
|
149
149
|
r.href = n, r.download = t.length > 0 ? t : "document.pdf", document.body.appendChild(r), r.click(), r.remove(), URL.revokeObjectURL(n);
|
|
@@ -165,7 +165,10 @@ var k = ({ label: e, width: t, height: r }) => /* @__PURE__ */ D("div", {
|
|
|
165
165
|
"2",
|
|
166
166
|
"3",
|
|
167
167
|
"4"
|
|
168
|
-
], R = L.map(Number),
|
|
168
|
+
], R = L.map(Number), oe = (e) => R.find((t) => t > e), se = (e) => [...R].reverse().find((t) => t < e), ce = (e, t, n) => {
|
|
169
|
+
let r = n.width / t.width;
|
|
170
|
+
return e === "page-width" ? r : Math.min(r, n.height / t.height);
|
|
171
|
+
}, le = (e, t, n) => {
|
|
169
172
|
let r = null, i = 0;
|
|
170
173
|
return t.forEach((t, a) => {
|
|
171
174
|
if (!t) return;
|
|
@@ -182,37 +185,37 @@ var k = ({ label: e, width: t, height: r }) => /* @__PURE__ */ D("div", {
|
|
|
182
185
|
};
|
|
183
186
|
//#endregion
|
|
184
187
|
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewer.tsx
|
|
185
|
-
|
|
186
|
-
var z =
|
|
188
|
+
g();
|
|
189
|
+
var z = b(() => import("./SheetViewer-DT6WypD8.js")), B = b(() => import("./DocxViewer-BjmzL4sn.js")), V = b(() => import("./TextViewer-D8MLMNev.js")), ue = 48, de = 150, H = y((e, t) => {
|
|
187
190
|
let { kind: r = "pdf", mimeType: i, toolbar: a = "top", ...o } = e;
|
|
188
|
-
if (r === "pdf") return /* @__PURE__ */
|
|
191
|
+
if (r === "pdf") return /* @__PURE__ */ E(U, {
|
|
189
192
|
ref: t,
|
|
190
193
|
toolbar: a,
|
|
191
194
|
...o
|
|
192
195
|
});
|
|
193
|
-
let { url: s, filename: c, actions: l, withCredentials: u = !0, page: d, pagesToDisplay: f, initialScale: p, rotatable: m, initialRotation: h, onRotationChange:
|
|
194
|
-
return /* @__PURE__ */
|
|
196
|
+
let { url: s, filename: c, actions: l, withCredentials: u = !0, page: d, pagesToDisplay: f, initialScale: p, rotatable: m, initialRotation: h, onRotationChange: ee, onPdfLoaded: g, onPageChange: _, ...y } = o;
|
|
197
|
+
return /* @__PURE__ */ E("div", {
|
|
195
198
|
ref: t,
|
|
196
|
-
...
|
|
199
|
+
...y,
|
|
197
200
|
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
-
fallback: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ D(v, {
|
|
202
|
+
fallback: /* @__PURE__ */ E(n, { className: "h-full w-full rounded-none" }),
|
|
200
203
|
children: [
|
|
201
|
-
r === "sheet" ? /* @__PURE__ */
|
|
204
|
+
r === "sheet" ? /* @__PURE__ */ E(z, {
|
|
202
205
|
url: s,
|
|
203
206
|
filename: c,
|
|
204
207
|
withCredentials: u,
|
|
205
208
|
actions: l,
|
|
206
209
|
toolbar: a
|
|
207
210
|
}) : null,
|
|
208
|
-
r === "docx" ? /* @__PURE__ */
|
|
211
|
+
r === "docx" ? /* @__PURE__ */ E(B, {
|
|
209
212
|
url: s,
|
|
210
213
|
filename: c,
|
|
211
214
|
withCredentials: u,
|
|
212
215
|
actions: l,
|
|
213
216
|
toolbar: a
|
|
214
217
|
}) : null,
|
|
215
|
-
r === "text" ? /* @__PURE__ */
|
|
218
|
+
r === "text" ? /* @__PURE__ */ E(V, {
|
|
216
219
|
url: s,
|
|
217
220
|
name: c ?? "",
|
|
218
221
|
mimeType: i,
|
|
@@ -225,88 +228,94 @@ var z = x(() => import("./SheetViewer-BSwX6EZX.js")), B = x(() => import("./Docx
|
|
|
225
228
|
});
|
|
226
229
|
});
|
|
227
230
|
H.displayName = "F0DocumentViewer";
|
|
228
|
-
var U =
|
|
229
|
-
let { url: i, filename: o = "document.pdf", page: s = 0, pagesToDisplay: c = [], initialScale: l = "page-width", withCredentials: u = !0, rotatable: d = !1, initialRotation: f = 0, onRotationChange: p, onPdfLoaded: m, onPageChange: h, actions:
|
|
231
|
+
var U = y((e, t) => {
|
|
232
|
+
let { url: i, filename: o = "document.pdf", page: s = 0, pagesToDisplay: c = [], initialScale: l = "page-width", withCredentials: u = !0, rotatable: d = !1, initialRotation: f = 0, onRotationChange: p, onPdfLoaded: m, onPageChange: h, actions: g, toolbar: v = "top", ...y } = e, { pdfViewer: b } = r(), k = Math.max(2, typeof window > "u" ? 1 : window.devicePixelRatio || 1), [A, j] = T(null), [N, P] = T([]), [F, I] = T(1), [R, z] = T(0), [B, V] = T(l), [H, U] = T(f), W = w(null), G = w(null), K = w([]), q = c.length > 0 ? c.length : A?.numPages, J = x(() => v === "top" ? G.current?.offsetHeight ?? 0 : 0, [v]), fe = N.find(Boolean), pe = (fe?.originalWidth ?? 595) * F, Y = (fe?.originalHeight ?? 842) * F, me = C(() => [
|
|
230
233
|
{
|
|
231
234
|
value: "page-width",
|
|
232
|
-
label:
|
|
235
|
+
label: b.pageWidth
|
|
233
236
|
},
|
|
234
237
|
{
|
|
235
238
|
value: "page-fit",
|
|
236
|
-
label:
|
|
239
|
+
label: b.pageFit
|
|
237
240
|
},
|
|
238
241
|
...L.map((e) => ({
|
|
239
242
|
value: e,
|
|
240
243
|
label: `${Number(e) * 100}%`
|
|
241
244
|
}))
|
|
242
|
-
], [
|
|
245
|
+
], [b.pageWidth, b.pageFit]), he = C(() => ({
|
|
243
246
|
url: i,
|
|
244
247
|
withCredentials: u
|
|
245
|
-
}), [i, u]), X =
|
|
246
|
-
let t = (
|
|
247
|
-
r && i instanceof HTMLElement && (i.scrollTop = r.offsetTop -
|
|
248
|
-
}, [
|
|
249
|
-
let t =
|
|
248
|
+
}), [i, u]), X = x((e) => {
|
|
249
|
+
let t = (q ?? 1) - 1, n = Math.min(Math.max(e, 0), t), r = K.current[n], i = r?.offsetParent;
|
|
250
|
+
r && i instanceof HTMLElement && (i.scrollTop = r.offsetTop - J() - 10);
|
|
251
|
+
}, [q, J]), Z = x((e) => {
|
|
252
|
+
let t = N[R - 1], n = W.current;
|
|
250
253
|
if (!t || !n) return;
|
|
251
|
-
let r =
|
|
252
|
-
|
|
254
|
+
let r = G.current?.offsetHeight ?? 0, i = H === 90 || H === 270, a = (e) => i ? e.originalHeight : e.originalWidth, o = a(t), s = i ? t.originalWidth : t.originalHeight, c = e === "page-fit" ? Math.max(...N.filter(Boolean).map(a)) : o, l = ce(e, {
|
|
255
|
+
width: c,
|
|
256
|
+
height: s
|
|
257
|
+
}, {
|
|
258
|
+
width: n.clientWidth - ue,
|
|
259
|
+
height: n.clientHeight - r - ue
|
|
260
|
+
});
|
|
261
|
+
I((e) => ne(e, l, c) ? e : l), V(e);
|
|
253
262
|
}, [
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
]),
|
|
258
|
-
e === "page-width" || e === "page-fit" ? Z(e) : (
|
|
259
|
-
}, [Z]), Q =
|
|
263
|
+
N,
|
|
264
|
+
R,
|
|
265
|
+
H
|
|
266
|
+
]), ge = x((e) => {
|
|
267
|
+
e === "page-width" || e === "page-fit" ? Z(e) : (I(Number(e)), V(e));
|
|
268
|
+
}, [Z]), Q = x((e) => {
|
|
260
269
|
if (e === void 0) return;
|
|
261
|
-
|
|
270
|
+
I(e);
|
|
262
271
|
let t = L.find((t) => Number(t) === e);
|
|
263
|
-
t &&
|
|
264
|
-
}, []),
|
|
265
|
-
|
|
272
|
+
t && V(t);
|
|
273
|
+
}, []), _e = x(() => Q(oe(F)), [F, Q]), ve = x(() => Q(se(F)), [F, Q]), ye = x(() => {
|
|
274
|
+
U((e) => {
|
|
266
275
|
let t = (e + 90) % 360;
|
|
267
276
|
return p?.(t), t;
|
|
268
277
|
});
|
|
269
|
-
}, [p]),
|
|
270
|
-
|
|
271
|
-
|
|
278
|
+
}, [p]), be = x((e) => {
|
|
279
|
+
j(e), m?.(e), setTimeout(() => {
|
|
280
|
+
z(s + 1), X(s);
|
|
272
281
|
}, 0);
|
|
273
282
|
}, [
|
|
274
283
|
m,
|
|
275
284
|
s,
|
|
276
285
|
X
|
|
277
|
-
]),
|
|
286
|
+
]), xe = x((e) => {
|
|
278
287
|
let t = e.target;
|
|
279
288
|
if (!(t instanceof HTMLElement)) return;
|
|
280
|
-
let n =
|
|
281
|
-
n &&
|
|
282
|
-
}, [
|
|
283
|
-
|
|
284
|
-
}, [
|
|
285
|
-
|
|
286
|
-
}, [
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}, [i]),
|
|
289
|
+
let n = le(t, K.current, J());
|
|
290
|
+
n && z(n);
|
|
291
|
+
}, [J]), Se = x(() => {
|
|
292
|
+
ie(A);
|
|
293
|
+
}, [A]), Ce = x(() => {
|
|
294
|
+
ae(A, o);
|
|
295
|
+
}, [A, o]);
|
|
296
|
+
S(() => {
|
|
297
|
+
j(null), P([]), K.current = [];
|
|
298
|
+
}, [i]), S(() => {
|
|
290
299
|
X(s);
|
|
291
|
-
}, [s, X]),
|
|
292
|
-
|
|
293
|
-
}, [
|
|
294
|
-
|
|
295
|
-
}, [
|
|
296
|
-
(
|
|
297
|
-
}, [
|
|
298
|
-
let $ =
|
|
300
|
+
}, [s, X]), S(() => {
|
|
301
|
+
R > 0 && h?.(R);
|
|
302
|
+
}, [R, h]), S(() => {
|
|
303
|
+
N.length > 0 && (l === "page-width" || l === "page-fit") && Z(l);
|
|
304
|
+
}, [N.length, l]), S(() => {
|
|
305
|
+
(B === "page-width" || B === "page-fit") && Z(B);
|
|
306
|
+
}, [H]);
|
|
307
|
+
let $ = w();
|
|
299
308
|
a({
|
|
300
|
-
ref:
|
|
309
|
+
ref: W,
|
|
301
310
|
onResize: () => {
|
|
302
311
|
clearTimeout($.current), $.current = setTimeout(() => {
|
|
303
|
-
(
|
|
304
|
-
},
|
|
312
|
+
(B === "page-width" || B === "page-fit") && Z(B);
|
|
313
|
+
}, de);
|
|
305
314
|
}
|
|
306
|
-
}),
|
|
315
|
+
}), S(function() {
|
|
307
316
|
return () => clearTimeout($.current);
|
|
308
|
-
}, []),
|
|
309
|
-
let e =
|
|
317
|
+
}, []), S(() => {
|
|
318
|
+
let e = W.current;
|
|
310
319
|
if (!e) return;
|
|
311
320
|
let t = (e) => {
|
|
312
321
|
let t = e.target;
|
|
@@ -314,63 +323,63 @@ var U = b((e, t) => {
|
|
|
314
323
|
};
|
|
315
324
|
return e.addEventListener("click", t, !0), () => e.removeEventListener("click", t, !0);
|
|
316
325
|
}, []);
|
|
317
|
-
let
|
|
318
|
-
toolbarRef:
|
|
319
|
-
placement:
|
|
320
|
-
currentPage:
|
|
321
|
-
totalPages:
|
|
322
|
-
hasDocument: !!
|
|
323
|
-
selectedScale:
|
|
324
|
-
scaleOptions:
|
|
325
|
-
onPreviousPage: () => X(
|
|
326
|
-
onNextPage: () => X(
|
|
327
|
-
onZoomIn:
|
|
328
|
-
onZoomOut:
|
|
329
|
-
onScaleChange:
|
|
326
|
+
let we = {
|
|
327
|
+
toolbarRef: G,
|
|
328
|
+
placement: v,
|
|
329
|
+
currentPage: R,
|
|
330
|
+
totalPages: q,
|
|
331
|
+
hasDocument: !!A?.numPages,
|
|
332
|
+
selectedScale: B,
|
|
333
|
+
scaleOptions: me,
|
|
334
|
+
onPreviousPage: () => X(R - 2),
|
|
335
|
+
onNextPage: () => X(R),
|
|
336
|
+
onZoomIn: _e,
|
|
337
|
+
onZoomOut: ve,
|
|
338
|
+
onScaleChange: ge,
|
|
330
339
|
rotatable: d,
|
|
331
|
-
onRotate:
|
|
332
|
-
onPrint:
|
|
333
|
-
onDownload:
|
|
334
|
-
actions:
|
|
340
|
+
onRotate: ye,
|
|
341
|
+
onPrint: Se,
|
|
342
|
+
onDownload: Ce,
|
|
343
|
+
actions: g
|
|
335
344
|
};
|
|
336
|
-
return /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ D("div", {
|
|
337
346
|
ref: t,
|
|
338
|
-
...
|
|
347
|
+
...y,
|
|
339
348
|
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
-
ref:
|
|
342
|
-
onScroll:
|
|
349
|
+
children: [/* @__PURE__ */ D("div", {
|
|
350
|
+
ref: W,
|
|
351
|
+
onScroll: xe,
|
|
343
352
|
className: "F0DocumentViewer__surface relative flex h-full flex-col overflow-auto [scrollbar-gutter:stable_both-edges]",
|
|
344
|
-
children: [
|
|
345
|
-
file:
|
|
346
|
-
onLoadSuccess:
|
|
347
|
-
loading: /* @__PURE__ */
|
|
348
|
-
label:
|
|
349
|
-
width:
|
|
350
|
-
height:
|
|
353
|
+
children: [v === "top" ? /* @__PURE__ */ E(M, { ...we }) : null, i ? /* @__PURE__ */ E(ee, {
|
|
354
|
+
file: he,
|
|
355
|
+
onLoadSuccess: be,
|
|
356
|
+
loading: /* @__PURE__ */ E(O, {
|
|
357
|
+
label: b.loading,
|
|
358
|
+
width: pe,
|
|
359
|
+
height: Y
|
|
351
360
|
}),
|
|
352
|
-
children:
|
|
361
|
+
children: A ? Array.from({ length: q ?? 0 }).map((e, t) => {
|
|
353
362
|
let r = (c.length > 0 ? c[t] : t) + 1;
|
|
354
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ E("div", {
|
|
355
364
|
className: "F0DocumentViewer__page mx-auto w-fit px-4 pt-4 last:pb-4",
|
|
356
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ E(_, {
|
|
357
366
|
className: "overflow-hidden rounded-lg border border-solid border-f1-border-secondary shadow-md",
|
|
358
367
|
pageNumber: r,
|
|
359
|
-
scale:
|
|
360
|
-
rotate:
|
|
361
|
-
devicePixelRatio:
|
|
362
|
-
loading: /* @__PURE__ */
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
368
|
+
scale: te(F, H === 90 || H === 270 ? N[t]?.originalHeight : N[t]?.originalWidth),
|
|
369
|
+
rotate: H,
|
|
370
|
+
devicePixelRatio: k,
|
|
371
|
+
loading: /* @__PURE__ */ E(n, { style: {
|
|
372
|
+
width: pe,
|
|
373
|
+
height: Y
|
|
365
374
|
} }),
|
|
366
375
|
renderForms: !0,
|
|
367
376
|
renderTextLayer: !0,
|
|
368
377
|
inputRef: (e) => {
|
|
369
|
-
|
|
378
|
+
K.current[t] = e;
|
|
370
379
|
},
|
|
371
|
-
onRenderSuccess: () =>
|
|
380
|
+
onRenderSuccess: () => re(K.current[t]?.querySelector("canvas"), k),
|
|
372
381
|
onLoadSuccess: (e) => {
|
|
373
|
-
|
|
382
|
+
P((n) => {
|
|
374
383
|
let r = [...n];
|
|
375
384
|
return r[t] = {
|
|
376
385
|
originalWidth: e.originalWidth,
|
|
@@ -382,10 +391,10 @@ var U = b((e, t) => {
|
|
|
382
391
|
}, t);
|
|
383
392
|
}) : null
|
|
384
393
|
}) : null]
|
|
385
|
-
}),
|
|
394
|
+
}), v === "floating" ? /* @__PURE__ */ E(M, { ...we }) : null]
|
|
386
395
|
});
|
|
387
396
|
});
|
|
388
397
|
U.displayName = "PdfViewerBase";
|
|
389
398
|
var W = e(i("F0DocumentViewer", c(H, P))), G = W;
|
|
390
399
|
//#endregion
|
|
391
|
-
export {
|
|
400
|
+
export { oe as a, j as c, se as i, k as l, G as n, I as o, L as r, A as s, W as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as e, o as t, ri as n } from "./CoachmarkProvider-
|
|
1
|
+
import { a as e, o as t, ri as n } from "./CoachmarkProvider-ByfCE0-j.js";
|
|
2
2
|
import { Ht as r, Lt as i, Mt as a, Zn as o, b as s, gn as c, in as l, ir as u, mn as d, rn as f } from "./popover-B7fqB9lu.js";
|
|
3
3
|
import { I as p, L as m } from "./tooltip-TOvfXq9F.js";
|
|
4
4
|
import { n as h, t as g } from "./F0Box-CYL5_Zhb.js";
|
|
5
|
-
import { Po as _, hs as v, ro as y } from "./F0CanvasPanel-
|
|
5
|
+
import { Po as _, hs as v, ro as y } from "./F0CanvasPanel-9PijExob.js";
|
|
6
6
|
import { J as b, N as x, W as S, x as ee } from "./useData-CAl9SKtE.js";
|
|
7
7
|
import { n as te, t as C } from "./dist-CSP_0yKt.js";
|
|
8
8
|
import { createContext as ne, forwardRef as w, useCallback as T, useContext as re, useEffect as E, useId as ie, useImperativeHandle as ae, useLayoutEffect as oe, useMemo as D, useRef as O, useState as k } from "react";
|
|
@@ -1355,7 +1355,7 @@ var xt = {
|
|
|
1355
1355
|
isDark: e
|
|
1356
1356
|
};
|
|
1357
1357
|
}, Et = {
|
|
1358
|
-
maplibre: async () => (await import("./maplibre-
|
|
1358
|
+
maplibre: async () => (await import("./maplibre-GffVTD0r.js")).createMaplibreAdapter,
|
|
1359
1359
|
google: async (e) => (await import("./google-B7uAYsxU.js")).loadGoogleAdapter(e)
|
|
1360
1360
|
}, Dt = /* @__PURE__ */ new Map(), Ot = (e, t) => {
|
|
1361
1361
|
let n = Dt.get(e);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as e, B as t, F as n, I as r, L as i, U as a, V as o, a as s, an as c, ar as l, b as u, i as d, in as f, j as p, rn as m, rr as h, t as g, z as _ } from "./popover-B7fqB9lu.js";
|
|
2
2
|
import { I as v, L as y } from "./tooltip-TOvfXq9F.js";
|
|
3
|
-
import { Ds as b, Ha as x, Jo as S, Ua as ee, Vo as te, Wa as C, do as w, ds as T, mo as ne, uo as re } from "./F0CanvasPanel-
|
|
3
|
+
import { Ds as b, Ha as x, Jo as S, Ua as ee, Vo as te, Wa as C, do as w, ds as T, mo as ne, uo as re } from "./F0CanvasPanel-9PijExob.js";
|
|
4
4
|
import { t as E } from "./Check-DAp9gCRh.js";
|
|
5
5
|
import { t as D } from "./useFullscreen-CNwpzjpz.js";
|
|
6
6
|
import { forwardRef as O, useCallback as k, useEffect as A, useId as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as F0VideoPlayer } from "./F0VideoPlayer-BByW1cIV.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $n as e, Mt as t, jt as n } from "./CoachmarkProvider-
|
|
1
|
+
import { $n as e, Mt as t, jt as n } from "./CoachmarkProvider-ByfCE0-j.js";
|
|
2
2
|
import { Vt as r, in as i, pt as a, rn as o } from "./popover-B7fqB9lu.js";
|
|
3
3
|
import { I as s, L as c } from "./tooltip-TOvfXq9F.js";
|
|
4
|
-
import { Hr as l, Ur as u, Wr as d } from "./F0CanvasPanel-
|
|
4
|
+
import { Hr as l, Ur as u, Wr as d } from "./F0CanvasPanel-9PijExob.js";
|
|
5
5
|
import { d as f, l as p, q as ee } from "./useData-CAl9SKtE.js";
|
|
6
|
-
import { o as m, t as h } from "./F0Map-
|
|
6
|
+
import { o as m, t as h } from "./F0Map-CznQg3YF.js";
|
|
7
7
|
import { useCallback as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
8
8
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
9
9
|
//#region src/addons/data-collection/OneDataCollection/visualizations/collection/Map/components/MapNotOnMapButton.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, n as t, r as n } from "./pdfWorker-
|
|
1
|
+
import { i as e, n as t, r as n } from "./pdfWorker-C3UVNtZV.js";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
//#region src/elements/primitives/_primitives/F0Attachments/components/thumbnails/PdfThumbnail.tsx
|
|
4
4
|
t();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ln as e, rn as t } from "./popover-B7fqB9lu.js";
|
|
2
|
-
import { Gr as n, b as r, y as i } from "./F0CanvasPanel-
|
|
3
|
-
import { o as a } from "./F0DocumentViewer-
|
|
4
|
-
import { n as o, t as s } from "./DocumentToolbar-
|
|
2
|
+
import { Gr as n, b as r, y as i } from "./F0CanvasPanel-9PijExob.js";
|
|
3
|
+
import { o as a } from "./F0DocumentViewer-hMDS3Kpg.js";
|
|
4
|
+
import { n as o, t as s } from "./DocumentToolbar-UFkOiw8e.js";
|
|
5
5
|
import { n as c, t as l } from "./sheetPreview-Ca0kCtSa.js";
|
|
6
6
|
import { useEffect as u, useState as d } from "react";
|
|
7
7
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ln as e, rn as t, xt as n } from "./popover-B7fqB9lu.js";
|
|
2
|
-
import { n as r, t as i } from "./DocumentToolbar-
|
|
2
|
+
import { n as r, t as i } from "./DocumentToolbar-UFkOiw8e.js";
|
|
3
3
|
import { useEffect as a, useState as o } from "react";
|
|
4
4
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
5
|
//#region src/addons/documents/F0DocumentViewer/components/TextViewer.tsx
|