@bookipi/htmlgenerator 1.5.16-alpha1 → 1.5.16-alpha2

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/index.js CHANGED
@@ -12224,6 +12224,10 @@ var invoiceHtmlWithDetails = (function (_ref) {
12224
12224
  };
12225
12225
  });
12226
12226
 
12227
+ var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tn', 'tp2', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs'];
12228
+
12229
+ var COMPANY_KEYS = ['_id', 'c', 'e', 'ph', 'tfn', 'la', 'cr', 'cf', 'tz', 'ls', 'doc', 'bn', 'tn', 'tn2', 'tp', 'tp2', 'ti', 'ttx', 't1d', 't2d', 'pi', 'p1', 'p2', 'p3', 'sg', 'a1', 'a2', 'a3', 'address', 'language', 'la', 'sc', 'sr', 'r_bs', 'r_tc', 'r_nt', 'r_deposit_due', 'r_ad', 'r_gt', 'r_po', 'r_bt', 'r_st', 'r_d', 'r_a', 'r_dc', 'r_ic', 'r_it', 'r_n', 'r_p', 'r_q', 'r_sb', 'r_sp', 'r_tt', 'r_pi', 'r_inv', 'r_est', 'r_crd', 'r_dd', 'df', 'lg', 'hasPaymentInstructionQRCode', 'updatedAt', 'payment_in_progress'];
12230
+
12227
12231
  var hexToRGB = function hexToRGB(hex) {
12228
12232
  hex = hex.replace(/^#/, "");
12229
12233
  return {
@@ -12746,6 +12750,16 @@ var invoiceHtmlWithDetailsNew = (function (_ref) {
12746
12750
  };
12747
12751
  });
12748
12752
 
12753
+ var trimInvoiceKeys = (function (obj, keys) {
12754
+ var result = {};
12755
+ keys.forEach(function (key) {
12756
+ if (obj.hasOwnProperty(key)) {
12757
+ result[key] = obj[key];
12758
+ }
12759
+ });
12760
+ return result;
12761
+ });
12762
+
12749
12763
  var invoiceHtml = (function (_ref) {
12750
12764
  var invoice = _ref.invoice,
12751
12765
  _ref$lang = _ref.lang,
@@ -12787,7 +12801,10 @@ var invoiceHtml = (function (_ref) {
12787
12801
  isFullScreen = _ref$isFullScreen === void 0 ? false : _ref$isFullScreen;
12788
12802
  var renderInvoice = isNewLayout ? invoiceHtmlWithDetailsNew : invoiceHtmlWithDetails;
12789
12803
  return renderInvoice({
12790
- invoice: invoice,
12804
+ invoice: _extends({}, invoice, {
12805
+ document: trimInvoiceKeys(invoice.document, DOCUMENT_KEYS),
12806
+ company: trimInvoiceKeys(invoice.company, COMPANY_KEYS)
12807
+ }),
12791
12808
  lang: lang,
12792
12809
  referral: referral,
12793
12810
  companyLogoBase: companyLogoBase,