@solvimon/solvimon-web 0.1.0-alpha.8 → 0.1.0-alpha.9
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 +124 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +6 -4
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
- package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
- package/dist/{ContentWithAsideLayout-BTdixy3L.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +8 -5
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +21 -10
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dt_Vb7Wz.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +19 -8
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
- package/dist/{PaymentHistoryBlock-DHM-3fh-.js → PaymentHistoryBlock-BiiFJkpT.js} +1 -1
- package/dist/{PaymentHistoryBlock-YzJ6bxKr.mjs → PaymentHistoryBlock-D_B099M7.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +16 -9
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
- package/dist/{PaymentIntegrationForm-Cl5ua8v8.js → PaymentIntegrationForm-D1oJA9mC.js} +1 -1
- package/dist/{PaymentIntegrationForm-ID4QnvA3.mjs → PaymentIntegrationForm-DNkjhqMF.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D37gDtY7.mjs} +70 -17
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D5bxFJ-p.js +1 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs} +1 -1
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js → PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js} +1 -1
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +9 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +28 -19
- package/dist/adyen-B_QrYdaC.mjs +4 -0
- package/dist/{adyenLoader-gsbzSjYV.mjs → adyen-Bwewy3HC.mjs} +8 -13
- package/dist/adyen-R6aSZ0Yf.js +1 -0
- package/dist/adyen-mQEEOjgl.js +1 -0
- package/dist/adyen.css +1 -0
- package/dist/component-BOqPDAVk.js +1 -0
- package/dist/{component-CM9g6tbD.mjs → component-Djrf1L-Z.mjs} +294 -209
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +8 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +8 -4
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +10 -6
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +36 -22
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +10 -6
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +7 -4
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +10 -6
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +15 -11
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +15 -8
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +11 -7
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +8 -4
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +4 -2
- package/dist/{customer-TIi7iZFw.mjs → customer-B31QzznT.mjs} +1 -1
- package/dist/{customer-C_Hz_npf.js → customer-hDxW1Dbp.js} +1 -1
- package/dist/en-US-CgPY97Vq.js +1 -0
- package/dist/{en-US-CBoPxQwX.mjs → en-US-N3CUCsVy.mjs} +5 -25
- package/dist/index-DIFK3mcJ.js +6 -0
- package/dist/index-DyvRdSR7.mjs +9673 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{invoices-BuVOuTOm.mjs → invoices-DIYPN2j_.mjs} +2 -2
- package/dist/{invoices-DbvwXAsm.js → invoices-DzkA1jDc.js} +1 -1
- package/dist/{nl-NL-BB7KbK-h.mjs → nl-NL-B8U9b85I.mjs} +18 -2
- package/dist/nl-NL-qMRaTRrM.js +1 -0
- package/dist/{paymentMethods-Di32oJ39.mjs → paymentMethods-67b3UlTZ.mjs} +2 -2
- package/dist/{paymentMethods-B4AYGf0K.js → paymentMethods-C_sdTkSF.js} +1 -1
- package/dist/{payments-DeutKq9x.js → payments-DkHhTHto.js} +1 -1
- package/dist/{payments-C5fD1PXB.mjs → payments-Dq6R37Fz.mjs} +1 -1
- package/dist/{registry-CMSmkLcy.js → registry-BkViv4tv.js} +1 -1
- package/dist/{registry-BLwMl1bK.mjs → registry-Df_26rJy.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +276 -214
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +22 -15
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +12 -10
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +83 -53
- package/dist/solvimon-web.css +1 -1
- package/dist/{subscriptions-mOgjjzUi.mjs → subscriptions-ClGIr_aS.mjs} +2 -2
- package/dist/{subscriptions-wdMADcQZ.js → subscriptions-jelITJcX.js} +1 -1
- package/dist/{useActionDispatchProvider-B4gszz0Q.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
- package/dist/{useActionDispatchProvider-DfS2P0bd.js → useActionDispatchProvider-rw9kWeE0.js} +1 -1
- package/dist/{useCustomer-cbhDyWJL.mjs → useCustomer-Ba9WRtuT.mjs} +2 -2
- package/dist/{useCustomer-DanZzn-l.js → useCustomer-CUcaeQn_.js} +1 -1
- package/dist/{useIncrementalLoading-RRicokf1.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +1 -1
- package/dist/{useIncrementalLoading-DFe5Yh8M.js → useIncrementalLoading-DoTTXM2Y.js} +1 -1
- package/dist/{useInvoiceData-fS6G_244.mjs → useInvoiceData-BJwwDur7.mjs} +2 -2
- package/dist/{useInvoiceData-CxxHa5R2.js → useInvoiceData-D2jkdmlA.js} +1 -1
- package/dist/{useInvoicesList-BQQxcPdz.mjs → useInvoicesList-CFzAxyae.mjs} +22 -18
- package/dist/useInvoicesList-CaBCGs4h.js +1 -0
- package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
- package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
- package/dist/{usePaymentMethodOptions-2MloZ9bY.mjs → usePaymentMethodOptions-C2k4npCQ.mjs} +2 -2
- package/dist/{usePaymentMethodOptions-D01YWW3G.js → usePaymentMethodOptions-DYO6xr3-.js} +1 -1
- package/dist/{usePaymentMethods-DZvfWSlx.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
- package/dist/{usePaymentMethods-Cm9WdSW0.js → usePaymentMethods-ryN_YohI.js} +1 -1
- package/dist/{usePayments-D4uGKBsV.mjs → usePayments-Cw5PPEJa.mjs} +3 -3
- package/dist/{usePayments-B13S_yai.js → usePayments-DWXPGFvp.js} +1 -1
- package/dist/{usePortal-DWJEVkTj.js → usePortal-CxX4nrE4.js} +1 -1
- package/dist/{usePortal-DJDJNLbo.mjs → usePortal-cmE08vYs.mjs} +1 -1
- package/dist/useService-Bb9r_sOQ.js +1 -0
- package/dist/{useService-BuWWE5ND.mjs → useService-BsSEI8DZ.mjs} +1 -16
- package/dist/{useWalletBalanceItems-B53Gkjro.mjs → useWalletBalanceItems-CkDqmk36.mjs} +8 -5
- package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
- package/dist/vendor-ui-5pJF5KBP.js +1 -0
- package/dist/{vendor-ui-BwxuPDg8.mjs → vendor-ui-C0K3osvz.mjs} +13272 -14225
- package/package.json +4 -3
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +0 -1
- package/dist/ContentWithAsideLayout-oAYVrLvL.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +0 -1
- package/dist/adyen-51SvcyqV.mjs +0 -4
- package/dist/adyen-DZsyEXkw.js +0 -1
- package/dist/adyenLoader-CEH4A2b2.js +0 -1
- package/dist/auto-DzZuCneB.mjs +0 -14387
- package/dist/auto-PpnAChnH.js +0 -6
- package/dist/component-C2Gc-wsE.js +0 -1
- package/dist/en-US-DJq-9dD8.js +0 -1
- package/dist/nl-NL-CtU1Lg2F.js +0 -1
- package/dist/source-DKDKBlUm.mjs +0 -179
- package/dist/source-dkMNFWDc.js +0 -1
- package/dist/useInvoicesList-CtJqmblZ.js +0 -1
- package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
- package/dist/useService-9fCKPTmu.js +0 -1
- package/dist/useWalletBalanceItems-BMaVT4TW.js +0 -1
- package/dist/vendor-ui-Ce_Yp7xA.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-5pJF5KBP.js"),n=require("./adyen-R6aSZ0Yf.js"),a=require("./payments-DkHhTHto.js"),o=require("./paymentMethods-C_sdTkSF.js"),r=require("./component-BOqPDAVk.js"),i=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},d=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,d)=>(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),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$6),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(a.amount)),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main),{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"]))}}),c={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}},s={class:"flex flex-col items-center gap-6"},m=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(a){const o=a,{$t:r}=t.useIntl(),i=e.computed(()=>c[o.error.code]),d=()=>{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",s,[e.createVNode(e.unref(t._sfc_main),{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$3),{key:0,type:"button",color:"gray",variant:"outline",onClick:d},{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"]))}}),u=["applepay"];const p="ADYEN",l=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(c,{expose:s,emit:l}){let y=null,h=null;const _=c,f=l;s({submit:function(){try{null==y||y.submit()}catch(e){A.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",{},e)}}});const g=e.ref(),E=e.ref(!1),v=e.ref(),A=r.useLogger(),{locale:I}=t.useIntl(),{authorizePayment:R,getPaymentDetails:k}=a.createPaymentsService(),{tokenizePaymentMethod:b}=o.createPaymentMethodsService(),P=e.inject(r.EXPERIMENTAL_FEATURE_INJECTION_KEY),T=e.computed(()=>"TOKENIZE"===_.variant);async function N(){var e;const t=n.transformToAdyenAmount(_.amount),a=(null==(e=null==P?void 0:P.value)?void 0:e["express-checkout"])?function(e){return e.filter(e=>!u.some(t=>{var n;return t===(null==(n=e.type)?void 0:n.toLowerCase())}))}(n.mapAdyenPaymentMethods(_.paymentMethodOptionResponseEntry)):n.mapAdyenPaymentMethods(_.paymentMethodOptionResponseEntry);return{checkoutConfig:{amount:t,clientKey:n.getAdyenClientKeyFromPaymentMethodOptionsResponse(_.paymentMethodOptionResponseEntry),environment:n.getAdyenEnvironmentFromPaymentMethodOptionsResponse(_.paymentMethodOptionResponseEntry,A),locale:I,translations:i(_.variant),countryCode:_.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:a},onSubmit:B,onAdditionalDetails:x,onPaymentCompleted:M,onPaymentFailed:S,onError:D,showPayButton:T.value},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!_.forceStorePaymentMethod&&"AUTHORIZE"===_.variant},paypal:{intent:t.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:_.selected,onSelect:({props:{type:e}})=>{e&&f("select",{paymentMethodType:e,paymentGatewayVariant:"ADYEN"})},onReady:()=>f("ready")}}}async function O(){if(g.value)try{await w();const[e,{default:t}]=await Promise.all([Promise.resolve().then(()=>require("./index-DIFK3mcJ.js")),Promise.resolve().then(()=>require("./adyen-mQEEOjgl.js"))]),{AdyenCheckout:n,Dropin:a,Card:o,Bancontact:r,Ach:i,AmazonPay:d,ApplePay:c,BcmcMobile:s,BacsDirectDebit:m,CashAppPay:u,EPS:p,GooglePay:l,Klarna:f,PayByBank:E,PayPal:v,SepaDirectDebit:A,Trustly:I,Twint:R,PayByBankUS:k,Redirect:b}=e,{checkoutConfig:P,dropInConfig:T}=await N();h=await n(P),y=new a(h,{...T,paymentMethodComponents:[o,r,i,d,c,s,m,u,p,l,f,E,v,A,I,R,k,b]}).mount(g.value),function(e){var t;const n=null==(t=g.value)?void 0:t.getRootNode();if(n instanceof ShadowRoot){const t=document.createElement("link");t.rel="stylesheet",t.href=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"===_.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){A.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function w(){y&&(y.unmount(),y=null),g.value&&(g.value.innerHTML="")}function B(...e){const[t,a,o]=e;_.validateOnSubmit().then(e=>{if(!e)return;const a=_.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"===_.variant){const e=n.createReturnUrl({paymentAcceptorId:_.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});return void R({payment_acceptor_id:a,..._.customerId?{customer_id:_.customerId}:{},payment_gateway_variant:p,adyen:{...r,store_payment_method:_.forceStorePaymentMethod||t.data.storePaymentMethod},amount:_.amount,..._.context?{context:_.context}:{},return_url:e}).then(e=>{const n=t.data.paymentMethod.type;if(["FAILURE","REFUSED"].includes(e.status))return A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e}),void o.resolve({resultCode:"Error"});if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===p){const t=C(e,n);return t?(y.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e})}E.value=!0,o.resolve({resultCode:"Authorised"})}).catch(e=>{A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})})}if("TOKENIZE"===_.variant){const e=n.createReturnUrl({paymentAcceptorId:_.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!_.customerId)return void A.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${a}`);b({customer_id:_.customerId,payment_acceptor_id:a,payment_gateway_variant:p,adyen:r,return_url:e}).then(e=>{const n=t.data.paymentMethod.type;if(["FAILURE","REFUSED"].includes(e.status))return A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e}),void o.resolve({resultCode:"Error"});if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===p){const t=C(e,n);return t?(y.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e})}E.value=!0,o.resolve({resultCode:"Authorised"})}).catch(e=>{A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${a}`,{error:e}),o.resolve({resultCode:"Error"})})}}).catch(e=>{A.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",{},e)})}function C(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 x(...e){const[t]=e,n=t.data.details,a=t.data.paymentData;if(_.paymentMethodOptionResponseEntry.payment_acceptor.id)return void F({detailsResult:n?(o=n,Object.fromEntries(Object.entries(o).filter(([,e])=>null!=e))):void 0,paymentDataResult:a,paymentAcceptorId:_.paymentMethodOptionResponseEntry.payment_acceptor.id});var o;const r={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};f("payment-failed",r),v.value=r}function S(...e){const[t]=e,n={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};f("payment-failed",n),v.value=n}function M(...e){const[,t]=e;null==t||t.unmount(),f("payment-success")}function D(...e){const[t,n]=e;if("CANCEL"===t.name)return;const a={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};A.error("INTEGRATION_ERROR","Something went wrong",{error:t}),v.value=a,null==n||n.unmount()}function F({detailsResult:e,threeDSResult:t,redirectResult:n,paymentDataResult:a,paymentAcceptorId:o}){k({paymentAcceptorId:o,paymentGatewayVariant:p,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||f("payment-success"):f("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:e})}).catch(e=>{A.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:e})})}return e.onMounted(()=>{O(),function(){const e=n.getQueryParam(n.REDIRECT_RESULT_QUERY_STRING),t=n.getQueryParam(n.PAYMENT_ACCEPTOR_ID_QUERY_STRING);e&&(t?F({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}}):A.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}}))}()}),e.onBeforeUnmount(()=>{w()}),e.watch(()=>_.paymentMethodOptionResponseEntry,(e,n)=>{t.isEqual(e,n)||O()},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[E.value?(e.openBlock(),e.createBlock(d,{key:0,variant:c.variant},null,8,["variant"])):v.value?(e.openBlock(),e.createBlock(m,{key:1,error:v.value},null,8,["error"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"dropInContainerRef",ref:g},null,512)],64))}}),y=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},validateOnSubmit:{type:Function},forceStorePaymentMethod:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(n,{expose:a,emit:o}){const r=n,i=o;a({submit:function(){var e,t;c.value||(m.value=!0,null==(e=r.validateOnSubmit)||e.call(r));null==(t=s.value.get(c.value))||t.submit()}});const{$t:d}=t.useIntl(),c=e.ref(),s=e.ref(new Map),m=e.ref(!1);function u({paymentGatewayVariant:e,paymentMethodType:t}){m.value=!1,i("select",{paymentGatewayVariant:e,paymentMethodType:t})}return(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.paymentMethodOptions,t=>{var r;return e.openBlock(),e.createElementBlock(e.Fragment,{key:t.integration.id},["ADYEN"===(null==(r=t.integration.payment_gateway)?void 0:r.variant)?(e.openBlock(),e.createBlock(l,{key:0,ref_for:!0,ref:e=>s.value.set(t.integration.payment_gateway.variant,e),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:c.value===t.integration.payment_gateway.variant,"validate-on-submit":n.validateOnSubmit,"force-store-payment-method":n.forceStorePaymentMethod,onSelect:u,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.createCommentVNode("",!0)],64)}),128)),m.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$23),{key:0,variant:"error",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({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=y;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, renderSlot } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "./vendor-ui-
|
|
2
|
+
import { _ as _sfc_main$1 } from "./vendor-ui-C0K3osvz.mjs";
|
|
3
3
|
const _hoisted_1 = { class: "flex items-start" };
|
|
4
4
|
const _hoisted_2 = { class: "flex flex-col grow" };
|
|
5
5
|
const _hoisted_3 = { class: "flex items-center gap-1" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./vendor-ui-
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-5pJF5KBP.js"),r={class:"flex items-start"},n={class:"flex flex-col grow"},a={class:"flex items-center gap-1"},s={class:"flex items-center ml-4 self-center"},i=e.defineComponent({__name:"PricingGroupContent",props:{name:{type:String},description:{type:String}},setup:i=>(o,l)=>(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("div",n,[e.createElementVNode("div",a,[e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.name),1)]),_:1}),e.renderSlot(o.$slots,"badge")]),e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.description),1)]),_:1})]),e.createElementVNode("div",s,[e.renderSlot(o.$slots,"default")])]))});exports._sfc_main=i;
|
|
@@ -50,21 +50,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
return hasSlotContent.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
51
51
|
__props.variant === "title" ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
52
52
|
"data-testid": __props.dataTestid,
|
|
53
|
-
class: "h-6 w-40 rounded border border-gray-50 bg-gray-50/50"
|
|
53
|
+
class: "sv-skeleton sv-skeleton--title h-6 w-40 rounded border border-gray-50 bg-gray-50/50"
|
|
54
54
|
}), null, 16, _hoisted_1)) : __props.variant === "divider-text" ? (openBlock(), createElementBlock("div", mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
55
55
|
"data-testid": __props.dataTestid,
|
|
56
|
-
class: "mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50"
|
|
57
|
-
}), null, 16, _hoisted_2)) : __props.variant === "section" ? (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, _ctx.$attrs, {
|
|
58
|
-
|
|
56
|
+
class: "sv-skeleton sv-skeleton--divider-text mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50"
|
|
57
|
+
}), null, 16, _hoisted_2)) : __props.variant === "section" ? (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, _ctx.$attrs, {
|
|
58
|
+
"data-testid": __props.dataTestid,
|
|
59
|
+
class: "sv-skeleton sv-skeleton--section"
|
|
60
|
+
}), [
|
|
61
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "sv-skeleton__title h-6 w-40 rounded border border-gray-50 bg-gray-50/50" }, null, -1)),
|
|
59
62
|
createElementVNode("div", {
|
|
60
63
|
class: normalizeClass([
|
|
61
|
-
"mt-1 rounded border border-gray-50 bg-gray-50/50 md:mt-2",
|
|
64
|
+
"sv-skeleton__body mt-1 rounded border border-gray-50 bg-gray-50/50 md:mt-2",
|
|
62
65
|
_ctx.$props.class
|
|
63
66
|
])
|
|
64
67
|
}, null, 2)
|
|
65
68
|
], 16, _hoisted_3)) : (openBlock(), createElementBlock("div", mergeProps({ key: 3 }, _ctx.$attrs, {
|
|
66
69
|
"data-testid": __props.dataTestid,
|
|
67
|
-
class: ["rounded border border-gray-50 bg-gray-50/50", _ctx.$props.class]
|
|
70
|
+
class: ["sv-skeleton rounded border border-gray-50 bg-gray-50/50", _ctx.$props.class]
|
|
68
71
|
}), null, 16, _hoisted_4))
|
|
69
72
|
], 64));
|
|
70
73
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=["data-testid"],r=["data-testid"],s=["data-testid"],a=["data-testid"],n=e.defineComponent({__name:"Skeleton",props:{variant:{type:String},class:{type:String},dataTestid:{type:String}},setup(n){const d=e.useSlots(),o=t=>{if(null==t||!1===t)return!0;if("string"==typeof t||"number"==typeof t)return 0===String(t).trim().length;if(Array.isArray(t))return t.every(o);if(!e.isVNode(t))return!1;const r=t;return r.type===e.Comment||(r.type===e.Text?"string"!=typeof r.children||!r.children.trim():r.type===e.Fragment&&(null==r.children||!!Array.isArray(r.children)&&r.children.every(o)))},l=e.computed(()=>{if(!d.default)return!1;const e=d.default({});return!(!e||0===e.length)&&!e.every(o)});return(d,o)=>l.value?e.renderSlot(d.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},["title"===n.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},d.$attrs,{"data-testid":n.dataTestid,class:"sv-skeleton sv-skeleton--title h-6 w-40 rounded border border-gray-50 bg-gray-50/50"}),null,16,t)):"divider-text"===n.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1},d.$attrs,{"data-testid":n.dataTestid,class:"sv-skeleton sv-skeleton--divider-text mx-auto h-4 w-12 rounded border border-gray-50 bg-gray-50/50"}),null,16,r)):"section"===n.variant?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2},d.$attrs,{"data-testid":n.dataTestid,class:"sv-skeleton sv-skeleton--section"}),[o[0]||(o[0]=e.createElementVNode("div",{class:"sv-skeleton__title h-6 w-40 rounded border border-gray-50 bg-gray-50/50"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["sv-skeleton__body mt-1 rounded border border-gray-50 bg-gray-50/50 md:mt-2",d.$props.class])},null,2)],16,s)):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:3},d.$attrs,{"data-testid":n.dataTestid,class:["sv-skeleton rounded border border-gray-50 bg-gray-50/50",d.$props.class]}),null,16,a))],64))}});exports._sfc_main=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useIncrementalLoading-DoTTXM2Y.js"),t=require("./subscriptions-jelITJcX.js"),i=require("vue"),s=require("./vendor-ui-5pJF5KBP.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("./useActionDispatchProvider-rw9kWeE0.js");const c={class:"sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row"},r={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}},emits:["view-subscription-details","cancel-subscription","renew-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),f=i.computed(()=>_.value&&t.showRenewSubscriptionButton),h=i.computed(()=>t.showViewSubscriptionDetailsButton);return(t,p)=>(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{class:"sv-subscriptions-list__item"},{default:i.withCtx(()=>[i.createElementVNode("div",c,[i.createElementVNode("div",r,[i.createVNode(i.unref(s._sfc_main),{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),{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$5),{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),{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),{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,[h.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$3),{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),v.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$3),{key:1,variant:"outline",color:"gray",class:"sv-action sv-action--secondary sv-subscriptions-list__item-cancel w-full md:w-auto",type:"button",onClick:p[1]||(p[1]=i=>t.$emit("cancel-subscription",{subscriptionId:e.subscription.id}))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)({defaultMessage:"Cancel subscription",description:"The label for the cancel subscription button in the subscriptions block",id:"customer.subscriptions_block.cancel_button_label"})),1)]),_:1})):f.value?(i.openBlock(),i.createBlock(i.unref(s._sfc_main$3),{key:2,variant:"outline",color:"gray",class:"sv-action sv-action--secondary sv-subscriptions-list__item-renew w-full md:w-auto",type:"button",onClick:p[2]||(p[2]=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}},emits:["view-subscription-details","view-all-subscriptions","cancel-subscription","renew-subscription","load-more"],setup(e){const t=e,{$t:o}=s.useIntl(),n=i.computed(()=>t.subscriptions.length>0),c=e=>{if(e)return t.paymentMethods.find(({id:t})=>t===e)},r=i.computed(()=>t.showViewAllButton);return(t,a)=>(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{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":c(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,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))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button","show-cancel-subscription-button","show-renew-subscription-button"]))),128))])):(i.openBlock(),i.createBlock(i.unref(s._sfc_main$1),{key:0,class:"sv-empty-state sv-subscriptions-list__empty"},{default:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main),{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),{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},[r.value?{name:"right",fn:i.withCtx(()=>[i.createVNode(i.unref(s._sfc_main$3),{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 c,r,a,u;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==(c=e.configuration)?void 0:c.showViewAllButton,"show-view-details-button":null==(r=e.configuration)?void 0:r.showViewDetailsButton,"show-cancel-button":null==(a=e.configuration)?void 0:a.showCancelButton,"show-renew-button":null==(u=e.configuration)?void 0:u.showRenewButton,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}})),onLoadMore:n[4]||(n[4]=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"])):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
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
2
|
-
import { c as createSubscriptionsService } from "./subscriptions-
|
|
1
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-Cnzh2mAz.mjs";
|
|
2
|
+
import { c as createSubscriptionsService } from "./subscriptions-ClGIr_aS.mjs";
|
|
3
3
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createSlots, Fragment, renderList } from "vue";
|
|
4
|
-
import { u as useIntl, b as _sfc_main$3, _ as _sfc_main$4, j as _sfc_main$5, e as _sfc_main$6 } from "./vendor-ui-
|
|
5
|
-
import { _ as _sfc_main$7 } from "./Skeleton.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
+
import { u as useIntl, b as _sfc_main$3, _ as _sfc_main$4, j as _sfc_main$5, e as _sfc_main$6 } from "./vendor-ui-C0K3osvz.mjs";
|
|
5
|
+
import { _ as _sfc_main$7 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
6
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BC57-Ufn.mjs";
|
|
7
7
|
function useSubscriptionsList({
|
|
8
8
|
customerId,
|
|
9
9
|
batchSize: pageSize = 15
|
|
@@ -15,14 +15,14 @@ function useSubscriptionsList({
|
|
|
15
15
|
});
|
|
16
16
|
return useIncrementalLoading({ service });
|
|
17
17
|
}
|
|
18
|
-
const _hoisted_1$1 = { class: "flex flex-col gap-4 md:flex-row" };
|
|
19
|
-
const _hoisted_2 = { class: "grow" };
|
|
20
|
-
const _hoisted_3 = { class: "mt-4 flex items-center gap-6" };
|
|
18
|
+
const _hoisted_1$1 = { class: "sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row" };
|
|
19
|
+
const _hoisted_2 = { class: "sv-subscriptions-list__item-content grow" };
|
|
20
|
+
const _hoisted_3 = { class: "sv-subscriptions-list__item-meta mt-4 flex items-center gap-6" };
|
|
21
21
|
const _hoisted_4 = {
|
|
22
22
|
key: 1,
|
|
23
|
-
class: "flex gap-1"
|
|
23
|
+
class: "sv-subscriptions-list__item-next-invoice flex gap-1"
|
|
24
24
|
};
|
|
25
|
-
const _hoisted_5 = { class: "flex flex-col items-center gap-2 md:flex-row" };
|
|
25
|
+
const _hoisted_5 = { class: "sv-subscriptions-list__item-actions flex flex-col items-center gap-2 md:flex-row" };
|
|
26
26
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
27
27
|
__name: "SubscriptionsListItem",
|
|
28
28
|
props: {
|
|
@@ -79,13 +79,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
);
|
|
80
80
|
const isDetailButtonVisible = computed(() => props.showViewSubscriptionDetailsButton);
|
|
81
81
|
return (_ctx, _cache) => {
|
|
82
|
-
return openBlock(), createBlock(unref(_sfc_main$3),
|
|
82
|
+
return openBlock(), createBlock(unref(_sfc_main$3), { class: "sv-subscriptions-list__item" }, {
|
|
83
83
|
default: withCtx(() => [
|
|
84
84
|
createElementVNode("div", _hoisted_1$1, [
|
|
85
85
|
createElementVNode("div", _hoisted_2, [
|
|
86
86
|
createVNode(unref(_sfc_main$4), {
|
|
87
87
|
tag: "h3",
|
|
88
|
-
variant: "heading-2"
|
|
88
|
+
variant: "heading-2",
|
|
89
|
+
class: "sv-subscriptions-list__item-title"
|
|
89
90
|
}, {
|
|
90
91
|
default: withCtx(() => [
|
|
91
92
|
createTextVNode(toDisplayString(subscriptionName.value), 1)
|
|
@@ -96,7 +97,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
96
97
|
key: 0,
|
|
97
98
|
variant: "body-sm",
|
|
98
99
|
tag: "span",
|
|
99
|
-
shade: "lighter"
|
|
100
|
+
shade: "lighter",
|
|
101
|
+
class: "sv-subscriptions-list__item-description"
|
|
100
102
|
}, {
|
|
101
103
|
default: withCtx(() => [
|
|
102
104
|
createTextVNode(toDisplayString(subscriptionDescription.value), 1)
|
|
@@ -107,6 +109,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
107
109
|
__props.paymentMethod ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
108
110
|
key: 0,
|
|
109
111
|
variant: "condensed",
|
|
112
|
+
class: "sv-payment-methods__item",
|
|
110
113
|
"payment-method": __props.paymentMethod
|
|
111
114
|
}, null, 8, ["payment-method"])) : createCommentVNode("", true),
|
|
112
115
|
__props.subscription.next_invoice ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
@@ -147,7 +150,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
147
150
|
isDetailButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
148
151
|
key: 0,
|
|
149
152
|
color: "primary",
|
|
150
|
-
class: "w-full md:w-auto",
|
|
153
|
+
class: "sv-action sv-action--primary sv-subscriptions-list__item-details w-full md:w-auto",
|
|
151
154
|
type: "button",
|
|
152
155
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("view-subscription-details", { subscriptionId: __props.subscription.id }))
|
|
153
156
|
}, {
|
|
@@ -164,7 +167,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
164
167
|
key: 1,
|
|
165
168
|
variant: "outline",
|
|
166
169
|
color: "gray",
|
|
167
|
-
class: "w-full md:w-auto",
|
|
170
|
+
class: "sv-action sv-action--secondary sv-subscriptions-list__item-cancel w-full md:w-auto",
|
|
168
171
|
type: "button",
|
|
169
172
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("cancel-subscription", { subscriptionId: __props.subscription.id }))
|
|
170
173
|
}, {
|
|
@@ -180,7 +183,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
180
183
|
key: 2,
|
|
181
184
|
variant: "outline",
|
|
182
185
|
color: "gray",
|
|
183
|
-
class: "w-full md:w-auto",
|
|
186
|
+
class: "sv-action sv-action--secondary sv-subscriptions-list__item-renew w-full md:w-auto",
|
|
184
187
|
type: "button",
|
|
185
188
|
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("renew-subscription", { subscriptionId: __props.subscription.id }))
|
|
186
189
|
}, {
|
|
@@ -203,7 +206,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
203
206
|
});
|
|
204
207
|
const _hoisted_1 = {
|
|
205
208
|
key: 1,
|
|
206
|
-
class: "grid grid-cols-1 gap-4"
|
|
209
|
+
class: "sv-subscriptions-list__items grid grid-cols-1 gap-4"
|
|
207
210
|
};
|
|
208
211
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
209
212
|
__name: "SubscriptionsList",
|
|
@@ -229,6 +232,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
229
232
|
const isViewAllButtonVisible = computed(() => props.showViewAllButton);
|
|
230
233
|
return (_ctx, _cache) => {
|
|
231
234
|
return openBlock(), createBlock(unref(_sfc_main$3), {
|
|
235
|
+
class: "sv-subscriptions-list",
|
|
232
236
|
"no-spacing": "",
|
|
233
237
|
"no-border": "",
|
|
234
238
|
title: unref($t)(
|
|
@@ -241,7 +245,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
241
245
|
)
|
|
242
246
|
}, createSlots({
|
|
243
247
|
default: withCtx(() => [
|
|
244
|
-
!hasSubscriptions.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
248
|
+
!hasSubscriptions.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
249
|
+
key: 0,
|
|
250
|
+
class: "sv-empty-state sv-subscriptions-list__empty"
|
|
251
|
+
}, {
|
|
245
252
|
default: withCtx(() => [
|
|
246
253
|
createVNode(unref(_sfc_main$4), {
|
|
247
254
|
tag: "h3",
|
|
@@ -298,6 +305,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
298
305
|
variant: "ghost",
|
|
299
306
|
color: "gray",
|
|
300
307
|
"icon-suffix": "arrow_right_alt",
|
|
308
|
+
class: "sv-action sv-action--ghost sv-subscriptions-list__view-all",
|
|
301
309
|
type: "button",
|
|
302
310
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("view-all-subscriptions"))
|
|
303
311
|
}, {
|
|
@@ -334,10 +342,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
334
342
|
return __props.isLoading ? (openBlock(), createBlock(_sfc_main$7, {
|
|
335
343
|
key: 0,
|
|
336
344
|
variant: "section",
|
|
337
|
-
class: "min-h-[100px]",
|
|
345
|
+
class: "sv-subscriptions-list sv-root sv-component sv-loading min-h-[100px]",
|
|
338
346
|
"data-testid": "subscriptions-list-skeleton"
|
|
339
347
|
})) : __props.customer ? (openBlock(), createBlock(_sfc_main$1, {
|
|
340
348
|
key: 1,
|
|
349
|
+
class: "sv-subscriptions-list sv-root sv-component",
|
|
341
350
|
customer: __props.customer,
|
|
342
351
|
subscriptions: __props.subscriptions,
|
|
343
352
|
"payment-methods": __props.paymentMethods,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeClass, createTextVNode, toDisplayString, renderSlot, createCommentVNode } from "vue";
|
|
2
|
-
import { b as _sfc_main$1,
|
|
3
|
-
import { t as trackSentryException } from "./component-CM9g6tbD.mjs";
|
|
2
|
+
import { b as _sfc_main$1, l as _sfc_main$2, _ as _sfc_main$3 } from "./vendor-ui-C0K3osvz.mjs";
|
|
4
3
|
const _hoisted_1 = { class: "flex flex-col items-center py-10" };
|
|
5
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
5
|
__name: "PaymentFeedbackCard",
|
|
@@ -107,13 +106,11 @@ function createReturnUrl({
|
|
|
107
106
|
returnUrl.searchParams.set(PAYMENT_ACCEPTOR_ID_QUERY_STRING, paymentAcceptorId);
|
|
108
107
|
return returnUrl.toString();
|
|
109
108
|
}
|
|
110
|
-
function getAdyenEnvironmentFromPaymentMethodOptionsResponse(paymentMethodsOptionsResponse) {
|
|
109
|
+
function getAdyenEnvironmentFromPaymentMethodOptionsResponse(paymentMethodsOptionsResponse, logger) {
|
|
111
110
|
var _a, _b;
|
|
112
111
|
const environment = (_b = (_a = paymentMethodsOptionsResponse == null ? void 0 : paymentMethodsOptionsResponse.integration.payment_gateway) == null ? void 0 : _a.adyen) == null ? void 0 : _b.environment;
|
|
113
112
|
if (!environment) {
|
|
114
|
-
|
|
115
|
-
Message: "No environment set for adyen advanced flow, defaulted to live"
|
|
116
|
-
});
|
|
113
|
+
logger.warn("ADYEN_INVALID_CONFIGURATION", "No environment set for adyen advanced flow, defaulted to live");
|
|
117
114
|
return "live";
|
|
118
115
|
}
|
|
119
116
|
switch (environment) {
|
|
@@ -130,9 +127,7 @@ function getAdyenEnvironmentFromPaymentMethodOptionsResponse(paymentMethodsOptio
|
|
|
130
127
|
case "LIVE":
|
|
131
128
|
return "live";
|
|
132
129
|
default:
|
|
133
|
-
|
|
134
|
-
Message: `Unsupported environment "${environment}" for adyen advanced flow, defaulted to "live"`
|
|
135
|
-
});
|
|
130
|
+
logger.warn("ADYEN_INVALID_CONFIGURATION", `Unsupported environment "${environment}" for adyen advanced flow, defaulted to "live"`);
|
|
136
131
|
return "live";
|
|
137
132
|
}
|
|
138
133
|
}
|
|
@@ -140,7 +135,8 @@ function getAdyenExpressCheckoutConfiguration({
|
|
|
140
135
|
amount,
|
|
141
136
|
countryCode,
|
|
142
137
|
locale,
|
|
143
|
-
paymentMethodOptionResponse
|
|
138
|
+
paymentMethodOptionResponse,
|
|
139
|
+
logger
|
|
144
140
|
}) {
|
|
145
141
|
return {
|
|
146
142
|
...amount ? { amount: transformToAdyenAmount(amount) } : {},
|
|
@@ -148,7 +144,8 @@ function getAdyenExpressCheckoutConfiguration({
|
|
|
148
144
|
clientKey: getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionResponse),
|
|
149
145
|
countryCode,
|
|
150
146
|
environment: getAdyenEnvironmentFromPaymentMethodOptionsResponse(
|
|
151
|
-
paymentMethodOptionResponse
|
|
147
|
+
paymentMethodOptionResponse,
|
|
148
|
+
logger
|
|
152
149
|
),
|
|
153
150
|
locale,
|
|
154
151
|
paymentMethodsResponse: {
|
|
@@ -159,7 +156,6 @@ function getAdyenExpressCheckoutConfiguration({
|
|
|
159
156
|
function transformObjectToAdyenObject(obj) {
|
|
160
157
|
return obj ? Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, String(value)])) : void 0;
|
|
161
158
|
}
|
|
162
|
-
const loadAdyen = () => import("./auto-DzZuCneB.mjs");
|
|
163
159
|
export {
|
|
164
160
|
PAYMENT_ACCEPTOR_ID_QUERY_STRING as P,
|
|
165
161
|
REDIRECT_RESULT_QUERY_STRING as R,
|
|
@@ -170,7 +166,6 @@ export {
|
|
|
170
166
|
createReturnUrl as d,
|
|
171
167
|
getAdyenExpressCheckoutConfiguration as e,
|
|
172
168
|
getQueryParam as g,
|
|
173
|
-
loadAdyen as l,
|
|
174
169
|
mapAdyenPaymentMethods as m,
|
|
175
170
|
safeUrlRedirect as s,
|
|
176
171
|
transformToAdyenAmount as t
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-5pJF5KBP.js"),n={class:"flex flex-col items-center py-10"},r=e.defineComponent({__name:"PaymentFeedbackCard",props:{status:{default:"success",type:String},title:{type:String}},setup:r=>(o,a)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),null,{default:e.withCtx(()=>[e.createElementVNode("div",n,[e.createVNode(e.unref(t._sfc_main$6),{icon:"success"===r.status?"check_circle":"error",class:e.normalizeClass({"text-green-400":"success"===r.status,"text-red-600":"error"===r.status}),size:"lg"},null,8,["icon","class"]),e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"span",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.title),1)]),_:1}),o.$slots.default?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,tag:"div",variant:"body-sm"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])]),_:3}))}),o=new Set(["https:","http:"]);const a="payment_acceptor_id";function s(e){var t,n;return null==(n=null==(t=e.integration.payment_gateway)?void 0:t.adyen)?void 0:n.public_key}function i(e){const t=new Intl.NumberFormat(void 0,{style:"currency",currency:e.currency}),{maximumFractionDigits:n=10}=t.resolvedOptions();return{value:Math.round(+e.quantity*Math.pow(10,n)),currency:e.currency}}function c(e){var t;return(null==(t=e.options)?void 0:t.flatMap(e=>{return{type:(t=e.adyen).type,name:t.name,...t.issuers?{issuers:t.issuers}:{},...t.brands?{brands:t.brands}:{},...t.funding_source?{fundingSource:t.funding_source}:{},...t.configuration?{configuration:t.configuration}:{}};var t}))??[]}function u(e,t){var n,r;const o=null==(r=null==(n=null==e?void 0:e.integration.payment_gateway)?void 0:n.adyen)?void 0:r.environment;if(!o)return t.warn("ADYEN_INVALID_CONFIGURATION","No environment set for adyen advanced flow, defaulted to live"),"live";switch(o){case"TEST":return"test";case"LIVE_IN":return"live-in";case"LIVE_AU":return"live-au";case"LIVE_US":return"live-us";case"LIVE_APSE":return"live-apse";case"LIVE":return"live";default:return t.warn("ADYEN_INVALID_CONFIGURATION",`Unsupported environment "${o}" for adyen advanced flow, defaulted to "live"`),"live"}}exports.PAYMENT_ACCEPTOR_ID_QUERY_STRING=a,exports.REDIRECT_RESULT_QUERY_STRING="redirectResult",exports._sfc_main=r,exports.createReturnUrl=function({paymentAcceptorId:e,redirectUrl:t=window.location.href}){const n=new URL(t);return n.searchParams.set(a,e),n.toString()},exports.getAdyenClientKeyFromPaymentMethodOptionsResponse=s,exports.getAdyenEnvironmentFromPaymentMethodOptionsResponse=u,exports.getAdyenExpressCheckoutConfiguration=function({amount:e,countryCode:t,locale:n,paymentMethodOptionResponse:r,logger:o}){return{...e?{amount:i(e)}:{},analytics:{enabled:!1},clientKey:s(r),countryCode:t,environment:u(r,o),locale:n,paymentMethodsResponse:{paymentMethods:c(r)}}},exports.getQueryParam=function(e,t=window.location.search){return new URLSearchParams(t).get(e)},exports.mapAdyenPaymentMethods=c,exports.safeUrlRedirect=function(e){const t=function(e){try{const t=new URL(e);return o.has(t.protocol)?e:""}catch{return""}}(e);t&&window.location.replace(t)},exports.transformObjectToAdyenObject=function(e){return e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,String(t)])):void 0},exports.transformToAdyenAmount=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default="/adyen.css";
|