@progress/kendo-react-pdf 9.4.0-develop.6 → 9.4.0-develop.8
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/KendoDrawingAdapter.js +1 -1
- package/KendoDrawingAdapter.mjs +0 -1
- package/PDFExport.js +1 -1
- package/PDFExport.mjs +37 -38
- package/PDFMargin.js +1 -1
- package/PDFMargin.mjs +0 -1
- package/common/dom-queries.js +1 -1
- package/common/dom-queries.mjs +8 -9
- package/common/table-query.js +1 -1
- package/common/table-query.mjs +2 -3
- package/common/utils.js +1 -1
- package/common/utils.mjs +0 -1
- package/getPageMargin.js +1 -1
- package/getPageMargin.mjs +8 -9
- package/grid/GridPDFExport.js +1 -1
- package/grid/GridPDFExport.mjs +4 -5
- package/grid/export-element.js +1 -1
- package/grid/export-element.mjs +2 -3
- package/grid/grid-query.js +1 -1
- package/grid/grid-query.mjs +4 -5
- package/grid/provideSaveGridPDF.js +1 -1
- package/grid/provideSaveGridPDF.mjs +8 -9
- package/index.js +2 -1
- package/index.mjs +6 -6
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +3 -3
- package/savePDF.js +1 -1
- package/savePDF.mjs +5 -6
- package/treelist/TreeListPDFExport.js +1 -1
- package/treelist/TreeListPDFExport.mjs +0 -1
- package/treelist/export-element.js +1 -1
- package/treelist/export-element.mjs +4 -5
- package/treelist/provideSaveTreeListPDF.js +1 -1
- package/treelist/provideSaveTreeListPDF.mjs +4 -5
package/KendoDrawingAdapter.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";const p=require("react"),h=require("react-dom/server");function a(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const c=a(p),g=a(h),l="export.pdf",u="KendoReact PDF Generator";class m{constructor(t,e,o,r,n={}){this.drawDOM=t,this.exportPDF=e,this.saveAs=o,this.domElement=r,this.options=n,this.convertPageTemplateToHtml=i=>`<span>${g.renderToStaticMarkup(c.createElement(this.options.pageTemplate,{pageNum:i.pageNum,totalPages:i.totalPages}))}</span>`}savePDF(t){const e=this.drawDOM(this.domElement,this.getDrawOptions()).then(o=>this.exportPDF(o,this.getPDFOptions())).then(o=>this.saveAs(o,this.options.fileName||l,this.getSaveOptions()));t&&e.then(t,t)}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||u,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}}}module.exports=m;
|
package/KendoDrawingAdapter.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as p from "react";
|
|
10
9
|
import * as r from "react-dom/server";
|
|
11
10
|
const n = "export.pdf", h = "KendoReact PDF Generator";
|
package/PDFExport.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),e=require("prop-types"),i=require("@progress/kendo-drawing"),p=require("@progress/kendo-file-saver"),u=require("./getPageMargin.js"),l=require("./KendoDrawingAdapter.js"),d=require("@progress/kendo-react-common"),b=require("./package-metadata.js");function f(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const g=f(c),a=class a extends g.Component{constructor(t){super(t),this.rootElForPDF=null,d.validatePackage(b.packageMetadata)}render(){return g.createElement("div",{ref:t=>{this.rootElForPDF=t}},this.props.children)}save(t){new l(i.drawDOM,i.exportPDF,p.saveAs,this.rootElForPDF,this.getOptions()).savePDF(t)}getOptions(){return Object.assign({},this.props,{margin:u.getPageMargin(this.props)})}};a.propTypes={author:e.string,avoidLinks:e.oneOfType([e.bool,e.string]),forcePageBreak:e.string,keepTogether:e.string,creator:e.string,date:e.instanceOf(Date),imageResolution:e.number,fileName:e.string,forceProxy:e.bool,keywords:e.string,landscape:e.bool,margin:e.oneOfType([e.string,e.number,e.shape({left:e.oneOfType([e.number,e.string]),top:e.oneOfType([e.number,e.string]),right:e.oneOfType([e.number,e.string]),bottom:e.oneOfType([e.number,e.string])})]),pageTemplate:e.any,paperSize:e.any,repeatHeaders:e.bool,scale:e.number,proxyData:e.any,proxyURL:e.string,proxyTarget:e.string,producer:e.string,subject:e.string,title:e.string};let o=a;exports.PDFExport=o;
|
package/PDFExport.mjs
CHANGED
|
@@ -5,18 +5,17 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as o from "react";
|
|
10
|
-
import
|
|
9
|
+
import r from "prop-types";
|
|
11
10
|
import { drawDOM as s, exportPDF as i } from "@progress/kendo-drawing";
|
|
12
11
|
import { saveAs as a } from "@progress/kendo-file-saver";
|
|
13
12
|
import { getPageMargin as p } from "./getPageMargin.mjs";
|
|
14
13
|
import g from "./KendoDrawingAdapter.mjs";
|
|
15
14
|
import { validatePackage as m } from "@progress/kendo-react-common";
|
|
16
|
-
import { packageMetadata as
|
|
15
|
+
import { packageMetadata as f } from "./package-metadata.mjs";
|
|
17
16
|
const t = class t extends o.Component {
|
|
18
|
-
constructor(
|
|
19
|
-
super(
|
|
17
|
+
constructor(e) {
|
|
18
|
+
super(e), this.rootElForPDF = null, m(f);
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* @hidden
|
|
@@ -25,8 +24,8 @@ const t = class t extends o.Component {
|
|
|
25
24
|
return /* @__PURE__ */ o.createElement(
|
|
26
25
|
"div",
|
|
27
26
|
{
|
|
28
|
-
ref: (
|
|
29
|
-
this.rootElForPDF =
|
|
27
|
+
ref: (e) => {
|
|
28
|
+
this.rootElForPDF = e;
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
this.props.children
|
|
@@ -37,45 +36,45 @@ const t = class t extends o.Component {
|
|
|
37
36
|
*
|
|
38
37
|
* @param callback - The callback to be executed after the PDF is saved.
|
|
39
38
|
*/
|
|
40
|
-
save(
|
|
41
|
-
new g(s, i, a, this.rootElForPDF, this.getOptions()).savePDF(
|
|
39
|
+
save(e) {
|
|
40
|
+
new g(s, i, a, this.rootElForPDF, this.getOptions()).savePDF(e);
|
|
42
41
|
}
|
|
43
42
|
getOptions() {
|
|
44
43
|
return Object.assign({}, this.props, { margin: p(this.props) });
|
|
45
44
|
}
|
|
46
45
|
};
|
|
47
46
|
t.propTypes = {
|
|
48
|
-
author:
|
|
49
|
-
avoidLinks:
|
|
50
|
-
forcePageBreak:
|
|
51
|
-
keepTogether:
|
|
52
|
-
creator:
|
|
53
|
-
date:
|
|
54
|
-
imageResolution:
|
|
55
|
-
fileName:
|
|
56
|
-
forceProxy:
|
|
57
|
-
keywords:
|
|
58
|
-
landscape:
|
|
59
|
-
margin:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
left:
|
|
64
|
-
top:
|
|
65
|
-
right:
|
|
66
|
-
bottom:
|
|
47
|
+
author: r.string,
|
|
48
|
+
avoidLinks: r.oneOfType([r.bool, r.string]),
|
|
49
|
+
forcePageBreak: r.string,
|
|
50
|
+
keepTogether: r.string,
|
|
51
|
+
creator: r.string,
|
|
52
|
+
date: r.instanceOf(Date),
|
|
53
|
+
imageResolution: r.number,
|
|
54
|
+
fileName: r.string,
|
|
55
|
+
forceProxy: r.bool,
|
|
56
|
+
keywords: r.string,
|
|
57
|
+
landscape: r.bool,
|
|
58
|
+
margin: r.oneOfType([
|
|
59
|
+
r.string,
|
|
60
|
+
r.number,
|
|
61
|
+
r.shape({
|
|
62
|
+
left: r.oneOfType([r.number, r.string]),
|
|
63
|
+
top: r.oneOfType([r.number, r.string]),
|
|
64
|
+
right: r.oneOfType([r.number, r.string]),
|
|
65
|
+
bottom: r.oneOfType([r.number, r.string])
|
|
67
66
|
})
|
|
68
67
|
]),
|
|
69
|
-
pageTemplate:
|
|
70
|
-
paperSize:
|
|
71
|
-
repeatHeaders:
|
|
72
|
-
scale:
|
|
73
|
-
proxyData:
|
|
74
|
-
proxyURL:
|
|
75
|
-
proxyTarget:
|
|
76
|
-
producer:
|
|
77
|
-
subject:
|
|
78
|
-
title:
|
|
68
|
+
pageTemplate: r.any,
|
|
69
|
+
paperSize: r.any,
|
|
70
|
+
repeatHeaders: r.bool,
|
|
71
|
+
scale: r.number,
|
|
72
|
+
proxyData: r.any,
|
|
73
|
+
proxyURL: r.string,
|
|
74
|
+
proxyTarget: r.string,
|
|
75
|
+
producer: r.string,
|
|
76
|
+
subject: r.string,
|
|
77
|
+
title: r.string
|
|
79
78
|
};
|
|
80
79
|
let n = t;
|
|
81
80
|
export {
|
package/PDFMargin.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),e=require("prop-types");function i(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,c.get?c:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=i(u),s=class s extends p.Component{render(){return null}};s.propTypes={left:e.oneOfType([e.number,e.string]),top:e.oneOfType([e.number,e.string]),right:e.oneOfType([e.number,e.string]),bottom:e.oneOfType([e.number,e.string])};let o=s;exports.PDFMargin=o;
|
package/PDFMargin.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as n from "react";
|
|
10
9
|
import e from "prop-types";
|
|
11
10
|
const t = class t extends n.Component {
|
package/common/dom-queries.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={},a=s=>String(s).trim().split(" "),n=(s,t)=>{const i=a(t);return!!a(s.className).find(e=>i.indexOf(e)>=0)},c=s=>t=>n(t,s),f=s=>(r[s]||(r[s]=t=>String(t.nodeName).toLowerCase()===s.toLowerCase()),r[s]),l=(s,t,i=!0)=>{if(s){if(i&&t(s))return s;for(s=s.firstChild;s;){if(s.nodeType===1){const e=l(s,t);if(e)return e}s=s.nextSibling}}};exports.findElement=l;exports.hasClasses=n;exports.matchesClasses=c;exports.matchesNodeName=f;
|
package/common/dom-queries.mjs
CHANGED
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"
|
|
9
|
-
const r =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, a = (t) => (s) => l(s, t), f = (t) => (r[t] || (r[t] = (s) => String(s.nodeName).toLowerCase() === t.toLowerCase()), r[t]), c = (t, s, e = !0) => {
|
|
8
|
+
const e = {}, n = (t) => String(t).trim().split(" "), l = (t, s) => {
|
|
9
|
+
const r = n(s);
|
|
10
|
+
return !!n(t.className).find((i) => r.indexOf(i) >= 0);
|
|
11
|
+
}, c = (t) => (s) => l(s, t), f = (t) => (e[t] || (e[t] = (s) => String(s.nodeName).toLowerCase() === t.toLowerCase()), e[t]), a = (t, s, r = !0) => {
|
|
13
12
|
if (t) {
|
|
14
|
-
if (
|
|
13
|
+
if (r && s(t))
|
|
15
14
|
return t;
|
|
16
15
|
for (t = t.firstChild; t; ) {
|
|
17
16
|
if (t.nodeType === 1) {
|
|
18
|
-
const i =
|
|
17
|
+
const i = a(t, s);
|
|
19
18
|
if (i)
|
|
20
19
|
return i;
|
|
21
20
|
}
|
|
@@ -24,8 +23,8 @@ const r = {}, n = (t) => String(t).trim().split(" "), l = (t, s) => {
|
|
|
24
23
|
}
|
|
25
24
|
};
|
|
26
25
|
export {
|
|
27
|
-
|
|
26
|
+
a as findElement,
|
|
28
27
|
l as hasClasses,
|
|
29
|
-
|
|
28
|
+
c as matchesClasses,
|
|
30
29
|
f as matchesNodeName
|
|
31
30
|
};
|
package/common/table-query.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dom-queries.js"),t="k-grid-header",s="k-grid-footer",i="TABLE",a=e.matchesNodeName(i);class n{constructor(r){this.element=r,this.list=e.findElement(r,e.matchesClasses("k-grid"))}content(){return e.findElement(this.list,e.matchesClasses("k-grid"))}header(){return this.headerWrap=this.headerWrap||e.findElement(this.element,e.matchesClasses(t)),e.findElement(this.headerWrap,e.matchesClasses(`${t}`))}footer(){return this.footerWrap=this.footerWrap||e.findElement(this.element,e.matchesClasses(s)),e.findElement(this.footerWrap,e.matchesClasses(`${s}`))}table(){return e.findElement(this.element,a)}}exports.FOOTER_CLASS=s;exports.GridQuery=n;exports.HEADER_CLASS=t;
|
package/common/table-query.mjs
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { findElement as e, matchesClasses as t, matchesNodeName as o } from "./dom-queries.mjs";
|
|
10
9
|
const s = "k-grid-header", i = "k-grid-footer", h = "TABLE", a = o(h);
|
|
11
|
-
class
|
|
10
|
+
class c {
|
|
12
11
|
constructor(r) {
|
|
13
12
|
this.element = r, this.list = e(r, t("k-grid"));
|
|
14
13
|
}
|
|
@@ -27,6 +26,6 @@ class d {
|
|
|
27
26
|
}
|
|
28
27
|
export {
|
|
29
28
|
i as FOOTER_CLASS,
|
|
30
|
-
|
|
29
|
+
c as GridQuery,
|
|
31
30
|
s as HEADER_CLASS
|
|
32
31
|
};
|
package/common/utils.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i="k-first",f="k-grid-header",h="k-grid-footer",d=(e,t)=>{const n=t.length;for(let o=0;o<n;o++)e.appendChild(t[o].cloneNode(!0))},p=e=>{const t=document.createElement("div");return t.className="k-grid k-grid-md",t.appendChild(e),t},c=e=>{const t=e.length,n=e[0].cloneNode(!0),o=n.rows.length;if(t>1)for(let l=0;l<o;l++)for(let s=1;s<t;s++)d(n.rows[l],e[s].rows[l].cells);return n},g=(e,t)=>{if(t.length>1&&e.rows.length>1)for(let n=1;n<e.rows.length;n++){const o=t[0].rows[n].cells.length,l=e.rows[n].cells[o];String(l.className).indexOf(i)===-1&&(l.className+=` ${i}`)}},m=(e,t,n,o)=>{const l=document.createElement("table"),s=e[0].cloneNode(!0);for(let r=1;r<e.length;r++)d(s,e[r].querySelectorAll("col"));const a=c(t),C=c(n);if(a.className=f,g(a,t),l.appendChild(s),l.appendChild(a),l.appendChild(C),o.length){const r=c(o);r.className=h,l.appendChild(r)}return p(l)};exports.appendNodes=d;exports.createTable=m;exports.createTableElement=c;exports.setFirstCellClass=g;exports.wrapTable=p;
|
package/common/utils.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const a = "k-first", g = "k-grid-header", h = "k-grid-footer", i = (e, t) => {
|
|
10
9
|
const n = t.length;
|
|
11
10
|
for (let o = 0; o < n; o++)
|
package/getPageMargin.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("./PDFMargin.js");function g(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const l=g(a),i=["bottom","left","right","top"];function u(t){const n=l.Children.toArray(t.children).find(e=>e&&e.type===c.PDFMargin);return n?s(n):t.margin}function s(t){const n={};for(let e=0;e<i.length;e++){const r=i[e],o=t.props[r];o!==void 0&&(n[r]=o)}return n}exports.getPageMargin=u;
|
package/getPageMargin.mjs
CHANGED
|
@@ -5,22 +5,21 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as a from "react";
|
|
10
|
-
import { PDFMargin as
|
|
9
|
+
import { PDFMargin as f } from "./PDFMargin.mjs";
|
|
11
10
|
const i = ["bottom", "left", "right", "top"];
|
|
12
|
-
function
|
|
13
|
-
const n = a.Children.toArray(
|
|
14
|
-
return n ?
|
|
11
|
+
function s(r) {
|
|
12
|
+
const n = a.Children.toArray(r.children).find((t) => t && t.type === f);
|
|
13
|
+
return n ? g(n) : r.margin;
|
|
15
14
|
}
|
|
16
|
-
function
|
|
15
|
+
function g(r) {
|
|
17
16
|
const n = {};
|
|
18
17
|
for (let t = 0; t < i.length; t++) {
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
const o = i[t], e = r.props[o];
|
|
19
|
+
e !== void 0 && (n[o] = e);
|
|
21
20
|
}
|
|
22
21
|
return n;
|
|
23
22
|
}
|
|
24
23
|
export {
|
|
25
|
-
|
|
24
|
+
s as getPageMargin
|
|
26
25
|
};
|
package/grid/GridPDFExport.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),e=require("prop-types"),g=require("../getPageMargin.js"),u=require("../savePDF.js"),d=require("./provideSaveGridPDF.js"),h=require("react-dom");function m(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const s=m(c),a=class a extends s.Component{constructor(t){super(t),this.state={show:!1},this.saveGridPDF=d.provideSaveGridPDF(this.getSavePDF()),this.gridInnerWrapperRef=s.createRef()}componentDidUpdate(t,r){this.state.show&&this.state.show!==r.show&&this.saveGridPDF(this.gridInnerWrapperRef.current,Object.assign({},this.props,{margin:g.getPageMargin(this.props)}),this.callback)}render(){return this.state.show&&h.createPortal(s.createElement("div",{style:{position:"absolute",left:"-5000px",top:"0px"}},s.createElement("div",{ref:this.gridInnerWrapperRef},this.prepareRawGridForExport(this.data))),document.body)}save(t,r){this.grid=this.getGrid(),this.columns=this.getCustomColumns(),this.data=t,this.callback=()=>{this.setState({show:!1}),r&&r()},this.setState({show:!0})}getSavePDF(){return u.savePDF}getGrid(){return s.Children.toArray(this.props.children).find(t=>t&&t.type.displayName==="KendoReactGrid")}getCustomColumns(){return s.Children.toArray(this.props.children).filter(t=>t&&t.type.displayName==="KendoReactGridColumn")}prepareRawGridForExport(t){const r=t&&{data:t,total:t.length,pageSize:t.length,skip:0},i={style:Object.assign({},this.grid.props.style,{width:"1000px"})},p=Object.assign({},r,i);if(this.columns&&this.columns.length>0){const l=this.getGridNotColumnChildren(this.grid);return s.cloneElement(this.grid,p,this.columns.concat(l))}return s.cloneElement(this.grid,p)}getGridNotColumnChildren(t){return s.Children.toArray(t.props.children).filter(r=>r&&r.type&&r.type.displayName!=="KendoReactGridColumn")}};a.propTypes={author:e.string,avoidLinks:e.oneOfType([e.bool,e.string]),forcePageBreak:e.string,keepTogether:e.string,creator:e.string,date:e.instanceOf(Date),imageResolution:e.number,fileName:e.string,forceProxy:e.bool,keywords:e.string,landscape:e.bool,margin:e.oneOfType([e.string,e.number,e.shape({left:e.oneOfType([e.number,e.string]),top:e.oneOfType([e.number,e.string]),right:e.oneOfType([e.number,e.string]),bottom:e.oneOfType([e.number,e.string])})]),pageTemplate:e.any,paperSize:e.any,repeatHeaders:e.bool,scale:e.number,proxyData:e.any,proxyURL:e.string,proxyTarget:e.string,producer:e.string,subject:e.string,title:e.string};let o=a;exports.GridPDFExport=o;
|
package/grid/GridPDFExport.mjs
CHANGED
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as s from "react";
|
|
10
9
|
import e from "prop-types";
|
|
11
|
-
import { getPageMargin as
|
|
12
|
-
import { savePDF as
|
|
10
|
+
import { getPageMargin as h } from "../getPageMargin.mjs";
|
|
11
|
+
import { savePDF as l } from "../savePDF.mjs";
|
|
13
12
|
import { provideSaveGridPDF as g } from "./provideSaveGridPDF.mjs";
|
|
14
13
|
import { createPortal as m } from "react-dom";
|
|
15
14
|
const i = class i extends s.Component {
|
|
@@ -24,7 +23,7 @@ const i = class i extends s.Component {
|
|
|
24
23
|
componentDidUpdate(t, r) {
|
|
25
24
|
this.state.show && this.state.show !== r.show && this.saveGridPDF(
|
|
26
25
|
this.gridInnerWrapperRef.current,
|
|
27
|
-
Object.assign({}, this.props, { margin:
|
|
26
|
+
Object.assign({}, this.props, { margin: h(this.props) }),
|
|
28
27
|
this.callback
|
|
29
28
|
);
|
|
30
29
|
}
|
|
@@ -61,7 +60,7 @@ const i = class i extends s.Component {
|
|
|
61
60
|
}, this.setState({ show: !0 });
|
|
62
61
|
}
|
|
63
62
|
getSavePDF() {
|
|
64
|
-
return
|
|
63
|
+
return l;
|
|
65
64
|
}
|
|
66
65
|
getGrid() {
|
|
67
66
|
return s.Children.toArray(this.props.children).find(
|
package/grid/export-element.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./grid-query.js"),c=require("../common/utils.js"),i=n=>{const e=new d.GridQuery(n),t=e.content();let o;if(t){const l=[t.querySelector("colgroup")],s=[e.header().querySelector("thead")],u=[t.querySelector("tbody")],r=e.footer(),a=r?[r.querySelector("tfoot")]:[];o=c.createTable(l,s,u,a)}else o=c.wrapTable(e.table().cloneNode(!0));return o};exports.exportElement=i;
|
package/grid/export-element.mjs
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { GridQuery as a } from "./grid-query.mjs";
|
|
10
9
|
import { createTable as d, wrapTable as f } from "../common/utils.mjs";
|
|
11
|
-
const
|
|
10
|
+
const b = (c) => {
|
|
12
11
|
const e = new a(c), o = e.content();
|
|
13
12
|
let t;
|
|
14
13
|
if (o) {
|
|
@@ -19,5 +18,5 @@ const i = (c) => {
|
|
|
19
18
|
return t;
|
|
20
19
|
};
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
b as exportElement
|
|
23
22
|
};
|
package/grid/grid-query.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../common/dom-queries.js"),s="k-grid-header",r="k-grid-footer",a="TABLE",o=e.matchesNodeName(a),i=n=>n?"locked":"wrap";class l{constructor(t){this.element=t,this.list=e.findElement(t,e.matchesClasses("k-grid-container"))}content(t){return e.findElement(this.list,e.matchesClasses(`k-grid-content${t?"-locked":""}`))}header(t){return this.headerWrap=this.headerWrap||e.findElement(this.element,e.matchesClasses(s)),e.findElement(this.headerWrap,e.matchesClasses(`${s}-${i(t)}`))}footer(t){return this.footerWrap=this.footerWrap||e.findElement(this.element,e.matchesClasses(r)),e.findElement(this.footerWrap,e.matchesClasses(`${r}-${i(t)}`))}table(){return e.findElement(this.element,o)}}exports.FOOTER_CLASS=r;exports.GridQuery=l;exports.HEADER_CLASS=s;
|
package/grid/grid-query.mjs
CHANGED
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const o = "k-grid-header", i = "k-grid-footer", h = "TABLE", c = a(h), n = (s) => s ? "locked" : "wrap";
|
|
8
|
+
import { findElement as t, matchesClasses as r, matchesNodeName as n } from "../common/dom-queries.mjs";
|
|
9
|
+
const o = "k-grid-header", i = "k-grid-footer", h = "TABLE", c = n(h), a = (s) => s ? "locked" : "wrap";
|
|
11
10
|
class l {
|
|
12
11
|
constructor(e) {
|
|
13
12
|
this.element = e, this.list = t(e, r("k-grid-container"));
|
|
@@ -16,10 +15,10 @@ class l {
|
|
|
16
15
|
return t(this.list, r(`k-grid-content${e ? "-locked" : ""}`));
|
|
17
16
|
}
|
|
18
17
|
header(e) {
|
|
19
|
-
return this.headerWrap = this.headerWrap || t(this.element, r(o)), t(this.headerWrap, r(`${o}-${
|
|
18
|
+
return this.headerWrap = this.headerWrap || t(this.element, r(o)), t(this.headerWrap, r(`${o}-${a(e)}`));
|
|
20
19
|
}
|
|
21
20
|
footer(e) {
|
|
22
|
-
return this.footerWrap = this.footerWrap || t(this.element, r(i)), t(this.footerWrap, r(`${i}-${
|
|
21
|
+
return this.footerWrap = this.footerWrap || t(this.element, r(i)), t(this.footerWrap, r(`${i}-${a(e)}`));
|
|
23
22
|
}
|
|
24
23
|
table() {
|
|
25
24
|
return t(this.element, c);
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./export-element.js");function p(t){return(r,o={},n)=>c(t,r,o,n)}function c(t,r,o={},n){let e;i();function i(){t(u(),o,l)}function l(){document.body.removeChild(e),e=void 0,n&&n()}function u(){e=document.createElement("div"),e.className="k-grid-pdf-export-element";const d=a.exportElement(r);return e.appendChild(d),document.body.appendChild(e),d}}exports.provideSaveGridPDF=p;
|
|
@@ -5,23 +5,22 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return (r, o = {}, n) => a(t, r, o, n);
|
|
8
|
+
import { exportElement as a } from "./export-element.mjs";
|
|
9
|
+
function m(r) {
|
|
10
|
+
return (t, o = {}, n) => u(r, t, o, n);
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function u(r, t, o = {}, n) {
|
|
14
13
|
let e;
|
|
15
14
|
i();
|
|
16
15
|
function i() {
|
|
17
|
-
|
|
16
|
+
r(l(), o, p);
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function p() {
|
|
20
19
|
document.body.removeChild(e), e = void 0, n && n();
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function l() {
|
|
23
22
|
e = document.createElement("div"), e.className = "k-grid-pdf-export-element";
|
|
24
|
-
const d =
|
|
23
|
+
const d = a(t);
|
|
25
24
|
return e.appendChild(d), document.body.appendChild(e), d;
|
|
26
25
|
}
|
|
27
26
|
}
|
package/index.js
CHANGED
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./PDFExport.js"),e=require("./PDFMargin.js"),t=require("./savePDF.js"),i=require("./getPageMargin.js"),o=require("./grid/GridPDFExport.js"),n=require("./treelist/TreeListPDFExport.js"),P=require("./KendoDrawingAdapter.js");exports.PDFExport=r.PDFExport;exports.PDFMargin=e.PDFMargin;exports.savePDF=t.savePDF;exports.getPageMargin=i.getPageMargin;exports.GridPDFExport=o.GridPDFExport;exports.TreeListPDFExport=n.TreeListPDFExport;exports.KendoDrawingAdapter=P;
|
package/index.mjs
CHANGED
|
@@ -10,15 +10,15 @@ import { PDFExport as e } from "./PDFExport.mjs";
|
|
|
10
10
|
import { PDFMargin as p } from "./PDFMargin.mjs";
|
|
11
11
|
import { savePDF as a } from "./savePDF.mjs";
|
|
12
12
|
import { getPageMargin as m } from "./getPageMargin.mjs";
|
|
13
|
-
import { GridPDFExport as
|
|
14
|
-
import { TreeListPDFExport as
|
|
15
|
-
import { default as
|
|
13
|
+
import { GridPDFExport as P } from "./grid/GridPDFExport.mjs";
|
|
14
|
+
import { TreeListPDFExport as i } from "./treelist/TreeListPDFExport.mjs";
|
|
15
|
+
import { default as d } from "./KendoDrawingAdapter.mjs";
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
P as GridPDFExport,
|
|
18
|
+
d as KendoDrawingAdapter,
|
|
19
19
|
e as PDFExport,
|
|
20
20
|
p as PDFMargin,
|
|
21
|
-
|
|
21
|
+
i as TreeListPDFExport,
|
|
22
22
|
m as getPageMargin,
|
|
23
23
|
a as savePDF
|
|
24
24
|
};
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1738137043,version:"9.4.0-develop.8",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const e = {
|
|
10
9
|
name: "@progress/kendo-react-pdf",
|
|
11
10
|
productName: "KendoReact",
|
|
12
11
|
productCode: "KENDOUIREACT",
|
|
13
12
|
productCodes: ["KENDOUIREACT"],
|
|
14
|
-
publishDate:
|
|
15
|
-
version: "9.4.0-develop.
|
|
13
|
+
publishDate: 1738137043,
|
|
14
|
+
version: "9.4.0-develop.8",
|
|
16
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
17
16
|
};
|
|
18
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-pdf",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.8",
|
|
4
4
|
"description": "React PDF Processing enables you to export single- and multi-page content in PDF. KendoReact PDF Processing package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@progress/kendo-drawing": "^1.21.2",
|
|
29
29
|
"@progress/kendo-file-saver": "^1.0.1",
|
|
30
30
|
"@progress/kendo-licensing": "^1.3.4",
|
|
31
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
31
|
+
"@progress/kendo-react-common": "9.4.0-develop.8",
|
|
32
32
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
33
33
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
34
34
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"package": {
|
|
55
55
|
"productName": "KendoReact",
|
|
56
56
|
"productCode": "KENDOUIREACT",
|
|
57
|
-
"publishDate":
|
|
57
|
+
"publishDate": 1738137043,
|
|
58
58
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
59
59
|
}
|
|
60
60
|
},
|
package/savePDF.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@progress/kendo-drawing"),t=require("@progress/kendo-file-saver"),a=require("./KendoDrawingAdapter.js");function i(r,n={},o){new a(e.drawDOM,e.exportPDF,t.saveAs,r,n).savePDF(o)}exports.savePDF=i;
|
package/savePDF.mjs
CHANGED
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { drawDOM as t, exportPDF as a } from "@progress/kendo-drawing";
|
|
10
|
-
import { saveAs as
|
|
11
|
-
import
|
|
12
|
-
function
|
|
13
|
-
new
|
|
9
|
+
import { saveAs as m } from "@progress/kendo-file-saver";
|
|
10
|
+
import p from "./KendoDrawingAdapter.mjs";
|
|
11
|
+
function f(r, o = {}, e) {
|
|
12
|
+
new p(t, a, m, r, o).savePDF(e);
|
|
14
13
|
}
|
|
15
14
|
export {
|
|
16
|
-
|
|
15
|
+
f as savePDF
|
|
17
16
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),e=require("prop-types"),c=require("../getPageMargin.js"),l=require("../savePDF.js"),u=require("./provideSaveTreeListPDF.js"),g=require("react-dom");function h(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>n[s]})}}return t.default=n,Object.freeze(t)}const i=h(p),a=class a extends i.Component{constructor(t){super(t),this.state={show:!1},this.saveTreeListPDF=u.provideSaveTreeListPDF(this.getSavePDF()),this.treeListInnerWrapperRef=i.createRef()}componentDidUpdate(t,s){this.state.show&&this.state.show!==s.show&&this.saveTreeListPDF(this.treeListInnerWrapperRef.current,Object.assign({},this.props,{margin:c.getPageMargin(this.props)}),this.callback)}render(){return this.state.show&&g.createPortal(i.createElement("div",{style:{position:"absolute",left:"-5000px",top:"0px"}},i.createElement("div",{ref:this.treeListInnerWrapperRef},this.prepareRawTreeListForExport())),document.body)}save(t,s,r){this.treeList=this.getTreeList(),this.columns=s||[],this.data=t,this.callback=()=>{this.setState({show:!1}),r&&r()},this.setState({show:!0})}getSavePDF(){return l.savePDF}getTreeList(){const t=this.props.children;if(t&&t.props.data&&t.props.columns)return this.props.children}prepareRawTreeListForExport(){const t=this.props.allPages&&this.data?{data:this.data,take:Number.MAX_VALUE,skip:0}:{},s={style:Object.assign({},this.treeList.props.style,{width:"1000px"})},r=Object.assign({},t,s);return this.columns&&this.columns.length>0?i.cloneElement(this.treeList,Object.assign({},r,{columns:this.columns})):i.cloneElement(this.treeList,r)}};a.propTypes={author:e.string,avoidLinks:e.oneOfType([e.bool,e.string]),forcePageBreak:e.string,keepTogether:e.string,creator:e.string,date:e.instanceOf(Date),imageResolution:e.number,fileName:e.string,forceProxy:e.bool,keywords:e.string,landscape:e.bool,margin:e.oneOfType([e.string,e.number,e.shape({left:e.oneOfType([e.number,e.string]),top:e.oneOfType([e.number,e.string]),right:e.oneOfType([e.number,e.string]),bottom:e.oneOfType([e.number,e.string])})]),pageTemplate:e.any,paperSize:e.any,repeatHeaders:e.bool,scale:e.number,proxyData:e.any,proxyURL:e.string,proxyTarget:e.string,producer:e.string,subject:e.string,title:e.string,allPages:e.bool};let o=a;exports.TreeListPDFExport=o;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as s from "react";
|
|
10
9
|
import e from "prop-types";
|
|
11
10
|
import { getPageMargin as a } from "../getPageMargin.mjs";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../common/table-query.js"),s=require("../common/utils.js"),h=n=>{const t=new a.GridQuery(n),o=t.content();let r;const e=t.header();if(e.childNodes.length>1&&e.removeChild(e.childNodes[1]),e.childNodes[0].childNodes.forEach(c=>c.style.top=0),o){const c=[o.querySelector("colgroup")],d=[e],u=[o.querySelector("tbody")],l=t.footer(),i=l?[l.querySelector("tfoot")]:[];r=s.createTable(c,d,u,i)}else r=s.wrapTable(t.table().cloneNode(!0));return r};exports.exportElement=h;
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import { createTable as h, wrapTable as a } from "../common/utils.mjs";
|
|
8
|
+
import { GridQuery as h } from "../common/table-query.mjs";
|
|
9
|
+
import { createTable as u, wrapTable as a } from "../common/utils.mjs";
|
|
11
10
|
const y = (s) => {
|
|
12
|
-
const o = new
|
|
11
|
+
const o = new h(s), t = o.content();
|
|
13
12
|
let r;
|
|
14
13
|
const e = o.header();
|
|
15
14
|
if (e.childNodes.length > 1 && e.removeChild(e.childNodes[1]), e.childNodes[0].childNodes.forEach((c) => c.style.top = 0), t) {
|
|
16
15
|
const c = [t.querySelector("colgroup")], n = [e], d = [t.querySelector("tbody")], l = o.footer(), i = l ? [l.querySelector("tfoot")] : [];
|
|
17
|
-
r =
|
|
16
|
+
r = u(c, n, d, i);
|
|
18
17
|
} else
|
|
19
18
|
r = a(o.table().cloneNode(!0));
|
|
20
19
|
return r;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./export-element.js");function p(n){return(r,o={},t)=>c(n,r,o,t)}function c(n,r,o={},t){let e;i();function i(){n(l(),o,d)}function d(){document.body.removeChild(e),e=void 0,t&&t()}function l(){e=document.createElement("div"),e.className="k-treelist-pdf-export-element";const u=a.exportElement(r);return e.appendChild(u),document.body.appendChild(e),e}}exports.provideSaveTreeListPDF=p;
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import { exportElement as u } from "./export-element.mjs";
|
|
8
|
+
import { exportElement as a } from "./export-element.mjs";
|
|
10
9
|
function m(t) {
|
|
11
|
-
return (r, o = {}, n) =>
|
|
10
|
+
return (r, o = {}, n) => u(t, r, o, n);
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function u(t, r, o = {}, n) {
|
|
14
13
|
let e;
|
|
15
14
|
i();
|
|
16
15
|
function i() {
|
|
@@ -21,7 +20,7 @@ function a(t, r, o = {}, n) {
|
|
|
21
20
|
}
|
|
22
21
|
function l() {
|
|
23
22
|
e = document.createElement("div"), e.className = "k-treelist-pdf-export-element";
|
|
24
|
-
const p =
|
|
23
|
+
const p = a(r);
|
|
25
24
|
return e.appendChild(p), document.body.appendChild(e), e;
|
|
26
25
|
}
|
|
27
26
|
}
|