@solvimon/solvimon-web 0.1.0-alpha.15 → 0.1.0-alpha.17
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 +5 -5
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-ugPPvTKf.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs} +2 -2
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-xuCWAVgf.js → BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BpN9nSMC.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D_PE2UbX.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs} +3 -3
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js +1 -0
- package/dist/{useWalletBalanceItems-MlHgedWR.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs} +24 -56
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BbuEBiY3.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs +147 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-dwIv_xxf.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-wxP5IaGt.mjs} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-05NKI2A0.js} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-17v07F58.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-BKMttUyk.mjs → PaymentHistoryBlock-BitwS9Re.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-BGbTy4Se.js → PaymentHistoryBlock-ZtmPXXwI.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js} +1 -1
- package/dist/{PaymentIntegrationForm-BGxjGJGz.mjs → PaymentIntegrationForm-BK2aLPCo.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-liOVNKEG.js → PaymentIntegrationForm-BZTzCUiu.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-aP-gCq7V.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs} +7 -7
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-h-JUw1DV.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs} +25 -14
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js +1 -0
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs +156 -0
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js +1 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-j5VNsyu7.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs} +5 -5
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DxndhDxR.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js} +1 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js +1 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs} +115 -68
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BKz2QQn9.js +1 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BMXr26gF.mjs +37 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Cv6lz35J.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs} +22 -119
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js +1 -0
- package/dist/component-CUJ_G2Nw.mjs +962 -0
- package/dist/component-CiKxWtdx.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 +3 -3
- 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 +8 -6
- package/dist/core/action-request.types.d.ts +3 -3
- 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-B5b2tLhw.js → customer-AfRcAZ5P.js} +1 -1
- package/dist/{customer-CANPEYH9.mjs → customer-DAgdegIW.mjs} +1 -1
- package/dist/{en-US-DAgOSlgv.mjs → en-US-DSzSbgL5.mjs} +68 -36
- package/dist/en-US-QzQnGXP1.js +1 -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-BHgajZHq.js +1 -0
- package/dist/{invoices-DBv0qkgm.mjs → invoices-BXDgW8ch.mjs} +32 -16
- package/dist/nl-NL-C4rr-1tr.js +1 -0
- package/dist/{nl-NL-DCsmrA8A.mjs → nl-NL-Li7RW89R.mjs} +72 -40
- package/dist/{paymentMethods-u5y9B5ng.js → paymentMethods-BMcc-eTl.js} +1 -1
- package/dist/{paymentMethods-D-5FNN8W.mjs → paymentMethods-xzFD2L30.mjs} +2 -2
- package/dist/{payments-BTTtcfyI.js → payments-DMvmB5vg.js} +1 -1
- package/dist/{payments-BK8yzqJ5.mjs → payments-DV6csRej.mjs} +1 -1
- package/dist/pricing-B1uImUm4.mjs +19 -0
- package/dist/pricing-BEjY_5wb.js +1 -0
- package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
- package/dist/pricingPlanSchedule-C_cqUyTk.mjs +144 -0
- package/dist/registry-CeMxLjwU.js +1 -0
- package/dist/{registry-CMo7X2FD.mjs → registry-CyENvS6l.mjs} +7 -4
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +414 -675
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +65 -19
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +10 -9
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +8 -8
- 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 +542 -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 +725 -0
- package/dist/solvimon-web.css +1 -1
- package/dist/subscription-B4dBAY9C.mjs +89 -0
- package/dist/subscription-b0OPx8Du.js +1 -0
- package/dist/{subscriptions-DHjXDyH1.mjs → subscriptions-CrNDM9qa.mjs} +6 -2
- package/dist/{subscriptions-AMC4DirD.js → subscriptions-DC-mxa17.js} +1 -1
- package/dist/{url-1Lbg5Yni.mjs → url-BjZ1Pg0l.mjs} +1 -1
- package/dist/url-D8GJi5rF.js +1 -0
- package/dist/{useActionDispatchProvider-CizNgRwv.js → useActionDispatchProvider-bqR_FeM4.js} +1 -1
- package/dist/{useActionDispatchProvider-DmhD9mYX.mjs → useActionDispatchProvider-zB_GKeUR.mjs} +1 -1
- package/dist/{useCustomer-DCPq7eHM.mjs → useCustomer-VfeQ6rG2.mjs} +2 -2
- package/dist/{useCustomer-DYc54GVD.js → useCustomer-bO4D6e4Z.js} +1 -1
- package/dist/{useIncrementalLoading-CuSndpP2.js → useIncrementalLoading-BgWuwoMo.js} +1 -1
- package/dist/{useIncrementalLoading-DmOT2MXH.mjs → useIncrementalLoading-C59FXHzp.mjs} +1 -1
- package/dist/{useInvoiceData-BajCyf-x.js → useInvoiceData-CxxkBTGY.js} +1 -1
- package/dist/{useInvoiceData-BgtUKbHY.mjs → useInvoiceData-Dhg-hx8C.mjs} +2 -2
- package/dist/useInvoicesList-BXZ9uV9i.js +1 -0
- package/dist/{useInvoicesList-DRD5yix0.mjs → useInvoicesList-DBz7T7sM.mjs} +4 -4
- package/dist/{useLoadInitialData-IlbmC6p0.mjs → useLoadInitialData-BhpIg7OF.mjs} +1 -1
- package/dist/{useLoadInitialData-BObRB7Vo.js → useLoadInitialData-BqiAFNFi.js} +1 -1
- package/dist/{usePaymentMethodOptions-CzqsebhN.js → usePaymentMethodOptions-DszFvgKX.js} +1 -1
- package/dist/{usePaymentMethodOptions-DRkWBjv6.mjs → usePaymentMethodOptions-PcMjtMSF.mjs} +2 -2
- package/dist/{usePaymentMethods-DFkRNreh.mjs → usePaymentMethods-B5AbGWsn.mjs} +2 -2
- package/dist/{usePaymentMethods-ZPxKg5Y3.js → usePaymentMethods-Bb1Xbads.js} +1 -1
- package/dist/{usePayments-E_Jsqo98.mjs → usePayments-DgoZoBZh.mjs} +3 -3
- package/dist/{usePayments-DwiGafZj.js → usePayments-is5c66Z6.js} +1 -1
- package/dist/{usePortal-CxTS2TQh.js → usePortal-C4qWsJeq.js} +1 -1
- package/dist/{usePortal-DcOz9FEL.mjs → usePortal-DWLtNqBB.mjs} +1 -1
- package/dist/{useService-DF57xuDd.mjs → useService-BZqFkz7p.mjs} +1 -1
- package/dist/{useService-CHrkefKd.js → useService-DKm3QtT4.js} +1 -1
- package/dist/useSubscription-CEZJw6wZ.mjs +23 -0
- package/dist/useSubscription-DuUNc1_l.js +1 -0
- package/dist/useTopUpModal-DNyWrHDv.mjs +1012 -0
- package/dist/useTopUpModal-DeF-cfCK.js +1 -0
- package/dist/{vendor-ui-B8IlviSs.mjs → vendor-ui-BoGKOJ36.mjs} +8642 -7077
- package/dist/vendor-ui-BuRqLx74.js +1 -0
- package/package.json +14 -7
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BxdcIX-Z.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-DfdaWRO0.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-D6hHXndB.js +0 -1
- package/dist/component-B53Df2Rt.js +0 -1
- package/dist/component-BSnccqm1.mjs +0 -933
- package/dist/en-US-C0gIE4Q1.js +0 -1
- package/dist/invoices-BCmE_nnb.js +0 -1
- package/dist/nl-NL-Br7muSHK.js +0 -1
- package/dist/registry-Cx7p19-6.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/url-B6-3PkW2.js +0 -1
- package/dist/useInvoicesList-wnvjyB_H.js +0 -1
- package/dist/useWalletBalanceItems-BQEXDCBg.js +0 -1
- package/dist/vendor-ui-C3Tq-qY_.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createVNode, mergeProps, createTextVNode } from "vue";
|
|
2
|
-
import { u as useIntl, g as getCustomerCountry, b as getCustomerName, _ as _sfc_main$2, c as _sfc_main$4 } from "./vendor-ui-
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createVNode, mergeProps, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { u as useIntl, g as getCustomerCountry, b as getCustomerName, _ as _sfc_main$2, c as _sfc_main$4 } from "./vendor-ui-BoGKOJ36.mjs";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { _ as _sfc_main$3 } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as _sfc_main$3 } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs";
|
|
5
5
|
const FALLBACK_COUNTRY_CODE = "NL";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "PaymentMethodForm",
|
|
@@ -10,10 +10,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
paymentMethodOptions: { type: Array },
|
|
11
11
|
configuration: { type: Object },
|
|
12
12
|
isLoading: { type: Boolean, default: false },
|
|
13
|
-
countryCode: { type: String }
|
|
13
|
+
countryCode: { type: String },
|
|
14
|
+
title: { type: String },
|
|
15
|
+
hideSubmitButton: { type: Boolean }
|
|
14
16
|
},
|
|
15
|
-
emits: ["
|
|
16
|
-
setup(__props, { emit: __emit }) {
|
|
17
|
+
emits: ["success", "failure"],
|
|
18
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
17
19
|
const DEFAULT_AMOUNT = {
|
|
18
20
|
currency: "EUR",
|
|
19
21
|
quantity: "0"
|
|
@@ -29,13 +31,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
31
|
isPaymentPending.value = true;
|
|
30
32
|
(_a = paymentIntegrationFormRef.value) == null ? void 0 : _a.submit();
|
|
31
33
|
}
|
|
34
|
+
const submitLabel = computed(
|
|
35
|
+
() => $t({
|
|
36
|
+
defaultMessage: "Save payment method",
|
|
37
|
+
description: "Label of the button that stores the entered payment method",
|
|
38
|
+
id: "components.payment_method_form.submit_button.label"
|
|
39
|
+
})
|
|
40
|
+
);
|
|
41
|
+
__expose({ submit: handleSubmit, isPaymentPending });
|
|
32
42
|
function handlePaymentSuccess() {
|
|
33
43
|
isPaymentPending.value = false;
|
|
34
|
-
emit("
|
|
44
|
+
emit("success");
|
|
35
45
|
}
|
|
36
46
|
function handlePaymentFailed(error) {
|
|
37
47
|
isPaymentPending.value = false;
|
|
38
|
-
emit("
|
|
48
|
+
emit("failure", error);
|
|
39
49
|
}
|
|
40
50
|
const resolveConfiguration = (configuration2) => {
|
|
41
51
|
if ((configuration2 == null ? void 0 : configuration2.variant) === "AUTHORIZE") {
|
|
@@ -103,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
113
|
"no-border": "",
|
|
104
114
|
"no-spacing": "",
|
|
105
115
|
"content-background": "none",
|
|
106
|
-
title: unref($t)({
|
|
116
|
+
title: __props.title ?? unref($t)({
|
|
107
117
|
defaultMessage: "Available payment methods",
|
|
108
118
|
description: "Title of the available payment methods form",
|
|
109
119
|
id: "components.payment_method_form.section_title"
|
|
@@ -123,17 +133,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
133
|
onPaymentFailed: handlePaymentFailed
|
|
124
134
|
}), null, 16)
|
|
125
135
|
], 2),
|
|
126
|
-
|
|
136
|
+
!__props.hideSubmitButton ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
137
|
+
key: 0,
|
|
127
138
|
color: "primary",
|
|
128
139
|
class: "mt-4 w-full",
|
|
129
140
|
loading: isPaymentPending.value,
|
|
130
141
|
onClick: handleSubmit
|
|
131
142
|
}, {
|
|
132
|
-
default: withCtx(() => [
|
|
133
|
-
createTextVNode(
|
|
134
|
-
])
|
|
143
|
+
default: withCtx(() => [
|
|
144
|
+
createTextVNode(toDisplayString(submitLabel.value), 1)
|
|
145
|
+
]),
|
|
135
146
|
_: 1
|
|
136
|
-
}, 8, ["loading"])
|
|
147
|
+
}, 8, ["loading"])) : createCommentVNode("", true)
|
|
137
148
|
]),
|
|
138
149
|
_: 1
|
|
139
150
|
}, 8, ["title"]));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js"),a=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String},title:{type:String},hideSubmitButton:{type:Boolean}},emits:["success","failure"],setup(a,{expose:r,emit:i}){const u={currency:"EUR",quantity:"0"},s=a,m=i,{$t:c}=t.useIntl(),l=e.ref(),d=e.ref(),p=e.ref(!1);function v(){var e;p.value=!0,null==(e=l.value)||e.submit()}const y=e.computed(()=>c({defaultMessage:"Save payment method",description:"Label of the button that stores the entered payment method",id:"components.payment_method_form.submit_button.label"}));function f(){p.value=!1,m("success")}function _(e){p.value=!1,m("failure",e)}r({submit:v,isPaymentPending:p});const h=e.computed(()=>{return"AUTHORIZE"===(null==(e=s.configuration)?void 0:e.variant)?e:{...e,variant:"TOKENIZE"};var e}),g=e.computed(()=>{let e="NL";if(s.countryCode)return e=s.countryCode,e;if(s.customer){const o=t.getCustomerCountry(s.customer);if(o)return e=o,e}return"NL"}),b=e.computed(()=>{const e=h.value.variant,o=t.getCustomerName(s.customer),n={amount:h.value.amount??u,paymentMethodOptions:s.paymentMethodOptions,countryCode:g.value,...s.customer.email?{email:s.customer.email}:{},...o?{name:o}:{},validateOnSubmit:h.value.validateOnSubmit,forceStorePaymentMethod:h.value.forceStorePaymentMethod,selectedOption:h.value.selectedOption,invoiceId:h.value.invoiceId};return"AUTHORIZE"===e?{...n,variant:e,context:h.value.context}:{...n,variant:"TOKENIZE",customerId:s.customer.id}});return(r,i)=>a.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"sv-payment-method-form sv-root sv-component sv-loading min-h-[180px]","data-testid":"payment-method-form-skeleton"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,class:"sv-payment-method-form sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:a.title??e.unref(c)({defaultMessage:"Available payment methods",description:"Title of the available payment methods form",id:"components.payment_method_form.section_title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none opacity-60":p.value})},[e.createVNode(n._sfc_main,e.mergeProps({ref_key:"paymentIntegrationFormRef",ref:l,class:"sv-payment-method-form__integration"},b.value,{onSelect:i[0]||(i[0]=e=>d.value=e),onPaymentSuccess:f,onPaymentFailed:_}),null,16)],2),a.hideSubmitButton?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,color:"primary",class:"mt-4 w-full",loading:p.value,onClick:v},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1},8,["loading"]))]),_:1},8,["title"]))}});exports._sfc_main=a;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { computed, defineComponent, toRef, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, unref, withCtx, toDisplayString, createVNode, createCommentVNode, createTextVNode } from "vue";
|
|
2
|
+
import { u as useIntl, o as _sfc_main$1, n as _sfc_main$2, c as _sfc_main$3, e as _sfc_main$4 } from "./vendor-ui-BoGKOJ36.mjs";
|
|
3
|
+
const humanise = (value) => value.replaceAll("_", " ").toLowerCase().replace(/^./, (character) => character.toUpperCase());
|
|
4
|
+
function getAccessibleName(paymentMethod) {
|
|
5
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6
|
+
const parts = [];
|
|
7
|
+
switch (paymentMethod.type) {
|
|
8
|
+
case "CARD":
|
|
9
|
+
parts.push(
|
|
10
|
+
paymentMethod.card.brand && humanise(paymentMethod.card.brand),
|
|
11
|
+
paymentMethod.card.last_four_digits
|
|
12
|
+
);
|
|
13
|
+
break;
|
|
14
|
+
case "ONLINE_BANKING":
|
|
15
|
+
parts.push(
|
|
16
|
+
((_a = paymentMethod.online_banking) == null ? void 0 : _a.variant) && humanise(paymentMethod.online_banking.variant),
|
|
17
|
+
(_b = paymentMethod.online_banking) == null ? void 0 : _b.owner_name
|
|
18
|
+
);
|
|
19
|
+
break;
|
|
20
|
+
case "DIRECT_DEBIT":
|
|
21
|
+
parts.push(
|
|
22
|
+
((_c = paymentMethod.direct_debit) == null ? void 0 : _c.variant) && humanise(paymentMethod.direct_debit.variant),
|
|
23
|
+
(_d = paymentMethod.direct_debit) == null ? void 0 : _d.owner_name
|
|
24
|
+
);
|
|
25
|
+
break;
|
|
26
|
+
case "BUY_NOW_PAY_LATER":
|
|
27
|
+
parts.push(
|
|
28
|
+
((_e = paymentMethod.buy_now_pay_later) == null ? void 0 : _e.variant) && humanise(paymentMethod.buy_now_pay_later.variant)
|
|
29
|
+
);
|
|
30
|
+
break;
|
|
31
|
+
case "DIGITAL_WALLET":
|
|
32
|
+
parts.push(
|
|
33
|
+
((_f = paymentMethod.digital_wallet) == null ? void 0 : _f.variant) && humanise(paymentMethod.digital_wallet.variant)
|
|
34
|
+
);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
const name = parts.filter(Boolean).join(" ");
|
|
38
|
+
return name || humanise(paymentMethod.type);
|
|
39
|
+
}
|
|
40
|
+
function usePaymentMethodSelectorOptions(paymentMethods) {
|
|
41
|
+
const options = computed(
|
|
42
|
+
() => paymentMethods.value.map((paymentMethod) => ({
|
|
43
|
+
value: paymentMethod.id,
|
|
44
|
+
label: getAccessibleName(paymentMethod)
|
|
45
|
+
}))
|
|
46
|
+
);
|
|
47
|
+
const paymentMethodsById = computed(
|
|
48
|
+
() => Object.fromEntries(
|
|
49
|
+
paymentMethods.value.map((paymentMethod) => [paymentMethod.id, paymentMethod])
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
return { options, paymentMethodsById };
|
|
53
|
+
}
|
|
54
|
+
const _hoisted_1 = { class: "sr-only" };
|
|
55
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
56
|
+
__name: "PaymentMethodSelector",
|
|
57
|
+
props: {
|
|
58
|
+
paymentMethods: { type: Array },
|
|
59
|
+
modelValue: { type: String },
|
|
60
|
+
label: { type: String },
|
|
61
|
+
required: { type: Boolean },
|
|
62
|
+
disabled: { type: Boolean },
|
|
63
|
+
error: { type: [String, Object, Array] },
|
|
64
|
+
rootClass: { type: String },
|
|
65
|
+
showAddOption: { type: Boolean, default: true },
|
|
66
|
+
paymentMethodOptions: { type: Array }
|
|
67
|
+
},
|
|
68
|
+
emits: ["update:modelValue", "add-payment-method"],
|
|
69
|
+
setup(__props, { emit: __emit }) {
|
|
70
|
+
const props = __props;
|
|
71
|
+
const emit = __emit;
|
|
72
|
+
const { $t } = useIntl();
|
|
73
|
+
const { options, paymentMethodsById } = usePaymentMethodSelectorOptions(
|
|
74
|
+
toRef(props, "paymentMethods")
|
|
75
|
+
);
|
|
76
|
+
const selectedValue = computed({
|
|
77
|
+
get: () => props.modelValue,
|
|
78
|
+
set: (value) => emit("update:modelValue", typeof value === "string" ? value : void 0)
|
|
79
|
+
});
|
|
80
|
+
const hasPaymentMethods = computed(() => props.paymentMethods.length > 0);
|
|
81
|
+
const canAddPaymentMethod = computed(() => {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = props.paymentMethodOptions) == null ? void 0 : _a.length) !== 0;
|
|
84
|
+
});
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return openBlock(), createElementBlock("div", {
|
|
87
|
+
class: normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2", __props.rootClass])
|
|
88
|
+
}, [
|
|
89
|
+
createElementVNode("div", null, [
|
|
90
|
+
hasPaymentMethods.value ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
91
|
+
key: 0,
|
|
92
|
+
modelValue: selectedValue.value,
|
|
93
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedValue.value = $event),
|
|
94
|
+
class: "sv-payment-method-selector__options",
|
|
95
|
+
name: "payment-method",
|
|
96
|
+
direction: "column",
|
|
97
|
+
options: unref(options),
|
|
98
|
+
label: __props.label,
|
|
99
|
+
required: __props.required,
|
|
100
|
+
disabled: __props.disabled,
|
|
101
|
+
error: __props.error,
|
|
102
|
+
"show-radio": false
|
|
103
|
+
}, {
|
|
104
|
+
prefix: withCtx(({ optionValue }) => [
|
|
105
|
+
createVNode(unref(_sfc_main$2), {
|
|
106
|
+
class: "sv-payment-method-selector__option-content grow",
|
|
107
|
+
"payment-method": unref(paymentMethodsById)[String(optionValue)]
|
|
108
|
+
}, null, 8, ["payment-method"])
|
|
109
|
+
]),
|
|
110
|
+
label: withCtx(({ option }) => [
|
|
111
|
+
createElementVNode("span", _hoisted_1, toDisplayString(option.label), 1)
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["modelValue", "options", "label", "required", "disabled", "error"])) : createCommentVNode("", true)
|
|
115
|
+
]),
|
|
116
|
+
__props.showAddOption && canAddPaymentMethod.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",
|
|
119
|
+
variant: "outline",
|
|
120
|
+
color: "gray",
|
|
121
|
+
"icon-prefix": "add",
|
|
122
|
+
type: "button",
|
|
123
|
+
disabled: __props.disabled,
|
|
124
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("add-payment-method"))
|
|
125
|
+
}, {
|
|
126
|
+
default: withCtx(() => [
|
|
127
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
128
|
+
defaultMessage: "Add payment method",
|
|
129
|
+
description: "Label of the button that adds a new payment method",
|
|
130
|
+
id: "payment_method_selector.add_payment_method"
|
|
131
|
+
})), 1)
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["disabled"])) : __props.showAddOption ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
135
|
+
key: 1,
|
|
136
|
+
variant: "body-sm",
|
|
137
|
+
shade: "lighter",
|
|
138
|
+
tag: "p",
|
|
139
|
+
class: "sv-payment-method-selector__unavailable"
|
|
140
|
+
}, {
|
|
141
|
+
default: withCtx(() => [
|
|
142
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
143
|
+
defaultMessage: "There are no available payment methods. Please contact support for more information.",
|
|
144
|
+
description: "Shown in place of the add button when the customer cannot add any payment method",
|
|
145
|
+
id: "payment_method_selector.no_payment_methods_available"
|
|
146
|
+
})), 1)
|
|
147
|
+
]),
|
|
148
|
+
_: 1
|
|
149
|
+
})) : createCommentVNode("", true)
|
|
150
|
+
], 2);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
export {
|
|
155
|
+
_sfc_main as _
|
|
156
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),a=e=>e.replaceAll("_"," ").toLowerCase().replace(/^./,e=>e.toUpperCase());function o(e){var t,o,n,l,d,r;const i=[];switch(e.type){case"CARD":i.push(e.card.brand&&a(e.card.brand),e.card.last_four_digits);break;case"ONLINE_BANKING":i.push((null==(t=e.online_banking)?void 0:t.variant)&&a(e.online_banking.variant),null==(o=e.online_banking)?void 0:o.owner_name);break;case"DIRECT_DEBIT":i.push((null==(n=e.direct_debit)?void 0:n.variant)&&a(e.direct_debit.variant),null==(l=e.direct_debit)?void 0:l.owner_name);break;case"BUY_NOW_PAY_LATER":i.push((null==(d=e.buy_now_pay_later)?void 0:d.variant)&&a(e.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":i.push((null==(r=e.digital_wallet)?void 0:r.variant)&&a(e.digital_wallet.variant))}return i.filter(Boolean).join(" ")||a(e.type)}const n={class:"sr-only"},l=e.defineComponent({__name:"PaymentMethodSelector",props:{paymentMethods:{type:Array},modelValue:{type:String},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]},rootClass:{type:String},showAddOption:{type:Boolean,default:!0},paymentMethodOptions:{type:Array}},emits:["update:modelValue","add-payment-method"],setup(a,{emit:l}){const d=a,r=l,{$t:i}=t.useIntl(),{options:s,paymentMethodsById:p}=(m=e.toRef(d,"paymentMethods"),{options:e.computed(()=>m.value.map(e=>({value:e.id,label:o(e)}))),paymentMethodsById:e.computed(()=>Object.fromEntries(m.value.map(e=>[e.id,e])))});var m;const c=e.computed({get:()=>d.modelValue,set:e=>r("update:modelValue","string"==typeof e?e:void 0)}),u=e.computed(()=>d.paymentMethods.length>0),y=e.computed(()=>{var e;return 0!==(null==(e=d.paymentMethodOptions)?void 0:e.length)});return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2",a.rootClass])},[e.createElementVNode("div",null,[u.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$7),{key:0,modelValue:c.value,"onUpdate:modelValue":l[0]||(l[0]=e=>c.value=e),class:"sv-payment-method-selector__options",name:"payment-method",direction:"column",options:e.unref(s),label:a.label,required:a.required,disabled:a.disabled,error:a.error,"show-radio":!1},{prefix:e.withCtx(({optionValue:a})=>[e.createVNode(e.unref(t._sfc_main$6),{class:"sv-payment-method-selector__option-content grow","payment-method":e.unref(p)[String(a)]},null,8,["payment-method"])]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",n,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label","required","disabled","error"])):e.createCommentVNode("",!0)]),a.showAddOption&&y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",disabled:a.disabled,onClick:l[1]||(l[1]=e=>r("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add payment method",description:"Label of the button that adds a new payment method",id:"payment_method_selector.add_payment_method"})),1)]),_:1},8,["disabled"])):a.showAddOption?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:1,variant:"body-sm",shade:"lighter",tag:"p",class:"sv-payment-method-selector__unavailable"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"There are no available payment methods. Please contact support for more information.",description:"Shown in place of the add button when the customer cannot add any payment method",id:"payment_method_selector.no_payment_methods_available"})),1)]),_:1})):e.createCommentVNode("",!0)],2))}});exports._sfc_main=l;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, unref, withCtx, createVNode, createCommentVNode, createSlots, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { u as useIntl, _ as _sfc_main$1,
|
|
3
|
-
import { u as useService } from "./useService-
|
|
4
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$1, n as _sfc_main$2, M as Modal, e as _sfc_main$3 } from "./vendor-ui-BoGKOJ36.mjs";
|
|
3
|
+
import { u as useService } from "./useService-BZqFkz7p.mjs";
|
|
4
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-xzFD2L30.mjs";
|
|
5
5
|
function usePaymentMethodContextMenuOptions({
|
|
6
6
|
onSetDefault,
|
|
7
7
|
onDeleteRequest
|
|
@@ -87,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
87
|
}, 1024);
|
|
88
88
|
}), 128))
|
|
89
89
|
])) : createCommentVNode("", true),
|
|
90
|
-
createVNode(unref(
|
|
90
|
+
createVNode(unref(Modal), {
|
|
91
91
|
"show-modal": !!pendingDeletePaymentMethod.value,
|
|
92
92
|
title: unref($t)({
|
|
93
93
|
id: "payment_methods_list.delete_modal.title",
|
|
@@ -110,7 +110,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
110
110
|
pendingDeletePaymentMethod.value ? {
|
|
111
111
|
name: "body",
|
|
112
112
|
fn: withCtx(() => [
|
|
113
|
-
createVNode(unref(_sfc_main$
|
|
113
|
+
createVNode(unref(_sfc_main$3), null, {
|
|
114
114
|
default: withCtx(() => [
|
|
115
115
|
createTextVNode(toDisplayString(unref($t)({
|
|
116
116
|
id: "payment_methods_list.delete_modal.body",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./vendor-ui-
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-BuRqLx74.js"),n=require("./useService-DKm3QtT4.js"),o=require("./paymentMethods-BMcc-eTl.js");const a={key:0,class:"sv-payment-methods__list grid grid-cols-1 gap-4"},l=e.defineComponent({__name:"PaymentMethodsList",props:{paymentMethods:{type:Array}},emits:["delete","set-default"],setup(l,{emit:d}){const s=d,{$t:m}=t.useIntl(),i=e.ref(null),{execute:u}=function(){const{setDefaultPaymentMethod:e}=o.createPaymentMethodsService(),{data:t,execute:a,error:l,isPending:d}=n.useService({service:t=>e({paymentMethodId:t})});return{data:t,execute:a,error:l,isPending:d}}(),{getContextMenuItems:r}=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=>{i.value=e},onSetDefault:async e=>{await u(e.id),s("set-default",e)}});function c(){i.value&&s("delete",i.value),i.value=null}return(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.paymentMethods.length>0?(e.openBlock(),e.createElementBlock("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.paymentMethods,n=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:n.id,class:"sv-payment-methods__item"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$6),{class:"sv-payment-methods__item-content","payment-method":n,options:e.unref(r)(n)},null,8,["payment-method","options"])]),_:2},1024))),128))])):e.createCommentVNode("",!0),e.createVNode(e.unref(t.Modal),{"show-modal":!!i.value,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:c,onClose:o[0]||(o[0]=e=>i.value=null)},e.createSlots({_:2},[i.value?{name:"body",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),null,{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),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$6),{"payment-method":i.value},null,8,["payment-method"])]),_:1})]),key:"0"}:void 0]),1032,["show-modal","title","confirm-button-text","cancel-button-text"])],64))}});exports._sfc_main=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),n=require("./vendor-ui-BuRqLx74.js"),t=require("./pricing-BEjY_5wb.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$3),{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$3),{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),{"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$7),{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$9),{icon:"lock",size:"xs"}),e.createVNode(e.unref(n._sfc_main$3),{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;
|
|
@@ -1,94 +1,141 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx,
|
|
2
|
-
import { e as _sfc_main$3, _ as _sfc_main$4,
|
|
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 { e as _sfc_main$3, u as useIntl, G as usePricingItem, _ as _sfc_main$4, o as _sfc_main$5, H as _sfc_main$6, I as _sfc_main$7, q as _sfc_main$8 } from "./vendor-ui-BoGKOJ36.mjs";
|
|
3
|
+
import { g as getNameFromPricing } from "./pricing-B1uImUm4.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"),s=require("./vendor-ui-BuRqLx74.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),{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,37 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode } from "vue";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$1, P as PricingPlanSchedules } from "./vendor-ui-BoGKOJ36.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
|
+
};
|