@progress/kendo-vue-pdf 11.0.0 → 11.0.1-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.
package/PDFExport.d.ts CHANGED
@@ -7,7 +7,15 @@
7
7
  */
8
8
  import { PropType } from 'vue';
9
9
  /**
10
- * @hidden
10
+ * Represents the [KendoVue PDFExport component](slug:overview_pdf_processing).
11
+ * Use the PDFExport to export the content that you place inside it to a PDF file.
12
+ *
13
+ * @example
14
+ * ```vue
15
+ * <PDFExport ref="pdfExport" :paper-size="'A4'" :margin="'2cm'" :file-name="'invoice.pdf'">
16
+ * <div class="invoice">Invoice #1024</div>
17
+ * </PDFExport>
18
+ * ```
11
19
  */
12
20
  declare const PDFExport: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
21
  author: PropType<string>;
@@ -35,6 +43,11 @@ declare const PDFExport: import('vue').DefineComponent<import('vue').ExtractProp
35
43
  subject: PropType<string>;
36
44
  title: PropType<string>;
37
45
  }>, {}, {}, {}, {
46
+ /**
47
+ * Saves the content of the PDFExport as a PDF file.
48
+ *
49
+ * @param callback A function that runs after the PDFExport saves the file.
50
+ */
38
51
  save(callback?: () => void): void;
39
52
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
40
53
  author: PropType<string>;
package/PDFExport.mjs CHANGED
@@ -38,6 +38,11 @@ const u = /* @__PURE__ */ r({
38
38
  title: String
39
39
  },
40
40
  methods: {
41
+ /**
42
+ * Saves the content of the PDFExport as a PDF file.
43
+ *
44
+ * @param callback A function that runs after the PDFExport saves the file.
45
+ */
41
46
  save(e) {
42
47
  new i(
43
48
  o,
@@ -11,55 +11,110 @@ import { PaperSize, PageMargin } from '@progress/kendo-drawing/pdf';
11
11
  */
12
12
  export interface PDFExportProps {
13
13
  /**
14
- * The author (metadata) of the PDF document.
14
+ * Sets the author (metadata) of the PDF document.
15
+ *
16
+ * @example
17
+ * ```vue
18
+ * <PDFExport :author="'Jane Smith'" />
19
+ * ```
15
20
  */
16
21
  author?: string;
17
22
  /**
18
- * A flag that indicates whether to produce actual hyperlinks in the exported PDF file.
19
- * It is also possible to set a CSS selector. All matching links will be ignored.
23
+ * Sets whether to skip real hyperlinks in the exported PDF file.
24
+ * You can also set a CSS selector. The PDF file then skips all links that match it.
25
+ *
26
+ * @example
27
+ * ```vue
28
+ * <PDFExport :avoid-links="true" />
29
+ * ```
20
30
  */
21
31
  avoidLinks?: boolean | string;
22
32
  /**
23
- * An optional CSS selector that specifies the elements which cause the page breaks.
33
+ * Sets a CSS selector for the elements that start a new page.
34
+ *
35
+ * @example
36
+ * ```vue
37
+ * <PDFExport :force-page-break="'.page-break'" />
38
+ * ```
24
39
  */
25
40
  forcePageBreak?: string;
26
41
  /**
27
- * An optional CSS selector that specifies the elements which should not be split across the pages.
42
+ * Sets a CSS selector for the elements that must stay on one page.
43
+ *
44
+ * @example
45
+ * ```vue
46
+ * <PDFExport :keep-together="'.invoice-row'" />
47
+ * ```
28
48
  */
29
49
  keepTogether?: string;
30
50
  /**
31
- * The creator of the PDF document.
51
+ * Sets the creator of the PDF document.
52
+ *
53
+ * @example
54
+ * ```vue
55
+ * <PDFExport :creator="'Sales Portal'" />
56
+ * ```
32
57
  *
33
58
  * @default "Kendo UI PDF Generator"
34
59
  */
35
60
  creator?: string;
36
61
  /**
37
- * The date when the PDF document is created. Defaults to `new Date()`.
62
+ * Sets the date when you create the PDF document. Defaults to `new Date()`.
63
+ *
64
+ * @example
65
+ * ```vue
66
+ * <PDFExport :date="new Date(2024, 0, 1)" />
67
+ * ```
38
68
  */
39
69
  date?: Date;
40
70
  /**
41
- * The forced resolution of the images in the exported PDF document.
42
- * By default, the images are exported at their full resolution.
71
+ * Sets the resolution of the images in the exported PDF document.
72
+ * By default, the PDF document uses the full resolution of the images.
73
+ *
74
+ * @example
75
+ * ```vue
76
+ * <PDFExport :image-resolution="150" />
77
+ * ```
43
78
  */
44
79
  imageResolution?: number;
45
80
  /**
46
81
  * Specifies the name of the exported PDF file.
47
82
  *
83
+ * @example
84
+ * ```vue
85
+ * <PDFExport :file-name="'invoice.pdf'" />
86
+ * ```
87
+ *
48
88
  * @default "export.pdf"
49
89
  */
50
90
  fileName?: string;
51
91
  /**
52
- * If set to `true`, the content is forwarded to `proxyURL` even if the
53
- * browser supports local saving of files.
92
+ * When set to `true`, sends the content to `proxyURL` even if the
93
+ * browser can save files locally.
94
+ *
95
+ * @example
96
+ * ```vue
97
+ * <PDFExport :force-proxy="true" :proxyURL="'/api/pdf-proxy'" />
98
+ * ```
54
99
  */
55
100
  forceProxy?: boolean;
56
101
  /**
57
- * The keywords (metadata) of the PDF document.
102
+ * Sets the keywords (metadata) of the PDF document.
103
+ *
104
+ * @example
105
+ * ```vue
106
+ * <PDFExport :keywords="'invoice, sales, 2024'" />
107
+ * ```
58
108
  */
59
109
  keywords?: string;
60
110
  /**
61
- * A flag that indicates if the page will be in a landscape orientation.
62
- * By default, the page is in a portrait orientation.
111
+ * Sets whether the page uses a landscape orientation.
112
+ * By default, the page uses a portrait orientation.
113
+ *
114
+ * @example
115
+ * ```vue
116
+ * <PDFExport :landscape="true" />
117
+ * ```
63
118
  *
64
119
  * @default false
65
120
  */
@@ -73,84 +128,139 @@ export interface PDFExportProps {
73
128
  * * `"in"`
74
129
  * * `"pt"` (default).
75
130
  *
76
- * > Numbers are considered to be points (`"pt"`).
131
+ * > The PDFExport treats numbers as points (`"pt"`).
132
+ *
133
+ * @example
134
+ * ```vue
135
+ * <PDFExport :margin="'2cm'" />
136
+ * ```
77
137
  */
78
138
  margin?: string | number | PageMargin;
79
139
  /**
80
- * A Vue functional or class component which is used as a template that is inserted
81
- * into each page of the PDF document. The number of the current page (`pageNum`)
82
- * and the total number of pages (`totalPages`) are passed to the component as properties.
140
+ * Sets a Vue component that the PDFExport uses as a template and inserts
141
+ * into each page of the PDF document. The component receives the number of the current page (`pageNum`)
142
+ * and the total number of pages (`totalPages`) as props.
143
+ *
144
+ * @example
145
+ * ```vue
146
+ * <PDFExport :page-template="PageTemplate" />
147
+ * ```
83
148
  */
84
149
  pageTemplate?: any;
85
150
  /**
86
- * Specifies the paper size of the PDF document. Defaults to `"auto"` which means that the paper size
87
- * is determined by the content.
151
+ * Specifies the paper size of the PDF document. Defaults to `"auto"`, which means that the content
152
+ * sets the paper size.
88
153
  * The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).
89
154
  *
90
- * If set, the content will be split across multiple pages.
91
- * This enables the `repeatHeaders` and `scale` options, and allows you to specify a template.
155
+ * When you set it, the PDFExport splits the content across multiple pages.
156
+ * This enables the `repeatHeaders` and `scale` options, and lets you set a template.
92
157
  *
93
158
  * The supported values are:
94
159
  * * A predefined size. The supported paper sizes are: `A0-A10`, `B0-B10`, `C0-C10`,
95
160
  * `Executive`, `Folio`, `Legal`, `Letter`, `Tabloid`.
96
- * * An array of two numbers which specify the width and height in points (1pt = 1/72in).
97
- * * An array of two strings which specify the width and height in units.
161
+ * * An array of two numbers that set the width and height in points (1pt = 1/72in).
162
+ * * An array of two strings that set the width and height in units.
98
163
  * The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`.
164
+ *
165
+ * @example
166
+ * ```vue
167
+ * <PDFExport :paper-size="'A4'" />
168
+ * ```
99
169
  */
100
170
  paperSize?: PaperSize;
101
171
  /**
102
- * Specifies if the `<thead>` elements of the tables will be repeated on each page.
172
+ * Specifies whether the PDFExport repeats the `<thead>` elements of the tables on each page.
173
+ *
174
+ * @example
175
+ * ```vue
176
+ * <PDFExport :paper-size="'A4'" :repeat-headers="true" />
177
+ * ```
103
178
  */
104
179
  repeatHeaders?: boolean;
105
180
  /**
106
- * A scale factor.
107
- * The text size on the screen might be too big for printing.
108
- * To scale down the output in PDF, use this option.
181
+ * Sets a scale factor.
182
+ * The text size on the screen can be too big for printing.
183
+ * Use this option to scale down the output in the PDF document.
184
+ *
185
+ * @example
186
+ * ```vue
187
+ * <PDFExport :paper-size="'A4'" :scale="0.6" />
188
+ * ```
109
189
  *
110
190
  * @default 1
111
191
  */
112
192
  scale?: number;
113
193
  /**
114
- * A key/value dictionary of form values which will be sent to the proxy.
115
- * Can be used to submit Anti-Forgery tokens and other metadata.
194
+ * Sets a key/value dictionary of form values that the PDFExport sends to the proxy.
195
+ * You can use it to send anti-forgery tokens and other metadata.
196
+ *
197
+ * @example
198
+ * ```vue
199
+ * <PDFExport :proxy-data="{ token: csrfToken }" />
200
+ * ```
116
201
  */
117
202
  proxyData?: {
118
203
  [key: string]: string;
119
204
  };
120
205
  /**
121
- * The URL of the server-side proxy which streams the file to the end user.
122
- * You need to use a proxy if the browser is not capable of saving files locally&mdash;
206
+ * Sets the URL of the server-side proxy that streams the file to the end user.
207
+ * You need a proxy if the browser cannot save files locally&mdash;
123
208
  * for example, Internet Explorer 9 and Safari.
124
- * It is your responsibility to implement the server-side proxy.
209
+ * You have to implement the server-side proxy.
125
210
  *
126
211
  * In the request body, the proxy receives a POST request with the following parameters:
127
212
  *
128
213
  * - `"contentType"`&mdash;The MIME type of the file.
129
214
  * - `"base64"`&mdash;The base-64 encoded file content.
130
- * - `"fileName"`&mdash;The file name, as requested by the caller.
215
+ * - `"fileName"`&mdash;The file name that the caller requests.
131
216
  *
132
217
  * The proxy returns the decoded file with the `"Content-Disposition"` header set to `attachment;
133
218
  * filename="<fileName.pdf>"`.
219
+ *
220
+ * @example
221
+ * ```vue
222
+ * <PDFExport :proxyURL="'/api/pdf-proxy'" />
223
+ * ```
134
224
  */
135
225
  proxyURL?: string;
136
226
  /**
137
- * A name or keyword which indicates where to display the document that is returned from the proxy.
227
+ * Sets a name or keyword that shows where to display the document that the proxy returns.
138
228
  * To display the document in a new window or iframe,
139
- * the proxy has to have the `"Content-Disposition"` header set to `inline; filename="<fileName.pdf>"`.
229
+ * set the `"Content-Disposition"` header of the proxy to `inline; filename="<fileName.pdf>"`.
230
+ *
231
+ * @example
232
+ * ```vue
233
+ * <PDFExport :proxy-target="'_blank'" />
234
+ * ```
140
235
  *
141
236
  * @default "_self"
142
237
  */
143
238
  proxyTarget?: string;
144
239
  /**
145
- * The producer (metadata) of the PDF document.
240
+ * Sets the producer (metadata) of the PDF document.
241
+ *
242
+ * @example
243
+ * ```vue
244
+ * <PDFExport :producer="'Finance Reports'" />
245
+ * ```
146
246
  */
147
247
  producer?: string;
148
248
  /**
149
- * The subject (metadata) of the PDF document.
249
+ * Sets the subject (metadata) of the PDF document.
250
+ *
251
+ * @example
252
+ * ```vue
253
+ * <PDFExport :subject="'Quarterly sales report'" />
254
+ * ```
150
255
  */
151
256
  subject?: string;
152
257
  /**
153
- * The title (metadata) of the PDF document.
258
+ * Sets the title (metadata) of the PDF document.
259
+ *
260
+ * @example
261
+ * ```vue
262
+ * <PDFExport :title="'Q1 Sales'" />
263
+ * ```
154
264
  */
155
265
  title?: string;
156
266
  }
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-drawing"),require("@progress/kendo-file-saver"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-vue-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVuePdf={},e.Vue,e.KendoDrawing,e.KendoFileSaver,e.KendoVueCommon)}(this,function(e,t,o,n,r){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}const s=i(t),a=s.h,l=s.createApp;let d=class{constructor(e,t,o,n,i={}){this.drawDOM=e,this.exportPDF=t,this.saveAs=o,this.domElement=n,this.options=i,this.convertPageTemplateToHtml=e=>{if(a&&l&&r.canUseDOM){const t=this,o=document.createElement("div");o.setAttribute("style","position:absolute; left: -5000px; top: 0px;");const n=document.createElement("div");let r;return o.appendChild(n),document.body.appendChild(o),r=l({render:function(){return a(t.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages})},mounted:function(){this.$nextTick(function(){document.body.removeChild(o),r.unmount()})}}),r.mount(n),n.outerHTML}{const t=s.extend?s:s.default,o=new(t.extend.call(t,this.options.pageTemplate))({propsData:{pageNum:e.pageNum,totalPages:e.totalPages}});return o.$mount(),o.$nextTick(function(){o.$destroy()}),o.$el.outerHTML}}}savePDF(e){const t=this.drawDOM(this.domElement,this.getDrawOptions()).then(e=>this.exportPDF(e,this.getPDFOptions())).then(e=>this.saveAs(e,this.options.fileName||"export.pdf",this.getSaveOptions()));e&&t.then(e,e)}getDrawOptions(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}}getPDFOptions(){return{author:this.options.author,creator:this.options.creator||"Kendo UI PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}}getSaveOptions(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}}};const p={name:"@progress/kendo-vue-pdf",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1620290455,version:"11.0.0",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},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 d(o.drawDOM,o.exportPDF,n.saveAs,this.$el,this.$props).savePDF(e)}},created:function(){r.validatePackage(p)},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}});function u(e,t={},r){new d(o.drawDOM,o.exportPDF,n.saveAs,e,t).savePDF(r)}const h={},g=e=>String(e).trim().split(" "),m=e=>t=>((e,t)=>{const o=g(t);return!!g(e.className).find(e=>o.indexOf(e)>=0)})(t,e),f=e=>(h[e]||(h[e]=t=>String(t.nodeName).toLowerCase()===e.toLowerCase()),h[e]),S=(e,t,o=!0)=>{if(e){if(o&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){const o=S(e,t);if(o)return o}e=e.nextSibling}}},y="k-grid-header",v="k-grid-footer",b=f("TABLE"),x=e=>e?"locked":"wrap";class k{constructor(e){this.element=e,this.list=S(e,m("k-grid-container"))}content(e){return S(this.list,m("k-grid-content"+(e?"-locked":"")))}header(e){return this.headerWrap=this.headerWrap||S(this.element,m(y)),S(this.headerWrap,m(`${y}-${x(e)}`))}footer(e){return this.footerWrap=this.footerWrap||S(this.element,m(v)),S(this.footerWrap,m(`${v}-${x(e)}`))}table(){return S(this.element,b)}}const D="k-first",O=(e,t)=>{const o=t.length;for(let n=0;n<o;n++)e.appendChild(t[n].cloneNode(!0))},$=e=>{const t=document.createElement("div");return t.className="k-grid k-grid-md",t.appendChild(e),t},w=e=>{const t=e.length,o=e[0].cloneNode(!0),n=o.rows.length;if(t>1)for(let r=0;r<n;r++)for(let n=1;n<t;n++)O(o.rows[r],e[n].rows[r].cells);return o},P=(e,t,o,n)=>{const r=document.createElement("table"),i=e[0].cloneNode(!0);for(let t=1;t<e.length;t++)O(i,e[t].querySelectorAll("col"));const s=w(t),a=w(o);if(s.className="k-grid-header",((e,t)=>{if(t.length>1&&e.rows.length>1)for(let o=1;o<e.rows.length;o++){const n=t[0].rows[o].cells.length,r=e.rows[o].cells[n];-1===String(r.className).indexOf(D)&&(r.className+=` ${D}`)}})(s,t),r.appendChild(i),r.appendChild(s),r.appendChild(a),n.length){const e=w(n);e.className="k-grid-footer",r.appendChild(e)}return $(r)},C=e=>{const t=new k(e),o=t.content();let n;if(o){const e=[o.querySelector("colgroup")],r=[t.header().querySelector("thead")],i=[o.querySelector("tbody")],s=t.footer(),a=s?[s.querySelector("tfoot")]:[];n=P(e,r,i,a)}else n=$(t.table().cloneNode(!0));return n};function N(e){return(o,n={},i,s,a)=>function(e,o,n={},i,s,a){let l,d,p,c;function u(){if(!r.canUseDOM)return;l=document.createElement("div");const e={position:"absolute",left:"-5000px",top:"0px"};Object.assign(l.style,e),d=document.createElement("div"),l.appendChild(d),document.body.appendChild(l);const n=s&&{dataItems:s,total:s.length,pageSize:s.length,skip:0};if(a){const e={render:function(){return t.h(o.type,{...o.props,...n},o.children)},store:o.$store,mounted:function(){this.$el.style&&(this.$el.style.width="1000px"),h.call(this)}};c=t.createApp(e),c.mount(d)}else{const e=Object.getPrototypeOf(o).constructor;c=new e({propsData:Object.assign({},o.$props,n),store:o.$store,mounted:()=>{c.$el.style&&(c.$el.style.width="1000px"),h.call(c)}}),c.$slots=o.$slots,c.$scopedSlots=o.$scopedSlots,c.$mount(d)}}function h(){e(m.call(this),n,g)}function g(){c.unmount?c.unmount():c.$destroy(),document.body.removeChild(l),document.body.removeChild(p),l=p=void 0,i&&i()}function m(){p=document.createElement("div"),p.className="k-grid-pdf-export-element";const e=!this.$el||3!==this.$el.nodeType&&8!==this.$el.nodeType?this.$el:this.$el.nextElementSibling,t=C(e);return p.appendChild(t),document.body.appendChild(p),t}u()}(e,o,n,i,s,a)}const T=t.defineComponent({name:"grid-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},created(){this.saveGridPDF=N(this.getSavePDF())},methods:{save(e,t){const o=r.getDefaultSlots(this).filter(e=>{var t,o,n;return e.tag&&-1!==e.tag.toLowerCase().indexOf("grid")||e.componentOptions&&-1!==(null==(t=e.componentOptions.tag)?void 0:t.toLowerCase().indexOf("grid"))||-1!==(null==(n=null==(o=e.type)?void 0:o.name)?void 0:n.toLowerCase().indexOf("grid"))});o.length&&(this.gridComponent=o[0],this.saveGridPDF(this.gridComponent,this.$props,t,e,!0))},getSavePDF:()=>u},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}}),j="k-grid-header",L="k-grid-footer",E=f("TABLE");class F{constructor(e){this.element=e,this.list=S(e,m("k-grid"))}content(){return S(this.list,m("k-grid"))}header(){return this.headerWrap=this.headerWrap||S(this.element,m(j)),S(this.headerWrap,m(`${j}`))}footer(){return this.footerWrap=this.footerWrap||S(this.element,m(L)),S(this.footerWrap,m(`${L}`))}table(){return S(this.element,E)}}const B=e=>{const t=new F(e),o=t.content();let n,r=t.header();if(r.children.length>1&&r.removeChild(r.children[1]),r.children[0].childNodes.forEach(function(e){if(e.style)return e.style.top=0}),o){const e=[o.querySelector("colgroup")],i=[r],s=[o.querySelector("tbody")],a=t.footer(),l=a?[a.querySelector("tfoot")]:[];n=P(e,i,s,l)}else n=$(t.table().cloneNode(!0));return n};function U(e){return(o,n={},i,s,a)=>function(e,o,n={},i,s,a){let l,d,p,c;function u(){if(!r.canUseDOM)return;l=document.createElement("div"),l.setAttribute("style","position:absolute; left: -5000px; top: 0px;"),d=document.createElement("div"),l.appendChild(d),document.body.appendChild(l);const e=s&&{dataItems:s,total:s.length,pageSize:s.length,skip:0};if(a){const n={render:function(){return t.h(o.type,{...o.props,...e},o.children)},store:o.$store,mounted:function(){this.$el.style&&(this.$el.style.width="1000px"),h.call(this)}};c=t.createApp(n),c.mount(d)}else{const t=Object.getPrototypeOf(o).constructor;c=new t({propsData:Object.assign({},o.$props,e),store:o.$store,mounted:()=>{c.$el.style&&(c.$el.style.width="1000px"),h.call(c)}}),c.$slots=o.$slots,c.$scopedSlots=o.$scopedSlots,c.$mount(d)}}function h(){e(m.call(this),n,g)}function g(){c.unmount?c.unmount():c.$destroy(),document.body.removeChild(l),document.body.removeChild(p),l=p=void 0,i&&i()}function m(){p=document.createElement("div"),p.className="k-treelist-pdf-export-element";const e=!this.$el||3!==this.$el.nodeType&&8!==this.$el.nodeType?this.$el:this.$el.nextElementSibling,t=B(e);return p.appendChild(t),document.body.appendChild(p),t}u()}(e,o,n,i,s,a)}const q=t.defineComponent({name:"treelist-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},created(){this.saveTreeListPDF=U(this.getSavePDF())},methods:{save(e,t){const o=r.getDefaultSlots(this).filter(e=>{var t,o,n;return e.tag&&-1!==e.tag.toLowerCase().indexOf("treelist")||e.componentOptions&&-1!==(null==(t=e.componentOptions.tag)?void 0:t.toLowerCase().indexOf("treelist"))||-1!==(null==(n=null==(o=e.type)?void 0:o.name)?void 0:n.toLowerCase().indexOf("treelist"))});o.length&&(this.treeListComponent=o[0],this.saveTreeListPDF(this.treeListComponent,this.$props,t,e,!0))},getSavePDF:()=>u},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}});e.GridPdfExport=T,e.PDFExport=c,e.TreeListPDFExport=q,e.savePDF=u});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-drawing"),require("@progress/kendo-file-saver"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-vue-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVuePdf={},e.Vue,e.KendoDrawing,e.KendoFileSaver,e.KendoVueCommon)}(this,function(e,t,o,n,r){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}const s=i(t),a=s.h,l=s.createApp;let d=class{constructor(e,t,o,n,i={}){this.drawDOM=e,this.exportPDF=t,this.saveAs=o,this.domElement=n,this.options=i,this.convertPageTemplateToHtml=e=>{if(a&&l&&r.canUseDOM){const t=this,o=document.createElement("div");o.setAttribute("style","position:absolute; left: -5000px; top: 0px;");const n=document.createElement("div");let r;return o.appendChild(n),document.body.appendChild(o),r=l({render:function(){return a(t.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages})},mounted:function(){this.$nextTick(function(){document.body.removeChild(o),r.unmount()})}}),r.mount(n),n.outerHTML}{const t=s.extend?s:s.default,o=new(t.extend.call(t,this.options.pageTemplate))({propsData:{pageNum:e.pageNum,totalPages:e.totalPages}});return o.$mount(),o.$nextTick(function(){o.$destroy()}),o.$el.outerHTML}}}savePDF(e){const t=this.drawDOM(this.domElement,this.getDrawOptions()).then(e=>this.exportPDF(e,this.getPDFOptions())).then(e=>this.saveAs(e,this.options.fileName||"export.pdf",this.getSaveOptions()));e&&t.then(e,e)}getDrawOptions(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}}getPDFOptions(){return{author:this.options.author,creator:this.options.creator||"Kendo UI PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}}getSaveOptions(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}}};const p={name:"@progress/kendo-vue-pdf",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1620290455,version:"11.0.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},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 d(o.drawDOM,o.exportPDF,n.saveAs,this.$el,this.$props).savePDF(e)}},created:function(){r.validatePackage(p)},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}});function u(e,t={},r){new d(o.drawDOM,o.exportPDF,n.saveAs,e,t).savePDF(r)}const h={},g=e=>String(e).trim().split(" "),m=e=>t=>((e,t)=>{const o=g(t);return!!g(e.className).find(e=>o.indexOf(e)>=0)})(t,e),f=e=>(h[e]||(h[e]=t=>String(t.nodeName).toLowerCase()===e.toLowerCase()),h[e]),S=(e,t,o=!0)=>{if(e){if(o&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){const o=S(e,t);if(o)return o}e=e.nextSibling}}},y="k-grid-header",v="k-grid-footer",b=f("TABLE"),x=e=>e?"locked":"wrap";class k{constructor(e){this.element=e,this.list=S(e,m("k-grid-container"))}content(e){return S(this.list,m("k-grid-content"+(e?"-locked":"")))}header(e){return this.headerWrap=this.headerWrap||S(this.element,m(y)),S(this.headerWrap,m(`${y}-${x(e)}`))}footer(e){return this.footerWrap=this.footerWrap||S(this.element,m(v)),S(this.footerWrap,m(`${v}-${x(e)}`))}table(){return S(this.element,b)}}const D="k-first",O=(e,t)=>{const o=t.length;for(let n=0;n<o;n++)e.appendChild(t[n].cloneNode(!0))},$=e=>{const t=document.createElement("div");return t.className="k-grid k-grid-md",t.appendChild(e),t},w=e=>{const t=e.length,o=e[0].cloneNode(!0),n=o.rows.length;if(t>1)for(let r=0;r<n;r++)for(let n=1;n<t;n++)O(o.rows[r],e[n].rows[r].cells);return o},P=(e,t,o,n)=>{const r=document.createElement("table"),i=e[0].cloneNode(!0);for(let t=1;t<e.length;t++)O(i,e[t].querySelectorAll("col"));const s=w(t),a=w(o);if(s.className="k-grid-header",((e,t)=>{if(t.length>1&&e.rows.length>1)for(let o=1;o<e.rows.length;o++){const n=t[0].rows[o].cells.length,r=e.rows[o].cells[n];-1===String(r.className).indexOf(D)&&(r.className+=` ${D}`)}})(s,t),r.appendChild(i),r.appendChild(s),r.appendChild(a),n.length){const e=w(n);e.className="k-grid-footer",r.appendChild(e)}return $(r)},C=e=>{const t=new k(e),o=t.content();let n;if(o){const e=[o.querySelector("colgroup")],r=[t.header().querySelector("thead")],i=[o.querySelector("tbody")],s=t.footer(),a=s?[s.querySelector("tfoot")]:[];n=P(e,r,i,a)}else n=$(t.table().cloneNode(!0));return n};function N(e){return(o,n={},i,s,a)=>function(e,o,n={},i,s,a){let l,d,p,c;function u(){if(!r.canUseDOM)return;l=document.createElement("div");const e={position:"absolute",left:"-5000px",top:"0px"};Object.assign(l.style,e),d=document.createElement("div"),l.appendChild(d),document.body.appendChild(l);const n=s&&{dataItems:s,total:s.length,pageSize:s.length,skip:0};if(a){const e={render:function(){return t.h(o.type,{...o.props,...n},o.children)},store:o.$store,mounted:function(){this.$el.style&&(this.$el.style.width="1000px"),h.call(this)}};c=t.createApp(e),c.mount(d)}else{const e=Object.getPrototypeOf(o).constructor;c=new e({propsData:Object.assign({},o.$props,n),store:o.$store,mounted:()=>{c.$el.style&&(c.$el.style.width="1000px"),h.call(c)}}),c.$slots=o.$slots,c.$scopedSlots=o.$scopedSlots,c.$mount(d)}}function h(){e(m.call(this),n,g)}function g(){c.unmount?c.unmount():c.$destroy(),document.body.removeChild(l),document.body.removeChild(p),l=p=void 0,i&&i()}function m(){p=document.createElement("div"),p.className="k-grid-pdf-export-element";const e=!this.$el||3!==this.$el.nodeType&&8!==this.$el.nodeType?this.$el:this.$el.nextElementSibling,t=C(e);return p.appendChild(t),document.body.appendChild(p),t}u()}(e,o,n,i,s,a)}const T=t.defineComponent({name:"grid-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},created(){this.saveGridPDF=N(this.getSavePDF())},methods:{save(e,t){const o=r.getDefaultSlots(this).filter(e=>{var t,o,n;return e.tag&&-1!==e.tag.toLowerCase().indexOf("grid")||e.componentOptions&&-1!==(null==(t=e.componentOptions.tag)?void 0:t.toLowerCase().indexOf("grid"))||-1!==(null==(n=null==(o=e.type)?void 0:o.name)?void 0:n.toLowerCase().indexOf("grid"))});o.length&&(this.gridComponent=o[0],this.saveGridPDF(this.gridComponent,this.$props,t,e,!0))},getSavePDF:()=>u},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}}),j="k-grid-header",L="k-grid-footer",E=f("TABLE");class F{constructor(e){this.element=e,this.list=S(e,m("k-grid"))}content(){return S(this.list,m("k-grid"))}header(){return this.headerWrap=this.headerWrap||S(this.element,m(j)),S(this.headerWrap,m(`${j}`))}footer(){return this.footerWrap=this.footerWrap||S(this.element,m(L)),S(this.footerWrap,m(`${L}`))}table(){return S(this.element,E)}}const B=e=>{const t=new F(e),o=t.content();let n,r=t.header();if(r.children.length>1&&r.removeChild(r.children[1]),r.children[0].childNodes.forEach(function(e){if(e.style)return e.style.top=0}),o){const e=[o.querySelector("colgroup")],i=[r],s=[o.querySelector("tbody")],a=t.footer(),l=a?[a.querySelector("tfoot")]:[];n=P(e,i,s,l)}else n=$(t.table().cloneNode(!0));return n};function U(e){return(o,n={},i,s,a)=>function(e,o,n={},i,s,a){let l,d,p,c;function u(){if(!r.canUseDOM)return;l=document.createElement("div"),l.setAttribute("style","position:absolute; left: -5000px; top: 0px;"),d=document.createElement("div"),l.appendChild(d),document.body.appendChild(l);const e=s&&{dataItems:s,total:s.length,pageSize:s.length,skip:0};if(a){const n={render:function(){return t.h(o.type,{...o.props,...e},o.children)},store:o.$store,mounted:function(){this.$el.style&&(this.$el.style.width="1000px"),h.call(this)}};c=t.createApp(n),c.mount(d)}else{const t=Object.getPrototypeOf(o).constructor;c=new t({propsData:Object.assign({},o.$props,e),store:o.$store,mounted:()=>{c.$el.style&&(c.$el.style.width="1000px"),h.call(c)}}),c.$slots=o.$slots,c.$scopedSlots=o.$scopedSlots,c.$mount(d)}}function h(){e(m.call(this),n,g)}function g(){c.unmount?c.unmount():c.$destroy(),document.body.removeChild(l),document.body.removeChild(p),l=p=void 0,i&&i()}function m(){p=document.createElement("div"),p.className="k-treelist-pdf-export-element";const e=!this.$el||3!==this.$el.nodeType&&8!==this.$el.nodeType?this.$el:this.$el.nextElementSibling,t=B(e);return p.appendChild(t),document.body.appendChild(p),t}u()}(e,o,n,i,s,a)}const q=t.defineComponent({name:"treelist-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},created(){this.saveTreeListPDF=U(this.getSavePDF())},methods:{save(e,t){const o=r.getDefaultSlots(this).filter(e=>{var t,o,n;return e.tag&&-1!==e.tag.toLowerCase().indexOf("treelist")||e.componentOptions&&-1!==(null==(t=e.componentOptions.tag)?void 0:t.toLowerCase().indexOf("treelist"))||-1!==(null==(n=null==(o=e.type)?void 0:o.name)?void 0:n.toLowerCase().indexOf("treelist"))});o.length&&(this.treeListComponent=o[0],this.saveTreeListPDF(this.treeListComponent,this.$props,t,e,!0))},getSavePDF:()=>u},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}});e.GridPdfExport=T,e.PDFExport=c,e.TreeListPDFExport=q,e.savePDF=u});
@@ -8,10 +8,22 @@
8
8
  import { savePDF } from '../savePDF';
9
9
  import { PDFExportProps } from '../PDFExportProps';
10
10
  import { PropType } from 'vue';
11
+ /**
12
+ * Represents the props of the GridPdfExport component
13
+ * ([more information and examples in the documentation on PDF export](slug:overview_pdfexport_grid)).
14
+ */
11
15
  export interface GridPDFExportProps extends PDFExportProps {
12
16
  }
13
17
  /**
14
- * @hidden
18
+ * Represents the [KendoVue GridPdfExport component](slug:overview_pdfexport_grid).
19
+ * Place a Grid inside the GridPdfExport to export the Grid data to a PDF file.
20
+ *
21
+ * @example
22
+ * ```vue
23
+ * <GridPdfExport ref="gridPdfExport" :paper-size="'A4'" :margin="'1cm'" :file-name="'products.pdf'">
24
+ * <Grid :data-items="products" :columns="columns" />
25
+ * </GridPdfExport>
26
+ * ```
15
27
  */
16
28
  declare const GridPdfExport: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
17
29
  author: PropType<string>;
@@ -39,6 +51,12 @@ declare const GridPdfExport: import('vue').DefineComponent<import('vue').Extract
39
51
  subject: PropType<string>;
40
52
  title: PropType<string>;
41
53
  }>, {}, {}, {}, {
54
+ /**
55
+ * Exports the Grid inside the GridPdfExport to a PDF file.
56
+ *
57
+ * @param data The data to export. If you do not set it, the GridPdfExport exports the current Grid data.
58
+ * @param callback A function that runs after the GridPdfExport saves the file.
59
+ */
42
60
  save(data?: any[], callback?: () => void): void;
43
61
  getSavePDF(): typeof savePDF;
44
62
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -39,6 +39,12 @@ const v = /* @__PURE__ */ p({
39
39
  this.saveGridPDF = S(this.getSavePDF());
40
40
  },
41
41
  methods: {
42
+ /**
43
+ * Exports the Grid inside the GridPdfExport to a PDF file.
44
+ *
45
+ * @param data The data to export. If you do not set it, the GridPdfExport exports the current Grid data.
46
+ * @param callback A function that runs after the GridPdfExport saves the file.
47
+ */
42
48
  save(t, g) {
43
49
  const r = a(this).filter((e) => {
44
50
  var o, i, n;
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-pdf",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1794385809,version:"11.0.0",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-pdf",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1794913666,version:"11.0.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "Kendo UI for Vue",
11
11
  productCode: "KENDOUIVUE",
12
12
  productCodes: ["KENDOUIVUE"],
13
- publishDate: 1794385809,
14
- version: "11.0.0",
13
+ publishDate: 1794913666,
14
+ version: "11.0.1-develop.1",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-pdf",
3
- "version": "11.0.0",
3
+ "version": "11.0.1-develop.1",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -26,8 +26,8 @@
26
26
  "peerDependencies": {
27
27
  "@progress/kendo-drawing": "^1.21.1",
28
28
  "@progress/kendo-file-saver": "^1.0.1",
29
- "@progress/kendo-licensing": "^1.13.0",
30
- "@progress/kendo-vue-common": "11.0.0",
29
+ "@progress/kendo-licensing": "^1.13.1",
30
+ "@progress/kendo-vue-common": "11.0.1-develop.1",
31
31
  "vue": "^3.0.2"
32
32
  },
33
33
  "dependencies": {},
@@ -47,7 +47,7 @@
47
47
  "package": {
48
48
  "productName": "Kendo UI for Vue",
49
49
  "productCode": "KENDOUIVUE",
50
- "publishDate": 1794385809,
50
+ "publishDate": 1794913666,
51
51
  "licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
52
52
  }
53
53
  },
package/savePDF.d.ts CHANGED
@@ -9,8 +9,8 @@ import { PDFExportProps } from './PDFExportProps';
9
9
  /**
10
10
  * Saves the content of a DOM element to a PDF file.
11
11
  *
12
- * @param domElement - The root DOM element to save to a PDF file.
13
- * @param options - The export options.
14
- * @param callback - The callback to be executed after the PDF is saved.
12
+ * @param domElement The root DOM element to save to a PDF file.
13
+ * @param options The export options.
14
+ * @param callback The callback to be executed after the PDF is saved.
15
15
  */
16
16
  export declare function savePDF(domElement: HTMLElement, options?: PDFExportProps, callback?: () => void): void;
@@ -8,10 +8,22 @@
8
8
  import { savePDF } from '../savePDF';
9
9
  import { PDFExportProps } from '../PDFExportProps';
10
10
  import { PropType } from 'vue';
11
+ /**
12
+ * Represents the props of the TreeListPDFExport component
13
+ * ([more information and examples in the documentation on PDF export](slug:overview_pdfexport_treelist)).
14
+ */
11
15
  export interface TreeListPDFExportProps extends PDFExportProps {
12
16
  }
13
17
  /**
14
- * @hidden
18
+ * Represents the [KendoVue TreeListPDFExport component](slug:overview_pdfexport_treelist).
19
+ * Place a TreeList inside the TreeListPDFExport to export the TreeList data to a PDF file.
20
+ *
21
+ * @example
22
+ * ```vue
23
+ * <TreeListPDFExport ref="treeListPdfExport" :paper-size="'A4'" :margin="'1cm'" :file-name="'employees.pdf'">
24
+ * <TreeList :data-items="employees" :columns="columns" :expand-field="'expanded'" :sub-items-field="'employees'" />
25
+ * </TreeListPDFExport>
26
+ * ```
15
27
  */
16
28
  declare const TreeListPDFExport: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
17
29
  author: PropType<string>;
@@ -39,6 +51,12 @@ declare const TreeListPDFExport: import('vue').DefineComponent<import('vue').Ext
39
51
  subject: PropType<string>;
40
52
  title: PropType<string>;
41
53
  }>, {}, {}, {}, {
54
+ /**
55
+ * Exports the TreeList inside the TreeListPDFExport to a PDF file.
56
+ *
57
+ * @param data The data to export. If you do not set it, the TreeListPDFExport exports the current TreeList data.
58
+ * @param callback A function that runs after the TreeListPDFExport saves the file.
59
+ */
42
60
  save(data?: any[], callback?: () => void): void;
43
61
  getSavePDF(): typeof savePDF;
44
62
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -39,6 +39,12 @@ const L = /* @__PURE__ */ p({
39
39
  this.saveTreeListPDF = S(this.getSavePDF());
40
40
  },
41
41
  methods: {
42
+ /**
43
+ * Exports the TreeList inside the TreeListPDFExport to a PDF file.
44
+ *
45
+ * @param data The data to export. If you do not set it, the TreeListPDFExport exports the current TreeList data.
46
+ * @param callback A function that runs after the TreeListPDFExport saves the file.
47
+ */
42
48
  save(t, s) {
43
49
  const r = a(this).filter((e) => {
44
50
  var o, i, n;