@solvimon/solvimon-web 0.1.0-alpha.15 → 0.1.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-xuCWAVgf.js → BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-ugPPvTKf.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D_PE2UbX.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BpN9nSMC.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js} +1 -1
- package/dist/{PaymentIntegrationForm-BGxjGJGz.mjs → PaymentIntegrationForm-CypW6fZY.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-liOVNKEG.js → PaymentIntegrationForm-D4QupHWl.js} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +1 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-aP-gCq7V.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs} +5 -5
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-h-JUw1DV.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DfdaWRO0.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-j5VNsyu7.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DxndhDxR.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-D6hHXndB.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Cv6lz35J.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs} +2 -2
- package/dist/{component-BSnccqm1.mjs → component-Bg2JVC_O.mjs} +1 -1
- package/dist/{component-B53Df2Rt.js → component-Bs8oszfD.js} +1 -1
- 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 +2 -2
- 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 +3 -3
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +2 -2
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.es.js +3 -3
- 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 +2 -2
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +3 -3
- 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 +3 -3
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/{customer-CANPEYH9.mjs → customer-Bv_fqXzO.mjs} +1 -1
- package/dist/{customer-B5b2tLhw.js → customer-_W8gIX5m.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{invoices-DBv0qkgm.mjs → invoices-BGb0AwVF.mjs} +1 -1
- package/dist/{invoices-BCmE_nnb.js → invoices-D-OKipCg.js} +1 -1
- package/dist/{paymentMethods-u5y9B5ng.js → paymentMethods-DIbB759g.js} +1 -1
- package/dist/{paymentMethods-D-5FNN8W.mjs → paymentMethods-DvqlWe96.mjs} +1 -1
- package/dist/{payments-BK8yzqJ5.mjs → payments-CpzTVrQM.mjs} +1 -1
- package/dist/{payments-BTTtcfyI.js → payments-DMDDI3MK.js} +1 -1
- package/dist/{registry-CMo7X2FD.mjs → registry-B-If1W_u.mjs} +1 -1
- package/dist/{registry-Cx7p19-6.js → registry-uG2isab0.js} +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +8 -8
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +6 -6
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +7 -7
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +8 -8
- package/dist/{subscriptions-DHjXDyH1.mjs → subscriptions-BPYyv09M.mjs} +1 -1
- package/dist/{subscriptions-AMC4DirD.js → subscriptions-CC61I6Nj.js} +1 -1
- package/dist/{useActionDispatchProvider-CizNgRwv.js → useActionDispatchProvider-BHTknMoH.js} +1 -1
- package/dist/{useActionDispatchProvider-DmhD9mYX.mjs → useActionDispatchProvider-Dz8-e4gZ.mjs} +1 -1
- package/dist/{useCustomer-DCPq7eHM.mjs → useCustomer-VVJi8z2w.mjs} +1 -1
- package/dist/{useCustomer-DYc54GVD.js → useCustomer-Z24KchWC.js} +1 -1
- package/dist/{useInvoiceData-BajCyf-x.js → useInvoiceData-Bl87gzIS.js} +1 -1
- package/dist/{useInvoiceData-BgtUKbHY.mjs → useInvoiceData-Di5pLPM0.mjs} +2 -2
- package/dist/{useInvoicesList-wnvjyB_H.js → useInvoicesList-CFk-_oVK.js} +1 -1
- package/dist/{useInvoicesList-DRD5yix0.mjs → useInvoicesList-z19cteaD.mjs} +2 -2
- package/dist/{useLoadInitialData-BObRB7Vo.js → useLoadInitialData-CTqfiMTN.js} +1 -1
- package/dist/{useLoadInitialData-IlbmC6p0.mjs → useLoadInitialData-CkpryfjF.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-DRkWBjv6.mjs → usePaymentMethodOptions-BoGHJjng.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-CzqsebhN.js → usePaymentMethodOptions-BsCZnCQW.js} +1 -1
- package/dist/{usePaymentMethods-ZPxKg5Y3.js → usePaymentMethods-AC-4rrR9.js} +1 -1
- package/dist/{usePaymentMethods-DFkRNreh.mjs → usePaymentMethods-ocHmNoP7.mjs} +1 -1
- package/dist/{usePayments-DwiGafZj.js → usePayments-CgXZeWrU.js} +1 -1
- package/dist/{usePayments-E_Jsqo98.mjs → usePayments-D85eB5l4.mjs} +2 -2
- package/dist/{usePortal-DcOz9FEL.mjs → usePortal-B1O1zgdV.mjs} +1 -1
- package/dist/{usePortal-CxTS2TQh.js → usePortal-DVD7PcWI.js} +1 -1
- package/dist/{useWalletBalanceItems-BQEXDCBg.js → useWalletBalanceItems-BL-R5foK.js} +1 -1
- package/dist/{useWalletBalanceItems-MlHgedWR.mjs → useWalletBalanceItems-COQDLfoZ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BxdcIX-Z.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),i=require("./vendor-ui-C3Tq-qY_.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-
|
|
1
|
+
const e=require("vue"),i=require("./vendor-ui-C3Tq-qY_.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-BHTknMoH.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { u as useIntl, j as _sfc_main$2, c as _sfc_main$3 } from "./vendor-ui-B8IlviSs.mjs";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "BillingInformation",
|
|
7
7
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { u as useIntl, _ as _sfc_main$2, e as _sfc_main$4, c as _sfc_main$5 } from "./vendor-ui-B8IlviSs.mjs";
|
|
3
|
-
import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs";
|
|
4
4
|
import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
5
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
5
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
|
|
6
6
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "CustomerPaymentMethodsBlock",
|
|
8
8
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),a=require("./useActionDispatchProvider-BHTknMoH.js"),s=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(n){const a=n,{$t:s}=t.useIntl(),i=e.computed(()=>a.paymentMethods.length>0);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(s)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(n.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"payment-methods":n.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),n.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:d[1]||(d[1]=e=>a.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[n.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>a.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),i=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=a.useActionDispatchProvider();return(a,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(s,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(d=t.configuration)?void 0:d.showViewAllButton,"show-add-button":null==(m=t.configuration)?void 0:m.showAddButton,onViewAllPaymentMethods:i[0]||(i[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js");exports.default=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),n=require("./url-B6-3PkW2.js"),a=require("./payments-DMDDI3MK.js"),o=require("./paymentMethods-DIbB759g.js"),r=require("./component-Bs8oszfD.js"),i=e=>{var t;return"ADYEN"===(null==(t=e.integration.payment_gateway)?void 0:t.variant)},s=e=>{var t;return"STRIPE"===(null==(t=e.integration.payment_gateway)?void 0:t.variant)},c=({selectedIntegration:e,paymentMethodOption:t})=>{var n,a;return e===(null==(a=null==(n=t.integration)?void 0:n.payment_gateway)?void 0:a.variant)},d="https://js.stripe.com/dahlia/stripe.js",m=`<!DOCTYPE html>\n<html>\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<style>\n* { box-sizing: border-box; margin: 0; padding: 0; }\nbody { overflow: hidden; }\n</style>\n</head>\n<body>\n<div id="stripe-root"></div>\n<script src="${d}"><\/script>\n<script>\n(function () {\n let stripe, elements, countryCode, email, name, parentOrigin;\n\n window.addEventListener('message', function (event) {\n if (!event.data || typeof event.data !== 'object') return;\n if (event.source !== window.parent) return;\n\n if (event.data.type === 'stripe:init') {\n parentOrigin = event.origin;\n countryCode = event.data.countryCode;\n email = event.data.email;\n name = event.data.name;\n stripe = Stripe(event.data.publicKey);\n elements = stripe.elements(event.data.options);\n const paymentElement = elements.create('payment', { layout: { type: 'accordion', defaultCollapsed: false }, wallets: event.data.options.wallets, fields: event.data.options.fields });\n\n paymentElement.on('ready', function () {\n parent.postMessage({ type: 'stripe:ready' }, parentOrigin);\n });\n\n paymentElement.on('change', function (e) {\n parent.postMessage({ type: 'stripe:change', paymentMethodType: e.value.type }, parentOrigin);\n });\n\n paymentElement.on('loaderror', function (e) {\n parent.postMessage({\n type: 'stripe:loaderror',\n error: { message: e.error.message, type: e.error.type }\n }, parentOrigin);\n });\n\n paymentElement.mount('#stripe-root');\n\n new ResizeObserver(function () {\n parent.postMessage({\n type: 'stripe:resize',\n height: document.documentElement.scrollHeight\n }, parentOrigin);\n }).observe(document.documentElement);\n }\n\n if (event.data.type === 'stripe:submit') {\n if (!elements || !parentOrigin || event.origin !== parentOrigin) return;\n const submitEmail = 'email' in event.data ? event.data.email : email;\n const submitName = 'name' in event.data ? event.data.name : name;\n elements.submit().then(function (submitResult) {\n if (submitResult.error) {\n parent.postMessage({\n type: 'stripe:submit:error',\n error: {\n message: submitResult.error.message,\n type: submitResult.error.type,\n code: submitResult.error.code\n }\n }, parentOrigin);\n return;\n }\n const billingDetails = {};\n if (countryCode) billingDetails.address = { country: countryCode };\n if (submitEmail) billingDetails.email = submitEmail;\n if (submitName) billingDetails.name = submitName;\n const tokenParams = Object.keys(billingDetails).length\n ? { payment_method_data: { billing_details: billingDetails } }\n : {};\n stripe.createConfirmationToken({ elements: elements, params: tokenParams }).then(function (tokenResult) {\n if (tokenResult.error) {\n parent.postMessage({\n type: 'stripe:submit:error',\n error: {\n message: tokenResult.error.message,\n type: tokenResult.error.type,\n code: tokenResult.error.code\n }\n }, parentOrigin);\n return;\n }\n parent.postMessage({\n type: 'stripe:submit:success',\n confirmationTokenId: tokenResult.confirmationToken.id\n }, parentOrigin);\n });\n });\n }\n });\n})();\n<\/script>\n</body>\n</html>`,u=["src","height"],p=e.defineComponent({__name:"PaymentIntegrationFormStripeFrame",props:{publicKey:{type:String},options:{type:Object},countryCode:{type:String},email:{type:String},name:{type:String}},emits:["ready","change","loaderror","submit-success","submit-error"],setup(n,{expose:a,emit:o}){const r=n,i=o;a({triggerSubmit:function(){var e,t;null==(t=null==(e=s.value)?void 0:e.contentWindow)||t.postMessage({type:"stripe:submit",email:r.email,name:r.name},"*")}});const s=e.ref(),c=e.ref(0),d=e.ref();function p(){var e,t;null==(t=null==(e=s.value)?void 0:e.contentWindow)||t.postMessage({type:"stripe:init",publicKey:r.publicKey,options:r.options,countryCode:r.countryCode,email:r.email,name:r.name},"*")}function l(e){return"object"==typeof e&&null!==e}function y(e){if(!s.value||e.source!==s.value.contentWindow)return;if(!l(e.data))return;const t=e.data,n=t.type;if("string"==typeof n&&n.startsWith("stripe:"))switch(n){case"stripe:ready":i("ready");break;case"stripe:change":i("change","string"==typeof t.paymentMethodType?t.paymentMethodType:"card");break;case"stripe:loaderror":{const e=l(t.error)?t.error:{};i("loaderror",{message:"string"==typeof e.message?e.message:void 0,type:"string"==typeof e.type?e.type:void 0});break}case"stripe:resize":"number"==typeof t.height&&(c.value=t.height);break;case"stripe:submit:success":"string"==typeof t.confirmationTokenId&&i("submit-success",t.confirmationTokenId);break;case"stripe:submit:error":{const e=l(t.error)?t.error:{};i("submit-error",{message:"string"==typeof e.message?e.message:void 0,type:"string"==typeof e.type?e.type:void 0,code:"string"==typeof e.code?e.code:void 0});break}}}return e.onMounted(()=>{const e=new Blob([m],{type:"text/html"});d.value=URL.createObjectURL(e),window.addEventListener("message",y)}),e.onBeforeUnmount(()=>{window.removeEventListener("message",y),d.value&&URL.revokeObjectURL(d.value)}),e.watch(()=>r.options,(e,n)=>{t.isEqual(e,n)||p()},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock("iframe",{ref_key:"iframeRef",ref:s,src:d.value,height:c.value||void 0,frameborder:"0",style:{width:"100%",display:"block",border:"none"},title:"Payment form",onLoad:p},null,40,u))}}),l={link:"never"},y={variables:{borderRadius:"4px",colorBackground:"rgba(243, 244, 246, 0.5)"},rules:{".TermsText":{fontSize:"14px"},".Input":{backgroundColor:"rgba(243, 244, 246, 0.5)",fontSize:"14px",borderColor:"rgb(229, 231, 235)"}}};const h=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String}},setup(a){const o=a,{$t:r}=t.useIntl(),i=e.computed(()=>"AUTHORIZE"===o.variant?r({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):r({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(o,s)=>(e.openBlock(),e.createBlock(n._sfc_main,{status:"success",title:i.value},{default:e.withCtx(()=>[a.amount?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$14),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(a.amount)),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})]),_:1},8,["title"]))}}),f={UNKNOWN_ERROR:{title:"Something went wrong",message:"An unknown error has occurred",isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:"Payment failed",message:"The payment failed"},PAYMENT_DETAILS_CALL_FAILED:{title:"Payment details call failed",message:"There was a problem getting the payment details"},PAYMENT_METHOD_STORAGE_FAILED:{title:"Failed storing payment method",message:"Something went wrong with storing the payment method"},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:"Missing payment acceptor",message:"A redirect result is set, but a payment acceptor is missing in the url"},TOKENIZE_FAILED:{title:"Tokenization failed",message:"The tokenization of the payment method has failed"},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:"Failed loading payment methods",message:"Failed loading payment integration",isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:"Resource revoked",message:"The resource has been revoked",isReloadButtonVisible:!0}},_={class:"flex flex-col items-center gap-6"},g=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(a){const o=a,{$t:r}=t.useIntl(),i=e.computed(()=>f[o.error.code]),s=()=>{window.location.reload()};return(a,o)=>(e.openBlock(),e.createBlock(n._sfc_main,{status:"error",title:i.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(t._sfc_main$3),{variant:"body-xs",shade:"lighter",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.message),1)]),_:1}),i.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,type:"button",color:"gray",variant:"outline",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}}),v="STRIPE",E=e.defineComponent({__name:"PaymentIntegrationFormStripe",props:{countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},email:{type:String},name:{type:String},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(t,{expose:i,emit:s}){const c=t,m=s;i({submit:function(){(async function(){var e;if(!(await c.validateOnSubmit()))return;null==(e=_.value)||e.triggerSubmit()})().catch(e=>{R.error("STRIPE_SUBMIT_FAILED","Unexpected error during Stripe submission",{},e)})}});const u=e.ref(!1),f=e.ref(),_=e.ref(),E=e.computed(()=>function({amount:e,email:t,name:a,variant:o}){const r=e.currency.toLowerCase(),i=function(e,t){return{billingDetails:{address:{country:"never"},...e?{email:"never"}:{},...t?{name:"never"}:{}}}}(t,a);return"TOKENIZE"===o?{mode:"setup",currency:r,setup_future_usage:"off_session",wallets:l,fields:i,appearance:y}:{mode:"payment",currency:r,amount:n.toMinorUnitAmount(e).value,setup_future_usage:"off_session",wallets:l,fields:i,appearance:y}}({amount:c.amount,email:c.email,name:c.name,variant:c.variant})),b=e.ref(null),R=r.useLogger(),{authorizePayment:I}=a.createPaymentsService(),{tokenizePaymentMethod:k}=o.createPaymentMethodsService(),O=e.computed(()=>{var e,t;return null==(t=null==(e=c.paymentMethodOptionResponseEntry.integration.payment_gateway)?void 0:e.stripe)?void 0:t.public_key});async function T(){if(b.value)return b.value;const e=O.value;if(!e)throw new Error("Missing Stripe public key");const t=await function(e){return new Promise((t,n)=>{if(window.Stripe)return void t(window.Stripe(e));const a=document.createElement("script");a.src=d,a.onload=()=>{window.Stripe?t(window.Stripe(e)):n(new Error("Stripe not available after script load"))},a.onerror=()=>n(new Error("Failed to load Stripe.js")),document.head.appendChild(a)})}(e);return b.value=t,t}async function A(e){const t=c.paymentMethodOptionResponseEntry.payment_acceptor.id,a=n.createReturnUrl({paymentAcceptorId:t,redirectUrl:window.location.href});if("AUTHORIZE"!==c.variant){if("TOKENIZE"===c.variant){if(!c.customerId)return void R.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${t}`);try{const n=await k({customer_id:c.customerId,payment_acceptor_id:t,payment_gateway_variant:v,stripe:{confirmation_token_id:e},return_url:a});await N(n)}catch(o){R.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${t}`,{error:o}),S({code:"UNKNOWN_ERROR",message:"Tokenization failed",error:o})}}}else try{const n=await I({payment_acceptor_id:t,...c.customerId?{customer_id:c.customerId}:{},payment_gateway_variant:v,stripe:{confirmation_token_id:e},amount:c.amount,...c.context&&"CHARGE_ON_DEMAND"!==c.context.type?{context:c.context}:{},return_url:a});await N(n)}catch(o){R.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${t}`,{error:o}),S({code:"UNKNOWN_ERROR",message:"Payment authorization failed",error:o})}}async function N(e){var t;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===v){const a=e.action.client_secret||(null==(t=e.action.data)?void 0:t.client_secret);if(!a)return R.error("STRIPE_ACTION_FAILED","Missing client_secret in Stripe ACTION_REQUIRED response"),void S({code:"UNKNOWN_ERROR",message:"Payment action failed",error:e});let o;try{o=await T()}catch(n){return R.error("STRIPE_ACTION_FAILED","Failed to load Stripe.js",{error:n}),void S({code:"UNKNOWN_ERROR",message:"Payment action failed",error:n})}const{error:r}=await o.handleNextAction({clientSecret:a});return r?(R.error("STRIPE_ACTION_FAILED","Stripe handleNextAction failed",{error:r}),void S({code:"UNKNOWN_ERROR",message:"Payment action failed",error:r})):(u.value=!0,void m("payment-success"))}if("SUCCESS"===e.status)return u.value=!0,void m("payment-success");R.error("STRIPE_ACTION_FAILED","Unexpected payment result status",{error:e}),S({code:"UNKNOWN_ERROR",message:"Payment failed",error:e})}function P(){m("select",{paymentMethodType:"card",paymentGatewayVariant:v}),m("ready")}function w(e){S({code:"UNKNOWN_ERROR",message:e.message??"Failed to load payment form",error:e})}function S(e){f.value=e,m("payment-failed",e)}return e.onMounted(()=>{(async function(){const e=c.paymentMethodOptionResponseEntry.payment_acceptor.id;if(n.getQueryParam(n.PAYMENT_ACCEPTOR_ID_QUERY_STRING)!==e)return;const t=n.getQueryParam("redirect_status"),a=n.getQueryParam("payment_intent_client_secret"),o=n.getQueryParam("setup_intent_client_secret");if(t&&(a||o)){if("succeeded"===t)return u.value=!0,void m("payment-success");R.error("STRIPE_REDIRECT_RETURN_FAILED","Stripe redirect returned non-succeeded status",{redirectStatus:t}),S({code:"UNKNOWN_ERROR",message:"Payment failed",error:new globalThis.Error(`Stripe redirect returned status: ${t}`)})}})().catch(e=>{R.error("STRIPE_REDIRECT_RETURN_FAILED","handleRedirectReturn threw unexpectedly",{error:e})})}),e.onBeforeUnmount(()=>{b.value=null}),(n,a)=>u.value?(e.openBlock(),e.createBlock(h,{key:0,variant:t.variant},null,8,["variant"])):f.value?(e.openBlock(),e.createBlock(g,{key:1,error:f.value},null,8,["error"])):O.value?(e.openBlock(),e.createBlock(p,{key:2,ref_key:"frameRef",ref:_,"public-key":O.value,options:E.value,"country-code":t.countryCode,email:t.email,name:t.name,onReady:P,onChange:a[0]||(a[0]=e=>m("select",{paymentMethodType:e,paymentGatewayVariant:v})),onLoaderror:w,onSubmitSuccess:A,onSubmitError:a[1]||(a[1]=t=>e.unref(R).error("STRIPE_CONFIRMATION_TOKEN_FAILED","Stripe submission failed",{error:t}))},null,8,["public-key","options","country-code","email","name"])):e.createCommentVNode("",!0)}}),b=e=>{let t={};return"TOKENIZE"===e&&(t={"en-US":{payButton:"Add payment method",confirmPurchase:"Add payment method"},"fr-FR":{payButton:"Ajouter un moyen de paiement",confirmPurchase:"Ajouter un moyen de paiement"},"de-DE":{payButton:"Zahlungsmethode hinzufügen",confirmPurchase:"Zahlungsmethode hinzufügen"},"it-IT":{payButton:"Aggiungi metodo di pagamento",confirmPurchase:"Aggiungi metodo di pagamento"},"es-ES":{payButton:"Añadir método de pago",confirmPurchase:"Añadir método de pago"},"nl-NL":{payButton:"Betaalmethode toevoegen",confirmPurchase:"Betaalmethode toevoegen"},"pt-BR":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pt-PT":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pl-PL":{payButton:"Dodaj metodę płatności",confirmPurchase:"Dodaj metodę płatności"},"ru-RU":{payButton:"Добавить способ оплаты",confirmPurchase:"Добавить способ оплаты"},"sv-SE":{payButton:"Lägg till betalningsmetod",confirmPurchase:"Lägg till betalningsmetod"},"da-DK":{payButton:"Tilføj betalingsmetode",confirmPurchase:"Tilføj betalingsmetode"},"fi-FI":{payButton:"Lisää maksutapa",confirmPurchase:"Lisää maksutapa"},"no-NO":{payButton:"Legg til betalingsmetode",confirmPurchase:"Legg til betalingsmetode"},"cs-CZ":{payButton:"Přidat platební metodu",confirmPurchase:"Přidat platební metodu"},"hu-HU":{payButton:"Fizetési mód hozzáadása",confirmPurchase:"Fizetési mód hozzáadása"},"ro-RO":{payButton:"Adăugați metodă de plată",confirmPurchase:"Adăugați metodă de plată"},"ja-JP":{payButton:"支払い方法を追加",confirmPurchase:"支払い方法を追加"},"ko-KR":{payButton:"결제 수단 추가",confirmPurchase:"결제 수단 추가"},"zh-CN":{payButton:"添加支付方式",confirmPurchase:"添加支付方式"},"zh-TW":{payButton:"新增付款方式",confirmPurchase:"新增付款方式"},ar:{payButton:"إضافة وسيلة دفع",confirmPurchase:"إضافة وسيلة دفع"},"hr-HR":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"el-GR":{payButton:"Προσθήκη μεθόδου πληρωμής",confirmPurchase:"Προσθήκη μεθόδου πληρωμής"},"sk-SK":{payButton:"Pridať spôsob platby",confirmPurchase:"Pridať spôsob platby"},"sl-SI":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"bg-BG":{payButton:"Добавяне на начин на плащане",confirmPurchase:"Добавяне на начин на плащане"},"ca-ES":{payButton:"Afegir mètode de pagament",confirmPurchase:"Afegir mètode de pagament"},"et-EE":{payButton:"Lisa makseviis",confirmPurchase:"Lisa makseviis"},"lv-LV":{payButton:"Pievienot maksājuma veidu",confirmPurchase:"Pievienot maksājuma veidu"},"lt-LT":{payButton:"Pridėti mokėjimo metodą",confirmPurchase:"Pridėti mokėjimo metodą"}}),t},R=["applepay"];const I="ADYEN",k=e.defineComponent({__name:"PaymentIntegrationFormAdyen",props:{countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(i,{expose:s,emit:c}){let d=null,m=null;const u=i,p=c;s({submit:function(){try{null==d||d.submit()}catch(e){_.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",{},e)}}});const l=e.ref(),y=e.ref(!1),f=e.ref(),_=r.useLogger(),{locale:v}=t.useIntl(),{authorizePayment:E,getPaymentDetails:k}=a.createPaymentsService(),{tokenizePaymentMethod:O}=o.createPaymentMethodsService(),T=e.inject(r.EXPERIMENTAL_FEATURE_INJECTION_KEY);async function A(){var e;const t=n.toMinorUnitAmount(u.amount),a=(null==(e=null==T?void 0:T.value)?void 0:e["express-checkout"])?function(e){return e.filter(e=>!R.some(t=>{var n;return t===(null==(n=e.type)?void 0:n.toLowerCase())}))}(n.mapAdyenPaymentMethods(u.paymentMethodOptionResponseEntry)):n.mapAdyenPaymentMethods(u.paymentMethodOptionResponseEntry);return{checkoutConfig:{amount:t,clientKey:n.getAdyenClientKeyFromPaymentMethodOptionsResponse(u.paymentMethodOptionResponseEntry),environment:n.getAdyenEnvironmentFromPaymentMethodOptionsResponse(u.paymentMethodOptionResponseEntry,_),locale:v,translations:b(u.variant),countryCode:u.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:a},onSubmit:w,onAdditionalDetails:C,onPaymentCompleted:B,onPaymentFailed:M,onError:x,showPayButton:!1},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!u.forceStorePaymentMethod&&"AUTHORIZE"===u.variant},paypal:{intent:t.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:u.selected,onSelect:({props:{type:e}})=>{e&&p("select",{paymentMethodType:e,paymentGatewayVariant:"ADYEN"})},onReady:()=>p("ready")}}}async function N(){if(l.value)try{await P();const[e,{default:t}]=await Promise.all([Promise.resolve().then(()=>require("./index-DIFK3mcJ.js")),Promise.resolve().then(()=>require("./adyen-DZsyEXkw.js"))]),{AdyenCheckout:n,Dropin:a,Card:o,Bancontact:r,Ach:i,AmazonPay:s,ApplePay:c,BcmcMobile:p,BacsDirectDebit:y,CashAppPay:h,EPS:f,GooglePay:_,Klarna:g,PayByBank:v,PayPal:E,SepaDirectDebit:b,Trustly:R,Twint:I,PayByBankUS:k,Redirect:O}=e,{checkoutConfig:T,dropInConfig:N}=await A();m=await n(T),d=new a(m,{...N,paymentMethodComponents:[o,r,i,s,c,p,y,h,f,_,g,v,E,b,R,I,k,O]}).mount(l.value),function(e){var t;const n=null==(t=l.value)?void 0:t.getRootNode();if(n instanceof ShadowRoot){const t=document.createElement("style");t.textContent=e,n.appendChild(t);const a=document.createElement("style");a.textContent="\n :host {\n --adyen-sdk-color-background-secondary: transparent;\n --adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);\n --adyen-sdk-color-outline-secondary: #e5e7eb;\n --adyen-sdk-color-outline-primary: transparent;\n --adyen-sdk-color-background-always-dark: var(--color-primary-500);\n --adyen-sdk-color-background-inverse-primary-hover: var(--color-primary-600);\n }\n\n .adyen-checkout__payment-method__image__wrapper {\n width: 32px;\n height: 32px;\n }\n\n .adyen-checkout__payment-method__image {\n height: 32px;\n }\n\n .adyen-checkout__input-wrapper,\n .adyen-checkout__input {\n border-color: rgb(229, 231, 235);\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__button,\n .adyen-checkout__payment-method {\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method {\n border-color: rgb(229, 231, 235);\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n transition: box-shadow 0.2s ease-in-out;\n }\n\n .adyen-checkout__payment-method--selected {\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n }\n\n .adyen-checkout__payment-method:after {\n transform: scale(0%);\n }\n\n .adyen-checkout__paypal__button {\n display: block !important;\n }\n\n .adyen-checkout__payment-methods-list {\n gap: 4px;\n }\n\n .adyen-checkout__dropdown__list {\n background-color: white;\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method.adyen-checkout__payment-method--selected:after {\n content: '✓';\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: var(--color-primary-600);\n position: absolute;\n top: 14px;\n right: 14px;\n text-align: center;\n line-height: 20px;\n color: white;\n transform: scale(100%);\n font-size: 12px;\n }\n\n .adyen-checkout__payment-method__header {\n padding: 8px 16px !important;\n }\n\n .adyen-checkout__payment-method__brands {\n align-items: center;\n }\n .adyen-checkout__payment-method__brand-number {\n line-height: 1;\n }\n .adyen-checkout__button__text {\n font-size: 14px;\n }\n .adyen-checkout__store-details {\n background: transparent;\n padding: 0;\n }\n .adyen-checkout__checkbox__input + .adyen-checkout__checkbox__label:after {\n border-color: rgb(229, 231, 235);\n }\n ","AUTHORIZE"===u.variant&&(a.textContent+="\n .adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {\n display: none;\n }\n "),n.appendChild(a)}}(t)}catch(e){_.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function P(){d&&(d.unmount(),d=null),l.value&&(l.value.innerHTML="")}function w(...e){const[t,a,o]=e;u.validateOnSubmit().then(e=>{if(!e)return;const a=u.paymentMethodOptionResponseEntry.payment_acceptor.id,r={risk_data:n.transformObjectToAdyenObject(t.data.riskData),payment_method:n.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:n.transformObjectToAdyenObject(t.data.browserInfo)};if("AUTHORIZE"===u.variant){const e=n.createReturnUrl({paymentAcceptorId:u.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});return void E({payment_acceptor_id:a,...u.customerId?{customer_id:u.customerId}:{},payment_gateway_variant:I,adyen:{...r,store_payment_method:u.forceStorePaymentMethod||t.data.storePaymentMethod},amount:u.amount,...u.context?{context:u.context}:{},return_url:e}).then(e=>{const n=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===I){const t=S(e,n);return t?(d.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void _.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e})}if("AUTHORIZED"===e.payment.result)return y.value=!0,void o.resolve({resultCode:"Authorised"});_.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})}).catch(e=>{_.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})})}if("TOKENIZE"===u.variant){const e=n.createReturnUrl({paymentAcceptorId:u.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!u.customerId)return void _.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${a}`);O({customer_id:u.customerId,payment_acceptor_id:a,payment_gateway_variant:I,adyen:r,return_url:e}).then(e=>{const n=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===I){const t=S(e,n);return t?(d.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void _.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e})}if("AUTHORIZED"===e.payment.result)return y.value=!0,void o.resolve({resultCode:"Authorised"});_.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})}).catch(e=>{_.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})})}}).catch(e=>{_.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",{},e)})}function S(e,t){if("ACTION_REQUIRED"!==e.status)return;const n=e.action;if("ADYEN"!=n.payment_gateway_variant)return;const a=n.adyen;return{paymentMethodType:(null==a?void 0:a.payment_method_type)??t,method:n.method,url:n.url,data:n.data,type:null==a?void 0:a.action_type,paymentData:null==a?void 0:a.payment_data,sdkData:null==a?void 0:a.sdk_data}}function C(...e){const[t]=e,n=t.data.details,a=t.data.paymentData;if(u.paymentMethodOptionResponseEntry.payment_acceptor.id)return void D({detailsResult:n?(o=n,Object.fromEntries(Object.entries(o).filter(([,e])=>null!=e))):void 0,paymentDataResult:a,paymentAcceptorId:u.paymentMethodOptionResponseEntry.payment_acceptor.id});var o;const r={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};p("payment-failed",r),f.value=r}function M(...e){const[t]=e,n={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};p("payment-failed",n),f.value=n}function B(...e){const[,t]=e;null==t||t.unmount(),p("payment-success")}function x(...e){const[t,n]=e;if("CANCEL"===t.name)return;const a={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};_.error("INTEGRATION_ERROR","Something went wrong",{error:t}),f.value=a,null==n||n.unmount()}function D({detailsResult:e,threeDSResult:t,redirectResult:n,paymentDataResult:a,paymentAcceptorId:o}){k({paymentAcceptorId:o,paymentGatewayVariant:I,adyen:{...e?{details:e}:{},...n?{redirect_result:n}:{},...t?{threeds_result:t}:{},...a?{payment_data:a}:{}}}).then(e=>{"FAILURE"!==e.payment_status?"SUCCESS"!==e.payment_status||p("payment-success"):p("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:e})}).catch(e=>{_.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:e})})}return e.onMounted(()=>{N(),function(){const e=n.getQueryParam(n.REDIRECT_RESULT_QUERY_STRING),t=n.getQueryParam(n.PAYMENT_ACCEPTOR_ID_QUERY_STRING);e&&(t?D({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}}):_.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}}))}()}),e.onBeforeUnmount(()=>{P()}),e.watch(()=>u.paymentMethodOptionResponseEntry,(e,n)=>{t.isEqual(e,n)||N()},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y.value?(e.openBlock(),e.createBlock(h,{key:0,variant:i.variant},null,8,["variant"])):f.value?(e.openBlock(),e.createBlock(g,{key:1,error:f.value},null,8,["error"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"dropInContainerRef",ref:l},null,512)],64))}}),O=e.defineComponent({__name:"PaymentIntegrationForm",props:{customerId:{type:String},variant:{type:String},context:{type:Object},paymentMethodOptions:{type:Array},countryCode:{type:String},invoiceId:{type:String},amount:{type:Object},selectedOption:{type:String},email:{type:String},name:{type:String},validateOnSubmit:{type:Function},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(n,{expose:a,emit:o}){const r=n,d=o;a({submit:function(){var e,t;p.value||(y.value=!0,null==(e=r.validateOnSubmit)||e.call(r));null==(t=l.value.get(p.value))||t.submit()}});const{$t:m}=t.useIntl(),u=e.ref(),p=e.computed(()=>{var e,t;return u.value??(null==(t=null==(e=r.paymentMethodOptions[0])?void 0:e.integration.payment_gateway)?void 0:t.variant)}),l=e.ref(new Map),y=e.ref(!1),h=({paymentGatewayVariant:e,paymentMethodType:t})=>{y.value=!1,u.value=e,d("select",{paymentGatewayVariant:e,paymentMethodType:t})},f=e=>t=>{var n;return l.value.set(null==(n=e.integration.payment_gateway)?void 0:n.variant,t)};return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.paymentMethodOptions,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.integration.id},[e.unref(i)(t)?(e.openBlock(),e.createBlock(k,{key:0,ref_for:!0,ref:f(t),context:n.context,"payment-method-option-response-entry":t,"country-code":n.countryCode,"customer-id":n.customerId,variant:n.variant,amount:n.amount,"invoice-id":n.invoiceId,selected:e.unref(c)({selectedIntegration:p.value,paymentMethodOption:t}),"validate-on-submit":n.validateOnSubmit,"force-store-payment-method":n.forceStorePaymentMethod,onSelect:h,onPaymentFailed:o[0]||(o[0]=e=>a.$emit("payment-failed",e)),onPaymentSuccess:o[1]||(o[1]=e=>a.$emit("payment-success")),onReady:o[2]||(o[2]=e=>a.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","validate-on-submit","force-store-payment-method"])):e.unref(s)(t)?(e.openBlock(),e.createBlock(E,{key:1,ref_for:!0,ref:f(t),context:n.context,"payment-method-option-response-entry":t,"country-code":n.countryCode,"customer-id":n.customerId,variant:n.variant,amount:n.amount,"invoice-id":n.invoiceId,selected:e.unref(c)({selectedIntegration:p.value,paymentMethodOption:t}),email:n.email,name:n.name,"validate-on-submit":n.validateOnSubmit,"force-store-payment-method":n.forceStorePaymentMethod,onSelect:h,onPaymentFailed:o[3]||(o[3]=e=>a.$emit("payment-failed",e)),onPaymentSuccess:o[4]||(o[4]=e=>a.$emit("payment-success")),onReady:o[5]||(o[5]=e=>a.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","email","name","validate-on-submit","force-store-payment-method"])):e.createCommentVNode("",!0)],64))),128)),y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$26),{key:0,variant:"error",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)({defaultMessage:"Select a payment method",id:"payment_integration_form.select_payment_method_error",description:"Error shown when no payment method is selected"})),1)]),_:1})):e.createCommentVNode("",!0)],64))}});exports._sfc_main=O;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, onBeforeUnmount, watch, openBlock, createElementBlock, computed, createBlock, withCtx, unref, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, inject, Fragment, renderList } from "vue";
|
|
2
2
|
import { n as isEqual, u as useIntl, e as _sfc_main$7, A as _sfc_main$8, B as formatAmount, c as _sfc_main$9, W as _sfc_main$a } from "./vendor-ui-B8IlviSs.mjs";
|
|
3
3
|
import { t as toMinorUnitAmount, _ as _sfc_main$6, c as createReturnUrl, g as getQueryParam, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, m as mapAdyenPaymentMethods, a as getAdyenEnvironmentFromPaymentMethodOptionsResponse, b as getAdyenClientKeyFromPaymentMethodOptionsResponse, R as REDIRECT_RESULT_QUERY_STRING, d as transformObjectToAdyenObject } from "./url-1Lbg5Yni.mjs";
|
|
4
|
-
import { c as createPaymentsService } from "./payments-
|
|
5
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
6
|
-
import { a as useLogger, E as EXPERIMENTAL_FEATURE_INJECTION_KEY } from "./component-
|
|
4
|
+
import { c as createPaymentsService } from "./payments-CpzTVrQM.mjs";
|
|
5
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-DvqlWe96.mjs";
|
|
6
|
+
import { a as useLogger, E as EXPERIMENTAL_FEATURE_INJECTION_KEY } from "./component-Bg2JVC_O.mjs";
|
|
7
7
|
const isAdyenPaymentIntegration = (paymentMethodOption) => {
|
|
8
8
|
var _a;
|
|
9
9
|
return ((_a = paymentMethodOption.integration.payment_gateway) == null ? void 0 : _a.variant) === "ADYEN";
|
|
@@ -151,14 +151,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
151
151
|
email: props.email,
|
|
152
152
|
name: props.name
|
|
153
153
|
},
|
|
154
|
-
|
|
154
|
+
"*"
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
157
|
function triggerSubmit() {
|
|
158
158
|
var _a, _b;
|
|
159
159
|
(_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.postMessage(
|
|
160
160
|
{ type: "stripe:submit", email: props.email, name: props.name },
|
|
161
|
-
|
|
161
|
+
"*"
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
164
|
function isRecord(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createVNode, mergeProps, createTextVNode } from "vue";
|
|
2
2
|
import { u as useIntl, g as getCustomerCountry, b as getCustomerName, _ as _sfc_main$2, c as _sfc_main$4 } from "./vendor-ui-B8IlviSs.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-CrGSfZZs.mjs";
|
|
5
5
|
const FALLBACK_COUNTRY_CODE = "NL";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "PaymentMethodForm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js"),a=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String}},emits:["payment-success","payment-failed"],setup(a,{emit:r}){const i={currency:"EUR",quantity:"0"},u=a,s=r,{$t:m}=t.useIntl(),c=e.ref(),l=e.ref(),d=e.ref(!1);function p(){var e;d.value=!0,null==(e=c.value)||e.submit()}function v(){d.value=!1,s("payment-success")}function y(e){d.value=!1,s("payment-failed",e)}const f=e.computed(()=>{return"AUTHORIZE"===(null==(e=u.configuration)?void 0:e.variant)?e:{...e,variant:"TOKENIZE"};var e}),_=e.computed(()=>{let e="NL";if(u.countryCode)return e=u.countryCode,e;if(u.customer){const n=t.getCustomerCountry(u.customer);if(n)return e=n,e}return"NL"}),g=e.computed(()=>{const e=f.value.variant,n=t.getCustomerName(u.customer),o={amount:f.value.amount??i,paymentMethodOptions:u.paymentMethodOptions,countryCode:_.value,...u.customer.email?{email:u.customer.email}:{},...n?{name:n}:{},validateOnSubmit:f.value.validateOnSubmit,forceStorePaymentMethod:f.value.forceStorePaymentMethod,selectedOption:f.value.selectedOption,invoiceId:f.value.invoiceId};return"AUTHORIZE"===e?{...o,variant:e,context:f.value.context}:{...o,variant:"TOKENIZE",customerId:u.customer.id}});return(r,i)=>a.isLoading?(e.openBlock(),e.createBlock(n._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:e.unref(m)({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":d.value})},[e.createVNode(o._sfc_main,e.mergeProps({ref_key:"paymentIntegrationFormRef",ref:c,class:"sv-payment-method-form__integration"},g.value,{onSelect:i[0]||(i[0]=e=>l.value=e),onPaymentSuccess:v,onPaymentFailed:y}),null,16)],2),e.createVNode(e.unref(t._sfc_main$1),{color:"primary",class:"mt-4 w-full",loading:d.value,onClick:p},{default:e.withCtx(()=>[...i[1]||(i[1]=[e.createTextVNode("Save payment method",-1)])]),_:1},8,["loading"])]),_:1},8,["title"]))}});exports._sfc_main=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, unref, withCtx, createVNode, createCommentVNode, createSlots, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { u as useIntl, _ as _sfc_main$1, m as _sfc_main$2, y as _sfc_main$3, e as _sfc_main$4 } from "./vendor-ui-B8IlviSs.mjs";
|
|
3
3
|
import { u as useService } from "./useService-DF57xuDd.mjs";
|
|
4
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
4
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-DvqlWe96.mjs";
|
|
5
5
|
function usePaymentMethodContextMenuOptions({
|
|
6
6
|
onSetDefault,
|
|
7
7
|
onDeleteRequest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),n=require("./useService-CHrkefKd.js"),o=require("./paymentMethods-
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),n=require("./useService-CHrkefKd.js"),o=require("./paymentMethods-DIbB759g.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._sfc_main$12),{"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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useIncrementalLoading-CuSndpP2.js"),t=require("./subscriptions-AMC4DirD.js"),i=require("vue"),s=require("./vendor-ui-C3Tq-qY_.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("./useActionDispatchProvider-CizNgRwv.js");const r={class:"sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row"},c={class:"sv-subscriptions-list__item-content grow"},a={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"},l={class:"sv-subscriptions-list__item-actions flex flex-col items-center gap-2 md:flex-row"},p=i.defineComponent({__name:"SubscriptionsListItem",props:{subscription:{type:Object},paymentMethod:{type:Object},customer:{type:Object},showViewSubscriptionDetailsButton:{type:Boolean,default:!0},showCancelSubscriptionButton:{type:Boolean,default:!0},showRenewSubscriptionButton:{type:Boolean,default:!0},showUpgradeSubscriptionButton:{type:Boolean,default:!0}},emits:["view-subscription-details","cancel-subscription","renew-subscription","upgrade-subscription"],setup(e){const t=e,{$t:o}=s.useIntl(),{formatDate:n}=s.useIntl(),p=i.computed(()=>{var e;const i=t.subscription.pricing_plan_schedule_infos;if(0===i.length)return;const s=i[i.length-1];return null==(e=null==s?void 0:s.pricing_plan_version)?void 0:e.pricing_plan}),d=i.computed(()=>{var e;return t.subscription.name||(null==(e=p.value)?void 0:e.name)||o({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=p.value)?void 0:e.description}),m=i.computed(()=>{const e=t.subscription.inactive_periods;return!e||0===e.length}),_=i.computed(()=>{const e=t.subscription.inactive_periods;return Array.isArray(e)&&e.length>0}),v=i.computed(()=>m.value&&t.showCancelSubscriptionButton),h=i.computed(()=>_.value&&t.showRenewSubscriptionButton),f=i.computed(()=>t.showViewSubscriptionDetailsButton);return(t,p)=>(i.openBlock(),i.createBlock(i.unref(s._sfc_main),{class:"sv-subscriptions-list__item"},{default:i.withCtx(()=>[i.createElementVNode("div",r,[i.createElementVNode("div",c,[i.createVNode(i.unref(s._sfc_main$3),{tag:"h3",variant:"heading-2",class:"sv-subscriptions-list__item-title"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(d.value),1)]),_:1}),b.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$3),{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",a,[e.paymentMethod?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$6),{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$3),{tag:"span",variant:"body-xs",shade:"light",weight:"semibold"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({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$3),{tag:"span",variant:"body-xs",shade:"light"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)({date:e.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:e.customer.timezone})),1)]),_:1})])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",l,[f.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:0,color:"primary",class:"sv-action sv-action--primary sv-subscriptions-list__item-details w-full md:w-auto",type:"button",onClick:p[0]||(p[0]=i=>t.$emit("view-subscription-details",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({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),e.showUpgradeSubscriptionButton?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:1,variant:"outline",color:"gray",class:"sv-action sv-action--secondary sv-subscriptions-list__item-upgrade w-full md:w-auto",type:"button",onClick:p[1]||(p[1]=i=>t.$emit("upgrade-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"Upgrade subscription",description:"The label for the upgrade subscription button in the subscriptions block",id:"customer.subscriptions_block.upgrade_button_label"})),1)]),_:1})):i.createCommentVNode("",!0),v.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$13),{key:2,icon:"delete",variant:"outline",color:"gray",size:"md",class:"sv-action sv-subscriptions-list__item-cancel",type:"button","aria-label":i.unref(o)({defaultMessage:"Cancel subscription",description:"Aria label for the cancel subscription icon button",id:"customer.subscriptions_block.cancel_button_label"}),onClick:p[2]||(p[2]=i=>t.$emit("cancel-subscription",{subscriptionId:e.subscription.id}))},null,8,["aria-label"])):i.createCommentVNode("",!0),h.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:3,variant:"outline",color:"gray",class:"sv-action sv-action--secondary sv-subscriptions-list__item-renew w-full md:w-auto",type:"button",onClick:p[3]||(p[3]=i=>t.$emit("renew-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"Renew subscription",description:"The label for the renew subscription button in the subscriptions block",id:"customer.subscriptions_block.renew_button_label"})),1)]),_:1})):i.createCommentVNode("",!0)])])]),_:1}))}}),d={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},showCancelButton:{type:Boolean,default:!0},showRenewButton:{type:Boolean,default:!0},showUpgradeButton:{type:Boolean,default:!0}},emits:["view-subscription-details","view-all-subscriptions","cancel-subscription","renew-subscription","upgrade-subscription","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),{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",d,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.subscriptions,s=>(i.openBlock(),i.createBlock(p,{key:s.id,subscription:s,"payment-method":r(s.payment_method_id),customer:e.customer,"show-view-subscription-details-button":e.showViewDetailsButton,"show-cancel-subscription-button":e.showCancelButton,"show-renew-subscription-button":e.showRenewButton,"show-upgrade-subscription-button":e.showUpgradeButton,onViewSubscriptionDetails:a[1]||(a[1]=e=>t.$emit("view-subscription-details",e)),onCancelSubscription:a[2]||(a[2]=e=>t.$emit("cancel-subscription",e)),onRenewSubscription:a[3]||(a[3]=e=>t.$emit("renew-subscription",e)),onUpgradeSubscription:a[4]||(a[4]=e=>t.$emit("upgrade-subscription",e))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button","show-cancel-subscription-button","show-renew-subscription-button","show-upgrade-subscription-button"]))),128))])):(i.openBlock(),i.createBlock(i.unref(s._sfc_main),{key:0,class:"sv-empty-state sv-subscriptions-list__empty"},{default:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main$3),{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$3),{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$1),{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"]))}}),m=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}=n.useActionDispatchProvider();return(s,n)=>{var r,c,a,u,l;return e.isLoading?(i.openBlock(),i.createBlock(o._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,"show-cancel-button":null==(a=e.configuration)?void 0:a.showCancelButton,"show-renew-button":null==(u=e.configuration)?void 0:u.showRenewButton,"show-upgrade-button":null==(l=e.configuration)?void 0:l.showUpgradeButton,onViewSubscriptionDetails:n[0]||(n[0]=e=>i.unref(t)({action:"view-subscription-details",data:{subscriptionId:e.subscriptionId}})),onViewAllSubscriptions:n[1]||(n[1]=e=>i.unref(t)({action:"view-all-subscriptions"})),onCancelSubscription:n[2]||(n[2]=e=>i.unref(t)({action:"cancel-subscription",data:{subscriptionId:e.subscriptionId}})),onRenewSubscription:n[3]||(n[3]=e=>i.unref(t)({action:"renew-subscription",data:{subscriptionId:e.subscriptionId}})),onUpgradeSubscription:n[4]||(n[4]=e=>i.unref(t)({action:"upgrade-subscription",data:{subscriptionId:e.subscriptionId}})),onLoadMore:n[5]||(n[5]=e=>s.$emit("load-more"))},null,8,["customer","subscriptions","payment-methods","is-loading","show-view-all-button","show-view-details-button","show-cancel-button","show-renew-button","show-upgrade-button"])):i.createCommentVNode("",!0)}}});exports._sfc_main=m,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}})})};
|
|
1
|
+
const e=require("./useIncrementalLoading-CuSndpP2.js"),t=require("./subscriptions-CC61I6Nj.js"),i=require("vue"),s=require("./vendor-ui-C3Tq-qY_.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("./useActionDispatchProvider-BHTknMoH.js");const r={class:"sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row"},c={class:"sv-subscriptions-list__item-content grow"},a={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"},l={class:"sv-subscriptions-list__item-actions flex flex-col items-center gap-2 md:flex-row"},p=i.defineComponent({__name:"SubscriptionsListItem",props:{subscription:{type:Object},paymentMethod:{type:Object},customer:{type:Object},showViewSubscriptionDetailsButton:{type:Boolean,default:!0},showCancelSubscriptionButton:{type:Boolean,default:!0},showRenewSubscriptionButton:{type:Boolean,default:!0},showUpgradeSubscriptionButton:{type:Boolean,default:!0}},emits:["view-subscription-details","cancel-subscription","renew-subscription","upgrade-subscription"],setup(e){const t=e,{$t:o}=s.useIntl(),{formatDate:n}=s.useIntl(),p=i.computed(()=>{var e;const i=t.subscription.pricing_plan_schedule_infos;if(0===i.length)return;const s=i[i.length-1];return null==(e=null==s?void 0:s.pricing_plan_version)?void 0:e.pricing_plan}),d=i.computed(()=>{var e;return t.subscription.name||(null==(e=p.value)?void 0:e.name)||o({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=p.value)?void 0:e.description}),m=i.computed(()=>{const e=t.subscription.inactive_periods;return!e||0===e.length}),_=i.computed(()=>{const e=t.subscription.inactive_periods;return Array.isArray(e)&&e.length>0}),v=i.computed(()=>m.value&&t.showCancelSubscriptionButton),h=i.computed(()=>_.value&&t.showRenewSubscriptionButton),f=i.computed(()=>t.showViewSubscriptionDetailsButton);return(t,p)=>(i.openBlock(),i.createBlock(i.unref(s._sfc_main),{class:"sv-subscriptions-list__item"},{default:i.withCtx(()=>[i.createElementVNode("div",r,[i.createElementVNode("div",c,[i.createVNode(i.unref(s._sfc_main$3),{tag:"h3",variant:"heading-2",class:"sv-subscriptions-list__item-title"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(d.value),1)]),_:1}),b.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$3),{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",a,[e.paymentMethod?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$6),{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$3),{tag:"span",variant:"body-xs",shade:"light",weight:"semibold"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({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$3),{tag:"span",variant:"body-xs",shade:"light"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)({date:e.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:e.customer.timezone})),1)]),_:1})])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",l,[f.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:0,color:"primary",class:"sv-action sv-action--primary sv-subscriptions-list__item-details w-full md:w-auto",type:"button",onClick:p[0]||(p[0]=i=>t.$emit("view-subscription-details",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({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),e.showUpgradeSubscriptionButton?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:1,variant:"outline",color:"gray",class:"sv-action sv-action--secondary sv-subscriptions-list__item-upgrade w-full md:w-auto",type:"button",onClick:p[1]||(p[1]=i=>t.$emit("upgrade-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"Upgrade subscription",description:"The label for the upgrade subscription button in the subscriptions block",id:"customer.subscriptions_block.upgrade_button_label"})),1)]),_:1})):i.createCommentVNode("",!0),v.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$13),{key:2,icon:"delete",variant:"outline",color:"gray",size:"md",class:"sv-action sv-subscriptions-list__item-cancel",type:"button","aria-label":i.unref(o)({defaultMessage:"Cancel subscription",description:"Aria label for the cancel subscription icon button",id:"customer.subscriptions_block.cancel_button_label"}),onClick:p[2]||(p[2]=i=>t.$emit("cancel-subscription",{subscriptionId:e.subscription.id}))},null,8,["aria-label"])):i.createCommentVNode("",!0),h.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:3,variant:"outline",color:"gray",class:"sv-action sv-action--secondary sv-subscriptions-list__item-renew w-full md:w-auto",type:"button",onClick:p[3]||(p[3]=i=>t.$emit("renew-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"Renew subscription",description:"The label for the renew subscription button in the subscriptions block",id:"customer.subscriptions_block.renew_button_label"})),1)]),_:1})):i.createCommentVNode("",!0)])])]),_:1}))}}),d={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},showCancelButton:{type:Boolean,default:!0},showRenewButton:{type:Boolean,default:!0},showUpgradeButton:{type:Boolean,default:!0}},emits:["view-subscription-details","view-all-subscriptions","cancel-subscription","renew-subscription","upgrade-subscription","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),{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",d,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.subscriptions,s=>(i.openBlock(),i.createBlock(p,{key:s.id,subscription:s,"payment-method":r(s.payment_method_id),customer:e.customer,"show-view-subscription-details-button":e.showViewDetailsButton,"show-cancel-subscription-button":e.showCancelButton,"show-renew-subscription-button":e.showRenewButton,"show-upgrade-subscription-button":e.showUpgradeButton,onViewSubscriptionDetails:a[1]||(a[1]=e=>t.$emit("view-subscription-details",e)),onCancelSubscription:a[2]||(a[2]=e=>t.$emit("cancel-subscription",e)),onRenewSubscription:a[3]||(a[3]=e=>t.$emit("renew-subscription",e)),onUpgradeSubscription:a[4]||(a[4]=e=>t.$emit("upgrade-subscription",e))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button","show-cancel-subscription-button","show-renew-subscription-button","show-upgrade-subscription-button"]))),128))])):(i.openBlock(),i.createBlock(i.unref(s._sfc_main),{key:0,class:"sv-empty-state sv-subscriptions-list__empty"},{default:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main$3),{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$3),{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$1),{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"]))}}),m=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}=n.useActionDispatchProvider();return(s,n)=>{var r,c,a,u,l;return e.isLoading?(i.openBlock(),i.createBlock(o._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,"show-cancel-button":null==(a=e.configuration)?void 0:a.showCancelButton,"show-renew-button":null==(u=e.configuration)?void 0:u.showRenewButton,"show-upgrade-button":null==(l=e.configuration)?void 0:l.showUpgradeButton,onViewSubscriptionDetails:n[0]||(n[0]=e=>i.unref(t)({action:"view-subscription-details",data:{subscriptionId:e.subscriptionId}})),onViewAllSubscriptions:n[1]||(n[1]=e=>i.unref(t)({action:"view-all-subscriptions"})),onCancelSubscription:n[2]||(n[2]=e=>i.unref(t)({action:"cancel-subscription",data:{subscriptionId:e.subscriptionId}})),onRenewSubscription:n[3]||(n[3]=e=>i.unref(t)({action:"renew-subscription",data:{subscriptionId:e.subscriptionId}})),onUpgradeSubscription:n[4]||(n[4]=e=>i.unref(t)({action:"upgrade-subscription",data:{subscriptionId:e.subscriptionId}})),onLoadMore:n[5]||(n[5]=e=>s.$emit("load-more"))},null,8,["customer","subscriptions","payment-methods","is-loading","show-view-all-button","show-view-details-button","show-cancel-button","show-renew-button","show-upgrade-button"])):i.createCommentVNode("",!0)}}});exports._sfc_main=m,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}})})};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { u as useIncrementalLoading } from "./useIncrementalLoading-DmOT2MXH.mjs";
|
|
2
|
-
import { c as createSubscriptionsService } from "./subscriptions-
|
|
2
|
+
import { c as createSubscriptionsService } from "./subscriptions-BPYyv09M.mjs";
|
|
3
3
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createSlots, Fragment, renderList } from "vue";
|
|
4
4
|
import { u as useIntl, _ as _sfc_main$3, e as _sfc_main$4, m as _sfc_main$5, c as _sfc_main$6, z as _sfc_main$7 } from "./vendor-ui-B8IlviSs.mjs";
|
|
5
5
|
import { _ as _sfc_main$8 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
6
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
6
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
|
|
7
7
|
function useSubscriptionsList({
|
|
8
8
|
customerId,
|
|
9
9
|
batchSize: pageSize = 15
|
|
@@ -113,7 +113,7 @@ function useLogger() {
|
|
|
113
113
|
};
|
|
114
114
|
return { debug: noop, info: noop, warn: noop, error: noop, capture: noop };
|
|
115
115
|
}
|
|
116
|
-
const version = "0.1.0-alpha.
|
|
116
|
+
const version = "0.1.0-alpha.16";
|
|
117
117
|
const Headers = {
|
|
118
118
|
AUTHORIZATION: "Authorization",
|
|
119
119
|
CONTENT_TYPE: "Content-Type",
|