@solvimon/solvimon-web 0.1.0-alpha.7 → 0.1.0-alpha.8
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/ApiStatus-CyNDp_op.mjs +9 -0
- package/dist/ApiStatus-oqvUEWJx.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs} +2 -4
- package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-BTdixy3L.mjs} +2 -11
- package/dist/ContentWithAsideLayout-oAYVrLvL.js +1 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs} +2 -5
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dt_Vb7Wz.mjs} +1 -2
- package/dist/PaymentHistoryBlock-DHM-3fh-.js +1 -0
- package/dist/PaymentHistoryBlock-YzJ6bxKr.mjs +4 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs} +1 -5
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +1 -0
- package/dist/PaymentIntegrationForm-Cl5ua8v8.js +1 -0
- package/dist/PaymentIntegrationForm-ID4QnvA3.mjs +4 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs} +32 -189
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js +1 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs} +5 -31
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs} +4 -7
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +1 -0
- package/dist/adyenLoader-CEH4A2b2.js +1 -0
- package/dist/adyenLoader-gsbzSjYV.mjs +177 -0
- package/dist/component-C2Gc-wsE.js +1 -0
- package/dist/component-CM9g6tbD.mjs +804 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +3 -7
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +9 -17
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -7
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +42 -2659
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -7
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +2 -6
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -7
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +7 -33
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +8 -4824
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -8
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +3 -7
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/{customer-CcQR-JIm.js → customer-C_Hz_npf.js} +1 -1
- package/dist/{customer-CJrpbGX4.mjs → customer-TIi7iZFw.mjs} +1 -1
- package/dist/en-US-CBoPxQwX.mjs +199 -0
- package/dist/en-US-DJq-9dD8.js +1 -0
- package/dist/index-CzL1ZcGi.mjs +85 -0
- package/dist/index-DRdBmZ2-.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +4 -1
- package/dist/{invoices-CNK1Ushv.mjs → invoices-BuVOuTOm.mjs} +2 -15
- package/dist/invoices-DbvwXAsm.js +1 -0
- package/dist/nl-NL-BB7KbK-h.mjs +181 -0
- package/dist/nl-NL-CtU1Lg2F.js +1 -0
- package/dist/paymentMethods-B4AYGf0K.js +1 -0
- package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-Di32oJ39.mjs} +2 -2
- package/dist/{payments-CE9U7aKK.mjs → payments-C5fD1PXB.mjs} +1 -1
- package/dist/{payments-CLt0SExf.js → payments-DeutKq9x.js} +1 -1
- package/dist/{registry-B99ZnfEn.mjs → registry-BLwMl1bK.mjs} +6 -4
- package/dist/registry-CMSmkLcy.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +420 -2388
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -14
- package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
- package/dist/screens/PayInvoice/PayInvoice.es.js +456 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +79 -61
- package/dist/solvimon-web.css +1 -1
- package/dist/source-DKDKBlUm.mjs +179 -0
- package/dist/source-dkMNFWDc.js +1 -0
- package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-mOgjjzUi.mjs} +2 -2
- package/dist/subscriptions-wdMADcQZ.js +1 -0
- package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-B4gszz0Q.mjs} +1 -1
- package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-DfS2P0bd.js} +1 -1
- package/dist/{useCustomer-PthyTFLl.js → useCustomer-DanZzn-l.js} +1 -1
- package/dist/{useCustomer--jycAz--.mjs → useCustomer-cbhDyWJL.mjs} +2 -2
- package/dist/useIncrementalLoading-DFe5Yh8M.js +1 -0
- package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-RRicokf1.mjs} +3 -8
- package/dist/useInvoiceData-CxxHa5R2.js +1 -0
- package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-fS6G_244.mjs} +6 -12
- package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-BQQxcPdz.mjs} +23 -260
- package/dist/useInvoicesList-CtJqmblZ.js +1 -0
- package/dist/usePaymentMethodOptions-2MloZ9bY.mjs +26 -0
- package/dist/usePaymentMethodOptions-D01YWW3G.js +1 -0
- package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-Cm9WdSW0.js} +1 -1
- package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-DZvfWSlx.mjs} +2 -2
- package/dist/usePayments-B13S_yai.js +1 -0
- package/dist/usePayments-D4uGKBsV.mjs +36 -0
- package/dist/usePortal-DJDJNLbo.mjs +12 -0
- package/dist/usePortal-DWJEVkTj.js +1 -0
- package/dist/useService-9fCKPTmu.js +1 -0
- package/dist/useService-BuWWE5ND.mjs +68 -0
- package/dist/useViewport-Bu0cyeSi.mjs +38 -0
- package/dist/useViewport-CKRY1CKR.js +1 -0
- package/dist/useWalletBalanceItems-B53Gkjro.mjs +106 -0
- package/dist/useWalletBalanceItems-BMaVT4TW.js +1 -0
- package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
- package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
- package/dist/vendor-ui-BwxuPDg8.mjs +28598 -0
- package/dist/vendor-ui-Ce_Yp7xA.js +1 -0
- package/package.json +17 -10
- package/dist/Alert.vue.es-DMPvSykx.js +0 -1
- package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
- package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
- package/dist/Amount.vue.es-h8wulbBG.js +0 -1
- package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
- package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
- package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
- package/dist/Button.vue.es-BC4_TItq.js +0 -1
- package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
- package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
- package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
- package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
- package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
- package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
- package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
- package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
- package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
- package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
- package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
- package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
- package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
- package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
- package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
- package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
- package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
- package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
- package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
- package/dist/Section.vue.es-BuzTXRLP.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
- package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
- package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
- package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
- package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
- package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
- package/dist/_Uint8Array-DxISR7XF.js +0 -1
- package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
- package/dist/_flatRest.es-dFffnTpX.js +0 -1
- package/dist/api.es-B4qAAJKr.js +0 -1
- package/dist/api.es-UkfpLiLL.mjs +0 -83
- package/dist/cloneDeep-Hs8Pp07F.js +0 -1
- package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
- package/dist/cn.es-C7xoIs3C.js +0 -1
- package/dist/cn.es-tfxVlz02.mjs +0 -3191
- package/dist/component-ZRZIt3ZW.js +0 -1
- package/dist/component-dpA83LIN.mjs +0 -6569
- package/dist/countryData.es--zJAd6LA.mjs +0 -252
- package/dist/countryData.es-D3MFzU92.js +0 -1
- package/dist/customer.es-D42Md24r.js +0 -1
- package/dist/customer.es-LIW2YmLL.mjs +0 -30
- package/dist/formatting.es-9hM8aHSg.js +0 -1
- package/dist/formatting.es-D5H_ySFv.mjs +0 -68
- package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
- package/dist/index-2jo9BSPM.js +0 -1
- package/dist/index-BFZ0dPh9.mjs +0 -179
- package/dist/index-CI71bVGE.mjs +0 -2521
- package/dist/index-CWSXne1Q.js +0 -1
- package/dist/index-D3v7hAtc.mjs +0 -253
- package/dist/index-WLSPwi90.js +0 -1
- package/dist/index.es-BBJF2O2l.js +0 -1
- package/dist/index.es-LCAKs4tH.mjs +0 -438
- package/dist/invoices-3kVHsAXr.js +0 -1
- package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
- package/dist/isEmpty.es-Dycf-CD_.js +0 -1
- package/dist/paymentMethods-DZRf0WRl.js +0 -1
- package/dist/pick.es-BgDAfhAl.js +0 -1
- package/dist/pick.es-DdVOyp0Q.mjs +0 -45
- package/dist/registry-ClZ43bQn.js +0 -1
- package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
- package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
- package/dist/subscriptions-CS8HTxzC.js +0 -1
- package/dist/typeGuards.es-C4nR5FkL.js +0 -1
- package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
- package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
- package/dist/useInvoiceData-DvQO_nKz.js +0 -1
- package/dist/useInvoicesList-CHkwSNO9.js +0 -1
- package/dist/useService-B67YWAcN.js +0 -1
- package/dist/useService-DG_zedHV.mjs +0 -282
- package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
- package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.ApiStatus={Initial:"INITIAL",Loading:"LOADING",Failed:"FAILED",Done:"DONE"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.js"),i=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),o=require("./useActionDispatchProvider-DfS2P0bd.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:r}=t.useIntl(),{dispatchAction:s}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,variant:"section",class:"min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:1,customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",onClick:a[0]||(a[0]=t=>e.unref(s)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({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,9 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as _sfc_main$2 } from "./CustomerBillingInformation.vue.es-DBMl01Es.mjs";
|
|
4
|
-
import { a as useIntl } from "./component-dpA83LIN.mjs";
|
|
2
|
+
import { u as useIntl, c as _sfc_main$2, e as _sfc_main$3 } from "./vendor-ui-BwxuPDg8.mjs";
|
|
5
3
|
import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
|
|
6
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-B4gszz0Q.mjs";
|
|
7
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
6
|
__name: "BillingInformation",
|
|
9
7
|
props: {
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as PORTAL_INJECTION_KEY } from "./component-dpA83LIN.mjs";
|
|
3
|
-
function usePortal() {
|
|
4
|
-
const portal = inject(PORTAL_INJECTION_KEY);
|
|
5
|
-
if (!portal) {
|
|
6
|
-
throw new Error("PortalProvider is not provided");
|
|
7
|
-
}
|
|
8
|
-
return portal;
|
|
9
|
-
}
|
|
1
|
+
import { openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode } from "vue";
|
|
10
2
|
const _export_sfc = (sfc, props) => {
|
|
11
3
|
const target = sfc.__vccOpts || sfc;
|
|
12
4
|
for (const [key, val] of props) {
|
|
@@ -37,6 +29,5 @@ function _sfc_render(_ctx, _cache) {
|
|
|
37
29
|
}
|
|
38
30
|
const ContentWithAsideLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
39
31
|
export {
|
|
40
|
-
ContentWithAsideLayout as C
|
|
41
|
-
usePortal as u
|
|
32
|
+
ContentWithAsideLayout as C
|
|
42
33
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t={class:"grid w-full grid-cols-1 gap-4"},o={key:0},r={class:"flex flex-col items-start gap-6 md:flex-row"},l={class:"grid w-full grow grid-cols-1 gap-4 md:w-auto"},s={class:"grid w-full grid-cols-1 gap-4 md:w-80 md:shrink-0"};const d=((e,t)=>{const o=e.__vccOpts||e;for(const[r,l]of t)o[r]=l;return o})({},[["render",function(d,c){return e.openBlock(),e.createElementBlock("div",t,[d.$slots.header?(e.openBlock(),e.createElementBlock("div",o,[e.renderSlot(d.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",r,[e.createElementVNode("div",l,[e.renderSlot(d.$slots,"content")]),e.createElementVNode("aside",s,[e.renderSlot(d.$slots,"aside")])])])}]]);exports.ContentWithAsideLayout=d;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createElementBlock, Fragment, renderList, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as _sfc_main$3 } from "./PaymentMethod.vue.es-nXZoQjG3.mjs";
|
|
4
|
-
import { _ as _sfc_main$5 } from "./Button.vue.es-6sBk5tBL.mjs";
|
|
5
|
-
import { a as useIntl, _ as _sfc_main$4 } from "./component-dpA83LIN.mjs";
|
|
2
|
+
import { u as useIntl, b as _sfc_main$2, j as _sfc_main$3, _ as _sfc_main$4, e as _sfc_main$5 } from "./vendor-ui-BwxuPDg8.mjs";
|
|
6
3
|
import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
|
|
7
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-B4gszz0Q.mjs";
|
|
8
5
|
const _hoisted_1 = {
|
|
9
6
|
key: 0,
|
|
10
7
|
class: "flex flex-col gap-2"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),n=require("./useActionDispatchProvider-DfS2P0bd.js"),a={key:0,class:"flex flex-col gap-2"},i=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(o){const n=o,{$t:i}=t.useIntl(),d=e.computed(()=>n.paymentMethods.length>0);return(n,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"no-spacing":"","no-border":"",title:e.unref(i)({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(o.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.paymentMethods,o=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:o.id},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$5),{"payment-method":o},null,8,["payment-method"])]),_:2},1024))),128))])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({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}),o.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,class:"mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:s[1]||(s[1]=e=>n.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({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},[o.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",type:"button",onClick:s[0]||(s[0]=e=>n.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({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"]))}}),d=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:a}=n.useActionDispatchProvider();return(n,d)=>{var s,r;return t.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(i,{key:1,"is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(s=t.configuration)?void 0:s.showViewAllButton,"show-add-button":null==(r=t.configuration)?void 0:r.showAddButton,onViewAllPaymentMethods:d[0]||(d[0]=t=>e.unref(a)({action:"view-all-payment-methods"})),onAddPaymentMethod:d[1]||(d[1]=t=>e.unref(a)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.js"),i={key:0,class:"flex flex-col gap-2"},o=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(o){const{$t:n,formatDate:a}=t.useIntl();return(c,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{title:e.unref(n)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[o.invoice?(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),o.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:o.invoice.invoice_date,format:"date",timezone:o.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),o.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:o.invoice.due_date,format:"date",timezone:o.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=o;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementBlock, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { a as useIntl, _ as _sfc_main$2 } from "./component-dpA83LIN.mjs";
|
|
2
|
+
import { u as useIntl, b as _sfc_main$1, _ as _sfc_main$2 } from "./vendor-ui-BwxuPDg8.mjs";
|
|
4
3
|
const _hoisted_1 = {
|
|
5
4
|
key: 0,
|
|
6
5
|
class: "flex flex-col gap-2"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js");exports.default=e._sfc_main;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$2 } from "./
|
|
3
|
-
import { _ as _sfc_main$4 } from "./PaymentMethod.vue.es-nXZoQjG3.mjs";
|
|
4
|
-
import { f as formatEnum } from "./formatting.es-D5H_ySFv.mjs";
|
|
5
|
-
import { _ as _sfc_main$3 } from "./Chip.vue.es-DcW2CjUA.mjs";
|
|
6
|
-
import { a as useIntl, _ as _sfc_main$1 } from "./component-dpA83LIN.mjs";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$1, b as _sfc_main$2, f as _sfc_main$3, h as formatEnum, j as _sfc_main$4 } from "./vendor-ui-BwxuPDg8.mjs";
|
|
7
3
|
const _hoisted_1 = { class: "flex flex-col-reverse gap-1" };
|
|
8
4
|
const _hoisted_2 = { class: "flex justify-between items-center mb-2" };
|
|
9
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.js"),a={class:"flex flex-col-reverse gap-1"},n={class:"flex justify-between items-center mb-2"},r=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(r){const{$t:o,formatDate:i}=t.useIntl(),s={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(m,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(t._sfc_main),{tag:"h2",variant:"heading-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:a.id,class:"mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",n,[e.createVNode(e.unref(t._sfc_main),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$4),{color:s[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$5),{key:0,"payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:r.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js");exports.default=e._sfc_main;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock,
|
|
2
|
-
import { _ as _sfc_main$
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-C-ApE-G4.mjs";
|
|
9
|
-
import { i as isEqual } from "./useService-DG_zedHV.mjs";
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, withCtx, unref, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, inject, ref, onMounted, onBeforeUnmount, watch, createElementBlock, Fragment, renderList } from "vue";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$5, t as _sfc_main$6, v as formatAmount, e as _sfc_main$7, Q as _sfc_main$8 } from "./vendor-ui-BwxuPDg8.mjs";
|
|
3
|
+
import { i as isEqual } from "./useService-BuWWE5ND.mjs";
|
|
4
|
+
import { _ as _sfc_main$4, l as loadAdyen, g as getQueryParam, t as transformToAdyenAmount, m as mapAdyenPaymentMethods, a as getAdyenEnvironmentFromPaymentMethodOptionsResponse, b as getAdyenClientKeyFromPaymentMethodOptionsResponse, R as REDIRECT_RESULT_QUERY_STRING, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, c as transformObjectToAdyenObject, d as createReturnUrl } from "./adyenLoader-gsbzSjYV.mjs";
|
|
5
|
+
import { c as createPaymentsService } from "./payments-C5fD1PXB.mjs";
|
|
6
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-Di32oJ39.mjs";
|
|
7
|
+
import { E as EXPERIMENTAL_FEATURE_INJECTION_KEY, a as useLogger } from "./component-CM9g6tbD.mjs";
|
|
10
8
|
const getOverriddenTranslations = (variant) => {
|
|
11
9
|
let result = {};
|
|
12
10
|
if (variant === "TOKENIZE") {
|
|
@@ -139,53 +137,6 @@ const getOverriddenTranslations = (variant) => {
|
|
|
139
137
|
}
|
|
140
138
|
return result;
|
|
141
139
|
};
|
|
142
|
-
const _hoisted_1$1 = { class: "flex flex-col items-center py-10" };
|
|
143
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
144
|
-
__name: "PaymentFeedbackCard",
|
|
145
|
-
props: {
|
|
146
|
-
status: { default: "success", type: String },
|
|
147
|
-
title: { type: String }
|
|
148
|
-
},
|
|
149
|
-
setup(__props) {
|
|
150
|
-
return (_ctx, _cache) => {
|
|
151
|
-
return openBlock(), createBlock(unref(_sfc_main$5), null, {
|
|
152
|
-
default: withCtx(() => [
|
|
153
|
-
createElementVNode("div", _hoisted_1$1, [
|
|
154
|
-
createVNode(unref(_sfc_main$6), {
|
|
155
|
-
icon: __props.status === "success" ? "check_circle" : "error",
|
|
156
|
-
class: normalizeClass({
|
|
157
|
-
"text-green-400": __props.status === "success",
|
|
158
|
-
"text-red-600": __props.status === "error"
|
|
159
|
-
}),
|
|
160
|
-
size: "lg"
|
|
161
|
-
}, null, 8, ["icon", "class"]),
|
|
162
|
-
createVNode(unref(_sfc_main$7), {
|
|
163
|
-
variant: "heading-3",
|
|
164
|
-
tag: "span",
|
|
165
|
-
class: "mt-2"
|
|
166
|
-
}, {
|
|
167
|
-
default: withCtx(() => [
|
|
168
|
-
createTextVNode(toDisplayString(__props.title), 1)
|
|
169
|
-
]),
|
|
170
|
-
_: 1
|
|
171
|
-
}),
|
|
172
|
-
_ctx.$slots.default ? (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
173
|
-
key: 0,
|
|
174
|
-
tag: "div",
|
|
175
|
-
variant: "body-sm"
|
|
176
|
-
}, {
|
|
177
|
-
default: withCtx(() => [
|
|
178
|
-
renderSlot(_ctx.$slots, "default")
|
|
179
|
-
]),
|
|
180
|
-
_: 3
|
|
181
|
-
})) : createCommentVNode("", true)
|
|
182
|
-
])
|
|
183
|
-
]),
|
|
184
|
-
_: 3
|
|
185
|
-
});
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
140
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
190
141
|
__name: "PaymentCompletedCard",
|
|
191
142
|
props: {
|
|
@@ -212,7 +163,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
212
163
|
title: title.value
|
|
213
164
|
}, {
|
|
214
165
|
default: withCtx(() => [
|
|
215
|
-
__props.amount ? (openBlock(), createBlock(unref(_sfc_main$
|
|
166
|
+
__props.amount ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
216
167
|
key: 0,
|
|
217
168
|
variant: "body-sm",
|
|
218
169
|
class: "mt-1"
|
|
@@ -223,7 +174,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
223
174
|
]),
|
|
224
175
|
_: 1
|
|
225
176
|
})) : createCommentVNode("", true),
|
|
226
|
-
createVNode(unref(_sfc_main$
|
|
177
|
+
createVNode(unref(_sfc_main$5), {
|
|
227
178
|
variant: "body-xs",
|
|
228
179
|
shade: "lighter"
|
|
229
180
|
}, {
|
|
@@ -299,7 +250,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
299
250
|
}, {
|
|
300
251
|
default: withCtx(() => [
|
|
301
252
|
createElementVNode("div", _hoisted_1, [
|
|
302
|
-
createVNode(unref(_sfc_main$
|
|
253
|
+
createVNode(unref(_sfc_main$5), {
|
|
303
254
|
variant: "body-xs",
|
|
304
255
|
shade: "lighter",
|
|
305
256
|
class: "mt-3"
|
|
@@ -309,7 +260,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
309
260
|
]),
|
|
310
261
|
_: 1
|
|
311
262
|
}),
|
|
312
|
-
errorConfig.value.isReloadButtonVisible ? (openBlock(), createBlock(unref(_sfc_main$
|
|
263
|
+
errorConfig.value.isReloadButtonVisible ? (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
313
264
|
key: 0,
|
|
314
265
|
type: "button",
|
|
315
266
|
color: "gray",
|
|
@@ -332,103 +283,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
332
283
|
};
|
|
333
284
|
}
|
|
334
285
|
});
|
|
335
|
-
function getQueryParam(name, locationSearch = window.location.search) {
|
|
336
|
-
const currentUrl = new URLSearchParams(locationSearch);
|
|
337
|
-
return currentUrl.get(name);
|
|
338
|
-
}
|
|
339
|
-
const PAYMENT_ACCEPTOR_ID_QUERY_STRING = "payment_acceptor_id";
|
|
340
|
-
const REDIRECT_RESULT_QUERY_STRING = "redirectResult";
|
|
341
|
-
function getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionResponse) {
|
|
342
|
-
var _a, _b;
|
|
343
|
-
return (_b = (_a = paymentMethodOptionResponse.integration.payment_gateway) == null ? void 0 : _a.adyen) == null ? void 0 : _b.public_key;
|
|
344
|
-
}
|
|
345
|
-
function transformToAdyenAmount(amount) {
|
|
346
|
-
const formatter = new Intl.NumberFormat(void 0, {
|
|
347
|
-
style: "currency",
|
|
348
|
-
currency: amount.currency
|
|
349
|
-
});
|
|
350
|
-
const { maximumFractionDigits = 10 } = formatter.resolvedOptions();
|
|
351
|
-
return {
|
|
352
|
-
value: Math.round(+amount.quantity * Math.pow(10, maximumFractionDigits)),
|
|
353
|
-
currency: amount.currency
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
function mapAdyenPaymentMethods(paymentMethodOptionResponse) {
|
|
357
|
-
var _a;
|
|
358
|
-
return ((_a = paymentMethodOptionResponse.options) == null ? void 0 : _a.flatMap(
|
|
359
|
-
(adyenPaymentMethodOption) => mapAdyenPaymentMethod(adyenPaymentMethodOption.adyen)
|
|
360
|
-
)) ?? [];
|
|
361
|
-
}
|
|
362
|
-
function mapAdyenPaymentMethod(adyen) {
|
|
363
|
-
return {
|
|
364
|
-
type: adyen.type,
|
|
365
|
-
name: adyen.name,
|
|
366
|
-
...adyen.issuers ? { issuers: adyen.issuers } : {},
|
|
367
|
-
...adyen.brands ? { brands: adyen.brands } : {},
|
|
368
|
-
...adyen.funding_source ? { fundingSource: adyen.funding_source } : {},
|
|
369
|
-
...adyen.configuration ? { configuration: adyen.configuration } : {}
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
function createReturnUrl({
|
|
373
|
-
paymentAcceptorId,
|
|
374
|
-
redirectUrl = window.location.href
|
|
375
|
-
}) {
|
|
376
|
-
const returnUrl = new URL(redirectUrl);
|
|
377
|
-
returnUrl.searchParams.set(PAYMENT_ACCEPTOR_ID_QUERY_STRING, paymentAcceptorId);
|
|
378
|
-
return returnUrl.toString();
|
|
379
|
-
}
|
|
380
|
-
function getAdyenEnvironmentFromPaymentMethodOptionsResponse(paymentMethodsOptionsResponse) {
|
|
381
|
-
var _a, _b;
|
|
382
|
-
const environment = (_b = (_a = paymentMethodsOptionsResponse == null ? void 0 : paymentMethodsOptionsResponse.integration.payment_gateway) == null ? void 0 : _a.adyen) == null ? void 0 : _b.environment;
|
|
383
|
-
if (!environment) {
|
|
384
|
-
trackSentryException(void 0, {
|
|
385
|
-
Message: "No environment set for adyen advanced flow, defaulted to live"
|
|
386
|
-
});
|
|
387
|
-
return "live";
|
|
388
|
-
}
|
|
389
|
-
switch (environment) {
|
|
390
|
-
case "TEST":
|
|
391
|
-
return "test";
|
|
392
|
-
case "LIVE_IN":
|
|
393
|
-
return "live-in";
|
|
394
|
-
case "LIVE_AU":
|
|
395
|
-
return "live-au";
|
|
396
|
-
case "LIVE_US":
|
|
397
|
-
return "live-us";
|
|
398
|
-
case "LIVE_APSE":
|
|
399
|
-
return "live-apse";
|
|
400
|
-
case "LIVE":
|
|
401
|
-
return "live";
|
|
402
|
-
default:
|
|
403
|
-
trackSentryException(void 0, {
|
|
404
|
-
Message: `Unsupported environment "${environment}" for adyen advanced flow, defaulted to "live"`
|
|
405
|
-
});
|
|
406
|
-
return "live";
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
function getAdyenExpressCheckoutConfiguration({
|
|
410
|
-
amount,
|
|
411
|
-
countryCode,
|
|
412
|
-
locale,
|
|
413
|
-
paymentMethodOptionResponse
|
|
414
|
-
}) {
|
|
415
|
-
return {
|
|
416
|
-
...amount ? { amount: transformToAdyenAmount(amount) } : {},
|
|
417
|
-
analytics: { enabled: false },
|
|
418
|
-
clientKey: getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionResponse),
|
|
419
|
-
countryCode,
|
|
420
|
-
environment: getAdyenEnvironmentFromPaymentMethodOptionsResponse(
|
|
421
|
-
paymentMethodOptionResponse
|
|
422
|
-
),
|
|
423
|
-
locale,
|
|
424
|
-
paymentMethodsResponse: {
|
|
425
|
-
paymentMethods: mapAdyenPaymentMethods(paymentMethodOptionResponse)
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
function transformObjectToAdyenObject(obj) {
|
|
430
|
-
return obj ? Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, String(value)])) : void 0;
|
|
431
|
-
}
|
|
432
286
|
const useExperimentalFeature = () => {
|
|
433
287
|
const experimentalFeature = inject(EXPERIMENTAL_FEATURE_INJECTION_KEY);
|
|
434
288
|
return experimentalFeature;
|
|
@@ -442,13 +296,6 @@ function filterOutExpressPaymentMethods(paymentMethods) {
|
|
|
442
296
|
})
|
|
443
297
|
);
|
|
444
298
|
}
|
|
445
|
-
function useLogger() {
|
|
446
|
-
const logger = inject(LOGGER_PROVIDER_INJECTION_KEY, null);
|
|
447
|
-
if (logger) return logger;
|
|
448
|
-
const noop = () => {
|
|
449
|
-
};
|
|
450
|
-
return { debug: noop, info: noop, warn: noop, error: noop, capture: noop };
|
|
451
|
-
}
|
|
452
299
|
const PAYMENT_GATEWAY_VARIANT_ADYEN = "ADYEN";
|
|
453
300
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
454
301
|
__name: "PaymentIntegrationFormAdyen",
|
|
@@ -459,7 +306,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
459
306
|
paymentMethodOptionResponseEntry: { type: Object },
|
|
460
307
|
variant: { type: String },
|
|
461
308
|
selected: { type: Boolean },
|
|
462
|
-
onSelect: { type: Function },
|
|
463
309
|
amount: { type: Object },
|
|
464
310
|
validateOnSubmit: { type: Function, default: () => Promise.resolve(true) },
|
|
465
311
|
context: { type: Object },
|
|
@@ -529,7 +375,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
529
375
|
}
|
|
530
376
|
},
|
|
531
377
|
openFirstPaymentMethod: props.selected,
|
|
532
|
-
onSelect: () =>
|
|
378
|
+
onSelect: ({ props: { type } }) => {
|
|
379
|
+
if (!type) return;
|
|
380
|
+
emit("select", { paymentMethodType: type, paymentGatewayVariant: "ADYEN" });
|
|
381
|
+
},
|
|
533
382
|
onReady: () => emit("ready")
|
|
534
383
|
}
|
|
535
384
|
};
|
|
@@ -539,7 +388,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
539
388
|
try {
|
|
540
389
|
await unmountDropIn();
|
|
541
390
|
const [adyenModule, { default: adyenCss }] = await Promise.all([
|
|
542
|
-
|
|
391
|
+
loadAdyen(),
|
|
543
392
|
import("./adyen-51SvcyqV.mjs")
|
|
544
393
|
]);
|
|
545
394
|
const { AdyenCheckout, Dropin } = adyenModule;
|
|
@@ -979,7 +828,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
979
828
|
countryCode: { type: String },
|
|
980
829
|
invoiceId: { type: String },
|
|
981
830
|
amount: { type: Object },
|
|
982
|
-
successRedirectUrl: { type: String },
|
|
983
831
|
selectedOption: { type: String },
|
|
984
832
|
validateOnSubmit: { type: Function },
|
|
985
833
|
forceStorePaymentMethod: { type: Boolean }
|
|
@@ -993,9 +841,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
993
841
|
const selectedIntegration = ref();
|
|
994
842
|
const integrationRefs = ref(/* @__PURE__ */ new Map());
|
|
995
843
|
const showIntegrationError = ref(false);
|
|
996
|
-
function handleSelect(
|
|
997
|
-
|
|
844
|
+
function handleSelect({
|
|
845
|
+
paymentGatewayVariant,
|
|
846
|
+
paymentMethodType
|
|
847
|
+
}) {
|
|
998
848
|
showIntegrationError.value = false;
|
|
849
|
+
emit("select", { paymentGatewayVariant, paymentMethodType });
|
|
999
850
|
}
|
|
1000
851
|
function submit() {
|
|
1001
852
|
var _a, _b;
|
|
@@ -1005,12 +856,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1005
856
|
}
|
|
1006
857
|
(_b = integrationRefs.value.get(selectedIntegration.value)) == null ? void 0 : _b.submit();
|
|
1007
858
|
}
|
|
1008
|
-
const handlePaymentSuccess = () => {
|
|
1009
|
-
if (props.successRedirectUrl) {
|
|
1010
|
-
window.location.href = props.successRedirectUrl;
|
|
1011
|
-
}
|
|
1012
|
-
emit("payment-success");
|
|
1013
|
-
};
|
|
1014
859
|
return (_ctx, _cache) => {
|
|
1015
860
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1016
861
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.paymentMethodOptions, (paymentMethodOption) => {
|
|
@@ -1021,7 +866,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1021
866
|
((_a = paymentMethodOption.integration.payment_gateway) == null ? void 0 : _a.variant) === "ADYEN" ? (openBlock(), createBlock(_sfc_main$1, {
|
|
1022
867
|
key: 0,
|
|
1023
868
|
ref_for: true,
|
|
1024
|
-
ref: (el) => integrationRefs.value.set(
|
|
869
|
+
ref: (el) => integrationRefs.value.set(
|
|
870
|
+
paymentMethodOption.integration.payment_gateway.variant,
|
|
871
|
+
el
|
|
872
|
+
),
|
|
1025
873
|
context: __props.context,
|
|
1026
874
|
"payment-method-option-response-entry": paymentMethodOption,
|
|
1027
875
|
"country-code": __props.countryCode,
|
|
@@ -1029,17 +877,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1029
877
|
variant: __props.variant,
|
|
1030
878
|
amount: __props.amount,
|
|
1031
879
|
"invoice-id": __props.invoiceId,
|
|
1032
|
-
selected: selectedIntegration.value ===
|
|
880
|
+
selected: selectedIntegration.value === paymentMethodOption.integration.payment_gateway.variant,
|
|
1033
881
|
"validate-on-submit": __props.validateOnSubmit,
|
|
1034
882
|
"force-store-payment-method": __props.forceStorePaymentMethod,
|
|
1035
|
-
onSelect:
|
|
1036
|
-
onPaymentFailed: _cache[
|
|
1037
|
-
onPaymentSuccess:
|
|
1038
|
-
onReady: _cache[2] || (_cache[2] = ($event) => emit("ready"))
|
|
883
|
+
onSelect: handleSelect,
|
|
884
|
+
onPaymentFailed: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("payment-failed", $event)),
|
|
885
|
+
onPaymentSuccess: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("payment-success")),
|
|
886
|
+
onReady: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("ready"))
|
|
1039
887
|
}, null, 8, ["context", "payment-method-option-response-entry", "country-code", "customer-id", "variant", "amount", "invoice-id", "selected", "validate-on-submit", "force-store-payment-method"])) : createCommentVNode("", true)
|
|
1040
888
|
], 64);
|
|
1041
889
|
}), 128)),
|
|
1042
|
-
showIntegrationError.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
890
|
+
showIntegrationError.value ? (openBlock(), createBlock(unref(_sfc_main$8), {
|
|
1043
891
|
key: 0,
|
|
1044
892
|
variant: "error",
|
|
1045
893
|
class: "mt-2"
|
|
@@ -1058,10 +906,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1058
906
|
}
|
|
1059
907
|
});
|
|
1060
908
|
export {
|
|
1061
|
-
_sfc_main as _
|
|
1062
|
-
_sfc_main$4 as a,
|
|
1063
|
-
createReturnUrl as c,
|
|
1064
|
-
getAdyenExpressCheckoutConfiguration as g,
|
|
1065
|
-
transformObjectToAdyenObject as t,
|
|
1066
|
-
useLogger as u
|
|
909
|
+
_sfc_main as _
|
|
1067
910
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.js"),n=require("./useService-9fCKPTmu.js"),a=require("./adyenLoader-CEH4A2b2.js"),o=require("./payments-DeutKq9x.js"),r=require("./paymentMethods-B4AYGf0K.js"),i=require("./component-C2Gc-wsE.js"),d=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},c=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String}},setup(n){const o=n,{$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(a._sfc_main,{status:"success",title:i.value},{default:e.withCtx(()=>[n.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$11),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.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"]))}}),s={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}},m={class:"flex flex-col items-center gap-6"},u=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(n){const o=n,{$t:r}=t.useIntl(),i=e.computed(()=>s[o.error.code]),d=()=>{window.location.reload()};return(n,o)=>(e.openBlock(),e.createBlock(a._sfc_main,{status:"error",title:i.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",m,[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"]))}}),p=["applepay"];const l="ADYEN",y=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(s,{expose:m,emit:y}){let h=null,_=null;const f=s,g=y;m({submit:function(){try{null==h||h.submit()}catch(e){}}});const v=e.ref(),E=e.ref(!1),A=e.ref(),I=i.useLogger(),{locale:R}=t.useIntl(),{authorizePayment:k,getPaymentDetails:b}=o.createPaymentsService(),{tokenizePaymentMethod:T}=r.createPaymentMethodsService(),P=e.inject(i.EXPERIMENTAL_FEATURE_INJECTION_KEY),O=e.computed(()=>"TOKENIZE"===f.variant);async function N(){var e;const t=a.transformToAdyenAmount(f.amount),n=(null==(e=null==P?void 0:P.value)?void 0:e["express-checkout"])?function(e){return e.filter(e=>!p.some(t=>{var n;return t===(null==(n=e.type)?void 0:n.toLowerCase())}))}(a.mapAdyenPaymentMethods(f.paymentMethodOptionResponseEntry)):a.mapAdyenPaymentMethods(f.paymentMethodOptionResponseEntry);return{checkoutConfig:{amount:t,clientKey:a.getAdyenClientKeyFromPaymentMethodOptionsResponse(f.paymentMethodOptionResponseEntry),environment:a.getAdyenEnvironmentFromPaymentMethodOptionsResponse(f.paymentMethodOptionResponseEntry),locale:R,translations:d(f.variant),countryCode:f.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:n},onSubmit:C,onAdditionalDetails:S,onPaymentCompleted:D,onPaymentFailed:M,onError:L,showPayButton:O.value},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!f.forceStorePaymentMethod&&"AUTHORIZE"===f.variant},paypal:{intent:t.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:f.selected,onSelect:({props:{type:e}})=>{e&&g("select",{paymentMethodType:e,paymentGatewayVariant:"ADYEN"})},onReady:()=>g("ready")}}}async function w(){if(v.value)try{await B();const[e,{default:t}]=await Promise.all([a.loadAdyen(),Promise.resolve().then(()=>require("./adyen-DZsyEXkw.js"))]),{AdyenCheckout:n,Dropin:o}=e,{checkoutConfig:r,dropInConfig:i}=await N();_=await n(r),h=new o(_,i).mount(v.value),function(e){var t;const n=null==(t=v.value)?void 0:t.getRootNode();if(n instanceof ShadowRoot){const t=document.createElement("style");t.textContent=`${e}\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"===f.variant&&(t.textContent+="\n .adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {\n display: none;\n }\n "),n.appendChild(t)}}(t)}catch(e){I.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function B(){h&&(h.unmount(),h=null),v.value&&(v.value.innerHTML="")}function C(...e){const[t,n,o]=e;f.validateOnSubmit().then(e=>{if(!e)return;const n=f.paymentMethodOptionResponseEntry.payment_acceptor.id,r={risk_data:a.transformObjectToAdyenObject(t.data.riskData),payment_method:a.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:a.transformObjectToAdyenObject(t.data.browserInfo)};if("AUTHORIZE"===f.variant){const e=a.createReturnUrl({paymentAcceptorId:f.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});return void k({payment_acceptor_id:n,...f.customerId?{customer_id:f.customerId}:{},payment_gateway_variant:l,adyen:{...r,store_payment_method:f.forceStorePaymentMethod||t.data.storePaymentMethod},amount:f.amount,...f.context?{context:f.context}:{},return_url:e}).then(e=>{const a=t.data.paymentMethod.type;if(["FAILURE","REFUSED"].includes(e.status))return I.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e}),void o.resolve({resultCode:"Error"});if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===l){const t=x(e,a);return t?(h.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void I.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e})}E.value=!0,o.resolve({resultCode:"Authorised"})}).catch(e=>{I.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e}),o.resolve({resultCode:"Error"})})}if("TOKENIZE"===f.variant){const e=a.createReturnUrl({paymentAcceptorId:f.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!f.customerId)return void I.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${n}`);T({customer_id:f.customerId,payment_acceptor_id:n,payment_gateway_variant:l,adyen:r,return_url:e}).then(e=>{const a=t.data.paymentMethod.type;if(["FAILURE","REFUSED"].includes(e.status))return I.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e}),void o.resolve({resultCode:"Error"});if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===l){const t=x(e,a);return t?(h.handleAction(t),void o.resolve({resultCode:e.action.adyen.result_code,action:t})):void I.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e})}E.value=!0,o.resolve({resultCode:"Authorised"})}).catch(e=>{I.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e}),o.resolve({resultCode:"Error"})})}}).catch(()=>{})}function x(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 S(...e){const[t]=e,n=t.data.details,a=t.data.paymentData;if(f.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:f.paymentMethodOptionResponseEntry.payment_acceptor.id});var o;const r={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};g("payment-failed",r),A.value=r}function M(...e){const[t]=e,n={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};g("payment-failed",n),A.value=n}function D(...e){const[,t]=e;null==t||t.unmount(),g("payment-success")}function L(...e){const[t,n]=e;if("CANCEL"===t.name)return;const a={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};I.error("INTEGRATION_ERROR","Something went wrong",{error:t}),A.value=a,null==n||n.unmount()}function F({detailsResult:e,threeDSResult:t,redirectResult:n,paymentDataResult:a,paymentAcceptorId:o}){b({paymentAcceptorId:o,paymentGatewayVariant:l,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||g("payment-success"):g("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:e})}).catch(e=>{I.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:e})})}return e.onMounted(()=>{w(),function(){const e=a.getQueryParam(a.REDIRECT_RESULT_QUERY_STRING),t=a.getQueryParam(a.PAYMENT_ACCEPTOR_ID_QUERY_STRING);e&&(t?F({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}}):I.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}}))}()}),e.onBeforeUnmount(()=>{B()}),e.watch(()=>f.paymentMethodOptionResponseEntry,(e,t)=>{n.isEqual(e,t)||w()},{deep:!0}),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[E.value?(e.openBlock(),e.createBlock(c,{key:0,variant:s.variant},null,8,["variant"])):A.value?(e.openBlock(),e.createBlock(u,{key:1,error:A.value},null,8,["error"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"dropInContainerRef",ref:v},null,512)],64))}}),h=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(y,{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$24),{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=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.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;
|
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString,
|
|
2
|
-
import { _ as _sfc_main$
|
|
3
|
-
import { a as _sfc_main$2 } from "./Button.vue.es-6sBk5tBL.mjs";
|
|
4
|
-
const _hoisted_1$1 = { class: "flex gap-1" };
|
|
5
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "Kpi",
|
|
7
|
-
props: {
|
|
8
|
-
icon: { type: null },
|
|
9
|
-
kpi: { type: String }
|
|
10
|
-
},
|
|
11
|
-
setup(__props) {
|
|
12
|
-
return (_ctx, _cache) => {
|
|
13
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
14
|
-
createVNode(unref(_sfc_main$2), {
|
|
15
|
-
icon: __props.icon,
|
|
16
|
-
size: "xs"
|
|
17
|
-
}, null, 8, ["icon"]),
|
|
18
|
-
createVNode(unref(_sfc_main$3), { variant: "body-xs" }, {
|
|
19
|
-
default: withCtx(() => [
|
|
20
|
-
createTextVNode(toDisplayString(__props.kpi), 1)
|
|
21
|
-
]),
|
|
22
|
-
_: 1
|
|
23
|
-
})
|
|
24
|
-
]);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
});
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "./vendor-ui-BwxuPDg8.mjs";
|
|
28
3
|
const _hoisted_1 = { class: "flex items-start" };
|
|
29
4
|
const _hoisted_2 = { class: "flex flex-col grow" };
|
|
30
5
|
const _hoisted_3 = { class: "flex items-center gap-1" };
|
|
@@ -40,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
15
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
41
16
|
createElementVNode("div", _hoisted_2, [
|
|
42
17
|
createElementVNode("div", _hoisted_3, [
|
|
43
|
-
createVNode(unref(_sfc_main$
|
|
18
|
+
createVNode(unref(_sfc_main$1), {
|
|
44
19
|
tag: "span",
|
|
45
20
|
variant: "body-sm",
|
|
46
21
|
weight: "semibold"
|
|
@@ -52,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
27
|
}),
|
|
53
28
|
renderSlot(_ctx.$slots, "badge")
|
|
54
29
|
]),
|
|
55
|
-
createVNode(unref(_sfc_main$
|
|
30
|
+
createVNode(unref(_sfc_main$1), {
|
|
56
31
|
tag: "span",
|
|
57
32
|
variant: "body-xs",
|
|
58
33
|
shade: "lighter"
|
|
@@ -71,6 +46,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
46
|
}
|
|
72
47
|
});
|
|
73
48
|
export {
|
|
74
|
-
_sfc_main as _
|
|
75
|
-
_sfc_main$1 as a
|
|
49
|
+
_sfc_main as _
|
|
76
50
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
2
|
-
import { c as createSubscriptionsService } from "./subscriptions-
|
|
1
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-RRicokf1.mjs";
|
|
2
|
+
import { c as createSubscriptionsService } from "./subscriptions-mOgjjzUi.mjs";
|
|
3
3
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createSlots, Fragment, renderList } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import { _ as _sfc_main$6 } from "./Button.vue.es-6sBk5tBL.mjs";
|
|
6
|
-
import { a as useIntl, _ as _sfc_main$4 } from "./component-dpA83LIN.mjs";
|
|
7
|
-
import { _ as _sfc_main$5 } from "./PaymentMethod.vue.es-nXZoQjG3.mjs";
|
|
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-BwxuPDg8.mjs";
|
|
8
5
|
import { _ as _sfc_main$7 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
|
|
9
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
6
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-B4gszz0Q.mjs";
|
|
10
7
|
function useSubscriptionsList({
|
|
11
8
|
customerId,
|
|
12
9
|
batchSize: pageSize = 15
|