@progress/kendo-react-excel-export 13.3.0 → 13.4.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/ColumnBase.d.ts +45 -0
- package/ExcelExport.d.ts +174 -0
- package/ExcelExportColumn.d.ts +57 -0
- package/ExcelExportColumnGroup.d.ts +18 -0
- package/ExcelExportData.d.ts +20 -0
- package/dist/cdn/js/kendo-react-excel.js +1 -1
- package/index.d.mts +12 -453
- package/index.d.ts +12 -453
- package/ooxml/CellOptionsInterface.d.ts +83 -0
- package/ooxml/ExporterColumns.d.ts +33 -0
- package/ooxml/workbook.d.ts +21 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +3 -3
- package/templates/ExcelExportFooter.d.ts +27 -0
- package/templates/ExcelExportGroupFooter.d.ts +36 -0
- package/templates/ExcelExportGroupHeader.d.ts +35 -0
package/ColumnBase.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CellOptions } from './ooxml/CellOptionsInterface.js';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface ColumnBase {
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
children?: any;
|
|
17
|
+
/**
|
|
18
|
+
* The options of the column header cell.
|
|
19
|
+
*/
|
|
20
|
+
headerCellOptions?: CellOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the visibility of the column.
|
|
23
|
+
*
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
level?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Toggles the locked (frozen) state of the column.
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
locked?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The title of the column.
|
|
39
|
+
*/
|
|
40
|
+
title?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The width of the column in pixels.
|
|
43
|
+
*/
|
|
44
|
+
width?: number;
|
|
45
|
+
}
|
package/ExcelExport.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { default as PropTypes } from 'prop-types';
|
|
9
|
+
import { WorkbookOptions } from '@progress/kendo-ooxml';
|
|
10
|
+
import { CellOptions } from './ooxml/CellOptionsInterface.js';
|
|
11
|
+
import { ExcelExportData } from './ExcelExportData.js';
|
|
12
|
+
import { ExcelExportColumnProps } from './ExcelExportColumn.js';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the props of the KendoReact ExcelExport component.
|
|
16
|
+
*/
|
|
17
|
+
export interface ExcelExportProps {
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
children?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Pass the columns through the component props. If you provide both the `columns` prop and the child column components, the component uses the columns from props.
|
|
24
|
+
*/
|
|
25
|
+
columns?: ExcelExportColumnProps[];
|
|
26
|
+
/**
|
|
27
|
+
* The creator of the workbook.
|
|
28
|
+
*/
|
|
29
|
+
creator?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The exported data. If grouped, structure the data as described by the [`GroupResult`](https://www.telerik.com/kendo-react-ui/components/datatools/api/groupresult) option of the KendoReact Data Query component.
|
|
32
|
+
*/
|
|
33
|
+
data?: any[];
|
|
34
|
+
/**
|
|
35
|
+
* The date on which the workbook is created.
|
|
36
|
+
*
|
|
37
|
+
* @default new Date()
|
|
38
|
+
*/
|
|
39
|
+
date?: Date;
|
|
40
|
+
/**
|
|
41
|
+
* Enables or disables the column filtering in the Excel file.
|
|
42
|
+
*/
|
|
43
|
+
filterable?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Specifies the name of the file that is exported to Excel.
|
|
46
|
+
*
|
|
47
|
+
* @default "Export.xlsx"
|
|
48
|
+
*/
|
|
49
|
+
fileName?: string;
|
|
50
|
+
/**
|
|
51
|
+
* If set to `true`, the content is forwarded to `proxyURL` even if the browser supports saving files locally.
|
|
52
|
+
*
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
forceProxy?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The exported data groups. The groups must be compatible with the [`GroupDescriptor`](https://www.telerik.com/kendo-react-ui/components/datatools/api/groupdescriptor) option of the KendoReact Data Query component.
|
|
58
|
+
*/
|
|
59
|
+
group?: any[];
|
|
60
|
+
/**
|
|
61
|
+
* The options of the cells that are inserted before the header cells to align the headers and the column values (when the data is grouped).
|
|
62
|
+
*/
|
|
63
|
+
headerPaddingCellOptions?: CellOptions;
|
|
64
|
+
/**
|
|
65
|
+
* The options of the cells that are inserted before the data, group, and footer cells to indicate the group hierarchy (when the data is grouped).
|
|
66
|
+
*/
|
|
67
|
+
paddingCellOptions?: CellOptions;
|
|
68
|
+
/**
|
|
69
|
+
* The URL of the server-side proxy which streams the file to the end user. When the browser cannot save files locally—for example, Internet Explorer 9 and earlier, and Safari—a proxy is used. You must implement the server-side proxy.
|
|
70
|
+
*
|
|
71
|
+
* The proxy receives a `POST` request with the following parameters in the request body:
|
|
72
|
+
* - `contentType`—The MIME type of the file.
|
|
73
|
+
* - `base64`—The base-64 encoded file content.
|
|
74
|
+
* - `fileName`—The file name, as requested by the caller. The proxy is expected to return the decoded file with the **Content-Disposition** header set to `attachment; filename="<fileName.xslx>"`.
|
|
75
|
+
*/
|
|
76
|
+
proxyURL?: string;
|
|
77
|
+
/**
|
|
78
|
+
* If set to `rtl`, the Excel file is rendered in the right-to-left mode.
|
|
79
|
+
*/
|
|
80
|
+
dir?: string;
|
|
81
|
+
/**
|
|
82
|
+
* If set to `true`, the data is exported as a tree based on the `level` property of each data record.
|
|
83
|
+
*/
|
|
84
|
+
hierarchy?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Enables or disables collapsible (grouped) rows in the exported file.
|
|
87
|
+
*
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
collapsible?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Triggered after the export is complete.
|
|
93
|
+
*/
|
|
94
|
+
onExportComplete?: (event: ExcelExportExportEvent) => void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Represents the return type of ExcelExportExportEvent.
|
|
98
|
+
*/
|
|
99
|
+
export type ExcelExportExportEvent = {
|
|
100
|
+
/**
|
|
101
|
+
* The target of the ExcelExportExportEvent from ExcelExport.
|
|
102
|
+
*/
|
|
103
|
+
target: ExcelExport;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Represents the KendoReact ExcelExport component.
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* Supported children components are: {@link ExcelExportColumn}.
|
|
110
|
+
*/
|
|
111
|
+
export declare class ExcelExport extends React.Component<ExcelExportProps> {
|
|
112
|
+
/**
|
|
113
|
+
* @hidden
|
|
114
|
+
*/
|
|
115
|
+
static propTypes: {
|
|
116
|
+
children: PropTypes.Requireable<any>;
|
|
117
|
+
columns: PropTypes.Requireable<any[]>;
|
|
118
|
+
creator: PropTypes.Requireable<string>;
|
|
119
|
+
data: PropTypes.Requireable<any>;
|
|
120
|
+
date: PropTypes.Requireable<any>;
|
|
121
|
+
filterable: PropTypes.Requireable<boolean>;
|
|
122
|
+
fileName: PropTypes.Requireable<string>;
|
|
123
|
+
forceProxy: PropTypes.Requireable<boolean>;
|
|
124
|
+
group: PropTypes.Requireable<any>;
|
|
125
|
+
headerPaddingCellOptions: PropTypes.Requireable<any>;
|
|
126
|
+
paddingCellOptions: PropTypes.Requireable<any>;
|
|
127
|
+
proxyURL: PropTypes.Requireable<string>;
|
|
128
|
+
dir: PropTypes.Requireable<string>;
|
|
129
|
+
hierarchy: PropTypes.Requireable<boolean>;
|
|
130
|
+
collapsible: PropTypes.Requireable<boolean>;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* @hidden
|
|
134
|
+
*/
|
|
135
|
+
static defaultProps: {
|
|
136
|
+
fileName: string;
|
|
137
|
+
forceProxy: boolean;
|
|
138
|
+
collapsible: boolean;
|
|
139
|
+
};
|
|
140
|
+
private readonly showLicenseWatermark;
|
|
141
|
+
private readonly licenseMessage?;
|
|
142
|
+
constructor(props: ExcelExportProps);
|
|
143
|
+
/**
|
|
144
|
+
* Saves the data to Excel.
|
|
145
|
+
*
|
|
146
|
+
* @param exportData - An optional parameter. Can be the data that will be exported or the [`WorkbookOptions`](https://www.telerik.com/kendo-react-ui/components/excel/api/kendoooxml#toc-workbookoptions).
|
|
147
|
+
* @param columns - An optional parameter. If present, it will be used instead of the columns prop or the child column components.
|
|
148
|
+
*/
|
|
149
|
+
save(exportData?: any[] | ExcelExportData | WorkbookOptions, columns?: ExcelExportColumnProps[] | React.ReactElement<ExcelExportColumnProps>[]): void;
|
|
150
|
+
/**
|
|
151
|
+
* Returns a promise which will be resolved with the file data URI.
|
|
152
|
+
*
|
|
153
|
+
* @param exportData - The optional data or the [`WorkbookOptions`](https://www.telerik.com/kendo-react-ui/components/excel/api/kendoooxml#toc-workbookoptions) that will be used to generate the data URI.
|
|
154
|
+
* @param externalColumns - The optional columns that will be used.
|
|
155
|
+
* @returns {Promise<string>} - The promise that will be resolved by the file data URI.
|
|
156
|
+
*/
|
|
157
|
+
toDataURL(exportData?: any[] | ExcelExportData | WorkbookOptions, columns?: any[]): Promise<string>;
|
|
158
|
+
/**
|
|
159
|
+
* Based on the specified columns and data, returns [`WorkbookOptions`](https://www.telerik.com/kendo-react-ui/components/excel/api/kendoooxml#toc-workbookoptions).
|
|
160
|
+
*
|
|
161
|
+
* @param exportData - The optional data that will be exported.
|
|
162
|
+
* @param externalColumns - The optional columns that will be used.
|
|
163
|
+
* @returns {WorkbookOptions} - The workbook options.
|
|
164
|
+
*/
|
|
165
|
+
workbookOptions(exportData?: any[] | ExcelExportData, externalColumns?: ExcelExportColumnProps[] | React.ReactElement<ExcelExportColumnProps>[]): WorkbookOptions;
|
|
166
|
+
/**
|
|
167
|
+
* @hidden
|
|
168
|
+
*/
|
|
169
|
+
render(): React.JSX.Element;
|
|
170
|
+
protected saveFile: (dataURL: string) => void;
|
|
171
|
+
private extractColumns;
|
|
172
|
+
private extractChild;
|
|
173
|
+
private getExportData;
|
|
174
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ColumnBase } from './ColumnBase.js';
|
|
9
|
+
import { CellOptions } from './ooxml/CellOptionsInterface.js';
|
|
10
|
+
import { ExcelExportGroupHeader } from './templates/ExcelExportGroupHeader.js';
|
|
11
|
+
import { ExcelExportGroupFooter } from './templates/ExcelExportGroupFooter.js';
|
|
12
|
+
import { ExcelExportFooter } from './templates/ExcelExportFooter.js';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
/**
|
|
15
|
+
* Represents the props of the KendoReact ExcelExportColumnProps component.
|
|
16
|
+
*/
|
|
17
|
+
export interface ExcelExportColumnProps extends ColumnBase {
|
|
18
|
+
/**
|
|
19
|
+
* The options of the column data cells.
|
|
20
|
+
*/
|
|
21
|
+
cellOptions?: CellOptions;
|
|
22
|
+
/**
|
|
23
|
+
* The field to which the column is bound.
|
|
24
|
+
*/
|
|
25
|
+
field?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The options of the column footer cell.
|
|
28
|
+
*/
|
|
29
|
+
footerCellOptions?: CellOptions;
|
|
30
|
+
/**
|
|
31
|
+
* The column footer. Can be a function or a React component.
|
|
32
|
+
*/
|
|
33
|
+
footer?: Function | ExcelExportFooter;
|
|
34
|
+
/**
|
|
35
|
+
* The options of the column group footer cells.
|
|
36
|
+
*/
|
|
37
|
+
groupFooterCellOptions?: CellOptions;
|
|
38
|
+
/**
|
|
39
|
+
* The footer of the group. Can be a function or a React component.
|
|
40
|
+
*/
|
|
41
|
+
groupFooter?: Function | ExcelExportGroupFooter;
|
|
42
|
+
/**
|
|
43
|
+
* The options of the column group header cells.
|
|
44
|
+
*/
|
|
45
|
+
groupHeaderCellOptions?: CellOptions;
|
|
46
|
+
/**
|
|
47
|
+
* The header of the group. Can be a function or a React component.
|
|
48
|
+
*/
|
|
49
|
+
groupHeader?: Function | ExcelExportGroupHeader;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Represents the columns of the KendoReact ExcelExport component.
|
|
53
|
+
*
|
|
54
|
+
* @returns null
|
|
55
|
+
*/
|
|
56
|
+
declare const ExcelExportColumn: React.FunctionComponent<ExcelExportColumnProps>;
|
|
57
|
+
export { ExcelExportColumn };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ColumnBase } from './ColumnBase.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
export interface ExcelExportColumnGroupProps extends ColumnBase {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Represents the column group component of the KendoReact ExcelExport component.
|
|
14
|
+
*
|
|
15
|
+
* @returns null
|
|
16
|
+
*/
|
|
17
|
+
declare const ExcelExportColumnGroup: React.FunctionComponent<ExcelExportColumnGroupProps>;
|
|
18
|
+
export { ExcelExportColumnGroup };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The type that is expected for the ExcelExportComponent `data`.
|
|
10
|
+
*/
|
|
11
|
+
export interface ExcelExportData {
|
|
12
|
+
/**
|
|
13
|
+
* The exported data. If grouped, structure the data as described in the [`GroupResult`](https://www.telerik.com/kendo-react-ui/components/datatools/api/groupresult) of the KendoReact Data Query component.
|
|
14
|
+
*/
|
|
15
|
+
data?: any[];
|
|
16
|
+
/**
|
|
17
|
+
* The exported data groups. The groups must be compatible with the [`GroupDescriptor`](https://www.telerik.com/kendo-react-ui/components/datatools/api/groupdescriptor) of the KendoReact Data Query component.
|
|
18
|
+
*/
|
|
19
|
+
group?: any[];
|
|
20
|
+
}
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-file-saver"),require("@progress/kendo-ooxml"),require("react-dom/server"),require("@progress/kendo-react-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-file-saver","@progress/kendo-ooxml","react-dom/server","@progress/kendo-react-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactExcel={},e.React,e.PropTypes,e.KendoFileSaver,e.KendoOoxml,e.ReactDOMServer,e.KendoReactCommon)}(this,
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-file-saver"),require("@progress/kendo-ooxml"),require("react-dom/server"),require("@progress/kendo-react-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-file-saver","@progress/kendo-ooxml","react-dom/server","@progress/kendo-react-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactExcel={},e.React,e.PropTypes,e.KendoFileSaver,e.KendoOoxml,e.ReactDOMServer,e.KendoReactCommon)}(this,function(e,t,o,r,s,l,i){"use strict";function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}var a=n(t),p=n(s),d=n(l);const c=(e,t,o)=>r=>{o(t,r);const s=d.renderToStaticMarkup(a.createElement(e,{...t})),l=Number(s);return isNaN(l)?s:l},h=(e,t)=>{e.$implicit=e.group=t,e.field=t.field,e.value=t.value,e.aggregates=t.aggregates},u=(e,t)=>{e.group=t.group,e.$implicit=e.aggregates=t},m=(e,t)=>{};class g{constructor(e,t){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=c(e.footer,{$implicit:e,column:e,columnIndex:t},m)),e.groupFooter&&(this.groupFooterTemplate=c(e.groupFooter,{column:e,field:e.field},u)),e.groupHeader&&(this.groupHeaderTemplate=c(e.groupHeader,{},h))}}const f=e=>Math.max(...e.map(e=>e.level))+1,y=e=>{const t=(e=>{const t=[];let o=0;const r=(e,t,s)=>{e.forEach(e=>{if(e.level===s){const l=new g(e,o);if(t.push(l),e.children&&e.children.length>1){const t=l.columns=[];r(e.children,t,s+1)}else o++}})};return r(e,t,0),t})(e.columns),o=new s.ExcelExporter({columns:t,data:e.data,filterable:e.filterable,groups:e.group,paddingCellOptions:e.paddingCellOptions,headerPaddingCellOptions:e.headerPaddingCellOptions,hierarchy:e.hierarchy?{depth:f(e.data),itemLevel:e=>e.level}:null,collapsible:e.collapsible}).workbook();return o.creator=e.creator,o.date=e.date,o.rtl="rtl"===e.dir,o},x=e=>new s.Workbook(e).toDataURL(),O=e=>e&&e.sheets,b=Object.freeze({name:"@progress/kendo-react-excel-export",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.4.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C=class extends a.Component{constructor(e){super(e),this.showLicenseWatermark=!1,this.saveFile=e=>{r.saveAs(e,this.props.fileName,{forceProxy:this.props.forceProxy,proxyURL:this.props.proxyURL})},this.extractColumns=(e,t=0)=>Array.isArray(e)?e.map(e=>this.extractChild(e,t)):[e,this.extractChild(e,t)],this.extractChild=(e,t=0)=>a.isValidElement(e)?{...e.props,width:e.props.width&&parseInt(`${e.props.width}`,10),level:t,children:e.props.children&&this.extractColumns(e.props.children,t+1)}:{...e,level:t,children:e.children&&this.extractColumns(e.children,t+1)},this.getExportData=e=>{let t;return t=e?Array.isArray(e)?{data:e}:e:{data:this.props.data,group:this.props.group},t},this.showLicenseWatermark=!i.validatePackage(b,{component:"ExcelExport"}),this.licenseMessage=i.getLicenseMessage(b),this.save=this.save.bind(this),this.toDataURL=this.toDataURL.bind(this),this.workbookOptions=this.workbookOptions.bind(this)}save(e,t){this.toDataURL(e,t).then((...e)=>{this.props.onExportComplete&&this.props.onExportComplete.call(void 0,{target:this}),this.saveFile(...e)})}toDataURL(e,t){const o=O(e)?e:this.workbookOptions(e,t);return x(o)}workbookOptions(e,t){const o=this.getExportData(e),r=this.props.children,s=r&&r.type&&"KendoReactGrid"===r.type.displayName&&r.props&&a.Children.toArray(r.props.children),l=this.extractColumns(s||t||this.props.columns||a.Children.toArray(r));return y({columns:l,data:o.data,group:o.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 a.createElement(a.Fragment,null,this.props.children||null,this.showLicenseWatermark&&a.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}};C.propTypes={children:o.any,columns:o.arrayOf(o.any),creator:o.string,data:o.any,date:o.any,filterable:o.bool,fileName:o.string,forceProxy:o.bool,group:o.any,headerPaddingCellOptions:o.any,paddingCellOptions:o.any,proxyURL:o.string,dir:o.string,hierarchy:o.bool,collapsible:o.bool},C.defaultProps={fileName:"Export.xlsx",forceProxy:!1,collapsible:!1};let k=C;const E=e=>null;E.propTypes={cellOptions:o.any,field:o.string,footerCellOptions:o.any,footer:o.oneOfType([o.func,o.element]),groupFooterCellOptions:o.any,groupFooter:o.oneOfType([o.func,o.element]),groupHeaderCellOptions:o.any,groupHeader:o.oneOfType([o.func,o.element]),headerCellOptions:o.any,hidden:o.bool,level:o.number,locked:o.bool,title:o.string,width:o.number};const v=e=>null;v.propTypes={children:o.oneOfType([o.arrayOf(o.element),o.element]),headerCellOptions:o.any,hidden:o.bool,level:o.number,locked:o.bool,title:o.string,width:o.number};class w extends a.PureComponent{}let R=class extends a.PureComponent{};class P extends a.PureComponent{}e.KendoOoxml=p,e.ExcelExport=k,e.ExcelExportColumn=E,e.ExcelExportColumnGroup=v,e.ExcelExportFooter=w,e.ExcelExportGroupFooter=R,e.ExcelExportGroupHeader=P,e.isWorkbookOptions=O,e.toDataURL=x,e.workbookOptions=y});
|