@solvimon/solvimon-web 0.1.0-alpha.17 → 0.1.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/README.md +28 -26
  2. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs +238 -0
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs} +2 -2
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js → BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js} +1 -1
  6. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs} +3 -3
  7. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +1 -0
  8. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs +2654 -0
  9. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +1 -0
  10. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +53 -0
  11. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +1 -0
  12. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +1 -0
  13. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-wxP5IaGt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs} +1 -1
  14. package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-05NKI2A0.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js} +1 -1
  15. package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-17v07F58.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs} +1 -1
  16. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +1 -0
  17. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs +153 -0
  18. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs +52 -0
  19. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +1 -0
  20. package/dist/{PaymentHistoryBlock-BitwS9Re.mjs → PaymentHistoryBlock-Bxr8lUGs.mjs} +1 -1
  21. package/dist/{PaymentHistoryBlock-ZtmPXXwI.js → PaymentHistoryBlock-COjIVYX4.js} +1 -1
  22. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +1 -0
  23. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs} +1 -1
  24. package/dist/{PaymentIntegrationForm-BZTzCUiu.js → PaymentIntegrationForm-BSauhuKv.js} +1 -1
  25. package/dist/{PaymentIntegrationForm-BK2aLPCo.mjs → PaymentIntegrationForm-PIT8gHYN.mjs} +1 -1
  26. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +1 -0
  27. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs +148 -0
  28. package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +1 -0
  29. package/dist/PaymentIntegrationFormAdyen-Cjj9aK0E.mjs +729 -0
  30. package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +1 -0
  31. package/dist/PaymentIntegrationFormStripe-arpua_ZT.mjs +545 -0
  32. package/dist/PaymentMethodForm-B7T5rrNz.mjs +4 -0
  33. package/dist/PaymentMethodForm-CLz3ZS-b.js +1 -0
  34. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs} +2 -2
  35. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js} +1 -1
  36. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs} +76 -30
  37. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +1 -0
  38. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs} +2 -2
  39. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +1 -0
  40. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BMXr26gF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs} +1 -1
  41. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +1 -0
  42. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +1 -0
  43. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs} +16 -63
  44. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +1 -0
  45. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs} +5 -5
  46. package/dist/adyen-BMDZQBUG.js +1 -0
  47. package/dist/{url-BjZ1Pg0l.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
  48. package/dist/component--Y7Igv5i.mjs +1022 -0
  49. package/dist/component-DIy1hvJM.js +1 -0
  50. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  51. package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
  52. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  53. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +4 -4
  54. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  55. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
  56. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  57. package/dist/components/Invoice/Invoice.es.js +7 -7
  58. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  59. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  60. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
  61. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
  62. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  63. package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
  64. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  65. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  66. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  67. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
  68. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  69. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4 -4
  70. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  71. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
  72. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  73. package/dist/components/WalletBalances/WalletBalances.es.js +21 -7
  74. package/dist/core/action-request.types.d.ts +1 -13
  75. package/dist/core/index.cjs.js +1 -1
  76. package/dist/core/index.es.js +1 -1
  77. package/dist/{customer-DAgdegIW.mjs → customer-DovIxTG1.mjs} +1 -1
  78. package/dist/{customer-AfRcAZ5P.js → customer-brfznoHY.js} +1 -1
  79. package/dist/en-US-BvOHPudj.js +1 -0
  80. package/dist/{en-US-DSzSbgL5.mjs → en-US-CXDO3qhq.mjs} +53 -0
  81. package/dist/index-BMWWP8xj.js +1 -0
  82. package/dist/index-Do7kzLpg.mjs +265 -0
  83. package/dist/index.cjs.js +1 -1
  84. package/dist/index.es.js +1 -1
  85. package/dist/{invoices-BHgajZHq.js → invoices-Cf3dSYSj.js} +1 -1
  86. package/dist/{invoices-BXDgW8ch.mjs → invoices-Dk-z04lg.mjs} +2 -2
  87. package/dist/{nl-NL-Li7RW89R.mjs → nl-NL-BgL_PuBn.mjs} +55 -1
  88. package/dist/nl-NL-COGUFg60.js +1 -0
  89. package/dist/{paymentMethods-xzFD2L30.mjs → paymentMethods-BnF1XYS1.mjs} +21 -5
  90. package/dist/paymentMethods-DVDC_WfL.js +1 -0
  91. package/dist/{payments-DMvmB5vg.js → payments-DVZFO5yb.js} +1 -1
  92. package/dist/{payments-DV6csRej.mjs → payments-TnRjtlOw.mjs} +1 -1
  93. package/dist/{pricing-BEjY_5wb.js → pricing-CuYndX6t.js} +1 -1
  94. package/dist/{pricing-B1uImUm4.mjs → pricing-GwLCiSzs.mjs} +1 -1
  95. package/dist/{pricingPlanSchedule-C_cqUyTk.mjs → pricingPlanSchedule-CXG3CQ61.mjs} +3 -1
  96. package/dist/{registry-CyENvS6l.mjs → registry-Ck0Gb6rj.mjs} +1 -1
  97. package/dist/{registry-CeMxLjwU.js → registry-Cra6yoB4.js} +1 -1
  98. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  99. package/dist/screens/Checkout/Checkout.es.js +37 -36
  100. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  101. package/dist/screens/CustomerOverview/CustomerOverview.es.js +32 -56
  102. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
  103. package/dist/screens/PayInvoice/PayInvoice.es.js +28 -12
  104. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
  105. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +28 -18
  106. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -1
  107. package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +436 -89
  108. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -1
  109. package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +28 -37
  110. package/dist/solvimon-web.css +1 -1
  111. package/dist/{subscription-B4dBAY9C.mjs → subscription-C41lG-rH.mjs} +1 -1
  112. package/dist/subscriptions-BFCKVHnP.js +1 -0
  113. package/dist/subscriptions-vEE4Y7qm.mjs +58 -0
  114. package/dist/{useActionDispatchProvider-zB_GKeUR.mjs → useActionDispatchProvider-BlEf-RZ5.mjs} +1 -1
  115. package/dist/{useActionDispatchProvider-bqR_FeM4.js → useActionDispatchProvider-aJOy3kr1.js} +1 -1
  116. package/dist/{useCustomer-bO4D6e4Z.js → useCustomer-C1XTqmrQ.js} +1 -1
  117. package/dist/{useCustomer-VfeQ6rG2.mjs → useCustomer-Cw8LXT6S.mjs} +2 -2
  118. package/dist/{useIncrementalLoading-C59FXHzp.mjs → useIncrementalLoading-8WtKZ-mP.mjs} +2 -2
  119. package/dist/useIncrementalLoading-CkY2klIW.js +1 -0
  120. package/dist/{useInvoiceData-CxxkBTGY.js → useInvoiceData-BrxMo4Zt.js} +1 -1
  121. package/dist/{useInvoiceData-Dhg-hx8C.mjs → useInvoiceData-Cy_ysMsq.mjs} +2 -2
  122. package/dist/{useInvoicesList-DBz7T7sM.mjs → useInvoicesList-DMsZn1tE.mjs} +4 -4
  123. package/dist/{useInvoicesList-BXZ9uV9i.js → useInvoicesList-DmisMQzy.js} +1 -1
  124. package/dist/{useLoadInitialData-BhpIg7OF.mjs → useLoadInitialData-BP1v7qhd.mjs} +1 -1
  125. package/dist/{useLoadInitialData-BqiAFNFi.js → useLoadInitialData-_BjCD0Jc.js} +1 -1
  126. package/dist/{usePaymentMethodOptions-PcMjtMSF.mjs → usePaymentMethodOptions-CWfGvW0U.mjs} +9 -3
  127. package/dist/{usePaymentMethodOptions-DszFvgKX.js → usePaymentMethodOptions-xeSTmaVo.js} +1 -1
  128. package/dist/{usePaymentMethods-Bb1Xbads.js → usePaymentMethods-CAFMvSOr.js} +1 -1
  129. package/dist/{usePaymentMethods-B5AbGWsn.mjs → usePaymentMethods-Cyk4cjoE.mjs} +2 -2
  130. package/dist/{usePayments-is5c66Z6.js → usePayments-BieVBaz-.js} +1 -1
  131. package/dist/{usePayments-DgoZoBZh.mjs → usePayments-D88XSZfS.mjs} +10 -4
  132. package/dist/{usePortal-DWLtNqBB.mjs → usePortal-0NDlbFr9.mjs} +1 -1
  133. package/dist/{usePortal-C4qWsJeq.js → usePortal-B954nyEB.js} +1 -1
  134. package/dist/{useService-DKm3QtT4.js → useService-BiljI7XA.js} +1 -1
  135. package/dist/{useService-BZqFkz7p.mjs → useService-CqfJi5ST.mjs} +1 -1
  136. package/dist/{useSubscription-CEZJw6wZ.mjs → useSubscription-9rJpFNUF.mjs} +9 -3
  137. package/dist/{useSubscription-DuUNc1_l.js → useSubscription-k3limdu_.js} +1 -1
  138. package/dist/vendor-ui-Dfh3_g4q.js +1 -0
  139. package/dist/{vendor-ui-BoGKOJ36.mjs → vendor-ui-ItGf7wJV.mjs} +1912 -1800
  140. package/package.json +12 -5
  141. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js +0 -1
  142. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js +0 -1
  143. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs +0 -77
  144. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BbuEBiY3.js +0 -1
  145. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-dwIv_xxf.js +0 -1
  146. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js +0 -1
  147. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs +0 -1537
  148. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js +0 -1
  149. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs +0 -156
  150. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js +0 -1
  151. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js +0 -1
  152. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js +0 -1
  153. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BKz2QQn9.js +0 -1
  154. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js +0 -1
  155. package/dist/component-CUJ_G2Nw.mjs +0 -962
  156. package/dist/component-CiKxWtdx.js +0 -1
  157. package/dist/en-US-QzQnGXP1.js +0 -1
  158. package/dist/index-CzL1ZcGi.mjs +0 -85
  159. package/dist/index-DRdBmZ2-.js +0 -1
  160. package/dist/nl-NL-C4rr-1tr.js +0 -1
  161. package/dist/paymentMethods-BMcc-eTl.js +0 -1
  162. package/dist/subscriptions-CrNDM9qa.mjs +0 -79
  163. package/dist/subscriptions-DC-mxa17.js +0 -1
  164. package/dist/url-D8GJi5rF.js +0 -1
  165. package/dist/useIncrementalLoading-BgWuwoMo.js +0 -1
  166. package/dist/useTopUpModal-DNyWrHDv.mjs +0 -1012
  167. package/dist/useTopUpModal-DeF-cfCK.js +0 -1
  168. package/dist/vendor-ui-BuRqLx74.js +0 -1
@@ -1,24 +1,26 @@
1
1
  import { ref, computed, onMounted, watch, defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, useModel, createElementBlock, withModifiers, Fragment, createCommentVNode, createSlots, normalizeClass, mergeModels, renderSlot, renderList, toRef, nextTick, mergeProps, withDirectives, withKeys, vShow, defineAsyncComponent } from "vue";
2
- import { a9 as taxId, r as isEqual, aa as convertDateRangeToTimePeriod, R as useValidation, S as objectDiff, u as useIntl, ab as _sfc_main$m, e as _sfc_main$n, ac as isEUCountry, ad as isValidCountryCode, ae as getCountryNameByCode, _ as _sfc_main$o, W as _sfc_main$p, X as _sfc_main$q, c as _sfc_main$r, a2 as _sfc_main$s, Y as _sfc_main$t, af as _sfc_main$u, ag as _sfc_main$v, ah as _sfc_main$w, ai as TooltipContent, aj as _sfc_main$x, $ as formatBillingPeriod, E as formatAmount, ak as useTimePeriod, l as _sfc_main$z, H as _sfc_main$B, al as _sfc_main$C, a4 as _sfc_main$D, K as _sfc_main$F, am as _sfc_main$G, q as _sfc_main$H, G as usePricingItem, an as uniqueId, t as _sfc_main$K } from "../../vendor-ui-BoGKOJ36.mjs";
3
- import { a as useLogger, _ as _sfc_main$N, d as defineCustomElement, g as getComponentName } from "../../component-CUJ_G2Nw.mjs";
4
- import { c as createSubscriptionsService } from "../../subscriptions-CrNDM9qa.mjs";
2
+ import { aa as taxId, q as isEqual, ab as convertDateRangeToTimePeriod, R as useValidation, S as objectDiff, u as useIntl, a3 as _sfc_main$m, a as _sfc_main$n, ac as isEUCountry, ad as isValidCountryCode, ae as getCountryNameByCode, b as _sfc_main$o, W as _sfc_main$p, X as _sfc_main$q, k as _sfc_main$r, a7 as _sfc_main$s, Y as _sfc_main$t, af as _sfc_main$u, ag as _sfc_main$v, ah as _sfc_main$w, ai as TooltipContent, aj as _sfc_main$x, a2 as formatBillingPeriod, E as formatAmount, ak as useTimePeriod, l as _sfc_main$z, H as _sfc_main$B, al as _sfc_main$C, a1 as _sfc_main$D, K as _sfc_main$F, am as _sfc_main$G, c as _sfc_main$H, G as usePricingItem, an as uniqueId, D as _sfc_main$K } from "../../vendor-ui-ItGf7wJV.mjs";
3
+ import { a as useLogger, _ as _sfc_main$N, d as defineCustomElement, g as getComponentName } from "../../component--Y7Igv5i.mjs";
4
+ import { c as createSubscriptionsService } from "../../subscriptions-vEE4Y7qm.mjs";
5
5
  import { A as ApiStatus } from "../../ApiStatus-CyNDp_op.mjs";
6
- import { c as createInvoicesService } from "../../invoices-BXDgW8ch.mjs";
7
- import { g as getFirstPricingPlanScheduleOfType, b as getScheduleCustomizations, e as getPricingItemConfigMetaById } from "../../pricingPlanSchedule-C_cqUyTk.mjs";
8
- import { r as required, e as email, a as requiredIf } from "../../index-CzL1ZcGi.mjs";
6
+ import { c as createInvoicesService } from "../../invoices-Dk-z04lg.mjs";
7
+ import { g as getFirstPricingPlanScheduleOfType, b as getScheduleCustomizations, e as getPricingItemConfigMetaById } from "../../pricingPlanSchedule-CXG3CQ61.mjs";
8
+ import { r as required, e as email, a as requiredIf } from "../../index-Do7kzLpg.mjs";
9
9
  import { u as useWatchDebounced } from "../../useWatchDebounced-Zmxd6InB.mjs";
10
- import { c as createPaymentMethodsService } from "../../paymentMethods-xzFD2L30.mjs";
11
- import { u as useService } from "../../useService-BZqFkz7p.mjs";
12
- import { c as getPricingGroupsFromExtendedPricingPlanSubscription, a as getSubscriptionName, d as getFallbackTrialAndSubscriptionStartAndEndDates } from "../../subscription-B4dBAY9C.mjs";
13
- import { a as getAllPricingsFromScheduleInfos, g as getNameFromPricing } from "../../pricing-B1uImUm4.mjs";
14
- import { g as getQueryParam, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, _ as _sfc_main$y, e as getAdyenExpressCheckoutConfiguration, d as transformObjectToAdyenObject, c as createReturnUrl, s as safeUrlRedirect } from "../../url-BjZ1Pg0l.mjs";
15
- import { u as usePortal } from "../../usePortal-DWLtNqBB.mjs";
16
- import { c as createCustomerService } from "../../customer-DAgdegIW.mjs";
17
- import { _ as _sfc_main$A, a as _sfc_main$M } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs";
10
+ import { c as createPaymentMethodsService } from "../../paymentMethods-BnF1XYS1.mjs";
11
+ import { u as useService } from "../../useService-CqfJi5ST.mjs";
12
+ import { c as getPricingGroupsFromExtendedPricingPlanSubscription, a as getSubscriptionName, d as getFallbackTrialAndSubscriptionStartAndEndDates } from "../../subscription-C41lG-rH.mjs";
13
+ import { a as getAllPricingsFromScheduleInfos, g as getNameFromPricing } from "../../pricing-GwLCiSzs.mjs";
14
+ import { g as getQueryParam, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, e as getAdyenExpressCheckoutConfiguration, c as transformObjectToAdyenObject, d as createReturnUrl, s as safeUrlRedirect } from "../../adyen-Ba-mF3Jy.mjs";
15
+ import { u as usePortal } from "../../usePortal-0NDlbFr9.mjs";
16
+ import { c as createCustomerService } from "../../customer-DovIxTG1.mjs";
17
+ import { _ as _sfc_main$y } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs";
18
+ import { _ as _sfc_main$A } from "../../SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs";
18
19
  import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
20
+ import { _ as _sfc_main$M } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs";
19
21
  import { _ as _sfc_main$E } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
20
- import { c as createPaymentsService } from "../../payments-DV6csRej.mjs";
21
- import { b as _sfc_main$I, _ as _sfc_main$J, a as _sfc_main$L } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs";
22
+ import { c as createPaymentsService } from "../../payments-TnRjtlOw.mjs";
23
+ import { b as _sfc_main$I, _ as _sfc_main$J, a as _sfc_main$L } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs";
22
24
  import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
23
25
  const EMPTY_LEGAL_ENTITY_NAME = "preview";
24
26
  const EMPTY_COUNTRY = "NL";
@@ -1114,7 +1116,9 @@ function useTaxIDValidationCheck(form) {
1114
1116
  const isSelectedCountryEU = computed(() => {
1115
1117
  return isEUCountry(countryCode.value ?? "");
1116
1118
  });
1117
- const isTaxIDCheckEnabled = computed(() => !!(taxId2.value && legalName.value && countryCode.value));
1119
+ const isTaxIDCheckEnabled = computed(
1120
+ () => !!(taxId2.value && legalName.value && countryCode.value)
1121
+ );
1118
1122
  const showViesCheckNotice = computed(() => {
1119
1123
  return isSelectedCountryEU.value && taxId2.value;
1120
1124
  });
@@ -1587,7 +1591,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1587
1591
  "width-class": "w-10",
1588
1592
  "height-class": "h-4",
1589
1593
  shade: "darker",
1590
- class: "inline-block mr-1.5"
1594
+ class: "mr-1.5 inline-block"
1591
1595
  })
