@react-pdf-levelup/client 1.1.16 → 1.1.18
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var l=(d,c)=>{let t=atob(d),r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);let a=new Uint8Array(r),i=new Blob([a],{type:"application/pdf"}),n=URL.createObjectURL(i);if(document===void 0){console.error("document is undefined, only works in browser context");return}let e=document.createElement("a");e.href=n,e.download=c,document.body.appendChild(e),e.click(),document.body.removeChild(e),window.open(n,"_blank"),setTimeout(()=>{URL.revokeObjectURL(n);},100);},s=l;exports.decodeBase64Pdf=s;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../frontend/src/functions/decodeBase64Pdf.ts"],"names":["decodeBase64Pdf","base64","fileName","byteCharacters","byteNumbers","i","byteArray","blob","blobUrl","link","decodeBase64Pdf_default"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../frontend/src/functions/decodeBase64Pdf.ts"],"names":["decodeBase64Pdf","base64","fileName","byteCharacters","byteNumbers","i","byteArray","blob","blobUrl","link","decodeBase64Pdf_default"],"mappings":"aAAA,IAAMA,CAAAA,CAAkB,CAACC,CAAAA,CAAgBC,CAAAA,GAAqB,CAC5D,IAAMC,CAAAA,CAAiB,IAAA,CAAKF,CAAM,CAAA,CAC5BG,CAAAA,CAAc,IAAI,KAAA,CAAMD,CAAAA,CAAe,MAAM,CAAA,CACnD,IAAA,IAASE,EAAI,CAAA,CAAGA,CAAAA,CAAIF,CAAAA,CAAe,MAAA,CAAQE,CAAAA,EAAAA,CACzCD,CAAAA,CAAYC,CAAC,CAAA,CAAIF,CAAAA,CAAe,WAAWE,CAAC,CAAA,CAE9C,IAAMC,CAAAA,CAAY,IAAI,UAAA,CAAWF,CAAW,CAAA,CACtCG,CAAAA,CAAO,IAAI,IAAA,CAAK,CAACD,CAAS,CAAA,CAAG,CAAE,IAAA,CAAM,iBAAkB,CAAC,CAAA,CACxDE,CAAAA,CAAU,GAAA,CAAI,eAAA,CAAgBD,CAAI,EAGxC,GAAI,QAAA,GAAa,OAAW,CAC1B,OAAA,CAAQ,MAAM,sDAAsD,CAAA,CACpE,MACF,CAGA,IAAME,CAAAA,CAAO,SAAS,aAAA,CAAc,GAAG,CAAA,CACvCA,CAAAA,CAAK,IAAA,CAAOD,CAAAA,CACZC,EAAK,QAAA,CAAWP,CAAAA,CAChB,QAAA,CAAS,IAAA,CAAK,WAAA,CAAYO,CAAI,EAC9BA,CAAAA,CAAK,KAAA,GACL,QAAA,CAAS,IAAA,CAAK,YAAYA,CAAI,CAAA,CAG9B,MAAA,CAAO,IAAA,CAAKD,CAAAA,CAAS,QAAQ,EAG7B,UAAA,CAAW,IAAM,CACf,GAAA,CAAI,eAAA,CAAgBA,CAAO,EAC7B,CAAA,CAAG,GAAG,EACR,CAAA,CAEOE,CAAAA,CAAQV","file":"index.cjs","sourcesContent":["const decodeBase64Pdf = (base64: string, fileName: string) => {\r\n const byteCharacters = atob(base64);\r\n const byteNumbers = new Array(byteCharacters.length);\r\n for (let i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n const blob = new Blob([byteArray], { type: 'application/pdf' });\r\n const blobUrl = URL.createObjectURL(blob);\r\n\r\n\r\n if (document === undefined) {\r\n console.error(\"document is undefined, only works in browser context\");\r\n return;\r\n }\r\n\r\n // Crear un enlace para descargar el archivo\r\n const link = document.createElement('a');\r\n link.href = blobUrl;\r\n link.download = fileName;\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n\r\n // Abrir el PDF en una nueva pestaña\r\n window.open(blobUrl, '_blank');\r\n\r\n // Revocar el objeto URL después de un tiempo\r\n setTimeout(() => {\r\n URL.revokeObjectURL(blobUrl);\r\n }, 100);\r\n};\r\n\r\nexport default decodeBase64Pdf;"]}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var l=(d,c)=>{let t=atob(d),r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);let a=new Uint8Array(r),i=new Blob([a],{type:"application/pdf"}),n=URL.createObjectURL(i);if(document===void 0){console.error("document is undefined, only works in browser context");return}let e=document.createElement("a");e.href=n,e.download=c,document.body.appendChild(e),e.click(),document.body.removeChild(e),window.open(n,"_blank"),setTimeout(()=>{URL.revokeObjectURL(n);},100);},s=l;export{s as decodeBase64Pdf};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../frontend/src/functions/decodeBase64Pdf.ts"],"names":["decodeBase64Pdf","base64","fileName","byteCharacters","byteNumbers","i","byteArray","blob","blobUrl","link","decodeBase64Pdf_default"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../frontend/src/functions/decodeBase64Pdf.ts"],"names":["decodeBase64Pdf","base64","fileName","byteCharacters","byteNumbers","i","byteArray","blob","blobUrl","link","decodeBase64Pdf_default"],"mappings":"AAAA,IAAMA,CAAAA,CAAkB,CAACC,CAAAA,CAAgBC,CAAAA,GAAqB,CAC5D,IAAMC,CAAAA,CAAiB,IAAA,CAAKF,CAAM,CAAA,CAC5BG,CAAAA,CAAc,IAAI,KAAA,CAAMD,CAAAA,CAAe,MAAM,CAAA,CACnD,IAAA,IAASE,EAAI,CAAA,CAAGA,CAAAA,CAAIF,CAAAA,CAAe,MAAA,CAAQE,CAAAA,EAAAA,CACzCD,CAAAA,CAAYC,CAAC,CAAA,CAAIF,CAAAA,CAAe,WAAWE,CAAC,CAAA,CAE9C,IAAMC,CAAAA,CAAY,IAAI,UAAA,CAAWF,CAAW,CAAA,CACtCG,CAAAA,CAAO,IAAI,IAAA,CAAK,CAACD,CAAS,CAAA,CAAG,CAAE,IAAA,CAAM,iBAAkB,CAAC,CAAA,CACxDE,CAAAA,CAAU,GAAA,CAAI,eAAA,CAAgBD,CAAI,EAGxC,GAAI,QAAA,GAAa,OAAW,CAC1B,OAAA,CAAQ,MAAM,sDAAsD,CAAA,CACpE,MACF,CAGA,IAAME,CAAAA,CAAO,SAAS,aAAA,CAAc,GAAG,CAAA,CACvCA,CAAAA,CAAK,IAAA,CAAOD,CAAAA,CACZC,EAAK,QAAA,CAAWP,CAAAA,CAChB,QAAA,CAAS,IAAA,CAAK,WAAA,CAAYO,CAAI,EAC9BA,CAAAA,CAAK,KAAA,GACL,QAAA,CAAS,IAAA,CAAK,YAAYA,CAAI,CAAA,CAG9B,MAAA,CAAO,IAAA,CAAKD,CAAAA,CAAS,QAAQ,EAG7B,UAAA,CAAW,IAAM,CACf,GAAA,CAAI,eAAA,CAAgBA,CAAO,EAC7B,CAAA,CAAG,GAAG,EACR,CAAA,CAEOE,CAAAA,CAAQV","file":"index.js","sourcesContent":["const decodeBase64Pdf = (base64: string, fileName: string) => {\r\n const byteCharacters = atob(base64);\r\n const byteNumbers = new Array(byteCharacters.length);\r\n for (let i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n const blob = new Blob([byteArray], { type: 'application/pdf' });\r\n const blobUrl = URL.createObjectURL(blob);\r\n\r\n\r\n if (document === undefined) {\r\n console.error(\"document is undefined, only works in browser context\");\r\n return;\r\n }\r\n\r\n // Crear un enlace para descargar el archivo\r\n const link = document.createElement('a');\r\n link.href = blobUrl;\r\n link.download = fileName;\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n\r\n // Abrir el PDF en una nueva pestaña\r\n window.open(blobUrl, '_blank');\r\n\r\n // Revocar el objeto URL después de un tiempo\r\n setTimeout(() => {\r\n URL.revokeObjectURL(blobUrl);\r\n }, 100);\r\n};\r\n\r\nexport default decodeBase64Pdf;"]}
|