@solvimon/solvimon-web 0.1.0-alpha.21 → 0.1.0-alpha.22

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 (216) hide show
  1. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B9WTpz0k.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js} +1 -1
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DJCMa2Lz.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs} +6 -6
  3. package/dist/{Avatar.vue.es-CJw5z7Uu.js → Avatar.vue.es-D42J_izE.js} +1 -1
  4. package/dist/{Avatar.vue.es-ChcLSNaN.mjs → Avatar.vue.es-DNJ-jexx.mjs} +1 -1
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CTQ5RMtx.js → BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DApMAncl.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs} +4 -4
  7. package/dist/{Button.vue.es-VQCd3V3C.mjs → Button.vue.es-Dz-2L8dJ.mjs} +1 -1
  8. package/dist/{Button.vue.es-BWl37nzm.js → Button.vue.es-M_jXZda4.js} +1 -1
  9. package/dist/{Checkout.entry.ce-DRHqEFd7.mjs → Checkout.entry.ce-B5-0AM67.mjs} +1298 -1225
  10. package/dist/Checkout.entry.ce-C52gkrNZ.js +1 -0
  11. package/dist/{Chip.vue.es-CXG8o1Qf.mjs → Chip.vue.es-DMK9C78d.mjs} +2 -2
  12. package/dist/{Chip.vue.es-DUgjuRWm.js → Chip.vue.es-G8doKsZb.js} +1 -1
  13. package/dist/{ContextMenu.vue.es-BllxeDTt.js → ContextMenu.vue.es-B3Rz6Ojk.js} +1 -1
  14. package/dist/{ContextMenu.vue.es-C6TKlSXs.mjs → ContextMenu.vue.es-CzkkNoJG.mjs} +4 -4
  15. package/dist/{CustomerBillingInformation.vue.es-CMCZ-lIM.js → CustomerBillingInformation.vue.es-BmtU9Pk0.js} +1 -1
  16. package/dist/{CustomerBillingInformation.vue.es-CKQH_ds0.mjs → CustomerBillingInformation.vue.es-Db6bN2RZ.mjs} +2 -2
  17. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-n097Xf1H.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BGHaTx1A.js} +1 -1
  18. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BxwllXwU.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs} +5 -5
  19. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +1 -0
  20. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CtaoLbrM.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs} +485 -501
  21. package/dist/{DividerText.vue.es-BBdydUy_.js → DividerText.vue.es-D-QxT2OD.js} +1 -1
  22. package/dist/{DividerText.vue.es-Bomiy4if.mjs → DividerText.vue.es-IK2fns6f.mjs} +1 -1
  23. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DXO9xpFT.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js} +1 -1
  24. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs} +4 -4
  25. package/dist/{ErrorNotification.vue.es-C6ngWAVU.mjs → ErrorNotification.vue.es-BGckEwHf.mjs} +2 -2
  26. package/dist/{ErrorNotification.vue.es-0ZC_DozN.js → ErrorNotification.vue.es-Cd2UKPAz.js} +1 -1
  27. package/dist/{IconButton.vue.es-DGLIdHkR.js → IconButton.vue.es-BTAkuFsm.js} +1 -1
  28. package/dist/{IconButton.vue.es-DAR7e8NA.mjs → IconButton.vue.es-C4dQEQAc.mjs} +2 -2
  29. package/dist/{IconTitle.vue.es-Bbusc4wK.mjs → IconTitle.vue.es-BmX68uJx.mjs} +3 -3
  30. package/dist/{IconTitle.vue.es-D-q6w2E-.js → IconTitle.vue.es-CmR2xoeu.js} +1 -1
  31. package/dist/{Input.vue.es-AY1c0Rui.mjs → Input.vue.es-BGPELaZU.mjs} +2 -2
  32. package/dist/{Input.vue.es-BN95nPBw.js → Input.vue.es-CTOrmrcB.js} +1 -1
  33. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-1WjSbPEP.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs} +2 -2
  34. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-qiBCPY8l.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-bheNAKzK.js} +1 -1
  35. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-Xo9BR6AD.js +1 -0
  36. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D99nuBRE.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs} +3 -3
  37. package/dist/{InvoiceSummary.vue.es-Bs5c2Ovx.mjs → InvoiceSummary.vue.es-BWLiwlNs.mjs} +692 -705
  38. package/dist/InvoiceSummary.vue.es-hpG8Tq1D.js +1 -0
  39. package/dist/{Modal.vue.es-Chi6_MH_.js → Modal.vue.es-BD4vUaOQ.js} +1 -1
  40. package/dist/{Modal.vue.es-DSkC4eMv.mjs → Modal.vue.es-B_G8NQS2.mjs} +5 -5
  41. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-vD88j_U7.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs} +3 -3
  42. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-Draz_8Ts.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js} +1 -1
  43. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js} +1 -1
  44. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs} +3 -3
  45. package/dist/{PaymentHistoryBlock-budeR7ep.mjs → PaymentHistoryBlock-ComJzB3H.mjs} +1 -1
  46. package/dist/{PaymentHistoryBlock-DGJ_PiVq.js → PaymentHistoryBlock-DSHW_eW1.js} +1 -1
  47. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dv-3suBX.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js} +1 -1
  48. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C28ofG7N.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs} +4 -4
  49. package/dist/{PaymentIntegrationForm-Crrhar96.mjs → PaymentIntegrationForm-CH5B6BY5.mjs} +1 -1
  50. package/dist/{PaymentIntegrationForm-DqqGcEP1.js → PaymentIntegrationForm-CwfCLnKt.js} +1 -1
  51. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C4bk0m8g.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BqYk4_T9.mjs} +3 -3
  52. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CcEEdHQJ.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js} +1 -1
  53. package/dist/{PaymentIntegrationFormAdyen-DM-xMcm0.mjs → PaymentIntegrationFormAdyen-DfN7cPYZ.mjs} +5 -5
  54. package/dist/{PaymentIntegrationFormAdyen-DronjwO3.js → PaymentIntegrationFormAdyen-Q48aDXR7.js} +1 -1
  55. package/dist/{PaymentIntegrationFormStripe-ybM6wirp.js → PaymentIntegrationFormStripe-BSEqarl7.js} +1 -1
  56. package/dist/{PaymentIntegrationFormStripe-yBm4KnpV.mjs → PaymentIntegrationFormStripe-CBsXDuhy.mjs} +4 -4
  57. package/dist/{PaymentMethod.vue.es-Ctw9Es1g.js → PaymentMethod.vue.es-D18g-QB4.js} +1 -1
  58. package/dist/{PaymentMethod.vue.es-BdMcKq8_.mjs → PaymentMethod.vue.es-DkQdPXfk.mjs} +3 -3
  59. package/dist/{PaymentMethodForm-C1bIGX10.mjs → PaymentMethodForm-CpIZKfPH.mjs} +1 -1
  60. package/dist/{PaymentMethodForm-BQ5TVHlS.js → PaymentMethodForm-DK8ntFA0.js} +1 -1
  61. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-5KKkuVt5.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs} +5 -5
  62. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-V88bCeDt.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js} +1 -1
  63. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CnmZ9dvP.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs} +6 -6
  64. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-B_207kq5.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js} +1 -1
  65. package/dist/PlanCustomizationEditor-0zCXN-cv.mjs +877 -0
  66. package/dist/PlanCustomizationEditor-XpofGULc.js +1 -0
  67. package/dist/{PricingGroupRangeInput.vue.es-Bnb-ARie.mjs → PricingGroupRangeInput.vue.es-8_5nfZDI.mjs} +4 -4
  68. package/dist/{PricingGroupRangeInput.vue.es-D82XvoC_.js → PricingGroupRangeInput.vue.es-QnpfHxaY.js} +1 -1
  69. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CxMkCmti.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js} +1 -1
  70. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-skQMgHEL.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs} +5 -5
  71. package/dist/{RadioGroupExtended.vue.es-WDbo_yj1.mjs → RadioGroupExtended.vue.es-C92xlCFQ.mjs} +3 -3
  72. package/dist/{RadioGroupExtended.vue.es-B1YtLNKG.js → RadioGroupExtended.vue.es-Cb1iD73r.js} +1 -1
  73. package/dist/{Section.vue.es-DuK52y67.js → Section.vue.es-Btff-cLY.js} +1 -1
  74. package/dist/{Section.vue.es-By1JltGi.mjs → Section.vue.es-DQ5H7mqW.mjs} +1 -1
  75. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Ct3ZNq-j.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js} +1 -1
  76. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CS3KIkPL.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs} +6 -6
  77. package/dist/{SubscriptionSchedules-DDCjVEbG.mjs → SubscriptionSchedules-Dc0rUnnf.mjs} +1 -1
  78. package/dist/{SubscriptionSchedules-DEjIERyF.js → SubscriptionSchedules-pzNsego6.js} +1 -1
  79. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-JAedXFzq.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs} +1655 -1620
  80. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +1 -0
  81. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DVMS4gJQ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs} +3 -3
  82. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-D-Fa54M6.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js} +1 -1
  83. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DiXmEjUD.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js} +1 -1
  84. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BckZJtOc.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs} +7 -7
  85. package/dist/{TooltipParagraph.vue.es-sTgWAgcd.js → TooltipParagraph.vue.es-BaqCDjl8.js} +1 -1
  86. package/dist/{TooltipParagraph.vue.es-DYu2ReL7.mjs → TooltipParagraph.vue.es-CIedcXGT.mjs} +1 -1
  87. package/dist/{TrialChip.vue.es-Cl-9_pdr.js → TrialChip.vue.es-BzNI94k0.js} +1 -1
  88. package/dist/{TrialChip.vue.es-DX53r0ku.mjs → TrialChip.vue.es-DkBuMNr_.mjs} +2 -2
  89. package/dist/{cn.es-DjnGlmqV.mjs → cn.es-BGqYNPM3.mjs} +2 -2
  90. package/dist/{cn.es-CNvIP217.js → cn.es-CvmLj7KH.js} +1 -1
  91. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  92. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  93. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  94. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
  95. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  96. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  97. package/dist/components/Invoice/Invoice.cjs +1 -1
  98. package/dist/components/Invoice/Invoice.mjs +9 -9
  99. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  100. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +3 -3
  101. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  102. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  103. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  104. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  105. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  106. package/dist/components/PaymentHistory/PaymentHistory.mjs +3 -3
  107. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  108. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  109. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  110. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  111. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  112. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  113. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  114. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  115. package/dist/{customElements-Com2NiGU.mjs → customElements-CSE7dwUr.mjs} +312 -282
  116. package/dist/{customElements-Bt8PbjIn.js → customElements-Vox1PB6G.js} +42 -18
  117. package/dist/{customer-CKgMJEgv.mjs → customer-5krPxZ8i.mjs} +1 -1
  118. package/dist/{customer-Q4JGfVfq.js → customer-Dsq-Moea.js} +1 -1
  119. package/dist/{de-DE-DqLD4IX2.js → de-DE-BSlbAnPE.js} +1 -1
  120. package/dist/{de-DE-Ds_yJLS3.js → de-DE-C3DzP1nj.js} +1 -1
  121. package/dist/{de-DE-DBO5f-Eu.mjs → de-DE-DXsG-vXA.mjs} +13 -8
  122. package/dist/{de-DE-CVCmzlNH.mjs → de-DE-DsFtpLsx.mjs} +2 -0
  123. package/dist/{en-US-CvFmmI_O.js → en-US-9xdcz3T5.js} +1 -1
  124. package/dist/{en-US-3UmnS23B.mjs → en-US-C939IZ5i.mjs} +13 -8
  125. package/dist/{en-US-DVR9O7b_.mjs → en-US-DvkvbV0p.mjs} +2 -0
  126. package/dist/{en-US-C51ILrVv.js → en-US-X_pSFsNm.js} +1 -1
  127. package/dist/index.cjs +1 -1
  128. package/dist/index.mjs +1 -1
  129. package/dist/{invoices-CV9iAUHf.mjs → invoices-DRgfpkJ6.mjs} +8 -5
  130. package/dist/invoices-xOV2YaEV.js +1 -0
  131. package/dist/{it-IT-CxBRisRm.mjs → it-IT-BxpwB3oJ.mjs} +8 -3
  132. package/dist/it-IT-DT3rfjOY.js +1 -0
  133. package/dist/{it-IT-CDMnnFKZ.mjs → it-IT-TE7oqvXa.mjs} +2 -0
  134. package/dist/{it-IT-Dxw59eR_.js → it-IT-YBtHAao1.js} +1 -1
  135. package/dist/{nl-NL-Btbfd9p2.js → nl-NL-C8wnyKju.js} +1 -1
  136. package/dist/nl-NL-DfkhOJKc.js +1 -0
  137. package/dist/{nl-NL-o3UvtSNg.mjs → nl-NL-Di3-JArV.mjs} +2 -0
  138. package/dist/{nl-NL-BWGkVweu.mjs → nl-NL-na2I4aiP.mjs} +8 -3
  139. package/dist/{paymentMethods-ChWAwDSF.js → paymentMethods-CRDIw9lz.js} +1 -1
  140. package/dist/{paymentMethods-BuwoJ1y9.mjs → paymentMethods-PmkHYomw.mjs} +1 -1
  141. package/dist/{payments-C_cMXQzE.mjs → payments-Dvqh6CGW.mjs} +1 -1
  142. package/dist/{payments-DGckugN0.js → payments-jAgXhdp_.js} +1 -1
  143. package/dist/pricingItemConfigs.es-D4aYkYcf.js +1 -0
  144. package/dist/{pricingItemConfigs.es-DMf1e6y7.mjs → pricingItemConfigs.es-ORxsk_YS.mjs} +23 -22
  145. package/dist/pricingPlanSchedule-BM8vsKkV.js +1 -0
  146. package/dist/pricingPlanSchedule-BPrS2WRd.mjs +132 -0
  147. package/dist/screens/Checkout/Checkout.cjs +1 -1
  148. package/dist/screens/Checkout/Checkout.mjs +2 -2
  149. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  150. package/dist/screens/CustomerOverview/CustomerOverview.mjs +11 -11
  151. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  152. package/dist/screens/PayInvoice/PayInvoice.mjs +13 -13
  153. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  154. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  155. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  156. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +20 -20
  157. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  158. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +19 -19
  159. package/dist/{subscription-CvfAEJeP.mjs → subscription-CrVOr5MF.mjs} +1 -1
  160. package/dist/{subscription-9GORG-Gt.js → subscription-ZA62t4E9.js} +1 -1
  161. package/dist/{subscriptions-B5VqRayX.mjs → subscriptions-XDyI2Cqm.mjs} +1 -1
  162. package/dist/{subscriptions-X0Ciw8z3.js → subscriptions-fJcj88X9.js} +1 -1
  163. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +1 -0
  164. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +1 -0
  165. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
  166. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
  167. package/dist/types/composables/useInvoicePreview.types.d.ts +1 -0
  168. package/dist/types/public/components/Invoice/Invoice.types.d.ts +1 -1
  169. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +1 -1
  170. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +1 -1
  171. package/dist/{useActionDispatchProvider-e2lQXTid.mjs → useActionDispatchProvider-B8-oycQk.mjs} +1 -1
  172. package/dist/{useActionDispatchProvider-B54GYEY7.js → useActionDispatchProvider-CNAuaHdm.js} +1 -1
  173. package/dist/{useCustomer-CC9zxV6c.mjs → useCustomer-CP8eWUZV.mjs} +1 -1
  174. package/dist/{useCustomer-BJwJ9BkJ.js → useCustomer-DSx-wN-6.js} +1 -1
  175. package/dist/useCustomerFormLabels-DW6jnDYH.mjs +968 -0
  176. package/dist/useCustomerFormLabels-TVTgy0MT.js +1 -0
  177. package/dist/{useExperimentalFeature-B0IFn3Uw.mjs → useExperimentalFeature-BvE_EOX-.mjs} +1 -1
  178. package/dist/{useExperimentalFeature-8Mzpj5wc.js → useExperimentalFeature-CC-DrIcL.js} +1 -1
  179. package/dist/{useInvoiceData-Bblwdl0f.js → useInvoiceData-CRRPdXc6.js} +1 -1
  180. package/dist/{useInvoiceData-6mHUZC9a.mjs → useInvoiceData-D8ds05CX.mjs} +2 -2
  181. package/dist/{useInvoicesList-_U1-tn9_.js → useInvoicesList-DIfQcvER.js} +1 -1
  182. package/dist/{useInvoicesList-B5H5JfvY.mjs → useInvoicesList-SJU5YWBQ.mjs} +7 -7
  183. package/dist/{useLoadInitialData-CezlvhBV.js → useLoadInitialData-DsabgMLZ.js} +1 -1
  184. package/dist/{useLoadInitialData-ux_wpNiR.mjs → useLoadInitialData-MUljS38K.mjs} +1 -1
  185. package/dist/{usePaymentMethodAvailability-DRwrBdto.js → usePaymentMethodAvailability-Bt7P9InI.js} +1 -1
  186. package/dist/{usePaymentMethodAvailability-CkR4TwoV.mjs → usePaymentMethodAvailability-D0NUanyF.mjs} +4 -4
  187. package/dist/{usePaymentMethodOptions-BfnLBZOo.mjs → usePaymentMethodOptions-B7JYkGsw.mjs} +1 -1
  188. package/dist/{usePaymentMethodOptions-B6GIM9q4.js → usePaymentMethodOptions-cT1o-BA1.js} +1 -1
  189. package/dist/{usePaymentMethods-C3QfLSrP.mjs → usePaymentMethods-CpzqXQUT.mjs} +1 -1
  190. package/dist/{usePaymentMethods-GFmQRp0X.js → usePaymentMethods-DNVw2eVg.js} +1 -1
  191. package/dist/{usePayments-SQF_V7oL.js → usePayments-D9Eo-uBk.js} +1 -1
  192. package/dist/{usePayments-BkwGyZT0.mjs → usePayments-Gx9kBvNB.mjs} +6 -6
  193. package/dist/{usePortal-DDG9b6FI.mjs → usePortal-3VCZwSUE.mjs} +1 -1
  194. package/dist/{usePortal-BdM7hDge.js → usePortal-DsebXdhx.js} +1 -1
  195. package/dist/{useSubscription-BJJYHYgr.mjs → useSubscription-DnL1wVh1.mjs} +1 -1
  196. package/dist/{useSubscription-Q4C2DPhw.js → useSubscription-K_gP9TeX.js} +1 -1
  197. package/dist/{useTimePeriod.es-pepm2TpV.js → useTimePeriod.es-CmltiTE-.js} +1 -1
  198. package/dist/{useTimePeriod.es-9tZvAhyb.mjs → useTimePeriod.es-DMtKzcoB.mjs} +1 -1
  199. package/dist/wallets.es-CNIMW5ay.js +1 -0
  200. package/dist/wallets.es-eH2C2ygn.mjs +102 -0
  201. package/package.json +1 -1
  202. package/dist/Checkout.entry.ce-BTVuGyNq.js +0 -1
  203. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C_yKvYtG.js +0 -1
  204. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-BXTInmf9.js +0 -1
  205. package/dist/InvoiceSummary.vue.es-B0MPR0oI.js +0 -1
  206. package/dist/PlanCustomizationEditor-CCOTD6Qu.mjs +0 -769
  207. package/dist/PlanCustomizationEditor-CiZnVCM6.js +0 -1
  208. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BlX0W6lw.js +0 -1
  209. package/dist/invoices-CvpL4rv5.js +0 -1
  210. package/dist/it-IT-CFEfSpPH.js +0 -1
  211. package/dist/nl-NL-jtVgF3jx.js +0 -1
  212. package/dist/pricingItemConfigs.es-DlybwIh1.js +0 -1
  213. package/dist/pricingPlanSchedule-COfmWv_o.js +0 -1
  214. package/dist/pricingPlanSchedule-J1nb9pCu.mjs +0 -129
  215. package/dist/useCustomerFormLabels-72Pxw8X5.js +0 -1
  216. package/dist/useCustomerFormLabels-V2YuYMLU.mjs +0 -930
