@progress/kendo-angular-pdf-export 4.0.1 → 11.0.0-develop.100

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/LICENSE.md CHANGED
@@ -8,4 +8,4 @@ This is commercial software. To use it, you need to agree to the [**Telerik End
8
8
 
9
9
  All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui.
10
10
 
11
- *Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
11
+ *Copyright © 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
package/NOTICE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Progress Kendo UI for Angular 2022
1
+ Progress Kendo UI for Angular 2023
2
2
 
3
3
  Copyright (c) 2016-2022 Progress Software Corporation and/or one of its
4
4
  subsidiaries or affiliates. All rights reserved.
@@ -37,7 +37,7 @@ DefinitelyTyped.org | @types/prosemirror-view | 1.11.4 - Open Source | MIT-style
37
37
  Isaac Z. Schlueter | glob | 7.1.3 - Open Source | ISC-style License
38
38
  Jorik Tangelder (Eight Media) | HammerJS | 2.0.8 - Open Source | MIT-style License
39
39
  Matt Mueller | cheerio | 0.22 - Open Source | MIT-style License
40
- Progress Software Corporation | Kendo UI Licensing CLI | 1.1 - Proprietary |
40
+ Progress Software Corporation | Kendo UI Licensing CLI | 1.1 - Proprietary |
41
41
  Progress Software Corporation | jszip-esm | 1.0.0 - Open Source | MIT-style License
42
42
  Progress Software Corporation | pako-esm | 1.0.0 - Open Source | MIT-style License
43
43
  ProseMirror | prosemiror-inputrules | 1.0.1 - Open Source | MIT-style License
@@ -433,7 +433,7 @@ subject to the following terms and conditions:
433
433
  @types/prosemirror-inputrules v1*, @types/prosemirror-keymap v1*, @types/prosemirror-model v1*,
434
434
  @types/prosemirror-schema-list v1*, @types/prosemirror-state v1*, @types/prosemirror-tables v0.9*,
435
435
  @types/prosemirror-transform v1*, and @types/prosemirror-view v1*. Such technologies are
436
- subject to the following terms and conditions:
436
+ subject to the following terms and conditions:
437
437
 
438
438
  This project is licensed under the MIT license.
439
439
  Copyrights are respective of each contributor listed at the beginning of each
@@ -640,7 +640,7 @@ Such technology is subject to the following terms and conditions:
640
640
  2. Special Notices Regarding Commercially Licensed Third-Party Components
641
641
  incorporated into the Product: NONE
642
642
 
643
- 3. Special Notices Regarding Progress Products incorporated into the Product:
643
+ 3. Special Notices Regarding Progress Products incorporated into the Product:
644
644
 
645
645
  (a) Progress Kendo UI for Angular 2022 incorporates Kendo UI Licensing CLI v1.1
646
646
  from Progress Software Corporation. See NOTICE.txt text file within product for
package/README.md CHANGED
@@ -28,6 +28,6 @@ Kendo UI for Angular is a commercial UI library designed and built for developin
28
28
  * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
29
29
  * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
30
30
 
31
- *Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
31
+ *Copyright © 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
32
32
 
33
33
  *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.*
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { TemplateRef } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { PDFExportComponent } from './pdf-export.component';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-pdf-export',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1668698260,
12
+ publishDate: 1673469091,
13
13
  version: '',
14
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
14
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, Input } from '@angular/core';
@@ -24,9 +24,9 @@ export class PDFExportMarginComponent {
24
24
  return options;
25
25
  }
26
26
  }
27
- PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
- PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PDFExportMarginComponent, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
27
+ PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
+ PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportMarginComponent, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
30
30
  type: Component,
31
31
  args: [{
32
32
  selector: 'kendo-pdf-export-margin',
@@ -1,17 +1,17 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Optional } from '@angular/core';
5
+ import { Directive, Optional, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  export class PDFExportTemplateDirective {
8
8
  constructor(templateRef) {
9
9
  this.templateRef = templateRef;
10
10
  }
11
11
  }
12
- PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
13
- PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PDFExportTemplateDirective, selector: "[kendoPDFTemplate]", ngImport: i0 });
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
12
+ PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
13
+ PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportTemplateDirective, selector: "[kendoPDFTemplate]", ngImport: i0 });
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
15
15
  type: Directive,
