@progress/kendo-react-excel-export 7.0.3-develop.9 → 7.1.0-develop.2
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-excel.js +1 -1
- package/index.d.ts +2 -2
- package/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
(function(n,p){typeof exports=="object"&&typeof module
|
|
5
|
+
(function(n,p){typeof exports=="object"&&typeof module!="undefined"?p(exports,require("react"),require("prop-types"),require("@progress/kendo-file-saver"),require("@progress/kendo-ooxml"),require("react-dom/server"),require("@progress/kendo-react-common")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-file-saver","@progress/kendo-ooxml","react-dom/server","@progress/kendo-react-common"],p):(n=typeof globalThis!="undefined"?globalThis:n||self,p(n.KendoReactExcel={},n.React,n.PropTypes,n.KendoFileSaver,n.KendoOoxml,n.ReactDOMServer,n.KendoReactCommon))})(this,function(n,p,r,k,h,w,v){"use strict";"use client";function u(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const l=u(p),R=u(h),F=u(w),f=(t,e,o)=>s=>{o(e,s);const d=F.renderToStaticMarkup(l.createElement(t,{...e})),a=Number(d);return isNaN(a)?d:a},D=(t,e)=>{t.$implicit=t.group=e,t.field=e.field,t.value=e.value,t.aggregates=e.aggregates},U=(t,e)=>{t.group=e.group,t.$implicit=t.aggregates=e},L=(t,e)=>{},N=t=>{const e=[];let o=0;const i=(s,d,a)=>{s.forEach(c=>{if(c.level===a){const E=new _(c,o);if(d.push(E),c.children&&c.children.length>1){const M=E.columns=[];i(c.children,M,a+1)}else o++}})};return i(t,e,0),e};class _{constructor(e,o){this.columns=null,this.title=e.title,this.field=e.field,this.hidden=e.hidden,this.locked=e.locked,this.width=e.width,this.headerCellOptions=e.headerCellOptions,this.cellOptions=e.cellOptions,this.groupHeaderCellOptions=e.groupHeaderCellOptions,this.groupFooterCellOptions=e.groupFooterCellOptions,this.footerCellOptions=e.footerCellOptions,e.footer&&(this.footerTemplate=f(e.footer,{$implicit:e,column:e,columnIndex:o},L)),e.groupFooter&&(this.groupFooterTemplate=f(e.groupFooter,{column:e,field:e.field},U)),e.groupHeader&&(this.groupHeaderTemplate=f(e.groupHeader,{},D))}}const H=t=>Math.max(...t.map(e=>e.level))+1,m=t=>{const e=N(t.columns),i=new h.ExcelExporter({columns:e,data:t.data,filterable:t.filterable,groups:t.group,paddingCellOptions:t.paddingCellOptions,headerPaddingCellOptions:t.headerPaddingCellOptions,hierarchy:t.hierarchy?{depth:H(t.data),itemLevel:s=>s.level}:null,collapsible:t.collapsible}).workbook();return i.creator=t.creator,i.date=t.date,i.rtl=t.dir==="rtl",i},C=t=>new h.Workbook(t).toDataURL(),O=t=>t&&t.sheets,y={name:"@progress/kendo-react-excel-export",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};class g extends l.Component{constructor(e){super(e),this.saveFile=o=>{k.saveAs(o,this.props.fileName,{forceProxy:this.props.forceProxy,proxyURL:this.props.proxyURL})},this.extractColumns=(o,i=0)=>Array.isArray(o)?o.map(s=>this.extractChild(s,i)):[o,this.extractChild(o,i)],this.extractChild=(o,i=0)=>l.isValidElement(o)?{...o.props,width:o.props.width&&parseInt(`${o.props.width}`,10),level:i,children:o.props.children&&this.extractColumns(o.props.children,i+1)}:{...o,level:i,children:o.children&&this.extractColumns(o.children,i+1)},this.getExportData=o=>{let i;return o?Array.isArray(o)?i={data:o}:i=o:i={data:this.props.data,group:this.props.group},i},v.validatePackage(y),this.save=this.save.bind(this),this.toDataURL=this.toDataURL.bind(this),this.workbookOptions=this.workbookOptions.bind(this)}save(e,o){this.toDataURL(e,o).then((...i)=>{this.props.onExportComplete&&this.props.onExportComplete.call(void 0,{target:this}),this.saveFile(...i)})}toDataURL(e,o){const i=O(e)?e:this.workbookOptions(e,o);return C(i)}workbookOptions(e,o){const i=this.getExportData(e),s=this.props.children,d=s&&s.type&&s.type.displayName==="KendoReactGrid"&&s.props&&l.Children.toArray(s.props.children),a=this.extractColumns(d||o||this.props.columns||l.Children.toArray(s));return m({columns:a,data:i.data,group:i.group,filterable:this.props.filterable,creator:this.props.creator,date:this.props.date,dir:this.props.dir,hierarchy:this.props.hierarchy,paddingCellOptions:this.props.paddingCellOptions,headerPaddingCellOptions:this.props.headerPaddingCellOptions,collapsible:this.props.collapsible})}render(){return this.props.children||null}}g.propTypes={children:r.any,columns:r.arrayOf(r.any),creator:r.string,data:r.any,date:r.any,filterable:r.bool,fileName:r.string,forceProxy:r.bool,group:r.any,headerPaddingCellOptions:r.any,paddingCellOptions:r.any,proxyURL:r.string,dir:r.string,hierarchy:r.bool,collapsible:r.bool},g.defaultProps={fileName:"Export.xlsx",forceProxy:!1,collapsible:!1};const x=t=>null;x.propTypes={cellOptions:r.any,field:r.string,footerCellOptions:r.any,footer:r.oneOfType([r.func,r.element]),groupFooterCellOptions:r.any,groupFooter:r.oneOfType([r.func,r.element]),groupHeaderCellOptions:r.any,groupHeader:r.oneOfType([r.func,r.element]),headerCellOptions:r.any,hidden:r.bool,level:r.number,locked:r.bool,title:r.string,width:r.number};const b=t=>null;b.propTypes={children:r.oneOfType([r.arrayOf(r.element),r.element]),headerCellOptions:r.any,hidden:r.bool,level:r.number,locked:r.bool,title:r.string,width:r.number};class G extends l.PureComponent{}class K extends l.PureComponent{}class A extends l.PureComponent{}n.KendoOoxml=R,n.ExcelExport=g,n.ExcelExportColumn=x,n.ExcelExportColumnGroup=b,n.ExcelExportFooter=G,n.ExcelExportGroupFooter=K,n.ExcelExportGroupHeader=A,n.isWorkbookOptions=O,n.toDataURL=C,n.workbookOptions=m,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ExcelExport, type ExcelExportProps } from './ExcelExport';
|
|
5
|
+
import { ExcelExport, type ExcelExportProps, type ExcelExportExportEvent } from './ExcelExport';
|
|
6
6
|
import type { ExcelExportData } from './ExcelExportData';
|
|
7
7
|
import { ExcelExportColumn, type ExcelExportColumnProps } from './ExcelExportColumn';
|
|
8
8
|
import { ExcelExportColumnGroup, type ExcelExportColumnGroupProps } from './ExcelExportColumnGroup';
|
|
@@ -11,5 +11,5 @@ import { ExcelExportFooter, type ExcelExportFooterProps } from './templates/Exce
|
|
|
11
11
|
import { ExcelExportGroupFooter, type ExcelExportGroupFooterProps } from './templates/ExcelExportGroupFooter';
|
|
12
12
|
import { ExcelExportGroupHeader, type ExcelExportGroupHeaderProps } from './templates/ExcelExportGroupHeader';
|
|
13
13
|
import * as KendoOoxml from '@progress/kendo-ooxml';
|
|
14
|
-
export { ExcelExport, ExcelExportData, ExcelExportProps, ExcelExportColumnGroup, ExcelExportColumnGroupProps, ExcelExportFooter, ExcelExportFooterProps, ExcelExportColumn, ExcelExportColumnProps, ColumnBase, ExcelExportGroupFooter, ExcelExportGroupFooterProps, ExcelExportGroupHeader, ExcelExportGroupHeaderProps, KendoOoxml };
|
|
14
|
+
export { ExcelExport, ExcelExportData, ExcelExportProps, ExcelExportExportEvent, ExcelExportColumnGroup, ExcelExportColumnGroupProps, ExcelExportFooter, ExcelExportFooterProps, ExcelExportColumn, ExcelExportColumnProps, ColumnBase, ExcelExportGroupFooter, ExcelExportGroupFooterProps, ExcelExportGroupHeader, ExcelExportGroupHeaderProps, KendoOoxml };
|
|
15
15
|
export * from './ooxml/workbook';
|
package/index.mjs
CHANGED
|
@@ -64,7 +64,7 @@ const w = (r) => Math.max(...r.map((e) => e.level)) + 1, P = (r) => {
|
|
|
64
64
|
name: "@progress/kendo-react-excel-export",
|
|
65
65
|
productName: "KendoReact",
|
|
66
66
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
67
|
-
publishDate:
|
|
67
|
+
publishDate: 1705399045,
|
|
68
68
|
version: "",
|
|
69
69
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
70
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-excel-export",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0-develop.2",
|
|
4
4
|
"description": "React Excel export helps you export and save data to Excel files and customize or filter the output. KendoReact Excel Export package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
26
|
"@progress/kendo-data-query": "^1.0.0",
|
|
27
|
-
"@progress/kendo-react-common": "7.0
|
|
27
|
+
"@progress/kendo-react-common": "7.1.0-develop.2",
|
|
28
28
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
29
29
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
30
30
|
},
|