@buildocsdev/sdk 1.1.59 → 1.1.61
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/{buildocslib.esm-3YCKLIZU.js → buildocslib.esm-KHP2KSIY.js} +1 -1
- package/dist/chunk-7RKPIXVG.js +1 -1
- package/dist/{chunk-NW34CD5C.js → chunk-7V25SP3L.js} +1 -1
- package/dist/{chunk-FTJXRFLR.js → chunk-C3S4PZ7O.js} +1 -1
- package/dist/chunk-EX7TRSJS.js +1 -0
- package/dist/{chunk-RYPE5BKG.js → chunk-HZKUVHLR.js} +1 -1
- package/dist/{chunk-ZV6IRE52.js → chunk-KPQZZJ4T.js} +1 -1
- package/dist/{chunk-D32ONDPD.js → chunk-NRNOBPKI.js} +3 -3
- package/dist/{chunk-WHDLCSVJ.js → chunk-UER7MBQO.js} +1 -1
- package/dist/{chunk-WPUZPO7K.js → chunk-UJAKGPC4.js} +1 -1
- package/dist/{chunk-C64U36LV.js → chunk-WMVYPZRJ.js} +2 -2
- package/dist/{chunk-IZKTNYAE.js → chunk-XX7GDJZT.js} +1 -1
- package/dist/{datatable-U7HNLJAU.js → datatable-NT53TD4B.js} +1 -1
- package/dist/{fileviewer-73OY3DUG.js → fileviewer-6BPN4EBK.js} +1 -1
- package/dist/form.js +1 -1
- package/dist/formeditor-YGOP4XQT.js +1 -0
- package/dist/formeditor.js +1 -1
- package/dist/{imageviewer-JP7IPEYU.js → imageviewer-5O55O6ZD.js} +1 -1
- package/dist/{index.esm-RHBDGDEB.js → index.esm-5NIJQKZA.js} +1 -1
- package/dist/{index.esm-7IE2PKWI.js → index.esm-SXT7TAYA.js} +1 -1
- package/dist/{index.esm-F26DXTQC.js → index.esm-Y2DKWYER.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/loadingcomponent-ADG2FQVJ.js +1 -0
- package/dist/{mdaviewer-XZQYBUBO.js → mdaviewer-6SZKQ764.js} +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/{nopreviewer-VOR5ALH5.js → nopreviewer-I57LI6GQ.js} +1 -1
- package/dist/{pdfviewer-7AOPMT32.js → pdfviewer-GUIBRUHA.js} +1 -1
- package/dist/tabulator-UNVIG7PO.js +20 -0
- package/dist/{videopreviewer-VSZT5ZED.js → videopreviewer-6ICW57BN.js} +1 -1
- package/dist/{xlsxviewer-UIHZH2TH.js → xlsxviewer-G2ZMHYM3.js} +1 -1
- package/package.json +5 -6
- package/dist/chunk-5TBO732O.js +0 -1
- package/dist/formeditor-G4VYCI67.js +0 -1
- package/dist/loadingcomponent-NJVJLQVC.js +0 -1
- package/dist/tabulator-QD3OEHKN.js +0 -18
- /package/dist/{formeditor-FMZEG56B.css → formeditor-6ZNXETAG.css} +0 -0
- /package/dist/{tabulator-TN7JIT3J.css → tabulator-FITWTS6D.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {q}from'./chunk-
|
|
1
|
+
import {q}from'./chunk-WMVYPZRJ.js';import'./chunk-XX7GDJZT.js';import'./chunk-EX7TRSJS.js';import {useState,useCallback}from'react';import h from'@mui/material/IconButton';import y from'@mui/material/Typography';import w from'@mui/icons-material/CloudDownloadOutlined';import {useTranslation}from'react-i18next';import {jsxs,jsx}from'react/jsx-runtime';var v=e=>{let r=window.atob(e),t=r.length,n=new Uint8Array(t);for(let o=0;o<t;o++)n[o]=r.charCodeAt(o);return new Blob([n],{type:"application/octet-stream"})},g=e=>{let{t:r}=useTranslation(),[t,n]=useState(false),o=useCallback(async(c,l,s,m)=>{if(!(l==null&&!s))if(l!==null&&!s){let u=v(l),i=document.createElement("a");i.href=URL.createObjectURL(u),i.download=c,document.body.appendChild(i),i.click(),document.body.removeChild(i);}else n(true),await m(),n(false);},[]);return jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"95vh",minWidth:300,textAlign:"center"},children:[jsx(y,{variant:"h5",sx:{mb:2},children:r("A preview is not available for this file type. Click below to download the document.")}),t&&jsx(q,{text:"",size:120,textVariant:"body2",variant:void 0}),!t&&jsx(h,{onPointerUp:()=>o(e.fileName,e.fileInbase64,e.enableChunkDownload,e.downloadByChunkAsync),sx:{fontSize:"3rem",p:2},children:jsx(w,{fontSize:"inherit"})})]})},S=g;export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-7RKPIXVG.js';import {b}from'./chunk-LBMVBVXW.js';import {q}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-7RKPIXVG.js';import {b}from'./chunk-LBMVBVXW.js';import {q}from'./chunk-WMVYPZRJ.js';import'./chunk-XX7GDJZT.js';import'./chunk-EX7TRSJS.js';import {useState,useRef}from'react';import {pdfjs,Document,Page}from'react-pdf';import'react-pdf/dist/Page/TextLayer.css';import'react-pdf/dist/Page/AnnotationLayer.css';import U from'@mui/icons-material/ZoomIn';import A from'@mui/icons-material/ZoomOut';import O from'@mui/icons-material/RotateLeft';import j from'@mui/icons-material/RotateRight';import T from'@mui/material/Box';import i from'@mui/material/IconButton';import V from'@mui/icons-material/CloudDownloadOutlined';import {useTranslation}from'react-i18next';import {jsxs,jsx}from'react/jsx-runtime';pdfjs.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;var M=c=>{let n=window.atob(c),a=n.length,l=new Uint8Array(a);for(let e=0;e<a;e++)l[e]=n.charCodeAt(e);return new Blob([l],{type:"application/pdf"})},N=({fileName:c,fileInbase64:n})=>{let[a$1,l]=useState(null),[e,f]=useState(1.5),[h,u]=useState(0),p=useRef(null),{events:P}=a(p),{viewPort:x}=b(),{t:g}=useTranslation(),I=()=>{f(e+.3);},L=()=>{e>.3&&f(e-.3);},R=()=>{u(t=>t+90);},S=()=>{u(t=>t-90);},B=({numPages:t})=>{l(t);},k=t=>{if(t==null)return;let s=M(t),r=document.createElement("a");r.href=URL.createObjectURL(s),r.download=c,document.body.appendChild(r),r.click(),document.body.removeChild(r);};return jsxs("div",{style:{display:"flex",height:"95vh",minWidth:300},children:[jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"4.3em"},children:jsxs("div",{style:{textAlign:"center"},children:[jsx(i,{onPointerUp:I,children:jsx(U,{fontSize:"large"})}),jsx(i,{onPointerUp:L,children:jsx(A,{fontSize:"large"})}),jsx(i,{onPointerUp:R,children:jsx(j,{fontSize:"large"})}),jsx(i,{onPointerUp:S,children:jsx(O,{fontSize:"large"})}),jsx(T,{sx:{mt:5}}),jsx(i,{onPointerUp:()=>k(n),children:jsx(V,{fontSize:"large"})})]})}),jsx("div",{ref:p,...P,style:{overflow:"auto",whiteSpace:"nowrap",display:"flex",justifyContent:x.isMobileDevice?"none":"center",width:"100%",height:"100vh",cursor:"grab"},children:jsx("div",{className:"pdf-viewer-isolate",children:jsx(Document,{file:{data:n?atob(n):void 0},onLoadSuccess:B,loading:jsx(q,{text:g("Loading file..."),size:120,textVariant:"body2",variant:void 0}),children:Array.from(new Array(a$1),(t,s)=>jsx(Page,{pageNumber:s+1,scale:e,rotate:h,renderTextLayer:false,renderAnnotationLayer:false,loading:jsx(q,{text:g("Loading file..."),size:120,textVariant:"body2",variant:void 0})},`page_${s+1}`))})})})]})},no=N;
|
|
2
2
|
export{no as default};
|