@progress/kendo-react-pdf-viewer 10.0.0-develop.2 → 10.0.0-develop.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/PDFViewer.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const De=require("react"),c=require("prop-types"),m=require("@progress/kendo-react-buttons"),q=require("@progress/kendo-react-inputs"),Fe=require("@progress/kendo-react-data-tools"),qe=require("@progress/kendo-react-upload"),je=require("@progress/kendo-react-dropdowns"),Ae=require("@progress/kendo-react-indicators"),j=require("@progress/kendo-react-common"),Ve=require("@progress/kendo-react-intl"),f=require("@progress/kendo-svg-icons");require("pdfjs-dist/build/pdf.worker.min.mjs");const We=require("./package-metadata.js"),i=require("@progress/kendo-pdfviewer-common"),a=require("./messages.js");function Ke(n){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const C in n)if(C!=="default"){const w=Object.getOwnPropertyDescriptor(n,C);Object.defineProperty(p,C,w.get?w:{enumerable:!0,get:()=>n[C]})}}return p.default=n,Object.freeze(p)}const e=Ke(De),oe=["pager","spacer","zoomInOut","zoom","selection","spacer","search","open","download","print"],x={minZoom:.5,maxZoom:4,tools:[...oe],zoomRate:.25,zoomLevels:[{id:1,priority:1,value:1,text:"Actual width",type:"ActualWidth",locationString:a.actualWidth},{id:2,priority:2,value:1,text:"Fit to width",type:"FitToWidth",locationString:a.fitToWidth},{id:3,priority:3,value:1,text:"Fit to page",type:"FitToPage",locationString:a.fitToPage},{id:4,priority:4,value:.5,text:"50%",type:""},{id:5,priority:5,value:.75,text:"75%",type:""},{id:6,priority:100,value:1,text:"100%",type:""},{id:7,priority:7,value:1.25,text:"125%",type:""},{id:8,priority:8,value:1.5,text:"150%",type:""},{id:9,priority:9,value:2,text:"200%",type:""},{id:10,priority:10,value:3,text:"300%",type:""},{id:11,priority:11,value:4,text:"400%",type:""}],defaultZoom:i.DEFAULT_ZOOM_LEVEL},Ue=[".k-toolbar > button",".k-toolbar .k-combobox > input",".k-toolbar .k-button-group > button",".k-toolbar .k-pager > a",".k-toolbar .k-pager input"];let te=0;function _e(){return te++,te}const He=(n,p)=>n.priority>p.priority?-1:n.priority<p.priority?1:0,A=e.forwardRef((n,p)=>{const C=!j.validatePackage(We.packageMetadata,{component:"PDFViewer"}),{zoom:w,zoomLevels:V=x.zoomLevels,defaultZoom:T=x.defaultZoom,minZoom:N=x.minZoom,maxZoom:R=x.maxZoom,zoomRate:z=x.zoomRate}=n,u=Ve.useLocalization(),s=e.useRef(null),[ne,L]=e.useState(T),h=w!==void 0?w:ne,Z=V.slice().sort(He).find(o=>o.value===h)||{text:h*100+"%",value:h,id:h,locationString:""};Z.locationString&&(Z.text=u.toLanguageString(Z.locationString,a.messages[Z.locationString]));const[d,B]=e.useState(!1),[ae,b]=e.useState(!0),[P,W]=e.useState(0),[I,K]=e.useState(!0),[re,U]=e.useState(!1),[y,O]=e.useState(0),[k,E]=e.useState(0),[S,_]=e.useState(!1),[D,H]=e.useState(""),t=e.useMemo(()=>({}),[]);t.currentZoom=h,t.props=n;const G=e.useCallback(o=>{s.current&&s.current.style.setProperty("--scale-factor",String(o))},[]),v=e.useRef(null),M=e.useRef(null);e.useImperativeHandle(v,()=>({get element(){return M.current},props:n,get pages(){return t.pages},get document(){return t.document}}),[]),e.useImperativeHandle(p,()=>v.current);const le=e.useCallback(()=>{if(t.props.onLoad){const o={target:v.current};t.props.onLoad.call(void 0,o)}},[]),J=e.useCallback((o,r,l)=>{if(n.onDownload){const g={target:v.current,blob:o,fileName:r,saveOptions:l};return n.onDownload.call(void 0,g)===!1}return!1},[n.onDownload]),ce=e.useCallback(()=>{var o;t.scroller&&t.scroller.destroy(),t.scroller=new i.Scroller((o=s.current)==null?void 0:o.parentNode,{filter:".k-page",events:{}}),t.scroller.disablePanEventsTracking()},[]),se=e.useCallback(o=>{const r=Array.from(o.querySelectorAll(".k-text-layer"));t.search=new i.SearchService({textContainers:r||[],highlightClass:"k-search-highlight",highlightMarkClass:"k-search-highlight-mark",charClass:"k-text-char"})},[]);t.done=e.useCallback(({pdfPages:o,pdfDoc:r,zoom:l})=>{t.document=r,t.pages=o,t.zoom=l,ce(),b(!1),B(!0),le(),s.current&&i.scrollToPage(s.current,0)},[]),t.error=e.useCallback(o=>{if(t.document=null,t.pages=[],b(!1),B(!1),n.onError){const r={error:typeof o=="string"?{message:o}:o,target:v.current};n.onError.call(void 0,r)}},[n.onError]),e.useEffect(()=>{s.current&&(n.url||n.data||n.arrayBuffer?(b(!0),i.removeChildren(s.current),i.loadPDF({url:n.url,data:n.data,arrayBuffer:n.arrayBuffer,dom:s.current,zoom:t.currentZoom,done:t.done,error:t.error}),G(t.currentZoom)):(t.document=null,t.pages=[],B(!1),b(!1),i.removeChildren(s.current)))},[n.url,n.data,n.arrayBuffer]);const Q=e.useCallback((o,r)=>{s.current&&(b(!0),i.removeChildren(s.current),i.reloadDocument({pdfDoc:o,zoom:r,dom:s.current,done:l=>{t.pages=l,t.zoom=r,b(!1)},error:t.error}))},[]);e.useEffect(()=>{G(h),s.current&&t.document&&h!==t.zoom&&Q(t.document,h)},[h,Q]),e.useEffect(()=>()=>{t.scroller&&t.scroller.destroy(),t.search&&t.search.destroy(),t.document=null,t.pages=[]},[]);const ie=e.useCallback(()=>{U(!0),se(s.current)},[]),ue=e.useCallback(o=>{const r=o.value,l=t.search.search({text:r,matchCase:S});E(l.length?1:0),O(l.length),H(r)},[S]),me=e.useCallback(()=>{const o=t.search.search({text:D,matchCase:!S});E(o.length?1:0),O(o.length),_(!S)},[S,D]),de=e.useCallback(()=>{i.goToNextSearchMatch(t),E(k+1>y?1:k+1)},[k,y]),ge=e.useCallback(()=>{i.goToPreviousSearchMatch(t),E(k-1<1?y:k-1)},[k,y]),X=e.useCallback(()=>{t.search.destroy(),E(0),O(0),_(!1),H(""),U(!1)},[]),fe=e.useCallback(o=>{o.key==="Enter"?(o.preventDefault(),i.goToNextSearchMatch(t),E(k+1>y?1:k+1)):o.key==="Escape"&&X()},[k,y]),he=e.useCallback(o=>{if(s.current){const r=o.skip;i.scrollToPage(s.current,r);const l={page:r+1,target:v.current,syntheticEvent:o.syntheticEvent};n.onPageChange&&n.onPageChange.call(void 0,l)}W(o.skip)},[P,n.onPageChange]),ke=e.useCallback(o=>{if(M.current){const r=i.currentPage(M.current);if(r!==P){W(r);const l={page:r+1,target:v.current,syntheticEvent:o};n.onPageChange&&n.onPageChange.call(void 0,l)}}},[P,n.onPageChange]),ve=e.useCallback(o=>{const r=Math.min(t.currentZoom+z,R);if(r!==t.currentZoom&&t.document&&(L(r),n.onZoom)){const l={zoom:r,target:v.current,syntheticEvent:o};n.onZoom.call(void 0,l)}},[z,R,n.onZoom]),be=e.useCallback(o=>{const r=Math.max(t.currentZoom-z,N);if(r!==t.currentZoom&&t.document&&(L(r),n.onZoom)){const l={zoom:r,target:v.current,syntheticEvent:o};n.onZoom.call(void 0,l)}},[z,N,n.onZoom]),ye=e.useCallback(o=>{const r=o.value===null?{text:"100%",value:1,id:100}:{...o.value};if(r.value===void 0){const g=parseFloat(r.text);typeof g=="number"&&!Number.isNaN(g)?r.value=g/100:r.value=1}let l=r?i.calculateZoomLevel(r.value,r.type,t.currentZoom,s.current):1;if(l=Math.round(l*100)/100,t.currentZoom!==l&&t.document&&(L(l),n.onZoom)){const g={zoom:l,target:v.current,syntheticEvent:o.syntheticEvent};n.onZoom.call(void 0,g)}},[n.onZoom]),pe=e.useCallback(()=>{t.scroller.disablePanEventsTracking(),K(!0)},[]),Ce=e.useCallback(()=>{t.scroller.enablePanEventsTracking(),K(!1)},[]),Ee=e.useCallback(()=>{i.download({pdf:t.document,error:t.error},n.saveFileName,n.saveOptions,J)},[n.url,n.data,n.arrayBuffer,n.saveFileName,n.saveOptions,J]),Se=e.useCallback(()=>{b(!0);const o=l=>{t.error(typeof(l?l.message||l:null)=="string"?l.message||l:u.toLanguageString(a.popupBlocked,a.messages[a.popupBlocked]))},r=()=>{b(!1)};i.print(t.pages,r,o)},[]),xe=e.useCallback(o=>{const r=o.newState;r[0]&&r[0].getRawFile&&r[0].getRawFile().arrayBuffer().then(g=>{if(s.current){b(!0),i.removeChildren(s.current);const F=t.props.zoom===void 0?T:t.props.zoom;i.loadPDF({arrayBuffer:g,dom:s.current,zoom:F,done:t.done,error:t.error}),L(F)}})},[T]),we=e.useCallback(o=>{const r=o.target;if(r instanceof Element&&r.parentNode){const l=r.closest(".k-toolbar"),g=l&&l.querySelector(".k-upload input");g&&g.click()}},[]),Y=ae&&e.createElement("div",{className:"k-loader-container k-loader-container-md k-loader-top"},e.createElement("div",{className:"k-loader-container-overlay k-overlay-light"}),e.createElement("div",{className:"k-loader-container-inner "},e.createElement(Ae.Loader,{size:"large"}))),Ze=e.createElement(m.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},e.createElement(m.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.zoomOut,a.messages[a.zoomOut]),disabled:h<=N||!d,onClick:be,icon:"zoom-out",svgIcon:f.zoomOutIcon}),e.createElement(m.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.zoomIn,a.messages[a.zoomIn]),disabled:h>=R||!d,onClick:ve,icon:"zoom-in",svgIcon:f.zoomInIcon})),ze=e.createElement(je.ComboBox,{className:"k-toolbar-combobox",disabled:!d,data:V.map(o=>({...o,text:o.locationString?u.toLanguageString(o.locationString,a.messages[o.locationString]):o.text})),dataItemKey:"id",textField:"text",value:d?Z:null,allowCustom:!0,onChange:ye,placeholder:u.toLanguageString(a.zoomLevel,a.messages[a.zoomLevel])}),Le=e.createElement(Fe.Pager,{disabled:!d,previousNext:!0,type:"input",skip:P,take:1,total:t.pages?t.pages.length:0,info:!1,onPageChange:he}),Pe=e.createElement(m.ToolbarSpacer,null),Ie=e.createElement(m.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},e.createElement(m.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.enableSelection,a.messages[a.enableSelection]),icon:"pointer",svgIcon:f.pointerIcon,disabled:!d,togglable:!0,selected:I&&d,onClick:pe}),e.createElement(m.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.enablePanning,a.messages[a.enablePanning]),icon:"hand",svgIcon:f.handIcon,disabled:!d,togglable:!0,selected:!I&&d,onClick:Ce})),Me=e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.search,a.messages[a.search]),icon:"search",svgIcon:f.searchIcon,disabled:!d,onClick:ie}),Te=e.createElement(e.Fragment,null,e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.open,a.messages[a.open]),icon:"folder-open",svgIcon:f.folderOpenIcon,onClick:we}),e.createElement("div",{style:{display:"none"}},e.createElement(qe.Upload,{restrictions:{allowedExtensions:[".pdf"]},onAdd:xe,autoUpload:!1,defaultFiles:[],multiple:!1,accept:".pdf,.PDF",withCredentials:!1}))),Ne=e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.download,a.messages[a.download]),icon:"download",svgIcon:f.downloadIcon,disabled:!d,onClick:Ee}),Re=e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.print,a.messages[a.print]),icon:"print",svgIcon:f.printIcon,disabled:!d,onClick:Se}),Be={pager:Le,spacer:Pe,zoomInOut:Ze,zoom:ze,selection:Ie,search:Me,open:Te,download:Ne,print:Re},Oe=(n.tools||x.tools).map(o=>({...Be[o],key:"toobar-tool-"+o+_e()})),$=e.createElement(m.Toolbar,{buttons:Ue},...Oe),ee=e.createElement("div",{className:j.classNames("k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto",{"k-enable-text-select":I,"k-enable-panning":!I}),onScroll:ke},re&&e.createElement("div",{className:"k-search-panel k-pos-sticky k-top-center"},e.createElement(q.TextBox,{value:D,onChange:ue,placeholder:u.toLanguageString(a.search,a.messages[a.search]),autoFocus:!0,onKeyDown:fe,suffix:()=>e.createElement(e.Fragment,null,e.createElement(q.InputSeparator,null),e.createElement(q.InputSuffix,null,e.createElement(m.Button,{icon:"convert-lowercase",svgIcon:f.convertLowercaseIcon,title:u.toLanguageString(a.matchCase,a.messages[a.matchCase]),fillMode:"flat",togglable:!0,selected:S,onClick:me})))}),e.createElement("span",{className:"k-search-matches"},e.createElement("span",null,k)," ",u.toLanguageString(a.searchOf,a.messages[a.searchOf]),e.createElement("span",null,y)),e.createElement(m.Button,{title:u.toLanguageString(a.prevMatch,a.messages[a.prevMatch]),fillMode:"flat",icon:"arrow-up",svgIcon:f.arrowUpIcon,disabled:y===0,onClick:ge}),e.createElement(m.Button,{title:u.toLanguageString(a.nextMatch,a.messages[a.nextMatch]),fillMode:"flat",icon:"arrow-down",svgIcon:f.arrowDownIcon,disabled:y===0,onClick:de}),e.createElement(m.Button,{title:u.toLanguageString(a.close,a.messages[a.close]),fillMode:"flat",icon:"x",svgIcon:f.xIcon,onClick:X})),e.createElement("div",{ref:s,className:"k-pdf-viewer-pages"}));return e.createElement("div",{className:"k-pdf-viewer",style:n.style,ref:M},n.onRenderLoader?n.onRenderLoader.call(void 0,Y||null):Y,n.onRenderToolbar?n.onRenderToolbar.call(void 0,$):$,n.onRenderContent?n.onRenderContent.call(void 0,ee):ee,C&&e.createElement(j.WatermarkOverlay,null))});A.displayName="KendoReactPDFViewer";A.propTypes={url:c.string,data:c.string,arrayBuffer:c.any,typedArray:c.any,style:c.object,saveFileName:c.string,saveOptions:c.object,tools:c.arrayOf(c.oneOf(oe).isRequired),zoomLevels:c.arrayOf(c.any),zoom:c.number,defaultZoom:c.number,minZoom:c.number,maxZoom:c.number,zoomRate:c.number,onError:c.func,onLoad:c.func,onDownload:c.func,onRenderToolbar:c.func,onRenderContent:c.func,onRenderLoader:c.func,onZoom:c.func};exports.PDFViewer=A;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const De=require("react"),c=require("prop-types"),m=require("@progress/kendo-react-buttons"),q=require("@progress/kendo-react-inputs"),Fe=require("@progress/kendo-react-data-tools"),qe=require("@progress/kendo-react-upload"),je=require("@progress/kendo-react-dropdowns"),Ae=require("@progress/kendo-react-indicators"),j=require("@progress/kendo-react-common"),Ve=require("@progress/kendo-react-intl"),f=require("@progress/kendo-svg-icons");require("pdfjs-dist/build/pdf.worker.min.mjs");const We=require("./package-metadata.js"),i=require("@progress/kendo-pdfviewer-common"),a=require("./messages.js");function Ke(n){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const C in n)if(C!=="default"){const Z=Object.getOwnPropertyDescriptor(n,C);Object.defineProperty(p,C,Z.get?Z:{enumerable:!0,get:()=>n[C]})}}return p.default=n,Object.freeze(p)}const e=Ke(De),oe=["pager","spacer","zoomInOut","zoom","selection","spacer","search","open","download","print"],w={minZoom:.5,maxZoom:4,tools:[...oe],zoomRate:.25,zoomLevels:[{id:1,priority:1,value:1,text:"Actual width",type:"ActualWidth",locationString:a.actualWidth},{id:2,priority:2,value:1,text:"Fit to width",type:"FitToWidth",locationString:a.fitToWidth},{id:3,priority:3,value:1,text:"Fit to page",type:"FitToPage",locationString:a.fitToPage},{id:4,priority:4,value:.5,text:"50%",type:""},{id:5,priority:5,value:.75,text:"75%",type:""},{id:6,priority:100,value:1,text:"100%",type:""},{id:7,priority:7,value:1.25,text:"125%",type:""},{id:8,priority:8,value:1.5,text:"150%",type:""},{id:9,priority:9,value:2,text:"200%",type:""},{id:10,priority:10,value:3,text:"300%",type:""},{id:11,priority:11,value:4,text:"400%",type:""}],defaultZoom:i.DEFAULT_ZOOM_LEVEL},Ue=[".k-toolbar > button",".k-toolbar .k-combobox > input",".k-toolbar .k-button-group > button",".k-toolbar .k-pager > a",".k-toolbar .k-pager input"];let te=0;function _e(){return te++,te}const He=(n,p)=>n.priority>p.priority?-1:n.priority<p.priority?1:0,A=e.forwardRef((n,p)=>{const C=!j.validatePackage(We.packageMetadata,{component:"PDFViewer"}),{zoom:Z,zoomLevels:V=w.zoomLevels,defaultZoom:N=w.defaultZoom,minZoom:R=w.minZoom,maxZoom:B=w.maxZoom,zoomRate:L=w.zoomRate}=n,u=Ve.useLocalization(),s=e.useRef(null),[ne,P]=e.useState(N),h=Z!==void 0?Z:ne,z=V.slice().sort(He).find(o=>o.value===h)||{text:h*100+"%",value:h,id:h,locationString:""};z.locationString&&(z.text=u.toLanguageString(z.locationString,a.messages[z.locationString]));const[g,O]=e.useState(!1),[ae,b]=e.useState(!0),[I,W]=e.useState(0),[M,K]=e.useState(!0),[re,U]=e.useState(!1),[y,D]=e.useState(0),[k,E]=e.useState(0),[S,_]=e.useState(!1),[F,H]=e.useState(""),t=e.useMemo(()=>({}),[]);t.currentZoom=h,t.props=n;const G=e.useCallback(o=>{s.current&&s.current.style.setProperty("--scale-factor",String(o))},[]),v=e.useRef(null),T=e.useRef(null);e.useImperativeHandle(v,()=>({get element(){return T.current},props:n,get pages(){return t.pages},get document(){return t.document}}),[]),e.useImperativeHandle(p,()=>v.current);const le=e.useCallback(()=>{if(t.props.onLoad){const o={target:v.current};t.props.onLoad.call(void 0,o)}},[]),J=e.useCallback((o,r,l)=>{if(n.onDownload){const d={target:v.current,blob:o,fileName:r,saveOptions:l};return n.onDownload.call(void 0,d)===!1}return!1},[n.onDownload]),ce=e.useCallback(()=>{var o;t.scroller&&t.scroller.destroy(),t.scroller=new i.Scroller((o=s.current)==null?void 0:o.parentNode,{filter:".k-page",events:{}}),t.scroller.disablePanEventsTracking()},[]),se=e.useCallback(o=>{const r=Array.from(o.querySelectorAll(".k-text-layer"));t.search=new i.SearchService({textContainers:r||[],highlightClass:"k-search-highlight",highlightMarkClass:"k-search-highlight-mark",charClass:"k-text-char"})},[]);t.done=e.useCallback(({pdfPages:o,pdfDoc:r,zoom:l})=>{t.document=r,t.pages=o,t.zoom=l,ce(),b(!1),O(!0),le(),s.current&&i.scrollToPage(s.current,0)},[]),t.error=e.useCallback(o=>{if(t.document=null,t.pages=[],b(!1),O(!1),n.onError){const r={error:typeof o=="string"?{message:o}:o,target:v.current};n.onError.call(void 0,r)}},[n.onError]),e.useEffect(()=>{s.current&&(n.url||n.data||n.arrayBuffer?(b(!0),i.removeChildren(s.current),i.loadPDF({url:n.url,data:n.data,arrayBuffer:n.arrayBuffer,dom:s.current,zoom:t.currentZoom,done:t.done,error:t.error}),G(t.currentZoom)):(t.document=null,t.pages=[],O(!1),b(!1),i.removeChildren(s.current)))},[n.url,n.data,n.arrayBuffer]);const Q=e.useCallback((o,r)=>{s.current&&(b(!0),i.removeChildren(s.current),i.reloadDocument({pdfDoc:o,zoom:r,dom:s.current,done:l=>{t.pages=l,t.zoom=r,b(!1)},error:t.error}))},[]);e.useEffect(()=>{G(h),s.current&&t.document&&h!==t.zoom&&Q(t.document,h)},[h,Q]),e.useEffect(()=>()=>{t.scroller&&t.scroller.destroy(),t.search&&t.search.destroy(),t.document=null,t.pages=[]},[]);const ie=e.useCallback(()=>{U(!0),se(s.current)},[]),ue=e.useCallback(o=>{const r=o.value,l=t.search.search({text:r,matchCase:S});E(l.length?1:0),D(l.length),H(r)},[S]),me=e.useCallback(()=>{const o=t.search.search({text:F,matchCase:!S});E(o.length?1:0),D(o.length),_(!S)},[S,F]),de=e.useCallback(()=>{i.goToNextSearchMatch(t),E(k+1>y?1:k+1)},[k,y]),ge=e.useCallback(()=>{i.goToPreviousSearchMatch(t),E(k-1<1?y:k-1)},[k,y]),X=e.useCallback(()=>{t.search.destroy(),E(0),D(0),_(!1),H(""),U(!1)},[]),fe=e.useCallback(o=>{o.key==="Enter"?(o.preventDefault(),i.goToNextSearchMatch(t),E(k+1>y?1:k+1)):o.key==="Escape"&&X()},[k,y]),he=e.useCallback(o=>{if(s.current){const r=o.skip;i.scrollToPage(s.current,r);const l={page:r+1,target:v.current,syntheticEvent:o.syntheticEvent};n.onPageChange&&n.onPageChange.call(void 0,l)}W(o.skip)},[I,n.onPageChange]),ke=e.useCallback(o=>{if(T.current){const r=i.currentPage(T.current);if(r!==I){W(r);const l={page:r+1,target:v.current,syntheticEvent:o};n.onPageChange&&n.onPageChange.call(void 0,l)}}},[I,n.onPageChange]),ve=e.useCallback(o=>{const r=Math.min(t.currentZoom+L,B);if(r!==t.currentZoom&&t.document&&(P(r),n.onZoom)){const l={zoom:r,target:v.current,syntheticEvent:o};n.onZoom.call(void 0,l)}},[L,B,n.onZoom]),be=e.useCallback(o=>{const r=Math.max(t.currentZoom-L,R);if(r!==t.currentZoom&&t.document&&(P(r),n.onZoom)){const l={zoom:r,target:v.current,syntheticEvent:o};n.onZoom.call(void 0,l)}},[L,R,n.onZoom]),ye=e.useCallback(o=>{const r=o.value===null?{text:"100%",value:1,id:100}:{...o.value};if(r.value===void 0){const d=parseFloat(r.text);typeof d=="number"&&!Number.isNaN(d)?r.value=d/100:r.value=1}let l=r?i.calculateZoomLevel(r.value,r.type,t.currentZoom,s.current):1;if(l=Math.round(l*100)/100,t.currentZoom!==l&&t.document&&(P(l),n.onZoom)){const d={zoom:l,target:v.current,syntheticEvent:o.syntheticEvent};n.onZoom.call(void 0,d)}},[n.onZoom]),pe=e.useCallback(()=>{t.scroller.disablePanEventsTracking(),K(!0)},[]),Ce=e.useCallback(()=>{t.scroller.enablePanEventsTracking(),K(!1)},[]),Ee=e.useCallback(()=>{i.download({pdf:t.document,error:t.error},n.saveFileName,n.saveOptions,J)},[n.url,n.data,n.arrayBuffer,n.saveFileName,n.saveOptions,J]),Se=e.useCallback(()=>{b(!0);const o=l=>{var d,x;t.error((x=(d=l==null?void 0:l.message)!=null?d:l)!=null?x:u.toLanguageString(a.popupBlocked,a.messages[a.popupBlocked]))},r=()=>{b(!1)};i.print(t.pages,r,o)},[]),xe=e.useCallback(o=>{const r=o.newState;r[0]&&r[0].getRawFile&&r[0].getRawFile().arrayBuffer().then(d=>{if(s.current){b(!0),i.removeChildren(s.current);const x=t.props.zoom===void 0?N:t.props.zoom;i.loadPDF({arrayBuffer:d,dom:s.current,zoom:x,done:t.done,error:t.error}),P(x)}})},[N]),we=e.useCallback(o=>{const r=o.target;if(r instanceof Element&&r.parentNode){const l=r.closest(".k-toolbar"),d=l&&l.querySelector(".k-upload input");d&&d.click()}},[]),Y=ae&&e.createElement("div",{className:"k-loader-container k-loader-container-md k-loader-top"},e.createElement("div",{className:"k-loader-container-overlay k-overlay-light"}),e.createElement("div",{className:"k-loader-container-inner "},e.createElement(Ae.Loader,{size:"large"}))),Ze=e.createElement(m.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},e.createElement(m.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.zoomOut,a.messages[a.zoomOut]),disabled:h<=R||!g,onClick:be,icon:"zoom-out",svgIcon:f.zoomOutIcon}),e.createElement(m.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.zoomIn,a.messages[a.zoomIn]),disabled:h>=B||!g,onClick:ve,icon:"zoom-in",svgIcon:f.zoomInIcon})),ze=e.createElement(je.ComboBox,{className:"k-toolbar-combobox",disabled:!g,data:V.map(o=>({...o,text:o.locationString?u.toLanguageString(o.locationString,a.messages[o.locationString]):o.text})),dataItemKey:"id",textField:"text",value:g?z:null,allowCustom:!0,onChange:ye,placeholder:u.toLanguageString(a.zoomLevel,a.messages[a.zoomLevel])}),Le=e.createElement(Fe.Pager,{disabled:!g,previousNext:!0,type:"input",skip:I,take:1,total:t.pages?t.pages.length:0,info:!1,onPageChange:he}),Pe=e.createElement(m.ToolbarSpacer,null),Ie=e.createElement(m.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},e.createElement(m.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.enableSelection,a.messages[a.enableSelection]),icon:"pointer",svgIcon:f.pointerIcon,disabled:!g,togglable:!0,selected:M&&g,onClick:pe}),e.createElement(m.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.enablePanning,a.messages[a.enablePanning]),icon:"hand",svgIcon:f.handIcon,disabled:!g,togglable:!0,selected:!M&&g,onClick:Ce})),Me=e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.search,a.messages[a.search]),icon:"search",svgIcon:f.searchIcon,disabled:!g,onClick:ie}),Te=e.createElement(e.Fragment,null,e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.open,a.messages[a.open]),icon:"folder-open",svgIcon:f.folderOpenIcon,onClick:we}),e.createElement("div",{style:{display:"none"}},e.createElement(qe.Upload,{restrictions:{allowedExtensions:[".pdf"]},onAdd:xe,autoUpload:!1,defaultFiles:[],multiple:!1,accept:".pdf,.PDF",withCredentials:!1}))),Ne=e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.download,a.messages[a.download]),icon:"download",svgIcon:f.downloadIcon,disabled:!g,onClick:Ee}),Re=e.createElement(m.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:u.toLanguageString(a.print,a.messages[a.print]),icon:"print",svgIcon:f.printIcon,disabled:!g,onClick:Se}),Be={pager:Le,spacer:Pe,zoomInOut:Ze,zoom:ze,selection:Ie,search:Me,open:Te,download:Ne,print:Re},Oe=(n.tools||w.tools).map(o=>({...Be[o],key:"toobar-tool-"+o+_e()})),$=e.createElement(m.Toolbar,{buttons:Ue},...Oe),ee=e.createElement("div",{className:j.classNames("k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto",{"k-enable-text-select":M,"k-enable-panning":!M}),onScroll:ke},re&&e.createElement("div",{className:"k-search-panel k-pos-sticky k-top-center"},e.createElement(q.TextBox,{value:F,onChange:ue,placeholder:u.toLanguageString(a.search,a.messages[a.search]),autoFocus:!0,onKeyDown:fe,suffix:()=>e.createElement(e.Fragment,null,e.createElement(q.InputSeparator,null),e.createElement(q.InputSuffix,null,e.createElement(m.Button,{icon:"convert-lowercase",svgIcon:f.convertLowercaseIcon,title:u.toLanguageString(a.matchCase,a.messages[a.matchCase]),fillMode:"flat",togglable:!0,selected:S,onClick:me})))}),e.createElement("span",{className:"k-search-matches"},e.createElement("span",null,k)," ",u.toLanguageString(a.searchOf,a.messages[a.searchOf]),e.createElement("span",null,y)),e.createElement(m.Button,{title:u.toLanguageString(a.prevMatch,a.messages[a.prevMatch]),fillMode:"flat",icon:"arrow-up",svgIcon:f.arrowUpIcon,disabled:y===0,onClick:ge}),e.createElement(m.Button,{title:u.toLanguageString(a.nextMatch,a.messages[a.nextMatch]),fillMode:"flat",icon:"arrow-down",svgIcon:f.arrowDownIcon,disabled:y===0,onClick:de}),e.createElement(m.Button,{title:u.toLanguageString(a.close,a.messages[a.close]),fillMode:"flat",icon:"x",svgIcon:f.xIcon,onClick:X})),e.createElement("div",{ref:s,className:"k-pdf-viewer-pages"}));return e.createElement("div",{className:"k-pdf-viewer",style:n.style,ref:T},n.onRenderLoader?n.onRenderLoader.call(void 0,Y||null):Y,n.onRenderToolbar?n.onRenderToolbar.call(void 0,$):$,n.onRenderContent?n.onRenderContent.call(void 0,ee):ee,C&&e.createElement(j.WatermarkOverlay,null))});A.displayName="KendoReactPDFViewer";A.propTypes={url:c.string,data:c.string,arrayBuffer:c.any,typedArray:c.any,style:c.object,saveFileName:c.string,saveOptions:c.object,tools:c.arrayOf(c.oneOf(oe).isRequired),zoomLevels:c.arrayOf(c.any),zoom:c.number,defaultZoom:c.number,minZoom:c.number,maxZoom:c.number,zoomRate:c.number,onError:c.func,onLoad:c.func,onDownload:c.func,onRenderToolbar:c.func,onRenderContent:c.func,onRenderLoader:c.func,onZoom:c.func};exports.PDFViewer=A;
package/PDFViewer.mjs CHANGED
@@ -18,8 +18,8 @@ import { useLocalization as mt } from "@progress/kendo-react-intl";
18
18
  import { zoomOutIcon as dt, zoomInIcon as gt, pointerIcon as ft, handIcon as ht, searchIcon as vt, folderOpenIcon as bt, downloadIcon as kt, printIcon as pt, convertLowercaseIcon as yt, arrowUpIcon as Ct, arrowDownIcon as Et, xIcon as St } from "@progress/kendo-svg-icons";
