@react-pdf-viewer/get-file
Advanced tools
Comparing version 2.9.1 to 2.10.0
@@ -17,5 +17,3 @@ 'use strict'; | ||
enumerable: true, | ||
get: function () { | ||
return e[k]; | ||
} | ||
get: function () { return e[k]; } | ||
}); | ||
@@ -25,3 +23,3 @@ } | ||
} | ||
n['default'] = e; | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
@@ -28,0 +26,0 @@ } |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@react-pdf-viewer/core");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=n(e),r=function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=function(){return o.createElement(t.Icon,{size:16},o.createElement("path",{d:"M11.5 19.5L11.5 5"}),o.createElement("path",{d:"M17 14L11.5 19.5 6 14"}),o.createElement("path",{d:"M17.5.5h5a1,1,0,0,1,1,1v21a1,1,0,0,1-1,1h-5"}),o.createElement("path",{d:"M6.5.5h-5a1,1,0,0,0-1,1v21a1,1,0,0,0,1,1h5"}))},l={left:0,top:8},c=function(e){var n=e.onClick,r=o.useContext(t.LocalizationContext).l10n,c=r&&r.download?r.download.download:"Download";return o.createElement(t.Tooltip,{ariaControlsSuffix:"get-file",position:t.Position.BottomCenter,target:o.createElement(t.MinimalButton,{ariaLabel:c,onClick:n},o.createElement(a,null)),content:function(){return c},offset:l})},i=function(e){var t=e.children,n=e.fileNameGenerator,r=e.store,a=o.useState(r.get("file")),l=a[0],i=a[1],u=function(e){i(e)};o.useEffect((function(){return r.subscribe("file",u),function(){r.unsubscribe("file",u)}}),[]);return(t||function(e){return o.createElement(c,{onClick:e.onClick})})({onClick:function(){var e,t,o,r;l&&(e=l,t=n(l),o="string"==typeof e.data?"":URL.createObjectURL(new Blob([e.data],{type:"application/pdf"})),(r=document.createElement("a")).style.display="none",r.href=o||e.name,r.setAttribute("download",t),document.body.appendChild(r),r.click(),document.body.removeChild(r),o&&URL.revokeObjectURL(o))}})},u=function(e){var n=e.onClick,r=o.useContext(t.LocalizationContext).l10n,l=r&&r.download?r.download.download:"Download";return o.createElement(t.MenuItem,{icon:o.createElement(a,null),onClick:n},l)}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@react-pdf-viewer/core");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=n(e),r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},a=function(){return o.createElement(t.Icon,{size:16},o.createElement("path",{d:"M11.5 19.5L11.5 5"}),o.createElement("path",{d:"M17 14L11.5 19.5 6 14"}),o.createElement("path",{d:"M17.5.5h5a1,1,0,0,1,1,1v21a1,1,0,0,1-1,1h-5"}),o.createElement("path",{d:"M6.5.5h-5a1,1,0,0,0-1,1v21a1,1,0,0,0,1,1h5"}))},l={left:0,top:8},c=function(e){var n=e.onClick,r=o.useContext(t.LocalizationContext).l10n,c=r&&r.download?r.download.download:"Download";return o.createElement(t.Tooltip,{ariaControlsSuffix:"get-file",position:t.Position.BottomCenter,target:o.createElement(t.MinimalButton,{ariaLabel:c,onClick:n},o.createElement(a,null)),content:function(){return c},offset:l})},i=function(e){var t=e.children,n=e.fileNameGenerator,r=e.store,a=o.useState(r.get("file")),l=a[0],i=a[1],u=function(e){i(e)};o.useEffect((function(){return r.subscribe("file",u),function(){r.unsubscribe("file",u)}}),[]);return(t||function(e){return o.createElement(c,{onClick:e.onClick})})({onClick:function(){var e,t,o,r;l&&(e=l,t=n(l),o="string"==typeof e.data?"":URL.createObjectURL(new Blob([e.data],{type:"application/pdf"})),(r=document.createElement("a")).style.display="none",r.href=o||e.name,r.setAttribute("download",t),document.body.appendChild(r),r.click(),document.body.removeChild(r),o&&URL.revokeObjectURL(o))}})},u=function(e){var n=e.onClick,r=o.useContext(t.LocalizationContext).l10n,l=r&&r.download?r.download.download:"Download";return o.createElement(t.MenuItem,{icon:o.createElement(a,null),onClick:n},l)}; | ||
/*! ***************************************************************************** | ||
@@ -3,0 +3,0 @@ Copyright (c) Microsoft Corporation. |
{ | ||
"name": "@react-pdf-viewer/get-file", | ||
"version": "2.9.1", | ||
"version": "2.10.0", | ||
"description": "A React component to view a PDF document", | ||
@@ -36,3 +36,3 @@ "license": "https://react-pdf-viewer.dev/license", | ||
"dependencies": { | ||
"@react-pdf-viewer/core": "2.9.1" | ||
"@react-pdf-viewer/core": "2.10.0" | ||
}, | ||
@@ -50,3 +50,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "59d2a32a4609a5920d2d56a95d9cbdf5cc4770a7" | ||
"gitHead": "9318fa98123d3bb4cef78be6fbff29b370a8b1e0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14567
194
+ Added@react-pdf-viewer/core@2.10.0(transitive)
- Removed@react-pdf-viewer/core@2.9.1(transitive)