@solvimon/solvimon-web 0.1.0-alpha.16 → 0.1.0-alpha.18
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 +33 -31
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs +238 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs} +2 -2
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js → BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +1 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs +2654 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +53 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs} +1 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs +153 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs +52 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +1 -0
- package/dist/{PaymentHistoryBlock-BKMttUyk.mjs → PaymentHistoryBlock-Bxr8lUGs.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-BGbTy4Se.js → PaymentHistoryBlock-COjIVYX4.js} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-D4QupHWl.js → PaymentIntegrationForm-BSauhuKv.js} +1 -1
- package/dist/{PaymentIntegrationForm-CypW6fZY.mjs → PaymentIntegrationForm-PIT8gHYN.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs +148 -0
- package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +1 -0
- package/dist/PaymentIntegrationFormAdyen-Cjj9aK0E.mjs +729 -0
- package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +1 -0
- package/dist/PaymentIntegrationFormStripe-arpua_ZT.mjs +545 -0
- package/dist/PaymentMethodForm-B7T5rrNz.mjs +4 -0
- package/dist/PaymentMethodForm-CLz3ZS-b.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs} +25 -14
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js +1 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs} +77 -31
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +1 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs} +115 -68
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +1 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs +37 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs +100 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs} +22 -119
- package/dist/adyen-BMDZQBUG.js +1 -0
- package/dist/{url-1Lbg5Yni.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
- package/dist/component--Y7Igv5i.mjs +1022 -0
- package/dist/component-DIy1hvJM.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +4 -4
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +7 -7
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +7 -58
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +25 -9
- package/dist/core/action-request.types.d.ts +3 -15
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +4 -2
- package/dist/{customer-Bv_fqXzO.mjs → customer-DovIxTG1.mjs} +1 -1
- package/dist/{customer-_W8gIX5m.js → customer-brfznoHY.js} +1 -1
- package/dist/en-US-BvOHPudj.js +1 -0
- package/dist/{en-US-DAgOSlgv.mjs → en-US-CXDO3qhq.mjs} +121 -36
- package/dist/index-BMWWP8xj.js +1 -0
- package/dist/index-Do7kzLpg.mjs +265 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +7 -4
- package/dist/invoices-Cf3dSYSj.js +1 -0
- package/dist/{invoices-BGb0AwVF.mjs → invoices-Dk-z04lg.mjs} +32 -16
- package/dist/{nl-NL-DCsmrA8A.mjs → nl-NL-BgL_PuBn.mjs} +126 -40
- package/dist/nl-NL-COGUFg60.js +1 -0
- package/dist/{paymentMethods-DvqlWe96.mjs → paymentMethods-BnF1XYS1.mjs} +21 -5
- package/dist/paymentMethods-DVDC_WfL.js +1 -0
- package/dist/{payments-DMDDI3MK.js → payments-DVZFO5yb.js} +1 -1
- package/dist/{payments-CpzTVrQM.mjs → payments-TnRjtlOw.mjs} +1 -1
- package/dist/pricing-CuYndX6t.js +1 -0
- package/dist/pricing-GwLCiSzs.mjs +19 -0
- package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
- package/dist/pricingPlanSchedule-CXG3CQ61.mjs +146 -0
- package/dist/{registry-B-If1W_u.mjs → registry-Ck0Gb6rj.mjs} +7 -4
- package/dist/registry-Cra6yoB4.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +429 -689
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +61 -39
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +30 -13
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +28 -18
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +3 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +889 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +3 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +716 -0
- package/dist/solvimon-web.css +1 -1
- package/dist/subscription-C41lG-rH.mjs +89 -0
- package/dist/subscription-b0OPx8Du.js +1 -0
- package/dist/subscriptions-BFCKVHnP.js +1 -0
- package/dist/subscriptions-vEE4Y7qm.mjs +58 -0
- package/dist/{useActionDispatchProvider-Dz8-e4gZ.mjs → useActionDispatchProvider-BlEf-RZ5.mjs} +1 -1
- package/dist/{useActionDispatchProvider-BHTknMoH.js → useActionDispatchProvider-aJOy3kr1.js} +1 -1
- package/dist/{useCustomer-Z24KchWC.js → useCustomer-C1XTqmrQ.js} +1 -1
- package/dist/{useCustomer-VVJi8z2w.mjs → useCustomer-Cw8LXT6S.mjs} +2 -2
- package/dist/{useIncrementalLoading-DmOT2MXH.mjs → useIncrementalLoading-8WtKZ-mP.mjs} +2 -2
- package/dist/useIncrementalLoading-CkY2klIW.js +1 -0
- package/dist/{useInvoiceData-Bl87gzIS.js → useInvoiceData-BrxMo4Zt.js} +1 -1
- package/dist/{useInvoiceData-Di5pLPM0.mjs → useInvoiceData-Cy_ysMsq.mjs} +2 -2
- package/dist/{useInvoicesList-z19cteaD.mjs → useInvoicesList-DMsZn1tE.mjs} +4 -4
- package/dist/useInvoicesList-DmisMQzy.js +1 -0
- package/dist/{useLoadInitialData-CkpryfjF.mjs → useLoadInitialData-BP1v7qhd.mjs} +1 -1
- package/dist/{useLoadInitialData-CTqfiMTN.js → useLoadInitialData-_BjCD0Jc.js} +1 -1
- package/dist/{usePaymentMethodOptions-BoGHJjng.mjs → usePaymentMethodOptions-CWfGvW0U.mjs} +9 -3
- package/dist/{usePaymentMethodOptions-BsCZnCQW.js → usePaymentMethodOptions-xeSTmaVo.js} +1 -1
- package/dist/{usePaymentMethods-AC-4rrR9.js → usePaymentMethods-CAFMvSOr.js} +1 -1
- package/dist/{usePaymentMethods-ocHmNoP7.mjs → usePaymentMethods-Cyk4cjoE.mjs} +2 -2
- package/dist/{usePayments-CgXZeWrU.js → usePayments-BieVBaz-.js} +1 -1
- package/dist/{usePayments-D85eB5l4.mjs → usePayments-D88XSZfS.mjs} +10 -4
- package/dist/{usePortal-B1O1zgdV.mjs → usePortal-0NDlbFr9.mjs} +1 -1
- package/dist/{usePortal-DVD7PcWI.js → usePortal-B954nyEB.js} +1 -1
- package/dist/{useService-CHrkefKd.js → useService-BiljI7XA.js} +1 -1
- package/dist/{useService-DF57xuDd.mjs → useService-CqfJi5ST.mjs} +1 -1
- package/dist/useSubscription-9rJpFNUF.mjs +29 -0
- package/dist/useSubscription-k3limdu_.js +1 -0
- package/dist/vendor-ui-Dfh3_g4q.js +1 -0
- package/dist/{vendor-ui-B8IlviSs.mjs → vendor-ui-ItGf7wJV.mjs} +8006 -6329
- package/package.json +23 -9
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs +0 -1537
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js +0 -1
- package/dist/component-Bg2JVC_O.mjs +0 -933
- package/dist/component-Bs8oszfD.js +0 -1
- package/dist/en-US-C0gIE4Q1.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-D-OKipCg.js +0 -1
- package/dist/nl-NL-Br7muSHK.js +0 -1
- package/dist/paymentMethods-DIbB759g.js +0 -1
- package/dist/registry-uG2isab0.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1102
- package/dist/subscriptions-BPYyv09M.mjs +0 -75
- package/dist/subscriptions-CC61I6Nj.js +0 -1
- package/dist/url-B6-3PkW2.js +0 -1
- package/dist/useIncrementalLoading-CuSndpP2.js +0 -1
- package/dist/useInvoicesList-CFk-_oVK.js +0 -1
- package/dist/useWalletBalanceItems-BL-R5foK.js +0 -1
- package/dist/useWalletBalanceItems-COQDLfoZ.mjs +0 -109
- package/dist/vendor-ui-C3Tq-qY_.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, unref, withCtx, createVNode, createCommentVNode, createSlots, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { u as useIntl,
|
|
3
|
-
import { u as useService } from "./useService-
|
|
4
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, unref, withCtx, createVNode, createCommentVNode, createSlots, createElementVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { u as useIntl, b as _sfc_main$1, n as _sfc_main$2, M as Modal, a as _sfc_main$3, D as _sfc_main$4 } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
import { u as useService } from "./useService-CqfJi5ST.mjs";
|
|
4
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-BnF1XYS1.mjs";
|
|
5
5
|
function usePaymentMethodContextMenuOptions({
|
|
6
6
|
onSetDefault,
|
|
7
7
|
onDeleteRequest
|
|
@@ -31,17 +31,29 @@ function usePaymentMethodContextMenuOptions({
|
|
|
31
31
|
};
|
|
32
32
|
return { getContextMenuItems };
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const { setDefaultPaymentMethod } = createPaymentMethodsService();
|
|
36
|
-
const
|
|
34
|
+
function usePaymentMethodActions() {
|
|
35
|
+
const { archivePaymentMethod, setDefaultPaymentMethod } = createPaymentMethodsService();
|
|
36
|
+
const archiveRequest = useService({
|
|
37
|
+
service: (paymentMethodId) => archivePaymentMethod({ paymentMethodId })
|
|
38
|
+
});
|
|
39
|
+
const setDefaultRequest = useService({
|
|
37
40
|
service: (paymentMethodId) => setDefaultPaymentMethod({ paymentMethodId })
|
|
38
41
|
});
|
|
39
|
-
return {
|
|
42
|
+
return {
|
|
43
|
+
archive: archiveRequest.execute,
|
|
44
|
+
archiveError: archiveRequest.error,
|
|
45
|
+
isArchiving: archiveRequest.isPending,
|
|
46
|
+
setDefault: setDefaultRequest.execute,
|
|
47
|
+
setDefaultError: setDefaultRequest.error,
|
|
48
|
+
isSettingDefault: setDefaultRequest.isPending
|
|
49
|
+
};
|
|
40
50
|
}
|
|
41
51
|
const _hoisted_1 = {
|
|
42
52
|
key: 0,
|
|
43
53
|
class: "sv-payment-methods__list grid grid-cols-1 gap-4"
|
|
44
54
|
};
|
|
55
|
+
const _hoisted_2 = { class: "sv-payment-methods__delete-modal-body flex flex-col gap-3" };
|
|
56
|
+
const _hoisted_3 = { class: "px-3 py-2" };
|
|
45
57
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
46
58
|
__name: "PaymentMethodsList",
|
|
47
59
|
props: {
|
|
@@ -52,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
64
|
const emit = __emit;
|
|
53
65
|
const { $t } = useIntl();
|
|
54
66
|
const pendingDeletePaymentMethod = ref(null);
|
|
55
|
-
const {
|
|
67
|
+
const { archive, archiveError, isArchiving, setDefault } = usePaymentMethodActions();
|
|
56
68
|
const { getContextMenuItems } = usePaymentMethodContextMenuOptions({
|
|
57
69
|
onDeleteRequest: (paymentMethod) => {
|
|
58
70
|
pendingDeletePaymentMethod.value = paymentMethod;
|
|
@@ -62,10 +74,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
74
|
emit("set-default", paymentMethod);
|
|
63
75
|
}
|
|
64
76
|
});
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
function handleCloseModal() {
|
|
78
|
+
pendingDeletePaymentMethod.value = null;
|
|
79
|
+
archiveError.value = null;
|
|
80
|
+
}
|
|
81
|
+
async function handleConfirmDelete() {
|
|
82
|
+
const paymentMethod = pendingDeletePaymentMethod.value;
|
|
83
|
+
if (!paymentMethod || isArchiving.value) return;
|
|
84
|
+
try {
|
|
85
|
+
await archive(paymentMethod.id);
|
|
86
|
+
} catch {
|
|
87
|
+
return;
|
|
68
88
|
}
|
|
89
|
+
emit("delete", paymentMethod);
|
|
69
90
|
pendingDeletePaymentMethod.value = null;
|
|
70
91
|
}
|
|
71
92
|
return (_ctx, _cache) => {
|
|
@@ -87,8 +108,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
108
|
}, 1024);
|
|
88
109
|
}), 128))
|
|
89
110
|
])) : createCommentVNode("", true),
|
|
90
|
-
createVNode(unref(
|
|
111
|
+
createVNode(unref(Modal), {
|
|
112
|
+
size: "md",
|
|
91
113
|
"show-modal": !!pendingDeletePaymentMethod.value,
|
|
114
|
+
"is-loading": unref(isArchiving),
|
|
115
|
+
"no-click-away": unref(isArchiving),
|
|
116
|
+
"no-backdrop-close": unref(isArchiving),
|
|
92
117
|
title: unref($t)({
|
|
93
118
|
id: "payment_methods_list.delete_modal.title",
|
|
94
119
|
defaultMessage: "Delete payment method",
|
|
@@ -105,31 +130,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
130
|
description: "Cancel button in the delete payment method modal"
|
|
106
131
|
}),
|
|
107
132
|
onConfirm: handleConfirmDelete,
|
|
108
|
-
onClose:
|
|
133
|
+
onClose: handleCloseModal
|
|
109
134
|
}, createSlots({ _: 2 }, [
|
|
110
135
|
pendingDeletePaymentMethod.value ? {
|
|
111
136
|
name: "body",
|
|
112
137
|
fn: withCtx(() => [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
138
|
+
createElementVNode("div", _hoisted_2, [
|
|
139
|
+
createVNode(unref(_sfc_main$3), {
|
|
140
|
+
variant: "body-sm",
|
|
141
|
+
shade: "lighter",
|
|
142
|
+
tag: "p",
|
|
143
|
+
class: "sv-payment-methods__delete-modal-explanation"
|
|
144
|
+
}, {
|
|
145
|
+
default: withCtx(() => [
|
|
146
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
147
|
+
id: "payment_methods_list.delete_modal.body",
|
|
148
|
+
defaultMessage: "Are you sure you want to delete this payment method?",
|
|
149
|
+
description: "Confirmation message in the delete payment method modal"
|
|
150
|
+
})), 1)
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}),
|
|
154
|
+
createVNode(unref(_sfc_main$1), {
|
|
155
|
+
"no-spacing": "",
|
|
156
|
+
class: "sv-payment-methods__delete-modal-payment-method"
|
|
157
|
+
}, {
|
|
158
|
+
default: withCtx(() => [
|
|
159
|
+
createElementVNode("div", _hoisted_3, [
|
|
160
|
+
createVNode(unref(_sfc_main$2), { "payment-method": pendingDeletePaymentMethod.value }, null, 8, ["payment-method"])
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}),
|
|
165
|
+
unref(archiveError) ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
166
|
+
key: 0,
|
|
167
|
+
class: "sv-payment-methods__delete-modal-error sv-error",
|
|
168
|
+
title: unref($t)({
|
|
169
|
+
id: "payment_methods_list.delete_modal.error",
|
|
170
|
+
defaultMessage: "We could not delete this payment method. Please try again.",
|
|
171
|
+
description: "Error shown when deleting a payment method fails"
|
|
172
|
+
})
|
|
173
|
+
}, null, 8, ["title"])) : createCommentVNode("", true)
|
|
174
|
+
])
|
|
129
175
|
]),
|
|
130
176
|
key: "0"
|
|
131
177
|
} : void 0
|
|
132
|
-
]), 1032, ["show-modal", "title", "confirm-button-text", "cancel-button-text"])
|
|
178
|
+
]), 1032, ["show-modal", "is-loading", "no-click-away", "no-backdrop-close", "title", "confirm-button-text", "cancel-button-text"])
|
|
133
179
|
], 64);
|
|
134
180
|
};
|
|
135
181
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),n=require("./useService-BiljI7XA.js"),o=require("./paymentMethods-DVDC_WfL.js");const a={key:0,class:"sv-payment-methods__list grid grid-cols-1 gap-4"},l={class:"sv-payment-methods__delete-modal-body flex flex-col gap-3"},s={class:"px-3 py-2"},d=e.defineComponent({__name:"PaymentMethodsList",props:{paymentMethods:{type:Array}},emits:["delete","set-default"],setup(d,{emit:i}){const r=i,{$t:m}=t.useIntl(),c=e.ref(null),{archive:u,archiveError:f,isArchiving:p,setDefault:h}=function(){const{archivePaymentMethod:e,setDefaultPaymentMethod:t}=o.createPaymentMethodsService(),a=n.useService({service:t=>e({paymentMethodId:t})}),l=n.useService({service:e=>t({paymentMethodId:e})});return{archive:a.execute,archiveError:a.error,isArchiving:a.isPending,setDefault:l.execute,setDefaultError:l.error,isSettingDefault:l.isPending}}(),{getContextMenuItems:y}=function({onSetDefault:e,onDeleteRequest:n}){const{$t:o}=t.useIntl();return{getContextMenuItems:t=>{const a=[];return t.is_default||a.push({label:o({defaultMessage:"Set as default",id:"payment_method.context_menu.set_as_default.label",description:"Context menu option for setting the default payment method"}),onClick:()=>e(t)}),a.push({label:o({defaultMessage:"Delete",id:"payment_method.context_menu.delete.label",description:"Context menu option for deleting the payment method"}),onClick:()=>n(t)}),a}}}({onDeleteRequest:e=>{c.value=e},onSetDefault:async e=>{await h(e.id),r("set-default",e)}});function _(){c.value=null,f.value=null}async function v(){const e=c.value;if(e&&!p.value){try{await u(e.id)}catch{return}r("delete",e),c.value=null}}return(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.paymentMethods.length>0?(e.openBlock(),e.createElementBlock("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.paymentMethods,n=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:n.id,class:"sv-payment-methods__item"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$8),{class:"sv-payment-methods__item-content","payment-method":n,options:e.unref(y)(n)},null,8,["payment-method","options"])]),_:2},1024))),128))])):e.createCommentVNode("",!0),e.createVNode(e.unref(t.Modal),{size:"md","show-modal":!!c.value,"is-loading":e.unref(p),"no-click-away":e.unref(p),"no-backdrop-close":e.unref(p),title:e.unref(m)({id:"payment_methods_list.delete_modal.title",defaultMessage:"Delete payment method",description:"Title of the delete payment method confirmation modal"}),"confirm-button-text":e.unref(m)({id:"payment_methods_list.delete_modal.confirm",defaultMessage:"Delete",description:"Confirm button in the delete payment method modal"}),"cancel-button-text":e.unref(m)({id:"payment_methods_list.delete_modal.cancel",defaultMessage:"Cancel",description:"Cancel button in the delete payment method modal"}),onConfirm:v,onClose:_},e.createSlots({_:2},[c.value?{name:"body",fn:e.withCtx(()=>[e.createElementVNode("div",l,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter",tag:"p",class:"sv-payment-methods__delete-modal-explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)({id:"payment_methods_list.delete_modal.body",defaultMessage:"Are you sure you want to delete this payment method?",description:"Confirmation message in the delete payment method modal"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{"no-spacing":"",class:"sv-payment-methods__delete-modal-payment-method"},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$8),{"payment-method":c.value},null,8,["payment-method"])])]),_:1}),e.unref(f)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"sv-payment-methods__delete-modal-error sv-error",title:e.unref(m)({id:"payment_methods_list.delete_modal.error",defaultMessage:"We could not delete this payment method. Please try again.",description:"Error shown when deleting a payment method fails"})},null,8,["title"])):e.createCommentVNode("",!0)])]),key:"0"}:void 0]),1032,["show-modal","is-loading","no-click-away","no-backdrop-close","title","confirm-button-text","cancel-button-text"])],64))}});exports._sfc_main=d;
|
|
@@ -1,94 +1,141 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, renderSlot, useModel, toRef, computed, createBlock, createTextVNode, toDisplayString, mergeModels, createCommentVNode } from "vue";
|
|
2
|
+
import { a as _sfc_main$3, u as useIntl, G as usePricingItem, b as _sfc_main$4, t as _sfc_main$5, H as _sfc_main$6, I as _sfc_main$7, c as _sfc_main$8 } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
import { g as getNameFromPricing } from "./pricing-GwLCiSzs.mjs";
|
|
4
|
+
import { u as useViewport } from "./useViewport-Bu0cyeSi.mjs";
|
|
5
|
+
const _hoisted_1$2 = { class: "flex gap-4 border-l-2 border-primary-600 px-2" };
|
|
6
|
+
const _hoisted_2$2 = { class: "grow" };
|
|
7
7
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "
|
|
9
|
-
props: {
|
|
10
|
-
name: { type: String },
|
|
11
|
-
description: { type: String }
|
|
12
|
-
},
|
|
8
|
+
__name: "PricingGroupTitle",
|
|
13
9
|
setup(__props) {
|
|
14
10
|
return (_ctx, _cache) => {
|
|
15
11
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
16
|
-
createElementVNode("div", _hoisted_2$
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
]),
|
|
12
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
13
|
+
createVNode(unref(_sfc_main$3), {
|
|
14
|
+
tag: "span",
|
|
15
|
+
variant: "body-sm",
|
|
16
|
+
weight: "semibold"
|
|
17
|
+
}, {
|
|
18
|
+
default: withCtx(() => [
|
|
19
|
+
renderSlot(_ctx.$slots, "title")
|
|
20
|
+
]),
|
|
21
|
+
_: 3
|
|
22
|
+
})
|
|
23
|
+
]),
|
|
24
|
+
createElementVNode("div", null, [
|
|
30
25
|
createVNode(unref(_sfc_main$3), {
|
|
31
26
|
tag: "span",
|
|
32
27
|
variant: "body-xs",
|
|
33
28
|
shade: "lighter"
|
|
34
29
|
}, {
|
|
35
30
|
default: withCtx(() => [
|
|
36
|
-
|
|
31
|
+
renderSlot(_ctx.$slots, "description")
|
|
37
32
|
]),
|
|
38
|
-
_:
|
|
33
|
+
_: 3
|
|
39
34
|
})
|
|
40
|
-
]),
|
|
41
|
-
createElementVNode("div", _hoisted_4, [
|
|
42
|
-
renderSlot(_ctx.$slots, "default")
|
|
43
35
|
])
|
|
44
36
|
]);
|
|
45
37
|
};
|
|
46
38
|
}
|
|
47
39
|
});
|
|
48
|
-
const _hoisted_1$1 = { class: "
|
|
40
|
+
const _hoisted_1$1 = { class: "p-1" };
|
|
41
|
+
const _hoisted_2$1 = { class: "pt-1" };
|
|
42
|
+
const SHOW_RADIO_GROUP_MAX_OPTIONS = 3;
|
|
43
|
+
const SHOW_SELECT_MAX_OPTIONS = 6;
|
|
49
44
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
50
|
-
__name: "
|
|
51
|
-
props: {
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
__name: "PricingGroupSingleEditor",
|
|
46
|
+
props: /* @__PURE__ */ mergeModels({
|
|
47
|
+
modelValue: { type: Array },
|
|
48
|
+
pricings: { type: Array },
|
|
49
|
+
billingPeriod: { type: Object },
|
|
50
|
+
currency: { type: String },
|
|
51
|
+
groupName: { type: String }
|
|
52
|
+
}, {
|
|
53
|
+
"modelValue": {
|
|
54
|
+
required: true
|
|
55
|
+
},
|
|
56
|
+
"modelModifiers": {}
|
|
57
|
+
}),
|
|
58
|
+
emits: ["update:modelValue"],
|
|
54
59
|
setup(__props) {
|
|
60
|
+
const props = __props;
|
|
61
|
+
const model = useModel(__props, "modelValue");
|
|
62
|
+
const { $t } = useIntl();
|
|
63
|
+
const { renderPricingForPricingItem } = usePricingItem({
|
|
64
|
+
currency: toRef(props, "currency"),
|
|
65
|
+
billingPeriod: toRef(props, "billingPeriod")
|
|
66
|
+
});
|
|
67
|
+
const { isMobileViewport } = useViewport();
|
|
68
|
+
const groupPricingIds = computed(() => props.pricings.map((pricing) => pricing.id));
|
|
69
|
+
const singleModelValue = computed({
|
|
70
|
+
get: () => {
|
|
71
|
+
return model.value.find((id) => groupPricingIds.value.includes(id)) ?? void 0;
|
|
72
|
+
},
|
|
73
|
+
set: (value) => {
|
|
74
|
+
const filteredPricingIds = model.value.filter((id) => !groupPricingIds.value.includes(id));
|
|
75
|
+
model.value = value ? [...filteredPricingIds, value] : filteredPricingIds;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const options = computed(() => {
|
|
79
|
+
return props.pricings.map((pricing) => {
|
|
80
|
+
var _a;
|
|
81
|
+
const pricingItem = (_a = pricing.items) == null ? void 0 : _a[0];
|
|
82
|
+
return {
|
|
83
|
+
label: getNameFromPricing(pricing) ?? "",
|
|
84
|
+
value: pricing.id,
|
|
85
|
+
description: pricingItem ? renderPricingForPricingItem({ pricingItem }) : $t({
|
|
86
|
+
defaultMessage: "Unsupported pricing",
|
|
87
|
+
id: "pricing_item_pricing.unsupported_pricing_error",
|
|
88
|
+
description: "Text displayed when the pricing item pricing is unsupported"
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
const getRadioGroupOptions = () => {
|
|
94
|
+
return options.value.slice(0, SHOW_RADIO_GROUP_MAX_OPTIONS);
|
|
95
|
+
};
|
|
96
|
+
const getSelectOptions = () => {
|
|
97
|
+
return options.value.map(({ value, label, description: subLabel }) => ({
|
|
98
|
+
label,
|
|
99
|
+
subLabel,
|
|
100
|
+
value
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
55
103
|
return (_ctx, _cache) => {
|
|
56
|
-
return openBlock(), createBlock(unref(_sfc_main$4), {
|
|
104
|
+
return openBlock(), createBlock(unref(_sfc_main$4), { "no-spacing": "" }, {
|
|
57
105
|
default: withCtx(() => [
|
|
58
106
|
createElementVNode("div", _hoisted_1$1, [
|
|
59
|
-
createVNode(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
class: "sv-empty-state__icon text-gray-500"
|
|
63
|
-
}, null, 8, ["icon"]),
|
|
64
|
-
createVNode(unref(_sfc_main$3), {
|
|
65
|
-
center: "",
|
|
66
|
-
tag: "span",
|
|
67
|
-
variant: "body-sm",
|
|
68
|
-
weight: "semibold",
|
|
69
|
-
shade: "lighter",
|
|
70
|
-
class: "sv-empty-state__title mt-2"
|
|
71
|
-
}, {
|
|
72
|
-
default: withCtx(() => [
|
|
73
|
-
renderSlot(_ctx.$slots, "title")
|
|
107
|
+
createVNode(_sfc_main$2, null, {
|
|
108
|
+
title: withCtx(() => [
|
|
109
|
+
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
74
110
|
]),
|
|
75
|
-
_:
|
|
111
|
+
_: 1
|
|
76
112
|
}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
113
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
114
|
+
options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
115
|
+
key: 0,
|
|
116
|
+
modelValue: singleModelValue.value,
|
|
117
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => singleModelValue.value = $event),
|
|
118
|
+
options: getRadioGroupOptions(),
|
|
119
|
+
direction: unref(isMobileViewport) ? "column" : "row",
|
|
120
|
+
"show-radio": false
|
|
121
|
+
}, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
122
|
+
key: 1,
|
|
123
|
+
"single-model-value": singleModelValue.value,
|
|
124
|
+
"onUpdate:singleModelValue": _cache[1] || (_cache[1] = ($event) => singleModelValue.value = $event),
|
|
125
|
+
options: getSelectOptions(),
|
|
126
|
+
size: "xl",
|
|
127
|
+
"show-sub-label-in-input": ""
|
|
128
|
+
}, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
129
|
+
key: 2,
|
|
130
|
+
modelValue: singleModelValue.value,
|
|
131
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => singleModelValue.value = $event),
|
|
132
|
+
options: options.value,
|
|
133
|
+
name: `pricing-group-range-input-${__props.groupName}`
|
|
134
|
+
}, null, 8, ["modelValue", "options", "name"]))
|
|
135
|
+
])
|
|
89
136
|
])
|
|
90
137
|
]),
|
|
91
|
-
_:
|
|
138
|
+
_: 1
|
|
92
139
|
});
|
|
93
140
|
};
|
|
94
141
|
}
|
|
@@ -136,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
183
|
return (_ctx, _cache) => {
|
|
137
184
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
138
185
|
createElementVNode("div", _hoisted_2, [
|
|
139
|
-
createVNode(unref(_sfc_main$
|
|
186
|
+
createVNode(unref(_sfc_main$8), {
|
|
140
187
|
icon: "lock",
|
|
141
188
|
size: "xs"
|
|
142
189
|
}),
|
|
@@ -164,7 +211,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
211
|
}
|
|
165
212
|
});
|
|
166
213
|
export {
|
|
167
|
-
_sfc_main$
|
|
214
|
+
_sfc_main$1 as _,
|
|
168
215
|
_sfc_main as a,
|
|
169
|
-
_sfc_main$
|
|
216
|
+
_sfc_main$2 as b
|
|
170
217
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),n=require("./vendor-ui-Dfh3_g4q.js"),t=require("./pricing-CuYndX6t.js"),l=require("./useViewport-CKRY1CKR.js"),i={class:"flex gap-4 border-l-2 border-primary-600 px-2"},r={class:"grow"},a=e.defineComponent({__name:"PricingGroupTitle",setup:t=>(t,l)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",r,[e.createVNode(e.unref(n._sfc_main$1),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title")]),_:3})]),e.createElementVNode("div",null,[e.createVNode(e.unref(n._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"description")]),_:3})])]))}),o={class:"p-1"},c={class:"pt-1"},s=e.defineComponent({__name:"PricingGroupSingleEditor",props:e.mergeModels({modelValue:{type:Array},pricings:{type:Array},billingPeriod:{type:Object},currency:{type:String},groupName:{type:String}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const r=i,s=e.useModel(i,"modelValue"),{$t:u}=n.useIntl(),{renderPricingForPricingItem:p}=n.usePricingItem({currency:e.toRef(r,"currency"),billingPeriod:e.toRef(r,"billingPeriod")}),{isMobileViewport:d}=l.useViewport(),m=e.computed(()=>r.pricings.map(e=>e.id)),v=e.computed({get:()=>s.value.find(e=>m.value.includes(e))??void 0,set:e=>{const n=s.value.filter(e=>!m.value.includes(e));s.value=e?[...n,e]:n}}),g=e.computed(()=>r.pricings.map(e=>{var n;const l=null==(n=e.items)?void 0:n[0];return{label:t.getNameFromPricing(e)??"",value:e.id,description:l?p({pricingItem:l}):u({defaultMessage:"Unsupported pricing",id:"pricing_item_pricing.unsupported_pricing_error",description:"Text displayed when the pricing item pricing is unsupported"})}}));return(t,l)=>(e.openBlock(),e.createBlock(e.unref(n._sfc_main$2),{"no-spacing":""},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(a,null,{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.groupName),1)]),_:1}),e.createElementVNode("div",c,[g.value.length<=3?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$10),{key:0,modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value=e),options:g.value.slice(0,3),direction:e.unref(d)?"column":"row","show-radio":!1},null,8,["modelValue","options","direction"])):g.value.length<=6?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$18),{key:1,"single-model-value":v.value,"onUpdate:singleModelValue":l[1]||(l[1]=e=>v.value=e),options:g.value.map(({value:e,label:n,description:t})=>({label:n,subLabel:t,value:e})),size:"xl","show-sub-label-in-input":""},null,8,["single-model-value","options"])):(e.openBlock(),e.createBlock(e.unref(n._sfc_main$19),{key:2,modelValue:v.value,"onUpdate:modelValue":l[2]||(l[2]=e=>v.value=e),options:g.value,name:`pricing-group-range-input-${i.groupName}`},null,8,["modelValue","options","name"]))])])]),_:1}))}}),u={class:"flex justify-around"},p={class:"flex items-center gap-0.5"},d=["aria-label","innerHTML"],m=e.defineComponent({__name:"SecurePaymentsKPI",props:{paymentMethodOptions:{type:Array}},setup(t){const l=t,{$t:i}=n.useIntl(),r={ADYEN:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="40" height="15" fill="none" viewBox="0 0 40 15"><path fill="currentColor" d="M.049 2.917h5.845c.646 0 1.17.522 1.17 1.166v5.834H1.217c-.646 0-1.17-.522-1.17-1.167V5.833h2.924v2.334H4.14v-3.5H.049zm32.735 0v7h2.922v-5.25h1.17v5.25h2.922V4.083c0-.644-.523-1.166-1.169-1.166zm-16.367 9.916h5.845c.646 0 1.17-.522 1.17-1.166v-8.75h-2.924v5.25H19.34v-5.25h-2.922V8.75c0 .645.523 1.167 1.169 1.167h2.922v1.166h-4.091zm15.197-2.916H25.77c-.646 0-1.17-.522-1.17-1.167V2.917h5.846c.646 0 1.17.522 1.17 1.166V7h-2.923V4.667h-1.17v3.5h4.092zM15.248 0v9.917H9.402c-.646 0-1.17-.522-1.17-1.167V4.083c0-.644.524-1.166 1.17-1.166h1.754v5.25h1.169V0z"/></svg>',label:"Adyen"},STRIPE:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="15" viewBox="0 0 36 15"><path d="M35.996 7.746c0-2.559-1.238-4.578-3.61-4.578-2.378 0-3.816 2.02-3.816 4.559 0 3.011 1.7 4.53 4.137 4.53 1.191 0 2.09-.269 2.77-.648v-2c-.68.34-1.457.547-2.45.547-.968 0-1.828-.34-1.937-1.52h4.887c0-.128.02-.648.02-.89m-4.937-.95c0-1.128.691-1.597 1.32-1.597.61 0 1.258.469 1.258 1.598ZM24.707 3.168c-.977 0-1.61.46-1.957.781l-.133-.62h-2.199v11.66l2.5-.532.012-2.828c.36.258.89.629 1.77.629 1.788 0 3.417-1.442 3.417-4.61-.008-2.898-1.66-4.48-3.41-4.48m-.598 6.89c-.59 0-.941-.21-1.18-.472l-.011-3.707c.262-.29.621-.492 1.191-.492.91 0 1.54 1.02 1.54 2.332 0 1.34-.622 2.34-1.54 2.34M16.98 2.578l2.508-.539V.008L16.98.539ZM16.98 3.34h2.508v8.746H16.98ZM14.29 4.078l-.161-.738h-2.16v8.746h2.5v-5.93c.59-.77 1.59-.629 1.898-.52V3.34c-.316-.121-1.488-.34-2.078.738M9.29 1.168l-2.438.52-.012 8.011c0 1.48 1.11 2.57 2.59 2.57.82 0 1.418-.152 1.75-.332v-2.03c-.32.132-1.899.59-1.899-.887V5.469h1.899v-2.13H9.28ZM2.531 5.879c0-.39.32-.54.848-.54a5.56 5.56 0 0 1 2.48.638V3.629a6.55 6.55 0 0 0-2.48-.461C1.352 3.168 0 4.227 0 6c0 2.758 3.8 2.316 3.8 3.508 0 .46-.402.61-.96.61-.828 0-1.89-.34-2.73-.802V11.7c.93.399 1.87.57 2.73.57 2.078 0 3.512-1.03 3.512-2.82-.012-2.98-3.82-2.453-3.82-3.57m0 0" style="stroke:none;fill-rule:evenodd;fill:currentColor;fill-opacity:1"/></svg>',label:"Stripe"}},a=e.computed(()=>{const e=l.paymentMethodOptions.find(({integration:e})=>{var n;return null!=(null==(n=e.payment_gateway)?void 0:n.variant)&&e.payment_gateway.variant in r});return e?r[e.integration.payment_gateway.variant]:null}),o=e.computed(()=>a.value?i({defaultMessage:"Secure and encrypted payments by",description:"Secure encrypted payments KPI for a specific vendor, followed by a vendor logo",id:"secure_payments_kpi.specific_vendor"}):i({defaultMessage:"Secure and encrypted payments",description:"Secure encrypted payments KPI",id:"secure_payments_kpi.generic"}));return(t,l)=>(e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("div",p,[e.createVNode(e.unref(n._sfc_main$3),{icon:"lock",size:"xs"}),e.createVNode(e.unref(n._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(o.value),1),l[0]||(l[0]=e.createTextVNode(e.toDisplayString(" ")+" ",-1)),a.value?(e.openBlock(),e.createElementBlock("span",{key:0,"aria-label":a.value.label,role:"img",class:"inline-block h-[15px] align-middle",innerHTML:a.value.svg},null,8,d)):e.createCommentVNode("",!0)]),_:1})])]))}});exports._sfc_main=s,exports._sfc_main$1=m,exports._sfc_main$2=a;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode } from "vue";
|
|
2
|
+
import { u as useIntl, b as _sfc_main$1, P as PricingPlanSchedules } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "SubscriptionSchedules",
|
|
5
|
+
props: {
|
|
6
|
+
schedulesData: { type: Array },
|
|
7
|
+
configuration: { type: Object },
|
|
8
|
+
isLoading: { type: Boolean }
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const { $t } = useIntl();
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return openBlock(), createBlock(unref(_sfc_main$1), {
|
|
14
|
+
class: "sv-subscription-schedules sv-root sv-component",
|
|
15
|
+
"no-border": "",
|
|
16
|
+
"no-spacing": "",
|
|
17
|
+
"content-background": "none",
|
|
18
|
+
title: unref($t)({
|
|
19
|
+
defaultMessage: "Schedules",
|
|
20
|
+
description: "Invoices list title",
|
|
21
|
+
id: "invoices_list.title"
|
|
22
|
+
})
|
|
23
|
+
}, {
|
|
24
|
+
default: withCtx(() => [
|
|
25
|
+
createVNode(unref(PricingPlanSchedules), {
|
|
26
|
+
class: "sv-subscription-schedules__list",
|
|
27
|
+
schedules: __props.schedulesData
|
|
28
|
+
}, null, 8, ["schedules"])
|
|
29
|
+
]),
|
|
30
|
+
_: 1
|
|
31
|
+
}, 8, ["title"]);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
_sfc_main as _
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),s=require("./vendor-ui-Dfh3_g4q.js"),t=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(t){const{$t:n}=s.useIntl();return(i,c)=>(e.openBlock(),e.createBlock(e.unref(s._sfc_main$2),{class:"sv-subscription-schedules sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(n)({defaultMessage:"Schedules",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(s.PricingPlanSchedules),{class:"sv-subscription-schedules__list",schedules:t.schedulesData},null,8,["schedules"])]),_:1},8,["title"]))}});exports._sfc_main=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),n=require("./subscription-b0OPx8Du.js"),i={class:"grow"},a=e.defineComponent({__name:"SubscriptionSummary",props:{subscription:{type:Object},invoice:{type:Object},loading:{type:Boolean},enabledPricingIds:{type:Array},avatar:{type:String},noSpacing:{type:Boolean},trialPeriod:{type:Object}},setup(a){const o=a,{$t:r}=t.useIntl(),c=e.computed(()=>n.getMostRecentPricingPlan(o.subscription)),s=e.computed(()=>n.getSubscriptionName({subscription:o.subscription,fallback:r({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),l=e.computed(()=>{var e;return o.subscription.description||(null==(e=c.value)?void 0:e.description)}),u=e.computed(()=>{if(!o.subscription||!o.enabledPricingIds)return;const e=n.findPricingsByIds(o.subscription,o.enabledPricingIds);return null==e?void 0:e.map(e=>{var t,n;return e.name??(null==(n=null==(t=e.products)?void 0:t[0])?void 0:n.name)}).join(" - ")});return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-row gap-3",a.noSpacing?void 0:"px-3 py-2"])},[a.avatar?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"image-src":a.avatar,size:"lg",class:"my-1"},null,8,["image-src"])):e.createCommentVNode("",!0),e.createElementVNode("div",i,[e.createVNode(e.unref(t._sfc_main$1),{variant:"body",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1}),u.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value),1)]),_:1})):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" • ")],64)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.value),1)]),_:1})):e.createCommentVNode("",!0)])],2))}});exports._sfc_main=a;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createBlock, unref, createCommentVNode, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, Fragment } from "vue";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$1, a as _sfc_main$2 } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
import { g as getMostRecentPricingPlan, a as getSubscriptionName, f as findPricingsByIds } from "./subscription-C41lG-rH.mjs";
|
|
4
|
+
const _hoisted_1 = { class: "grow" };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "SubscriptionSummary",
|
|
7
|
+
props: {
|
|
8
|
+
subscription: { type: Object },
|
|
9
|
+
invoice: { type: Object },
|
|
10
|
+
loading: { type: Boolean },
|
|
11
|
+
enabledPricingIds: { type: Array },
|
|
12
|
+
avatar: { type: String },
|
|
13
|
+
noSpacing: { type: Boolean },
|
|
14
|
+
trialPeriod: { type: Object }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const { $t } = useIntl();
|
|
19
|
+
const mostRecentPricingPlan = computed(() => getMostRecentPricingPlan(props.subscription));
|
|
20
|
+
const name = computed(
|
|
21
|
+
() => getSubscriptionName({
|
|
22
|
+
subscription: props.subscription,
|
|
23
|
+
fallback: $t({
|
|
24
|
+
defaultMessage: "Subscription",
|
|
25
|
+
description: "The fallback name for when no subscription name can be determined",
|
|
26
|
+
id: "customer_overview.subscriptions_block.fallback_subscription_name"
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
const description = computed(
|
|
31
|
+
() => {
|
|
32
|
+
var _a;
|
|
33
|
+
return props.subscription.description || ((_a = mostRecentPricingPlan.value) == null ? void 0 : _a.description);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
const selectedPricings = computed(() => {
|
|
37
|
+
if (!props.subscription || !props.enabledPricingIds) {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
const pricings = findPricingsByIds(props.subscription, props.enabledPricingIds);
|
|
41
|
+
const names = pricings == null ? void 0 : pricings.map((pricing) => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
return pricing.name ?? ((_b = (_a = pricing.products) == null ? void 0 : _a[0]) == null ? void 0 : _b.name);
|
|
44
|
+
}).join(" - ");
|
|
45
|
+
return names;
|
|
46
|
+
});
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return openBlock(), createElementBlock("div", {
|
|
49
|
+
class: normalizeClass(["flex flex-row gap-3", __props.noSpacing ? void 0 : "px-3 py-2"])
|
|
50
|
+
}, [
|
|
51
|
+
__props.avatar ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
52
|
+
key: 0,
|
|
53
|
+
"image-src": __props.avatar,
|
|
54
|
+
size: "lg",
|
|
55
|
+
class: "my-1"
|
|
56
|
+
}, null, 8, ["image-src"])) : createCommentVNode("", true),
|
|
57
|
+
createElementVNode("div", _hoisted_1, [
|
|
58
|
+
createVNode(unref(_sfc_main$2), {
|
|
59
|
+
variant: "body",
|
|
60
|
+
weight: "semibold",
|
|
61
|
+
"no-spacing": ""
|
|
62
|
+
}, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
createTextVNode(toDisplayString(name.value), 1)
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}),
|
|
68
|
+
selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$2), {
|
|
69
|
+
key: 0,
|
|
70
|
+
variant: "body-xs",
|
|
71
|
+
shade: "lighter",
|
|
72
|
+
"no-spacing": ""
|
|
73
|
+
}, {
|
|
74
|
+
default: withCtx(() => [
|
|
75
|
+
createTextVNode(toDisplayString(selectedPricings.value), 1)
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
})) : createCommentVNode("", true),
|
|
79
|
+
description.value ? (openBlock(), createBlock(unref(_sfc_main$2), {
|
|
80
|
+
key: 1,
|
|
81
|
+
variant: "body-xs",
|
|
82
|
+
shade: "lighter",
|
|
83
|
+
"no-spacing": ""
|
|
84
|
+
}, {
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
selectedPricings.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
87
|
+
createTextVNode(" • ")
|
|
88
|
+
], 64)) : createCommentVNode("", true),
|
|
89
|
+
createTextVNode(" " + toDisplayString(description.value), 1)
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
})) : createCommentVNode("", true)
|
|
93
|
+
])
|
|
94
|
+
], 2);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
export {
|
|
99
|
+
_sfc_main as _
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useIncrementalLoading-CkY2klIW.js"),t=require("./subscriptions-BFCKVHnP.js"),i=require("vue"),s=require("./vendor-ui-Dfh3_g4q.js"),o=require("./subscription-b0OPx8Du.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),r=require("./useActionDispatchProvider-aJOy3kr1.js");const c={class:"sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row"},a={class:"sv-subscriptions-list__item-content grow"},l={class:"sv-subscriptions-list__item-meta mt-4 flex items-center gap-6"},u={key:1,class:"sv-subscriptions-list__item-next-invoice flex gap-1"},p={class:"sv-subscriptions-list__item-actions flex flex-col items-center gap-2 md:flex-row"},d=i.defineComponent({__name:"SubscriptionsListItem",props:{subscription:{type:Object},paymentMethod:{type:Object},customer:{type:Object},showViewSubscriptionDetailsButton:{type:Boolean,default:!0}},emits:["view-subscription-details"],setup(e){const t=e,{$t:n}=s.useIntl(),{formatDate:r}=s.useIntl(),d=i.computed(()=>o.getMostRecentPricingPlan(t.subscription)),m=i.computed(()=>o.getSubscriptionName({subscription:t.subscription,fallback:n({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),b=i.computed(()=>{var e;return null==(e=d.value)?void 0:e.description}),_=i.computed(()=>t.showViewSubscriptionDetailsButton);return(t,o)=>(i.openBlock(),i.createBlock(i.unref(s._sfc_main$2),{class:"sv-subscriptions-list__item"},{default:i.withCtx(()=>[i.createElementVNode("div",c,[i.createElementVNode("div",a,[i.createVNode(i.unref(s._sfc_main$1),{tag:"h3",variant:"heading-2",class:"sv-subscriptions-list__item-title"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.value),1)]),_:1}),b.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:0,variant:"body-sm",tag:"span",shade:"lighter",class:"sv-subscriptions-list__item-description"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(b.value),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",l,[e.paymentMethod?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$8),{key:0,variant:"condensed",class:"sv-payment-methods__item","payment-method":e.paymentMethod},null,8,["payment-method"])):i.createCommentVNode("",!0),e.subscription.next_invoice?(i.openBlock(),i.createElementBlock("div",u,[i.createVNode(i.unref(s._sfc_main$1),{tag:"span",variant:"body-xs",shade:"light",weight:"semibold"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)({defaultMessage:"Next billing date",description:"The label for the next billing date",id:"customer.subscriptions_block.next_billing_date"})),1)]),_:1}),i.createVNode(i.unref(s._sfc_main$1),{tag:"span",variant:"body-xs",shade:"light"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)({date:e.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:e.customer.timezone})),1)]),_:1})])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",p,[_.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$6),{key:0,color:"primary",class:"sv-action sv-action--primary sv-subscriptions-list__item-details w-full md:w-auto",type:"button",onClick:o[0]||(o[0]=i=>t.$emit("view-subscription-details",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)({defaultMessage:"Subscription details",description:"The label for the subscription details button in the subscriptions block",id:"customer.subscriptions_block.show_details_button_label"})),1)]),_:1})):i.createCommentVNode("",!0)])])]),_:1}))}}),m={key:1,class:"sv-subscriptions-list__items grid grid-cols-1 gap-4"},b=i.defineComponent({__name:"SubscriptionsList",props:{customer:{type:Object},subscriptions:{type:Array},paymentMethods:{default:()=>[],type:Array},isLoading:{type:Boolean},showViewAllButton:{type:Boolean,default:!0},showViewDetailsButton:{type:Boolean,default:!0}},emits:["view-subscription-details","view-all-subscriptions","load-more"],setup(e){const t=e,{$t:o}=s.useIntl(),n=i.computed(()=>t.subscriptions.length>0),r=e=>{if(e)return t.paymentMethods.find(({id:t})=>t===e)},c=i.computed(()=>t.showViewAllButton);return(t,a)=>(i.openBlock(),i.createBlock(i.unref(s._sfc_main$2),{class:"sv-subscriptions-list","no-spacing":"","no-border":"",title:i.unref(o)({defaultMessage:"{count, plural, one {My subscription} other {My subscriptions}}",description:"Title for the subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.title"},{count:String(e.subscriptions.length)})},i.createSlots({default:i.withCtx(()=>[n.value?(i.openBlock(),i.createElementBlock("div",m,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.subscriptions,s=>(i.openBlock(),i.createBlock(d,{key:s.id,subscription:s,"payment-method":r(s.payment_method_id),customer:e.customer,"show-view-subscription-details-button":e.showViewDetailsButton,onViewSubscriptionDetails:a[1]||(a[1]=e=>t.$emit("view-subscription-details",e))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button"]))),128))])):(i.openBlock(),i.createBlock(i.unref(s._sfc_main$2),{key:0,class:"sv-empty-state sv-subscriptions-list__empty"},{default:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main$1),{tag:"h3",variant:"heading-3"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"No subscriptions",description:"Title for the my subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.no_active_subscription_title"})),1)]),_:1}),i.createVNode(i.unref(s._sfc_main$1),{variant:"body-xs",shade:"lighter"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"There’s no active subscription to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.subscriptions_block.no_active_subscription_content"})),1)]),_:1})]),_:1}))]),_:2},[c.value?{name:"right",fn:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-subscriptions-list__view-all",type:"button",onClick:a[0]||(a[0]=e=>t.$emit("view-all-subscriptions"))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"View all",description:"The text for the view all subscriptions button",id:"customer_overview.subscriptions_block.view_all_button_label"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),_=i.defineComponent({__name:"SubscriptionsList",props:{customer:{type:null},subscriptions:{type:Array},paymentMethods:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},emits:["load-more"],setup(e){const{dispatchAction:t}=r.useActionDispatchProvider();return(s,o)=>{var r,c;return e.isLoading?(i.openBlock(),i.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-subscriptions-list sv-root sv-component sv-loading min-h-[100px]","data-testid":"subscriptions-list-skeleton"})):e.customer?(i.openBlock(),i.createBlock(b,{key:1,class:"sv-subscriptions-list sv-root sv-component",customer:e.customer,subscriptions:e.subscriptions,"payment-methods":e.paymentMethods,"is-loading":e.isLoading,"show-view-all-button":null==(r=e.configuration)?void 0:r.showViewAllButton,"show-view-details-button":null==(c=e.configuration)?void 0:c.showViewDetailsButton,onViewSubscriptionDetails:o[0]||(o[0]=e=>i.unref(t)({action:"view-subscription-details",data:{subscriptionId:e.subscriptionId}})),onViewAllSubscriptions:o[1]||(o[1]=e=>i.unref(t)({action:"view-all-subscriptions"})),onLoadMore:o[2]||(o[2]=e=>s.$emit("load-more"))},null,8,["customer","subscriptions","payment-methods","is-loading","show-view-all-button","show-view-details-button"])):i.createCommentVNode("",!0)}}});exports._sfc_main=_,exports.useSubscriptionsList=function({customerId:i,batchSize:s=15}){const o=t.createSubscriptionsService();return e.useIncrementalLoading({service:async e=>o.getActiveSubscriptions({customerId:i,pagination:{page:e,pageSize:s}})})};
|