shareneus 1.5.86 → 1.5.88
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/dist/accounting/invoice/invoice-pdf/invoice-pdf.service.js +3 -3
- package/dist/purchases/bills/bill-pdf/bill-pdf.service.js +3 -3
- package/dist/shared/header-footer-section/pdf-header-footer.section.d.ts +2 -2
- package/dist/shared/header-footer-section/pdf-header-footer.section.js +4 -8
- package/package.json +1 -1
|
@@ -70,8 +70,8 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
70
70
|
const copyLabels = normalizeCopyLabels(printCopies);
|
|
71
71
|
const watermark = (0, pdf_header_footer_section_1.buildWatermark)(PrintConfig);
|
|
72
72
|
const background = (0, pdf_header_footer_section_1.buildLogoWatermarkBackground)(PrintConfig, PDFInvoiceData);
|
|
73
|
-
const
|
|
74
|
-
const
|
|
73
|
+
const pageHeader = (0, pdf_header_footer_section_1.buildPageNumberHeader)(PrintConfig);
|
|
74
|
+
const pageFooter = (0, pdf_header_footer_section_1.buildFooter)(PrintConfig);
|
|
75
75
|
const content = [];
|
|
76
76
|
copyLabels.forEach((copyLabel, index) => {
|
|
77
77
|
const invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
|
|
@@ -112,7 +112,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
112
112
|
const dd = Object.assign(Object.assign(Object.assign(Object.assign({ pageSize: pageSize, pageOrientation: pageOrientation, pageMargins: pageMargins, content: content, info: {
|
|
113
113
|
title: 'invoice',
|
|
114
114
|
subject: Array.isArray(printCopies) ? printCopies.join(', ') : ''
|
|
115
|
-
} }, (background ? { background } : {})), (watermark ? { watermark } : {})), (
|
|
115
|
+
} }, (background ? { background } : {})), (watermark ? { watermark } : {})), (pageHeader !== null ? { header: pageHeader } : {})), (pageFooter !== null ? { footer: pageFooter } : {}));
|
|
116
116
|
return dd;
|
|
117
117
|
}
|
|
118
118
|
function normalizeCopyLabels(printCopies = []) {
|
|
@@ -70,8 +70,8 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
70
70
|
const copyLabels = normalizeCopyLabels(printCopies);
|
|
71
71
|
const watermark = (0, pdf_header_footer_section_1.buildWatermark)(PrintConfig);
|
|
72
72
|
const background = (0, pdf_header_footer_section_1.buildLogoWatermarkBackground)(PrintConfig, PDFInvoiceData);
|
|
73
|
-
const
|
|
74
|
-
const
|
|
73
|
+
const pageHeader = (0, pdf_header_footer_section_1.buildPageNumberHeader)(PrintConfig);
|
|
74
|
+
const pageFooter = (0, pdf_header_footer_section_1.buildFooter)(PrintConfig);
|
|
75
75
|
const content = [];
|
|
76
76
|
copyLabels.forEach((copyLabel, index) => {
|
|
77
77
|
const invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
|
|
@@ -112,7 +112,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
112
112
|
const dd = Object.assign(Object.assign(Object.assign(Object.assign({ pageSize: pageSize, pageOrientation: pageOrientation, pageMargins: pageMargins, content: content, info: {
|
|
113
113
|
title: 'invoice',
|
|
114
114
|
subject: Array.isArray(printCopies) ? printCopies.join(', ') : ''
|
|
115
|
-
} }, (background ? { background } : {})), (watermark ? { watermark } : {})), (
|
|
115
|
+
} }, (background ? { background } : {})), (watermark ? { watermark } : {})), (pageHeader !== null ? { header: pageHeader } : {})), (pageFooter !== null ? { footer: pageFooter } : {}));
|
|
116
116
|
return dd;
|
|
117
117
|
}
|
|
118
118
|
function normalizeCopyLabels(printCopies = []) {
|
|
@@ -118,10 +118,10 @@ export declare function buildFooter(PrintConfig: any): (() => {
|
|
|
118
118
|
fontSize: number;
|
|
119
119
|
color: string;
|
|
120
120
|
}) | null;
|
|
121
|
-
export declare function buildPageNumberHeader(PrintConfig: any): (
|
|
121
|
+
export declare function buildPageNumberHeader(PrintConfig: any): (currentPage: number, pageCount: number) => {
|
|
122
122
|
text: string;
|
|
123
123
|
alignment: string;
|
|
124
124
|
margin: number[];
|
|
125
125
|
fontSize: number;
|
|
126
126
|
color: string;
|
|
127
|
-
}
|
|
127
|
+
};
|
|
@@ -30,9 +30,6 @@ function resolvePageOrientation(value) {
|
|
|
30
30
|
function resolvePageSize(value, orientation = DEFAULT_PAGE_ORIENTATION) {
|
|
31
31
|
const raw = String(value !== null && value !== void 0 ? value : '').trim().toLowerCase();
|
|
32
32
|
if (raw === 'halfa4') {
|
|
33
|
-
if (orientation === 'landscape') {
|
|
34
|
-
return { width: HALF_A4_HEIGHT, height: A4_WIDTH };
|
|
35
|
-
}
|
|
36
33
|
return { width: A4_WIDTH, height: HALF_A4_HEIGHT };
|
|
37
34
|
}
|
|
38
35
|
if (raw === 'letter') {
|
|
@@ -237,11 +234,10 @@ function buildFooter(PrintConfig) {
|
|
|
237
234
|
});
|
|
238
235
|
}
|
|
239
236
|
function buildPageNumberHeader(PrintConfig) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
237
|
+
// const showPageNumber = PrintConfig?.Header?.ShowPageNumber !== false;
|
|
238
|
+
// if (!showPageNumber) {
|
|
239
|
+
// return null;
|
|
240
|
+
// }
|
|
245
241
|
return (currentPage, pageCount) => ({
|
|
246
242
|
text: `Page ${currentPage}/${pageCount}`,
|
|
247
243
|
alignment: 'right',
|