@bookipi/htmlgenerator 1.8.4-alpha2 → 1.8.5-alpha1

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.
@@ -13445,61 +13445,59 @@ var contractHtml = (function (props) {
13445
13445
  return html;
13446
13446
  });
13447
13447
 
13448
- var subscriptionInvoiceHtml = (function (_ref) {
13449
- var vendor = _ref.vendor,
13450
- invoice = _ref.invoice,
13451
- customer = _ref.customer,
13452
- _ref$includeHtmlWrapp = _ref.includeHtmlWrapper,
13453
- includeHtmlWrapper = _ref$includeHtmlWrapp === void 0 ? false : _ref$includeHtmlWrapp,
13454
- t = _ref.t;
13455
- var _ref2 = vendor != null ? vendor : {},
13456
- vendorName = _ref2.name,
13457
- logoUrl = _ref2.logoUrl,
13458
- businessNumber = _ref2.businessNumber,
13459
- address = _ref2.address;
13460
- var _ref3 = invoice != null ? invoice : {},
13461
- invoiceNumber = _ref3.no,
13462
- total = _ref3.total,
13463
- amountPaid = _ref3.amountPaid,
13464
- currency = _ref3.currency,
13465
- transaction = _ref3.transaction,
13466
- date = _ref3.date,
13467
- invoiceItems = _ref3.items;
13468
- var _ref4 = transaction != null ? transaction : {},
13469
- cardNumber = _ref4.cardNumber,
13470
- cardBrand = _ref4.cardBrand,
13471
- cardLogo = _ref4.cardLogo;
13472
- var _ref5 = customer != null ? customer : {},
13473
- companyName = _ref5.name,
13474
- email = _ref5.email;
13475
- var vendorLogoUrl = logoUrl != null ? logoUrl : 'https://web.bookipi.com/images/logos/logo-bookipi.png';
13476
- var formatPrice = function formatPrice(price, currency) {
13477
- if (price === void 0) {
13478
- price = 0;
13479
- }
13480
- if (currency === void 0) {
13481
- currency = 'USD';
13482
- }
13483
- return (price ? Number(price / 100).toFixed(2) : '0') + " " + currency;
13484
- };
13485
- var defaultLang = {
13486
- invoiceNo: t ? t('Invoice #', {
13487
- no: invoiceNumber
13488
- }) : "Invoice #" + invoiceNumber,
13489
- total: t ? t('Total') : 'Total',
13490
- billTo: t ? t('Bill to') : 'Bill to',
13491
- item: t ? t('Item') : 'Item',
13492
- amount: t ? t('Amount') : 'Amount',
13493
- totalCharged: t ? t('Total charged') : 'Total charged',
13494
- discount: t ? t('Discount') : 'Discount'
13495
- };
13448
+ var styleSheet = "\n<style>\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Lato:wght@400;700&display=swap');\n\n .bookipay-invoice {\n width: 100%;\n max-width: 600px;\n background-color: white;\n display: flex;\n border-radius: 16px;\n flex-direction: column;\n overflow: hidden;\n font-family: 'Inter', sans-serif;\n line-height: 1.2;\n color: black;\n font-size: 16px;\n }\n\n .invoice-content {\n padding: 40px 30px;\n }\n\n .invoice-header {\n display: flex;\n padding: 10px;\n margin-bottom: 40px;\n justify-content: space-between;\n }\n\n .invoice-footer {\n padding: 30px 38px 40px;\n background-color: rgb(245, 246, 250);\n font-size: 12px;\n }\n\n .invoice-footer p {\n display: block;\n margin: 0;\n }\n\n .invoice-footer-logo {\n height: 20px;\n margin-bottom: 12px;\n }\n\n .invoice-logo {\n object-fit: contain;\n max-height: 52px;\n width: auto;\n height: auto;\n }\n\n .invoice-body {\n color: rgb(15, 23, 42);\n font-size: 16px;\n }\n\n .invoice-company {\n text-align: right;\n }\n\n .invoice-spacing {\n margin-bottom: 4px;\n }\n\n .invoice-semi-bold {\n color: rgb(15, 23, 42);\n font-weight: 600;\n font-size: 16px;\n }\n\n .invoice-bold {\n font-family: 'Lato', sans-serif;\n color: black;\n font-weight: 700;\n font-size: 20px;\n }\n\n .invoice-subtitle {\n color: rgba(0, 0, 0, 0.6);\n font-size: 14px;\n }\n\n .invoice-subtitle2 {\n color: rgb(147, 154, 172);\n font-size: 14px;\n }\n\n .invoice-subtitle3 {\n color: rgb(100, 116, 139);\n font-size: 14px;\n }\n\n .invoice-subtitle4 {\n font-size: 10px;\n }\n\n .invoice-summary {\n background-color: rgb(245, 246, 250);\n padding: 32px 24px;\n border-radius: 16px;\n margin-bottom: 40px;\n }\n\n .invoice-summary-total {\n display: flex;\n margin-top: 24px;\n flex-direction: column;\n }\n\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n }\n\n .invoice-summary-customer-column {\n flex: 1;\n overflow-wrap:anywhere;\n }\n\n .invoice-customer-email {\n text-align: right;\n }\n\n .invoice-order-header {\n padding: 8px 0;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n display: flex;\n justify-content: space-between;\n }\n\n .invoice-order-container {\n display: flex;\n justify-content: space-between;\n }\n\n .invoice-order-item {\n padding: 12px 0px 5px;\n }\n\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\n }\n\n .invoice-item-details {\n color: rgb(100, 116, 139);\n font-size: 14px;\n margin-top: 4px;\n }\n\n .invoice-tax {\n display: flex;\n justify-content: space-between;\n margin-top: 8px;\n }\n\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n margin-top: 15px;\n }\n\n .invoice-card {\n display: flex;\n padding: 8px 0px;\n }\n\n .invoice-card img {\n height: 24px;\n margin-right: 6px;\n }\n\n .invoice-bill-to {\n display: none;\n }\n\n .invoice-order-item-amount {\n font-size: 16px;\n white-space: nowrap;\n }\n\n .invoice-card-number {\n color: rgb(15, 23, 42);\n font-size: 16px;\n font-weight: 400;\n }\n\n .invoice-total-amount {\n font-size: 18px;\n text-align: right;\n }\n\n @media (max-width: 600px) {\n .bookipay-invoice {\n border-radius: 0;\n }\n }\n\n @media (max-width: 799px) {\n .invoice-header {\n flex-direction: column;\n padding: 10px 0;\n }\n\n .invoice-company {\n text-align: left;\n }\n\n .invoice-logo {\n max-width: 100px;\n margin-bottom: 16px;\n }\n\n .invoice-header,\n .invoice-summary {\n margin-bottom: 20px;\n }\n\n .invoice-summary {\n margin-left: -30px;\n margin-right: -30px;\n border-radius: 0;\n padding: 32px 30px;\n }\n\n .invoice-content {\n padding: 20px 30px;\n }\n\n .invoice-bill-to {\n display: flex;\n }\n }\n\n @media (max-width: 399px) {\n .footer-actions {\n flex-direction: column;\n }\n\n .footer-action {\n margin-bottom: 12px;\n }\n\n footer {\n margin: 30px 0;\n }\n\n footer p {\n margin-top: 0;\n }\n }\n\n @media print {\n * {\n color-adjust: exact;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\n\n .bookipay-invoice {\n max-width: 100%;\n }\n\n @page {\n margin: 0;\n }\n\n body {\n margin: 1.6cm;\n }\n }\n</style>\n";
13449
+
13450
+ function formatPrice(price, currency) {
13451
+ if (price === void 0) {
13452
+ price = 0;
13453
+ }
13454
+ if (currency === void 0) {
13455
+ currency = 'USD';
13456
+ }
13457
+ return (price ? Number(price / 100).toFixed(2) : '0') + " " + currency;
13458
+ }
13459
+ function renderAddressItems(addressItems) {
13460
+ if (addressItems === void 0) {
13461
+ addressItems = [];
13462
+ }
13463
+ return addressItems.filter(function (item) {
13464
+ return !!item;
13465
+ }).join(', ');
13466
+ }
13467
+ function Header(_ref) {
13468
+ var logoUrl = _ref.logoUrl,
13469
+ companyName = _ref.companyName,
13470
+ invoiceNo = _ref.invoiceNo,
13471
+ invoiceDate = _ref.invoiceDate;
13472
+ return "\n <div class=\"invoice-header\">\n <img class=\"invoice-logo\" src=" + logoUrl + " />\n <div class=\"invoice-company\">\n <div class=\"invoice-company-name invoice-semi-bold invoice-spacing\">\n " + companyName + "\n </div>\n <div class=\"invoice-number invoice-subtitle invoice-spacing\">\n " + invoiceNo + "\n </div>\n <div class=\"invoice-date invoice-subtitle invoice-spacing\">\n " + invoiceDate + "\n </div>\n </div>\n </div>\n ";
13473
+ }
13474
+ function InvoiceSummaryCard(params) {
13475
+ var email = params.email,
13476
+ companyName = params.companyName,
13477
+ businessNumber = params.businessNumber,
13478
+ address = params.address,
13479
+ total = params.total,
13480
+ currency = params.currency,
13481
+ defaultLang = params.defaultLang;
13482
+ var hasAddressLine = (address === null || address === void 0 ? void 0 : address.address1) || (address === null || address === void 0 ? void 0 : address.address2) || (address === null || address === void 0 ? void 0 : address.address3);
13483
+ var hasAddress = (address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.zip) || (address === null || address === void 0 ? void 0 : address.country);
13484
+ return "\n <div class=\"invoice-summary\">\n <div class=\"invoice-summary-customer\">\n <div class=\"invoice-summary-customer-column\">\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n " + (businessNumber ? "<div class=\"invoice-subtitle2\">" + businessNumber + "</div>" : '') + "\n " + (hasAddressLine ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.address1, address.address2, address.address3]) + "\n </div>" : '') + "\n " + (hasAddress ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.city, address.zip, address.country]) + "\n </div>" : '') + "\n </div>\n <div class=\"invoice-customer-email invoice-subtitle2 invoice-summary-customer-column\">\n " + email + "\n </div>\n </div>\n <div class=\"invoice-summary-total\">\n <div class=\"invoice-subtitle3 invoice-spacing\">\n " + defaultLang.total + "\n </div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13485
+ }
13486
+ function OrderSummary(params) {
13487
+ var amountPaid = params.amountPaid,
13488
+ invoiceItems = params.invoiceItems,
13489
+ cardBrand = params.cardBrand,
13490
+ cardNumber = params.cardNumber,
13491
+ cardLogo = params.cardLogo,
13492
+ currency = params.currency,
13493
+ defaultLang = params.defaultLang;
13496
13494
  var hasDiscount = invoiceItems.some(function (item) {
13497
13495
  return item.type === 'discount' && item.total > 0;
13498
13496
  });
13499
13497
  var hasTax = invoiceItems.some(function (item) {
13500
13498
  return item.type === 'tax' && item.total > 0;
13501
13499
  });
13502
- var renderItem = function renderItem(item) {
13500
+ function renderItem(item) {
13503
13501
  var title = item.name || item.description;
13504
13502
  var showSubtotal = hasTax && hasDiscount;
13505
13503
  if (!showSubtotal && item.type === 'subtotal') {
@@ -13510,30 +13508,88 @@ var subscriptionInvoiceHtml = (function (_ref) {
13510
13508
  var color = isDiscount ? '#C81E1E' : 'inherit';
13511
13509
  var label = isDiscount ? defaultLang.discount + " (" + title + ")" : title;
13512
13510
  if (isDiscount && total === 0) return '';
13513
- return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\" style=\"color:" + color + ";\">" + label + "</div>\n " + (item.description && item.description !== item.name && item.description.trim() !== '' ? "<div class=\"invoice-item-details\">" + item.description + "</div>" : '') + "\n </div>\n <div style=\"font-size:16px;color:" + color + ";\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13514
- };
13515
- var renderItems = function renderItems(items) {
13511
+ var hasDescription = item.description && item.description !== item.name && item.description.trim() !== '';
13512
+ return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\" style=\"color:" + color + ";\">\n " + label + "\n </div>\n " + (hasDescription ? "<div class=\"invoice-item-details\">" + item.description + "</div>" : '') + "\n </div>\n <div class=\"invoice-order-item-amount\" style=\"color:" + color + ";\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13513
+ }
13514
+ function renderItems() {
13516
13515
  var rendered = '';
13517
- items.forEach(function (item) {
13516
+ invoiceItems.forEach(function (item) {
13518
13517
  rendered += renderItem(item);
13519
13518
  });
13520
13519
  return rendered;
13520
+ }
13521
+ return "\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">" + defaultLang.item + "</div>\n <div class=\"invoice-subtitle3\">" + defaultLang.amount + "</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + renderItems() + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size:'16px;\">\n " + defaultLang.totalCharged + "\n </div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing invoice-total-amount\">\n " + formatPrice(amountPaid, currency) + "\n </div>\n </div>\n </div>\n " + (cardBrand && cardNumber ? "\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-card-number\">\n " + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "\n </div>\n </div>\n " : '') + "\n </div>\n </div>\n ";
13522
+ }
13523
+ function Footer(_ref2) {
13524
+ var logoUrl = _ref2.logoUrl;
13525
+ return "\n <div class=\"invoice-footer invoice-subtitle2\">\n <img class=\"invoice-footer-logo\" src=" + logoUrl + " />\n <p>\xA92025 Bookipi Pty Ltd.</p>\n <p>9 George St, North Strathfield NSW 2137, Australia</p>\n <p>ABN: 91617668185</p>\n </div>";
13526
+ }
13527
+ function SubscriptionInvoiceHtml(_ref3) {
13528
+ var vendor = _ref3.vendor,
13529
+ invoice = _ref3.invoice,
13530
+ customer = _ref3.customer,
13531
+ includeHtmlWrapper = _ref3.includeHtmlWrapper,
13532
+ t = _ref3.t;
13533
+ var _ref4 = vendor != null ? vendor : {},
13534
+ vendorName = _ref4.name,
13535
+ vendorLogoUrl = _ref4.logoUrl,
13536
+ businessNumber = _ref4.businessNumber,
13537
+ address = _ref4.address;
13538
+ var _ref5 = invoice != null ? invoice : {},
13539
+ invoiceNumber = _ref5.no,
13540
+ total = _ref5.total,
13541
+ amountPaid = _ref5.amountPaid,
13542
+ currency = _ref5.currency,
13543
+ transaction = _ref5.transaction,
13544
+ date = _ref5.date,
13545
+ invoiceItems = _ref5.items;
13546
+ var _ref6 = transaction != null ? transaction : {},
13547
+ cardNumber = _ref6.cardNumber,
13548
+ cardBrand = _ref6.cardBrand,
13549
+ cardLogo = _ref6.cardLogo;
13550
+ var _ref7 = customer != null ? customer : {},
13551
+ companyName = _ref7.name,
13552
+ email = _ref7.email;
13553
+ var logoUrl = vendorLogoUrl != null ? vendorLogoUrl : 'https://web.bookipi.com/images/logos/logo-bookipi.png';
13554
+ var defaultLang = {
13555
+ invoiceNo: t ? t('Invoice #', {
13556
+ no: invoiceNumber
13557
+ }) : "Invoice #" + invoiceNumber,
13558
+ total: t ? t('Total') : 'Total',
13559
+ billTo: t ? t('Bill to') : 'Bill to',
13560
+ item: t ? t('Item') : 'Item',
13561
+ amount: t ? t('Amount') : 'Amount',
13562
+ totalCharged: t ? t('Total charged') : 'Total charged',
13563
+ discount: t ? t('Discount') : 'Discount'
13521
13564
  };
13522
- var renderAddressItems = function renderAddressItems(addressItems) {
13523
- if (addressItems === void 0) {
13524
- addressItems = [];
13525
- }
13526
- return addressItems.filter(function (item) {
13527
- return !!item;
13528
- }).join(', ');
13529
- };
13530
- var hasAddressLine = (address === null || address === void 0 ? void 0 : address.address1) || (address === null || address === void 0 ? void 0 : address.address2) || (address === null || address === void 0 ? void 0 : address.address3);
13531
- var hasAddress = (address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.zip) || (address === null || address === void 0 ? void 0 : address.country);
13532
- var html = "\n " + (includeHtmlWrapper ? '<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Invoice</title>' : '') + "\n <style>\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Lato:wght@400;700&display=swap');\n .bookipay-invoice {\n width: 100%;\n max-width: 600px;\n background-color: white;\n display:flex;\n border-radius: 16px;\n flex-direction: column;\n overflow: hidden;\n font-family: 'Inter', sans-serif;\n line-height: 1.2;\n color: black;\n font-size: 16px;\n }\n .invoice-content {\n padding: 40px 30px;\n }\n .invoice-header {\n display: flex;\n padding: 10px;\n margin-bottom: 40px;\n justify-content: space-between;\n }\n .invoice-footer {\n padding: 30px 38px 40px;\n background-color: rgb(245, 246, 250);\n }\n .invoice-footer p {\n display: block;\n margin: 0;\n }\n .invoice-footer-logo {\n height: 20px;\n margin-bottom: 12px;\n }\n .invoice-logo {\n object-fit: contain;\n max-height: 52px;\n width: auto;\n height: auto;\n }\n .invoice-body {\n color: color: rgb(15, 23, 42);\n font-size: 16px;\n }\n .invoice-company {\n text-align: right;\n }\n .invoice-spacing {\n margin-bottom: 4px;\n }\n .invoice-semi-bold {\n color: rgb(15, 23, 42);\n font-weight: 600;\n font-size: 16px;\n }\n .invoice-bold {\n font-family: 'Lato', sans-serif;\n color: black;\n font-weight: 700;\n font-size: 20px;\n }\n .invoice-subtitle {\n color: rgba(0, 0, 0, 0.6);\n font-size: 14px;\n }\n .invoice-subtitle2 {\n color: rgb(147, 154, 172);\n font-size: 14px;\n }\n .invoice-subtitle3 {\n color: rgb(100, 116, 139);\n font-size: 14px;\n }\n .invoice-subtitle4 {\n font-size: 10px;\n }\n .invoice-summary {\n background-color: rgb(245, 246, 250);\n padding: 32px 24px;\n border-radius: 16px;\n margin-bottom: 40px;\n }\n .invoice-summary-total {\n display: flex;\n margin-top: 24px;\n flex-direction: column;\n }\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n text-align: left;\n }\n .invoice-customer-email {\n margin-left: 8px;\n }\n .invoice-order-header {\n padding: 8px 0;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-container {\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-item {\n padding: 12px 0px 5px;\n }\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\n }\n .invoice-item-details {\n color: rgb(100, 116, 139);\n font-size: 14px;\n margin-top: 4px;\n }\n .invoice-tax {\n display: flex;\n justify-content:space-between;\n margin-top: 8px;\n }\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n margin-top: 15px;\n }\n .invoice-card {\n display: flex;\n padding: 8px 0px;\n }\n .invoice-card img {\n height: 24px;\n margin-right: 6px;\n }\n .invoice-bill-to {\n display: none;\n }\n @media (max-width: 600px) {\n .bookipay-invoice {\n border-radius: 0;\n }\n }\n @media (max-width: 799px) {\n .invoice-header {\n flex-direction: column;\n padding: 10px 0;\n }\n .invoice-company {\n text-align: left;\n }\n .invoice-logo {\n max-width: 100px;\n margin-bottom: 16px;\n }\n .invoice-header, .invoice-summary {\n margin-bottom: 20px;\n }\n .invoice-summary {\n margin-left: -30px;\n margin-right: -30px;\n border-radius: 0;\n padding: 32px 30px;\n }\n .invoice-content {\n padding: 20px 30px;\n }\n .invoice-bill-to {\n display: flex;\n }\n }\n @media (max-width: 399px) {\n .footer-actions {\n flex-direction: column;\n }\n .footer-action {\n margin-bottom: 12px;\n }\n footer {\n margin: 30px 0;\n }\n footer p {\n margin-top: 0;\n }\n }\n @media print {\n * {\n color-adjust: exact;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\n .bookipay-invoice {\n max-width: 100%;\n }\n @page { margin: 0; }\n body { margin: 1.6cm; }\n }\n </style>\n <div class=\"bookipay-invoice\">\n <div class=\"invoice-content\">\n <div class=\"invoice-header\">\n <img class=\"invoice-logo\" src=\"" + vendorLogoUrl + "\" />\n <div class=\"invoice-company\">\n <div class=\"invoice-company-name invoice-semi-bold invoice-spacing\">" + vendorName + "</div>\n <div class=\"invoice-number invoice-subtitle invoice-spacing\">" + defaultLang.invoiceNo + "</div>\n <div class=\"invoice-date invoice-subtitle invoice-spacing\">" + date + "</div>\n </div>\n </div>\n <div class=\"invoice-summary\">\n <div class=\"invoice-summary-customer\">\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n " + (businessNumber ? "<div class=\"invoice-subtitle2\">" + businessNumber + "</div>" : '') + "\n " + (hasAddressLine ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.address1, address.address2, address.address3]) + "\n </div>" : '') + "\n " + (hasAddress ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.city, address.zip, address.country]) + "\n </div>" : '') + "\n </div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n <div class=\"invoice-summary-total\">\n <div class=\"invoice-subtitle3 invoice-spacing\">\n " + defaultLang.total + "\n </div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">" + defaultLang.item + "</div>\n <div class=\"invoice-subtitle3\">" + defaultLang.amount + "</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + renderItems(invoiceItems) + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">\n " + defaultLang.totalCharged + "</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">\n " + formatPrice(amountPaid, currency) + "\n </div>\n </div>\n </div>\n " + (cardBrand && cardNumber ? "\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">\n " + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "\n </div>\n </div>\n " : '') + "\n </div>\n </div>\n </div>\n <div class=\"invoice-footer invoice-subtitle2\" style=\"font-size: 12px;\">\n <img class=\"invoice-footer-logo\" src=\"" + vendorLogoUrl + "\" />\n <!-- TODO: Dynamic company info -->\n <p>\xA92023 Bookipi Pty Ltd.</p>\n <p>9 George St, North Strathfield NSW 2137, Australia</p>\n <p>ABN: 91617668185</p>\n </div>\n </div>\n " + (includeHtmlWrapper ? '</body></html>' : '') + "\n ";
13565
+ var html = "\n " + (includeHtmlWrapper ? '<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Invoice</title>' : '') + "\n " + styleSheet + "\n " + (includeHtmlWrapper ? '</head>' : '') + "\n <div class=\"bookipay-invoice\">\n <div class=\"invoice-content\">\n " + Header({
13566
+ logoUrl: logoUrl,
13567
+ companyName: vendorName,
13568
+ invoiceNo: defaultLang.invoiceNo,
13569
+ invoiceDate: date
13570
+ }) + "\n " + InvoiceSummaryCard({
13571
+ email: email,
13572
+ companyName: companyName,
13573
+ businessNumber: businessNumber,
13574
+ address: address,
13575
+ total: total,
13576
+ currency: currency,
13577
+ defaultLang: defaultLang
13578
+ }) + "\n " + OrderSummary({
13579
+ amountPaid: amountPaid,
13580
+ invoiceItems: invoiceItems,
13581
+ cardBrand: cardBrand,
13582
+ cardNumber: cardNumber,
13583
+ cardLogo: cardLogo,
13584
+ currency: currency,
13585
+ defaultLang: defaultLang
13586
+ }) + "\n </div>\n " + Footer({
13587
+ logoUrl: logoUrl
13588
+ }) + "\n </div>\n " + (includeHtmlWrapper ? '</body></html>' : '') + "\n ";
13533
13589
  return {
13534
13590
  html: html
13535
13591
  };
13536
- });
13592
+ }
13537
13593
 
13538
13594
  var _document$invoice$est;
13539
13595
  var langJP = (_document$invoice$est = {
@@ -14433,5 +14489,5 @@ var presentationHtml = function presentationHtml(_ref) {
14433
14489
  return htmlRaw$3(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n ", "\n ", "\n </head>\n <body>\n <div class=\"slides-export\">\n ", "\n </div>\n </body>\n </html>"])), fontLinkTags, css, innerContent);
14434
14490
  };
14435
14491
 
14436
- export { contractHtml as ContractHtml, InvoiceCompatHtml, InvoiceCompatHtml$1 as InvoiceCompatJapanHtml, invoiceHtml as InvoiceHtml, invoiceHtml$1 as InvoiceJapanHtml, presentationHtml as PresentationHtml, subscriptionInvoiceHtml as SubscriptionInvoiceHtml, renderOldLayout as invoiceHtmlWithDetails, renderNewLayout as invoiceHtmlWithDetailsNew, renderLayout as invoiceJapanHtmlWithDetails, renderLayout as renderJapanInvoice, renderNewLayout as renderNewInvoice, renderOldLayout as renderOldInvoice };
14492
+ export { contractHtml as ContractHtml, InvoiceCompatHtml, InvoiceCompatHtml$1 as InvoiceCompatJapanHtml, invoiceHtml as InvoiceHtml, invoiceHtml$1 as InvoiceJapanHtml, presentationHtml as PresentationHtml, SubscriptionInvoiceHtml, renderOldLayout as invoiceHtmlWithDetails, renderNewLayout as invoiceHtmlWithDetailsNew, renderLayout as invoiceJapanHtmlWithDetails, renderLayout as renderJapanInvoice, renderNewLayout as renderNewInvoice, renderOldLayout as renderOldInvoice };
14437
14493
  //# sourceMappingURL=index.modern.js.map