shareneus 1.5.87 → 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.
@@ -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 header = (0, pdf_header_footer_section_1.buildPageNumberHeader)(PrintConfig);
74
- const footer = (0, pdf_header_footer_section_1.buildFooter)(PrintConfig);
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 } : {})), (header ? { header } : {})), (footer ? { footer } : {}));
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 header = (0, pdf_header_footer_section_1.buildPageNumberHeader)(PrintConfig);
74
- const footer = (0, pdf_header_footer_section_1.buildFooter)(PrintConfig);
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 } : {})), (header ? { header } : {})), (footer ? { footer } : {}));
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): ((currentPage: number, pageCount: number) => {
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
- }) | null;
127
+ };
@@ -234,11 +234,10 @@ function buildFooter(PrintConfig) {
234
234
  });
235
235
  }
236
236
  function buildPageNumberHeader(PrintConfig) {
237
- var _a;
238
- const showPageNumber = ((_a = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Header) === null || _a === void 0 ? void 0 : _a.ShowPageNumber) !== false;
239
- if (!showPageNumber) {
240
- return null;
241
- }
237
+ // const showPageNumber = PrintConfig?.Header?.ShowPageNumber !== false;
238
+ // if (!showPageNumber) {
239
+ // return null;
240
+ // }
242
241
  return (currentPage, pageCount) => ({
243
242
  text: `Page ${currentPage}/${pageCount}`,
244
243
  alignment: 'right',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.5.87",
3
+ "version": "1.5.88",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",