@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.
Files changed (189) hide show
  1. package/README.md +26 -1
  2. package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
  3. package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
  4. package/dist/{Avatar.vue.es-Beg7umjO.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +8 -8
  6. package/dist/{Button.vue.es-rh6mITmN.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
  7. package/dist/{ChargeOnDemandModal-CPjPa_uq.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +35 -34
  8. package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
  9. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
  10. package/dist/{Chip.vue.es-Cn2R_0mE.mjs → Chip.vue.es-D3UDSyXC.mjs} +3 -3
  11. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
  12. package/dist/{ContextMenu.vue.es-DRxsa7bZ.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
  13. package/dist/{CustomerBillingInformation.vue.es-DQfL5RMR.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
  14. 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
  15. package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
  16. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs} +798 -792
  17. package/dist/{DividerText.vue.es-M0XqSz55.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
  18. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
  19. package/dist/{ErrorNotification.vue.es-CKlt4hr2.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
  20. package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
  21. package/dist/{IconButton.vue.es-oe4MVBK1.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
  22. package/dist/{IconTitle.vue.es-BO6KBS4v.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
  23. package/dist/{Input.vue.es-DAlPmtE_.mjs → Input.vue.es-D8Oj8MWv.mjs} +23 -22
  24. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +2 -2
  25. 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
  26. package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
  27. package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
  28. package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
  29. package/dist/{Modal.vue.es-CTNACAst.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
  30. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
  31. package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
  32. 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
  33. 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
  34. package/dist/{PaymentHistoryBlock-BmA8jbMb.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
  35. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +4 -4
  36. package/dist/{PaymentIntegrationForm-D1Xw-xIt.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
  37. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs} +68 -69
  38. package/dist/{PaymentIntegrationFormAdyen-CfT5aD4L.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +126 -117
  39. package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs} +193 -179
  40. package/dist/{PaymentMethod.vue.es-Cauxx4Xr.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
  41. package/dist/{PaymentMethodForm-CypZOYUZ.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
  42. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +7 -7
  43. package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs} +36 -35
  44. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +7 -7
  45. package/dist/{PlanCustomizationEditor-Xtww2r9K.mjs → PlanCustomizationEditor-D29N4HUM.mjs} +9 -9
  46. package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
  47. package/dist/{PortalNotAvailable-B_59GUwN.mjs → PortalNotAvailable-DPE9y37H.mjs} +2 -2
  48. package/dist/{PricingGroupRangeInput.vue.es-C9LJW3b8.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
  49. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +32 -32
  50. package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
  51. package/dist/{Section.vue.es-iS8hVGWA.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
  52. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
  53. package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
  54. package/dist/{StepInput.vue.es-Dpan1RQd.mjs → StepInput.vue.es-DweyzpkL.mjs} +4 -4
  55. package/dist/{SubscriptionDetails.entry.ce-DufQX3uI.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +230 -225
  56. package/dist/{SubscriptionSchedules-DAahcNoI.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
  57. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
  58. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs} +3 -3
  59. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +23 -22
  60. package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
  61. package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
  62. package/dist/{TrialChip.vue.es-B-XBSHWE.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
  63. package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
  64. package/dist/{cn.es-2bVdkiFV.mjs → cn.es-B8acFrov.mjs} +380 -476
  65. package/dist/components/BillingInformation/BillingInformation.mjs +9 -7
  66. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +57 -54
  67. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -18
  68. package/dist/components/Invoice/Invoice.mjs +2660 -193
  69. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +6 -4
  70. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +18 -17
  71. package/dist/components/InvoicesList/InvoicesList.mjs +13 -11
  72. package/dist/components/PaymentHistory/PaymentHistory.mjs +8 -6
  73. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +19 -17
  74. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +19 -17
  75. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +20 -18
  76. package/dist/components/WalletBalances/WalletBalances.mjs +17 -15
  77. package/dist/customElements-BTj4ii4f.mjs +5072 -0
  78. package/dist/{customer-CqddTiOr.mjs → customer-BIjC0CWJ.mjs} +1 -1
  79. package/dist/customer.es-DQKl6wFt.mjs +24 -0
  80. package/dist/{de-DE-BW8dMvhW.mjs → de-DE-DBbERiFr.mjs} +38 -0
  81. package/dist/{de-DE-BNMj3boy.mjs → de-DE-UJ6X6jXu.mjs} +1 -1
  82. package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
  83. package/dist/{formControl-CsITfsBk.mjs → formControl-BZQLHnOO.mjs} +5 -5
  84. package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
  85. package/dist/fr-FR-IWJE-urI.mjs +431 -0
  86. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
  87. package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
  88. package/dist/index.es-CpmQmvOg.mjs +633 -0
  89. package/dist/index.mjs +2 -2
  90. package/dist/{invoices-Cf1qDAv4.mjs → invoices-e1sKLgxg.mjs} +3 -3
  91. package/dist/{it-IT-Byg06KWc.mjs → it-IT-B7ui2oxO.mjs} +38 -0
  92. package/dist/{it-IT-DRvuxM1F.mjs → it-IT-DnJP5URH.mjs} +1 -1
  93. package/dist/{nl-NL-x3zQqzZ7.mjs → nl-NL-Bafh2xoT.mjs} +38 -0
  94. package/dist/{nl-NL-DLUwWbMG.mjs → nl-NL-q9xfTZF0.mjs} +1 -1
  95. package/dist/{paymentMethods-BUuOmDq9.mjs → paymentMethods-B_82JGk_.mjs} +2 -2
  96. package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
  97. package/dist/{paymentOutcome-D17VD4MV.mjs → paymentOutcome-BXEU5-84.mjs} +5 -5
  98. package/dist/payments-BnxbzQUC.mjs +68 -0
  99. package/dist/pricing-BOhvWWMj.mjs +29 -0
  100. package/dist/{pricingPlanScheduleOverrides-COr9F8DO.mjs → pricingPlanScheduleOverrides-Dxv5FOBd.mjs} +2 -2
  101. package/dist/{pricingPlanSchedules-BK_o9p6h.mjs → pricingPlanSchedules-Dv7ZCgNp.mjs} +1 -1
  102. package/dist/screens/Checkout/Checkout.mjs +2 -2
  103. package/dist/screens/CustomerOverview/CustomerOverview.mjs +128 -83
  104. package/dist/screens/PayInvoice/PayInvoice.mjs +572 -218
  105. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +21 -19
  106. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  107. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +261 -266
  108. package/dist/{sorting.es-qtEN8J8T.mjs → sorting.es-CVyKw23D.mjs} +1 -1
  109. package/dist/subscriptions-BWXZGK0E.mjs +66 -0
  110. package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
  111. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -0
  112. package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
  113. package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
  114. package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
  115. package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
  116. package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
  117. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
  118. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +11 -0
  119. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +4 -1
  120. package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
  121. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +23 -1
  122. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
  123. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
  124. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  125. package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
  126. package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -1
  127. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
  128. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +2 -0
  129. package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
  130. package/dist/types/public/core/types.d.ts +5 -0
  131. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +3 -1
  132. package/dist/types/translations/supported.d.ts +1 -1
  133. package/dist/types/types/portalAuthentication.d.ts +2 -0
  134. package/dist/types/types/portalToken.d.ts +9 -0
  135. package/dist/types/types/shippingAddress.d.ts +9 -0
  136. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
  137. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
  138. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
  139. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
  140. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
  141. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
  142. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
  143. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
  144. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
  145. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
  146. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  147. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
  148. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
  149. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
  150. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
  151. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
  152. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
  153. package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
  154. package/dist/{useActionDispatchProvider-DC_fUykI.mjs → useActionDispatchProvider-3W2vEyIg.mjs} +1 -1
  155. package/dist/{useCustomer-C3kTh7wn.mjs → useCustomer-cObBvDOu.mjs} +2 -2
  156. package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
  157. package/dist/{useIncrementalLoading-C_sHmW7d.mjs → useIncrementalLoading-CATuO36d.mjs} +2 -2
  158. package/dist/{useInvoiceData-BIh8-h8b.mjs → useInvoiceData-DD44HTl7.mjs} +2 -2
  159. package/dist/{useInvoicesList-Y6p0Pqpy.mjs → useInvoicesList-CpB-41MQ.mjs} +10 -10
  160. package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
  161. package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
  162. package/dist/{usePaymentFormHold-FfNc578l.mjs → usePaymentFormHold-ByUZi3A-.mjs} +28 -36
  163. package/dist/{usePaymentMethodAvailability-CnYTvG15.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +4 -4
  164. package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
  165. package/dist/{usePayments-CykCZPG2.mjs → usePayments-BXABv-lF.mjs} +9 -9
  166. package/dist/{usePortal-CxzKGhbK.mjs → usePortal-CwR_FxTb.mjs} +1 -1
  167. package/dist/{useService-B0OQJmif.mjs → useService-BZcbUZHI.mjs} +3 -3
  168. package/dist/{useTimePeriod.es-JkXdHNWr.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
  169. package/package.json +7 -7
  170. package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +0 -50
  171. package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +0 -5279
  172. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
  173. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +0 -362
  174. package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
  175. package/dist/InvoiceSummary.vue.es-DbNoGfYN.mjs +0 -2596
  176. package/dist/RadioGroupExtended.vue.es-UtKsdmiv.mjs +0 -163
  177. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs +0 -688
  178. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs +0 -5221
  179. package/dist/TooltipParagraph.vue.es-BjCn2BF6.mjs +0 -129
  180. package/dist/customElements-Di3zwlEU.mjs +0 -6447
  181. package/dist/customer.es-B5ppZf0j.mjs +0 -20
  182. package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
  183. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
  184. package/dist/payments-Ci8bF4C6.mjs +0 -45
  185. package/dist/subscriptions-CwogJODR.mjs +0 -54
  186. package/dist/useCustomerFormLabels-CK7K50nB.mjs +0 -1369
  187. package/dist/useLoadInitialData-4k_Cyqef.mjs +0 -15
  188. package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +0 -40
  189. package/dist/usePaymentMethods-gvr-rmwE.mjs +0 -15
@@ -1,25 +1,53 @@
1
- import { defineComponent as x, computed as k, capitalize as q, openBlock as r, createBlock as l, unref as n, mergeProps as V, withCtx as i, createTextVNode as A, toDisplayString as I, ref as b, createVNode as f, createCommentVNode as P, createElementBlock as j, Fragment as D, createElementVNode as R, normalizeClass as H, renderSlot as W } from "vue";
2
- import { f as _ } from "../../formatting.es-RclXHhKo.mjs";
3
- import { _ as z, a as Y } from "../../Button.vue.es-rh6mITmN.mjs";
4
- import { _ as K } from "../../Checkbox.vue.es-DsyiJ-VY.mjs";
5
- import { _ as Z, u as G, a as J } from "../../usePayments-CykCZPG2.mjs";
6
- import { _ as Q } from "../../InvoiceSummary.vue.es-DbNoGfYN.mjs";
7
- import { _ as X } from "../../Section.vue.es-iS8hVGWA.mjs";
8
- import { a as U, _ as F, e as ee, g as te, f as ne } from "../../customElements-Di3zwlEU.mjs";
9
- import { C as ae } from "../../ContentWithAsideLayout-BCM8tmZN.mjs";
10
- import { _ as oe } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs";
11
- import { _ as $ } from "../../Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
12
- import { _ as N } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs";
13
- import { u as ie, _ as re } from "../../usePaymentMethodAvailability-CnYTvG15.mjs";
14
- import { u as ce } from "../../usePaymentFormHold-FfNc578l.mjs";
15
- import { g as se } from "../../customer.es-B5ppZf0j.mjs";
16
- import { u as le } from "../../useLoadInitialData-4k_Cyqef.mjs";
17
- import { u as ue } from "../../usePaymentMethodOptions-1QBcmgUf.mjs";
18
- const me = /* @__PURE__ */ x({
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 t = e, { $t: a } = U(), d = k(() => ({
38
- intent: t.intent ?? "primary",
39
- disabled: t.disabled,
40
- iconPrefix: t.iconPrefix,
41
- iconSuffix: t.iconSuffix,
42
- loading: t.loading,
43
- pill: t.pill,
44
- size: t.size ?? "lg",
45
- square: t.square,
46
- tag: t.tag,
47
- type: t.type
48
- })), u = k(() => {
49
- var s, o, y;
50
- switch ((s = t.paymentMethod) == null ? void 0 : s.paymentMethodType) {
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 a({
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 = t.paymentMethod) != null && o.paymentMethodType ? q((y = t.paymentMethod) == null ? void 0 : y.paymentMethodType) : "";
151
+ return (o = a.paymentMethod) != null && o.paymentMethodType ? ae((m = a.paymentMethod) == null ? void 0 : m.paymentMethodType) : "";
124
152
  }
125
- }), m = k(() => t.amount && t.paymentMethod ? a(
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: _(t.amount),
133
- type: u.value
160
+ amount: B(a.amount),
161
+ type: a.paymentMethodLabel ?? c.value
134
162
  }
135
- ) : t.amount ? a(
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: _(t.amount),
143
- type: u.value
170
+ amount: B(a.amount),
171
+ type: c.value
144
172
  }
145
- ) : a({
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 (s, o) => (r(), l(n(z), V(d.value, {
178
+ return (l, o) => (u(), p(t(G), K(y.value, {
151
179
  class: "w-full",
152
- onClick: o[0] || (o[0] = (y) => s.$emit("click", y))
180
+ onClick: o[0] || (o[0] = (m) => l.$emit("click", m))
153
181
  }), {
154
182
  default: i(() => [
155
- A(I(m.value), 1)
183
+ T(k(s.value), 1)
156
184
  ]),
157
185
  _: 1
158
186
  }, 16));
159
187
  }
160
- }), de = { class: "mt-4" }, ye = { key: 0 }, pe = /* @__PURE__ */ x({
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: t } = U(), a = e, { availability: d } = ie({
176
- paymentMethodOptions: () => a.paymentMethodOptions,
177
- isLoading: () => a.isLoading,
406
+ const { $t: a } = U(), n = e, { availability: y } = Se({
407
+ paymentMethodOptions: () => n.paymentMethodOptions,
408
+ isLoading: () => n.isLoading,
178
409
  context: () => {
179
- var c;
180
- return { invoiceId: (c = a.invoice) == null ? void 0 : c.id };
410
+ var d;
411
+ return { invoiceId: (d = n.invoice) == null ? void 0 : d.id };
181
412
  }
182
- }), u = b(), m = b(!0), s = b(), o = b(!1), { isFormHeld: y, handleActionRequired: w } = ce(o), g = b(!1), h = b(!1);
183
- function S() {
184
- if (!s.value)
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, s.value.submit();
468
+ o.value = !0, l.value.submit();
187
469
  }
188
- const M = () => {
189
- var c;
190
- g.value = !0, o.value = !1, (c = a.refresh) == null || c.call(a), a.configuration.onPaymentSuccess && a.configuration.onPaymentSuccess();
191
- }, p = () => {
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
- }, T = (c) => {
194
- o.value = !1, (c == null ? void 0 : c.code) === "PAYMENT_OUTCOME_UNCONFIRMED" && (h.value = !0);
477
+ }, te = (d) => {
478
+ o.value = !1, (d == null ? void 0 : d.code) === "PAYMENT_OUTCOME_UNCONFIRMED" && (C.value = !0);
195
479
  };
196
- return (c, v) => (r(), l(n(ae), null, {
480
+ return (d, v) => (u(), p(t(Me), null, {
197
481
  header: i(() => [
198
- f($, { class: "min-h-[52px] w-96" }, {
482
+ r(L, { class: "min-h-[52px] w-96" }, {
199
483
  default: i(() => [
200
- e.invoice && e.downloadService ? (r(), l(n(Z), {
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"])) : P("", !0)
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 B, L;
495
+ var z, H;
212
496
  return [
213
- e.isLoading ? (r(), l($, {
497
+ e.isLoading ? (u(), p(L, {
214
498
  key: 0,
215
499
  variant: "section",
216
500
  class: "min-h-[300px]"
217
- })) : P("", !0),
218
- (B = e.invoice) != null && B.paid || e.invoice && g.value ? (r(), l(N, {
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: n(t)({
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
- f(n(F), {
513
+ r(t(I), {
230
514
  variant: "body-sm",
231
515
  class: "mt-1"
232
516
  }, {
233
517
  default: i(() => [
234
- f(n(Y), { icon: "check" }),
235
- A(I(n(_)(e.invoice.tax_summary.total_amount)), 1)
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 ? (r(), l(N, {
525
+ }, 8, ["title"])) : e.error ? (u(), p(W, {
242
526
  key: 2,
243
527
  status: "error",
244
- title: n(t)({
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
- f(n(F), {
535
+ r(t(I), {
252
536
  variant: "body-sm",
253
537
  class: "mt-1"
254
538
  }, {
255
539
  default: i(() => [
256
- A(I(n(t)({
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 ? (r(), j(D, { key: 3 }, [
267
- n(d) === "READY" ? (r(), l(n(X), {
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
- title: n(t)({
270
- id: "pay_invoice.payment_methods.title",
271
- defaultMessage: "Payment methods",
272
- description: "Section title for the payment method selector on the pay invoice screen"
273
- }),
274
- "content-background": "none",
275
- "no-border": "",
276
- "no-spacing": ""
277
- }, {
278
- default: i(() => {
279
- var C, E;
280
- return [
281
- R("div", {
282
- class: H({ "pointer-events-none opacity-60": n(y) })
283
- }, [
284
- f(oe, {
285
- ref_key: "paymentIntegrationFormRef",
286
- ref: s,
287
- amount: e.amount,
288
- "country-code": e.countryCode,
289
- context: {
290
- type: "INVOICE",
291
- related_resource_ids: [
292
- {
293
- type: "INVOICE",
294
- id: e.invoice.id
295
- }
296
- ]
297
- },
298
- "customer-id": e.invoice.customer.id,
299
- "store-payment-method": m.value,
300
- "invoice-id": e.invoice.id,
301
- "payment-method-options": e.paymentMethodOptions ?? [],
302
- variant: "AUTHORIZE",
303
- "billing-entity-name": (E = (C = e.invoice) == null ? void 0 : C.billing_entity) == null ? void 0 : E.legal_name,
304
- onPaymentSuccess: M,
305
- onPaymentFailed: T,
306
- onInvalid: p,
307
- onSubmitting: v[0] || (v[0] = (O) => o.value = !0),
308
- onActionRequired: n(w),
309
- onSelect: v[1] || (v[1] = (O) => u.value = O)
310
- }, null, 8, ["amount", "country-code", "context", "customer-id", "store-payment-method", "invoice-id", "payment-method-options", "billing-entity-name", "onActionRequired"]),
311
- R("div", de, [
312
- f(n(K), {
313
- id: "pay-invoice-store-payment-method",
314
- modelValue: m.value,
315
- "onUpdate:modelValue": v[2] || (v[2] = (O) => m.value = O),
316
- label: n(t)({
317
- id: "pay_invoice.store_payment_method.label",
318
- defaultMessage: "Save this payment method for future payments",
319
- description: "Label of the checkbox that stores the payment method while paying an invoice"
320
- })
321
- }, null, 8, ["modelValue", "label"])
322
- ])
323
- ], 2)
324
- ];
325
- }),
326
- _: 1
327
- }, 8, ["title"])) : (r(), l(re, {
328
- key: 1,
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": (L = e.invoice.billing_entity) == null ? void 0 : L.legal_name
669
+ "seller-name": (H = e.invoice.billing_entity) == null ? void 0 : H.legal_name
331
670
  }, {
332
671
  default: i(() => [
333
- e.downloadService ? (r(), l(n(z), {
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 C;
339
- return (C = e.downloadService) == null ? void 0 : C.call(e, e.invoice);
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
- A(I(n(t)({
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
- })) : P("", !0)
689
+ })) : M("", !0)
351
690
  ]),
352
691
  _: 1
353
692
  }, 8, ["seller-name"]))
354
- ], 64)) : P("", !0)
693
+ ], 64)) : M("", !0)
355
694
  ];
356
695
  }),
357
696
  aside: i(() => [
358
- f($, {
697
+ r(L, {
359
698
  variant: "section",
360
699
  class: "min-h-[200px]"
361
700
  }, {
362
701
  default: i(() => [
363
- e.invoice ? (r(), l(n(Q), {
702
+ e.invoice ? (u(), p(Qe, {
364
703
  key: 0,
365
- invoice: e.invoice
366
- }, null, 8, ["invoice"])) : P("", !0)
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 && !g.value && n(d) === "READY" ? (r(), j("div", ye, [
371
- f(me, {
372
- disabled: !u.value || o.value || h.value,
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": u.value,
376
- onClick: S
377
- }, null, 8, ["disabled", "loading", "amount", "payment-method"])
378
- ])) : P("", !0)
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
- }), fe = /* @__PURE__ */ x({
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 t = e, {
404
- invoice: a,
405
- get: d,
406
- downloadInvoicePdf: u,
407
- error: m
408
- } = G({ invoiceId: t.configuration.invoiceId }), { payments: s, get: o } = J(), { paymentMethodOptions: y, get: w } = ue(), g = async () => {
409
- const p = await d();
410
- await w({
411
- customerId: p.customer.id,
412
- invoiceId: p.id,
413
- amount: p.open_invoice_amount
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: h } = le(
416
- g(),
417
- o(t.configuration.invoiceId)
418
- ), S = () => Promise.allSettled([d(), o(t.configuration.invoiceId)]), M = k(
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 p;
421
- return (p = a.value) != null && p.customer ? se(a.value.customer) : void 0;
770
+ var h;
771
+ return (h = n.value) != null && h.customer ? Re(n.value.customer) : void 0;
422
772
  }
423
773
  );
424
- return (p, T) => {
425
- var c;
426
- return W(p.$slots, "default", {
427
- invoice: n(a),
428
- isLoading: n(h),
429
- amount: (c = n(a)) == null ? void 0 : c.open_invoice_amount,
430
- countryCode: M.value,
431
- paymentMethodOptions: n(y),
432
- paymentAttempts: n(s),
433
- downloadService: n(u),
434
- refresh: S,
435
- error: n(m)
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
- }), ve = /* @__PURE__ */ x({
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 t = te("pay-invoice");
460
- return (a, d) => {
461
- var u;
462
- return r(), l(n(ee), {
463
- entry: a.$props,
464
- "component-name": n(t),
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: (u = e.configuration) == null ? void 0 : u.invoiceId },
467
- onError: d[0] || (d[0] = (m) => a.$emit("error", m))
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
- (r(), l(fe, V({
822
+ (u(), p(it, K({
471
823
  key: e.configuration.invoiceId
472
- }, a.$props), {
824
+ }, n.$props), {
473
825
  default: i(({
474
- invoice: m,
475
- isLoading: s,
826
+ invoice: s,
827
+ isLoading: l,
476
828
  amount: o,
477
- countryCode: y,
478
- paymentMethodOptions: w,
479
- paymentAttempts: g,
480
- downloadService: h,
481
- refresh: S,
482
- error: M
829
+ countryCode: m,
830
+ paymentMethodOptions: f,
831
+ paymentMethods: S,
832
+ paymentAttempts: C,
833
+ downloadService: _,
834
+ refresh: b,
835
+ error: P
483
836
  }) => [
484
- f(pe, {
485
- "is-loading": s,
486
- invoice: m,
837
+ r(ot, {
838
+ "is-loading": l,
839
+ invoice: s,
487
840
  amount: o,
488
- "country-code": y,
489
- "payment-method-options": w,
841
+ "country-code": m,
842
+ "payment-method-options": f,
843
+ "payment-methods": S,
490
844
  configuration: e.configuration,
491
- "payment-attempts": g ?? [],
492
- "download-service": h,
493
- refresh: S,
494
- error: M
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: Le } = ne(
505
- ve,
858
+ }), { define: Ft } = ge(
859
+ rt,
506
860
  "pay-invoice"
507
861
  );
508
862
  export {
509
- Le as defineSolvimonPayInvoice
863
+ Ft as defineSolvimonPayInvoice
510
864
  };