shareneus 1.5.67 → 1.5.68

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.
@@ -65,7 +65,7 @@ function GetInvoicePdfDataUrl(PDFInvoiceData = {}, PrintConfigData = {}, printCo
65
65
  function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printCopies = []) {
66
66
  console.log('Building PDF with data:', PDFInvoiceData);
67
67
  const PrintConfig = normalizePrintConfig(PDFInvoiceData, PrintConfigData);
68
- const pageOrientation = (0, pdf_header_footer_section_1.resolvePageOrientation)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.pageOrientation);
68
+ const pageOrientation = (0, pdf_header_footer_section_1.resolvePageOrientation)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.PageOrientation);
69
69
  const pageMargins = (0, pdf_header_footer_section_1.resolvePageMargins)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.pageMargins);
70
70
  const availableWidth = (0, pdf_table_section_1.getAvailablePageWidth)(PAGE_SIZE, pageOrientation, pageMargins);
71
71
  const copyLabels = normalizeCopyLabels(printCopies);
@@ -73,6 +73,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
73
73
  const background = (0, pdf_header_footer_section_1.buildLogoWatermarkBackground)(PrintConfig, PDFInvoiceData);
74
74
  const footer = (0, pdf_header_footer_section_1.buildFooter)(PrintConfig);
75
75
  const content = [];
76
+ console.log('Normalized PrintConfig:', PrintConfig);
76
77
  copyLabels.forEach((copyLabel, index) => {
77
78
  const invoiceHeaderContent = (0, pdf_header_footer_section_1.buildDocumentHeaderSection)(PrintConfig, PDFInvoiceData);
78
79
  const invoiceHeadingContent = (0, pdf_header_footer_section_1.buildDocumentHeadingSection)(PDFInvoiceData, PrintConfig, availableWidth);
@@ -133,12 +134,14 @@ function normalizePrintConfig(PDFInvoiceData, PrintConfigData) {
133
134
  const watermark = !!(config === null || config === void 0 ? void 0 : config.Watermark);
134
135
  const watermarkEnabled = !!(config === null || config === void 0 ? void 0 : config.WatermarkEnabled);
135
136
  const footerText = (0, pdf_shared_utils_1.toStr)((_b = config === null || config === void 0 ? void 0 : config.Footer) === null || _b === void 0 ? void 0 : _b.Text);
137
+ console.log('config?.headerStyles', config === null || config === void 0 ? void 0 : config.headerStyles);
136
138
  const headerStyles = (0, pdf_header_footer_section_1.normalizeHeaderStyle)((_c = config === null || config === void 0 ? void 0 : config.headerStyles) !== null && _c !== void 0 ? _c : {
137
139
  OrgNameFsize: config === null || config === void 0 ? void 0 : config.OrgNameFsize,
138
140
  OrgNameClr: config === null || config === void 0 ? void 0 : config.OrgNameClr,
139
141
  AdrsFsize: config === null || config === void 0 ? void 0 : config.AdrsFsize,
140
142
  AdrsClr: config === null || config === void 0 ? void 0 : config.AdrsClr
141
143
  });
144
+ console.log('headerStyles', headerStyles);
142
145
  const fixedTo = normalizeFixedTo(config === null || config === void 0 ? void 0 : config.fixedTo);
143
146
  return Object.assign(Object.assign({}, config), { itemsHeader,
144
147
  headerData,
@@ -104,6 +104,7 @@ function buildDocumentHeaderSection(PrintConfig, DocumentData = {}) {
104
104
  const documentLogoDataUrl = resolveDocumentLogoDataUrl(DocumentData);
105
105
  const headerData = normalizeHeaderData((_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerData) !== null && _b !== void 0 ? _b : {});
106
106
  const mergedHeaderData = normalizeHeaderData(Object.assign(Object.assign({}, headerData), { logoDataUrl: (0, pdf_shared_utils_1.firstValue)(documentLogoDataUrl, headerData === null || headerData === void 0 ? void 0 : headerData.logoDataUrl), organization: Object.assign(Object.assign({}, ((_c = headerData === null || headerData === void 0 ? void 0 : headerData.organization) !== null && _c !== void 0 ? _c : {})), { cName: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.CName, (_d = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _d === void 0 ? void 0 : _d.cName), address1: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.Adrs1, (_e = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _e === void 0 ? void 0 : _e.address1), address2: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.Adrs2, (_f = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _f === void 0 ? void 0 : _f.address2), dlNo: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.DLNo, entity === null || entity === void 0 ? void 0 : entity.DLNO, (_g = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _g === void 0 ? void 0 : _g.dlNo), gstin: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.GSTIN, (_h = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _h === void 0 ? void 0 : _h.gstin), pan: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.PAN, (_j = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _j === void 0 ? void 0 : _j.pan), city: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.City, (_k = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _k === void 0 ? void 0 : _k.city), state: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.State, (_l = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _l === void 0 ? void 0 : _l.state), pin: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.PIN, entity === null || entity === void 0 ? void 0 : entity.Pin, (_m = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _m === void 0 ? void 0 : _m.pin), email: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.Email, entity === null || entity === void 0 ? void 0 : entity.EMail, (_o = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _o === void 0 ? void 0 : _o.email), phone: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.Phone, entity === null || entity === void 0 ? void 0 : entity.Ph, (_p = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _p === void 0 ? void 0 : _p.phone), phone2: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.Phone2, entity === null || entity === void 0 ? void 0 : entity.Ph2, (_q = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _q === void 0 ? void 0 : _q.phone2) }) }));
107
+ console.log('PrintConfig?.headerStyles', PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles);
107
108
  const headerStyles = normalizeHeaderStyle((_r = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) !== null && _r !== void 0 ? _r : {
108
109
  OrgNameFsize: PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.OrgNameFsize,
109
110
  OrgNameClr: PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.OrgNameClr,
@@ -227,6 +228,7 @@ function normalizeFooterAlignment(value) {
227
228
  return 'left';
228
229
  }
229
230
  function buildOrganizationStack(organization, headerStyles, alignment) {
231
+ console.log('headerStyles', headerStyles);
230
232
  const stack = [];
231
233
  const orgNameFontSize = (0, pdf_shared_utils_1.readPositiveNumber)(headerStyles === null || headerStyles === void 0 ? void 0 : headerStyles.OrgNameFsize, DEFAULT_ORG_NAME_FONT_SIZE);
232
234
  const orgAddressFontSize = (0, pdf_shared_utils_1.readPositiveNumber)(headerStyles === null || headerStyles === void 0 ? void 0 : headerStyles.AdrsFsize, DEFAULT_ORG_ADDRESS_FONT_SIZE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.5.67",
3
+ "version": "1.5.68",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",