New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-pdf-viewer/toolbar

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf-viewer/toolbar - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

2

lib/cjs/toolbar.js

@@ -133,3 +133,3 @@ 'use strict';

var dropPluginInstance = drop.dropPlugin();
var fullScreenPluginInstance = fullScreen.fullScreenPlugin();
var fullScreenPluginInstance = fullScreen.fullScreenPlugin(props ? props.fullScreenPlugin : {});
var getFilePluginInstance = getFile.getFilePlugin(props ? props.getFilePlugin : {});

@@ -136,0 +136,0 @@ var openPluginInstance = open.openPlugin();

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@react-pdf-viewer/drop/lib/styles/index.css"),require("@react-pdf-viewer/full-screen/lib/styles/index.css"),require("@react-pdf-viewer/open/lib/styles/index.css"),require("@react-pdf-viewer/page-navigation/lib/styles/index.css"),require("@react-pdf-viewer/print/lib/styles/index.css"),require("@react-pdf-viewer/properties/lib/styles/index.css"),require("@react-pdf-viewer/scroll-mode/lib/styles/index.css"),require("@react-pdf-viewer/search/lib/styles/index.css"),require("@react-pdf-viewer/selection-mode/lib/styles/index.css"),require("@react-pdf-viewer/zoom/lib/styles/index.css");var e=require("react"),t=require("@react-pdf-viewer/core"),r=require("@react-pdf-viewer/scroll-mode"),o=require("@react-pdf-viewer/selection-mode"),n=require("@react-pdf-viewer/drop"),l=require("@react-pdf-viewer/full-screen"),a=require("@react-pdf-viewer/get-file"),i=require("@react-pdf-viewer/open"),c=require("@react-pdf-viewer/page-navigation"),u=require("@react-pdf-viewer/print"),s=require("@react-pdf-viewer/properties"),m=require("@react-pdf-viewer/rotate"),d=require("@react-pdf-viewer/search"),p=require("@react-pdf-viewer/zoom"),v=function(){return e.createElement(t.Icon,{size:16},e.createElement("path",{d:"M12,0.5c1.381,0,2.5,1.119,2.5,2.5S13.381,5.5,12,5.5S9.5,4.381,9.5,3S10.619,0.5,12,0.5z\n M12,9.5\n c1.381,0,2.5,1.119,2.5,2.5s-1.119,2.5-2.5,2.5S9.5,13.381,9.5,12S10.619,9.5,12,9.5z\n M12,18.5c1.381,0,2.5,1.119,2.5,2.5\n s-1.119,2.5-2.5,2.5S9.5,22.381,9.5,21S10.619,18.5,12,18.5z"}))},f={left:0,top:8},E=function(n){var l=n.toolbarSlot,a=e.useContext(t.LocalizationContext),i=l.GoToFirstPageMenuItem,c=l.GoToLastPageMenuItem,u=l.RotateBackwardMenuItem,s=l.RotateForwardMenuItem,m=l.ShowPropertiesMenuItem,d=l.SwitchScrollModeMenuItem,p=l.SwitchSelectionModeMenuItem;return e.createElement(t.Popover,{position:t.Position.BottomRight,target:function(r,o){var n=a&&a.toolbar?a.toolbar.moreActions:"More actions";return e.createElement(t.Tooltip,{position:t.Position.BottomRight,target:e.createElement(t.Button,{onClick:r,isSelected:o},e.createElement(v,null)),content:function(){return n},offset:f})},content:function(n){return e.createElement(t.Menu,null,e.createElement(i,{onClick:n}),e.createElement(c,{onClick:n}),e.createElement(t.MenuDivider,null),e.createElement(s,{onClick:n}),e.createElement(u,{onClick:n}),e.createElement(t.MenuDivider,null),e.createElement(p,{mode:o.SelectionMode.Text,onClick:n}),e.createElement(p,{mode:o.SelectionMode.Hand,onClick:n}),e.createElement(t.MenuDivider,null),e.createElement(d,{mode:r.ScrollMode.Vertical,onClick:n}),e.createElement(d,{mode:r.ScrollMode.Horizontal,onClick:n}),e.createElement(d,{mode:r.ScrollMode.Wrapped,onClick:n}),e.createElement(t.MenuDivider,null),e.createElement(m,{onClick:n}))},offset:f,closeOnClickOutside:!0,closeOnEscape:!0})},g=function(){return(g=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},P=function(t){var r=t.CurrentPageInput,o=t.Download,n=t.EnterFullScreen,l=t.GoToNextPage,a=t.GoToPreviousPage,i=t.NumberOfPages,c=t.Open,u=t.Print,s=t.ShowSearchPopover,m=t.Zoom,d=t.ZoomIn,p=t.ZoomOut;return e.createElement("div",{className:"rpv-toolbar"},e.createElement("div",{className:"rpv-toolbar-left"},e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(s,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(a,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(r,null)," / ",e.createElement(i,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(l,null))),e.createElement("div",{className:"rpv-toolbar-center"},e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(p,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(m,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(d,null))),e.createElement("div",{className:"rpv-toolbar-right"},e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(n,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(c,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(o,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(u,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(E,{toolbarSlot:t}))))},w=function(e){var t=e.children,r=e.slot;return(t||P)(r)};exports.MoreActionsPopover=E,exports.MoreIcon=v,exports.toolbarPlugin=function(t){var v=n.dropPlugin(),f=l.fullScreenPlugin(),E=a.getFilePlugin(t?t.getFilePlugin:{}),P=i.openPlugin(),S=c.pageNavigationPlugin(),M=u.printPlugin(),h=s.propertiesPlugin(),b=m.rotatePlugin(),I=r.scrollModePlugin(t?t.scrollModePlugin:{}),q=d.searchPlugin(t?t.searchPlugin:{}),C=o.selectionModePlugin(t?t.selectionModePlugin:{}),x=p.zoomPlugin(),N=[v,f,E,P,S,M,h,b,I,q,C,x];return{install:function(e){N.forEach((function(t){t.install&&t.install(e)}))},renderViewer:function(e){var t=e.slot;return N.forEach((function(r){r.renderViewer&&(t=r.renderViewer(g(g({},e),{slot:t})))})),t},uninstall:function(e){N.forEach((function(t){t.uninstall&&t.uninstall(e)}))},onDocumentLoad:function(e){N.forEach((function(t){t.onDocumentLoad&&t.onDocumentLoad(e)}))},onTextLayerRender:function(e){N.forEach((function(t){t.onTextLayerRender&&t.onTextLayerRender(e)}))},onViewerStateChange:function(e){var t=e;return N.forEach((function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))})),t},Toolbar:function(t){var r=f.EnterFullScreen,o=E.Download,n=P.Open,l=S.CurrentPageInput,a=S.CurrentPageLabel,i=S.GoToFirstPage,c=S.GoToFirstPageMenuItem,u=S.GoToLastPage,s=S.GoToLastPageMenuItem,m=S.GoToNextPage,d=S.GoToPreviousPage,p=M.Print,v=h.ShowProperties,N=h.ShowPropertiesMenuItem,T=b.Rotate,y=b.RotateBackwardMenuItem,G=b.RotateForwardMenuItem,O=I.SwitchScrollMode,k=I.SwitchScrollModeMenuItem,F=q.Search,L=q.ShowSearchPopover,R=C.SwitchSelectionMode,D=C.SwitchSelectionModeMenuItem,z=x.CurrentScale,Z=x.Zoom,V=x.ZoomIn,B=x.ZoomOut;return e.createElement(w,g({},t,{slot:{CurrentPageInput:l,CurrentPageLabel:a,CurrentScale:z,Download:o,EnterFullScreen:r,GoToFirstPage:i,GoToFirstPageMenuItem:c,GoToLastPage:u,GoToLastPageMenuItem:s,GoToNextPage:m,GoToPreviousPage:d,NumberOfPages:function(){return e.createElement(a,null,(function(t){return e.createElement(e.Fragment,null,t.numberOfPages)}))},Open:n,Print:p,Rotate:T,RotateBackwardMenuItem:y,RotateForwardMenuItem:G,Search:F,ShowProperties:v,ShowPropertiesMenuItem:N,ShowSearchPopover:L,SwitchScrollMode:O,SwitchScrollModeMenuItem:k,SwitchSelectionMode:R,SwitchSelectionModeMenuItem:D,Zoom:Z,ZoomIn:V,ZoomOut:B}}))}}};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@react-pdf-viewer/drop/lib/styles/index.css"),require("@react-pdf-viewer/full-screen/lib/styles/index.css"),require("@react-pdf-viewer/open/lib/styles/index.css"),require("@react-pdf-viewer/page-navigation/lib/styles/index.css"),require("@react-pdf-viewer/print/lib/styles/index.css"),require("@react-pdf-viewer/properties/lib/styles/index.css"),require("@react-pdf-viewer/scroll-mode/lib/styles/index.css"),require("@react-pdf-viewer/search/lib/styles/index.css"),require("@react-pdf-viewer/selection-mode/lib/styles/index.css"),require("@react-pdf-viewer/zoom/lib/styles/index.css");var e=require("react"),t=require("@react-pdf-viewer/core"),r=require("@react-pdf-viewer/scroll-mode"),n=require("@react-pdf-viewer/selection-mode"),o=require("@react-pdf-viewer/drop"),l=require("@react-pdf-viewer/full-screen"),a=require("@react-pdf-viewer/get-file"),i=require("@react-pdf-viewer/open"),c=require("@react-pdf-viewer/page-navigation"),u=require("@react-pdf-viewer/print"),s=require("@react-pdf-viewer/properties"),m=require("@react-pdf-viewer/rotate"),d=require("@react-pdf-viewer/search"),p=require("@react-pdf-viewer/zoom"),v=function(){return e.createElement(t.Icon,{size:16},e.createElement("path",{d:"M12,0.5c1.381,0,2.5,1.119,2.5,2.5S13.381,5.5,12,5.5S9.5,4.381,9.5,3S10.619,0.5,12,0.5z\n M12,9.5\n c1.381,0,2.5,1.119,2.5,2.5s-1.119,2.5-2.5,2.5S9.5,13.381,9.5,12S10.619,9.5,12,9.5z\n M12,18.5c1.381,0,2.5,1.119,2.5,2.5\n s-1.119,2.5-2.5,2.5S9.5,22.381,9.5,21S10.619,18.5,12,18.5z"}))},f={left:0,top:8},E=function(o){var l=o.toolbarSlot,a=e.useContext(t.LocalizationContext),i=l.GoToFirstPageMenuItem,c=l.GoToLastPageMenuItem,u=l.RotateBackwardMenuItem,s=l.RotateForwardMenuItem,m=l.ShowPropertiesMenuItem,d=l.SwitchScrollModeMenuItem,p=l.SwitchSelectionModeMenuItem;return e.createElement(t.Popover,{position:t.Position.BottomRight,target:function(r,n){var o=a&&a.toolbar?a.toolbar.moreActions:"More actions";return e.createElement(t.Tooltip,{position:t.Position.BottomRight,target:e.createElement(t.Button,{onClick:r,isSelected:n},e.createElement(v,null)),content:function(){return o},offset:f})},content:function(o){return e.createElement(t.Menu,null,e.createElement(i,{onClick:o}),e.createElement(c,{onClick:o}),e.createElement(t.MenuDivider,null),e.createElement(s,{onClick:o}),e.createElement(u,{onClick:o}),e.createElement(t.MenuDivider,null),e.createElement(p,{mode:n.SelectionMode.Text,onClick:o}),e.createElement(p,{mode:n.SelectionMode.Hand,onClick:o}),e.createElement(t.MenuDivider,null),e.createElement(d,{mode:r.ScrollMode.Vertical,onClick:o}),e.createElement(d,{mode:r.ScrollMode.Horizontal,onClick:o}),e.createElement(d,{mode:r.ScrollMode.Wrapped,onClick:o}),e.createElement(t.MenuDivider,null),e.createElement(m,{onClick:o}))},offset:f,closeOnClickOutside:!0,closeOnEscape:!0})},g=function(){return(g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},P=function(t){var r=t.CurrentPageInput,n=t.Download,o=t.EnterFullScreen,l=t.GoToNextPage,a=t.GoToPreviousPage,i=t.NumberOfPages,c=t.Open,u=t.Print,s=t.ShowSearchPopover,m=t.Zoom,d=t.ZoomIn,p=t.ZoomOut;return e.createElement("div",{className:"rpv-toolbar"},e.createElement("div",{className:"rpv-toolbar-left"},e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(s,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(a,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(r,null)," / ",e.createElement(i,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(l,null))),e.createElement("div",{className:"rpv-toolbar-center"},e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(p,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(m,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(d,null))),e.createElement("div",{className:"rpv-toolbar-right"},e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(o,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(c,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(n,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(u,null)),e.createElement("div",{className:"rpv-toolbar-item"},e.createElement(E,{toolbarSlot:t}))))},S=function(e){var t=e.children,r=e.slot;return(t||P)(r)};exports.MoreActionsPopover=E,exports.MoreIcon=v,exports.toolbarPlugin=function(t){var v=o.dropPlugin(),f=l.fullScreenPlugin(t?t.fullScreenPlugin:{}),E=a.getFilePlugin(t?t.getFilePlugin:{}),P=i.openPlugin(),w=c.pageNavigationPlugin(),M=u.printPlugin(),h=s.propertiesPlugin(),b=m.rotatePlugin(),I=r.scrollModePlugin(t?t.scrollModePlugin:{}),q=d.searchPlugin(t?t.searchPlugin:{}),C=n.selectionModePlugin(t?t.selectionModePlugin:{}),x=p.zoomPlugin(),N=[v,f,E,P,w,M,h,b,I,q,C,x];return{install:function(e){N.forEach((function(t){t.install&&t.install(e)}))},renderViewer:function(e){var t=e.slot;return N.forEach((function(r){r.renderViewer&&(t=r.renderViewer(g(g({},e),{slot:t})))})),t},uninstall:function(e){N.forEach((function(t){t.uninstall&&t.uninstall(e)}))},onDocumentLoad:function(e){N.forEach((function(t){t.onDocumentLoad&&t.onDocumentLoad(e)}))},onTextLayerRender:function(e){N.forEach((function(t){t.onTextLayerRender&&t.onTextLayerRender(e)}))},onViewerStateChange:function(e){var t=e;return N.forEach((function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))})),t},Toolbar:function(t){var r=f.EnterFullScreen,n=E.Download,o=P.Open,l=w.CurrentPageInput,a=w.CurrentPageLabel,i=w.GoToFirstPage,c=w.GoToFirstPageMenuItem,u=w.GoToLastPage,s=w.GoToLastPageMenuItem,m=w.GoToNextPage,d=w.GoToPreviousPage,p=M.Print,v=h.ShowProperties,N=h.ShowPropertiesMenuItem,T=b.Rotate,y=b.RotateBackwardMenuItem,G=b.RotateForwardMenuItem,O=I.SwitchScrollMode,k=I.SwitchScrollModeMenuItem,F=q.Search,L=q.ShowSearchPopover,R=C.SwitchSelectionMode,D=C.SwitchSelectionModeMenuItem,z=x.CurrentScale,Z=x.Zoom,V=x.ZoomIn,B=x.ZoomOut;return e.createElement(S,g({},t,{slot:{CurrentPageInput:l,CurrentPageLabel:a,CurrentScale:z,Download:n,EnterFullScreen:r,GoToFirstPage:i,GoToFirstPageMenuItem:c,GoToLastPage:u,GoToLastPageMenuItem:s,GoToNextPage:m,GoToPreviousPage:d,NumberOfPages:function(){return e.createElement(a,null,(function(t){return e.createElement(e.Fragment,null,t.numberOfPages)}))},Open:o,Print:p,Rotate:T,RotateBackwardMenuItem:y,RotateForwardMenuItem:G,Search:F,ShowProperties:v,ShowPropertiesMenuItem:N,ShowSearchPopover:L,SwitchScrollMode:O,SwitchScrollModeMenuItem:k,SwitchSelectionMode:R,SwitchSelectionModeMenuItem:D,Zoom:Z,ZoomIn:V,ZoomOut:B}}))}}};

@@ -6,3 +6,3 @@ /**

* @license https://react-pdf-viewer.dev/license
* @copyright 2019-2020 Nguyen Huu Phuoc <me@phuoc.ng>
* @copyright 2019-2021 Nguyen Huu Phuoc <me@phuoc.ng>
*/

@@ -12,3 +12,6 @@

import { Plugin } from '@react-pdf-viewer/core';
import { EnterFullScreenProps } from '@react-pdf-viewer/full-screen';
import {
EnterFullScreenProps,
FullScreenPluginProps,
} from '@react-pdf-viewer/full-screen';
import { DownloadProps, GetFilePluginProps } from '@react-pdf-viewer/get-file';

@@ -101,2 +104,3 @@ import { OpenProps } from '@react-pdf-viewer/open';

export interface ToolbarPluginProps {
fullScreenPlugin?: FullScreenPluginProps;
getFilePlugin?: GetFilePluginProps;

@@ -103,0 +107,0 @@ scrollModePlugin?: ScrollModePluginProps;

@@ -6,3 +6,3 @@ /**

* @license https://react-pdf-viewer.dev/license
* @copyright 2019-2020 Nguyen Huu Phuoc <me@phuoc.ng>
* @copyright 2019-2021 Nguyen Huu Phuoc <me@phuoc.ng>
*/

@@ -9,0 +9,0 @@

{
"name": "@react-pdf-viewer/toolbar",
"version": "2.3.0",
"version": "2.3.1",
"description": "A React component to view a PDF document",

@@ -36,15 +36,15 @@ "license": "https://react-pdf-viewer.dev/license",

"dependencies": {
"@react-pdf-viewer/core": "2.3.0",
"@react-pdf-viewer/drop": "2.3.0",
"@react-pdf-viewer/full-screen": "2.3.0",
"@react-pdf-viewer/get-file": "2.3.0",
"@react-pdf-viewer/open": "2.3.0",
"@react-pdf-viewer/page-navigation": "2.3.0",
"@react-pdf-viewer/print": "2.3.0",
"@react-pdf-viewer/properties": "2.3.0",
"@react-pdf-viewer/rotate": "2.3.0",
"@react-pdf-viewer/scroll-mode": "2.3.0",
"@react-pdf-viewer/search": "2.3.0",
"@react-pdf-viewer/selection-mode": "2.3.0",
"@react-pdf-viewer/zoom": "2.3.0"
"@react-pdf-viewer/core": "2.3.1",
"@react-pdf-viewer/drop": "2.3.1",
"@react-pdf-viewer/full-screen": "2.3.1",
"@react-pdf-viewer/get-file": "2.3.1",
"@react-pdf-viewer/open": "2.3.1",
"@react-pdf-viewer/page-navigation": "2.3.1",
"@react-pdf-viewer/print": "2.3.1",
"@react-pdf-viewer/properties": "2.3.1",
"@react-pdf-viewer/rotate": "2.3.1",
"@react-pdf-viewer/scroll-mode": "2.3.1",
"@react-pdf-viewer/search": "2.3.1",
"@react-pdf-viewer/selection-mode": "2.3.1",
"@react-pdf-viewer/zoom": "2.3.1"
},

@@ -64,3 +64,3 @@ "peerDependencies": {

},
"gitHead": "182a54c3c2cb7d0d77bb988e495b3e6853108b0a"
"gitHead": "35c85e7e2a77a9fcc78faed723d3e719a07451af"
}

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