1592
1596
  ]),
1593
1597
  _: 1
@@ -1679,7 +1683,7 @@ const isInvoiceUsageBased = (invoice) => {
1679
1683
  )
1680
1684
  )) ?? false;
1681
1685
  };
1682
- const _hoisted_1$g = { class: "flex w-full min-h-96 justify-center items-center" };
1686
+ const _hoisted_1$g = { class: "flex min-h-96 w-full items-center justify-center" };
1683
1687
  const _hoisted_2$8 = { class: "max-w-sm" };
1684
1688
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
1685
1689
  __name: "CheckoutNotAvailable",
@@ -1769,9 +1773,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1769
1773
  }
1770
1774
  });
1771
1775
  const _hoisted_1$f = { class: "flex items-start" };
1772
- const _hoisted_2$7 = { class: "flex flex-col grow" };
1776
+ const _hoisted_2$7 = { class: "flex grow flex-col" };
1773
1777
  const _hoisted_3$5 = { class: "flex items-center gap-1" };
1774
- const _hoisted_4$5 = { class: "flex items-center ml-4 self-center" };
1778
+ const _hoisted_4$5 = { class: "ml-4 flex items-center self-center" };
1775
1779
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
1776
1780
  __name: "PricingGroupContent",
1777
1781
  props: {
@@ -2302,7 +2306,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2302
2306
  return openBlock(), createBlock(unref(_sfc_main$r), {
2303
2307
  size: "lg",
2304
2308
  "aria-label": ariaLabel.value,
2305
- class: normalizeClass([buttonClasses.value, "!block w-full h-11 bg-center bg-no-repeat"]),
2309
+ class: normalizeClass([buttonClasses.value, "!block h-11 w-full bg-center bg-no-repeat"]),
2306
2310
  onClick: handleClick
2307
2311
  }, {
2308
2312
  default: withCtx(() => [
@@ -3088,14 +3092,18 @@ function useSeatBasedPricing({
3088
3092
  description: productItem == null ? void 0 : productItem.description
3089
3093
  },
3090
3094
  pricing: {
3091
- ...((_c = config == null ? void 0 : config.details) == null ? void 0 : _c.pricing_type) === "FLAT" && { amount: (_f = (_e = (_d = config.details) == null ? void 0 : _d.bands) == null ? void 0 : _e[0]) == null ? void 0 : _f.amount },
3092
- ...((_g = config == null ? void 0 : config.details) == null ? void 0 : _g.pricing_type) === "TIERED" && { tiered: { bands: (_h = config.details) == null ? void 0 : _h.bands } }
3095
+ ...((_c = config == null ? void 0 : config.details) == null ? void 0 : _c.pricing_type) === "FLAT" && {
3096
+ amount: (_f = (_e = (_d = config.details) == null ? void 0 : _d.bands) == null ? void 0 : _e[0]) == null ? void 0 : _f.amount
3097
+ },
3098
+ ...((_g = config == null ? void 0 : config.details) == null ? void 0 : _g.pricing_type) === "TIERED" && {
3099
+ tiered: { bands: (_h = config.details) == null ? void 0 : _h.bands }
3100
+ }
3093
3101
  }
3094
3102
  };
3095
3103
  });
3096
3104
  }
3097
- const _hoisted_1$6 = { class: "flex flex-row-reverse md:flex-row gap-4" };
3098
- const _hoisted_2$3 = { class: "w-24 md:w-32 shrink-0 justify-start" };
3105
+ const _hoisted_1$6 = { class: "flex flex-row-reverse gap-4 md:flex-row" };
3106
+ const _hoisted_2$3 = { class: "w-24 shrink-0 justify-start md:w-32" };
3099
3107
  const _hoisted_3$2 = ["tabindex"];
3100
3108
  const _hoisted_4$2 = { key: 0 };
3101
3109
  const _hoisted_5$2 = { key: 0 };
@@ -3146,7 +3154,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3146
3154
  }, null, 8, ["modelValue", "min"])
