@solvimon/solvimon-web 0.1.0-alpha.17 → 0.1.0-alpha.19

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 (616) hide show
  1. package/README.md +91 -50
  2. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang--AVI4Q4E.js +1 -0
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Y3CzulQq.mjs +241 -0
  4. package/dist/Amount.vue.es-CRG-6dps.mjs +23 -0
  5. package/dist/Amount.vue.es-CeW8S7kT.js +1 -0
  6. package/dist/Avatar.vue.es-ClUBm_l5.js +1 -0
  7. package/dist/Avatar.vue.es-DJp6NEU_.mjs +91 -0
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BUMK11Dw.mjs} +15 -7
  9. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DzrInCPA.js +1 -0
  10. package/dist/Button.vue.es-BrWHdiEA.mjs +453 -0
  11. package/dist/Button.vue.es-aLcIdATK.js +1 -0
  12. package/dist/Chip.vue.es-DPGTweAr.mjs +164 -0
  13. package/dist/Chip.vue.es-q4c-DXXl.js +1 -0
  14. package/dist/Comparators.vue.es-CU32AC4n.mjs +120 -0
  15. package/dist/Comparators.vue.es-CfVGYJ_x.js +1 -0
  16. package/dist/ContextMenu.vue.es-BBPFQfqY.mjs +681 -0
  17. package/dist/ContextMenu.vue.es-C_TL7-kg.js +1 -0
  18. package/dist/CustomerBillingInformation.vue.es-CLmXk5B9.mjs +175 -0
  19. package/dist/CustomerBillingInformation.vue.es-s-LYXA4T.js +1 -0
  20. package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +1 -0
  21. package/dist/CustomerPaymentMethods.lib-CcSt0sl1.mjs +4 -0
  22. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B2CtcBm0.mjs} +17 -10
  23. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CMIVAoQq.js +1 -0
  24. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BP-VRwEM.js +1 -0
  25. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Bej5_H7r.mjs +3261 -0
  26. package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
  27. package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
  28. package/dist/DividerText.vue.es-D5ieOE1e.js +1 -0
  29. package/dist/DividerText.vue.es-DMg-DNgi.mjs +72 -0
  30. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-5I81Qr6q.js +1 -0
  31. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CTG5XdQt.mjs +562 -0
  32. package/dist/ErrorNotification.vue.es-BX3khKFc.js +1 -0
  33. package/dist/ErrorNotification.vue.es-C22Kt8Qn.mjs +30 -0
  34. package/dist/Expand.vue.es-C-lnbA1v.js +1 -0
  35. package/dist/Expand.vue.es-C4_XmqbR.mjs +50 -0
  36. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
  37. package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
  38. package/dist/IconButton.vue.es-CVFn0Ntj.js +1 -0
  39. package/dist/IconButton.vue.es-DcC4f5EQ.mjs +231 -0
  40. package/dist/IconTitle.vue.es-DoN4GVde.js +1 -0
  41. package/dist/IconTitle.vue.es-mQCMxc64.mjs +105 -0
  42. package/dist/Input.vue.es-C8VhMKuI.js +1 -0
  43. package/dist/Input.vue.es-Dp_RH03h.mjs +239 -0
  44. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-wxP5IaGt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-56fy6uY6.mjs} +2 -1
  45. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CLUcV3qa.js +1 -0
  46. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-flgEyaoj.js +1 -0
  47. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-ztaMeHQc.mjs +49 -0
  48. package/dist/InvoiceSummary.vue.es-emE-mCFh.js +1 -0
  49. package/dist/InvoiceSummary.vue.es-nCYeQ4tj.mjs +2558 -0
  50. package/dist/Modal.vue.es-5EpA4Q0t.mjs +367 -0
  51. package/dist/Modal.vue.es-CX5geho3.js +1 -0
  52. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B_IIOBjg.js +1 -0
  53. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-D7IX9qqy.mjs +155 -0
  54. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-C8nvN-6f.mjs +54 -0
  55. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D1oKZZ_m.js +1 -0
  56. package/dist/{PaymentHistoryBlock-BitwS9Re.mjs → PaymentHistoryBlock-Dejtgyos.mjs} +1 -1
  57. package/dist/{PaymentHistoryBlock-ZtmPXXwI.js → PaymentHistoryBlock-RBxlC5xt.js} +1 -1
  58. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BdfWchcQ.js +1 -0
  59. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dk52bjJd.mjs} +5 -1
  60. package/dist/{PaymentIntegrationForm-BZTzCUiu.js → PaymentIntegrationForm-BWr7iyU6.js} +1 -1
  61. package/dist/{PaymentIntegrationForm-BK2aLPCo.mjs → PaymentIntegrationForm-CbqfAdkc.mjs} +1 -1
  62. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D8fkE1yG.js +1 -0
  63. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJHwpswk.mjs +149 -0
  64. package/dist/PaymentIntegrationFormAdyen-BjPpoLF7.js +1 -0
  65. package/dist/PaymentIntegrationFormAdyen-CuRwe9_9.mjs +691 -0
  66. package/dist/PaymentIntegrationFormStripe-51KZc27R.js +1 -0
  67. package/dist/PaymentIntegrationFormStripe-JZw2m1kJ.mjs +545 -0
  68. package/dist/PaymentMethod.vue.es-CH__kPw4.mjs +636 -0
  69. package/dist/PaymentMethod.vue.es-uVZO0Zju.js +1 -0
  70. package/dist/PaymentMethodForm-C5WqTDow.mjs +4 -0
  71. package/dist/PaymentMethodForm-CBjHdZT7.js +1 -0
  72. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BktA5F4r.js +1 -0
  73. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DhPTbip8.mjs} +5 -2
  74. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DbTvbHk7.mjs} +80 -30
  75. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-XPz73RVU.js +1 -0
  76. package/dist/PricingGroupRangeInput.vue.es-A6eW-u2k.mjs +636 -0
  77. package/dist/PricingGroupRangeInput.vue.es-BuQeJCEX.js +1 -0
  78. package/dist/Section.vue.es-MEFUWCxU.mjs +79 -0
  79. package/dist/Section.vue.es-tLYXp-tF.js +1 -0
  80. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Jk34S5B7.js +1 -0
  81. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xvgyB2Yr.mjs +1050 -0
  82. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-B_Zkbqx2.mjs +6105 -0
  83. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CttBs_G8.js +1 -0
  84. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cj36jvZF.mjs} +17 -63
  85. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Dl5Lg39D.js +1 -0
  86. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CTnTWaB8.js +1 -0
  87. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CfXgGKXA.mjs} +8 -5
  88. package/dist/TooltipParagraph.vue.es-B5aHQv9O.mjs +136 -0
  89. package/dist/TooltipParagraph.vue.es-fSwKGXKg.js +1 -0
  90. package/dist/TrialChip.vue.es-0nrqSZeY.js +1 -0
  91. package/dist/TrialChip.vue.es-Fp7Lqo-b.mjs +56 -0
  92. package/dist/adyen-BMDZQBUG.js +1 -0
  93. package/dist/{url-BjZ1Pg0l.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
  94. package/dist/api.es-C5pe8LUl.mjs +62 -0
  95. package/dist/api.es-Czekkp_X.js +1 -0
  96. package/dist/cn.es-BLHlMR4Y.js +1 -0
  97. package/dist/cn.es-DB5pDpxS.mjs +3298 -0
  98. package/dist/comparators.es-9VsCB-JI.mjs +175 -0
  99. package/dist/comparators.es-wrKHduVq.js +1 -0
  100. package/dist/component-BG6DmXcy.mjs +9 -0
  101. package/dist/component-hDuDTBt5.js +1 -0
  102. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -3
  103. package/dist/components/BillingInformation/BillingInformation.cjs +1 -0
  104. package/dist/components/BillingInformation/{BillingInformation.es.js → BillingInformation.mjs} +15 -26
  105. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -3
  106. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -0
  107. package/dist/components/BillingInformationForm/{BillingInformationForm.es.js → BillingInformationForm.mjs} +42 -128
  108. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -3
  109. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -0
  110. package/dist/components/CustomerPaymentMethods/{CustomerPaymentMethods.es.js → CustomerPaymentMethods.mjs} +18 -51
  111. package/dist/components/Invoice/Invoice.ce.d.ts +1 -3
  112. package/dist/components/Invoice/Invoice.cjs +1 -0
  113. package/dist/components/Invoice/{Invoice.es.js → Invoice.mjs} +73 -79
  114. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -3
  115. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -0
  116. package/dist/components/InvoiceDetails/{InvoiceDetails.es.js → InvoiceDetails.mjs} +12 -24
  117. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +1 -3
  118. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -0
  119. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +73 -0
  120. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -3
  121. package/dist/components/InvoicesList/InvoicesList.cjs +1 -0
  122. package/dist/components/InvoicesList/{InvoicesList.es.js → InvoicesList.mjs} +12 -24
  123. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -3
  124. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -0
  125. package/dist/components/PaymentHistory/{PaymentHistory.es.js → PaymentHistory.mjs} +12 -24
  126. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -3
  127. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -0
  128. package/dist/components/PaymentMethodForm/{PaymentMethodForm.es.js → PaymentMethodForm.mjs} +15 -27
  129. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -3
  130. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -0
  131. package/dist/components/SubscriptionSchedules/{SubscriptionSchedules.es.js → SubscriptionSchedules.mjs} +13 -25
  132. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -3
  133. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -0
  134. package/dist/components/SubscriptionsList/{SubscriptionsList.es.js → SubscriptionsList.mjs} +22 -53
  135. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -3
  136. package/dist/components/WalletBalances/WalletBalances.cjs +1 -0
  137. package/dist/components/WalletBalances/{WalletBalances.es.js → WalletBalances.mjs} +31 -29
  138. package/dist/configuration-BjYwV4_B.js +1 -0
  139. package/dist/configuration-CD8cOXAJ.mjs +15 -0
  140. package/dist/core/action-request.types.d.ts +1 -67
  141. package/dist/core/configuration.d.ts +1 -3
  142. package/dist/core/index.cjs +1 -0
  143. package/dist/core/index.d.ts +1 -11
  144. package/dist/core/index.mjs +197 -0
  145. package/dist/core/registry.ce.d.ts +1 -2
  146. package/dist/core/registry.d.ts +1 -6
  147. package/dist/core/types.d.ts +1 -121
  148. package/dist/countryData.es--zJAd6LA.mjs +252 -0
  149. package/dist/countryData.es-D3MFzU92.js +1 -0
  150. package/dist/customElements-BTJzBHMy.js +1 -0
  151. package/dist/customElements-DdFA__me.mjs +6729 -0
  152. package/dist/{customer-DAgdegIW.mjs → customer-B0AMetq6.mjs} +1 -1
  153. package/dist/customer-D7HUfF3j.js +1 -0
  154. package/dist/customer.es-C_vSWcVA.mjs +30 -0
  155. package/dist/customer.es-D42Md24r.js +1 -0
  156. package/dist/en-US-BSrbFk5W.js +1 -0
  157. package/dist/en-US-D0P7NNNZ.mjs +228 -0
  158. package/dist/{en-US-DSzSbgL5.mjs → en-US-Daw3v6GD.mjs} +60 -30
  159. package/dist/en-US-scSQQXK8.js +1 -0
  160. package/dist/error-Cg-i7gGl.js +1 -0
  161. package/dist/error-DY_I2hPx.mjs +13 -0
  162. package/dist/floating-ui.vue.es-Bv94BfDm.js +1 -0
  163. package/dist/floating-ui.vue.es-DWY7pdz8.mjs +1573 -0
  164. package/dist/formatting.es-9hM8aHSg.js +1 -0
  165. package/dist/formatting.es-D-oVnc8H.mjs +68 -0
  166. package/dist/getComposedString.es-CELkn0I7.mjs +14 -0
  167. package/dist/getComposedString.es-DvSNX-_z.js +1 -0
  168. package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
  169. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
  170. package/dist/index-BJ3dHkSK.js +1 -0
  171. package/dist/index-C5bKRt7l.mjs +1069 -0
  172. package/dist/index.cjs +1 -0
  173. package/dist/index.d.ts +1 -17
  174. package/dist/index.es-0cystq8F.mjs +542 -0
  175. package/dist/index.es-2JWHHSgP.js +1 -0
  176. package/dist/index.mjs +42 -0
  177. package/dist/{invoices-BXDgW8ch.mjs → invoices-BSd-nKeE.mjs} +17 -16
  178. package/dist/invoices-BiqM6xN6.js +1 -0
  179. package/dist/{nl-NL-Li7RW89R.mjs → nl-NL-B4zEBFTw.mjs} +60 -52
  180. package/dist/nl-NL-B5tuyIOM.mjs +88 -0
  181. package/dist/nl-NL-Bs3d8q6T.js +1 -0
  182. package/dist/nl-NL-DIAZWDF9.js +1 -0
  183. package/dist/object.es-DFXiU9p3.js +1 -0
  184. package/dist/object.es-jvvnR8Kr.mjs +12 -0
  185. package/dist/{paymentMethods-xzFD2L30.mjs → paymentMethods-BsrkEbKT.mjs} +23 -19
  186. package/dist/paymentMethods-Cu2RzLgm.js +1 -0
  187. package/dist/{payments-DV6csRej.mjs → payments-B6Nfd6Al.mjs} +1 -1
  188. package/dist/payments-Bbm1HMQj.js +1 -0
  189. package/dist/pricing-3W7XLwL6.js +1 -0
  190. package/dist/pricing-CJxS2hr2.mjs +17 -0
  191. package/dist/pricingItemConfigs.es-BPIm6S8M.mjs +107 -0
  192. package/dist/pricingItemConfigs.es-C73cQlxQ.js +1 -0
  193. package/dist/{pricingPlanSchedule-C_cqUyTk.mjs → pricingPlanSchedule-CXG3CQ61.mjs} +3 -1
  194. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -3
  195. package/dist/screens/Checkout/Checkout.cjs +1 -0
  196. package/dist/screens/Checkout/{Checkout.es.js → Checkout.mjs} +1271 -630
  197. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -3
  198. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -0
  199. package/dist/screens/CustomerOverview/{CustomerOverview.es.js → CustomerOverview.mjs} +54 -81
  200. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +1 -3
  201. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -0
  202. package/dist/screens/PayInvoice/{PayInvoice.es.js → PayInvoice.mjs} +41 -32
  203. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +1 -3
  204. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -0
  205. package/dist/screens/PaymentMethodsManagement/{PaymentMethodsManagement.es.js → PaymentMethodsManagement.mjs} +35 -37
  206. package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +1 -3
  207. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -0
  208. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +885 -0
  209. package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +1 -3
  210. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -0
  211. package/dist/screens/SubscriptionManagement/{SubscriptionManagement.es.js → SubscriptionManagement.mjs} +45 -63
  212. package/dist/slots.es-BpwYO3A3.mjs +18 -0
  213. package/dist/slots.es-Dq1PTUOv.js +1 -0
  214. package/dist/sorting.es-CjTrRfSW.mjs +105 -0
  215. package/dist/sorting.es-RyvcgbSL.js +1 -0
  216. package/dist/{subscription-B4dBAY9C.mjs → subscription-C41lG-rH.mjs} +1 -1
  217. package/dist/subscriptions-B4BOzLxR.js +1 -0
  218. package/dist/subscriptions-C2C4WTuI.mjs +58 -0
  219. package/dist/typeGuards.es-C4nR5FkL.js +1 -0
  220. package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
  221. package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +19 -0
  222. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  223. package/dist/types/components/checkout/EmptyStatePlaceholder.types.d.ts +4 -0
  224. package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +8 -0
  225. package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +24 -0
  226. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +32 -0
  227. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +12 -0
  228. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +14 -0
  229. package/dist/types/components/payments/AddPaymentMethodPane/AddPaymentMethodPane.types.d.ts +19 -0
  230. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +74 -0
  231. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +9 -0
  232. package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +3 -0
  233. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +21 -0
  234. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +10 -0
  235. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +5 -0
  236. package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +4 -0
  237. package/dist/types/components/payments/PaymentFeedbackCard/PaymentFeedbackCard.types.d.ts +4 -0
  238. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +72 -0
  239. package/dist/types/components/payments/PaymentIntegrationFormAdyen/PaymentIntegrationFormAdyen.types.d.ts +6 -0
  240. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripe.types.d.ts +7 -0
  241. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +61 -0
  242. package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +53 -0
  243. package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +8 -0
  244. package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +3 -0
  245. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.d.ts +4 -0
  246. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +3 -0
  247. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +17 -0
  248. package/dist/types/components/providers/ActionDispatchProvider/composables/useActionDispatchProvider.d.ts +3 -0
  249. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +5 -0
  250. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +8 -0
  251. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +18 -0
  252. package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +3 -0
  253. package/dist/types/components/providers/AuthProvider/index.d.ts +3 -0
  254. package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +5 -0
  255. package/dist/types/components/providers/ConfigProvider/ConfigProvider.types.d.ts +9 -0
  256. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +18 -0
  257. package/dist/types/components/providers/ConfigProvider/composables/useConfig.d.ts +3 -0
  258. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.types.d.ts +3 -0
  259. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +18 -0
  260. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +10 -0
  261. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +22 -0
  262. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +17 -0
  263. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +5 -0
  264. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.types.d.ts +4 -0
  265. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +18 -0
  266. package/dist/types/components/providers/ExperimentalFeatureProvider/composables/useExperimentalFeature.d.ts +1 -0
  267. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +12 -0
  268. package/dist/types/components/providers/HostElementProvider/HostElementProvider.types.d.ts +3 -0
  269. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +18 -0
  270. package/dist/types/components/providers/HostElementProvider/composables/useHostElementProvider.d.ts +1 -0
  271. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +24 -0
  272. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +40 -0
  273. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +20 -0
  274. package/dist/types/components/providers/LoggerProvider/composables/useLogger.d.ts +6 -0
  275. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +7 -0
  276. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +11 -0
  277. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +18 -0
  278. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +3 -0
  279. package/dist/types/components/providers/Provider/Provider.types.d.ts +15 -0
  280. package/dist/types/components/providers/Provider/Provider.vue.d.ts +21 -0
  281. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +17 -0
  282. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +18 -0
  283. package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +9 -0
  284. package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +22 -0
  285. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +18 -0
  286. package/dist/types/components/providers/index.d.ts +9 -0
  287. package/dist/types/components/shared/ScreenTitle/ScreenTitle.types.d.ts +4 -0
  288. package/dist/types/components/shared/Section/Section.types.d.ts +21 -0
  289. package/dist/types/components/shared/Skeleton.types.d.ts +5 -0
  290. package/dist/types/components/shared/SlidingPanes/SlidingPanes.types.d.ts +12 -0
  291. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsList.types.d.ts +15 -0
  292. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +7 -0
  293. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +65 -0
  294. package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +5 -0
  295. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +8 -0
  296. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupContent.types.d.ts +4 -0
  297. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupEditorBase.types.d.ts +8 -0
  298. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +6 -0
  299. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +6 -0
  300. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTable.types.d.ts +5 -0
  301. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTableRow.types.d.ts +7 -0
  302. package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +12 -0
  303. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +47 -0
  304. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +28 -0
  305. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +7 -0
  306. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +7 -0
  307. package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +33 -0
  308. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
  309. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +13 -0
  310. package/dist/types/components/wallets/AutoTopUpCancellationModal/AutoTopUpCancellationModal.types.d.ts +9 -0
  311. package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +56 -0
  312. package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +16 -0
  313. package/dist/types/components/wallets/ConvertedAmountInput/ConvertedAmountInput.types.d.ts +32 -0
  314. package/dist/types/components/wallets/TopUpModal/TopUpInvoicePreview.types.d.ts +11 -0
  315. package/dist/types/components/wallets/TopUpModal/TopUpModal.types.d.ts +31 -0
  316. package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +23 -0
  317. package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +11 -0
  318. package/dist/types/components/wallets/WalletModalShell.types.d.ts +24 -0
  319. package/dist/types/composables/useInvoicePreview.types.d.ts +9 -0
  320. package/dist/types/config/config.beta.d.ts +2 -0
  321. package/dist/types/config/config.dev.d.ts +2 -0
  322. package/dist/types/config/config.live.d.ts +2 -0
  323. package/dist/types/config/internalEnvironments.d.ts +11 -0
  324. package/dist/types/config/internalEnvironments.published.d.ts +7 -0
  325. package/dist/types/config/lib.d.ts +6 -0
  326. package/dist/types/config/types.d.ts +13 -0
  327. package/dist/types/index.d.ts +23 -0
  328. package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -0
  329. package/dist/types/public/components/BillingInformation/BillingInformation.entry.types.d.ts +4 -0
  330. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +12 -0
  331. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -0
  332. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +4 -0
  333. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.types.d.ts +10 -0
  334. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -0
  335. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.types.d.ts +6 -0
  336. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +22 -0
  337. package/dist/types/public/components/CustomerWalletBalances/CustomerWalletBalances.types.d.ts +22 -0
  338. package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -0
  339. package/dist/types/public/components/Invoice/Invoice.entry.types.d.ts +5 -0
  340. package/dist/types/public/components/Invoice/Invoice.types.d.ts +26 -0
  341. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -0
  342. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +5 -0
  343. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +9 -0
  344. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -0
  345. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.types.d.ts +5 -0
  346. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +16 -0
  347. package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -0
  348. package/dist/types/public/components/InvoicesList/InvoicesList.entry.types.d.ts +5 -0
  349. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +37 -0
  350. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -0
  351. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +5 -0
  352. package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +10 -0
  353. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -0
  354. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +5 -0
  355. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +38 -0
  356. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -0
  357. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +5 -0
  358. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +9 -0
  359. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -0
  360. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.types.d.ts +5 -0
  361. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
  362. package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -0
  363. package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +5 -0
  364. package/dist/types/public/components/WalletBalances/WalletBalances.types.d.ts +3 -0
  365. package/dist/types/public/core/action-request.types.d.ts +55 -0
  366. package/dist/types/public/core/configuration.d.ts +3 -0
  367. package/dist/types/public/core/index.d.ts +14 -0
  368. package/dist/types/public/core/registry.ce.d.ts +8 -0
  369. package/dist/types/public/core/registry.d.ts +6 -0
  370. package/dist/types/public/core/types.d.ts +120 -0
  371. package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -0
  372. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +18 -0
  373. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +46 -0
  374. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -0
  375. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.types.d.ts +5 -0
  376. package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +2 -0
  377. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -0
  378. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.types.d.ts +4 -0
  379. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +23 -0
  380. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -0
  381. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.types.d.ts +3 -0
  382. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.types.d.ts +7 -0
  383. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -0
  384. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +6 -0
  385. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +23 -0
  386. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -0
  387. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.types.d.ts +5 -0
  388. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +13 -0
  389. package/dist/types/public/screens/types.d.ts +4 -0
  390. package/dist/types/public/types/index.d.ts +23 -0
  391. package/dist/types/services/invoices.types.d.ts +26 -0
  392. package/dist/types/services/paymentMethods.types.d.ts +31 -0
  393. package/dist/types/services/portals.types.d.ts +68 -0
  394. package/dist/types/services/requests.types.d.ts +24 -0
  395. package/dist/types/translations/supported.d.ts +1 -0
  396. package/dist/types/types/EntryBaseProps.d.ts +10 -0
  397. package/dist/types/types/errors.d.ts +7 -0
  398. package/dist/types/types/subscription.d.ts +4 -0
  399. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +111 -0
  400. package/dist/types/vendor/@solvimon/solvimon-types/types/Address.d.ts +17 -0
  401. package/dist/types/vendor/@solvimon/solvimon-types/types/Alerts.d.ts +72 -0
  402. package/dist/types/vendor/@solvimon/solvimon-types/types/Amount.d.ts +4 -0
  403. package/dist/types/vendor/@solvimon/solvimon-types/types/Api.d.ts +50 -0
  404. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiError.d.ts +7 -0
  405. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiKey.d.ts +21 -0
  406. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiStatus.d.ts +7 -0
  407. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +77 -0
  408. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +22 -0
  409. package/dist/types/vendor/@solvimon/solvimon-types/types/Attachment.d.ts +14 -0
  410. package/dist/types/vendor/@solvimon/solvimon-types/types/Band.d.ts +30 -0
  411. package/dist/types/vendor/@solvimon/solvimon-types/types/BaseResourceStatus.d.ts +3 -0
  412. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingEntity.d.ts +45 -0
  413. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingPeriod.d.ts +5 -0
  414. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingTime.d.ts +1 -0
  415. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +24 -0
  416. package/dist/types/vendor/@solvimon/solvimon-types/types/Commitment.d.ts +9 -0
  417. package/dist/types/vendor/@solvimon/solvimon-types/types/CommitmentItem.d.ts +17 -0
  418. package/dist/types/vendor/@solvimon/solvimon-types/types/Comparator.d.ts +1 -0
  419. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +12 -0
  420. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfiguredMeterValue.d.ts +9 -0
  421. package/dist/types/vendor/@solvimon/solvimon-types/types/Country.d.ts +1 -0
  422. package/dist/types/vendor/@solvimon/solvimon-types/types/CreateMeterData.d.ts +5 -0
  423. package/dist/types/vendor/@solvimon/solvimon-types/types/CreatePricingPlanVersion.d.ts +3 -0
  424. package/dist/types/vendor/@solvimon/solvimon-types/types/CreditType.d.ts +16 -0
  425. package/dist/types/vendor/@solvimon/solvimon-types/types/Currency.d.ts +8 -0
  426. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +39 -0
  427. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomerContact.d.ts +12 -0
  428. package/dist/types/vendor/@solvimon/solvimon-types/types/Customers.d.ts +75 -0
  429. package/dist/types/vendor/@solvimon/solvimon-types/types/Discount.d.ts +12 -0
  430. package/dist/types/vendor/@solvimon/solvimon-types/types/DiscountItem.d.ts +24 -0
  431. package/dist/types/vendor/@solvimon/solvimon-types/types/Document.d.ts +22 -0
  432. package/dist/types/vendor/@solvimon/solvimon-types/types/DueDateConfiguration.d.ts +8 -0
  433. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +16 -0
  434. package/dist/types/vendor/@solvimon/solvimon-types/types/Environment.d.ts +1 -0
  435. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTrace.d.ts +23 -0
  436. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceExtended.d.ts +22 -0
  437. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLink.d.ts +14 -0
  438. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLinkExtended.d.ts +15 -0
  439. package/dist/types/vendor/@solvimon/solvimon-types/types/Features.d.ts +25 -0
  440. package/dist/types/vendor/@solvimon/solvimon-types/types/IdentityProvider.d.ts +40 -0
  441. package/dist/types/vendor/@solvimon/solvimon-types/types/IndexingSettings.d.ts +24 -0
  442. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +367 -0
  443. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +349 -0
  444. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +22 -0
  445. package/dist/types/vendor/@solvimon/solvimon-types/types/Markup.d.ts +8 -0
  446. package/dist/types/vendor/@solvimon/solvimon-types/types/MarkupItem.d.ts +11 -0
  447. package/dist/types/vendor/@solvimon/solvimon-types/types/Meter.d.ts +32 -0
  448. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterConditions.d.ts +26 -0
  449. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterData.d.ts +25 -0
  450. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterDataExpanded.d.ts +5 -0
  451. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterProperty.d.ts +34 -0
  452. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyValue.d.ts +5 -0
  453. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValue.d.ts +16 -0
  454. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueCalculation.d.ts +20 -0
  455. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueValue.d.ts +7 -0
  456. package/dist/types/vendor/@solvimon/solvimon-types/types/ModelType.d.ts +1 -0
  457. package/dist/types/vendor/@solvimon/solvimon-types/types/Name.d.ts +5 -0
  458. package/dist/types/vendor/@solvimon/solvimon-types/types/NotificationPreferences.d.ts +9 -0
  459. package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +124 -0
  460. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +120 -0
  461. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAction.d.ts +74 -0
  462. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethod.d.ts +173 -0
  463. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethodOptions.d.ts +45 -0
  464. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentSchedules.d.ts +142 -0
  465. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -0
  466. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +118 -0
  467. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +58 -0
  468. package/dist/types/vendor/@solvimon/solvimon-types/types/Pricing.d.ts +41 -0
  469. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategory.d.ts +18 -0
  470. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategoryExtended.d.ts +9 -0
  471. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingExtended.d.ts +9 -0
  472. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingGroup.d.ts +29 -0
  473. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItem.d.ts +40 -0
  474. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +130 -0
  475. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +103 -0
  476. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +7 -0
  477. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleWithPlanData.d.ts +9 -0
  478. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +80 -0
  479. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscriptionGroup.d.ts +10 -0
  480. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersion.d.ts +71 -0
  481. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersionExtended.d.ts +7 -0
  482. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +44 -0
  483. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +22 -0
  484. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductCategory.d.ts +10 -0
  485. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +60 -0
  486. package/dist/types/vendor/@solvimon/solvimon-types/types/PromotionCodes.d.ts +14 -0
  487. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +43 -0
  488. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +93 -0
  489. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +65 -0
  490. package/dist/types/vendor/@solvimon/solvimon-types/types/ReprocessLog.d.ts +31 -0
  491. package/dist/types/vendor/@solvimon/solvimon-types/types/Resource.d.ts +5 -0
  492. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +2 -0
  493. package/dist/types/vendor/@solvimon/solvimon-types/types/Role.d.ts +19 -0
  494. package/dist/types/vendor/@solvimon/solvimon-types/types/SignatureRequest.d.ts +27 -0
  495. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxCategory.d.ts +1 -0
  496. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxIdentifier.d.ts +17 -0
  497. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxSummary.d.ts +21 -0
  498. package/dist/types/vendor/@solvimon/solvimon-types/types/TimePeriod.d.ts +5 -0
  499. package/dist/types/vendor/@solvimon/solvimon-types/types/Timestamp.d.ts +4 -0
  500. package/dist/types/vendor/@solvimon/solvimon-types/types/Token.d.ts +6 -0
  501. package/dist/types/vendor/@solvimon/solvimon-types/types/User.d.ts +106 -0
  502. package/dist/types/vendor/@solvimon/solvimon-types/types/ValueType.d.ts +1 -0
  503. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +44 -0
  504. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletAutoTopUpConfigs.d.ts +28 -0
  505. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletType.d.ts +54 -0
  506. package/dist/types/vendor/@solvimon/solvimon-types/types/Webhook.d.ts +48 -0
  507. package/dist/types/vendor/@solvimon/solvimon-types/types/WebhookEvent.d.ts +18 -0
  508. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +95 -0
  509. package/dist/types/vendor/@solvimon/solvimon-types/types/forms.d.ts +1 -0
  510. package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +17 -0
  511. package/dist/useActionDispatchProvider-Cz8xLLYA.js +1 -0
  512. package/dist/{useActionDispatchProvider-zB_GKeUR.mjs → useActionDispatchProvider-D55t_7LY.mjs} +1 -1
  513. package/dist/{useCustomer-VfeQ6rG2.mjs → useCustomer-BNhHz9RJ.mjs} +2 -2
  514. package/dist/{useCustomer-bO4D6e4Z.js → useCustomer-DYCpgA-3.js} +1 -1
  515. package/dist/useCustomerFormLabels-Cw6QpEJY.js +1 -0
  516. package/dist/useCustomerFormLabels-mX5QpApD.mjs +1142 -0
  517. package/dist/{useIncrementalLoading-C59FXHzp.mjs → useIncrementalLoading-BK9pRYAU.mjs} +6 -5
  518. package/dist/useIncrementalLoading-CdtGJm_Y.js +1 -0
  519. package/dist/{useInvoiceData-CxxkBTGY.js → useInvoiceData-BczeMpuk.js} +1 -1
  520. package/dist/{useInvoiceData-Dhg-hx8C.mjs → useInvoiceData-D-EvEioP.mjs} +2 -2
  521. package/dist/{useInvoicesList-DBz7T7sM.mjs → useInvoicesList-BJJYwkIA.mjs} +277 -31
  522. package/dist/useInvoicesList-rMg-8LbH.js +1 -0
  523. package/dist/{useLoadInitialData-BhpIg7OF.mjs → useLoadInitialData-BoGjdUu-.mjs} +1 -1
  524. package/dist/useLoadInitialData-CiJldX50.js +1 -0
  525. package/dist/{usePaymentMethodOptions-PcMjtMSF.mjs → usePaymentMethodOptions-d49aOdLB.mjs} +13 -3
  526. package/dist/usePaymentMethodOptions-fBvWYynV.js +1 -0
  527. package/dist/{usePaymentMethods-B5AbGWsn.mjs → usePaymentMethods-Bkouz8aQ.mjs} +2 -2
  528. package/dist/{usePaymentMethods-Bb1Xbads.js → usePaymentMethods-CFL3hFW_.js} +1 -1
  529. package/dist/usePayments-BKTNn_RN.js +1 -0
  530. package/dist/usePayments-BlliAt1E.mjs +262 -0
  531. package/dist/{usePortal-DWLtNqBB.mjs → usePortal-eyA4OqjU.mjs} +1 -1
  532. package/dist/usePortal-fhri8neB.js +1 -0
  533. package/dist/useService-D73FNBjT.js +1 -0
  534. package/dist/{useService-BZqFkz7p.mjs → useService-W3Kxems4.mjs} +24 -5
  535. package/dist/useSubscription--IGLmLS6.mjs +250 -0
  536. package/dist/useSubscription-V3KSuhOY.js +1 -0
  537. package/package.json +66 -49
  538. package/dist/ApiStatus-CyNDp_op.mjs +0 -9
  539. package/dist/ApiStatus-oqvUEWJx.js +0 -1
  540. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js +0 -1
  541. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js +0 -1
  542. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js +0 -1
  543. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs +0 -77
  544. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BbuEBiY3.js +0 -1
  545. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-dwIv_xxf.js +0 -1
  546. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-05NKI2A0.js +0 -1
  547. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-17v07F58.mjs +0 -27
  548. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js +0 -1
  549. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs +0 -1537
  550. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js +0 -1
  551. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js +0 -1
  552. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs +0 -156
  553. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js +0 -1
  554. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js +0 -1
  555. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js +0 -1
  556. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs +0 -217
  557. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BKz2QQn9.js +0 -1
  558. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BMXr26gF.mjs +0 -37
  559. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js +0 -1
  560. package/dist/component-CUJ_G2Nw.mjs +0 -962
  561. package/dist/component-CiKxWtdx.js +0 -1
  562. package/dist/components/BillingInformation/BillingInformation.cjs.js +0 -1
  563. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +0 -1
  564. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +0 -1
  565. package/dist/components/Invoice/Invoice.cjs.js +0 -1
  566. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +0 -1
  567. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +0 -1
  568. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +0 -123
  569. package/dist/components/InvoicesList/InvoicesList.cjs.js +0 -1
  570. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +0 -1
  571. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +0 -1
  572. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +0 -1
  573. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +0 -1
  574. package/dist/components/WalletBalances/WalletBalances.cjs.js +0 -1
  575. package/dist/core/index.cjs.js +0 -1
  576. package/dist/core/index.es.js +0 -6
  577. package/dist/customer-AfRcAZ5P.js +0 -1
  578. package/dist/en-US-QzQnGXP1.js +0 -1
  579. package/dist/index-CzL1ZcGi.mjs +0 -85
  580. package/dist/index-DRdBmZ2-.js +0 -1
  581. package/dist/index.cjs.js +0 -1
  582. package/dist/index.es.js +0 -51
  583. package/dist/invoices-BHgajZHq.js +0 -1
  584. package/dist/nl-NL-C4rr-1tr.js +0 -1
  585. package/dist/paymentMethods-BMcc-eTl.js +0 -1
  586. package/dist/payments-DMvmB5vg.js +0 -1
  587. package/dist/pricing-B1uImUm4.mjs +0 -19
  588. package/dist/pricing-BEjY_5wb.js +0 -1
  589. package/dist/registry-CeMxLjwU.js +0 -1
  590. package/dist/registry-CyENvS6l.mjs +0 -153
  591. package/dist/screens/Checkout/Checkout.cjs.js +0 -1
  592. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +0 -1
  593. package/dist/screens/PayInvoice/PayInvoice.cjs.js +0 -1
  594. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +0 -1
  595. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +0 -1
  596. package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +0 -542
  597. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +0 -1
  598. package/dist/solvimon-web.css +0 -1
  599. package/dist/subscriptions-CrNDM9qa.mjs +0 -79
  600. package/dist/subscriptions-DC-mxa17.js +0 -1
  601. package/dist/url-D8GJi5rF.js +0 -1
  602. package/dist/useActionDispatchProvider-bqR_FeM4.js +0 -1
  603. package/dist/useIncrementalLoading-BgWuwoMo.js +0 -1
  604. package/dist/useInvoicesList-BXZ9uV9i.js +0 -1
  605. package/dist/useLoadInitialData-BqiAFNFi.js +0 -1
  606. package/dist/usePaymentMethodOptions-DszFvgKX.js +0 -1
  607. package/dist/usePayments-DgoZoBZh.mjs +0 -36
  608. package/dist/usePayments-is5c66Z6.js +0 -1
  609. package/dist/usePortal-C4qWsJeq.js +0 -1
  610. package/dist/useService-DKm3QtT4.js +0 -1
  611. package/dist/useSubscription-CEZJw6wZ.mjs +0 -23
  612. package/dist/useSubscription-DuUNc1_l.js +0 -1
  613. package/dist/useTopUpModal-DNyWrHDv.mjs +0 -1012
  614. package/dist/useTopUpModal-DeF-cfCK.js +0 -1
  615. package/dist/vendor-ui-BoGKOJ36.mjs +0 -29826
  616. package/dist/vendor-ui-BuRqLx74.js +0 -1
@@ -1,1012 +0,0 @@
1
- import { ref, defineComponent, computed, watch, openBlock, createElementBlock, createElementVNode, createBlock, unref, withCtx, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, withModifiers, createVNode, onBeforeUnmount, createSlots, normalizeStyle, normalizeClass } from "vue";
2
- import { a0 as isFlexiblePricing, a1 as hasOneOfPricingTypes, u as useIntl, o as _sfc_main$3, e as _sfc_main$4, a2 as _sfc_main$5, a3 as _sfc_main$6, _ as _sfc_main$8, a4 as _sfc_main$9, a5 as _sfc_main$a, a6 as formatWalletBalanceValue, E as formatAmount, g as getCustomerCountry, M as Modal, c as _sfc_main$e } from "./vendor-ui-BoGKOJ36.mjs";
3
- import { c as createInvoicesService } from "./invoices-BXDgW8ch.mjs";
4
- import { u as useWatchDebounced } from "./useWatchDebounced-Zmxd6InB.mjs";
5
- import { a as useLogger } from "./component-CUJ_G2Nw.mjs";
6
- import { _ as _sfc_main$7 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
7
- import { _ as _sfc_main$b } from "./PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs";
8
- import { _ as _sfc_main$c } from "./url-BjZ1Pg0l.mjs";
9
- import { u as usePaymentMethodOptions } from "./usePaymentMethodOptions-PcMjtMSF.mjs";
10
- import { _ as _sfc_main$d } from "./PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs";
11
- const TOP_UP_MODAL_STEPS = ["TOP_UP", "ADD_PAYMENT_METHOD", "SUCCESS"];
12
- const isChargeOnDemandPricingItem = (entry) => typeof entry === "object" && entry !== null && "pricing_item" in entry;
13
- const getTopUpPricingItems = (walletBalanceItem) => ((walletBalanceItem == null ? void 0 : walletBalanceItem.charge_on_demand_pricing_items) ?? []).flatMap((entry) => {
14
- var _a, _b;
15
- if (!isChargeOnDemandPricingItem(entry)) {
16
- return [];
17
- }
18
- const pricingItemId = entry.pricing_item_id ?? ((_a = entry.pricing_item) == null ? void 0 : _a.id);
19
- if (!pricingItemId) {
20
- return [];
21
- }
22
- return (((_b = entry.pricing_item) == null ? void 0 : _b.configs) ?? []).map((config) => {
23
- const flexiblePricing = getFlexiblePricing(config, walletBalanceItem);
24
- const fixedPricing = getFixedPricing(config, walletBalanceItem);
25
- return {
26
- pricingItemId,
27
- ...entry.pricing_plan_schedule_id && {
28
- pricingPlanScheduleId: entry.pricing_plan_schedule_id
29
- },
30
- config,
31
- ...flexiblePricing && { flexiblePricing },
32
- ...fixedPricing && { fixedPricing }
33
- };
34
- });
35
- });
36
- function getFixedPricing(config, walletBalanceItem) {
37
- var _a, _b, _c;
38
- if (!config.on_demand || !hasOneOfPricingTypes(config, ["FIXED"])) {
39
- return void 0;
40
- }
41
- const amount = (_c = (_b = (_a = config.details) == null ? void 0 : _a.bands) == null ? void 0 : _b[0]) == null ? void 0 : _c.fixed_amount;
42
- if (!amount) {
43
- return void 0;
44
- }
45
- const walletCredits = getWalletCredits(walletBalanceItem);
46
- const grantedCredits = walletCredits ? getGrantedCredits(config, walletBalanceItem) : void 0;
47
- return {
48
- amount,
49
- value: grantedCredits && walletCredits ? toCreditsValue(grantedCredits.quantity, walletCredits) : { amount }
50
- };
51
- }
52
- const getWalletCredits = (walletBalanceItem) => {
53
- var _a;
54
- return (_a = walletBalanceItem == null ? void 0 : walletBalanceItem.wallet_balance.balance) == null ? void 0 : _a.credits;
55
- };
56
- const getWalletGrants = (config, walletBalanceItem) => {
57
- const walletTypeId = walletBalanceItem == null ? void 0 : walletBalanceItem.wallet_type_id;
58
- return (config.wallet_grants ?? []).filter(
59
- ({ wallet_type_id }) => !walletTypeId || wallet_type_id === walletTypeId
60
- );
61
- };
62
- const getCreditsConversion = (config, walletBalanceItem) => {
63
- var _a, _b;
64
- return (_b = (_a = getWalletGrants(config, walletBalanceItem).find(({ credits_grant }) => credits_grant == null ? void 0 : credits_grant.conversion)) == null ? void 0 : _a.credits_grant) == null ? void 0 : _b.conversion;
65
- };
66
- const getGrantedCredits = (config, walletBalanceItem) => {
67
- var _a, _b;
68
- return (_b = (_a = getWalletGrants(config, walletBalanceItem).find(({ credits_grant }) => credits_grant == null ? void 0 : credits_grant.credits)) == null ? void 0 : _a.credits_grant) == null ? void 0 : _b.credits;
69
- };
70
- const toCreditsValue = (quantity, walletCredits) => ({ credits: { ...walletCredits, quantity } });
71
- const toCreditsQuantity = (quantity, rate) => {
72
- const parsedQuantity = Number(quantity);
73
- const parsedRate = Number(rate);
74
- return Number.isFinite(parsedQuantity) && Number.isFinite(parsedRate) ? String(parsedQuantity * parsedRate) : void 0;
75
- };
76
- function getFlexiblePricing(config, walletBalanceItem) {
77
- var _a, _b, _c, _d, _e, _f, _g;
78
- if (!config.on_demand || !isFlexiblePricing(config)) {
79
- return void 0;
80
- }
81
- const band = (_b = (_a = config.details) == null ? void 0 : _a.bands) == null ? void 0 : _b[0];
82
- const currency = ((_c = band == null ? void 0 : band.minimum_amount) == null ? void 0 : _c.currency) ?? ((_d = band == null ? void 0 : band.maximum_amount) == null ? void 0 : _d.currency) ?? ((_f = (_e = walletBalanceItem == null ? void 0 : walletBalanceItem.wallet_balance.balance) == null ? void 0 : _e.amount) == null ? void 0 : _f.currency);
83
- if (!currency) {
84
- return void 0;
85
- }
86
- const credits = getWalletCredits(walletBalanceItem);
87
- const conversion = credits ? getCreditsConversion(config, walletBalanceItem) : void 0;
88
- const unitName = (_g = credits == null ? void 0 : credits.credit_type) == null ? void 0 : _g.unit_name;
89
- const toBound = (amount) => {
90
- if (!amount) {
91
- return void 0;
92
- }
93
- const quantity = credits && conversion ? toCreditsQuantity(amount.quantity, conversion.rate) : void 0;
94
- return quantity !== void 0 && credits ? toCreditsValue(quantity, credits) : { amount };
95
- };
96
- return {
97
- config: {
98
- ...(band == null ? void 0 : band.minimum_amount) && { minimum_amount: band.minimum_amount },
99
- ...(band == null ? void 0 : band.maximum_amount) && { maximum_amount: band.maximum_amount }
100
- },
101
- currency,
102
- ...conversion && {
103
- creditsConfiguration: {
104
- conversionRate: conversion.rate,
105
- ...(unitName == null ? void 0 : unitName.singular) && { unitNameSingle: unitName.singular },
106
- ...(unitName == null ? void 0 : unitName.plural) && { unitNamePlural: unitName.plural }
107
- }
108
- },
109
- bounds: {
110
- ...toBound(band == null ? void 0 : band.minimum_amount) && { minimum: toBound(band == null ? void 0 : band.minimum_amount) },
111
- ...toBound(band == null ? void 0 : band.maximum_amount) && { maximum: toBound(band == null ? void 0 : band.maximum_amount) }
112
- }
113
- };
114
- }
115
- const getTopUpValue = (item, amount) => {
116
- var _a;
117
- if (item.fixedPricing) {
118
- return item.fixedPricing.value;
119
- }
120
- if (!item.flexiblePricing || !amount) {
121
- return void 0;
122
- }
123
- const { bounds, creditsConfiguration } = item.flexiblePricing;
124
- const credits = (_a = bounds.minimum ?? bounds.maximum) == null ? void 0 : _a.credits;
125
- const quantity = creditsConfiguration ? toCreditsQuantity(amount.quantity, creditsConfiguration.conversionRate) : void 0;
126
- return credits && quantity !== void 0 ? toCreditsValue(quantity, credits) : { amount };
127
- };
128
- const PREVIEW_DEBOUNCE_MS = 400;
129
- function useTopUpInvoicePreview({
130
- pricingPlanScheduleId,
131
- pricingItems
132
- }) {
133
- const { previewChargeOnDemandPricingItems } = createInvoicesService();
134
- const logger = useLogger();
135
- const invoicePreview = ref();
136
- const isPreviewPending = ref(false);
137
- let latestRequestId = 0;
138
- const loadPreview = async () => {
139
- const scheduleId = pricingPlanScheduleId.value;
140
- const requestId = ++latestRequestId;
141
- if (!scheduleId || !pricingItems.value) {
142
- if (pricingItems.value && !scheduleId) {
143
- logger.warn(
144
- "INVOICE_PREVIEW_SKIPPED",
145
- "Skipped the top-up invoice preview: no schedule to charge it on",
146
- { missing: ["pricingPlanScheduleId"] }
147
- );
148
- }
149
- invoicePreview.value = void 0;
150
- isPreviewPending.value = false;
151
- return;
152
- }
153
- isPreviewPending.value = true;
154
- try {
155
- const invoice = await previewChargeOnDemandPricingItems({
156
- pricingPlanScheduleId: scheduleId,
157
- pricingItems: pricingItems.value
158
- });
159
- if (requestId === latestRequestId) {
160
- invoicePreview.value = invoice;
161
- }
162
- } catch (error) {
163
- if (requestId === latestRequestId) {
164
- invoicePreview.value = void 0;
165
- }
166
- logger.error(
167
- "INVOICE_PREVIEW_FAILED",
168
- "Failed to load top-up invoice preview",
169
- {},
170
- error
171
- );
172
- } finally {
173
- if (requestId === latestRequestId) {
174
- isPreviewPending.value = false;
175
- }
176
- }
177
- };
178
- useWatchDebounced(pricingItems, () => void loadPreview(), {
179
- debounce: PREVIEW_DEBOUNCE_MS,
180
- deep: true
181
- });
182
- void loadPreview();
183
- return { invoicePreview, isPreviewPending, loadPreview };
184
- }
185
- const _hoisted_1$2 = { class: "sv-top-up-form" };
186
- const _hoisted_2$2 = { class: "grid grid-cols-1 gap-4" };
187
- const _hoisted_3$1 = { class: "grid grid-cols-1 gap-1" };
188
- const _hoisted_4$1 = { class: "sv-top-up-form__option-details" };
189
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
190
- __name: "TopUpModalForm",
191
- props: {
192
- topUpPricingItems: { type: null },
193
- paymentMethods: { type: Array }
194
- },
195
- emits: ["add-payment-method", "success", "failure"],
196
- setup(__props, { expose: __expose, emit: __emit }) {
197
- const props = __props;
198
- const emit = __emit;
199
- const { $t, formatNumber } = useIntl();
200
- const model = ref({
201
- pricing_plan_schedule_id: "",
202
- pricing_items: [],
203
- start_at: "",
204
- finalize_immediately: false,
205
- payment_method_id: void 0,
206
- preview: true
207
- });
208
- const chargeableItems = computed(
209
- () => (props.topUpPricingItems ?? []).filter((item) => item.flexiblePricing || item.fixedPricing)
210
- );
211
- const findItem = (pricingItemId) => chargeableItems.value.find((item) => item.pricingItemId === pricingItemId);
212
- const pricingPlanScheduleId = computed(
213
- () => {
214
- var _a, _b;
215
- return (_b = (_a = props.topUpPricingItems) == null ? void 0 : _a.find((item) => item.pricingPlanScheduleId)) == null ? void 0 : _b.pricingPlanScheduleId;
216
- }
217
- );
218
- watch(
219
- pricingPlanScheduleId,
220
- (scheduleId) => {
221
- model.value.pricing_plan_schedule_id = scheduleId ?? "";
222
- },
223
- { immediate: true }
224
- );
225
- const getInitialAmount = (item) => {
226
- const { config, currency } = item.flexiblePricing ?? {};
227
- const minimum = config == null ? void 0 : config.minimum_amount;
228
- return minimum && currency ? { quantity: minimum.quantity, currency } : void 0;
229
- };
230
- const selectedPricingItemId = computed({
231
- get: () => {
232
- var _a;
233
- return (_a = model.value.pricing_items[0]) == null ? void 0 : _a.pricing_item_id;
234
- },
235
- set: (value) => {
236
- const item = findItem(typeof value === "string" ? value : void 0);
237
- if (!item) {
238
- model.value.pricing_items = [];
239
- return;
240
- }
241
- const initialAmount = getInitialAmount(item);
242
- model.value.pricing_items = [
243
- {
244
- pricing_item_id: item.pricingItemId,
245
- ...initialAmount && { flexible_amount: initialAmount }
246
- }
247
- ];
248
- }
249
- });
250
- watch(
251
- chargeableItems,
252
- (items) => {
253
- var _a;
254
- const chosenIsStillOffered = items.some(
255
- ({ pricingItemId }) => {
256
- var _a2;
257
- return pricingItemId === ((_a2 = model.value.pricing_items[0]) == null ? void 0 : _a2.pricing_item_id);
258
- }
259
- );
260
- if (chosenIsStillOffered) {
261
- return;
262
- }
263
- selectedPricingItemId.value = (_a = items.find(
264
- ({ flexiblePricing }) => flexiblePricing
265
- )) == null ? void 0 : _a.pricingItemId;
266
- },
267
- { immediate: true }
268
- );
269
- const flexibleAmount = computed({
270
- get: () => {
271
- var _a;
272
- return (_a = model.value.pricing_items[0]) == null ? void 0 : _a.flexible_amount;
273
- },
274
- set: (amount) => {
275
- var _a;
276
- const pricingItemId = (_a = model.value.pricing_items[0]) == null ? void 0 : _a.pricing_item_id;
277
- if (!pricingItemId) {
278
- return;
279
- }
280
- model.value.pricing_items = [
281
- { pricing_item_id: pricingItemId, ...amount && { flexible_amount: amount } }
282
- ];
283
- }
284
- });
285
- const formatValue = (value) => formatWalletBalanceValue($t, formatNumber, value);
286
- const getCostLabel = (optionValue) => {
287
- var _a;
288
- const fixedPricing = (_a = findItem(String(optionValue))) == null ? void 0 : _a.fixedPricing;
289
- return (fixedPricing == null ? void 0 : fixedPricing.value.credits) ? formatAmount(fixedPricing.amount) : void 0;
290
- };
291
- const flexiblePricingFor = (optionValue) => {
292
- var _a;
293
- const flexiblePricing = (_a = findItem(String(optionValue))) == null ? void 0 : _a.flexiblePricing;
294
- return flexiblePricing ? [flexiblePricing] : [];
295
- };
296
- const isFlexibleOption = (optionValue) => {
297
- var _a;
298
- return !!((_a = findItem(String(optionValue))) == null ? void 0 : _a.flexiblePricing);
299
- };
300
- const options = computed(
301
- () => chargeableItems.value.map((item) => {
302
- var _a;
303
- return {
304
- value: item.pricingItemId,
305
- label: item.fixedPricing ? formatValue(item.fixedPricing.value) : $t({
306
- defaultMessage: "Choose your own amount",
307
- description: "Label of the choose-your-amount option in the top-up modal",
308
- id: "topup_modal.flexible_option.label"
309
- }),
310
- ...((_a = item.flexiblePricing) == null ? void 0 : _a.bounds.minimum) && item.flexiblePricing.bounds.maximum && {
311
- description: $t(
312
- {
313
- defaultMessage: "Between {minimum} and {maximum}",
314
- description: "Bounds of the choose-your-amount option in the top-up modal",
315
- id: "topup_modal.flexible_option.bounds"
316
- },
317
- {
318
- minimum: formatValue(item.flexiblePricing.bounds.minimum),
319
- maximum: formatValue(item.flexiblePricing.bounds.maximum)
320
- }
321
- )
322
- }
323
- };
324
- })
325
- );
326
- const pricingItems = computed(() => {
327
- const chargeable = model.value.pricing_items.filter(
328
- (item) => {
329
- var _a;
330
- return !((_a = findItem(item.pricing_item_id)) == null ? void 0 : _a.flexiblePricing) || !!item.flexible_amount;
331
- }
332
- );
333
- return chargeable.length > 0 ? chargeable : void 0;
334
- });
335
- const { invoicePreview } = useTopUpInvoicePreview({ pricingPlanScheduleId, pricingItems });
336
- const { chargeOnDemandPricingItems } = createInvoicesService();
337
- const logger = useLogger();
338
- const isCharging = ref(false);
339
- const canSubmit = computed(() => !!model.value.pricing_plan_schedule_id && !!pricingItems.value);
340
- const chargedValue = computed(() => {
341
- const [chargedItem] = model.value.pricing_items;
342
- const item = findItem(chargedItem == null ? void 0 : chargedItem.pricing_item_id);
343
- return item ? getTopUpValue(item, chargedItem == null ? void 0 : chargedItem.flexible_amount) : void 0;
344
- });
345
- async function submit() {
346
- if (!canSubmit.value || isCharging.value) {
347
- return;
348
- }
349
- isCharging.value = true;
350
- try {
351
- const invoice = await chargeOnDemandPricingItems({
352
- pricing_plan_schedule_id: model.value.pricing_plan_schedule_id,
353
- pricing_items: pricingItems.value ?? [],
354
- payment_method_id: model.value.payment_method_id,
355
- preview: false
356
- });
357
- emit("success", invoice);
358
- } catch (error) {
359
- logger.error("TOP_UP_FAILED", "Failed to charge the wallet top-up", {}, error);
360
- emit("failure", error);
361
- } finally {
362
- isCharging.value = false;
363
- }
364
- }
365
- __expose({ submit, isCharging, canSubmit, chargedValue });
366
- const selectedPaymentMethodId = computed({
367
- get: () => model.value.payment_method_id ?? void 0,
368
- set: (paymentMethodId) => {
369
- model.value.payment_method_id = paymentMethodId;
370
- }
371
- });
372
- const toTime = (createdAt) => {
373
- const parsed = Date.parse(createdAt ?? "");
374
- return Number.isFinite(parsed) ? parsed : 0;
375
- };
376
- const sortedPaymentMethods = computed(
377
- () => [...props.paymentMethods ?? []].sort((a, b) => toTime(b.created_at) - toTime(a.created_at))
378
- );
379
- watch(
380
- () => props.paymentMethods,
381
- (paymentMethods, previousPaymentMethods) => {
382
- var _a;
383
- const addedPaymentMethod = paymentMethods == null ? void 0 : paymentMethods.find(
384
- ({ id }) => !(previousPaymentMethods == null ? void 0 : previousPaymentMethods.some((previous) => previous.id === id))
385
- );
386
- if (addedPaymentMethod && (previousPaymentMethods == null ? void 0 : previousPaymentMethods.length)) {
387
- selectedPaymentMethodId.value = addedPaymentMethod.id;
388
- return;
389
- }
390
- const chosenStillExists = paymentMethods == null ? void 0 : paymentMethods.some(
391
- ({ id }) => id === model.value.payment_method_id
392
- );
393
- if (chosenStillExists) {
394
- return;
395
- }
396
- selectedPaymentMethodId.value = (_a = (paymentMethods == null ? void 0 : paymentMethods.find(({ is_default }) => is_default)) ?? sortedPaymentMethods.value[0]) == null ? void 0 : _a.id;
397
- },
398
- { immediate: true }
399
- );
400
- return (_ctx, _cache) => {
401
- return openBlock(), createElementBlock("form", _hoisted_1$2, [
402
- createElementVNode("div", _hoisted_2$2, [
403
- createElementVNode("div", _hoisted_3$1, [
404
- options.value.length > 0 ? (openBlock(), createBlock(unref(_sfc_main$3), {
405
- key: 0,
406
- modelValue: selectedPricingItemId.value,
407
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => selectedPricingItemId.value = $event),
408
- class: "sv-top-up-form__options",
409
- name: "top-up-pricing-item",
410
- direction: "column",
411
- required: "",
412
- disabled: isCharging.value,
413
- options: options.value,
414
- "show-radio": false,
415
- label: unref($t)({
416
- defaultMessage: "Top up amount",
417
- description: "Label above the list of ways to top up the wallet in the top-up modal",
418
- id: "topup_modal.pricing_items.label"
419
- })
420
- }, {
421
- label: withCtx(({ option, optionValue }) => [
422
- createElementVNode("span", null, toDisplayString(option.label), 1),
423
- getCostLabel(optionValue) ? (openBlock(), createBlock(unref(_sfc_main$4), {
424
- key: 0,
425
- tag: "span",
426
- variant: "body-sm",
427
- shade: "lighter",
428
- weight: "normal",
429
- "no-spacing": "",
430
- class: "sv-top-up-form__option-cost"
431
- }, {
432
- default: withCtx(() => [
433
- createTextVNode(toDisplayString(getCostLabel(optionValue)), 1)
434
- ]),
435
- _: 2
436
- }, 1024)) : createCommentVNode("", true)
437
- ]),
438
- description: withCtx(({ option, optionValue }) => [
439
- createElementVNode("div", _hoisted_4$1, [
440
- option.description && !isFlexibleOption(optionValue) ? (openBlock(), createBlock(unref(_sfc_main$4), {
441
- key: 0,
442
- tag: "span",
443
- variant: "body-xs",
444
- shade: "lighter",
445
- "no-spacing": ""
446
- }, {
447
- default: withCtx(() => [
448
- createTextVNode(toDisplayString(option.description), 1)
449
- ]),
450
- _: 2
451
- }, 1024)) : createCommentVNode("", true),
452
- flexiblePricingFor(optionValue).length > 0 ? (openBlock(), createBlock(unref(_sfc_main$5), {
453
- key: 1,
454
- "is-open": String(optionValue) === selectedPricingItemId.value,
455
- lazy: ""
456
- }, {
457
- default: withCtx(() => [
458
- (openBlock(true), createElementBlock(Fragment, null, renderList(flexiblePricingFor(optionValue), (flexiblePricing) => {
459
- return openBlock(), createElementBlock("div", {
460
- key: flexiblePricing.currency,
461
- class: "sv-top-up-form__amount grid grid-cols-1 gap-3",
462
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {
463
- }, ["stop"])),
464
- onKeydown: _cache[2] || (_cache[2] = withModifiers(() => {
465
- }, ["stop"]))
466
- }, [
467
- option.description ? (openBlock(), createBlock(unref(_sfc_main$4), {
468
- key: 0,
469
- tag: "span",
470
- variant: "body-xs",
471
- shade: "lighter",
472
- "no-spacing": ""
473
- }, {
474
- default: withCtx(() => [
475
- createTextVNode(toDisplayString(option.description), 1)
476
- ]),
477
- _: 2
478
- }, 1024)) : createCommentVNode("", true),
479
- createVNode(unref(_sfc_main$6), {
480
- modelValue: flexibleAmount.value,
481
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => flexibleAmount.value = $event),
482
- config: flexiblePricing.config,
483
- currency: flexiblePricing.currency,
484
- "credits-configuration": flexiblePricing.creditsConfiguration,
485
- required: "",
486
- disabled: isCharging.value,
487
- "show-range-hint": false
488
- }, null, 8, ["modelValue", "config", "currency", "credits-configuration", "disabled"])
489
- ], 32);
490
- }), 128))
491
- ]),
492
- _: 2
493
- }, 1032, ["is-open"])) : createCommentVNode("", true)
494
- ])
495
- ]),
496
- _: 1
497
- }, 8, ["modelValue", "disabled", "options", "label"])) : createCommentVNode("", true),
498
- pricingItems.value ? (openBlock(), createBlock(_sfc_main$7, {
499
- key: 1,
500
- class: "h-[152px]",
501
- "data-testid": "top-up-invoice-preview-skeleton"
502
- }, {
503
- default: withCtx(() => [
504
- unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$8), {
505
- key: 0,
506
- "content-background": "none"
507
- }, {
508
- default: withCtx(() => [
509
- createVNode(unref(_sfc_main$9), {
510
- invoice: unref(invoicePreview),
511
- "is-customer-facing": ""
512
- }, null, 8, ["invoice"])
513
- ]),
514
- _: 1
515
- })) : createCommentVNode("", true)
516
- ]),
517
- _: 1
518
- })) : createCommentVNode("", true)
519
- ]),
520
- createElementVNode("div", null, [
521
- createVNode(unref(_sfc_main$a), { spacing: "xs" })
522
- ]),
523
- createElementVNode("div", null, [
524
- createVNode(_sfc_main$b, {
525
- modelValue: selectedPaymentMethodId.value,
526
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectedPaymentMethodId.value = $event),
527
- class: "sv-top-up-form__payment-methods",
528
- "payment-methods": sortedPaymentMethods.value,
529
- required: "",
530
- disabled: isCharging.value,
531
- label: unref($t)({
532
- defaultMessage: "Payment method",
533
- description: "Label above the payment method that pays for the top-up, in the top-up modal",
534
- id: "topup_modal.payment_method_selector.label"
535
- }),
536
- onAddPaymentMethod: _cache[5] || (_cache[5] = ($event) => emit("add-payment-method"))
537
- }, null, 8, ["modelValue", "payment-methods", "disabled", "label"])
538
- ])
539
- ])
540
- ]);
541
- };
542
- }
543
- });
544
- const _hoisted_1$1 = { class: "sv-top-up-success grid grid-cols-1 gap-4" };
545
- const _hoisted_2$1 = {
546
- key: 0,
547
- class: "sv-top-up-success__added"
548
- };
549
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
550
- __name: "TopUpModalSuccess",
551
- props: {
552
- addedValue: { type: Object },
553
- invoice: { type: Object }
554
- },
555
- setup(__props) {
556
- const props = __props;
557
- const { $t, formatNumber } = useIntl();
558
- const title = computed(
559
- () => $t({
560
- defaultMessage: "Top-up successful",
561
- description: "Title of the top-up modal once the top-up has been charged",
562
- id: "topup_modal.success.title"
563
- })
564
- );
565
- const addedLabel = computed(
566
- () => props.addedValue ? $t(
567
- {
568
- // Phrased around the value rather than agreeing with it: "1,000 coins was added"
569
- // would be wrong, and the value arrives already formatted, so it cannot pluralise.
570
- defaultMessage: "Your balance was topped up with {value}. Please be aware that it can take some time to reflect this change in your wallet.",
571
- description: "Confirmation of what a completed top-up added to the wallet balance",
572
- id: "topup_modal.success.added"
573
- },
574
- { value: formatWalletBalanceValue($t, formatNumber, props.addedValue) }
575
- ) : void 0
576
- );
577
- return (_ctx, _cache) => {
578
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
579
- createVNode(_sfc_main$c, {
580
- status: "success",
581
- title: title.value
582
- }, {
583
- default: withCtx(() => [
584
- addedLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(addedLabel.value), 1)) : createCommentVNode("", true)
585
- ]),
586
- _: 1
587
- }, 8, ["title"]),
588
- __props.invoice ? (openBlock(), createBlock(unref(_sfc_main$8), {
589
- key: 0,
590
- "content-background": "none"
591
- }, {
592
- default: withCtx(() => [
593
- createVNode(unref(_sfc_main$4), {
594
- tag: "span",
595
- variant: "body-sm",
596
- weight: "semibold",
597
- class: "mb-2 block"
598
- }, {
599
- default: withCtx(() => [
600
- createTextVNode(toDisplayString(unref($t)({
601
- defaultMessage: "Receipt",
602
- description: "Heading above the invoice a completed top-up produced",
603
- id: "topup_modal.success.receipt.heading"
604
- })), 1)
605
- ]),
606
- _: 1
607
- }),
608
- createVNode(unref(_sfc_main$9), {
609
- invoice: __props.invoice,
610
- "is-customer-facing": ""
611
- }, null, 8, ["invoice"])
612
- ]),
613
- _: 1
614
- })) : createCommentVNode("", true)
615
- ]);
616
- };
617
- }
618
- });
619
- function useTopUpModalLabels({
620
- step,
621
- currentBalance,
622
- topUpValue
623
- }) {
624
- const { $t, formatNumber } = useIntl();
625
- const title = computed(() => {
626
- if (step.value === "ADD_PAYMENT_METHOD") {
627
- return $t({
628
- defaultMessage: "Add payment method",
629
- description: "Title of the top-up modal while the customer is adding a payment method",
630
- id: "topup_modal.add_payment_method.title"
631
- });
632
- }
633
- if (step.value === "SUCCESS") {
634
- return $t({
635
- defaultMessage: "Top-up complete",
636
- description: "Title of the top-up modal once the top-up has been charged",
637
- id: "topup_modal.success.modal_title"
638
- });
639
- }
640
- return $t({
641
- defaultMessage: "Top up balance",
642
- description: "Title of the wallet top-up modal",
643
- id: "topup_modal.title"
644
- });
645
- });
646
- const subTitle = computed(() => {
647
- if (step.value === "ADD_PAYMENT_METHOD") {
648
- return $t({
649
- defaultMessage: "Add a new payment method for topping up your balance.",
650
- description: "Subtitle of the top-up modal while the customer is adding a payment method",
651
- id: "topup_modal.add_payment_method.subtitle"
652
- });
653
- }
654
- if (step.value === "SUCCESS") {
655
- return $t({
656
- defaultMessage: "Your payment went through.",
657
- description: "Subtitle of the top-up modal once the top-up has been charged",
658
- id: "topup_modal.success.modal_subtitle"
659
- });
660
- }
661
- return $t(
662
- {
663
- defaultMessage: "Your current balance is {balance}.",
664
- description: "Subtitle of the top-up modal showing the current wallet balance",
665
- id: "topup_modal.subtitle"
666
- },
667
- { balance: currentBalance.value }
668
- );
669
- });
670
- const cancelButtonText = computed(
671
- () => step.value === "ADD_PAYMENT_METHOD" ? $t({
672
- defaultMessage: "Back",
673
- description: "Label of the button that leaves the add payment method step in the top-up modal",
674
- id: "topup_modal.back_button.label"
675
- }) : $t({
676
- defaultMessage: "Cancel",
677
- description: "Label of the button that closes the top-up modal",
678
- id: "topup_modal.cancel_button.label"
679
- })
680
- );
681
- const confirmButtonText = computed(() => {
682
- if (step.value === "ADD_PAYMENT_METHOD") {
683
- return $t({
684
- defaultMessage: "Save payment method",
685
- description: "Label of the confirm button in the top-up modal while adding a payment method",
686
- id: "topup_modal.save_payment_method.label"
687
- });
688
- }
689
- if (step.value === "SUCCESS") {
690
- return $t({
691
- defaultMessage: "Done",
692
- description: "Label of the button that dismisses the top-up modal once the top-up has been charged",
693
- id: "topup_modal.done_button.label"
694
- });
695
- }
696
- if (!topUpValue.value) {
697
- return $t({
698
- defaultMessage: "Top up balance",
699
- description: "Label of the confirm button in the top-up modal while no amount is entered",
700
- id: "topup_modal.confirm_button.empty.label"
701
- });
702
- }
703
- return $t(
704
- {
705
- defaultMessage: "Top up balance with {value}",
706
- description: "Label of the confirm button in the top-up modal once an amount is entered",
707
- id: "topup_modal.confirm_button.label"
708
- },
709
- { value: formatWalletBalanceValue($t, formatNumber, topUpValue.value) }
710
- );
711
- });
712
- return { title, subTitle, cancelButtonText, confirmButtonText };
713
- }
714
- function useElementHeight(target) {
715
- const height = ref(0);
716
- const measure = (element) => {
717
- height.value = (element == null ? void 0 : element.offsetHeight) ?? 0;
718
- };
719
- const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver((entries) => {
720
- var _a;
721
- const element = (_a = entries[0]) == null ? void 0 : _a.target;
722
- measure(element instanceof HTMLElement ? element : void 0);
723
- });
724
- watch(
725
- target,
726
- (element, previousElement) => {
727
- if (previousElement) {
728
- observer == null ? void 0 : observer.unobserve(previousElement);
729
- }
730
- measure(element);
731
- if (element) {
732
- observer == null ? void 0 : observer.observe(element);
733
- }
734
- },
735
- // `post` so the callback runs after the render that assigns the template ref, not before.
736
- { immediate: true, flush: "post" }
737
- );
738
- onBeforeUnmount(() => {
739
- observer == null ? void 0 : observer.disconnect();
740
- });
741
- return height;
742
- }
743
- const _hoisted_1 = { class: "grid grid-cols-1 gap-4 pb-4" };
744
- const _hoisted_2 = ["inert"];
745
- const _hoisted_3 = ["inert"];
746
- const _hoisted_4 = ["inert"];
747
- const _hoisted_5 = { class: "flex flex-col gap-2" };
748
- const PANE_TRANSITION_MS = 300;
749
- const PANE_GAP = "1rem";
750
- const _sfc_main = /* @__PURE__ */ defineComponent({
751
- __name: "TopUpModal",
752
- props: {
753
- showModal: { type: Boolean },
754
- selectedBalanceItem: { type: Object },
755
- paymentMethods: { type: Array },
756
- customer: { type: Object }
757
- },
758
- emits: ["confirm", "close", "payment-success", "payment-failed"],
759
- setup(__props, { emit: __emit }) {
760
- const props = __props;
761
- const emit = __emit;
762
- const { $t, formatNumber } = useIntl();
763
- const currentBalance = computed(
764
- () => {
765
- var _a;
766
- return formatWalletBalanceValue(
767
- $t,
768
- formatNumber,
769
- (_a = props.selectedBalanceItem) == null ? void 0 : _a.wallet_balance.open_balance
770
- );
771
- }
772
- );
773
- const topUpPricingItems = computed(() => getTopUpPricingItems(props.selectedBalanceItem));
774
- const {
775
- paymentMethodOptions,
776
- get: loadPaymentMethodOptions,
777
- isPending: isPaymentMethodOptionsPending
778
- } = usePaymentMethodOptions();
779
- watch(
780
- () => [props.showModal, props.customer],
781
- ([showModal, customer]) => {
782
- if (!showModal || !customer) {
783
- return;
784
- }
785
- void loadPaymentMethodOptions({
786
- customerId: customer.id,
787
- country: getCustomerCountry(customer)
788
- });
789
- },
790
- { immediate: true }
791
- );
792
- const step = ref("TOP_UP");
793
- const chargedInvoice = ref();
794
- const chargedValue = ref();
795
- const handlePaymentSuccess = () => {
796
- step.value = "TOP_UP";
797
- emit("payment-success");
798
- };
799
- const paymentMethodFormConfiguration = computed(() => ({
800
- variant: "TOKENIZE"
801
- }));
802
- const hasEverShownForm = ref(false);
803
- const isSwitchingPanes = ref(false);
804
- let switchTimeout;
805
- watch(step, (currentStep) => {
806
- hasEverShownForm.value = hasEverShownForm.value || currentStep === "ADD_PAYMENT_METHOD";
807
- isSwitchingPanes.value = true;
808
- clearTimeout(switchTimeout);
809
- switchTimeout = setTimeout(() => {
810
- isSwitchingPanes.value = false;
811
- }, PANE_TRANSITION_MS);
812
- });
813
- onBeforeUnmount(() => {
814
- clearTimeout(switchTimeout);
815
- });
816
- const topUpPaneRef = ref();
817
- const addPaneRef = ref();
818
- const successPaneRef = ref();
819
- const paneHeights = {
820
- TOP_UP: useElementHeight(topUpPaneRef),
821
- ADD_PAYMENT_METHOD: useElementHeight(addPaneRef),
822
- SUCCESS: useElementHeight(successPaneRef)
823
- };
824
- const paneHeight = computed(() => paneHeights[step.value].value);
825
- const trackOffset = computed(() => {
826
- const index = TOP_UP_MODAL_STEPS.indexOf(step.value);
827
- return index === 0 ? "translateX(0px)" : `translateX(calc(${-index} * (100% + ${PANE_GAP})))`;
828
- });
829
- const paymentMethodFormRef = ref();
830
- const isSavingPaymentMethod = computed(
831
- () => {
832
- var _a;
833
- return step.value === "ADD_PAYMENT_METHOD" && !!((_a = paymentMethodFormRef.value) == null ? void 0 : _a.isPaymentPending);
834
- }
835
- );
836
- const topUpFormRef = ref();
837
- const topUpValue = computed(() => {
838
- var _a;
839
- return (_a = topUpFormRef.value) == null ? void 0 : _a.chargedValue;
840
- });
841
- const isPending = computed(() => {
842
- var _a;
843
- return isSavingPaymentMethod.value || !!((_a = topUpFormRef.value) == null ? void 0 : _a.isCharging);
844
- });
845
- const { title, subTitle, cancelButtonText, confirmButtonText } = useTopUpModalLabels({
846
- step,
847
- currentBalance,
848
- topUpValue
849
- });
850
- const handleConfirm = () => {
851
- var _a, _b;
852
- if (step.value === "ADD_PAYMENT_METHOD") {
853
- (_a = paymentMethodFormRef.value) == null ? void 0 : _a.submit();
854
- return;
855
- }
856
- void ((_b = topUpFormRef.value) == null ? void 0 : _b.submit());
857
- };
858
- const handleTopUpSuccess = (invoice) => {
859
- var _a;
860
- chargedInvoice.value = invoice;
861
- chargedValue.value = (_a = topUpFormRef.value) == null ? void 0 : _a.chargedValue;
862
- step.value = "SUCCESS";
863
- };
864
- const handleDone = () => {
865
- emit("confirm");
866
- emit("close");
867
- };
868
- const handleCancel = () => {
869
- if (isPending.value) {
870
- return;
871
- }
872
- if (step.value === "ADD_PAYMENT_METHOD") {
873
- step.value = "TOP_UP";
874
- return;
875
- }
876
- if (step.value === "SUCCESS") {
877
- handleDone();
878
- return;
879
- }
880
- emit("close");
881
- };
882
- const topUpFormKey = ref(0);
883
- watch(
884
- () => props.showModal,
885
- (showModal) => {
886
- if (!showModal) {
887
- return;
888
- }
889
- step.value = "TOP_UP";
890
- chargedInvoice.value = void 0;
891
- chargedValue.value = void 0;
892
- topUpFormKey.value += 1;
893
- }
894
- );
895
- return (_ctx, _cache) => {
896
- return openBlock(), createBlock(unref(Modal), {
897
- "no-click-away": "",
898
- "show-modal": __props.showModal,
899
- size: "lg",
900
- title: unref(title),
901
- "sub-title": unref(subTitle),
902
- "cancel-button-text": unref(cancelButtonText),
903
- "confirm-button-text": unref(confirmButtonText),
904
- "is-loading": isPending.value,
905
- onConfirm: handleConfirm,
906
- onClose: handleCancel
907
- }, createSlots({
908
- body: withCtx(() => [
909
- createElementVNode("div", _hoisted_1, [
910
- createElementVNode("div", {
911
- class: normalizeClass([
912
- "sv-topup-modal__viewport relative -mx-2 overflow-hidden px-2",
913
- isSwitchingPanes.value ? "transition-[height] duration-300 ease-in-out motion-reduce:transition-none" : ""
914
- ]),
915
- style: normalizeStyle(paneHeight.value ? { height: `${paneHeight.value}px` } : void 0)
916
- }, [
917
- createElementVNode("div", {
918
- class: "sv-topup-modal__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",
919
- style: normalizeStyle({ transform: trackOffset.value })
920
- }, [
921
- createElementVNode("div", {
922
- class: "sv-topup-modal__pane w-full shrink-0",
923
- inert: step.value !== "TOP_UP" || void 0
924
- }, [
925
- createElementVNode("div", {
926
- ref_key: "topUpPaneRef",
927
- ref: topUpPaneRef
928
- }, [
929
- (openBlock(), createBlock(_sfc_main$2, {
930
- key: topUpFormKey.value,
931
- ref_key: "topUpFormRef",
932
- ref: topUpFormRef,
933
- "top-up-pricing-items": topUpPricingItems.value,
934
- "payment-methods": __props.paymentMethods,
935
- onAddPaymentMethod: _cache[0] || (_cache[0] = ($event) => step.value = "ADD_PAYMENT_METHOD"),
936
- onSuccess: handleTopUpSuccess
937
- }, null, 8, ["top-up-pricing-items", "payment-methods"]))
938
- ], 512)
939
- ], 8, _hoisted_2),
940
- createElementVNode("div", {
941
- class: "sv-topup-modal__pane w-full shrink-0",
942
- inert: step.value !== "ADD_PAYMENT_METHOD" || void 0
943
- }, [
944
- createElementVNode("div", {
945
- ref_key: "addPaneRef",
946
- ref: addPaneRef
947
- }, [
948
- __props.customer && hasEverShownForm.value ? (openBlock(), createBlock(_sfc_main$d, {
949
- key: 0,
950
- ref_key: "paymentMethodFormRef",
951
- ref: paymentMethodFormRef,
952
- "hide-submit-button": "",
953
- customer: __props.customer,
954
- "payment-method-options": unref(paymentMethodOptions),
955
- "is-loading": unref(isPaymentMethodOptionsPending),
956
- configuration: paymentMethodFormConfiguration.value,
957
- onSuccess: handlePaymentSuccess,
958
- onFailure: _cache[1] || (_cache[1] = (error) => _ctx.$emit("payment-failed", error))
959
- }, null, 8, ["customer", "payment-method-options", "is-loading", "configuration"])) : createCommentVNode("", true)
960
- ], 512)
961
- ], 8, _hoisted_3),
962
- createElementVNode("div", {
963
- class: "sv-topup-modal__pane w-full shrink-0",
964
- inert: step.value !== "SUCCESS" || void 0
965
- }, [
966
- createElementVNode("div", {
967
- ref_key: "successPaneRef",
968
- ref: successPaneRef
969
- }, [
970
- chargedInvoice.value ? (openBlock(), createBlock(_sfc_main$1, {
971
- key: 0,
972
- "added-value": chargedValue.value,
973
- invoice: chargedInvoice.value
974
- }, null, 8, ["added-value", "invoice"])) : createCommentVNode("", true)
975
- ], 512)
976
- ], 8, _hoisted_4)
977
- ], 4)
978
- ], 6)
979
- ])
980
- ]),
981
- _: 2
982
- }, [
983
- step.value === "SUCCESS" ? {
984
- name: "footer",
985
- fn: withCtx(() => [
986
- createElementVNode("div", _hoisted_5, [
987
- createVNode(unref(_sfc_main$e), {
988
- size: "lg",
989
- "data-testid": "done",
990
- onClick: handleDone
991
- }, {
992
- default: withCtx(() => [
993
- createTextVNode(toDisplayString(unref(confirmButtonText)), 1)
994
- ]),
995
- _: 1
996
- })
997
- ])
998
- ]),
999
- key: "0"
1000
- } : void 0
1001
- ]), 1032, ["show-modal", "title", "sub-title", "cancel-button-text", "confirm-button-text", "is-loading"]);
1002
- };
1003
- }
1004
- });
1005
- function useTopUpModal(selectedBalance) {
1006
- const showModal = computed(() => !!selectedBalance.value);
1007
- return { showModal };
1008
- }
1009
- export {
1010
- _sfc_main as _,
1011
- useTopUpModal as u
1012
- };