@solvimon/solvimon-web 0.1.0-alpha.1 → 0.1.0-alpha.10

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 (196) hide show
  1. package/README.md +196 -44
  2. package/dist/ApiStatus-CyNDp_op.mjs +9 -0
  3. package/dist/ApiStatus-oqvUEWJx.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +9 -6
  5. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
  6. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
  7. package/dist/{ContentWithAsideLayout-BC-C5Gjt.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
  8. package/dist/{useCustomerPaymentMethodOptions-Fe_dLxfv.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +29 -37
  9. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +20 -9
  11. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
  12. package/dist/PaymentHistoryBlock-BiiFJkpT.js +1 -0
  13. package/dist/PaymentHistoryBlock-D_B099M7.mjs +4 -0
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +19 -12
  15. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
  16. package/dist/PaymentIntegrationForm-D1ZaHCTm.js +1 -0
  17. package/dist/PaymentIntegrationForm-Dmmhqqn1.mjs +4 -0
  18. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CSPZRvMV.js +1 -0
  19. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Do2KIVKH.mjs +962 -0
  20. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs +50 -0
  21. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +1 -0
  22. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +24 -8
  23. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
  24. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +42 -36
  26. package/dist/adyen-51SvcyqV.mjs +4 -0
  27. package/dist/adyen-Bwewy3HC.mjs +172 -0
  28. package/dist/adyen-DZsyEXkw.js +1 -0
  29. package/dist/adyen-R6aSZ0Yf.js +1 -0
  30. package/dist/component-BOqPDAVk.js +1 -0
  31. package/dist/component-Djrf1L-Z.mjs +889 -0
  32. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
  33. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  34. package/dist/components/BillingInformation/BillingInformation.es.js +99 -5
  35. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
  36. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  37. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +582 -5
  38. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
  39. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  40. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +126 -5
  41. package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
  42. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  43. package/dist/components/Invoice/Invoice.es.js +538 -5
  44. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
  45. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  46. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +127 -5
  47. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
  48. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  49. package/dist/components/InvoicesList/InvoicesList.es.js +106 -5
  50. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
  51. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  52. package/dist/components/PaymentHistory/PaymentHistory.es.js +131 -5
  53. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
  54. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  55. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +217 -5
  56. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
  57. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  58. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +154 -5
  59. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
  60. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  61. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +132 -5
  62. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +3 -0
  63. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -0
  64. package/dist/components/WalletBalances/WalletBalances.es.js +120 -0
  65. package/dist/core/configuration.d.ts +2 -1
  66. package/dist/core/index.cjs.js +1 -1
  67. package/dist/core/index.d.ts +1 -0
  68. package/dist/core/index.es.js +1 -1
  69. package/dist/core/registry.d.ts +1 -1
  70. package/dist/core/types.d.ts +10 -2
  71. package/dist/customer-B31QzznT.mjs +32 -0
  72. package/dist/customer-hDxW1Dbp.js +1 -0
  73. package/dist/en-US-CgPY97Vq.js +1 -0
  74. package/dist/en-US-N3CUCsVy.mjs +179 -0
  75. package/dist/index-DIFK3mcJ.js +6 -0
  76. package/dist/index-DyvRdSR7.mjs +9673 -0
  77. package/dist/index.cjs.js +1 -1
  78. package/dist/index.d.ts +3 -0
  79. package/dist/index.es.js +43 -34
  80. package/dist/{invoices-C31Wz1Bu.mjs → invoices-DIYPN2j_.mjs} +2 -1
  81. package/dist/invoices-DzkA1jDc.js +1 -0
  82. package/dist/nl-NL-B8U9b85I.mjs +197 -0
  83. package/dist/nl-NL-qMRaTRrM.js +1 -0
  84. package/dist/{paymentMethods-CrU4G_2Y.mjs → paymentMethods-67b3UlTZ.mjs} +2 -1
  85. package/dist/paymentMethods-C_sdTkSF.js +1 -0
  86. package/dist/{payments-C3LPk9k9.js → payments-DkHhTHto.js} +1 -1
  87. package/dist/{payments-NtWI8KlU.mjs → payments-Dq6R37Fz.mjs} +1 -1
  88. package/dist/registry-BkViv4tv.js +1 -0
  89. package/dist/registry-Df_26rJy.mjs +144 -0
  90. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
  91. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  92. package/dist/screens/Checkout/Checkout.es.js +4935 -5
  93. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
  94. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  95. package/dist/screens/CustomerOverview/CustomerOverview.es.js +154 -5
  96. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  97. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  98. package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
  99. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +3 -0
  100. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -0
  101. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +1066 -0
  102. package/dist/solvimon-web.css +1 -1
  103. package/dist/{subscriptions-3R7aMoky.mjs → subscriptions-ClGIr_aS.mjs} +2 -1
  104. package/dist/subscriptions-jelITJcX.js +1 -0
  105. package/dist/{useActionDispatchProvider-CBo_Hwu5.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
  106. package/dist/useActionDispatchProvider-rw9kWeE0.js +1 -0
  107. package/dist/useCustomer-Ba9WRtuT.mjs +25 -0
  108. package/dist/useCustomer-CUcaeQn_.js +1 -0
  109. package/dist/{useIncrementalLoading-fHCizCSo.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +11 -10
  110. package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
  111. package/dist/{useInvoiceData-dyvoDwFF.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
  112. package/dist/useInvoiceData-D2jkdmlA.js +1 -0
  113. package/dist/{useInvoicesList-rDvRzMqe.mjs → useInvoicesList-CFzAxyae.mjs} +34 -30
  114. package/dist/useInvoicesList-CaBCGs4h.js +1 -0
  115. package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
  116. package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
  117. package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
  118. package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
  119. package/dist/{usePaymentMethods-Bq5fWl1Q.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
  120. package/dist/{usePaymentMethods-Dbimodf0.js → usePaymentMethods-ryN_YohI.js} +1 -1
  121. package/dist/usePayments-Cw5PPEJa.mjs +36 -0
  122. package/dist/usePayments-DWXPGFvp.js +1 -0
  123. package/dist/usePortal-CxX4nrE4.js +1 -0
  124. package/dist/usePortal-cmE08vYs.mjs +12 -0
  125. package/dist/useService-Bb9r_sOQ.js +1 -0
  126. package/dist/useService-BsSEI8DZ.mjs +53 -0
  127. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  128. package/dist/useViewport-CKRY1CKR.js +1 -0
  129. package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
  130. package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
  131. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  132. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  133. package/dist/vendor-ui-5pJF5KBP.js +1 -0
  134. package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
  135. package/package.json +47 -20
  136. package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +0 -99
  137. package/dist/BillingInformation.entry.ce-DkrfEvK_.js +0 -1
  138. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js +0 -1
  139. package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +0 -1
  140. package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +0 -579
  141. package/dist/Checkout.entry.ce-Bif6vR1K.mjs +0 -5185
  142. package/dist/Checkout.entry.ce-CkQnLAn4.js +0 -1
  143. package/dist/ContentWithAsideLayout-CIVSoqFr.js +0 -1
  144. package/dist/CustomerOverview.entry.ce-C__omsVl.js +0 -1
  145. package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +0 -231
  146. package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +0 -135
  147. package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +0 -1
  148. package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +0 -583
  149. package/dist/Invoice.entry.ce-Cgr43ome.js +0 -1
  150. package/dist/InvoiceDetails.entry.ce-Cnpz8CLJ.mjs +0 -130
  151. package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +0 -1
  152. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js +0 -1
  153. package/dist/InvoicesList.entry.ce-38iOW5qh.js +0 -1
  154. package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +0 -105
  155. package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +0 -1
  156. package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +0 -134
  157. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js +0 -1
  158. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs +0 -6568
  159. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +0 -1
  160. package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +0 -238
  161. package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +0 -1
  162. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +0 -1
  163. package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +0 -1
  164. package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +0 -153
  165. package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +0 -1
  166. package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +0 -135
  167. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js +0 -1
  168. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  169. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  170. package/dist/auto-B_36W1Fc.js +0 -6
  171. package/dist/auto-BfMZdgp-.mjs +0 -14207
  172. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  173. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  174. package/dist/component-BkmcE85U.mjs +0 -58654
  175. package/dist/component-Df5eNqYX.js +0 -1
  176. package/dist/index-2jo9BSPM.js +0 -1
  177. package/dist/index-BFZ0dPh9.mjs +0 -179
  178. package/dist/index-CWSXne1Q.js +0 -1
  179. package/dist/index-D3v7hAtc.mjs +0 -253
  180. package/dist/invoices-8M_3ur_U.js +0 -1
  181. package/dist/paymentMethods-CzUqDlvc.js +0 -1
  182. package/dist/registry-By94DXE2.js +0 -1
  183. package/dist/registry-shRKDl3K.mjs +0 -127
  184. package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
  185. package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
  186. package/dist/subscriptions-CqK7t-fF.js +0 -1
  187. package/dist/useActionDispatchProvider-DsIljrhi.js +0 -1
  188. package/dist/useCustomer-BRY0tuBH.mjs +0 -45
  189. package/dist/useCustomer-Dp8sGHI0.js +0 -1
  190. package/dist/useCustomerPaymentMethodOptions-DYpMDnJR.js +0 -1
  191. package/dist/useIncrementalLoading-D8oKNxX7.js +0 -1
  192. package/dist/useInvoiceData-DImEH1ca.js +0 -1
  193. package/dist/useInvoicesList-BZQ9Y0qN.js +0 -1
  194. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  195. package/dist/useService-Dz13Nxbi.mjs +0 -272
  196. package/dist/useService-bNNi4GB8.js +0 -1
package/README.md CHANGED
@@ -1,80 +1,232 @@
1
- # @solvimon/sdk
1
+ # @solvimon/solvimon-web
2
2
 
3
- ## Getting started
3
+ Solvimon's front-end SDK. Provides framework-agnostic web components and a set of screens for building a billing self-serve experience.
4
+
5
+ ## Installation
4
6
 
5
7
  ```bash
6
- npm install @solvimon/sdk
8
+ npm install @solvimon/solvimon-web
7
9
  ```
8
10
 
9
- Solvimon's SDK exports web components, that are framework agnostic. Each component requires at least:
11
+ ## Requirements
12
+
13
+ Every component requires at minimum:
14
+
15
+ | Property | Type | Description |
16
+ | ------------- | -------------------- | ------------------------------------------- |
17
+ | `token` | `string` | Session token fetched from the Solvimon API |
18
+ | `environment` | `"TEST"` \| `"LIVE"` | Target environment |
19
+
20
+ ## Usage
10
21
 
11
- | Property | Description |
12
- | ------------- | -------------------------------------------- |
13
- | `token` | Fetched from our API |
14
- | `environment` | Specifies the environment (`TEST` or `LIVE`) |
22
+ The SDK exports web components (Custom Elements). There are two ways to register them.
15
23
 
16
- It supports two ways of importing:
24
+ ### Auto-register via define function
17
25
 
18
- ### `defineSolvimonAddPaymentMethodForm`
26
+ Call the `define` function once — it registers the custom element globally.
19
27
 
20
28
  ```tsx
21
- import { defineSolvimonAddPaymentMethodForm } from '@solvimon/sdk/solvimon-add-payment-method-form';
29
+ import { defineSolvimonCheckout } from '@solvimon/solvimon-web/screens/checkout';
22
30
 
23
- defineSolvimonAddPaymentMethodForm();
31
+ defineSolvimonCheckout();
24
32
 
25
- export default function Home() {
26
- return (
27
- <solvimon-add-payment-method-form
28
- token="<my-token-retrieved-from-solvimon-api>"
29
- environment="LIVE"
30
- />
31
- );
33
+ export default function Page() {
34
+ return <solvimon-checkout token="<token>" environment="LIVE" />;
32
35
  }
33
36
  ```
34
37
 
35
- ### Register yourself (beneficial in Vue setup for typed components)
38
+ ### Manual registration (recommended for Vue enables typed components)
36
39
 
37
40
  ```vue
38
41
  <script setup lang="ts">
39
- import { SolvimonAddPaymentMethodForm } from '@solvimon/sdk/solvimon-add-payment-method-form';
42
+ import { SolvimonCheckout } from '@solvimon/solvimon-web/screens/checkout';
40
43
 
41
- if (customElements.get('solvimon-add-payment-method-form')) {
42
- customElements.define('solvimon-add-payment-method-form', SolvimonAddPaymentMethodForm);
44
+ if (!customElements.get('solvimon-checkout')) {
45
+ customElements.define('solvimon-checkout', SolvimonCheckout);
43
46
  }
44
47
  </script>
45
48
 
46
49
  <template>
47
- <solvimon-add-payment-method-form
48
- token="<my-token-retrieved-from-solvimon-api>"
49
- environment="LIVE"
50
- />
50
+ <solvimon-checkout token="<token>" environment="LIVE" />
51
51
  </template>
52
52
  ```
53
53
 
54
- ### Isomorphic (server side rendered) usage
54
+ ### Server-side rendering (SSR / isomorphic)
55
55
 
56
- Our component define functions might cause issues when run in isomorphic setups. To solve this, you might want to consider only loading our SDK client side only:
56
+ The define functions access browser APIs and must only run client-side. Lazy-import them inside a client-only lifecycle hook:
57
57
 
58
58
  ```tsx
59
59
  import { useEffect } from 'react';
60
60
 
61
- export default function Home() {
61
+ export default function Page() {
62
62
  useEffect(() => {
63
- async function loadSolvimonSdkComponent() {
64
- const { defineSolvimonAddPaymentMethodForm } = await import(
65
- '@solvimon/sdk/solvimon-add-payment-method-form'
66
- );
67
- defineSolvimonAddPaymentMethodForm();
68
- }
69
-
70
- loadSolvimonSdkComponent();
63
+ import('@solvimon/solvimon-web/screens/checkout').then(({ defineSolvimonCheckout }) =>
64
+ defineSolvimonCheckout(),
65
+ );
71
66
  }, []);
72
67
 
73
- return (
74
- <solvimon-add-payment-method-form
75
- token="<my-token-retrieved-from-solvimon-api>"
76
- environment="LIVE"
77
- />
78
- );
68
+ return <solvimon-checkout token="<token>" environment="LIVE" />;
79
69
  }
80
70
  ```
71
+
72
+ ## CSS overrides
73
+
74
+ Solvimon components render inside shadow DOM, so CSS from the host page cannot style them directly. Pass `cssOverrides` to `createSolvimonCore` to inject customer CSS into each SDK shadow root.
75
+
76
+ ```ts
77
+ import { createSolvimonCore } from '@solvimon/solvimon-web/core';
78
+
79
+ const solvimon = createSolvimonCore({
80
+ environment: 'TEST',
81
+ cssOverrides: `
82
+ .sv-root {
83
+ font-family: Inter, sans-serif;
84
+ }
85
+
86
+ .sv-checkout__submit {
87
+ border-radius: 24px !important;
88
+ }
89
+ `,
90
+ });
91
+ ```
92
+
93
+ Use the public `sv-*` classes as styling hooks. Do not rely on internal Tailwind utility classes, because those can change.
94
+
95
+ For more details, see [`@solvimon/solvimon-web/core`](./src/public/core/README.md).
96
+
97
+ ## Available components
98
+
99
+ ### Screens
100
+
101
+ Full-page experiences.
102
+
103
+ | Export path | Custom element |
104
+ | ----------------------------------------------------- | --------------------------------- |
105
+ | `@solvimon/solvimon-web/screens/checkout` | `<solvimon-checkout>` |
106
+ | `@solvimon/solvimon-web/screens/customer-overview` | `<solvimon-customer-overview>` |
107
+ | `@solvimon/solvimon-web/screens/upgrade-subscription` | `<solvimon-upgrade-subscription>` |
108
+
109
+ ### Components
110
+
111
+ Embeddable building blocks.
112
+
113
+ | Export path | Custom element |
114
+ | ------------------------------------------------------------ | ------------------------------------- |
115
+ | `@solvimon/solvimon-web/components/billing-information` | `<solvimon-billing-information>` |
116
+ | `@solvimon/solvimon-web/components/billing-information-form` | `<solvimon-billing-information-form>` |
117
+ | `@solvimon/solvimon-web/components/customer-payment-methods` | `<solvimon-customer-payment-methods>` |
118
+ | `@solvimon/solvimon-web/components/invoice` | `<solvimon-invoice>` |
119
+ | `@solvimon/solvimon-web/components/invoice-details` | `<solvimon-invoice-details>` |
120
+ | `@solvimon/solvimon-web/components/invoices-list` | `<solvimon-invoices-list>` |
121
+ | `@solvimon/solvimon-web/components/payment-history` | `<solvimon-payment-history>` |
122
+ | `@solvimon/solvimon-web/components/payment-method-form` | `<solvimon-payment-method-form>` |
123
+ | `@solvimon/solvimon-web/components/subscription-schedules` | `<solvimon-subscription-schedules>` |
124
+ | `@solvimon/solvimon-web/components/subscriptions-list` | `<solvimon-subscriptions-list>` |
125
+ | `@solvimon/solvimon-web/components/wallet-balances` | `<solvimon-wallet-balances>` |
126
+
127
+ ## Supported Adyen payment methods
128
+
129
+ ### Cards
130
+
131
+ - American Express
132
+ - Bancontact
133
+ - Carnet
134
+ - Cartes Bancaires
135
+ - China UnionPay
136
+ - Dankort
137
+ - Diners Club
138
+ - Discover
139
+ - EFTPOS
140
+ - Elo
141
+ - Girocard
142
+ - Hipercard
143
+ - JCB
144
+ - Maestro
145
+ - Mastercard
146
+ - NYCE
147
+ - Pulse
148
+ - Star
149
+ - UnionPay
150
+ - V Pay
151
+ - Visa
152
+
153
+ ### Digital wallets
154
+
155
+ - Amazon Pay
156
+ - Apple Pay
157
+ - Bancontact Mobile
158
+ - Cash App Pay
159
+ - DANA
160
+ - GCash
161
+ - Google Pay
162
+ - GoPay
163
+ - KakaoPay
164
+ - MOMO
165
+ - PayPal
166
+ - TWINT
167
+
168
+ ### Direct debit
169
+
170
+ - ACH (US)
171
+ - Bacs Direct Debit (UK)
172
+ - SEPA Direct Debit
173
+ - Pay by Bank (US)
174
+
175
+ ### Online banking
176
+
177
+ - EPS
178
+ - iDEAL
179
+ - Pay by Bank
180
+ - Trustly
181
+
182
+ ### Buy now, pay later
183
+
184
+ - Klarna
185
+ - Zip
186
+
187
+ ## Release pipeline
188
+
189
+ Releases are published to [npm](https://www.npmjs.com/package/@solvimon/solvimon-web)
190
+ automatically via GitHub Actions. See the
191
+ [publishing documentation](./docs/development/publish.md) for the release flow.
192
+
193
+ Want to contribute? Check the [developer documentation](./docs/development/readme.md).
194
+
195
+ <!-- log-codes:start — DO NOT EDIT: auto-generated by `npm run logs:list` -->
196
+ ## Error logging
197
+
198
+ 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
+ ### Error codes
201
+
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… |
224
+
225
+ ### Warning codes
226
+
227
+ | Code | Description |
228
+ | :--- | :---------- |
229
+ | `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… |
232
+ <!-- log-codes:end — DO NOT EDIT: auto-generated by `npm run logs:list` -->
@@ -0,0 +1,9 @@
1
+ const ApiStatus = {
2
+ Initial: "INITIAL",
3
+ Loading: "LOADING",
4
+ Failed: "FAILED",
5
+ Done: "DONE"
6
+ };
7
+ export {
8
+ ApiStatus as A
9
+ };
@@ -0,0 +1 @@
1
+ exports.ApiStatus={Initial:"INITIAL",Loading:"LOADING",Failed:"FAILED",Done:"DONE"};
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
2
- import { b as useIntl, k as _sfc_main$14, l as _sfc_main$z, m as _sfc_main$2H } from "./component-BkmcE85U.mjs";
3
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-CBo_Hwu5.mjs";
2
+ import { u as useIntl, c as _sfc_main$2, e as _sfc_main$3 } from "./vendor-ui-C0K3osvz.mjs";
3
+ import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
4
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BC57-Ufn.mjs";
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "BillingInformation",
6
7
  props: {
@@ -15,24 +16,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  const { $t } = useIntl();
16
17
  const { dispatchAction } = useActionDispatchProvider();
17
18
  return (_ctx, _cache) => {
18
- return __props.isLoading ? (openBlock(), createBlock(unref(_sfc_main$14), {
19
+ return __props.isLoading ? (openBlock(), createBlock(_sfc_main$1, {
19
20
  key: 0,
20
21
  variant: "section",
21
- class: "min-h-[100px]",
22
+ class: "sv-billing-information sv-root sv-component sv-loading min-h-[100px]",
22
23
  "data-testid": "billing-information-skeleton"
23
- })) : (openBlock(), createBlock(unref(_sfc_main$z), {
24
+ })) : (openBlock(), createBlock(unref(_sfc_main$2), {
24
25
  key: 1,
26
+ class: "sv-billing-information sv-root sv-component",
25
27
  customer: __props.customer,
26
28
  "fallback-to-reference": false
27
29
  }, createSlots({ _: 2 }, [
28
30
  __props.configuration.showEditButton ? {
29
31
  name: "settings",
30
32
  fn: withCtx(() => [
31
- createVNode(unref(_sfc_main$2H), {
33
+ createVNode(unref(_sfc_main$3), {
32
34
  size: "sm",
33
35
  variant: "ghost",
34
36
  color: "gray",
35
37
  "icon-prefix": "edit",
38
+ class: "sv-action sv-action--ghost sv-billing-information__edit",
36
39
  onClick: _cache[0] || (_cache[0] = ($event) => unref(dispatchAction)({ action: "edit-billing-information" }))
37
40
  }, {
38
41
  default: withCtx(() => [
@@ -0,0 +1 @@
1
+ const e=require("vue"),i=require("./vendor-ui-5pJF5KBP.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-rw9kWeE0.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$2),{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$3),{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;
@@ -0,0 +1 @@
1
+ const e=require("vue"),t={class:"sv-layout grid w-full grid-cols-1 gap-4"},o={key:0,class:"sv-layout__header"},l={class:"sv-layout__body flex flex-col items-start gap-6 md:flex-row"},s={class:"sv-layout__content grid w-full grow grid-cols-1 gap-4 md:w-auto"},r={class:"sv-layout__aside grid w-full grid-cols-1 gap-4 md:w-80 md:shrink-0"};const d=((e,t)=>{const o=e.__vccOpts||e;for(const[l,s]of t)o[l]=s;return o})({},[["render",function(d,a){return e.openBlock(),e.createElementBlock("div",t,[d.$slots.header?(e.openBlock(),e.createElementBlock("div",o,[e.renderSlot(d.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",l,[e.createElementVNode("div",s,[e.renderSlot(d.$slots,"content")]),e.createElementVNode("aside",r,[e.renderSlot(d.$slots,"aside")])])])}]]);exports.ContentWithAsideLayout=d;
@@ -1,12 +1,4 @@
1
- import { inject, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode } from "vue";
2
- import { P as PORTAL_INJECTION_KEY } from "./component-BkmcE85U.mjs";
3
- function usePortal() {
4
- const portal = inject(PORTAL_INJECTION_KEY);
5
- if (!portal) {
6
- throw new Error("PortalProvider is not provided");
7
- }
8
- return portal;
9
- }
1
+ import { openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode } from "vue";
10
2
  const _export_sfc = (sfc, props) => {
11
3
  const target = sfc.__vccOpts || sfc;
12
4
  for (const [key, val] of props) {
@@ -15,11 +7,14 @@ const _export_sfc = (sfc, props) => {
15
7
  return target;
16
8
  };
17
9
  const _sfc_main = {};
18
- const _hoisted_1 = { class: "grid w-full grid-cols-1 gap-4" };
19
- const _hoisted_2 = { key: 0 };
20
- const _hoisted_3 = { class: "flex flex-col items-start gap-6 md:flex-row" };
21
- const _hoisted_4 = { class: "grid w-full grow grid-cols-1 gap-4 md:w-auto" };
22
- const _hoisted_5 = { class: "grid w-full grid-cols-1 gap-4 md:w-80 md:shrink-0" };
10
+ const _hoisted_1 = { class: "sv-layout grid w-full grid-cols-1 gap-4" };
11
+ const _hoisted_2 = {
12
+ key: 0,
13
+ class: "sv-layout__header"
14
+ };
15
+ const _hoisted_3 = { class: "sv-layout__body flex flex-col items-start gap-6 md:flex-row" };
16
+ const _hoisted_4 = { class: "sv-layout__content grid w-full grow grid-cols-1 gap-4 md:w-auto" };
17
+ const _hoisted_5 = { class: "sv-layout__aside grid w-full grid-cols-1 gap-4 md:w-80 md:shrink-0" };
23
18
  function _sfc_render(_ctx, _cache) {
24
19
  return openBlock(), createElementBlock("div", _hoisted_1, [
25
20
  _ctx.$slots["header"] ? (openBlock(), createElementBlock("div", _hoisted_2, [
@@ -37,6 +32,5 @@ function _sfc_render(_ctx, _cache) {
37
32
  }
38
33
  const ContentWithAsideLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
39
34
  export {
40
- ContentWithAsideLayout as C,
41
- usePortal as u
35
+ ContentWithAsideLayout as C
42
36
  };
@@ -1,12 +1,10 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createElementBlock, Fragment, renderList, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { b as useIntl, d as _sfc_main$1g, g as _sfc_main$2, _ as _sfc_main$2$1, m as _sfc_main$2H } from "./component-BkmcE85U.mjs";
3
- import { _ as _sfc_main$3 } from "./Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs";
4
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-CBo_Hwu5.mjs";
5
- import { c as createPaymentMethodsService } from "./paymentMethods-CrU4G_2Y.mjs";
6
- import { u as useService } from "./useService-Dz13Nxbi.mjs";
2
+ import { u as useIntl, b as _sfc_main$2, j as _sfc_main$3, _ as _sfc_main$4, e as _sfc_main$5 } from "./vendor-ui-C0K3osvz.mjs";
3
+ import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
4
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BC57-Ufn.mjs";
7
5
  const _hoisted_1 = {
8
6
  key: 0,
9
- class: "flex flex-col gap-2"
7
+ class: "sv-payment-methods__list flex flex-col gap-2"
10
8
  };
11
9
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
12
10
  __name: "CustomerPaymentMethodsBlock",
@@ -23,7 +21,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23
21
  const { $t } = useIntl();
24
22
  const hasPaymentMethods = computed(() => props.paymentMethods.length > 0);
25
23
  return (_ctx, _cache) => {
26
- return openBlock(), createBlock(unref(_sfc_main$1g), {
24
+ return openBlock(), createBlock(unref(_sfc_main$2), {
25
+ class: "sv-payment-methods",
27
26
  "no-spacing": "",
28
27
  "no-border": "",
29
28
  title: unref($t)(
@@ -38,21 +37,29 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
38
37
  default: withCtx(() => [
39
38
  hasPaymentMethods.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
40
39
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.paymentMethods, (paymentMethod) => {
41
- return openBlock(), createBlock(unref(_sfc_main$1g), {
42
- key: paymentMethod.id
40
+ return openBlock(), createBlock(unref(_sfc_main$2), {
41
+ key: paymentMethod.id,
42
+ class: "sv-payment-methods__item"
43
43
  }, {
44
44
  default: withCtx(() => [
45
- createVNode(unref(_sfc_main$2), { "payment-method": paymentMethod }, null, 8, ["payment-method"])
45
+ createVNode(unref(_sfc_main$3), {
46
+ class: "sv-payment-methods__item-content",
47
+ "payment-method": paymentMethod
48
+ }, null, 8, ["payment-method"])
46
49
  ]),
47
50
  _: 2
48
51
  }, 1024);
49
52
  }), 128))
50
- ])) : (openBlock(), createBlock(unref(_sfc_main$1g), { key: 1 }, {
53
+ ])) : (openBlock(), createBlock(unref(_sfc_main$2), {
54
+ key: 1,
55
+ class: "sv-empty-state sv-payment-methods__empty"
56
+ }, {
51
57
  default: withCtx(() => [
52
- createVNode(unref(_sfc_main$2$1), {
58
+ createVNode(unref(_sfc_main$4), {
53
59
  variant: "body-sm",
54
60
  shade: "lighter",
55
- "no-spacing": ""
61
+ "no-spacing": "",
62
+ class: "sv-payment-methods__empty-message"
56
63
  }, {
57
64
  default: withCtx(() => [
58
65
  createTextVNode(toDisplayString(unref($t)({
@@ -63,9 +70,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
63
70
  ]),
64
71
  _: 1
65
72
  }),
66
- __props.showAddButton ? (openBlock(), createBlock(unref(_sfc_main$2H), {
73
+ __props.showAddButton ? (openBlock(), createBlock(unref(_sfc_main$5), {
67
74
  key: 0,
68
- class: "mt-4 w-full",
75
+ class: "sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",
69
76
  variant: "outline",
70
77
  color: "gray",
71
78
  "icon-prefix": "add",
@@ -90,11 +97,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
90
97
  __props.showViewAllButton ? {
91
98
  name: "right",
92
99
  fn: withCtx(() => [
93
- createVNode(unref(_sfc_main$2H), {
100
+ createVNode(unref(_sfc_main$5), {
94
101
  size: "sm",
95
102
  variant: "ghost",
96
103
  color: "gray",
97
104
  "icon-suffix": "arrow_right_alt",
105
+ class: "sv-action sv-action--ghost sv-payment-methods__view-all",
98
106
  type: "button",
99
107
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("view-all-payment-methods"))
100
108
  }, {
@@ -119,7 +127,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
127
  props: {
120
128
  isLoading: { type: Boolean },
121
129
  paymentMethods: { type: Array },
122
- paymentMethodsOptions: { type: Array },
123
130
  maxPaymentMethods: { type: Number },
124
131
  configuration: { default: () => ({
125
132
  showViewAllButton: true,
@@ -130,39 +137,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
137
  const { dispatchAction } = useActionDispatchProvider();
131
138
  return (_ctx, _cache) => {
132
139
  var _a, _b;
133
- return __props.isLoading ? (openBlock(), createBlock(_sfc_main$3, {
140
+ return __props.isLoading ? (openBlock(), createBlock(_sfc_main$6, {
134
141
  key: 0,
135
142
  variant: "section",
136
- class: "h-72",
143
+ class: "sv-payment-methods sv-root sv-component sv-loading h-72",
137
144
  "data-testid": "customer-payment-methods-skeleton"
138
145
  })) : (openBlock(), createBlock(_sfc_main$1, {
139
146
  key: 1,
147
+ class: "sv-payment-methods sv-root sv-component",
140
148
  "is-loading": __props.isLoading,
141
149
  "payment-methods": __props.paymentMethods,
142
- "payment-methods-options": __props.paymentMethodsOptions,
143
150
  "show-view-all-button": (_a = __props.configuration) == null ? void 0 : _a.showViewAllButton,
144
151
  "show-add-button": (_b = __props.configuration) == null ? void 0 : _b.showAddButton,
145
152
  onViewAllPaymentMethods: _cache[0] || (_cache[0] = ($event) => unref(dispatchAction)({ action: "view-all-payment-methods" })),
146
153
  onAddPaymentMethod: _cache[1] || (_cache[1] = ($event) => unref(dispatchAction)({ action: "add-payment-method" }))
147
- }, null, 8, ["is-loading", "payment-methods", "payment-methods-options", "show-view-all-button", "show-add-button"]));
154
+ }, null, 8, ["is-loading", "payment-methods", "show-view-all-button", "show-add-button"]));
148
155
  };
149
156
  }
150
157
  });
151
- function useCustomerPaymentMethodOptions({
152
- customerId,
153
- amount
154
- }) {
155
- const { getPaymentMethodOptions } = createPaymentMethodsService();
156
- const { data, execute, error, apiStatus, isPending } = useService({
157
- initialValue: [],
158
- service: async () => {
159
- const response = await getPaymentMethodOptions({ customerId, amount });
160
- return response.flatMap((entry) => entry.options ?? []);
161
- }
162
- });
163
- return { error, apiStatus, items: data, fetch: execute, isPending };
164
- }
165
158
  export {
166
- _sfc_main as _,
167
- useCustomerPaymentMethodOptions as u
159
+ _sfc_main as _
168
160
  };
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-5pJF5KBP.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("./useActionDispatchProvider-rw9kWeE0.js"),a={key:0,class:"sv-payment-methods__list flex flex-col gap-2"},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(o){const n=o,{$t:s}=t.useIntl(),i=e.computed(()=>n.paymentMethods.length>0);return(n,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{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(o.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.paymentMethods,o=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:o.id,class:"sv-payment-methods__item"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$5),{class:"sv-payment-methods__item-content","payment-method":o},null,8,["payment-method"])]),_:2},1024))),128))])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main),{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}),o.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{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=>n.$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},[o.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>n.$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:a}=n.useActionDispatchProvider();return(n,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(o._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(a)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(a)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;
@@ -1,9 +1,11 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createElementBlock, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { b as useIntl, d as _sfc_main$1g, _ as _sfc_main$2 } from "./component-BkmcE85U.mjs";
2
+ import { u as useIntl, b as _sfc_main$1, _ as _sfc_main$2 } from "./vendor-ui-C0K3osvz.mjs";
3
3
  const _hoisted_1 = {
4
4
  key: 0,
5
- class: "flex flex-col gap-2"
5
+ class: "sv-invoice-details__body flex flex-col gap-2"
6
6
  };
7
+ const _hoisted_2 = { class: "sv-invoice-details__row" };
8
+ const _hoisted_3 = { class: "sv-invoice-details__row" };
7
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
10
  __name: "InvoiceDetailsBlock",
9
11
  props: {
@@ -12,7 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
14
  setup(__props) {
13
15
  const { $t, formatDate } = useIntl();
14
16
  return (_ctx, _cache) => {
15
- return openBlock(), createBlock(unref(_sfc_main$1g), {
17
+ return openBlock(), createBlock(unref(_sfc_main$1), {
18
+ class: "sv-invoice-details",
16
19
  title: unref($t)({
17
20
  defaultMessage: "Invoice details",
18
21
  description: "Title for the invoice details block on the invoice overview page",
@@ -21,8 +24,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
24
  }, {
22
25
  default: withCtx(() => [
23
26
  __props.invoice ? (openBlock(), createElementBlock("div", _hoisted_1, [
24
- createElementVNode("div", null, [
25
- createVNode(unref(_sfc_main$2), { variant: "caps-heading" }, {
27
+ createElementVNode("div", _hoisted_2, [
28
+ createVNode(unref(_sfc_main$2), {
29
+ variant: "caps-heading",
30
+ class: "sv-invoice-details__label"
31
+ }, {
26
32
  default: withCtx(() => [
27
33
  createTextVNode(toDisplayString(unref($t)({
28
34
  defaultMessage: "Invoice date",
@@ -34,7 +40,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
40
  }),
35
41
  __props.invoice.invoice_date ? (openBlock(), createBlock(unref(_sfc_main$2), {
36
42
  key: 0,
37
- variant: "body-xs"
43
+ variant: "body-xs",
44
+ class: "sv-invoice-details__value"
38
45
  }, {
39
46
  default: withCtx(() => [
40
47
  createTextVNode(toDisplayString(unref(formatDate)({
@@ -47,8 +54,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
54
  _: 1
48
55
  })) : createCommentVNode("", true)
49
56
  ]),
50
- createElementVNode("div", null, [
51
- createVNode(unref(_sfc_main$2), { variant: "caps-heading" }, {
57
+ createElementVNode("div", _hoisted_3, [
58
+ createVNode(unref(_sfc_main$2), {
59
+ variant: "caps-heading",
60
+ class: "sv-invoice-details__label"
61
+ }, {
52
62
  default: withCtx(() => [
53
63
  createTextVNode(toDisplayString(unref($t)({
54
64
  defaultMessage: "Due date",
@@ -60,7 +70,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
70
  }),
61
71
  __props.invoice.due_date ? (openBlock(), createBlock(unref(_sfc_main$2), {
62
72
  key: 0,
63
- variant: "body-xs"
73
+ variant: "body-xs",
74
+ class: "sv-invoice-details__value"
64
75
  }, {
65
76
  default: withCtx(() => [
66
77
  createTextVNode(toDisplayString(unref(formatDate)({
@@ -0,0 +1 @@
1
+ const e=require("vue"),i=require("./vendor-ui-5pJF5KBP.js"),t={key:0,class:"sv-invoice-details__body flex flex-col gap-2"},o={class:"sv-invoice-details__row"},a={class:"sv-invoice-details__row"},n=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(n){const{$t:c,formatDate:s}=i.useIntl();return(d,l)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{class:"sv-invoice-details",title:e.unref(c)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[n.invoice?(e.openBlock(),e.createElementBlock("div",t,[e.createElementVNode("div",o,[e.createVNode(e.unref(i._sfc_main),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),n.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.invoice_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",a,[e.createVNode(e.unref(i._sfc_main),{variant:"caps-heading",class:"sv-invoice-details__label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),n.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,variant:"body-xs",class:"sv-invoice-details__value"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({date:n.invoice.due_date,format:"date",timezone:n.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=n;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js");exports.default=e._sfc_main;
@@ -0,0 +1,4 @@
1
+ import { _ as _sfc_main } from "./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs";
2
+ export {
3
+ _sfc_main as default
4
+ };