@react-pdf-viewer/page-navigation
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -28,3 +28,3 @@ 'use strict'; | ||
/*! ***************************************************************************** | ||
/****************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -139,9 +139,12 @@ | ||
var isMounted = core.useIsMounted(); | ||
var _b = React__namespace.useState([]), labels = _b[0], setLabels = _b[1]; | ||
var _b = React__namespace.useState({ | ||
loading: true, | ||
labels: [], | ||
}), status = _b[0], setStatus = _b[1]; | ||
React__namespace.useEffect(function () { | ||
doc.getPageLabels().then(function (result) { | ||
isMounted.current && setLabels(result || []); | ||
isMounted.current && setStatus({ loading: false, labels: result || [] }); | ||
}); | ||
}, [doc.loadingTask.docId]); | ||
return children(labels); | ||
return status.loading ? React__namespace.createElement(React__namespace.Fragment, null) : children(status.labels); | ||
}; | ||
@@ -148,0 +151,0 @@ |
@@ -1,15 +0,1 @@ | ||
"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 a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=n(e),r=function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},o=function(e){var n=a.useState(e.get("currentPage")||0),r=n[0],o=n[1],i=function(e){o(e)};return t.useIsomorphicLayoutEffect((function(){return e.subscribe("currentPage",i),function(){e.unsubscribe("currentPage",i)}}),[]),{currentPage:r}},i=function(e){var t=a.useState(e.get("numberOfPages")||0),n=t[0],r=t[1],o=function(e){r(e)};return a.useEffect((function(){return e.subscribe("numberOfPages",o),function(){e.unsubscribe("numberOfPages",o)}}),[]),{numberOfPages:n}},u=function(e){var n=e.store,r=a.useContext(t.LocalizationContext).l10n,u=a.useState("1"),c=u[0],l=u[1],s=o(n).currentPage,g=i(n).numberOfPages;a.useEffect((function(){return l("".concat(s+1))}),[s]);var f=function(e){var t=n.get("jumpToPage");t&&t(e)},m=r&&r.pageNavigation?r.pageNavigation.enterPageNumber:"Enter a page number";return a.createElement("span",{className:"rpv-page-navigation__current-page-input"},a.createElement(t.TextBox,{ariaLabel:m,testId:"page-navigation__current-page-input",type:"text",value:c,onChange:l,onKeyDown:function(e){switch(e.key){case"ArrowUp":(a=s-1)>=0&&(l("".concat(a+1)),f(a));break;case"ArrowDown":(n=s+1)<g&&(l("".concat(n+1)),f(n));break;case"Enter":t=parseInt(c,10),""===c||t<1||t>g?l("".concat(s+1)):f(t-1)}var t,n,a}}))},c=function(e){var n=e.children,r=e.doc,o=t.useIsMounted(),i=a.useState([]),u=i[0],c=i[1];return a.useEffect((function(){r.getPageLabels().then((function(e){o.current&&c(e||[])}))}),[r.loadingTask.docId]),n(u)},l=function(e){var t=e.children,n=e.store,r=function(e){var t=a.useState(e.get("doc")),n=t[0],r=t[1],o=function(e){r(e)};return a.useEffect((function(){return e.subscribe("doc",o),function(){e.unsubscribe("doc",o)}}),[]),n}(n),u=o(n).currentPage,l=i(n).numberOfPages,s=t||function(e){return a.createElement(a.Fragment,null,e.currentPage+1)};return r?a.createElement(c,{doc:r},(function(e){var t=e.length===l&&l>0?e[u]:"";return s({currentPage:u,numberOfPages:l,pageLabel:t})})):a.createElement(a.Fragment,null)},s=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M21.783,21.034H2.332c-0.552,0-1-0.448-1-1c0-0.182,0.05-0.361,0.144-0.517L11.2,3.448\n c0.286-0.472,0.901-0.624,1.373-0.338c0.138,0.084,0.254,0.2,0.338,0.338l9.726,16.069c0.286,0.473,0.134,1.087-0.339,1.373\n C22.143,20.984,21.965,21.034,21.783,21.034z"}))},g={left:0,top:8},f=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToFirstPage:"First page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-first",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__first-button",onClick:r},a.createElement(s,null)),content:function(){return i},offset:g})},m=function(e){var t=e.children,n=e.store;return(t||function(e){return a.createElement(f,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:0===o(n).currentPage,onClick:function(){var e=n.get("jumpToPage");e&&e(0)}})},p=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToFirstPage:"First page";return a.createElement(t.MenuItem,{icon:a.createElement(s,null),isDisabled:n,testId:"page-navigation__first-menu",onClick:r},i)},b=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M2.32,2.966h19.452c0.552,0.001,1,0.449,0.999,1.001c0,0.182-0.05,0.36-0.144,0.516L12.9,20.552\n c-0.286,0.472-0.901,0.624-1.373,0.338c-0.138-0.084-0.254-0.2-0.338-0.338L1.465,4.483C1.179,4.01,1.331,3.396,1.804,3.11\n C1.96,3.016,2.138,2.966,2.32,2.966z"}))},v={left:0,top:8},d=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToLastPage:"Last page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-last",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__last-button",onClick:r},a.createElement(b,null)),content:function(){return i},offset:v})},P=function(e){var t=e.children,n=e.store,r=o(n).currentPage,u=i(n).numberOfPages;return(t||function(e){return a.createElement(d,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:r+1>=u,onClick:function(){var e=n.get("jumpToPage");e&&e(u-1)}})},C=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToLastPage:"Last page";return a.createElement(t.MenuItem,{icon:a.createElement(b,null),isDisabled:n,testId:"page-navigation__last-menu",onClick:r},i)},E=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n L23.541,5.627"}))},k={left:0,top:8},x=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToNextPage:"Next page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-next",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__next-button",onClick:r},a.createElement(E,null)),content:function(){return i},offset:k})},D=function(e){var t=e.children,n=e.store,r=o(n).currentPage,u=i(n).numberOfPages;return(t||function(e){return a.createElement(x,{onClick:e.onClick,isDisabled:e.isDisabled})})({isDisabled:r+1>=u,onClick:function(){var e=n.get("jumpToPage");e&&e(r+1)}})},T=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToNextPage:"Next page";return a.createElement(t.MenuItem,{icon:a.createElement(E,null),isDisabled:n,testId:"page-navigation__next-menu",onClick:r},i)},L=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n L0.535,18.373"}))},I={left:0,top:8},N=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToPreviousPage:"Previous page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-previous",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__previous-button",onClick:r},a.createElement(L,null)),content:function(){return i},offset:I})},_=function(e){var t=e.store,n=e.children,r=o(t).currentPage;return(n||function(e){return a.createElement(N,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:r<=0,onClick:function(){var e=t.get("jumpToPage");e&&e(r-1)}})},O=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToPreviousPage:"Previous page";return a.createElement(t.MenuItem,{icon:a.createElement(L,null),isDisabled:n,testId:"page-navigation__previous-menu",onClick:r},i)},h=function(e){var t=e.children,n=e.store,r=i(n).numberOfPages;return t?t({numberOfPages:r}):a.createElement(a.Fragment,null,r)}; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */exports.DownArrowIcon=b,exports.NextIcon=E,exports.PreviousIcon=L,exports.UpArrowIcon=s,exports.pageNavigationPlugin=function(){var e=a.useMemo((function(){return t.createStore()}),[]),n=function(t){return a.createElement(m,r({},t,{store:e}))},o=function(t){return a.createElement(P,r({},t,{store:e}))},i=function(t){return a.createElement(D,r({},t,{store:e}))},c=function(t){return a.createElement(_,r({},t,{store:e}))};return{install:function(t){e.update("jumpToPage",t.jumpToPage)},onDocumentLoad:function(t){e.update("doc",t.doc),e.update("numberOfPages",t.doc.numPages)},onViewerStateChange:function(t){return e.update("currentPage",t.pageIndex),t},jumpToPage:function(t){var n=e.get("jumpToPage");n&&n(t)},CurrentPageInput:function(){return a.createElement(u,{store:e})},CurrentPageLabel:function(t){return a.createElement(l,r({},t,{store:e}))},GoToFirstPage:n,GoToFirstPageButton:function(){return a.createElement(n,null,(function(e){return a.createElement(f,r({},e))}))},GoToFirstPageMenuItem:function(e){return a.createElement(n,null,(function(t){return a.createElement(p,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToLastPage:o,GoToLastPageButton:function(){return a.createElement(o,null,(function(e){return a.createElement(d,r({},e))}))},GoToLastPageMenuItem:function(e){return a.createElement(o,null,(function(t){return a.createElement(C,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToNextPage:i,GoToNextPageButton:function(){return a.createElement(i,null,(function(e){return a.createElement(x,r({},e))}))},GoToNextPageMenuItem:function(e){return a.createElement(i,null,(function(t){return a.createElement(T,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToPreviousPage:c,GoToPreviousPageButton:function(){return a.createElement(c,null,(function(e){return a.createElement(N,r({},e))}))},GoToPreviousPageMenuItem:function(e){return a.createElement(c,null,(function(t){return a.createElement(O,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},NumberOfPages:function(t){return a.createElement(h,r({},t,{store:e}))}}}; | ||
"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 a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=n(e),r=function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},o=function(e){var n=a.useState(e.get("currentPage")||0),r=n[0],o=n[1],i=function(e){o(e)};return t.useIsomorphicLayoutEffect((function(){return e.subscribe("currentPage",i),function(){e.unsubscribe("currentPage",i)}}),[]),{currentPage:r}},i=function(e){var t=a.useState(e.get("numberOfPages")||0),n=t[0],r=t[1],o=function(e){r(e)};return a.useEffect((function(){return e.subscribe("numberOfPages",o),function(){e.unsubscribe("numberOfPages",o)}}),[]),{numberOfPages:n}},u=function(e){var n=e.store,r=a.useContext(t.LocalizationContext).l10n,u=a.useState("1"),c=u[0],l=u[1],s=o(n).currentPage,g=i(n).numberOfPages;a.useEffect((function(){return l("".concat(s+1))}),[s]);var f=function(e){var t=n.get("jumpToPage");t&&t(e)},m=r&&r.pageNavigation?r.pageNavigation.enterPageNumber:"Enter a page number";return a.createElement("span",{className:"rpv-page-navigation__current-page-input"},a.createElement(t.TextBox,{ariaLabel:m,testId:"page-navigation__current-page-input",type:"text",value:c,onChange:l,onKeyDown:function(e){switch(e.key){case"ArrowUp":(a=s-1)>=0&&(l("".concat(a+1)),f(a));break;case"ArrowDown":(n=s+1)<g&&(l("".concat(n+1)),f(n));break;case"Enter":t=parseInt(c,10),""===c||t<1||t>g?l("".concat(s+1)):f(t-1)}var t,n,a}}))},c=function(e){var n=e.children,r=e.doc,o=t.useIsMounted(),i=a.useState({loading:!0,labels:[]}),u=i[0],c=i[1];return a.useEffect((function(){r.getPageLabels().then((function(e){o.current&&c({loading:!1,labels:e||[]})}))}),[r.loadingTask.docId]),u.loading?a.createElement(a.Fragment,null):n(u.labels)},l=function(e){var t=e.children,n=e.store,r=function(e){var t=a.useState(e.get("doc")),n=t[0],r=t[1],o=function(e){r(e)};return a.useEffect((function(){return e.subscribe("doc",o),function(){e.unsubscribe("doc",o)}}),[]),n}(n),u=o(n).currentPage,l=i(n).numberOfPages,s=t||function(e){return a.createElement(a.Fragment,null,e.currentPage+1)};return r?a.createElement(c,{doc:r},(function(e){var t=e.length===l&&l>0?e[u]:"";return s({currentPage:u,numberOfPages:l,pageLabel:t})})):a.createElement(a.Fragment,null)},s=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M21.783,21.034H2.332c-0.552,0-1-0.448-1-1c0-0.182,0.05-0.361,0.144-0.517L11.2,3.448\n c0.286-0.472,0.901-0.624,1.373-0.338c0.138,0.084,0.254,0.2,0.338,0.338l9.726,16.069c0.286,0.473,0.134,1.087-0.339,1.373\n C22.143,20.984,21.965,21.034,21.783,21.034z"}))},g={left:0,top:8},f=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToFirstPage:"First page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-first",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__first-button",onClick:r},a.createElement(s,null)),content:function(){return i},offset:g})},m=function(e){var t=e.children,n=e.store;return(t||function(e){return a.createElement(f,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:0===o(n).currentPage,onClick:function(){var e=n.get("jumpToPage");e&&e(0)}})},p=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToFirstPage:"First page";return a.createElement(t.MenuItem,{icon:a.createElement(s,null),isDisabled:n,testId:"page-navigation__first-menu",onClick:r},i)},b=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M2.32,2.966h19.452c0.552,0.001,1,0.449,0.999,1.001c0,0.182-0.05,0.36-0.144,0.516L12.9,20.552\n c-0.286,0.472-0.901,0.624-1.373,0.338c-0.138-0.084-0.254-0.2-0.338-0.338L1.465,4.483C1.179,4.01,1.331,3.396,1.804,3.11\n C1.96,3.016,2.138,2.966,2.32,2.966z"}))},d={left:0,top:8},v=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToLastPage:"Last page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-last",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__last-button",onClick:r},a.createElement(b,null)),content:function(){return i},offset:d})},P=function(e){var t=e.children,n=e.store,r=o(n).currentPage,u=i(n).numberOfPages;return(t||function(e){return a.createElement(v,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:r+1>=u,onClick:function(){var e=n.get("jumpToPage");e&&e(u-1)}})},C=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToLastPage:"Last page";return a.createElement(t.MenuItem,{icon:a.createElement(b,null),isDisabled:n,testId:"page-navigation__last-menu",onClick:r},i)},E=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n L23.541,5.627"}))},k={left:0,top:8},x=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToNextPage:"Next page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-next",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__next-button",onClick:r},a.createElement(E,null)),content:function(){return i},offset:k})},D=function(e){var t=e.children,n=e.store,r=o(n).currentPage,u=i(n).numberOfPages;return(t||function(e){return a.createElement(x,{onClick:e.onClick,isDisabled:e.isDisabled})})({isDisabled:r+1>=u,onClick:function(){var e=n.get("jumpToPage");e&&e(r+1)}})},T=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToNextPage:"Next page";return a.createElement(t.MenuItem,{icon:a.createElement(E,null),isDisabled:n,testId:"page-navigation__next-menu",onClick:r},i)},L=function(){return a.createElement(t.Icon,{size:16},a.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n L0.535,18.373"}))},I={left:0,top:8},N=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToPreviousPage:"Previous page";return a.createElement(t.Tooltip,{ariaControlsSuffix:"page-navigation-previous",position:t.Position.BottomCenter,target:a.createElement(t.MinimalButton,{ariaLabel:i,isDisabled:n,testId:"page-navigation__previous-button",onClick:r},a.createElement(L,null)),content:function(){return i},offset:I})},_=function(e){var t=e.store,n=e.children,r=o(t).currentPage;return(n||function(e){return a.createElement(N,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:r<=0,onClick:function(){var e=t.get("jumpToPage");e&&e(r-1)}})},O=function(e){var n=e.isDisabled,r=e.onClick,o=a.useContext(t.LocalizationContext).l10n,i=o&&o.pageNavigation?o.pageNavigation.goToPreviousPage:"Previous page";return a.createElement(t.MenuItem,{icon:a.createElement(L,null),isDisabled:n,testId:"page-navigation__previous-menu",onClick:r},i)},h=function(e){var t=e.children,n=e.store,r=i(n).numberOfPages;return t?t({numberOfPages:r}):a.createElement(a.Fragment,null,r)};exports.DownArrowIcon=b,exports.NextIcon=E,exports.PreviousIcon=L,exports.UpArrowIcon=s,exports.pageNavigationPlugin=function(){var e=a.useMemo((function(){return t.createStore()}),[]),n=function(t){return a.createElement(m,r({},t,{store:e}))},o=function(t){return a.createElement(P,r({},t,{store:e}))},i=function(t){return a.createElement(D,r({},t,{store:e}))},c=function(t){return a.createElement(_,r({},t,{store:e}))};return{install:function(t){e.update("jumpToPage",t.jumpToPage)},onDocumentLoad:function(t){e.update("doc",t.doc),e.update("numberOfPages",t.doc.numPages)},onViewerStateChange:function(t){return e.update("currentPage",t.pageIndex),t},jumpToPage:function(t){var n=e.get("jumpToPage");n&&n(t)},CurrentPageInput:function(){return a.createElement(u,{store:e})},CurrentPageLabel:function(t){return a.createElement(l,r({},t,{store:e}))},GoToFirstPage:n,GoToFirstPageButton:function(){return a.createElement(n,null,(function(e){return a.createElement(f,r({},e))}))},GoToFirstPageMenuItem:function(e){return a.createElement(n,null,(function(t){return a.createElement(p,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToLastPage:o,GoToLastPageButton:function(){return a.createElement(o,null,(function(e){return a.createElement(v,r({},e))}))},GoToLastPageMenuItem:function(e){return a.createElement(o,null,(function(t){return a.createElement(C,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToNextPage:i,GoToNextPageButton:function(){return a.createElement(i,null,(function(e){return a.createElement(x,r({},e))}))},GoToNextPageMenuItem:function(e){return a.createElement(i,null,(function(t){return a.createElement(T,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToPreviousPage:c,GoToPreviousPageButton:function(){return a.createElement(c,null,(function(e){return a.createElement(N,r({},e))}))},GoToPreviousPageMenuItem:function(e){return a.createElement(c,null,(function(t){return a.createElement(O,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},NumberOfPages:function(t){return a.createElement(h,r({},t,{store:e}))}}}; |
{ | ||
"name": "@react-pdf-viewer/page-navigation", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"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.0" | ||
"@react-pdf-viewer/core": "3.3.1" | ||
}, | ||
@@ -52,3 +52,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "fc1c00e3802d538f2f96b6a241e995493a601f61" | ||
"gitHead": "3cffac5b07d0745738913f28797527363c0b0594" | ||
} |
36265
492
+ Added@react-pdf-viewer/core@3.3.1(transitive)
- Removed@react-pdf-viewer/core@3.3.0(transitive)
Updated@react-pdf-viewer/core@3.3.1