shareneus 1.6.4 → 1.6.5

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.
@@ -121,9 +121,11 @@ function resolvePageMargins(value) {
121
121
  function buildDocumentHeaderSection(PrintConfig, DocumentData = {}) {
122
122
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
123
123
  const entity = (_a = DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.Entity) !== null && _a !== void 0 ? _a : {};
124
+ console.log('DocumentData Entity', entity);
124
125
  const documentLogoDataUrl = resolveDocumentLogoDataUrl(DocumentData);
125
126
  const headerData = normalizeHeaderData((_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerData) !== null && _b !== void 0 ? _b : {});
126
127
  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), taxIds: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.TaxIds, (_k = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _k === void 0 ? void 0 : _k.taxIds), city: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.City, (_l = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _l === void 0 ? void 0 : _l.city), state: (0, pdf_shared_utils_1.firstValue)(entity === null || entity === void 0 ? void 0 : entity.State, (_m = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _m === void 0 ? void 0 : _m.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, (_o = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _o === void 0 ? void 0 : _o.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, (_p = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _p === void 0 ? void 0 : _p.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, (_q = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _q === void 0 ? void 0 : _q.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, (_r = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _r === void 0 ? void 0 : _r.phone2) }) }));
128
+ console.log('Merged Header Data', mergedHeaderData);
127
129
  const headerStyles = normalizeHeaderStyle((_s = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) !== null && _s !== void 0 ? _s : {
128
130
  OrgNameFsize: PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.OrgNameFsize,
129
131
  OrgNameClr: PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.OrgNameClr,
@@ -296,6 +298,7 @@ function buildOrganizationStack(organization, headerStyles, alignment) {
296
298
  if (organization === null || organization === void 0 ? void 0 : organization.dlNo) {
297
299
  stack.push({ text: `DLNo: ${organization.dlNo}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
298
300
  }
301
+ console.log('organization taxIds', organization === null || organization === void 0 ? void 0 : organization.taxIds);
299
302
  const printedTaxIdsText = buildPrintedTaxIdsText(organization === null || organization === void 0 ? void 0 : organization.taxIds);
300
303
  if (printedTaxIdsText) {
301
304
  stack.push({ text: printedTaxIdsText, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.04",
3
+ "version": "1.6.05",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",