@progress/kendo-react-pdf 7.2.4-develop.3 → 7.3.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.
Files changed (56) hide show
  1. package/KendoDrawingAdapter.js +8 -0
  2. package/KendoDrawingAdapter.mjs +65 -0
  3. package/PDFExport.js +8 -0
  4. package/PDFExport.mjs +79 -0
  5. package/PDFMargin.js +8 -0
  6. package/PDFMargin.mjs +25 -0
  7. package/common/dom-queries.js +8 -0
  8. package/common/dom-queries.mjs +31 -0
  9. package/common/table-query.js +8 -0
  10. package/common/table-query.mjs +32 -0
  11. package/common/utils.js +8 -0
  12. package/common/utils.mjs +46 -0
  13. package/dist/cdn/js/kendo-react-pdf.js +8 -5
  14. package/getPageMargin.js +8 -0
  15. package/getPageMargin.mjs +26 -0
  16. package/grid/GridPDFExport.js +8 -0
  17. package/grid/GridPDFExport.mjs +83 -0
  18. package/grid/export-element.js +8 -0
  19. package/grid/export-element.mjs +23 -0
  20. package/grid/grid-query.js +8 -0
  21. package/grid/grid-query.mjs +32 -0
  22. package/grid/provideSaveGridPDF.js +8 -0
  23. package/grid/provideSaveGridPDF.mjs +53 -0
  24. package/index.d.mts +439 -5
  25. package/index.d.ts +439 -14
  26. package/index.js +8 -5
  27. package/index.mjs +21 -476
  28. package/package-metadata.js +8 -0
  29. package/package-metadata.mjs +19 -0
  30. package/package.json +2 -2
  31. package/savePDF.js +8 -0
  32. package/savePDF.mjs +23 -0
  33. package/treelist/TreeListPDFExport.js +8 -0
  34. package/treelist/TreeListPDFExport.mjs +84 -0
  35. package/treelist/export-element.js +8 -0
  36. package/treelist/export-element.mjs +23 -0
  37. package/treelist/provideSaveTreeListPDF.js +8 -0
  38. package/treelist/provideSaveTreeListPDF.mjs +46 -0
  39. package/KendoDrawingAdapter.d.ts +0 -24
  40. package/PDFExport.d.ts +0 -57
  41. package/PDFExportProps.d.ts +0 -127
  42. package/PDFMargin.d.ts +0 -71
  43. package/PageTemplateProps.d.ts +0 -17
  44. package/common/dom-queries.d.ts +0 -48
  45. package/common/table-query.d.ts +0 -26
  46. package/common/utils.d.ts +0 -24
  47. package/getPageMargin.d.ts +0 -10
  48. package/grid/GridPDFExport.d.ts +0 -70
  49. package/grid/export-element.d.ts +0 -8
  50. package/grid/grid-query.d.ts +0 -26
  51. package/grid/provideSaveGridPDF.d.ts +0 -9
  52. package/package-metadata.d.ts +0 -9
  53. package/savePDF.d.ts +0 -13
  54. package/treelist/TreeListPDFExport.d.ts +0 -75
  55. package/treelist/export-element.d.ts +0 -8
  56. package/treelist/provideSaveTreeListPDF.d.ts +0 -9
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { GridQuery as u } from "../common/table-query.mjs";
10
+ import { createTable as h, wrapTable as a } from "../common/utils.mjs";
11
+ const y = (s) => {
12
+ const o = new u(s), t = o.content();
13
+ let r, e = o.header();
14
+ if (e.childNodes.length > 1 && e.removeChild(e.childNodes[1]), e.childNodes[0].childNodes.forEach((c) => c.style.top = 0), t) {
15
+ const c = [t.querySelector("colgroup")], n = [e], d = [t.querySelector("tbody")], l = o.footer(), i = l ? [l.querySelector("tfoot")] : [];
16
+ r = h(c, n, d, i);
17
+ } else
18
+ r = a(o.table().cloneNode(!0));
19
+ return r;
20
+ };
21
+ export {
22
+ y as exportElement
23
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react-dom"),E=require("react"),P=require("./export-element.js");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=d(O),p=d(E);function j(e){return(t,n={},r,s,i)=>C(e,t,n,r,s,i)}function C(e,t,n={},r,s,i){let c,a,o;m();function m(){c=document.createElement("div"),c.setAttribute("style","position:absolute; left: -5000px; top: 0px;"),a=document.createElement("div"),c.appendChild(a),document.body.appendChild(c),h.render(y(),a,f)}function f(){e(v(),n,b)}function b(){document.body.removeChild(c),document.body.removeChild(o),c=o=void 0,r&&r()}function v(){o=document.createElement("div"),o.className="k-treelist-pdf-export-element";const l=P.exportElement(a);return o.appendChild(l),document.body.appendChild(o),o}function y(){const l=n.allPages&&s?{data:s,take:Number.MAX_VALUE,skip:0}:{},g={style:Object.assign({},t.props.style,{width:"1000px"})},u=Object.assign({},l,g);return i&&i.length>0?p.cloneElement(t,Object.assign({},u,{columns:i})):p.cloneElement(t,u)}}exports.provideSaveTreeListPDF=j;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as h from "react-dom";
10
+ import * as d from "react";
11
+ import { exportElement as y } from "./export-element.mjs";
12
+ function L(l) {
13
+ return (n, o = {}, i, p, r) => C(
14
+ l,
15
+ n,
16
+ o,
17
+ i,
18
+ p,
19
+ r
20
+ );
21
+ }
22
+ function C(l, n, o = {}, i, p, r) {
23
+ let t, s, e;
24
+ m();
25
+ function m() {
26
+ t = document.createElement("div"), t.setAttribute("style", "position:absolute; left: -5000px; top: 0px;"), s = document.createElement("div"), t.appendChild(s), document.body.appendChild(t), h.render(v(), s, u);
27
+ }
28
+ function u() {
29
+ l(b(), o, f);
30
+ }
31
+ function f() {
32
+ document.body.removeChild(t), document.body.removeChild(e), t = e = void 0, i && i();
33
+ }
34
+ function b() {
35
+ e = document.createElement("div"), e.className = "k-treelist-pdf-export-element";
36
+ const a = y(s);
37
+ return e.appendChild(a), document.body.appendChild(e), e;
38
+ }
39
+ function v() {
40
+ const a = o.allPages && p ? { data: p, take: Number.MAX_VALUE, skip: 0 } : {}, E = { style: Object.assign({}, n.props.style, { width: "1000px" }) }, c = Object.assign({}, a, E);
41
+ return r && r.length > 0 ? d.cloneElement(n, Object.assign({}, c, { columns: r })) : d.cloneElement(n, c);
42
+ }
43
+ }
44
+ export {
45
+ L as provideSaveTreeListPDF
46
+ };
@@ -1,24 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { DrawOptions, Group } from '@progress/kendo-drawing';
6
- import { PDFOptions } from '@progress/kendo-drawing/pdf';
7
- import { SaveOptions } from '@progress/kendo-file-saver';
8
- import { PDFExportProps } from './PDFExportProps';
9
- /**
10
- * @hidden
11
- */
12
- export default class KendoDrawingAdapter {
13
- private drawDOM;
14
- private exportPDF;
15
- private saveAs;
16
- private domElement;
17
- private options;
18
- 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);
19
- savePDF(callback?: () => void): void;
20
- private getDrawOptions;
21
- private getPDFOptions;
22
- private getSaveOptions;
23
- private convertPageTemplateToHtml;
24
- }
package/PDFExport.d.ts DELETED
@@ -1,57 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import { PDFExportProps } from './PDFExportProps';
8
- /**
9
- * Represents the KendoReact PDFExport component.
10
- */
11
- export declare class PDFExport extends React.Component<PDFExportProps, {}> {
12
- /**
13
- * @hidden
14
- */
15
- static propTypes: {
16
- author: PropTypes.Requireable<string>;
17
- avoidLinks: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
18
- forcePageBreak: PropTypes.Requireable<string>;
19
- keepTogether: PropTypes.Requireable<string>;
20
- creator: PropTypes.Requireable<string>;
21
- date: PropTypes.Requireable<Date>;
22
- imageResolution: PropTypes.Requireable<number>;
23
- fileName: PropTypes.Requireable<string>;
24
- forceProxy: PropTypes.Requireable<boolean>;
25
- keywords: PropTypes.Requireable<string>;
26
- landscape: PropTypes.Requireable<boolean>;
27
- margin: PropTypes.Requireable<NonNullable<string | number | PropTypes.InferProps<{
28
- left: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
29
- top: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
30
- right: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
31
- bottom: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
32
- }> | null | undefined>>;
33
- pageTemplate: PropTypes.Requireable<any>;
34
- paperSize: PropTypes.Requireable<any>;
35
- repeatHeaders: PropTypes.Requireable<boolean>;
36
- scale: PropTypes.Requireable<number>;
37
- proxyData: PropTypes.Requireable<any>;
38
- proxyURL: PropTypes.Requireable<string>;
39
- proxyTarget: PropTypes.Requireable<string>;
40
- producer: PropTypes.Requireable<string>;
41
- subject: PropTypes.Requireable<string>;
42
- title: PropTypes.Requireable<string>;
43
- };
44
- private rootElForPDF;
45
- constructor(props: PDFExportProps);
46
- /**
47
- * @hidden
48
- */
49
- render(): import("react/jsx-runtime").JSX.Element;
50
- /**
51
- * Saves the content as a PDF file.
52
- *
53
- * @param callback - The callback to be executed after the PDF is saved.
54
- */
55
- save(callback?: () => void): void;
56
- private getOptions;
57
- }
@@ -1,127 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { PaperSize, PageMargin } from '@progress/kendo-drawing/pdf';
6
- /**
7
- * Represents the props of the KendoReact PDFExport component.
8
- */
9
- export interface PDFExportProps {
10
- /**
11
- * @hidden
12
- */
13
- children?: React.ReactNode;
14
- /**
15
- * The author (metadata) of the PDF document.
16
- */
17
- author?: string;
18
- /**
19
- * A flag that indicates whether to produce actual hyperlinks in the exported PDF file. It is also possible to set a CSS selector. All matching links will be ignored.
20
- */
21
- avoidLinks?: boolean | string;
22
- /**
23
- * An optional CSS selector that specifies the elements which cause the page breaks.
24
- */
25
- forcePageBreak?: string;
26
- /**
27
- * An optional CSS selector that specifies the elements which should not be split across the pages.
28
- */
29
- keepTogether?: string;
30
- /**
31
- * The creator of the PDF document. Defaults to `KendoReact PDF Generator`.
32
- */
33
- creator?: string;
34
- /**
35
- * The date when the PDF document is created. Defaults to `new Date()`.
36
- */
37
- date?: Date;
38
- /**
39
- * The forced resolution of the images in the exported PDF document. By default, the images are exported at their full resolution.
40
- */
41
- imageResolution?: number;
42
- /**
43
- * Specifies the name of the exported PDF file. Defaults to `export.pdf`.
44
- */
45
- fileName?: string;
46
- /**
47
- * If set to `true`, the content is forwarded to `proxyURL` even if the browser supports local saving of files.
48
- */
49
- forceProxy?: boolean;
50
- /**
51
- * The keywords (metadata) of the PDF document.
52
- */
53
- keywords?: string;
54
- /**
55
- * A flag that indicates if the page will be in a landscape orientation. By default, the page is in a portrait orientation. Defaults to `false`.
56
- */
57
- landscape?: boolean;
58
- /**
59
- * Specifies the margins of the page.
60
- *
61
- * The supported units are:
62
- * * `"mm"`
63
- * * `"cm"`
64
- * * `"in"`
65
- * * `"pt"` (default).
66
- *
67
- * > Numbers are considered to be points (`"pt"`).
68
- */
69
- margin?: string | number | PageMargin;
70
- /**
71
- * 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.
72
- */
73
- pageTemplate?: any;
74
- /**
75
- * Specifies the paper size of the PDF document. Defaults to `"auto"` which means that the paper size is determined by the content. The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).
76
- *
77
- * If set, the content will be split across multiple pages. This enables the `repeatHeaders` and `scale` options, and allows you to specify a template.
78
- *
79
- * The supported values are:
80
- * * A predefined size. The supported paper sizes are: `A0-A10`, `B0-B10`, `C0-C10`, `Executive`, `Folio`, `Legal`, `Letter`, `Tabloid`.
81
- * * An array of two numbers which specify the width and height in points (1pt = 1/72in).
82
- * * An array of two strings which specify the width and height in units. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`.
83
- */
84
- paperSize?: PaperSize;
85
- /**
86
- * Specifies if the `<thead>` elements of the tables will be repeated on each page.
87
- */
88
- repeatHeaders?: boolean;
89
- /**
90
- * A scale factor. The text size on the screen might be too big for printing. To scale down the output in PDF, use this option. Defaults to `1`.
91
- */
92
- scale?: number;
93
- /**
94
- * A key/value dictionary of form values which will be sent to the proxy. Can be used to submit Anti-Forgery tokens and other metadata.
95
- */
96
- proxyData?: {
97
- [key: string]: string;
98
- };
99
- /**
100
- * 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.
101
- *
102
- * In the request body, the proxy receives a `POST` request with the following parameters:
103
- * - `"contentType"`&mdash;The MIME type of the file.
104
- * - `"base64"`&mdash;The base-64 encoded file content.
105
- * - `"fileName"`&mdash;The file name, as requested by the caller.
106
- *
107
- * The proxy returns the decoded file with the `"Content-Disposition"` header set to `attachment;
108
- * filename="<fileName.pdf>"`.
109
- */
110
- proxyURL?: string;
111
- /**
112
- * 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>"`. Defaults to `_self`.
113
- */
114
- proxyTarget?: string;
115
- /**
116
- * The producer (metadata) of the PDF document.
117
- */
118
- producer?: string;
119
- /**
120
- * The subject (metadata) of the PDF document.
121
- */
122
- subject?: string;
123
- /**
124
- * The title (metadata) of the PDF document.
125
- */
126
- title?: string;
127
- }
package/PDFMargin.d.ts DELETED
@@ -1,71 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- /**
8
- * Represents the props of the KendoReact PDFMargin component.
9
- */
10
- export interface PDFMarginProps {
11
- /**
12
- * The bottom margin.
13
- *
14
- * The supported units are:
15
- * * `"mm"`
16
- * * `"cm"`
17
- * * `"in"`
18
- * * `"pt"` (default).
19
- *
20
- * > Numbers are considered to be points (`"pt"`).
21
- */
22
- left?: number | string;
23
- /**
24
- * The top margin.
25
- *
26
- * The supported units are:
27
- * * `"mm"`
28
- * * `"cm"`
29
- * * `"in"`
30
- * * `"pt"` (default).
31
- *
32
- * > Numbers are considered to be points (`"pt"`).
33
- */
34
- top?: number | string;
35
- /**
36
- * The right margin.
37
- *
38
- * The supported units are:
39
- * * `"mm"`
40
- * * `"cm"`
41
- * * `"in"`
42
- * * `"pt"` (default).
43
- *
44
- * > Numbers are considered to be points (`"pt"`).
45
- */
46
- right?: number | string;
47
- /**
48
- * The bottom margin.
49
- *
50
- * The supported units are:
51
- * * `"mm"`
52
- * * `"cm"`
53
- * * `"in"`
54
- * * `"pt"` (default).
55
- *
56
- * > Numbers are considered to be points (`"pt"`).
57
- */
58
- bottom?: number | string;
59
- }
60
- /**
61
- * @hidden
62
- */
63
- export declare class PDFMargin extends React.Component<PDFMarginProps, {}> {
64
- static propTypes: {
65
- left: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
66
- top: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
67
- right: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
68
- bottom: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
69
- };
70
- render(): null;
71
- }
@@ -1,17 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Represents the props of a page template component that can be added to the PDFExport component.
7
- */
8
- export interface PageTemplateProps {
9
- /**
10
- * The number of the current page.
11
- */
12
- pageNum: number;
13
- /**
14
- * The total number of pages.
15
- */
16
- totalPages: number;
17
- }
@@ -1,48 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const hasClasses: (element: HTMLElement, classNames: string) => boolean;
9
- /**
10
- * @hidden
11
- */
12
- export declare const matchesClasses: (classNames: string) => (element: HTMLElement) => boolean;
13
- /**
14
- * @hidden
15
- */
16
- export declare const matchesNodeName: (nodeName: string) => any;
17
- /**
18
- * @hidden
19
- */
20
- export declare const closest: (node: any, predicate: any) => any;
21
- /**
22
- * @hidden
23
- */
24
- export declare const closestInScope: (node: any, predicate: any, scope: any) => any;
25
- /**
26
- * @hidden
27
- */
28
- export declare const contains: (parent: any, node: any, matchSelf?: boolean) => any;
29
- /**
30
- * @hidden
31
- */
32
- export declare const isVisible: (element: any) => boolean;
33
- /**
34
- * @hidden
35
- */
36
- export declare const isFocusable: (element: any, checkVisibility?: boolean) => boolean;
37
- /**
38
- * @hidden
39
- */
40
- export declare const findElement: (node: any, predicate: (element: any) => boolean, matchSelf?: boolean) => any;
41
- /**
42
- * @hidden
43
- */
44
- export declare const findFocusable: (element: any, checkVisibility?: boolean) => any;
45
- /**
46
- * @hidden
47
- */
48
- export declare const findFocusableChild: (element: any, checkVisibility?: boolean) => any;
@@ -1,26 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const HEADER_CLASS: string;
9
- /**
10
- * @hidden
11
- */
12
- export declare const FOOTER_CLASS: string;
13
- /**
14
- * @hidden
15
- */
16
- export declare class GridQuery {
17
- private element;
18
- private headerWrap;
19
- private list;
20
- private footerWrap;
21
- constructor(element: HTMLElement);
22
- content(): Element;
23
- header(): Element;
24
- footer(): Element;
25
- table(): Node;
26
- }
package/common/utils.d.ts DELETED
@@ -1,24 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const appendNodes: (element: any, nodes: any[]) => void;
9
- /**
10
- * @hidden
11
- */
12
- export declare const wrapTable: (table: any) => any;
13
- /**
14
- * @hidden
15
- */
16
- export declare const createTableElement: (sources: any) => any;
17
- /**
18
- * @hidden
19
- */
20
- export declare const setFirstCellClass: (header: any, headers: any) => void;
21
- /**
22
- * @hidden
23
- */
24
- export declare const createTable: (colGroups: any[], headers: any[], bodies: any[], footers: any[]) => any;
@@ -1,10 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- * Returns the margin options by reading the props of he component and the `PDFMargin` child.
8
- * The props of the `PDFMargin` child are with greater priority.
9
- */
10
- export declare function getPageMargin(props: any): any;
@@ -1,70 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import { savePDF } from '../savePDF';
8
- import { PDFExportProps } from '../PDFExportProps';
9
- /**
10
- * The props of the GridPDFExport component
11
- * ([more information and examples in the documentation on PDF export]({% slug overview_pdfexport_grid %})).
12
- */
13
- export interface GridPDFExportProps extends PDFExportProps {
14
- }
15
- /**
16
- * A React component which facilitates the PDF export of the Grid.
17
- */
18
- export declare class GridPDFExport extends React.Component<GridPDFExportProps, {}> {
19
- /**
20
- * @hidden
21
- */
22
- static propTypes: {
23
- author: PropTypes.Requireable<string>;
24
- avoidLinks: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
25
- forcePageBreak: PropTypes.Requireable<string>;
26
- keepTogether: PropTypes.Requireable<string>;
27
- creator: PropTypes.Requireable<string>;
28
- date: PropTypes.Requireable<Date>;
29
- imageResolution: PropTypes.Requireable<number>;
30
- fileName: PropTypes.Requireable<string>;
31
- forceProxy: PropTypes.Requireable<boolean>;
32
- keywords: PropTypes.Requireable<string>;
33
- landscape: PropTypes.Requireable<boolean>;
34
- margin: PropTypes.Requireable<NonNullable<string | number | PropTypes.InferProps<{
35
- left: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
36
- top: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
37
- right: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
38
- bottom: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
39
- }> | null | undefined>>;
40
- pageTemplate: PropTypes.Requireable<any>;
41
- paperSize: PropTypes.Requireable<any>;
42
- repeatHeaders: PropTypes.Requireable<boolean>;
43
- scale: PropTypes.Requireable<number>;
44
- proxyData: PropTypes.Requireable<any>;
45
- proxyURL: PropTypes.Requireable<string>;
46
- proxyTarget: PropTypes.Requireable<string>;
47
- producer: PropTypes.Requireable<string>;
48
- subject: PropTypes.Requireable<string>;
49
- title: PropTypes.Requireable<string>;
50
- };
51
- /**
52
- * @hidden
53
- */
54
- saveGridPDF: any;
55
- constructor(props: any);
56
- /**
57
- * @hidden
58
- */
59
- render(): null;
60
- /**
61
- * Saves the content of the Grid as a PDF file.
62
- *
63
- * @param data - The data can be different from the currently displayed data in the Grid. Can be used to export all Grid pages.
64
- * @param callback - The callback that will be executed after the PDF is saved.
65
- */
66
- save(data?: any[], callback?: () => void): void;
67
- protected getSavePDF(): typeof savePDF;
68
- private getGrid;
69
- private getCustomColumns;
70
- }
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const exportElement: (wrapper: HTMLElement) => HTMLElement;
@@ -1,26 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const HEADER_CLASS: string;
9
- /**
10
- * @hidden
11
- */
12
- export declare const FOOTER_CLASS: string;
13
- /**
14
- * @hidden
15
- */
16
- export declare class GridQuery {
17
- private element;
18
- private headerWrap;
19
- private list;
20
- private footerWrap;
21
- constructor(element: HTMLElement);
22
- content(locked?: boolean): Element;
23
- header(locked?: boolean): Element;
24
- footer(locked?: boolean): Element;
25
- table(): Node;
26
- }
@@ -1,9 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { PDFExportProps } from '../PDFExportProps';
6
- /**
7
- * @hidden
8
- */
9
- export declare function provideSaveGridPDF(savePDF: (domElement: HTMLElement, options?: PDFExportProps, callback?: () => void) => void): (grid: any, pdfExportOptions?: PDFExportProps, callback?: () => void, data?: any, columns?: any) => void;
@@ -1,9 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { PackageMetadata } from '@progress/kendo-licensing';
6
- /**
7
- * @hidden
8
- */
9
- export declare const packageMetadata: PackageMetadata;
package/savePDF.d.ts DELETED
@@ -1,13 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { PDFExportProps } from './PDFExportProps';
6
- /**
7
- * Saves the content of a DOM element to a PDF file.
8
- *
9
- * @param domElement - The root DOM element to save to a PDF file.
10
- * @param options - The export options.
11
- * @param callback - The callback to be executed after the PDF is saved.
12
- */
13
- export declare function savePDF(domElement: HTMLElement, options?: PDFExportProps, callback?: () => void): void;