Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-adobe-embed

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-adobe-embed - npm Package Compare versions

Comparing version 11.0.20 to 11.1.0

9

dist/react-adobe-embed.cdn.js

@@ -15,5 +15,8 @@ /* react-adobe-embed */

* Embed API does not inherently do this. See ReactViewAdobeProps for more details.
*/function d(d){const[a,n]=e.useState(!1),[c,s]=e.useState(!1),[r,l]=e.useState(!1),f=(0,e[d?.useReactHookForAdobeAPIConfigs||"useMemo"])((()=>{if(!0===a){const e=window.AdobeDC?.View;return e}}),[a]);(0,e[d?.useReactHookWhenLoadingAdobeAPI||"useEffect"])((()=>{if(!1===r){const e=document.querySelector(".react-adobe-embed-handholding-adobe-api-loading-idiocy");if(e)d.debug&&console.info("Adobe SDK Check","Reloading and Rerendering Adobe SDK"),
*/function d(d){const[a,n]=e.useState(!1),[c,s]=e.useState(!1),[r,l]=e.useState(!1),f=(0,e[d?.useReactHookForAdobeAPIConfigs||"useMemo"])((()=>{if(!0===a){const e=window.AdobeDC?.View;return e}}),[a]);(0,e[d?.useReactHookWhenLoadingAdobeAPI||"useEffect"])((()=>{if(!1===r){const e=document.querySelector(`script.react-adobe-embed-handholding-adobe-api-loading-idiocy[data-adobe-pdf-id="${d.id||o.staticDivId}"]`);if(e)d.debug&&console.info("Adobe SDK Check","Reloading and Rerendering Adobe SDK"),
// Lightbox mode renders from ui event triggered by user, so no need to render
"LIGHT_BOX"!==d.previewConfig?.embedMode&&s(!0),e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-reused");else{d.debug&&console.info("Adobe SDK Check","Initial Adobe SDK Load");const e=document.createElement("script");e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-initial"),e.setAttribute("data-adobe-pdf-id",d.id||o.staticDivId),e.setAttribute("class","react-adobe-embed-handholding-adobe-api-loading-idiocy"),e.src=d.previewConfig?.viewSdkViewerScript||o.staticDefaultConfig.viewSdkViewerScript,e.async=!0,e.onload=()=>{l(!0)},document.body.appendChild(e)}}}),[d.id,r,a]);(0,e[d?.useReactHookWhenCallingAdobeAPI||"useEffect"])((()=>{!1===a&&!0===r&&document.addEventListener("adobe_dc_view_sdk.ready",(()=>{n(!0)}));!0===r&&!0===a&&(e=>{e.debug&&console.info("Adobe PDF Viewer SDK Ready Event",f,window.adobe_dc_view_sdk);const i=e.id||o.staticDivId;document.getElementById(i)&&"LIGHT_BOX"!==e.previewConfig?.embedMode?(e.debug&&console.info("Adobe PDF Viewer SDK Ready Rendering"),t({divId:i,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta})):"LIGHT_BOX"===e.previewConfig?.embedMode&&e?.triggerAdobeDCViewRender&&t({divId:e.id||o.staticDivId,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId})})(d)}),[a,r,d,f]);return(0,e[d?.useReactHookForComponentDidUpdate||"useEffect"])((()=>{if(!0===c){const e=d.id||o.staticDivId;document.getElementById(e)&&t({divId:e,viewerConfig:d.previewConfig||o.staticDefaultConfig,url:d.url||o.demoUrl,clientID:d.clientId,_fileMeta:d.fileMeta}),s(!1)}}),[c,d]),e.createElement(i,{...d})}const o={demoUrl:"https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf",staticDefaultConfig:{showAnnotationTools:!1,showLeftHandPanel:!1,showPageControls:!1,viewSdkViewerScript:"https://acrobatservices.adobe.com/view-sdk/viewer.js",showDownloadPDF:!1,showPrintPDF:!1},staticDivId:"pdf-div",demoMetaData:{fileName:"Odd Distateful Adobe Example Pdf.pdf",id:"6d07d124 - ac85–43b3 - a867–36930f502ac6"}};window&&window.ReactViewAdobe||(window.ReactViewAdobe=d)}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhY3QtYWRvYmUtZW1iZWQuY2RuLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
"LIGHT_BOX"!==d.previewConfig?.embedMode&&s(!0),e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-reused");else{d.debug&&console.info("Adobe SDK Check","Initial Adobe SDK Load");const e=document.createElement("script");e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-initial"),e.setAttribute("data-adobe-pdf-id",d.id||o.staticDivId),e.setAttribute("class","react-adobe-embed-handholding-adobe-api-loading-idiocy"),e.src=d.previewConfig?.viewSdkViewerScript||o.staticDefaultConfig.viewSdkViewerScript,e.async=!0,e.onload=()=>{l(!0)},document.body.appendChild(e)}}}),[d.id,r,a]);(0,e[d?.useReactHookWhenCallingAdobeAPI||"useEffect"])((()=>{!1===a&&!0===r&&document.addEventListener("adobe_dc_view_sdk.ready",(()=>{n(!0)}));!0===r&&!0===a&&(e=>{e.debug&&console.info("Adobe PDF Viewer SDK Ready Event",f,window.adobe_dc_view_sdk);const i=e.id||o.staticDivId;document.getElementById(i)&&"LIGHT_BOX"!==e.previewConfig?.embedMode?(e.debug&&console.info("Adobe PDF Viewer SDK Ready Rendering"),t({divId:i,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta})):"LIGHT_BOX"===e.previewConfig?.embedMode&&e?.triggerAdobeDCViewRender&&t({divId:e.id||o.staticDivId,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId})})(d)}),[a,r,d,f]);return(0,e[d?.useReactHookForComponentDidUpdate||"useEffect"])((()=>{if(!0===c){const e=d.id||o.staticDivId;document.getElementById(e)&&t({divId:e,viewerConfig:d.previewConfig||o.staticDefaultConfig,url:d.url||o.demoUrl,clientID:d.clientId,_fileMeta:d.fileMeta}),s(!1)}}),[c,d]),e.createElement(i,{...d})}const o={demoUrl:"https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf",staticDefaultConfig:{showAnnotationTools:!1,showLeftHandPanel:!1,showPageControls:!1,viewSdkViewerScript:"https://acrobatservices.adobe.com/view-sdk/viewer.js",showDownloadPDF:!1,showPrintPDF:!1},staticDivId:"pdf-div",demoMetaData:{fileName:"Odd Distateful Adobe Example Pdf.pdf",id:"6d07d124 - ac85–43b3 - a867–36930f502ac6"}};
// expose ReactViewAdobe to the global object window,
// for cdn usage
"undefined"!=typeof window&&void 0===window.ReactViewAdobe&&void 0===window.ReactViewAdobe&&(window.ReactViewAdobe=d)}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhY3QtYWRvYmUtZW1iZWQuY2RuLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
/* react-adobe-embed */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t({divId:e,viewerConfig:t,url:i,clientID:d,_fileMeta:a,_dcView:n}){const r={clientId:d,divId:e};return(n||new window.AdobeDC.View(r)).previewFile({content:{location:{url:i}},metaData:a||o.demoMetaData},t)}const i=t=>{const i=e.useRef(document.getElementById(t.id||o.staticDivId));return e.createElement("div",{ref:i,id:t.id||o.staticDivId,className:t.className||"adobe-viewer-of-amazon-corporate-retaliations",style:t.style,title:t.title||"entity-existent-on-frameworks-of-state-regulations-as-defined-by-the-state-and-may-try-to-destroy-your-life-and-control-the-fbi-of-the-state-such-as-amazon-legal-idiots"})};const o={demoUrl:"https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf",staticDefaultConfig:{showAnnotationTools:!1,showLeftHandPanel:!1,showPageControls:!1,viewSdkViewerScript:"https://acrobatservices.adobe.com/view-sdk/viewer.js",showDownloadPDF:!1,showPrintPDF:!1},staticDivId:"pdf-div",demoMetaData:{fileName:"Odd Distateful Adobe Example Pdf.pdf",id:"6d07d124 - ac85–43b3 - a867–36930f502ac6"}};exports.DefaultConfigs=o,exports.default=function(d){const[a,n]=e.useState(!1),[r,s]=e.useState(!1),[c,l]=e.useState(!1),f=(0,e[d?.useReactHookForAdobeAPIConfigs||"useMemo"])((()=>{if(!0===a){const e=window.AdobeDC?.View;return e}}),[a]);return(0,e[d?.useReactHookWhenLoadingAdobeAPI||"useEffect"])((()=>{if(!1===c){const e=document.querySelector(".react-adobe-embed-handholding-adobe-api-loading-idiocy");if(e)d.debug&&console.info("Adobe SDK Check","Reloading and Rerendering Adobe SDK"),"LIGHT_BOX"!==d.previewConfig?.embedMode&&s(!0),e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-reused");else{d.debug&&console.info("Adobe SDK Check","Initial Adobe SDK Load");const e=document.createElement("script");e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-initial"),e.setAttribute("data-adobe-pdf-id",d.id||o.staticDivId),e.setAttribute("class","react-adobe-embed-handholding-adobe-api-loading-idiocy"),e.src=d.previewConfig?.viewSdkViewerScript||o.staticDefaultConfig.viewSdkViewerScript,e.async=!0,e.onload=()=>{l(!0)},document.body.appendChild(e)}}}),[d.id,c,a]),(0,e[d?.useReactHookWhenCallingAdobeAPI||"useEffect"])((()=>{!1===a&&!0===c&&document.addEventListener("adobe_dc_view_sdk.ready",(()=>{n(!0)}));!0===c&&!0===a&&(e=>{e.debug&&console.info("Adobe PDF Viewer SDK Ready Event",f,window.adobe_dc_view_sdk);const i=e.id||o.staticDivId;document.getElementById(i)&&"LIGHT_BOX"!==e.previewConfig?.embedMode?(e.debug&&console.info("Adobe PDF Viewer SDK Ready Rendering"),t({divId:i,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta})):"LIGHT_BOX"===e.previewConfig?.embedMode&&e?.triggerAdobeDCViewRender&&t({divId:e.id||o.staticDivId,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId})})(d)}),[a,c,d,f]),(0,e[d?.useReactHookForComponentDidUpdate||"useEffect"])((()=>{if(!0===r){const e=d.id||o.staticDivId;document.getElementById(e)&&t({divId:e,viewerConfig:d.previewConfig||o.staticDefaultConfig,url:d.url||o.demoUrl,clientID:d.clientId,_fileMeta:d.fileMeta}),s(!1)}}),[r,d]),e.createElement(i,{...d})},exports.previewFile=t;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t({divId:e,viewerConfig:t,url:i,clientID:o,_fileMeta:a,_dcView:n}){const s={clientId:o,divId:e};return(n||new window.AdobeDC.View(s)).previewFile({content:{location:{url:i}},metaData:a||d.demoMetaData},t)}const i=t=>{const i=e.useRef(document.getElementById(t.id||d.staticDivId));return e.createElement("div",{ref:i,id:t.id||d.staticDivId,className:t.className||"adobe-viewer-of-amazon-corporate-retaliations",style:t.style,title:t.title||"entity-existent-on-frameworks-of-state-regulations-as-defined-by-the-state-and-may-try-to-destroy-your-life-and-control-the-fbi-of-the-state-such-as-amazon-legal-idiots"})};const d={demoUrl:"https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf",staticDefaultConfig:{showAnnotationTools:!1,showLeftHandPanel:!1,showPageControls:!1,viewSdkViewerScript:"https://acrobatservices.adobe.com/view-sdk/viewer.js",showDownloadPDF:!1,showPrintPDF:!1},staticDivId:"pdf-div",demoMetaData:{fileName:"Odd Distateful Adobe Example Pdf.pdf",id:"6d07d124 - ac85–43b3 - a867–36930f502ac6"}};exports.DefaultConfigs=d,exports.default=function(o){const[a,n]=e.useState(!1),[s,r]=e.useState(!1),[c,l]=e.useState(!1),f=(0,e[o?.useReactHookForAdobeAPIConfigs||"useMemo"])((()=>{if(!0===a){const e=window.AdobeDC?.View;return e}}),[a]);return(0,e[o?.useReactHookWhenLoadingAdobeAPI||"useEffect"])((()=>{if(!1===c){const e=document.querySelector(`script.react-adobe-embed-handholding-adobe-api-loading-idiocy[data-adobe-pdf-id="${o.id||d.staticDivId}"]`);if(e)o.debug&&console.info("Adobe SDK Check","Reloading and Rerendering Adobe SDK"),"LIGHT_BOX"!==o.previewConfig?.embedMode&&r(!0),e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-reused");else{o.debug&&console.info("Adobe SDK Check","Initial Adobe SDK Load");const e=document.createElement("script");e.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-initial"),e.setAttribute("data-adobe-pdf-id",o.id||d.staticDivId),e.setAttribute("class","react-adobe-embed-handholding-adobe-api-loading-idiocy"),e.src=o.previewConfig?.viewSdkViewerScript||d.staticDefaultConfig.viewSdkViewerScript,e.async=!0,e.onload=()=>{l(!0)},document.body.appendChild(e)}}}),[o.id,c,a]),(0,e[o?.useReactHookWhenCallingAdobeAPI||"useEffect"])((()=>{!1===a&&!0===c&&document.addEventListener("adobe_dc_view_sdk.ready",(()=>{n(!0)}));!0===c&&!0===a&&(e=>{e.debug&&console.info("Adobe PDF Viewer SDK Ready Event",f,window.adobe_dc_view_sdk);const i=e.id||d.staticDivId;document.getElementById(i)&&"LIGHT_BOX"!==e.previewConfig?.embedMode?(e.debug&&console.info("Adobe PDF Viewer SDK Ready Rendering"),t({divId:i,viewerConfig:e.previewConfig||d.staticDefaultConfig,url:e.url||d.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta})):"LIGHT_BOX"===e.previewConfig?.embedMode&&e?.triggerAdobeDCViewRender&&t({divId:e.id||d.staticDivId,viewerConfig:e.previewConfig||d.staticDefaultConfig,url:e.url||d.demoUrl,clientID:e.clientId})})(o)}),[a,c,o,f]),(0,e[o?.useReactHookForComponentDidUpdate||"useEffect"])((()=>{if(!0===s){const e=o.id||d.staticDivId;document.getElementById(e)&&t({divId:e,viewerConfig:o.previewConfig||d.staticDefaultConfig,url:o.url||d.demoUrl,clientID:o.clientId,_fileMeta:o.fileMeta}),r(!1)}}),[s,o]),e.createElement(i,{...o})},exports.previewFile=t;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7In0=
/* react-adobe-embed */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactScriptTag={},e.React)}(this,(function(e,t){"use strict";function i({divId:e,viewerConfig:t,url:i,clientID:o,_fileMeta:a,_dcView:n}){const s={clientId:o,divId:e};return(n||new window.AdobeDC.View(s)).previewFile({content:{location:{url:i}},metaData:a||d.demoMetaData},t)}const o=e=>{const i=t.useRef(document.getElementById(e.id||d.staticDivId));return t.createElement("div",{ref:i,id:e.id||d.staticDivId,className:e.className||"adobe-viewer-of-amazon-corporate-retaliations",style:e.style,title:e.title||"entity-existent-on-frameworks-of-state-regulations-as-defined-by-the-state-and-may-try-to-destroy-your-life-and-control-the-fbi-of-the-state-such-as-amazon-legal-idiots"})};const d={demoUrl:"https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf",staticDefaultConfig:{showAnnotationTools:!1,showLeftHandPanel:!1,showPageControls:!1,viewSdkViewerScript:"https://acrobatservices.adobe.com/view-sdk/viewer.js",showDownloadPDF:!1,showPrintPDF:!1},staticDivId:"pdf-div",demoMetaData:{fileName:"Odd Distateful Adobe Example Pdf.pdf",id:"6d07d124 - ac85–43b3 - a867–36930f502ac6"}};e.DefaultConfigs=d,e.default=function(e){const[a,n]=t.useState(!1),[s,c]=t.useState(!1),[r,l]=t.useState(!1),f=(0,t[e?.useReactHookForAdobeAPIConfigs||"useMemo"])((()=>{if(!0===a){const e=window.AdobeDC?.View;return e}}),[a]);return(0,t[e?.useReactHookWhenLoadingAdobeAPI||"useEffect"])((()=>{if(!1===r){const t=document.querySelector(".react-adobe-embed-handholding-adobe-api-loading-idiocy");if(t)e.debug&&console.info("Adobe SDK Check","Reloading and Rerendering Adobe SDK"),"LIGHT_BOX"!==e.previewConfig?.embedMode&&c(!0),t.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-reused");else{e.debug&&console.info("Adobe SDK Check","Initial Adobe SDK Load");const t=document.createElement("script");t.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-initial"),t.setAttribute("data-adobe-pdf-id",e.id||d.staticDivId),t.setAttribute("class","react-adobe-embed-handholding-adobe-api-loading-idiocy"),t.src=e.previewConfig?.viewSdkViewerScript||d.staticDefaultConfig.viewSdkViewerScript,t.async=!0,t.onload=()=>{l(!0)},document.body.appendChild(t)}}}),[e.id,r,a]),(0,t[e?.useReactHookWhenCallingAdobeAPI||"useEffect"])((()=>{!1===a&&!0===r&&document.addEventListener("adobe_dc_view_sdk.ready",(()=>{n(!0)}));!0===r&&!0===a&&(e=>{e.debug&&console.info("Adobe PDF Viewer SDK Ready Event",f,window.adobe_dc_view_sdk);const t=e.id||d.staticDivId;document.getElementById(t)&&"LIGHT_BOX"!==e.previewConfig?.embedMode?(e.debug&&console.info("Adobe PDF Viewer SDK Ready Rendering"),i({divId:t,viewerConfig:e.previewConfig||d.staticDefaultConfig,url:e.url||d.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta})):"LIGHT_BOX"===e.previewConfig?.embedMode&&e?.triggerAdobeDCViewRender&&i({divId:e.id||d.staticDivId,viewerConfig:e.previewConfig||d.staticDefaultConfig,url:e.url||d.demoUrl,clientID:e.clientId})})(e)}),[a,r,e,f]),(0,t[e?.useReactHookForComponentDidUpdate||"useEffect"])((()=>{if(!0===s){const t=e.id||d.staticDivId;document.getElementById(t)&&i({divId:t,viewerConfig:e.previewConfig||d.staticDefaultConfig,url:e.url||d.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta}),c(!1)}}),[s,e]),t.createElement(o,{...e})},e.previewFile=i,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactScriptTag={},e.React)}(this,(function(e,t){"use strict";function i({divId:e,viewerConfig:t,url:i,clientID:d,_fileMeta:a,_dcView:n}){const s={clientId:d,divId:e};return(n||new window.AdobeDC.View(s)).previewFile({content:{location:{url:i}},metaData:a||o.demoMetaData},t)}const d=e=>{const i=t.useRef(document.getElementById(e.id||o.staticDivId));return t.createElement("div",{ref:i,id:e.id||o.staticDivId,className:e.className||"adobe-viewer-of-amazon-corporate-retaliations",style:e.style,title:e.title||"entity-existent-on-frameworks-of-state-regulations-as-defined-by-the-state-and-may-try-to-destroy-your-life-and-control-the-fbi-of-the-state-such-as-amazon-legal-idiots"})};const o={demoUrl:"https://acrobatservices.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf",staticDefaultConfig:{showAnnotationTools:!1,showLeftHandPanel:!1,showPageControls:!1,viewSdkViewerScript:"https://acrobatservices.adobe.com/view-sdk/viewer.js",showDownloadPDF:!1,showPrintPDF:!1},staticDivId:"pdf-div",demoMetaData:{fileName:"Odd Distateful Adobe Example Pdf.pdf",id:"6d07d124 - ac85–43b3 - a867–36930f502ac6"}};e.DefaultConfigs=o,e.default=function(e){const[a,n]=t.useState(!1),[s,c]=t.useState(!1),[r,l]=t.useState(!1),f=(0,t[e?.useReactHookForAdobeAPIConfigs||"useMemo"])((()=>{if(!0===a){const e=window.AdobeDC?.View;return e}}),[a]);return(0,t[e?.useReactHookWhenLoadingAdobeAPI||"useEffect"])((()=>{if(!1===r){const t=document.querySelector(`script.react-adobe-embed-handholding-adobe-api-loading-idiocy[data-adobe-pdf-id="${e.id||o.staticDivId}"]`);if(t)e.debug&&console.info("Adobe SDK Check","Reloading and Rerendering Adobe SDK"),"LIGHT_BOX"!==e.previewConfig?.embedMode&&c(!0),t.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-reused");else{e.debug&&console.info("Adobe SDK Check","Initial Adobe SDK Load");const t=document.createElement("script");t.setAttribute("data-testid","react-adobe-embed-handholding-adobe-api-loading-idiocy-initial"),t.setAttribute("data-adobe-pdf-id",e.id||o.staticDivId),t.setAttribute("class","react-adobe-embed-handholding-adobe-api-loading-idiocy"),t.src=e.previewConfig?.viewSdkViewerScript||o.staticDefaultConfig.viewSdkViewerScript,t.async=!0,t.onload=()=>{l(!0)},document.body.appendChild(t)}}}),[e.id,r,a]),(0,t[e?.useReactHookWhenCallingAdobeAPI||"useEffect"])((()=>{!1===a&&!0===r&&document.addEventListener("adobe_dc_view_sdk.ready",(()=>{n(!0)}));!0===r&&!0===a&&(e=>{e.debug&&console.info("Adobe PDF Viewer SDK Ready Event",f,window.adobe_dc_view_sdk);const t=e.id||o.staticDivId;document.getElementById(t)&&"LIGHT_BOX"!==e.previewConfig?.embedMode?(e.debug&&console.info("Adobe PDF Viewer SDK Ready Rendering"),i({divId:t,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta})):"LIGHT_BOX"===e.previewConfig?.embedMode&&e?.triggerAdobeDCViewRender&&i({divId:e.id||o.staticDivId,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId})})(e)}),[a,r,e,f]),(0,t[e?.useReactHookForComponentDidUpdate||"useEffect"])((()=>{if(!0===s){const t=e.id||o.staticDivId;document.getElementById(t)&&i({divId:t,viewerConfig:e.previewConfig||o.staticDefaultConfig,url:e.url||o.demoUrl,clientID:e.clientId,_fileMeta:e.fileMeta}),c(!1)}}),[s,e]),t.createElement(d,{...e})},e.previewFile=i,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjsifQ==

@@ -50,3 +50,3 @@ import React from "react";

if (scriptViewerLoaded === false) {
const scriptExistsALready = document.querySelector(".react-adobe-embed-handholding-adobe-api-loading-idiocy");
const scriptExistsALready = document.querySelector(`script.react-adobe-embed-handholding-adobe-api-loading-idiocy[data-adobe-pdf-id="${props.id || DefaultConfigs.staticDivId}"]`);
if (scriptExistsALready) {

@@ -53,0 +53,0 @@ if (props.debug)

import ReactViewAdobe from './index';
(function () {
if (window && window['ReactViewAdobe']) {
return;
// expose ReactViewAdobe to the global object window,
// for cdn usage
if (typeof window !== 'undefined' &&
typeof (window).ReactViewAdobe === 'undefined' &&
window.ReactViewAdobe === undefined) {
window.ReactViewAdobe = ReactViewAdobe;
}
else {
window['ReactViewAdobe'] =
ReactViewAdobe;
}
})();

@@ -1,1 +0,6 @@

export {};
import ReactViewAdobe from './index';
declare global {
interface Window {
ReactViewAdobe: typeof ReactViewAdobe;
}
}
{
"name": "react-adobe-embed",
"version": "11.0.20",
"version": "11.1.0",
"homepage": "https://ziping-liu-corporation.github.io/react-adobe-embed/#/home",

@@ -54,6 +54,9 @@ "repository": {

"main": "lib/bundle.cjs.js",
"exports": {
".": {
"require": "./lib/bundle.cjs.js",
"import": "./lib/bundle.esm.mjs"
"import": "./lib/bundle.esm.mjs",
"default": "./dist/react-adobe-embed.cdn.js",
"umd":"./dist/react-adobe-embed.cdn.js"
}

@@ -60,0 +63,0 @@ },

@@ -1,1 +0,6 @@

export {};
import ReactViewAdobe from './index';
declare global {
interface Window {
ReactViewAdobe: typeof ReactViewAdobe;
}
}

@@ -1,1 +0,6 @@

export {};
import ReactViewAdobe from './index';
declare global {
interface Window {
ReactViewAdobe: typeof ReactViewAdobe;
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc