@bookipi/htmlgenerator 1.1.29-alpha25 → 1.1.29-alpha27
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 +43 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +43 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/bookipayLogo~HwotOVDe.svg +0 -31
- package/dist/bootstrap.css +0 -10653
- package/dist/font-awesome.css +0 -1807
- package/dist/index.css +0 -12323
package/dist/index.modern.js
CHANGED
|
@@ -10433,5 +10433,47 @@ var contractHtml = (function (props) {
|
|
|
10433
10433
|
return html;
|
|
10434
10434
|
});
|
|
10435
10435
|
|
|
10436
|
-
|
|
10436
|
+
var FormatCurrency$3 = util.FormatCurrency;
|
|
10437
|
+
var subscriptionInvoiceHtml = (function (_ref) {
|
|
10438
|
+
var vendor = _ref.vendor,
|
|
10439
|
+
invoice = _ref.invoice,
|
|
10440
|
+
customer = _ref.customer,
|
|
10441
|
+
items = _ref.items,
|
|
10442
|
+
_ref$includeHtmlWrapp = _ref.includeHtmlWrapper,
|
|
10443
|
+
includeHtmlWrapper = _ref$includeHtmlWrapp === void 0 ? false : _ref$includeHtmlWrapp;
|
|
10444
|
+
|
|
10445
|
+
var _ref2 = vendor != null ? vendor : {},
|
|
10446
|
+
vendorName = _ref2.name,
|
|
10447
|
+
logoUrl = _ref2.logoUrl;
|
|
10448
|
+
|
|
10449
|
+
var _ref3 = invoice != null ? invoice : {},
|
|
10450
|
+
invoiceNumber = _ref3.no,
|
|
10451
|
+
total = _ref3.total,
|
|
10452
|
+
amountPaid = _ref3.amountPaid,
|
|
10453
|
+
currency = _ref3.currency,
|
|
10454
|
+
transaction = _ref3.transaction,
|
|
10455
|
+
date = _ref3.date;
|
|
10456
|
+
|
|
10457
|
+
var _ref4 = transaction != null ? transaction : {},
|
|
10458
|
+
cardNumber = _ref4.cardNumber,
|
|
10459
|
+
cardBrand = _ref4.cardBrand,
|
|
10460
|
+
cardLogo = _ref4.cardLogo;
|
|
10461
|
+
|
|
10462
|
+
var _ref5 = customer != null ? customer : {},
|
|
10463
|
+
companyName = _ref5.name,
|
|
10464
|
+
email = _ref5.email;
|
|
10465
|
+
|
|
10466
|
+
var vendorLogoUrl = logoUrl != null ? logoUrl : 'https://web.bookipi.com/images/logos/logo-bookipi.png';
|
|
10467
|
+
|
|
10468
|
+
var renderItem = function renderItem(item) {
|
|
10469
|
+
return "\n <div class=\"invoice-order-item\">\n <div>\n <div class=\"invoice-spacing invoice-body3\">" + item.name + "</div>\n <div class=\"invoice-subtitle3\">" + item.description + "</div>\n </div>\n <div style=\"font-size: 14px;\">\n " + FormatCurrency$3(item.price, currency) + "\n </div>\n </div>\n ";
|
|
10470
|
+
};
|
|
10471
|
+
|
|
10472
|
+
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;900&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-width: 150px;\n max-height: 50px;\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: 900;\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-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-bottom: 16px;\n justify-content: space-between;\n }\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\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 display: flex;\n justify-content: space-between;\n padding: 12px 0px 20px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n margin-bottom: 8px;\n }\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n }\n .invoice-card {\n display: flex;\n }\n .invoice-card img {\n height: 18px;\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 }\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 }\n .invoice-content {\n padding: 20px 30px;\n }\n .invoice-footer {\n max-width: 390px;\n margin: 0 auto;\n }\n .invoice-bill-to {\n display: flex;\n }\n }\n @media print {\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\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\">Invoice #" + invoiceNumber + "</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-total\">\n <div class=\"invoice-summary-total-title invoice-semi-bold invoice-spacing\">Total</div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">" + FormatCurrency$3(total, currency) + "</div>\n </div>\n <div class=\"invoice-summary-customer\">\n <div><div class=\"invoice-bill-to invoice-semi-bold invoice-spacing\">Bill to</div></div>\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">Item</div>\n <div class=\"invoice-subtitle3\">Amount</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + items.map(renderItem) + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">Total charged</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">" + FormatCurrency$3(amountPaid, currency) + "</div>\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">" + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "</div>\n </div>\n </div>\n </div>\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 ";
|
|
10473
|
+
return {
|
|
10474
|
+
html: html
|
|
10475
|
+
};
|
|
10476
|
+
});
|
|
10477
|
+
|
|
10478
|
+
export { contractHtml as ContractHtml, InvoiceCompatHtml, invoiceHtml as InvoiceHtml, subscriptionInvoiceHtml as SubscriptionInvoiceHtml, invoiceHtmlWithDetails };
|
|
10437
10479
|
//# sourceMappingURL=index.modern.js.map
|