19
19
  import "pdfjs-dist/build/pdf.worker.min.mjs";
20
20
  import { packageMetadata as xt } from "./package-metadata.mjs";
21
- import { Scroller as wt, SearchService as Zt, scrollToPage as X, removeChildren as z, loadPDF as Y, reloadDocument as Lt, goToNextSearchMatch as ee, goToPreviousSearchMatch as zt, currentPage as It, calculateZoomLevel as Nt, download as Tt, print as Mt, DEFAULT_ZOOM_LEVEL as Pt } from "@progress/kendo-pdfviewer-common";
22
- import { messages as i, zoomOut as te, zoomIn as oe, zoomLevel as ae, enableSelection as ne, enablePanning as re, search as I, open as le, download as ce, print as se, matchCase as ie, searchOf as ue, prevMatch as me, nextMatch as de, close as ge, actualWidth as Rt, fitToWidth as Ft, fitToPage as Dt, popupBlocked as fe } from "./messages.mjs";
21
+ import { Scroller as wt, SearchService as Zt, scrollToPage as X, removeChildren as I, loadPDF as Y, reloadDocument as Lt, goToNextSearchMatch as ee, goToPreviousSearchMatch as zt, currentPage as It, calculateZoomLevel as Nt, download as Tt, print as Mt, DEFAULT_ZOOM_LEVEL as Pt } from "@progress/kendo-pdfviewer-common";
22
+ import { messages as i, zoomOut as te, zoomIn as oe, zoomLevel as ae, enableSelection as ne, enablePanning as re, search as N, open as le, download as ce, print as se, matchCase as ie, searchOf as ue, prevMatch as me, nextMatch as de, close as ge, actualWidth as Rt, fitToWidth as Ft, fitToPage as Dt, popupBlocked as fe } from "./messages.mjs";
23
23
  const ve = [
24
24
  "pager",
25
25
  "spacer",
@@ -31,7 +31,7 @@ const ve = [
31
31
  "open",
32
32
  "download",
33
33
  "print"
34
- ], y = {
34
+ ], C = {
35
35
  minZoom: 0.5,
36
36
  maxZoom: 4,
37
37
  tools: [...ve],
@@ -61,34 +61,34 @@ let he = 0;
61
61
  function Bt() {
62
62
  return he++, he;
63
63
  }
64
- const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1 : 0, be = e.forwardRef((a, E) => {
64
+ const At = (a, S) => a.priority > S.priority ? -1 : a.priority < S.priority ? 1 : 0, be = e.forwardRef((a, S) => {
65
65
  const ke = !st(xt, { component: "PDFViewer" }), {
66
66
  zoom: O,
67
- zoomLevels: B = y.zoomLevels,
68
- defaultZoom: N = y.defaultZoom,
69
- minZoom: T = y.minZoom,
70
- maxZoom: M = y.maxZoom,
71
- zoomRate: S = y.zoomRate
72
- } = a, s = mt(), c = e.useRef(null), [pe, x] = e.useState(N), g = O !== void 0 ? O : pe, C = B.slice().sort(At).find((o) => o.value === g) || {
67
+ zoomLevels: B = C.zoomLevels,
68
+ defaultZoom: T = C.defaultZoom,
69
+ minZoom: M = C.minZoom,
70
+ maxZoom: P = C.maxZoom,
71
+ zoomRate: x = C.zoomRate
72
+ } = a, s = mt(), c = e.useRef(null), [pe, w] = e.useState(T), g = O !== void 0 ? O : pe, E = B.slice().sort(At).find((o) => o.value === g) || {
73
73
  text: g * 100 + "%",
74
74
  value: g,
75
75
  id: g,
76
76
  locationString: ""
77
77
  };
78
- C.locationString && (C.text = s.toLanguageString(
79
- C.locationString,
80
- i[C.locationString]
78
+ E.locationString && (E.text = s.toLanguageString(
79
+ E.locationString,
80
+ i[E.locationString]
81
81
  ));
82
- const [u, P] = e.useState(!1), [ye, v] = e.useState(!0), [w, A] = e.useState(0), [Z, V] = e.useState(!0), [Ce, W] = e.useState(!1), [b, R] = e.useState(0), [f, k] = e.useState(0), [p, K] = e.useState(!1), [F, U] = e.useState(""), t = e.useMemo(() => ({}), []);
82
+ const [m, R] = e.useState(!1), [ye, v] = e.useState(!0), [Z, A] = e.useState(0), [L, V] = e.useState(!0), [Ce, W] = e.useState(!1), [b, F] = e.useState(0), [f, k] = e.useState(0), [p, K] = e.useState(!1), [D, U] = e.useState(""), t = e.useMemo(() => ({}), []);
83
83
  t.currentZoom = g, t.props = a;
84
84
  const j = e.useCallback((o) => {
85
85
  c.current && c.current.style.setProperty("--scale-factor", String(o));
86
- }, []), h = e.useRef(null), L = e.useRef(null);
86
+ }, []), h = e.useRef(null), z = e.useRef(null);
87
87
  e.useImperativeHandle(
88
88
  h,
89
89
  () => ({
90
90
  get element() {
91
- return L.current;
91
+ return z.current;
92
92
  },
93
93
  props: a,
94
94
  get pages() {
@@ -99,7 +99,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
99
99
  }
100
100
  }),
101
101
  []
102
- ), e.useImperativeHandle(E, () => h.current);
102
+ ), e.useImperativeHandle(S, () => h.current);
103
103
  const Ee = e.useCallback(() => {
104
104
  if (t.props.onLoad) {
105
105
  const o = { target: h.current };
@@ -108,13 +108,13 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
108
108
  }, []), q = e.useCallback(
109
109
  (o, n, r) => {
110
110
  if (a.onDownload) {
111
- const m = {
111
+ const u = {
112
112
  target: h.current,
113
113
  blob: o,
114
114
  fileName: n,
115
115
  saveOptions: r
116
116
  };
117
- return a.onDownload.call(void 0, m) === !1;
117
+ return a.onDownload.call(void 0, u) === !1;
118
118
  }
119
119
  return !1;
120
120
  },
@@ -135,10 +135,10 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
135
135
  });
136
136
  }, []);
137
137
  t.done = e.useCallback(({ pdfPages: o, pdfDoc: n, zoom: r }) => {
138
- t.document = n, t.pages = o, t.zoom = r, Se(), v(!1), P(!0), Ee(), c.current && X(c.current, 0);
138
+ t.document = n, t.pages = o, t.zoom = r, Se(), v(!1), R(!0), Ee(), c.current && X(c.current, 0);
139
139
  }, []), t.error = e.useCallback(
140
140
  (o) => {
141
- if (t.document = null, t.pages = [], v(!1), P(!1), a.onError) {
141
+ if (t.document = null, t.pages = [], v(!1), R(!1), a.onError) {
142
142
  const n = {
143
143
  error: typeof o == "string" ? { message: o } : o,
144
144
  target: h.current
@@ -148,7 +148,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
148
148
  },
149
149
  [a.onError]
150
150
  ), e.useEffect(() => {
151
- c.current && (a.url || a.data || a.arrayBuffer ? (v(!0), z(c.current), Y({
151
+ c.current && (a.url || a.data || a.arrayBuffer ? (v(!0), I(c.current), Y({
152
152
  url: a.url,
153
153
  data: a.data,
154
154
  arrayBuffer: a.arrayBuffer,
@@ -156,10 +156,10 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
156
156
  zoom: t.currentZoom,
157
157
  done: t.done,
158
158
  error: t.error
159
- }), j(t.currentZoom)) : (t.document = null, t.pages = [], P(!1), v(!1), z(c.current)));
159
+ }), j(t.currentZoom)) : (t.document = null, t.pages = [], R(!1), v(!1), I(c.current)));
160
160
  }, [a.url, a.data, a.arrayBuffer]);
161
161
  const H = e.useCallback((o, n) => {
162
- c.current && (v(!0), z(c.current), Lt({
162
+ c.current && (v(!0), I(c.current), Lt({
163
163
  pdfDoc: o,
164
164
  zoom: n,
165
165
  dom: c.current,
@@ -179,18 +179,18 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
179
179
  }, []), Ze = e.useCallback(
180
180
  (o) => {
181
181
  const n = o.value, r = t.search.search({ text: n, matchCase: p });
182
- k(r.length ? 1 : 0), R(r.length), U(n);
182
+ k(r.length ? 1 : 0), F(r.length), U(n);
183
183
  },
184
184
  [p]
185
185
  ), Le = e.useCallback(() => {
186
- const o = t.search.search({ text: F, matchCase: !p });
187
- k(o.length ? 1 : 0), R(o.length), K(!p);
188
- }, [p, F]), ze = e.useCallback(() => {
186
+ const o = t.search.search({ text: D, matchCase: !p });
187
+ k(o.length ? 1 : 0), F(o.length), K(!p);
188
+ }, [p, D]), ze = e.useCallback(() => {
189
189
  ee(t), k(f + 1 > b ? 1 : f + 1);
190
190
  }, [f, b]), Ie = e.useCallback(() => {
191
191
  zt(t), k(f - 1 < 1 ? b : f - 1);
192
192
  }, [f, b]), $ = e.useCallback(() => {
193
- t.search.destroy(), k(0), R(0), K(!1), U(""), W(!1);
193
+ t.search.destroy(), k(0), F(0), K(!1), U(""), W(!1);
194
194
  }, []), Ne = e.useCallback(
195
195
  (o) => {
196
196
  o.key === "Enter" ? (o.preventDefault(), ee(t), k(f + 1 > b ? 1 : f + 1)) : o.key === "Escape" && $();
@@ -210,12 +210,12 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
210
210
  }
211
211
  A(o.skip);
212
212
  },
213
- [w, a.onPageChange]
213
+ [Z, a.onPageChange]
214
214
  ), Me = e.useCallback(
215
215
  (o) => {
216
- if (L.current) {
217
- const n = It(L.current);
218
- if (n !== w) {
216
+ if (z.current) {
217
+ const n = It(z.current);
218
+ if (n !== Z) {
219
219
  A(n);
220
220
  const r = {
221
221
  page: n + 1,
@@ -226,11 +226,11 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
226
226
  }
227
227
  }
228
228
  },
229
- [w, a.onPageChange]
229
+ [Z, a.onPageChange]
230
230
  ), Pe = e.useCallback(
231
231
  (o) => {
232
- const n = Math.min(t.currentZoom + S, M);
233
- if (n !== t.currentZoom && t.document && (x(n), a.onZoom)) {
232
+ const n = Math.min(t.currentZoom + x, P);
233
+ if (n !== t.currentZoom && t.document && (w(n), a.onZoom)) {
234
234
  const r = {
235
235
  zoom: n,
236
236
  target: h.current,
@@ -239,11 +239,11 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
239
239
  a.onZoom.call(void 0, r);
240
240
  }
241
241
  },
242
- [S, M, a.onZoom]
242
+ [x, P, a.onZoom]
243
243
  ), Re = e.useCallback(
244
244
  (o) => {
245
- const n = Math.max(t.currentZoom - S, T);
246
- if (n !== t.currentZoom && t.document && (x(n), a.onZoom)) {
245
+ const n = Math.max(t.currentZoom - x, M);
246
+ if (n !== t.currentZoom && t.document && (w(n), a.onZoom)) {
247
247
  const r = {
248
248
  zoom: n,
249
249
  target: h.current,
@@ -252,22 +252,22 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
252
252
  a.onZoom.call(void 0, r);
253
253
  }
254
254
  },
255
- [S, T, a.onZoom]
255
+ [x, M, a.onZoom]
256
256
  ), Fe = e.useCallback(
257
257
  (o) => {
258
258
  const n = o.value === null ? { text: "100%", value: 1, id: 100 } : { ...o.value };
259
259
  if (n.value === void 0) {
260
- const m = parseFloat(n.text);
261
- typeof m == "number" && !Number.isNaN(m) ? n.value = m / 100 : n.value = 1;
260
+ const u = parseFloat(n.text);
261
+ typeof u == "number" && !Number.isNaN(u) ? n.value = u / 100 : n.value = 1;
262
262
  }
263
263
  let r = n ? Nt(n.value, n.type, t.currentZoom, c.current) : 1;
264
- if (r = Math.round(r * 100) / 100, t.currentZoom !== r && t.document && (x(r), a.onZoom)) {
265
- const m = {
264
+ if (r = Math.round(r * 100) / 100, t.currentZoom !== r && t.document && (w(r), a.onZoom)) {
265
+ const u = {
266
266
  zoom: r,
267
267
  target: h.current,
268
268
  syntheticEvent: o.syntheticEvent
269
269
  };
270
- a.onZoom.call(void 0, m);
270
+ a.onZoom.call(void 0, u);
271
271
  }
272
272
  },
273
273
  [a.onZoom]
@@ -288,9 +288,8 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
288
288
  }, [a.url, a.data, a.arrayBuffer, a.saveFileName, a.saveOptions, q]), Ae = e.useCallback(() => {
289
289
  v(!0);
290
290
  const o = (r) => {
291
- t.error(
292
- typeof (r ? r.message || r : null) == "string" ? r.message || r : s.toLanguageString(fe, i[fe])
293
- );
291
+ var u, y;
292
+ t.error((y = (u = r == null ? void 0 : r.message) != null ? u : r) != null ? y : s.toLanguageString(fe, i[fe]));
294
293
  }, n = () => {
295
294
  v(!1);
296
295
  };
@@ -298,26 +297,26 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
298
297
  }, []), Ve = e.useCallback(
299
298
  (o) => {
300
299
  const n = o.newState;
301
- n[0] && n[0].getRawFile && n[0].getRawFile().arrayBuffer().then((m) => {
300
+ n[0] && n[0].getRawFile && n[0].getRawFile().arrayBuffer().then((u) => {
302
301
  if (c.current) {
303
- v(!0), z(c.current);
304
- const D = t.props.zoom === void 0 ? N : t.props.zoom;
302
+ v(!0), I(c.current);
303
+ const y = t.props.zoom === void 0 ? T : t.props.zoom;
305
304
  Y({
306
- arrayBuffer: m,
305
+ arrayBuffer: u,
307
306
  dom: c.current,
308
- zoom: D,
307
+ zoom: y,
309
308
  done: t.done,
310
309
  error: t.error
311
- }), x(D);
310
+ }), w(y);
312
311
  }
313
312
  });
314
313
  },
315
- [N]
314
+ [T]
316
315
  ), We = e.useCallback((o) => {
317
316
  const n = o.target;
318
317
  if (n instanceof Element && n.parentNode) {
319
- const r = n.closest(".k-toolbar"), m = r && r.querySelector(".k-upload input");
320
- m && m.click();
318
+ const r = n.closest(".k-toolbar"), u = r && r.querySelector(".k-upload input");
319
+ u && u.click();
321
320
  }
322
321
  }, []), _ = ye && /* @__PURE__ */ e.createElement("div", { className: "k-loader-container k-loader-container-md k-loader-top" }, /* @__PURE__ */ e.createElement("div", { className: "k-loader-container-overlay k-overlay-light" }), /* @__PURE__ */ e.createElement("div", { className: "k-loader-container-inner " }, /* @__PURE__ */ e.createElement(ct, { size: "large" }))), Ke = /* @__PURE__ */ e.createElement(Q, { className: "k-toolbar-button-group k-button-group-solid" }, /* @__PURE__ */ e.createElement(
323
322
  d,
@@ -326,7 +325,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
326
325
  fillMode: "flat",
327
326
  themeColor: "base",
328
327
  title: s.toLanguageString(te, i[te]),
329
- disabled: g <= T || !u,
328
+ disabled: g <= M || !m,
330
329
  onClick: Re,
331
330
  icon: "zoom-out",
332
331
  svgIcon: dt
@@ -338,7 +337,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
338
337
  fillMode: "flat",
339
338
  themeColor: "base",
340
339
  title: s.toLanguageString(oe, i[oe]),
341
- disabled: g >= M || !u,
340
+ disabled: g >= P || !m,
342
341
  onClick: Pe,
343
342
  icon: "zoom-in",
344
343
  svgIcon: gt
@@ -347,14 +346,14 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
347
346
  lt,
348
347
  {
349
348
  className: "k-toolbar-combobox",
350
- disabled: !u,
349
+ disabled: !m,
351
350
  data: B.map((o) => ({
352
351
  ...o,
353
352
  text: o.locationString ? s.toLanguageString(o.locationString, i[o.locationString]) : o.text
354
353
  })),
355
354
  dataItemKey: "id",
356
355
  textField: "text",
357
- value: u ? C : null,
356
+ value: m ? E : null,
358
357
  allowCustom: !0,
359
358
  onChange: Fe,
360
359
  placeholder: s.toLanguageString(ae, i[ae])
@@ -362,10 +361,10 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
362
361
  ), je = /* @__PURE__ */ e.createElement(
363
362
  nt,
364
363
  {
365
- disabled: !u,
364
+ disabled: !m,
366
365
  previousNext: !0,
367
366
  type: "input",
368
- skip: w,
367
+ skip: Z,
369
368
  take: 1,
370
369
  total: t.pages ? t.pages.length : 0,
371
370
  info: !1,
@@ -380,9 +379,9 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
380
379
  title: s.toLanguageString(ne, i[ne]),
381
380
  icon: "pointer",
382
381
  svgIcon: ft,
383
- disabled: !u,
382
+ disabled: !m,
384
383
  togglable: !0,
385
- selected: Z && u,
384
+ selected: L && m,
386
385
  onClick: De
387
386
  }
388
387
  ), /* @__PURE__ */ e.createElement(
@@ -394,9 +393,9 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
394
393
  title: s.toLanguageString(re, i[re]),
395
394
  icon: "hand",
396
395
  svgIcon: ht,
397
- disabled: !u,
396
+ disabled: !m,
398
397
  togglable: !0,
399
- selected: !Z && u,
398
+ selected: !L && m,
400
399
  onClick: Oe
401
400
  }
402
401
  )), $e = /* @__PURE__ */ e.createElement(
@@ -405,10 +404,10 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
405
404
  className: "k-toolbar-button",
406
405
  fillMode: "flat",
407
406
  themeColor: "base",
408
- title: s.toLanguageString(I, i[I]),
407
+ title: s.toLanguageString(N, i[N]),
409
408
  icon: "search",
410
409
  svgIcon: vt,
411
- disabled: !u,
410
+ disabled: !m,
412
411
  onClick: we
413
412
  }
414
413
  ), _e = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
@@ -442,7 +441,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
442
441
  title: s.toLanguageString(ce, i[ce]),
443
442
  icon: "download",
444
443
  svgIcon: kt,
445
- disabled: !u,
444
+ disabled: !m,
446
445
  onClick: Be
447
446
  }
448
447
  ), Je = /* @__PURE__ */ e.createElement(
@@ -454,7 +453,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
454
453
  title: s.toLanguageString(se, i[se]),
455
454
  icon: "print",
456
455
  svgIcon: pt,
457
- disabled: !u,
456
+ disabled: !m,
458
457
  onClick: Ae
459
458
  }
460
459
  ), Qe = {
@@ -467,24 +466,24 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
467
466
  open: _e,
468
467
  download: Ge,
469
468
  print: Je
470
- }, Xe = (a.tools || y.tools).map((o) => ({
469
+ }, Xe = (a.tools || C.tools).map((o) => ({
471
470
  ...Qe[o],
472
471
  key: "toobar-tool-" + o + Bt()
473
472
  })), G = /* @__PURE__ */ e.createElement(Ye, { buttons: Ot }, ...Xe), J = /* @__PURE__ */ e.createElement(
474
473
  "div",
475
474
  {
476
475
  className: it("k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto", {
477
- "k-enable-text-select": Z,
478
- "k-enable-panning": !Z
476
+ "k-enable-text-select": L,
477
+ "k-enable-panning": !L
479
478
  }),
480
479
  onScroll: Me
481
480
  },
482
481
  Ce && /* @__PURE__ */ e.createElement("div", { className: "k-search-panel k-pos-sticky k-top-center" }, /* @__PURE__ */ e.createElement(
483
482
  tt,
484
483
  {
485
- value: F,
484
+ value: D,
486
485
  onChange: Ze,
487
- placeholder: s.toLanguageString(I, i[I]),
486
+ placeholder: s.toLanguageString(N, i[N]),
488
487
  autoFocus: !0,
489
488
  onKeyDown: Ne,
490
489
  suffix: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(ot, null), /* @__PURE__ */ e.createElement(at, null, /* @__PURE__ */ e.createElement(
@@ -532,7 +531,7 @@ const At = (a, E) => a.priority > E.priority ? -1 : a.priority < E.priority ? 1
532
531
  )),
533
532
  /* @__PURE__ */ e.createElement("div", { ref: c, className: "k-pdf-viewer-pages" })
534
533
  );
535
- return /* @__PURE__ */ e.createElement("div", { className: "k-pdf-viewer", style: a.style, ref: L }, a.onRenderLoader ? a.onRenderLoader.call(void 0, _ || null) : _, a.onRenderToolbar ? a.onRenderToolbar.call(void 0, G) : G, a.onRenderContent ? a.onRenderContent.call(void 0, J) : J, ke && /* @__PURE__ */ e.createElement(ut, null));
534
+ return /* @__PURE__ */ e.createElement("div", { className: "k-pdf-viewer", style: a.style, ref: z }, a.onRenderLoader ? a.onRenderLoader.call(void 0, _ || null) : _, a.onRenderToolbar ? a.onRenderToolbar.call(void 0, G) : G, a.onRenderContent ? a.onRenderContent.call(void 0, J) : J, ke && /* @__PURE__ */ e.createElement(ut, null));
536
535
  });
537
536
  be.displayName = "KendoReactPDFViewer";
538
537
  be.propTypes = {
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@progress/kendo-pdfviewer-common"),require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-upload"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-indicators"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons"),require("pdfjs-dist/build/pdf.worker.min.mjs")):"function"==typeof define&&define.amd?define(["exports","@progress/kendo-pdfviewer-common","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-inputs","@progress/kendo-react-data-tools","@progress/kendo-react-upload","@progress/kendo-react-dropdowns","@progress/kendo-react-indicators","@progress/kendo-react-common","@progress/kendo-react-intl","@progress/kendo-svg-icons","pdfjs-dist/build/pdf.worker.min.mjs"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPdfViewer={},e.KendoPdfviewerCommon,e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactInputs,e.KendoReactDataTools,e.KendoReactUpload,e.KendoReactDropdowns,e.KendoReactIndicators,e.KendoReactCommon,e.KendoReactIntl,e.KendoSvgIcons)}(this,(function(e,o,t,r,a,n,l,c,s,i,u,d,p){"use strict";function m(e){var o=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),o.default=e,Object.freeze(o)}var g=m(t);const f={name:"@progress/kendo-react-pdf-viewer",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1673300081,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},v="pdfviewer.zoomIn",k="pdfviewer.zoomOut",b="pdfviewer.zoomLevel",h="pdfviewer.enableSelection",y="pdfviewer.enablePanning",C="pdfviewer.search",w="pdfviewer.open",E="pdfviewer.download",S="pdfviewer.print",x="pdfviewer.close",I="pdfviewer.matchCase",P="pdfviewer.prevMatch",N="pdfviewer.nextMatch",z="pdfviewer.actualWidth",L="pdfviewer.fitToWidth",R="pdfviewer.fitToPage",Z="pdfviewer.popupBlocked",T="pdfviewer.searchOf",O={[v]:"Zoom in",[k]:"Zoom out",[b]:"Choose zoom level",[h]:"Enable selection",[y]:"Enable panning",[C]:"Search",[w]:"Open",[E]:"Download",[T]:"of",[S]:"Print",[x]:"Close",[I]:"Match case",[P]:"Previous match",[N]:"Next match",[z]:"Actual width",[L]:"Fit to width",[R]:"Fit to page",[Z]:"Popup is blocked."},B=["pager","spacer","zoomInOut","zoom","selection","spacer","search","open","download","print"],D={minZoom:.5,maxZoom:4,tools:[...B],zoomRate:.25,zoomLevels:[{id:1,priority:1,value:1,text:"Actual width",type:"ActualWidth",locationString:z},{id:2,priority:2,value:1,text:"Fit to width",type:"FitToWidth",locationString:L},{id:3,priority:3,value:1,text:"Fit to page",type:"FitToPage",locationString:R},{id:4,priority:4,value:.5,text:"50%",type:""},{id:5,priority:5,value:.75,text:"75%",type:""},{id:6,priority:100,value:1,text:"100%",type:""},{id:7,priority:7,value:1.25,text:"125%",type:""},{id:8,priority:8,value:1.5,text:"150%",type:""},{id:9,priority:9,value:2,text:"200%",type:""},{id:10,priority:10,value:3,text:"300%",type:""},{id:11,priority:11,value:4,text:"400%",type:""}],defaultZoom:o.DEFAULT_ZOOM_LEVEL},F=[".k-toolbar > button",".k-toolbar .k-combobox > input",".k-toolbar .k-button-group > button",".k-toolbar .k-pager > a",".k-toolbar .k-pager input"];let M=0;const K=(e,o)=>e.priority>o.priority?-1:e.priority<o.priority?1:0,q=g.forwardRef(((e,t)=>{const r=!u.validatePackage(f,{component:"PDFViewer"}),{zoom:m,zoomLevels:z=D.zoomLevels,defaultZoom:L=D.defaultZoom,minZoom:R=D.minZoom,maxZoom:B=D.maxZoom,zoomRate:q=D.zoomRate}=e,j=d.useLocalization(),A=g.useRef(null),[U,V]=g.useState(L),W=void 0!==m?m:U,_=z.slice().sort(K).find((e=>e.value===W))||{text:100*W+"%",value:W,id:W,locationString:""};_.locationString&&(_.text=j.toLanguageString(_.locationString,O[_.locationString]));const[G,H]=g.useState(!1),[$,J]=g.useState(!0),[Q,X]=g.useState(0),[Y,ee]=g.useState(!0),[oe,te]=g.useState(!1),[re,ae]=g.useState(0),[ne,le]=g.useState(0),[ce,se]=g.useState(!1),[ie,ue]=g.useState(""),de=g.useMemo((()=>({})),[]);de.currentZoom=W,de.props=e;const pe=g.useCallback((e=>{A.current&&A.current.style.setProperty("--scale-factor",String(e))}),[]),me=g.useRef(null),ge=g.useRef(null);g.useImperativeHandle(me,(()=>({get element(){return ge.current},props:e,get pages(){return de.pages},get document(){return de.document}})),[]),g.useImperativeHandle(t,(()=>me.current));const fe=g.useCallback((()=>{if(de.props.onLoad){const e={target:me.current};de.props.onLoad.call(void 0,e)}}),[]),ve=g.useCallback(((o,t,r)=>{if(e.onDownload){const a={target:me.current,blob:o,fileName:t,saveOptions:r};return!1===e.onDownload.call(void 0,a)}return!1}),[e.onDownload]),ke=g.useCallback((()=>{var e;de.scroller&&de.scroller.destroy(),de.scroller=new o.Scroller(null==(e=A.current)?void 0:e.parentNode,{filter:".k-page",events:{}}),de.scroller.disablePanEventsTracking()}),[]),be=g.useCallback((e=>{const t=Array.from(e.querySelectorAll(".k-text-layer"));de.search=new o.SearchService({textContainers:t||[],highlightClass:"k-search-highlight",highlightMarkClass:"k-search-highlight-mark",charClass:"k-text-char"})}),[]);de.done=g.useCallback((({pdfPages:e,pdfDoc:t,zoom:r})=>{de.document=t,de.pages=e,de.zoom=r,ke(),J(!1),H(!0),fe(),A.current&&o.scrollToPage(A.current,0)}),[]),de.error=g.useCallback((o=>{if(de.document=null,de.pages=[],J(!1),H(!1),e.onError){const t={error:"string"==typeof o?{message:o}:o,target:me.current};e.onError.call(void 0,t)}}),[e.onError]),g.useEffect((()=>{A.current&&(e.url||e.data||e.arrayBuffer?(J(!0),o.removeChildren(A.current),o.loadPDF({url:e.url,data:e.data,arrayBuffer:e.arrayBuffer,dom:A.current,zoom:de.currentZoom,done:de.done,error:de.error}),pe(de.currentZoom)):(de.document=null,de.pages=[],H(!1),J(!1),o.removeChildren(A.current)))}),[e.url,e.data,e.arrayBuffer]);const he=g.useCallback(((e,t)=>{A.current&&(J(!0),o.removeChildren(A.current),o.reloadDocument({pdfDoc:e,zoom:t,dom:A.current,done:e=>{de.pages=e,de.zoom=t,J(!1)},error:de.error}))}),[]);g.useEffect((()=>{pe(W),A.current&&de.document&&W!==de.zoom&&he(de.document,W)}),[W,he]),g.useEffect((()=>()=>{de.scroller&&de.scroller.destroy(),de.search&&de.search.destroy(),de.document=null,de.pages=[]}),[]);const ye=g.useCallback((()=>{te(!0),be(A.current)}),[]),Ce=g.useCallback((e=>{const o=e.value,t=de.search.search({text:o,matchCase:ce});le(t.length?1:0),ae(t.length),ue(o)}),[ce]),we=g.useCallback((()=>{const e=de.search.search({text:ie,matchCase:!ce});le(e.length?1:0),ae(e.length),se(!ce)}),[ce,ie]),Ee=g.useCallback((()=>{o.goToNextSearchMatch(de),le(ne+1>re?1:ne+1)}),[ne,re]),Se=g.useCallback((()=>{o.goToPreviousSearchMatch(de),le(ne-1<1?re:ne-1)}),[ne,re]),xe=g.useCallback((()=>{de.search.destroy(),le(0),ae(0),se(!1),ue(""),te(!1)}),[]),Ie=g.useCallback((e=>{"Enter"===e.key?(e.preventDefault(),o.goToNextSearchMatch(de),le(ne+1>re?1:ne+1)):"Escape"===e.key&&xe()}),[ne,re]),Pe=g.useCallback((t=>{if(A.current){const r=t.skip;o.scrollToPage(A.current,r);const a={page:r+1,target:me.current,syntheticEvent:t.syntheticEvent};e.onPageChange&&e.onPageChange.call(void 0,a)}X(t.skip)}),[Q,e.onPageChange]),Ne=g.useCallback((t=>{if(ge.current){const r=o.currentPage(ge.current);if(r!==Q){X(r);const o={page:r+1,target:me.current,syntheticEvent:t};e.onPageChange&&e.onPageChange.call(void 0,o)}}}),[Q,e.onPageChange]),ze=g.useCallback((o=>{const t=Math.min(de.currentZoom+q,B);if(t!==de.currentZoom&&de.document&&(V(t),e.onZoom)){const r={zoom:t,target:me.current,syntheticEvent:o};e.onZoom.call(void 0,r)}}),[q,B,e.onZoom]),Le=g.useCallback((o=>{const t=Math.max(de.currentZoom-q,R);if(t!==de.currentZoom&&de.document&&(V(t),e.onZoom)){const r={zoom:t,target:me.current,syntheticEvent:o};e.onZoom.call(void 0,r)}}),[q,R,e.onZoom]),Re=g.useCallback((t=>{const r=null===t.value?{text:"100%",value:1,id:100}:{...t.value};if(void 0===r.value){const e=parseFloat(r.text);"number"!=typeof e||Number.isNaN(e)?r.value=1:r.value=e/100}let a=r?o.calculateZoomLevel(r.value,r.type,de.currentZoom,A.current):1;if(a=Math.round(100*a)/100,de.currentZoom!==a&&de.document&&(V(a),e.onZoom)){const o={zoom:a,target:me.current,syntheticEvent:t.syntheticEvent};e.onZoom.call(void 0,o)}}),[e.onZoom]),Ze=g.useCallback((()=>{de.scroller.disablePanEventsTracking(),ee(!0)}),[]),Te=g.useCallback((()=>{de.scroller.enablePanEventsTracking(),ee(!1)}),[]),Oe=g.useCallback((()=>{o.download({pdf:de.document,error:de.error},e.saveFileName,e.saveOptions,ve)}),[e.url,e.data,e.arrayBuffer,e.saveFileName,e.saveOptions,ve]),Be=g.useCallback((()=>{J(!0);o.print(de.pages,(()=>{J(!1)}),(e=>{de.error("string"==typeof(e?e.message||e:null)?e.message||e:j.toLanguageString(Z,O[Z]))}))}),[]),De=g.useCallback((e=>{const t=e.newState;t[0]&&t[0].getRawFile&&t[0].getRawFile().arrayBuffer().then((e=>{if(A.current){J(!0),o.removeChildren(A.current);const t=void 0===de.props.zoom?L:de.props.zoom;o.loadPDF({arrayBuffer:e,dom:A.current,zoom:t,done:de.done,error:de.error}),V(t)}}))}),[L]),Fe=g.useCallback((e=>{const o=e.target;if(o instanceof Element&&o.parentNode){const e=o.closest(".k-toolbar"),t=e&&e.querySelector(".k-upload input");t&&t.click()}}),[]),Me=$&&g.createElement("div",{className:"k-loader-container k-loader-container-md k-loader-top"},g.createElement("div",{className:"k-loader-container-overlay k-overlay-light"}),g.createElement("div",{className:"k-loader-container-inner "},g.createElement(i.Loader,{size:"large"}))),Ke=g.createElement(a.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},g.createElement(a.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:j.toLanguageString(k,O[k]),disabled:W<=R||!G,onClick:Le,icon:"zoom-out",svgIcon:p.zoomOutIcon}),g.createElement(a.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:j.toLanguageString(v,O[v]),disabled:W>=B||!G,onClick:ze,icon:"zoom-in",svgIcon:p.zoomInIcon})),qe=g.createElement(s.ComboBox,{className:"k-toolbar-combobox",disabled:!G,data:z.map((e=>({...e,text:e.locationString?j.toLanguageString(e.locationString,O[e.locationString]):e.text}))),dataItemKey:"id",textField:"text",value:G?_:null,allowCustom:!0,onChange:Re,placeholder:j.toLanguageString(b,O[b])}),je={pager:g.createElement(l.Pager,{disabled:!G,previousNext:!0,type:"input",skip:Q,take:1,total:de.pages?de.pages.length:0,info:!1,onPageChange:Pe}),spacer:g.createElement(a.ToolbarSpacer,null),zoomInOut:Ke,zoom:qe,selection:g.createElement(a.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},g.createElement(a.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:j.toLanguageString(h,O[h]),icon:"pointer",svgIcon:p.pointerIcon,disabled:!G,togglable:!0,selected:Y&&G,onClick:Ze}),g.createElement(a.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:j.toLanguageString(y,O[y]),icon:"hand",svgIcon:p.handIcon,disabled:!G,togglable:!0,selected:!Y&&G,onClick:Te})),search:g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(C,O[C]),icon:"search",svgIcon:p.searchIcon,disabled:!G,onClick:ye}),open:g.createElement(g.Fragment,null,g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(w,O[w]),icon:"folder-open",svgIcon:p.folderOpenIcon,onClick:Fe}),g.createElement("div",{style:{display:"none"}},g.createElement(c.Upload,{restrictions:{allowedExtensions:[".pdf"]},onAdd:De,autoUpload:!1,defaultFiles:[],multiple:!1,accept:".pdf,.PDF",withCredentials:!1}))),download:g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(E,O[E]),icon:"download",svgIcon:p.downloadIcon,disabled:!G,onClick:Oe}),print:g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(S,O[S]),icon:"print",svgIcon:p.printIcon,disabled:!G,onClick:Be})},Ae=(e.tools||D.tools).map((e=>({...je[e],key:"toobar-tool-"+e+(M++,M)}))),Ue=g.createElement(a.Toolbar,{buttons:F},...Ae),Ve=g.createElement("div",{className:u.classNames("k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto",{"k-enable-text-select":Y,"k-enable-panning":!Y}),onScroll:Ne},oe&&g.createElement("div",{className:"k-search-panel k-pos-sticky k-top-center"},g.createElement(n.TextBox,{value:ie,onChange:Ce,placeholder:j.toLanguageString(C,O[C]),autoFocus:!0,onKeyDown:Ie,suffix:()=>g.createElement(g.Fragment,null,g.createElement(n.InputSeparator,null),g.createElement(n.InputSuffix,null,g.createElement(a.Button,{icon:"convert-lowercase",svgIcon:p.convertLowercaseIcon,title:j.toLanguageString(I,O[I]),fillMode:"flat",togglable:!0,selected:ce,onClick:we})))}),g.createElement("span",{className:"k-search-matches"},g.createElement("span",null,ne)," ",j.toLanguageString(T,O[T]),g.createElement("span",null,re)),g.createElement(a.Button,{title:j.toLanguageString(P,O[P]),fillMode:"flat",icon:"arrow-up",svgIcon:p.arrowUpIcon,disabled:0===re,onClick:Se}),g.createElement(a.Button,{title:j.toLanguageString(N,O[N]),fillMode:"flat",icon:"arrow-down",svgIcon:p.arrowDownIcon,disabled:0===re,onClick:Ee}),g.createElement(a.Button,{title:j.toLanguageString(x,O[x]),fillMode:"flat",icon:"x",svgIcon:p.xIcon,onClick:xe})),g.createElement("div",{ref:A,className:"k-pdf-viewer-pages"}));return g.createElement("div",{className:"k-pdf-viewer",style:e.style,ref:ge},e.onRenderLoader?e.onRenderLoader.call(void 0,Me||null):Me,e.onRenderToolbar?e.onRenderToolbar.call(void 0,Ue):Ue,e.onRenderContent?e.onRenderContent.call(void 0,Ve):Ve,r&&g.createElement(u.WatermarkOverlay,null))}));q.displayName="KendoReactPDFViewer",q.propTypes={url:r.string,data:r.string,arrayBuffer:r.any,typedArray:r.any,style:r.object,saveFileName:r.string,saveOptions:r.object,tools:r.arrayOf(r.oneOf(B).isRequired),zoomLevels:r.arrayOf(r.any),zoom:r.number,defaultZoom:r.number,minZoom:r.number,maxZoom:r.number,zoomRate:r.number,onError:r.func,onLoad:r.func,onDownload:r.func,onRenderToolbar:r.func,onRenderContent:r.func,onRenderLoader:r.func,onZoom:r.func};const j=o.scrollToPage;Object.defineProperty(e,"currentPage",{enumerable:!0,get:function(){return o.currentPage}}),e.PDFViewer=q,e.scrollToPage=j}));
15
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@progress/kendo-pdfviewer-common"),require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-upload"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-indicators"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons"),require("pdfjs-dist/build/pdf.worker.min.mjs")):"function"==typeof define&&define.amd?define(["exports","@progress/kendo-pdfviewer-common","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-inputs","@progress/kendo-react-data-tools","@progress/kendo-react-upload","@progress/kendo-react-dropdowns","@progress/kendo-react-indicators","@progress/kendo-react-common","@progress/kendo-react-intl","@progress/kendo-svg-icons","pdfjs-dist/build/pdf.worker.min.mjs"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPdfViewer={},e.KendoPdfviewerCommon,e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactInputs,e.KendoReactDataTools,e.KendoReactUpload,e.KendoReactDropdowns,e.KendoReactIndicators,e.KendoReactCommon,e.KendoReactIntl,e.KendoSvgIcons)}(this,(function(e,o,t,r,a,n,l,c,s,i,u,d,p){"use strict";function m(e){var o=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),o.default=e,Object.freeze(o)}var g=m(t);const f={name:"@progress/kendo-react-pdf-viewer",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1673300081,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},v="pdfviewer.zoomIn",k="pdfviewer.zoomOut",b="pdfviewer.zoomLevel",h="pdfviewer.enableSelection",y="pdfviewer.enablePanning",C="pdfviewer.search",w="pdfviewer.open",E="pdfviewer.download",S="pdfviewer.print",x="pdfviewer.close",I="pdfviewer.matchCase",P="pdfviewer.prevMatch",N="pdfviewer.nextMatch",z="pdfviewer.actualWidth",L="pdfviewer.fitToWidth",R="pdfviewer.fitToPage",Z="pdfviewer.popupBlocked",T="pdfviewer.searchOf",O={[v]:"Zoom in",[k]:"Zoom out",[b]:"Choose zoom level",[h]:"Enable selection",[y]:"Enable panning",[C]:"Search",[w]:"Open",[E]:"Download",[T]:"of",[S]:"Print",[x]:"Close",[I]:"Match case",[P]:"Previous match",[N]:"Next match",[z]:"Actual width",[L]:"Fit to width",[R]:"Fit to page",[Z]:"Popup is blocked."},B=["pager","spacer","zoomInOut","zoom","selection","spacer","search","open","download","print"],D={minZoom:.5,maxZoom:4,tools:[...B],zoomRate:.25,zoomLevels:[{id:1,priority:1,value:1,text:"Actual width",type:"ActualWidth",locationString:z},{id:2,priority:2,value:1,text:"Fit to width",type:"FitToWidth",locationString:L},{id:3,priority:3,value:1,text:"Fit to page",type:"FitToPage",locationString:R},{id:4,priority:4,value:.5,text:"50%",type:""},{id:5,priority:5,value:.75,text:"75%",type:""},{id:6,priority:100,value:1,text:"100%",type:""},{id:7,priority:7,value:1.25,text:"125%",type:""},{id:8,priority:8,value:1.5,text:"150%",type:""},{id:9,priority:9,value:2,text:"200%",type:""},{id:10,priority:10,value:3,text:"300%",type:""},{id:11,priority:11,value:4,text:"400%",type:""}],defaultZoom:o.DEFAULT_ZOOM_LEVEL},F=[".k-toolbar > button",".k-toolbar .k-combobox > input",".k-toolbar .k-button-group > button",".k-toolbar .k-pager > a",".k-toolbar .k-pager input"];let M=0;const K=(e,o)=>e.priority>o.priority?-1:e.priority<o.priority?1:0,q=g.forwardRef(((e,t)=>{const r=!u.validatePackage(f,{component:"PDFViewer"}),{zoom:m,zoomLevels:z=D.zoomLevels,defaultZoom:L=D.defaultZoom,minZoom:R=D.minZoom,maxZoom:B=D.maxZoom,zoomRate:q=D.zoomRate}=e,j=d.useLocalization(),A=g.useRef(null),[U,V]=g.useState(L),W=void 0!==m?m:U,_=z.slice().sort(K).find((e=>e.value===W))||{text:100*W+"%",value:W,id:W,locationString:""};_.locationString&&(_.text=j.toLanguageString(_.locationString,O[_.locationString]));const[G,H]=g.useState(!1),[$,J]=g.useState(!0),[Q,X]=g.useState(0),[Y,ee]=g.useState(!0),[oe,te]=g.useState(!1),[re,ae]=g.useState(0),[ne,le]=g.useState(0),[ce,se]=g.useState(!1),[ie,ue]=g.useState(""),de=g.useMemo((()=>({})),[]);de.currentZoom=W,de.props=e;const pe=g.useCallback((e=>{A.current&&A.current.style.setProperty("--scale-factor",String(e))}),[]),me=g.useRef(null),ge=g.useRef(null);g.useImperativeHandle(me,(()=>({get element(){return ge.current},props:e,get pages(){return de.pages},get document(){return de.document}})),[]),g.useImperativeHandle(t,(()=>me.current));const fe=g.useCallback((()=>{if(de.props.onLoad){const e={target:me.current};de.props.onLoad.call(void 0,e)}}),[]),ve=g.useCallback(((o,t,r)=>{if(e.onDownload){const a={target:me.current,blob:o,fileName:t,saveOptions:r};return!1===e.onDownload.call(void 0,a)}return!1}),[e.onDownload]),ke=g.useCallback((()=>{var e;de.scroller&&de.scroller.destroy(),de.scroller=new o.Scroller(null==(e=A.current)?void 0:e.parentNode,{filter:".k-page",events:{}}),de.scroller.disablePanEventsTracking()}),[]),be=g.useCallback((e=>{const t=Array.from(e.querySelectorAll(".k-text-layer"));de.search=new o.SearchService({textContainers:t||[],highlightClass:"k-search-highlight",highlightMarkClass:"k-search-highlight-mark",charClass:"k-text-char"})}),[]);de.done=g.useCallback((({pdfPages:e,pdfDoc:t,zoom:r})=>{de.document=t,de.pages=e,de.zoom=r,ke(),J(!1),H(!0),fe(),A.current&&o.scrollToPage(A.current,0)}),[]),de.error=g.useCallback((o=>{if(de.document=null,de.pages=[],J(!1),H(!1),e.onError){const t={error:"string"==typeof o?{message:o}:o,target:me.current};e.onError.call(void 0,t)}}),[e.onError]),g.useEffect((()=>{A.current&&(e.url||e.data||e.arrayBuffer?(J(!0),o.removeChildren(A.current),o.loadPDF({url:e.url,data:e.data,arrayBuffer:e.arrayBuffer,dom:A.current,zoom:de.currentZoom,done:de.done,error:de.error}),pe(de.currentZoom)):(de.document=null,de.pages=[],H(!1),J(!1),o.removeChildren(A.current)))}),[e.url,e.data,e.arrayBuffer]);const he=g.useCallback(((e,t)=>{A.current&&(J(!0),o.removeChildren(A.current),o.reloadDocument({pdfDoc:e,zoom:t,dom:A.current,done:e=>{de.pages=e,de.zoom=t,J(!1)},error:de.error}))}),[]);g.useEffect((()=>{pe(W),A.current&&de.document&&W!==de.zoom&&he(de.document,W)}),[W,he]),g.useEffect((()=>()=>{de.scroller&&de.scroller.destroy(),de.search&&de.search.destroy(),de.document=null,de.pages=[]}),[]);const ye=g.useCallback((()=>{te(!0),be(A.current)}),[]),Ce=g.useCallback((e=>{const o=e.value,t=de.search.search({text:o,matchCase:ce});le(t.length?1:0),ae(t.length),ue(o)}),[ce]),we=g.useCallback((()=>{const e=de.search.search({text:ie,matchCase:!ce});le(e.length?1:0),ae(e.length),se(!ce)}),[ce,ie]),Ee=g.useCallback((()=>{o.goToNextSearchMatch(de),le(ne+1>re?1:ne+1)}),[ne,re]),Se=g.useCallback((()=>{o.goToPreviousSearchMatch(de),le(ne-1<1?re:ne-1)}),[ne,re]),xe=g.useCallback((()=>{de.search.destroy(),le(0),ae(0),se(!1),ue(""),te(!1)}),[]),Ie=g.useCallback((e=>{"Enter"===e.key?(e.preventDefault(),o.goToNextSearchMatch(de),le(ne+1>re?1:ne+1)):"Escape"===e.key&&xe()}),[ne,re]),Pe=g.useCallback((t=>{if(A.current){const r=t.skip;o.scrollToPage(A.current,r);const a={page:r+1,target:me.current,syntheticEvent:t.syntheticEvent};e.onPageChange&&e.onPageChange.call(void 0,a)}X(t.skip)}),[Q,e.onPageChange]),Ne=g.useCallback((t=>{if(ge.current){const r=o.currentPage(ge.current);if(r!==Q){X(r);const o={page:r+1,target:me.current,syntheticEvent:t};e.onPageChange&&e.onPageChange.call(void 0,o)}}}),[Q,e.onPageChange]),ze=g.useCallback((o=>{const t=Math.min(de.currentZoom+q,B);if(t!==de.currentZoom&&de.document&&(V(t),e.onZoom)){const r={zoom:t,target:me.current,syntheticEvent:o};e.onZoom.call(void 0,r)}}),[q,B,e.onZoom]),Le=g.useCallback((o=>{const t=Math.max(de.currentZoom-q,R);if(t!==de.currentZoom&&de.document&&(V(t),e.onZoom)){const r={zoom:t,target:me.current,syntheticEvent:o};e.onZoom.call(void 0,r)}}),[q,R,e.onZoom]),Re=g.useCallback((t=>{const r=null===t.value?{text:"100%",value:1,id:100}:{...t.value};if(void 0===r.value){const e=parseFloat(r.text);"number"!=typeof e||Number.isNaN(e)?r.value=1:r.value=e/100}let a=r?o.calculateZoomLevel(r.value,r.type,de.currentZoom,A.current):1;if(a=Math.round(100*a)/100,de.currentZoom!==a&&de.document&&(V(a),e.onZoom)){const o={zoom:a,target:me.current,syntheticEvent:t.syntheticEvent};e.onZoom.call(void 0,o)}}),[e.onZoom]),Ze=g.useCallback((()=>{de.scroller.disablePanEventsTracking(),ee(!0)}),[]),Te=g.useCallback((()=>{de.scroller.enablePanEventsTracking(),ee(!1)}),[]),Oe=g.useCallback((()=>{o.download({pdf:de.document,error:de.error},e.saveFileName,e.saveOptions,ve)}),[e.url,e.data,e.arrayBuffer,e.saveFileName,e.saveOptions,ve]),Be=g.useCallback((()=>{J(!0);o.print(de.pages,(()=>{J(!1)}),(e=>{var o,t;de.error(null!=(t=null!=(o=null==e?void 0:e.message)?o:e)?t:j.toLanguageString(Z,O[Z]))}))}),[]),De=g.useCallback((e=>{const t=e.newState;t[0]&&t[0].getRawFile&&t[0].getRawFile().arrayBuffer().then((e=>{if(A.current){J(!0),o.removeChildren(A.current);const t=void 0===de.props.zoom?L:de.props.zoom;o.loadPDF({arrayBuffer:e,dom:A.current,zoom:t,done:de.done,error:de.error}),V(t)}}))}),[L]),Fe=g.useCallback((e=>{const o=e.target;if(o instanceof Element&&o.parentNode){const e=o.closest(".k-toolbar"),t=e&&e.querySelector(".k-upload input");t&&t.click()}}),[]),Me=$&&g.createElement("div",{className:"k-loader-container k-loader-container-md k-loader-top"},g.createElement("div",{className:"k-loader-container-overlay k-overlay-light"}),g.createElement("div",{className:"k-loader-container-inner "},g.createElement(i.Loader,{size:"large"}))),Ke=g.createElement(a.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},g.createElement(a.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:j.toLanguageString(k,O[k]),disabled:W<=R||!G,onClick:Le,icon:"zoom-out",svgIcon:p.zoomOutIcon}),g.createElement(a.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:j.toLanguageString(v,O[v]),disabled:W>=B||!G,onClick:ze,icon:"zoom-in",svgIcon:p.zoomInIcon})),qe=g.createElement(s.ComboBox,{className:"k-toolbar-combobox",disabled:!G,data:z.map((e=>({...e,text:e.locationString?j.toLanguageString(e.locationString,O[e.locationString]):e.text}))),dataItemKey:"id",textField:"text",value:G?_:null,allowCustom:!0,onChange:Re,placeholder:j.toLanguageString(b,O[b])}),je={pager:g.createElement(l.Pager,{disabled:!G,previousNext:!0,type:"input",skip:Q,take:1,total:de.pages?de.pages.length:0,info:!1,onPageChange:Pe}),spacer:g.createElement(a.ToolbarSpacer,null),zoomInOut:Ke,zoom:qe,selection:g.createElement(a.ButtonGroup,{className:"k-toolbar-button-group k-button-group-solid"},g.createElement(a.Button,{className:"k-group-start",fillMode:"flat",themeColor:"base",title:j.toLanguageString(h,O[h]),icon:"pointer",svgIcon:p.pointerIcon,disabled:!G,togglable:!0,selected:Y&&G,onClick:Ze}),g.createElement(a.Button,{className:"k-group-end",fillMode:"flat",themeColor:"base",title:j.toLanguageString(y,O[y]),icon:"hand",svgIcon:p.handIcon,disabled:!G,togglable:!0,selected:!Y&&G,onClick:Te})),search:g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(C,O[C]),icon:"search",svgIcon:p.searchIcon,disabled:!G,onClick:ye}),open:g.createElement(g.Fragment,null,g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(w,O[w]),icon:"folder-open",svgIcon:p.folderOpenIcon,onClick:Fe}),g.createElement("div",{style:{display:"none"}},g.createElement(c.Upload,{restrictions:{allowedExtensions:[".pdf"]},onAdd:De,autoUpload:!1,defaultFiles:[],multiple:!1,accept:".pdf,.PDF",withCredentials:!1}))),download:g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(E,O[E]),icon:"download",svgIcon:p.downloadIcon,disabled:!G,onClick:Oe}),print:g.createElement(a.Button,{className:"k-toolbar-button",fillMode:"flat",themeColor:"base",title:j.toLanguageString(S,O[S]),icon:"print",svgIcon:p.printIcon,disabled:!G,onClick:Be})},Ae=(e.tools||D.tools).map((e=>({...je[e],key:"toobar-tool-"+e+(M++,M)}))),Ue=g.createElement(a.Toolbar,{buttons:F},...Ae),Ve=g.createElement("div",{className:u.classNames("k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto",{"k-enable-text-select":Y,"k-enable-panning":!Y}),onScroll:Ne},oe&&g.createElement("div",{className:"k-search-panel k-pos-sticky k-top-center"},g.createElement(n.TextBox,{value:ie,onChange:Ce,placeholder:j.toLanguageString(C,O[C]),autoFocus:!0,onKeyDown:Ie,suffix:()=>g.createElement(g.Fragment,null,g.createElement(n.InputSeparator,null),g.createElement(n.InputSuffix,null,g.createElement(a.Button,{icon:"convert-lowercase",svgIcon:p.convertLowercaseIcon,title:j.toLanguageString(I,O[I]),fillMode:"flat",togglable:!0,selected:ce,onClick:we})))}),g.createElement("span",{className:"k-search-matches"},g.createElement("span",null,ne)," ",j.toLanguageString(T,O[T]),g.createElement("span",null,re)),g.createElement(a.Button,{title:j.toLanguageString(P,O[P]),fillMode:"flat",icon:"arrow-up",svgIcon:p.arrowUpIcon,disabled:0===re,onClick:Se}),g.createElement(a.Button,{title:j.toLanguageString(N,O[N]),fillMode:"flat",icon:"arrow-down",svgIcon:p.arrowDownIcon,disabled:0===re,onClick:Ee}),g.createElement(a.Button,{title:j.toLanguageString(x,O[x]),fillMode:"flat",icon:"x",svgIcon:p.xIcon,onClick:xe})),g.createElement("div",{ref:A,className:"k-pdf-viewer-pages"}));return g.createElement("div",{className:"k-pdf-viewer",style:e.style,ref:ge},e.onRenderLoader?e.onRenderLoader.call(void 0,Me||null):Me,e.onRenderToolbar?e.onRenderToolbar.call(void 0,Ue):Ue,e.onRenderContent?e.onRenderContent.call(void 0,Ve):Ve,r&&g.createElement(u.WatermarkOverlay,null))}));q.displayName="KendoReactPDFViewer",q.propTypes={url:r.string,data:r.string,arrayBuffer:r.any,typedArray:r.any,style:r.object,saveFileName:r.string,saveOptions:r.object,tools:r.arrayOf(r.oneOf(B).isRequired),zoomLevels:r.arrayOf(r.any),zoom:r.number,defaultZoom:r.number,minZoom:r.number,maxZoom:r.number,zoomRate:r.number,onError:r.func,onLoad:r.func,onDownload:r.func,onRenderToolbar:r.func,onRenderContent:r.func,onRenderLoader:r.func,onZoom:r.func};const j=o.scrollToPage;Object.defineProperty(e,"currentPage",{enumerable:!0,get:function(){return o.currentPage}}),e.PDFViewer=q,e.scrollToPage=j}));
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-pdf-viewer",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741187773,version:"10.0.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-pdf-viewer",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741335600,version:"10.0.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1741187773,
14
- version: "10.0.0-develop.2",
13
+ publishDate: 1741335600,
14
+ version: "10.0.0-develop.4",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-pdf-viewer",
3
- "version": "10.0.0-develop.2",
3
+ "version": "10.0.0-develop.4",
4
4
  "description": "KendoReact PDFViewer package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,14 +27,14 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-file-saver": "^1.1.1",
