@progress/kendo-vue-pdf 5.3.0-dev.202410141143 → 5.3.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/KendoDrawingAdapter.js +8 -0
- package/KendoDrawingAdapter.mjs +96 -0
- package/PDFExport.js +8 -0
- package/PDFExport.mjs +67 -0
- package/README.md +26 -33
- package/common/dom-queries.js +8 -0
- package/common/dom-queries.mjs +30 -0
- package/common/table-query.js +8 -0
- package/common/table-query.mjs +31 -0
- package/common/utils.js +8 -0
- package/common/utils.mjs +45 -0
- package/dist/cdn/js/kendo-vue-pdf.js +8 -1
- package/grid/GridPDFExport.js +8 -0
- package/grid/GridPDFExport.mjs +57 -0
- package/grid/export-element.js +8 -0
- package/grid/export-element.mjs +22 -0
- package/grid/grid-query.js +8 -0
- package/grid/grid-query.mjs +31 -0
- package/grid/provideSaveGridPDF.js +8 -0
- package/grid/provideSaveGridPDF.mjs +67 -0
- package/index.d.mts +369 -0
- package/index.d.ts +369 -0
- package/index.js +8 -0
- package/index.mjs +17 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +18 -0
- package/package.json +28 -36
- package/savePDF.js +8 -0
- package/savePDF.mjs +22 -0
- package/treelist/TreeListPDFExport.js +8 -0
- package/treelist/TreeListPDFExport.mjs +57 -0
- package/treelist/export-element.js +8 -0
- package/treelist/export-element.mjs +25 -0
- package/treelist/provideSaveTreeListPDF.js +8 -0
- package/treelist/provideSaveTreeListPDF.mjs +66 -0
- package/dist/es/KendoDrawingAdapter.d.ts +0 -20
- package/dist/es/KendoDrawingAdapter.js +0 -115
- package/dist/es/PDFExport.d.ts +0 -15
- package/dist/es/PDFExport.js +0 -72
- package/dist/es/PDFExportProps.d.ts +0 -146
- package/dist/es/PDFExportProps.js +0 -1
- package/dist/es/PageTemplateProps.d.ts +0 -14
- package/dist/es/PageTemplateProps.js +0 -1
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/common/dom-queries.d.ts +0 -44
- package/dist/es/common/dom-queries.js +0 -123
- package/dist/es/common/table-query.d.ts +0 -22
- package/dist/es/common/table-query.js +0 -36
- package/dist/es/common/utils.d.ts +0 -20
- package/dist/es/common/utils.js +0 -74
- package/dist/es/grid/GridPDFExport.d.ts +0 -37
- package/dist/es/grid/GridPDFExport.js +0 -75
- package/dist/es/grid/export-element.d.ts +0 -4
- package/dist/es/grid/export-element.js +0 -22
- package/dist/es/grid/grid-query.d.ts +0 -22
- package/dist/es/grid/grid-query.js +0 -37
- package/dist/es/grid/provideSaveGridPDF.d.ts +0 -5
- package/dist/es/grid/provideSaveGridPDF.js +0 -116
- package/dist/es/main.d.ts +0 -7
- package/dist/es/main.js +0 -11
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/savePDF.d.ts +0 -9
- package/dist/es/savePDF.js +0 -14
- package/dist/es/treelist/TreeListPDFExport.d.ts +0 -37
- package/dist/es/treelist/TreeListPDFExport.js +0 -75
- package/dist/es/treelist/export-element.d.ts +0 -4
- package/dist/es/treelist/export-element.js +0 -31
- package/dist/es/treelist/provideSaveTreeListPDF.d.ts +0 -5
- package/dist/es/treelist/provideSaveTreeListPDF.js +0 -116
- package/dist/esm/KendoDrawingAdapter.d.ts +0 -20
- package/dist/esm/KendoDrawingAdapter.js +0 -115
- package/dist/esm/PDFExport.d.ts +0 -15
- package/dist/esm/PDFExport.js +0 -72
- package/dist/esm/PDFExportProps.d.ts +0 -146
- package/dist/esm/PDFExportProps.js +0 -1
- package/dist/esm/PageTemplateProps.d.ts +0 -14
- package/dist/esm/PageTemplateProps.js +0 -1
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/common/dom-queries.d.ts +0 -44
- package/dist/esm/common/dom-queries.js +0 -123
- package/dist/esm/common/table-query.d.ts +0 -22
- package/dist/esm/common/table-query.js +0 -36
- package/dist/esm/common/utils.d.ts +0 -20
- package/dist/esm/common/utils.js +0 -74
- package/dist/esm/grid/GridPDFExport.d.ts +0 -37
- package/dist/esm/grid/GridPDFExport.js +0 -75
- package/dist/esm/grid/export-element.d.ts +0 -4
- package/dist/esm/grid/export-element.js +0 -22
- package/dist/esm/grid/grid-query.d.ts +0 -22
- package/dist/esm/grid/grid-query.js +0 -37
- package/dist/esm/grid/provideSaveGridPDF.d.ts +0 -5
- package/dist/esm/grid/provideSaveGridPDF.js +0 -116
- package/dist/esm/main.d.ts +0 -7
- package/dist/esm/main.js +0 -11
- package/dist/esm/package-metadata.d.ts +0 -5
- package/dist/esm/package-metadata.js +0 -11
- package/dist/esm/package.json +0 -3
- package/dist/esm/savePDF.d.ts +0 -9
- package/dist/esm/savePDF.js +0 -14
- package/dist/esm/treelist/TreeListPDFExport.d.ts +0 -37
- package/dist/esm/treelist/TreeListPDFExport.js +0 -75
- package/dist/esm/treelist/export-element.d.ts +0 -4
- package/dist/esm/treelist/export-element.js +0 -31
- package/dist/esm/treelist/provideSaveTreeListPDF.d.ts +0 -5
- package/dist/esm/treelist/provideSaveTreeListPDF.js +0 -116
- package/dist/npm/KendoDrawingAdapter.d.ts +0 -20
- package/dist/npm/KendoDrawingAdapter.js +0 -117
- package/dist/npm/PDFExport.d.ts +0 -15
- package/dist/npm/PDFExport.js +0 -80
- package/dist/npm/PDFExportProps.d.ts +0 -146
- package/dist/npm/PDFExportProps.js +0 -2
- package/dist/npm/PageTemplateProps.d.ts +0 -14
- package/dist/npm/PageTemplateProps.js +0 -2
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/common/dom-queries.d.ts +0 -44
- package/dist/npm/common/dom-queries.js +0 -137
- package/dist/npm/common/table-query.d.ts +0 -22
- package/dist/npm/common/table-query.js +0 -39
- package/dist/npm/common/utils.d.ts +0 -20
- package/dist/npm/common/utils.js +0 -82
- package/dist/npm/grid/GridPDFExport.d.ts +0 -37
- package/dist/npm/grid/GridPDFExport.js +0 -82
- package/dist/npm/grid/export-element.d.ts +0 -4
- package/dist/npm/grid/export-element.js +0 -26
- package/dist/npm/grid/grid-query.d.ts +0 -22
- package/dist/npm/grid/grid-query.js +0 -40
- package/dist/npm/grid/provideSaveGridPDF.d.ts +0 -5
- package/dist/npm/grid/provideSaveGridPDF.js +0 -123
- package/dist/npm/main.d.ts +0 -7
- package/dist/npm/main.js +0 -20
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/savePDF.d.ts +0 -9
- package/dist/npm/savePDF.js +0 -18
- package/dist/npm/treelist/TreeListPDFExport.d.ts +0 -37
- package/dist/npm/treelist/TreeListPDFExport.js +0 -82
- package/dist/npm/treelist/export-element.d.ts +0 -4
- package/dist/npm/treelist/export-element.js +0 -35
- package/dist/npm/treelist/provideSaveTreeListPDF.d.ts +0 -5
- package/dist/npm/treelist/provideSaveTreeListPDF.js +0 -123
|
@@ -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 strict";const m=require("vue");require("@progress/kendo-drawing");require("@progress/kendo-drawing/pdf");require("@progress/kendo-file-saver");const g=require("@progress/kendo-vue-common");function f(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const P=f(m),a=P,u=a.h,h=a.createApp,T="export.pdf",D="Kendo UI PDF Generator";class x{constructor(t,e,o,l,d={}){this.drawDOM=t,this.exportPDF=e,this.saveAs=o,this.domElement=l,this.options=d,this.convertPageTemplateToHtml=p=>{if(u&&h&&g.canUseDOM){const c=this,i=document.createElement("div");i.setAttribute("style","position:absolute; left: -5000px; top: 0px;");const r=document.createElement("div");i.appendChild(r),document.body.appendChild(i);let s;return s=h({render:function(){return u(c.options.pageTemplate,{pageNum:p.pageNum,totalPages:p.totalPages})},mounted:function(){this.$nextTick(function(){document.body.removeChild(i),s.unmount()})}}),s.mount(r),r.outerHTML}else{const c=a.extend?a:a.default,r=c.extend.call(c,this.options.pageTemplate),s=new r({propsData:{pageNum:p.pageNum,totalPages:p.totalPages}});return s.$mount(),s.$nextTick(function(){s.$destroy()}),s.$el.outerHTML}}}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||T,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||D,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=x;
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
import * as l from "vue";
|
|
9
|
+
import "@progress/kendo-drawing";
|
|
10
|
+
import "@progress/kendo-drawing/pdf";
|
|
11
|
+
import "@progress/kendo-file-saver";
|
|
12
|
+
import { canUseDOM as u } from "@progress/kendo-vue-common";
|
|
13
|
+
const n = l, h = n.h, m = n.createApp, g = "export.pdf", P = "Kendo UI PDF Generator";
|
|
14
|
+
class k {
|
|
15
|
+
constructor(e, r, o, c, d = {}) {
|
|
16
|
+
this.drawDOM = e, this.exportPDF = r, this.saveAs = o, this.domElement = c, this.options = d, this.convertPageTemplateToHtml = (p) => {
|
|
17
|
+
if (h && m && u) {
|
|
18
|
+
const a = this, s = document.createElement("div");
|
|
19
|
+
s.setAttribute("style", "position:absolute; left: -5000px; top: 0px;");
|
|
20
|
+
const i = document.createElement("div");
|
|
21
|
+
s.appendChild(i), document.body.appendChild(s);
|
|
22
|
+
let t;
|
|
23
|
+
return t = m({
|
|
24
|
+
render: function() {
|
|
25
|
+
return h(
|
|
26
|
+
a.options.pageTemplate,
|
|
27
|
+
{
|
|
28
|
+
pageNum: p.pageNum,
|
|
29
|
+
totalPages: p.totalPages
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
mounted: function() {
|
|
34
|
+
this.$nextTick(function() {
|
|
35
|
+
document.body.removeChild(s), t.unmount();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}), t.mount(i), i.outerHTML;
|
|
39
|
+
} else {
|
|
40
|
+
const a = n.extend ? n : n.default, i = a.extend.call(a, this.options.pageTemplate), t = new i({
|
|
41
|
+
propsData: {
|
|
42
|
+
pageNum: p.pageNum,
|
|
43
|
+
totalPages: p.totalPages
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return t.$mount(), t.$nextTick(function() {
|
|
47
|
+
t.$destroy();
|
|
48
|
+
}), t.$el.outerHTML;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
savePDF(e) {
|
|
53
|
+
const r = this.drawDOM(this.domElement, this.getDrawOptions()).then((o) => this.exportPDF(o, this.getPDFOptions())).then((o) => this.saveAs(o, this.options.fileName || g, this.getSaveOptions()));
|
|
54
|
+
e && r.then(e, e);
|
|
55
|
+
}
|
|
56
|
+
getDrawOptions() {
|
|
57
|
+
return {
|
|
58
|
+
avoidLinks: this.options.avoidLinks,
|
|
59
|
+
forcePageBreak: this.options.forcePageBreak,
|
|
60
|
+
keepTogether: this.options.keepTogether,
|
|
61
|
+
margin: this.options.margin,
|
|
62
|
+
paperSize: this.options.paperSize,
|
|
63
|
+
landscape: this.options.landscape,
|
|
64
|
+
repeatHeaders: this.options.repeatHeaders,
|
|
65
|
+
scale: this.options.scale,
|
|
66
|
+
template: this.options.pageTemplate && this.convertPageTemplateToHtml
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
getPDFOptions() {
|
|
70
|
+
return {
|
|
71
|
+
author: this.options.author,
|
|
72
|
+
creator: this.options.creator || P,
|
|
73
|
+
date: this.options.date,
|
|
74
|
+
imgDPI: this.options.imageResolution,
|
|
75
|
+
keywords: this.options.keywords,
|
|
76
|
+
landscape: this.options.landscape,
|
|
77
|
+
margin: this.options.margin,
|
|
78
|
+
multiPage: !0,
|
|
79
|
+
paperSize: this.options.paperSize,
|
|
80
|
+
producer: this.options.producer,
|
|
81
|
+
subject: this.options.subject,
|
|
82
|
+
title: this.options.title
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
getSaveOptions() {
|
|
86
|
+
return {
|
|
87
|
+
forceProxy: this.options.forceProxy,
|
|
88
|
+
proxyData: this.options.proxyData,
|
|
89
|
+
proxyTarget: this.options.proxyTarget,
|
|
90
|
+
proxyURL: this.options.proxyURL
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
k as default
|
|
96
|
+
};
|
package/PDFExport.js
ADDED
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("@progress/kendo-drawing"),o=require("@progress/kendo-file-saver"),n=require("./KendoDrawingAdapter.js"),a=require("@progress/kendo-vue-common"),i=require("./package-metadata.js"),c=t.defineComponent({name:"pdf-export",props:{author:String,avoidLinks:[Boolean,String],forcePageBreak:String,keepTogether:String,creator:String,date:Date,imageResolution:Number,fileName:String,forceProxy:Boolean,keywords:String,landscape:Boolean,margin:[String,Object],pageTemplate:[Object,Function],paperSize:[String,Object],repeatHeaders:Boolean,scale:Number,proxyData:Object,proxyURL:String,proxyTarget:String,producer:String,subject:String,title:String},methods:{save(e){new n(r.drawDOM,r.exportPDF,o.saveAs,this.$el,this.$props).savePDF(e)}},created:function(){a.validatePackage(i.packageMetadata)},render(){const e=a.getDefaultSlots(this);return t.createVNode("div",null,[e])}});exports.PDFExport=c;
|
package/PDFExport.mjs
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
import { defineComponent as r, createVNode as t } from "vue";
|
|
9
|
+
import { drawDOM as o, exportPDF as a } from "@progress/kendo-drawing";
|
|
10
|
+
import { saveAs as n } from "@progress/kendo-file-saver";
|
|
11
|
+
import i from "./KendoDrawingAdapter.mjs";
|
|
12
|
+
import { validatePackage as p, getDefaultSlots as g } from "@progress/kendo-vue-common";
|
|
13
|
+
import { packageMetadata as m } from "./package-metadata.mjs";
|
|
14
|
+
const u = /* @__PURE__ */ r({
|
|
15
|
+
name: "pdf-export",
|
|
16
|
+
props: {
|
|
17
|
+
author: String,
|
|
18
|
+
avoidLinks: [Boolean, String],
|
|
19
|
+
forcePageBreak: String,
|
|
20
|
+
keepTogether: String,
|
|
21
|
+
creator: String,
|
|
22
|
+
date: Date,
|
|
23
|
+
imageResolution: Number,
|
|
24
|
+
fileName: String,
|
|
25
|
+
forceProxy: Boolean,
|
|
26
|
+
keywords: String,
|
|
27
|
+
landscape: Boolean,
|
|
28
|
+
margin: [String, Object],
|
|
29
|
+
pageTemplate: [Object, Function],
|
|
30
|
+
paperSize: [String, Object],
|
|
31
|
+
repeatHeaders: Boolean,
|
|
32
|
+
scale: Number,
|
|
33
|
+
proxyData: Object,
|
|
34
|
+
proxyURL: String,
|
|
35
|
+
proxyTarget: String,
|
|
36
|
+
producer: String,
|
|
37
|
+
subject: String,
|
|
38
|
+
title: String
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
save(e) {
|
|
42
|
+
new i(
|
|
43
|
+
o,
|
|
44
|
+
a,
|
|
45
|
+
n,
|
|
46
|
+
this.$el,
|
|
47
|
+
// To do: we should consider whether we need a margin-top, margin-left, etc. props
|
|
48
|
+
this.$props
|
|
49
|
+
).savePDF(e);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created: function() {
|
|
53
|
+
p(m);
|
|
54
|
+
},
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
render() {
|
|
57
|
+
const e = g(this);
|
|
58
|
+
return t("div", null, [e]);
|
|
59
|
+
}
|
|
60
|
+
// To do: we should consider whether we need a margin-top, margin-left, etc. props
|
|
61
|
+
// private getOptions() {
|
|
62
|
+
// return Object.assign({}, this.$props, { margin: getPageMrgin(this.$props) });
|
|
63
|
+
// }
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
u as PDFExport
|
|
67
|
+
};
|
package/README.md
CHANGED
|
@@ -1,53 +1,46 @@
|
|
|
1
|
-
<a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-
|
|
1
|
+
<a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-utils&utm_content=banner" target="_blank">
|
|
2
2
|
<img src="https://www.telerik.com/kendo-vue-ui/npm-banner.svg" alt="Kendo UI for Vue NPM Banner">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
## Kendo UI for Vue PDF Processing Component for Vue
|
|
5
|
+
## Kendo UI for Vue Pdf Package for Vue
|
|
7
6
|
|
|
8
7
|
> **Important**
|
|
9
|
-
> * This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-pdf)—a commercial UI library.
|
|
10
|
-
> * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-pdf).
|
|
11
|
-
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-pdf) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-pdf). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-pdf).
|
|
12
|
-
> * The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
|
|
13
8
|
>
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
> - This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/kendo-vue-ui-develop/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf).
|
|
12
|
+
> - The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
|
|
13
|
+
>
|
|
14
|
+
> [Start using Kendo UI for Vue](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf) and speed up your development process!
|
|
17
15
|
|
|
18
|
-
## Vue
|
|
16
|
+
## Vue Pdf
|
|
19
17
|
|
|
20
18
|
> Historically, all Kendo UI for Vue Native components support both **Vue 2** and **Vue 3**, however, Vue 2 is currently in its end-of-support phase till Nov 2024. After our last major release for 2024, Vue 2 will no longer be supported in the new versions of the Kendo UI for Vue components. Please check our [Vue 2 End of Support article](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/) for more details.
|
|
21
19
|
|
|
22
|
-
Among the features which the Kendo UI for Vue
|
|
20
|
+
Among the many features which the Kendo UI for Vue Pdf deliver are:
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* Configuration of margins—The PDF Processing package delivers options for setting the margins of the output PDF files.
|
|
28
|
-
* Repeated table headers—The PDF Processing component enables you to render recurrent table headers.
|
|
29
|
-
* Multi-page content—The PDF Processing component provides options for generating multi-page content in PDF, preventing the page-split, and rendering page templates.
|
|
30
|
-
* Hidden content—You can generate content in PDF which is otherwise not visible to the user during the PDF export itself.
|
|
31
|
-
* Base64 Strings—You can create base64 string during the PDF export.
|
|
32
|
-
* Styling of content—You can change the appearance of the content with CSS rules that apply only to the PDF file.
|
|
33
|
-
* Theme support—The Kendo UI for Vue PDF Processing, as well as all 80+ components in the Kendo UI for Vue suite, are styled in four polished themes (Bootstrap, Material, Default and Fluent) and can be further customized to match your specific design guidelines.
|
|
22
|
+
- TODO 1
|
|
23
|
+
- TODO 2
|
|
24
|
+
- TODO 3
|
|
34
25
|
|
|
35
26
|
## Support Options
|
|
36
27
|
|
|
37
|
-
For any issues you might encounter while working with the Kendo UI for Vue
|
|
28
|
+
For any issues you might encounter while working with the Kendo UI for Vue Pdf, use any of the available support channels:
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
- Industry-leading technical support—Kendo UI for Vue paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated Kendo UI for Vue support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf).
|
|
31
|
+
- Product forums—The [Kendo UI for Vue forums](https://www.telerik.com/forums/kendo-ui-vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf) are part of the free support you can get from the community and from the Kendo UI for Vue team.
|
|
32
|
+
- Feedback portal—The [Kendo UI for Vue feedback portal](https://feedback.telerik.com/kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf) is where you can request and vote for new features to be added.
|
|
42
33
|
|
|
43
34
|
## Resources
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
- [Getting Started with Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
37
|
+
- [Getting Started with the Kendo UI for Vue Pdf](https://www.telerik.com/kendo-vue-ui/components/pdf/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
38
|
+
- [API Reference of the Kendo UI for Vue Pdf](https://www.telerik.com/kendo-vue-ui/components/pdf/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
39
|
+
- [Kendo UI for Vue Roadmap](https://www.telerik.com/kendo-vue-ui/roadmap/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
40
|
+
- [Blogs](https://www.telerik.com/blogs/tag/vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
41
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-vue-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
42
|
+
- [Kendo UI for Vue pricing and licensing](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmpdf)
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
52
45
|
|
|
53
|
-
|
|
46
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
|
@@ -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 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;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
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) => {
|
|
12
|
+
if (t) {
|
|
13
|
+
if (r && s(t))
|
|
14
|
+
return t;
|
|
15
|
+
for (t = t.firstChild; t; ) {
|
|
16
|
+
if (t.nodeType === 1) {
|
|
17
|
+
const i = a(t, s);
|
|
18
|
+
if (i)
|
|
19
|
+
return i;
|
|
20
|
+
}
|
|
21
|
+
t = t.nextSibling;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
a as findElement,
|
|
27
|
+
l as hasClasses,
|
|
28
|
+
c as matchesClasses,
|
|
29
|
+
f as matchesNodeName
|
|
30
|
+
};
|
|
@@ -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 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;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { findElement as e, matchesClasses as t, matchesNodeName as o } from "./dom-queries.mjs";
|
|
9
|
+
const s = "k-grid-header", i = "k-grid-footer", h = "TABLE", a = o(h);
|
|
10
|
+
class c {
|
|
11
|
+
constructor(r) {
|
|
12
|
+
this.element = r, this.list = e(r, t("k-grid"));
|
|
13
|
+
}
|
|
14
|
+
content() {
|
|
15
|
+
return e(this.list, t("k-grid"));
|
|
16
|
+
}
|
|
17
|
+
header() {
|
|
18
|
+
return this.headerWrap = this.headerWrap || e(this.element, t(s)), e(this.headerWrap, t(`${s}`));
|
|
19
|
+
}
|
|
20
|
+
footer() {
|
|
21
|
+
return this.footerWrap = this.footerWrap || e(this.element, t(i)), e(this.footerWrap, t(`${i}`));
|
|
22
|
+
}
|
|
23
|
+
table() {
|
|
24
|
+
return e(this.element, a);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
i as FOOTER_CLASS,
|
|
29
|
+
c as GridQuery,
|
|
30
|
+
s as HEADER_CLASS
|
|
31
|
+
};
|
package/common/utils.js
ADDED
|
@@ -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 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
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
const a = "k-first", g = "k-grid-header", h = "k-grid-footer", i = (e, t) => {
|
|
9
|
+
const n = t.length;
|
|
10
|
+
for (let o = 0; o < n; o++)
|
|
11
|
+
e.appendChild(t[o].cloneNode(!0));
|
|
12
|
+
}, C = (e) => {
|
|
13
|
+
const t = document.createElement("div");
|
|
14
|
+
return t.className = "k-grid k-grid-md", t.appendChild(e), t;
|
|
15
|
+
}, d = (e) => {
|
|
16
|
+
const t = e.length, n = e[0].cloneNode(!0), o = n.rows.length;
|
|
17
|
+
if (t > 1)
|
|
18
|
+
for (let l = 0; l < o; l++)
|
|
19
|
+
for (let s = 1; s < t; s++)
|
|
20
|
+
i(n.rows[l], e[s].rows[l].cells);
|
|
21
|
+
return n;
|
|
22
|
+
}, f = (e, t) => {
|
|
23
|
+
if (t.length > 1 && e.rows.length > 1)
|
|
24
|
+
for (let n = 1; n < e.rows.length; n++) {
|
|
25
|
+
const o = t[0].rows[n].cells.length, l = e.rows[n].cells[o];
|
|
26
|
+
String(l.className).indexOf(a) === -1 && (l.className += ` ${a}`);
|
|
27
|
+
}
|
|
28
|
+
}, m = (e, t, n, o) => {
|
|
29
|
+
const l = document.createElement("table"), s = e[0].cloneNode(!0);
|
|
30
|
+
for (let c = 1; c < e.length; c++)
|
|
31
|
+
i(s, e[c].querySelectorAll("col"));
|
|
32
|
+
const r = d(t), p = d(n);
|
|
33
|
+
if (r.className = g, f(r, t), l.appendChild(s), l.appendChild(r), l.appendChild(p), o.length) {
|
|
34
|
+
const c = d(o);
|
|
35
|
+
c.className = h, l.appendChild(c);
|
|
36
|
+
}
|
|
37
|
+
return C(l);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
i as appendNodes,
|
|
41
|
+
m as createTable,
|
|
42
|
+
d as createTableElement,
|
|
43
|
+
f as setFirstCellClass,
|
|
44
|
+
C as wrapTable
|
|
45
|
+
};
|