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 CHANGED
@@ -17573,7 +17573,10 @@ function formatTemplateLabel2(templateId) {
17573
17573
  if (!templateId) return null;
17574
17574
  return templateId.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
17575
17575
  }
17576
- var FullscreenPreviewModal = ({ url, title, onClose }) => {
17576
+ function withPdfViewerParams(url) {
17577
+ return `${url}#toolbar=0&navpanes=0&scrollbar=0`;
17578
+ }
17579
+ var FullscreenPreviewModal = ({ url, title, onClose, isPdf }) => {
17577
17580
  (0, import_react80.useEffect)(() => {
17578
17581
  const onKey = (e) => {
17579
17582
  if (e.key === "Escape") onClose();
@@ -17611,7 +17614,7 @@ var FullscreenPreviewModal = ({ url, title, onClose }) => {
17611
17614
  src: url,
17612
17615
  title,
17613
17616
  className: "absolute inset-0 w-full h-full border-0",
17614
- sandbox: "allow-same-origin"
17617
+ ...isPdf ? {} : { sandbox: "allow-same-origin" }
17615
17618
  }
17616
17619
  ) })
17617
17620
  ] });
@@ -18689,7 +18692,7 @@ var ResearchReportJobCard = (props) => {
18689
18692
  /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
18690
18693
  "iframe",
18691
18694
  {
18692
- src: pdfUrl,
18695
+ src: withPdfViewerParams(pdfUrl),
18693
18696
  title,
18694
18697
  className: "h-full w-full border-0",
18695
18698
  style: { pointerEvents: "none" }
@@ -18708,7 +18711,8 @@ var ResearchReportJobCard = (props) => {
18708
18711
  showPreview && (hasHTML || pdfUrl) && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
18709
18712
  FullscreenPreviewModal,
18710
18713
  {
18711
- url: hasHTML ? htmlUrl : pdfUrl,
18714
+ url: hasHTML ? htmlUrl : withPdfViewerParams(pdfUrl),
18715
+ isPdf: !hasHTML,
18712
18716
  title,
18713
18717
  onClose: () => setShowPreview(false)
18714
18718
  }