3147
3155
  ]),
3148
3156
  createElementVNode("div", {
3149
- class: normalizeClass(["flex flex-col grow", { "hover:cursor-pointer": isCollapsible.value }]),
3157
+ class: normalizeClass(["flex grow flex-col", { "hover:cursor-pointer": isCollapsible.value }]),
3150
3158
  tabindex: isCollapsible.value ? 0 : void 0,
3151
3159
  onClick: _cache[1] || (_cache[1] = ($event) => isCollapsible.value ? isExpanded.value = !isExpanded.value : void 0)
3152
3160
  }, [
@@ -3202,7 +3210,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3202
3210
  createVNode(unref(_sfc_main$H), {
3203
3211
  icon: "keyboard_arrow_down",
3204
3212
  size: "xs",
3205
- class: normalizeClass(["absolute transition ease-in-out text-gray-400", { "rotate-0": !isExpanded.value, "rotate-180": isExpanded.value }])
3213
+ class: normalizeClass(["absolute text-gray-400 transition ease-in-out", { "rotate-0": !isExpanded.value, "rotate-180": isExpanded.value }])
3206
3214
  }, null, 8, ["class"])
3207
3215
  ]),
3208
3216
  _: 1
@@ -3897,7 +3905,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3897
3905
  setup(__props, { emit: __emit }) {
3898
3906
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
3899
3907
  const PaymentIntegrationForm = defineAsyncComponent(
3900
- () => import("../../PaymentIntegrationForm-BK2aLPCo.mjs")
3908
+ () => import("../../PaymentIntegrationForm-PIT8gHYN.mjs")
3901
3909
  );
3902
3910
  const props = __props;
3903
3911
  const emit = __emit;
@@ -4375,13 +4383,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4375
4383
  description: "The title shown when there are no available payment methods"
4376
4384
  })), 1)
4377
4385
  ]),
4378
- message: withCtx(() => [
4379
- createTextVNode(toDisplayString(unref($t)({
4380
- defaultMessage: "There are no available payment methods. Please contact support for more information.",
4381
- id: "checkout.payment_method_block.no_payment_methods_available_message",
4382
- description: "The message shown when there are no available payment methods"
4383
- })), 1)
4384
- ]),
4385
4386
  _: 1