16
16
  args: [{
17
17
  selector: '[kendoPDFTemplate]'
@@ -1,8 +1,8 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, ContentChild, Input } from '@angular/core';
5
+ import { Component, ContentChild, ElementRef, Input } from '@angular/core';
6
6
  import { drawDOM, exportPDF } from '@progress/kendo-drawing';
7
7
  import { saveAs } from '@progress/kendo-file-saver';
8
8
  import { validatePackage } from '@progress/kendo-licensing';
@@ -140,9 +140,9 @@ export class PDFExportComponent {
140
140
  saveAs(dataUri, fileName, options);
141
141
  }
142
142
  }
143
- PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
144
- PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PDFExportComponent, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportComponent, decorators: [{
143
+ PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
144
+ PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportComponent, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportComponent, decorators: [{
146
146
  type: Component,
147
147
  args: [{
148
148
  selector: 'kendo-pdf-export',
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { NgModule } from '@angular/core';
@@ -17,14 +17,14 @@ const COMPONENT_DIRECTIVES = [
17
17
  */
18
18
  export class PDFExportModule {
19
19
  }
20
- PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
- PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule, declarations: [PDFExportComponent,
20
+ PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
+ PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, declarations: [PDFExportComponent,
22
22
  PDFExportMarginComponent,
23
23
  PDFExportTemplateDirective], exports: [PDFExportComponent,
24
24
  PDFExportMarginComponent,
25
25
  PDFExportTemplateDirective] });
26
- PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule, decorators: [{
26
+ PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule });
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, decorators: [{
28
28
  type: NgModule,
29
29
  args: [{
30
30
  declarations: [COMPONENT_DIRECTIVES],
@@ -1,8 +1,8 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
6
  * Generated bundle index. Do not edit.
7
7
  */
8
- export * from './main';
8
+ export * from './index';
@@ -0,0 +1,320 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Directive, Optional, Component, Input, ContentChild, NgModule } from '@angular/core';
7
+ import { drawDOM, exportPDF } from '@progress/kendo-drawing';
8
+ import { saveAs } from '@progress/kendo-file-saver';
9
+ import { validatePackage } from '@progress/kendo-licensing';
10
+
11
+ /**
12
+ * @hidden
13
+ */
14
+ const packageMetadata = {
15
+ name: '@progress/kendo-angular-pdf-export',
16
+ productName: 'Kendo UI for Angular',
17
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
18
+ publishDate: 1673469091,
19
+ version: '',
20
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
21
+ };
22
+
23
+ class PDFExportTemplateDirective {
24
+ constructor(templateRef) {
25
+ this.templateRef = templateRef;
26
+ }
27
+ }
28
+ PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
+ PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportTemplateDirective, selector: "[kendoPDFTemplate]", ngImport: i0 });
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
31
+ type: Directive,
32
+ args: [{
33
+ selector: '[kendoPDFTemplate]'
34
+ }]
35
+ }], ctorParameters: function () {
36
+ return [{ type: i0.TemplateRef, decorators: [{
37
+ type: Optional
38
+ }] }];
39
+ } });
40
+
41
+ const FIELDS = ['bottom', 'left', 'right', 'top'];
42
+ /**
43
+ * Represents the Kendo UI PDFMargin component for Angular.
44
+ */
45
+ class PDFExportMarginComponent {
46
+ /**
47
+ * @hidden
48
+ */
49
+ get options() {
50
+ const options = {};
51
+ for (let idx = 0; idx < FIELDS.length; idx++) {
52
+ const field = FIELDS[idx];
53
+ const value = this[field];
54
+ if (typeof value !== 'undefined') {
55
+ options[field] = value;
56
+ }
57
+ }
58
+ return options;
59
+ }
60
+ }
61
+ PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
62
+ PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportMarginComponent, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
64
+ type: Component,
65
+ args: [{
66
+ selector: 'kendo-pdf-export-margin',
67
+ template: ``
68
+ }]
69
+ }], propDecorators: { left: [{
70
+ type: Input
71
+ }], top: [{
72
+ type: Input
73
+ }], right: [{
74
+ type: Input
75
+ }], bottom: [{
76
+ type: Input
77
+ }] } });
78
+
79
+ /**
80
+ * @hidden
81
+ */
82
+ const compileTemplate = (templateRef) => {
83
+ const context = {};
84
+ let embeddedView = templateRef.createEmbeddedView(context);
85
+ const result = (data) => {
86
+ Object.assign(context, data);
87
+ embeddedView.detectChanges();
88
+ const templateWrap = document.createElement('span');
89
+ embeddedView.rootNodes.forEach((rootNode) => {
90
+ templateWrap.appendChild(rootNode.cloneNode(true));
91
+ });
92
+ return templateWrap;
93
+ };
94
+ result.destroy = () => {
95
+ embeddedView.destroy();
96
+ embeddedView = null;
97
+ };
98
+ return result;
99
+ };
100
+
101
+ /**
102
+ * Represents the [Kendo UI PDF Export component for Angular]({% slug overview_pdfexport %}).
103
+ *
104
+ * @example
105
+ * ```ts-preview
106
+ * _@Component({
107
+ * selector: 'my-app',
108
+ * template: `
109
+ * <div class="example-config">
110
+ * <button kendoButton (click)="pdf.saveAs('document.pdf')">
111
+ * Save As PDF...
112
+ * </button>
113
+ * </div>
114
+ *
115
+ * <kendo-pdf-export #pdf paperSize="A4" margin="2cm">
116
+ * Content goes here
117
+ * </kendo-pdf-export>
118
+ * `
119
+ * })
120
+ * export class AppComponent {
121
+ * }
122
+ * ```
123
+ */
124
+ class PDFExportComponent {
125
+ constructor(element) {
126
+ this.element = element;
127
+ /**
128
+ * The creator of the PDF document.
129
+ * @default "Kendo UI PDF Generator"
130
+ */
131
+ this.creator = 'Kendo UI PDF Generator';
132
+ /**
133
+ * Specifies the name of the exported PDF file.
134
+ * @default "Export.pdf"
135
+ */
136
+ this.fileName = 'export.pdf';
137
+ validatePackage(packageMetadata);
138
+ }
139
+ get drawMargin() {
140
+ const marginComponent = this.marginComponent;
141
+ let margin = this.margin;
142
+ if (marginComponent) {
143
+ margin = Object.assign(margin || {}, marginComponent.options);
144
+ }
145
+ return margin;
146
+ }
147
+ /**
148
+ * Saves the content as a PDF file with the specified name.
149
+ * @param fileName - The name of the exported file.
150
+ */
151
+ saveAs(fileName = this.fileName) {
152
+ this.save(this.element.nativeElement, fileName);
153
+ }
154
+ /**
155
+ * Exports the content as a `Group` for further processing.
156
+ *
157
+ * @return - The root group of the exported scene.
158
+ */
159
+ export() {
160
+ return this.exportElement(this.element.nativeElement);
161
+ }
162
+ save(element, fileName) {
163
+ this.exportElement(element)
164
+ .then(group => this.exportGroup(group, this.pdfOptions()))
165
+ .then(dataUri => this.saveDataUri(dataUri, fileName, this.saveOptions()));
166
+ }
167
+ exportElement(element) {
168
+ const promise = this.drawElement(element, this.drawOptions());
169
+ const cleanup = this.cleanup.bind(this);
170
+ promise.then(cleanup, cleanup);
171
+ return promise;
172
+ }
173
+ cleanup() {
174
+ if (this.pageTemplate) {
175
+ this.pageTemplate.destroy();
176
+ delete this.pageTemplate;
177
+ }
178
+ }
179
+ drawOptions() {
180
+ if (this.pageTemplateDirective) {
181
+ this.pageTemplate = compileTemplate(this.pageTemplateDirective.templateRef);
182
+ }
183
+ return {
184
+ avoidLinks: this.avoidLinks,
185
+ forcePageBreak: this.forcePageBreak,
186
+ keepTogether: this.keepTogether,
187
+ margin: this.drawMargin,
188
+ paperSize: this.paperSize,
189
+ landscape: this.landscape,
190
+ repeatHeaders: this.repeatHeaders,
191
+ scale: this.scale,
192
+ template: this.pageTemplate
193
+ };
194
+ }
195
+ pdfOptions() {
196
+ return {
197
+ autoPrint: this.autoPrint,
198
+ author: this.author,
199
+ creator: this.creator,
200
+ date: this.date,
201
+ imgDPI: this.imageResolution,
202
+ keywords: this.keywords,
203
+ landscape: this.landscape,
204
+ margin: this.drawMargin,
205
+ multiPage: true,
206
+ paperSize: this.paperSize,
207
+ producer: this.producer,
208
+ subject: this.subject,
209
+ title: this.title
210
+ };
211
+ }
212
+ saveOptions() {
213
+ return {
214
+ forceProxy: this.forceProxy,
215
+ proxyData: this.proxyData,
216
+ proxyTarget: this.proxyTarget,
217
+ proxyURL: this.proxyURL
218
+ };
219
+ }
220
+ drawElement(element, options) {
221
+ return drawDOM(element, options);
222
+ }
223
+ exportGroup(group, options) {
224
+ return exportPDF(group, options);
225
+ }
226
+ saveDataUri(dataUri, fileName, options) {
227
+ saveAs(dataUri, fileName, options);
228
+ }
229
+ }
230
+ PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
231
+ PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportComponent, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportComponent, decorators: [{
233
+ type: Component,
234
+ args: [{
235
+ selector: 'kendo-pdf-export',
236
+ template: `<div><ng-content></ng-content></div>`
237
+ }]
238
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { autoPrint: [{
239
+ type: Input
240
+ }], author: [{
241
+ type: Input
242
+ }], avoidLinks: [{
243
+ type: Input
244
+ }], forcePageBreak: [{
245
+ type: Input
246
+ }], keepTogether: [{
247
+ type: Input
248
+ }], creator: [{
249
+ type: Input
250
+ }], date: [{
251
+ type: Input
252
+ }], imageResolution: [{
253
+ type: Input
254
+ }], fileName: [{
255
+ type: Input
256
+ }], forceProxy: [{
257
+ type: Input
258
+ }], keywords: [{
259
+ type: Input
260
+ }], landscape: [{
261
+ type: Input
262
+ }], margin: [{
263
+ type: Input
264
+ }], paperSize: [{
265
+ type: Input
266
+ }], repeatHeaders: [{
267
+ type: Input
268
+ }], scale: [{
269
+ type: Input
270
+ }], proxyData: [{
271
+ type: Input
272
+ }], proxyURL: [{
273
+ type: Input
274
+ }], proxyTarget: [{
275
+ type: Input
276
+ }], producer: [{
277
+ type: Input
278
+ }], subject: [{
279
+ type: Input
280
+ }], title: [{
281
+ type: Input
282
+ }], pageTemplateDirective: [{
283
+ type: ContentChild,
284
+ args: [PDFExportTemplateDirective, { static: false }]
285
+ }], marginComponent: [{
286
+ type: ContentChild,
287
+ args: [PDFExportMarginComponent, { static: false }]
288
+ }] } });
289
+
290
+ const COMPONENT_DIRECTIVES = [
291
+ PDFExportComponent,
292
+ PDFExportMarginComponent,
293
+ PDFExportTemplateDirective
294
+ ];
295
+ /**
296
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the PDF Export directive.
297
+ */
298
+ class PDFExportModule {
299
+ }
300
+ PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
301
+ PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, declarations: [PDFExportComponent,
302
+ PDFExportMarginComponent,
303
+ PDFExportTemplateDirective], exports: [PDFExportComponent,
304
+ PDFExportMarginComponent,
305
+ PDFExportTemplateDirective] });
306
+ PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule });
307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, decorators: [{
308
+ type: NgModule,
309
+ args: [{
310
+ declarations: [COMPONENT_DIRECTIVES],
311
+ exports: [COMPONENT_DIRECTIVES]
312
+ }]
313
+ }] });
314
+
315
+ /**
316
+ * Generated bundle index. Do not edit.
317
+ */
318
+
319
+ export { PDFExportComponent, PDFExportMarginComponent, PDFExportModule, PDFExportTemplateDirective, compileTemplate };
320
+
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
@@ -15,9 +15,9 @@ const packageMetadata = {
15
15
  name: '@progress/kendo-angular-pdf-export',
16
16
  productName: 'Kendo UI for Angular',
17
17
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
18
- publishDate: 1668698260,
18
+ publishDate: 1673469091,
19
19
  version: '',
20
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
20
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
21
21
  };
