@progress/kendo-react-pdf 13.3.0 → 13.4.0-develop.1

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.
@@ -0,0 +1,27 @@
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 { DrawOptions, Group } from '@progress/kendo-drawing';
9
+ import { PDFOptions } from '@progress/kendo-drawing/pdf';
10
+ import { SaveOptions } from '@progress/kendo-file-saver';
11
+ import { PDFExportProps } from './PDFExportProps.js';
12
+ /**
13
+ * @hidden
14
+ */
15
+ export default class KendoDrawingAdapter {
16
+ private drawDOM;
17
+ private exportPDF;
18
+ private saveAs;
19
+ private domElement;
20
+ private options;
21
+ constructor(drawDOM: (element: HTMLElement, options: DrawOptions) => Promise<Group>, exportPDF: (group: Group, options: PDFOptions) => Promise<string>, saveAs: (dataUri: string, fileName: string, options: SaveOptions) => void, domElement: HTMLElement, options?: PDFExportProps);
22
+ savePDF(callback?: () => void): void;
23
+ private getDrawOptions;
24
+ private getPDFOptions;
25
+ private getSaveOptions;
26
+ private convertPageTemplateToHtml;
27
+ }
package/PDFExport.d.ts ADDED
@@ -0,0 +1,62 @@
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 { PDFExportProps } from './PDFExportProps.js';
10
+ import * as React from 'react';
11
+ /**
12
+ * Represents the KendoReact PDFExport component.
13
+ */
14
+ export declare class PDFExport extends React.Component<PDFExportProps, {}> {
15
+ /**
16
+ * @hidden
17
+ */
18
+ static propTypes: {
19
+ author: PropTypes.Requireable<string>;
20
+ avoidLinks: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
21
+ forcePageBreak: PropTypes.Requireable<string>;
22
+ keepTogether: PropTypes.Requireable<string>;
23
+ creator: PropTypes.Requireable<string>;
24
+ date: PropTypes.Requireable<Date>;
25
+ imageResolution: PropTypes.Requireable<number>;
26
+ fileName: PropTypes.Requireable<string>;
27
+ forceProxy: PropTypes.Requireable<boolean>;
28
+ keywords: PropTypes.Requireable<string>;
29
+ landscape: PropTypes.Requireable<boolean>;
30
+ margin: PropTypes.Requireable<NonNullable<string | number | PropTypes.InferProps<{
31
+ left: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
32
+ top: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
33
+ right: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
34
+ bottom: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
35
+ }> | null | undefined>>;
36
+ pageTemplate: PropTypes.Requireable<any>;
37
+ paperSize: PropTypes.Requireable<any>;
38
+ repeatHeaders: PropTypes.Requireable<boolean>;
39
+ scale: PropTypes.Requireable<number>;
40
+ proxyData: PropTypes.Requireable<any>;
41
+ proxyURL: PropTypes.Requireable<string>;
42
+ proxyTarget: PropTypes.Requireable<string>;
43
+ producer: PropTypes.Requireable<string>;
44
+ subject: PropTypes.Requireable<string>;
45
+ title: PropTypes.Requireable<string>;
46
+ };
47
+ private rootElForPDF;
48
+ private readonly showLicenseWatermark;
49
+ private readonly licenseMessage?;
50
+ constructor(props: PDFExportProps);
51
+ /**
52
+ * @hidden
53
+ */
54
+ render(): React.JSX.Element;
55
+ /**
56
+ * Saves the content as a PDF file.
57
+ *
58
+ * @param callback - The callback to be executed after the PDF is saved.
59
+ */
60
+ save(callback?: () => void): void;
61
+ private getOptions;
62
+ }
@@ -0,0 +1,186 @@
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 { PaperSize, PageMargin } from '@progress/kendo-drawing/pdf';
9
+ /**
10
+ * Represents the props of the KendoReact PDFExport component.
11
+ */
12
+ export interface PDFExportProps {
13
+ /**
14
+ * @hidden
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * The author (metadata) of the PDF document.
19
+ *
20
+ * @example
21
+ * ```jsx
22
+ * <PDFExport author="John Doe" />
23
+ * ```
24
+ */
25
+ author?: string;
26
+ /**
27
+ * Sets whether to produce actual hyperlinks in the exported PDF file.
28
+ * It is also possible to set a CSS selector. All matching links will be ignored.
29
+ *
30
+ * @example
31
+ * ```jsx
32
+ * <PDFExport avoidLinks={true} />
33
+ * <PDFExport avoidLinks=".no-link" />
34
+ * ```
35
+ */
36
+ avoidLinks?: boolean | string;
37
+ /**
38
+ * Sets a CSS selector that determines the elements which cause the page breaks.
39
+ *
40
+ * @example
41
+ * ```jsx
42
+ * <PDFExport forcePageBreak=".page-break" />
43
+ * ```
44
+ */
45
+ forcePageBreak?: string;
46
+ /**
47
+ * Sets a CSS selector that determines the elements which should not be split across the pages.
48
+ *
49
+ * @example
50
+ * ```jsx
51
+ * <PDFExport keepTogether=".keep-together" />
52
+ * ```
53
+ */
54
+ keepTogether?: string;
55
+ /**
56
+ * Sets the creator of the PDF document.
57
+ *
58
+ * @default "KendoReact PDF Generator"
59
+ */
60
+ creator?: string;
61
+ /**
62
+ * Sets the date when the PDF document is created.
63
+ *
64
+ * @default new Date()
65
+ */
66
+ date?: Date;
67
+ /**
68
+ * The forced resolution of the images in the exported PDF document. By default, the images are exported at their full resolution.
69
+ */
70
+ imageResolution?: number;
71
+ /**
72
+ * Sets the name of the exported PDF file.
73
+ *
74
+ * @default "export.pdf"
75
+ *
76
+ * @example
77
+ * ```jsx
78
+ * <PDFExport fileName="custom-file.pdf" />
79
+ * ```
80
+ */
81
+ fileName?: string;
82
+ /**
83
+ * If set to `true`, the content is forwarded to `proxyURL` even if the browser supports local saving of files.
84
+ */
85
+ forceProxy?: boolean;
86
+ /**
87
+ * The keywords (metadata) of the PDF document.
88
+ */
89
+ keywords?: string;
90
+ /**
91
+ * Indicates if the page is in a landscape orientation. By default, the page is in a portrait orientation.
92
+ *
93
+ * @default false
94
+ */
95
+ landscape?: boolean;
96
+ /**
97
+ * Sets the margins of the page.
98
+ *
99
+ * The supported units are:
100
+ * * `"mm"`
101
+ * * `"cm"`
102
+ * * `"in"`
103
+ * * `"pt"` (default).
104
+ *
105
+ * > Numbers are considered to be points (`"pt"`).
106
+ */
107
+ margin?: string | number | PageMargin;
108
+ /**
109
+ * A React functional or class component which is used as a template that is inserted into each page of the PDF document. The number of the current page (`pageNum`) and the total number of pages (`totalPages`) are passed to the component as properties.
110
+ */
111
+ pageTemplate?: any;
112
+ /**
113
+ * Sets the paper size of the PDF document.
114
+ *
115
+ * If set, the content will be split across multiple pages. This enables the `repeatHeaders` and `scale` options, and allows you to specify a template.
116
+ *
117
+ * The supported values are:
118
+ * * A predefined size. The supported paper sizes are: `A0-A10`, `B0-B10`, `C0-C10`, `Executive`, `Folio`, `Legal`, `Letter`, `Tabloid`.
119
+ * * An array of two numbers which specify the width and height in points (1pt = 1/72in).
120
+ * * An array of two strings which specify the width and height in units. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`.
121
+ *
122
+ * @default "auto"
123
+ *
124
+ * @example
125
+ * ```jsx
126
+ * <PDFExport paperSize="A4" />
127
+ * ```
128
+ */
129
+ paperSize?: PaperSize;
130
+ /**
131
+ * Sets if the `<thead>` elements of the tables are repeated on each page.
132
+ *
133
+ * @example
134
+ * ```jsx
135
+ * <PDFExport repeatHeaders={true} />
136
+ * ```
137
+ */
138
+ repeatHeaders?: boolean;
139
+ /**
140
+ * Sets a scale factor for the PDF content.
141
+ *
142
+ * @default 1
143
+ *
144
+ * @example
145
+ * ```jsx
146
+ * <PDFExport scale={0.8} />
147
+ * ```
148
+ */
149
+ scale?: number;
150
+ /**
151
+ * Sets a key/value dictionary of form values for the proxy. You can use it to submit Anti-Forgery tokens and other metadata.
152
+ */
153
+ proxyData?: {
154
+ [key: string]: string;
155
+ };
156
+ /**
157
+ * The URL of the server-side proxy which streams the file to the end user. You need to use a proxy if the browser is not capable of saving files locally&mdash;for example, Internet Explorer 9 and Safari. It is your responsibility to implement the server-side proxy.
158
+ *
159
+ * In the request body, the proxy receives a `POST` request with the following parameters:
160
+ * - `"contentType"`&mdash;The MIME type of the file.
161
+ * - `"base64"`&mdash;The base-64 encoded file content.
162
+ * - `"fileName"`&mdash;The file name, as requested by the caller.
163
+ *
164
+ * The proxy returns the decoded file with the `"Content-Disposition"` header set to `attachment;
165
+ * filename="<fileName.pdf>"`.
166
+ */
167
+ proxyURL?: string;
168
+ /**
169
+ * Sets a name or keyword which indicates where to display the document that is returned from the proxy. To display the document in a new window or iframe, the proxy has to have the `"Content-Disposition"` header set to `inline; filename="<fileName.pdf>"`.
170
+ *
171
+ * @default "_self"
172
+ */
173
+ proxyTarget?: string;
174
+ /**
175
+ * The producer (metadata) of the PDF document.
176
+ */
177
+ producer?: string;
178
+ /**
179
+ * The subject (metadata) of the PDF document.
180
+ */
181
+ subject?: string;
182
+ /**
183
+ * The title (metadata) of the PDF document.
184
+ */
185
+ title?: string;
186
+ }
package/PDFMargin.d.ts ADDED
@@ -0,0 +1,74 @@
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 * as React from 'react';
10
+ /**
11
+ * Represents the props of the KendoReact PDFMargin component.
12
+ */
13
+ export interface PDFMarginProps {
14
+ /**
15
+ * The bottom margin.
16
+ *
17
+ * The supported units are:
18
+ * * `"mm"`
19
+ * * `"cm"`
20
+ * * `"in"`
21
+ * * `"pt"` (default).
22
+ *
23
+ * > Numbers are considered to be points (`"pt"`).
24
+ */
25
+ left?: number | string;
26
+ /**
27
+ * The top margin.
28
+ *
29
+ * The supported units are:
30
+ * * `"mm"`
31
+ * * `"cm"`
32
+ * * `"in"`
33
+ * * `"pt"` (default).
34
+ *
35
+ * > Numbers are considered to be points (`"pt"`).
36
+ */
37
+ top?: number | string;
38
+ /**
39
+ * The right margin.
40
+ *
41
+ * The supported units are:
42
+ * * `"mm"`
43
+ * * `"cm"`
44
+ * * `"in"`
45
+ * * `"pt"` (default).
46
+ *
47
+ * > Numbers are considered to be points (`"pt"`).
48
+ */
49
+ right?: number | string;
50
+ /**
51
+ * The bottom margin.
52
+ *
53
+ * The supported units are:
54
+ * * `"mm"`
55
+ * * `"cm"`
56
+ * * `"in"`
57
+ * * `"pt"` (default).
58
+ *
59
+ * > Numbers are considered to be points (`"pt"`).
60
+ */
61
+ bottom?: number | string;
62
+ }
63
+ /**
64
+ * @hidden
65
+ */
66
+ export declare class PDFMargin extends React.Component<PDFMarginProps, {}> {
67
+ static propTypes: {
68
+ left: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
69
+ top: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
70
+ right: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
71
+ bottom: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
72
+ };
73
+ render(): null;
74
+ }
@@ -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
+ * Represents the props of a page template component that can be added to the PDFExport component.
10
+ */
11
+ export interface PageTemplateProps {
12
+ /**
13
+ * The number of the current page.
14
+ */
15
+ pageNum: number;
16
+ /**
17
+ * The total number of pages.
18
+ */
19
+ totalPages: number;
20
+ }
@@ -0,0 +1,51 @@
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
+ * @hidden
10
+ */
11
+ export declare const hasClasses: (element: HTMLElement, classNames: string) => boolean;
12
+ /**
13
+ * @hidden
14
+ */
15
+ export declare const matchesClasses: (classNames: string) => (element: HTMLElement) => boolean;
16
+ /**
17
+ * @hidden
18
+ */
19
+ export declare const matchesNodeName: (nodeName: string) => any;
20
+ /**
21
+ * @hidden
22
+ */
23
+ export declare const closest: (node: any, predicate: any) => any;
24
+ /**
25
+ * @hidden
26
+ */
27
+ export declare const closestInScope: (node: any, predicate: any, scope: any) => any;
28
+ /**
29
+ * @hidden
30
+ */
31
+ export declare const contains: (parent: any, node: any, matchSelf?: boolean) => any;
32
+ /**
33
+ * @hidden
34
+ */
35
+ export declare const isVisible: (element: any) => boolean;
36
+ /**
37
+ * @hidden
38
+ */
39
+ export declare const isFocusable: (element: any, checkVisibility?: boolean) => boolean;
40
+ /**
41
+ * @hidden
42
+ */
43
+ export declare const findElement: (node: any, predicate: (element: any) => boolean, matchSelf?: boolean) => any;
44
+ /**
45
+ * @hidden
46
+ */
47
+ export declare const findFocusable: (element: any, checkVisibility?: boolean) => any;
48
+ /**
49
+ * @hidden
50
+ */
51
+ export declare const findFocusableChild: (element: any, checkVisibility?: boolean) => any;
@@ -0,0 +1,29 @@
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
+ * @hidden
10
+ */
11
+ export declare const HEADER_CLASS: string;
12
+ /**
13
+ * @hidden
14
+ */
15
+ export declare const FOOTER_CLASS: string;
16
+ /**
17
+ * @hidden
18
+ */
19
+ export declare class GridQuery {
20
+ private element;
21
+ private headerWrap;
22
+ private list;
23
+ private footerWrap;
24
+ constructor(element: HTMLElement);
25
+ content(): Element;
26
+ header(): Element;
27
+ footer(): Element;
28
+ table(): Node;
29
+ }
@@ -0,0 +1,27 @@
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
+ * @hidden
10
+ */
11
+ export declare const appendNodes: (element: any, nodes: any[]) => void;
12
+ /**
13
+ * @hidden
14
+ */
15
+ export declare const wrapTable: (table: any) => any;
16
+ /**
17
+ * @hidden
18
+ */
19
+ export declare const createTableElement: (sources: any) => any;
20
+ /**
21
+ * @hidden
22
+ */
23
+ export declare const setFirstCellClass: (header: any, headers: any) => void;
24
+ /**
25
+ * @hidden
26
+ */
27
+ export declare const createTable: (colGroups: any[], headers: any[], bodies: any[], footers: any[]) => any;
@@ -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-drawing"),require("@progress/kendo-file-saver"),require("react-dom/server"),require("@progress/kendo-react-common"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-drawing","@progress/kendo-file-saver","react-dom/server","@progress/kendo-react-common","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPdf={},e.React,e.PropTypes,e.KendoDrawing,e.KendoFileSaver,e.ReactDOMServer,e.KendoReactCommon,e.ReactDOM)}(this,(function(e,t,r,s,o,n,i,a){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=p(t),c=p(n);const h=class extends l.Component{render(){return null}};h.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])};let d=h;const g=["bottom","left","right","top"];function m(e){const t=l.Children.toArray(e.children).find((e=>e&&e.type===d));return t?function(e){const t={};for(let r=0;r<g.length;r++){const s=g[r],o=e.props[s];void 0!==o&&(t[s]=o)}return t}(t):e.margin}let u=class{constructor(e,t,r,s,o={}){this.drawDOM=e,this.exportPDF=t,this.saveAs=r,this.domElement=s,this.options=o,this.convertPageTemplateToHtml=e=>`<span>${c.renderToStaticMarkup(l.createElement(this.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}))}</span>`}savePDF(e){const t=this.drawDOM(this.domElement,this.getDrawOptions()).then((e=>this.exportPDF(e,this.getPDFOptions()))).then((e=>this.saveAs(e,this.options.fileName||"export.pdf",this.getSaveOptions())));e&&t.then(e,e)}getDrawOptions(){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}}getPDFOptions(){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}}getSaveOptions(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}}};const f=Object.freeze({name:"@progress/kendo-react-pdf",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.3.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),y=class extends l.Component{constructor(e){super(e),this.rootElForPDF=null,this.showLicenseWatermark=!1,this.showLicenseWatermark=!i.validatePackage(f,{component:"PDFExport"}),this.licenseMessage=i.getLicenseMessage(f)}render(){return l.createElement("div",{ref:e=>{this.rootElForPDF=e}},this.props.children,this.showLicenseWatermark&&l.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}save(e){new u(s.drawDOM,s.exportPDF,o.saveAs,this.rootElForPDF,this.getOptions()).savePDF(e)}getOptions(){return Object.assign({},this.props,{margin:m(this.props)})}};y.propTypes={author:r.string,avoidLinks:r.oneOfType([r.bool,r.string]),forcePageBreak:r.string,keepTogether:r.string,creator:r.string,date:r.instanceOf(Date),imageResolution:r.number,fileName:r.string,forceProxy:r.bool,keywords:r.string,landscape:r.bool,margin:r.oneOfType([r.string,r.number,r.shape({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])})]),pageTemplate:r.any,paperSize:r.any,repeatHeaders:r.bool,scale:r.number,proxyData:r.any,proxyURL:r.string,proxyTarget:r.string,producer:r.string,subject:r.string,title:r.string};let b=y;function k(e,t={},r){new u(s.drawDOM,s.exportPDF,o.saveAs,e,t).savePDF(r)}const w={},O=e=>String(e).trim().split(" "),T=e=>t=>((e,t)=>{const r=O(t);return!!O(e.className).find((e=>r.indexOf(e)>=0))})(t,e),v=e=>(w[e]||(w[e]=t=>String(t.nodeName).toLowerCase()===e.toLowerCase()),w[e]),P=(e,t,r=!0)=>{if(e){if(r&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){const r=P(e,t);if(r)return r}e=e.nextSibling}}},D="k-grid-header",x="k-grid-footer",E=v("TABLE"),L=e=>e?"locked":"wrap";class F{constructor(e){this.element=e,this.list=P(e,T("k-grid-container"))}content(e){return P(this.list,T("k-grid-content"+(e?"-locked":"")))}header(e){return this.headerWrap=this.headerWrap||P(this.element,T(D)),P(this.headerWrap,T(`${D}-${L(e)}`))}footer(e){return this.footerWrap=this.footerWrap||P(this.element,T(x)),P(this.footerWrap,T(`${x}-${L(e)}`))}table(){return P(this.element,E)}}const C="k-first",N=(e,t)=>{const r=t.length;for(let s=0;s<r;s++)e.appendChild(t[s].cloneNode(!0))},R=e=>{const t=document.createElement("div");return t.className="k-grid k-grid-md",t.appendChild(e),t},S=e=>{const t=e.length,r=e[0].cloneNode(!0),s=r.rows.length;if(t>1)for(let o=0;o<s;o++)for(let s=1;s<t;s++)N(r.rows[o],e[s].rows[o].cells);return r},W=(e,t,r,s)=>{const o=document.createElement("table"),n=e[0].cloneNode(!0);for(let t=1;t<e.length;t++)N(n,e[t].querySelectorAll("col"));const i=S(t),a=S(r);if(i.className="k-grid-header",((e,t)=>{if(t.length>1&&e.rows.length>1)for(let r=1;r<e.rows.length;r++){const s=t[0].rows[r].cells.length,o=e.rows[r].cells[s];-1===String(o.className).indexOf(C)&&(o.className+=` ${C}`)}})(i,t),o.appendChild(n),o.appendChild(i),o.appendChild(a),s.length){const e=S(s);e.className="k-grid-footer",o.appendChild(e)}return R(o)},j=e=>{const t=new F(e),r=t.content();let s;if(r){const e=[r.querySelector("colgroup")],o=[t.header().querySelector("thead")],n=[r.querySelector("tbody")],i=t.footer(),a=i?[i.querySelector("tfoot")]:[];s=W(e,o,n,a)}else s=R(t.table().cloneNode(!0));return s},M=A(k);function A(e){return(t,r={},s)=>function(e,t,r={},s){let o;function n(){e(a(),r,i)}function i(){document.body.removeChild(o),o=void 0,s&&s()}function a(){o=document.createElement("div"),o.className="k-grid-pdf-export-element";const e=j(t);return o.appendChild(e),document.body.appendChild(o),e}n()}(e,t,r,s)}const q=class extends l.Component{constructor(e){super(e),this.state={show:!1},this.showLicenseWatermark=!1,this.showLicenseWatermark=!i.validatePackage(f,{component:"GridPDFExport"}),this.licenseMessage=i.getLicenseMessage(f),this.saveGridPDF=A(this.getSavePDF()),this.gridInnerWrapperRef=l.createRef()}componentDidUpdate(e,t){this.state.show&&this.state.show!==t.show&&this.saveGridPDF(this.gridInnerWrapperRef.current,Object.assign({},this.props,{margin:m(this.props)}),this.callback)}render(){return l.createElement(l.Fragment,null,this.state.show&&a.createPortal(l.createElement("div",{style:{position:"absolute",left:"-5000px",top:"0px"}},l.createElement("div",{ref:this.gridInnerWrapperRef},this.prepareRawGridForExport(this.data))),document.body),this.showLicenseWatermark&&l.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}save(e,t){this.grid=this.getGrid(),this.columns=this.getCustomColumns(),this.data=e,this.callback=()=>{this.setState({show:!1}),t&&t()},this.setState({show:!0})}getSavePDF(){return k}getGrid(){return l.Children.toArray(this.props.children).find((e=>e&&"KendoReactGrid"===e.type.displayName))}getCustomColumns(){return l.Children.toArray(this.props.children).filter((e=>e&&"KendoReactGridColumn"===e.type.displayName))}prepareRawGridForExport(e){const t=e&&{data:e,total:e.length,pageSize:e.length,skip:0},r={style:Object.assign({},this.grid.props.style,{width:"1000px"})},s={scrollable:"none"===this.grid.props?"none":"scrollable"},o=Object.assign({},t,r,s);if(this.columns&&this.columns.length>0){const e=this.getGridNotColumnChildren(this.grid);return l.cloneElement(this.grid,o,this.columns.concat(e))}return l.cloneElement(this.grid,o)}getGridNotColumnChildren(e){return l.Children.toArray(e.props.children).filter((e=>e&&e.type&&"KendoReactGridColumn"!==e.type.displayName))}};q.propTypes={author:r.string,avoidLinks:r.oneOfType([r.bool,r.string]),forcePageBreak:r.string,keepTogether:r.string,creator:r.string,date:r.instanceOf(Date),imageResolution:r.number,fileName:r.string,forceProxy:r.bool,keywords:r.string,landscape:r.bool,margin:r.oneOfType([r.string,r.number,r.shape({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])})]),pageTemplate:r.any,paperSize:r.any,repeatHeaders:r.bool,scale:r.number,proxyData:r.any,proxyURL:r.string,proxyTarget:r.string,producer:r.string,subject:r.string,title:r.string};let G=q;const K="k-grid-header",U="k-grid-footer",z=v("TABLE");class I{constructor(e){this.element=e,this.list=P(e,T("k-grid"))}content(){return P(this.list,T("k-grid"))}header(){return this.headerWrap=this.headerWrap||P(this.element,T(K)),P(this.headerWrap,T(`${K}`))}footer(){return this.footerWrap=this.footerWrap||P(this.element,T(U)),P(this.footerWrap,T(`${U}`))}table(){return P(this.element,z)}}const $=e=>{const t=new I(e),r=t.content();let s;const o=t.header();if(o.childNodes.length>1&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach((e=>e.style.top=0)),r){const e=[r.querySelector("colgroup")],n=[o],i=[r.querySelector("tbody")],a=t.footer(),p=a?[a.querySelector("tfoot")]:[];s=W(e,n,i,p)}else s=R(t.table().cloneNode(!0));return s};function B(e){return(t,r={},s)=>function(e,t,r={},s){let o;function n(){e(a(),r,i)}function i(){document.body.removeChild(o),o=void 0,s&&s()}function a(){o=document.createElement("div"),o.className="k-treelist-pdf-export-element";const e=$(t);return o.appendChild(e),document.body.appendChild(o),o}n()}(e,t,r,s)}const H=class extends l.Component{constructor(e){super(e),this.state={show:!1},this.showLicenseWatermark=!1,this.showLicenseWatermark=!i.validatePackage(f,{component:"TreeListPDFExport"}),this.licenseMessage=i.getLicenseMessage(f),this.saveTreeListPDF=B(this.getSavePDF()),this.treeListInnerWrapperRef=l.createRef()}componentDidUpdate(e,t){this.state.show&&this.state.show!==t.show&&this.saveTreeListPDF(this.treeListInnerWrapperRef.current,Object.assign({},this.props,{margin:m(this.props)}),this.callback)}render(){return l.createElement(l.Fragment,null,this.state.show&&a.createPortal(l.createElement("div",{style:{position:"absolute",left:"-5000px",top:"0px"}},l.createElement("div",{ref:this.treeListInnerWrapperRef},this.prepareRawTreeListForExport())),document.body),this.showLicenseWatermark&&l.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}save(e,t,r){this.treeList=this.getTreeList(),this.columns=t||[],this.data=e,this.callback=()=>{this.setState({show:!1}),r&&r()},this.setState({show:!0})}getSavePDF(){return k}getTreeList(){const e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children}prepareRawTreeListForExport(){const e=this.props.allPages&&this.data?{data:this.data,take:Number.MAX_VALUE,skip:0}:{},t={style:Object.assign({},this.treeList.props.style,{width:"1000px"})},r=Object.assign({},e,t);return this.columns&&this.columns.length>0?l.cloneElement(this.treeList,Object.assign({},r,{columns:this.columns})):l.cloneElement(this.treeList,r)}};H.propTypes={author:r.string,avoidLinks:r.oneOfType([r.bool,r.string]),forcePageBreak:r.string,keepTogether:r.string,creator:r.string,date:r.instanceOf(Date),imageResolution:r.number,fileName:r.string,forceProxy:r.bool,keywords:r.string,landscape:r.bool,margin:r.oneOfType([r.string,r.number,r.shape({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])})]),pageTemplate:r.any,paperSize:r.any,repeatHeaders:r.bool,scale:r.number,proxyData:r.any,proxyURL:r.string,proxyTarget:r.string,producer:r.string,subject:r.string,title:r.string,allPages:r.bool};let V=H;e.GridPDFExport=G,e.KendoDrawingAdapter=u,e.PDFExport=b,e.PDFMargin=d,e.TreeListPDFExport=V,e.getPageMargin=m,e.saveGridPDF=M,e.savePDF=k}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-drawing"),require("@progress/kendo-file-saver"),require("react-dom/server"),require("@progress/kendo-react-common"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-drawing","@progress/kendo-file-saver","react-dom/server","@progress/kendo-react-common","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPdf={},e.React,e.PropTypes,e.KendoDrawing,e.KendoFileSaver,e.ReactDOMServer,e.KendoReactCommon,e.ReactDOM)}(this,function(e,t,r,s,o,n,i,a){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var l=p(t),c=p(n);const h=class extends l.Component{render(){return null}};h.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])};let d=h;const g=["bottom","left","right","top"];function m(e){const t=l.Children.toArray(e.children).find(e=>e&&e.type===d);return t?function(e){const t={};for(let r=0;r<g.length;r++){const s=g[r],o=e.props[s];void 0!==o&&(t[s]=o)}return t}(t):e.margin}let u=class{constructor(e,t,r,s,o={}){this.drawDOM=e,this.exportPDF=t,this.saveAs=r,this.domElement=s,this.options=o,this.convertPageTemplateToHtml=e=>`<span>${c.renderToStaticMarkup(l.createElement(this.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}))}</span>`}savePDF(e){const t=this.drawDOM(this.domElement,this.getDrawOptions()).then(e=>this.exportPDF(e,this.getPDFOptions())).then(e=>this.saveAs(e,this.options.fileName||"export.pdf",this.getSaveOptions()));e&&t.then(e,e)}getDrawOptions(){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}}getPDFOptions(){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}}getSaveOptions(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}}};const f=Object.freeze({name:"@progress/kendo-react-pdf",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.4.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),y=class extends l.Component{constructor(e){super(e),this.rootElForPDF=null,this.showLicenseWatermark=!1,this.showLicenseWatermark=!i.validatePackage(f,{component:"PDFExport"}),this.licenseMessage=i.getLicenseMessage(f)}render(){return l.createElement("div",{ref:e=>{this.rootElForPDF=e}},this.props.children,this.showLicenseWatermark&&l.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}save(e){new u(s.drawDOM,s.exportPDF,o.saveAs,this.rootElForPDF,this.getOptions()).savePDF(e)}getOptions(){return Object.assign({},this.props,{margin:m(this.props)})}};y.propTypes={author:r.string,avoidLinks:r.oneOfType([r.bool,r.string]),forcePageBreak:r.string,keepTogether:r.string,creator:r.string,date:r.instanceOf(Date),imageResolution:r.number,fileName:r.string,forceProxy:r.bool,keywords:r.string,landscape:r.bool,margin:r.oneOfType([r.string,r.number,r.shape({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])})]),pageTemplate:r.any,paperSize:r.any,repeatHeaders:r.bool,scale:r.number,proxyData:r.any,proxyURL:r.string,proxyTarget:r.string,producer:r.string,subject:r.string,title:r.string};let b=y;function k(e,t={},r){new u(s.drawDOM,s.exportPDF,o.saveAs,e,t).savePDF(r)}const w={},O=e=>String(e).trim().split(" "),T=e=>t=>((e,t)=>{const r=O(t);return!!O(e.className).find(e=>r.indexOf(e)>=0)})(t,e),v=e=>(w[e]||(w[e]=t=>String(t.nodeName).toLowerCase()===e.toLowerCase()),w[e]),P=(e,t,r=!0)=>{if(e){if(r&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){const r=P(e,t);if(r)return r}e=e.nextSibling}}},D="k-grid-header",x="k-grid-footer",E=v("TABLE"),L=e=>e?"locked":"wrap";class F{constructor(e){this.element=e,this.list=P(e,T("k-grid-container"))}content(e){return P(this.list,T("k-grid-content"+(e?"-locked":"")))}header(e){return this.headerWrap=this.headerWrap||P(this.element,T(D)),P(this.headerWrap,T(`${D}-${L(e)}`))}footer(e){return this.footerWrap=this.footerWrap||P(this.element,T(x)),P(this.footerWrap,T(`${x}-${L(e)}`))}table(){return P(this.element,E)}}const C="k-first",N=(e,t)=>{const r=t.length;for(let s=0;s<r;s++)e.appendChild(t[s].cloneNode(!0))},R=e=>{const t=document.createElement("div");return t.className="k-grid k-grid-md",t.appendChild(e),t},S=e=>{const t=e.length,r=e[0].cloneNode(!0),s=r.rows.length;if(t>1)for(let o=0;o<s;o++)for(let s=1;s<t;s++)N(r.rows[o],e[s].rows[o].cells);return r},W=(e,t,r,s)=>{const o=document.createElement("table"),n=e[0].cloneNode(!0);for(let t=1;t<e.length;t++)N(n,e[t].querySelectorAll("col"));const i=S(t),a=S(r);if(i.className="k-grid-header",((e,t)=>{if(t.length>1&&e.rows.length>1)for(let r=1;r<e.rows.length;r++){const s=t[0].rows[r].cells.length,o=e.rows[r].cells[s];-1===String(o.className).indexOf(C)&&(o.className+=` ${C}`)}})(i,t),o.appendChild(n),o.appendChild(i),o.appendChild(a),s.length){const e=S(s);e.className="k-grid-footer",o.appendChild(e)}return R(o)},j=M(k);function M(e){return(t,r={},s)=>function(e,t,r={},s){let o;function n(){e(a(),r,i)}function i(){document.body.removeChild(o),o=void 0,s&&s()}function a(){o=document.createElement("div"),o.className="k-grid-pdf-export-element";const e=(e=>{const t=new F(e),r=t.content();let s;if(r){const e=[r.querySelector("colgroup")],o=[t.header().querySelector("thead")],n=[r.querySelector("tbody")],i=t.footer(),a=i?[i.querySelector("tfoot")]:[];s=W(e,o,n,a)}else s=R(t.table().cloneNode(!0));return s})(t);return o.appendChild(e),document.body.appendChild(o),e}n()}(e,t,r,s)}const A=class extends l.Component{constructor(e){super(e),this.state={show:!1},this.showLicenseWatermark=!1,this.showLicenseWatermark=!i.validatePackage(f,{component:"GridPDFExport"}),this.licenseMessage=i.getLicenseMessage(f),this.saveGridPDF=M(this.getSavePDF()),this.gridInnerWrapperRef=l.createRef()}componentDidUpdate(e,t){this.state.show&&this.state.show!==t.show&&this.saveGridPDF(this.gridInnerWrapperRef.current,Object.assign({},this.props,{margin:m(this.props)}),this.callback)}render(){return l.createElement(l.Fragment,null,this.state.show&&a.createPortal(l.createElement("div",{style:{position:"absolute",left:"-5000px",top:"0px"}},l.createElement("div",{ref:this.gridInnerWrapperRef},this.prepareRawGridForExport(this.data))),document.body),this.showLicenseWatermark&&l.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}save(e,t){this.grid=this.getGrid(),this.columns=this.getCustomColumns(),this.data=e,this.callback=()=>{this.setState({show:!1}),t&&t()},this.setState({show:!0})}getSavePDF(){return k}getGrid(){return l.Children.toArray(this.props.children).find(e=>e&&"KendoReactGrid"===e.type.displayName)}getCustomColumns(){return l.Children.toArray(this.props.children).filter(e=>e&&"KendoReactGridColumn"===e.type.displayName)}prepareRawGridForExport(e){const t=e&&{data:e,total:e.length,pageSize:e.length,skip:0},r={style:Object.assign({},this.grid.props.style,{width:"1000px"})},s={scrollable:"none"===this.grid.props?"none":"scrollable"},o=Object.assign({},t,r,s);if(this.columns&&this.columns.length>0){const e=this.getGridNotColumnChildren(this.grid);return l.cloneElement(this.grid,o,this.columns.concat(e))}return l.cloneElement(this.grid,o)}getGridNotColumnChildren(e){return l.Children.toArray(e.props.children).filter(e=>e&&e.type&&"KendoReactGridColumn"!==e.type.displayName)}};A.propTypes={author:r.string,avoidLinks:r.oneOfType([r.bool,r.string]),forcePageBreak:r.string,keepTogether:r.string,creator:r.string,date:r.instanceOf(Date),imageResolution:r.number,fileName:r.string,forceProxy:r.bool,keywords:r.string,landscape:r.bool,margin:r.oneOfType([r.string,r.number,r.shape({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])})]),pageTemplate:r.any,paperSize:r.any,repeatHeaders:r.bool,scale:r.number,proxyData:r.any,proxyURL:r.string,proxyTarget:r.string,producer:r.string,subject:r.string,title:r.string};let q=A;const G="k-grid-header",K="k-grid-footer",U=v("TABLE");class z{constructor(e){this.element=e,this.list=P(e,T("k-grid"))}content(){return P(this.list,T("k-grid"))}header(){return this.headerWrap=this.headerWrap||P(this.element,T(G)),P(this.headerWrap,T(`${G}`))}footer(){return this.footerWrap=this.footerWrap||P(this.element,T(K)),P(this.footerWrap,T(`${K}`))}table(){return P(this.element,U)}}function I(e){return(t,r={},s)=>function(e,t,r={},s){let o;function n(){e(a(),r,i)}function i(){document.body.removeChild(o),o=void 0,s&&s()}function a(){o=document.createElement("div"),o.className="k-treelist-pdf-export-element";const e=(e=>{const t=new z(e),r=t.content();let s;const o=t.header();if(o.childNodes.length>1&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach(e=>e.style.top=0),r){const e=[r.querySelector("colgroup")],n=[o],i=[r.querySelector("tbody")],a=t.footer(),p=a?[a.querySelector("tfoot")]:[];s=W(e,n,i,p)}else s=R(t.table().cloneNode(!0));return s})(t);return o.appendChild(e),document.body.appendChild(o),o}n()}(e,t,r,s)}const $=class extends l.Component{constructor(e){super(e),this.state={show:!1},this.showLicenseWatermark=!1,this.showLicenseWatermark=!i.validatePackage(f,{component:"TreeListPDFExport"}),this.licenseMessage=i.getLicenseMessage(f),this.saveTreeListPDF=I(this.getSavePDF()),this.treeListInnerWrapperRef=l.createRef()}componentDidUpdate(e,t){this.state.show&&this.state.show!==t.show&&this.saveTreeListPDF(this.treeListInnerWrapperRef.current,Object.assign({},this.props,{margin:m(this.props)}),this.callback)}render(){return l.createElement(l.Fragment,null,this.state.show&&a.createPortal(l.createElement("div",{style:{position:"absolute",left:"-5000px",top:"0px"}},l.createElement("div",{ref:this.treeListInnerWrapperRef},this.prepareRawTreeListForExport())),document.body),this.showLicenseWatermark&&l.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}save(e,t,r){this.treeList=this.getTreeList(),this.columns=t||[],this.data=e,this.callback=()=>{this.setState({show:!1}),r&&r()},this.setState({show:!0})}getSavePDF(){return k}getTreeList(){const e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children}prepareRawTreeListForExport(){const e=this.props.allPages&&this.data?{data:this.data,take:Number.MAX_VALUE,skip:0}:{},t={style:Object.assign({},this.treeList.props.style,{width:"1000px"})},r=Object.assign({},e,t);return this.columns&&this.columns.length>0?l.cloneElement(this.treeList,Object.assign({},r,{columns:this.columns})):l.cloneElement(this.treeList,r)}};$.propTypes={author:r.string,avoidLinks:r.oneOfType([r.bool,r.string]),forcePageBreak:r.string,keepTogether:r.string,creator:r.string,date:r.instanceOf(Date),imageResolution:r.number,fileName:r.string,forceProxy:r.bool,keywords:r.string,landscape:r.bool,margin:r.oneOfType([r.string,r.number,r.shape({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])})]),pageTemplate:r.any,paperSize:r.any,repeatHeaders:r.bool,scale:r.number,proxyData:r.any,proxyURL:r.string,proxyTarget:r.string,producer:r.string,subject:r.string,title:r.string,allPages:r.bool};let B=$;e.GridPDFExport=q,e.KendoDrawingAdapter=u,e.PDFExport=b,e.PDFMargin=d,e.TreeListPDFExport=B,e.getPageMargin=m,e.saveGridPDF=j,e.savePDF=k});
@@ -0,0 +1,13 @@
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
+ * @hidden
10
+ * Returns the margin options by reading the props of he component and the `PDFMargin` child.
11
+ * The props of the `PDFMargin` child are with greater priority.
12
+ */
13
+ export declare function getPageMargin(props: any): any;
@@ -0,0 +1,113 @@
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 { savePDF } from '../savePDF.js';
10
+ import { PDFExportProps } from '../PDFExportProps.js';
11
+ import * as React from 'react';
12
+ /**
13
+ * The props of the GridPDFExport component
14
+ * ([more information and examples in the documentation on PDF export](https://www.telerik.com/kendo-react-ui/components/grid/export/pdf-export)).
15
+ */
16
+ export interface GridPDFExportProps extends PDFExportProps {
17
+ }
18
+ /**
19
+ * @hidden
20
+ */
21
+ export interface GridPDFExportState {
22
+ show: boolean;
23
+ }
24
+ /**
25
+ * A React component which facilitates the PDF export of the Grid.
26
+ */
27
+ export declare class GridPDFExport extends React.Component<GridPDFExportProps, GridPDFExportState> {
28
+ /**
29
+ * @hidden
30
+ */
31
+ static propTypes: {
32
+ author: PropTypes.Requireable<string>;
33
+ avoidLinks: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
34
+ forcePageBreak: PropTypes.Requireable<string>;
35
+ keepTogether: PropTypes.Requireable<string>;
36
+ creator: PropTypes.Requireable<string>;
37
+ date: PropTypes.Requireable<Date>;
38
+ imageResolution: PropTypes.Requireable<number>;
39
+ fileName: PropTypes.Requireable<string>;
40
+ forceProxy: PropTypes.Requireable<boolean>;
41
+ keywords: PropTypes.Requireable<string>;
42
+ landscape: PropTypes.Requireable<boolean>;
43
+ margin: PropTypes.Requireable<NonNullable<string | number | PropTypes.InferProps<{
44
+ left: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
45
+ top: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
46
+ right: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
47
+ bottom: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
48
+ }> | null | undefined>>;
49
+ pageTemplate: PropTypes.Requireable<any>;
50
+ paperSize: PropTypes.Requireable<any>;
51
+ repeatHeaders: PropTypes.Requireable<boolean>;
52
+ scale: PropTypes.Requireable<number>;
53
+ proxyData: PropTypes.Requireable<any>;
54
+ proxyURL: PropTypes.Requireable<string>;
55
+ proxyTarget: PropTypes.Requireable<string>;
56
+ producer: PropTypes.Requireable<string>;
57
+ subject: PropTypes.Requireable<string>;
58
+ title: PropTypes.Requireable<string>;
59
+ };
60
+ /**
61
+ * @hidden
62
+ */
63
+ saveGridPDF: any;
64
+ /**
65
+ * @hidden
66
+ */
67
+ grid: any;
68
+ /**
69
+ * @hidden
70
+ */
71
+ columns: any;
72
+ /**
73
+ * @hidden
74
+ */
75
+ data?: any[];
76
+ /**
77
+ * @hidden
78
+ */
79
+ callback?: any;
80
+ /**
81
+ * @hidden
82
+ */
83
+ gridInnerWrapperRef: React.RefObject<HTMLDivElement | null>;
84
+ /**
85
+ * @hidden
86
+ */
87
+ readonly state: {
88
+ show: boolean;
89
+ };
90
+ private readonly showLicenseWatermark;
91
+ private readonly licenseMessage?;
92
+ constructor(props: any);
93
+ /**
94
+ * @hidden
95
+ */
96
+ componentDidUpdate(_prevProps: any, prevState: any): void;
97
+ /**
98
+ * @hidden
99
+ */
100
+ render(): React.JSX.Element;
101
+ /**
102
+ * Saves the content of the Grid as a PDF file.
103
+ *
104
+ * @param data - The data can be different from the currently displayed data in the Grid. Can be used to export all Grid pages.
105
+ * @param callback - The callback that will be executed after the PDF is saved.
106
+ */
107
+ save(data?: any[], callback?: () => void): void;
108
+ protected getSavePDF(): typeof savePDF;
109
+ private getGrid;
110
+ private getCustomColumns;
111
+ private prepareRawGridForExport;
112
+ private getGridNotColumnChildren;
113
+ }