@@ -1,30 +1,30 @@
1
1
  import { computed as u, ref as D, defineComponent as O, openBlock as c, createBlock as m, unref as e, withCtx as p, createElementVNode as U, createVNode as M, createTextVNode as w, toDisplayString as S, createCommentVNode as C, createElementBlock as F, Fragment as Z, renderList as J, shallowRef as K, watch as W, defineAsyncComponent as Q, toRef as X, renderSlot as ee, normalizeProps as te, guardReactiveProps as ne } from "vue";
2
- import { _ as ae } from "../../IconButton.vue.es-DAR7e8NA.mjs";
3
- import { _ as V } from "../../Button.vue.es-VQCd3V3C.mjs";
4
- import { _ as G } from "../../ErrorNotification.vue.es-C6ngWAVU.mjs";
5
- import { u as N, _ as E, b as se, d as ie, e as oe } from "../../customElements-Com2NiGU.mjs";
2
+ import { _ as ae } from "../../IconButton.vue.es-C4dQEQAc.mjs";
3
+ import { _ as V } from "../../Button.vue.es-Dz-2L8dJ.mjs";
4
+ import { _ as G } from "../../ErrorNotification.vue.es-BGckEwHf.mjs";
5
+ import { u as N, _ as E, b as se, d as ie, e as oe } from "../../customElements-CSE7dwUr.mjs";
6
6
  import { C as re } from "../../ContentWithAsideLayout-Bnbsq8_5.mjs";
