taxtank-core 0.30.66 → 0.30.67
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/esm2020/lib/models/pdf/pdf-settings.mjs +6 -1
- package/esm2020/lib/services/pdf/pdf-from-table/file-settings.mjs +6 -1
- package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.mjs +3 -1
- package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-table.service.mjs +11 -1
- package/fesm2015/taxtank-core.mjs +22 -0
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +22 -0
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/models/pdf/pdf-settings.d.ts +5 -0
- package/lib/services/pdf/pdf-from-table/pdf-from-table.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -10943,6 +10943,11 @@ class PdfSettings {
|
|
|
10943
10943
|
this.title = '';
|
|
10944
10944
|
this.filename = 'export';
|
|
10945
10945
|
this.orientation = PdfOrientationEnum.PORTRAIT;
|
|
10946
|
+
/**
|
|
10947
|
+
* Optional parameters: description and subtitle is after the title
|
|
10948
|
+
*/
|
|
10949
|
+
this.description = '';
|
|
10950
|
+
this.subtitle = '';
|
|
10946
10951
|
}
|
|
10947
10952
|
}
|
|
10948
10953
|
|
|
@@ -16803,11 +16808,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
16803
16808
|
const FILE_SETTINGS = {
|
|
16804
16809
|
text: {
|
|
16805
16810
|
fontSize: 12,
|
|
16811
|
+
fontSizeSubtitle: 10,
|
|
16806
16812
|
fontName: 'helvetica',
|
|
16807
16813
|
fontStyle: '',
|
|
16808
16814
|
fontWeight: 'bold',
|
|
16809
16815
|
positionX: 14,
|
|
16810
16816
|
positionY: 10,
|
|
16817
|
+
positionSubtitleX: 14,
|
|
16818
|
+
positionSubtitleY: 20,
|
|
16819
|
+
positionDescriptionX: 14,
|
|
16820
|
+
positionDescriptionY: 26,
|
|
16811
16821
|
colorWhite: '#ffffff',
|
|
16812
16822
|
colorBlack: '#000000',
|
|
16813
16823
|
colorPrimary: '#00b7f0'
|
|
@@ -16868,6 +16878,16 @@ class PdfFromTableService {
|
|
|
16868
16878
|
logo.src = FILE_SETTINGS.logo.src;
|
|
16869
16879
|
doc.addImage(logo, 'PNG', doc.internal.pageSize.width - FILE_SETTINGS.logo.positionX, FILE_SETTINGS.logo.positionY, FILE_SETTINGS.logo.width, FILE_SETTINGS.logo.height);
|
|
16870
16880
|
}
|
|
16881
|
+
setDocumentSubtitle(doc, subtitle) {
|
|
16882
|
+
doc.setFontSize(FILE_SETTINGS.text.fontSizeSubtitle)
|
|
16883
|
+
.text(subtitle, FILE_SETTINGS.text.positionSubtitleX, FILE_SETTINGS.text.positionSubtitleY)
|
|
16884
|
+
.setTextColor(FILE_SETTINGS.text.colorPrimary);
|
|
16885
|
+
}
|
|
16886
|
+
setDocumentDescription(doc, description) {
|
|
16887
|
+
doc.setFontSize(FILE_SETTINGS.text.fontSize)
|
|
16888
|
+
.text(description, FILE_SETTINGS.text.positionDescriptionX, FILE_SETTINGS.text.positionDescriptionY)
|
|
16889
|
+
.setTextColor(FILE_SETTINGS.text.colorPrimary);
|
|
16890
|
+
}
|
|
16871
16891
|
}
|
|
16872
16892
|
PdfFromTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PdfFromTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16873
16893
|
PdfFromTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PdfFromTableService, providedIn: 'root' });
|
|
@@ -16897,6 +16917,8 @@ class PdfFromDataTableService extends PdfFromTableService {
|
|
|
16897
16917
|
const pdf = new JsPdf(fileSettings.orientation);
|
|
16898
16918
|
this.setDocumentTitle(pdf, fileSettings.title);
|
|
16899
16919
|
this.setDocumentLogo(pdf);
|
|
16920
|
+
this.setDocumentSubtitle(pdf, fileSettings.subtitle);
|
|
16921
|
+
this.setDocumentDescription(pdf, fileSettings.description);
|
|
16900
16922
|
dataTables.forEach((dataTable) => {
|
|
16901
16923
|
pdf.autoTable({
|
|
16902
16924
|
head: [dataTable.header],
|