@solvimon/solvimon-web 0.1.0-alpha.28 → 0.1.0-alpha.29
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 +26 -1
- package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
- package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
- package/dist/{Avatar.vue.es-Beg7umjO.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +8 -8
- package/dist/{Button.vue.es-rh6mITmN.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
- package/dist/{ChargeOnDemandModal-CPjPa_uq.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +35 -34
- package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
- package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
- package/dist/{Chip.vue.es-Cn2R_0mE.mjs → Chip.vue.es-D3UDSyXC.mjs} +3 -3
- package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
- package/dist/{ContextMenu.vue.es-DRxsa7bZ.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
- package/dist/{CustomerBillingInformation.vue.es-DQfL5RMR.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs} +21 -20
- package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs} +798 -792
- package/dist/{DividerText.vue.es-M0XqSz55.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
- package/dist/{ErrorNotification.vue.es-CKlt4hr2.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
- package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
- package/dist/{IconButton.vue.es-oe4MVBK1.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
- package/dist/{IconTitle.vue.es-BO6KBS4v.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
- package/dist/{Input.vue.es-DAlPmtE_.mjs → Input.vue.es-D8Oj8MWv.mjs} +23 -22
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs} +4 -4
- package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
- package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
- package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
- package/dist/{Modal.vue.es-CTNACAst.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
- package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs} +46 -88
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-BmA8jbMb.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-D1Xw-xIt.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs} +68 -69
- package/dist/{PaymentIntegrationFormAdyen-CfT5aD4L.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +126 -117
- package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs} +193 -179
- package/dist/{PaymentMethod.vue.es-Cauxx4Xr.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
- package/dist/{PaymentMethodForm-CypZOYUZ.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +7 -7
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs} +36 -35
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +7 -7
- package/dist/{PlanCustomizationEditor-Xtww2r9K.mjs → PlanCustomizationEditor-D29N4HUM.mjs} +9 -9
- package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
- package/dist/{PortalNotAvailable-B_59GUwN.mjs → PortalNotAvailable-DPE9y37H.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-C9LJW3b8.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +32 -32
- package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
- package/dist/{Section.vue.es-iS8hVGWA.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
- package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
- package/dist/{StepInput.vue.es-Dpan1RQd.mjs → StepInput.vue.es-DweyzpkL.mjs} +4 -4
- package/dist/{SubscriptionDetails.entry.ce-DufQX3uI.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +230 -225
- package/dist/{SubscriptionSchedules-DAahcNoI.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs} +3 -3
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +23 -22
- package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
- package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
- package/dist/{TrialChip.vue.es-B-XBSHWE.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
- package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
- package/dist/{cn.es-2bVdkiFV.mjs → cn.es-B8acFrov.mjs} +380 -476
- package/dist/components/BillingInformation/BillingInformation.mjs +9 -7
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +57 -54
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -18
- package/dist/components/Invoice/Invoice.mjs +2660 -193
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +6 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +18 -17
- package/dist/components/InvoicesList/InvoicesList.mjs +13 -11
- package/dist/components/PaymentHistory/PaymentHistory.mjs +8 -6
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +19 -17
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +19 -17
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +20 -18
- package/dist/components/WalletBalances/WalletBalances.mjs +17 -15
- package/dist/customElements-BTj4ii4f.mjs +5072 -0
- package/dist/{customer-CqddTiOr.mjs → customer-BIjC0CWJ.mjs} +1 -1
- package/dist/customer.es-DQKl6wFt.mjs +24 -0
- package/dist/{de-DE-BW8dMvhW.mjs → de-DE-DBbERiFr.mjs} +38 -0
- package/dist/{de-DE-BNMj3boy.mjs → de-DE-UJ6X6jXu.mjs} +1 -1
- package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
- package/dist/{formControl-CsITfsBk.mjs → formControl-BZQLHnOO.mjs} +5 -5
- package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
- package/dist/fr-FR-IWJE-urI.mjs +431 -0
- package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
- package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
- package/dist/index.es-CpmQmvOg.mjs +633 -0
- package/dist/index.mjs +2 -2
- package/dist/{invoices-Cf1qDAv4.mjs → invoices-e1sKLgxg.mjs} +3 -3
- package/dist/{it-IT-Byg06KWc.mjs → it-IT-B7ui2oxO.mjs} +38 -0
- package/dist/{it-IT-DRvuxM1F.mjs → it-IT-DnJP5URH.mjs} +1 -1
- package/dist/{nl-NL-x3zQqzZ7.mjs → nl-NL-Bafh2xoT.mjs} +38 -0
- package/dist/{nl-NL-DLUwWbMG.mjs → nl-NL-q9xfTZF0.mjs} +1 -1
- package/dist/{paymentMethods-BUuOmDq9.mjs → paymentMethods-B_82JGk_.mjs} +2 -2
- package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
- package/dist/{paymentOutcome-D17VD4MV.mjs → paymentOutcome-BXEU5-84.mjs} +5 -5
- package/dist/payments-BnxbzQUC.mjs +68 -0
- package/dist/pricing-BOhvWWMj.mjs +29 -0
- package/dist/{pricingPlanScheduleOverrides-COr9F8DO.mjs → pricingPlanScheduleOverrides-Dxv5FOBd.mjs} +2 -2
- package/dist/{pricingPlanSchedules-BK_o9p6h.mjs → pricingPlanSchedules-Dv7ZCgNp.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +128 -83
- package/dist/screens/PayInvoice/PayInvoice.mjs +572 -218
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +21 -19
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +261 -266
- package/dist/{sorting.es-qtEN8J8T.mjs → sorting.es-CVyKw23D.mjs} +1 -1
- package/dist/subscriptions-BWXZGK0E.mjs +66 -0
- package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -0
- package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
- package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
- package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +11 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +4 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +23 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -1
- package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +2 -0
- package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
- package/dist/types/public/core/types.d.ts +5 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +3 -1
- package/dist/types/translations/supported.d.ts +1 -1
- package/dist/types/types/portalAuthentication.d.ts +2 -0
- package/dist/types/types/portalToken.d.ts +9 -0
- package/dist/types/types/shippingAddress.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
- package/dist/{useActionDispatchProvider-DC_fUykI.mjs → useActionDispatchProvider-3W2vEyIg.mjs} +1 -1
- package/dist/{useCustomer-C3kTh7wn.mjs → useCustomer-cObBvDOu.mjs} +2 -2
- package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
- package/dist/{useIncrementalLoading-C_sHmW7d.mjs → useIncrementalLoading-CATuO36d.mjs} +2 -2
- package/dist/{useInvoiceData-BIh8-h8b.mjs → useInvoiceData-DD44HTl7.mjs} +2 -2
- package/dist/{useInvoicesList-Y6p0Pqpy.mjs → useInvoicesList-CpB-41MQ.mjs} +10 -10
- package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
- package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
- package/dist/{usePaymentFormHold-FfNc578l.mjs → usePaymentFormHold-ByUZi3A-.mjs} +28 -36
- package/dist/{usePaymentMethodAvailability-CnYTvG15.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +4 -4
- package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
- package/dist/{usePayments-CykCZPG2.mjs → usePayments-BXABv-lF.mjs} +9 -9
- package/dist/{usePortal-CxzKGhbK.mjs → usePortal-CwR_FxTb.mjs} +1 -1
- package/dist/{useService-B0OQJmif.mjs → useService-BZcbUZHI.mjs} +3 -3
- package/dist/{useTimePeriod.es-JkXdHNWr.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
- package/package.json +7 -7
- package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +0 -50
- package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +0 -5279
- package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +0 -362
- package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
- package/dist/InvoiceSummary.vue.es-DbNoGfYN.mjs +0 -2596
- package/dist/RadioGroupExtended.vue.es-UtKsdmiv.mjs +0 -163
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs +0 -688
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs +0 -5221
- package/dist/TooltipParagraph.vue.es-BjCn2BF6.mjs +0 -129
- package/dist/customElements-Di3zwlEU.mjs +0 -6447
- package/dist/customer.es-B5ppZf0j.mjs +0 -20
- package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
- package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
- package/dist/payments-Ci8bF4C6.mjs +0 -45
- package/dist/subscriptions-CwogJODR.mjs +0 -54
- package/dist/useCustomerFormLabels-CK7K50nB.mjs +0 -1369
- package/dist/useLoadInitialData-4k_Cyqef.mjs +0 -15
- package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +0 -40
- package/dist/usePaymentMethods-gvr-rmwE.mjs +0 -15
|
@@ -1,25 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { f as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { _ as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
18
|
-
|
|
1
|
+
import { defineComponent as $, computed as g, capitalize as ae, openBlock as u, createBlock as p, unref as t, mergeProps as K, withCtx as i, createTextVNode as T, toDisplayString as k, ref as w, createElementVNode as O, createVNode as r, createCommentVNode as M, createElementBlock as E, Fragment as R, watch as ne, normalizeClass as oe, renderSlot as ie } from "vue";
|
|
2
|
+
import { a as re, f as B } from "../../formatting.es-RclXHhKo.mjs";
|
|
3
|
+
import { _ as G, a as se } from "../../Button.vue.es-Zw--kuaU.mjs";
|
|
4
|
+
import { _ as de, a as ce } from "../../OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs";
|
|
5
|
+
import { _ as le } from "../../DividerText.vue.es-CNbgif-3.mjs";
|
|
6
|
+
import { _ as me } from "../../ErrorNotification.vue.es-DNd65mQq.mjs";
|
|
7
|
+
import { _ as ue, u as ye, a as pe } from "../../usePayments-BXABv-lF.mjs";
|
|
8
|
+
import { _ as N } from "../../Section.vue.es-CvX9tg2f.mjs";
|
|
9
|
+
import { a as U, e as ve, d as I, g as fe, h as he, j as ge } from "../../customElements-BTj4ii4f.mjs";
|
|
10
|
+
import { g as _e, _ as be } from "../../PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs";
|
|
11
|
+
import { a as Pe, u as we } from "../../paymentMethods-Nfv9HdkS.mjs";
|
|
12
|
+
import { C as Me } from "../../ContentWithAsideLayout-Bnbsq8_5.mjs";
|
|
13
|
+
import { _ as Ae } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs";
|
|
14
|
+
import { _ as L } from "../../Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
|
|
15
|
+
import { _ as W } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs";
|
|
16
|
+
import { u as Se, _ as Ie } from "../../usePaymentMethodAvailability-DUdrs0Ji.mjs";
|
|
17
|
+
import { u as Oe } from "../../usePaymentFormHold-ByUZi3A-.mjs";
|
|
18
|
+
import { c as Te } from "../../payments-BnxbzQUC.mjs";
|
|
19
|
+
import { b as ke, i as Ce, a as xe } from "../../paymentOutcome-BXEU5-84.mjs";
|
|
20
|
+
import { _ as Z } from "../../Amount.vue.es-DPqHB8Xd.mjs";
|
|
21
|
+
import { _ as Ee } from "../../Divider.vue.es-DnP_HqLz.mjs";
|
|
22
|
+
import { _ as $e } from "../../TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs";
|
|
23
|
+
import { s as Ne } from "../../amount-CondixVt.mjs";
|
|
24
|
+
import { g as De } from "../../invoiceState-BJVHaKs7.mjs";
|
|
25
|
+
import { _ as Fe } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs";
|
|
26
|
+
import { _ as Le } from "../../PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs";
|
|
27
|
+
import { g as Re } from "../../customer.es-DQKl6wFt.mjs";
|
|
28
|
+
import { u as Be } from "../../useLoadInitialData-qzdnBoui.mjs";
|
|
29
|
+
import { u as Ue, D as je } from "../../usePaymentMethods-ByaKF7mf.mjs";
|
|
30
|
+
function Ve(e, a, n = /* @__PURE__ */ new Date()) {
|
|
31
|
+
return e.flatMap((y) => {
|
|
32
|
+
const c = a.find(
|
|
33
|
+
({ integration: s }) => !!y.integration_id && (s == null ? void 0 : s.id) === y.integration_id
|
|
34
|
+
);
|
|
35
|
+
return c && Pe(y, n) ? [{ paymentMethod: y, paymentAcceptorId: c.payment_acceptor.id }] : [];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function ze(e) {
|
|
39
|
+
var a;
|
|
40
|
+
return (a = e.find(({ is_default: n }) => n) ?? e[0]) == null ? void 0 : a.id;
|
|
41
|
+
}
|
|
42
|
+
function He(e) {
|
|
43
|
+
return e.type === "CARD" && e.card.last_four_digits ? [e.card.brand ? re(e.card.brand) : void 0, `•••• ${e.card.last_four_digits}`].filter(Boolean).join(" ") : _e(e);
|
|
44
|
+
}
|
|
45
|
+
const Ye = /* @__PURE__ */ $({
|
|
19
46
|
__name: "PayButton",
|
|
20
47
|
props: {
|
|
21
48
|
amount: { type: Object },
|
|
22
49
|
paymentMethod: { type: Object },
|
|
50
|
+
paymentMethodLabel: { type: String },
|
|
23
51
|
type: { type: String },
|
|
24
52
|
intent: { type: String },
|
|
25
53
|
size: { type: String },
|
|
@@ -34,22 +62,22 @@ const me = /* @__PURE__ */ x({
|
|
|
34
62
|
},
|
|
35
63
|
emits: ["click"],
|
|
36
64
|
setup(e) {
|
|
37
|
-
const
|
|
38
|
-
intent:
|
|
39
|
-
disabled:
|
|
40
|
-
iconPrefix:
|
|
41
|
-
iconSuffix:
|
|
42
|
-
loading:
|
|
43
|
-
pill:
|
|
44
|
-
size:
|
|
45
|
-
square:
|
|
46
|
-
tag:
|
|
47
|
-
type:
|
|
48
|
-
})),
|
|
49
|
-
var
|
|
50
|
-
switch ((
|
|
65
|
+
const a = e, { $t: n } = U(), y = g(() => ({
|
|
66
|
+
intent: a.intent ?? "primary",
|
|
67
|
+
disabled: a.disabled,
|
|
68
|
+
iconPrefix: a.iconPrefix,
|
|
69
|
+
iconSuffix: a.iconSuffix,
|
|
70
|
+
loading: a.loading,
|
|
71
|
+
pill: a.pill,
|
|
72
|
+
size: a.size ?? "lg",
|
|
73
|
+
square: a.square,
|
|
74
|
+
tag: a.tag,
|
|
75
|
+
type: a.type
|
|
76
|
+
})), c = g(() => {
|
|
77
|
+
var l, o, m;
|
|
78
|
+
switch ((l = a.paymentMethod) == null ? void 0 : l.paymentMethodType) {
|
|
51
79
|
case "scheme":
|
|
52
|
-
return
|
|
80
|
+
return n({
|
|
53
81
|
defaultMessage: "Credit Card",
|
|
54
82
|
id: "pay_button.payment_method.card",
|
|
55
83
|
description: 'Name of card payments in the pay button label, as in "Pay €10.00 with Credit Card"'
|
|
@@ -120,48 +148,251 @@ const me = /* @__PURE__ */ x({
|
|
|
120
148
|
case "openbanking_UK":
|
|
121
149
|
return "Open Banking";
|
|
122
150
|
default:
|
|
123
|
-
return (o =
|
|
151
|
+
return (o = a.paymentMethod) != null && o.paymentMethodType ? ae((m = a.paymentMethod) == null ? void 0 : m.paymentMethodType) : "";
|
|
124
152
|
}
|
|
125
|
-
}),
|
|
153
|
+
}), s = g(() => a.amount && (a.paymentMethod || a.paymentMethodLabel) ? n(
|
|
126
154
|
{
|
|
127
155
|
defaultMessage: "Pay {amount} with {type}",
|
|
128
156
|
id: "pay_button.label.amount_and_payment_method",
|
|
129
157
|
description: "The label for the pay button when both the amount and the payment method are known"
|
|
130
158
|
},
|
|
131
159
|
{
|
|
132
|
-
amount:
|
|
133
|
-
type:
|
|
160
|
+
amount: B(a.amount),
|
|
161
|
+
type: a.paymentMethodLabel ?? c.value
|
|
134
162
|
}
|
|
135
|
-
) :
|
|
163
|
+
) : a.amount ? n(
|
|
136
164
|
{
|
|
137
165
|
defaultMessage: "Pay {amount}",
|
|
138
166
|
id: "pay_button.label.amount_only",
|
|
139
167
|
description: "The label for the pay button when only the amount is known"
|
|
140
168
|
},
|
|
141
169
|
{
|
|
142
|
-
amount:
|
|
143
|
-
type:
|
|
170
|
+
amount: B(a.amount),
|
|
171
|
+
type: c.value
|
|
144
172
|
}
|
|
145
|
-
) :
|
|
173
|
+
) : n({
|
|
146
174
|
defaultMessage: "Pay",
|
|
147
175
|
id: "pay_button.label.default",
|
|
148
176
|
description: "The default label for the pay button when no amount and payment method are known"
|
|
149
177
|
}));
|
|
150
|
-
return (
|
|
178
|
+
return (l, o) => (u(), p(t(G), K(y.value, {
|
|
151
179
|
class: "w-full",
|
|
152
|
-
onClick: o[0] || (o[0] = (
|
|
180
|
+
onClick: o[0] || (o[0] = (m) => l.$emit("click", m))
|
|
153
181
|
}), {
|
|
154
182
|
default: i(() => [
|
|
155
|
-
|
|
183
|
+
T(k(s.value), 1)
|
|
156
184
|
]),
|
|
157
185
|
_: 1
|
|
158
186
|
}, 16));
|
|
159
187
|
}
|
|
160
|
-
})
|
|
188
|
+
});
|
|
189
|
+
function qe() {
|
|
190
|
+
const { chargeStoredPaymentMethod: e } = Te(), a = ve(), n = w(!1);
|
|
191
|
+
return { isPending: n, charge: async (c) => {
|
|
192
|
+
if (n.value) return "UNCONFIRMED";
|
|
193
|
+
n.value = !0;
|
|
194
|
+
const s = {
|
|
195
|
+
paymentAcceptorId: c.paymentAcceptorId,
|
|
196
|
+
invoiceId: c.invoiceId
|
|
197
|
+
};
|
|
198
|
+
try {
|
|
199
|
+
const l = await e(c), o = ke(l);
|
|
200
|
+
return o === "FAILED" && a.error(
|
|
201
|
+
"PAYMENT_AUTHORIZATION_FAILED",
|
|
202
|
+
"Failed to charge the invoice to a stored payment method",
|
|
203
|
+
{
|
|
204
|
+
...s,
|
|
205
|
+
reason: "PAYMENT_AUTHORIZATION_REJECTED",
|
|
206
|
+
status: l.status
|
|
207
|
+
}
|
|
208
|
+
), o;
|
|
209
|
+
} catch (l) {
|
|
210
|
+
return a.error(
|
|
211
|
+
"PAYMENT_AUTHORIZATION_FAILED",
|
|
212
|
+
"Failed to charge the invoice to a stored payment method",
|
|
213
|
+
{ ...s, reason: "PAYMENT_AUTHORIZATION_FAILED" },
|
|
214
|
+
l
|
|
215
|
+
), Ce(l) ? "UNCONFIRMED" : "FAILED";
|
|
216
|
+
} finally {
|
|
217
|
+
n.value = !1;
|
|
218
|
+
}
|
|
219
|
+
} };
|
|
220
|
+
}
|
|
221
|
+
const We = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, Ze = { class: "flex flex-row gap-3 px-3 py-2" }, Ke = { class: "min-w-0 grow" }, Ge = { class: "sv-invoice-order-summary__paid flex flex-row gap-2 py-1.5" }, Je = { class: "sv-invoice-order-summary__due flex flex-row gap-2 py-1.5" }, Qe = /* @__PURE__ */ $({
|
|
222
|
+
__name: "InvoiceOrderSummary",
|
|
223
|
+
props: {
|
|
224
|
+
invoice: { type: Object },
|
|
225
|
+
isPaid: { type: Boolean }
|
|
226
|
+
},
|
|
227
|
+
setup(e) {
|
|
228
|
+
const a = e, { $t: n, formatDate: y } = U(), c = g(() => ({
|
|
229
|
+
"invoice_preview.total_due_today_heading": n({
|
|
230
|
+
defaultMessage: "Total",
|
|
231
|
+
id: "pay_invoice.order_summary.total_heading",
|
|
232
|
+
description: 'Heading of the invoice total in the order summary of the pay invoice screen, replacing the shared preview’s "Total due today"'
|
|
233
|
+
})
|
|
234
|
+
})), s = g(() => a.invoice.open_invoice_amount), l = (m) => m.startsWith("-") ? m.slice(1) : `-${m}`, o = g(() => {
|
|
235
|
+
const m = a.invoice.tax_summary.total_amount, f = s.value;
|
|
236
|
+
if (!(a.isPaid || a.invoice.paid || !f) && Number(f.quantity) !== Number(m.quantity))
|
|
237
|
+
return Ne(
|
|
238
|
+
[m, { ...f, quantity: l(f.quantity) }],
|
|
239
|
+
a.invoice.billing_currency
|
|
240
|
+
);
|
|
241
|
+
});
|
|
242
|
+
return (m, f) => (u(), p(t(N), {
|
|
243
|
+
class: "sv-order-summary sv-invoice-order-summary",
|
|
244
|
+
"no-border": "",
|
|
245
|
+
"no-spacing": "",
|
|
246
|
+
"content-background": "none",
|
|
247
|
+
title: t(n)({
|
|
248
|
+
defaultMessage: "Invoice summary",
|
|
249
|
+
id: "pay_invoice.order_summary.title",
|
|
250
|
+
description: "Title of the block listing what the invoice being paid is for"
|
|
251
|
+
})
|
|
252
|
+
}, {
|
|
253
|
+
default: i(() => [
|
|
254
|
+
O("div", We, [
|
|
255
|
+
r(t(N), {
|
|
256
|
+
"no-spacing": "",
|
|
257
|
+
class: "sv-invoice-order-summary__invoice"
|
|
258
|
+
}, {
|
|
259
|
+
default: i(() => [
|
|
260
|
+
O("div", Ze, [
|
|
261
|
+
O("div", Ke, [
|
|
262
|
+
r(t(I), {
|
|
263
|
+
variant: "body",
|
|
264
|
+
weight: "semibold",
|
|
265
|
+
"no-spacing": "",
|
|
266
|
+
class: "truncate"
|
|
267
|
+
}, {
|
|
268
|
+
default: i(() => [
|
|
269
|
+
T(k(t(n)(
|
|
270
|
+
{
|
|
271
|
+
defaultMessage: "Invoice {number}",
|
|
272
|
+
id: "pay_invoice.order_summary.invoice_number",
|
|
273
|
+
description: "Names the invoice being paid at the top of its order summary"
|
|
274
|
+
},
|
|
275
|
+
{ number: e.invoice.invoice_number }
|
|
276
|
+
)), 1)
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}),
|
|
280
|
+
e.invoice.due_date ? (u(), p(t(I), {
|
|
281
|
+
key: 0,
|
|
282
|
+
variant: "body-xs",
|
|
283
|
+
color: "subtle",
|
|
284
|
+
"no-spacing": "",
|
|
285
|
+
class: "sv-invoice-order-summary__due-date"
|
|
286
|
+
}, {
|
|
287
|
+
default: i(() => [
|
|
288
|
+
T(k(t(n)(
|
|
289
|
+
{
|
|
290
|
+
defaultMessage: "Due on {date}",
|
|
291
|
+
id: "pay_invoice.order_summary.due_date",
|
|
292
|
+
description: "When the invoice being paid is due, under its number in the order summary"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
date: t(y)({
|
|
296
|
+
date: e.invoice.due_date,
|
|
297
|
+
format: "date",
|
|
298
|
+
timezone: t(De)(e.invoice),
|
|
299
|
+
offsetType: "offsetted"
|
|
300
|
+
})
|
|
301
|
+
}
|
|
302
|
+
)), 1)
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
})) : M("", !0)
|
|
306
|
+
])
|
|
307
|
+
])
|
|
308
|
+
]),
|
|
309
|
+
_: 1
|
|
310
|
+
}),
|
|
311
|
+
r($e, { messages: c.value }, {
|
|
312
|
+
default: i(() => [
|
|
313
|
+
r(de, {
|
|
314
|
+
invoice: e.invoice,
|
|
315
|
+
"is-paid": e.isPaid
|
|
316
|
+
}, {
|
|
317
|
+
default: i(() => [
|
|
318
|
+
o.value && s.value ? (u(), E(R, { key: 0 }, [
|
|
319
|
+
O("div", Ge, [
|
|
320
|
+
r(t(I), {
|
|
321
|
+
tag: "span",
|
|
322
|
+
variant: "body-xs",
|
|
323
|
+
class: "grow"
|
|
324
|
+
}, {
|
|
325
|
+
default: i(() => [
|
|
326
|
+
T(k(t(n)({
|
|
327
|
+
defaultMessage: "Already paid",
|
|
328
|
+
id: "pay_invoice.order_summary.already_paid",
|
|
329
|
+
description: "What has been paid on the invoice so far, in its order summary"
|
|
330
|
+
})), 1)
|
|
331
|
+
]),
|
|
332
|
+
_: 1
|
|
333
|
+
}),
|
|
334
|
+
r(t(I), {
|
|
335
|
+
tag: "span",
|
|
336
|
+
variant: "body-xs"
|
|
337
|
+
}, {
|
|
338
|
+
default: i(() => [
|
|
339
|
+
r(t(Z), { value: o.value }, null, 8, ["value"])
|
|
340
|
+
]),
|
|
341
|
+
_: 1
|
|
342
|
+
})
|
|
343
|
+
]),
|
|
344
|
+
r(t(Ee), { spacing: "xxs" }),
|
|
345
|
+
O("div", Je, [
|
|
346
|
+
r(t(I), {
|
|
347
|
+
tag: "span",
|
|
348
|
+
variant: "body-sm",
|
|
349
|
+
weight: "semibold",
|
|
350
|
+
class: "grow"
|
|
351
|
+
}, {
|
|
352
|
+
default: i(() => [
|
|
353
|
+
T(k(t(n)({
|
|
354
|
+
defaultMessage: "Amount due",
|
|
355
|
+
id: "pay_invoice.order_summary.amount_due",
|
|
356
|
+
description: "What is still to be paid on the invoice, in its order summary"
|
|
357
|
+
})), 1)
|
|
358
|
+
]),
|
|
359
|
+
_: 1
|
|
360
|
+
}),
|
|
361
|
+
r(t(I), {
|
|
362
|
+
tag: "span",
|
|
363
|
+
variant: "body-sm",
|
|
364
|
+
weight: "semibold"
|
|
365
|
+
}, {
|
|
366
|
+
default: i(() => [
|
|
367
|
+
r(t(Z), { value: s.value }, null, 8, ["value"])
|
|
368
|
+
]),
|
|
369
|
+
_: 1
|
|
370
|
+
})
|
|
371
|
+
])
|
|
372
|
+
], 64)) : M("", !0)
|
|
373
|
+
]),
|
|
374
|
+
_: 1
|
|
375
|
+
}, 8, ["invoice", "is-paid"])
|
|
376
|
+
]),
|
|
377
|
+
_: 1
|
|
378
|
+
}, 8, ["messages"])
|
|
379
|
+
])
|
|
380
|
+
]),
|
|
381
|
+
_: 1
|
|
382
|
+
}, 8, ["title"]));
|
|
383
|
+
}
|
|
384
|
+
}), Xe = {
|
|
385
|
+
key: 1,
|
|
386
|
+
class: "grid grid-cols-1 gap-6"
|
|
387
|
+
}, et = ["aria-label"], tt = ["inert"], at = { class: "mt-4" }, nt = {
|
|
388
|
+
key: 0,
|
|
389
|
+
class: "flex flex-col gap-2"
|
|
390
|
+
}, ot = /* @__PURE__ */ $({
|
|
161
391
|
__name: "PayInvoice",
|
|
162
392
|
props: {
|
|
163
393
|
invoice: { type: Object },
|
|
164
394
|
paymentMethodOptions: { type: Array },
|
|
395
|
+
paymentMethods: { default: () => [], type: Array },
|
|
165
396
|
paymentAttempts: { default: () => [], type: Array },
|
|
166
397
|
countryCode: { type: String },
|
|
167
398
|
amount: { type: Object },
|
|
@@ -172,53 +403,106 @@ const me = /* @__PURE__ */ x({
|
|
|
172
403
|
error: { type: null }
|
|
173
404
|
},
|
|
174
405
|
setup(e) {
|
|
175
|
-
const { $t:
|
|
176
|
-
paymentMethodOptions: () =>
|
|
177
|
-
isLoading: () =>
|
|
406
|
+
const { $t: a } = U(), n = e, { availability: y } = Se({
|
|
407
|
+
paymentMethodOptions: () => n.paymentMethodOptions,
|
|
408
|
+
isLoading: () => n.isLoading,
|
|
178
409
|
context: () => {
|
|
179
|
-
var
|
|
180
|
-
return { invoiceId: (
|
|
410
|
+
var d;
|
|
411
|
+
return { invoiceId: (d = n.invoice) == null ? void 0 : d.id };
|
|
181
412
|
}
|
|
182
|
-
}),
|
|
183
|
-
|
|
184
|
-
|
|
413
|
+
}), c = w(), s = w(!0), l = w(), o = w(!1), { isFormHeld: m, handleActionRequired: f } = Oe(o), S = w(!1), C = w(!1), _ = g(
|
|
414
|
+
() => Ve(n.paymentMethods, n.paymentMethodOptions ?? [])
|
|
415
|
+
), b = w();
|
|
416
|
+
ne(
|
|
417
|
+
_,
|
|
418
|
+
(d) => {
|
|
419
|
+
b.value || (b.value = ze(
|
|
420
|
+
d.map(({ paymentMethod: v }) => v)
|
|
421
|
+
));
|
|
422
|
+
},
|
|
423
|
+
{ immediate: !0 }
|
|
424
|
+
);
|
|
425
|
+
const P = g(
|
|
426
|
+
() => _.value.find(
|
|
427
|
+
({ paymentMethod: d }) => d.id === b.value
|
|
428
|
+
)
|
|
429
|
+
), D = (d) => {
|
|
430
|
+
c.value = d, d.isAutomatic || (b.value = void 0);
|
|
431
|
+
}, h = g(
|
|
432
|
+
() => a({
|
|
433
|
+
id: "pay_invoice.stored_payment_methods.title",
|
|
434
|
+
defaultMessage: "Your payment methods",
|
|
435
|
+
description: "Section title above the payment methods the customer stored before, on the pay invoice screen"
|
|
436
|
+
})
|
|
437
|
+
), { charge: j } = qe(), x = w(!1), F = w(), J = async () => {
|
|
438
|
+
const d = P.value;
|
|
439
|
+
if (!d || !n.invoice || !n.amount) return;
|
|
440
|
+
o.value = !0, x.value = !1;
|
|
441
|
+
const v = await j({
|
|
442
|
+
paymentAcceptorId: d.paymentAcceptorId,
|
|
443
|
+
customerId: n.invoice.customer.id,
|
|
444
|
+
paymentMethodId: d.paymentMethod.id,
|
|
445
|
+
invoiceId: n.invoice.id,
|
|
446
|
+
amount: n.amount
|
|
447
|
+
});
|
|
448
|
+
if (v === "SUCCEEDED") {
|
|
449
|
+
V();
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
if (o.value = !1, v === "UNCONFIRMED") {
|
|
453
|
+
C.value = !0, F.value = xe({
|
|
454
|
+
code: "PAYMENT_OUTCOME_UNCONFIRMED",
|
|
455
|
+
message: "The charge to the stored payment method could not be confirmed"
|
|
456
|
+
});
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
x.value = !0;
|
|
460
|
+
};
|
|
461
|
+
function Q() {
|
|
462
|
+
if (P.value) {
|
|
463
|
+
J();
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (!l.value)
|
|
185
467
|
throw new Error("payment integration form not found");
|
|
186
|
-
o.value = !0,
|
|
468
|
+
o.value = !0, l.value.submit();
|
|
187
469
|
}
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
470
|
+
const X = g(
|
|
471
|
+
() => !!(P.value || c.value) && !o.value && !C.value
|
|
472
|
+
), V = () => {
|
|
473
|
+
var d;
|
|
474
|
+
S.value = !0, o.value = !1, (d = n.refresh) == null || d.call(n), n.configuration.onPaymentSuccess && n.configuration.onPaymentSuccess();
|
|
475
|
+
}, ee = () => {
|
|
192
476
|
o.value = !1;
|
|
193
|
-
},
|
|
194
|
-
o.value = !1, (
|
|
477
|
+
}, te = (d) => {
|
|
478
|
+
o.value = !1, (d == null ? void 0 : d.code) === "PAYMENT_OUTCOME_UNCONFIRMED" && (C.value = !0);
|
|
195
479
|
};
|
|
196
|
-
return (
|
|
480
|
+
return (d, v) => (u(), p(t(Me), null, {
|
|
197
481
|
header: i(() => [
|
|
198
|
-
|
|
482
|
+
r(L, { class: "min-h-[52px] w-96" }, {
|
|
199
483
|
default: i(() => [
|
|
200
|
-
e.invoice && e.downloadService ? (
|
|
484
|
+
e.invoice && e.downloadService ? (u(), p(t(ue), {
|
|
201
485
|
key: 0,
|
|
202
486
|
invoice: e.invoice,
|
|
203
487
|
"payment-attempts": e.paymentAttempts,
|
|
204
488
|
"download-service": () => e.downloadService(e.invoice)
|
|
205
|
-
}, null, 8, ["invoice", "payment-attempts", "download-service"])) :
|
|
489
|
+
}, null, 8, ["invoice", "payment-attempts", "download-service"])) : M("", !0)
|
|
206
490
|
]),
|
|
207
491
|
_: 1
|
|
208
492
|
})
|
|
209
493
|
]),
|
|
210
494
|
content: i(() => {
|
|
211
|
-
var
|
|
495
|
+
var z, H;
|
|
212
496
|
return [
|
|
213
|
-
e.isLoading ? (
|
|
497
|
+
e.isLoading ? (u(), p(L, {
|
|
214
498
|
key: 0,
|
|
215
499
|
variant: "section",
|
|
216
500
|
class: "min-h-[300px]"
|
|
217
|
-
})) :
|
|
218
|
-
(
|
|
501
|
+
})) : M("", !0),
|
|
502
|
+
(z = e.invoice) != null && z.paid || e.invoice && S.value ? (u(), p(W, {
|
|
219
503
|
key: 1,
|
|
220
504
|
status: "success",
|
|
221
|
-
title:
|
|
505
|
+
title: t(a)({
|
|
222
506
|
id: "pay_invoice.paid.title",
|
|
223
507
|
defaultMessage: "Thank you for your payment!",
|
|
224
508
|
description: "Title shown when the invoice has already been paid"
|
|
@@ -226,34 +510,34 @@ const me = /* @__PURE__ */ x({
|
|
|
226
510
|
class: "mt-8"
|
|
227
511
|
}, {
|
|
228
512
|
default: i(() => [
|
|
229
|
-
|
|
513
|
+
r(t(I), {
|
|
230
514
|
variant: "body-sm",
|
|
231
515
|
class: "mt-1"
|
|
232
516
|
}, {
|
|
233
517
|
default: i(() => [
|
|
234
|
-
|
|
235
|
-
|
|
518
|
+
r(t(se), { icon: "check" }),
|
|
519
|
+
T(k(t(B)(e.invoice.tax_summary.total_amount)), 1)
|
|
236
520
|
]),
|
|
237
521
|
_: 1
|
|
238
522
|
})
|
|
239
523
|
]),
|
|
240
524
|
_: 1
|
|
241
|
-
}, 8, ["title"])) : e.error ? (
|
|
525
|
+
}, 8, ["title"])) : e.error ? (u(), p(W, {
|
|
242
526
|
key: 2,
|
|
243
527
|
status: "error",
|
|
244
|
-
title:
|
|
528
|
+
title: t(a)({
|
|
245
529
|
id: "pay_invoice.error.title",
|
|
246
530
|
defaultMessage: "Something went wrong",
|
|
247
531
|
description: "Title shown when the invoice payment fails to load"
|
|
248
532
|
})
|
|
249
533
|
}, {
|
|
250
534
|
default: i(() => [
|
|
251
|
-
|
|
535
|
+
r(t(I), {
|
|
252
536
|
variant: "body-sm",
|
|
253
537
|
class: "mt-1"
|
|
254
538
|
}, {
|
|
255
539
|
default: i(() => [
|
|
256
|
-
|
|
540
|
+
T(k(t(a)({
|
|
257
541
|
id: "pay_invoice.error.description",
|
|
258
542
|
defaultMessage: "Please try again or contact support.",
|
|
259
543
|
description: "Body text shown when the invoice payment fails to load"
|
|
@@ -263,126 +547,188 @@ const me = /* @__PURE__ */ x({
|
|
|
263
547
|
})
|
|
264
548
|
]),
|
|
265
549
|
_: 1
|
|
266
|
-
}, 8, ["title"])) : !e.isLoading && e.countryCode && e.amount && e.invoice ? (
|
|
267
|
-
|
|
550
|
+
}, 8, ["title"])) : !e.isLoading && e.countryCode && e.amount && e.invoice ? (u(), E(R, { key: 3 }, [
|
|
551
|
+
t(y) === "READY" && F.value ? (u(), p(Le, {
|
|
268
552
|
key: 0,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
553
|
+
class: "sv-pay-invoice__stored-payment-unconfirmed",
|
|
554
|
+
error: F.value
|
|
555
|
+
}, null, 8, ["error"])) : t(y) === "READY" ? (u(), E("div", Xe, [
|
|
556
|
+
_.value.length ? (u(), E(R, { key: 0 }, [
|
|
557
|
+
r(t(N), {
|
|
558
|
+
class: "sv-pay-invoice__stored-payment-methods",
|
|
559
|
+
title: h.value,
|
|
560
|
+
"content-background": "none",
|
|
561
|
+
"no-border": "",
|
|
562
|
+
"no-spacing": ""
|
|
563
|
+
}, {
|
|
564
|
+
default: i(() => [
|
|
565
|
+
O("div", {
|
|
566
|
+
role: "group",
|
|
567
|
+
"aria-label": h.value
|
|
568
|
+
}, [
|
|
569
|
+
r(be, {
|
|
570
|
+
modelValue: b.value,
|
|
571
|
+
"onUpdate:modelValue": v[0] || (v[0] = (A) => b.value = A),
|
|
572
|
+
"payment-methods": _.value.map(
|
|
573
|
+
({ paymentMethod: A }) => A
|
|
574
|
+
),
|
|
575
|
+
"show-add-option": !1,
|
|
576
|
+
disabled: o.value || t(m)
|
|
577
|
+
}, null, 8, ["modelValue", "payment-methods", "disabled"])
|
|
578
|
+
], 8, et)
|
|
579
|
+
]),
|
|
580
|
+
_: 1
|
|
581
|
+
}, 8, ["title"]),
|
|
582
|
+
x.value ? (u(), p(t(me), {
|
|
583
|
+
key: 0,
|
|
584
|
+
class: "sv-pay-invoice__stored-payment-error sv-error",
|
|
585
|
+
title: t(a)({
|
|
586
|
+
id: "pay_invoice.stored_payment_method.failed",
|
|
587
|
+
defaultMessage: "The payment did not go through. Try again or use another payment method.",
|
|
588
|
+
description: "Shown when charging the invoice to a stored payment method fails"
|
|
589
|
+
})
|
|
590
|
+
}, null, 8, ["title"])) : M("", !0),
|
|
591
|
+
r(t(le), {
|
|
592
|
+
text: t(a)({
|
|
593
|
+
id: "pay_invoice.stored_payment_methods.divider_text",
|
|
594
|
+
defaultMessage: "or",
|
|
595
|
+
description: "Between the stored payment methods and the form to pay with a new one"
|
|
596
|
+
}),
|
|
597
|
+
"text-position": "center"
|
|
598
|
+
}, null, 8, ["text"])
|
|
599
|
+
], 64)) : M("", !0),
|
|
600
|
+
r(t(N), {
|
|
601
|
+
title: _.value.length ? t(a)({
|
|
602
|
+
id: "pay_invoice.new_payment_method.title",
|
|
603
|
+
defaultMessage: "Pay with a new payment method",
|
|
604
|
+
description: "Section title for the payment form below the stored payment methods, on the pay invoice screen"
|
|
605
|
+
}) : t(a)({
|
|
606
|
+
id: "pay_invoice.payment_methods.title",
|
|
607
|
+
defaultMessage: "Payment methods",
|
|
608
|
+
description: "Section title for the payment method selector on the pay invoice screen"
|
|
609
|
+
}),
|
|
610
|
+
"content-background": "none",
|
|
611
|
+
"no-border": "",
|
|
612
|
+
"no-spacing": ""
|
|
613
|
+
}, {
|
|
614
|
+
default: i(() => {
|
|
615
|
+
var A, Y;
|
|
616
|
+
return [
|
|
617
|
+
O("div", {
|
|
618
|
+
class: oe({ "pointer-events-none opacity-60": t(m) }),
|
|
619
|
+
inert: t(m) || void 0
|
|
620
|
+
}, [
|
|
621
|
+
r(Ae, {
|
|
622
|
+
ref_key: "paymentIntegrationFormRef",
|
|
623
|
+
ref: l,
|
|
624
|
+
amount: e.amount,
|
|
625
|
+
"country-code": e.countryCode,
|
|
626
|
+
context: {
|
|
627
|
+
type: "INVOICE",
|
|
628
|
+
related_resource_ids: [
|
|
629
|
+
{
|
|
630
|
+
type: "INVOICE",
|
|
631
|
+
id: e.invoice.id
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
"customer-id": e.invoice.customer.id,
|
|
636
|
+
"store-payment-method": s.value,
|
|
637
|
+
"invoice-id": e.invoice.id,
|
|
638
|
+
"payment-method-options": e.paymentMethodOptions ?? [],
|
|
639
|
+
"open-first-payment-method": !_.value.length,
|
|
640
|
+
variant: "AUTHORIZE",
|
|
641
|
+
"billing-entity-name": (Y = (A = e.invoice) == null ? void 0 : A.billing_entity) == null ? void 0 : Y.legal_name,
|
|
642
|
+
onPaymentSuccess: V,
|
|
643
|
+
onPaymentFailed: te,
|
|
644
|
+
onInvalid: ee,
|
|
645
|
+
onSubmitting: v[1] || (v[1] = (q) => o.value = !0),
|
|
646
|
+
onActionRequired: t(f),
|
|
647
|
+
onSelect: D
|
|
648
|
+
}, null, 8, ["amount", "country-code", "context", "customer-id", "store-payment-method", "invoice-id", "payment-method-options", "open-first-payment-method", "billing-entity-name", "onActionRequired"]),
|
|
649
|
+
O("div", at, [
|
|
650
|
+
r(t(ce), {
|
|
651
|
+
id: "pay-invoice-store-payment-method",
|
|
652
|
+
modelValue: s.value,
|
|
653
|
+
"onUpdate:modelValue": v[2] || (v[2] = (q) => s.value = q),
|
|
654
|
+
label: t(a)({
|
|
655
|
+
id: "pay_invoice.store_payment_method.label",
|
|
656
|
+
defaultMessage: "Save this payment method for future payments",
|
|
657
|
+
description: "Label of the checkbox that stores the payment method while paying an invoice"
|
|
658
|
+
})
|
|
659
|
+
}, null, 8, ["modelValue", "label"])
|
|
660
|
+
])
|
|
661
|
+
], 10, tt)
|
|
662
|
+
];
|
|
663
|
+
}),
|
|
664
|
+
_: 1
|
|
665
|
+
}, 8, ["title"])
|
|
666
|
+
])) : (u(), p(Ie, {
|
|
667
|
+
key: 2,
|
|
329
668
|
variant: "AUTHORIZE",
|
|
330
|
-
"seller-name": (
|
|
669
|
+
"seller-name": (H = e.invoice.billing_entity) == null ? void 0 : H.legal_name
|
|
331
670
|
}, {
|
|
332
671
|
default: i(() => [
|
|
333
|
-
e.downloadService ? (
|
|
672
|
+
e.downloadService ? (u(), p(t(G), {
|
|
334
673
|
key: 0,
|
|
335
674
|
type: "button",
|
|
336
675
|
intent: "secondary",
|
|
337
676
|
onClick: v[3] || (v[3] = () => {
|
|
338
|
-
var
|
|
339
|
-
return (
|
|
677
|
+
var A;
|
|
678
|
+
return (A = e.downloadService) == null ? void 0 : A.call(e, e.invoice);
|
|
340
679
|
})
|
|
341
680
|
}, {
|
|
342
681
|
default: i(() => [
|
|
343
|
-
|
|
682
|
+
T(k(t(a)({
|
|
344
683
|
defaultMessage: "Download invoice",
|
|
345
684
|
description: "Button that downloads the invoice when it cannot be paid online",
|
|
346
685
|
id: "pay_invoice.unavailable.download_invoice"
|
|
347
686
|
})), 1)
|
|
348
687
|
]),
|
|
349
688
|
_: 1
|
|
350
|
-
})) :
|
|
689
|
+
})) : M("", !0)
|
|
351
690
|
]),
|
|
352
691
|
_: 1
|
|
353
692
|
}, 8, ["seller-name"]))
|
|
354
|
-
], 64)) :
|
|
693
|
+
], 64)) : M("", !0)
|
|
355
694
|
];
|
|
356
695
|
}),
|
|
357
696
|
aside: i(() => [
|
|
358
|
-
|
|
697
|
+
r(L, {
|
|
359
698
|
variant: "section",
|
|
360
699
|
class: "min-h-[200px]"
|
|
361
700
|
}, {
|
|
362
701
|
default: i(() => [
|
|
363
|
-
e.invoice ? (
|
|
702
|
+
e.invoice ? (u(), p(Qe, {
|
|
364
703
|
key: 0,
|
|
365
|
-
invoice: e.invoice
|
|
366
|
-
|
|
704
|
+
invoice: e.invoice,
|
|
705
|
+
"is-paid": e.invoice.paid || S.value
|
|
706
|
+
}, null, 8, ["invoice", "is-paid"])) : M("", !0)
|
|
367
707
|
]),
|
|
368
708
|
_: 1
|
|
369
709
|
}),
|
|
370
|
-
e.invoice && !e.invoice.paid && !
|
|
371
|
-
|
|
372
|
-
disabled: !
|
|
710
|
+
e.invoice && !e.invoice.paid && !S.value && t(y) === "READY" ? (u(), E("div", nt, [
|
|
711
|
+
r(Ye, {
|
|
712
|
+
disabled: !X.value,
|
|
373
713
|
loading: o.value,
|
|
374
714
|
amount: e.amount,
|
|
375
|
-
"payment-method":
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
715
|
+
"payment-method": P.value ? void 0 : c.value,
|
|
716
|
+
"payment-method-label": P.value && t(He)(P.value.paymentMethod),
|
|
717
|
+
onClick: Q
|
|
718
|
+
}, null, 8, ["disabled", "loading", "amount", "payment-method", "payment-method-label"]),
|
|
719
|
+
r(Fe, {
|
|
720
|
+
class: "sv-pay-invoice__kpi",
|
|
721
|
+
"payment-method-options": e.paymentMethodOptions ?? []
|
|
722
|
+
}, null, 8, ["payment-method-options"])
|
|
723
|
+
])) : M("", !0)
|
|
379
724
|
]),
|
|
380
725
|
_: 1
|
|
381
726
|
}));
|
|
382
727
|
}
|
|
383
|
-
}),
|
|
728
|
+
}), it = /* @__PURE__ */ $({
|
|
384
729
|
__name: "PayInvoice.entry.view",
|
|
385
730
|
props: {
|
|
731
|
+
portalToken: { type: Object },
|
|
386
732
|
environment: { type: String },
|
|
387
733
|
locale: { type: String },
|
|
388
734
|
dateLocale: { type: String },
|
|
@@ -400,45 +746,51 @@ const me = /* @__PURE__ */ x({
|
|
|
400
746
|
configuration: { type: Object }
|
|
401
747
|
},
|
|
402
748
|
setup(e) {
|
|
403
|
-
const
|
|
404
|
-
invoice:
|
|
405
|
-
get:
|
|
406
|
-
downloadInvoicePdf:
|
|
407
|
-
error:
|
|
408
|
-
} =
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
749
|
+
const a = e, {
|
|
750
|
+
invoice: n,
|
|
751
|
+
get: y,
|
|
752
|
+
downloadInvoicePdf: c,
|
|
753
|
+
error: s
|
|
754
|
+
} = ye({ invoiceId: a.configuration.invoiceId }), { payments: l, get: o } = pe(), { paymentMethodOptions: m, get: f } = we(), { items: S, fetchAll: C } = Ue({
|
|
755
|
+
customerId: a.portalObject.customer_id,
|
|
756
|
+
order: je
|
|
757
|
+
}), _ = async () => {
|
|
758
|
+
const h = await y();
|
|
759
|
+
await f({
|
|
760
|
+
customerId: h.customer.id,
|
|
761
|
+
invoiceId: h.id,
|
|
762
|
+
amount: h.open_invoice_amount
|
|
414
763
|
});
|
|
415
|
-
}, { isLoading:
|
|
416
|
-
|
|
417
|
-
o(
|
|
418
|
-
|
|
764
|
+
}, { isLoading: b } = Be(
|
|
765
|
+
_(),
|
|
766
|
+
o(a.configuration.invoiceId),
|
|
767
|
+
C()
|
|
768
|
+
), P = () => Promise.allSettled([y(), o(a.configuration.invoiceId)]), D = g(
|
|
419
769
|
() => {
|
|
420
|
-
var
|
|
421
|
-
return (
|
|
770
|
+
var h;
|
|
771
|
+
return (h = n.value) != null && h.customer ? Re(n.value.customer) : void 0;
|
|
422
772
|
}
|
|
423
773
|
);
|
|
424
|
-
return (
|
|
425
|
-
var
|
|
426
|
-
return
|
|
427
|
-
invoice: n
|
|
428
|
-
isLoading:
|
|
429
|
-
amount: (
|
|
430
|
-
countryCode:
|
|
431
|
-
paymentMethodOptions:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
774
|
+
return (h, j) => {
|
|
775
|
+
var x;
|
|
776
|
+
return ie(h.$slots, "default", {
|
|
777
|
+
invoice: t(n),
|
|
778
|
+
isLoading: t(b),
|
|
779
|
+
amount: (x = t(n)) == null ? void 0 : x.open_invoice_amount,
|
|
780
|
+
countryCode: D.value,
|
|
781
|
+
paymentMethodOptions: t(m),
|
|
782
|
+
paymentMethods: t(S),
|
|
783
|
+
paymentAttempts: t(l),
|
|
784
|
+
downloadService: t(c),
|
|
785
|
+
refresh: P,
|
|
786
|
+
error: t(s)
|
|
436
787
|
});
|
|
437
788
|
};
|
|
438
789
|
}
|
|
439
|
-
}),
|
|
790
|
+
}), rt = /* @__PURE__ */ $({
|
|
440
791
|
__name: "PayInvoice.entry",
|
|
441
792
|
props: {
|
|
793
|
+
portalToken: { type: Object },
|
|
442
794
|
environment: { type: String },
|
|
443
795
|
locale: { type: String },
|
|
444
796
|
dateLocale: { type: String },
|
|
@@ -456,43 +808,45 @@ const me = /* @__PURE__ */ x({
|
|
|
456
808
|
configuration: { type: Object }
|
|
457
809
|
},
|
|
458
810
|
setup(e) {
|
|
459
|
-
const
|
|
460
|
-
return (
|
|
461
|
-
var
|
|
462
|
-
return
|
|
463
|
-
entry:
|
|
464
|
-
"component-name":
|
|
811
|
+
const a = he("pay-invoice");
|
|
812
|
+
return (n, y) => {
|
|
813
|
+
var c;
|
|
814
|
+
return u(), p(t(fe), {
|
|
815
|
+
entry: n.$props,
|
|
816
|
+
"component-name": t(a),
|
|
465
817
|
"allowed-portal-types": ["CUSTOMER"],
|
|
466
|
-
"required-configuration": { invoiceId: (
|
|
467
|
-
onError:
|
|
818
|
+
"required-configuration": { invoiceId: (c = e.configuration) == null ? void 0 : c.invoiceId },
|
|
819
|
+
onError: y[0] || (y[0] = (s) => n.$emit("error", s))
|
|
468
820
|
}, {
|
|
469
821
|
default: i(() => [
|
|
470
|
-
(
|
|
822
|
+
(u(), p(it, K({
|
|
471
823
|
key: e.configuration.invoiceId
|
|
472
|
-
},
|
|
824
|
+
}, n.$props), {
|
|
473
825
|
default: i(({
|
|
474
|
-
invoice:
|
|
475
|
-
isLoading:
|
|
826
|
+
invoice: s,
|
|
827
|
+
isLoading: l,
|
|
476
828
|
amount: o,
|
|
477
|
-
countryCode:
|
|
478
|
-
paymentMethodOptions:
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
829
|
+
countryCode: m,
|
|
830
|
+
paymentMethodOptions: f,
|
|
831
|
+
paymentMethods: S,
|
|
832
|
+
paymentAttempts: C,
|
|
833
|
+
downloadService: _,
|
|
834
|
+
refresh: b,
|
|
835
|
+
error: P
|
|
483
836
|
}) => [
|
|
484
|
-
|
|
485
|
-
"is-loading":
|
|
486
|
-
invoice:
|
|
837
|
+
r(ot, {
|
|
838
|
+
"is-loading": l,
|
|
839
|
+
invoice: s,
|
|
487
840
|
amount: o,
|
|
488
|
-
"country-code":
|
|
489
|
-
"payment-method-options":
|
|
841
|
+
"country-code": m,
|
|
842
|
+
"payment-method-options": f,
|
|
843
|
+
"payment-methods": S,
|
|
490
844
|
configuration: e.configuration,
|
|
491
|
-
"payment-attempts":
|
|
492
|
-
"download-service":
|
|
493
|
-
refresh:
|
|
494
|
-
error:
|
|
495
|
-
}, null, 8, ["is-loading", "invoice", "amount", "country-code", "payment-method-options", "configuration", "payment-attempts", "download-service", "refresh", "error"])
|
|
845
|
+
"payment-attempts": C ?? [],
|
|
846
|
+
"download-service": _,
|
|
847
|
+
refresh: b,
|
|
848
|
+
error: P
|
|
849
|
+
}, null, 8, ["is-loading", "invoice", "amount", "country-code", "payment-method-options", "payment-methods", "configuration", "payment-attempts", "download-service", "refresh", "error"])
|
|
496
850
|
]),
|
|
497
851
|
_: 1
|
|
498
852
|
}, 16))
|
|
@@ -501,10 +855,10 @@ const me = /* @__PURE__ */ x({
|
|
|
501
855
|
}, 8, ["entry", "component-name", "required-configuration"]);
|
|
502
856
|
};
|
|
503
857
|
}
|
|
504
|
-
}), { define:
|
|
505
|
-
|
|
858
|
+
}), { define: Ft } = ge(
|
|
859
|
+
rt,
|
|
506
860
|
"pay-invoice"
|
|
507
861
|
);
|
|
508
862
|
export {
|
|
509
|
-
|
|
863
|
+
Ft as defineSolvimonPayInvoice
|
|
510
864
|
};
|