@solvimon/solvimon-web 0.1.0-alpha.1 → 0.1.0-alpha.11
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/README.md +196 -44
- package/dist/ApiStatus-CyNDp_op.mjs +9 -0
- package/dist/ApiStatus-oqvUEWJx.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +9 -6
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
- package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
- package/dist/{ContentWithAsideLayout-BC-C5Gjt.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
- package/dist/{useCustomerPaymentMethodOptions-Fe_dLxfv.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +29 -37
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +20 -9
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
- package/dist/PaymentHistoryBlock-BiiFJkpT.js +1 -0
- package/dist/PaymentHistoryBlock-D_B099M7.mjs +4 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +19 -12
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
- package/dist/PaymentIntegrationForm-DFnwutjd.mjs +4 -0
- package/dist/PaymentIntegrationForm-xkf4TUaD.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DTIY4s7C.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-uk5MO0ce.mjs +962 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs +50 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +24 -8
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +42 -36
- package/dist/adyen-51SvcyqV.mjs +4 -0
- package/dist/adyen-Bwewy3HC.mjs +172 -0
- package/dist/adyen-DZsyEXkw.js +1 -0
- package/dist/adyen-R6aSZ0Yf.js +1 -0
- package/dist/component-BOqPDAVk.js +1 -0
- package/dist/component-Djrf1L-Z.mjs +889 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +99 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +582 -5
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +126 -5
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +538 -5
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +127 -5
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +106 -5
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +131 -5
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +217 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +154 -5
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +132 -5
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +3 -0
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -0
- package/dist/components/WalletBalances/WalletBalances.es.js +120 -0
- package/dist/core/configuration.d.ts +2 -1
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.es.js +1 -1
- package/dist/core/registry.d.ts +1 -1
- package/dist/core/types.d.ts +10 -2
- package/dist/customer-B31QzznT.mjs +32 -0
- package/dist/customer-hDxW1Dbp.js +1 -0
- package/dist/en-US-CgPY97Vq.js +1 -0
- package/dist/en-US-N3CUCsVy.mjs +179 -0
- package/dist/index-DIFK3mcJ.js +6 -0
- package/dist/index-DyvRdSR7.mjs +9673 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +43 -34
- package/dist/{invoices-C31Wz1Bu.mjs → invoices-DIYPN2j_.mjs} +2 -1
- package/dist/invoices-DzkA1jDc.js +1 -0
- package/dist/nl-NL-B8U9b85I.mjs +197 -0
- package/dist/nl-NL-qMRaTRrM.js +1 -0
- package/dist/{paymentMethods-CrU4G_2Y.mjs → paymentMethods-67b3UlTZ.mjs} +2 -1
- package/dist/paymentMethods-C_sdTkSF.js +1 -0
- package/dist/{payments-C3LPk9k9.js → payments-DkHhTHto.js} +1 -1
- package/dist/{payments-NtWI8KlU.mjs → payments-Dq6R37Fz.mjs} +1 -1
- package/dist/registry-BkViv4tv.js +1 -0
- package/dist/registry-Df_26rJy.mjs +144 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +4935 -5
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +154 -5
- package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
- package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +3 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +1066 -0
- package/dist/solvimon-web.css +1 -1
- package/dist/{subscriptions-3R7aMoky.mjs → subscriptions-ClGIr_aS.mjs} +2 -1
- package/dist/subscriptions-jelITJcX.js +1 -0
- package/dist/{useActionDispatchProvider-CBo_Hwu5.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
- package/dist/useActionDispatchProvider-rw9kWeE0.js +1 -0
- package/dist/useCustomer-Ba9WRtuT.mjs +25 -0
- package/dist/useCustomer-CUcaeQn_.js +1 -0
- package/dist/{useIncrementalLoading-fHCizCSo.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +11 -10
- package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
- package/dist/{useInvoiceData-dyvoDwFF.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
- package/dist/useInvoiceData-D2jkdmlA.js +1 -0
- package/dist/{useInvoicesList-rDvRzMqe.mjs → useInvoicesList-CFzAxyae.mjs} +34 -30
- package/dist/useInvoicesList-CaBCGs4h.js +1 -0
- package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
- package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
- package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
- package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
- package/dist/{usePaymentMethods-Bq5fWl1Q.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
- package/dist/{usePaymentMethods-Dbimodf0.js → usePaymentMethods-ryN_YohI.js} +1 -1
- package/dist/usePayments-Cw5PPEJa.mjs +36 -0
- package/dist/usePayments-DWXPGFvp.js +1 -0
- package/dist/usePortal-CxX4nrE4.js +1 -0
- package/dist/usePortal-cmE08vYs.mjs +12 -0
- package/dist/useService-Bb9r_sOQ.js +1 -0
- package/dist/useService-BsSEI8DZ.mjs +53 -0
- package/dist/useViewport-Bu0cyeSi.mjs +38 -0
- package/dist/useViewport-CKRY1CKR.js +1 -0
- package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
- package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
- package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
- package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
- package/dist/vendor-ui-5pJF5KBP.js +1 -0
- package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
- package/package.json +47 -20
- package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +0 -99
- package/dist/BillingInformation.entry.ce-DkrfEvK_.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js +0 -1
- package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +0 -1
- package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +0 -579
- package/dist/Checkout.entry.ce-Bif6vR1K.mjs +0 -5185
- package/dist/Checkout.entry.ce-CkQnLAn4.js +0 -1
- package/dist/ContentWithAsideLayout-CIVSoqFr.js +0 -1
- package/dist/CustomerOverview.entry.ce-C__omsVl.js +0 -1
- package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +0 -231
- package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +0 -135
- package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +0 -1
- package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +0 -583
- package/dist/Invoice.entry.ce-Cgr43ome.js +0 -1
- package/dist/InvoiceDetails.entry.ce-Cnpz8CLJ.mjs +0 -130
- package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js +0 -1
- package/dist/InvoicesList.entry.ce-38iOW5qh.js +0 -1
- package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +0 -105
- package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +0 -1
- package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +0 -134
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs +0 -6568
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +0 -1
- package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +0 -238
- package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +0 -153
- package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +0 -1
- package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +0 -135
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js +0 -1
- package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
- package/dist/_Uint8Array-DxISR7XF.js +0 -1
- package/dist/auto-B_36W1Fc.js +0 -6
- package/dist/auto-BfMZdgp-.mjs +0 -14207
- package/dist/cloneDeep-Hs8Pp07F.js +0 -1
- package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
- package/dist/component-BkmcE85U.mjs +0 -58654
- package/dist/component-Df5eNqYX.js +0 -1
- package/dist/index-2jo9BSPM.js +0 -1
- package/dist/index-BFZ0dPh9.mjs +0 -179
- package/dist/index-CWSXne1Q.js +0 -1
- package/dist/index-D3v7hAtc.mjs +0 -253
- package/dist/invoices-8M_3ur_U.js +0 -1
- package/dist/paymentMethods-CzUqDlvc.js +0 -1
- package/dist/registry-By94DXE2.js +0 -1
- package/dist/registry-shRKDl3K.mjs +0 -127
- package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
- package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
- package/dist/subscriptions-CqK7t-fF.js +0 -1
- package/dist/useActionDispatchProvider-DsIljrhi.js +0 -1
- package/dist/useCustomer-BRY0tuBH.mjs +0 -45
- package/dist/useCustomer-Dp8sGHI0.js +0 -1
- package/dist/useCustomerPaymentMethodOptions-DYpMDnJR.js +0 -1
- package/dist/useIncrementalLoading-D8oKNxX7.js +0 -1
- package/dist/useInvoiceData-DImEH1ca.js +0 -1
- package/dist/useInvoicesList-BZQ9Y0qN.js +0 -1
- package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
- package/dist/useService-Dz13Nxbi.mjs +0 -272
- package/dist/useService-bNNi4GB8.js +0 -1
|
@@ -1,7 +1,540 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
1
|
+
import { defineComponent, renderSlot, unref, computed, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createVNode, withCtx, createTextVNode, toDisplayString, withKeys, normalizeClass, createCommentVNode, createBlock, defineAsyncComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
|
|
3
|
+
import { u as useInvoice, a as usePayments } from "../../usePayments-Cw5PPEJa.mjs";
|
|
4
|
+
import { _ as _sfc_main$g, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
|
|
5
|
+
import { u as useIntl, C as useToggleList, D as _sfc_main$5, _ as _sfc_main$6, I as InvoiceTable, E as _sfc_main$7, F as _sfc_main$8, l as _sfc_main$9, b as _sfc_main$a, G as _sfc_main$b, y as _sfc_main$c, z as _sfc_main$d, c as _sfc_main$f } from "../../vendor-ui-C0K3osvz.mjs";
|
|
6
|
+
import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
|
|
7
|
+
import { _ as _sfc_main$e } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs";
|
|
8
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "Invoice.entry.view",
|
|
10
|
+
props: {
|
|
11
|
+
environment: { type: String },
|
|
12
|
+
locale: { type: String },
|
|
13
|
+
dateLocale: { type: String },
|
|
14
|
+
messages: { type: Object },
|
|
15
|
+
primaryColor: { type: String },
|
|
16
|
+
secondaryColor: { type: String },
|
|
17
|
+
isShadowRoot: { type: Boolean },
|
|
18
|
+
experimentalFeatures: { type: Array },
|
|
19
|
+
logLevel: { type: String },
|
|
20
|
+
onLog: { type: Function },
|
|
21
|
+
allowedPortalTypes: { type: Array },
|
|
22
|
+
portalObject: { type: Object },
|
|
23
|
+
cssOverrides: { type: [String, Array] },
|
|
24
|
+
branding: { type: Object },
|
|
25
|
+
configuration: { type: Object }
|
|
26
|
+
},
|
|
27
|
+
setup(__props) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const invoice = useInvoice({ invoiceId: props.configuration.invoiceId });
|
|
30
|
+
const payments = usePayments();
|
|
31
|
+
const { isLoading } = useLoadInitialData(
|
|
32
|
+
invoice.get(),
|
|
33
|
+
payments.get(props.configuration.invoiceId)
|
|
34
|
+
);
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return renderSlot(_ctx.$slots, "default", {
|
|
37
|
+
invoice: unref(invoice).invoice.value,
|
|
38
|
+
invoiceDownloadService: unref(invoice).downloadInvoicePdf,
|
|
39
|
+
payments: unref(payments),
|
|
40
|
+
isLoading: unref(isLoading)
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const buildInvoiceCreditsBreakdown = ({
|
|
46
|
+
invoice,
|
|
47
|
+
getPeriodTitle,
|
|
48
|
+
getCreditTypeLabel,
|
|
49
|
+
formatQuantity
|
|
50
|
+
}) => {
|
|
51
|
+
const periods = [...invoice.periods ?? [], ...invoice.closed_periods ?? []];
|
|
52
|
+
return periods.map((period) => {
|
|
53
|
+
var _a, _b, _c, _d;
|
|
54
|
+
const walletRowsByLabel = /* @__PURE__ */ new Map();
|
|
55
|
+
const rowKeysByLabel = /* @__PURE__ */ new Map();
|
|
56
|
+
for (const group of period.groups ?? []) {
|
|
57
|
+
for (const line of group.lines ?? []) {
|
|
58
|
+
const walletBalanceDetails = (_a = line == null ? void 0 : line.details) == null ? void 0 : _a.wallet_balance_details;
|
|
59
|
+
if (!walletBalanceDetails) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const primaryCredit = walletBalanceDetails.used_wallet_credits ?? walletBalanceDetails.left_wallet_credits ?? walletBalanceDetails.available_wallet_credits;
|
|
63
|
+
const label = getCreditTypeLabel(primaryCredit);
|
|
64
|
+
const row = {
|
|
65
|
+
id: `${period.period_order}-${group.group_order}-${line.line_order}`,
|
|
66
|
+
label,
|
|
67
|
+
used: formatQuantity((_b = walletBalanceDetails.used_wallet_credits) == null ? void 0 : _b.quantity),
|
|
68
|
+
left: formatQuantity((_c = walletBalanceDetails.left_wallet_credits) == null ? void 0 : _c.quantity),
|
|
69
|
+
available: formatQuantity(
|
|
70
|
+
(_d = walletBalanceDetails.available_wallet_credits) == null ? void 0 : _d.quantity
|
|
71
|
+
)
|
|
72
|
+
};
|
|
73
|
+
const rowKey = `${row.label}-${row.used}-${row.left}-${row.available}`;
|
|
74
|
+
const rowKeys = rowKeysByLabel.get(label) ?? /* @__PURE__ */ new Set();
|
|
75
|
+
if (rowKeys.has(rowKey)) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
rowKeys.add(rowKey);
|
|
79
|
+
rowKeysByLabel.set(label, rowKeys);
|
|
80
|
+
const walletRow = walletRowsByLabel.get(label) ?? {
|
|
81
|
+
id: `${period.period_order}-${label}`,
|
|
82
|
+
label,
|
|
83
|
+
amount: row.available,
|
|
84
|
+
rows: []
|
|
85
|
+
};
|
|
86
|
+
walletRow.rows.push(row);
|
|
87
|
+
walletRowsByLabel.set(label, walletRow);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
id: `${period.period_order}-${period.start_at}`,
|
|
92
|
+
title: getPeriodTitle(period),
|
|
93
|
+
rows: [...walletRowsByLabel.values()]
|
|
94
|
+
};
|
|
95
|
+
}).filter((period) => period.rows.length > 0);
|
|
96
|
+
};
|
|
97
|
+
const _hoisted_1$1 = {
|
|
98
|
+
key: 0,
|
|
99
|
+
class: "mt-8"
|
|
100
|
+
};
|
|
101
|
+
const _hoisted_2$1 = { class: "flex flex-col gap-6" };
|
|
102
|
+
const _hoisted_3$1 = ["onClick", "onKeyup"];
|
|
103
|
+
const _hoisted_4 = { class: "ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600" };
|
|
104
|
+
const _hoisted_5 = { key: 0 };
|
|
105
|
+
const _hoisted_6 = { class: "p-0" };
|
|
106
|
+
const _hoisted_7 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
|
|
107
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
108
|
+
__name: "InvoiceCreditsBreakdown",
|
|
109
|
+
props: {
|
|
110
|
+
invoice: { type: Object }
|
|
111
|
+
},
|
|
112
|
+
setup(__props) {
|
|
113
|
+
const props = __props;
|
|
114
|
+
const { formatDate, $t, formatMessage, formatNumber } = useIntl();
|
|
115
|
+
const { getIsOpen, toggle } = useToggleList();
|
|
116
|
+
const creditTypesById = computed(
|
|
117
|
+
() => Object.fromEntries(
|
|
118
|
+
(props.invoice.credit_types ?? []).map((creditType) => [
|
|
119
|
+
creditType.id,
|
|
120
|
+
creditType
|
|
121
|
+
])
|
|
122
|
+
)
|
|
123
|
+
);
|
|
124
|
+
const getPeriodTitle = (period) => formatMessage(
|
|
125
|
+
{
|
|
126
|
+
defaultMessage: "Service period - {startAt} - {endAt}",
|
|
127
|
+
id: "wallet_balance.service_period_heading",
|
|
128
|
+
description: "Heading shown above wallet balance details for an invoice period"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
startAt: formatDate({
|
|
132
|
+
date: period.start_at,
|
|
133
|
+
format: "date",
|
|
134
|
+
offsetType: "offsetted",
|
|
135
|
+
timezone: props.invoice.customer.timezone
|
|
136
|
+
}),
|
|
137
|
+
endAt: formatDate({
|
|
138
|
+
date: period.end_at,
|
|
139
|
+
format: "date",
|
|
140
|
+
offsetType: "offsetted",
|
|
141
|
+
timezone: props.invoice.customer.timezone
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
const getCreditTypeLabel = (credits) => {
|
|
146
|
+
var _a;
|
|
147
|
+
if (!(credits == null ? void 0 : credits.credit_type_id)) {
|
|
148
|
+
return formatMessage({
|
|
149
|
+
defaultMessage: "Credits",
|
|
150
|
+
id: "wallet_balance.credit_type_fallback_label",
|
|
151
|
+
description: "Fallback label for wallet balance credit types when no name is available"
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return ((_a = creditTypesById.value[credits.credit_type_id]) == null ? void 0 : _a.name) ?? credits.credit_type_id;
|
|
155
|
+
};
|
|
156
|
+
const formatQuantity = (quantity) => quantity ? formatNumber(Number(quantity)) : formatMessage({
|
|
157
|
+
defaultMessage: "-",
|
|
158
|
+
id: "empty_value_placeholder",
|
|
159
|
+
description: "Placeholder shown when a wallet balance quantity is missing"
|
|
160
|
+
});
|
|
161
|
+
const periodsWithCredits = computed(
|
|
162
|
+
() => buildInvoiceCreditsBreakdown({
|
|
163
|
+
invoice: props.invoice,
|
|
164
|
+
getPeriodTitle,
|
|
165
|
+
getCreditTypeLabel,
|
|
166
|
+
formatQuantity
|
|
167
|
+
})
|
|
168
|
+
);
|
|
169
|
+
return (_ctx, _cache) => {
|
|
170
|
+
return periodsWithCredits.value.length > 0 ? (openBlock(), createElementBlock("section", _hoisted_1$1, [
|
|
171
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
172
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(periodsWithCredits.value, (period) => {
|
|
173
|
+
return openBlock(), createElementBlock("section", {
|
|
174
|
+
key: period.id
|
|
175
|
+
}, [
|
|
176
|
+
createVNode(unref(_sfc_main$5), { class: "mt-4" }, {
|
|
177
|
+
default: withCtx(() => [
|
|
178
|
+
createVNode(unref(_sfc_main$6), {
|
|
179
|
+
tag: "h3",
|
|
180
|
+
variant: "caps-heading"
|
|
181
|
+
}, {
|
|
182
|
+
default: withCtx(() => [
|
|
183
|
+
createTextVNode(toDisplayString(period.title), 1)
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1024)
|
|
187
|
+
]),
|
|
188
|
+
_: 2
|
|
189
|
+
}, 1024),
|
|
190
|
+
createVNode(unref(InvoiceTable), { class: "mt-3" }, {
|
|
191
|
+
default: withCtx(() => [
|
|
192
|
+
createElementVNode("tr", null, [
|
|
193
|
+
createVNode(unref(_sfc_main$7), {
|
|
194
|
+
left: "",
|
|
195
|
+
class: "text-gray-600"
|
|
196
|
+
}, {
|
|
197
|
+
default: withCtx(() => [
|
|
198
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
199
|
+
defaultMessage: "Wallet balance",
|
|
200
|
+
id: "wallet_balance.details.header",
|
|
201
|
+
description: "Section header for invoice wallet balance details"
|
|
202
|
+
})), 1)
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
})
|
|
206
|
+
]),
|
|
207
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(period.rows, (row) => {
|
|
208
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
209
|
+
key: row.id
|
|
210
|
+
}, [
|
|
211
|
+
createElementVNode("tr", {
|
|
212
|
+
class: "cursor-pointer border-t",
|
|
213
|
+
tabindex: "0",
|
|
214
|
+
onClick: ($event) => unref(toggle)(row.id),
|
|
215
|
+
onKeyup: [
|
|
216
|
+
withKeys(($event) => unref(toggle)(row.id), ["enter"]),
|
|
217
|
+
withKeys(($event) => unref(toggle)(row.id), ["space"])
|
|
218
|
+
]
|
|
219
|
+
}, [
|
|
220
|
+
createVNode(unref(_sfc_main$8), { class: "p-0" }, {
|
|
221
|
+
default: withCtx(() => [
|
|
222
|
+
createVNode(unref(_sfc_main$9), {
|
|
223
|
+
icon: "keyboard_arrow_down",
|
|
224
|
+
size: "md",
|
|
225
|
+
class: normalizeClass(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !unref(getIsOpen)(row.id) }])
|
|
226
|
+
}, null, 8, ["class"]),
|
|
227
|
+
createTextVNode(" " + toDisplayString(row.label) + " ", 1),
|
|
228
|
+
createElementVNode("span", _hoisted_4, toDisplayString(row.rows.length), 1)
|
|
229
|
+
]),
|
|
230
|
+
_: 2
|
|
231
|
+
}, 1024)
|
|
232
|
+
], 40, _hoisted_3$1),
|
|
233
|
+
unref(getIsOpen)(row.id) ? (openBlock(), createElementBlock("tr", _hoisted_5, [
|
|
234
|
+
createElementVNode("td", _hoisted_6, [
|
|
235
|
+
createElementVNode("div", _hoisted_7, [
|
|
236
|
+
createVNode(unref(InvoiceTable), null, {
|
|
237
|
+
default: withCtx(() => [
|
|
238
|
+
createElementVNode("tr", null, [
|
|
239
|
+
createVNode(unref(_sfc_main$7), {
|
|
240
|
+
left: "",
|
|
241
|
+
class: "w-2/5"
|
|
242
|
+
}, {
|
|
243
|
+
default: withCtx(() => [
|
|
244
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
245
|
+
defaultMessage: "Credit breakdown",
|
|
246
|
+
id: "invoice_credits.credit_breakdown.table_header",
|
|
247
|
+
description: "Column header for wallet balance credit type details"
|
|
248
|
+
})), 1)
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}),
|
|
252
|
+
createVNode(unref(_sfc_main$7), {
|
|
253
|
+
right: "",
|
|
254
|
+
class: "w-1/5"
|
|
255
|
+
}, {
|
|
256
|
+
default: withCtx(() => [
|
|
257
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
258
|
+
defaultMessage: "Balance",
|
|
259
|
+
id: "invoice_credits.balance.table_header",
|
|
260
|
+
description: "Column header for the available wallet balance amount"
|
|
261
|
+
})), 1)
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}),
|
|
265
|
+
createVNode(unref(_sfc_main$7), {
|
|
266
|
+
right: "",
|
|
267
|
+
class: "w-1/5"
|
|
268
|
+
}, {
|
|
269
|
+
default: withCtx(() => [
|
|
270
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
271
|
+
defaultMessage: "Used",
|
|
272
|
+
id: "invoice_credits.used.table_header",
|
|
273
|
+
description: "Column header for the used wallet credit amount"
|
|
274
|
+
})), 1)
|
|
275
|
+
]),
|
|
276
|
+
_: 1
|
|
277
|
+
}),
|
|
278
|
+
createVNode(unref(_sfc_main$7), {
|
|
279
|
+
right: "",
|
|
280
|
+
class: "w-1/5"
|
|
281
|
+
}, {
|
|
282
|
+
default: withCtx(() => [
|
|
283
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
284
|
+
defaultMessage: "Remaining",
|
|
285
|
+
id: "invoice_credits.remaining.table_header",
|
|
286
|
+
description: "Column header for the remaining wallet credit amount"
|
|
287
|
+
})), 1)
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
})
|
|
291
|
+
]),
|
|
292
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(row.rows, (breakdownRow) => {
|
|
293
|
+
return openBlock(), createElementBlock("tr", {
|
|
294
|
+
key: breakdownRow.id,
|
|
295
|
+
class: "border-t"
|
|
296
|
+
}, [
|
|
297
|
+
createVNode(unref(_sfc_main$8), null, {
|
|
298
|
+
default: withCtx(() => [
|
|
299
|
+
createTextVNode(toDisplayString(breakdownRow.label), 1)
|
|
300
|
+
]),
|
|
301
|
+
_: 2
|
|
302
|
+
}, 1024),
|
|
303
|
+
createVNode(unref(_sfc_main$8), { number: "" }, {
|
|
304
|
+
default: withCtx(() => [
|
|
305
|
+
createTextVNode(toDisplayString(breakdownRow.available), 1)
|
|
306
|
+
]),
|
|
307
|
+
_: 2
|
|
308
|
+
}, 1024),
|
|
309
|
+
createVNode(unref(_sfc_main$8), { number: "" }, {
|
|
310
|
+
default: withCtx(() => [
|
|
311
|
+
createTextVNode(toDisplayString(breakdownRow.used), 1)
|
|
312
|
+
]),
|
|
313
|
+
_: 2
|
|
314
|
+
}, 1024),
|
|
315
|
+
createVNode(unref(_sfc_main$8), { number: "" }, {
|
|
316
|
+
default: withCtx(() => [
|
|
317
|
+
createTextVNode(toDisplayString(breakdownRow.left), 1)
|
|
318
|
+
]),
|
|
319
|
+
_: 2
|
|
320
|
+
}, 1024)
|
|
321
|
+
]);
|
|
322
|
+
}), 128))
|
|
323
|
+
]),
|
|
324
|
+
_: 2
|
|
325
|
+
}, 1024)
|
|
326
|
+
])
|
|
327
|
+
])
|
|
328
|
+
])) : createCommentVNode("", true)
|
|
329
|
+
], 64);
|
|
330
|
+
}), 128))
|
|
331
|
+
]),
|
|
332
|
+
_: 2
|
|
333
|
+
}, 1024)
|
|
334
|
+
]);
|
|
335
|
+
}), 128))
|
|
336
|
+
])
|
|
337
|
+
])) : createCommentVNode("", true);
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
342
|
+
__name: "InvoiceBlock",
|
|
343
|
+
props: {
|
|
344
|
+
invoice: { type: Object }
|
|
345
|
+
},
|
|
346
|
+
setup(__props) {
|
|
347
|
+
const { $t } = useIntl();
|
|
348
|
+
const { isMobileViewport: isSmallScreen } = useViewport();
|
|
349
|
+
return (_ctx, _cache) => {
|
|
350
|
+
return openBlock(), createBlock(unref(_sfc_main$a), {
|
|
351
|
+
class: "sv-invoice__summary grow",
|
|
352
|
+
title: unref($t)({
|
|
353
|
+
defaultMessage: "Invoice",
|
|
354
|
+
description: "Title for the invoice block on the invoice details page",
|
|
355
|
+
id: "sdk.invoice_details.invoice.title"
|
|
356
|
+
})
|
|
357
|
+
}, {
|
|
358
|
+
default: withCtx(() => [
|
|
359
|
+
createElementVNode("div", {
|
|
360
|
+
class: normalizeClass(["sv-invoice__summary-body", { "p-6 pt-2": !unref(isSmallScreen) }])
|
|
361
|
+
}, [
|
|
362
|
+
unref(isSmallScreen) ? (openBlock(), createBlock(unref(_sfc_main$b), {
|
|
363
|
+
key: 0,
|
|
364
|
+
variant: "default",
|
|
365
|
+
"has-icon": "",
|
|
366
|
+
class: "sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"
|
|
367
|
+
}, {
|
|
368
|
+
default: withCtx(() => [
|
|
369
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
370
|
+
defaultMessage: "Download the PDF for a full breakdown",
|
|
371
|
+
description: "Download the PDF for a full breakdown",
|
|
372
|
+
id: "sdk.invoice_details.invoice.download_pdf"
|
|
373
|
+
})), 1)
|
|
374
|
+
]),
|
|
375
|
+
_: 1
|
|
376
|
+
})) : createCommentVNode("", true),
|
|
377
|
+
createVNode(unref(_sfc_main$c), {
|
|
378
|
+
class: "sv-invoice__summary-content",
|
|
379
|
+
invoice: __props.invoice,
|
|
380
|
+
"is-expandable": !unref(isSmallScreen)
|
|
381
|
+
}, {
|
|
382
|
+
logo: withCtx(() => [
|
|
383
|
+
renderSlot(_ctx.$slots, "logo")
|
|
384
|
+
]),
|
|
385
|
+
_: 3
|
|
386
|
+
}, 8, ["invoice", "is-expandable"]),
|
|
387
|
+
createVNode(_sfc_main$3, {
|
|
388
|
+
class: "sv-invoice__credits-breakdown",
|
|
389
|
+
invoice: __props.invoice
|
|
390
|
+
}, null, 8, ["invoice"])
|
|
391
|
+
], 2)
|
|
392
|
+
]),
|
|
393
|
+
_: 3
|
|
394
|
+
}, 8, ["title"]);
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
const _hoisted_1 = { class: "sv-invoice sv-root sv-component" };
|
|
399
|
+
const _hoisted_2 = { class: "sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6" };
|
|
400
|
+
const _hoisted_3 = { class: "sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6" };
|
|
401
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
402
|
+
__name: "Invoice",
|
|
403
|
+
props: {
|
|
404
|
+
isLoading: { type: Boolean },
|
|
405
|
+
invoice: { type: Object },
|
|
406
|
+
payments: { type: Array },
|
|
407
|
+
invoiceDownloadService: { type: Function },
|
|
408
|
+
configuration: { type: Object }
|
|
409
|
+
},
|
|
410
|
+
setup(__props) {
|
|
411
|
+
const PaymentHistoryBlock = defineAsyncComponent(
|
|
412
|
+
() => import("../../PaymentHistoryBlock-D_B099M7.mjs")
|
|
413
|
+
);
|
|
414
|
+
const { $t } = useIntl();
|
|
415
|
+
return (_ctx, _cache) => {
|
|
416
|
+
var _a, _b;
|
|
417
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
418
|
+
createVNode(unref(_sfc_main$d), {
|
|
419
|
+
class: "sv-invoice__header mb-6",
|
|
420
|
+
"payment-attempts": __props.payments ?? [],
|
|
421
|
+
invoice: __props.invoice,
|
|
422
|
+
"download-service": () => __props.invoiceDownloadService(__props.invoice.id),
|
|
423
|
+
"show-download-button": __props.configuration.enableDownloadButton,
|
|
424
|
+
variant: "external"
|
|
425
|
+
}, null, 8, ["payment-attempts", "invoice", "download-service", "show-download-button"]),
|
|
426
|
+
createElementVNode("div", _hoisted_2, [
|
|
427
|
+
__props.invoice ? (openBlock(), createBlock(_sfc_main$2, {
|
|
428
|
+
key: 0,
|
|
429
|
+
class: "sv-invoice__main",
|
|
430
|
+
invoice: __props.invoice
|
|
431
|
+
}, null, 8, ["invoice"])) : createCommentVNode("", true),
|
|
432
|
+
createElementVNode("div", _hoisted_3, [
|
|
433
|
+
createVNode(_sfc_main$e, {
|
|
434
|
+
class: "sv-invoice__details",
|
|
435
|
+
invoice: __props.invoice
|
|
436
|
+
}, null, 8, ["invoice"]),
|
|
437
|
+
((_a = __props.configuration) == null ? void 0 : _a.enablePaymentAttempts) && ((_b = __props.payments) == null ? void 0 : _b.length) ? (openBlock(), createBlock(unref(PaymentHistoryBlock), {
|
|
438
|
+
key: 0,
|
|
439
|
+
class: "sv-invoice__payment-history",
|
|
440
|
+
"payment-attempts": __props.payments,
|
|
441
|
+
customer: __props.invoice.customer
|
|
442
|
+
}, null, 8, ["payment-attempts", "customer"])) : createCommentVNode("", true),
|
|
443
|
+
__props.configuration.enableCustomerBillingInformation ? (openBlock(), createBlock(unref(_sfc_main$f), {
|
|
444
|
+
key: 1,
|
|
445
|
+
class: "sv-invoice__billing-information",
|
|
446
|
+
customer: __props.invoice.customer,
|
|
447
|
+
title: unref($t)({
|
|
448
|
+
defaultMessage: "Your billing information",
|
|
449
|
+
description: "Title for the billing information on the detailed invoice view",
|
|
450
|
+
id: "sdk.invoice_details.customer_billing_information.title"
|
|
451
|
+
})
|
|
452
|
+
}, null, 8, ["customer", "title"])) : createCommentVNode("", true)
|
|
453
|
+
])
|
|
454
|
+
])
|
|
455
|
+
]);
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
460
|
+
__name: "Invoice.entry",
|
|
461
|
+
props: {
|
|
462
|
+
environment: { type: String },
|
|
463
|
+
locale: { type: String },
|
|
464
|
+
dateLocale: { type: String },
|
|
465
|
+
messages: { type: Object },
|
|
466
|
+
primaryColor: { type: String },
|
|
467
|
+
secondaryColor: { type: String },
|
|
468
|
+
isShadowRoot: { type: Boolean },
|
|
469
|
+
experimentalFeatures: { type: Array },
|
|
470
|
+
logLevel: { type: String },
|
|
471
|
+
onLog: { type: Function },
|
|
472
|
+
allowedPortalTypes: { type: Array },
|
|
473
|
+
portalObject: { type: Object },
|
|
474
|
+
cssOverrides: { type: [String, Array] },
|
|
475
|
+
branding: { type: Object },
|
|
476
|
+
configuration: { type: Object }
|
|
477
|
+
},
|
|
478
|
+
setup(__props) {
|
|
479
|
+
var _a;
|
|
480
|
+
const props = __props;
|
|
481
|
+
if (!((_a = props.configuration) == null ? void 0 : _a.invoiceId)) {
|
|
482
|
+
throw new Error("Missing invoice id");
|
|
483
|
+
}
|
|
484
|
+
const resolvedProps = computed(() => ({
|
|
485
|
+
...props,
|
|
486
|
+
configuration: {
|
|
487
|
+
enableCustomerBillingInformation: true,
|
|
488
|
+
enableDownloadButton: true,
|
|
489
|
+
enablePaymentAttempts: true,
|
|
490
|
+
...props.configuration
|
|
491
|
+
}
|
|
492
|
+
}));
|
|
493
|
+
return (_ctx, _cache) => {
|
|
494
|
+
var _a2, _b, _c, _d;
|
|
495
|
+
return openBlock(), createBlock(unref(_sfc_main$g), {
|
|
496
|
+
"custom-element-name": unref(COMPONENT_NAME),
|
|
497
|
+
environment: __props.environment,
|
|
498
|
+
locale: __props.locale,
|
|
499
|
+
"portal-object": __props.portalObject,
|
|
500
|
+
"allowed-portal-types": ["CUSTOMER"],
|
|
501
|
+
"primary-color": (_b = (_a2 = __props.branding) == null ? void 0 : _a2.colors) == null ? void 0 : _b.primary,
|
|
502
|
+
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
503
|
+
"experimental-features": __props.experimentalFeatures,
|
|
504
|
+
"log-level": __props.logLevel,
|
|
505
|
+
"on-log": __props.onLog,
|
|
506
|
+
"css-overrides": __props.cssOverrides,
|
|
507
|
+
onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
|
|
508
|
+
}, {
|
|
509
|
+
default: withCtx(() => [
|
|
510
|
+
createVNode(_sfc_main$4, normalizeProps(guardReactiveProps(resolvedProps.value)), {
|
|
511
|
+
default: withCtx(({ invoice, payments, isLoading, invoiceDownloadService }) => [
|
|
512
|
+
invoice ? (openBlock(), createBlock(_sfc_main$1, {
|
|
513
|
+
key: 0,
|
|
514
|
+
"is-loading": isLoading,
|
|
515
|
+
invoice,
|
|
516
|
+
"invoice-download-service": invoiceDownloadService,
|
|
517
|
+
payments: payments.payments.value,
|
|
518
|
+
configuration: __props.configuration
|
|
519
|
+
}, null, 8, ["is-loading", "invoice", "invoice-download-service", "payments", "configuration"])) : createCommentVNode("", true)
|
|
520
|
+
]),
|
|
521
|
+
_: 1
|
|
522
|
+
}, 16)
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
}, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
const SolvimonInvoice = defineCustomElement(_sfc_main);
|
|
530
|
+
const COMPONENT_NAME = getComponentName("invoice");
|
|
531
|
+
const defineSolvimonInvoice = () => {
|
|
532
|
+
if (!customElements.get(COMPONENT_NAME)) {
|
|
533
|
+
customElements.define(COMPONENT_NAME, SolvimonInvoice);
|
|
534
|
+
}
|
|
535
|
+
};
|
|
3
536
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
537
|
+
COMPONENT_NAME,
|
|
538
|
+
SolvimonInvoice,
|
|
539
|
+
defineSolvimonInvoice
|
|
7
540
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SolvimonInvoiceDetails: import('vue').VueElementConstructor<unknown>;
|
|
1
|
+
export declare const SolvimonInvoiceDetails: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
|
|
2
2
|
export declare const COMPONENT_NAME: string;
|
|
3
3
|
export declare const defineSolvimonInvoiceDetails: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-D2jkdmlA.js"),i=require("../../component-BOqPDAVk.js"),r=e.defineComponent({__name:"InvoiceDetails",props:{invoice:{type:Object},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(i,r)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-invoice-details sv-root sv-component sv-loading min-h-[100px]","data-testid":"invoice-details-skeleton"})):(e.openBlock(),e.createBlock(o._sfc_main,{key:1,class:"sv-invoice-details sv-root sv-component",invoice:n.invoice},null,8,["invoice"]))}),a=e.defineComponent({__name:"InvoiceDetails.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){const t=o,i=n.useInvoiceData(t.configuration.invoiceId);return(o,t)=>{var n;return e.renderSlot(o.$slots,"default",{invoice:null==(n=e.unref(i).data.value)?void 0:n.invoice,isLoading:e.unref(i).isPending.value})}}}),l=e.defineComponent({__name:"InvoiceDetails.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var t;if(!(null==(t=o.configuration)?void 0:t.invoiceId))throw new Error("Missing invoice id");return(t,n)=>{var l,s,p,v;return e.openBlock(),e.createBlock(e.unref(i._sfc_main),{"custom-element-name":e.unref(c),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(l=o.branding)?void 0:l.colors)?void 0:s.primary,"secondary-color":null==(v=null==(p=o.branding)?void 0:p.colors)?void 0:v.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>t.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(({invoice:t,isLoading:n})=>[t?(e.openBlock(),e.createBlock(r,{key:0,"is-loading":n,invoice:t,configuration:o.configuration},null,8,["is-loading","invoice","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),s=i.defineCustomElement(l),c=i.getComponentName("invoice-details");exports.COMPONENT_NAME=c,exports.SolvimonInvoiceDetails=s,exports.defineSolvimonInvoiceDetails=()=>{customElements.get(c)||customElements.define(c,s)};
|