@progress/kendo-react-pdf 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230
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/dist/cdn/js/kendo-react-pdf.js +1 -1
- package/dist/es/KendoDrawingAdapter.js +1 -1
- package/dist/es/PDFExport.d.ts +1 -1
- package/dist/es/PDFExport.js +7 -4
- package/dist/es/PDFExportProps.js +1 -0
- package/dist/es/PDFMargin.d.ts +1 -1
- package/dist/es/PDFMargin.js +3 -1
- package/dist/es/PageTemplateProps.js +1 -0
- package/dist/es/common/dom-queries.d.ts +1 -1
- package/dist/es/common/table-query.js +2 -2
- package/dist/es/common/utils.js +1 -1
- package/dist/es/grid/GridPDFExport.d.ts +1 -1
- package/dist/es/grid/GridPDFExport.js +3 -1
- package/dist/es/grid/grid-query.js +3 -3
- package/dist/es/grid/provideSaveGridPDF.js +1 -1
- package/dist/es/main.d.ts +1 -1
- package/dist/es/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/treelist/TreeListPDFExport.d.ts +1 -1
- package/dist/es/treelist/TreeListPDFExport.js +3 -1
- package/dist/npm/KendoDrawingAdapter.js +1 -1
- package/dist/npm/PDFExport.d.ts +1 -1
- package/dist/npm/PDFExport.js +9 -5
- package/dist/npm/PDFMargin.d.ts +1 -1
- package/dist/npm/PDFMargin.js +4 -1
- package/dist/npm/common/dom-queries.d.ts +1 -1
- package/dist/npm/common/dom-queries.js +30 -18
- package/dist/npm/common/table-query.js +9 -8
- package/dist/npm/common/utils.js +19 -13
- package/dist/npm/getPageMargin.js +1 -0
- package/dist/npm/grid/GridPDFExport.d.ts +1 -1
- package/dist/npm/grid/GridPDFExport.js +6 -3
- package/dist/npm/grid/export-element.js +5 -3
- package/dist/npm/grid/grid-query.js +9 -8
- package/dist/npm/grid/provideSaveGridPDF.js +3 -2
- package/dist/npm/main.d.ts +1 -1
- package/dist/npm/main.js +7 -6
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/savePDF.js +1 -0
- package/dist/npm/treelist/TreeListPDFExport.d.ts +1 -1
- package/dist/npm/treelist/TreeListPDFExport.js +6 -3
- package/dist/npm/treelist/export-element.js +5 -3
- package/dist/npm/treelist/provideSaveTreeListPDF.js +2 -1
- package/dist/systemjs/kendo-react-pdf.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-drawing"),require("react-dom"),require("react-dom/server"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-drawing","react-dom","react-dom/server","@progress/kendo-licensing"],t):"object"==typeof exports?exports.KendoReactPdf=t(require("react"),require("prop-types"),require("@progress/kendo-drawing"),require("react-dom"),require("react-dom/server"),require("@progress/kendo-licensing")):e.KendoReactPdf=t(e.React,e.PropTypes,e.KendoDrawing,e.ReactDOM,e.ReactDOMServer,e.KendoLicensing)}(window,(function(e,t,r,n,o,i){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(5),i=["bottom","left","right","top"];t.getPageMargin=function(e){var t=n.Children.toArray(e.children).find((function(e){return e&&e.type===o.PDFMargin}));return t?function(e){for(var t={},r=0;r<i.length;r++){var n=i[r],o=e.props[n];void 0!==o&&(t[n]=o)}return t}(t):e.margin}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(10),i=r(6);t.savePDF=function(e,t,r){void 0===t&&(t={}),new i.default(n.drawDOM,n.exportPDF,o.saveAs,e,t).savePDF(r)}},function(e,t){e.exports=r},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),a=r(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return null},t.propTypes={left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])},t}(i.Component);t.PDFMargin=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(13),i=function(){function e(e,t,r,i,a){void 0===a&&(a={});var s=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=r,this.domElement=i,this.options=a,this.convertPageTemplateToHtml=function(e){return"<span>"+o.renderToStaticMarkup(n.createElement(s.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}))+"</span>"}}return e.prototype.savePDF=function(e){var t=this,r=this.drawDOM(this.domElement,this.getDrawOptions()).then((function(e){return t.exportPDF(e,t.getPDFOptions())})).then((function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())}));e&&r.then(e,e)},e.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},e.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},e.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},e}();t.default=i},function(e,t){e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/^(?:a|input|select|option|textarea|button|object)$/i,o={},i=function(e){return String(e).trim().split(" ")};t.hasClasses=function(e,t){var r=i(t);return Boolean(i(e.className).find((function(e){return r.indexOf(e)>=0})))},t.matchesClasses=function(e){return function(r){return t.hasClasses(r,e)}},t.matchesNodeName=function(e){return o[e]||(o[e]=function(t){return String(t.nodeName).toLowerCase()===e.toLowerCase()}),o[e]},t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e},t.closestInScope=function(e,t,r){for(;e&&e!==r&&!t(e);)e=e.parentNode;if(e!==r)return e},t.contains=function(e,r,n){if(void 0===n&&(n=!1),!t.closest(r,(function(t){return t===e})))return!1;var o=t.closest(r,(function(e){return e===r}));return o&&(n||o!==e)},t.isVisible=function(e){var t=e.getBoundingClientRect(),r=t.width>0&&t.height>0,n=0!==t.x&&0!==t.y;return(r||n)&&"hidden"!==window.getComputedStyle(e).visibility},t.isFocusable=function(e,r){if(void 0===r&&(r=!0),e.tagName){var o=e.tagName.toLowerCase(),i=e.getAttribute("tabIndex"),a="-1"===i,s=null!==i&&!a;return n.test(o)&&(s=!e.disabled&&!a),s&&(!r||t.isVisible(e))}return!1},t.findElement=function(e,r,n){if(void 0===n&&(n=!0),e){if(n&&r(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var o=t.findElement(e,r);if(o)return o}e=e.nextSibling}}},t.findFocusable=function(e,r){return void 0===r&&(r=!0),t.findElement(e,(function(e){return t.isFocusable(e,r)}))},t.findFocusableChild=function(e,r){return void 0===r&&(r=!0),t.findElement(e,(function(e){return t.isFocusable(e,r)}),!1)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.appendNodes=function(e,t){for(var r=t.length,n=0;n<r;n++)e.appendChild(t[n].cloneNode(!0))},t.wrapTable=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},t.createTableElement=function(e){var r=e.length,n=e[0].cloneNode(!0),o=n.rows.length;if(r>1)for(var i=0;i<o;i++)for(var a=1;a<r;a++)t.appendNodes(n.rows[i],e[a].rows[i].cells);return n},t.setFirstCellClass=function(e,t){if(t.length>1&&e.rows.length>1)for(var r=1;r<e.rows.length;r++){var n=t[0].rows[r].cells.length,o=e.rows[r].cells[n];-1===String(o.className).indexOf("k-first")&&(o.className+=" k-first")}},t.createTable=function(e,r,n,o){for(var i=document.createElement("table"),a=e[0].cloneNode(!0),s=1;s<e.length;s++)t.appendNodes(a,e[s].querySelectorAll("col"));var u=t.createTableElement(r),c=t.createTableElement(n);if(u.className="k-grid-header",t.setFirstCellClass(u,r),i.appendChild(a),i.appendChild(u),i.appendChild(c),o.length){var p=t.createTableElement(o);p.className="k-grid-footer",i.appendChild(p)}return t.wrapTable(i)}},function(e,t,r){"use strict";function n(e,t,r){void 0===r&&(r={});var n=u;if(r.forceProxy&&!r.proxyURL)throw new Error("No proxyURL is set, but forceProxy is true");r.forceProxy||(i()&&(n=s),navigator.msSaveBlob&&(n=a)),n(e,t,r)}r.r(t),r.d(t,"saveAs",(function(){return n})),r.d(t,"encodeBase64",(function(){return l}));var o=function(){return document.createElement("a")},i=function(){return"download"in o()};function a(e,t){var r=e;if("string"==typeof e){for(var n=e.split(";base64,"),o=n[0],i=atob(n[1]),a=new Uint8Array(i.length),s=0;s<i.length;s++)a[s]=i.charCodeAt(s);r=new Blob([a.buffer],{type:o})}navigator.msSaveBlob(r,t)}function s(e,t){var r=e;window.Blob&&e instanceof Blob&&(r=URL.createObjectURL(e));var n=o();n.download=t,n.href=r;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i),setTimeout((function(){return URL.revokeObjectURL(r)}))}function u(e,t,r){if(r.proxyURL){var n=document.createElement("form");n.setAttribute("action",r.proxyURL),n.setAttribute("method","POST"),n.setAttribute("target",r.proxyTarget||"_self");var o=r.proxyData||{};o.fileName=t;var i=e.split(";base64,");for(var a in o.contentType=i[0].replace("data:",""),o.base64=i[1],o)if(o.hasOwnProperty(a)){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",o[a]),n.appendChild(s)}document.body.appendChild(n),n.submit(),document.body.removeChild(n)}}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=String.fromCharCode;function l(e){for(var t,r,n,o,i,a,s,u=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=p(n):n<2048?(t+=p(192|n>>>6),t+=p(128|63&n)):n<65536&&(t+=p(224|n>>>12),t+=p(128|n>>>6&63),t+=p(128|63&n))}return t}(e),l="",d=0;d<u.length;)o=(t=u.charCodeAt(d++))>>2,i=(3&t)<<4|(r=u.charCodeAt(d++))>>4,a=(15&r)<<2|(n=u.charCodeAt(d++))>>6,s=63&n,isNaN(r)?a=s=64:isNaN(n)&&(s=64),l=l+c.charAt(o)+c.charAt(i)+c.charAt(a)+c.charAt(s);return l}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);t.PDFExport=n.default;var o=r(5);t.PDFMargin=o.PDFMargin;var i=r(3);t.savePDF=i.savePDF;var a=r(2);t.getPageMargin=a.getPageMargin;var s=r(16);t.GridPDFExport=s.GridPDFExport;var u=r(20);t.TreeListPDFExport=u.TreeListPDFExport},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),a=r(1),s=r(4),u=r(10),c=r(2),p=r(6),l=r(14),d=r(15),f=function(e){function t(t){var r=e.call(this,t)||this;if(void 0!==l)l.validatePackage(d.packageMetadata);else{var n="License activation failed for "+d.packageMetadata.name+"\n";n+="The @progress/kendo-licensing script is not loaded.\n",n+="See "+d.packageMetadata.licensingDocsUrl+" for more information.\n",console.warn(n)}return r}return o(t,e),t.prototype.render=function(){var e=this;return i.createElement("div",{ref:function(t){e.rootElForPDF=t}},this.props.children)},t.prototype.save=function(e){new p.default(s.drawDOM,s.exportPDF,u.saveAs,this.rootElForPDF,this.getOptions()).savePDF(e)},t.prototype.getOptions=function(){return Object.assign({},this.props,{margin:c.getPageMargin(this.props)})},t.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},t}(i.Component);t.default=f},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1653456947,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"}},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),a=r(1),s=r(2),u=r(3),c=r(17),p=function(e){function t(t){var r=e.call(this,t)||this;return r.saveGridPDF=c.provideSaveGridPDF(r.getSavePDF()),r}return o(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:s.getPageMargin(this.props)}),t,e,this.getCustomColumns())},t.prototype.getSavePDF=function(){return u.savePDF},t.prototype.getGrid=function(){return i.Children.toArray(this.props.children).find((function(e){return e&&"KendoReactGrid"===e.type.displayName}))},t.prototype.getCustomColumns=function(){return i.Children.toArray(this.props.children).filter((function(e){return e&&"KendoReactGridColumn"===e.type.displayName}))},t.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},t}(i.Component);t.GridPDFExport=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7),o=r(0),i=r(18);t.provideSaveGridPDF=function(e){return function(t,r,a,s,u){return void 0===r&&(r={}),function(e,t,r,a,s,u){void 0===r&&(r={});var c,p,l;function d(){e(function(){(l=document.createElement("div")).className="k-grid-pdf-export-element";var e=i.exportElement(p);return l.appendChild(e),document.body.appendChild(l),e}(),r,f)}function f(){document.body.removeChild(c),document.body.removeChild(l),c=l=void 0,a&&a()}(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),p=document.createElement("div"),c.appendChild(p),document.body.appendChild(c),n.render(function(){var e=s&&{data:s,total:s.length,pageSize:s.length,skip:0},r={style:Object.assign({},t.props.style,{width:"1000px"})},n=Object.assign({},e,r);if(u&&u.length>0){var i=function(e){return o.Children.toArray(e.props.children).filter((function(e){return e&&"KendoReactGridColumn"!==e.type.displayName}))}(t);return o.cloneElement(t,n,u.concat(i))}return o.cloneElement(t,n)}(),p,d)}(e,t,r,a,s,u)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19),o=r(9);t.exportElement=function(e){var t,r=new n.GridQuery(e),i=r.content();if(i){var a=[i.querySelector("colgroup")],s=[r.header().querySelector("thead")],u=[i.querySelector("tbody")],c=r.footer(),p=c?[c.querySelector("tfoot")]:[];t=o.createTable(a,s,u,p)}else t=o.wrapTable(r.table().cloneNode(!0));return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8);t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer";var o=n.matchesNodeName("TABLE"),i=function(e){return e?"locked":"wrap"},a=function(){function e(e){this.element=e,this.list=n.findElement(e,n.matchesClasses("k-grid-container"))}return e.prototype.content=function(e){return n.findElement(this.list,n.matchesClasses("k-grid-content"+(e?"-locked":"")))},e.prototype.header=function(e){return this.headerWrap=this.headerWrap||n.findElement(this.element,n.matchesClasses(t.HEADER_CLASS)),n.findElement(this.headerWrap,n.matchesClasses(t.HEADER_CLASS+"-"+i(e)))},e.prototype.footer=function(e){return this.footerWrap=this.footerWrap||n.findElement(this.element,n.matchesClasses(t.FOOTER_CLASS)),n.findElement(this.footerWrap,n.matchesClasses(t.FOOTER_CLASS+"-"+i(e)))},e.prototype.table=function(){return n.findElement(this.element,o)},e}();t.GridQuery=a},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),a=r(1),s=r(2),u=r(3),c=r(21),p=function(e){function t(t){var r=e.call(this,t)||this;return r.saveTreeListPDF=c.provideSaveTreeListPDF(r.getSavePDF()),r}return o(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t,r){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:s.getPageMargin(this.props)}),r,e,t||[])},t.prototype.getSavePDF=function(){return u.savePDF},t.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},t.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string,allPages:a.bool},t}(i.Component);t.TreeListPDFExport=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7),o=r(0),i=r(22);t.provideSaveTreeListPDF=function(e){return function(t,r,a,s,u){return void 0===r&&(r={}),function(e,t,r,a,s,u){void 0===r&&(r={});var c,p,l;function d(){e(function(){(l=document.createElement("div")).className="k-treelist-pdf-export-element";var e=i.exportElement(p);return l.appendChild(e),document.body.appendChild(l),l}(),r,f)}function f(){document.body.removeChild(c),document.body.removeChild(l),c=l=void 0,a&&a()}(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),p=document.createElement("div"),c.appendChild(p),document.body.appendChild(c),n.render((h=r.allPages&&s?{data:s,take:Number.MAX_VALUE,skip:0}:{},g={style:Object.assign({},t.props.style,{width:"1000px"})},m=Object.assign({},h,g),u&&u.length>0?o.cloneElement(t,Object.assign({},m,{columns:u})):o.cloneElement(t,m)),p,d);var h,g,m}(e,t,r,a,s,u)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23),o=r(9);t.exportElement=function(e){var t,r=new n.GridQuery(e),i=r.content(),a=r.header();if(a.childNodes.length>1&&a.removeChild(a.childNodes[1]),a.childNodes[0].childNodes.forEach((function(e){return e.style.top=0})),i){var s=[i.querySelector("colgroup")],u=[a],c=[i.querySelector("tbody")],p=r.footer(),l=p?[p.querySelector("tfoot")]:[];t=o.createTable(s,u,c,l)}else t=o.wrapTable(r.table().cloneNode(!0));return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8);t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer";var o=n.matchesNodeName("TABLE"),i=function(){function e(e){this.element=e,this.list=n.findElement(e,n.matchesClasses("k-grid"))}return e.prototype.content=function(){return n.findElement(this.list,n.matchesClasses("k-grid"))},e.prototype.header=function(){return this.headerWrap=this.headerWrap||n.findElement(this.element,n.matchesClasses(t.HEADER_CLASS)),n.findElement(this.headerWrap,n.matchesClasses(""+t.HEADER_CLASS))},e.prototype.footer=function(){return this.footerWrap=this.footerWrap||n.findElement(this.element,n.matchesClasses(t.FOOTER_CLASS)),n.findElement(this.footerWrap,n.matchesClasses(""+t.FOOTER_CLASS))},e.prototype.table=function(){return n.findElement(this.element,o)},e}();t.GridQuery=i}])}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-drawing"),require("react-dom/server"),require("@progress/kendo-licensing"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-drawing","react-dom/server","@progress/kendo-licensing","react-dom"],t):"object"==typeof exports?exports.KendoReactPdf=t(require("react"),require("prop-types"),require("@progress/kendo-drawing"),require("react-dom/server"),require("@progress/kendo-licensing"),require("react-dom")):e.KendoReactPdf=t(e.React,e.PropTypes,e.KendoDrawing,e.ReactDOMServer,e.KendoLicensing,e.ReactDOM)}(self,(function(e,t,r,n,o,i){return(()=>{"use strict";var a={765:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(899),o=r(209),i=function(){function e(e,t,r,i,a){void 0===a&&(a={});var s=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=r,this.domElement=i,this.options=a,this.convertPageTemplateToHtml=function(e){var t=o.renderToStaticMarkup(n.createElement(s.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}));return"<span>".concat(t,"</span>")}}return e.prototype.savePDF=function(e){var t=this,r=this.drawDOM(this.domElement,this.getDrawOptions()).then((function(e){return t.exportPDF(e,t.getPDFOptions())})).then((function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())}));e&&r.then(e,e)},e.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},e.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},e.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},e}();t.default=i},981:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.PDFExport=void 0;var i=r(899),a=r(189),s=r(407),p=r(202),c=r(567),u=r(765),l=r(302),d=r(363),f=function(e){function t(t){var r=e.call(this,t)||this;if(r.rootElForPDF=null,void 0!==l)l.validatePackage(d.packageMetadata);else{var n="License activation failed for ".concat(d.packageMetadata.name,"\n");n+="The @progress/kendo-licensing script is not loaded.\n",n+="See ".concat(d.packageMetadata.licensingDocsUrl," for more information.\n"),console.warn(n)}return r}return o(t,e),t.prototype.render=function(){var e=this;return i.createElement("div",{ref:function(t){e.rootElForPDF=t}},this.props.children)},t.prototype.save=function(e){new u.default(s.drawDOM,s.exportPDF,p.saveAs,this.rootElForPDF,this.getOptions()).savePDF(e)},t.prototype.getOptions=function(){return Object.assign({},this.props,{margin:(0,c.getPageMargin)(this.props)})},t.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},t}(i.Component);t.PDFExport=f},398:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.PDFMargin=void 0;var i=r(899),a=r(189),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return null},t.propTypes={left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])},t}(i.Component);t.PDFMargin=s},188:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findFocusableChild=t.findFocusable=t.findElement=t.isFocusable=t.isVisible=t.contains=t.closestInScope=t.closest=t.matchesNodeName=t.matchesClasses=t.hasClasses=void 0;var r=/^(?:a|input|select|option|textarea|button|object)$/i,n={},o=function(e){return String(e).trim().split(" ")};t.hasClasses=function(e,t){var r=o(t);return Boolean(o(e.className).find((function(e){return r.indexOf(e)>=0})))},t.matchesClasses=function(e){return function(r){return(0,t.hasClasses)(r,e)}},t.matchesNodeName=function(e){return n[e]||(n[e]=function(t){return String(t.nodeName).toLowerCase()===e.toLowerCase()}),n[e]},t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e},t.closestInScope=function(e,t,r){for(;e&&e!==r&&!t(e);)e=e.parentNode;if(e!==r)return e},t.contains=function(e,r,n){if(void 0===n&&(n=!1),!(0,t.closest)(r,(function(t){return t===e})))return!1;var o=(0,t.closest)(r,(function(e){return e===r}));return o&&(n||o!==e)},t.isVisible=function(e){var t=e.getBoundingClientRect(),r=t.width>0&&t.height>0,n=0!==t.x&&0!==t.y;return(r||n)&&"hidden"!==window.getComputedStyle(e).visibility},t.isFocusable=function(e,n){if(void 0===n&&(n=!0),e.tagName){var o=e.tagName.toLowerCase(),i=e.getAttribute("tabIndex"),a="-1"===i,s=null!==i&&!a;return r.test(o)&&(s=!e.disabled&&!a),s&&(!n||(0,t.isVisible)(e))}return!1},t.findElement=function(e,r,n){if(void 0===n&&(n=!0),e){if(n&&r(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var o=(0,t.findElement)(e,r);if(o)return o}e=e.nextSibling}}},t.findFocusable=function(e,r){return void 0===r&&(r=!0),(0,t.findElement)(e,(function(e){return(0,t.isFocusable)(e,r)}))},t.findFocusableChild=function(e,r){return void 0===r&&(r=!0),(0,t.findElement)(e,(function(e){return(0,t.isFocusable)(e,r)}),!1)}},175:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridQuery=t.FOOTER_CLASS=t.HEADER_CLASS=void 0;var n=r(188);t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer";var o=(0,n.matchesNodeName)("TABLE"),i=function(){function e(e){this.element=e,this.list=(0,n.findElement)(e,(0,n.matchesClasses)("k-grid"))}return e.prototype.content=function(){return(0,n.findElement)(this.list,(0,n.matchesClasses)("k-grid"))},e.prototype.header=function(){return this.headerWrap=this.headerWrap||(0,n.findElement)(this.element,(0,n.matchesClasses)(t.HEADER_CLASS)),(0,n.findElement)(this.headerWrap,(0,n.matchesClasses)("".concat(t.HEADER_CLASS)))},e.prototype.footer=function(){return this.footerWrap=this.footerWrap||(0,n.findElement)(this.element,(0,n.matchesClasses)(t.FOOTER_CLASS)),(0,n.findElement)(this.footerWrap,(0,n.matchesClasses)("".concat(t.FOOTER_CLASS)))},e.prototype.table=function(){return(0,n.findElement)(this.element,o)},e}();t.GridQuery=i},669:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=t.setFirstCellClass=t.createTableElement=t.wrapTable=t.appendNodes=void 0;var r="k-first";t.appendNodes=function(e,t){for(var r=t.length,n=0;n<r;n++)e.appendChild(t[n].cloneNode(!0))},t.wrapTable=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},t.createTableElement=function(e){var r=e.length,n=e[0].cloneNode(!0),o=n.rows.length;if(r>1)for(var i=0;i<o;i++)for(var a=1;a<r;a++)(0,t.appendNodes)(n.rows[i],e[a].rows[i].cells);return n},t.setFirstCellClass=function(e,t){if(t.length>1&&e.rows.length>1)for(var n=1;n<e.rows.length;n++){var o=t[0].rows[n].cells.length,i=e.rows[n].cells[o];-1===String(i.className).indexOf(r)&&(i.className+=" ".concat(r))}},t.createTable=function(e,r,n,o){for(var i=document.createElement("table"),a=e[0].cloneNode(!0),s=1;s<e.length;s++)(0,t.appendNodes)(a,e[s].querySelectorAll("col"));var p=(0,t.createTableElement)(r),c=(0,t.createTableElement)(n);if(p.className="k-grid-header",(0,t.setFirstCellClass)(p,r),i.appendChild(a),i.appendChild(p),i.appendChild(c),o.length){var u=(0,t.createTableElement)(o);u.className="k-grid-footer",i.appendChild(u)}return(0,t.wrapTable)(i)}},567:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getPageMargin=void 0;var n=r(899),o=r(398),i=["bottom","left","right","top"];t.getPageMargin=function(e){var t=n.Children.toArray(e.children).find((function(e){return e&&e.type===o.PDFMargin}));return t?function(e){for(var t={},r=0;r<i.length;r++){var n=i[r],o=e.props[n];void 0!==o&&(t[n]=o)}return t}(t):e.margin}},617:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.GridPDFExport=void 0;var i=r(899),a=r(189),s=r(567),p=r(350),c=r(258),u=function(e){function t(t){var r=e.call(this,t)||this;return r.saveGridPDF=(0,c.provideSaveGridPDF)(r.getSavePDF()),r}return o(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:(0,s.getPageMargin)(this.props)}),t,e,this.getCustomColumns())},t.prototype.getSavePDF=function(){return p.savePDF},t.prototype.getGrid=function(){return i.Children.toArray(this.props.children).find((function(e){return e&&"KendoReactGrid"===e.type.displayName}))},t.prototype.getCustomColumns=function(){return i.Children.toArray(this.props.children).filter((function(e){return e&&"KendoReactGridColumn"===e.type.displayName}))},t.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},t}(i.Component);t.GridPDFExport=u},863:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exportElement=void 0;var n=r(138),o=r(669);t.exportElement=function(e){var t,r=new n.GridQuery(e),i=r.content();if(i){var a=[i.querySelector("colgroup")],s=[r.header().querySelector("thead")],p=[i.querySelector("tbody")],c=r.footer(),u=c?[c.querySelector("tfoot")]:[];t=(0,o.createTable)(a,s,p,u)}else t=(0,o.wrapTable)(r.table().cloneNode(!0));return t}},138:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridQuery=t.FOOTER_CLASS=t.HEADER_CLASS=void 0;var n=r(188);t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer";var o=(0,n.matchesNodeName)("TABLE"),i=function(e){return e?"locked":"wrap"},a=function(){function e(e){this.element=e,this.list=(0,n.findElement)(e,(0,n.matchesClasses)("k-grid-container"))}return e.prototype.content=function(e){return(0,n.findElement)(this.list,(0,n.matchesClasses)("k-grid-content".concat(e?"-locked":"")))},e.prototype.header=function(e){return this.headerWrap=this.headerWrap||(0,n.findElement)(this.element,(0,n.matchesClasses)(t.HEADER_CLASS)),(0,n.findElement)(this.headerWrap,(0,n.matchesClasses)("".concat(t.HEADER_CLASS,"-").concat(i(e))))},e.prototype.footer=function(e){return this.footerWrap=this.footerWrap||(0,n.findElement)(this.element,(0,n.matchesClasses)(t.FOOTER_CLASS)),(0,n.findElement)(this.footerWrap,(0,n.matchesClasses)("".concat(t.FOOTER_CLASS,"-").concat(i(e))))},e.prototype.table=function(){return(0,n.findElement)(this.element,o)},e}();t.GridQuery=a},258:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.provideSaveGridPDF=void 0;var n=r(994),o=r(899),i=r(863);t.provideSaveGridPDF=function(e){return function(t,r,a,s,p){return void 0===r&&(r={}),function(e,t,r,a,s,p){var c,u,l;function d(){e(function(){(l=document.createElement("div")).className="k-grid-pdf-export-element";var e=(0,i.exportElement)(u);return l.appendChild(e),document.body.appendChild(l),e}(),r,f)}function f(){document.body.removeChild(c),document.body.removeChild(l),c=l=void 0,a&&a()}void 0===r&&(r={}),(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),u=document.createElement("div"),c.appendChild(u),document.body.appendChild(c),n.render(function(){var e=s&&{data:s,total:s.length,pageSize:s.length,skip:0},r={style:Object.assign({},t.props.style,{width:"1000px"})},n=Object.assign({},e,r);if(p&&p.length>0){var i=function(e){return o.Children.toArray(e.props.children).filter((function(e){return e&&e.type&&"KendoReactGridColumn"!==e.type.displayName}))}(t);return o.cloneElement(t,n,p.concat(i))}return o.cloneElement(t,n)}(),u,d)}(e,t,r,a,s,p)}}},363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1654690540,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"}},350:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.savePDF=void 0;var n=r(407),o=r(202),i=r(765);t.savePDF=function(e,t,r){void 0===t&&(t={}),new i.default(n.drawDOM,n.exportPDF,o.saveAs,e,t).savePDF(r)}},153:function(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.TreeListPDFExport=void 0;var i=r(899),a=r(189),s=r(567),p=r(350),c=r(556),u=function(e){function t(t){var r=e.call(this,t)||this;return r.saveTreeListPDF=(0,c.provideSaveTreeListPDF)(r.getSavePDF()),r}return o(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t,r){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:(0,s.getPageMargin)(this.props)}),r,e,t||[])},t.prototype.getSavePDF=function(){return p.savePDF},t.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},t.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string,allPages:a.bool},t}(i.Component);t.TreeListPDFExport=u},687:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exportElement=void 0;var n=r(175),o=r(669);t.exportElement=function(e){var t,r=new n.GridQuery(e),i=r.content(),a=r.header();if(a.childNodes.length>1&&a.removeChild(a.childNodes[1]),a.childNodes[0].childNodes.forEach((function(e){return e.style.top=0})),i){var s=[i.querySelector("colgroup")],p=[a],c=[i.querySelector("tbody")],u=r.footer(),l=u?[u.querySelector("tfoot")]:[];t=(0,o.createTable)(s,p,c,l)}else t=(0,o.wrapTable)(r.table().cloneNode(!0));return t}},556:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.provideSaveTreeListPDF=void 0;var n=r(994),o=r(899),i=r(687);t.provideSaveTreeListPDF=function(e){return function(t,r,a,s,p){return void 0===r&&(r={}),function(e,t,r,a,s,p){var c,u,l,d,f,g;function h(){e(function(){(l=document.createElement("div")).className="k-treelist-pdf-export-element";var e=(0,i.exportElement)(u);return l.appendChild(e),document.body.appendChild(l),l}(),r,m)}function m(){document.body.removeChild(c),document.body.removeChild(l),c=l=void 0,a&&a()}void 0===r&&(r={}),(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),u=document.createElement("div"),c.appendChild(u),document.body.appendChild(c),n.render((d=r.allPages&&s?{data:s,take:Number.MAX_VALUE,skip:0}:{},f={style:Object.assign({},t.props.style,{width:"1000px"})},g=Object.assign({},d,f),p&&p.length>0?o.cloneElement(t,Object.assign({},g,{columns:p})):o.cloneElement(t,g)),u,h)}(e,t,r,a,s,p)}}},202:(e,t,r)=>{function n(e,t,r){void 0===r&&(r={});var n=p;if(r.forceProxy&&!r.proxyURL)throw new Error("No proxyURL is set, but forceProxy is true");r.forceProxy||(i()&&(n=s),navigator.msSaveBlob&&(n=a)),n(e,t,r)}r.r(t),r.d(t,{encodeBase64:()=>l,saveAs:()=>n});var o=function(){return document.createElement("a")},i=function(){return"download"in o()};function a(e,t){var r=e;if("string"==typeof e){for(var n=e.split(";base64,"),o=n[0],i=atob(n[1]),a=new Uint8Array(i.length),s=0;s<i.length;s++)a[s]=i.charCodeAt(s);r=new Blob([a.buffer],{type:o})}navigator.msSaveBlob(r,t)}function s(e,t){var r=e;window.Blob&&e instanceof Blob&&(r=URL.createObjectURL(e));var n=o();n.download=t,n.href=r;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i),setTimeout((function(){return URL.revokeObjectURL(r)}))}function p(e,t,r){if(r.proxyURL){var n=document.createElement("form");n.setAttribute("action",r.proxyURL),n.setAttribute("method","POST"),n.setAttribute("target",r.proxyTarget||"_self");var o=r.proxyData||{};o.fileName=t;var i=e.split(";base64,");for(var a in o.contentType=i[0].replace("data:",""),o.base64=i[1],o)if(o.hasOwnProperty(a)){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",o[a]),n.appendChild(s)}document.body.appendChild(n),n.submit(),document.body.removeChild(n)}}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=String.fromCharCode;function l(e){for(var t,r,n,o,i,a,s,p=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=u(n):n<2048?(t+=u(192|n>>>6),t+=u(128|63&n)):n<65536&&(t+=u(224|n>>>12),t+=u(128|n>>>6&63),t+=u(128|63&n))}return t}(e),l="",d=0;d<p.length;)o=(t=p.charCodeAt(d++))>>2,i=(3&t)<<4|(r=p.charCodeAt(d++))>>4,a=(15&r)<<2|(n=p.charCodeAt(d++))>>6,s=63&n,isNaN(r)?a=s=64:isNaN(n)&&(s=64),l=l+c.charAt(o)+c.charAt(i)+c.charAt(a)+c.charAt(s);return l}},407:e=>{e.exports=r},302:e=>{e.exports=o},189:e=>{e.exports=t},899:t=>{t.exports=e},994:e=>{e.exports=i},209:e=>{e.exports=n}},s={};function p(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return a[e].call(r.exports,r,r.exports,p),r.exports}p.d=(e,t)=>{for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.TreeListPDFExport=e.GridPDFExport=e.getPageMargin=e.savePDF=e.PDFMargin=e.PDFExport=void 0;var t=p(981);Object.defineProperty(e,"PDFExport",{enumerable:!0,get:function(){return t.PDFExport}});var r=p(398);Object.defineProperty(e,"PDFMargin",{enumerable:!0,get:function(){return r.PDFMargin}});var n=p(350);Object.defineProperty(e,"savePDF",{enumerable:!0,get:function(){return n.savePDF}});var o=p(567);Object.defineProperty(e,"getPageMargin",{enumerable:!0,get:function(){return o.getPageMargin}});var i=p(617);Object.defineProperty(e,"GridPDFExport",{enumerable:!0,get:function(){return i.GridPDFExport}});var a=p(153);Object.defineProperty(e,"TreeListPDFExport",{enumerable:!0,get:function(){return a.TreeListPDFExport}})})(),c})()}));
|
|
@@ -18,7 +18,7 @@ var KendoDrawingAdapter = /** @class */ (function () {
|
|
|
18
18
|
var pageTemplateContent = ReactDOMServer.renderToStaticMarkup(React.createElement(_this.options.pageTemplate, {
|
|
19
19
|
pageNum: pageContext.pageNum, totalPages: pageContext.totalPages
|
|
20
20
|
}));
|
|
21
|
-
return "<span>"
|
|
21
|
+
return "<span>".concat(pageTemplateContent, "</span>");
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
KendoDrawingAdapter.prototype.savePDF = function (callback) {
|
package/dist/es/PDFExport.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { PDFExportProps } from './PDFExportProps';
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the KendoReact PDFExport component.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export declare class PDFExport extends React.Component<PDFExportProps, {}> {
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
package/dist/es/PDFExport.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -26,13 +28,14 @@ var PDFExport = /** @class */ (function (_super) {
|
|
|
26
28
|
__extends(PDFExport, _super);
|
|
27
29
|
function PDFExport(props) {
|
|
28
30
|
var _this = _super.call(this, props) || this;
|
|
31
|
+
_this.rootElForPDF = null;
|
|
29
32
|
if (typeof licensing !== 'undefined') {
|
|
30
33
|
licensing.validatePackage(packageMetadata);
|
|
31
34
|
}
|
|
32
35
|
else {
|
|
33
|
-
var message = "License activation failed for "
|
|
36
|
+
var message = "License activation failed for ".concat(packageMetadata.name, "\n");
|
|
34
37
|
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
35
|
-
message += "See "
|
|
38
|
+
message += "See ".concat(packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
36
39
|
console.warn(message);
|
|
37
40
|
}
|
|
38
41
|
return _this;
|
|
@@ -89,4 +92,4 @@ var PDFExport = /** @class */ (function (_super) {
|
|
|
89
92
|
};
|
|
90
93
|
return PDFExport;
|
|
91
94
|
}(React.Component));
|
|
92
|
-
export
|
|
95
|
+
export { PDFExport };
|
package/dist/es/PDFMargin.d.ts
CHANGED
package/dist/es/PDFMargin.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,7 +21,7 @@ export declare const closestInScope: (node: any, predicate: any, scope: any) =>
|
|
|
21
21
|
/**
|
|
22
22
|
* @hidden
|
|
23
23
|
*/
|
|
24
|
-
export declare const contains: (parent: any, node: any, matchSelf?: boolean) =>
|
|
24
|
+
export declare const contains: (parent: any, node: any, matchSelf?: boolean) => any;
|
|
25
25
|
/**
|
|
26
26
|
* @hidden
|
|
27
27
|
*/
|
|
@@ -22,11 +22,11 @@ var GridQuery = /** @class */ (function () {
|
|
|
22
22
|
};
|
|
23
23
|
GridQuery.prototype.header = function () {
|
|
24
24
|
this.headerWrap = this.headerWrap || findElement(this.element, matchesClasses(HEADER_CLASS));
|
|
25
|
-
return findElement(this.headerWrap, matchesClasses(""
|
|
25
|
+
return findElement(this.headerWrap, matchesClasses("".concat(HEADER_CLASS)));
|
|
26
26
|
};
|
|
27
27
|
GridQuery.prototype.footer = function () {
|
|
28
28
|
this.footerWrap = this.footerWrap || findElement(this.element, matchesClasses(FOOTER_CLASS));
|
|
29
|
-
return findElement(this.footerWrap, matchesClasses(""
|
|
29
|
+
return findElement(this.footerWrap, matchesClasses("".concat(FOOTER_CLASS)));
|
|
30
30
|
};
|
|
31
31
|
GridQuery.prototype.table = function () {
|
|
32
32
|
return findElement(this.element, matchesTable);
|
package/dist/es/common/utils.js
CHANGED
|
@@ -44,7 +44,7 @@ export var setFirstCellClass = function (header, headers) {
|
|
|
44
44
|
var firstCellIndex = headers[0].rows[idx].cells.length;
|
|
45
45
|
var cell = header.rows[idx].cells[firstCellIndex];
|
|
46
46
|
if (String(cell.className).indexOf(FIRST_CLASS) === -1) {
|
|
47
|
-
cell.className += " "
|
|
47
|
+
cell.className += " ".concat(FIRST_CLASS);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -19,15 +19,15 @@ var GridQuery = /** @class */ (function () {
|
|
|
19
19
|
this.list = findElement(element, matchesClasses('k-grid-container'));
|
|
20
20
|
}
|
|
21
21
|
GridQuery.prototype.content = function (locked) {
|
|
22
|
-
return findElement(this.list, matchesClasses("k-grid-content"
|
|
22
|
+
return findElement(this.list, matchesClasses("k-grid-content".concat(locked ? '-locked' : '')));
|
|
23
23
|
};
|
|
24
24
|
GridQuery.prototype.header = function (locked) {
|
|
25
25
|
this.headerWrap = this.headerWrap || findElement(this.element, matchesClasses(HEADER_CLASS));
|
|
26
|
-
return findElement(this.headerWrap, matchesClasses(HEADER_CLASS
|
|
26
|
+
return findElement(this.headerWrap, matchesClasses("".concat(HEADER_CLASS, "-").concat(suffix(locked))));
|
|
27
27
|
};
|
|
28
28
|
GridQuery.prototype.footer = function (locked) {
|
|
29
29
|
this.footerWrap = this.footerWrap || findElement(this.element, matchesClasses(FOOTER_CLASS));
|
|
30
|
-
return findElement(this.footerWrap, matchesClasses(FOOTER_CLASS
|
|
30
|
+
return findElement(this.footerWrap, matchesClasses("".concat(FOOTER_CLASS, "-").concat(suffix(locked))));
|
|
31
31
|
};
|
|
32
32
|
GridQuery.prototype.table = function () {
|
|
33
33
|
return findElement(this.element, matchesTable);
|
|
@@ -64,6 +64,6 @@ function saveGridPDF(savePDF, grid, pdfExportOptions, callback, data, columns) {
|
|
|
64
64
|
function getGridNotColumnChildren(grid) {
|
|
65
65
|
return React.Children
|
|
66
66
|
.toArray(grid.props.children)
|
|
67
|
-
.filter(function (child) { return child &&
|
|
67
|
+
.filter(function (child) { return child && child.type &&
|
|
68
68
|
child.type.displayName !== 'KendoReactGridColumn'; });
|
|
69
69
|
}
|
package/dist/es/main.d.ts
CHANGED
package/dist/es/main.js
CHANGED
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-pdf',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1654690540,
|
|
9
9
|
version: '',
|
|
10
10
|
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'
|
|
11
11
|
};
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -20,7 +20,7 @@ var KendoDrawingAdapter = /** @class */ (function () {
|
|
|
20
20
|
var pageTemplateContent = ReactDOMServer.renderToStaticMarkup(React.createElement(_this.options.pageTemplate, {
|
|
21
21
|
pageNum: pageContext.pageNum, totalPages: pageContext.totalPages
|
|
22
22
|
}));
|
|
23
|
-
return "<span>"
|
|
23
|
+
return "<span>".concat(pageTemplateContent, "</span>");
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
KendoDrawingAdapter.prototype.savePDF = function (callback) {
|
package/dist/npm/PDFExport.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { PDFExportProps } from './PDFExportProps';
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents the KendoReact PDFExport component.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export declare class PDFExport extends React.Component<PDFExportProps, {}> {
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
package/dist/npm/PDFExport.js
CHANGED
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PDFExport = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var PropTypes = require("prop-types");
|
|
18
21
|
var kendo_drawing_1 = require("@progress/kendo-drawing");
|
|
@@ -28,13 +31,14 @@ var PDFExport = /** @class */ (function (_super) {
|
|
|
28
31
|
__extends(PDFExport, _super);
|
|
29
32
|
function PDFExport(props) {
|
|
30
33
|
var _this = _super.call(this, props) || this;
|
|
34
|
+
_this.rootElForPDF = null;
|
|
31
35
|
if (typeof licensing !== 'undefined') {
|
|
32
36
|
licensing.validatePackage(package_metadata_1.packageMetadata);
|
|
33
37
|
}
|
|
34
38
|
else {
|
|
35
|
-
var message = "License activation failed for "
|
|
39
|
+
var message = "License activation failed for ".concat(package_metadata_1.packageMetadata.name, "\n");
|
|
36
40
|
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
37
|
-
message += "See "
|
|
41
|
+
message += "See ".concat(package_metadata_1.packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
38
42
|
console.warn(message);
|
|
39
43
|
}
|
|
40
44
|
return _this;
|
|
@@ -55,7 +59,7 @@ var PDFExport = /** @class */ (function (_super) {
|
|
|
55
59
|
new KendoDrawingAdapter_1.default(kendo_drawing_1.drawDOM, kendo_drawing_1.exportPDF, kendo_file_saver_1.saveAs, this.rootElForPDF, this.getOptions()).savePDF(callback);
|
|
56
60
|
};
|
|
57
61
|
PDFExport.prototype.getOptions = function () {
|
|
58
|
-
return Object.assign({}, this.props, { margin: getPageMargin_1.getPageMargin(this.props) });
|
|
62
|
+
return Object.assign({}, this.props, { margin: (0, getPageMargin_1.getPageMargin)(this.props) });
|
|
59
63
|
};
|
|
60
64
|
/**
|
|
61
65
|
* @hidden
|
|
@@ -91,4 +95,4 @@ var PDFExport = /** @class */ (function (_super) {
|
|
|
91
95
|
};
|
|
92
96
|
return PDFExport;
|
|
93
97
|
}(React.Component));
|
|
94
|
-
exports.
|
|
98
|
+
exports.PDFExport = PDFExport;
|
package/dist/npm/PDFMargin.d.ts
CHANGED
package/dist/npm/PDFMargin.js
CHANGED
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PDFMargin = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var PropTypes = require("prop-types");
|
|
18
21
|
/**
|
|
@@ -21,7 +21,7 @@ export declare const closestInScope: (node: any, predicate: any, scope: any) =>
|
|
|
21
21
|
/**
|
|
22
22
|
* @hidden
|
|
23
23
|
*/
|
|
24
|
-
export declare const contains: (parent: any, node: any, matchSelf?: boolean) =>
|
|
24
|
+
export declare const contains: (parent: any, node: any, matchSelf?: boolean) => any;
|
|
25
25
|
/**
|
|
26
26
|
* @hidden
|
|
27
27
|
*/
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findFocusableChild = exports.findFocusable = exports.findElement = exports.isFocusable = exports.isVisible = exports.contains = exports.closestInScope = exports.closest = exports.matchesNodeName = exports.matchesClasses = exports.hasClasses = void 0;
|
|
3
4
|
var focusableRegex = /^(?:a|input|select|option|textarea|button|object)$/i;
|
|
4
5
|
var NODE_NAME_PREDICATES = {};
|
|
5
6
|
var toClassList = function (classNames) { return String(classNames).trim().split(' '); };
|
|
6
7
|
/**
|
|
7
8
|
* @hidden
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
var hasClasses = function (element, classNames) {
|
|
10
11
|
var namesList = toClassList(classNames);
|
|
11
12
|
return Boolean(toClassList(element.className).find(function (className) { return namesList.indexOf(className) >= 0; }));
|
|
12
13
|
};
|
|
14
|
+
exports.hasClasses = hasClasses;
|
|
13
15
|
/**
|
|
14
16
|
* @hidden
|
|
15
17
|
*/
|
|
16
|
-
|
|
17
|
-
return function (element) { return exports.hasClasses(element, classNames); };
|
|
18
|
+
var matchesClasses = function (classNames) {
|
|
19
|
+
return function (element) { return (0, exports.hasClasses)(element, classNames); };
|
|
18
20
|
};
|
|
21
|
+
exports.matchesClasses = matchesClasses;
|
|
19
22
|
/**
|
|
20
23
|
* @hidden
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
var matchesNodeName = function (nodeName) {
|
|
23
26
|
if (!NODE_NAME_PREDICATES[nodeName]) {
|
|
24
27
|
NODE_NAME_PREDICATES[nodeName] = function (element) {
|
|
25
28
|
return String(element.nodeName).toLowerCase() === nodeName.toLowerCase();
|
|
@@ -27,19 +30,21 @@ exports.matchesNodeName = function (nodeName) {
|
|
|
27
30
|
}
|
|
28
31
|
return NODE_NAME_PREDICATES[nodeName];
|
|
29
32
|
};
|
|
33
|
+
exports.matchesNodeName = matchesNodeName;
|
|
30
34
|
/**
|
|
31
35
|
* @hidden
|
|
32
36
|
*/
|
|
33
|
-
|
|
37
|
+
var closest = function (node, predicate) {
|
|
34
38
|
while (node && !predicate(node)) {
|
|
35
39
|
node = node.parentNode;
|
|
36
40
|
}
|
|
37
41
|
return node;
|
|
38
42
|
};
|
|
43
|
+
exports.closest = closest;
|
|
39
44
|
/**
|
|
40
45
|
* @hidden
|
|
41
46
|
*/
|
|
42
|
-
|
|
47
|
+
var closestInScope = function (node, predicate, scope) {
|
|
43
48
|
while (node && node !== scope && !predicate(node)) {
|
|
44
49
|
node = node.parentNode;
|
|
45
50
|
}
|
|
@@ -47,22 +52,24 @@ exports.closestInScope = function (node, predicate, scope) {
|
|
|
47
52
|
return node;
|
|
48
53
|
}
|
|
49
54
|
};
|
|
55
|
+
exports.closestInScope = closestInScope;
|
|
50
56
|
/**
|
|
51
57
|
* @hidden
|
|
52
58
|
*/
|
|
53
|
-
|
|
59
|
+
var contains = function (parent, node, matchSelf) {
|
|
54
60
|
if (matchSelf === void 0) { matchSelf = false; }
|
|
55
|
-
var outside = !exports.closest(node, function (child) { return child === parent; });
|
|
61
|
+
var outside = !(0, exports.closest)(node, function (child) { return child === parent; });
|
|
56
62
|
if (outside) {
|
|
57
63
|
return false;
|
|
58
64
|
}
|
|
59
|
-
var el = exports.closest(node, function (child) { return child === node; });
|
|
65
|
+
var el = (0, exports.closest)(node, function (child) { return child === node; });
|
|
60
66
|
return el && (matchSelf || el !== parent);
|
|
61
67
|
};
|
|
68
|
+
exports.contains = contains;
|
|
62
69
|
/**
|
|
63
70
|
* @hidden
|
|
64
71
|
*/
|
|
65
|
-
|
|
72
|
+
var isVisible = function (element) {
|
|
66
73
|
var rect = element.getBoundingClientRect();
|
|
67
74
|
var hasSize = rect.width > 0 && rect.height > 0;
|
|
68
75
|
var hasPosition = rect.x !== 0 && rect.y !== 0;
|
|
@@ -70,10 +77,11 @@ exports.isVisible = function (element) {
|
|
|
70
77
|
// For example, the selection checkbox has no size, but is made visible through styling.
|
|
71
78
|
return (hasSize || hasPosition) && window.getComputedStyle(element).visibility !== 'hidden';
|
|
72
79
|
};
|
|
80
|
+
exports.isVisible = isVisible;
|
|
73
81
|
/**
|
|
74
82
|
* @hidden
|
|
75
83
|
*/
|
|
76
|
-
|
|
84
|
+
var isFocusable = function (element, checkVisibility) {
|
|
77
85
|
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
78
86
|
if (element.tagName) {
|
|
79
87
|
var tagName = element.tagName.toLowerCase();
|
|
@@ -83,14 +91,15 @@ exports.isFocusable = function (element, checkVisibility) {
|
|
|
83
91
|
if (focusableRegex.test(tagName)) {
|
|
84
92
|
focusable = !element.disabled && !skipTab;
|
|
85
93
|
}
|
|
86
|
-
return focusable && (!checkVisibility || exports.isVisible(element));
|
|
94
|
+
return focusable && (!checkVisibility || (0, exports.isVisible)(element));
|
|
87
95
|
}
|
|
88
96
|
return false;
|
|
89
97
|
};
|
|
98
|
+
exports.isFocusable = isFocusable;
|
|
90
99
|
/**
|
|
91
100
|
* @hidden
|
|
92
101
|
*/
|
|
93
|
-
|
|
102
|
+
var findElement = function (node, predicate, matchSelf) {
|
|
94
103
|
if (matchSelf === void 0) { matchSelf = true; }
|
|
95
104
|
if (!node) {
|
|
96
105
|
return;
|
|
@@ -101,7 +110,7 @@ exports.findElement = function (node, predicate, matchSelf) {
|
|
|
101
110
|
node = node.firstChild;
|
|
102
111
|
while (node) {
|
|
103
112
|
if (node.nodeType === 1) {
|
|
104
|
-
var element = exports.findElement(node, predicate);
|
|
113
|
+
var element = (0, exports.findElement)(node, predicate);
|
|
105
114
|
if (element) {
|
|
106
115
|
return element;
|
|
107
116
|
}
|
|
@@ -109,17 +118,20 @@ exports.findElement = function (node, predicate, matchSelf) {
|
|
|
109
118
|
node = node.nextSibling;
|
|
110
119
|
}
|
|
111
120
|
};
|
|
121
|
+
exports.findElement = findElement;
|
|
112
122
|
/**
|
|
113
123
|
* @hidden
|
|
114
124
|
*/
|
|
115
|
-
|
|
125
|
+
var findFocusable = function (element, checkVisibility) {
|
|
116
126
|
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
117
|
-
return exports.findElement(element, function (node) { return exports.isFocusable(node, checkVisibility); });
|
|
127
|
+
return (0, exports.findElement)(element, function (node) { return (0, exports.isFocusable)(node, checkVisibility); });
|
|
118
128
|
};
|
|
129
|
+
exports.findFocusable = findFocusable;
|
|
119
130
|
/**
|
|
120
131
|
* @hidden
|
|
121
132
|
*/
|
|
122
|
-
|
|
133
|
+
var findFocusableChild = function (element, checkVisibility) {
|
|
123
134
|
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
124
|
-
return exports.findElement(element, function (node) { return exports.isFocusable(node, checkVisibility); }, false);
|
|
135
|
+
return (0, exports.findElement)(element, function (node) { return (0, exports.isFocusable)(node, checkVisibility); }, false);
|
|
125
136
|
};
|
|
137
|
+
exports.findFocusableChild = findFocusableChild;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GridQuery = exports.FOOTER_CLASS = exports.HEADER_CLASS = void 0;
|
|
3
4
|
var dom_queries_1 = require("./dom-queries");
|
|
4
5
|
/**
|
|
5
6
|
* @hidden
|
|
@@ -10,28 +11,28 @@ exports.HEADER_CLASS = 'k-grid-header';
|
|
|
10
11
|
*/
|
|
11
12
|
exports.FOOTER_CLASS = 'k-grid-footer';
|
|
12
13
|
var TABLE = 'TABLE';
|
|
13
|
-
var matchesTable = dom_queries_1.matchesNodeName(TABLE);
|
|
14
|
+
var matchesTable = (0, dom_queries_1.matchesNodeName)(TABLE);
|
|
14
15
|
/**
|
|
15
16
|
* @hidden
|
|
16
17
|
*/
|
|
17
18
|
var GridQuery = /** @class */ (function () {
|
|
18
19
|
function GridQuery(element) {
|
|
19
20
|
this.element = element;
|
|
20
|
-
this.list = dom_queries_1.findElement(element, dom_queries_1.matchesClasses('k-grid'));
|
|
21
|
+
this.list = (0, dom_queries_1.findElement)(element, (0, dom_queries_1.matchesClasses)('k-grid'));
|
|
21
22
|
}
|
|
22
23
|
GridQuery.prototype.content = function () {
|
|
23
|
-
return dom_queries_1.findElement(this.list, dom_queries_1.matchesClasses('k-grid'));
|
|
24
|
+
return (0, dom_queries_1.findElement)(this.list, (0, dom_queries_1.matchesClasses)('k-grid'));
|
|
24
25
|
};
|
|
25
26
|
GridQuery.prototype.header = function () {
|
|
26
|
-
this.headerWrap = this.headerWrap || dom_queries_1.findElement(this.element, dom_queries_1.matchesClasses(exports.HEADER_CLASS));
|
|
27
|
-
return dom_queries_1.findElement(this.headerWrap, dom_queries_1.matchesClasses(""
|
|
27
|
+
this.headerWrap = this.headerWrap || (0, dom_queries_1.findElement)(this.element, (0, dom_queries_1.matchesClasses)(exports.HEADER_CLASS));
|
|
28
|
+
return (0, dom_queries_1.findElement)(this.headerWrap, (0, dom_queries_1.matchesClasses)("".concat(exports.HEADER_CLASS)));
|
|
28
29
|
};
|
|
29
30
|
GridQuery.prototype.footer = function () {
|
|
30
|
-
this.footerWrap = this.footerWrap || dom_queries_1.findElement(this.element, dom_queries_1.matchesClasses(exports.FOOTER_CLASS));
|
|
31
|
-
return dom_queries_1.findElement(this.footerWrap, dom_queries_1.matchesClasses(""
|
|
31
|
+
this.footerWrap = this.footerWrap || (0, dom_queries_1.findElement)(this.element, (0, dom_queries_1.matchesClasses)(exports.FOOTER_CLASS));
|
|
32
|
+
return (0, dom_queries_1.findElement)(this.footerWrap, (0, dom_queries_1.matchesClasses)("".concat(exports.FOOTER_CLASS)));
|
|
32
33
|
};
|
|
33
34
|
GridQuery.prototype.table = function () {
|
|
34
|
-
return dom_queries_1.findElement(this.element, matchesTable);
|
|
35
|
+
return (0, dom_queries_1.findElement)(this.element, matchesTable);
|
|
35
36
|
};
|
|
36
37
|
return GridQuery;
|
|
37
38
|
}());
|
package/dist/npm/common/utils.js
CHANGED
|
@@ -1,76 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTable = exports.setFirstCellClass = exports.createTableElement = exports.wrapTable = exports.appendNodes = void 0;
|
|
3
4
|
var FIRST_CLASS = 'k-first';
|
|
4
5
|
var HEADER_CLASS = 'k-grid-header';
|
|
5
6
|
var FOOTER_CLASS = 'k-grid-footer';
|
|
6
7
|
/**
|
|
7
8
|
* @hidden
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
var appendNodes = function (element, nodes) {
|
|
10
11
|
var length = nodes.length;
|
|
11
12
|
for (var idx = 0; idx < length; idx++) {
|
|
12
13
|
element.appendChild(nodes[idx].cloneNode(true));
|
|
13
14
|
}
|
|
14
15
|
};
|
|
16
|
+
exports.appendNodes = appendNodes;
|
|
15
17
|
/**
|
|
16
18
|
* @hidden
|
|
17
19
|
*/
|
|
18
|
-
|
|
20
|
+
var wrapTable = function (table) {
|
|
19
21
|
var wrapper = document.createElement('div');
|
|
20
22
|
wrapper.className = 'k-widget k-grid';
|
|
21
23
|
wrapper.appendChild(table);
|
|
22
24
|
return wrapper;
|
|
23
25
|
};
|
|
26
|
+
exports.wrapTable = wrapTable;
|
|
24
27
|
/**
|
|
25
28
|
* @hidden
|
|
26
29
|
*/
|
|
27
|
-
|
|
30
|
+
var createTableElement = function (sources) {
|
|
28
31
|
var sourceCount = sources.length;
|
|
29
32
|
var element = sources[0].cloneNode(true);
|
|
30
33
|
var rowsCount = element.rows.length;
|
|
31
34
|
if (sourceCount > 1) {
|
|
32
35
|
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++) {
|
|
33
36
|
for (var sourceIdx = 1; sourceIdx < sourceCount; sourceIdx++) {
|
|
34
|
-
exports.appendNodes(element.rows[rowIdx], sources[sourceIdx].rows[rowIdx].cells);
|
|
37
|
+
(0, exports.appendNodes)(element.rows[rowIdx], sources[sourceIdx].rows[rowIdx].cells);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
return element;
|
|
39
42
|
};
|
|
43
|
+
exports.createTableElement = createTableElement;
|
|
40
44
|
/**
|
|
41
45
|
* @hidden
|
|
42
46
|
*/
|
|
43
|
-
|
|
47
|
+
var setFirstCellClass = function (header, headers) {
|
|
44
48
|
if (headers.length > 1 && header.rows.length > 1) {
|
|
45
49
|
for (var idx = 1; idx < header.rows.length; idx++) {
|
|
46
50
|
var firstCellIndex = headers[0].rows[idx].cells.length;
|
|
47
51
|
var cell = header.rows[idx].cells[firstCellIndex];
|
|
48
52
|
if (String(cell.className).indexOf(FIRST_CLASS) === -1) {
|
|
49
|
-
cell.className += " "
|
|
53
|
+
cell.className += " ".concat(FIRST_CLASS);
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
};
|
|
58
|
+
exports.setFirstCellClass = setFirstCellClass;
|
|
54
59
|
/**
|
|
55
60
|
* @hidden
|
|
56
61
|
*/
|
|
57
|
-
|
|
62
|
+
var createTable = function (colGroups, headers, bodies, footers) {
|
|
58
63
|
var table = document.createElement('table');
|
|
59
64
|
var colGroup = colGroups[0].cloneNode(true);
|
|
60
65
|
for (var idx = 1; idx < colGroups.length; idx++) {
|
|
61
|
-
exports.appendNodes(colGroup, colGroups[idx].querySelectorAll('col'));
|
|
66
|
+
(0, exports.appendNodes)(colGroup, colGroups[idx].querySelectorAll('col'));
|
|
62
67
|
}
|
|
63
|
-
var header = exports.createTableElement(headers);
|
|
64
|
-
var body = exports.createTableElement(bodies);
|
|
68
|
+
var header = (0, exports.createTableElement)(headers);
|
|
69
|
+
var body = (0, exports.createTableElement)(bodies);
|
|
65
70
|
header.className = HEADER_CLASS;
|
|
66
|
-
exports.setFirstCellClass(header, headers);
|
|
71
|
+
(0, exports.setFirstCellClass)(header, headers);
|
|
67
72
|
table.appendChild(colGroup);
|
|
68
73
|
table.appendChild(header);
|
|
69
74
|
table.appendChild(body);
|
|
70
75
|
if (footers.length) {
|
|
71
|
-
var footer = exports.createTableElement(footers);
|
|
76
|
+
var footer = (0, exports.createTableElement)(footers);
|
|
72
77
|
footer.className = FOOTER_CLASS;
|
|
73
78
|
table.appendChild(footer);
|
|
74
79
|
}
|
|
75
|
-
return exports.wrapTable(table);
|
|
80
|
+
return (0, exports.wrapTable)(table);
|
|
76
81
|
};
|
|
82
|
+
exports.createTable = createTable;
|
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.GridPDFExport = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var PropTypes = require("prop-types");
|
|
18
21
|
var getPageMargin_1 = require("../getPageMargin");
|
|
@@ -25,7 +28,7 @@ var GridPDFExport = /** @class */ (function (_super) {
|
|
|
25
28
|
__extends(GridPDFExport, _super);
|
|
26
29
|
function GridPDFExport(props) {
|
|
27
30
|
var _this = _super.call(this, props) || this;
|
|
28
|
-
_this.saveGridPDF = provideSaveGridPDF_1.provideSaveGridPDF(_this.getSavePDF());
|
|
31
|
+
_this.saveGridPDF = (0, provideSaveGridPDF_1.provideSaveGridPDF)(_this.getSavePDF());
|
|
29
32
|
return _this;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
@@ -43,7 +46,7 @@ var GridPDFExport = /** @class */ (function (_super) {
|
|
|
43
46
|
*/
|
|
44
47
|
// tslint:enable:max-line-length
|
|
45
48
|
GridPDFExport.prototype.save = function (data, callback) {
|
|
46
|
-
this.saveGridPDF(this.getGrid(), Object.assign({}, this.props, { margin: getPageMargin_1.getPageMargin(this.props) }), callback, data, this.getCustomColumns());
|
|
49
|
+
this.saveGridPDF(this.getGrid(), Object.assign({}, this.props, { margin: (0, getPageMargin_1.getPageMargin)(this.props) }), callback, data, this.getCustomColumns());
|
|
47
50
|
};
|
|
48
51
|
GridPDFExport.prototype.getSavePDF = function () {
|
|
49
52
|
return savePDF_1.savePDF;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.exportElement = void 0;
|
|
3
4
|
var grid_query_1 = require("./grid-query");
|
|
4
5
|
var utils_1 = require("../common/utils");
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
var exportElement = function (wrapper) {
|
|
9
10
|
var query = new grid_query_1.GridQuery(wrapper);
|
|
10
11
|
var content = query.content();
|
|
11
12
|
var result;
|
|
@@ -15,10 +16,11 @@ exports.exportElement = function (wrapper) {
|
|
|
15
16
|
var bodies = [content.querySelector('tbody')];
|
|
16
17
|
var footer = query.footer();
|
|
17
18
|
var footers = footer ? [footer.querySelector('tfoot')] : [];
|
|
18
|
-
result = utils_1.createTable(colGroups, headers, bodies, footers);
|
|
19
|
+
result = (0, utils_1.createTable)(colGroups, headers, bodies, footers);
|
|
19
20
|
}
|
|
20
21
|
else {
|
|
21
|
-
result = utils_1.wrapTable(query.table().cloneNode(true));
|
|
22
|
+
result = (0, utils_1.wrapTable)(query.table().cloneNode(true));
|
|
22
23
|
}
|
|
23
24
|
return result;
|
|
24
25
|
};
|
|
26
|
+
exports.exportElement = exportElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GridQuery = exports.FOOTER_CLASS = exports.HEADER_CLASS = void 0;
|
|
3
4
|
var dom_queries_1 = require("../common/dom-queries");
|
|
4
5
|
/**
|
|
5
6
|
* @hidden
|
|
@@ -10,7 +11,7 @@ exports.HEADER_CLASS = 'k-grid-header';
|
|
|
10
11
|
*/
|
|
11
12
|
exports.FOOTER_CLASS = 'k-grid-footer';
|
|
12
13
|
var TABLE = 'TABLE';
|
|
13
|
-
var matchesTable = dom_queries_1.matchesNodeName(TABLE);
|
|
14
|
+
var matchesTable = (0, dom_queries_1.matchesNodeName)(TABLE);
|
|
14
15
|
var suffix = function (locked) { return locked ? 'locked' : 'wrap'; };
|
|
15
16
|
/**
|
|
16
17
|
* @hidden
|
|
@@ -18,21 +19,21 @@ var suffix = function (locked) { return locked ? 'locked' : 'wrap'; };
|
|
|
18
19
|
var GridQuery = /** @class */ (function () {
|
|
19
20
|
function GridQuery(element) {
|
|
20
21
|
this.element = element;
|
|
21
|
-
this.list = dom_queries_1.findElement(element, dom_queries_1.matchesClasses('k-grid-container'));
|
|
22
|
+
this.list = (0, dom_queries_1.findElement)(element, (0, dom_queries_1.matchesClasses)('k-grid-container'));
|
|
22
23
|
}
|
|
23
24
|
GridQuery.prototype.content = function (locked) {
|
|
24
|
-
return dom_queries_1.findElement(this.list, dom_queries_1.matchesClasses("k-grid-content"
|
|
25
|
+
return (0, dom_queries_1.findElement)(this.list, (0, dom_queries_1.matchesClasses)("k-grid-content".concat(locked ? '-locked' : '')));
|
|
25
26
|
};
|
|
26
27
|
GridQuery.prototype.header = function (locked) {
|
|
27
|
-
this.headerWrap = this.headerWrap || dom_queries_1.findElement(this.element, dom_queries_1.matchesClasses(exports.HEADER_CLASS));
|
|
28
|
-
return dom_queries_1.findElement(this.headerWrap, dom_queries_1.matchesClasses(exports.HEADER_CLASS
|
|
28
|
+
this.headerWrap = this.headerWrap || (0, dom_queries_1.findElement)(this.element, (0, dom_queries_1.matchesClasses)(exports.HEADER_CLASS));
|
|
29
|
+
return (0, dom_queries_1.findElement)(this.headerWrap, (0, dom_queries_1.matchesClasses)("".concat(exports.HEADER_CLASS, "-").concat(suffix(locked))));
|
|
29
30
|
};
|
|
30
31
|
GridQuery.prototype.footer = function (locked) {
|
|
31
|
-
this.footerWrap = this.footerWrap || dom_queries_1.findElement(this.element, dom_queries_1.matchesClasses(exports.FOOTER_CLASS));
|
|
32
|
-
return dom_queries_1.findElement(this.footerWrap, dom_queries_1.matchesClasses(exports.FOOTER_CLASS
|
|
32
|
+
this.footerWrap = this.footerWrap || (0, dom_queries_1.findElement)(this.element, (0, dom_queries_1.matchesClasses)(exports.FOOTER_CLASS));
|
|
33
|
+
return (0, dom_queries_1.findElement)(this.footerWrap, (0, dom_queries_1.matchesClasses)("".concat(exports.FOOTER_CLASS, "-").concat(suffix(locked))));
|
|
33
34
|
};
|
|
34
35
|
GridQuery.prototype.table = function () {
|
|
35
|
-
return dom_queries_1.findElement(this.element, matchesTable);
|
|
36
|
+
return (0, dom_queries_1.findElement)(this.element, matchesTable);
|
|
36
37
|
};
|
|
37
38
|
return GridQuery;
|
|
38
39
|
}());
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.provideSaveGridPDF = void 0;
|
|
3
4
|
var ReactDOM = require("react-dom");
|
|
4
5
|
var React = require("react");
|
|
5
6
|
var export_element_1 = require("./export-element");
|
|
@@ -44,7 +45,7 @@ function saveGridPDF(savePDF, grid, pdfExportOptions, callback, data, columns) {
|
|
|
44
45
|
that has been plugged almost seemlessly. */
|
|
45
46
|
finalContainer = document.createElement('div');
|
|
46
47
|
finalContainer.className = 'k-grid-pdf-export-element';
|
|
47
|
-
var result = export_element_1.exportElement(gridInnerWrapper);
|
|
48
|
+
var result = (0, export_element_1.exportElement)(gridInnerWrapper);
|
|
48
49
|
finalContainer.appendChild(result);
|
|
49
50
|
document.body.appendChild(finalContainer);
|
|
50
51
|
return result;
|
|
@@ -67,6 +68,6 @@ function saveGridPDF(savePDF, grid, pdfExportOptions, callback, data, columns) {
|
|
|
67
68
|
function getGridNotColumnChildren(grid) {
|
|
68
69
|
return React.Children
|
|
69
70
|
.toArray(grid.props.children)
|
|
70
|
-
.filter(function (child) { return child &&
|
|
71
|
+
.filter(function (child) { return child && child.type &&
|
|
71
72
|
child.type.displayName !== 'KendoReactGridColumn'; });
|
|
72
73
|
}
|
package/dist/npm/main.d.ts
CHANGED
package/dist/npm/main.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TreeListPDFExport = exports.GridPDFExport = exports.getPageMargin = exports.savePDF = exports.PDFMargin = exports.PDFExport = void 0;
|
|
3
4
|
var PDFExport_1 = require("./PDFExport");
|
|
4
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "PDFExport", { enumerable: true, get: function () { return PDFExport_1.PDFExport; } });
|
|
5
6
|
var PDFMargin_1 = require("./PDFMargin");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "PDFMargin", { enumerable: true, get: function () { return PDFMargin_1.PDFMargin; } });
|
|
7
8
|
var savePDF_1 = require("./savePDF");
|
|
8
|
-
exports
|
|
9
|
+
Object.defineProperty(exports, "savePDF", { enumerable: true, get: function () { return savePDF_1.savePDF; } });
|
|
9
10
|
var getPageMargin_1 = require("./getPageMargin");
|
|
10
|
-
exports
|
|
11
|
+
Object.defineProperty(exports, "getPageMargin", { enumerable: true, get: function () { return getPageMargin_1.getPageMargin; } });
|
|
11
12
|
var GridPDFExport_1 = require("./grid/GridPDFExport");
|
|
12
|
-
exports
|
|
13
|
+
Object.defineProperty(exports, "GridPDFExport", { enumerable: true, get: function () { return GridPDFExport_1.GridPDFExport; } });
|
|
13
14
|
var TreeListPDFExport_1 = require("./treelist/TreeListPDFExport");
|
|
14
|
-
exports
|
|
15
|
+
Object.defineProperty(exports, "TreeListPDFExport", { enumerable: true, get: function () { return TreeListPDFExport_1.TreeListPDFExport; } });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.packageMetadata = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* @hidden
|
|
5
6
|
*/
|
|
@@ -7,7 +8,7 @@ exports.packageMetadata = {
|
|
|
7
8
|
name: '@progress/kendo-react-pdf',
|
|
8
9
|
productName: 'KendoReact',
|
|
9
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
11
|
+
publishDate: 1654690540,
|
|
11
12
|
version: '',
|
|
12
13
|
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'
|
|
13
14
|
};
|
package/dist/npm/savePDF.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.savePDF = void 0;
|
|
3
4
|
var kendo_drawing_1 = require("@progress/kendo-drawing");
|
|
4
5
|
var kendo_file_saver_1 = require("@progress/kendo-file-saver");
|
|
5
6
|
var KendoDrawingAdapter_1 = require("./KendoDrawingAdapter");
|
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TreeListPDFExport = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var PropTypes = require("prop-types");
|
|
18
21
|
var getPageMargin_1 = require("../getPageMargin");
|
|
@@ -25,7 +28,7 @@ var TreeListPDFExport = /** @class */ (function (_super) {
|
|
|
25
28
|
__extends(TreeListPDFExport, _super);
|
|
26
29
|
function TreeListPDFExport(props) {
|
|
27
30
|
var _this = _super.call(this, props) || this;
|
|
28
|
-
_this.saveTreeListPDF = provideSaveTreeListPDF_1.provideSaveTreeListPDF(_this.getSavePDF());
|
|
31
|
+
_this.saveTreeListPDF = (0, provideSaveTreeListPDF_1.provideSaveTreeListPDF)(_this.getSavePDF());
|
|
29
32
|
return _this;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
@@ -44,7 +47,7 @@ var TreeListPDFExport = /** @class */ (function (_super) {
|
|
|
44
47
|
*/
|
|
45
48
|
// tslint:enable:max-line-length
|
|
46
49
|
TreeListPDFExport.prototype.save = function (data, columns, callback) {
|
|
47
|
-
this.saveTreeListPDF(this.getTreeList(), Object.assign({}, this.props, { margin: getPageMargin_1.getPageMargin(this.props) }), callback, data, columns || []);
|
|
50
|
+
this.saveTreeListPDF(this.getTreeList(), Object.assign({}, this.props, { margin: (0, getPageMargin_1.getPageMargin)(this.props) }), callback, data, columns || []);
|
|
48
51
|
};
|
|
49
52
|
TreeListPDFExport.prototype.getSavePDF = function () {
|
|
50
53
|
return savePDF_1.savePDF;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.exportElement = void 0;
|
|
3
4
|
var table_query_1 = require("../common/table-query");
|
|
4
5
|
var utils_1 = require("../common/utils");
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
var exportElement = function (wrapper) {
|
|
9
10
|
var query = new table_query_1.GridQuery(wrapper);
|
|
10
11
|
var content = query.content();
|
|
11
12
|
var result;
|
|
@@ -20,10 +21,11 @@ exports.exportElement = function (wrapper) {
|
|
|
20
21
|
var bodies = [content.querySelector('tbody')];
|
|
21
22
|
var footer = query.footer();
|
|
22
23
|
var footers = footer ? [footer.querySelector('tfoot')] : [];
|
|
23
|
-
result = utils_1.createTable(colGroups, headers, bodies, footers);
|
|
24
|
+
result = (0, utils_1.createTable)(colGroups, headers, bodies, footers);
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
|
-
result = utils_1.wrapTable(query.table().cloneNode(true));
|
|
27
|
+
result = (0, utils_1.wrapTable)(query.table().cloneNode(true));
|
|
27
28
|
}
|
|
28
29
|
return result;
|
|
29
30
|
};
|
|
31
|
+
exports.exportElement = exportElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.provideSaveTreeListPDF = void 0;
|
|
3
4
|
var ReactDOM = require("react-dom");
|
|
4
5
|
var React = require("react");
|
|
5
6
|
var export_element_1 = require("./export-element");
|
|
@@ -44,7 +45,7 @@ function saveTreeListPDF(savePDF, treeList, pdfExportOptions, callback, data, co
|
|
|
44
45
|
that has been plugged almost seemlessly. */
|
|
45
46
|
finalContainer = document.createElement('div');
|
|
46
47
|
finalContainer.className = 'k-treelist-pdf-export-element';
|
|
47
|
-
var result = export_element_1.exportElement(treeListInnerWrapper);
|
|
48
|
+
var result = (0, export_element_1.exportElement)(treeListInnerWrapper);
|
|
48
49
|
finalContainer.appendChild(result);
|
|
49
50
|
document.body.appendChild(finalContainer);
|
|
50
51
|
return finalContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-react-pdf",["react","@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-licensing","react-dom","react-dom/server"],function(s){var i,a,p,c,u,l;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){i=t(e)},function(e){a=t(e)},function(e){p=t(e)},function(e){c=t(e)},function(e){u=t(e)},function(e){l=t(e)}],execute:function(){function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,r;n=[function(e,t){e.exports=i},function(e,t,n){e.exports=n(13)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),p=n(6),c=["bottom","left","right","top"];t.getPageMargin=function(e){var t=a.Children.toArray(e.children).find(function(e){return e&&e.type===p.PDFMargin});if(t){for(var n=t,r={},o=0;o<c.length;o++){var i=c[o],s=n.props[i];void 0!==s&&(r[i]=s)}return r}return e.margin}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(5),i=n(7);t.savePDF=function(e,t,n){new i.default(r.drawDOM,r.exportPDF,o.saveAs,e,t=void 0===t?{}:t).savePDF(n)}},function(e,t){e.exports=a},function(e,t){e.exports=p},function(e,t,n){"use strict";var r,o,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),n(0)),n=n(1),s=(o=s.Component,i(a,o),a.prototype.render=function(){return null},a.propTypes={left:n.oneOfType([n.number,n.string]),top:n.oneOfType([n.number,n.string]),right:n.oneOfType([n.number,n.string]),bottom:n.oneOfType([n.number,n.string])},a);function a(){return null!==o&&o.apply(this,arguments)||this}t.PDFMargin=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),a=n(15);function r(e,t,n,r,o){void 0===o&&(o={});var i=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=n,this.domElement=r,this.options=o,this.convertPageTemplateToHtml=function(e){return"<span>"+a.renderToStaticMarkup(s.createElement(i.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}))+"</span>"}}r.prototype.savePDF=function(e){var t=this,n=this.drawDOM(this.domElement,this.getDrawOptions()).then(function(e){return t.exportPDF(e,t.getPDFOptions())}).then(function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())});e&&n.then(e,e)},r.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},r.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},r.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},t.default=r},function(e,t){e.exports=u},function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});function r(e){return String(e).trim().split(" ")}var s=/^(?:a|input|select|option|textarea|button|object)$/i,n={};i.hasClasses=function(e,t){var n=r(t);return Boolean(r(e.className).find(function(e){return 0<=n.indexOf(e)}))},i.matchesClasses=function(t){return function(e){return i.hasClasses(e,t)}},i.matchesNodeName=function(t){return n[t]||(n[t]=function(e){return String(e.nodeName).toLowerCase()===t.toLowerCase()}),n[t]},i.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e},i.closestInScope=function(e,t,n){for(;e&&e!==n&&!t(e);)e=e.parentNode;if(e!==n)return e},i.contains=function(t,n,e){if(void 0===e&&(e=!1),!i.closest(n,function(e){return e===t}))return!1;var r=i.closest(n,function(e){return e===n});return r&&(e||r!==t)},i.isVisible=function(e){var t=e.getBoundingClientRect(),n=0<t.width&&0<t.height,t=0!==t.x&&0!==t.y;return(n||t)&&"hidden"!==window.getComputedStyle(e).visibility},i.isFocusable=function(e,t){var n,r,o;return void 0===t&&(t=!0),!!e.tagName&&(n=e.tagName.toLowerCase(),r="-1"===(o=e.getAttribute("tabIndex")),o=null!==o&&!r,(o=s.test(n)?!e.disabled&&!r:o)&&(!t||i.isVisible(e)))},i.findElement=function(e,t,n){if(void 0===n&&(n=!0),e){if(n&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var r=i.findElement(e,t);if(r)return r}e=e.nextSibling}}},i.findFocusable=function(e,t){return void 0===t&&(t=!0),i.findElement(e,function(e){return i.isFocusable(e,t)})},i.findFocusableChild=function(e,t){return void 0===t&&(t=!0),i.findElement(e,function(e){return i.isFocusable(e,t)},!1)}},function(e,p,t){"use strict";Object.defineProperty(p,"__esModule",{value:!0}),p.appendNodes=function(e,t){for(var n=t.length,r=0;r<n;r++)e.appendChild(t[r].cloneNode(!0))},p.wrapTable=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},p.createTableElement=function(e){var t=e.length,n=e[0].cloneNode(!0),r=n.rows.length;if(1<t)for(var o=0;o<r;o++)for(var i=1;i<t;i++)p.appendNodes(n.rows[o],e[i].rows[o].cells);return n},p.setFirstCellClass=function(e,t){if(1<t.length&&1<e.rows.length)for(var n=1;n<e.rows.length;n++){var r=t[0].rows[n].cells.length,r=e.rows[n].cells[r];-1===String(r.className).indexOf("k-first")&&(r.className+=" k-first")}},p.createTable=function(e,t,n,r){for(var o=document.createElement("table"),i=e[0].cloneNode(!0),s=1;s<e.length;s++)p.appendNodes(i,e[s].querySelectorAll("col"));var a=p.createTableElement(t),n=p.createTableElement(n);return a.className="k-grid-header",p.setFirstCellClass(a,t),o.appendChild(i),o.appendChild(a),o.appendChild(n),r.length&&((t=p.createTableElement(r)).className="k-grid-footer",o.appendChild(t)),p.wrapTable(o)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(12),o=(t.PDFExport=o.default,n(6)),o=(t.PDFMargin=o.PDFMargin,n(3)),o=(t.savePDF=o.savePDF,n(2)),o=(t.getPageMargin=o.getPageMargin,n(18)),o=(t.GridPDFExport=o.GridPDFExport,n(22)),i=(t.TreeListPDFExport=o.TreeListPDFExport,t);for(r in i)s(r,i[r])},function(e,t,n){"use strict";var r,o,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),n(0)),a=n(1),p=n(4),c=n(5),u=n(2),l=n(7),d=n(16),f=n(17),n=(o=s.Component,i(h,o),h.prototype.render=function(){var t=this;return s.createElement("div",{ref:function(e){t.rootElForPDF=e}},this.props.children)},h.prototype.save=function(e){new l.default(p.drawDOM,p.exportPDF,c.saveAs,this.rootElForPDF,this.getOptions()).savePDF(e)},h.prototype.getOptions=function(){return Object.assign({},this.props,{margin:u.getPageMargin(this.props)})},h.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},h);function h(e){var t,e=o.call(this,e)||this;return void 0!==d?d.validatePackage(f.packageMetadata):(t=(t="License activation failed for "+f.packageMetadata.name+"\n")+"The @progress/kendo-licensing script is not loaded.\nSee "+f.packageMetadata.licensingDocsUrl+" for more information.\n",console.warn(t)),e}t.default=n},function(e,t,n){"use strict";var s=n(14);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,i){if(i!==s)throw(i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",i}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=l},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1653456947,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"}},function(e,t,n){"use strict";var r,o,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),n(0)),a=n(1),p=n(2),c=n(3),u=n(19),n=(o=s.Component,i(l,o),l.prototype.render=function(){return null},l.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:p.getPageMargin(this.props)}),t,e,this.getCustomColumns())},l.prototype.getSavePDF=function(){return c.savePDF},l.prototype.getGrid=function(){return s.Children.toArray(this.props.children).find(function(e){return e&&"KendoReactGrid"===e.type.displayName})},l.prototype.getCustomColumns=function(){return s.Children.toArray(this.props.children).filter(function(e){return e&&"KendoReactGridColumn"===e.type.displayName})},l.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},l);function l(e){e=o.call(this,e)||this;return e.saveGridPDF=u.provideSaveGridPDF(e.getSavePDF()),e}t.GridPDFExport=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=n(8),h=n(0),g=n(20);t.provideSaveGridPDF=function(d){return function(e,t,n,r,o){return s=d,e=e,p=n,n=r,r=o,void 0===(a=t=void 0===t?{}:t)&&(a={}),(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),u=document.createElement("div"),c.appendChild(u),document.body.appendChild(c),void f.render((n=n&&{data:n,total:n.length,pageSize:n.length,skip:0},o={style:Object.assign({},e.props.style,{width:"1000px"})},n=Object.assign({},n,o),r&&0<r.length?(o=h.Children.toArray(e.props.children).filter(function(e){return e&&"KendoReactGridColumn"!==e.type.displayName}),h.cloneElement(e,n,r.concat(o))):h.cloneElement(e,n)),u,function(){var e;s(((l=document.createElement("div")).className="k-grid-pdf-export-element",e=g.exportElement(u),l.appendChild(e),document.body.appendChild(l),e),a,i)});function i(){document.body.removeChild(c),document.body.removeChild(l),c=l=void 0,p&&p()}var s,a,p,c,u,l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(10);t.exportElement=function(e){var t,n,r,e=new i.GridQuery(e),o=e.content();return o?(t=[o.querySelector("colgroup")],n=[e.header().querySelector("thead")],o=[o.querySelector("tbody")],r=(r=e.footer())?[r.querySelector("tfoot")]:[],s.createTable(t,n,o,r)):s.wrapTable(e.table().cloneNode(!0))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){return e?"locked":"wrap"}var o=n(9),i=(t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer",o.matchesNodeName("TABLE"));function s(e){this.element=e,this.list=o.findElement(e,o.matchesClasses("k-grid-container"))}s.prototype.content=function(e){return o.findElement(this.list,o.matchesClasses("k-grid-content"+(e?"-locked":"")))},s.prototype.header=function(e){return this.headerWrap=this.headerWrap||o.findElement(this.element,o.matchesClasses(t.HEADER_CLASS)),o.findElement(this.headerWrap,o.matchesClasses(t.HEADER_CLASS+"-"+r(e)))},s.prototype.footer=function(e){return this.footerWrap=this.footerWrap||o.findElement(this.element,o.matchesClasses(t.FOOTER_CLASS)),o.findElement(this.footerWrap,o.matchesClasses(t.FOOTER_CLASS+"-"+r(e)))},s.prototype.table=function(){return o.findElement(this.element,i)},t.GridQuery=s},function(e,t,n){"use strict";var r,o,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),n(0)),a=n(1),p=n(2),c=n(3),u=n(23),n=(o=s.Component,i(l,o),l.prototype.render=function(){return null},l.prototype.save=function(e,t,n){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:p.getPageMargin(this.props)}),n,e,t||[])},l.prototype.getSavePDF=function(){return c.savePDF},l.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},l.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string,allPages:a.bool},l);function l(e){e=o.call(this,e)||this;return e.saveTreeListPDF=u.provideSaveTreeListPDF(e.getSavePDF()),e}t.TreeListPDFExport=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=n(8),h=n(0),g=n(24);t.provideSaveTreeListPDF=function(d){return function(e,t,n,r,o){return s=d,e=e,p=n,n=r,r=o,void 0===(a=t=void 0===t?{}:t)&&(a={}),(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),u=document.createElement("div"),c.appendChild(u),document.body.appendChild(c),void f.render((n=a.allPages&&n?{data:n,take:Number.MAX_VALUE,skip:0}:{},o={style:Object.assign({},e.props.style,{width:"1000px"})},n=Object.assign({},n,o),r&&0<r.length?h.cloneElement(e,Object.assign({},n,{columns:r})):h.cloneElement(e,n)),u,function(){var e;s(((l=document.createElement("div")).className="k-treelist-pdf-export-element",e=g.exportElement(u),l.appendChild(e),document.body.appendChild(l),l),a,i)});function i(){document.body.removeChild(c),document.body.removeChild(l),c=l=void 0,p&&p()}var s,a,p,c,u,l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),s=n(10);t.exportElement=function(e){var t,n,e=new i.GridQuery(e),r=e.content(),o=e.header();return 1<o.childNodes.length&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach(function(e){return e.style.top=0}),r?(t=[r.querySelector("colgroup")],o=[o],r=[r.querySelector("tbody")],n=(n=e.footer())?[n.querySelector("tfoot")]:[],s.createTable(t,o,r,n)):s.wrapTable(e.table().cloneNode(!0))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=(t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer",r.matchesNodeName("TABLE"));function i(e){this.element=e,this.list=r.findElement(e,r.matchesClasses("k-grid"))}i.prototype.content=function(){return r.findElement(this.list,r.matchesClasses("k-grid"))},i.prototype.header=function(){return this.headerWrap=this.headerWrap||r.findElement(this.element,r.matchesClasses(t.HEADER_CLASS)),r.findElement(this.headerWrap,r.matchesClasses(""+t.HEADER_CLASS))},i.prototype.footer=function(){return this.footerWrap=this.footerWrap||r.findElement(this.element,r.matchesClasses(t.FOOTER_CLASS)),r.findElement(this.footerWrap,r.matchesClasses(""+t.FOOTER_CLASS))},i.prototype.table=function(){return r.findElement(this.element,o)},t.GridQuery=i}],r={},o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=11)}}});
|
|
1
|
+
System.register("@progress/kendo-react-pdf",["@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-licensing","react","react-dom","react-dom/server"],function(u,e){var d={},f={},h={},g={},m={},y={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.defineProperty(f,"__esModule",{value:!0}),Object.defineProperty(h,"__esModule",{value:!0}),Object.defineProperty(g,"__esModule",{value:!0}),Object.defineProperty(m,"__esModule",{value:!0}),Object.defineProperty(y,"__esModule",{value:!0}),{setters:[function(t){Object.keys(t).forEach(function(e){d[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){f[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){h[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){g[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){m[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){y[e]=t[e]})}],execute:function(){function r(e){var t=o[e];if(void 0!==t)return t.exports;t=o[e]={exports:{}};return n[e].call(t.exports,t,t.exports,r),t.exports}var n,o,e,t,i,s,a,p,c,l;u((n={765:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var s=r(954),a=r(274);function n(e,t,r,n,o){void 0===o&&(o={});var i=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=r,this.domElement=n,this.options=o,this.convertPageTemplateToHtml=function(e){e=a.renderToStaticMarkup(s.createElement(i.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}));return"<span>".concat(e,"</span>")}}n.prototype.savePDF=function(e){var t=this,r=this.drawDOM(this.domElement,this.getDrawOptions()).then(function(e){return t.exportPDF(e,t.getPDFOptions())}).then(function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())});e&&r.then(e,e)},n.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},n.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},n.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},t.default=n},981:function(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),t.PDFExport=void 0,r(954)),a=r(697),p=r(100),c=r(619),l=r(567),u=r(765),d=r(527),f=r(363),r=(o=s.Component,i(h,o),h.prototype.render=function(){var t=this;return s.createElement("div",{ref:function(e){t.rootElForPDF=e}},this.props.children)},h.prototype.save=function(e){new u.default(p.drawDOM,p.exportPDF,c.saveAs,this.rootElForPDF,this.getOptions()).savePDF(e)},h.prototype.getOptions=function(){return Object.assign({},this.props,{margin:(0,l.getPageMargin)(this.props)})},h.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},h);function h(e){var t,e=o.call(this,e)||this;return e.rootElForPDF=null,void 0!==d?d.validatePackage(f.packageMetadata):(t="License activation failed for ".concat(f.packageMetadata.name,"\n"),t=(t+="The @progress/kendo-licensing script is not loaded.\n")+"See ".concat(f.packageMetadata.licensingDocsUrl," for more information.\n"),console.warn(t)),e}t.PDFExport=r},398:function(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),t.PDFMargin=void 0,r(954)),r=r(697),s=(o=s.Component,i(a,o),a.prototype.render=function(){return null},a.propTypes={left:r.oneOfType([r.number,r.string]),top:r.oneOfType([r.number,r.string]),right:r.oneOfType([r.number,r.string]),bottom:r.oneOfType([r.number,r.string])},a);function a(){return null!==o&&o.apply(this,arguments)||this}t.PDFMargin=s},188:(e,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.findFocusableChild=i.findFocusable=i.findElement=i.isFocusable=i.isVisible=i.contains=i.closestInScope=i.closest=i.matchesNodeName=i.matchesClasses=i.hasClasses=void 0;function n(e){return String(e).trim().split(" ")}var s=/^(?:a|input|select|option|textarea|button|object)$/i,r={};i.hasClasses=function(e,t){var r=n(t);return Boolean(n(e.className).find(function(e){return 0<=r.indexOf(e)}))},i.matchesClasses=function(t){return function(e){return(0,i.hasClasses)(e,t)}},i.matchesNodeName=function(t){return r[t]||(r[t]=function(e){return String(e.nodeName).toLowerCase()===t.toLowerCase()}),r[t]},i.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e},i.closestInScope=function(e,t,r){for(;e&&e!==r&&!t(e);)e=e.parentNode;if(e!==r)return e},i.contains=function(t,r,e){if(void 0===e&&(e=!1),!(0,i.closest)(r,function(e){return e===t}))return!1;var n=(0,i.closest)(r,function(e){return e===r});return n&&(e||n!==t)},i.isVisible=function(e){var t=e.getBoundingClientRect(),r=0<t.width&&0<t.height,t=0!==t.x&&0!==t.y;return(r||t)&&"hidden"!==window.getComputedStyle(e).visibility},i.isFocusable=function(e,t){var r,n,o;return void 0===t&&(t=!0),!!e.tagName&&(r=e.tagName.toLowerCase(),n="-1"===(o=e.getAttribute("tabIndex")),o=null!==o&&!n,(o=s.test(r)?!e.disabled&&!n:o)&&(!t||(0,i.isVisible)(e)))},i.findElement=function(e,t,r){if(void 0===r&&(r=!0),e){if(r&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var n=(0,i.findElement)(e,t);if(n)return n}e=e.nextSibling}}},i.findFocusable=function(e,t){return void 0===t&&(t=!0),(0,i.findElement)(e,function(e){return(0,i.isFocusable)(e,t)})},i.findFocusableChild=function(e,t){return void 0===t&&(t=!0),(0,i.findElement)(e,function(e){return(0,i.isFocusable)(e,t)},!1)}},175:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridQuery=t.FOOTER_CLASS=t.HEADER_CLASS=void 0;var n=r(188),o=(t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer",(0,n.matchesNodeName)("TABLE"));function i(e){this.element=e,this.list=(0,n.findElement)(e,(0,n.matchesClasses)("k-grid"))}i.prototype.content=function(){return(0,n.findElement)(this.list,(0,n.matchesClasses)("k-grid"))},i.prototype.header=function(){return this.headerWrap=this.headerWrap||(0,n.findElement)(this.element,(0,n.matchesClasses)(t.HEADER_CLASS)),(0,n.findElement)(this.headerWrap,(0,n.matchesClasses)("".concat(t.HEADER_CLASS)))},i.prototype.footer=function(){return this.footerWrap=this.footerWrap||(0,n.findElement)(this.element,(0,n.matchesClasses)(t.FOOTER_CLASS)),(0,n.findElement)(this.footerWrap,(0,n.matchesClasses)("".concat(t.FOOTER_CLASS)))},i.prototype.table=function(){return(0,n.findElement)(this.element,o)},t.GridQuery=i},669:(e,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.createTable=p.setFirstCellClass=p.createTableElement=p.wrapTable=p.appendNodes=void 0;var o="k-first";p.appendNodes=function(e,t){for(var r=t.length,n=0;n<r;n++)e.appendChild(t[n].cloneNode(!0))},p.wrapTable=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},p.createTableElement=function(e){var t=e.length,r=e[0].cloneNode(!0),n=r.rows.length;if(1<t)for(var o=0;o<n;o++)for(var i=1;i<t;i++)(0,p.appendNodes)(r.rows[o],e[i].rows[o].cells);return r},p.setFirstCellClass=function(e,t){if(1<t.length&&1<e.rows.length)for(var r=1;r<e.rows.length;r++){var n=t[0].rows[r].cells.length,n=e.rows[r].cells[n];-1===String(n.className).indexOf(o)&&(n.className+=" ".concat(o))}},p.createTable=function(e,t,r,n){for(var o=document.createElement("table"),i=e[0].cloneNode(!0),s=1;s<e.length;s++)(0,p.appendNodes)(i,e[s].querySelectorAll("col"));var a=(0,p.createTableElement)(t),r=(0,p.createTableElement)(r);return a.className="k-grid-header",(0,p.setFirstCellClass)(a,t),o.appendChild(i),o.appendChild(a),o.appendChild(r),n.length&&((t=(0,p.createTableElement)(n)).className="k-grid-footer",o.appendChild(t)),(0,p.wrapTable)(o)}},567:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getPageMargin=void 0;var a=r(954),p=r(398),c=["bottom","left","right","top"];t.getPageMargin=function(e){var t=a.Children.toArray(e.children).find(function(e){return e&&e.type===p.PDFMargin});if(t){for(var r=t,n={},o=0;o<c.length;o++){var i=c[o],s=r.props[i];void 0!==s&&(n[i]=s)}return n}return e.margin}},617:function(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),t.GridPDFExport=void 0,r(954)),a=r(697),p=r(567),c=r(350),l=r(258),r=(o=s.Component,i(u,o),u.prototype.render=function(){return null},u.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:(0,p.getPageMargin)(this.props)}),t,e,this.getCustomColumns())},u.prototype.getSavePDF=function(){return c.savePDF},u.prototype.getGrid=function(){return s.Children.toArray(this.props.children).find(function(e){return e&&"KendoReactGrid"===e.type.displayName})},u.prototype.getCustomColumns=function(){return s.Children.toArray(this.props.children).filter(function(e){return e&&"KendoReactGridColumn"===e.type.displayName})},u.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string},u);function u(e){e=o.call(this,e)||this;return e.saveGridPDF=(0,l.provideSaveGridPDF)(e.getSavePDF()),e}t.GridPDFExport=r},863:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exportElement=void 0;var i=r(138),s=r(669);t.exportElement=function(e){var t,r,n,e=new i.GridQuery(e),o=e.content();return o?(t=[o.querySelector("colgroup")],r=[e.header().querySelector("thead")],o=[o.querySelector("tbody")],n=(n=e.footer())?[n.querySelector("tfoot")]:[],(0,s.createTable)(t,r,o,n)):(0,s.wrapTable)(e.table().cloneNode(!0))}},138:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridQuery=t.FOOTER_CLASS=t.HEADER_CLASS=void 0;function n(e){return e?"locked":"wrap"}var o=r(188),i=(t.HEADER_CLASS="k-grid-header",t.FOOTER_CLASS="k-grid-footer",(0,o.matchesNodeName)("TABLE"));function s(e){this.element=e,this.list=(0,o.findElement)(e,(0,o.matchesClasses)("k-grid-container"))}s.prototype.content=function(e){return(0,o.findElement)(this.list,(0,o.matchesClasses)("k-grid-content".concat(e?"-locked":"")))},s.prototype.header=function(e){return this.headerWrap=this.headerWrap||(0,o.findElement)(this.element,(0,o.matchesClasses)(t.HEADER_CLASS)),(0,o.findElement)(this.headerWrap,(0,o.matchesClasses)("".concat(t.HEADER_CLASS,"-").concat(n(e))))},s.prototype.footer=function(e){return this.footerWrap=this.footerWrap||(0,o.findElement)(this.element,(0,o.matchesClasses)(t.FOOTER_CLASS)),(0,o.findElement)(this.footerWrap,(0,o.matchesClasses)("".concat(t.FOOTER_CLASS,"-").concat(n(e))))},s.prototype.table=function(){return(0,o.findElement)(this.element,i)},t.GridQuery=s},258:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.provideSaveGridPDF=void 0;var f=r(493),h=r(954),g=r(863);t.provideSaveGridPDF=function(d){return function(e,t,r,n,o){return s=d,e=e,p=r,r=n,n=o,void 0===(a=t=void 0===t?{}:t)&&(a={}),(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),c.appendChild(l),document.body.appendChild(c),void f.render((r=r&&{data:r,total:r.length,pageSize:r.length,skip:0},o={style:Object.assign({},e.props.style,{width:"1000px"})},r=Object.assign({},r,o),n&&0<n.length?(o=h.Children.toArray(e.props.children).filter(function(e){return e&&e.type&&"KendoReactGridColumn"!==e.type.displayName}),h.cloneElement(e,r,n.concat(o))):h.cloneElement(e,r)),l,function(){var e;s(((u=document.createElement("div")).className="k-grid-pdf-export-element",e=(0,g.exportElement)(l),u.appendChild(e),document.body.appendChild(u),e),a,i)});function i(){document.body.removeChild(c),document.body.removeChild(u),c=u=void 0,p&&p()}var s,a,p,c,l,u}}},363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1654690540,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"}},350:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.savePDF=void 0;var n=r(100),o=r(619),i=r(765);t.savePDF=function(e,t,r){new i.default(n.drawDOM,n.exportPDF,o.saveAs,e,t=void 0===t?{}:t).savePDF(r)}},153:function(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(t,"__esModule",{value:!0}),t.TreeListPDFExport=void 0,r(954)),a=r(697),p=r(567),c=r(350),l=r(556),r=(o=s.Component,i(u,o),u.prototype.render=function(){return null},u.prototype.save=function(e,t,r){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:(0,p.getPageMargin)(this.props)}),r,e,t||[])},u.prototype.getSavePDF=function(){return c.savePDF},u.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},u.propTypes={author:a.string,avoidLinks:a.oneOfType([a.bool,a.string]),forcePageBreak:a.string,keepTogether:a.string,creator:a.string,date:a.instanceOf(Date),imageResolution:a.number,fileName:a.string,forceProxy:a.bool,keywords:a.string,landscape:a.bool,margin:a.oneOfType([a.string,a.number,a.shape({left:a.oneOfType([a.number,a.string]),top:a.oneOfType([a.number,a.string]),right:a.oneOfType([a.number,a.string]),bottom:a.oneOfType([a.number,a.string])})]),pageTemplate:a.any,paperSize:a.any,repeatHeaders:a.bool,scale:a.number,proxyData:a.any,proxyURL:a.string,proxyTarget:a.string,producer:a.string,subject:a.string,title:a.string,allPages:a.bool},u);function u(e){e=o.call(this,e)||this;return e.saveTreeListPDF=(0,l.provideSaveTreeListPDF)(e.getSavePDF()),e}t.TreeListPDFExport=r},687:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exportElement=void 0;var i=r(175),s=r(669);t.exportElement=function(e){var t,r,e=new i.GridQuery(e),n=e.content(),o=e.header();return 1<o.childNodes.length&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach(function(e){return e.style.top=0}),n?(t=[n.querySelector("colgroup")],o=[o],n=[n.querySelector("tbody")],r=(r=e.footer())?[r.querySelector("tfoot")]:[],(0,s.createTable)(t,o,n,r)):(0,s.wrapTable)(e.table().cloneNode(!0))}},556:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.provideSaveTreeListPDF=void 0;var f=r(493),h=r(954),g=r(687);t.provideSaveTreeListPDF=function(d){return function(e,t,r,n,o){return s=d,e=e,p=r,r=n,n=o,void 0===(a=t=void 0===t?{}:t)&&(a={}),(c=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),c.appendChild(l),document.body.appendChild(c),void f.render((r=a.allPages&&r?{data:r,take:Number.MAX_VALUE,skip:0}:{},o={style:Object.assign({},e.props.style,{width:"1000px"})},r=Object.assign({},r,o),n&&0<n.length?h.cloneElement(e,Object.assign({},r,{columns:n})):h.cloneElement(e,r)),l,function(){var e;s(((u=document.createElement("div")).className="k-treelist-pdf-export-element",e=(0,g.exportElement)(l),u.appendChild(e),document.body.appendChild(u),u),a,i)});function i(){document.body.removeChild(c),document.body.removeChild(u),c=u=void 0,p&&p()}var s,a,p,c,l,u}}},703:(e,t,r)=>{var s=r(414);function n(){}function o(){}o.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,o,i){if(i!==s)throw(i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",i}function t(){return e}var r={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return r.PropTypes=r}},697:(e,t,r)=>{e.exports=r(703)()},414:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},100:e=>{e.exports=d},619:e=>{e.exports=f},527:e=>{e.exports=h},954:e=>{e.exports=g},493:e=>{e.exports=m},274:e=>{e.exports=y}},o={},e=l={},Object.defineProperty(e,"__esModule",{value:!0}),e.TreeListPDFExport=e.GridPDFExport=e.getPageMargin=e.savePDF=e.PDFMargin=e.PDFExport=void 0,t=r(981),Object.defineProperty(e,"PDFExport",{enumerable:!0,get:function(){return t.PDFExport}}),i=r(398),Object.defineProperty(e,"PDFMargin",{enumerable:!0,get:function(){return i.PDFMargin}}),s=r(350),Object.defineProperty(e,"savePDF",{enumerable:!0,get:function(){return s.savePDF}}),a=r(567),Object.defineProperty(e,"getPageMargin",{enumerable:!0,get:function(){return a.getPageMargin}}),p=r(617),Object.defineProperty(e,"GridPDFExport",{enumerable:!0,get:function(){return p.GridPDFExport}}),c=r(153),Object.defineProperty(e,"TreeListPDFExport",{enumerable:!0,get:function(){return c.TreeListPDFExport}}),l))}}});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-pdf",
|
|
3
3
|
"description": "KendoReact PDF Processing package",
|
|
4
|
-
"version": "5.4.0-dev.
|
|
4
|
+
"version": "5.4.0-dev.202206081230",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-react.git"
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@progress/kendo-date-math": "^1.4.1",
|
|
43
43
|
"@progress/kendo-drawing": "^1.8.0",
|
|
44
44
|
"@progress/kendo-licensing": "^1.0.1",
|
|
45
|
-
"@progress/kendo-react-charts": "5.4.0-dev.
|
|
46
|
-
"@progress/kendo-react-grid": "5.4.0-dev.
|
|
45
|
+
"@progress/kendo-react-charts": "5.4.0-dev.202206081230",
|
|
46
|
+
"@progress/kendo-react-grid": "5.4.0-dev.202206081230",
|
|
47
47
|
"prop-types": "^15.6.0"
|
|
48
48
|
},
|
|
49
49
|
"@progress": {
|