@progress/kendo-angular-pdf-export
Advanced tools
Comparing version 1.0.2 to 1.0.3-dev.201802271242
@@ -1,2 +0,1 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { Component, ContentChild, ElementRef, Input } from '@angular/core'; | ||
@@ -12,16 +11,20 @@ import { drawDOM, exportPDF } from '@progress/kendo-drawing'; | ||
* @example | ||
* <kendo-pdf-export fileName="Report.pdf" paperSize="A4" [landscape]="true" avoidLinks > | ||
* <kendo-pdf-export-margin top="2cm" left="1cm" right="1cm" bottom="2cm"></kendo-pdf-export-margin> | ||
* <ng-template kendoPDFTemplate let-pageNum="pageNum" let-totalPages="totalPages"> | ||
* <div class="page-template"> | ||
* <div class="header"> | ||
* <div style="float: right">Page {{ pageNum }} of {{ totalPages }}</div> | ||
* Multi-page export with automatic page breaking | ||
* </div> | ||
* <div class="footer"> | ||
* Page {{ pageNum }} of {{ totalPages }} | ||
* </div> | ||
* ```ts-preview | ||
* _@Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <div class="example-config"> | ||
* <button kendo-button (click)="pdf.saveAs('document.pdf')"> | ||
* Save As PDF... | ||
* </button> | ||
* </div> | ||
* </ng-template> | ||
* </kendo-pdf-export> | ||
* | ||
* <kendo-pdf-export #pdf paperSize="A4" margin="2cm"> | ||
* Content goes here | ||
* </kendo-pdf-export> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* } | ||
* ``` | ||
*/ | ||
@@ -37,3 +40,3 @@ var PDFExportComponent = /** @class */ (function () { | ||
/** | ||
* Specifies the file name of the exported PDF file. | ||
* Specifies the name of the exported PDF file. | ||
* @default "Export.pdf" | ||
@@ -56,4 +59,4 @@ */ | ||
/** | ||
* Saves the content as a PDF file with the specified name | ||
* @param fileName The name of the exported file name | ||
* Saves the content as a PDF file with the specified name. | ||
* @param fileName - The name of the exported file. | ||
*/ | ||
@@ -65,5 +68,5 @@ PDFExportComponent.prototype.saveAs = function (fileName) { | ||
/** | ||
* Exports the content as a Group for further processing | ||
* Exports the content as a `Group` for further processing. | ||
* | ||
* @return The root group of the exported scene | ||
* @return - The root group of the exported scene. | ||
*/ | ||
@@ -140,103 +143,39 @@ PDFExportComponent.prototype.export = function () { | ||
}; | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "author", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "avoidLinks", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "forcePageBreak", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "keepTogether", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "creator", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Date) | ||
], PDFExportComponent.prototype, "date", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Number) | ||
], PDFExportComponent.prototype, "imageResolution", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "fileName", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], PDFExportComponent.prototype, "forceProxy", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "keywords", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], PDFExportComponent.prototype, "landscape", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "margin", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "paperSize", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], PDFExportComponent.prototype, "repeatHeaders", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Number) | ||
], PDFExportComponent.prototype, "scale", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "proxyData", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "proxyURL", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "proxyTarget", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "producer", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "subject", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "title", void 0); | ||
tslib_1.__decorate([ | ||
ContentChild(PDFTemplateDirective), | ||
tslib_1.__metadata("design:type", PDFTemplateDirective) | ||
], PDFExportComponent.prototype, "pageTemplateDirective", void 0); | ||
tslib_1.__decorate([ | ||
ContentChild(PDFMarginComponent), | ||
tslib_1.__metadata("design:type", PDFMarginComponent) | ||
], PDFExportComponent.prototype, "marginComponent", void 0); | ||
PDFExportComponent = tslib_1.__decorate([ | ||
Component({ | ||
selector: 'kendo-pdf-export', | ||
template: "<div><ng-content></ng-content></div>" | ||
}), | ||
tslib_1.__metadata("design:paramtypes", [ElementRef]) | ||
], PDFExportComponent); | ||
PDFExportComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'kendo-pdf-export', | ||
template: "<div><ng-content></ng-content></div>" | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFExportComponent.ctorParameters = function () { return [ | ||
{ type: ElementRef, }, | ||
]; }; | ||
PDFExportComponent.propDecorators = { | ||
'author': [{ type: Input },], | ||
'avoidLinks': [{ type: Input },], | ||
'forcePageBreak': [{ type: Input },], | ||
'keepTogether': [{ type: Input },], | ||
'creator': [{ type: Input },], | ||
'date': [{ type: Input },], | ||
'imageResolution': [{ type: Input },], | ||
'fileName': [{ type: Input },], | ||
'forceProxy': [{ type: Input },], | ||
'keywords': [{ type: Input },], | ||
'landscape': [{ type: Input },], | ||
'margin': [{ type: Input },], | ||
'paperSize': [{ type: Input },], | ||
'repeatHeaders': [{ type: Input },], | ||
'scale': [{ type: Input },], | ||
'proxyData': [{ type: Input },], | ||
'proxyURL': [{ type: Input },], | ||
'proxyTarget': [{ type: Input },], | ||
'producer': [{ type: Input },], | ||
'subject': [{ type: Input },], | ||
'title': [{ type: Input },], | ||
'pageTemplateDirective': [{ type: ContentChild, args: [PDFTemplateDirective,] },], | ||
'marginComponent': [{ type: ContentChild, args: [PDFMarginComponent,] },], | ||
}; | ||
return PDFExportComponent; | ||
}()); | ||
export { PDFExportComponent }; |
@@ -1,2 +0,1 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { NgModule } from '@angular/core'; | ||
@@ -17,10 +16,12 @@ import { PDFExportComponent } from './pdf-export.component'; | ||
} | ||
PDFExportModule = tslib_1.__decorate([ | ||
NgModule({ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES] | ||
}) | ||
], PDFExportModule); | ||
PDFExportModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFExportModule.ctorParameters = function () { return []; }; | ||
return PDFExportModule; | ||
}()); | ||
export { PDFExportModule }; |
@@ -1,4 +0,6 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { Component, Input } from '@angular/core'; | ||
var FIELDS = ['bottom', 'left', 'right', 'top']; | ||
/** | ||
* Represents the Kendo UI PDFMargin component for Angular. | ||
*/ | ||
var PDFMarginComponent = /** @class */ (function () { | ||
@@ -25,26 +27,18 @@ function PDFMarginComponent() { | ||
}); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "left", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "top", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "right", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "bottom", void 0); | ||
PDFMarginComponent = tslib_1.__decorate([ | ||
Component({ | ||
selector: 'kendo-pdf-export-margin', | ||
template: "" | ||
}) | ||
], PDFMarginComponent); | ||
PDFMarginComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'kendo-pdf-export-margin', | ||
template: "" | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFMarginComponent.ctorParameters = function () { return []; }; | ||
PDFMarginComponent.propDecorators = { | ||
'left': [{ type: Input },], | ||
'top': [{ type: Input },], | ||
'right': [{ type: Input },], | ||
'bottom': [{ type: Input },], | ||
}; | ||
return PDFMarginComponent; | ||
}()); | ||
export { PDFMarginComponent }; |
@@ -1,2 +0,1 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { Directive, Optional, TemplateRef } from '@angular/core'; | ||
@@ -7,11 +6,13 @@ var PDFTemplateDirective = /** @class */ (function () { | ||
} | ||
PDFTemplateDirective = tslib_1.__decorate([ | ||
Directive({ | ||
selector: '[kendoPDFTemplate]' | ||
}), | ||
tslib_1.__param(0, Optional()), | ||
tslib_1.__metadata("design:paramtypes", [TemplateRef]) | ||
], PDFTemplateDirective); | ||
PDFTemplateDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[kendoPDFTemplate]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFTemplateDirective.ctorParameters = function () { return [ | ||
{ type: TemplateRef, decorators: [{ type: Optional },] }, | ||
]; }; | ||
return PDFTemplateDirective; | ||
}()); | ||
export { PDFTemplateDirective }; |
@@ -1,2 +0,1 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { Component, ContentChild, ElementRef, Input } from '@angular/core'; | ||
@@ -12,18 +11,22 @@ import { drawDOM, exportPDF } from '@progress/kendo-drawing'; | ||
* @example | ||
* <kendo-pdf-export fileName="Report.pdf" paperSize="A4" [landscape]="true" avoidLinks > | ||
* <kendo-pdf-export-margin top="2cm" left="1cm" right="1cm" bottom="2cm"></kendo-pdf-export-margin> | ||
* <ng-template kendoPDFTemplate let-pageNum="pageNum" let-totalPages="totalPages"> | ||
* <div class="page-template"> | ||
* <div class="header"> | ||
* <div style="float: right">Page {{ pageNum }} of {{ totalPages }}</div> | ||
* Multi-page export with automatic page breaking | ||
* </div> | ||
* <div class="footer"> | ||
* Page {{ pageNum }} of {{ totalPages }} | ||
* </div> | ||
* ```ts-preview | ||
* _@Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <div class="example-config"> | ||
* <button kendo-button (click)="pdf.saveAs('document.pdf')"> | ||
* Save As PDF... | ||
* </button> | ||
* </div> | ||
* </ng-template> | ||
* </kendo-pdf-export> | ||
* | ||
* <kendo-pdf-export #pdf paperSize="A4" margin="2cm"> | ||
* Content goes here | ||
* </kendo-pdf-export> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* } | ||
* ``` | ||
*/ | ||
let PDFExportComponent = class PDFExportComponent { | ||
export class PDFExportComponent { | ||
constructor(element) { | ||
@@ -37,3 +40,3 @@ this.element = element; | ||
/** | ||
* Specifies the file name of the exported PDF file. | ||
* Specifies the name of the exported PDF file. | ||
* @default "Export.pdf" | ||
@@ -52,4 +55,4 @@ */ | ||
/** | ||
* Saves the content as a PDF file with the specified name | ||
* @param fileName The name of the exported file name | ||
* Saves the content as a PDF file with the specified name. | ||
* @param fileName - The name of the exported file. | ||
*/ | ||
@@ -60,5 +63,5 @@ saveAs(fileName = this.fileName) { | ||
/** | ||
* Exports the content as a Group for further processing | ||
* Exports the content as a `Group` for further processing. | ||
* | ||
* @return The root group of the exported scene | ||
* @return - The root group of the exported scene. | ||
*/ | ||
@@ -134,102 +137,37 @@ export() { | ||
} | ||
} | ||
PDFExportComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'kendo-pdf-export', | ||
template: `<div><ng-content></ng-content></div>` | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFExportComponent.ctorParameters = () => [ | ||
{ type: ElementRef, }, | ||
]; | ||
PDFExportComponent.propDecorators = { | ||
'author': [{ type: Input },], | ||
'avoidLinks': [{ type: Input },], | ||
'forcePageBreak': [{ type: Input },], | ||
'keepTogether': [{ type: Input },], | ||
'creator': [{ type: Input },], | ||
'date': [{ type: Input },], | ||
'imageResolution': [{ type: Input },], | ||
'fileName': [{ type: Input },], | ||
'forceProxy': [{ type: Input },], | ||
'keywords': [{ type: Input },], | ||
'landscape': [{ type: Input },], | ||
'margin': [{ type: Input },], | ||
'paperSize': [{ type: Input },], | ||
'repeatHeaders': [{ type: Input },], | ||
'scale': [{ type: Input },], | ||
'proxyData': [{ type: Input },], | ||
'proxyURL': [{ type: Input },], | ||
'proxyTarget': [{ type: Input },], | ||
'producer': [{ type: Input },], | ||
'subject': [{ type: Input },], | ||
'title': [{ type: Input },], | ||
'pageTemplateDirective': [{ type: ContentChild, args: [PDFTemplateDirective,] },], | ||
'marginComponent': [{ type: ContentChild, args: [PDFMarginComponent,] },], | ||
}; | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "author", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "avoidLinks", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "forcePageBreak", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "keepTogether", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "creator", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Date) | ||
], PDFExportComponent.prototype, "date", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Number) | ||
], PDFExportComponent.prototype, "imageResolution", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "fileName", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], PDFExportComponent.prototype, "forceProxy", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "keywords", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], PDFExportComponent.prototype, "landscape", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "margin", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "paperSize", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], PDFExportComponent.prototype, "repeatHeaders", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Number) | ||
], PDFExportComponent.prototype, "scale", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFExportComponent.prototype, "proxyData", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "proxyURL", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "proxyTarget", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "producer", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "subject", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", String) | ||
], PDFExportComponent.prototype, "title", void 0); | ||
tslib_1.__decorate([ | ||
ContentChild(PDFTemplateDirective), | ||
tslib_1.__metadata("design:type", PDFTemplateDirective) | ||
], PDFExportComponent.prototype, "pageTemplateDirective", void 0); | ||
tslib_1.__decorate([ | ||
ContentChild(PDFMarginComponent), | ||
tslib_1.__metadata("design:type", PDFMarginComponent) | ||
], PDFExportComponent.prototype, "marginComponent", void 0); | ||
PDFExportComponent = tslib_1.__decorate([ | ||
Component({ | ||
selector: 'kendo-pdf-export', | ||
template: `<div><ng-content></ng-content></div>` | ||
}), | ||
tslib_1.__metadata("design:paramtypes", [ElementRef]) | ||
], PDFExportComponent); | ||
export { PDFExportComponent }; |
@@ -1,2 +0,1 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { NgModule } from '@angular/core'; | ||
@@ -14,10 +13,11 @@ import { PDFExportComponent } from './pdf-export.component'; | ||
*/ | ||
let PDFExportModule = class PDFExportModule { | ||
}; | ||
PDFExportModule = tslib_1.__decorate([ | ||
NgModule({ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES] | ||
}) | ||
], PDFExportModule); | ||
export { PDFExportModule }; | ||
export class PDFExportModule { | ||
} | ||
PDFExportModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [COMPONENT_DIRECTIVES], | ||
exports: [COMPONENT_DIRECTIVES] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFExportModule.ctorParameters = () => []; |
@@ -1,5 +0,7 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { Component, Input } from '@angular/core'; | ||
const FIELDS = ['bottom', 'left', 'right', 'top']; | ||
let PDFMarginComponent = class PDFMarginComponent { | ||
/** | ||
* Represents the Kendo UI PDFMargin component for Angular. | ||
*/ | ||
export class PDFMarginComponent { | ||
/** | ||
@@ -19,25 +21,16 @@ * @hidden | ||
} | ||
} | ||
PDFMarginComponent.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'kendo-pdf-export-margin', | ||
template: `` | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFMarginComponent.ctorParameters = () => []; | ||
PDFMarginComponent.propDecorators = { | ||
'left': [{ type: Input },], | ||
'top': [{ type: Input },], | ||
'right': [{ type: Input },], | ||
'bottom': [{ type: Input },], | ||
}; | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "left", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "top", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "right", void 0); | ||
tslib_1.__decorate([ | ||
Input(), | ||
tslib_1.__metadata("design:type", Object) | ||
], PDFMarginComponent.prototype, "bottom", void 0); | ||
PDFMarginComponent = tslib_1.__decorate([ | ||
Component({ | ||
selector: 'kendo-pdf-export-margin', | ||
template: `` | ||
}) | ||
], PDFMarginComponent); | ||
export { PDFMarginComponent }; |
@@ -1,15 +0,15 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { Directive, Optional, TemplateRef } from '@angular/core'; | ||
let PDFTemplateDirective = class PDFTemplateDirective { | ||
export class PDFTemplateDirective { | ||
constructor(templateRef) { | ||
this.templateRef = templateRef; | ||
} | ||
}; | ||
PDFTemplateDirective = tslib_1.__decorate([ | ||
Directive({ | ||
selector: '[kendoPDFTemplate]' | ||
}), | ||
tslib_1.__param(0, Optional()), | ||
tslib_1.__metadata("design:paramtypes", [TemplateRef]) | ||
], PDFTemplateDirective); | ||
export { PDFTemplateDirective }; | ||
} | ||
PDFTemplateDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[kendoPDFTemplate]' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
PDFTemplateDirective.ctorParameters = () => [ | ||
{ type: TemplateRef, decorators: [{ type: Optional },] }, | ||
]; |
"use strict"; | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var pdf_export_component_1 = require("./pdf-export.component"); | ||
exports.PDFExportComponent = pdf_export_component_1.PDFExportComponent; | ||
var pdf_export_module_1 = require("./pdf-export.module"); | ||
exports.PDFExportModule = pdf_export_module_1.PDFExportModule; | ||
var pdf_margin_component_1 = require("./pdf-margin.component"); | ||
exports.PDFMarginComponent = pdf_margin_component_1.PDFMarginComponent; | ||
var pdf_template_directive_1 = require("./pdf-template.directive"); | ||
exports.PDFTemplateDirective = pdf_template_directive_1.PDFTemplateDirective; | ||
var compile_template_1 = require("./compile-template"); | ||
exports.compileTemplate = compile_template_1.compileTemplate; | ||
var tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./public_api"), exports); |
@@ -13,16 +13,20 @@ "use strict"; | ||
* @example | ||
* <kendo-pdf-export fileName="Report.pdf" paperSize="A4" [landscape]="true" avoidLinks > | ||
* <kendo-pdf-export-margin top="2cm" left="1cm" right="1cm" bottom="2cm"></kendo-pdf-export-margin> | ||
* <ng-template kendoPDFTemplate let-pageNum="pageNum" let-totalPages="totalPages"> | ||
* <div class="page-template"> | ||
* <div class="header"> | ||
* <div style="float: right">Page {{ pageNum }} of {{ totalPages }}</div> | ||
* Multi-page export with automatic page breaking | ||
* </div> | ||
* <div class="footer"> | ||
* Page {{ pageNum }} of {{ totalPages }} | ||
* </div> | ||
* ```ts-preview | ||
* _@Component({ | ||
* selector: 'my-app', | ||
* template: ` | ||
* <div class="example-config"> | ||
* <button kendo-button (click)="pdf.saveAs('document.pdf')"> | ||
* Save As PDF... | ||
* </button> | ||
* </div> | ||
* </ng-template> | ||
* </kendo-pdf-export> | ||
* | ||
* <kendo-pdf-export #pdf paperSize="A4" margin="2cm"> | ||
* Content goes here | ||
* </kendo-pdf-export> | ||
* ` | ||
* }) | ||
* export class AppComponent { | ||
* } | ||
* ``` | ||
*/ | ||
@@ -38,3 +42,3 @@ var PDFExportComponent = /** @class */ (function () { | ||
/** | ||
* Specifies the file name of the exported PDF file. | ||
* Specifies the name of the exported PDF file. | ||
* @default "Export.pdf" | ||
@@ -57,4 +61,4 @@ */ | ||
/** | ||
* Saves the content as a PDF file with the specified name | ||
* @param fileName The name of the exported file name | ||
* Saves the content as a PDF file with the specified name. | ||
* @param fileName - The name of the exported file. | ||
*/ | ||
@@ -66,5 +70,5 @@ PDFExportComponent.prototype.saveAs = function (fileName) { | ||
/** | ||
* Exports the content as a Group for further processing | ||
* Exports the content as a `Group` for further processing. | ||
* | ||
* @return The root group of the exported scene | ||
* @return - The root group of the exported scene. | ||
*/ | ||
@@ -71,0 +75,0 @@ PDFExportComponent.prototype.export = function () { |
@@ -5,2 +5,5 @@ "use strict"; | ||
var FIELDS = ['bottom', 'left', 'right', 'top']; | ||
/** | ||
* Represents the Kendo UI PDFMargin component for Angular. | ||
*/ | ||
var PDFMarginComponent = /** @class */ (function () { | ||
@@ -7,0 +10,0 @@ function PDFMarginComponent() { |
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-angular-pdf-export",["@angular/core","tslib","@progress/kendo-drawing","@progress/kendo-file-saver"],function(e){var t,o,r,a;function n(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=n(e)},function(e){o=n(e)},function(e){r=n(e)},function(e){a=n(e)}],execute:function(){!function(e){var t={};function o(r){if(t[r])return t[r].exports;var a=t[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=e,o.c=t,o.p="",o(0)}([function(t,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=r(1);o.PDFExportComponent=a.PDFExportComponent;var n=r(9);o.PDFExportModule=n.PDFExportModule;var p=r(7);o.PDFMarginComponent=p.PDFMarginComponent;var i=r(6);o.PDFTemplateDirective=i.PDFTemplateDirective;var d=r(8);o.compileTemplate=d.compileTemplate,function(t){for(var o in t)e(o,t[o])}(o)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=o(4),p=o(5),i=o(6),d=o(7),s=o(8),c=function(){function e(e){this.element=e,this.creator="Kendo UI PDF Generator",this.fileName="export.pdf"}return Object.defineProperty(e.prototype,"drawMargin",{get:function(){var e=this.marginComponent,t=this.margin;return e&&(t=Object.assign(t||{},e.options)),t},enumerable:!0,configurable:!0}),e.prototype.saveAs=function(e){void 0===e&&(e=this.fileName),this.save(this.element.nativeElement,e)},e.prototype.export=function(){return this.exportElement(this.element.nativeElement)},e.prototype.save=function(e,t){var o=this;this.exportElement(e).then(function(e){return o.exportGroup(e,o.pdfOptions())}).then(function(e){return o.saveDataUri(e,t,o.saveOptions())})},e.prototype.exportElement=function(e){var t=this.drawElement(e,this.drawOptions()),o=this.cleanup.bind(this);return t.then(o,o),t},e.prototype.cleanup=function(){this.pageTemplate&&(this.pageTemplate.destroy(),delete this.pageTemplate)},e.prototype.drawOptions=function(){return this.pageTemplateDirective&&(this.pageTemplate=s.compileTemplate(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}},e.prototype.pdfOptions=function(){return{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}},e.prototype.saveOptions=function(){return{forceProxy:this.forceProxy,proxyData:this.proxyData,proxyTarget:this.proxyTarget,proxyURL:this.proxyURL}},e.prototype.drawElement=function(e,t){return n.drawDOM(e,t)},e.prototype.exportGroup=function(e,t){return n.exportPDF(e,t)},e.prototype.saveDataUri=function(e,t,o){p.saveAs(e,t,o)},r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"author",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"avoidLinks",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"forcePageBreak",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"keepTogether",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"creator",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Date)],e.prototype,"date",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Number)],e.prototype,"imageResolution",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"fileName",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],e.prototype,"forceProxy",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"keywords",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],e.prototype,"landscape",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"margin",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"paperSize",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],e.prototype,"repeatHeaders",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Number)],e.prototype,"scale",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"proxyData",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"proxyURL",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"proxyTarget",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"producer",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"subject",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"title",void 0),r.__decorate([a.ContentChild(i.PDFTemplateDirective),r.__metadata("design:type",i.PDFTemplateDirective)],e.prototype,"pageTemplateDirective",void 0),r.__decorate([a.ContentChild(d.PDFMarginComponent),r.__metadata("design:type",d.PDFMarginComponent)],e.prototype,"marginComponent",void 0),e=r.__decorate([a.Component({selector:"kendo-pdf-export",template:"<div><ng-content></ng-content></div>"}),r.__metadata("design:paramtypes",[a.ElementRef])],e)}();t.PDFExportComponent=c},function(e,t){e.exports=o},function(e,o){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=function(){function e(e){this.templateRef=e}return e=r.__decorate([a.Directive({selector:"[kendoPDFTemplate]"}),r.__param(0,a.Optional()),r.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.PDFTemplateDirective=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=["bottom","left","right","top"],p=function(){function e(){}return Object.defineProperty(e.prototype,"options",{get:function(){for(var e={},t=0;t<n.length;t++){var o=n[t],r=this[o];void 0!==r&&(e[o]=r)}return e},enumerable:!0,configurable:!0}),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"left",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"top",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"right",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"bottom",void 0),e=r.__decorate([a.Component({selector:"kendo-pdf-export-margin",template:""})],e)}();t.PDFMarginComponent=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileTemplate=function(e){var t={},o=e.createEmbeddedView(t),r=function(e){Object.assign(t,e),o.detectChanges();var r=document.createElement("span");return o.rootNodes.forEach(function(e){r.appendChild(e.cloneNode(!0))}),r};return r.destroy=function(){o.destroy(),o=null},r}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=o(1),p=o(7),i=o(6),d=[n.PDFExportComponent,p.PDFMarginComponent,i.PDFTemplateDirective],s=function(){function e(){}return e=r.__decorate([a.NgModule({declarations:[d],exports:[d]})],e)}();t.PDFExportModule=s}])}}}); | ||
System.register("@progress/kendo-angular-pdf-export",["tslib","@angular/core","@progress/kendo-drawing","@progress/kendo-file-saver"],function(e){var t,o,r,a;function n(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=n(e)},function(e){o=n(e)},function(e){r=n(e)},function(e){a=n(e)}],execute:function(){!function(e){var t={};function o(r){if(t[r])return t[r].exports;var a=t[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=e,o.c=t,o.p="",o(0)}([function(t,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=r(1);o.PDFExportComponent=a.PDFExportComponent;var n=r(9);o.PDFExportModule=n.PDFExportModule;var p=r(7);o.PDFMarginComponent=p.PDFMarginComponent;var i=r(6);o.PDFTemplateDirective=i.PDFTemplateDirective;var d=r(8);o.compileTemplate=d.compileTemplate,function(t){for(var o in t)e(o,t[o])}(o)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=o(4),p=o(5),i=o(6),d=o(7),s=o(8),c=function(){function e(e){this.element=e,this.creator="Kendo UI PDF Generator",this.fileName="export.pdf"}return Object.defineProperty(e.prototype,"drawMargin",{get:function(){var e=this.marginComponent,t=this.margin;return e&&(t=Object.assign(t||{},e.options)),t},enumerable:!0,configurable:!0}),e.prototype.saveAs=function(e){void 0===e&&(e=this.fileName),this.save(this.element.nativeElement,e)},e.prototype.export=function(){return this.exportElement(this.element.nativeElement)},e.prototype.save=function(e,t){var o=this;this.exportElement(e).then(function(e){return o.exportGroup(e,o.pdfOptions())}).then(function(e){return o.saveDataUri(e,t,o.saveOptions())})},e.prototype.exportElement=function(e){var t=this.drawElement(e,this.drawOptions()),o=this.cleanup.bind(this);return t.then(o,o),t},e.prototype.cleanup=function(){this.pageTemplate&&(this.pageTemplate.destroy(),delete this.pageTemplate)},e.prototype.drawOptions=function(){return this.pageTemplateDirective&&(this.pageTemplate=s.compileTemplate(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}},e.prototype.pdfOptions=function(){return{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}},e.prototype.saveOptions=function(){return{forceProxy:this.forceProxy,proxyData:this.proxyData,proxyTarget:this.proxyTarget,proxyURL:this.proxyURL}},e.prototype.drawElement=function(e,t){return n.drawDOM(e,t)},e.prototype.exportGroup=function(e,t){return n.exportPDF(e,t)},e.prototype.saveDataUri=function(e,t,o){p.saveAs(e,t,o)},r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"author",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"avoidLinks",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"forcePageBreak",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"keepTogether",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"creator",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Date)],e.prototype,"date",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Number)],e.prototype,"imageResolution",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"fileName",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],e.prototype,"forceProxy",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"keywords",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],e.prototype,"landscape",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"margin",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"paperSize",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],e.prototype,"repeatHeaders",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Number)],e.prototype,"scale",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"proxyData",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"proxyURL",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"proxyTarget",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"producer",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"subject",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],e.prototype,"title",void 0),r.__decorate([a.ContentChild(i.PDFTemplateDirective),r.__metadata("design:type",i.PDFTemplateDirective)],e.prototype,"pageTemplateDirective",void 0),r.__decorate([a.ContentChild(d.PDFMarginComponent),r.__metadata("design:type",d.PDFMarginComponent)],e.prototype,"marginComponent",void 0),e=r.__decorate([a.Component({selector:"kendo-pdf-export",template:"<div><ng-content></ng-content></div>"}),r.__metadata("design:paramtypes",[a.ElementRef])],e)}();t.PDFExportComponent=c},function(e,o){e.exports=t},function(e,t){e.exports=o},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=function(){function e(e){this.templateRef=e}return e=r.__decorate([a.Directive({selector:"[kendoPDFTemplate]"}),r.__param(0,a.Optional()),r.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.PDFTemplateDirective=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=["bottom","left","right","top"],p=function(){function e(){}return Object.defineProperty(e.prototype,"options",{get:function(){for(var e={},t=0;t<n.length;t++){var o=n[t],r=this[o];void 0!==r&&(e[o]=r)}return e},enumerable:!0,configurable:!0}),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"left",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"top",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"right",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Object)],e.prototype,"bottom",void 0),e=r.__decorate([a.Component({selector:"kendo-pdf-export-margin",template:""})],e)}();t.PDFMarginComponent=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileTemplate=function(e){var t={},o=e.createEmbeddedView(t),r=function(e){Object.assign(t,e),o.detectChanges();var r=document.createElement("span");return o.rootNodes.forEach(function(e){r.appendChild(e.cloneNode(!0))}),r};return r.destroy=function(){o.destroy(),o=null},r}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(2),a=o(3),n=o(1),p=o(7),i=o(6),d=[n.PDFExportComponent,p.PDFMarginComponent,i.PDFTemplateDirective],s=function(){function e(){}return e=r.__decorate([a.NgModule({declarations:[d],exports:[d]})],e)}();t.PDFExportModule=s}])}}}); |
@@ -6,8 +6,8 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "1.0.2", | ||
"main": "dist/npm/main.js", | ||
"module": "dist/es/main.js", | ||
"jsnext:main": "dist/es/main.js", | ||
"es2015": "dist/es2015/main.js", | ||
"typings": "dist/npm/main.d.ts", | ||
"version": "1.0.3-dev.201802271242", | ||
"main": "dist/npm/index.js", | ||
"module": "dist/es/index.js", | ||
"jsnext:main": "dist/es/index.js", | ||
"es2015": "dist/es2015/index.js", | ||
"typings": "dist/es2015/index.d.ts", | ||
"jsdelivr": "dist/cdn/js/kendo-angular-pdf-export.js", | ||
@@ -14,0 +14,0 @@ "unpkg": "dist/cdn/js/kendo-angular-pdf-export.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
68945
1155
3