@solvimon/solvimon-web 0.1.0-alpha.16 → 0.1.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -31
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs +238 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs} +2 -2
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js → BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +1 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs +2654 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +53 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs} +1 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs +153 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs +52 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +1 -0
- package/dist/{PaymentHistoryBlock-BKMttUyk.mjs → PaymentHistoryBlock-Bxr8lUGs.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-BGbTy4Se.js → PaymentHistoryBlock-COjIVYX4.js} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-D4QupHWl.js → PaymentIntegrationForm-BSauhuKv.js} +1 -1
- package/dist/{PaymentIntegrationForm-CypW6fZY.mjs → PaymentIntegrationForm-PIT8gHYN.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs +148 -0
- package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +1 -0
- package/dist/PaymentIntegrationFormAdyen-Cjj9aK0E.mjs +729 -0
- package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +1 -0
- package/dist/PaymentIntegrationFormStripe-arpua_ZT.mjs +545 -0
- package/dist/PaymentMethodForm-B7T5rrNz.mjs +4 -0
- package/dist/PaymentMethodForm-CLz3ZS-b.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs} +25 -14
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js +1 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs} +77 -31
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +1 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs} +115 -68
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +1 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs +37 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs +100 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs} +22 -119
- package/dist/adyen-BMDZQBUG.js +1 -0
- package/dist/{url-1Lbg5Yni.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
- package/dist/component--Y7Igv5i.mjs +1022 -0
- package/dist/component-DIy1hvJM.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +4 -4
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +7 -7
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +7 -58
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +25 -9
- package/dist/core/action-request.types.d.ts +3 -15
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +4 -2
- package/dist/{customer-Bv_fqXzO.mjs → customer-DovIxTG1.mjs} +1 -1
- package/dist/{customer-_W8gIX5m.js → customer-brfznoHY.js} +1 -1
- package/dist/en-US-BvOHPudj.js +1 -0
- package/dist/{en-US-DAgOSlgv.mjs → en-US-CXDO3qhq.mjs} +121 -36
- package/dist/index-BMWWP8xj.js +1 -0
- package/dist/index-Do7kzLpg.mjs +265 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +7 -4
- package/dist/invoices-Cf3dSYSj.js +1 -0
- package/dist/{invoices-BGb0AwVF.mjs → invoices-Dk-z04lg.mjs} +32 -16
- package/dist/{nl-NL-DCsmrA8A.mjs → nl-NL-BgL_PuBn.mjs} +126 -40
- package/dist/nl-NL-COGUFg60.js +1 -0
- package/dist/{paymentMethods-DvqlWe96.mjs → paymentMethods-BnF1XYS1.mjs} +21 -5
- package/dist/paymentMethods-DVDC_WfL.js +1 -0
- package/dist/{payments-DMDDI3MK.js → payments-DVZFO5yb.js} +1 -1
- package/dist/{payments-CpzTVrQM.mjs → payments-TnRjtlOw.mjs} +1 -1
- package/dist/pricing-CuYndX6t.js +1 -0
- package/dist/pricing-GwLCiSzs.mjs +19 -0
- package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
- package/dist/pricingPlanSchedule-CXG3CQ61.mjs +146 -0
- package/dist/{registry-B-If1W_u.mjs → registry-Ck0Gb6rj.mjs} +7 -4
- package/dist/registry-Cra6yoB4.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +429 -689
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +61 -39
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +30 -13
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +28 -18
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +3 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +889 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +3 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +716 -0
- package/dist/solvimon-web.css +1 -1
- package/dist/subscription-C41lG-rH.mjs +89 -0
- package/dist/subscription-b0OPx8Du.js +1 -0
- package/dist/subscriptions-BFCKVHnP.js +1 -0
- package/dist/subscriptions-vEE4Y7qm.mjs +58 -0
- package/dist/{useActionDispatchProvider-Dz8-e4gZ.mjs → useActionDispatchProvider-BlEf-RZ5.mjs} +1 -1
- package/dist/{useActionDispatchProvider-BHTknMoH.js → useActionDispatchProvider-aJOy3kr1.js} +1 -1
- package/dist/{useCustomer-Z24KchWC.js → useCustomer-C1XTqmrQ.js} +1 -1
- package/dist/{useCustomer-VVJi8z2w.mjs → useCustomer-Cw8LXT6S.mjs} +2 -2
- package/dist/{useIncrementalLoading-DmOT2MXH.mjs → useIncrementalLoading-8WtKZ-mP.mjs} +2 -2
- package/dist/useIncrementalLoading-CkY2klIW.js +1 -0
- package/dist/{useInvoiceData-Bl87gzIS.js → useInvoiceData-BrxMo4Zt.js} +1 -1
- package/dist/{useInvoiceData-Di5pLPM0.mjs → useInvoiceData-Cy_ysMsq.mjs} +2 -2
- package/dist/{useInvoicesList-z19cteaD.mjs → useInvoicesList-DMsZn1tE.mjs} +4 -4
- package/dist/useInvoicesList-DmisMQzy.js +1 -0
- package/dist/{useLoadInitialData-CkpryfjF.mjs → useLoadInitialData-BP1v7qhd.mjs} +1 -1
- package/dist/{useLoadInitialData-CTqfiMTN.js → useLoadInitialData-_BjCD0Jc.js} +1 -1
- package/dist/{usePaymentMethodOptions-BoGHJjng.mjs → usePaymentMethodOptions-CWfGvW0U.mjs} +9 -3
- package/dist/{usePaymentMethodOptions-BsCZnCQW.js → usePaymentMethodOptions-xeSTmaVo.js} +1 -1
- package/dist/{usePaymentMethods-AC-4rrR9.js → usePaymentMethods-CAFMvSOr.js} +1 -1
- package/dist/{usePaymentMethods-ocHmNoP7.mjs → usePaymentMethods-Cyk4cjoE.mjs} +2 -2
- package/dist/{usePayments-CgXZeWrU.js → usePayments-BieVBaz-.js} +1 -1
- package/dist/{usePayments-D85eB5l4.mjs → usePayments-D88XSZfS.mjs} +10 -4
- package/dist/{usePortal-B1O1zgdV.mjs → usePortal-0NDlbFr9.mjs} +1 -1
- package/dist/{usePortal-DVD7PcWI.js → usePortal-B954nyEB.js} +1 -1
- package/dist/{useService-CHrkefKd.js → useService-BiljI7XA.js} +1 -1
- package/dist/{useService-DF57xuDd.mjs → useService-CqfJi5ST.mjs} +1 -1
- package/dist/useSubscription-9rJpFNUF.mjs +29 -0
- package/dist/useSubscription-k3limdu_.js +1 -0
- package/dist/vendor-ui-Dfh3_g4q.js +1 -0
- package/dist/{vendor-ui-B8IlviSs.mjs → vendor-ui-ItGf7wJV.mjs} +8006 -6329
- package/package.json +23 -9
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs +0 -1537
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js +0 -1
- package/dist/component-Bg2JVC_O.mjs +0 -933
- package/dist/component-Bs8oszfD.js +0 -1
- package/dist/en-US-C0gIE4Q1.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-D-OKipCg.js +0 -1
- package/dist/nl-NL-Br7muSHK.js +0 -1
- package/dist/paymentMethods-DIbB759g.js +0 -1
- package/dist/registry-uG2isab0.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1102
- package/dist/subscriptions-BPYyv09M.mjs +0 -75
- package/dist/subscriptions-CC61I6Nj.js +0 -1
- package/dist/url-B6-3PkW2.js +0 -1
- package/dist/useIncrementalLoading-CuSndpP2.js +0 -1
- package/dist/useInvoicesList-CFk-_oVK.js +0 -1
- package/dist/useWalletBalanceItems-BL-R5foK.js +0 -1
- package/dist/useWalletBalanceItems-COQDLfoZ.mjs +0 -109
- package/dist/vendor-ui-C3Tq-qY_.js +0 -1
package/README.md
CHANGED
|
@@ -100,11 +100,11 @@ For more details, see [`@solvimon/solvimon-web/core`](./src/public/core/README.m
|
|
|
100
100
|
|
|
101
101
|
Full-page experiences.
|
|
102
102
|
|
|
103
|
-
| Export path
|
|
104
|
-
|
|
|
105
|
-
| `@solvimon/solvimon-web/screens/checkout`
|
|
106
|
-
| `@solvimon/solvimon-web/screens/customer-overview`
|
|
107
|
-
| `@solvimon/solvimon-web/screens/
|
|
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/subscription-management` | `<solvimon-subscription-management>` |
|
|
108
108
|
|
|
109
109
|
### Components
|
|
110
110
|
|
|
@@ -193,40 +193,42 @@ automatically via GitHub Actions. See the
|
|
|
193
193
|
Want to contribute? Check the [developer documentation](./docs/development/readme.md).
|
|
194
194
|
|
|
195
195
|
<!-- log-codes:start — DO NOT EDIT: auto-generated by `npm run logs:list` -->
|
|
196
|
+
|
|
196
197
|
## Error logging
|
|
197
198
|
|
|
198
199
|
The SDK emits structured log entries via the [`onLog`](#error-logging) callback. Subscribe to receive all log events and filter by `code` for programmatic handling.
|
|
199
200
|
|
|
200
201
|
### Error codes
|
|
201
202
|
|
|
202
|
-
| Code
|
|
203
|
-
|
|
|
204
|
-
| `ADYEN_SUBMIT_FAILED`
|
|
205
|
-
| `APPLE_PAY_AUTHORIZATION_FAILED`
|
|
206
|
-
| `APPLE_PAY_ERROR`
|
|
207
|
-
| `CUSTOMER_FETCH_FAILED`
|
|
208
|
-
| `EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR`
|
|
209
|
-
| `EXPRESS_CHECKOUT_PAYPAL_ERROR`
|
|
210
|
-
| `INITIAL_DATA_LOAD_FAILED`
|
|
211
|
-
| `INTEGRATION_ERROR`
|
|
212
|
-
| `INVALID_COUNTRY_CODE`
|
|
213
|
-
| `INVALID_EMAIL`
|
|
214
|
-
| `INVALID_REDIRECT_RESULT`
|
|
215
|
-
| `INVALID_TOKEN`
|
|
216
|
-
| `INVOICE_PREVIEW_FAILED`
|
|
217
|
-
| `PAYMENT_AUTHORIZATION_FAILED`
|
|
218
|
-
| `PAYMENT_DETAILS_CALL_FAILED`
|
|
219
|
-
| `PAYMENT_INTEGRATION_INITIALIZATION_FAILED` | Failed to mount Adyen web drop-in
|
|
220
|
-
| `PURCHASE_FAILED`
|
|
221
|
-
| `REQUEST_PARSE_FAILED`
|
|
222
|
-
| `RESOURCE_REVOKED`
|
|
223
|
-
| `TOKENIZATION_FAILED`
|
|
203
|
+
| Code | Description |
|
|
204
|
+
| :------------------------------------------ | :----------------------------------------------------------------- |
|
|
205
|
+
| `ADYEN_SUBMIT_FAILED` | Failed to submit Adyen drop-in |
|
|
206
|
+
| `APPLE_PAY_AUTHORIZATION_FAILED` | Payment authorization failed |
|
|
207
|
+
| `APPLE_PAY_ERROR` | Apple Pay error |
|
|
208
|
+
| `CUSTOMER_FETCH_FAILED` | Failed to fetch customer billing information |
|
|
209
|
+
| `EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR` | The Google Pay button reference is not found and cannot be mounted |
|
|
210
|
+
| `EXPRESS_CHECKOUT_PAYPAL_ERROR` | The PayPal button reference is not found and cannot be mounted |
|
|
211
|
+
| `INITIAL_DATA_LOAD_FAILED` | Failed to load initial data |
|
|
212
|
+
| `INTEGRATION_ERROR` | Unhandled error in payment submission flow |
|
|
213
|
+
| `INVALID_COUNTRY_CODE` | invalid country code provided:… |
|
|
214
|
+
| `INVALID_EMAIL` | invalid email provided:… |
|
|
215
|
+
| `INVALID_REDIRECT_RESULT` | Redirect result is set but payment acceptor id is missing |
|
|
216
|
+
| `INVALID_TOKEN` | Failed to fetch access token |
|
|
217
|
+
| `INVOICE_PREVIEW_FAILED` | Failed to load invoice preview |
|
|
218
|
+
| `PAYMENT_AUTHORIZATION_FAILED` | Failed payment authorization for payment acceptor with id… |
|
|
219
|
+
| `PAYMENT_DETAILS_CALL_FAILED` | Failed fetching payment details |
|
|
220
|
+
| `PAYMENT_INTEGRATION_INITIALIZATION_FAILED` | Failed to mount Adyen web drop-in |
|
|
221
|
+
| `PURCHASE_FAILED` | Failed to complete upgrade subscription purchase |
|
|
222
|
+
| `REQUEST_PARSE_FAILED` | Failed to parse JSON response |
|
|
223
|
+
| `RESOURCE_REVOKED` | Failed to load portal resource |
|
|
224
|
+
| `TOKENIZATION_FAILED` | Missing customer id for payment acceptor with id… |
|
|
224
225
|
|
|
225
226
|
### Warning codes
|
|
226
227
|
|
|
227
|
-
| Code
|
|
228
|
-
|
|
|
228
|
+
| Code | Description |
|
|
229
|
+
| :---------------------------- | :------------------------------------------------------------ |
|
|
229
230
|
| `ADYEN_INVALID_CONFIGURATION` | No environment set for adyen advanced flow, defaulted to live |
|
|
230
|
-
| `APPLE_PAY_ACTION_REQUIRED`
|
|
231
|
-
| `TRANSLATION_LOAD_FAILED`
|
|
231
|
+
| `APPLE_PAY_ACTION_REQUIRED` | Payment requires additional action |
|
|
232
|
+
| `TRANSLATION_LOAD_FAILED` | Failed to load translations for locale… |
|
|
233
|
+
|
|
232
234
|
<!-- log-codes:end — DO NOT EDIT: auto-generated by `npm run logs:list` -->
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { computed, defineComponent, toRef, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createTextVNode, toDisplayString, unref, Fragment, createElementVNode, createVNode, createCommentVNode, defineAsyncComponent, ref, watch } from "vue";
|
|
2
|
+
import { u as useIntl, t as _sfc_main$3, n as _sfc_main$4, k as _sfc_main$5, a as _sfc_main$6, r as _sfc_main$7 } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
import { _ as _sfc_main$2 } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs";
|
|
4
|
+
const humanise = (value) => value.replaceAll("_", " ").toLowerCase().replace(/^./, (character) => character.toUpperCase());
|
|
5
|
+
function getAccessibleName(paymentMethod) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7
|
+
const parts = [];
|
|
8
|
+
switch (paymentMethod.type) {
|
|
9
|
+
case "CARD":
|
|
10
|
+
parts.push(
|
|
11
|
+
paymentMethod.card.brand && humanise(paymentMethod.card.brand),
|
|
12
|
+
paymentMethod.card.last_four_digits
|
|
13
|
+
);
|
|
14
|
+
break;
|
|
15
|
+
case "ONLINE_BANKING":
|
|
16
|
+
parts.push(
|
|
17
|
+
((_a = paymentMethod.online_banking) == null ? void 0 : _a.variant) && humanise(paymentMethod.online_banking.variant),
|
|
18
|
+
(_b = paymentMethod.online_banking) == null ? void 0 : _b.owner_name
|
|
19
|
+
);
|
|
20
|
+
break;
|
|
21
|
+
case "DIRECT_DEBIT":
|
|
22
|
+
parts.push(
|
|
23
|
+
((_c = paymentMethod.direct_debit) == null ? void 0 : _c.variant) && humanise(paymentMethod.direct_debit.variant),
|
|
24
|
+
(_d = paymentMethod.direct_debit) == null ? void 0 : _d.owner_name
|
|
25
|
+
);
|
|
26
|
+
break;
|
|
27
|
+
case "BUY_NOW_PAY_LATER":
|
|
28
|
+
parts.push(
|
|
29
|
+
((_e = paymentMethod.buy_now_pay_later) == null ? void 0 : _e.variant) && humanise(paymentMethod.buy_now_pay_later.variant)
|
|
30
|
+
);
|
|
31
|
+
break;
|
|
32
|
+
case "DIGITAL_WALLET":
|
|
33
|
+
parts.push(
|
|
34
|
+
((_f = paymentMethod.digital_wallet) == null ? void 0 : _f.variant) && humanise(paymentMethod.digital_wallet.variant)
|
|
35
|
+
);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
const name = parts.filter(Boolean).join(" ");
|
|
39
|
+
return name || humanise(paymentMethod.type);
|
|
40
|
+
}
|
|
41
|
+
function usePaymentMethodSelectorOptions(paymentMethods) {
|
|
42
|
+
const options = computed(
|
|
43
|
+
() => paymentMethods.value.map((paymentMethod) => ({
|
|
44
|
+
value: paymentMethod.id,
|
|
45
|
+
label: getAccessibleName(paymentMethod)
|
|
46
|
+
}))
|
|
47
|
+
);
|
|
48
|
+
const paymentMethodsById = computed(
|
|
49
|
+
() => Object.fromEntries(
|
|
50
|
+
paymentMethods.value.map((paymentMethod) => [paymentMethod.id, paymentMethod])
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
return { options, paymentMethodsById };
|
|
54
|
+
}
|
|
55
|
+
const _hoisted_1 = { class: "sr-only" };
|
|
56
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
57
|
+
__name: "PaymentMethodSelector",
|
|
58
|
+
props: {
|
|
59
|
+
paymentMethods: { type: Array },
|
|
60
|
+
modelValue: { type: String },
|
|
61
|
+
label: { type: String },
|
|
62
|
+
required: { type: Boolean },
|
|
63
|
+
disabled: { type: Boolean },
|
|
64
|
+
error: { type: [String, Object, Array] },
|
|
65
|
+
rootClass: { type: String },
|
|
66
|
+
showAddOption: { type: Boolean, default: true },
|
|
67
|
+
paymentMethodOptions: { type: Array }
|
|
68
|
+
},
|
|
69
|
+
emits: ["update:modelValue", "add-payment-method"],
|
|
70
|
+
setup(__props, { emit: __emit }) {
|
|
71
|
+
const props = __props;
|
|
72
|
+
const emit = __emit;
|
|
73
|
+
const { $t } = useIntl();
|
|
74
|
+
const { options, paymentMethodsById } = usePaymentMethodSelectorOptions(
|
|
75
|
+
toRef(props, "paymentMethods")
|
|
76
|
+
);
|
|
77
|
+
const selectedValue = computed({
|
|
78
|
+
get: () => props.modelValue,
|
|
79
|
+
set: (value) => emit("update:modelValue", typeof value === "string" ? value : void 0)
|
|
80
|
+
});
|
|
81
|
+
const hasPaymentMethods = computed(() => props.paymentMethods.length > 0);
|
|
82
|
+
const canAddPaymentMethod = computed(() => {
|
|
83
|
+
var _a;
|
|
84
|
+
return ((_a = props.paymentMethodOptions) == null ? void 0 : _a.length) !== 0;
|
|
85
|
+
});
|
|
86
|
+
return (_ctx, _cache) => {
|
|
87
|
+
return openBlock(), createElementBlock("div", {
|
|
88
|
+
class: normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2", __props.rootClass])
|
|
89
|
+
}, [
|
|
90
|
+
!hasPaymentMethods.value && !canAddPaymentMethod.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "sv-payment-method-selector__empty",
|
|
93
|
+
icon: "credit_card_off"
|
|
94
|
+
}, {
|
|
95
|
+
title: withCtx(() => [
|
|
96
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
97
|
+
defaultMessage: "No payment methods available",
|
|
98
|
+
description: "Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",
|
|
99
|
+
id: "payment_method_selector.empty_state.title"
|
|
100
|
+
})), 1)
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
104
|
+
createElementVNode("div", null, [
|
|
105
|
+
hasPaymentMethods.value ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
106
|
+
key: 0,
|
|
107
|
+
modelValue: selectedValue.value,
|
|
108
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedValue.value = $event),
|
|
109
|
+
class: "sv-payment-method-selector__options",
|
|
110
|
+
name: "payment-method",
|
|
111
|
+
direction: "column",
|
|
112
|
+
options: unref(options),
|
|
113
|
+
label: __props.label,
|
|
114
|
+
required: __props.required,
|
|
115
|
+
disabled: __props.disabled,
|
|
116
|
+
error: __props.error,
|
|
117
|
+
"show-radio": false
|
|
118
|
+
}, {
|
|
119
|
+
prefix: withCtx(({ optionValue }) => [
|
|
120
|
+
createVNode(unref(_sfc_main$4), {
|
|
121
|
+
class: "sv-payment-method-selector__option-content grow",
|
|
122
|
+
"payment-method": unref(paymentMethodsById)[String(optionValue)]
|
|
123
|
+
}, null, 8, ["payment-method"])
|
|
124
|
+
]),
|
|
125
|
+
label: withCtx(({ option }) => [
|
|
126
|
+
createElementVNode("span", _hoisted_1, toDisplayString(option.label), 1)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, ["modelValue", "options", "label", "required", "disabled", "error"])) : createCommentVNode("", true)
|
|
130
|
+
]),
|
|
131
|
+
__props.showAddOption && canAddPaymentMethod.value ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",
|
|
134
|
+
variant: "outline",
|
|
135
|
+
color: "gray",
|
|
136
|
+
"icon-prefix": "add",
|
|
137
|
+
type: "button",
|
|
138
|
+
size: "sm",
|
|
139
|
+
disabled: __props.disabled,
|
|
140
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("add-payment-method"))
|
|
141
|
+
}, {
|
|
142
|
+
default: withCtx(() => [
|
|
143
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
144
|
+
defaultMessage: "Add payment method",
|
|
145
|
+
description: "Label of the button that adds a new payment method",
|
|
146
|
+
id: "payment_method_selector.add_payment_method"
|
|
147
|
+
})), 1)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["disabled"])) : __props.showAddOption ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
151
|
+
key: 1,
|
|
152
|
+
variant: "body-sm",
|
|
153
|
+
shade: "lighter",
|
|
154
|
+
tag: "p",
|
|
155
|
+
class: "sv-payment-method-selector__unavailable"
|
|
156
|
+
}, {
|
|
157
|
+
default: withCtx(() => [
|
|
158
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
159
|
+
defaultMessage: "There are no available payment methods. Please contact support for more information.",
|
|
160
|
+
description: "Shown in place of the add button when the customer cannot add any payment method",
|
|
161
|
+
id: "payment_method_selector.no_payment_methods_available"
|
|
162
|
+
})), 1)
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
})) : createCommentVNode("", true),
|
|
166
|
+
__props.error && !hasPaymentMethods.value ? (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
167
|
+
key: 2,
|
|
168
|
+
class: "sv-payment-method-selector__error",
|
|
169
|
+
message: __props.error,
|
|
170
|
+
variant: "error"
|
|
171
|
+
}, null, 8, ["message"])) : createCommentVNode("", true)
|
|
172
|
+
], 64))
|
|
173
|
+
], 2);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
178
|
+
__name: "AddPaymentMethodPane",
|
|
179
|
+
props: {
|
|
180
|
+
customer: { type: Object },
|
|
181
|
+
paymentMethodOptions: { type: Array },
|
|
182
|
+
isLoading: { type: Boolean },
|
|
183
|
+
isActive: { type: Boolean }
|
|
184
|
+
},
|
|
185
|
+
emits: ["success", "failure"],
|
|
186
|
+
setup(__props, { expose: __expose }) {
|
|
187
|
+
const PaymentMethodForm = defineAsyncComponent(
|
|
188
|
+
() => import("./PaymentMethodForm-B7T5rrNz.mjs").then((m) => m.default)
|
|
189
|
+
);
|
|
190
|
+
const props = __props;
|
|
191
|
+
const configuration = computed(() => ({
|
|
192
|
+
variant: "TOKENIZE"
|
|
193
|
+
}));
|
|
194
|
+
const hasEverBeenActive = ref(false);
|
|
195
|
+
watch(
|
|
196
|
+
() => props.isActive,
|
|
197
|
+
(isActive) => {
|
|
198
|
+
hasEverBeenActive.value = hasEverBeenActive.value || !!isActive;
|
|
199
|
+
},
|
|
200
|
+
{ immediate: true }
|
|
201
|
+
);
|
|
202
|
+
const formRef = ref();
|
|
203
|
+
__expose({
|
|
204
|
+
/** Submits the form, for a host whose own chrome owns the button — a modal footer, say. */
|
|
205
|
+
submit: () => {
|
|
206
|
+
var _a;
|
|
207
|
+
return (_a = formRef.value) == null ? void 0 : _a.submit();
|
|
208
|
+
},
|
|
209
|
+
/**
|
|
210
|
+
* Whether the gateway is working on it, so the host can show it and hold everything else. Read
|
|
211
|
+
* through the pane being on screen: a form left behind on another pane is not what is pending.
|
|
212
|
+
*/
|
|
213
|
+
isSaving: computed(() => {
|
|
214
|
+
var _a;
|
|
215
|
+
return !!props.isActive && !!((_a = formRef.value) == null ? void 0 : _a.isPaymentPending);
|
|
216
|
+
})
|
|
217
|
+
});
|
|
218
|
+
return (_ctx, _cache) => {
|
|
219
|
+
return __props.customer && hasEverBeenActive.value ? (openBlock(), createBlock(unref(PaymentMethodForm), {
|
|
220
|
+
key: 0,
|
|
221
|
+
ref_key: "formRef",
|
|
222
|
+
ref: formRef,
|
|
223
|
+
class: "sv-add-payment-method-pane",
|
|
224
|
+
"hide-submit-button": "",
|
|
225
|
+
customer: __props.customer,
|
|
226
|
+
"payment-method-options": __props.paymentMethodOptions ?? [],
|
|
227
|
+
"is-loading": __props.isLoading,
|
|
228
|
+
configuration: configuration.value,
|
|
229
|
+
onSuccess: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("success")),
|
|
230
|
+
onFailure: _cache[1] || (_cache[1] = (error) => _ctx.$emit("failure", error))
|
|
231
|
+
}, null, 8, ["customer", "payment-method-options", "is-loading", "configuration"])) : createCommentVNode("", true);
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
export {
|
|
236
|
+
_sfc_main$1 as _,
|
|
237
|
+
_sfc_main as a
|
|
238
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),a=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js"),o=e=>e.replaceAll("_"," ").toLowerCase().replace(/^./,e=>e.toUpperCase());function n(e){var t,a,n,r,l,i;const s=[];switch(e.type){case"CARD":s.push(e.card.brand&&o(e.card.brand),e.card.last_four_digits);break;case"ONLINE_BANKING":s.push((null==(t=e.online_banking)?void 0:t.variant)&&o(e.online_banking.variant),null==(a=e.online_banking)?void 0:a.owner_name);break;case"DIRECT_DEBIT":s.push((null==(n=e.direct_debit)?void 0:n.variant)&&o(e.direct_debit.variant),null==(r=e.direct_debit)?void 0:r.owner_name);break;case"BUY_NOW_PAY_LATER":s.push((null==(l=e.buy_now_pay_later)?void 0:l.variant)&&o(e.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":s.push((null==(i=e.digital_wallet)?void 0:i.variant)&&o(e.digital_wallet.variant))}return s.filter(Boolean).join(" ")||o(e.type)}const r={class:"sr-only"},l=e.defineComponent({__name:"PaymentMethodSelector",props:{paymentMethods:{type:Array},modelValue:{type:String},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]},rootClass:{type:String},showAddOption:{type:Boolean,default:!0},paymentMethodOptions:{type:Array}},emits:["update:modelValue","add-payment-method"],setup(o,{emit:l}){const i=o,s=l,{$t:d}=t.useIntl(),{options:m,paymentMethodsById:c}=(p=e.toRef(i,"paymentMethods"),{options:e.computed(()=>p.value.map(e=>({value:e.id,label:n(e)}))),paymentMethodsById:e.computed(()=>Object.fromEntries(p.value.map(e=>[e.id,e])))});var p;const u=e.computed({get:()=>i.modelValue,set:e=>s("update:modelValue","string"==typeof e?e:void 0)}),y=e.computed(()=>i.paymentMethods.length>0),_=e.computed(()=>{var e;return 0!==(null==(e=i.paymentMethodOptions)?void 0:e.length)});return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2",o.rootClass])},[y.value||_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",null,[y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:0,modelValue:u.value,"onUpdate:modelValue":l[0]||(l[0]=e=>u.value=e),class:"sv-payment-method-selector__options",name:"payment-method",direction:"column",options:e.unref(m),label:o.label,required:o.required,disabled:o.disabled,error:o.error,"show-radio":!1},{prefix:e.withCtx(({optionValue:a})=>[e.createVNode(e.unref(t._sfc_main$8),{class:"sv-payment-method-selector__option-content grow","payment-method":e.unref(c)[String(a)]},null,8,["payment-method"])]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",r,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label","required","disabled","error"])):e.createCommentVNode("",!0)]),o.showAddOption&&_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",size:"sm",disabled:o.disabled,onClick:l[1]||(l[1]=e=>s("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add payment method",description:"Label of the button that adds a new payment method",id:"payment_method_selector.add_payment_method"})),1)]),_:1},8,["disabled"])):o.showAddOption?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,variant:"body-sm",shade:"lighter",tag:"p",class:"sv-payment-method-selector__unavailable"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"There are no available payment methods. Please contact support for more information.",description:"Shown in place of the add button when the customer cannot add any payment method",id:"payment_method_selector.no_payment_methods_available"})),1)]),_:1})):e.createCommentVNode("",!0),o.error&&!y.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$9),{key:2,class:"sv-payment-method-selector__error",message:o.error,variant:"error"},null,8,["message"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(a._sfc_main,{key:0,class:"sv-payment-method-selector__empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"No payment methods available",description:"Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",id:"payment_method_selector.empty_state.title"})),1)]),_:1}))],2))}}),i=e.defineComponent({__name:"AddPaymentMethodPane",props:{customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},isActive:{type:Boolean}},emits:["success","failure"],setup(t,{expose:a}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentMethodForm-CLz3ZS-b.js")).then(e=>e.default)),n=t,r=e.computed(()=>({variant:"TOKENIZE"})),l=e.ref(!1);e.watch(()=>n.isActive,e=>{l.value=l.value||!!e},{immediate:!0});const i=e.ref();return a({submit:()=>{var e;return null==(e=i.value)?void 0:e.submit()},isSaving:e.computed(()=>{var e;return!!n.isActive&&!!(null==(e=i.value)?void 0:e.isPaymentPending)})}),(a,n)=>t.customer&&l.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,ref_key:"formRef",ref:i,class:"sv-add-payment-method-pane","hide-submit-button":"",customer:t.customer,"payment-method-options":t.paymentMethodOptions??[],"is-loading":t.isLoading,configuration:r.value,onSuccess:n[0]||(n[0]=e=>a.$emit("success")),onFailure:n[1]||(n[1]=e=>a.$emit("failure",e))},null,8,["customer","payment-method-options","is-loading","configuration"])):e.createCommentVNode("",!0)}});exports._sfc_main=l,exports._sfc_main$1=i;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { u as useIntl, j as _sfc_main$2,
|
|
2
|
+
import { u as useIntl, j as _sfc_main$2, k as _sfc_main$3 } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BlEf-RZ5.mjs";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "BillingInformation",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),i=require("./vendor-ui-
|
|
1
|
+
const e=require("vue"),i=require("./vendor-ui-Dfh3_g4q.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),o=require("./useActionDispatchProvider-aJOy3kr1.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:s}=i.useIntl(),{dispatchAction:r}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(i._sfc_main$5),{key:1,class:"sv-billing-information sv-root sv-component",customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:a[0]||(a[0]=i=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useIntl,
|
|
3
|
-
import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as useIntl, b as _sfc_main$2, a as _sfc_main$4, k as _sfc_main$5 } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs";
|
|
4
4
|
import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
5
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
5
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BlEf-RZ5.mjs";
|
|
6
6
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "CustomerPaymentMethodsBlock",
|
|
8
8
|
props: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),o=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),a=require("./useActionDispatchProvider-aJOy3kr1.js"),s=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(n){const a=n,{$t:s}=t.useIntl(),i=e.computed(()=>a.paymentMethods.length>0);return(a,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(s)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(n.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"payment-methods":n.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),n.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:d[1]||(d[1]=e=>a.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[n.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$6),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:d[0]||(d[0]=e=>a.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),i=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:o}=a.useActionDispatchProvider();return(a,i)=>{var d,m;return t.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(s,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(d=t.configuration)?void 0:d.showViewAllButton,"show-add-button":null==(m=t.configuration)?void 0:m.showAddButton,onViewAllPaymentMethods:i[0]||(i[0]=t=>e.unref(o)({action:"view-all-payment-methods"})),onAddPaymentMethod:i[1]||(i[1]=t=>e.unref(o)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=i;
|