22
22
 
23
23
  class PDFExportTemplateDirective {
@@ -25,9 +25,9 @@ class PDFExportTemplateDirective {
25
25
  this.templateRef = templateRef;
26
26
  }
27
27
  }
28
- PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
- PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PDFExportTemplateDirective, selector: "[kendoPDFTemplate]", ngImport: i0 });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
28
+ PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
+ PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportTemplateDirective, selector: "[kendoPDFTemplate]", ngImport: i0 });
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
31
31
  type: Directive,
32
32
  args: [{
33
33
  selector: '[kendoPDFTemplate]'
@@ -56,9 +56,9 @@ class PDFExportMarginComponent {
56
56
  return options;
57
57
  }
58
58
  }
59
- PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
60
- PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PDFExportMarginComponent, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
59
+ PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
60
+ PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportMarginComponent, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
62
62
  type: Component,
63
63
  args: [{
64
64
  selector: 'kendo-pdf-export-margin',
@@ -225,9 +225,9 @@ class PDFExportComponent {
225
225
  saveAs(dataUri, fileName, options);
226
226
  }
227
227
  }
228
- PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
229
- PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PDFExportComponent, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
230
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportComponent, decorators: [{
228
+ PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
229
+ PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PDFExportComponent, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportComponent, decorators: [{
231
231
  type: Component,
232
232
  args: [{
233
233
  selector: 'kendo-pdf-export',
@@ -295,14 +295,14 @@ const COMPONENT_DIRECTIVES = [
295
295
  */
296
296
  class PDFExportModule {
297
297
  }
298
- PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
299
- PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule, declarations: [PDFExportComponent,
298
+ PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
299
+ PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, declarations: [PDFExportComponent,
300
300
  PDFExportMarginComponent,
301
301
  PDFExportTemplateDirective], exports: [PDFExportComponent,
302
302
  PDFExportMarginComponent,
303
303
  PDFExportTemplateDirective] });
304
- PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule });
305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PDFExportModule, decorators: [{
304
+ PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule });
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PDFExportModule, decorators: [{
306
306
  type: NgModule,
307
307
  args: [{
308
308
  declarations: [COMPONENT_DIRECTIVES],
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { PDFExportComponent } from './pdf-export.component';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { PackageMetadata } from '@progress/kendo-licensing';
package/package.json CHANGED
@@ -1,14 +1,10 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-pdf-export",
3
- "version": "4.0.1",
3
+ "version": "11.0.0-develop.100",
4
4
  "description": "Kendo UI for Angular PDF Export Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
7
7
  "homepage": "https://www.telerik.com/kendo-angular-ui/components/",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/telerik/kendo-angular-pdf-export.git"
11
- },
12
8
  "bugs": {
13
9
  "url": "https://github.com/telerik/kendo-angular"
14
10
  },
@@ -19,62 +15,40 @@
19
15
  "@progress": {
20
16
  "friendlyName": "PDFExport"
21
17
  },
22
- "dependencies": {
23
- "@progress/kendo-file-saver": "^1.0.1",
24
- "@progress/kendo-schematics": "^3.0.0",
25
- "tslib": "^2.3.1"
26
- },
27
18
  "peerDependencies": {
28
- "@angular/common": "12 - 15",
29
- "@angular/core": "12 - 15",
30
- "@progress/kendo-angular-common": "^3.0.0",
19
+ "@angular/animations": "13 - 15",
20
+ "@angular/common": "13 - 15",
21
+ "@angular/core": "13 - 15",
22
+ "@angular/platform-browser": "13 - 15",
31
23
  "@progress/kendo-drawing": "^1.2.0",
24
+ "@progress/kendo-file-saver": "^1.0.1",
32
25
  "@progress/kendo-licensing": "^1.0.2",
26
+ "@progress/kendo-angular-common": "11.0.0-develop.100",
27
+ "@progress/kendo-angular-schematics": "11.0.0-develop.100",
33
28
  "rxjs": "^6.5.3 || ^7.0.0"
34
29
  },
35
- "config": {
36
- "commitizen": {
37
- "path": "./node_modules/cz-conventional-changelog"
38
- },
39
- "ghooks": {
40
- "commit-msg": "validate-commit-msg"
41
- },
42
- "validate-commit-msg": {
43
- "types": [
44
- "feat",
45
- "fix",
46
- "docs",
47
- "style",
48
- "refactor",
49
- "perf",
50
- "test",
51
- "chore",
52
- "revert"
53
- ],
54
- "warnOnFail": false,
55
- "maxSubjectLength": 100
56
- }
30
+ "dependencies": {
31
+ "tslib": "^2.3.1"
57
32
  },
58
33
  "schematics": "./schematics/collection.json",
59
- "release": {
60
- "debug": false,
61
- "branchTags": {
62
- "develop": "dev"
63
- },
64
- "fallbackTags": {
65
- "dev": "latest"
34
+ "module": "fesm2015/progress-kendo-angular-pdf-export.mjs",
35
+ "es2020": "fesm2020/progress-kendo-angular-pdf-export.mjs",
36
+ "esm2020": "esm2020/progress-kendo-angular-pdf-export.mjs",
37
+ "fesm2020": "fesm2020/progress-kendo-angular-pdf-export.mjs",
38
+ "fesm2015": "fesm2015/progress-kendo-angular-pdf-export.mjs",
39
+ "typings": "progress-kendo-angular-pdf-export.d.ts",
40
+ "exports": {
41
+ "./package.json": {
42
+ "default": "./package.json"
66
43
  },
67
- "analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
68
- "generateNotes": "@progress/semantic-prerelease/generateNotes",
69
- "getLastRelease": "@progress/semantic-prerelease/getLastRelease",
70
- "verifyConditions": "@progress/semantic-prerelease/verifyConditions",
71
- "verifyRelease": "@progress/semantic-prerelease/verifyRelease"
44
+ ".": {
45
+ "types": "./progress-kendo-angular-pdf-export.d.ts",
46
+ "esm2020": "./esm2020/progress-kendo-angular-pdf-export.mjs",
47
+ "es2020": "./fesm2020/progress-kendo-angular-pdf-export.mjs",
48
+ "es2015": "./fesm2015/progress-kendo-angular-pdf-export.mjs",
49
+ "node": "./fesm2015/progress-kendo-angular-pdf-export.mjs",
50
+ "default": "./fesm2020/progress-kendo-angular-pdf-export.mjs"
51
+ }
72
52
  },
73
- "main": "bundles/kendo-angular-pdf-export.umd.js",
74
- "module": "fesm2015/kendo-angular-pdf-export.js",
75
- "es2015": "fesm2015/kendo-angular-pdf-export.js",
76
- "esm2015": "esm2015/kendo-angular-pdf-export.js",
77
- "fesm2015": "fesm2015/kendo-angular-pdf-export.js",
78
- "typings": "kendo-angular-pdf-export.d.ts",
79
53
  "sideEffects": false
80
54
  }
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { pdf } from '@progress/kendo-drawing';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { TemplateRef } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { ElementRef } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from "@angular/core";
@@ -1,9 +1,9 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
6
  * Generated bundle index. Do not edit.
7
7
  */
8
8
  /// <amd-module name="@progress/kendo-angular-pdf-export" />
9
- export * from './main';
9
+ export * from './index';
@@ -1,13 +1,9 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
1
  "use strict";
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  const schematics_1 = require("@angular-devkit/schematics");
8
4
  function default_1(options) {
9
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'PDFExportModule', package: 'pdf-export' //package name, e.g grid
10
6
  });
11
- return schematics_1.externalSchematic('@progress/kendo-schematics', 'ng-add', finalOptions);
7
+ return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
12
8
  }
13
9
  exports.default = default_1;
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-drawing"),require("@progress/kendo-file-saver"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define("KendoAngularPdfExport",["exports","@angular/core","@progress/kendo-drawing","@progress/kendo-file-saver","@progress/kendo-licensing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularPdfExport={},e.ng.core,e.KendoDrawing,e.KendoFileSaver,e.KendoLicensing)}(this,function(e,t,r,n,o){"use strict";function a(r){var n;return r&&r.__esModule?r:(n=Object.create(null),r&&Object.keys(r).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(r,e),Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}}))}),n.default=r,Object.freeze(n))}var p=a(t),i={name:"@progress/kendo-angular-pdf-export",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1668698260,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"},s=function(e){this.templateRef=e},c=(s.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:s,deps:[{token:p.TemplateRef,optional:!0}],target:p.ɵɵFactoryTarget.Directive}),s.ɵdir=p.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:s,selector:"[kendoPDFTemplate]",ngImport:p}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:s,decorators:[{type:t.Directive,args:[{selector:"[kendoPDFTemplate]"}]}],ctorParameters:function(){return[{type:p.TemplateRef,decorators:[{type:t.Optional}]}]}}),["bottom","left","right","top"]),u=(Object.defineProperty(l.prototype,"options",{get:function(){for(var e={},t=0;t<c.length;t++){var r=c[t],n=this[r];void 0!==n&&(e[r]=n)}return e},enumerable:!1,configurable:!0}),l);function l(){}u.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:u,deps:[],target:p.ɵɵFactoryTarget.Component}),u.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"kendo-pdf-export-margin",inputs:{left:"left",top:"top",right:"right",bottom:"bottom"},ngImport:p,template:"",isInline:!0}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:u,decorators:[{type:t.Component,args:[{selector:"kendo-pdf-export-margin",template:""}]}],propDecorators:{left:[{type:t.Input}],top:[{type:t.Input}],right:[{type:t.Input}],bottom:[{type:t.Input}]}});function d(e){function t(e){Object.assign(r,e),n.detectChanges();var t=document.createElement("span");return n.rootNodes.forEach(function(e){t.appendChild(e.cloneNode(!0))}),t}var r={},n=e.createEmbeddedView(r);return t.destroy=function(){n.destroy(),n=null},t}Object.defineProperty(m.prototype,"drawMargin",{get:function(){var e=this.marginComponent,t=this.margin;return t=e?Object.assign(t||{},e.options):t},enumerable:!1,configurable:!0}),m.prototype.saveAs=function(e){void 0===e&&(e=this.fileName),this.save(this.element.nativeElement,e)},m.prototype.export=function(){return this.exportElement(this.element.nativeElement)},m.prototype.save=function(e,t){var r=this;this.exportElement(e).then(function(e){return r.exportGroup(e,r.pdfOptions())}).then(function(e){return r.saveDataUri(e,t,r.saveOptions())})},m.prototype.exportElement=function(e){var e=this.drawElement(e,this.drawOptions()),t=this.cleanup.bind(this);return e.then(t,t),e},m.prototype.cleanup=function(){this.pageTemplate&&(this.pageTemplate.destroy(),delete this.pageTemplate)},m.prototype.drawOptions=function(){return this.pageTemplateDirective&&(this.pageTemplate=d(this.pageTemplateDirective.templateRef)),{avoidLinks:this.avoidLinks,forcePageBreak:this.forcePageBreak,keepTogether:this.keepTogether,margin:this.drawMargin,paperSize:this.paperSize,landscape:this.landscape,repeatHeaders:this.repeatHeaders,scale:this.scale,template:this.pageTemplate}},m.prototype.pdfOptions=function(){return{autoPrint:this.autoPrint,author:this.author,creator:this.creator,date:this.date,imgDPI:this.imageResolution,keywords:this.keywords,landscape:this.landscape,margin:this.drawMargin,multiPage:!0,paperSize:this.paperSize,producer:this.producer,subject:this.subject,title:this.title}},m.prototype.saveOptions=function(){return{forceProxy:this.forceProxy,proxyData:this.proxyData,proxyTarget:this.proxyTarget,proxyURL:this.proxyURL}},m.prototype.drawElement=function(e,t){return r.drawDOM(e,t)},m.prototype.exportGroup=function(e,t){return r.exportPDF(e,t)},m.prototype.saveDataUri=function(e,t,r){n.saveAs(e,t,r)};var g=m;function m(e){this.element=e,this.creator="Kendo UI PDF Generator",this.fileName="export.pdf",o.validatePackage(i)}g.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g,deps:[{token:p.ElementRef}],target:p.ɵɵFactoryTarget.Component}),g.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:g,selector:"kendo-pdf-export",inputs:{autoPrint:"autoPrint",author:"author",avoidLinks:"avoidLinks",forcePageBreak:"forcePageBreak",keepTogether:"keepTogether",creator:"creator",date:"date",imageResolution:"imageResolution",fileName:"fileName",forceProxy:"forceProxy",keywords:"keywords",landscape:"landscape",margin:"margin",paperSize:"paperSize",repeatHeaders:"repeatHeaders",scale:"scale",proxyData:"proxyData",proxyURL:"proxyURL",proxyTarget:"proxyTarget",producer:"producer",subject:"subject",title:"title"},queries:[{propertyName:"pageTemplateDirective",first:!0,predicate:s,descendants:!0},{propertyName:"marginComponent",first:!0,predicate:u,descendants:!0}],ngImport:p,template:"<div><ng-content></ng-content></div>",isInline:!0}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:g,decorators:[{type:t.Component,args:[{selector:"kendo-pdf-export",template:"<div><ng-content></ng-content></div>"}]}],ctorParameters:function(){return[{type:p.ElementRef}]},propDecorators:{autoPrint:[{type:t.Input}],author:[{type:t.Input}],avoidLinks:[{type:t.Input}],forcePageBreak:[{type:t.Input}],keepTogether:[{type:t.Input}],creator:[{type:t.Input}],date:[{type:t.Input}],imageResolution:[{type:t.Input}],fileName:[{type:t.Input}],forceProxy:[{type:t.Input}],keywords:[{type:t.Input}],landscape:[{type:t.Input}],margin:[{type:t.Input}],paperSize:[{type:t.Input}],repeatHeaders:[{type:t.Input}],scale:[{type:t.Input}],proxyData:[{type:t.Input}],proxyURL:[{type:t.Input}],proxyTarget:[{type:t.Input}],producer:[{type:t.Input}],subject:[{type:t.Input}],title:[{type:t.Input}],pageTemplateDirective:[{type:t.ContentChild,args:[s,{static:!1}]}],marginComponent:[{type:t.ContentChild,args:[u,{static:!1}]}]}});var y=[g,u,s],f=function(){};f.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:f,deps:[],target:p.ɵɵFactoryTarget.NgModule}),f.ɵmod=p.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:f,declarations:[g,u,s],exports:[g,u,s]}),f.ɵinj=p.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:f}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:f,decorators:[{type:t.NgModule,args:[{declarations:[y],exports:[y]}]}]}),e.PDFExportComponent=g,e.PDFExportMarginComponent=u,e.PDFExportModule=f,e.PDFExportTemplateDirective=s,e.compileTemplate=d,Object.defineProperty(e,"__esModule",{value:!0})});
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../tooling/schematics/ngAdd/index.ts"],"names":[],"mappings":";;AAAA,2DAKqC;AAErC,mBAAyB,OAAY;IACjC,MAAM,YAAY,mCACX,OAAO,KACV,YAAY,EAAE,iBAAiB,EAC/B,OAAO,EAAE,YAAY,CAAC,wBAAwB;OACjD,CAAC;IAEF,OAAO,8BAAiB,CAAC,4BAA4B,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AACnF,CAAC;AARD,4BAQC"}