7
- import { u as le } from "../../useActionDispatchProvider-e2lQXTid.mjs";
8
- import { b as q, a as ce } from "../../subscription-CvfAEJeP.mjs";
9
- import { _ as ue, u as de } from "../../CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CtaoLbrM.mjs";
10
- import { _ as pe } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BxwllXwU.mjs";
11
- import { _ as me } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs";
7
+ import { u as le } from "../../useActionDispatchProvider-B8-oycQk.mjs";
8
+ import { b as q, a as ce } from "../../subscription-CrVOr5MF.mjs";
9
+ import { _ as ue, u as de } from "../../CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs";
10
+ import { _ as pe } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs";
11
+ import { _ as me } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs";
12
12
  import { _ as be } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
13
- import { _ as Y } from "../../Section.vue.es-By1JltGi.mjs";
13
+ import { _ as Y } from "../../Section.vue.es-DQ5H7mqW.mjs";
14
14
  import { g as ge } from "../../pricing-DLOeiAIB.mjs";
15
15
  import { f as z, b as fe } from "../../formatting.es-RclXHhKo.mjs";
16
- import { _ as he } from "../../PaymentMethod.vue.es-BdMcKq8_.mjs";
17
- import { M as ve } from "../../Modal.vue.es-DSkC4eMv.mjs";
18
- import { c as _e } from "../../subscriptions-B5VqRayX.mjs";
19
- import { _ as ye } from "../../SubscriptionSummary.vue_vue_type_script_setup_true_lang-DVMS4gJQ.mjs";
16
+ import { _ as he } from "../../PaymentMethod.vue.es-DkQdPXfk.mjs";
17
+ import { M as ve } from "../../Modal.vue.es-B_G8NQS2.mjs";
18
+ import { c as _e } from "../../subscriptions-XDyI2Cqm.mjs";
19
+ import { _ as ye } from "../../SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs";
20
20
  import { g as we } from "../../api.es-QaC926Xu.mjs";
21
21
  import { i as Se } from "../../useIncrementalLoading-Cgxw2GD7.mjs";
22
- import { c as Ce } from "../../paymentMethods-BuwoJ1y9.mjs";
22
+ import { c as Ce } from "../../paymentMethods-PmkHYomw.mjs";
23
23
  import { A as Me } from "../../error-BHVZJGwD.mjs";
24
- import { u as xe } from "../../useSubscription-BJJYHYgr.mjs";
25
- import { u as $e } from "../../useCustomer-CC9zxV6c.mjs";
26
- import { u as Pe } from "../../usePaymentMethods-C3QfLSrP.mjs";
27
- import { u as Ae } from "../../useLoadInitialData-ux_wpNiR.mjs";
24
+ import { u as xe } from "../../useSubscription-DnL1wVh1.mjs";
25
+ import { u as $e } from "../../useCustomer-CP8eWUZV.mjs";
26
+ import { u as Pe } from "../../usePaymentMethods-CpzqXQUT.mjs";
27
+ import { u as Ae } from "../../useLoadInitialData-MUljS38K.mjs";
28
28
  import { g as ke } from "../../component-5wqcK7yz.mjs";
