@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
package/README.md CHANGED
@@ -193,40 +193,42 @@ automatically via GitHub Actions. See the
193
193
  Want to contribute? Check the [developer documentation](./docs/development/readme.md).
194
194
 
195
195
  <!-- log-codes:start — DO NOT EDIT: auto-generated by `npm run logs:list` -->
196
+
196
197
  ## Error logging
197
198
 
198
199
  The SDK emits structured log entries via the [`onLog`](#error-logging) callback. Subscribe to receive all log events and filter by `code` for programmatic handling.
199
200
 
200
201
  ### Error codes
201
202
 
202
- | Code | Description |
203
- | :--- | :---------- |
204
- | `ADYEN_SUBMIT_FAILED` | Failed to submit Adyen drop-in |
205
- | `APPLE_PAY_AUTHORIZATION_FAILED` | Payment authorization failed |
206
- | `APPLE_PAY_ERROR` | Apple Pay error |
207
- | `CUSTOMER_FETCH_FAILED` | Failed to fetch customer billing information |
208
- | `EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR` | The Google Pay button reference is not found and cannot be mounted |
209
- | `EXPRESS_CHECKOUT_PAYPAL_ERROR` | The PayPal button reference is not found and cannot be mounted |
210
- | `INITIAL_DATA_LOAD_FAILED` | Failed to load initial data |
211
- | `INTEGRATION_ERROR` | Unhandled error in payment submission flow |
212
- | `INVALID_COUNTRY_CODE` | invalid country code provided:… |
213
- | `INVALID_EMAIL` | invalid email provided:… |
214
- | `INVALID_REDIRECT_RESULT` | Redirect result is set but payment acceptor id is missing |
215
- | `INVALID_TOKEN` | Failed to fetch access token |
216
- | `INVOICE_PREVIEW_FAILED` | Failed to load invoice preview |
217
- | `PAYMENT_AUTHORIZATION_FAILED` | Failed payment authorization for payment acceptor with id… |
218
- | `PAYMENT_DETAILS_CALL_FAILED` | Failed fetching payment details |
219
- | `PAYMENT_INTEGRATION_INITIALIZATION_FAILED` | Failed to mount Adyen web drop-in |
220
- | `PURCHASE_FAILED` | Failed to complete upgrade subscription purchase |
221
- | `REQUEST_PARSE_FAILED` | Failed to parse JSON response |
222
- | `RESOURCE_REVOKED` | Failed to load portal resource |
223
- | `TOKENIZATION_FAILED` | Missing customer id for payment acceptor with id… |
203
+ | Code | Description |
204
+ | :------------------------------------------ | :----------------------------------------------------------------- |
205
+ | `ADYEN_SUBMIT_FAILED` | Failed to submit Adyen drop-in |
206
+ | `APPLE_PAY_AUTHORIZATION_FAILED` | Payment authorization failed |
207
+ | `APPLE_PAY_ERROR` | Apple Pay error |
208
+ | `CUSTOMER_FETCH_FAILED` | Failed to fetch customer billing information |
209
+ | `EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR` | The Google Pay button reference is not found and cannot be mounted |
210
+ | `EXPRESS_CHECKOUT_PAYPAL_ERROR` | The PayPal button reference is not found and cannot be mounted |
211
+ | `INITIAL_DATA_LOAD_FAILED` | Failed to load initial data |
212
+ | `INTEGRATION_ERROR` | Unhandled error in payment submission flow |
213
+ | `INVALID_COUNTRY_CODE` | invalid country code provided:… |
214
+ | `INVALID_EMAIL` | invalid email provided:… |
215
+ | `INVALID_REDIRECT_RESULT` | Redirect result is set but payment acceptor id is missing |
216
+ | `INVALID_TOKEN` | Failed to fetch access token |
217
+ | `INVOICE_PREVIEW_FAILED` | Failed to load invoice preview |
218
+ | `PAYMENT_AUTHORIZATION_FAILED` | Failed payment authorization for payment acceptor with id… |
219
+ | `PAYMENT_DETAILS_CALL_FAILED` | Failed fetching payment details |
220
+ | `PAYMENT_INTEGRATION_INITIALIZATION_FAILED` | Failed to mount Adyen web drop-in |
221
+ | `PURCHASE_FAILED` | Failed to complete upgrade subscription purchase |
222
+ | `REQUEST_PARSE_FAILED` | Failed to parse JSON response |
223
+ | `RESOURCE_REVOKED` | Failed to load portal resource |
224
+ | `TOKENIZATION_FAILED` | Missing customer id for payment acceptor with id… |
224
225
 
225
226
  ### Warning codes
226
227
 
227
- | Code | Description |
228
- | :--- | :---------- |
228
+ | Code | Description |
229
+ | :---------------------------- | :------------------------------------------------------------ |
229
230
  | `ADYEN_INVALID_CONFIGURATION` | No environment set for adyen advanced flow, defaulted to live |
230
- | `APPLE_PAY_ACTION_REQUIRED` | Payment requires additional action |
231
- | `TRANSLATION_LOAD_FAILED` | Failed to load translations for locale… |
231
+ | `APPLE_PAY_ACTION_REQUIRED` | Payment requires additional action |
232
+ | `TRANSLATION_LOAD_FAILED` | Failed to load translations for locale… |
233
+
232
234
  <!-- log-codes:end — DO NOT EDIT: auto-generated by `npm run logs:list` -->
@@ -0,0 +1,238 @@
1
+ import { computed, defineComponent, toRef, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createTextVNode, toDisplayString, unref, Fragment, createElementVNode, createVNode, createCommentVNode, defineAsyncComponent, ref, watch } from "vue";
2
+ import { u as useIntl, t as _sfc_main$3, n as _sfc_main$4, k as _sfc_main$5, a as _sfc_main$6, r as _sfc_main$7 } from "./vendor-ui-ItGf7wJV.mjs";
3
+ import { _ as _sfc_main$2 } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs";
4
+ const humanise = (value) => value.replaceAll("_", " ").toLowerCase().replace(/^./, (character) => character.toUpperCase());
5
+ function getAccessibleName(paymentMethod) {
6
+ var _a, _b, _c, _d, _e, _f;
7
+ const parts = [];
8
+ switch (paymentMethod.type) {
9
+ case "CARD":
10
+ parts.push(
11
+ paymentMethod.card.brand && humanise(paymentMethod.card.brand),
12
+ paymentMethod.card.last_four_digits
13
+ );
14
+ break;
15
+ case "ONLINE_BANKING":
16
+ parts.push(
17
+ ((_a = paymentMethod.online_banking) == null ? void 0 : _a.variant) && humanise(paymentMethod.online_banking.variant),
18
+ (_b = paymentMethod.online_banking) == null ? void 0 : _b.owner_name
19
+ );
20
+ break;
21
+ case "DIRECT_DEBIT":
22
+ parts.push(
23
+ ((_c = paymentMethod.direct_debit) == null ? void 0 : _c.variant) && humanise(paymentMethod.direct_debit.variant),
24
+ (_d = paymentMethod.direct_debit) == null ? void 0 : _d.owner_name
25
+ );
26
+ break;
27
+ case "BUY_NOW_PAY_LATER":
28
+ parts.push(
29
+ ((_e = paymentMethod.buy_now_pay_later) == null ? void 0 : _e.variant) && humanise(paymentMethod.buy_now_pay_later.variant)
30
+ );
31
+ break;
32
+ case "DIGITAL_WALLET":
33
+ parts.push(
34
+ ((_f = paymentMethod.digital_wallet) == null ? void 0 : _f.variant) && humanise(paymentMethod.digital_wallet.variant)
35
+ );
36
+ break;
37
+ }
38
+ const name = parts.filter(Boolean).join(" ");
39
+ return name || humanise(paymentMethod.type);
40
+ }
41
+ function usePaymentMethodSelectorOptions(paymentMethods) {
42
+ const options = computed(
43
+ () => paymentMethods.value.map((paymentMethod) => ({
44
+ value: paymentMethod.id,
45
+ label: getAccessibleName(paymentMethod)
46
+ }))
47
+ );
48
+ const paymentMethodsById = computed(
49
+ () => Object.fromEntries(
50
+ paymentMethods.value.map((paymentMethod) => [paymentMethod.id, paymentMethod])
51
+ )
52
+ );
53
+ return { options, paymentMethodsById };
54
+ }
55
+ const _hoisted_1 = { class: "sr-only" };
56
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
57
+ __name: "PaymentMethodSelector",
58
+ props: {
59
+ paymentMethods: { type: Array },
60
+ modelValue: { type: String },
61
+ label: { type: String },
62
+ required: { type: Boolean },
63
+ disabled: { type: Boolean },
64
+ error: { type: [String, Object, Array] },
65
+ rootClass: { type: String },
66
+ showAddOption: { type: Boolean, default: true },
67
+ paymentMethodOptions: { type: Array }
68
+ },
69
+ emits: ["update:modelValue", "add-payment-method"],
70
+ setup(__props, { emit: __emit }) {
71
+ const props = __props;
72
+ const emit = __emit;
73
+ const { $t } = useIntl();
74
+ const { options, paymentMethodsById } = usePaymentMethodSelectorOptions(
75
+ toRef(props, "paymentMethods")
76
+ );
77
+ const selectedValue = computed({
78
+ get: () => props.modelValue,
79
+ set: (value) => emit("update:modelValue", typeof value === "string" ? value : void 0)
80
+ });
81
+ const hasPaymentMethods = computed(() => props.paymentMethods.length > 0);
82
+ const canAddPaymentMethod = computed(() => {
83
+ var _a;
84
+ return ((_a = props.paymentMethodOptions) == null ? void 0 : _a.length) !== 0;
85
+ });
86
+ return (_ctx, _cache) => {
87
+ return openBlock(), createElementBlock("div", {
88
+ class: normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2", __props.rootClass])
89
+ }, [
90
+ !hasPaymentMethods.value && !canAddPaymentMethod.value ? (openBlock(), createBlock(_sfc_main$2, {
91
+ key: 0,
92
+ class: "sv-payment-method-selector__empty",
93
+ icon: "credit_card_off"
94
+ }, {
95
+ title: withCtx(() => [
96
+ createTextVNode(toDisplayString(unref($t)({
97
+ defaultMessage: "No payment methods available",
98
+ description: "Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",
99
+ id: "payment_method_selector.empty_state.title"
100
+ })), 1)
101
+ ]),
102
+ _: 1
103
+ })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
104
+ createElementVNode("div", null, [
105
+ hasPaymentMethods.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
106
+ key: 0,
107
+ modelValue: selectedValue.value,
108
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedValue.value = $event),
109
+ class: "sv-payment-method-selector__options",
110
+ name: "payment-method",
111
+ direction: "column",
112
+ options: unref(options),
113
+ label: __props.label,
114
+ required: __props.required,
115
+ disabled: __props.disabled,
116
+ error: __props.error,
117
+ "show-radio": false
118
+ }, {
119
+ prefix: withCtx(({ optionValue }) => [
120
+ createVNode(unref(_sfc_main$4), {
121
+ class: "sv-payment-method-selector__option-content grow",
122
+ "payment-method": unref(paymentMethodsById)[String(optionValue)]
123
+ }, null, 8, ["payment-method"])
124
+ ]),
125
+ label: withCtx(({ option }) => [
126
+ createElementVNode("span", _hoisted_1, toDisplayString(option.label), 1)
127
+ ]),
128
+ _: 1
129
+ }, 8, ["modelValue", "options", "label", "required", "disabled", "error"])) : createCommentVNode("", true)
130
+ ]),
131
+ __props.showAddOption && canAddPaymentMethod.value ? (openBlock(), createBlock(unref(_sfc_main$5), {
132
+ key: 0,
133
+ class: "sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",
134
+ variant: "outline",
135
+ color: "gray",
136
+ "icon-prefix": "add",
137
+ type: "button",
138
+ size: "sm",
139
+ disabled: __props.disabled,
140
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("add-payment-method"))
141
+ }, {
142
+ default: withCtx(() => [
143
+ createTextVNode(toDisplayString(unref($t)({
144
+ defaultMessage: "Add payment method",
145
+ description: "Label of the button that adds a new payment method",
146
+ id: "payment_method_selector.add_payment_method"
147
+ })), 1)
148
+ ]),
149
+ _: 1
150
+ }, 8, ["disabled"])) : __props.showAddOption ? (openBlock(), createBlock(unref(_sfc_main$6), {
151
+ key: 1,
152
+ variant: "body-sm",
153
+ shade: "lighter",
154
+ tag: "p",
155
+ class: "sv-payment-method-selector__unavailable"
156
+ }, {
157
+ default: withCtx(() => [
158
+ createTextVNode(toDisplayString(unref($t)({
159
+ defaultMessage: "There are no available payment methods. Please contact support for more information.",
160
+ description: "Shown in place of the add button when the customer cannot add any payment method",
161
+ id: "payment_method_selector.no_payment_methods_available"
162
+ })), 1)
163
+ ]),
164
+ _: 1
165
+ })) : createCommentVNode("", true),
166
+ __props.error && !hasPaymentMethods.value ? (openBlock(), createBlock(unref(_sfc_main$7), {
167
+ key: 2,
168
+ class: "sv-payment-method-selector__error",
169
+ message: __props.error,
170
+ variant: "error"
171
+ }, null, 8, ["message"])) : createCommentVNode("", true)
172
+ ], 64))
173
+ ], 2);
174
+ };
175
+ }
176
+ });
177
+ const _sfc_main = /* @__PURE__ */ defineComponent({
178
+ __name: "AddPaymentMethodPane",
179
+ props: {
180
+ customer: { type: Object },
181
+ paymentMethodOptions: { type: Array },
182
+ isLoading: { type: Boolean },
183
+ isActive: { type: Boolean }
184
+ },
185
+ emits: ["success", "failure"],
186
+ setup(__props, { expose: __expose }) {
187
+ const PaymentMethodForm = defineAsyncComponent(
188
+ () => import("./PaymentMethodForm-B7T5rrNz.mjs").then((m) => m.default)
189
+ );
190
+ const props = __props;
191
+ const configuration = computed(() => ({
192
+ variant: "TOKENIZE"
193
+ }));
194
+ const hasEverBeenActive = ref(false);
195
+ watch(
196
+ () => props.isActive,
197
+ (isActive) => {
198
+ hasEverBeenActive.value = hasEverBeenActive.value || !!isActive;
199
+ },
200
+ { immediate: true }
201
+ );
202
+ const formRef = ref();
203
+ __expose({
204
+ /** Submits the form, for a host whose own chrome owns the button — a modal footer, say. */
205
+ submit: () => {
206
+ var _a;
207
+ return (_a = formRef.value) == null ? void 0 : _a.submit();
208
+ },
209
+ /**
210
+ * Whether the gateway is working on it, so the host can show it and hold everything else. Read
211
+ * through the pane being on screen: a form left behind on another pane is not what is pending.
212
+ */
213
+ isSaving: computed(() => {
214
+ var _a;
215
+ return !!props.isActive && !!((_a = formRef.value) == null ? void 0 : _a.isPaymentPending);
216
+ })
217
+ });
218
+ return (_ctx, _cache) => {
219
+ return __props.customer && hasEverBeenActive.value ? (openBlock(), createBlock(unref(PaymentMethodForm), {
220
+ key: 0,
221
+ ref_key: "formRef",
222
+ ref: formRef,
223
+ class: "sv-add-payment-method-pane",
224
+ "hide-submit-button": "",
225
+ customer: __props.customer,
226
+ "payment-method-options": __props.paymentMethodOptions ?? [],
227
+ "is-loading": __props.isLoading,
228
+ configuration: configuration.value,
229
+ onSuccess: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("success")),
230
+ onFailure: _cache[1] || (_cache[1] = (error) => _ctx.$emit("failure", error))
231
+ }, null, 8, ["customer", "payment-method-options", "is-loading", "configuration"])) : createCommentVNode("", true);
232
+ };
233
+ }
234
+ });
235
+ export {
236
+ _sfc_main$1 as _,
237
+ _sfc_main as a
238
+ };
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),a=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js"),o=e=>e.replaceAll("_"," ").toLowerCase().replace(/^./,e=>e.toUpperCase());function n(e){var t,a,n,r,l,i;const s=[];switch(e.type){case"CARD":s.push(e.card.brand&&o(e.card.brand),e.card.last_four_digits);break;case"ONLINE_BANKING":s.push((null==(t=e.online_banking)?void 0:t.variant)&&o(e.online_banking.variant),null==(a=e.online_banking)?void 0:a.owner_name);break;case"DIRECT_DEBIT":s.push((null==(n=e.direct_debit)?void 0:n.variant)&&o(e.direct_debit.variant),null==(r=e.direct_debit)?void 0:r.owner_name);break;case"BUY_NOW_PAY_LATER":s.push((null==(l=e.buy_now_pay_later)?void 0:l.variant)&&o(e.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":s.push((null==(i=e.digital_wallet)?void 0:i.variant)&&o(e.digital_wallet.variant))}return s.filter(Boolean).join(" ")||o(e.type)}const r={class:"sr-only"},l=e.defineComponent({__name:"PaymentMethodSelector",props:{paymentMethods:{type:Array},modelValue:{type:String},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]},rootClass:{type:String},showAddOption:{type:Boolean,default:!0},paymentMethodOptions:{type:Array}},emits:["update:modelValue","add-payment-method"],setup(o,{emit:l}){const i=o,s=l,{$t:d}=t.useIntl(),{options:m,paymentMethodsById:c}=(p=e.toRef(i,"paymentMethods"),{options:e.computed(()=>p.value.map(e=>({value:e.id,label:n(e)}))),paymentMethodsById:e.computed(()=>Object.fromEntries(p.value.map(e=>[e.id,e])))});var p;const u=e.computed({get:()=>i.modelValue,set:e=>s("update:modelValue","string"==typeof e?e:void 0)}),y=e.computed(()=>i.paymentMethods.length>0),_=e.computed(()=>{var e;return 0!==(null==(e=i.paymentMethodOptions)?void 0:e.length)});return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2",o.rootClass])},[y.value||_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",null,[y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:0,modelValue:u.value,"onUpdate:modelValue":l[0]||(l[0]=e=>u.value=e),class:"sv-payment-method-selector__options",name:"payment-method",direction:"column",options:e.unref(m),label:o.label,required:o.required,disabled:o.disabled,error:o.error,"show-radio":!1},{prefix:e.withCtx(({optionValue:a})=>[e.createVNode(e.unref(t._sfc_main$8),{class:"sv-payment-method-selector__option-content grow","payment-method":e.unref(c)[String(a)]},null,8,["payment-method"])]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",r,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label","required","disabled","error"])):e.createCommentVNode("",!0)]),o.showAddOption&&_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",size:"sm",disabled:o.disabled,onClick:l[1]||(l[1]=e=>s("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add payment method",description:"Label of the button that adds a new payment method",id:"payment_method_selector.add_payment_method"})),1)]),_:1},8,["disabled"])):o.showAddOption?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,variant:"body-sm",shade:"lighter",tag:"p",class:"sv-payment-method-selector__unavailable"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"There are no available payment methods. Please contact support for more information.",description:"Shown in place of the add button when the customer cannot add any payment method",id:"payment_method_selector.no_payment_methods_available"})),1)]),_:1})):e.createCommentVNode("",!0),o.error&&!y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$9),{key:2,class:"sv-payment-method-selector__error",message:o.error,variant:"error"},null,8,["message"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(a._sfc_main,{key:0,class:"sv-payment-method-selector__empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"No payment methods available",description:"Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",id:"payment_method_selector.empty_state.title"})),1)]),_:1}))],2))}}),i=e.defineComponent({__name:"AddPaymentMethodPane",props:{customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},isActive:{type:Boolean}},emits:["success","failure"],setup(t,{expose:a}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentMethodForm-CLz3ZS-b.js")).then(e=>e.default)),n=t,r=e.computed(()=>({variant:"TOKENIZE"})),l=e.ref(!1);e.watch(()=>n.isActive,e=>{l.value=l.value||!!e},{immediate:!0});const i=e.ref();return a({submit:()=>{var e;return null==(e=i.value)?void 0:e.submit()},isSaving:e.computed(()=>{var e;return!!n.isActive&&!!(null==(e=i.value)?void 0:e.isPaymentPending)})}),(a,n)=>t.customer&&l.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,ref_key:"formRef",ref:i,class:"sv-add-payment-method-pane","hide-submit-button":"",customer:t.customer,"payment-method-options":t.paymentMethodOptions??[],"is-loading":t.isLoading,configuration:r.value,onSuccess:n[0]||(n[0]=e=>a.$emit("success")),onFailure:n[1]||(n[1]=e=>a.$emit("failure",e))},null,8,["customer","payment-method-options","is-loading","configuration"])):e.createCommentVNode("",!0)}});exports._sfc_main=l,exports._sfc_main$1=i;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
2
- import { u as useIntl, k as _sfc_main$2, c as _sfc_main$3 } from "./vendor-ui-BoGKOJ36.mjs";
2
+ import { u as useIntl, j as _sfc_main$2, k as _sfc_main$3 } from "./vendor-ui-ItGf7wJV.mjs";
3
3
  import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
4
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-zB_GKeUR.mjs";
4
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BlEf-RZ5.mjs";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "BillingInformation",
7
7
  props: {
@@ -1 +1 @@
1
- const e=require("vue"),i=require("./vendor-ui-BuRqLx74.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-bqR_FeM4.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
1
+ const e=require("vue"),i=require("./vendor-ui-Dfh3_g4q.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-aJOy3kr1.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$5),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { u as useIntl, _ as _sfc_main$2, e as _sfc_main$4, c as _sfc_main$5 } from "./vendor-ui-BoGKOJ36.mjs";
3
- import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs";
2
+ import { u as useIntl, b as _sfc_main$2, a as _sfc_main$4, k as _sfc_main$5 } from "./vendor-ui-ItGf7wJV.mjs";
3
+ import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs";
4
4
  import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
5
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-zB_GKeUR.mjs";
5
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BlEf-RZ5.mjs";
6
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
7
  __name: "CustomerPaymentMethodsBlock",
8
8
  props: {
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),a=require("./useActionDispatchProvider-aJOy3kr1.js"),s=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(n){const a=n,{$t:s}=t.useIntl(),i=e.computed(()=>a.paymentMethods.length>0);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(s)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(n.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"payment-methods":n.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),n.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:d[1]||(d[1]=e=>a.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[n.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>a.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),i=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=a.useActionDispatchProvider();return(a,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(s,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(d=t.configuration)?void 0:d.showViewAllButton,"show-add-button":null==(m=t.configuration)?void 0:m.showAddButton,onViewAllPaymentMethods:i[0]||(i[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;