4386
4387
  })) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createElementBlock("div", _hoisted_4, [
4387
4388
  createElementVNode("div", {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../ApiStatus-oqvUEWJx.js"),o=require("../../ContentWithAsideLayout-DHpnJfGA.js"),r=require("../../useInvoicesList-BXZ9uV9i.js"),s=require("../../usePortal-C4qWsJeq.js"),n=require("../../component-CiKxWtdx.js"),a=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js"),i=require("../../useCustomer-bO4D6e4Z.js"),u=require("../../usePaymentMethods-Bb1Xbads.js"),l=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js"),c=require("../../useLoadInitialData-BqiAFNFi.js"),m=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js"),d=require("../../paymentMethods-BMcc-eTl.js"),p=require("../../useService-DKm3QtT4.js"),v=require("../../CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js"),_=require("../../useTopUpModal-DeF-cfCK.js"),f=require("../../pricingPlanSchedule-B9HFiXy-.js");const y=e.defineComponent({__name:"CustomerOverview",props:{configuration:{type:Object}},setup(y){var g;const h=s.usePortal(),b=n.useLogger(),w=null==(g=h.value)?void 0:g.customer_id,C=i.useCustomer({customerId:w}),S=r.useInvoicesList({customerId:w,batchSize:5}),j=a.useSubscriptionsList({customerId:w,batchSize:2}),M=u.usePaymentMethods({customerId:w}),L=function({customerId:e,amount:t}){const{getPaymentMethodOptions:o}=d.createPaymentMethodsService(),{data:r,execute:s,error:n,apiStatus:a,isPending:i}=p.useService({initialValue:[],service:async()=>(await o({customerId:e,amount:t})).flatMap(e=>e.options??[])});return{error:n,apiStatus:a,items:r,fetch:s,isPending:i}}({customerId:w}),O=v.useCustomerWalletBalances({customerId:w}),q=e.computed(()=>{var e;return(null==(e=O.walletBalances.value)?void 0:e.wallet_balances)??[]}),{isLoading:I}=c.useLoadInitialData(C.get.execute(),S.fetchInitial(),j.fetchInitial(),M.fetchAll(),L.fetch(),O.fetch()),x=()=>{M.fetchAll()},N=()=>{O.fetch()},B=e.computed(()=>f.getActiveDefaultScheduleId(j.items.value));e.watch([B,()=>j.items.value],([e,t])=>{e||0===t.length||b.warn("ACTIVE_SCHEDULE_NOT_FOUND","No schedule is currently being billed",{schedules:t.flatMap(({pricing_plan_schedule_infos:e})=>(e??[]).map(({id:e,type:t,start_at:o,end_at:r,...s})=>{var n;return{id:e,type:(null==(n=s.pricing_plan_schedule)?void 0:n.type)??t,start_at:o,end_at:r}}))})});const P=e.ref(),A=_.useTopUpModal(P);return(s,n)=>(e.openBlock(),e.createBlock(e.unref(o.ContentWithAsideLayout),{class:"sv-customer-overview sv-root sv-screen"},{header:e.withCtx(()=>[e.unref(C).customer.value?(e.openBlock(),e.createBlock(a._sfc_main,{key:0,class:"sv-customer-overview__subscriptions",customer:e.unref(C).customer.value,subscriptions:e.unref(j).items.value,"payment-methods":e.unref(M).items.value,"is-loading":e.unref(I),onLoadMore:e.unref(j).fetchMore},null,8,["customer","subscriptions","payment-methods","is-loading","onLoadMore"])):e.createCommentVNode("",!0)]),content:e.withCtx(()=>[e.createVNode(r._sfc_main,{class:"sv-customer-overview__invoices",invoices:e.unref(S).items.value,"has-more-items":e.unref(S).hasNextBatch.value,"is-loading":e.unref(I),onLoadMore:e.unref(S).fetchMore},null,8,["invoices","has-more-items","is-loading","onLoadMore"])]),aside:e.withCtx(()=>[e.createVNode(v._sfc_main,{class:"sv-customer-overview__wallet-balances","has-error":e.unref(O).apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":e.unref(I),"wallet-balances":q.value,"show-top-up-button":"",onTopUp:n[0]||(n[0]=e=>P.value=e)},null,8,["has-error","is-loading","wallet-balances"]),e.createVNode(m._sfc_main,{class:"sv-customer-overview__payment-methods","is-loading":e.unref(I),"payment-methods":e.unref(M).items.value},null,8,["is-loading","payment-methods"]),e.unref(C).customer.value?(e.openBlock(),e.createBlock(l._sfc_main,{key:0,class:"sv-customer-overview__billing-information","is-loading":e.unref(I),customer:e.unref(C).customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0),e.createVNode(_._sfc_main,{"show-modal":e.unref(A).showModal.value,"payment-methods":e.unref(M).items.value,customer:e.unref(C).customer.value,"selected-balance-item":P.value,onClose:n[1]||(n[1]=e=>P.value=void 0),onConfirm:N,onPaymentSuccess:x},null,8,["show-modal","payment-methods","customer","selected-balance-item"])]),_:1}))}}),g=e.defineComponent({__name:"CustomerOverview.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(o,r)=>{var s,a,i,u;return e.openBlock(),e.createBlock(n._sfc_main,{"custom-element-name":e.unref(b),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(a=null==(s=t.branding)?void 0:s.colors)?void 0:a.primary,"secondary-color":null==(u=null==(i=t.branding)?void 0:i.colors)?void 0:u.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),h=n.defineCustomElement(g),b=n.getComponentName("customer-overview");exports.COMPONENT_NAME=b,exports.SolvimonCustomerOverview=h,exports.defineSolvimonCustomerOverview=()=>{customElements.get(b)||customElements.define(b,h)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../ApiStatus-oqvUEWJx.js"),o=require("../../ContentWithAsideLayout-DHpnJfGA.js"),r=require("../../useInvoicesList-DmisMQzy.js"),s=require("../../usePortal-B954nyEB.js"),n=require("../../component-DIy1hvJM.js"),a=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js"),i=require("../../useCustomer-C1XTqmrQ.js"),l=require("../../usePaymentMethods-CAFMvSOr.js"),u=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js"),c=require("../../useLoadInitialData-_BjCD0Jc.js"),m=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js"),p=require("../../CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js"),d=require("../../pricingPlanSchedule-B9HFiXy-.js"),v=e.defineComponent({__name:"CustomerOverview",props:{configuration:{type:Object}},setup(v){var _;const y=s.usePortal(),g=n.useLogger(),f=null==(_=y.value)?void 0:_.customer_id,h=i.useCustomer({customerId:f}),b=r.useInvoicesList({customerId:f,batchSize:5}),C=a.useSubscriptionsList({customerId:f}),w=l.usePaymentMethods({customerId:f}),S=p.useCustomerWalletBalances({customerId:f}),j=e.computed(()=>{var e;return(null==(e=S.walletBalances.value)?void 0:e.wallet_balances)??[]}),O=e.computed(()=>C.items.value.slice(0,2)),{isLoading:L}=c.useLoadInitialData(h.get.execute(),b.fetchInitial(),C.fetchAll(),w.fetchAll(),S.fetch()),A=()=>{w.fetchAll()},N=()=>{S.fetch()},q=e.computed(()=>d.getActiveDefaultScheduleId(C.items.value));return e.watch([q,()=>C.items.value],([e,t])=>{e||0===t.length||g.warn("ACTIVE_SCHEDULE_NOT_FOUND","No schedule is currently being billed",{schedules:t.flatMap(({pricing_plan_schedule_infos:e})=>(e??[]).map(({id:e,type:t,start_at:o,end_at:r,...s})=>{var n;return{id:e,type:(null==(n=s.pricing_plan_schedule)?void 0:n.type)??t,start_at:o,end_at:r}}))})}),(s,n)=>(e.openBlock(),e.createBlock(e.unref(o.ContentWithAsideLayout),{class:"sv-customer-overview sv-root sv-screen"},{header:e.withCtx(()=>[e.unref(h).customer.value?(e.openBlock(),e.createBlock(a._sfc_main,{key:0,class:"sv-customer-overview__subscriptions",customer:e.unref(h).customer.value,subscriptions:O.value,"payment-methods":e.unref(w).items.value,"is-loading":e.unref(L)},null,8,["customer","subscriptions","payment-methods","is-loading"])):e.createCommentVNode("",!0)]),content:e.withCtx(()=>[e.createVNode(r._sfc_main,{class:"sv-customer-overview__invoices",invoices:e.unref(b).items.value,"has-more-items":e.unref(b).hasNextBatch.value,"is-loading":e.unref(L),onLoadMore:e.unref(b).fetchMore},null,8,["invoices","has-more-items","is-loading","onLoadMore"])]),aside:e.withCtx(()=>[e.createVNode(p._sfc_main,{class:"sv-customer-overview__wallet-balances","has-error":e.unref(S).apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":e.unref(L),"wallet-balances":j.value,"show-top-up-button":"",customer:e.unref(h).customer.value,"payment-methods":e.unref(w).items.value,subscriptions:e.unref(C).items.value,onTopUpCharged:N,onAutoTopUpSaved:N,onAutoTopUpCancelled:N,onPaymentMethodStored:A},null,8,["has-error","is-loading","wallet-balances","customer","payment-methods","subscriptions"]),e.createVNode(m._sfc_main,{class:"sv-customer-overview__payment-methods","is-loading":e.unref(L),"payment-methods":e.unref(w).items.value},null,8,["is-loading","payment-methods"]),e.unref(h).customer.value?(e.openBlock(),e.createBlock(u._sfc_main,{key:0,class:"sv-customer-overview__billing-information","is-loading":e.unref(L),customer:e.unref(h).customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0)]),_:1}))}}),_=e.defineComponent({__name:"CustomerOverview.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(o,r)=>{var s,a,i,l;return e.openBlock(),e.createBlock(n._sfc_main,{"custom-element-name":e.unref(g),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(a=null==(s=t.branding)?void 0:s.colors)?void 0:a.primary,"secondary-color":null==(l=null==(i=t.branding)?void 0:i.colors)?void 0:l.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(v)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),y=n.defineCustomElement(_),g=n.getComponentName("customer-overview");exports.COMPONENT_NAME=g,exports.SolvimonCustomerOverview=y,exports.defineSolvimonCustomerOverview=()=>{customElements.get(g)||customElements.define(g,y)};
@@ -1,35 +1,18 @@
1
- import { defineComponent, computed, watch, ref, openBlock, createBlock, unref, withCtx, createVNode, createCommentVNode } from "vue";
1
+ import { defineComponent, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createCommentVNode } from "vue";
2
2
  import { A as ApiStatus } from "../../ApiStatus-CyNDp_op.mjs";
3
3
  import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
4
- import { u as useInvoicesList, _ as _sfc_main$6 } from "../../useInvoicesList-DBz7T7sM.mjs";
5
- import { u as usePortal } from "../../usePortal-DWLtNqBB.mjs";
6
- import { a as useLogger, _ as _sfc_main$8, d as defineCustomElement, g as getComponentName } from "../../component-CUJ_G2Nw.mjs";
7
- import { u as useSubscriptionsList, _ as _sfc_main$7 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs";
8
- import { u as useCustomer } from "../../useCustomer-VfeQ6rG2.mjs";
9
- import { u as usePaymentMethods } from "../../usePaymentMethods-B5AbGWsn.mjs";
10
- import { _ as _sfc_main$4 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs";
11
- import { u as useLoadInitialData } from "../../useLoadInitialData-BhpIg7OF.mjs";
12
- import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs";
13
- import { c as createPaymentMethodsService } from "../../paymentMethods-xzFD2L30.mjs";
14
- import { u as useService } from "../../useService-BZqFkz7p.mjs";
15
- import { u as useCustomerWalletBalances, _ as _sfc_main$2 } from "../../CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs";
16
- import { u as useTopUpModal, _ as _sfc_main$5 } from "../../useTopUpModal-DNyWrHDv.mjs";
17
- import { a as getActiveDefaultScheduleId } from "../../pricingPlanSchedule-C_cqUyTk.mjs";
18
- function useCustomerPaymentMethodOptions({
19
- customerId,
20
- amount
21
- }) {
22
- const { getPaymentMethodOptions } = createPaymentMethodsService();
23
- const initialValue = [];
24
- const { data, execute, error, apiStatus, isPending } = useService({
25
- initialValue,
26
- service: async () => {
27
- const response = await getPaymentMethodOptions({ customerId, amount });
28
- return response.flatMap((entry) => entry.options ?? []);
29
- }
30
- });
31
- return { error, apiStatus, items: data, fetch: execute, isPending };
32
- }
4
+ import { u as useInvoicesList, _ as _sfc_main$5 } from "../../useInvoicesList-DMsZn1tE.mjs";
5
+ import { u as usePortal } from "../../usePortal-0NDlbFr9.mjs";
6
+ import { a as useLogger, _ as _sfc_main$7, d as defineCustomElement, g as getComponentName } from "../../component--Y7Igv5i.mjs";
7
+ import { u as useSubscriptionsList, _ as _sfc_main$6 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs";
8
+ import { u as useCustomer } from "../../useCustomer-Cw8LXT6S.mjs";
9
+ import { u as usePaymentMethods } from "../../usePaymentMethods-Cyk4cjoE.mjs";
10
+ import { _ as _sfc_main$4 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs";
11
+ import { u as useLoadInitialData } from "../../useLoadInitialData-BP1v7qhd.mjs";
12
+ import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs";
13
+ import { u as useCustomerWalletBalances, _ as _sfc_main$2 } from "../../CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs";
14
+ import { a as getActiveDefaultScheduleId } from "../../pricingPlanSchedule-CXG3CQ61.mjs";
15
+ const SUBSCRIPTIONS_SHOWN = 2;
33
16
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
34
17
  __name: "CustomerOverview",
35
18
  props: {
@@ -42,9 +25,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
42
25
  const customerId = (_a = portal.value) == null ? void 0 : _a.customer_id;
43
26
  const customer = useCustomer({ customerId });
44
27
  const invoices = useInvoicesList({ customerId, batchSize: 5 });
45
- const subscriptions = useSubscriptionsList({ customerId, batchSize: 2 });
28
+ const subscriptions = useSubscriptionsList({ customerId });
46
29
  const paymentMethods = usePaymentMethods({ customerId });
47
- const customerPaymentMethodOptions = useCustomerPaymentMethodOptions({ customerId });
48
30
  const customerWalletBalances = useCustomerWalletBalances({ customerId });
49
31
  const walletBalanceItems = computed(
50
32
  () => {
@@ -52,18 +34,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
52
34
  return ((_a2 = customerWalletBalances.walletBalances.value) == null ? void 0 : _a2.wallet_balances) ?? [];
53
35
  }
54
36
  );
37
+ const shownSubscriptions = computed(() => subscriptions.items.value.slice(0, SUBSCRIPTIONS_SHOWN));
55
38
  const { isLoading } = useLoadInitialData(
56
39
  customer.get.execute(),
57
40
  invoices.fetchInitial(),
58
- subscriptions.fetchInitial(),
41
+ subscriptions.fetchAll(),
59
42
  paymentMethods.fetchAll(),
60
- customerPaymentMethodOptions.fetch(),
61
43
  customerWalletBalances.fetch()
62
44
  );
63
45
  const handlePaymentMethodStored = () => {
64
46
  void paymentMethods.fetchAll();
65
47
  };
66
- const handleTopUpCharged = () => {
48
+ const handleWalletBalancesChanged = () => {
67
49
  void customerWalletBalances.fetch();
68
50
  };
69
51
  const activeScheduleId = computed(() => getActiveDefaultScheduleId(subscriptions.items.value));
@@ -85,23 +67,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
85
67
  )
86
68
  });
87
69
  });
88
- const selectedBalanceItem = ref();
89
- const topUpModal = useTopUpModal(selectedBalanceItem);
90
70
  return (_ctx, _cache) => {
91
71
  return openBlock(), createBlock(unref(ContentWithAsideLayout), { class: "sv-customer-overview sv-root sv-screen" }, {
92
72
  header: withCtx(() => [
93
- unref(customer).customer.value ? (openBlock(), createBlock(_sfc_main$7, {
73
+ unref(customer).customer.value ? (openBlock(), createBlock(_sfc_main$6, {
94
74
  key: 0,
95
75
  class: "sv-customer-overview__subscriptions",
96
76
  customer: unref(customer).customer.value,
97
- subscriptions: unref(subscriptions).items.value,
77
+ subscriptions: shownSubscriptions.value,
98
78
  "payment-methods": unref(paymentMethods).items.value,
99
- "is-loading": unref(isLoading),
100
- onLoadMore: unref(subscriptions).fetchMore
101
- }, null, 8, ["customer", "subscriptions", "payment-methods", "is-loading", "onLoadMore"])) : createCommentVNode("", true)
79
+ "is-loading": unref(isLoading)
80
+ }, null, 8, ["customer", "subscriptions", "payment-methods", "is-loading"])) : createCommentVNode("", true)
102
81
  ]),
103
82
  content: withCtx(() => [
104
- createVNode(_sfc_main$6, {
83
+ createVNode(_sfc_main$5, {
105
84
  class: "sv-customer-overview__invoices",
106
85
  invoices: unref(invoices).items.value,
107
86
  "has-more-items": unref(invoices).hasNextBatch.value,
@@ -116,8 +95,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
116
95
  "is-loading": unref(isLoading),
117
96
  "wallet-balances": walletBalanceItems.value,
118
97
  "show-top-up-button": "",
119
- onTopUp: _cache[0] || (_cache[0] = ($event) => selectedBalanceItem.value = $event)
120
- }, null, 8, ["has-error", "is-loading", "wallet-balances"]),
98
+ customer: unref(customer).customer.value,
99
+ "payment-methods": unref(paymentMethods).items.value,
100
+ subscriptions: unref(subscriptions).items.value,
101
+ onTopUpCharged: handleWalletBalancesChanged,
102
+ onAutoTopUpSaved: handleWalletBalancesChanged,
103
+ onAutoTopUpCancelled: handleWalletBalancesChanged,
104
+ onPaymentMethodStored: handlePaymentMethodStored
105
+ }, null, 8, ["has-error", "is-loading", "wallet-balances", "customer", "payment-methods", "subscriptions"]),
121
106
  createVNode(_sfc_main$3, {
122
107
  class: "sv-customer-overview__payment-methods",
123
108
  "is-loading": unref(isLoading),
@@ -128,16 +113,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
128
113
  class: "sv-customer-overview__billing-information",
129
114
  "is-loading": unref(isLoading),
130
115
  customer: unref(customer).customer.value
131
- }, null, 8, ["is-loading", "customer"])) : createCommentVNode("", true),
132
- createVNode(_sfc_main$5, {
133
- "show-modal": unref(topUpModal).showModal.value,
134
- "payment-methods": unref(paymentMethods).items.value,
135
- customer: unref(customer).customer.value,
136
- "selected-balance-item": selectedBalanceItem.value,
137
- onClose: _cache[1] || (_cache[1] = ($event) => selectedBalanceItem.value = void 0),
138
- onConfirm: handleTopUpCharged,
139
- onPaymentSuccess: handlePaymentMethodStored
140
- }, null, 8, ["show-modal", "payment-methods", "customer", "selected-balance-item"])
116
+ }, null, 8, ["is-loading", "customer"])) : createCommentVNode("", true)
141
117
  ]),
142
118
  _: 1
143
119
  });
@@ -166,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
166
142
  setup(__props) {
167
143
  return (_ctx, _cache) => {
168
144
  var _a, _b, _c, _d;
169
- return openBlock(), createBlock(_sfc_main$8, {
145
+ return openBlock(), createBlock(_sfc_main$7, {
170
146
  "custom-element-name": unref(COMPONENT_NAME),
171
147
  environment: __props.environment,
172
148
  locale: __props.locale,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-CiKxWtdx.js"),n=require("../../vendor-ui-BuRqLx74.js"),o=require("../../ContentWithAsideLayout-DHpnJfGA.js"),a=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js"),r=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),i=require("../../url-D8GJi5rF.js"),c=require("../../useLoadInitialData-BqiAFNFi.js"),l=require("../../usePayments-is5c66Z6.js"),s=require("../../usePaymentMethodOptions-DszFvgKX.js"),u=require("../../usePaymentMethods-Bb1Xbads.js"),p=e.defineComponent({__name:"PayButton",props:{amount:{type:Object},paymentMethod:{type:Object},type:{type:String},variant:{type:String},color:{type:String},size:{type:String},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{type:null},iconSuffix:{type:null},tag:{type:String},preventDoubleClick:{type:Boolean}},emits:["click"],setup(t){const o=t,{$t:a}=n.useIntl(),r=e.computed(()=>({color:o.color??"primary",disabled:o.disabled,iconPrefix:o.iconPrefix,iconSuffix:o.iconSuffix,loading:o.loading,pill:o.pill,size:o.size??"lg",square:o.square,tag:o.tag,type:o.type,variant:o.variant})),i=e.computed(()=>{var t,n,a;switch(null==(t=o.paymentMethod)?void 0:t.paymentMethodType){case"scheme":return"Credit Card";case"applepay":return"Apple Pay";case"googlepay":return"Google Pay";case"paypal":return"PayPal";case"ideal":return"iDeal";case"klarna":return"Klarna";case"bcmc":return"BCMC";case"sepadirectdebit":return"SEPA";case"twint":return"Twint";case"swish":return"Swish";case"vipps":return"Vipps";case"mbway":return"MBway";case"alipay":return"AliPay";case"wechatpayWeb":return"WeChatPay";case"afterpay_default":return"Afterpay";case"affirm":return"Affirm";case"ach":return"ACH";case"blik":return"Blik";case"cashapp":return"Cash App Pay";case"amazonpay":return"Amazon Pay";case"venmo":return"Venmo";case"clicktopay":return"Click to Pay";case"upi":return"UPI";case"revolutpay":return"Revolut Pay";case"ratepay":return"Ratepay";case"walley":return"Walley";case"alma":return"Alma";case"facilypay_3x":case"facilypay_4x":return"Oney";case"samsungpay":return"Samsung Pay";case"bizum":return"Bizum";case"pix":return"Pix";case"multibanco":return"Multibanco";case"openbanking_UK":return"Open Banking";default:return(null==(n=o.paymentMethod)?void 0:n.paymentMethodType)?e.capitalize(null==(a=o.paymentMethod)?void 0:a.paymentMethodType):""}}),c=e.computed(()=>o.amount&&o.paymentMethod?a({defaultMessage:"Pay {amount} with {type}",id:"pay_button.label.amount_and_payment_method",description:"The label for the pay button when both the amount and the payment method are known"},{amount:n.formatAmount(o.amount),type:i.value}):o.amount?a({defaultMessage:"Pay {amount}",id:"pay_button.label.amount_only",description:"The label for the pay button when only the amount is known"},{amount:n.formatAmount(o.amount),type:i.value}):a({defaultMessage:"Pay",id:"pay_button.label.default",description:"The default label for the pay button when no amount and payment method are known"}));return(t,o)=>(e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),e.mergeProps(r.value,{class:"w-full",onClick:o[0]||(o[0]=e=>t.$emit("click",e))}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1},16))}}),d={key:0},m=e.defineComponent({__name:"PayInvoice",props:{invoice:{type:Object},paymentMethodOptions:{type:Array},paymentAttempts:{default:()=>[],type:Array},countryCode:{type:String},amount:{type:Object},downloadService:{type:Function},configuration:{type:Object},isLoading:{type:Boolean},error:{type:null}},setup(t){const{$t:c}=n.useIntl(),l=t,s=e.ref(),u=e.ref(),m=e.ref(!1);function y(){if(!u.value)throw new Error("payment integration form not found");m.value=!0,u.value.submit()}const v=()=>{l.configuration.onPaymentSuccess&&l.configuration.onPaymentSuccess()},f=()=>{m.value=!1};return(l,g)=>(e.openBlock(),e.createBlock(e.unref(o.ContentWithAsideLayout),null,{header:e.withCtx(()=>[e.createVNode(r._sfc_main,{class:"min-h-[52px] w-96"},{default:e.withCtx(()=>[t.invoice&&t.downloadService?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$2),{key:0,invoice:t.invoice,"payment-attempts":t.paymentAttempts,"download-service":()=>t.downloadService(t.invoice.id)},null,8,["invoice","payment-attempts","download-service"])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(()=>{var o,l;return[t.isLoading?(e.openBlock(),e.createBlock(r._sfc_main,{key:0,variant:"section",class:"min-h-[300px]"})):e.createCommentVNode("",!0),(null==(o=t.invoice)?void 0:o.paid)?(e.openBlock(),e.createBlock(i._sfc_main,{key:1,status:"success",title:e.unref(c)({id:"pay_invoice.paid.title",defaultMessage:"Thank you for your payment!",description:"Title shown when the invoice has already been paid"}),class:"mt-8"},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main$3),{variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main$9),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(n.formatAmount)(t.invoice.tax_summary.total_amount)),1)]),_:1})]),_:1},8,["title"])):t.error?(e.openBlock(),e.createBlock(i._sfc_main,{key:2,status:"error",title:e.unref(c)({id:"pay_invoice.error.title",defaultMessage:"Something went wrong",description:"Title shown when the invoice payment fails to load"})},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main$3),{variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({id:"pay_invoice.error.description",defaultMessage:"Please try again or contact support.",description:"Body text shown when the invoice payment fails to load"})),1)]),_:1})]),_:1},8,["title"])):!t.isLoading&&t.countryCode&&t.amount&&t.invoice?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[(null==(l=t.paymentMethodOptions)?void 0:l.length)?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,title:e.unref(c)({id:"pay_invoice.payment_methods.title",defaultMessage:"Payment methods",description:"Section title for the payment method selector on the pay invoice screen"}),"content-background":"none","no-border":"","no-spacing":""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none opacity-60":m.value})},[e.createVNode(a._sfc_main,{ref_key:"paymentIntegrationFormRef",ref:u,amount:t.amount,"country-code":t.countryCode,context:{type:"INVOICE",related_resource_ids:[{type:"INVOICE",id:t.invoice.id}]},"customer-id":t.invoice.customer.id,"force-store-payment-method":"","invoice-id":t.invoice.id,"payment-method-options":t.paymentMethodOptions,variant:"AUTHORIZE",onPaymentSuccess:v,onPaymentFailed:f,onSelect:g[0]||(g[0]=e=>s.value=e)},null,8,["amount","country-code","context","customer-id","invoice-id","payment-method-options"])],2)]),_:1},8,["title"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]}),aside:e.withCtx(()=>[e.createVNode(r._sfc_main,{variant:"section",class:"min-h-[200px]"},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$17),{key:0,invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0)]),_:1}),t.invoice?(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(p,{disabled:!s.value||m.value,loading:m.value,amount:t.amount,"payment-method":s.value,onClick:y},null,8,["disabled","loading","amount","payment-method"])])):e.createCommentVNode("",!0)]),_:1}))}}),y=e.defineComponent({__name:"PayInvoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const o=t,{invoice:a,get:r,downloadInvoicePdf:i}=l.useInvoice({invoiceId:o.configuration.invoiceId}),{payments:p,get:d}=l.usePayments(),{fetchInitial:m}=u.usePaymentMethods({customerId:o.portalObject.customer_id}),{paymentMethodOptions:y,get:v}=s.usePaymentMethodOptions(),{isLoading:f}=c.useLoadInitialData((async()=>{const e=await r();await v({customerId:e.customer.id,amount:e.open_invoice_amount})})(),m(),d(o.configuration.invoiceId)),g=e.computed(()=>{var e;return(null==(e=a.value)?void 0:e.customer)?n.getCustomerCountry(a.value.customer):void 0});return(t,n)=>{var o;return e.renderSlot(t.$slots,"default",{invoice:e.unref(a),isLoading:e.unref(f),amount:null==(o=e.unref(a))?void 0:o.open_invoice_amount,countryCode:g.value,paymentMethodOptions:e.unref(y),paymentAttempts:e.unref(p),downloadService:e.unref(i)})}}}),v=e.defineComponent({__name:"PayInvoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:n=>(o,a)=>{var r,i,c,l;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(g),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(i=null==(r=n.branding)?void 0:r.colors)?void 0:i.primary,"secondary-color":null==(l=null==(c=n.branding)?void 0:c.colors)?void 0:l.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:a[0]||(a[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({invoice:t,isLoading:o,amount:a,countryCode:r,paymentMethodOptions:i,paymentAttempts:c,downloadService:l})=>[e.createVNode(m,{"is-loading":o,invoice:t,amount:a,"country-code":r,"payment-method-options":i,configuration:n.configuration,"payment-attempts":c??[],"download-service":l},null,8,["is-loading","invoice","amount","country-code","payment-method-options","configuration","payment-attempts","download-service"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),f=t.defineCustomElement(v),g=t.getComponentName("pay-invoice");exports.COMPONENT_NAME=g,exports.SolvimonPayInvoice=f,exports.defineSolvimonPayInvoice=()=>{customElements.get(g)||customElements.define(g,f)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-DIy1hvJM.js"),n=require("../../vendor-ui-Dfh3_g4q.js"),o=require("../../ContentWithAsideLayout-DHpnJfGA.js"),a=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js"),r=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),i=require("../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js"),c=require("../../useLoadInitialData-_BjCD0Jc.js"),l=require("../../usePayments-BieVBaz-.js"),s=require("../../usePaymentMethodOptions-xeSTmaVo.js"),u=require("../../usePaymentMethods-CAFMvSOr.js"),p=e.defineComponent({__name:"PayButton",props:{amount:{type:Object},paymentMethod:{type:Object},type:{type:String},variant:{type:String},color:{type:String},size:{type:String},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{type:null},iconSuffix:{type:null},tag:{type:String},preventDoubleClick:{type:Boolean}},emits:["click"],setup(t){const o=t,{$t:a}=n.useIntl(),r=e.computed(()=>({color:o.color??"primary",disabled:o.disabled,iconPrefix:o.iconPrefix,iconSuffix:o.iconSuffix,loading:o.loading,pill:o.pill,size:o.size??"lg",square:o.square,tag:o.tag,type:o.type,variant:o.variant})),i=e.computed(()=>{var t,n,a;switch(null==(t=o.paymentMethod)?void 0:t.paymentMethodType){case"scheme":return"Credit Card";case"applepay":return"Apple Pay";case"googlepay":return"Google Pay";case"paypal":return"PayPal";case"ideal":return"iDeal";case"klarna":return"Klarna";case"bcmc":return"BCMC";case"sepadirectdebit":return"SEPA";case"twint":return"Twint";case"swish":return"Swish";case"vipps":return"Vipps";case"mbway":return"MBway";case"alipay":return"AliPay";case"wechatpayWeb":return"WeChatPay";case"afterpay_default":return"Afterpay";case"affirm":return"Affirm";case"ach":return"ACH";case"blik":return"Blik";case"cashapp":return"Cash App Pay";case"amazonpay":return"Amazon Pay";case"venmo":return"Venmo";case"clicktopay":return"Click to Pay";case"upi":return"UPI";case"revolutpay":return"Revolut Pay";case"ratepay":return"Ratepay";case"walley":return"Walley";case"alma":return"Alma";case"facilypay_3x":case"facilypay_4x":return"Oney";case"samsungpay":return"Samsung Pay";case"bizum":return"Bizum";case"pix":return"Pix";case"multibanco":return"Multibanco";case"openbanking_UK":return"Open Banking";default:return(null==(n=o.paymentMethod)?void 0:n.paymentMethodType)?e.capitalize(null==(a=o.paymentMethod)?void 0:a.paymentMethodType):""}}),c=e.computed(()=>o.amount&&o.paymentMethod?a({defaultMessage:"Pay {amount} with {type}",id:"pay_button.label.amount_and_payment_method",description:"The label for the pay button when both the amount and the payment method are known"},{amount:n.formatAmount(o.amount),type:i.value}):o.amount?a({defaultMessage:"Pay {amount}",id:"pay_button.label.amount_only",description:"The label for the pay button when only the amount is known"},{amount:n.formatAmount(o.amount),type:i.value}):a({defaultMessage:"Pay",id:"pay_button.label.default",description:"The default label for the pay button when no amount and payment method are known"}));return(t,o)=>(e.openBlock(),e.createBlock(e.unref(n._sfc_main$6),e.mergeProps(r.value,{class:"w-full",onClick:o[0]||(o[0]=e=>t.$emit("click",e))}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1},16))}}),d={key:0},m=e.defineComponent({__name:"PayInvoice",props:{invoice:{type:Object},paymentMethodOptions:{type:Array},paymentAttempts:{default:()=>[],type:Array},countryCode:{type:String},amount:{type:Object},downloadService:{type:Function},configuration:{type:Object},isLoading:{type:Boolean},error:{type:null}},setup(t){const{$t:c}=n.useIntl(),l=t,s=e.ref(),u=e.ref(),m=e.ref(!1);function y(){if(!u.value)throw new Error("payment integration form not found");m.value=!0,u.value.submit()}const v=()=>{l.configuration.onPaymentSuccess&&l.configuration.onPaymentSuccess()},f=()=>{m.value=!1};return(l,g)=>(e.openBlock(),e.createBlock(e.unref(o.ContentWithAsideLayout),null,{header:e.withCtx(()=>[e.createVNode(r._sfc_main,{class:"min-h-[52px] w-96"},{default:e.withCtx(()=>[t.invoice&&t.downloadService?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$4),{key:0,invoice:t.invoice,"payment-attempts":t.paymentAttempts,"download-service":()=>t.downloadService(t.invoice.id)},null,8,["invoice","payment-attempts","download-service"])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(()=>{var o,l;return[t.isLoading?(e.openBlock(),e.createBlock(r._sfc_main,{key:0,variant:"section",class:"min-h-[300px]"})):e.createCommentVNode("",!0),(null==(o=t.invoice)?void 0:o.paid)?(e.openBlock(),e.createBlock(i._sfc_main,{key:1,status:"success",title:e.unref(c)({id:"pay_invoice.paid.title",defaultMessage:"Thank you for your payment!",description:"Title shown when the invoice has already been paid"}),class:"mt-8"},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main$1),{variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main$3),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(n.formatAmount)(t.invoice.tax_summary.total_amount)),1)]),_:1})]),_:1},8,["title"])):t.error?(e.openBlock(),e.createBlock(i._sfc_main,{key:2,status:"error",title:e.unref(c)({id:"pay_invoice.error.title",defaultMessage:"Something went wrong",description:"Title shown when the invoice payment fails to load"})},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main$1),{variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({id:"pay_invoice.error.description",defaultMessage:"Please try again or contact support.",description:"Body text shown when the invoice payment fails to load"})),1)]),_:1})]),_:1},8,["title"])):!t.isLoading&&t.countryCode&&t.amount&&t.invoice?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[(null==(l=t.paymentMethodOptions)?void 0:l.length)?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$2),{key:0,title:e.unref(c)({id:"pay_invoice.payment_methods.title",defaultMessage:"Payment methods",description:"Section title for the payment method selector on the pay invoice screen"}),"content-background":"none","no-border":"","no-spacing":""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none opacity-60":m.value})},[e.createVNode(a._sfc_main,{ref_key:"paymentIntegrationFormRef",ref:u,amount:t.amount,"country-code":t.countryCode,context:{type:"INVOICE",related_resource_ids:[{type:"INVOICE",id:t.invoice.id}]},"customer-id":t.invoice.customer.id,"force-store-payment-method":"","invoice-id":t.invoice.id,"payment-method-options":t.paymentMethodOptions,variant:"AUTHORIZE",onPaymentSuccess:v,onPaymentFailed:f,onSelect:g[0]||(g[0]=e=>s.value=e)},null,8,["amount","country-code","context","customer-id","invoice-id","payment-method-options"])],2)]),_:1},8,["title"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]}),aside:e.withCtx(()=>[e.createVNode(r._sfc_main,{variant:"section",class:"min-h-[200px]"},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createBlock(e.unref(n._sfc_main$17),{key:0,invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0)]),_:1}),t.invoice?(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(p,{disabled:!s.value||m.value,loading:m.value,amount:t.amount,"payment-method":s.value,onClick:y},null,8,["disabled","loading","amount","payment-method"])])):e.createCommentVNode("",!0)]),_:1}))}}),y=e.defineComponent({__name:"PayInvoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const o=t,{invoice:a,get:r,downloadInvoicePdf:i}=l.useInvoice({invoiceId:o.configuration.invoiceId}),{payments:p,get:d}=l.usePayments(),{fetchInitial:m}=u.usePaymentMethods({customerId:o.portalObject.customer_id}),{paymentMethodOptions:y,get:v}=s.usePaymentMethodOptions(),{isLoading:f}=c.useLoadInitialData((async()=>{const e=await r();await v({customerId:e.customer.id,amount:e.open_invoice_amount})})(),m(),d(o.configuration.invoiceId)),g=e.computed(()=>{var e;return(null==(e=a.value)?void 0:e.customer)?n.getCustomerCountry(a.value.customer):void 0});return(t,n)=>{var o;return e.renderSlot(t.$slots,"default",{invoice:e.unref(a),isLoading:e.unref(f),amount:null==(o=e.unref(a))?void 0:o.open_invoice_amount,countryCode:g.value,paymentMethodOptions:e.unref(y),paymentAttempts:e.unref(p),downloadService:e.unref(i)})}}}),v=e.defineComponent({__name:"PayInvoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:n=>(o,a)=>{var r,i,c,l;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(g),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(i=null==(r=n.branding)?void 0:r.colors)?void 0:i.primary,"secondary-color":null==(l=null==(c=n.branding)?void 0:c.colors)?void 0:l.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:a[0]||(a[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({invoice:t,isLoading:o,amount:a,countryCode:r,paymentMethodOptions:i,paymentAttempts:c,downloadService:l})=>[e.createVNode(m,{"is-loading":o,invoice:t,amount:a,"country-code":r,"payment-method-options":i,configuration:n.configuration,"payment-attempts":c??[],"download-service":l},null,8,["is-loading","invoice","amount","country-code","payment-method-options","configuration","payment-attempts","download-service"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),f=t.defineCustomElement(v),g=t.getComponentName("pay-invoice");exports.COMPONENT_NAME=g,exports.SolvimonPayInvoice=f,exports.defineSolvimonPayInvoice=()=>{customElements.get(g)||customElements.define(g,f)};
@@ -1,14 +1,14 @@
1
1
  import { defineComponent, computed, capitalize, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, ref, createVNode, createCommentVNode, createElementBlock, Fragment, createElementVNode, normalizeClass, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
- import { _ as _sfc_main$d, d as defineCustomElement, g as getComponentName } from "../../component-CUJ_G2Nw.mjs";
3
- import { u as useIntl, E as formatAmount, c as _sfc_main$4, F as _sfc_main$6, e as _sfc_main$8, q as _sfc_main$9, _ as _sfc_main$a, d as _sfc_main$c, g as getCustomerCountry } from "../../vendor-ui-BoGKOJ36.mjs";
2
+ import { _ as _sfc_main$d, d as defineCustomElement, g as getComponentName } from "../../component--Y7Igv5i.mjs";
3
+ import { u as useIntl, E as formatAmount, k as _sfc_main$4, F as _sfc_main$6, a as _sfc_main$8, c as _sfc_main$9, b as _sfc_main$a, e as _sfc_main$c, o as getCustomerCountry } from "../../vendor-ui-ItGf7wJV.mjs";
4
4
  import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
5
- import { _ as _sfc_main$b } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs";
5
+ import { _ as _sfc_main$b } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs";
6
6
  import { _ as _sfc_main$5 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
7
- import { _ as _sfc_main$7 } from "../../url-BjZ1Pg0l.mjs";
8
- import { u as useLoadInitialData } from "../../useLoadInitialData-BhpIg7OF.mjs";
9
- import { u as useInvoice, a as usePayments } from "../../usePayments-DgoZoBZh.mjs";
10
- import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-PcMjtMSF.mjs";
11
- import { u as usePaymentMethods } from "../../usePaymentMethods-B5AbGWsn.mjs";
7
+ import { _ as _sfc_main$7 } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs";
8
+ import { u as useLoadInitialData } from "../../useLoadInitialData-BP1v7qhd.mjs";
9
+ import { u as useInvoice, a as usePayments } from "../../usePayments-D88XSZfS.mjs";
10
+ import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-CWfGvW0U.mjs";
11
+ import { u as usePaymentMethods } from "../../usePaymentMethods-Cyk4cjoE.mjs";
12
12
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13
13
  __name: "PayButton",
14
14
  props: {
@@ -225,7 +225,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
225
225
  ((_a = __props.invoice) == null ? void 0 : _a.paid) ? (openBlock(), createBlock(_sfc_main$7, {
226
226
  key: 1,
227
227
  status: "success",
228
- title: unref($t)({ id: "pay_invoice.paid.title", defaultMessage: "Thank you for your payment!", description: "Title shown when the invoice has already been paid" }),
228
+ title: unref($t)({
229
+ id: "pay_invoice.paid.title",
230
+ defaultMessage: "Thank you for your payment!",
231
+ description: "Title shown when the invoice has already been paid"
232
+ }),
229
233
  class: "mt-8"
230
234
  }, {
231
235
  default: withCtx(() => [
@@ -244,7 +248,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
244
248
  }, 8, ["title"])) : __props.error ? (openBlock(), createBlock(_sfc_main$7, {
245
249
  key: 2,
246
250
  status: "error",
247
- title: unref($t)({ id: "pay_invoice.error.title", defaultMessage: "Something went wrong", description: "Title shown when the invoice payment fails to load" })
251
+ title: unref($t)({
252
+ id: "pay_invoice.error.title",
253
+ defaultMessage: "Something went wrong",
254
+ description: "Title shown when the invoice payment fails to load"
255
+ })
248
256
  }, {
249
257
  default: withCtx(() => [
250
258
  createVNode(unref(_sfc_main$8), {
@@ -252,7 +260,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
252
260
  class: "mt-1"
253
261
  }, {
254
262
  default: withCtx(() => [
255
- createTextVNode(toDisplayString(unref($t)({ id: "pay_invoice.error.description", defaultMessage: "Please try again or contact support.", description: "Body text shown when the invoice payment fails to load" })), 1)
263
+ createTextVNode(toDisplayString(unref($t)({
264
+ id: "pay_invoice.error.description",
265
+ defaultMessage: "Please try again or contact support.",
266
+ description: "Body text shown when the invoice payment fails to load"
267
+ })), 1)
256
268
  ]),
257
269
  _: 1
258
270
  })
@@ -261,7 +273,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
261
273
  }, 8, ["title"])) : !__props.isLoading && __props.countryCode && __props.amount && __props.invoice ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
262
274
  ((_b = __props.paymentMethodOptions) == null ? void 0 : _b.length) ? (openBlock(), createBlock(unref(_sfc_main$a), {
263
275
  key: 0,
264
- title: unref($t)({ id: "pay_invoice.payment_methods.title", defaultMessage: "Payment methods", description: "Section title for the payment method selector on the pay invoice screen" }),
276
+ title: unref($t)({
277
+ id: "pay_invoice.payment_methods.title",
278
+ defaultMessage: "Payment methods",
279
+ description: "Section title for the payment method selector on the pay invoice screen"
280
+ }),
265
281
  "content-background": "none",
266
282
  "no-border": "",
267
283
  "no-spacing": ""
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-CiKxWtdx.js"),o=require("../../vendor-ui-BuRqLx74.js"),n=require("../../ContentWithAsideLayout-DHpnJfGA.js"),r=require("../../PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js"),a=require("../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js"),s=require("../../useCustomer-bO4D6e4Z.js"),i=require("../../usePaymentMethods-Bb1Xbads.js"),l=require("../../usePaymentMethodOptions-DszFvgKX.js"),m=require("../../useLoadInitialData-BqiAFNFi.js"),p={class:"grid gap-4 sm:grid-cols-1 md:grid-cols-2"},d={key:0},c=e.defineComponent({__name:"ScreenTitle",props:{title:{type:String},description:{type:String}},setup:t=>(n,r)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",null,[e.createVNode(e.unref(o._sfc_main$3),{variant:"heading-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.description?(e.openBlock(),e.createBlock(e.unref(o._sfc_main$3),{key:0,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})):e.createCommentVNode("",!0)]),n.$slots.right?(e.openBlock(),e.createElementBlock("div",d,[e.renderSlot(n.$slots,"right")])):e.createCommentVNode("",!0)]))}),u=e.defineComponent({__name:"PaymentMethodsManagement",props:{customer:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},error:{type:null}},emits:["set-default"],setup(t,{emit:s}){const i=s,{$t:l}=o.useIntl(),m=e.ref(!1);return(s,p)=>(e.openBlock(),e.createBlock(e.unref(n.ContentWithAsideLayout),null,{header:e.withCtx(()=>[e.createVNode(c,{title:e.unref(l)({defaultMessage:"Payment methods",id:"screens.payment_method_management.title",description:"The title for the payment method management screen "}),description:e.unref(l)({defaultMessage:"Add a new payment method or set a default payment method for your payments.",id:"screens.payment_method_management.description",description:"The descriptive text for the payment method management screen"})},null,8,["title","description"])]),content:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{"no-border":"","no-spacing":"","content-background":"none",title:"Your payment methods"},{default:e.withCtx(()=>[e.createVNode(r._sfc_main,{"payment-methods":t.paymentMethods,onSetDefault:p[0]||(p[0]=e=>i("set-default"))},null,8,["payment-methods"])]),_:1}),m.value?(e.openBlock(),e.createBlock(a._sfc_main,{key:0,customer:t.customer,"payment-method-options":t.paymentMethodOptions},null,8,["customer","payment-method-options"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(e.unref(o._sfc_main$1),{key:1,color:"gray",variant:"outline",onClick:p[1]||(p[1]=e=>m.value=!1)},{default:e.withCtx(()=>[...p[3]||(p[3]=[e.createTextVNode("Cancel",-1)])]),_:1})):(e.openBlock(),e.createBlock(e.unref(o._sfc_main$1),{key:2,color:"gray",variant:"outline",onClick:p[2]||(p[2]=e=>m.value=!0)},{default:e.withCtx(()=>[...p[4]||(p[4]=[e.createTextVNode("Add payment method",-1)])]),_:1}))]),_:1}))}}),y=e.defineComponent({__name:"PaymentMethodsManagement.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const o=t,n=o.portalObject.customer_id,{customer:r,get:a}=s.useCustomer({customerId:n}),{items:p,fetchInitial:d}=i.usePaymentMethods({customerId:o.portalObject.customer_id}),{paymentMethodOptions:c,get:u}=l.usePaymentMethodOptions(),{isLoading:y}=m.useLoadInitialData(a.execute(),d(),u({customerId:o.portalObject.customer_id}));return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(r),paymentMethods:e.unref(p),paymentMethodOptions:e.unref(c),isLoading:e.unref(y),refreshPaymentMethods:e.unref(d)})}}),g=e.defineComponent({__name:"PaymentMethodsManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup:o=>(n,r)=>{var a,s,i,l;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(f),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(a=o.branding)?void 0:a.colors)?void 0:s.primary,"secondary-color":null==(l=null==(i=o.branding)?void 0:i.colors)?void 0:l.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:r[0]||(r[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,paymentMethods:o,paymentMethodOptions:n,isLoading:r,refreshPaymentMethods:a})=>[t?(e.openBlock(),e.createBlock(u,{key:0,"is-loading":r,"payment-methods":o,"payment-method-options":n,customer:t,onSetDefault:a},null,8,["is-loading","payment-methods","payment-method-options","customer","onSetDefault"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),h=t.defineCustomElement(g),f=t.getComponentName("payment-methods-management");exports.COMPONENT_NAME=f,exports.SolvimonPaymentMethodsManagement=h,exports.defineSolvimonPaymentMethodsManagement=()=>{customElements.get(f)||customElements.define(f,h)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-DIy1hvJM.js"),o=require("../../vendor-ui-Dfh3_g4q.js"),n=require("../../ContentWithAsideLayout-DHpnJfGA.js"),r=require("../../PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js"),a=require("../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js"),s=require("../../useCustomer-C1XTqmrQ.js"),i=require("../../usePaymentMethods-CAFMvSOr.js"),l=require("../../usePaymentMethodOptions-xeSTmaVo.js"),m=require("../../useLoadInitialData-_BjCD0Jc.js"),p={class:"grid gap-4 sm:grid-cols-1 md:grid-cols-2"},d={key:0},c=e.defineComponent({__name:"ScreenTitle",props:{title:{type:String},description:{type:String}},setup:t=>(n,r)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",null,[e.createVNode(e.unref(o._sfc_main$1),{variant:"heading-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.description?(e.openBlock(),e.createBlock(e.unref(o._sfc_main$1),{key:0,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})):e.createCommentVNode("",!0)]),n.$slots.right?(e.openBlock(),e.createElementBlock("div",d,[e.renderSlot(n.$slots,"right")])):e.createCommentVNode("",!0)]))}),u=e.defineComponent({__name:"PaymentMethodsManagement",props:{customer:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},error:{type:null}},emits:["set-default","delete"],setup(t,{emit:s}){const i=s,{$t:l}=o.useIntl(),m=e.ref(!1);return(s,p)=>(e.openBlock(),e.createBlock(e.unref(n.ContentWithAsideLayout),null,{header:e.withCtx(()=>[e.createVNode(c,{title:e.unref(l)({defaultMessage:"Payment methods",id:"screens.payment_method_management.title",description:"The title for the payment method management screen "}),description:e.unref(l)({defaultMessage:"Add a new payment method or set a default payment method for your payments.",id:"screens.payment_method_management.description",description:"The descriptive text for the payment method management screen"})},null,8,["title","description"])]),content:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main$2),{"no-border":"","no-spacing":"","content-background":"none",title:"Your payment methods"},{default:e.withCtx(()=>[e.createVNode(r._sfc_main,{"payment-methods":t.paymentMethods,onSetDefault:p[0]||(p[0]=e=>i("set-default")),onDelete:p[1]||(p[1]=e=>i("delete"))},null,8,["payment-methods"])]),_:1}),m.value?(e.openBlock(),e.createBlock(a._sfc_main,{key:0,customer:t.customer,"payment-method-options":t.paymentMethodOptions},null,8,["customer","payment-method-options"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(e.unref(o._sfc_main$6),{key:1,color:"gray",variant:"outline",onClick:p[2]||(p[2]=e=>m.value=!1)},{default:e.withCtx(()=>[...p[4]||(p[4]=[e.createTextVNode("Cancel",-1)])]),_:1})):(e.openBlock(),e.createBlock(e.unref(o._sfc_main$6),{key:2,color:"gray",variant:"outline",onClick:p[3]||(p[3]=e=>m.value=!0)},{default:e.withCtx(()=>[...p[5]||(p[5]=[e.createTextVNode("Add payment method",-1)])]),_:1}))]),_:1}))}}),y=e.defineComponent({__name:"PaymentMethodsManagement.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const o=t,n=o.portalObject.customer_id,{customer:r,get:a}=s.useCustomer({customerId:n}),{items:p,fetchInitial:d}=i.usePaymentMethods({customerId:o.portalObject.customer_id}),{paymentMethodOptions:c,get:u}=l.usePaymentMethodOptions(),{isLoading:y}=m.useLoadInitialData(a.execute(),d(),u({customerId:o.portalObject.customer_id}));return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(r),paymentMethods:e.unref(p),paymentMethodOptions:e.unref(c),isLoading:e.unref(y),refreshPaymentMethods:e.unref(d)})}}),g=e.defineComponent({__name:"PaymentMethodsManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup:o=>(n,r)=>{var a,s,i,l;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(f),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(a=o.branding)?void 0:a.colors)?void 0:s.primary,"secondary-color":null==(l=null==(i=o.branding)?void 0:i.colors)?void 0:l.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:r[0]||(r[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,paymentMethods:o,paymentMethodOptions:n,isLoading:r,refreshPaymentMethods:a})=>[t?(e.openBlock(),e.createBlock(u,{key:0,"is-loading":r,"payment-methods":o,"payment-method-options":n,customer:t,onSetDefault:a,onDelete:a},null,8,["is-loading","payment-methods","payment-method-options","customer","onSetDefault","onDelete"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),h=t.defineCustomElement(g),f=t.getComponentName("payment-methods-management");exports.COMPONENT_NAME=f,exports.SolvimonPaymentMethodsManagement=h,exports.defineSolvimonPaymentMethodsManagement=()=>{customElements.get(f)||customElements.define(f,h)};