29
29
  function Ee({
30
30
  subscription: t
@@ -470,7 +470,7 @@ const Fe = { class: "sv-subscription-cancellation-modal sv-subscription-cancella
470
470
  emits: ["top-up-charged", "auto-top-up-saved", "auto-top-up-cancelled", "payment-method-stored", "subscription-changed"],
471
471
  setup(t, { emit: o }) {
472
472
  const a = Q(
473
- () => import("../../SubscriptionSchedules-DDCjVEbG.mjs")
473
+ () => import("../../SubscriptionSchedules-Dc0rUnnf.mjs")
474
474
  ), n = t, i = o, { $t: s } = N(), {
475
475
  isCancellable: r,
476
476
  isRenewable: l,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("../../Button.vue.es-BWl37nzm.js"),L=require("../../ErrorNotification.vue.es-0ZC_DozN.js"),m=require("../../customElements-Bt8PbjIn.js"),Y=require("../../ContentWithAsideLayout-C6yMIVJF.js"),K=require("../../useActionDispatchProvider-B54GYEY7.js"),H=require("../../usePortal-BdM7hDge.js"),J=require("../../useSubscription-Q4C2DPhw.js"),Q=require("../../useCustomer-BJwJ9BkJ.js"),X=require("../../usePaymentMethods-GFmQRp0X.js"),Z=require("../../usePaymentMethodOptions-B6GIM9q4.js"),ee=require("../../useLoadInitialData-CezlvhBV.js"),te=require("../../invoices-CvpL4rv5.js"),E=require("../../pricingPlanSchedule-COfmWv_o.js"),ne=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Ct3ZNq-j.js"),ie=require("../../Divider.vue.es-UwnWvUTl.js"),ae=require("../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CxMkCmti.js"),T=require("../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B9WTpz0k.js"),oe=require("../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DXO9xpFT.js"),se=require("../../Section.vue.es-DuK52y67.js"),j=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),re=require("../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js"),ce=require("../../Modal.vue.es-Chi6_MH_.js"),ue=require("../../component-B7ZDyqBp.js");function le(){const{getInvoicePreview:t}=te.createInvoicesService(),a=m.useLogger(),n=e.ref(),o=e.ref(!1),c=e.ref(),p=m.createLatestGuard();return{invoice:n,isPending:o,error:c,load:async({subscription:u,enabledPricingIds:f})=>{const s=E.getScheduleCustomizations({enabledPricings:f.map(d=>({pricing_id:d})),pricingPlanScheduleInfos:u.pricing_plan_schedule_infos});if(!s){n.value=void 0;return}const i=p();o.value=!0,c.value=void 0;try{const d=await t({forExistingSubscription:!0,pricingPlanSubscriptionId:u.id,customizations:s});if(!i())return;n.value=d.invoice}catch(d){if(!i())return;a.error("INVOICE_PREVIEW_FAILED","Failed to preview the subscription upgrade",{},d),c.value=d,n.value=void 0}finally{i()&&(o.value=!1)}}}}function de(){const t=m.createRequestService(),a=m.useConfig();function n({scheduleId:c}){return t({url:`${a.apiUrls.config}/portal/pricing-plan-schedules/${c}/on-demand-pricing-items`})}function o({pricingPlanSubscriptionId:c,enabledPricings:p}){return t({url:`${a.apiUrls.config}/portal/pricing-plan-schedules`,options:{method:"POST"},data:{pricing_plan_subscription_id:c,enabled_pricings:p,start_at:new Date().toJSON()}})}return{getOnDemandPricingItems:n,createPricingPlanSchedule:o}}const me={class:"sv-subscription-management-form__body grid grid-cols-1 gap-4"},pe=e.defineComponent({__name:"SubscriptionManagementForm",props:e.mergeModels({pricingGroup:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},billingPeriod:{type:Object},currency:{type:String},disabled:{type:Boolean}},{enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:enabledPricingIds","update:paymentMethodId"]),setup(t,{emit:a}){const n=t,o=a,c=e.useModel(t,"enabledPricingIds"),p=e.useModel(t,"paymentMethodId"),{$t:_}=m.useIntl(),u=s=>{const i=s?Date.parse(s):NaN;return Number.isFinite(i)?i:0},f=e.computed(()=>[...n.paymentMethods??[]].sort((s,i)=>u(i.created_at)-u(s.created_at)));return e.watch(()=>n.paymentMethods,(s,i)=>{var P;const d=s==null?void 0:s.find(({id:b})=>!(i!=null&&i.some(B=>B.id===b)));if(d&&(i!=null&&i.length)){p.value=d.id;return}s!=null&&s.some(({id:b})=>b===p.value)||(p.value=(P=(s==null?void 0:s.find(({is_default:b})=>b))??f.value[0])==null?void 0:P.id)},{immediate:!0}),(s,i)=>(e.openBlock(),e.createElementBlock("form",{class:"sv-subscription-management-form",onSubmit:i[3]||(i[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",me,[e.createVNode(ae._sfc_main,{modelValue:c.value,"onUpdate:modelValue":i[0]||(i[0]=d=>c.value=d),class:"sv-subscription-management-form__pricing-group","group-name":t.pricingGroup.name,pricings:t.pricingGroup.pricings,"billing-period":t.billingPeriod,currency:t.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"]),e.createElementVNode("div",null,[e.createVNode(e.unref(ie._sfc_main),{spacing:"xs"})]),e.createVNode(T._sfc_main,{modelValue:p.value,"onUpdate:modelValue":i[1]||(i[1]=d=>p.value=d),class:"sv-subscription-management-form__payment-methods","payment-methods":f.value,"payment-method-options":t.paymentMethodOptions,required:"",disabled:t.disabled,label:e.unref(_)({defaultMessage:"Payment method",id:"subscription_management.payment_method_selector.label",description:"Label above the payment method that pays for the subscription change"}),onAddPaymentMethod:i[2]||(i[2]=d=>o("add-payment-method"))},null,8,["modelValue","payment-methods","payment-method-options","disabled","label"])])],32))}}),ge=e.defineComponent({__name:"TranslationOverride",props:{messages:{type:Object}},setup(t){const a=t,n=e.inject(m.TRANSLATION_SETTINGS_KEY,void 0),o=e.computed(()=>({...n==null?void 0:n.messages.value,...a.messages}));return(c,p)=>{var _,u;return e.openBlock(),e.createBlock(e.unref(m._sfc_main$2),{locale:(_=e.unref(n))==null?void 0:_.locale.value,"date-locale":(u=e.unref(n))==null?void 0:u.dateLocale.value,messages:o.value,"show-timezones":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["locale","date-locale","messages"])}}}),fe=e.defineComponent({__name:"SubscriptionManagementSummary",props:{invoice:{type:Object},isPending:{type:Boolean},hasError:{type:Boolean}},setup(t){const{$t:a}=m.useIntl(),n=e.computed(()=>({"invoice_preview.total_due_today_heading":a({defaultMessage:"Total due",id:"subscription_management.summary.total_due_heading",description:'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'})}));return(o,c)=>(e.openBlock(),e.createBlock(e.unref(se._sfc_main),{class:"sv-subscription-management-summary",title:e.unref(a)({defaultMessage:"Order summary",id:"subscription_management.summary.title",description:"Title of the block previewing what a subscription change is invoiced for"})},{default:e.withCtx(()=>[t.hasError?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management-summary__error sv-error",title:e.unref(a)({defaultMessage:"Unable to calculate the total. Please try again.",id:"subscription_management.summary.error",description:"Error shown when the invoice preview for a subscription change cannot be loaded"})},null,8,["title"])):t.isPending||!t.invoice?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"sv-subscription-management-summary__skeleton min-h-[120px]"},{default:e.withCtx(()=>[t.isPending?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,variant:"body-sm",color:"subtle",tag:"div",class:"sv-subscription-management-summary__empty-state"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Select your plan to see what it costs.",id:"subscription_management.summary.empty_state",description:"Shown in the order summary before a plan has been picked to preview"})),1)]),_:1}))]),_:1})):(e.openBlock(),e.createBlock(ge,{key:2,messages:n.value},{default:e.withCtx(()=>[e.createVNode(e.unref(oe._sfc_main$1),{class:"sv-subscription-management-summary__invoice",invoice:t.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1},8,["messages"]))]),_:1},8,["title"]))}}),_e={class:"sv-subscription-management-success grid grid-cols-1 gap-4"},ve={class:"sv-subscription-management-success__message"},be=e.defineComponent({__name:"SubscriptionManagementSuccess",props:{pricingGroupName:{type:String}},setup(t){const a=t,{$t:n}=m.useIntl(),o=e.computed(()=>n({defaultMessage:"Subscription updated",description:"Title shown on the manage subscription screen once the change is committed",id:"subscription_management.success.title"})),c=e.computed(()=>a.pricingGroupName?n({defaultMessage:"Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of the pricing group a committed subscription change applied to",id:"subscription_management.success.message"},{subject:a.pricingGroupName}):n({defaultMessage:"Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of a committed subscription change when the pricing group is not known",id:"subscription_management.success.message_generic"}));return(p,_)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(re._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[e.createElementVNode("span",ve,e.toDisplayString(c.value),1)]),_:1},8,["title"])]))}}),he=e.defineComponent({__name:"AddPaymentMethodModal",props:{showModal:{type:Boolean},customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean}},emits:["success","failure","close"],setup(t,{emit:a}){const n=a,{$t:o}=m.useIntl(),c=e.ref(),p=e.computed(()=>{var u;return!!((u=c.value)!=null&&u.isSaving)}),_=()=>{var u;(u=c.value)==null||u.submit()};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(ce.Modal),{"no-click-away":"",size:"lg","show-modal":t.showModal,"is-loading":p.value,title:e.unref(o)({defaultMessage:"Add payment method",id:"add_payment_method_modal.title",description:"Title of the modal for adding a payment method"}),"sub-title":e.unref(o)({defaultMessage:"Add a new payment method to pay with.",id:"add_payment_method_modal.subtitle",description:"Subtitle of the modal for adding a payment method"}),"confirm-button-text":e.unref(o)({defaultMessage:"Save payment method",id:"add_payment_method_modal.confirm_button.label",description:"Label of the button that stores the payment method being added"}),"cancel-button-text":e.unref(o)({defaultMessage:"Cancel",id:"add_payment_method_modal.cancel_button.label",description:"Label of the button that abandons adding a payment method"}),onConfirm:_,onClose:f[2]||(f[2]=s=>n("close"))},{body:e.withCtx(()=>[e.createVNode(T._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:c,class:"sv-add-payment-method-modal sv-add-payment-method-modal__form",customer:t.customer,"payment-method-options":t.paymentMethodOptions,"is-loading":t.isLoading,"is-active":t.showModal,onSuccess:f[0]||(f[0]=s=>n("success")),onFailure:f[1]||(f[1]=s=>n("failure",s))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:1},8,["show-modal","is-loading","title","sub-title","confirm-button-text","cancel-button-text"]))}}),ye={class:"sv-subscription-management__header"},we={class:"flex flex-col gap-2"},Se=e.defineComponent({__name:"SubscriptionManagement",props:{configuration:{type:Object}},setup(t){const a=t,{$t:n}=m.useIntl(),o=H.usePortal(),c=m.useLogger(),{dispatchAction:p}=K.useActionDispatchProvider(),{createPricingPlanSchedule:_}=de(),{subscription:u,get:f}=J.useSubscription({subscriptionId:a.configuration.subscriptionId}),{items:s,fetchAll:i}=X.usePaymentMethods({customerId:o.value.customer_id}),{customer:d,get:P}=Q.useCustomer({customerId:o.value.customer_id}),{paymentMethodOptions:b,get:B}=Z.usePaymentMethodOptions(),{isLoading:C}=ee.useLoadInitialData(f(),i(),P.execute(),B({customerId:o.value.customer_id})),k=e.ref(!1),D=async()=>{await i(),k.value=!1},N=e.computed(()=>{var r;return E.getActiveDefaultScheduleInfo(((r=u.value)==null?void 0:r.pricing_plan_schedule_infos)??[])}),w=e.computed(()=>{var h;const r=N.value;if(!r)return;const{enabledPricingId:l}=a.configuration;return(l?[l]:(((h=r.pricing_plan_schedule)==null?void 0:h.enabled_pricings)??[]).map(({pricing_id:g})=>g)).map(g=>E.getPricingGroupByPricingId({pricingPlanScheduleInfo:r,pricingId:g})).find(g=>!!g)}),U=e.computed(()=>{var r;return n({defaultMessage:"Manage {subject}",id:"subscription_management.title",description:"Title for the manage subscription page, naming the pricing group being changed"},{subject:((r=w.value)==null?void 0:r.name)||n({defaultMessage:"subscription",id:"subscription_management.title.default_subject",description:'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'})})}),y=e.ref([]),x=e.ref();e.watch([N,w],([r,l])=>{var q;const v=(((q=r==null?void 0:r.pricing_plan_schedule)==null?void 0:q.enabled_pricings)??[]).map(({pricing_id:S})=>S),{enabledPricingId:h}=a.configuration,g=((l==null?void 0:l.pricings)??[]).map(({id:S})=>S);y.value=h&&g.includes(h)?[...v.filter(S=>!g.includes(S)),h]:v},{immediate:!0});const{invoice:G,isPending:F,error:R,load:z}=le();e.watch([y,u],([r,l])=>{!l||r.length===0||z({subscription:l,enabledPricingIds:r})},{immediate:!0});const M=e.ref(!1),I=e.ref(),V=e.ref(!1),$=e.computed(()=>!C.value&&!M.value&&y.value.length>0&&!!u.value&&!!x.value),W=async()=>{if(!(!$.value||!u.value)){M.value=!0,I.value=void 0;try{await _({pricingPlanSubscriptionId:u.value.id,enabledPricings:y.value.map(r=>({pricing_id:r}))}),V.value=!0}catch(r){c.error("SUBSCRIPTION_UPDATE_FAILED","Failed to start a new pricing plan schedule",{},r),I.value=n({defaultMessage:"Something went wrong. Please try again.",id:"subscription_management.update_error",description:"Error shown when committing a subscription change fails"})}finally{M.value=!1}}},O=e.computed(()=>{var r,l,v;return((l=(r=N.value)==null?void 0:r.pricing_plan_schedule)==null?void 0:l.billing_period)??((v=u.value)==null?void 0:v.billing_period)});return(r,l)=>(e.openBlock(),e.createBlock(e.unref(Y.ContentWithAsideLayout),{class:"sv-subscription-management sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",ye,[e.createVNode(e.unref(m._sfc_main),{variant:"heading-2",tag:"h1",class:"sv-subscription-management__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U.value),1)]),_:1})])]),content:e.withCtx(()=>{var v,h;return[V.value?(e.openBlock(),e.createBlock(be,{key:0,class:"sv-subscription-management__success","pricing-group-name":(v=w.value)==null?void 0:v.name},null,8,["pricing-group-name"])):e.unref(C)?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"min-h-[220px]"})):w.value&&O.value?(e.openBlock(),e.createBlock(pe,{key:2,"enabled-pricing-ids":y.value,"onUpdate:enabledPricingIds":l[0]||(l[0]=g=>y.value=g),"payment-method-id":x.value,"onUpdate:paymentMethodId":l[1]||(l[1]=g=>x.value=g),class:"sv-subscription-management__form","pricing-group":w.value,"payment-methods":e.unref(s),"payment-method-options":e.unref(b),"billing-period":O.value,currency:(h=e.unref(u))==null?void 0:h.billing_currency,onAddPaymentMethod:l[2]||(l[2]=g=>k.value=!0)},null,8,["enabled-pricing-ids","payment-method-id","pricing-group","payment-methods","payment-method-options","billing-period","currency"])):e.createCommentVNode("",!0),e.createVNode(he,{"show-modal":k.value,customer:e.unref(d),"payment-method-options":e.unref(b),onSuccess:D,onClose:l[3]||(l[3]=g=>k.value=!1)},null,8,["show-modal","customer","payment-method-options"])]}),aside:e.withCtx(()=>[V.value?(e.openBlock(),e.createBlock(e.unref(A._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",type:"button",onClick:l[4]||(l[4]=v=>e.unref(p)({action:"navigate-to-customer-overview"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Done",id:"subscription_management.done_button.label",description:"Label of the button that leaves the manage subscription screen once the change is committed"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(fe,{class:"sv-subscription-management__summary",invoice:e.unref(G),"is-pending":e.unref(C)||e.unref(F),"has-error":!!e.unref(R)},null,8,["invoice","is-pending","has-error"]),I.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management__update-error sv-error",title:I.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(e.unref(A._sfc_main),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",type:"button",disabled:!$.value,loading:M.value,onClick:W},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Update subscription",id:"subscription_management.update_button.label",description:"Label of the button that commits the subscription change"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(ne._sfc_main$1,{class:"sv-subscription-management__kpi","payment-method-options":e.unref(b)},null,8,["payment-method-options"])])],64))]),_:1}))}}),Pe=e.defineComponent({__name:"SubscriptionManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const a=ue.getComponentName("subscription-management");return(n,o)=>(e.openBlock(),e.createBlock(e.unref(m._sfc_main$1),{entry:n.$props,"component-name":e.unref(a),"allowed-portal-types":["CUSTOMER"],onError:o[0]||(o[0]=c=>n.$emit("error",c))},{default:e.withCtx(()=>[e.createVNode(Se,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["entry","component-name"]))}}),{define:ke}=m.createSolvimonElement(Pe,"subscription-management");exports.defineSolvimonSubscriptionManagement=ke;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("../../Button.vue.es-M_jXZda4.js"),L=require("../../ErrorNotification.vue.es-Cd2UKPAz.js"),m=require("../../customElements-Vox1PB6G.js"),Y=require("../../ContentWithAsideLayout-C6yMIVJF.js"),K=require("../../useActionDispatchProvider-CNAuaHdm.js"),H=require("../../usePortal-DsebXdhx.js"),J=require("../../useSubscription-K_gP9TeX.js"),Q=require("../../useCustomer-DSx-wN-6.js"),X=require("../../usePaymentMethods-DNVw2eVg.js"),Z=require("../../usePaymentMethodOptions-cT1o-BA1.js"),ee=require("../../useLoadInitialData-DsabgMLZ.js"),te=require("../../invoices-xOV2YaEV.js"),E=require("../../pricingPlanSchedule-BM8vsKkV.js"),ne=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js"),ie=require("../../Divider.vue.es-UwnWvUTl.js"),ae=require("../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js"),T=require("../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js"),oe=require("../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js"),se=require("../../Section.vue.es-Btff-cLY.js"),j=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),re=require("../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js"),ce=require("../../Modal.vue.es-BD4vUaOQ.js"),ue=require("../../component-B7ZDyqBp.js");function le(){const{getInvoicePreview:t}=te.createInvoicesService(),a=m.useLogger(),n=e.ref(),o=e.ref(!1),c=e.ref(),p=m.createLatestGuard();return{invoice:n,isPending:o,error:c,load:async({subscription:u,enabledPricingIds:f})=>{const s=E.getScheduleCustomizations({enabledPricings:f.map(d=>({pricing_id:d})),pricingPlanScheduleInfos:u.pricing_plan_schedule_infos});if(!s){n.value=void 0;return}const i=p();o.value=!0,c.value=void 0;try{const d=await t({forExistingSubscription:!0,pricingPlanSubscriptionId:u.id,customizations:s});if(!i())return;n.value=d.invoice}catch(d){if(!i())return;a.error("INVOICE_PREVIEW_FAILED","Failed to preview the subscription upgrade",{},d),c.value=d,n.value=void 0}finally{i()&&(o.value=!1)}}}}function de(){const t=m.createRequestService(),a=m.useConfig();function n({scheduleId:c}){return t({url:`${a.apiUrls.config}/portal/pricing-plan-schedules/${c}/on-demand-pricing-items`})}function o({pricingPlanSubscriptionId:c,enabledPricings:p}){return t({url:`${a.apiUrls.config}/portal/pricing-plan-schedules`,options:{method:"POST"},data:{pricing_plan_subscription_id:c,enabled_pricings:p,start_at:new Date().toJSON()}})}return{getOnDemandPricingItems:n,createPricingPlanSchedule:o}}const me={class:"sv-subscription-management-form__body grid grid-cols-1 gap-4"},pe=e.defineComponent({__name:"SubscriptionManagementForm",props:e.mergeModels({pricingGroup:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},billingPeriod:{type:Object},currency:{type:String},disabled:{type:Boolean}},{enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:enabledPricingIds","update:paymentMethodId"]),setup(t,{emit:a}){const n=t,o=a,c=e.useModel(t,"enabledPricingIds"),p=e.useModel(t,"paymentMethodId"),{$t:_}=m.useIntl(),u=s=>{const i=s?Date.parse(s):NaN;return Number.isFinite(i)?i:0},f=e.computed(()=>[...n.paymentMethods??[]].sort((s,i)=>u(i.created_at)-u(s.created_at)));return e.watch(()=>n.paymentMethods,(s,i)=>{var P;const d=s==null?void 0:s.find(({id:b})=>!(i!=null&&i.some(B=>B.id===b)));if(d&&(i!=null&&i.length)){p.value=d.id;return}s!=null&&s.some(({id:b})=>b===p.value)||(p.value=(P=(s==null?void 0:s.find(({is_default:b})=>b))??f.value[0])==null?void 0:P.id)},{immediate:!0}),(s,i)=>(e.openBlock(),e.createElementBlock("form",{class:"sv-subscription-management-form",onSubmit:i[3]||(i[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",me,[e.createVNode(ae._sfc_main,{modelValue:c.value,"onUpdate:modelValue":i[0]||(i[0]=d=>c.value=d),class:"sv-subscription-management-form__pricing-group","group-name":t.pricingGroup.name,pricings:t.pricingGroup.pricings,"billing-period":t.billingPeriod,currency:t.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"]),e.createElementVNode("div",null,[e.createVNode(e.unref(ie._sfc_main),{spacing:"xs"})]),e.createVNode(T._sfc_main,{modelValue:p.value,"onUpdate:modelValue":i[1]||(i[1]=d=>p.value=d),class:"sv-subscription-management-form__payment-methods","payment-methods":f.value,"payment-method-options":t.paymentMethodOptions,required:"",disabled:t.disabled,label:e.unref(_)({defaultMessage:"Payment method",id:"subscription_management.payment_method_selector.label",description:"Label above the payment method that pays for the subscription change"}),onAddPaymentMethod:i[2]||(i[2]=d=>o("add-payment-method"))},null,8,["modelValue","payment-methods","payment-method-options","disabled","label"])])],32))}}),ge=e.defineComponent({__name:"TranslationOverride",props:{messages:{type:Object}},setup(t){const a=t,n=e.inject(m.TRANSLATION_SETTINGS_KEY,void 0),o=e.computed(()=>({...n==null?void 0:n.messages.value,...a.messages}));return(c,p)=>{var _,u;return e.openBlock(),e.createBlock(e.unref(m._sfc_main$2),{locale:(_=e.unref(n))==null?void 0:_.locale.value,"date-locale":(u=e.unref(n))==null?void 0:u.dateLocale.value,messages:o.value,"show-timezones":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["locale","date-locale","messages"])}}}),fe=e.defineComponent({__name:"SubscriptionManagementSummary",props:{invoice:{type:Object},isPending:{type:Boolean},hasError:{type:Boolean}},setup(t){const{$t:a}=m.useIntl(),n=e.computed(()=>({"invoice_preview.total_due_today_heading":a({defaultMessage:"Total due",id:"subscription_management.summary.total_due_heading",description:'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'})}));return(o,c)=>(e.openBlock(),e.createBlock(e.unref(se._sfc_main),{class:"sv-subscription-management-summary",title:e.unref(a)({defaultMessage:"Order summary",id:"subscription_management.summary.title",description:"Title of the block previewing what a subscription change is invoiced for"})},{default:e.withCtx(()=>[t.hasError?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management-summary__error sv-error",title:e.unref(a)({defaultMessage:"Unable to calculate the total. Please try again.",id:"subscription_management.summary.error",description:"Error shown when the invoice preview for a subscription change cannot be loaded"})},null,8,["title"])):t.isPending||!t.invoice?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"sv-subscription-management-summary__skeleton min-h-[120px]"},{default:e.withCtx(()=>[t.isPending?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,variant:"body-sm",color:"subtle",tag:"div",class:"sv-subscription-management-summary__empty-state"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Select your plan to see what it costs.",id:"subscription_management.summary.empty_state",description:"Shown in the order summary before a plan has been picked to preview"})),1)]),_:1}))]),_:1})):(e.openBlock(),e.createBlock(ge,{key:2,messages:n.value},{default:e.withCtx(()=>[e.createVNode(e.unref(oe._sfc_main$1),{class:"sv-subscription-management-summary__invoice",invoice:t.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1},8,["messages"]))]),_:1},8,["title"]))}}),_e={class:"sv-subscription-management-success grid grid-cols-1 gap-4"},ve={class:"sv-subscription-management-success__message"},be=e.defineComponent({__name:"SubscriptionManagementSuccess",props:{pricingGroupName:{type:String}},setup(t){const a=t,{$t:n}=m.useIntl(),o=e.computed(()=>n({defaultMessage:"Subscription updated",description:"Title shown on the manage subscription screen once the change is committed",id:"subscription_management.success.title"})),c=e.computed(()=>a.pricingGroupName?n({defaultMessage:"Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of the pricing group a committed subscription change applied to",id:"subscription_management.success.message"},{subject:a.pricingGroupName}):n({defaultMessage:"Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of a committed subscription change when the pricing group is not known",id:"subscription_management.success.message_generic"}));return(p,_)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(re._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[e.createElementVNode("span",ve,e.toDisplayString(c.value),1)]),_:1},8,["title"])]))}}),he=e.defineComponent({__name:"AddPaymentMethodModal",props:{showModal:{type:Boolean},customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean}},emits:["success","failure","close"],setup(t,{emit:a}){const n=a,{$t:o}=m.useIntl(),c=e.ref(),p=e.computed(()=>{var u;return!!((u=c.value)!=null&&u.isSaving)}),_=()=>{var u;(u=c.value)==null||u.submit()};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(ce.Modal),{"no-click-away":"",size:"lg","show-modal":t.showModal,"is-loading":p.value,title:e.unref(o)({defaultMessage:"Add payment method",id:"add_payment_method_modal.title",description:"Title of the modal for adding a payment method"}),"sub-title":e.unref(o)({defaultMessage:"Add a new payment method to pay with.",id:"add_payment_method_modal.subtitle",description:"Subtitle of the modal for adding a payment method"}),"confirm-button-text":e.unref(o)({defaultMessage:"Save payment method",id:"add_payment_method_modal.confirm_button.label",description:"Label of the button that stores the payment method being added"}),"cancel-button-text":e.unref(o)({defaultMessage:"Cancel",id:"add_payment_method_modal.cancel_button.label",description:"Label of the button that abandons adding a payment method"}),onConfirm:_,onClose:f[2]||(f[2]=s=>n("close"))},{body:e.withCtx(()=>[e.createVNode(T._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:c,class:"sv-add-payment-method-modal sv-add-payment-method-modal__form",customer:t.customer,"payment-method-options":t.paymentMethodOptions,"is-loading":t.isLoading,"is-active":t.showModal,onSuccess:f[0]||(f[0]=s=>n("success")),onFailure:f[1]||(f[1]=s=>n("failure",s))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:1},8,["show-modal","is-loading","title","sub-title","confirm-button-text","cancel-button-text"]))}}),ye={class:"sv-subscription-management__header"},we={class:"flex flex-col gap-2"},Se=e.defineComponent({__name:"SubscriptionManagement",props:{configuration:{type:Object}},setup(t){const a=t,{$t:n}=m.useIntl(),o=H.usePortal(),c=m.useLogger(),{dispatchAction:p}=K.useActionDispatchProvider(),{createPricingPlanSchedule:_}=de(),{subscription:u,get:f}=J.useSubscription({subscriptionId:a.configuration.subscriptionId}),{items:s,fetchAll:i}=X.usePaymentMethods({customerId:o.value.customer_id}),{customer:d,get:P}=Q.useCustomer({customerId:o.value.customer_id}),{paymentMethodOptions:b,get:B}=Z.usePaymentMethodOptions(),{isLoading:C}=ee.useLoadInitialData(f(),i(),P.execute(),B({customerId:o.value.customer_id})),k=e.ref(!1),D=async()=>{await i(),k.value=!1},N=e.computed(()=>{var r;return E.getActiveDefaultScheduleInfo(((r=u.value)==null?void 0:r.pricing_plan_schedule_infos)??[])}),w=e.computed(()=>{var h;const r=N.value;if(!r)return;const{enabledPricingId:l}=a.configuration;return(l?[l]:(((h=r.pricing_plan_schedule)==null?void 0:h.enabled_pricings)??[]).map(({pricing_id:g})=>g)).map(g=>E.getPricingGroupByPricingId({pricingPlanScheduleInfo:r,pricingId:g})).find(g=>!!g)}),U=e.computed(()=>{var r;return n({defaultMessage:"Manage {subject}",id:"subscription_management.title",description:"Title for the manage subscription page, naming the pricing group being changed"},{subject:((r=w.value)==null?void 0:r.name)||n({defaultMessage:"subscription",id:"subscription_management.title.default_subject",description:'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'})})}),y=e.ref([]),x=e.ref();e.watch([N,w],([r,l])=>{var q;const v=(((q=r==null?void 0:r.pricing_plan_schedule)==null?void 0:q.enabled_pricings)??[]).map(({pricing_id:S})=>S),{enabledPricingId:h}=a.configuration,g=((l==null?void 0:l.pricings)??[]).map(({id:S})=>S);y.value=h&&g.includes(h)?[...v.filter(S=>!g.includes(S)),h]:v},{immediate:!0});const{invoice:G,isPending:F,error:R,load:z}=le();e.watch([y,u],([r,l])=>{!l||r.length===0||z({subscription:l,enabledPricingIds:r})},{immediate:!0});const M=e.ref(!1),I=e.ref(),V=e.ref(!1),$=e.computed(()=>!C.value&&!M.value&&y.value.length>0&&!!u.value&&!!x.value),W=async()=>{if(!(!$.value||!u.value)){M.value=!0,I.value=void 0;try{await _({pricingPlanSubscriptionId:u.value.id,enabledPricings:y.value.map(r=>({pricing_id:r}))}),V.value=!0}catch(r){c.error("SUBSCRIPTION_UPDATE_FAILED","Failed to start a new pricing plan schedule",{},r),I.value=n({defaultMessage:"Something went wrong. Please try again.",id:"subscription_management.update_error",description:"Error shown when committing a subscription change fails"})}finally{M.value=!1}}},O=e.computed(()=>{var r,l,v;return((l=(r=N.value)==null?void 0:r.pricing_plan_schedule)==null?void 0:l.billing_period)??((v=u.value)==null?void 0:v.billing_period)});return(r,l)=>(e.openBlock(),e.createBlock(e.unref(Y.ContentWithAsideLayout),{class:"sv-subscription-management sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",ye,[e.createVNode(e.unref(m._sfc_main),{variant:"heading-2",tag:"h1",class:"sv-subscription-management__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U.value),1)]),_:1})])]),content:e.withCtx(()=>{var v,h;return[V.value?(e.openBlock(),e.createBlock(be,{key:0,class:"sv-subscription-management__success","pricing-group-name":(v=w.value)==null?void 0:v.name},null,8,["pricing-group-name"])):e.unref(C)?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"min-h-[220px]"})):w.value&&O.value?(e.openBlock(),e.createBlock(pe,{key:2,"enabled-pricing-ids":y.value,"onUpdate:enabledPricingIds":l[0]||(l[0]=g=>y.value=g),"payment-method-id":x.value,"onUpdate:paymentMethodId":l[1]||(l[1]=g=>x.value=g),class:"sv-subscription-management__form","pricing-group":w.value,"payment-methods":e.unref(s),"payment-method-options":e.unref(b),"billing-period":O.value,currency:(h=e.unref(u))==null?void 0:h.billing_currency,onAddPaymentMethod:l[2]||(l[2]=g=>k.value=!0)},null,8,["enabled-pricing-ids","payment-method-id","pricing-group","payment-methods","payment-method-options","billing-period","currency"])):e.createCommentVNode("",!0),e.createVNode(he,{"show-modal":k.value,customer:e.unref(d),"payment-method-options":e.unref(b),onSuccess:D,onClose:l[3]||(l[3]=g=>k.value=!1)},null,8,["show-modal","customer","payment-method-options"])]}),aside:e.withCtx(()=>[V.value?(e.openBlock(),e.createBlock(e.unref(A._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",type:"button",onClick:l[4]||(l[4]=v=>e.unref(p)({action:"navigate-to-customer-overview"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Done",id:"subscription_management.done_button.label",description:"Label of the button that leaves the manage subscription screen once the change is committed"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(fe,{class:"sv-subscription-management__summary",invoice:e.unref(G),"is-pending":e.unref(C)||e.unref(F),"has-error":!!e.unref(R)},null,8,["invoice","is-pending","has-error"]),I.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management__update-error sv-error",title:I.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(e.unref(A._sfc_main),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",type:"button",disabled:!$.value,loading:M.value,onClick:W},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Update subscription",id:"subscription_management.update_button.label",description:"Label of the button that commits the subscription change"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(ne._sfc_main$1,{class:"sv-subscription-management__kpi","payment-method-options":e.unref(b)},null,8,["payment-method-options"])])],64))]),_:1}))}}),Pe=e.defineComponent({__name:"SubscriptionManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const a=ue.getComponentName("subscription-management");return(n,o)=>(e.openBlock(),e.createBlock(e.unref(m._sfc_main$1),{entry:n.$props,"component-name":e.unref(a),"allowed-portal-types":["CUSTOMER"],onError:o[0]||(o[0]=c=>n.$emit("error",c))},{default:e.withCtx(()=>[e.createVNode(Se,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["entry","component-name"]))}}),{define:ke}=m.createSolvimonElement(Pe,"subscription-management");exports.defineSolvimonSubscriptionManagement=ke;
@@ -1,26 +1,26 @@
1
1
  import { ref as S, defineComponent as I, useModel as H, computed as _, watch as F, openBlock as m, createElementBlock as z, withModifiers as ce, createElementVNode as A, createVNode as h, unref as e, mergeModels as J, inject as le, createBlock as f, withCtx as b, renderSlot as de, createTextVNode as T, toDisplayString as C, createCommentVNode as R, Fragment as me } from "vue";
2
- import { _ as K } from "../../Button.vue.es-VQCd3V3C.mjs";
3
- import { _ as Q } from "../../ErrorNotification.vue.es-C6ngWAVU.mjs";
4
- import { b as X, g as ue, c as pe, a as ge, u as E, h as fe, i as be, _ as Z, d as ve, e as he } from "../../customElements-Com2NiGU.mjs";
2
+ import { _ as K } from "../../Button.vue.es-Dz-2L8dJ.mjs";
3
+ import { _ as Q } from "../../ErrorNotification.vue.es-BGckEwHf.mjs";
4
+ import { b as X, g as ue, c as pe, a as ge, u as E, h as fe, i as be, _ as Z, d as ve, e as he } from "../../customElements-CSE7dwUr.mjs";
5
5
  import { C as _e } from "../../ContentWithAsideLayout-Bnbsq8_5.mjs";
6
- import { u as ye } from "../../useActionDispatchProvider-e2lQXTid.mjs";
7
- import { u as we } from "../../usePortal-DDG9b6FI.mjs";
8
- import { u as Se } from "../../useSubscription-BJJYHYgr.mjs";
9
- import { u as Pe } from "../../useCustomer-CC9zxV6c.mjs";
10
- import { u as Me } from "../../usePaymentMethods-C3QfLSrP.mjs";
11
- import { u as Ie } from "../../usePaymentMethodOptions-BfnLBZOo.mjs";
12
- import { u as $e } from "../../useLoadInitialData-ux_wpNiR.mjs";
13
- import { c as Oe } from "../../invoices-CV9iAUHf.mjs";
14
- import { b as ke, c as Ce, d as Ae } from "../../pricingPlanSchedule-J1nb9pCu.mjs";
15
- import { a as Ee } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CS3KIkPL.mjs";
6
+ import { u as ye } from "../../useActionDispatchProvider-B8-oycQk.mjs";
7
+ import { u as we } from "../../usePortal-3VCZwSUE.mjs";
8
+ import { u as Se } from "../../useSubscription-DnL1wVh1.mjs";
9
+ import { u as Pe } from "../../useCustomer-CP8eWUZV.mjs";
10
+ import { u as Me } from "../../usePaymentMethods-CpzqXQUT.mjs";
11
+ import { u as Ie } from "../../usePaymentMethodOptions-B7JYkGsw.mjs";
12
+ import { u as $e } from "../../useLoadInitialData-MUljS38K.mjs";
13
+ import { c as Oe } from "../../invoices-DRgfpkJ6.mjs";
14
+ import { b as ke, c as Ce, d as Ae } from "../../pricingPlanSchedule-BPrS2WRd.mjs";
15
+ import { a as Ee } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs";
16
16
  import { _ as Le } from "../../Divider.vue.es-DnP_HqLz.mjs";
17
- import { _ as xe } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-skQMgHEL.mjs";
18
- import { _ as je, a as Ne } from "../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DJCMa2Lz.mjs";
19
- import { a as Te } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs";
20
- import { _ as Ue } from "../../Section.vue.es-By1JltGi.mjs";
17
+ import { _ as xe } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs";
18
+ import { _ as je, a as Ne } from "../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs";
19
+ import { a as Te } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs";
20
+ import { _ as Ue } from "../../Section.vue.es-DQ5H7mqW.mjs";
21
21
  import { _ as ee } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
22
- import { _ as Be } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs";
23
- import { M as Ve } from "../../Modal.vue.es-DSkC4eMv.mjs";
22
+ import { _ as Be } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs";
23
+ import { M as Ve } from "../../Modal.vue.es-B_G8NQS2.mjs";
24
24
  import { g as De } from "../../component-5wqcK7yz.mjs";
25
25
  function Ge() {
26
26
  const { getInvoicePreview: t } = Oe(), a = X(), n = S(), s = S(!1), c = S(), p = ue();
@@ -1,4 +1,4 @@
1
- import { g as f } from "./pricingPlanSchedule-J1nb9pCu.mjs";
1
+ import { g as f } from "./pricingPlanSchedule-BPrS2WRd.mjs";
2
2
  function l(t) {
3
3
  var e;
4
4
  return (e = t == null ? void 0 : t.pricing_plan_schedule_infos) == null ? void 0 : e.at(-1);
@@ -1 +1 @@
1
- const l=require("./pricingPlanSchedule-COfmWv_o.js");function g(t){var e;return(e=t==null?void 0:t.pricing_plan_schedule_infos)==null?void 0:e.at(-1)}function d(t){var e,n;return(n=(e=g(t))==null?void 0:e.pricing_plan_version)==null?void 0:n.pricing_plan}function f({subscription:t,fallback:e}){var n;return(t==null?void 0:t.name)||((n=d(t))==null?void 0:n.name)||e}function s(t,e){const n=[];function a(i){Array.isArray(i)?i.forEach(a):i&&typeof i=="object"&&(i.object_type==="PRICING"&&e.includes(i.id)&&n.push(i),Object.values(i).forEach(a))}return a(t),n}function o(t){return t.pricing_plan_schedule_infos.flatMap(e=>{var n;return((n=e.pricing_plan_version.pricing_categories)==null?void 0:n.flatMap(a=>a.pricing_groups??[]))??[]})}function _(t){var c;const e={trialStartDate:void 0,trialEndDate:void 0,subscriptionStartDate:void 0,subscriptionEndDate:void 0};if(!((c=t==null?void 0:t.pricing_plan_schedule_infos)!=null&&c.length))return e;const n=new Date,a=l.getFirstPricingPlanScheduleOfType({type:"TRIAL",pricingPlanScheduleInfos:t.pricing_plan_schedule_infos});if(a!=null&&a.start_at&&(e.trialStartDate=n,a.end_at)){const r=new Date(a.end_at).getTime()-new Date(a.start_at).getTime();e.trialEndDate=new Date(n.getTime()+r)}const i=l.getFirstPricingPlanScheduleOfType({type:"DEFAULT",pricingPlanScheduleInfos:t.pricing_plan_schedule_infos});if(i!=null&&i.start_at&&(e.trialEndDate?e.subscriptionStartDate=e.trialEndDate:e.subscriptionStartDate=n,i.end_at)){const r=new Date(i.end_at).getTime()-new Date(i.start_at).getTime();e.subscriptionEndDate=new Date(n.getTime()+r)}return e}exports.findPricingsByIds=s;exports.getFallbackTrialAndSubscriptionStartAndEndDates=_;exports.getMostRecentPricingPlan=d;exports.getMostRecentScheduleInfo=g;exports.getPricingGroupsFromExtendedPricingPlanSubscription=o;exports.getSubscriptionName=f;
1
+ const l=require("./pricingPlanSchedule-BM8vsKkV.js");function g(t){var e;return(e=t==null?void 0:t.pricing_plan_schedule_infos)==null?void 0:e.at(-1)}function d(t){var e,n;return(n=(e=g(t))==null?void 0:e.pricing_plan_version)==null?void 0:n.pricing_plan}function f({subscription:t,fallback:e}){var n;return(t==null?void 0:t.name)||((n=d(t))==null?void 0:n.name)||e}function s(t,e){const n=[];function a(i){Array.isArray(i)?i.forEach(a):i&&typeof i=="object"&&(i.object_type==="PRICING"&&e.includes(i.id)&&n.push(i),Object.values(i).forEach(a))}return a(t),n}function o(t){return t.pricing_plan_schedule_infos.flatMap(e=>{var n;return((n=e.pricing_plan_version.pricing_categories)==null?void 0:n.flatMap(a=>a.pricing_groups??[]))??[]})}function _(t){var c;const e={trialStartDate:void 0,trialEndDate:void 0,subscriptionStartDate:void 0,subscriptionEndDate:void 0};if(!((c=t==null?void 0:t.pricing_plan_schedule_infos)!=null&&c.length))return e;const n=new Date,a=l.getFirstPricingPlanScheduleOfType({type:"TRIAL",pricingPlanScheduleInfos:t.pricing_plan_schedule_infos});if(a!=null&&a.start_at&&(e.trialStartDate=n,a.end_at)){const r=new Date(a.end_at).getTime()-new Date(a.start_at).getTime();e.trialEndDate=new Date(n.getTime()+r)}const i=l.getFirstPricingPlanScheduleOfType({type:"DEFAULT",pricingPlanScheduleInfos:t.pricing_plan_schedule_infos});if(i!=null&&i.start_at&&(e.trialEndDate?e.subscriptionStartDate=e.trialEndDate:e.subscriptionStartDate=n,i.end_at)){const r=new Date(i.end_at).getTime()-new Date(i.start_at).getTime();e.subscriptionEndDate=new Date(n.getTime()+r)}return e}exports.findPricingsByIds=s;exports.getFallbackTrialAndSubscriptionStartAndEndDates=_;exports.getMostRecentPricingPlan=d;exports.getMostRecentScheduleInfo=g;exports.getPricingGroupsFromExtendedPricingPlanSubscription=o;exports.getSubscriptionName=f;
@@ -1,5 +1,5 @@
1
1
  import { w as s, a as f } from "./api.es-QaC926Xu.mjs";
2
- import { a as E, c as m } from "./customElements-Com2NiGU.mjs";
2
+ import { a as E, c as m } from "./customElements-CSE7dwUr.mjs";
3
3
  import { E as e } from "./component-5wqcK7yz.mjs";
4
4
  const a = "/portal/pricing-plan-subscriptions", N = {
5
5
  CANCEL: "NEXT_BILLING_PERIOD",
@@ -1 +1 @@
1
- const r=require("./api.es-duCDtZD9.js"),c=require("./customElements-Bt8PbjIn.js"),o=require("./component-B7ZDyqBp.js"),s="/portal/pricing-plan-subscriptions",N={CANCEL:"NEXT_BILLING_PERIOD",RENEW:"UNDO"};function P(){const e=c.useConfig(),i=c.createRequestService();function a({id:t,expanded:n=!1}){return i({url:`${e.apiUrls.config}${s}/${t}`,query:r.withExpand({expandParams:o.EXPAND_ALL,expand:n})})}function u({customerId:t,pagination:n}){const l=n??{},E=r.withExpand({initialParams:{customer_id:t,statuses:["ACTIVE"],type:"BILLING"},expandParams:o.EXPAND_ALL});return i({url:`${e.apiUrls.config}${s}`,query:r.withPagination(E,l),isCollection:!0})}function p({id:t,variant:n}){return i({url:`${e.apiUrls.config}${s}/${t}/cancel`,data:{type:N[n]},options:{method:"POST"}})}return{getSubscription:a,getActiveSubscriptions:u,setSubscriptionCancellation:p}}exports.createSubscriptionsService=P;
1
+ const r=require("./api.es-duCDtZD9.js"),c=require("./customElements-Vox1PB6G.js"),o=require("./component-B7ZDyqBp.js"),s="/portal/pricing-plan-subscriptions",N={CANCEL:"NEXT_BILLING_PERIOD",RENEW:"UNDO"};function P(){const e=c.useConfig(),i=c.createRequestService();function a({id:t,expanded:n=!1}){return i({url:`${e.apiUrls.config}${s}/${t}`,query:r.withExpand({expandParams:o.EXPAND_ALL,expand:n})})}function u({customerId:t,pagination:n}){const l=n??{},E=r.withExpand({initialParams:{customer_id:t,statuses:["ACTIVE"],type:"BILLING"},expandParams:o.EXPAND_ALL});return i({url:`${e.apiUrls.config}${s}`,query:r.withPagination(E,l),isCollection:!0})}function p({id:t,variant:n}){return i({url:`${e.apiUrls.config}${s}/${t}/cancel`,data:{type:N[n]},options:{method:"POST"}})}return{getSubscription:a,getActiveSubscriptions:u,setSubscriptionCancellation:p}}exports.createSubscriptionsService=P;
@@ -27,6 +27,7 @@ export interface CheckoutFormState {
27
27
  state: string | undefined;
28
28
  companyVatNumber: string | undefined;
29
29
  seatsValues: ConfiguredMeterValue[] | undefined;
30
+ unitsValues: ConfiguredMeterValue[] | undefined;
30
31
  promotionCode?: string;
31
32
  enabledPricingIds: Pricing['id'][] | undefined;
32
33
  }
@@ -3,6 +3,7 @@ export interface PlanCustomizationEditorProps {
3
3
  subscription: PricingPlanSubscriptionExpanded;
4
4
  enabledPricingIds: Pricing['id'][];
5
5
  initialSeatsValues?: ConfiguredMeterValue[];
6
+ initialUnitsValues?: ConfiguredMeterValue[];
6
7
  billingPeriod: BillingPeriod;
7
8
  currency?: Currency['currencyCode'];
8
9
  }
@@ -0,0 +1,6 @@
1
+ import { ConfiguredMeterValue, PricingExtended } from '../../../vendor/@solvimon/solvimon-types/index';
2
+ export interface UnitsEditorProps {
3
+ modelValue: ConfiguredMeterValue[];
4
+ initialUnitsValues?: ConfiguredMeterValue[];
5
+ pricings: PricingExtended[];
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ConfiguredMeterValue, PricingExtended } from '../../../vendor/@solvimon/solvimon-types/index';
2
+ export interface UnitsEditorItemProps {
3
+ modelValue: ConfiguredMeterValue;
4
+ defaultValue?: ConfiguredMeterValue;
5
+ pricings: PricingExtended[];
6
+ }
@@ -4,6 +4,7 @@ export interface LoadInvoicePreviewParams {
4
4
  subscriptionStartAt?: PricingPlanSchedule['start_at'];
5
5
  customer?: Partial<Customer>;
6
6
  seatsValues?: ConfiguredMeterValue[];
7
+ unitsValues?: ConfiguredMeterValue[];
7
8
  enabledPricingIds?: Pricing['id'][];
8
9
  promotionCode?: string | null;
9
10
  }
@@ -21,6 +21,6 @@ export interface InvoiceProps {
21
21
  isLoading: boolean;
22
22
  invoice: Invoice;
23
23
  payments?: Payment[];
24
- invoiceDownloadService: (id: Invoice['id']) => Promise<void>;
24
+ invoiceDownloadService: (invoice: Pick<Invoice, 'id' | 'invoice_number'>) => Promise<void>;
25
25
  configuration: InvoiceConfiguration;
26
26
  }
@@ -11,6 +11,6 @@ export interface InvoiceHeaderProps {
11
11
  isLoading: boolean;
12
12
  invoice: Invoice;
13
13
  payments?: Payment[];
14
- invoiceDownloadService: (id: Invoice['id']) => Promise<void>;
14
+ invoiceDownloadService: (invoice: Pick<Invoice, 'id' | 'invoice_number'>) => Promise<void>;
15
15
  configuration: InvoiceHeaderConfiguration;
16
16
  }
@@ -18,6 +18,6 @@ export interface PayInvoiceProps extends BaseScreenProps {
18
18
  paymentAttempts?: Payment[];
19
19
  countryCode?: string;
20
20
  amount?: Amount;
21
- downloadService?: (id: Invoice['id']) => Promise<void>;
21
+ downloadService?: (invoice: Pick<Invoice, 'id' | 'invoice_number'>) => Promise<void>;
22
22
  configuration: PayInvoiceConfiguration;
23
23
  }
@@ -1,5 +1,5 @@
1
1
  import { inject as t } from "vue";
2
- import { A as i } from "./customElements-Com2NiGU.mjs";
2
+ import { A as i } from "./customElements-CSE7dwUr.mjs";
3
3
  function c() {
4
4
  const o = t(i);
5
5
  if (!o)
@@ -1 +1 @@
1
- const i=require("vue"),e=require("./customElements-Bt8PbjIn.js");function o(){const t=i.inject(e.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!t)throw new Error("dispatchAction is not provided");return{dispatchAction:t}}exports.useActionDispatchProvider=o;
1
+ const i=require("vue"),e=require("./customElements-Vox1PB6G.js");function o(){const t=i.inject(e.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!t)throw new Error("dispatchAction is not provided");return{dispatchAction:t}}exports.useActionDispatchProvider=o;
@@ -1,5 +1,5 @@
1
1
  import { ref as i } from "vue";
2
- import { c as m } from "./customer-CKgMJEgv.mjs";
2
+ import { c as m } from "./customer-5krPxZ8i.mjs";
3
3
  import { u as s } from "./useService-Bh47bllz.mjs";
4
4
  function C({ customerId: r }) {
5
5
  const { getCustomer: u, updateCustomer: o } = m(), e = i(), { data: p, ...c } = s({
@@ -1 +1 @@
1
- const i=require("vue"),v=require("./customer-Q4JGfVfq.js"),u=require("./useService-H7BjLg8P.js");function m({customerId:r}){const{getCustomer:c,updateCustomer:a}=v.createCustomerService(),t=i.ref(),{data:C,...o}=u.useService({service:async()=>{const e=await c(r);return t.value=e,e}}),{data:d,...n}=u.useService({service:async e=>{const s=await a(r,e);return t.value=s,s}});return{customer:t,get:o,update:n}}exports.useCustomer=m;
1
+ const i=require("vue"),v=require("./customer-Dsq-Moea.js"),u=require("./useService-H7BjLg8P.js");function m({customerId:r}){const{getCustomer:c,updateCustomer:a}=v.createCustomerService(),t=i.ref(),{data:C,...o}=u.useService({service:async()=>{const e=await c(r);return t.value=e,e}}),{data:d,...n}=u.useService({service:async e=>{const s=await a(r,e);return t.value=s,s}});return{customer:t,get:o,update:n}}exports.useCustomer=m;