@factorialco/f0-react 12.9.1 → 12.11.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/ArchiveThumbnail-cs8kx5Zf.js +70 -0
- package/dist/ArchiveViewer-BXUH8Lm5.js +172 -0
- package/dist/{ChatPostComposerDialog-CWTlUs36.js → ChatPostComposerDialog-CGil1xkf.js} +4 -4
- package/dist/{CoachmarkProvider-BMunnTvE.js → CoachmarkProvider-cZnuTk79.js} +21047 -21041
- package/dist/CodeThumbnail-Dcer4AyK.js +31 -0
- package/dist/CodeViewer-DFBwdIFm.js +98 -0
- package/dist/DocumentToolbar-vZEyzJ89.js +74 -0
- package/dist/{DocxThumbnail-kHTNnwW0.js → DocxThumbnail-CK9vFoTB.js} +2 -2
- package/dist/{DocxViewer-C1yw4Yqt.js → DocxViewer-DQV5Kv1n.js} +25 -23
- package/dist/ExternalLink-RdKU698E.js +22 -0
- package/dist/{F0AiProcessingOverlay-cdj77_VP.js → F0AiProcessingOverlay-DjGkQ2Nc.js} +1903 -1795
- package/dist/{popover-BjrPOMeQ.js → F0Button-FXkThQ9H.js} +3164 -8587
- package/dist/{F0CanvasPanel-DPEwyR89.js → F0CanvasPanel-BgDo2LWP.js} +3704 -3274
- package/dist/F0DocumentViewer-BXifXzUW.js +79 -0
- package/dist/F0DocumentViewer-DWuIFBHu.js +3 -0
- package/dist/F0Icon-Cj0USbCF.js +202 -0
- package/dist/{F0Map-ZSo-alK8.js → F0Map-Dwev4u-_.js} +199 -191
- package/dist/{F0Select-B-ZxVjXG.js → F0Select-BWWdEd7l.js} +6696 -6726
- package/dist/{F0Text-D92NWQRd.js → F0Text-DMZW7dhN.js} +25 -41
- package/dist/{F0VideoPlayer-B1-tEFuq.js → F0VideoPlayer-BmCmHG87.js} +206 -202
- package/dist/F0VideoPlayer-C8oYUUZM.js +1 -0
- package/dist/HtmlThumbnail-BAgkBH2r.js +60 -0
- package/dist/HtmlViewer-FRfNoxhP.js +208 -0
- package/dist/LockLocked-gdodYvT_.js +41 -0
- package/dist/{Map-B_Hw6nIS.js → Map-BxGPElF2.js} +56 -53
- package/dist/{PdfThumbnail-BWqOqM04.js → PdfThumbnail-CpGZz5Kq.js} +5 -5
- package/dist/PdfViewer-C81MK43i.js +296 -0
- package/dist/SandboxedHtmlFrame-B6YWhgyg.js +309 -0
- package/dist/{SheetViewer-B8JTSi3B.js → SheetViewer-DPGpMNqq.js} +36 -26
- package/dist/TextThumbnail-DKNxh344.js +15 -0
- package/dist/{TextViewer-CEZd1H8u.js → TextViewer-BH42AeG8.js} +44 -41
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +5 -5
- package/dist/bash-BcZBmoDA.js +169 -0
- package/dist/c-Dv-5_kUQ.js +187 -0
- package/dist/component-status.js +2 -2
- package/dist/core-C0MCmPil.js +842 -0
- package/dist/cpp-CMQhucZt.js +236 -0
- package/dist/csharp-CuDKSCf2.js +260 -0
- package/dist/css-Dta7Q4Li.js +145 -0
- package/dist/dart-po7Eq73d.js +134 -0
- package/dist/diff-IgsQP-8T.js +39 -0
- package/dist/dist-D-MJbPvE.js +59 -0
- package/dist/dockerfile-B4Bz9I5u.js +34 -0
- package/dist/dos-1TcyLtUq.js +57 -0
- package/dist/elixir-BnEjyLGa.js +189 -0
- package/dist/erlang-tgri7ZSv.js +218 -0
- package/dist/experimental.d.ts +24 -4
- package/dist/experimental.js +5080 -4883
- package/dist/{exports-BdFDYdp1.d.ts → exports-C0yM5usu.d.ts} +13 -2
- package/dist/f0.d.ts +130 -8
- package/dist/f0.js +751 -745
- package/dist/fetchText-o_GOtiv3.js +54 -0
- package/dist/go-CEVmppuo.js +144 -0
- package/dist/graphql-BWwc-u8d.js +67 -0
- package/dist/groovy-BELuqtd6.js +127 -0
- package/dist/haskell-Cxh7aaFM.js +138 -0
- package/dist/highlight-CyebkDAD.js +114 -0
- package/dist/i18n-provider-BBhzYHef.js +150 -0
- package/dist/{i18n-provider-defaults-p0UGTA_k.js → i18n-provider-defaults-BUagKwGN.js} +32 -1
- package/dist/{i18n-provider-defaults-DQxuUMpU.d.ts → i18n-provider-defaults-CTDMMs-y.d.ts} +31 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-DIwa_k8B.d.ts → index-CduxMW5L.d.ts} +16 -2
- package/dist/ini-DA-F0rRr.js +88 -0
- package/dist/java-Bujnoc_f.js +174 -0
- package/dist/javascript-BeEhpXRE.js +431 -0
- package/dist/json-CxvE7tEw.js +42 -0
- package/dist/kotlin-DOwDGI_m.js +206 -0
- package/dist/less-DWlR-e-o.js +196 -0
- package/dist/lua-BlZiakwh.js +46 -0
- package/dist/makefile-D3841Yg4.js +57 -0
- package/dist/{maplibre-BSY0r3_z.js → maplibre-g-8NG-3q.js} +1 -1
- package/dist/markdown-D1wNG79U.js +178 -0
- package/dist/objectivec-DxtRzTBy.js +117 -0
- package/dist/ownValue-D4uSXt0d.js +4 -0
- package/dist/{pdfWorker-DRgGoc3T.js → pdfWorker-D5NB2V5s.js} +12 -9
- package/dist/pdfWorkerConfig-BwllKt1K.js +8 -0
- package/dist/perl-BWRmkuyz.js +192 -0
- package/dist/php-CjwybYSP.js +300 -0
- package/dist/popover-CQztsDta.js +4486 -0
- package/dist/{posts-DGtDUrKT.js → posts-BHRBUAYJ.js} +2 -0
- package/dist/powershell-CgKcNA5Q.js +188 -0
- package/dist/properties-Bc45MTzW.js +38 -0
- package/dist/protobuf-Bv_xSUaI.js +61 -0
- package/dist/purify.es-ZpfdAuNV.js +545 -0
- package/dist/python-D8PdGjgy.js +238 -0
- package/dist/r-DA-9ZIdU.js +140 -0
- package/dist/{renderDocx-_UmnE-yc.js → renderDocx-BW-uDyaZ.js} +2 -0
- package/dist/ruby-Bqr16BpN.js +262 -0
- package/dist/rust-BCvJMwk8.js +182 -0
- package/dist/scala-Du8mOD2z.js +162 -0
- package/dist/scss-AMxHqh46.js +155 -0
- package/dist/skeleton-DqejhQgn.js +72 -0
- package/dist/sql-BbYSgcOA.js +118 -0
- package/dist/styles.css +1 -1
- package/dist/swift-DRKtalPn.js +575 -0
- package/dist/toolbarStyles-0IygMI4H.js +52 -0
- package/dist/{types-hr47rxX3.d.ts → types-DlwD3i9z.d.ts} +3 -95
- package/dist/typescript-Bv8uKU6V.js +516 -0
- package/dist/{useData-B7LYSzh0.js → useData-Dkq5W4r6.js} +4917 -4876
- package/dist/useFetchedText-BR3_KLXx.js +38 -0
- package/dist/useThumbnailText-DwXQvLIe.js +22 -0
- package/dist/xml-BVpP05uE.js +162 -0
- package/dist/yaml-BNe2WG-i.js +144 -0
- package/dist/zipTree-B2zUYl6b.js +247 -0
- package/package.json +2 -1
- package/dist/DocumentToolbar-iHZHYbFM.js +0 -70
- package/dist/F0DocumentViewer-CzNVxjsJ.js +0 -3
- package/dist/F0DocumentViewer-sRCjFb2O.js +0 -400
- package/dist/F0VideoPlayer-B4Nu7ugx.js +0 -1
- package/dist/TextThumbnail-X04JgaNI.js +0 -26
- package/dist/dist-DvxtFKDL.js +0 -78
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as F0VideoPlayer } from "./F0VideoPlayer-BmCmHG87.js";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { n as e } from "./SandboxedHtmlFrame-B6YWhgyg.js";
|
|
2
|
+
import { t } from "./useThumbnailText-DwXQvLIe.js";
|
|
3
|
+
import { useEffect as n, useMemo as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region src/elements/primitives/_primitives/F0Attachments/components/thumbnails/HtmlThumbnail.tsx
|
|
6
|
+
var s = 768, c = 480, l = 5242880, u = 4, d = 0, f = (e) => {
|
|
7
|
+
let t = new DOMParser().parseFromString(e, "text/html"), n = t.title || t.querySelector("h1, h2")?.textContent?.trim() || "";
|
|
8
|
+
return {
|
|
9
|
+
title: n,
|
|
10
|
+
lines: Array.from(t.body?.querySelectorAll("h1, h2, h3, p, li") ?? []).map((e) => e.textContent?.trim() ?? "").filter((e) => e && e !== n).slice(0, 6)
|
|
11
|
+
};
|
|
12
|
+
}, p = ({ url: p, width: m, title: h, onError: g, onRendered: _ }) => {
|
|
13
|
+
let v = t(p, l, {
|
|
14
|
+
onError: g,
|
|
15
|
+
onLoaded: _
|
|
16
|
+
}), [y, b] = i(!1);
|
|
17
|
+
n(() => {
|
|
18
|
+
if (!(v === null || d >= u)) return d += 1, b(!0), () => {
|
|
19
|
+
--d;
|
|
20
|
+
};
|
|
21
|
+
}, [v]);
|
|
22
|
+
let x = r(() => v ? f(v) : null, [v]);
|
|
23
|
+
if (v === null || x === null) return null;
|
|
24
|
+
if (!y) return /* @__PURE__ */ o("span", {
|
|
25
|
+
className: "block bg-f1-background p-3 text-left",
|
|
26
|
+
children: [/* @__PURE__ */ a("span", {
|
|
27
|
+
className: "block text-sm font-semibold text-f1-foreground",
|
|
28
|
+
children: x.title
|
|
29
|
+
}), x.lines.map((e, t) => /* @__PURE__ */ a("span", {
|
|
30
|
+
className: "mt-1 block truncate text-xs text-f1-foreground-secondary",
|
|
31
|
+
children: e
|
|
32
|
+
}, t))]
|
|
33
|
+
});
|
|
34
|
+
let S = m / s;
|
|
35
|
+
return /* @__PURE__ */ a("span", {
|
|
36
|
+
className: "relative block overflow-hidden bg-[#fff]",
|
|
37
|
+
style: {
|
|
38
|
+
width: m,
|
|
39
|
+
height: c * S
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ a("span", {
|
|
42
|
+
ref: (e) => e?.setAttribute("inert", ""),
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
className: "absolute left-0 top-0 block origin-top-left",
|
|
45
|
+
style: {
|
|
46
|
+
width: s,
|
|
47
|
+
height: c,
|
|
48
|
+
transform: `scale(${S})`
|
|
49
|
+
},
|
|
50
|
+
children: /* @__PURE__ */ a(e, {
|
|
51
|
+
html: v,
|
|
52
|
+
title: h,
|
|
53
|
+
interactive: !1,
|
|
54
|
+
className: "h-full w-full border-0"
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { p as default };
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { zn as e } from "./CoachmarkProvider-cZnuTk79.js";
|
|
2
|
+
import { r as t } from "./i18n-provider-BBhzYHef.js";
|
|
3
|
+
import { t as n } from "./skeleton-DqejhQgn.js";
|
|
4
|
+
import { L as r } from "./tooltip-BX4dSfeL.js";
|
|
5
|
+
import { ac as i } from "./F0CanvasPanel-BgDo2LWP.js";
|
|
6
|
+
import { t as a } from "./F0Icon-Cj0USbCF.js";
|
|
7
|
+
import { pr as o } from "./F0Select-BWWdEd7l.js";
|
|
8
|
+
import { r as s } from "./toolbarStyles-0IygMI4H.js";
|
|
9
|
+
import { t as c } from "./DocumentToolbar-vZEyzJ89.js";
|
|
10
|
+
import { t as l } from "./useFetchedText-BR3_KLXx.js";
|
|
11
|
+
import { a as u, c as d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./SandboxedHtmlFrame-B6YWhgyg.js";
|
|
12
|
+
import { useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
13
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
14
|
+
//#region src/addons/documents/lib/html-sandbox/UserContentFrame.tsx
|
|
15
|
+
var D = "allow-scripts allow-same-origin", O = "/f0-html-host/", k = 250, A = 1500, j = 1e3, M = 3, N = (e) => {
|
|
16
|
+
try {
|
|
17
|
+
let t = new URL(e);
|
|
18
|
+
return (t.protocol === "https:" || t.protocol === "http:") && t.origin === e && (typeof window > "u" || e !== window.location.origin);
|
|
19
|
+
} catch {
|
|
20
|
+
return !1;
|
|
21
|
+
}
|
|
22
|
+
}, P = ({ html: e, origin: t, title: n, className: i, onReady: a, onHandshakeFailed: o, onNavigatedAway: s }) => {
|
|
23
|
+
let c = S(null), [l] = C(y), [m, h] = C(0), [w, P] = C(null), F = S(!1), I = S(!1), L = S(!1), R = S(0), z = S(0), B = S([]), V = S(o), H = S(s);
|
|
24
|
+
b(() => {
|
|
25
|
+
V.current = o, H.current = s;
|
|
26
|
+
});
|
|
27
|
+
let U = N(t), W = window.location.origin, G = `${t}${O}?parent=${encodeURIComponent(W)}`, K = x(() => u(e, {
|
|
28
|
+
mode: "artifact",
|
|
29
|
+
token: l,
|
|
30
|
+
parentOrigin: W
|
|
31
|
+
}), [
|
|
32
|
+
e,
|
|
33
|
+
l,
|
|
34
|
+
W
|
|
35
|
+
]), q = (e, t) => {
|
|
36
|
+
B.current.push(setTimeout(e, t));
|
|
37
|
+
}, J = () => {
|
|
38
|
+
B.current.forEach(clearTimeout), B.current = [];
|
|
39
|
+
}, { link: Y, closeLink: X } = g({
|
|
40
|
+
frameRef: c,
|
|
41
|
+
token: l,
|
|
42
|
+
origin: t,
|
|
43
|
+
onReady: () => {
|
|
44
|
+
R.current = Date.now(), a?.();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
b(() => {
|
|
48
|
+
U || V.current?.();
|
|
49
|
+
}, [U]), b(() => (F.current = !1, I.current = !1, L.current = !1, R.current = 0, J), [K, m]), b(() => {
|
|
50
|
+
z.current = 0;
|
|
51
|
+
}, [K]), b(() => {
|
|
52
|
+
let e = (e) => {
|
|
53
|
+
let n = c.current;
|
|
54
|
+
n && e.source === n.contentWindow && e.origin === t && p(e.data) && !I.current && (F.current = !0, I.current = !0, n.contentWindow?.postMessage({
|
|
55
|
+
channel: _,
|
|
56
|
+
type: d.render,
|
|
57
|
+
html: K,
|
|
58
|
+
token: l
|
|
59
|
+
}, t), q(() => {
|
|
60
|
+
R.current === 0 && V.current?.();
|
|
61
|
+
}, A));
|
|
62
|
+
};
|
|
63
|
+
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
64
|
+
}, [
|
|
65
|
+
t,
|
|
66
|
+
K,
|
|
67
|
+
l
|
|
68
|
+
]);
|
|
69
|
+
let Z = () => {
|
|
70
|
+
X(), z.current >= M ? (J(), P(K), H.current?.()) : (z.current += 1, h((e) => e + 1));
|
|
71
|
+
};
|
|
72
|
+
return !U || w === K ? null : /* @__PURE__ */ E("div", {
|
|
73
|
+
className: r("relative h-full w-full", i),
|
|
74
|
+
children: [/* @__PURE__ */ T("iframe", {
|
|
75
|
+
ref: c,
|
|
76
|
+
title: n,
|
|
77
|
+
src: G,
|
|
78
|
+
sandbox: D,
|
|
79
|
+
allow: v,
|
|
80
|
+
referrerPolicy: "no-referrer",
|
|
81
|
+
onLoad: () => {
|
|
82
|
+
if (!L.current) {
|
|
83
|
+
L.current = !0, q(() => {
|
|
84
|
+
F.current || V.current?.();
|
|
85
|
+
}, k);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
let e = Date.now();
|
|
89
|
+
q(() => {
|
|
90
|
+
R.current < e - j && Z();
|
|
91
|
+
}, k);
|
|
92
|
+
},
|
|
93
|
+
className: "block h-full w-full border-0"
|
|
94
|
+
}, m), Y ? /* @__PURE__ */ T(f, {
|
|
95
|
+
link: Y,
|
|
96
|
+
onClose: X
|
|
97
|
+
}) : null]
|
|
98
|
+
});
|
|
99
|
+
}, F = 5242880, I = ({ htmlExecution: e, htmlSandbox: t, runRequested: n, summary: r, userContentFailed: i = !1 }) => {
|
|
100
|
+
let a = t && N(t.origin) && !i ? t.origin : null, o = e !== "never", s = o && (n || e === "auto");
|
|
101
|
+
return {
|
|
102
|
+
frame: s ? a ? "user-content" : "run" : "static",
|
|
103
|
+
sandboxOrigin: a,
|
|
104
|
+
showRunBanner: o && !s && !!r?.hasScripts
|
|
105
|
+
};
|
|
106
|
+
}, L = ({ children: e }) => /* @__PURE__ */ E("p", {
|
|
107
|
+
className: "m-0 flex shrink-0 flex-row items-center gap-1.5 px-4 pb-2 text-sm text-f1-foreground-secondary",
|
|
108
|
+
children: [/* @__PURE__ */ T(a, {
|
|
109
|
+
icon: o,
|
|
110
|
+
size: "sm"
|
|
111
|
+
}), e]
|
|
112
|
+
}), R = ({ html: e, mode: t, title: n, reloadKey: r, onFailed: i, onNavigatedAway: a }) => /* @__PURE__ */ T("div", {
|
|
113
|
+
className: "min-h-0 grow",
|
|
114
|
+
children: /* @__PURE__ */ T("div", {
|
|
115
|
+
className: "h-full overflow-hidden",
|
|
116
|
+
children: t.frame === "user-content" && t.sandboxOrigin ? /* @__PURE__ */ T(P, {
|
|
117
|
+
html: e,
|
|
118
|
+
origin: t.sandboxOrigin,
|
|
119
|
+
title: n,
|
|
120
|
+
onHandshakeFailed: i,
|
|
121
|
+
onNavigatedAway: a
|
|
122
|
+
}, `user-${r}`) : /* @__PURE__ */ T(m, {
|
|
123
|
+
html: e,
|
|
124
|
+
title: n,
|
|
125
|
+
mode: t.frame === "run" ? "run" : "static",
|
|
126
|
+
onHandshakeFailed: i,
|
|
127
|
+
onNavigatedAway: a
|
|
128
|
+
}, `${t.frame}-${r}`)
|
|
129
|
+
})
|
|
130
|
+
}), z = ({ url: r, filename: a, withCredentials: o = !0, actions: u, toolbar: d = "top", hideDownload: f = !1, htmlExecution: p = "auto", htmlSandbox: m, sender: g }) => {
|
|
131
|
+
let _ = t(), { text: v, failed: y } = l(r, {
|
|
132
|
+
withCredentials: o,
|
|
133
|
+
maxChars: F
|
|
134
|
+
}), [b, S] = C(!1), [D, O] = C(!1), [k, A] = C(!1), [j, M] = C(!1), [N, P] = C(0), z = I({
|
|
135
|
+
htmlExecution: p,
|
|
136
|
+
htmlSandbox: m,
|
|
137
|
+
runRequested: b,
|
|
138
|
+
summary: x(() => v ? h(v) : null, [v]),
|
|
139
|
+
userContentFailed: D
|
|
140
|
+
}), B = a ?? "", V = g ? `${_.t("pdfViewer.contentFrom", { sender: g })} · ${B}` : B, H = /* @__PURE__ */ T(c, {
|
|
141
|
+
url: r,
|
|
142
|
+
filename: a,
|
|
143
|
+
withCredentials: o,
|
|
144
|
+
actions: u,
|
|
145
|
+
placement: d,
|
|
146
|
+
hideDownload: f,
|
|
147
|
+
endContent: v === null ? null : /* @__PURE__ */ T(s, {
|
|
148
|
+
label: _.pdfViewer.reload,
|
|
149
|
+
icon: i,
|
|
150
|
+
onClick: () => {
|
|
151
|
+
M(!1), P((e) => e + 1);
|
|
152
|
+
}
|
|
153
|
+
}),
|
|
154
|
+
children: /* @__PURE__ */ T("span", {
|
|
155
|
+
className: "min-w-0 truncate text-sm text-f1-foreground-secondary",
|
|
156
|
+
title: V,
|
|
157
|
+
children: /* @__PURE__ */ T("bdi", {
|
|
158
|
+
dir: "auto",
|
|
159
|
+
children: V
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
}), U = () => {
|
|
163
|
+
z.frame === "user-content" ? O(!0) : z.frame === "run" && A(!0);
|
|
164
|
+
};
|
|
165
|
+
return /* @__PURE__ */ E("div", {
|
|
166
|
+
className: "relative flex h-full w-full flex-col bg-f1-background",
|
|
167
|
+
children: [
|
|
168
|
+
d === "top" ? H : null,
|
|
169
|
+
y ? /* @__PURE__ */ T("div", {
|
|
170
|
+
className: "flex min-h-0 grow items-center justify-center text-f1-foreground-secondary",
|
|
171
|
+
children: _.pdfViewer.previewFailed
|
|
172
|
+
}) : v === null ? /* @__PURE__ */ T(n, {
|
|
173
|
+
role: "status",
|
|
174
|
+
"aria-busy": !0,
|
|
175
|
+
"aria-label": _.pdfViewer.loading,
|
|
176
|
+
className: "min-h-0 w-full grow rounded-none"
|
|
177
|
+
}) : ((t) => /* @__PURE__ */ E(w, { children: [
|
|
178
|
+
z.showRunBanner ? /* @__PURE__ */ T("div", {
|
|
179
|
+
className: "shrink-0 px-4 pb-2",
|
|
180
|
+
children: /* @__PURE__ */ T(e, {
|
|
181
|
+
variant: "info",
|
|
182
|
+
title: _.pdfViewer.runContentWarning,
|
|
183
|
+
action: {
|
|
184
|
+
label: _.pdfViewer.runContent,
|
|
185
|
+
onClick: () => S(!0)
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
}) : null,
|
|
189
|
+
k ? /* @__PURE__ */ T(L, { children: _.pdfViewer.htmlCantRun }) : null,
|
|
190
|
+
j ? /* @__PURE__ */ T("div", {
|
|
191
|
+
className: "flex min-h-0 grow items-center justify-center p-4 text-center text-f1-foreground-secondary",
|
|
192
|
+
"data-testid": "html-navigated-away",
|
|
193
|
+
children: _.pdfViewer.htmlNavigatedAway
|
|
194
|
+
}) : /* @__PURE__ */ T(R, {
|
|
195
|
+
html: t,
|
|
196
|
+
mode: z,
|
|
197
|
+
title: _.t("pdfViewer.htmlFrameTitle", { name: B }),
|
|
198
|
+
reloadKey: N,
|
|
199
|
+
onFailed: U,
|
|
200
|
+
onNavigatedAway: () => M(!0)
|
|
201
|
+
})
|
|
202
|
+
] }))(v),
|
|
203
|
+
d === "floating" ? H : null
|
|
204
|
+
]
|
|
205
|
+
});
|
|
206
|
+
}, B = (e) => /* @__PURE__ */ T(z, { ...e }, e.url);
|
|
207
|
+
//#endregion
|
|
208
|
+
export { F as HTML_MAX_CHARS, B as default, I as htmlMode };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
var r = e((e, n) => /* @__PURE__ */ t("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
fill: "none",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
ref: n,
|
|
8
|
+
...e,
|
|
9
|
+
children: /* @__PURE__ */ t("path", {
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
d: "M11.4375 6C11.09 5.38228 10.4364 5 9.72763 5H7.19998C6.07987 5 5.51982 5 5.092 5.21799C4.71567 5.40973 4.40971 5.71569 4.21796 6.09202C3.99998 6.51984 3.99998 7.07989 3.99998 8.2V14.2C3.99998 15.8802 3.99998 16.7202 4.32696 17.362C4.61458 17.9265 5.07352 18.3854 5.63801 18.673C6.27974 19 7.11982 19 8.79998 19H15.2C16.8801 19 17.7202 19 18.3619 18.673C18.9264 18.3854 19.3854 17.9265 19.673 17.362C20 16.7202 20 15.8802 20 14.2V11.8C20 10.1198 20 9.27976 19.673 8.63803C19.3854 8.07354 18.9264 7.6146 18.3619 7.32698C17.7202 7 16.8801 7 15.2 7H13.1473C12.4386 7 11.7849 6.61772 11.4375 6V6Z"
|
|
12
|
+
})
|
|
13
|
+
})), i = e((e, r) => /* @__PURE__ */ n("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
fill: "none",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
ref: r,
|
|
18
|
+
...e,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ t("path", {
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
strokeLinejoin: "round",
|
|
24
|
+
d: "M16 10H8C6.34315 10 5 11.3431 5 13V16C5 17.6569 6.34315 19 8 19H16C17.6569 19 19 17.6569 19 16V13C19 11.3431 17.6569 10 16 10Z"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ t("path", {
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round",
|
|
30
|
+
d: "M12 14V15"
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ t("path", {
|
|
33
|
+
stroke: "currentColor",
|
|
34
|
+
strokeLinecap: "round",
|
|
35
|
+
strokeLinejoin: "round",
|
|
36
|
+
d: "M8 10V8C8 5.79086 9.79086 4 12 4V4C14.2091 4 16 5.79086 16 8V10"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}));
|
|
40
|
+
//#endregion
|
|
41
|
+
export { r as n, i as t };
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { Mt as e, Nt as t } from "./CoachmarkProvider-
|
|
2
|
-
import {
|
|
3
|
-
import { L as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Mt as e, Nt as t } from "./CoachmarkProvider-cZnuTk79.js";
|
|
2
|
+
import { r as n } from "./i18n-provider-BBhzYHef.js";
|
|
3
|
+
import { L as r, R as i } from "./tooltip-BX4dSfeL.js";
|
|
4
|
+
import { w as a } from "./F0Button-FXkThQ9H.js";
|
|
5
|
+
import { t as o } from "./F0Text-DMZW7dhN.js";
|
|
6
|
+
import { Jr as s, Yr as c, qr as l } from "./F0CanvasPanel-BgDo2LWP.js";
|
|
7
|
+
import { t as u } from "./F0Icon-Cj0USbCF.js";
|
|
8
|
+
import { X as d, l as f, z as p } from "./useData-Dkq5W4r6.js";
|
|
9
|
+
import { ft as ee } from "./popover-CQztsDta.js";
|
|
10
|
+
import { o as m, t as h } from "./F0Map-Dwev4u-_.js";
|
|
8
11
|
import { useCallback as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
9
12
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
10
13
|
//#region src/addons/data-collection/OneDataCollection/visualizations/collection/Map/components/MapNotOnMapButton.tsx
|
|
11
|
-
var w = 3, te = ({ title: e, count: t, ariaLabel:
|
|
14
|
+
var w = 3, te = ({ title: e, count: t, ariaLabel: n, avatars: o, onClick: s, dataTestId: c }) => /* @__PURE__ */ C("button", {
|
|
12
15
|
type: "button",
|
|
13
|
-
onClick:
|
|
14
|
-
"aria-label":
|
|
16
|
+
onClick: s,
|
|
17
|
+
"aria-label": n,
|
|
15
18
|
"data-testid": c,
|
|
16
|
-
className:
|
|
19
|
+
className: r("flex h-8 items-center gap-2 rounded-md pl-3 pr-1.5", "hover:bg-f1-background-hover", i()),
|
|
17
20
|
children: [/* @__PURE__ */ S("span", {
|
|
18
21
|
className: "whitespace-nowrap",
|
|
19
22
|
children: /* @__PURE__ */ S(p, {
|
|
@@ -22,20 +25,20 @@ var w = 3, te = ({ title: e, count: t, ariaLabel: r, avatars: i, onClick: a, dat
|
|
|
22
25
|
markdown: !1,
|
|
23
26
|
className: "text-f1-foreground-secondary"
|
|
24
27
|
})
|
|
25
|
-
}),
|
|
28
|
+
}), o && o.length > 0 ? /* @__PURE__ */ S(f, {
|
|
26
29
|
type: "person",
|
|
27
|
-
avatars:
|
|
30
|
+
avatars: o.slice(0, w),
|
|
28
31
|
remainingCount: t > w ? t - w : void 0,
|
|
29
32
|
size: "sm",
|
|
30
33
|
max: w,
|
|
31
34
|
noTooltip: !0
|
|
32
|
-
}) : /* @__PURE__ */ S(
|
|
35
|
+
}) : /* @__PURE__ */ S(a, {
|
|
33
36
|
value: t,
|
|
34
37
|
size: "sm"
|
|
35
38
|
})]
|
|
36
|
-
}), T = ({ title: e, count: t, open:
|
|
37
|
-
let [g = p, _] =
|
|
38
|
-
prop:
|
|
39
|
+
}), T = ({ title: e, count: t, open: n, onOpenChange: f, defaultOpen: p = !0, children: m, dataTestId: h }) => {
|
|
40
|
+
let [g = p, _] = ee({
|
|
41
|
+
prop: n,
|
|
39
42
|
defaultProp: p,
|
|
40
43
|
onChange: f
|
|
41
44
|
});
|
|
@@ -43,66 +46,66 @@ var w = 3, te = ({ title: e, count: t, ariaLabel: r, avatars: i, onClick: a, dat
|
|
|
43
46
|
open: g,
|
|
44
47
|
onOpenChange: _,
|
|
45
48
|
"data-testid": h,
|
|
46
|
-
children: [/* @__PURE__ */ S(
|
|
49
|
+
children: [/* @__PURE__ */ S(c, {
|
|
47
50
|
asChild: !0,
|
|
48
51
|
children: /* @__PURE__ */ C("button", {
|
|
49
52
|
type: "button",
|
|
50
|
-
className:
|
|
53
|
+
className: r("flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left", "hover:bg-f1-background-hover", i()),
|
|
51
54
|
children: [
|
|
52
55
|
/* @__PURE__ */ S("span", {
|
|
53
56
|
className: "min-w-0 flex-1",
|
|
54
|
-
children: /* @__PURE__ */ S(
|
|
57
|
+
children: /* @__PURE__ */ S(o, {
|
|
55
58
|
variant: "label",
|
|
56
59
|
content: e,
|
|
57
60
|
markdown: !1,
|
|
58
61
|
ellipsis: !0
|
|
59
62
|
})
|
|
60
63
|
}),
|
|
61
|
-
/* @__PURE__ */ S(
|
|
64
|
+
/* @__PURE__ */ S(a, {
|
|
62
65
|
value: t,
|
|
63
66
|
size: "sm"
|
|
64
67
|
}),
|
|
65
68
|
/* @__PURE__ */ S("span", {
|
|
66
|
-
className:
|
|
67
|
-
children: /* @__PURE__ */ S(
|
|
68
|
-
icon:
|
|
69
|
+
className: r("flex shrink-0 text-f1-icon transition-transform duration-200 motion-reduce:transition-none", g && "rotate-180"),
|
|
70
|
+
children: /* @__PURE__ */ S(u, {
|
|
71
|
+
icon: d,
|
|
69
72
|
size: "sm"
|
|
70
73
|
})
|
|
71
74
|
})
|
|
72
75
|
]
|
|
73
76
|
})
|
|
74
|
-
}), /* @__PURE__ */ S(
|
|
77
|
+
}), /* @__PURE__ */ S(s, {
|
|
75
78
|
className: "px-0.5",
|
|
76
79
|
children: m
|
|
77
80
|
})]
|
|
78
81
|
});
|
|
79
|
-
}, ne = ({ rows: e, unplaced: t, placed:
|
|
80
|
-
let
|
|
82
|
+
}, ne = ({ rows: e, unplaced: t, placed: r, matches: i, notOnMapOpen: a, onNotOnMapOpenChange: s }) => {
|
|
83
|
+
let c = n();
|
|
81
84
|
return /* @__PURE__ */ S("div", {
|
|
82
85
|
className: "flex h-full min-h-0 flex-col gap-1 overflow-y-auto px-1 pb-1.5 pt-0.5",
|
|
83
|
-
children:
|
|
86
|
+
children: i ? /* @__PURE__ */ S("div", {
|
|
84
87
|
className: "px-0.5",
|
|
85
88
|
"data-testid": "map-panel-search-results",
|
|
86
|
-
children:
|
|
89
|
+
children: i.length > 0 ? e(i) : /* @__PURE__ */ S("div", {
|
|
87
90
|
className: "px-2 py-1.5",
|
|
88
|
-
children: /* @__PURE__ */ S(
|
|
91
|
+
children: /* @__PURE__ */ S(o, {
|
|
89
92
|
variant: "description",
|
|
90
|
-
content:
|
|
93
|
+
content: c.select.noResults,
|
|
91
94
|
markdown: !1
|
|
92
95
|
})
|
|
93
96
|
})
|
|
94
97
|
}) : /* @__PURE__ */ C(x, { children: [t.length > 0 ? /* @__PURE__ */ S(T, {
|
|
95
|
-
title:
|
|
98
|
+
title: c.collections.map.notOnMap,
|
|
96
99
|
count: t.length,
|
|
97
|
-
open:
|
|
98
|
-
onOpenChange:
|
|
100
|
+
open: a,
|
|
101
|
+
onOpenChange: s,
|
|
99
102
|
dataTestId: "map-panel-not-on-map",
|
|
100
103
|
children: e(t)
|
|
101
104
|
}) : null, /* @__PURE__ */ S(T, {
|
|
102
|
-
title:
|
|
103
|
-
count:
|
|
105
|
+
title: c.collections.map.onMap,
|
|
106
|
+
count: r.length,
|
|
104
107
|
dataTestId: "map-panel-on-map",
|
|
105
|
-
children: e(
|
|
108
|
+
children: e(r)
|
|
106
109
|
})] })
|
|
107
110
|
});
|
|
108
111
|
}, re = ({ querySignature: e, records: t, markerKey: n, isLoading: r, reframe: i }) => {
|
|
@@ -177,32 +180,32 @@ var w = 3, te = ({ title: e, count: t, ariaLabel: r, avatars: i, onClick: a, dat
|
|
|
177
180
|
onSidebarToggle: r,
|
|
178
181
|
sidebarToggleAddon: i > 0 ? a : void 0,
|
|
179
182
|
sidebarHeaderStart: o
|
|
180
|
-
} : {}, E = ({ source:
|
|
181
|
-
let A =
|
|
182
|
-
...
|
|
183
|
+
} : {}, E = ({ source: r, coordinates: i, label: a, marker: o, getRecordId: s, selectedRecordId: c, onSelect: l, revealRecordId: u, searchSelectionNonce: d, viewportInset: f, initialViewport: p, showControls: ee, projection: C, provider: w, markerLimit: T, ariaLabel: E, sidebar: D, sidebarSearchText: O, detail: k, onSidebarToggle: ce, onLoadData: le, onLoadError: ue }) => {
|
|
184
|
+
let A = n(), j = Math.min(T ?? 200, 200), de = v(() => r.dataAdapter.paginationType ? {
|
|
185
|
+
...r.dataAdapter,
|
|
183
186
|
perPage: j
|
|
184
|
-
} :
|
|
185
|
-
...
|
|
187
|
+
} : r.dataAdapter, [r.dataAdapter, j]), { data: fe, paginationInfo: M, isInitialLoading: N, isLoading: pe } = e({
|
|
188
|
+
...r,
|
|
186
189
|
dataAdapter: de
|
|
187
190
|
}, { onError: ue }), P = fe.records;
|
|
188
191
|
_(() => {
|
|
189
192
|
le({
|
|
190
193
|
totalItems: M?.total || P.length,
|
|
191
|
-
filters:
|
|
192
|
-
search:
|
|
194
|
+
filters: r.currentFilters,
|
|
195
|
+
search: r.currentSearch,
|
|
193
196
|
isInitialLoading: N,
|
|
194
197
|
data: P
|
|
195
198
|
});
|
|
196
199
|
}, [M?.total, P]);
|
|
197
200
|
let F = g((e) => s ? s(e) : String(e.id), [s]), { points: I, placed: L, unplaced: R, placedIds: z, unplacedKinds: B } = v(() => ae(P, {
|
|
198
|
-
coordinates:
|
|
199
|
-
label:
|
|
201
|
+
coordinates: i,
|
|
202
|
+
label: a,
|
|
200
203
|
marker: o,
|
|
201
204
|
recordId: F
|
|
202
205
|
}), [
|
|
203
206
|
P,
|
|
204
|
-
r,
|
|
205
207
|
i,
|
|
208
|
+
a,
|
|
206
209
|
o,
|
|
207
210
|
F
|
|
208
211
|
]), [me, he] = b(null), V = c === void 0 ? me : c, H = y(null), U = y(null), W = y(V);
|
|
@@ -242,8 +245,8 @@ var w = 3, te = ({ title: e, count: t, ariaLabel: r, avatars: i, onClick: a, dat
|
|
|
242
245
|
Q && (Ce.current = Q);
|
|
243
246
|
let $ = Q ?? Ce.current, we = g(() => q.current?.fitToMarkers(), []), Te = re({
|
|
244
247
|
querySignature: JSON.stringify({
|
|
245
|
-
filters:
|
|
246
|
-
search:
|
|
248
|
+
filters: r.currentFilters ?? {},
|
|
249
|
+
search: r.currentSearch ?? ""
|
|
247
250
|
}),
|
|
248
251
|
records: P,
|
|
249
252
|
markerKey: I.map((e) => e.id).join(","),
|
|
@@ -252,7 +255,7 @@ var w = 3, te = ({ title: e, count: t, ariaLabel: r, avatars: i, onClick: a, dat
|
|
|
252
255
|
});
|
|
253
256
|
ie({
|
|
254
257
|
selectedId: V,
|
|
255
|
-
search:
|
|
258
|
+
search: r.currentSearch,
|
|
256
259
|
zoomedInRef: G,
|
|
257
260
|
fitToMarkers: we,
|
|
258
261
|
ifUnchanged: Te.ifUnchanged
|
|
@@ -288,9 +291,9 @@ var w = 3, te = ({ title: e, count: t, ariaLabel: r, avatars: i, onClick: a, dat
|
|
|
288
291
|
selectedMarkerId: V,
|
|
289
292
|
onMarkerSelect: K,
|
|
290
293
|
centerOnMarkerClick: !0,
|
|
291
|
-
viewportInset:
|
|
292
|
-
initialViewport:
|
|
293
|
-
showControls:
|
|
294
|
+
viewportInset: f,
|
|
295
|
+
initialViewport: p,
|
|
296
|
+
showControls: ee,
|
|
294
297
|
projection: C,
|
|
295
298
|
provider: w,
|
|
296
299
|
ariaLabel: E,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as e, r as t, t as n } from "./pdfWorker-D5NB2V5s.js";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
//#region src/elements/primitives/_primitives/F0Attachments/components/thumbnails/PdfThumbnail.tsx
|
|
4
|
-
|
|
5
|
-
var i = ({ url:
|
|
6
|
-
file:
|
|
4
|
+
n();
|
|
5
|
+
var i = ({ url: n, width: i, onError: a, onRendered: o }) => /* @__PURE__ */ r(t, {
|
|
6
|
+
file: n,
|
|
7
7
|
loading: null,
|
|
8
8
|
error: null,
|
|
9
9
|
onLoadError: a,
|
|
10
10
|
onSourceError: a,
|
|
11
|
-
children: /* @__PURE__ */ r(
|
|
11
|
+
children: /* @__PURE__ */ r(e, {
|
|
12
12
|
pageNumber: 1,
|
|
13
13
|
width: i,
|
|
14
14
|
renderTextLayer: !1,
|