@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,71 +1,74 @@
1
- import { ref as E, defineComponent as A, useModel as te, computed as p, watch as Y, openBlock as r, createElementBlock as W, withModifiers as be, createElementVNode as N, createVNode as O, unref as t, createBlock as c, withCtx as m, createTextVNode as S, toDisplayString as y, mergeModels as ne, inject as he, renderSlot as _e, createCommentVNode as q, Fragment as fe, mergeProps as ye } from "vue";
2
- import { u as we, w as Ie, a as Pe, h as Se } from "../../pricingPlanScheduleOverrides-COr9F8DO.mjs";
3
- import { _ as ie } from "../../Button.vue.es-rh6mITmN.mjs";
4
- import { _ as H } from "../../ErrorNotification.vue.es-CKlt4hr2.mjs";
5
- import { d as oe, m as Ee, a as U, _ as K, n as Me, o as Te, e as $e, g as ke, f as Oe } from "../../customElements-Di3zwlEU.mjs";
6
- import { C as Ne } from "../../ContentWithAsideLayout-BCM8tmZN.mjs";
7
- import { u as Ae } from "../../useActionDispatchProvider-DC_fUykI.mjs";
8
- import { u as Ce } from "../../usePortal-CxzKGhbK.mjs";
9
- import { u as Be } from "../../usePaymentMethods-gvr-rmwE.mjs";
10
- import { u as Le } from "../../usePaymentMethodOptions-1QBcmgUf.mjs";
11
- import { u as De } from "../../useLoadInitialData-4k_Cyqef.mjs";
12
- import { c as Ue } from "../../invoices-Cf1qDAv4.mjs";
13
- import { b as ze, c as je, d as Ge } from "../../pricingPlanSchedule-BPrS2WRd.mjs";
14
- import { c as xe } from "../../pricingPlanSchedules-BK_o9p6h.mjs";
15
- import { a as Re } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs";
16
- import { _ as Ve } from "../../Divider.vue.es-DnP_HqLz.mjs";
17
- import { _ as Fe } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs";
18
- import { _ as Ye } from "../../PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs";
19
- import { a as qe, _ as ae } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs";
20
- import { _ as He } from "../../Section.vue.es-iS8hVGWA.mjs";
21
- import { _ as re } from "../../Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
22
- import { _ as We } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs";
1
+ import { ref as E, defineComponent as x, useModel as ne, computed as m, watch as q, openBlock as s, createElementBlock as B, withModifiers as _e, createElementVNode as C, createVNode as T, unref as t, createBlock as c, withCtx as d, Fragment as H, createTextVNode as y, toDisplayString as f, mergeModels as ie, createCommentVNode as W, mergeProps as fe } from "vue";
2
+ import { u as ye, w as we, a as Pe, h as Ie } from "../../pricingPlanScheduleOverrides-Dxv5FOBd.mjs";
3
+ import { _ as ae } from "../../Button.vue.es-Zw--kuaU.mjs";
4
+ import { _ as K } from "../../ErrorNotification.vue.es-DNd65mQq.mjs";
5
+ import { e as re, o as Se, a as U, d as Z, g as Ee, h as Me, j as ke } from "../../customElements-BTj4ii4f.mjs";
6
+ import { C as $e } from "../../ContentWithAsideLayout-Bnbsq8_5.mjs";
7
+ import { u as Te } from "../../useActionDispatchProvider-3W2vEyIg.mjs";
8
+ import { u as Oe } from "../../usePortal-CwR_FxTb.mjs";
9
+ import { u as Ce } from "../../usePaymentMethods-ByaKF7mf.mjs";
10
+ import { u as Ne, i as Ae, a as Be } from "../../paymentMethods-Nfv9HdkS.mjs";
11
+ import { u as xe } from "../../useLoadInitialData-qzdnBoui.mjs";
12
+ import { c as De } from "../../invoices-e1sKLgxg.mjs";
13
+ import { b as Le, c as Ue, d as ze } from "../../pricingPlanSchedule-BPrS2WRd.mjs";
14
+ import { c as je } from "../../pricingPlanSchedules-Dv7ZCgNp.mjs";
15
+ import { _ as Ge } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs";
16
+ import { _ as Re } from "../../Divider.vue.es-DnP_HqLz.mjs";
17
+ import { _ as Ve } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs";
18
+ import { _ as Fe } from "../../PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs";
19
+ import { _ as Ye } from "../../InvoicePreview.vue.es-4Q2hzaFS.mjs";
20
+ import { _ as qe } from "../../Section.vue.es-CvX9tg2f.mjs";
21
+ import { _ as ce } from "../../Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
22
+ import { _ as He } from "../../TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs";
23
+ import { _ as We } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs";
24
+ import { _ as se } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs";
23
25
  function Ke() {
24
- const { getInvoicePreview: a } = Ue(), l = oe(), s = E(), g = E(!1), d = E(), o = Ee();
25
- return { invoice: s, isPending: g, error: d, load: async ({
26
- subscription: w,
27
- scheduleInfo: I,
28
- enabledPricingIds: u
26
+ const { getInvoicePreview: a } = De(), l = re(), u = E(), h = E(!1), p = E(), o = Se();
27
+ return { invoice: u, isPending: h, error: p, load: async ({
28
+ subscription: O,
29
+ scheduleInfo: P,
30
+ enabledPricingIds: r
29
31
  }) => {
30
- const n = ze({
31
- enabledPricings: u.map((h) => ({ pricing_id: h })),
32
- pricingPlanScheduleInfos: I ? [I] : []
32
+ const i = Le({
33
+ enabledPricings: r.map((b) => ({ pricing_id: b })),
34
+ pricingPlanScheduleInfos: P ? [P] : []
33
35
  });
34
- if (!n) {
35
- o(), s.value = void 0, d.value = void 0, g.value = !1;
36
+ if (!i) {
37
+ o(), u.value = void 0, p.value = void 0, h.value = !1;
36
38
  return;
37
39
  }
38
- const b = o();
39
- g.value = !0, d.value = void 0;
40
+ const v = o();
41
+ h.value = !0, p.value = void 0;
40
42
  try {
41
- const h = await a({
43
+ const b = await a({
42
44
  // The subscription is running already, so it is priced as itself rather than as the
43
45
  // template for a new one — and the customer it is invoiced to is known.
44
46
  forExistingSubscription: !0,
45
- pricingPlanSubscriptionId: w.id,
46
- customizations: n
47
+ pricingPlanSubscriptionId: O.id,
48
+ customizations: i
47
49
  });
48
- if (!b()) return;
49
- s.value = h.invoice;
50
- } catch (h) {
51
- if (!b()) return;
50
+ if (!v()) return;
51
+ u.value = b.invoice;
52
+ } catch (b) {
53
+ if (!v()) return;
52
54
  l.error(
53
55
  "INVOICE_PREVIEW_FAILED",
54
56
  "Failed to load the invoice preview",
55
57
  { preview: "SUBSCRIPTION_UPGRADE" },
56
- h
57
- ), d.value = h, s.value = void 0;
58
+ b
59
+ ), p.value = b, u.value = void 0;
58
60
  } finally {
59
- b() && (g.value = !1);
61
+ v() && (h.value = !1);
60
62
  }
61
63
  } };
62
64
  }
63
- const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid grid-cols-1 gap-4" }, Qe = /* @__PURE__ */ A({
65
+ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid grid-cols-1 gap-4" }, Qe = /* @__PURE__ */ x({
64
66
  __name: "SubscriptionManagementForm",
65
- props: /* @__PURE__ */ ne({
67
+ props: /* @__PURE__ */ ie({
66
68
  id: { type: String },
67
69
  pricingGroup: { type: Object },
68
70
  paymentMethods: { type: Array },
71
+ hasExpiredPaymentMethod: { type: Boolean },
69
72
  billingPeriod: { type: Object },
70
73
  currency: { type: String },
71
74
  disabled: { type: Boolean }
@@ -75,61 +78,61 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
75
78
  paymentMethodId: {},
76
79
  paymentMethodIdModifiers: {}
77
80
  }),
78
- emits: /* @__PURE__ */ ne(["submit"], ["update:enabledPricingIds", "update:paymentMethodId"]),
81
+ emits: /* @__PURE__ */ ie(["submit"], ["update:enabledPricingIds", "update:paymentMethodId"]),
79
82
  setup(a, { emit: l }) {
80
- const s = a, g = l, d = te(a, "enabledPricingIds"), o = te(a, "paymentMethodId"), { $t: f } = U(), w = (u) => {
81
- const n = u ? Date.parse(u) : NaN;
82
- return Number.isFinite(n) ? n : 0;
83
- }, I = p(
84
- () => [...s.paymentMethods ?? []].sort((u, n) => w(n.created_at) - w(u.created_at))
83
+ const u = a, h = l, p = ne(a, "enabledPricingIds"), o = ne(a, "paymentMethodId"), { $t: w } = U(), O = (r) => {
84
+ const i = r ? Date.parse(r) : NaN;
85
+ return Number.isFinite(i) ? i : 0;
86
+ }, P = m(
87
+ () => [...u.paymentMethods ?? []].sort((r, i) => O(i.created_at) - O(r.created_at))
85
88
  );
86
- return Y(
87
- () => s.paymentMethods,
88
- (u, n) => {
89
- var h;
90
- const b = u == null ? void 0 : u.find(
91
- ({ id: M }) => !(n != null && n.some((z) => z.id === M))
89
+ return q(
90
+ () => u.paymentMethods,
91
+ (r, i) => {
92
+ var b;
93
+ const v = r == null ? void 0 : r.find(
94
+ ({ id: I }) => !(i != null && i.some((z) => z.id === I))
92
95
  );
93
- if (b && (n != null && n.length)) {
94
- o.value = b.id;
96
+ if (v && (i != null && i.length)) {
97
+ o.value = v.id;
95
98
  return;
96
99
  }
97
- u != null && u.some(({ id: M }) => M === o.value) || (o.value = (h = (u == null ? void 0 : u.find(({ is_default: M }) => M)) ?? I.value[0]) == null ? void 0 : h.id);
100
+ r != null && r.some(({ id: I }) => I === o.value) || (o.value = (b = (r == null ? void 0 : r.find(({ is_default: I }) => I)) ?? P.value[0]) == null ? void 0 : b.id);
98
101
  },
99
102
  { immediate: !0 }
100
- ), (u, n) => (r(), W("form", {
103
+ ), (r, i) => (s(), B("form", {
101
104
  id: a.id,
102
105
  class: "sv-subscription-management-form",
103
- onSubmit: n[2] || (n[2] = be((b) => g("submit"), ["prevent"]))
106
+ onSubmit: i[2] || (i[2] = _e((v) => h("submit"), ["prevent"]))
104
107
  }, [
105
- N("div", Je, [
106
- O(Fe, {
107
- modelValue: d.value,
108
- "onUpdate:modelValue": n[0] || (n[0] = (b) => d.value = b),
108
+ C("div", Je, [
109
+ T(Ve, {
110
+ modelValue: p.value,
111
+ "onUpdate:modelValue": i[0] || (i[0] = (v) => p.value = v),
109
112
  class: "sv-subscription-management-form__pricing-group",
110
113
  "group-name": a.pricingGroup.name,
111
114
  pricings: a.pricingGroup.pricings,
112
115
  "billing-period": a.billingPeriod,
113
116
  currency: a.currency
114
117
  }, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"]),
115
- N("div", null, [
116
- O(t(Ve), { spacing: "xs" })
118
+ C("div", null, [
119
+ T(t(Re), { spacing: "xs" })
117
120
  ]),
118
- I.value.length > 0 ? (r(), c(Ye, {
121
+ P.value.length > 0 ? (s(), c(Fe, {
119
122
  key: 0,
120
123
  modelValue: o.value,
121
- "onUpdate:modelValue": n[1] || (n[1] = (b) => o.value = b),
124
+ "onUpdate:modelValue": i[1] || (i[1] = (v) => o.value = v),
122
125
  class: "sv-subscription-management-form__payment-methods",
123
- "payment-methods": I.value,
126
+ "payment-methods": P.value,
124
127
  "show-add-option": !1,
125
128
  required: "",
126
129
  disabled: a.disabled,
127
- label: t(f)({
130
+ label: t(w)({
128
131
  defaultMessage: "Payment method",
129
132
  id: "subscription_management.payment_method_selector.label",
130
133
  description: "Label above the payment method that pays for the subscription change"
131
134
  })
132
- }, null, 8, ["modelValue", "payment-methods", "disabled", "label"])) : (r(), c(t(K), {
135
+ }, null, 8, ["modelValue", "payment-methods", "disabled", "label"])) : (s(), c(t(Z), {
133
136
  key: 1,
134
137
  id: a.id && `${a.id}__no-payment-method`,
135
138
  variant: "body-sm",
@@ -137,44 +140,27 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
137
140
  tag: "p",
138
141
  class: "sv-subscription-management-form__no-payment-method"
139
142
  }, {
140
- default: m(() => [
141
- S(y(t(f)({
142
- defaultMessage: "This subscription has no payment method to charge the change to. Please contact support to change it.",
143
- id: "subscription_management.no_payment_method",
144
- description: "Shown in place of the payment method on the manage subscription screen when the subscription has no usable payment method"
145
- })), 1)
143
+ default: d(() => [
144
+ a.hasExpiredPaymentMethod ? (s(), B(H, { key: 0 }, [
145
+ y(f(t(w)({
146
+ defaultMessage: "The card this subscription is paid with has expired. Replace it under your payment methods to make a change.",
147
+ id: "subscription_management.expired_payment_method",
148
+ description: "Shown in place of the payment method on the manage subscription screen when the card the subscription is paid with has expired"
149
+ })), 1)
150
+ ], 64)) : (s(), B(H, { key: 1 }, [
151
+ y(f(t(w)({
152
+ defaultMessage: "This subscription has no payment method to charge the change to. Please contact support to change it.",
153
+ id: "subscription_management.no_payment_method",
154
+ description: "Shown in place of the payment method on the manage subscription screen when the subscription has no usable payment method"
155
+ })), 1)
156
+ ], 64))
146
157
  ]),
147
158
  _: 1
148
159
  }, 8, ["id"]))
149
160
  ])
150
161
  ], 40, Ze));
151
162
  }
152
- }), Xe = /* @__PURE__ */ A({
153
- __name: "TranslationOverride",
154
- props: {
155
- messages: { type: Object }
156
- },
157
- setup(a) {
158
- const l = a, s = he(Me, void 0), g = p(() => ({
159
- ...s == null ? void 0 : s.messages.value,
160
- ...l.messages
161
- }));
162
- return (d, o) => {
163
- var f, w;
164
- return r(), c(t(Te), {
165
- locale: (f = t(s)) == null ? void 0 : f.locale.value,
166
- "date-locale": (w = t(s)) == null ? void 0 : w.dateLocale.value,
167
- messages: g.value,
168
- "show-timezones": !1
169
- }, {
170
- default: m(() => [
171
- _e(d.$slots, "default")
172
- ]),
173
- _: 3
174
- }, 8, ["locale", "date-locale", "messages"]);
175
- };
176
- }
177
- }), et = /* @__PURE__ */ A({
163
+ }), Xe = /* @__PURE__ */ x({
178
164
  __name: "SubscriptionManagementSummary",
179
165
  props: {
180
166
  invoice: { type: Object },
@@ -182,14 +168,14 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
182
168
  hasError: { type: Boolean }
183
169
  },
184
170
  setup(a) {
185
- const { $t: l } = U(), s = p(() => ({
171
+ const { $t: l } = U(), u = m(() => ({
186
172
  "invoice_preview.total_due_today_heading": l({
187
173
  defaultMessage: "Total due",
188
174
  id: "subscription_management.summary.total_due_heading",
189
175
  description: 'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'
190
176
  })
191
177
  }));
192
- return (g, d) => (r(), c(t(He), {
178
+ return (h, p) => (s(), c(t(qe), {
193
179
  class: "sv-subscription-management-summary",
194
180
  title: t(l)({
195
181
  defaultMessage: "Order summary",
@@ -197,8 +183,8 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
197
183
  description: "Title of the block previewing what a subscription change is invoiced for"
198
184
  })
199
185
  }, {
200
- default: m(() => [
201
- a.hasError ? (r(), c(t(H), {
186
+ default: d(() => [
187
+ a.hasError ? (s(), c(t(K), {
202
188
  key: 0,
203
189
  class: "sv-subscription-management-summary__error sv-error",
204
190
  title: t(l)({
@@ -206,21 +192,21 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
206
192
  id: "subscription_management.summary.error",
207
193
  description: "Error shown when the invoice preview for a subscription change cannot be loaded"
208
194
  })
209
- }, null, 8, ["title"])) : a.isPending || !a.invoice ? (r(), c(re, {
195
+ }, null, 8, ["title"])) : a.isPending || !a.invoice ? (s(), c(ce, {
210
196
  key: 1,
211
197
  variant: "section",
212
198
  class: "sv-subscription-management-summary__skeleton min-h-[120px]"
213
199
  }, {
214
- default: m(() => [
215
- a.isPending ? q("", !0) : (r(), c(t(K), {
200
+ default: d(() => [
201
+ a.isPending ? W("", !0) : (s(), c(t(Z), {
216
202
  key: 0,
217
203
  variant: "body-sm",
218
204
  color: "subtle",
219
205
  tag: "div",
220
206
  class: "sv-subscription-management-summary__empty-state"
221
207
  }, {
222
- default: m(() => [
223
- S(y(t(l)({
208
+ default: d(() => [
209
+ y(f(t(l)({
224
210
  defaultMessage: "Select your plan to see what it costs.",
225
211
  id: "subscription_management.summary.empty_state",
226
212
  description: "Shown in the order summary before a plan has been picked to preview"
@@ -230,12 +216,12 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
230
216
  }))
231
217
  ]),
232
218
  _: 1
233
- })) : (r(), c(Xe, {
219
+ })) : (s(), c(He, {
234
220
  key: 2,
235
- messages: s.value
221
+ messages: u.value
236
222
  }, {
237
- default: m(() => [
238
- O(t(qe), {
223
+ default: d(() => [
224
+ T(t(Ye), {
239
225
  class: "sv-subscription-management-summary__invoice",
240
226
  invoice: a.invoice,
241
227
  "is-customer-facing": ""
@@ -247,100 +233,107 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
247
233
  _: 1
248
234
  }, 8, ["title"]));
249
235
  }
250
- }), tt = { class: "sv-subscription-management-success grid grid-cols-1 gap-4" }, nt = { class: "sv-subscription-management-success__message" }, it = /* @__PURE__ */ A({
236
+ }), et = { class: "sv-subscription-management-success grid grid-cols-1 gap-4" }, tt = { class: "sv-subscription-management-success__message" }, nt = /* @__PURE__ */ x({
251
237
  __name: "SubscriptionManagementSuccess",
252
238
  props: {
253
239
  pricingGroupName: { type: String }
254
240
  },
255
241
  setup(a) {
256
- const l = a, { $t: s } = U(), g = p(
257
- () => s({
242
+ const l = a, { $t: u } = U(), h = m(
243
+ () => u({
258
244
  defaultMessage: "Subscription updated",
259
245
  description: "Title shown on the manage subscription screen once the change is committed",
260
246
  id: "subscription_management.success.title"
261
247
  })
262
- ), d = p(
263
- () => l.pricingGroupName ? s(
248
+ ), p = m(
249
+ () => l.pricingGroupName ? u(
264
250
  {
265
251
  defaultMessage: "Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",
266
252
  description: "Confirmation of the pricing group a committed subscription change applied to",
267
253
  id: "subscription_management.success.message"
268
254
  },
269
255
  { subject: l.pricingGroupName }
270
- ) : s({
256
+ ) : u({
271
257
  defaultMessage: "Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",
272
258
  description: "Confirmation of a committed subscription change when the pricing group is not known",
273
259
  id: "subscription_management.success.message_generic"
274
260
  })
275
261
  );
276
- return (o, f) => (r(), W("div", tt, [
277
- O(We, {
262
+ return (o, w) => (s(), B("div", et, [
263
+ T(We, {
278
264
  status: "success",
279
- title: g.value
265
+ title: h.value
280
266
  }, {
281
- default: m(() => [
282
- N("span", nt, y(d.value), 1)
267
+ default: d(() => [
268
+ C("span", tt, f(p.value), 1)
283
269
  ]),
284
270
  _: 1
285
271
  }, 8, ["title"])
286
272
  ]));
287
273
  }
288
- }), at = { class: "sv-subscription-management__header" }, st = { class: "flex flex-col gap-2" }, F = "sv-subscription-management-form", se = "sv-subscription-management__customized-pricing-message", ot = /* @__PURE__ */ A({
274
+ }), it = { class: "sv-subscription-management__header" }, at = { class: "flex flex-col gap-2" }, Y = "sv-subscription-management-form", oe = "sv-subscription-management__customized-pricing-message", st = /* @__PURE__ */ x({
289
275
  __name: "SubscriptionManagement",
290
276
  props: {
291
277
  configuration: { type: Object }
292
278
  },
293
279
  setup(a) {
294
- const l = a, s = `${F}__no-payment-method`, g = [
280
+ const l = a, u = `${Y}__no-payment-method`, h = [
295
281
  "BUY_NOW_PAY_LATER",
296
282
  "CARD",
297
283
  "DIGITAL_WALLET",
298
284
  "DIRECT_DEBIT",
299
285
  "ONLINE_BANKING"
300
- ], d = (e, i) => !!i && e.id === (i == null ? void 0 : i.payment_method_id) && e.status === "ACTIVE" && e.customer_id === (i == null ? void 0 : i.customer_id) && g.includes(e.type), { $t: o } = U(), f = Ce(), w = oe(), { dispatchAction: I } = Ae(), { createPricingPlanSchedule: u } = xe(), {
301
- subscription: n,
302
- get: b,
303
- error: h
304
- } = we({
286
+ ], p = (e, n) => !!n && e.id === (n == null ? void 0 : n.payment_method_id) && Be(e) && e.customer_id === (n == null ? void 0 : n.customer_id) && h.includes(e.type), { $t: o } = U(), w = Oe(), O = re(), { dispatchAction: P } = Te(), { createPricingPlanSchedule: r } = je(), {
287
+ subscription: i,
288
+ get: v,
289
+ error: b
290
+ } = ye({
305
291
  subscriptionId: l.configuration.subscriptionId
306
- }), { items: M, fetchAll: z } = Be({
307
- customerId: f.value.customer_id
308
- }), { paymentMethodOptions: ce, get: le } = Le(), { isLoading: j } = De(
309
- b(),
292
+ }), { items: I, fetchAll: z } = Ce({
293
+ customerId: w.value.customer_id
294
+ }), { paymentMethodOptions: ue, get: le } = Ne(), { isLoading: j } = xe(
295
+ v(),
310
296
  z(),
311
- le({ customerId: f.value.customer_id })
312
- ), Z = p(
313
- () => M.value.filter((e) => d(e, n.value))
314
- ), C = p(
297
+ le({ customerId: w.value.customer_id })
298
+ ), J = m(
299
+ () => I.value.filter((e) => p(e, i.value))
300
+ ), me = m(
301
+ () => I.value.some(
302
+ (e) => {
303
+ var n;
304
+ return e.id === ((n = i.value) == null ? void 0 : n.payment_method_id) && Ae(e);
305
+ }
306
+ )
307
+ ), N = m(
315
308
  () => {
316
309
  var e;
317
- return je(((e = n.value) == null ? void 0 : e.pricing_plan_schedule_infos) ?? []);
310
+ return Ue(((e = i.value) == null ? void 0 : e.pricing_plan_schedule_infos) ?? []);
318
311
  }
319
- ), ue = p(() => {
320
- const e = C.value;
312
+ ), de = m(() => {
313
+ const e = N.value;
321
314
  return e != null && e.pricing_plan_version ? {
322
315
  ...e,
323
- pricing_plan_version: Ie(e)
316
+ pricing_plan_version: we(e)
324
317
  } : e;
325
- }), G = p(
318
+ }), G = m(
326
319
  () => {
327
320
  var e;
328
- return Pe(((e = C.value) == null ? void 0 : e.pricing_plan_schedule) ?? {});
321
+ return Pe(((e = N.value) == null ? void 0 : e.pricing_plan_schedule) ?? {});
329
322
  }
330
- ), L = p(
323
+ ), D = m(
331
324
  () => {
332
325
  var e;
333
- return Se((e = C.value) == null ? void 0 : e.pricing_plan_schedule);
326
+ return Ie((e = N.value) == null ? void 0 : e.pricing_plan_schedule);
334
327
  }
335
- ), P = p(() => {
336
- const e = ue.value;
328
+ ), S = m(() => {
329
+ const e = de.value;
337
330
  if (!e)
338
331
  return;
339
- const { enabledPricingId: i } = l.configuration;
340
- return (i ? [i] : G.value).map(
341
- (_) => Ge({ pricingPlanScheduleInfo: e, pricingId: _ })
332
+ const { enabledPricingId: n } = l.configuration;
333
+ return (n ? [n] : G.value).map(
334
+ (_) => ze({ pricingPlanScheduleInfo: e, pricingId: _ })
342
335
  ).find((_) => !!_);
343
- }), me = p(
336
+ }), pe = m(
344
337
  () => {
345
338
  var e;
346
339
  return o(
@@ -350,7 +343,7 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
350
343
  description: "Title for the manage subscription page, naming the pricing group being changed"
351
344
  },
352
345
  {
353
- subject: ((e = P.value) == null ? void 0 : e.name) || o({
346
+ subject: ((e = S.value) == null ? void 0 : e.name) || o({
354
347
  defaultMessage: "subscription",
355
348
  id: "subscription_management.title.default_subject",
356
349
  description: 'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'
@@ -358,98 +351,98 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
358
351
  }
359
352
  );
360
353
  }
361
- ), T = E([]), x = E();
362
- Y(
363
- [G, P],
364
- ([e, i]) => {
365
- const { enabledPricingId: v } = l.configuration, _ = ((i == null ? void 0 : i.pricings) ?? []).map(({ id: k }) => k);
366
- T.value = v && _.includes(v) ? [...e.filter((k) => !_.includes(k)), v] : e;
354
+ ), M = E([]), R = E();
355
+ q(
356
+ [G, S],
357
+ ([e, n]) => {
358
+ const { enabledPricingId: g } = l.configuration, _ = ((n == null ? void 0 : n.pricings) ?? []).map(({ id: $ }) => $);
359
+ M.value = g && _.includes(g) ? [...e.filter(($) => !_.includes($)), g] : e;
367
360
  },
368
361
  { immediate: !0 }
369
362
  );
370
- const de = p(() => {
371
- const e = new Set(T.value), i = new Set(G.value);
372
- return e.size !== i.size || [...e].some((v) => !i.has(v));
363
+ const ge = m(() => {
364
+ const e = new Set(M.value), n = new Set(G.value);
365
+ return e.size !== n.size || [...e].some((g) => !n.has(g));
373
366
  }), {
374
- invoice: J,
375
- isPending: Q,
376
- error: X,
377
- load: pe
367
+ invoice: Q,
368
+ isPending: X,
369
+ error: ee,
370
+ load: he
378
371
  } = Ke();
379
- Y(
380
- [T, n, C, L],
381
- ([e, i, v, _]) => {
382
- !i || e.length === 0 || _ || pe({
383
- subscription: i,
384
- scheduleInfo: v,
372
+ q(
373
+ [M, i, N, D],
374
+ ([e, n, g, _]) => {
375
+ !n || e.length === 0 || _ || he({
376
+ subscription: n,
377
+ scheduleInfo: g,
385
378
  enabledPricingIds: e
386
379
  });
387
380
  },
388
381
  { immediate: !0 }
389
382
  );
390
- const B = E(!1), D = E(), R = E(!1), ee = p(
391
- () => !j.value && !B.value && !!n.value && !!P.value && !L.value && T.value.length > 0 && de.value && !!x.value && !Q.value && !X.value && !!J.value
392
- ), ge = async () => {
393
- if (!(!ee.value || !n.value)) {
394
- B.value = !0, D.value = void 0;
383
+ const A = E(!1), L = E(), V = E(!1), te = m(
384
+ () => !j.value && !A.value && !!i.value && !!S.value && !D.value && M.value.length > 0 && ge.value && !!R.value && !X.value && !ee.value && !!Q.value
385
+ ), ve = async () => {
386
+ if (!(!te.value || !i.value)) {
387
+ A.value = !0, L.value = void 0;
395
388
  try {
396
- await u({
397
- pricingPlanSubscriptionId: n.value.id,
398
- enabledPricings: T.value.map((e) => ({
389
+ await r({
390
+ pricingPlanSubscriptionId: i.value.id,
391
+ enabledPricings: M.value.map((e) => ({
399
392
  pricing_id: e
400
393
  }))
401
- }), R.value = !0;
394
+ }), V.value = !0;
402
395
  } catch (e) {
403
- w.error(
396
+ O.error(
404
397
  "SUBSCRIPTION_UPDATE_FAILED",
405
398
  "Failed to start a new pricing plan schedule",
406
399
  {},
407
400
  e
408
- ), D.value = o({
401
+ ), L.value = o({
409
402
  defaultMessage: "Something went wrong. Please try again.",
410
403
  id: "subscription_management.update_error",
411
404
  description: "Error shown when committing a subscription change fails"
412
405
  });
413
406
  } finally {
414
- B.value = !1;
407
+ A.value = !1;
415
408
  }
416
409
  }
417
- }, V = p(
410
+ }, F = m(
418
411
  () => {
419
- var e, i, v;
420
- return ((i = (e = C.value) == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : i.billing_period) ?? ((v = n.value) == null ? void 0 : v.billing_period);
412
+ var e, n, g;
413
+ return ((n = (e = N.value) == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : n.billing_period) ?? ((g = i.value) == null ? void 0 : g.billing_period);
421
414
  }
422
- ), $ = p(() => R.value ? "updated" : j.value ? "loading" : h.value ? "load-error" : P.value && L.value ? "customized" : P.value && V.value ? "form" : "empty"), ve = p(() => {
423
- const e = $.value === "customized" ? se : $.value === "form" && Z.value.length === 0 ? s : void 0;
424
- return { form: F, ...e && { "aria-describedby": e } };
415
+ ), k = m(() => V.value ? "updated" : j.value ? "loading" : b.value ? "load-error" : S.value && D.value ? "customized" : S.value && F.value ? "form" : "empty"), be = m(() => {
416
+ const e = k.value === "customized" ? oe : k.value === "form" && J.value.length === 0 ? u : void 0;
417
+ return { form: Y, ...e && { "aria-describedby": e } };
425
418
  });
426
- return (e, i) => (r(), c(t(Ne), { class: "sv-subscription-management sv-root sv-screen" }, {
427
- header: m(() => [
428
- N("div", at, [
429
- O(t(K), {
419
+ return (e, n) => (s(), c(t($e), { class: "sv-subscription-management sv-root sv-screen" }, {
420
+ header: d(() => [
421
+ C("div", it, [
422
+ T(t(Z), {
430
423
  variant: "heading-2",
431
424
  tag: "h1",
432
425
  class: "sv-subscription-management__title"
433
426
  }, {
434
- default: m(() => [
435
- S(y(me.value), 1)
427
+ default: d(() => [
428
+ y(f(pe.value), 1)
436
429
  ]),
437
430
  _: 1
438
431
  })
439
432
  ])
440
433
  ]),
441
- content: m(() => {
442
- var v, _;
434
+ content: d(() => {
435
+ var g, _;
443
436
  return [
444
- $.value === "updated" ? (r(), c(it, {
437
+ k.value === "updated" ? (s(), c(nt, {
445
438
  key: 0,
446
439
  class: "sv-subscription-management__success",
447
- "pricing-group-name": (v = P.value) == null ? void 0 : v.name
448
- }, null, 8, ["pricing-group-name"])) : $.value === "loading" ? (r(), c(re, {
440
+ "pricing-group-name": (g = S.value) == null ? void 0 : g.name
441
+ }, null, 8, ["pricing-group-name"])) : k.value === "loading" ? (s(), c(ce, {
449
442
  key: 1,
450
443
  variant: "section",
451
444
  class: "min-h-[220px]"
452
- })) : $.value === "load-error" ? (r(), c(t(H), {
445
+ })) : k.value === "load-error" ? (s(), c(t(K), {
453
446
  key: 2,
454
447
  class: "sv-subscription-management__load-error sv-error",
455
448
  title: t(o)({
@@ -457,54 +450,55 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
457
450
  id: "subscription_management.load_error",
458
451
  description: "Error shown in place of the manage subscription form when the subscription cannot be loaded"
459
452
  })
460
- }, null, 8, ["title"])) : $.value === "customized" ? (r(), c(ae, {
453
+ }, null, 8, ["title"])) : k.value === "customized" ? (s(), c(se, {
461
454
  key: 3,
462
455
  class: "sv-subscription-management__customized-pricing",
463
456
  icon: "info"
464
457
  }, {
465
- title: m(() => [
466
- S(y(t(o)({
458
+ title: d(() => [
459
+ y(f(t(o)({
467
460
  defaultMessage: "This subscription has custom pricing",
468
461
  id: "subscription_management.customized_pricing.title",
469
462
  description: "Title shown on the manage subscription screen in place of the form when the subscription has pricing customized for it, which cannot be changed here"
470
463
  })), 1)
471
464
  ]),
472
- message: m(() => [
473
- N("span", { id: se }, y(t(o)({
465
+ message: d(() => [
466
+ C("span", { id: oe }, f(t(o)({
474
467
  defaultMessage: "Please contact support to change it.",
475
468
  id: "subscription_management.customized_pricing.message",
476
469
  description: "Message shown on the manage subscription screen when the subscription has pricing customized for it, which cannot be changed here"
477
470
  })), 1)
478
471
  ]),
479
472
  _: 1
480
- })) : $.value === "form" && P.value && V.value ? (r(), c(Qe, {
473
+ })) : k.value === "form" && S.value && F.value ? (s(), c(Qe, {
481
474
  key: 4,
482
- id: F,
483
- "enabled-pricing-ids": T.value,
484
- "onUpdate:enabledPricingIds": i[0] || (i[0] = (k) => T.value = k),
485
- "payment-method-id": x.value,
486
- "onUpdate:paymentMethodId": i[1] || (i[1] = (k) => x.value = k),
475
+ id: Y,
476
+ "enabled-pricing-ids": M.value,
477
+ "onUpdate:enabledPricingIds": n[0] || (n[0] = ($) => M.value = $),
478
+ "payment-method-id": R.value,
479
+ "onUpdate:paymentMethodId": n[1] || (n[1] = ($) => R.value = $),
487
480
  class: "sv-subscription-management__form",
488
- "pricing-group": P.value,
489
- "payment-methods": Z.value,
490
- "billing-period": V.value,
491
- currency: (_ = t(n)) == null ? void 0 : _.billing_currency,
492
- disabled: B.value,
493
- onSubmit: ge
494
- }, null, 8, ["enabled-pricing-ids", "payment-method-id", "pricing-group", "payment-methods", "billing-period", "currency", "disabled"])) : (r(), c(ae, {
481
+ "pricing-group": S.value,
482
+ "payment-methods": J.value,
483
+ "has-expired-payment-method": me.value,
484
+ "billing-period": F.value,
485
+ currency: (_ = t(i)) == null ? void 0 : _.billing_currency,
486
+ disabled: A.value,
487
+ onSubmit: ve
488
+ }, null, 8, ["enabled-pricing-ids", "payment-method-id", "pricing-group", "payment-methods", "has-expired-payment-method", "billing-period", "currency", "disabled"])) : (s(), c(se, {
495
489
  key: 5,
496
490
  class: "sv-subscription-management__empty-state",
497
491
  icon: "receipt_long"
498
492
  }, {
499
- title: m(() => [
500
- S(y(t(o)({
493
+ title: d(() => [
494
+ y(f(t(o)({
501
495
  defaultMessage: "Nothing to change",
502
496
  id: "subscription_management.empty_state.title",
503
497
  description: "Title shown on the manage subscription screen when the subscription has nothing the customer can change"
504
498
  })), 1)
505
499
  ]),
506
- message: m(() => [
507
- S(y(t(o)({
500
+ message: d(() => [
501
+ y(f(t(o)({
508
502
  defaultMessage: "This subscription has no options that can be changed right now.",
509
503
  id: "subscription_management.empty_state.message",
510
504
  description: "Message shown on the manage subscription screen when the subscription is not running or has no group of options to choose from"
@@ -514,46 +508,46 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
514
508
  }))
515
509
  ];
516
510
  }),
517
- aside: m(() => [
518
- R.value ? (r(), c(t(ie), {
511
+ aside: d(() => [
512
+ V.value ? (s(), c(t(ae), {
519
513
  key: 0,
520
514
  size: "lg",
521
515
  class: "sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",
522
516
  type: "button",
523
- onClick: i[2] || (i[2] = (v) => t(I)({ action: "navigate-to-customer-overview" }))
517
+ onClick: n[2] || (n[2] = (g) => t(P)({ action: "navigate-to-customer-overview" }))
524
518
  }, {
525
- default: m(() => [
526
- S(y(t(o)({
519
+ default: d(() => [
520
+ y(f(t(o)({
527
521
  defaultMessage: "Done",
528
522
  id: "subscription_management.done_button.label",
529
523
  description: "Label of the button that leaves the manage subscription screen once the change is committed"
530
524
  })), 1)
531
525
  ]),
532
526
  _: 1
533
- })) : (r(), W(fe, { key: 1 }, [
534
- L.value ? q("", !0) : (r(), c(et, {
527
+ })) : (s(), B(H, { key: 1 }, [
528
+ D.value ? W("", !0) : (s(), c(Xe, {
535
529
  key: 0,
536
530
  class: "sv-subscription-management__summary",
537
- invoice: t(J),
538
- "is-pending": t(j) || t(Q),
539
- "has-error": !!t(X)
531
+ invoice: t(Q),
532
+ "is-pending": t(j) || t(X),
533
+ "has-error": !!t(ee)
540
534
  }, null, 8, ["invoice", "is-pending", "has-error"])),
541
- D.value ? (r(), c(t(H), {
535
+ L.value ? (s(), c(t(K), {
542
536
  key: 1,
543
537
  class: "sv-subscription-management__update-error sv-error",
544
- title: D.value
545
- }, null, 8, ["title"])) : q("", !0),
546
- N("div", st, [
547
- O(t(ie), ye({
538
+ title: L.value
539
+ }, null, 8, ["title"])) : W("", !0),
540
+ C("div", at, [
541
+ T(t(ae), fe({
548
542
  size: "lg",
549
543
  class: "sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",
550
544
  type: "submit"
551
- }, ve.value, {
552
- disabled: !ee.value,
553
- loading: B.value
545
+ }, be.value, {
546
+ disabled: !te.value,
547
+ loading: A.value
554
548
  }), {
555
- default: m(() => [
556
- S(y(t(o)({
549
+ default: d(() => [
550
+ y(f(t(o)({
557
551
  defaultMessage: "Update subscription",
558
552
  id: "subscription_management.update_button.label",
559
553
  description: "Label of the button that commits the subscription change"
@@ -561,9 +555,9 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
561
555
  ]),
562
556
  _: 1
563
557
  }, 16, ["disabled", "loading"]),
564
- O(Re, {
558
+ T(Ge, {
565
559
  class: "sv-subscription-management__kpi",
566
- "payment-method-options": t(ce)
560
+ "payment-method-options": t(ue)
567
561
  }, null, 8, ["payment-method-options"])
568
562
  ])
569
563
  ], 64))
@@ -571,9 +565,10 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
571
565
  _: 1
572
566
  }));
573
567
  }
574
- }), rt = /* @__PURE__ */ A({
568
+ }), ot = /* @__PURE__ */ x({
575
569
  __name: "SubscriptionManagement.entry",
576
570
  props: {
571
+ portalToken: { type: Object },
577
572
  environment: { type: String },
578
573
  locale: { type: String },
579
574
  dateLocale: { type: String },
@@ -591,18 +586,18 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
591
586
  configuration: { type: Object }
592
587
  },
593
588
  setup(a) {
594
- const l = ke("subscription-management");
595
- return (s, g) => {
596
- var d;
597
- return r(), c(t($e), {
598
- entry: s.$props,
589
+ const l = Me("subscription-management");
590
+ return (u, h) => {
591
+ var p;
592
+ return s(), c(t(Ee), {
593
+ entry: u.$props,
599
594
  "component-name": t(l),
600
595
  "allowed-portal-types": ["CUSTOMER"],
601
- "required-configuration": { subscriptionId: (d = a.configuration) == null ? void 0 : d.subscriptionId },
602
- onError: g[0] || (g[0] = (o) => s.$emit("error", o))
596
+ "required-configuration": { subscriptionId: (p = a.configuration) == null ? void 0 : p.subscriptionId },
597
+ onError: h[0] || (h[0] = (o) => u.$emit("error", o))
603
598
  }, {
604
- default: m(() => [
605
- (r(), c(ot, {
599
+ default: d(() => [
600
+ (s(), c(st, {
606
601
  key: a.configuration.subscriptionId,
607
602
  configuration: a.configuration
608
603
  }, null, 8, ["configuration"]))
@@ -611,10 +606,10 @@ const Ze = ["id"], Je = { class: "sv-subscription-management-form__body grid gri
611
606
  }, 8, ["entry", "component-name", "required-configuration"]);
612
607
  };
613
608
  }
614
- }), { define: Ot } = Oe(
615
- rt,
609
+ }), { define: Ct } = ke(
610
+ ot,
616
611
  "subscription-management"
617
612
  );
618
613
  export {
619
- Ot as defineSolvimonSubscriptionManagement
614
+ Ct as defineSolvimonSubscriptionManagement
620
615
  };