pxengine 0.1.127 → 0.1.128
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/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17241,7 +17241,10 @@ function formatTemplateLabel2(templateId) {
|
|
|
17241
17241
|
if (!templateId) return null;
|
|
17242
17242
|
return templateId.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
17243
17243
|
}
|
|
17244
|
-
|
|
17244
|
+
function withPdfViewerParams(url) {
|
|
17245
|
+
return `${url}#toolbar=0&navpanes=0&scrollbar=0`;
|
|
17246
|
+
}
|
|
17247
|
+
var FullscreenPreviewModal = ({ url, title, onClose, isPdf }) => {
|
|
17245
17248
|
useEffect8(() => {
|
|
17246
17249
|
const onKey = (e) => {
|
|
17247
17250
|
if (e.key === "Escape") onClose();
|
|
@@ -17279,7 +17282,7 @@ var FullscreenPreviewModal = ({ url, title, onClose }) => {
|
|
|
17279
17282
|
src: url,
|
|
17280
17283
|
title,
|
|
17281
17284
|
className: "absolute inset-0 w-full h-full border-0",
|
|
17282
|
-
sandbox: "allow-same-origin"
|
|
17285
|
+
...isPdf ? {} : { sandbox: "allow-same-origin" }
|
|
17283
17286
|
}
|
|
17284
17287
|
) })
|
|
17285
17288
|
] });
|
|
@@ -18357,7 +18360,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
18357
18360
|
/* @__PURE__ */ jsx152(
|
|
18358
18361
|
"iframe",
|
|
18359
18362
|
{
|
|
18360
|
-
src: pdfUrl,
|
|
18363
|
+
src: withPdfViewerParams(pdfUrl),
|
|
18361
18364
|
title,
|
|
18362
18365
|
className: "h-full w-full border-0",
|
|
18363
18366
|
style: { pointerEvents: "none" }
|
|
@@ -18376,7 +18379,8 @@ var ResearchReportJobCard = (props) => {
|
|
|
18376
18379
|
showPreview && (hasHTML || pdfUrl) && /* @__PURE__ */ jsx152(
|
|
18377
18380
|
FullscreenPreviewModal,
|
|
18378
18381
|
{
|
|
18379
|
-
url: hasHTML ? htmlUrl : pdfUrl,
|
|
18382
|
+
url: hasHTML ? htmlUrl : withPdfViewerParams(pdfUrl),
|
|
18383
|
+
isPdf: !hasHTML,
|
|
18380
18384
|
title,
|
|
18381
18385
|
onClose: () => setShowPreview(false)
|
|
18382
18386
|
}
|