29
29
  "@progress/kendo-licensing": "^1.5.0",
30
- "@progress/kendo-react-buttons": "10.0.0-develop.2",
31
- "@progress/kendo-react-common": "10.0.0-develop.2",
32
- "@progress/kendo-react-data-tools": "10.0.0-develop.2",
33
- "@progress/kendo-react-dropdowns": "10.0.0-develop.2",
34
- "@progress/kendo-react-indicators": "10.0.0-develop.2",
35
- "@progress/kendo-react-inputs": "10.0.0-develop.2",
36
- "@progress/kendo-react-intl": "10.0.0-develop.2",
37
- "@progress/kendo-react-upload": "10.0.0-develop.2",
30
+ "@progress/kendo-react-buttons": "10.0.0-develop.4",
31
+ "@progress/kendo-react-common": "10.0.0-develop.4",
32
+ "@progress/kendo-react-data-tools": "10.0.0-develop.4",
33
+ "@progress/kendo-react-dropdowns": "10.0.0-develop.4",
34
+ "@progress/kendo-react-indicators": "10.0.0-develop.4",
35
+ "@progress/kendo-react-inputs": "10.0.0-develop.4",
36
+ "@progress/kendo-react-intl": "10.0.0-develop.4",
37
+ "@progress/kendo-react-upload": "10.0.0-develop.4",
38
38
  "@progress/kendo-svg-icons": "^4.0.0",
39
39
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
40
40
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -61,7 +61,7 @@
61
61
  "package": {
62
62
  "productName": "KendoReact",
63
63
  "productCode": "KENDOUIREACT",
64
- "publishDate": 1741187773,
64
+ "publishDate": 1741335600,
65
65
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
66
66
  }
67
67
  },