@react-pdf-viewer/rotate
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -5,4 +5,4 @@ 'use strict'; | ||
var core = require('@react-pdf-viewer/core'); | ||
var React = require('react'); | ||
var core = require('@react-pdf-viewer/core'); | ||
@@ -29,2 +29,8 @@ function _interopNamespace(e) { | ||
var RotateBackwardIcon = function () { return (React__namespace.createElement(core.Icon, { ignoreDirection: true, size: 16 }, | ||
React__namespace.createElement("path", { d: "M3.434,10.537c0.141-0.438,0.316-0.864,0.523-1.274\n M3.069,14.425C3.023,14.053,3,13.679,3,13.305 c0-0.291,0.014-0.579,0.041-0.863\n M4.389,18.111c-0.341-0.539-0.623-1.112-0.843-1.711\n M7.163,20.9 c-0.543-0.345-1.048-0.747-1.506-1.2\n M10.98,22.248c-0.65-0.074-1.29-0.218-1.909-0.431\n M10,4.25h2 c4.987,0.015,9.017,4.069,9.003,9.055c-0.013,4.581-3.456,8.426-8.008,8.945\n M13.5,1.75L10,4.25l3.5,2.5" }))); }; | ||
var RotateForwardIcon = function () { return (React__namespace.createElement(core.Icon, { ignoreDirection: true, size: 16 }, | ||
React__namespace.createElement("path", { d: "M20.566,10.537c-0.141-0.438-0.316-0.864-0.523-1.274\n M20.931,14.425C20.977,14.053,21,13.679,21,13.305 c0-0.291-0.014-0.579-0.041-0.863\n M19.611,18.111c0.341-0.539,0.624-1.114,0.843-1.713\n M16.837,20.9 c0.543-0.345,1.048-0.747,1.506-1.2\n M13.02,22.248c0.65-0.074,1.29-0.218,1.909-0.431\n M14,4.25h-2 c-4.987,0.015-9.017,4.069-9.003,9.055c0.013,4.581,3.456,8.426,8.008,8.945\n M10.5,1.75l3.5,2.5l-3.5,2.5" }))); }; | ||
/****************************************************************************** | ||
@@ -56,8 +62,2 @@ Copyright (c) Microsoft Corporation. | ||
var RotateBackwardIcon = function () { return (React__namespace.createElement(core.Icon, { ignoreDirection: true, size: 16 }, | ||
React__namespace.createElement("path", { d: "M3.434,10.537c0.141-0.438,0.316-0.864,0.523-1.274\n M3.069,14.425C3.023,14.053,3,13.679,3,13.305 c0-0.291,0.014-0.579,0.041-0.863\n M4.389,18.111c-0.341-0.539-0.623-1.112-0.843-1.711\n M7.163,20.9 c-0.543-0.345-1.048-0.747-1.506-1.2\n M10.98,22.248c-0.65-0.074-1.29-0.218-1.909-0.431\n M10,4.25h2 c4.987,0.015,9.017,4.069,9.003,9.055c-0.013,4.581-3.456,8.426-8.008,8.945\n M13.5,1.75L10,4.25l3.5,2.5" }))); }; | ||
var RotateForwardIcon = function () { return (React__namespace.createElement(core.Icon, { ignoreDirection: true, size: 16 }, | ||
React__namespace.createElement("path", { d: "M20.566,10.537c-0.141-0.438-0.316-0.864-0.523-1.274\n M20.931,14.425C20.977,14.053,21,13.679,21,13.305 c0-0.291-0.014-0.579-0.041-0.863\n M19.611,18.111c0.341-0.539,0.624-1.114,0.843-1.713\n M16.837,20.9 c0.543-0.345,1.048-0.747,1.506-1.2\n M13.02,22.248c0.65-0.074,1.29-0.218,1.909-0.431\n M14,4.25h-2 c-4.987,0.015-9.017,4.069-9.003,9.055c0.013,4.581,3.456,8.426,8.008,8.945\n M10.5,1.75l3.5,2.5l-3.5,2.5" }))); }; | ||
var TOOLTIP_OFFSET = { left: 0, top: 8 }; | ||
@@ -64,0 +64,0 @@ var RotateButton = function (_a) { |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("@react-pdf-viewer/core");function r(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var n=r(t),o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)},c=function(){return n.createElement(e.Icon,{ignoreDirection:!0,size:16},n.createElement("path",{d:"M3.434,10.537c0.141-0.438,0.316-0.864,0.523-1.274\n M3.069,14.425C3.023,14.053,3,13.679,3,13.305 c0-0.291,0.014-0.579,0.041-0.863\n M4.389,18.111c-0.341-0.539-0.623-1.112-0.843-1.711\n M7.163,20.9 c-0.543-0.345-1.048-0.747-1.506-1.2\n M10.98,22.248c-0.65-0.074-1.29-0.218-1.909-0.431\n M10,4.25h2 c4.987,0.015,9.017,4.069,9.003,9.055c-0.013,4.581-3.456,8.426-8.008,8.945\n M13.5,1.75L10,4.25l3.5,2.5"}))},a=function(){return n.createElement(e.Icon,{ignoreDirection:!0,size:16},n.createElement("path",{d:"M20.566,10.537c-0.141-0.438-0.316-0.864-0.523-1.274\n M20.931,14.425C20.977,14.053,21,13.679,21,13.305 c0-0.291-0.014-0.579-0.041-0.863\n M19.611,18.111c0.341-0.539,0.624-1.114,0.843-1.713\n M16.837,20.9 c0.543-0.345,1.048-0.747,1.506-1.2\n M13.02,22.248c0.65-0.074,1.29-0.218,1.909-0.431\n M14,4.25h-2 c-4.987,0.015-9.017,4.069-9.003,9.055c0.013,4.581,3.456,8.426,8.008,8.945\n M10.5,1.75l3.5,2.5l-3.5,2.5"}))},i={left:0,top:8},u=function(t){var r=t.direction,o=t.onClick,u=n.useContext(e.LocalizationContext).l10n,l=u&&u.rotate?u.rotate.rotateBackward:"Rotate counterclockwise",d=u&&u.rotate?u.rotate.rotateForward:"Rotate clockwise",f=r===e.RotateDirection.Backward?l:d,s=r===e.RotateDirection.Backward?n.createElement(c,null):n.createElement(a,null);return n.createElement(e.Tooltip,{ariaControlsSuffix:"rotate",position:e.Position.BottomCenter,target:n.createElement(e.MinimalButton,{ariaLabel:f,testId:r===e.RotateDirection.Backward?"rotate__backward-button":"rotate__forward-button",onClick:o},s),content:function(){return f},offset:i})},l=function(t){var e=t.children,r=t.direction,o=t.store;return(e||function(t){return n.createElement(u,{direction:t.direction,onClick:t.onClick})})({direction:r,onClick:function(){var t=o.get("rotate");t&&t(r)}})},d=function(t){var r=t.direction,o=t.onClick,i=n.useContext(e.LocalizationContext).l10n,u=i&&i.rotate?i.rotate.rotateBackward:"Rotate counterclockwise",l=i&&i.rotate?i.rotate.rotateForward:"Rotate clockwise",d=r===e.RotateDirection.Backward?u:l,f=r===e.RotateDirection.Backward?n.createElement(c,null):n.createElement(a,null);return n.createElement(e.MenuItem,{icon:f,testId:r===e.RotateDirection.Backward?"rotate__backward-menu":"rotate__forward-menu",onClick:o},d)},f=function(t){var e=t.children,r=t.store;return e({onRotatePage:function(t,e){var n=r.get("rotatePage");n&&n(t,e)}})};exports.RotateBackwardIcon=c,exports.RotateForwardIcon=a,exports.rotatePlugin=function(){var t=n.useMemo((function(){return e.createStore()}),[]),r=function(e){return n.createElement(l,o({},e,{store:t}))};return{install:function(e){t.update("rotate",e.rotate),t.update("rotatePage",e.rotatePage)},Rotate:r,RotateBackwardButton:function(){return n.createElement(r,{direction:e.RotateDirection.Backward},(function(t){return n.createElement(u,o({},t))}))},RotateBackwardMenuItem:function(t){return n.createElement(r,{direction:e.RotateDirection.Backward},(function(e){return n.createElement(d,{direction:e.direction,onClick:function(){e.onClick(),t.onClick()}})}))},RotateForwardButton:function(){return n.createElement(r,{direction:e.RotateDirection.Forward},(function(t){return n.createElement(u,o({},t))}))},RotateForwardMenuItem:function(t){return n.createElement(r,{direction:e.RotateDirection.Forward},(function(e){return n.createElement(d,{direction:e.direction,onClick:function(){e.onClick(),t.onClick()}})}))},RotatePage:function(e){return n.createElement(f,o({},e,{store:t}))}}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@react-pdf-viewer/core");function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var r=e(require("react")),n=function(){return r.createElement(t.Icon,{ignoreDirection:!0,size:16},r.createElement("path",{d:"M3.434,10.537c0.141-0.438,0.316-0.864,0.523-1.274\n M3.069,14.425C3.023,14.053,3,13.679,3,13.305 c0-0.291,0.014-0.579,0.041-0.863\n M4.389,18.111c-0.341-0.539-0.623-1.112-0.843-1.711\n M7.163,20.9 c-0.543-0.345-1.048-0.747-1.506-1.2\n M10.98,22.248c-0.65-0.074-1.29-0.218-1.909-0.431\n M10,4.25h2 c4.987,0.015,9.017,4.069,9.003,9.055c-0.013,4.581-3.456,8.426-8.008,8.945\n M13.5,1.75L10,4.25l3.5,2.5"}))},o=function(){return r.createElement(t.Icon,{ignoreDirection:!0,size:16},r.createElement("path",{d:"M20.566,10.537c-0.141-0.438-0.316-0.864-0.523-1.274\n M20.931,14.425C20.977,14.053,21,13.679,21,13.305 c0-0.291-0.014-0.579-0.041-0.863\n M19.611,18.111c0.341-0.539,0.624-1.114,0.843-1.713\n M16.837,20.9 c0.543-0.345,1.048-0.747,1.506-1.2\n M13.02,22.248c0.65-0.074,1.29-0.218,1.909-0.431\n M14,4.25h-2 c-4.987,0.015-9.017,4.069-9.003,9.055c0.013,4.581,3.456,8.426,8.008,8.945\n M10.5,1.75l3.5,2.5l-3.5,2.5"}))},c=function(){return c=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},c.apply(this,arguments)},a={left:0,top:8},i=function(e){var c=e.direction,i=e.onClick,u=r.useContext(t.LocalizationContext).l10n,l=u&&u.rotate?u.rotate.rotateBackward:"Rotate counterclockwise",d=u&&u.rotate?u.rotate.rotateForward:"Rotate clockwise",f=c===t.RotateDirection.Backward?l:d,s=c===t.RotateDirection.Backward?r.createElement(n,null):r.createElement(o,null);return r.createElement(t.Tooltip,{ariaControlsSuffix:"rotate",position:t.Position.BottomCenter,target:r.createElement(t.MinimalButton,{ariaLabel:f,testId:c===t.RotateDirection.Backward?"rotate__backward-button":"rotate__forward-button",onClick:i},s),content:function(){return f},offset:a})},u=function(t){var e=t.children,n=t.direction,o=t.store;return(e||function(t){return r.createElement(i,{direction:t.direction,onClick:t.onClick})})({direction:n,onClick:function(){var t=o.get("rotate");t&&t(n)}})},l=function(e){var c=e.direction,a=e.onClick,i=r.useContext(t.LocalizationContext).l10n,u=i&&i.rotate?i.rotate.rotateBackward:"Rotate counterclockwise",l=i&&i.rotate?i.rotate.rotateForward:"Rotate clockwise",d=c===t.RotateDirection.Backward?u:l,f=c===t.RotateDirection.Backward?r.createElement(n,null):r.createElement(o,null);return r.createElement(t.MenuItem,{icon:f,testId:c===t.RotateDirection.Backward?"rotate__backward-menu":"rotate__forward-menu",onClick:a},d)},d=function(t){var e=t.children,r=t.store;return e({onRotatePage:function(t,e){var n=r.get("rotatePage");n&&n(t,e)}})};exports.RotateBackwardIcon=n,exports.RotateForwardIcon=o,exports.rotatePlugin=function(){var e=r.useMemo((function(){return t.createStore()}),[]),n=function(t){return r.createElement(u,c({},t,{store:e}))};return{install:function(t){e.update("rotate",t.rotate),e.update("rotatePage",t.rotatePage)},Rotate:n,RotateBackwardButton:function(){return r.createElement(n,{direction:t.RotateDirection.Backward},(function(t){return r.createElement(i,c({},t))}))},RotateBackwardMenuItem:function(e){return r.createElement(n,{direction:t.RotateDirection.Backward},(function(t){return r.createElement(l,{direction:t.direction,onClick:function(){t.onClick(),e.onClick()}})}))},RotateForwardButton:function(){return r.createElement(n,{direction:t.RotateDirection.Forward},(function(t){return r.createElement(i,c({},t))}))},RotateForwardMenuItem:function(e){return r.createElement(n,{direction:t.RotateDirection.Forward},(function(t){return r.createElement(l,{direction:t.direction,onClick:function(){t.onClick(),e.onClick()}})}))},RotatePage:function(t){return r.createElement(d,c({},t,{store:e}))}}}; |
@@ -9,5 +9,5 @@ /** | ||
import type { Plugin } from '@react-pdf-viewer/core'; | ||
import { RotateDirection } from '@react-pdf-viewer/core'; | ||
import * as React from 'react'; | ||
import { RotateDirection } from '@react-pdf-viewer/core'; | ||
import type { Plugin } from '@react-pdf-viewer/core'; | ||
@@ -14,0 +14,0 @@ // Types |
{ | ||
"name": "@react-pdf-viewer/rotate", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"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": "3.3.1" | ||
"@react-pdf-viewer/core": "3.3.2" | ||
}, | ||
@@ -50,3 +50,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "3cffac5b07d0745738913f28797527363c0b0594" | ||
"gitHead": "9da7355cc710985d46ac3a0e70c8d6ada994c1a9" | ||
} |
15956
+ Added@react-pdf-viewer/core@3.3.2(transitive)
- Removed@react-pdf-viewer/core@3.3.1(transitive)
Updated@react-pdf-viewer/core@3.3.2