@solvimon/solvimon-web 0.1.0-alpha.8 → 0.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +6 -4
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
- package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
- package/dist/{ContentWithAsideLayout-BTdixy3L.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +8 -5
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +21 -10
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dt_Vb7Wz.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +19 -8
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
- package/dist/{PaymentHistoryBlock-DHM-3fh-.js → PaymentHistoryBlock-BiiFJkpT.js} +1 -1
- package/dist/{PaymentHistoryBlock-YzJ6bxKr.mjs → PaymentHistoryBlock-D_B099M7.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +16 -9
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
- package/dist/{PaymentIntegrationForm-Cl5ua8v8.js → PaymentIntegrationForm-D1oJA9mC.js} +1 -1
- package/dist/{PaymentIntegrationForm-ID4QnvA3.mjs → PaymentIntegrationForm-DNkjhqMF.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D37gDtY7.mjs} +70 -17
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D5bxFJ-p.js +1 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs} +1 -1
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js → PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js} +1 -1
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +9 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +28 -19
- package/dist/adyen-B_QrYdaC.mjs +4 -0
- package/dist/{adyenLoader-gsbzSjYV.mjs → adyen-Bwewy3HC.mjs} +8 -13
- package/dist/adyen-R6aSZ0Yf.js +1 -0
- package/dist/adyen-mQEEOjgl.js +1 -0
- package/dist/adyen.css +1 -0
- package/dist/component-BOqPDAVk.js +1 -0
- package/dist/{component-CM9g6tbD.mjs → component-Djrf1L-Z.mjs} +294 -209
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +8 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +8 -4
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +10 -6
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +36 -22
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +10 -6
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +7 -4
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +10 -6
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +15 -11
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +15 -8
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +11 -7
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +8 -4
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +4 -2
- package/dist/{customer-TIi7iZFw.mjs → customer-B31QzznT.mjs} +1 -1
- package/dist/{customer-C_Hz_npf.js → customer-hDxW1Dbp.js} +1 -1
- package/dist/en-US-CgPY97Vq.js +1 -0
- package/dist/{en-US-CBoPxQwX.mjs → en-US-N3CUCsVy.mjs} +5 -25
- package/dist/index-DIFK3mcJ.js +6 -0
- package/dist/index-DyvRdSR7.mjs +9673 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{invoices-BuVOuTOm.mjs → invoices-DIYPN2j_.mjs} +2 -2
- package/dist/{invoices-DbvwXAsm.js → invoices-DzkA1jDc.js} +1 -1
- package/dist/{nl-NL-BB7KbK-h.mjs → nl-NL-B8U9b85I.mjs} +18 -2
- package/dist/nl-NL-qMRaTRrM.js +1 -0
- package/dist/{paymentMethods-Di32oJ39.mjs → paymentMethods-67b3UlTZ.mjs} +2 -2
- package/dist/{paymentMethods-B4AYGf0K.js → paymentMethods-C_sdTkSF.js} +1 -1
- package/dist/{payments-DeutKq9x.js → payments-DkHhTHto.js} +1 -1
- package/dist/{payments-C5fD1PXB.mjs → payments-Dq6R37Fz.mjs} +1 -1
- package/dist/{registry-CMSmkLcy.js → registry-BkViv4tv.js} +1 -1
- package/dist/{registry-BLwMl1bK.mjs → registry-Df_26rJy.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +276 -214
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +22 -15
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +12 -10
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +83 -53
- package/dist/solvimon-web.css +1 -1
- package/dist/{subscriptions-mOgjjzUi.mjs → subscriptions-ClGIr_aS.mjs} +2 -2
- package/dist/{subscriptions-wdMADcQZ.js → subscriptions-jelITJcX.js} +1 -1
- package/dist/{useActionDispatchProvider-B4gszz0Q.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
- package/dist/{useActionDispatchProvider-DfS2P0bd.js → useActionDispatchProvider-rw9kWeE0.js} +1 -1
- package/dist/{useCustomer-cbhDyWJL.mjs → useCustomer-Ba9WRtuT.mjs} +2 -2
- package/dist/{useCustomer-DanZzn-l.js → useCustomer-CUcaeQn_.js} +1 -1
- package/dist/{useIncrementalLoading-RRicokf1.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +1 -1
- package/dist/{useIncrementalLoading-DFe5Yh8M.js → useIncrementalLoading-DoTTXM2Y.js} +1 -1
- package/dist/{useInvoiceData-fS6G_244.mjs → useInvoiceData-BJwwDur7.mjs} +2 -2
- package/dist/{useInvoiceData-CxxHa5R2.js → useInvoiceData-D2jkdmlA.js} +1 -1
- package/dist/{useInvoicesList-BQQxcPdz.mjs → useInvoicesList-CFzAxyae.mjs} +22 -18
- package/dist/useInvoicesList-CaBCGs4h.js +1 -0
- package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
- package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
- package/dist/{usePaymentMethodOptions-2MloZ9bY.mjs → usePaymentMethodOptions-C2k4npCQ.mjs} +2 -2
- package/dist/{usePaymentMethodOptions-D01YWW3G.js → usePaymentMethodOptions-DYO6xr3-.js} +1 -1
- package/dist/{usePaymentMethods-DZvfWSlx.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
- package/dist/{usePaymentMethods-Cm9WdSW0.js → usePaymentMethods-ryN_YohI.js} +1 -1
- package/dist/{usePayments-D4uGKBsV.mjs → usePayments-Cw5PPEJa.mjs} +3 -3
- package/dist/{usePayments-B13S_yai.js → usePayments-DWXPGFvp.js} +1 -1
- package/dist/{usePortal-DWJEVkTj.js → usePortal-CxX4nrE4.js} +1 -1
- package/dist/{usePortal-DJDJNLbo.mjs → usePortal-cmE08vYs.mjs} +1 -1
- package/dist/useService-Bb9r_sOQ.js +1 -0
- package/dist/{useService-BuWWE5ND.mjs → useService-BsSEI8DZ.mjs} +1 -16
- package/dist/{useWalletBalanceItems-B53Gkjro.mjs → useWalletBalanceItems-CkDqmk36.mjs} +8 -5
- package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
- package/dist/vendor-ui-5pJF5KBP.js +1 -0
- package/dist/{vendor-ui-BwxuPDg8.mjs → vendor-ui-C0K3osvz.mjs} +13272 -14225
- package/package.json +4 -3
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +0 -1
- package/dist/ContentWithAsideLayout-oAYVrLvL.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +0 -1
- package/dist/adyen-51SvcyqV.mjs +0 -4
- package/dist/adyen-DZsyEXkw.js +0 -1
- package/dist/adyenLoader-CEH4A2b2.js +0 -1
- package/dist/auto-DzZuCneB.mjs +0 -14387
- package/dist/auto-PpnAChnH.js +0 -6
- package/dist/component-C2Gc-wsE.js +0 -1
- package/dist/en-US-DJq-9dD8.js +0 -1
- package/dist/nl-NL-CtU1Lg2F.js +0 -1
- package/dist/source-DKDKBlUm.mjs +0 -179
- package/dist/source-dkMNFWDc.js +0 -1
- package/dist/useInvoicesList-CtJqmblZ.js +0 -1
- package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
- package/dist/useService-9fCKPTmu.js +0 -1
- package/dist/useWalletBalanceItems-BMaVT4TW.js +0 -1
- package/dist/vendor-ui-Ce_Yp7xA.js +0 -1
package/README.md
CHANGED
|
@@ -69,6 +69,31 @@ export default function Page() {
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
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
|
+
|
|
72
97
|
## Available components
|
|
73
98
|
|
|
74
99
|
### Screens
|
|
@@ -99,6 +124,66 @@ Embeddable building blocks.
|
|
|
99
124
|
| `@solvimon/solvimon-web/components/subscriptions-list` | `<solvimon-subscriptions-list>` |
|
|
100
125
|
| `@solvimon/solvimon-web/components/wallet-balances` | `<solvimon-wallet-balances>` |
|
|
101
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
|
+
|
|
102
187
|
## Release pipeline
|
|
103
188
|
|
|
104
189
|
Releases are published to [npm](https://www.npmjs.com/package/@solvimon/solvimon-web)
|
|
@@ -106,3 +191,42 @@ automatically via GitHub Actions. See the
|
|
|
106
191
|
[publishing documentation](./docs/development/publish.md) for the release flow.
|
|
107
192
|
|
|
108
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` -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { u as useIntl, c as _sfc_main$2, e as _sfc_main$3 } from "./vendor-ui-
|
|
3
|
-
import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
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";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "BillingInformation",
|
|
7
7
|
props: {
|
|
@@ -19,10 +19,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
return __props.isLoading ? (openBlock(), createBlock(_sfc_main$1, {
|
|
20
20
|
key: 0,
|
|
21
21
|
variant: "section",
|
|
22
|
-
class: "min-h-[100px]",
|
|
22
|
+
class: "sv-billing-information sv-root sv-component sv-loading min-h-[100px]",
|
|
23
23
|
"data-testid": "billing-information-skeleton"
|
|
24
24
|
})) : (openBlock(), createBlock(unref(_sfc_main$2), {
|
|
25
25
|
key: 1,
|
|
26
|
+
class: "sv-billing-information sv-root sv-component",
|
|
26
27
|
customer: __props.customer,
|
|
27
28
|
"fallback-to-reference": false
|
|
28
29
|
}, createSlots({ _: 2 }, [
|
|
@@ -34,6 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
35
|
variant: "ghost",
|
|
35
36
|
color: "gray",
|
|
36
37
|
"icon-prefix": "edit",
|
|
38
|
+
class: "sv-action sv-action--ghost sv-billing-information__edit",
|
|
37
39
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(dispatchAction)({ action: "edit-billing-information" }))
|
|
38
40
|
}, {
|
|
39
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;
|
|
@@ -7,11 +7,14 @@ const _export_sfc = (sfc, props) => {
|
|
|
7
7
|
return target;
|
|
8
8
|
};
|
|
9
9
|
const _sfc_main = {};
|
|
10
|
-
const _hoisted_1 = { class: "grid w-full grid-cols-1 gap-4" };
|
|
11
|
-
const _hoisted_2 = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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" };
|
|
15
18
|
function _sfc_render(_ctx, _cache) {
|
|
16
19
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
17
20
|
_ctx.$slots["header"] ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createElementBlock, Fragment, renderList, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
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-
|
|
3
|
-
import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
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";
|
|
5
5
|
const _hoisted_1 = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "flex flex-col gap-2"
|
|
7
|
+
class: "sv-payment-methods__list flex flex-col gap-2"
|
|
8
8
|
};
|
|
9
9
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "CustomerPaymentMethodsBlock",
|
|
@@ -22,6 +22,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
const hasPaymentMethods = computed(() => props.paymentMethods.length > 0);
|
|
23
23
|
return (_ctx, _cache) => {
|
|
24
24
|
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
25
|
+
class: "sv-payment-methods",
|
|
25
26
|
"no-spacing": "",
|
|
26
27
|
"no-border": "",
|
|
27
28
|
title: unref($t)(
|
|
@@ -37,20 +38,28 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
hasPaymentMethods.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
38
39
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.paymentMethods, (paymentMethod) => {
|
|
39
40
|
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
40
|
-
key: paymentMethod.id
|
|
41
|
+
key: paymentMethod.id,
|
|
42
|
+
class: "sv-payment-methods__item"
|
|
41
43
|
}, {
|
|
42
44
|
default: withCtx(() => [
|
|
43
|
-
createVNode(unref(_sfc_main$3), {
|
|
45
|
+
createVNode(unref(_sfc_main$3), {
|
|
46
|
+
class: "sv-payment-methods__item-content",
|
|
47
|
+
"payment-method": paymentMethod
|
|
48
|
+
}, null, 8, ["payment-method"])
|
|
44
49
|
]),
|
|
45
50
|
_: 2
|
|
46
51
|
}, 1024);
|
|
47
52
|
}), 128))
|
|
48
|
-
])) : (openBlock(), createBlock(unref(_sfc_main$2), {
|
|
53
|
+
])) : (openBlock(), createBlock(unref(_sfc_main$2), {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: "sv-empty-state sv-payment-methods__empty"
|
|
56
|
+
}, {
|
|
49
57
|
default: withCtx(() => [
|
|
50
58
|
createVNode(unref(_sfc_main$4), {
|
|
51
59
|
variant: "body-sm",
|
|
52
60
|
shade: "lighter",
|
|
53
|
-
"no-spacing": ""
|
|
61
|
+
"no-spacing": "",
|
|
62
|
+
class: "sv-payment-methods__empty-message"
|
|
54
63
|
}, {
|
|
55
64
|
default: withCtx(() => [
|
|
56
65
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -63,7 +72,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
63
72
|
}),
|
|
64
73
|
__props.showAddButton ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
65
74
|
key: 0,
|
|
66
|
-
class: "mt-4 w-full",
|
|
75
|
+
class: "sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",
|
|
67
76
|
variant: "outline",
|
|
68
77
|
color: "gray",
|
|
69
78
|
"icon-prefix": "add",
|
|
@@ -93,6 +102,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
93
102
|
variant: "ghost",
|
|
94
103
|
color: "gray",
|
|
95
104
|
"icon-suffix": "arrow_right_alt",
|
|
105
|
+
class: "sv-action sv-action--ghost sv-payment-methods__view-all",
|
|
96
106
|
type: "button",
|
|
97
107
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("view-all-payment-methods"))
|
|
98
108
|
}, {
|
|
@@ -130,10 +140,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
140
|
return __props.isLoading ? (openBlock(), createBlock(_sfc_main$6, {
|
|
131
141
|
key: 0,
|
|
132
142
|
variant: "section",
|
|
133
|
-
class: "h-72",
|
|
143
|
+
class: "sv-payment-methods sv-root sv-component sv-loading h-72",
|
|
134
144
|
"data-testid": "customer-payment-methods-skeleton"
|
|
135
145
|
})) : (openBlock(), createBlock(_sfc_main$1, {
|
|
136
146
|
key: 1,
|
|
147
|
+
class: "sv-payment-methods sv-root sv-component",
|
|
137
148
|
"is-loading": __props.isLoading,
|
|
138
149
|
"payment-methods": __props.paymentMethods,
|
|
139
150
|
"show-view-all-button": (_a = __props.configuration) == null ? void 0 : _a.showViewAllButton,
|
|
@@ -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 { u as useIntl, b as _sfc_main$1, _ as _sfc_main$2 } from "./vendor-ui-
|
|
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: {
|
|
@@ -13,6 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
15
|
const { $t, formatDate } = useIntl();
|
|
14
16
|
return (_ctx, _cache) => {
|
|
15
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",
|
|
25
|
-
createVNode(unref(_sfc_main$2), {
|
|
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",
|
|
51
|
-
createVNode(unref(_sfc_main$2), {
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-
|
|
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;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useIntl, _ as _sfc_main$1, b as _sfc_main$2, f as _sfc_main$3, h as formatEnum, j as _sfc_main$4 } from "./vendor-ui-
|
|
3
|
-
const _hoisted_1 = { class: "
|
|
4
|
-
const _hoisted_2 = { class: "flex
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$1, b as _sfc_main$2, f as _sfc_main$3, h as formatEnum, j as _sfc_main$4 } from "./vendor-ui-C0K3osvz.mjs";
|
|
3
|
+
const _hoisted_1 = { class: "sv-payment-history" };
|
|
4
|
+
const _hoisted_2 = { class: "sv-payment-history__items flex flex-col-reverse gap-1" };
|
|
5
|
+
const _hoisted_3 = { class: "sv-payment-history__item-header mb-2 flex items-center justify-between" };
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "PaymentHistoryBlock",
|
|
7
8
|
props: {
|
|
@@ -21,10 +22,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
22
|
REFUSED: "red"
|
|
22
23
|
};
|
|
23
24
|
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createElementBlock("div",
|
|
25
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
25
26
|
createVNode(unref(_sfc_main$1), {
|
|
26
27
|
tag: "h2",
|
|
27
|
-
variant: "heading-3"
|
|
28
|
+
variant: "heading-3",
|
|
29
|
+
class: "sv-payment-history__title"
|
|
28
30
|
}, {
|
|
29
31
|
default: withCtx(() => [
|
|
30
32
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -35,15 +37,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
37
|
]),
|
|
36
38
|
_: 1
|
|
37
39
|
}),
|
|
38
|
-
createElementVNode("div",
|
|
40
|
+
createElementVNode("div", _hoisted_2, [
|
|
39
41
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.paymentAttempts, (paymentAttempt) => {
|
|
40
42
|
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
41
43
|
key: paymentAttempt.id,
|
|
42
|
-
class: "mt-1 md:mt-2"
|
|
44
|
+
class: "sv-payment-history__item mt-1 md:mt-2"
|
|
43
45
|
}, {
|
|
44
46
|
default: withCtx(() => [
|
|
45
|
-
createElementVNode("div",
|
|
46
|
-
createVNode(unref(_sfc_main$1), {
|
|
47
|
+
createElementVNode("div", _hoisted_3, [
|
|
48
|
+
createVNode(unref(_sfc_main$1), {
|
|
49
|
+
variant: "caps-heading",
|
|
50
|
+
class: "sv-payment-history__item-title"
|
|
51
|
+
}, {
|
|
47
52
|
default: withCtx(() => [
|
|
48
53
|
createTextVNode(toDisplayString(unref($t)({
|
|
49
54
|
defaultMessage: "Payment attempt",
|
|
@@ -54,6 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
59
|
_: 1
|
|
55
60
|
}),
|
|
56
61
|
createVNode(unref(_sfc_main$3), {
|
|
62
|
+
class: "sv-payment-history__item-status",
|
|
57
63
|
color: colorMapping[paymentAttempt.result]
|
|
58
64
|
}, {
|
|
59
65
|
default: withCtx(() => [
|
|
@@ -64,6 +70,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
70
|
]),
|
|
65
71
|
paymentAttempt.payment_method_details ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
66
72
|
key: 0,
|
|
73
|
+
class: "sv-payment-history__payment-method",
|
|
67
74
|
"payment-method": paymentAttempt.payment_method_details
|
|
68
75
|
}, {
|
|
69
76
|
description: withCtx(() => [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-5pJF5KBP.js"),a={class:"sv-payment-history"},n={class:"sv-payment-history__items flex flex-col-reverse gap-1"},s={class:"sv-payment-history__item-header mb-2 flex items-center justify-between"},r=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(r){const{$t:o,formatDate:i}=t.useIntl(),m={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(c,l)=>(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(t._sfc_main),{tag:"h2",variant:"heading-3",class:"sv-payment-history__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:a.id,class:"sv-payment-history__item mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main),{variant:"caps-heading",class:"sv-payment-history__item-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$4),{class:"sv-payment-history__item-status",color:m[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$5),{key:0,class:"sv-payment-history__payment-method","payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:r.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D5bxFJ-p.js");exports.default=e._sfc_main;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, withCtx, unref, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, inject, ref, onMounted, onBeforeUnmount, watch, createElementBlock, Fragment, renderList } from "vue";
|
|
2
|
-
import { u as useIntl, _ as _sfc_main$5,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { E as EXPERIMENTAL_FEATURE_INJECTION_KEY, a as useLogger } from "./component-CM9g6tbD.mjs";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$5, l as _sfc_main$6, x as formatAmount, e as _sfc_main$7, k as isEqual, R as _sfc_main$8 } from "./vendor-ui-C0K3osvz.mjs";
|
|
3
|
+
import { _ as _sfc_main$4, g as getQueryParam, t as transformToAdyenAmount, m as mapAdyenPaymentMethods, a as getAdyenEnvironmentFromPaymentMethodOptionsResponse, b as getAdyenClientKeyFromPaymentMethodOptionsResponse, R as REDIRECT_RESULT_QUERY_STRING, P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, c as transformObjectToAdyenObject, d as createReturnUrl } from "./adyen-Bwewy3HC.mjs";
|
|
4
|
+
import { c as createPaymentsService } from "./payments-Dq6R37Fz.mjs";
|
|
5
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-67b3UlTZ.mjs";
|
|
6
|
+
import { E as EXPERIMENTAL_FEATURE_INJECTION_KEY, a as useLogger } from "./component-Djrf1L-Z.mjs";
|
|
8
7
|
const getOverriddenTranslations = (variant) => {
|
|
9
8
|
let result = {};
|
|
10
9
|
if (variant === "TOKENIZE") {
|
|
@@ -331,7 +330,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
331
330
|
try {
|
|
332
331
|
dropInInstance == null ? void 0 : dropInInstance.submit();
|
|
333
332
|
} catch (error) {
|
|
334
|
-
|
|
333
|
+
logger.error("ADYEN_SUBMIT_FAILED", "Failed to submit Adyen drop-in", {}, error);
|
|
335
334
|
}
|
|
336
335
|
}
|
|
337
336
|
async function getConfiguration() {
|
|
@@ -347,7 +346,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
347
346
|
props.paymentMethodOptionResponseEntry
|
|
348
347
|
),
|
|
349
348
|
environment: getAdyenEnvironmentFromPaymentMethodOptionsResponse(
|
|
350
|
-
props.paymentMethodOptionResponseEntry
|
|
349
|
+
props.paymentMethodOptionResponseEntry,
|
|
350
|
+
logger
|
|
351
351
|
),
|
|
352
352
|
locale,
|
|
353
353
|
translations: getOverriddenTranslations(props.variant),
|
|
@@ -387,15 +387,58 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
387
387
|
if (!dropInContainerRef.value) return;
|
|
388
388
|
try {
|
|
389
389
|
await unmountDropIn();
|
|
390
|
-
const [adyenModule, { default:
|
|
391
|
-
|
|
392
|
-
import("./adyen-
|
|
390
|
+
const [adyenModule, { default: adyenCssUrl }] = await Promise.all([
|
|
391
|
+
import("./index-DyvRdSR7.mjs"),
|
|
392
|
+
import("./adyen-B_QrYdaC.mjs")
|
|
393
393
|
]);
|
|
394
|
-
const {
|
|
394
|
+
const {
|
|
395
|
+
AdyenCheckout,
|
|
396
|
+
Dropin,
|
|
397
|
+
Card,
|
|
398
|
+
Bancontact,
|
|
399
|
+
Ach,
|
|
400
|
+
AmazonPay,
|
|
401
|
+
ApplePay,
|
|
402
|
+
BcmcMobile,
|
|
403
|
+
BacsDirectDebit,
|
|
404
|
+
CashAppPay,
|
|
405
|
+
EPS,
|
|
406
|
+
GooglePay,
|
|
407
|
+
Klarna,
|
|
408
|
+
PayByBank,
|
|
409
|
+
PayPal,
|
|
410
|
+
SepaDirectDebit,
|
|
411
|
+
Trustly,
|
|
412
|
+
Twint,
|
|
413
|
+
PayByBankUS,
|
|
414
|
+
Redirect
|
|
415
|
+
} = adyenModule;
|
|
395
416
|
const { checkoutConfig, dropInConfig } = await getConfiguration();
|
|
396
417
|
checkoutInstance = await AdyenCheckout(checkoutConfig);
|
|
397
|
-
dropInInstance = new Dropin(checkoutInstance,
|
|
398
|
-
|
|
418
|
+
dropInInstance = new Dropin(checkoutInstance, {
|
|
419
|
+
...dropInConfig,
|
|
420
|
+
paymentMethodComponents: [
|
|
421
|
+
Card,
|
|
422
|
+
Bancontact,
|
|
423
|
+
Ach,
|
|
424
|
+
AmazonPay,
|
|
425
|
+
ApplePay,
|
|
426
|
+
BcmcMobile,
|
|
427
|
+
BacsDirectDebit,
|
|
428
|
+
CashAppPay,
|
|
429
|
+
EPS,
|
|
430
|
+
GooglePay,
|
|
431
|
+
Klarna,
|
|
432
|
+
PayByBank,
|
|
433
|
+
PayPal,
|
|
434
|
+
SepaDirectDebit,
|
|
435
|
+
Trustly,
|
|
436
|
+
Twint,
|
|
437
|
+
PayByBankUS,
|
|
438
|
+
Redirect
|
|
439
|
+
]
|
|
440
|
+
}).mount(dropInContainerRef.value);
|
|
441
|
+
injectStylesToShadowRoot(adyenCssUrl);
|
|
399
442
|
} catch (error) {
|
|
400
443
|
logger.error(
|
|
401
444
|
"PAYMENT_INTEGRATION_INITIALIZATION_FAILED",
|
|
@@ -413,12 +456,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
413
456
|
dropInContainerRef.value.innerHTML = "";
|
|
414
457
|
}
|
|
415
458
|
}
|
|
416
|
-
function injectStylesToShadowRoot(
|
|
459
|
+
function injectStylesToShadowRoot(adyenCssUrl) {
|
|
417
460
|
var _a;
|
|
418
461
|
const root = (_a = dropInContainerRef.value) == null ? void 0 : _a.getRootNode();
|
|
419
462
|
if (root instanceof ShadowRoot) {
|
|
463
|
+
const link = document.createElement("link");
|
|
464
|
+
link.rel = "stylesheet";
|
|
465
|
+
link.href = adyenCssUrl;
|
|
466
|
+
root.appendChild(link);
|
|
420
467
|
const style = document.createElement("style");
|
|
421
|
-
style.textContent =
|
|
468
|
+
style.textContent = `
|
|
422
469
|
:host {
|
|
423
470
|
--adyen-sdk-color-background-secondary: transparent;
|
|
424
471
|
--adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);
|
|
@@ -653,7 +700,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
653
700
|
actions.resolve({ resultCode: "Error" });
|
|
654
701
|
});
|
|
655
702
|
}
|
|
656
|
-
}).catch(() => {
|
|
703
|
+
}).catch((error) => {
|
|
704
|
+
logger.error(
|
|
705
|
+
"INTEGRATION_ERROR",
|
|
706
|
+
"Unhandled error in payment submission flow",
|
|
707
|
+
{},
|
|
708
|
+
error
|
|
709
|
+
);
|
|
657
710
|
});
|
|
658
711
|
}
|
|
659
712
|
function handleActionRequiredPaymentAction(response, paymentMethodType) {
|