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

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 (239) hide show
  1. package/README.md +3 -0
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DJCMa2Lz.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B70SyWOB.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B9WTpz0k.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jXClPW91.js} +1 -1
  4. package/dist/Alert.vue.es-RyK53a2P.js +1 -0
  5. package/dist/Alert.vue.es-lIiAWf2S.mjs +146 -0
  6. package/dist/{Avatar.vue.es-ChcLSNaN.mjs → Avatar.vue.es-2E3laNRb.mjs} +1 -1
  7. package/dist/{Avatar.vue.es-CJw5z7Uu.js → Avatar.vue.es-DdJreyr_.js} +1 -1
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CTQ5RMtx.js → BillingInformation.vue_vue_type_script_setup_true_lang-ConpyC8n.js} +1 -1
  9. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DApMAncl.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D5EoBLhj.mjs} +4 -4
  10. package/dist/{Button.vue.es-VQCd3V3C.mjs → Button.vue.es-BJEy-e9C.mjs} +1 -1
  11. package/dist/{Button.vue.es-BWl37nzm.js → Button.vue.es-CJNxYacb.js} +1 -1
  12. package/dist/Checkout.entry.ce-BfLlnQyb.js +1 -0
  13. package/dist/{Checkout.entry.ce-DRHqEFd7.mjs → Checkout.entry.ce-CQkrWscC.mjs} +1397 -1302
  14. package/dist/{Chip.vue.es-CXG8o1Qf.mjs → Chip.vue.es-DGbc4L_D.mjs} +2 -2
  15. package/dist/{Chip.vue.es-DUgjuRWm.js → Chip.vue.es-DLQ4QEPo.js} +1 -1
  16. package/dist/{ContextMenu.vue.es-BllxeDTt.js → ContextMenu.vue.es-Bd2kmeVq.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-C6TKlSXs.mjs → ContextMenu.vue.es-DL1M7pcr.mjs} +4 -4
  18. package/dist/{CustomerBillingInformation.vue.es-CKQH_ds0.mjs → CustomerBillingInformation.vue.es-CE94ASC3.mjs} +2 -2
  19. package/dist/{CustomerBillingInformation.vue.es-CMCZ-lIM.js → CustomerBillingInformation.vue.es-hiFzB43w.js} +1 -1
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-n097Xf1H.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BE21tqgW.js} +1 -1
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BxwllXwU.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bhih7rPR.mjs} +5 -5
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CtaoLbrM.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C5zc9n64.mjs} +486 -502
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D018AmFA.js +1 -0
  24. package/dist/{DividerText.vue.es-Bomiy4if.mjs → DividerText.vue.es-CFZUQ62L.mjs} +1 -1
  25. package/dist/{DividerText.vue.es-BBdydUy_.js → DividerText.vue.es-CvCgHHXN.js} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-YcaBJDzx.mjs} +4 -4
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DXO9xpFT.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-jTJGN4jb.js} +1 -1
  28. package/dist/{ErrorNotification.vue.es-C6ngWAVU.mjs → ErrorNotification.vue.es-B3mvv79S.mjs} +2 -2
  29. package/dist/ErrorNotification.vue.es-DI2B7WiR.js +1 -0
  30. package/dist/IconButton.vue.es-Dp8h4YOx.js +1 -0
  31. package/dist/IconButton.vue.es-GLcGhoHC.mjs +56 -0
  32. package/dist/{IconTitle.vue.es-Bbusc4wK.mjs → IconTitle.vue.es-CzuPQtOX.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-D-q6w2E-.js → IconTitle.vue.es-DN9r6nfK.js} +1 -1
  34. package/dist/{Input.vue.es-AY1c0Rui.mjs → Input.vue.es-5Cq8a7oH.mjs} +2 -2
  35. package/dist/{Input.vue.es-BN95nPBw.js → Input.vue.es-DM81HeVv.js} +1 -1
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-1WjSbPEP.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D75LSIL8.mjs} +2 -2
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-qiBCPY8l.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-w8w52LcV.js} +1 -1
  38. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DB5h39LA.js +1 -0
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D99nuBRE.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-dRLsZPNh.mjs} +3 -3
  40. package/dist/{InvoiceSummary.vue.es-Bs5c2Ovx.mjs → InvoiceSummary.vue.es-DbtqsTuP.mjs} +692 -705
  41. package/dist/InvoiceSummary.vue.es-Qy99kLZs.js +1 -0
  42. package/dist/{Modal.vue.es-Chi6_MH_.js → Modal.vue.es-DgLl6XBV.js} +1 -1
  43. package/dist/{Modal.vue.es-DSkC4eMv.mjs → Modal.vue.es-Z2DWAN2u.mjs} +5 -5
  44. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBm51C7c.js +1 -0
  45. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DYuFPIqs.mjs +294 -0
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BNZ9-GW1.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-budeR7ep.mjs → PaymentHistoryBlock-CjP_514k.mjs} +1 -1
  49. package/dist/{PaymentHistoryBlock-DGJ_PiVq.js → PaymentHistoryBlock-DS1j-8m-.js} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dv-3suBX.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CSTfMB8U.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C28ofG7N.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dr2jtJhK.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-DqqGcEP1.js → PaymentIntegrationForm-80b19Lkq.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-Crrhar96.mjs → PaymentIntegrationForm-CpOZUf-W.mjs} +1 -1
  54. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C4bk0m8g.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BgztoQH5.mjs} +3 -3
  55. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CcEEdHQJ.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DKXhthkA.js} +1 -1
  56. package/dist/{PaymentIntegrationFormAdyen-DM-xMcm0.mjs → PaymentIntegrationFormAdyen-BQcgDcik.mjs} +281 -204
  57. package/dist/PaymentIntegrationFormAdyen-DElXsJ96.js +98 -0
  58. package/dist/PaymentIntegrationFormStripe-CMwLqOe6.js +102 -0
  59. package/dist/{PaymentIntegrationFormStripe-yBm4KnpV.mjs → PaymentIntegrationFormStripe-Dx1H3fZ2.mjs} +249 -178
  60. package/dist/{PaymentMethod.vue.es-BdMcKq8_.mjs → PaymentMethod.vue.es-EhRCfeax.mjs} +3 -3
  61. package/dist/{PaymentMethod.vue.es-Ctw9Es1g.js → PaymentMethod.vue.es-pLCCzVxN.js} +1 -1
  62. package/dist/{PaymentMethodForm-BQ5TVHlS.js → PaymentMethodForm-Bw2e1tXo.js} +1 -1
  63. package/dist/{PaymentMethodForm-C1bIGX10.mjs → PaymentMethodForm-D3OY8zK5.mjs} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-V88bCeDt.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DHXw6qD0.js} +1 -1
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-5KKkuVt5.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-vGprVPpn.mjs} +5 -5
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-B_207kq5.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CdT1YyeU.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CnmZ9dvP.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-D7b0HhDc.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-BQqkgmzL.mjs +877 -0
  69. package/dist/PlanCustomizationEditor-RC8kj2rC.js +1 -0
  70. package/dist/{PricingGroupRangeInput.vue.es-D82XvoC_.js → PricingGroupRangeInput.vue.es-ClkE98ML.js} +2 -2
  71. package/dist/{PricingGroupRangeInput.vue.es-Bnb-ARie.mjs → PricingGroupRangeInput.vue.es-DNsiUZyT.mjs} +4 -4
  72. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CxMkCmti.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-BJfQLRcS.js} +1 -1
  73. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-skQMgHEL.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CURXAgMT.mjs} +5 -5
  74. package/dist/RadioGroupExtended.vue.es-Dk9xdj76.js +1 -0
  75. package/dist/{RadioGroupExtended.vue.es-WDbo_yj1.mjs → RadioGroupExtended.vue.es-vUqn2ZUP.mjs} +3 -3
  76. package/dist/{Section.vue.es-By1JltGi.mjs → Section.vue.es-C2_topx4.mjs} +1 -1
  77. package/dist/{Section.vue.es-DuK52y67.js → Section.vue.es-Cybk1Nb8.js} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CS3KIkPL.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-C9q_qwjt.mjs} +6 -6
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Ct3ZNq-j.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DIgVzXLg.js} +1 -1
  80. package/dist/{SubscriptionSchedules-DDCjVEbG.mjs → SubscriptionSchedules-BlCU_xc5.mjs} +1 -1
  81. package/dist/{SubscriptionSchedules-DEjIERyF.js → SubscriptionSchedules-CNTg_oRy.js} +1 -1
  82. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-6LbR_Vni.js +1 -0
  83. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-JAedXFzq.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cf3Dy8Yn.mjs} +1655 -1620
  84. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-D-Fa54M6.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-BijBAdqp.js} +1 -1
  85. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DVMS4gJQ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CjzjchsS.mjs} +3 -3
  86. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BckZJtOc.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CxdrAanb.mjs} +7 -7
  87. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DiXmEjUD.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Dz4s3CH_.js} +1 -1
  88. package/dist/{TooltipParagraph.vue.es-DYu2ReL7.mjs → TooltipParagraph.vue.es-Fu9Od3Vr.mjs} +1 -1
  89. package/dist/{TooltipParagraph.vue.es-sTgWAgcd.js → TooltipParagraph.vue.es-OX6bAWP9.js} +1 -1
  90. package/dist/{TrialChip.vue.es-Cl-9_pdr.js → TrialChip.vue.es-CbjdkR4i.js} +1 -1
  91. package/dist/{TrialChip.vue.es-DX53r0ku.mjs → TrialChip.vue.es-c7tZOIW3.mjs} +2 -2
  92. package/dist/{cn.es-DjnGlmqV.mjs → cn.es-C8Ogac5T.mjs} +2 -2
  93. package/dist/{cn.es-CNvIP217.js → cn.es-lC4_Xd0R.js} +1 -1
  94. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  95. package/dist/components/BillingInformation/BillingInformation.mjs +5 -5
  96. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  97. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +7 -7
  98. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  99. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +5 -5
  100. package/dist/components/Invoice/Invoice.cjs +1 -1
  101. package/dist/components/Invoice/Invoice.mjs +10 -10
  102. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  103. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
  104. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  105. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +8 -8
  106. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  107. package/dist/components/InvoicesList/InvoicesList.mjs +4 -4
  108. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  109. package/dist/components/PaymentHistory/PaymentHistory.mjs +9 -9
  110. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  111. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +6 -6
  112. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  113. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +5 -5
  114. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  115. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +6 -6
  116. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  117. package/dist/components/WalletBalances/WalletBalances.mjs +4 -4
  118. package/dist/core/index.cjs +1 -1
  119. package/dist/core/index.mjs +26 -23
  120. package/dist/{customElements-Bt8PbjIn.js → customElements-BYIdPSzQ.js} +43 -19
  121. package/dist/{customElements-Com2NiGU.mjs → customElements-Df6dGrN-.mjs} +603 -572
  122. package/dist/{customer-CKgMJEgv.mjs → customer-DmsKYpVi.mjs} +1 -1
  123. package/dist/{customer-Q4JGfVfq.js → customer-DoLHZuMG.js} +1 -1
  124. package/dist/{de-DE-DqLD4IX2.js → de-DE-BSlbAnPE.js} +1 -1
  125. package/dist/{de-DE-CVCmzlNH.mjs → de-DE-Bgm9bnmp.mjs} +21 -0
  126. package/dist/{de-DE-Ds_yJLS3.js → de-DE-CAL9Mji2.js} +1 -1
  127. package/dist/{de-DE-DBO5f-Eu.mjs → de-DE-DXsG-vXA.mjs} +13 -8
  128. package/dist/{en-US-CvFmmI_O.js → en-US-9xdcz3T5.js} +1 -1
  129. package/dist/{en-US-3UmnS23B.mjs → en-US-C939IZ5i.mjs} +13 -8
  130. package/dist/{en-US-DVR9O7b_.mjs → en-US-E86eRIxh.mjs} +21 -0
  131. package/dist/{en-US-C51ILrVv.js → en-US-_xe5H4TQ.js} +1 -1
  132. package/dist/index.cjs +1 -1
  133. package/dist/index.mjs +1 -1
  134. package/dist/{invoices-CV9iAUHf.mjs → invoices-CrO6p4Ms.mjs} +8 -5
  135. package/dist/invoices-mw87cNTS.js +1 -0
  136. package/dist/{it-IT-CxBRisRm.mjs → it-IT-BxpwB3oJ.mjs} +8 -3
  137. package/dist/it-IT-DT3rfjOY.js +1 -0
  138. package/dist/{it-IT-Dxw59eR_.js → it-IT-QFQ1Ajbb.js} +1 -1
  139. package/dist/{it-IT-CDMnnFKZ.mjs → it-IT-co1BfV5s.mjs} +23 -2
  140. package/dist/{nl-NL-Btbfd9p2.js → nl-NL-CJXJC1bx.js} +1 -1
  141. package/dist/nl-NL-DfkhOJKc.js +1 -0
  142. package/dist/{nl-NL-o3UvtSNg.mjs → nl-NL-Drv2E66B.mjs} +21 -0
  143. package/dist/{nl-NL-BWGkVweu.mjs → nl-NL-na2I4aiP.mjs} +8 -3
  144. package/dist/paymentFailure-Bh60UhxA.mjs +47 -0
  145. package/dist/paymentFailure-Cki8c5BX.js +1 -0
  146. package/dist/{paymentMethods-BuwoJ1y9.mjs → paymentMethods-BNQbW_f1.mjs} +1 -1
  147. package/dist/{paymentMethods-ChWAwDSF.js → paymentMethods-CQdhZwq4.js} +1 -1
  148. package/dist/{payments-DGckugN0.js → payments-KTjVHqOa.js} +1 -1
  149. package/dist/{payments-C_cMXQzE.mjs → payments-VS_N2xpJ.mjs} +1 -1
  150. package/dist/pricingItemConfigs.es-D4aYkYcf.js +1 -0
  151. package/dist/{pricingItemConfigs.es-DMf1e6y7.mjs → pricingItemConfigs.es-ORxsk_YS.mjs} +23 -22
  152. package/dist/pricingPlanSchedule-BM8vsKkV.js +1 -0
  153. package/dist/pricingPlanSchedule-BPrS2WRd.mjs +132 -0
  154. package/dist/screens/Checkout/Checkout.cjs +1 -1
  155. package/dist/screens/Checkout/Checkout.mjs +2 -2
  156. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  157. package/dist/screens/CustomerOverview/CustomerOverview.mjs +21 -21
  158. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  159. package/dist/screens/PayInvoice/PayInvoice.mjs +14 -14
  160. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  161. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
  162. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  163. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +21 -21
  164. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  165. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
  166. package/dist/sessionReference-3h-6FdrC.mjs +43 -0
  167. package/dist/sessionReference-m_6Rp4X1.js +1 -0
  168. package/dist/{subscription-CvfAEJeP.mjs → subscription-CrVOr5MF.mjs} +1 -1
  169. package/dist/{subscription-9GORG-Gt.js → subscription-ZA62t4E9.js} +1 -1
  170. package/dist/subscriptions-Dugd-oZ1.js +1 -0
  171. package/dist/{subscriptions-B5VqRayX.mjs → subscriptions-U4xg2CO1.mjs} +2 -2
  172. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +1 -0
  173. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +2 -0
  174. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +10 -1
  175. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +1 -0
  176. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
  177. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
  178. package/dist/types/composables/useInvoicePreview.types.d.ts +1 -0
  179. package/dist/types/public/components/Invoice/Invoice.types.d.ts +1 -1
  180. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +1 -1
  181. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +1 -1
  182. package/dist/types/types/errors.d.ts +5 -0
  183. package/dist/{useActionDispatchProvider-B54GYEY7.js → useActionDispatchProvider-CTyDGRX8.js} +1 -1
  184. package/dist/{useActionDispatchProvider-e2lQXTid.mjs → useActionDispatchProvider-DyQbRCxR.mjs} +1 -1
  185. package/dist/{useCustomer-BJwJ9BkJ.js → useCustomer-BXI5Vmit.js} +1 -1
  186. package/dist/{useCustomer-CC9zxV6c.mjs → useCustomer-dcmU1539.mjs} +1 -1
  187. package/dist/useCustomerFormLabels-BC1WfqWo.mjs +968 -0
  188. package/dist/useCustomerFormLabels-Ct6vD_b8.js +1 -0
  189. package/dist/{useExperimentalFeature-B0IFn3Uw.mjs → useExperimentalFeature-4Y-ppDr7.mjs} +1 -1
  190. package/dist/{useExperimentalFeature-8Mzpj5wc.js → useExperimentalFeature-9-p9_nP6.js} +1 -1
  191. package/dist/{useInvoiceData-6mHUZC9a.mjs → useInvoiceData-B2Z9aD2w.mjs} +2 -2
  192. package/dist/{useInvoiceData-Bblwdl0f.js → useInvoiceData-CGvtl7Ai.js} +1 -1
  193. package/dist/{useInvoicesList-_U1-tn9_.js → useInvoicesList-Ba0GO8p-.js} +1 -1
  194. package/dist/{useInvoicesList-B5H5JfvY.mjs → useInvoicesList-DJPznhig.mjs} +7 -7
  195. package/dist/{useLoadInitialData-CezlvhBV.js → useLoadInitialData-BO9ZsSsF.js} +1 -1
  196. package/dist/{useLoadInitialData-ux_wpNiR.mjs → useLoadInitialData-CWyI3_RR.mjs} +1 -1
  197. package/dist/{usePaymentMethodAvailability-CkR4TwoV.mjs → usePaymentMethodAvailability-DqIvkjLF.mjs} +4 -4
  198. package/dist/{usePaymentMethodAvailability-DRwrBdto.js → usePaymentMethodAvailability-bkmDrPXY.js} +1 -1
  199. package/dist/{usePaymentMethodOptions-B6GIM9q4.js → usePaymentMethodOptions-BPBVGNDg.js} +1 -1
  200. package/dist/{usePaymentMethodOptions-BfnLBZOo.mjs → usePaymentMethodOptions-MSEp39xQ.mjs} +1 -1
  201. package/dist/{usePaymentMethods-GFmQRp0X.js → usePaymentMethods-BAOtOJZD.js} +1 -1
  202. package/dist/{usePaymentMethods-C3QfLSrP.mjs → usePaymentMethods-U7gnZ0F5.mjs} +1 -1
  203. package/dist/{usePayments-BkwGyZT0.mjs → usePayments-Dq2V6bTV.mjs} +6 -6
  204. package/dist/{usePayments-SQF_V7oL.js → usePayments-G-HpKpK8.js} +1 -1
  205. package/dist/{usePortal-BdM7hDge.js → usePortal-BplmMkBG.js} +1 -1
  206. package/dist/{usePortal-DDG9b6FI.mjs → usePortal-CMHV-ShD.mjs} +1 -1
  207. package/dist/{useSubscription-Q4C2DPhw.js → useSubscription-CvB8ROBt.js} +1 -1
  208. package/dist/{useSubscription-BJJYHYgr.mjs → useSubscription-V53WsZwQ.mjs} +1 -1
  209. package/dist/{useTimePeriod.es-pepm2TpV.js → useTimePeriod.es-CtCTu9cz.js} +1 -1
  210. package/dist/{useTimePeriod.es-9tZvAhyb.mjs → useTimePeriod.es-D31Zl1MJ.mjs} +1 -1
  211. package/dist/wallets.es-CNIMW5ay.js +1 -0
  212. package/dist/wallets.es-eH2C2ygn.mjs +102 -0
  213. package/package.json +2 -1
  214. package/dist/Checkout.entry.ce-BTVuGyNq.js +0 -1
  215. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C_yKvYtG.js +0 -1
  216. package/dist/ErrorNotification.vue.es-0ZC_DozN.js +0 -1
  217. package/dist/IconButton.vue.es-DAR7e8NA.mjs +0 -198
  218. package/dist/IconButton.vue.es-DGLIdHkR.js +0 -1
  219. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-BXTInmf9.js +0 -1
  220. package/dist/InvoiceSummary.vue.es-B0MPR0oI.js +0 -1
  221. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Draz_8Ts.js +0 -1
  222. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-vD88j_U7.mjs +0 -144
  223. package/dist/PaymentIntegrationFormAdyen-DronjwO3.js +0 -98
  224. package/dist/PaymentIntegrationFormStripe-ybM6wirp.js +0 -102
  225. package/dist/PlanCustomizationEditor-CCOTD6Qu.mjs +0 -769
  226. package/dist/PlanCustomizationEditor-CiZnVCM6.js +0 -1
  227. package/dist/RadioGroupExtended.vue.es-B1YtLNKG.js +0 -1
  228. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BlX0W6lw.js +0 -1
  229. package/dist/component-5wqcK7yz.mjs +0 -8
  230. package/dist/component-B7ZDyqBp.js +0 -1
  231. package/dist/invoices-CvpL4rv5.js +0 -1
  232. package/dist/it-IT-CFEfSpPH.js +0 -1
  233. package/dist/nl-NL-jtVgF3jx.js +0 -1
  234. package/dist/pricingItemConfigs.es-DlybwIh1.js +0 -1
  235. package/dist/pricingPlanSchedule-COfmWv_o.js +0 -1
  236. package/dist/pricingPlanSchedule-J1nb9pCu.mjs +0 -129
  237. package/dist/subscriptions-X0Ciw8z3.js +0 -1
  238. package/dist/useCustomerFormLabels-72Pxw8X5.js +0 -1
  239. package/dist/useCustomerFormLabels-V2YuYMLU.mjs +0 -930
@@ -0,0 +1 @@
1
+ const R=require("./useService-H7BjLg8P.js"),e=require("vue"),L=require("./index.es-BclokHQX.js"),$e=require("./countryData.es-C4jHBzfo.js"),O=require("./floating-ui.vue.es-Bly3DGWm.js"),E=require("./sorting.es-DQsjKr8A.js"),D=require("./customElements-BYIdPSzQ.js"),fe=require("./IconButton.vue.es-Dp8h4YOx.js"),U=require("./Button.vue.es-CJNxYacb.js"),Oe=require("./Chip.vue.es-DLQ4QEPo.js"),De=require("./Input.vue.es-DM81HeVv.js"),ze=require("./index-DwueOtPi.js"),oe=t=>R.isEmpty(t)&&typeof t!="boolean"?null:t,G=t=>typeof t=="object"&&t!==null,Te=({from:t,to:v,nullifyEmptyValues:b=!1})=>{const s=Object.fromEntries(Object.entries(v).filter(([a,p])=>!R.deepEqual(p,t[a])));return b?Object.entries(s).reduce((a,[p,r])=>({...a,[p]:oe(r)}),{}):s},Le=({from:t,to:v,nullifyEmptyValues:b=!1})=>{const s={},a=(r,d,n)=>{const m=d[n];return r===void 0?Array.isArray(m)?s[n]=[]:G(m)&&(s[n]={}):Array.isArray(m)?r[n]=[]:G(m)&&(r[n]={}),[r===void 0?s:r,n]},p=(r,d,n)=>{for(const m of Object.keys(r)){const f=a(n,r,m);m in d||(f[0][f[1]]={from:r[m]})}for(const[m,f]of Object.entries(d)){const h=m in r,y=a(n,r,m);if(h){const g=r[m];R.deepEqual(g,f)?delete y[0][y[1]]:G(f)&&G(g)?p(g,f,y[0][y[1]]):y[0][y[1]]=b&&typeof f!="boolean"?oe(f):f}else y[0][y[1]]=b?oe(f):f}};return p(t,v),s},Re=({from:t,to:v,mode:b="shallow",nullifyEmptyValues:s=!1})=>b==="deep"?Le({from:t,to:v,nullifyEmptyValues:s}):Te({from:t,to:v,nullifyEmptyValues:s});function qe(t,v,b=[]){return[...t].sort((s,a)=>{for(let p=0;p<v.length;p++){const r=v[p],d=typeof r=="function"?r:h=>h[r],n=b[p]==="desc"?-1:1,m=d(s),f=d(a);if(!(m==null&&f==null)){if(m==null)return n;if(f==null||m<f)return-n;if(m>f)return n}}return 0})}const Ae={},Fe={class:"flex items-center pt-1"},Ue={class:"px-1.5 text-xs font-semibold text-subtle"};function je(t,v){return e.openBlock(),e.createElementBlock("div",Fe,[v[0]||(v[0]=e.createElementVNode("div",{class:"w-2 border-t"},null,-1)),e.createElementVNode("span",Ue,[e.renderSlot(t.$slots,"default")]),v[1]||(v[1]=e.createElementVNode("div",{class:"grow border-t"},null,-1))])}const Ke=O._export_sfc(Ae,[["render",je]]),He=t=>`checkbox-item-${t}`,We="select-search-done-button",Ge=["aria-selected","aria-disabled","data-testid","onKeydown"],Qe=["id","value","checked","disabled"],Ye=["for"],Je={class:"flex min-w-0 items-center gap-1"},Xe={class:"flex min-w-0 flex-grow flex-col"},Ze={class:"flex min-w-0 flex-grow gap-2"},_e={class:"flex min-w-0 flex-grow flex-col"},et={class:"flex min-w-0 flex-grow items-center gap-2"},tt=e.defineComponent({__name:"SearchSelectInputOption",props:{multiple:{type:Boolean},search:{},condensed:{type:Boolean},label:{},checked:{type:Boolean},disabled:{type:Boolean},subLabel:{},labelPrefixComponent:{},labelSuffixComponent:{},labelInlineComponent:{},value:{},labelSrOnly:{type:Boolean}},emits:["value-changed"],setup(t,{emit:v}){const b=v,s=t,a=n=>{const m=n.target,f={value:m.value,checked:m.checked};b("value-changed",f)},p=()=>{s.multiple||s.disabled||b("value-changed",{value:s.value})},r=e.computed(()=>He(s.value)),d=e.computed(()=>E.escapeUserInput(s.search??""));return(n,m)=>(e.openBlock(),e.createElementBlock("li",{role:"option","aria-selected":t.checked,"aria-disabled":t.disabled,class:e.normalizeClass([{"hover:bg-gray-100":!t.disabled},"relative flex"]),"data-testid":r.value,tabindex:"0",onClick:p,onKeydown:e.withKeys(e.withModifiers(p,["prevent"]),["enter"])},[t.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("input",e.mergeProps(n.$attrs,{id:r.value,ref:"inputRef",value:t.value,checked:t.checked,disabled:t.disabled,type:"checkbox",class:["absolute left-3.5 top-1/2 h-4 w-4 -translate-y-2 rounded border-gray-300 bg-gray-100 focus:ring-2 focus:ring-primary-500",t.disabled?"text-disabled":"text-primary-600"],tabindex:"-1",onChange:a}),null,16,Qe),e.createElementVNode("label",{for:r.value,class:e.normalizeClass([t.disabled?"text-disabled":"rounded text-default","w-full px-4 py-3 pl-10 text-sm font-medium"])},[e.createElementVNode("div",Je,[t.labelPrefixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelPrefixComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelPrefixComponent.props)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",Xe,[e.createElementVNode("div",Ze,[e.createVNode(E._sfc_main,{text:t.label,search:d.value,title:t.label,class:e.normalizeClass(["truncate font-semibold",{"sr-only":t.labelSrOnly}])},null,8,["text","search","title","class"]),t.labelInlineComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),t.subLabel&&t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.subLabel&&!t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.normalizeProps(e.mergeProps({key:1},t.labelSuffixComponent.props)),null,16)):e.createCommentVNode("",!0)])],10,Ye)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex w-full min-w-0 items-center gap-3 px-4 text-sm font-medium",[t.condensed?"p-2":"py-3",t.disabled??"cursor-not-allowed",!t.disabled&&"cursor-pointer"]])},[t.labelPrefixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelPrefixComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelPrefixComponent.props)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",_e,[e.createElementVNode("div",et,[e.createVNode(E._sfc_main,{text:t.label,search:e.unref(E.escapeUserInput)(t.search??""),title:t.label,class:e.normalizeClass(["truncate font-semibold",{"text-disabled":t.disabled}])},null,8,["text","search","title","class"]),t.labelInlineComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),t.subLabel&&t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.subLabel&&!t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.normalizeProps(e.mergeProps({key:1},t.labelSuffixComponent.props)),null,16)):e.createCommentVNode("",!0)],2))],42,Ge))}}),lt={class:"flex flex-col rounded-bl rounded-br"},ot={key:0,class:"px-5 py-5 text-sm text-secondary"},nt={key:0},at=["innerHTML"],st={key:0},rt={class:"mt-1 px-3 py-2 text-sm text-secondary"},it=e.defineComponent({__name:"SearchSelectInputOptions",props:{i18n:{},model:{},search:{},multiple:{type:Boolean},condensed:{type:Boolean},hasLargeDropdown:{type:Boolean},addOnly:{type:Boolean},options:{}},emits:["value-changed"],setup(t,{emit:v}){const b=v,s=t,a=h=>b("value-changed",h),p=e.computed(()=>{var h,y;const g=s.search?`<span class="font-bold">"${E.escapeUserInput(s.search)}"</span>`:"";return((y=(h=s.i18n)==null?void 0:h.noResults)==null?void 0:y.call(h,g))??`No matches found for ${g}.`}),r=e.computed(()=>s.search===""),d=e.computed(()=>s.options.filter(h=>!h.hidden)),n=e.computed(()=>d.value.length>0),m=e.computed(()=>n.value?!1:r.value?!0:!!p.value),f=e.computed(()=>E.sortedUniqBy(s.options,"group").reduce((h,y)=>y.value===""?h:{...h,[y.value]:y.group},{}));return(h,y)=>{var g,k;return e.openBlock(),e.createElementBlock("div",lt,[m.value?(e.openBlock(),e.createElementBlock("div",ot,[r.value?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(((g=s.i18n)==null?void 0:g.noOptionsAvailable)??"No available options."),1)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:p.value},null,8,at))])):n.value?(e.openBlock(),e.createElementBlock("ul",{key:1,class:e.normalizeClass(["list-none overflow-y-auto",[t.hasLargeDropdown?"max-h-[19rem]":"max-h-48"]])},[t.addOnly?(e.openBlock(),e.createElementBlock("div",st,[e.createElementVNode("p",rt,e.toDisplayString(((k=t.i18n)==null?void 0:k.addOnly)??"You can only select currently unselected options."),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,({label:Q,subLabel:j,value:I,checked:K,disabled:Y,labelInlineComponent:B,labelSuffixComponent:J,labelSrOnly:X,labelPrefixComponent:Z,searchValues:u})=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:I},[f.value[I]?(e.openBlock(),e.createBlock(Ke,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value[I]),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(tt,{label:Q,"sub-label":j,value:I,checked:K,disabled:Y,search:u?"":t.search,multiple:t.multiple,condensed:t.condensed,"label-suffix-component":J,"label-prefix-component":Z,"label-inline-component":B,"label-sr-only":X,onValueChanged:a},null,8,["label","sub-label","value","checked","disabled","search","multiple","condensed","label-suffix-component","label-prefix-component","label-inline-component","label-sr-only"])],64))),128))],2)):e.createCommentVNode("",!0),h.$slots["list-footer-content"]?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"border-t border-gray-200":n.value})},[e.renderSlot(h.$slots,"list-footer-content")],2)):e.createCommentVNode("",!0)])}}}),ut={class:"flex flex-col gap-2"},ct=["aria-expanded"],dt={class:"flex items-center gap-2"},mt={key:2},ft={class:"flex items-center gap-2 self-stretch"},vt={class:"flex items-center self-stretch pr-1"},pt={key:0,class:"flex flex-wrap gap-2"},ht=["innerHTML"],bt=e.defineComponent({__name:"SearchSelectInput",props:e.mergeModels({addOnly:{type:Boolean,default:!1},disabled:{type:Boolean},i18n:{},label:{},labelScreenReaderOnly:{type:Boolean},singleModelValue:{},multiModelValue:{},options:{default:()=>[]},optionsOrder:{default:()=>["asc","asc"]},optionsOrderProperties:{default:()=>["group","label"]},required:{type:Boolean,default:!1},rootClass:{},wrapperClass:{},size:{default:"md"},withChips:{type:Boolean,default:!1},error:{},hasReset:{type:Boolean},name:{},hasLargeDropdown:{type:Boolean,default:!1},showSuffixInClosedInput:{type:Boolean},showSuffixLabelInInput:{type:Boolean},showSelectionInClosedInput:{type:Boolean},condensed:{type:Boolean},form:{},prefix:{}},{search:{default:""},searchModifiers:{}}),emits:e.mergeModels(["update:singleModelValue","update:multiModelValue","blur","change","focus","add-option"],["update:search"]),setup(t,{expose:v,emit:b}){var s;const a=t,p=e.inject(D.SEARCH_SELECT_TELEPORT_TARGET),r=(s=e.getCurrentInstance())==null?void 0:s.vnode.props,d=!(r!=null&&r["onUpdate:search"]),n=e.computed(()=>Array.isArray(a.multiModelValue)),m=e.ref(a.singleModelValue),f=b,h=L.useVModel(a,"singleModelValue",f),y=L.useVModel(a,"multiModelValue",f),g=e.ref(y.value??[]);e.watch(()=>a.multiModelValue,l=>{l&&(g.value=l)});const k=e.useModel(t,"search"),Q=e.useSlots(),j=e.computed(()=>!!Q.prefix),I=e.computed(()=>!!a.prefix),K=e.computed(()=>j.value||I.value),Y=e.computed(()=>K.value||!le.value),B=e.computed({get:()=>n.value?g.value??[]:typeof h.value=="string"?[h.value]:[],set(l){n.value?g.value=l:h.value=(l==null?void 0:l[0])??""}}),J=e.computed(()=>P.value.filter(l=>{var o;return(o=B.value)==null?void 0:o.includes(l.value)})),X=e.computed(()=>J.value[0]),Z=E.useIsMounted(),u=e.ref(!1),z=e.ref(),M=e.ref(),ve=e.ref(),ne=()=>z.value?Array.from(z.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')):[],ae=()=>{var l;let o=document.activeElement;for(;(l=o==null?void 0:o.shadowRoot)!=null&&l.activeElement;)o=o.shadowRoot.activeElement;return o},q=()=>{if(!M.value)return null;let l=M.value.querySelector("input");if(l)return l;const o=M.value.querySelectorAll("*");for(const i of o)if(i.shadowRoot&&(l=i.shadowRoot.querySelector("input"),l))return l;return null};let _=!1;const ee=()=>{var l;_=!0,(l=q())==null||l.focus(),_=!1},N=e.ref(""),A=e.ref(!1),pe=()=>{_||(u.value=!0)},he=l=>{l.target===q()&&(u.value=!0)},be=()=>{a.disabled||(A.value=!0,u.value=!0)},ye=l=>{var o;if(!u.value)return;const i=ne(),x=q();if(ae()===x)switch(l.key){case"ArrowDown":i.length>0&&(l.preventDefault(),(o=i[0])==null||o.focus());break;case"Tab":V();break;case"Escape":l.preventDefault(),V();break}},ke=l=>{var o,i,x;const C=ne(),c=ae(),S=C.indexOf(c),F=q();switch(l.key){case"ArrowDown":S<C.length-1&&(l.preventDefault(),(o=C[S+1])==null||o.focus());break;case"ArrowUp":l.preventDefault(),S<=0?F==null||F.focus():(i=C[S-1])==null||i.focus();break;case"Tab":if(l.preventDefault(),l.shiftKey&&S>0){(x=C[S-1])==null||x.focus();break}V(),ee();break;case"Escape":l.preventDefault(),V(),ee();break}},{floatingStyles:ge}=O.useFloating(M,z,{whileElementsMounted:O.autoUpdate,placement:"bottom",middleware:[O.offset(4),O.flip({mainAxis:!0}),O.shift({padding:8}),O.size({padding:8,apply({availableHeight:l,elements:o}){Object.assign(o.floating.style,{maxHeight:`${l}px`})}})]}),{width:xe}=L.useElementSize(M),se=l=>{var o;return a.disabled||!a.disabled&&a.addOnly&&!!((o=m.value)!=null&&o.includes(l))},P=e.computed(()=>{const l=a.options.map(i=>({...i,checked:B.value.includes(i.value),disabled:i.disabled??se(i.value)})),o=[...l,...k.value.length===0&&H.value?H.value.filter(i=>!l.some(x=>x.value===i.value)):[]];return a.optionsOrderProperties&&!R.isEmpty(a.optionsOrderProperties)?qe(o,a.optionsOrderProperties,a.optionsOrder):o}),re=l=>P.value.filter(o=>l.some(i=>o.value===i)),$=e.computed(()=>re(B.value)),w=e.computed(()=>$.value[0]),te=e.computed(()=>{var l;if(!(u.value||!a.showSuffixInClosedInput)&&!(n.value&&$.value.length!==1))return(l=w.value)==null?void 0:l.labelSuffixComponent}),T=e.computed(()=>{var l;if(!a.showSelectionInClosedInput||u.value||!n.value)return;const o=(l=w.value)==null?void 0:l.labelPrefixComponent;if(o)return{component:o,extraCount:$.value.length-1}}),Ce=e.computed(()=>a.size==="xs"?"px-1":a.size==="sm"?"px-2":"px-4"),H=e.ref([]);e.watch(()=>{var l;if(n.value)return null;const o=h.value??"";return{selectedValue:o,label:((l=a.options.find(i=>i.value===o))==null?void 0:l.label)??""}},l=>{if(l){if(!l.selectedValue){N.value="",u.value||(k.value="");return}l.label&&(N.value=l.label,!u.value&&k.value===""&&(k.value=l.label))}},{immediate:!0});const ie=({value:l,checked:o})=>{var i;let x;n.value?x=o?[...B.value,l]:B.value.filter(C=>C!==l):(x=[l],N.value=((i=P.value.find(C=>C.value===l))==null?void 0:i.label)??"",k.value=N.value,A.value=!1,u.value=!1,ee()),H.value=re(x),B.value=x,f("change")},ue=e.computed(()=>B.value.length>0&&!a.disabled&&!(B.value.length===1&&B.value[0]==="")),W=()=>{B.value=[],g.value=[],n.value||(N.value="",k.value="",A.value=!1)},Be=()=>{if(!n.value&&N.value&&k.value===N.value){W();return}k.value=""},we=e.computed(()=>{if(!d||!n.value&&!A.value)return P.value;const l=k.value.toLowerCase();return P.value.filter(o=>o.searchValues?o.searchValues.some(i=>i.toLowerCase().includes(l)):(o.label??"").toLowerCase().includes(l))}),V=()=>{n.value?(y.value=g.value,k.value=""):k.value===""&&a.hasReset?W():(k.value=N.value,A.value=!1),u.value=!1},Ve=()=>{var l;u.value?V():(u.value=!0,(l=q())==null||l.focus())};e.watch(g,()=>{!u.value&&!R.isEqual(y.value,g.value)&&n.value&&(y.value=g.value)});const Se=l=>{const o=l.composedPath();z.value&&o.includes(z.value)||M.value&&o.includes(M.value)||u.value&&V()};L.useEventListener("mousedown",Se);const Ee=e.computed(()=>{var l,o,i,x,C,c,S;return n.value&&u.value?((l=a.i18n)==null?void 0:l.placeholderSearch)??"Search":T.value?"":n.value&&$.value.length===1?(o=w.value)==null?void 0:o.label:n.value&&$.value.length>=2?`${(i=w.value)==null?void 0:i.label} +${$.value.length-1}`:!h.value&&!w.value?u.value?((x=a.i18n)==null?void 0:x.placeholderSearch)??"Search":((C=a.i18n)==null?void 0:C.placeholderDefault)??"Select an option":u.value?((c=a.i18n)==null?void 0:c.placeholderSearch)??"Search":!a.singleModelValue&&!w.value?"":(S=P.value.find(F=>{var me;return F.value===((me=X.value)==null?void 0:me.value)}))==null?void 0:S.label}),ce=e.computed(()=>k.value===""),Ne=e.computed(()=>!(ce.value||!n.value&&N.value!==""&&k.value===N.value&&!a.hasReset)),Me=e.computed(()=>ue.value&&!!a.hasReset&&ce.value&&(n.value||!u.value)),Ie=!!(r!=null&&r.onAddOption),Pe=()=>{f("add-option"),V()},le=e.computed(()=>{var l;return!u.value&&!n.value&&((l=w.value)==null?void 0:l.labelPrefixComponent)}),de=`search-select-options-${Math.random().toString(36).substring(2,9)}`;return v({flushMemoryCachedSelectedOptions:()=>H.value=[],close:V}),(l,o)=>{var i,x,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ut,[e.createElementVNode("div",{ref_key:"wrapperRef",ref:M,class:e.normalizeClass(["relative flex items-end",{[`${t.rootClass}`]:t.rootClass,"z-30":u.value}]),role:"combobox","aria-expanded":u.value,"aria-haspopup":!0,"aria-controls":de,onKeydown:ye},[e.createVNode(e.unref(De._sfc_main),{ref_key:"inputRef",ref:ve,modelValue:k.value,"onUpdate:modelValue":o[2]||(o[2]=c=>k.value=c),required:t.required,label:t.label,name:t.name,form:t.form,"label-screen-reader-only":t.labelScreenReaderOnly,placeholder:Ee.value,class:"grow","wrapper-class":[t.wrapperClass,{"border-transparent border border-b-gray-200 focus-within:border-b relative z-10 rounded-b-none":u.value}],"input-class":!u.value&&(!n.value&&e.unref(h)||n.value&&!e.unref(R.isEmpty)(t.multiModelValue))?"text-ellipsis placeholder:text-default":"","suffix-class":"border-l-0",disabled:t.disabled,size:t.size,error:t.error,"prefix-has-border":Y.value,"aria-autocomplete":"list",onFocus:pe,onClick:he,onInput:be,onBlur:o[3]||(o[3]=c=>l.$emit("blur"))},e.createSlots({"label-suffix":e.withCtx(()=>[e.renderSlot(l.$slots,"label-suffix")]),suffix:e.withCtx(()=>{var c;return[e.createElementVNode("div",ft,[!u.value&&!n.value&&((c=w.value)!=null&&c.labelInlineComponent)&&(!t.showSuffixInClosedInput||t.showSuffixLabelInInput)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},w.value.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(te.value.component),e.normalizeProps(e.mergeProps({key:1},te.value.props)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",vt,[Me.value?(e.openBlock(),e.createBlock(fe._sfc_main,{key:0,icon:"close",size:"sm",intent:"subtle",type:"button",onMousedown:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),onClick:W})):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,icon:"close",size:"sm",intent:"subtle",type:"button",onClick:Be})):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"flex aspect-square items-center justify-center self-stretch text-gray-800",onMousedown:o[1]||(o[1]=e.withModifiers(()=>{},["prevent"])),onClick:Ve},[e.createVNode(U._sfc_main$1,{icon:u.value?"keyboard_arrow_up":"keyboard_arrow_down",size:t.size==="xs"?"xs":"sm"},null,8,["icon","size"])],32)])])]}),_:2},[l.$slots.tooltip?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip")]),key:"0"}:void 0,T.value?{name:"input",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute inset-0 flex items-center gap-1",Ce.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value.component.component),e.normalizeProps(e.guardReactiveProps(T.value.component.props)),null,16)),T.value.extraCount>0?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:0,variant:t.size==="xs"||t.size==="sm"?"body-xs":"body-sm",tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(T.value.extraCount),1)]),_:1},8,["variant"])):e.createCommentVNode("",!0)],2)]),key:"1"}:void 0,K.value||le.value||!d?{name:"prefix",fn:e.withCtx(()=>{var c;return[e.createElementVNode("div",dt,[j.value?e.renderSlot(l.$slots,"prefix",{},void 0,void 0,0):I.value?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:1,variant:t.size==="xs"?"body-xs":"body-sm",tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.prefix),1)]),_:1},8,["variant"])):le.value&&((c=w.value)!=null&&c.labelPrefixComponent)?(e.openBlock(),e.createElementBlock("div",mt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.labelPrefixComponent.component),e.normalizeProps(e.guardReactiveProps(w.value.labelPrefixComponent.props)),null,16))])):d?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(U._sfc_main$1,{key:3,icon:"search",size:"sm"}))])]}),key:"2"}:void 0,l.$slots.helper?{name:"helper",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"helper")]),key:"3"}:void 0]),1032,["modelValue","required","label","name","form","label-screen-reader-only","placeholder","wrapper-class","input-class","disabled","size","error","prefix-has-border"])],42,ct),t.withChips?(e.openBlock(),e.createElementBlock("div",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,({value:c,label:S})=>(e.openBlock(),e.createBlock(Oe._sfc_main,{key:c,removable:!se(c),onRemoved:F=>ie({value:c,checked:!1})},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:S},null,8,ht)]),_:2},1032,["removable","onRemoved"]))),128))])):e.createCommentVNode("",!0)]),e.unref(Z)&&e.unref(p)?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:e.unref(p)},[u.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",{key:0,id:de,ref_key:"optionsRef",ref:z,role:"listbox",style:e.normalizeStyle(e.unref(ge)),class:"z-70 overflow-y-auto rounded border border-gray-200 bg-white drop-shadow-md",onMouseenter:o[4]||(o[4]=c=>u.value=!0),onKeydown:ke},[e.createElementVNode("div",{class:"rounded pt-0",style:e.normalizeStyle({width:`${e.unref(xe)}px`})},[e.createVNode(it,{i18n:{addOnly:(i=t.i18n)==null?void 0:i.addOnly,noResults:(x=t.i18n)==null?void 0:x.noResults,noOptionsAvailable:(C=t.i18n)==null?void 0:C.noOptionsAvailable},options:we.value,multiple:n.value,search:k.value,model:B.value,"add-only":t.addOnly,"allows-multiple-values":!!n.value,condensed:t.condensed,"has-large-dropdown":t.hasLargeDropdown,onValueChanged:ie},{"list-footer-content":e.withCtx(()=>[Ie?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,intent:"subtle",class:"w-full rounded-t-none",type:"button","icon-prefix":"add",onClick:Pe},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString((c=t.i18n)==null?void 0:c.addOption),1)]}),_:1})):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex items-center justify-between",{"py-2":!l.$slots["list-footer-content"]}])},[ue.value?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,type:"button",intent:"subtle",size:"xs",class:"ml-2",onClick:W},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(((c=t.i18n)==null?void 0:c.multipleValuesClearButtonText)??"Clear"),1)]}),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.renderSlot(l.$slots,"list-footer-content",{close:V})]),e.createVNode(U._sfc_main,{type:"button",intent:"secondary",size:"xs",class:"mr-2","data-testid":e.unref(We),onClick:V},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(((c=t.i18n)==null?void 0:c.multipleValuesDoneButtonText)??"Done"),1)]}),_:1},8,["data-testid"])],2)):e.renderSlot(l.$slots,"list-footer-content",{close:V},void 0,void 0,2)]),_:3},8,["i18n","options","multiple","search","model","add-only","allows-multiple-values","condensed","has-large-dropdown"])],4)],36)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)],64)}}}),yt=e.defineComponent({__name:"CountrySelect",props:{label:{},singleModelValue:{},multiModelValue:{},error:{},required:{type:Boolean,default:!0},hasReset:{type:Boolean},disabled:{type:Boolean},name:{},form:{}},emits:["update:modelValue","update:singleModelValue"],setup(t,{emit:v}){const b=t,s=L.useVModel(b,"singleModelValue"),a=L.useVModel(b,"multiModelValue"),p=v;return(r,d)=>(e.openBlock(),e.createBlock(bt,{"multi-model-value":e.unref(a),"onUpdate:multiModelValue":d[0]||(d[0]=n=>e.isRef(a)?a.value=n:null),"single-model-value":e.unref(s),"onUpdate:singleModelValue":[d[1]||(d[1]=n=>e.isRef(s)?s.value=n:null),d[2]||(d[2]=n=>{p("update:modelValue",n)})],"root-class":r.$attrs.class,label:t.label,options:e.unref($e.countryData).map(({key:n,value:m})=>({label:m,value:n})),error:t.error,"has-reset":t.hasReset,disabled:t.disabled,required:t.required,"with-chips":!!t.multiModelValue,name:t.name,form:t.form},{"label-suffix":e.withCtx(()=>[e.renderSlot(r.$slots,"label-suffix")]),_:3},8,["multi-model-value","single-model-value","root-class","label","options","error","has-reset","disabled","required","with-chips","name","form"]))}}),kt={class:"flex grow flex-col"},gt=e.defineComponent({__name:"CompanyPurchaseToggle",props:e.mergeModels({noSpacing:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const v=e.useModel(t,"modelValue"),{$t:b}=D.useIntl();return(s,a)=>(e.openBlock(),e.createBlock(e.unref(ze._sfc_main),{modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=p=>v.value=p),"no-spacing":t.noSpacing,"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",kt,[e.createVNode(e.unref(D._sfc_main),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(D._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue","no-spacing"]))}});function xt(){const{$t:t}=D.useIntl();return{contactInformationTitle:t({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"}),emailLabel:t({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),emailPlaceholder:t({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),countryLabel:t({defaultMessage:"Billing country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),vatNumberLabel:t({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),vatNumberPlaceholder:t({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),legalNameLabel:t({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),legalNamePlaceholder:t({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),addressTitle:t({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),postalCodePlaceholder:t({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),cityPlaceholder:t({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),statePlaceholder:t({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"})}}exports._sfc_main=yt;exports._sfc_main$1=gt;exports.objectDiff=Re;exports.useCustomerFormLabels=xt;
@@ -1,5 +1,5 @@
1
1
  import { inject as e } from "vue";
2
- import { E as r } from "./customElements-Com2NiGU.mjs";
2
+ import { E as r } from "./customElements-Df6dGrN-.mjs";
3
3
  const m = () => e(r);
4
4
  export {
5
5
  m as u
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./customElements-Bt8PbjIn.js"),r=()=>e.inject(t.EXPERIMENTAL_FEATURE_INJECTION_KEY);exports.useExperimentalFeature=r;
1
+ const e=require("vue"),t=require("./customElements-BYIdPSzQ.js"),r=()=>e.inject(t.EXPERIMENTAL_FEATURE_INJECTION_KEY);exports.useExperimentalFeature=r;
@@ -1,5 +1,5 @@
1
- import { c as m } from "./invoices-CV9iAUHf.mjs";
2
- import { c as u } from "./payments-C_cMXQzE.mjs";
1
+ import { c as m } from "./invoices-CrO6p4Ms.mjs";
2
+ import { c as u } from "./payments-VS_N2xpJ.mjs";
3
3
  import { ref as o, onMounted as f } from "vue";
4
4
  import { u as v } from "./useWatchDebounced-DT5IicPp.mjs";
5
5
  const y = ({
@@ -1 +1 @@
1
- const r=require("./invoices-CvpL4rv5.js"),v=require("./payments-DGckugN0.js"),s=require("vue"),y=require("./useWatchDebounced-CAU1WI1P.js"),d=({getData:n,onError:e,watchValue:t,debounce:c=200})=>{const a=s.ref(),i=s.ref(!0),u=async()=>{try{a.value=await n(t)}catch(o){e==null||e(o)}finally{i.value=!1}};return t&&y.useWatchDebounced(t,()=>void u(),{debounce:c}),s.onMounted(async()=>{u()}),{data:a,isPending:i}};function D(n){const{getInvoice:e}=r.createInvoicesService(),{getPayments:t}=v.createPaymentsService();return d({getData:async()=>{const[c,a]=await Promise.all([e(n),t(n)]);return{invoice:c,paymentAttempts:a}}})}exports.useInvoiceData=D;
1
+ const r=require("./invoices-mw87cNTS.js"),v=require("./payments-KTjVHqOa.js"),s=require("vue"),y=require("./useWatchDebounced-CAU1WI1P.js"),d=({getData:n,onError:e,watchValue:t,debounce:c=200})=>{const a=s.ref(),i=s.ref(!0),u=async()=>{try{a.value=await n(t)}catch(o){e==null||e(o)}finally{i.value=!1}};return t&&y.useWatchDebounced(t,()=>void u(),{debounce:c}),s.onMounted(async()=>{u()}),{data:a,isPending:i}};function D(n){const{getInvoice:e}=r.createInvoicesService(),{getPayments:t}=v.createPaymentsService();return d({getData:async()=>{const[c,a]=await Promise.all([e(n),t(n)]);return{invoice:c,paymentAttempts:a}}})}exports.useInvoiceData=D;
@@ -1 +1 @@
1
- const e=require("vue"),w=require("./Section.vue.es-DuK52y67.js"),m=require("./customElements-Bt8PbjIn.js"),x=require("./Amount.vue.es-DExaYBqm.js"),v=require("./Button.vue.es-BWl37nzm.js"),B=require("./Chip.vue.es-DUgjuRWm.js"),_=require("./TooltipParagraph.vue.es-sTgWAgcd.js"),C=require("./floating-ui.vue.es-Bly3DGWm.js"),N=require("./useActionDispatchProvider-B54GYEY7.js"),V=require("./configuration-akTS7Wiw.js"),$=require("./useIncrementalLoading-CaWOE8Xl.js"),S=require("./invoices-CvpL4rv5.js"),h=Symbol("tableInset"),b=Symbol("tableSorting"),y=Symbol("tableRowDetail"),g=Symbol("tableHeadEmphasize"),k=Symbol("tableRowLink"),T={class:"solvimon-table w-full text-left text-sm"},I=e.defineComponent({__name:"Table",props:{inset:{type:Boolean,default:!1},sorting:{}},setup(t){const n=t;return e.provide(h,e.computed(()=>n.inset)),e.provide(b,e.computed(()=>n.sorting)),(i,o)=>(e.openBlock(),e.createElementBlock("table",T,[e.renderSlot(i.$slots,"default")]))}}),z=["colspan"],L={key:0,class:"solvimon-table__row-link"},f=e.defineComponent({__name:"TableCell",props:{primary:{type:Boolean},align:{default:"start"},verticalAlign:{default:"middle"},truncate:{type:Boolean},colspan:{}},setup(t){const n=t,i=e.inject(h,void 0),o=e.inject(y,void 0),l=e.inject(k,void 0),r=(l==null?void 0:l.claim())??!1,d=l==null?void 0:l.slot,a=e.computed(()=>r&&(l==null?void 0:l.enabled.value)),c=e.computed(()=>[n.align==="end"?"text-right":"text-left",n.verticalAlign==="top"?"align-top":"align-middle",{"first:pl-0":!(i!=null&&i.value),"h-12":!(o!=null&&o.value),"max-w-0 truncate":n.truncate,"font-semibold":n.primary}]);return(s,u)=>(e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass([c.value,"solvimon-table__cell whitespace-nowrap px-4 py-2 text-sm leading-5 text-default"]),colspan:t.colspan},[a.value?(e.openBlock(),e.createElementBlock("span",L,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(d))))])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default")],10,z))}}),E=e.defineComponent({__name:"TableHead",props:{emphasize:{type:Boolean,default:!1}},setup(t){const n=t;return e.provide(g,e.computed(()=>n.emphasize)),(i,o)=>(e.openBlock(),e.createElementBlock("thead",null,[e.renderSlot(i.$slots,"default")]))}}),D=["colspan","aria-sort"],M={key:0,class:"sr-only"},p=e.defineComponent({__name:"TableHeadCell",props:{columnName:{},sortable:{type:Boolean},align:{default:"start"},minWidth:{},tooltip:{},colspan:{},hiddenLabel:{type:Boolean}},emits:["sort"],setup(t,{emit:n}){const i=n,o=t,l=e.inject(b,void 0),r=e.inject(h,void 0),d=e.computed(()=>{if(!(!o.sortable||!(l!=null&&l.value))&&l.value.columnName===o.columnName)return l.value.direction}),a=e.computed(()=>{if(o.sortable)return d.value==="asc"?"ascending":d.value==="desc"?"descending":"none"}),c=e.computed(()=>[o.align==="end"?"text-right":"text-left",{"first:pl-0":!(r!=null&&r.value),"w-px":o.hiddenLabel}]),s=()=>{o.columnName&&i("sort",o.columnName)};return(u,X)=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(t.minWidth?{minWidth:`${t.minWidth}px`}:void 0),class:e.normalizeClass([c.value,"relative h-10 select-none whitespace-nowrap px-4 py-2 align-middle text-xs font-medium text-secondary"]),colspan:t.colspan,"aria-sort":a.value,scope:"col"},[t.hiddenLabel?(e.openBlock(),e.createElementBlock("span",M,[e.renderSlot(u.$slots,"default")])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["inline-flex items-center gap-1 align-middle",{"w-full justify-end":t.align==="end"}])},[t.sortable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["inline-flex items-center gap-1 rounded-sm hover:text-default focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600",{"text-primary-700":d.value}]),onClick:s},[e.renderSlot(u.$slots,"default"),d.value==="asc"?(e.openBlock(),e.createBlock(v._sfc_main$1,{key:0,icon:"north",size:"2xs",class:"shrink-0","aria-hidden":"true"})):d.value==="desc"?(e.openBlock(),e.createBlock(v._sfc_main$1,{key:1,icon:"south",size:"2xs",class:"shrink-0","aria-hidden":"true"})):(e.openBlock(),e.createBlock(v._sfc_main$1,{key:2,icon:"unfold_more",size:"2xs",class:"shrink-0 text-subtle","aria-hidden":"true"}))],2)):e.renderSlot(u.$slots,"default",{},void 0,void 0,1),t.tooltip?(e.openBlock(),e.createBlock(_._sfc_main,{key:2,variant:"outline"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main$1,{icon:"help",size:"xs",class:"rounded drop-shadow-sm hover:cursor-default hover:bg-gray-50"})]),tooltip:e.withCtx(()=>[e.createVNode(_.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(_._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.tooltip),1)]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)],2))],14,D))}}),q=["data-emphasized"],A=e.defineComponent({__name:"TableHeadRow",setup(t){const n=e.inject(g,void 0),i=e.computed(()=>(n==null?void 0:n.value)??!1);return(o,l)=>(e.openBlock(),e.createElementBlock("tr",{class:"border-b border-gray-200 bg-white","data-emphasized":i.value||void 0},[e.renderSlot(o.$slots,"default")],8,q))}}),R=["aria-selected","data-detail"],j=e.defineComponent({__name:"TableRow",props:{selected:{type:Boolean},detail:{type:Boolean}},setup(t){const n=t,i=e.useSlots(),o=e.ref(),l=e.ref(!1),r=e.computed(()=>!!i.link&&!n.detail);e.provide(y,e.computed(()=>!!n.detail)),i.link&&e.provide(k,{enabled:r,slot:i.link,claim:()=>l.value?!1:(l.value=!0,!0)});const d=a=>{var c,s;if(!r.value||a.defaultPrevented)return;const u=a.target;u instanceof Element&&u.closest('a, button, input, select, textarea, [role="button"], [contenteditable="true"]')||(s=(c=o.value)==null?void 0:c.querySelector(".solvimon-table__row-link :is(a, button)"))==null||s.click()};return(a,c)=>(e.openBlock(),e.createElementBlock("tr",{ref_key:"row",ref:o,class:e.normalizeClass(["group relative border-b border-gray-100 transition-colors",{"bg-primary-50":t.selected,"bg-gray-50":t.detail&&!t.selected,"bg-white":!t.selected&&!t.detail,"cursor-pointer":r.value}]),"aria-selected":t.selected?"true":void 0,"data-detail":t.detail?"true":void 0,onClick:d},[e.renderSlot(a.$slots,"default")],10,R))}}),P={};function H(t,n){return e.openBlock(),e.createElementBlock("tbody",null,[e.renderSlot(t.$slots,"default")])}const K=C._export_sfc(P,[["render",H]]),O={class:"sv-table sv-invoices-list__table grid-cols-1 gap-4"},W=["onClick"],F={class:"flex flex-col"},U={class:"sv-invoices-list__load-more mt-2 flex items-center justify-center"},G=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(t){const n=t,{formatDate:i,$t:o}=m.useIntl(),l=e.computed(()=>n.configuration.showPayButton),r=e.computed(()=>n.configuration.showViewButton),d=e.computed(()=>n.hasMoreItems);return(a,c)=>(e.openBlock(),e.createElementBlock("div",O,[e.createVNode(e.unref(I),null,{default:e.withCtx(()=>[e.createVNode(e.unref(E),null,{default:e.withCtx(()=>[e.createVNode(e.unref(A),{class:"sv-table__head"},{default:e.withCtx(()=>[e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--invoice"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--date hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--amount"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--status text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(K),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoices,s=>(e.openBlock(),e.createBlock(e.unref(j),{key:s.id,class:"sv-table__row sv-invoices-list__row"},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--invoice h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:s.invoice_date,format:"date",offsetType:"offsetted",timezone:s.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--date hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:s.invoice_date,format:"date",offsetType:"offsetted",timezone:s.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--amount h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(x._sfc_main),{value:s.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--status h-14 text-right"},{default:e.withCtx(()=>[s.paid?(e.openBlock(),e.createBlock(e.unref(B._sfc_main),{key:0,intent:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):l.value?(e.openBlock(),e.createBlock(e.unref(v._sfc_main),{key:1,intent:"secondary",size:"xs",class:"sv-action sv-action--secondary sv-invoices-list__pay",type:"button",onClick:e.withModifiers(u=>a.$emit("pay-invoice",{invoiceId:s.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[r.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"sv-invoices-list__row-action absolute inset-0 h-full w-full",onClick:u=>a.$emit("view-invoice",{invoiceId:s.id})},null,8,W)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",U,[d.value?(e.openBlock(),e.createBlock(e.unref(v._sfc_main),{key:0,intent:"secondary",size:"sm",class:"sv-action sv-action--secondary sv-action--full-width w-full",loading:t.isLoading,onClick:c[0]||(c[0]=s=>a.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),J=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["load-more"],setup(t){const n={showPayButton:!0,showViewButton:!0,pagination:{enabled:!0}},i=t,o=e.computed(()=>V.resolveConfiguration(n,i.configuration)),{$t:l}=m.useIntl(),{dispatchAction:r}=N.useActionDispatchProvider();return(d,a)=>(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{class:"sv-invoices-list sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(l)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(G,{class:"sv-invoices-list__table",configuration:o.value,"has-more-items":o.value.pagination.enabled&&t.hasMoreItems,invoices:t.invoices,"is-loading":t.isLoading,onLoadMore:a[0]||(a[0]=c=>d.$emit("load-more")),onViewInvoice:a[1]||(a[1]=c=>e.unref(r)({action:"view-invoice",data:{invoiceId:c.invoiceId}})),onPayInvoice:a[2]||(a[2]=c=>e.unref(r)({action:"pay-invoice",data:{invoiceId:c.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});function Q({customerId:t,batchSize:n=15}){const i=S.createInvoicesService(),o=async l=>i.getInvoices({customerId:t,pagination:{page:l,pageSize:n}});return $.useIncrementalLoading({service:o})}exports._sfc_main=J;exports.useInvoicesList=Q;
1
+ const e=require("vue"),w=require("./Section.vue.es-Cybk1Nb8.js"),m=require("./customElements-BYIdPSzQ.js"),x=require("./Amount.vue.es-DExaYBqm.js"),v=require("./Button.vue.es-CJNxYacb.js"),B=require("./Chip.vue.es-DLQ4QEPo.js"),_=require("./TooltipParagraph.vue.es-OX6bAWP9.js"),C=require("./floating-ui.vue.es-Bly3DGWm.js"),N=require("./useActionDispatchProvider-CTyDGRX8.js"),V=require("./configuration-akTS7Wiw.js"),$=require("./useIncrementalLoading-CaWOE8Xl.js"),S=require("./invoices-mw87cNTS.js"),h=Symbol("tableInset"),b=Symbol("tableSorting"),y=Symbol("tableRowDetail"),g=Symbol("tableHeadEmphasize"),k=Symbol("tableRowLink"),T={class:"solvimon-table w-full text-left text-sm"},I=e.defineComponent({__name:"Table",props:{inset:{type:Boolean,default:!1},sorting:{}},setup(t){const n=t;return e.provide(h,e.computed(()=>n.inset)),e.provide(b,e.computed(()=>n.sorting)),(i,o)=>(e.openBlock(),e.createElementBlock("table",T,[e.renderSlot(i.$slots,"default")]))}}),z=["colspan"],L={key:0,class:"solvimon-table__row-link"},f=e.defineComponent({__name:"TableCell",props:{primary:{type:Boolean},align:{default:"start"},verticalAlign:{default:"middle"},truncate:{type:Boolean},colspan:{}},setup(t){const n=t,i=e.inject(h,void 0),o=e.inject(y,void 0),l=e.inject(k,void 0),r=(l==null?void 0:l.claim())??!1,d=l==null?void 0:l.slot,a=e.computed(()=>r&&(l==null?void 0:l.enabled.value)),c=e.computed(()=>[n.align==="end"?"text-right":"text-left",n.verticalAlign==="top"?"align-top":"align-middle",{"first:pl-0":!(i!=null&&i.value),"h-12":!(o!=null&&o.value),"max-w-0 truncate":n.truncate,"font-semibold":n.primary}]);return(s,u)=>(e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass([c.value,"solvimon-table__cell whitespace-nowrap px-4 py-2 text-sm leading-5 text-default"]),colspan:t.colspan},[a.value?(e.openBlock(),e.createElementBlock("span",L,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(d))))])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default")],10,z))}}),E=e.defineComponent({__name:"TableHead",props:{emphasize:{type:Boolean,default:!1}},setup(t){const n=t;return e.provide(g,e.computed(()=>n.emphasize)),(i,o)=>(e.openBlock(),e.createElementBlock("thead",null,[e.renderSlot(i.$slots,"default")]))}}),D=["colspan","aria-sort"],M={key:0,class:"sr-only"},p=e.defineComponent({__name:"TableHeadCell",props:{columnName:{},sortable:{type:Boolean},align:{default:"start"},minWidth:{},tooltip:{},colspan:{},hiddenLabel:{type:Boolean}},emits:["sort"],setup(t,{emit:n}){const i=n,o=t,l=e.inject(b,void 0),r=e.inject(h,void 0),d=e.computed(()=>{if(!(!o.sortable||!(l!=null&&l.value))&&l.value.columnName===o.columnName)return l.value.direction}),a=e.computed(()=>{if(o.sortable)return d.value==="asc"?"ascending":d.value==="desc"?"descending":"none"}),c=e.computed(()=>[o.align==="end"?"text-right":"text-left",{"first:pl-0":!(r!=null&&r.value),"w-px":o.hiddenLabel}]),s=()=>{o.columnName&&i("sort",o.columnName)};return(u,X)=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(t.minWidth?{minWidth:`${t.minWidth}px`}:void 0),class:e.normalizeClass([c.value,"relative h-10 select-none whitespace-nowrap px-4 py-2 align-middle text-xs font-medium text-secondary"]),colspan:t.colspan,"aria-sort":a.value,scope:"col"},[t.hiddenLabel?(e.openBlock(),e.createElementBlock("span",M,[e.renderSlot(u.$slots,"default")])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["inline-flex items-center gap-1 align-middle",{"w-full justify-end":t.align==="end"}])},[t.sortable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["inline-flex items-center gap-1 rounded-sm hover:text-default focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600",{"text-primary-700":d.value}]),onClick:s},[e.renderSlot(u.$slots,"default"),d.value==="asc"?(e.openBlock(),e.createBlock(v._sfc_main$1,{key:0,icon:"north",size:"2xs",class:"shrink-0","aria-hidden":"true"})):d.value==="desc"?(e.openBlock(),e.createBlock(v._sfc_main$1,{key:1,icon:"south",size:"2xs",class:"shrink-0","aria-hidden":"true"})):(e.openBlock(),e.createBlock(v._sfc_main$1,{key:2,icon:"unfold_more",size:"2xs",class:"shrink-0 text-subtle","aria-hidden":"true"}))],2)):e.renderSlot(u.$slots,"default",{},void 0,void 0,1),t.tooltip?(e.openBlock(),e.createBlock(_._sfc_main,{key:2,variant:"outline"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main$1,{icon:"help",size:"xs",class:"rounded drop-shadow-sm hover:cursor-default hover:bg-gray-50"})]),tooltip:e.withCtx(()=>[e.createVNode(_.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(_._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.tooltip),1)]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)],2))],14,D))}}),q=["data-emphasized"],A=e.defineComponent({__name:"TableHeadRow",setup(t){const n=e.inject(g,void 0),i=e.computed(()=>(n==null?void 0:n.value)??!1);return(o,l)=>(e.openBlock(),e.createElementBlock("tr",{class:"border-b border-gray-200 bg-white","data-emphasized":i.value||void 0},[e.renderSlot(o.$slots,"default")],8,q))}}),R=["aria-selected","data-detail"],j=e.defineComponent({__name:"TableRow",props:{selected:{type:Boolean},detail:{type:Boolean}},setup(t){const n=t,i=e.useSlots(),o=e.ref(),l=e.ref(!1),r=e.computed(()=>!!i.link&&!n.detail);e.provide(y,e.computed(()=>!!n.detail)),i.link&&e.provide(k,{enabled:r,slot:i.link,claim:()=>l.value?!1:(l.value=!0,!0)});const d=a=>{var c,s;if(!r.value||a.defaultPrevented)return;const u=a.target;u instanceof Element&&u.closest('a, button, input, select, textarea, [role="button"], [contenteditable="true"]')||(s=(c=o.value)==null?void 0:c.querySelector(".solvimon-table__row-link :is(a, button)"))==null||s.click()};return(a,c)=>(e.openBlock(),e.createElementBlock("tr",{ref_key:"row",ref:o,class:e.normalizeClass(["group relative border-b border-gray-100 transition-colors",{"bg-primary-50":t.selected,"bg-gray-50":t.detail&&!t.selected,"bg-white":!t.selected&&!t.detail,"cursor-pointer":r.value}]),"aria-selected":t.selected?"true":void 0,"data-detail":t.detail?"true":void 0,onClick:d},[e.renderSlot(a.$slots,"default")],10,R))}}),P={};function H(t,n){return e.openBlock(),e.createElementBlock("tbody",null,[e.renderSlot(t.$slots,"default")])}const K=C._export_sfc(P,[["render",H]]),O={class:"sv-table sv-invoices-list__table grid-cols-1 gap-4"},W=["onClick"],F={class:"flex flex-col"},U={class:"sv-invoices-list__load-more mt-2 flex items-center justify-center"},G=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(t){const n=t,{formatDate:i,$t:o}=m.useIntl(),l=e.computed(()=>n.configuration.showPayButton),r=e.computed(()=>n.configuration.showViewButton),d=e.computed(()=>n.hasMoreItems);return(a,c)=>(e.openBlock(),e.createElementBlock("div",O,[e.createVNode(e.unref(I),null,{default:e.withCtx(()=>[e.createVNode(e.unref(E),null,{default:e.withCtx(()=>[e.createVNode(e.unref(A),{class:"sv-table__head"},{default:e.withCtx(()=>[e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--invoice"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--date hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--amount"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(p),{class:"sv-table__cell sv-invoices-list__cell--status text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(K),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoices,s=>(e.openBlock(),e.createBlock(e.unref(j),{key:s.id,class:"sv-table__row sv-invoices-list__row"},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--invoice h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:s.invoice_date,format:"date",offsetType:"offsetted",timezone:s.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--date hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:s.invoice_date,format:"date",offsetType:"offsetted",timezone:s.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--amount h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(x._sfc_main),{value:s.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(f),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--status h-14 text-right"},{default:e.withCtx(()=>[s.paid?(e.openBlock(),e.createBlock(e.unref(B._sfc_main),{key:0,intent:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):l.value?(e.openBlock(),e.createBlock(e.unref(v._sfc_main),{key:1,intent:"secondary",size:"xs",class:"sv-action sv-action--secondary sv-invoices-list__pay",type:"button",onClick:e.withModifiers(u=>a.$emit("pay-invoice",{invoiceId:s.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[r.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"sv-invoices-list__row-action absolute inset-0 h-full w-full",onClick:u=>a.$emit("view-invoice",{invoiceId:s.id})},null,8,W)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",U,[d.value?(e.openBlock(),e.createBlock(e.unref(v._sfc_main),{key:0,intent:"secondary",size:"sm",class:"sv-action sv-action--secondary sv-action--full-width w-full",loading:t.isLoading,onClick:c[0]||(c[0]=s=>a.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),J=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["load-more"],setup(t){const n={showPayButton:!0,showViewButton:!0,pagination:{enabled:!0}},i=t,o=e.computed(()=>V.resolveConfiguration(n,i.configuration)),{$t:l}=m.useIntl(),{dispatchAction:r}=N.useActionDispatchProvider();return(d,a)=>(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{class:"sv-invoices-list sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(l)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(G,{class:"sv-invoices-list__table",configuration:o.value,"has-more-items":o.value.pagination.enabled&&t.hasMoreItems,invoices:t.invoices,"is-loading":t.isLoading,onLoadMore:a[0]||(a[0]=c=>d.$emit("load-more")),onViewInvoice:a[1]||(a[1]=c=>e.unref(r)({action:"view-invoice",data:{invoiceId:c.invoiceId}})),onPayInvoice:a[2]||(a[2]=c=>e.unref(r)({action:"pay-invoice",data:{invoiceId:c.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});function Q({customerId:t,batchSize:n=15}){const i=S.createInvoicesService(),o=async l=>i.getInvoices({customerId:t,pagination:{page:l,pageSize:n}});return $.useIncrementalLoading({service:o})}exports._sfc_main=J;exports.useInvoicesList=Q;
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as w, provide as x, computed as v, openBlock as a, createElementBlock as _, renderSlot as g, inject as k, normalizeClass as $, createBlock as h, resolveDynamicComponent as E, unref as t, createCommentVNode as z, normalizeStyle as j, withCtx as s, createVNode as c, createTextVNode as p, toDisplayString as b, useSlots as H, ref as M, Fragment as K, renderList as O, createSlots as W, createElementVNode as C, withModifiers as F } from "vue";
2
- import { _ as U } from "./Section.vue.es-By1JltGi.mjs";
3
- import { u as R, _ as L } from "./customElements-Com2NiGU.mjs";
2
+ import { _ as U } from "./Section.vue.es-C2_topx4.mjs";
3
+ import { u as R, _ as L } from "./customElements-Df6dGrN-.mjs";
4
4
  import { _ as q } from "./Amount.vue.es-DPqHB8Xd.mjs";
5
- import { a as I, _ as N } from "./Button.vue.es-VQCd3V3C.mjs";
6
- import { _ as G } from "./Chip.vue.es-CXG8o1Qf.mjs";
7
- import { _ as J, T as Q, a as X } from "./TooltipParagraph.vue.es-DYu2ReL7.mjs";
5
+ import { a as I, _ as N } from "./Button.vue.es-BJEy-e9C.mjs";
6
+ import { _ as G } from "./Chip.vue.es-DGbc4L_D.mjs";
7
+ import { _ as J, T as Q, a as X } from "./TooltipParagraph.vue.es-Fu9Od3Vr.mjs";
8
8
  import { _ as Y } from "./floating-ui.vue.es-CYt0fSY7.mjs";
9
- import { u as Z } from "./useActionDispatchProvider-e2lQXTid.mjs";
9
+ import { u as Z } from "./useActionDispatchProvider-DyQbRCxR.mjs";
10
10
  import { r as ee } from "./configuration-BytDBAWs.mjs";
11
11
  import { u as te } from "./useIncrementalLoading-Cgxw2GD7.mjs";
12
- import { c as oe } from "./invoices-CV9iAUHf.mjs";
12
+ import { c as oe } from "./invoices-CrO6p4Ms.mjs";
13
13
  const S = Symbol("tableInset"), D = Symbol("tableSorting"), A = Symbol("tableRowDetail"), P = Symbol("tableHeadEmphasize"), V = Symbol("tableRowLink"), ie = { class: "solvimon-table w-full text-left text-sm" }, se = /* @__PURE__ */ w({
14
14
  __name: "Table",
15
15
  props: {
@@ -1 +1 @@
1
- const a=require("vue"),i=require("./customElements-Bt8PbjIn.js");function r(...t){const e=a.ref(!0),o=i.useLogger();return a.onMounted(async()=>{await Promise.all(t).then(()=>{e.value=!1}).catch(n=>{e.value=!1,o.error("INITIAL_DATA_LOAD_FAILED","Failed to load initial data",{},n)})}),{isLoading:e}}exports.useLoadInitialData=r;
1
+ const a=require("vue"),i=require("./customElements-BYIdPSzQ.js");function r(...t){const e=a.ref(!0),o=i.useLogger();return a.onMounted(async()=>{await Promise.all(t).then(()=>{e.value=!1}).catch(n=>{e.value=!1,o.error("INITIAL_DATA_LOAD_FAILED","Failed to load initial data",{},n)})}),{isLoading:e}}exports.useLoadInitialData=r;
@@ -1,5 +1,5 @@
1
1
  import { ref as r, onMounted as i } from "vue";
2
- import { b as n } from "./customElements-Com2NiGU.mjs";
2
+ import { b as n } from "./customElements-Df6dGrN-.mjs";
3
3
  function u(...o) {
4
4
  const a = r(!0), e = n();
5
5
  return i(async () => {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as y, computed as r, openBlock as v, createBlock as b, withCtx as _, createElementVNode as A, createVNode as N, unref as g, createTextVNode as w, toDisplayString as E, renderSlot as I, toValue as u, watch as x } from "vue";
2
- import { u as M, _ as L, b as B } from "./customElements-Com2NiGU.mjs";
3
- import { _ as T } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs";
4
- import { h as O } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C4bk0m8g.mjs";
5
- import { u as V } from "./useExperimentalFeature-B0IFn3Uw.mjs";
2
+ import { u as M, _ as L, b as B } from "./customElements-Df6dGrN-.mjs";
3
+ import { _ as T } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs";
4
+ import { h as O } from "./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BgztoQH5.mjs";
5
+ import { u as V } from "./useExperimentalFeature-4Y-ppDr7.mjs";
6
6
  const S = { class: "flex flex-col items-center gap-4" }, H = /* @__PURE__ */ y({
7
7
  __name: "PaymentMethodsUnavailableCard",
8
8
  props: {
@@ -1 +1 @@
1
- const e=require("vue"),m=require("./customElements-Bt8PbjIn.js"),y=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js"),f=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CcEEdHQJ.js"),v=require("./useExperimentalFeature-8Mzpj5wc.js"),b={class:"flex flex-col items-center gap-4"},A=e.defineComponent({__name:"PaymentMethodsUnavailableCard",props:{variant:{type:String},sellerName:{type:String}},setup(d){const t=d,{$t:n}=m.useIntl(),u=e.computed(()=>t.variant==="AUTHORIZE"?n({defaultMessage:"This invoice cannot be paid online",description:"Title shown when no payment method can be offered for paying an invoice",id:"payment_methods_unavailable_card.title.authorize"}):n({defaultMessage:"No payment methods can be added",description:"Title shown when no payment method can be offered for storing a payment method",id:"payment_methods_unavailable_card.title.tokenize"})),r=e.computed(()=>t.variant==="AUTHORIZE"?t.sellerName?n({defaultMessage:"Online payment is not set up for this invoice. {sellerName} can settle it with you directly.",description:"Body text shown when an invoice cannot be paid online, naming the seller",id:"payment_methods_unavailable_card.description.authorize_with_seller"},{sellerName:t.sellerName}):n({defaultMessage:"Online payment is not set up for this invoice. The party that issued it can settle it with you directly.",description:"Body text shown when an invoice cannot be paid online",id:"payment_methods_unavailable_card.description.authorize"}):t.sellerName?n({defaultMessage:"No online payment methods are set up. {sellerName} can arrange payment with you directly.",description:"Body text shown when no payment method can be stored, naming the seller",id:"payment_methods_unavailable_card.description.tokenize_with_seller"},{sellerName:t.sellerName}):n({defaultMessage:"No online payment methods are set up.",description:"Body text shown when no payment method can be stored",id:"payment_methods_unavailable_card.description.tokenize"}));return(s,c)=>(e.openBlock(),e.createBlock(y._sfc_main,{status:"error",title:u.value,class:"sv-payment-methods-unavailable-card","data-testid":"payment-methods-unavailable"},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(m._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1}),e.renderSlot(s.$slots,"default")])]),_:3},8,["title"]))}});function N({paymentMethodOptions:d,isLoading:t,context:n}){const u=m.useLogger(),r=v.useExperimentalFeature(),s=e.computed(()=>e.toValue(d)??[]),c=e.computed(()=>{var a;return e.toValue(t)?"LOADING":f.hasRenderablePaymentIntegration(s.value,{excludeExpressPaymentMethods:!!((a=r==null?void 0:r.value)!=null&&a["express-checkout"])})?"READY":"UNAVAILABLE"}),h=e.computed(()=>{const a=[...new Set(s.value.map(({payment_acceptor:i})=>i==null?void 0:i.id))].filter(i=>!!i);return["NO_PAYMENT_METHODS_AVAILABLE",...a.length?a.sort():["no_payment_acceptor"]]});return e.watch(()=>[c.value,h.value.join("|")],([a,i],l)=>{if(a!=="UNAVAILABLE"||(l==null?void 0:l[0])==="UNAVAILABLE"&&l[1]===i)return;const{invoiceId:p,subscriptionId:_}=e.toValue(n)??{};u.error("NO_PAYMENT_METHODS_AVAILABLE","No payment method can be offered to the customer",{fingerprint:h.value,paymentAcceptorIds:s.value.map(({payment_acceptor:o})=>o==null?void 0:o.id),integrationIds:s.value.map(({integration:o})=>o==null?void 0:o.id),...p?{invoiceId:p}:{},..._?{subscriptionId:_}:{}})},{immediate:!0}),{availability:c}}exports._sfc_main=A;exports.usePaymentMethodAvailability=N;
1
+ const e=require("vue"),m=require("./customElements-BYIdPSzQ.js"),y=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BNZ9-GW1.js"),f=require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DKXhthkA.js"),v=require("./useExperimentalFeature-9-p9_nP6.js"),b={class:"flex flex-col items-center gap-4"},A=e.defineComponent({__name:"PaymentMethodsUnavailableCard",props:{variant:{type:String},sellerName:{type:String}},setup(d){const t=d,{$t:n}=m.useIntl(),u=e.computed(()=>t.variant==="AUTHORIZE"?n({defaultMessage:"This invoice cannot be paid online",description:"Title shown when no payment method can be offered for paying an invoice",id:"payment_methods_unavailable_card.title.authorize"}):n({defaultMessage:"No payment methods can be added",description:"Title shown when no payment method can be offered for storing a payment method",id:"payment_methods_unavailable_card.title.tokenize"})),r=e.computed(()=>t.variant==="AUTHORIZE"?t.sellerName?n({defaultMessage:"Online payment is not set up for this invoice. {sellerName} can settle it with you directly.",description:"Body text shown when an invoice cannot be paid online, naming the seller",id:"payment_methods_unavailable_card.description.authorize_with_seller"},{sellerName:t.sellerName}):n({defaultMessage:"Online payment is not set up for this invoice. The party that issued it can settle it with you directly.",description:"Body text shown when an invoice cannot be paid online",id:"payment_methods_unavailable_card.description.authorize"}):t.sellerName?n({defaultMessage:"No online payment methods are set up. {sellerName} can arrange payment with you directly.",description:"Body text shown when no payment method can be stored, naming the seller",id:"payment_methods_unavailable_card.description.tokenize_with_seller"},{sellerName:t.sellerName}):n({defaultMessage:"No online payment methods are set up.",description:"Body text shown when no payment method can be stored",id:"payment_methods_unavailable_card.description.tokenize"}));return(s,c)=>(e.openBlock(),e.createBlock(y._sfc_main,{status:"error",title:u.value,class:"sv-payment-methods-unavailable-card","data-testid":"payment-methods-unavailable"},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(m._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1}),e.renderSlot(s.$slots,"default")])]),_:3},8,["title"]))}});function N({paymentMethodOptions:d,isLoading:t,context:n}){const u=m.useLogger(),r=v.useExperimentalFeature(),s=e.computed(()=>e.toValue(d)??[]),c=e.computed(()=>{var a;return e.toValue(t)?"LOADING":f.hasRenderablePaymentIntegration(s.value,{excludeExpressPaymentMethods:!!((a=r==null?void 0:r.value)!=null&&a["express-checkout"])})?"READY":"UNAVAILABLE"}),h=e.computed(()=>{const a=[...new Set(s.value.map(({payment_acceptor:i})=>i==null?void 0:i.id))].filter(i=>!!i);return["NO_PAYMENT_METHODS_AVAILABLE",...a.length?a.sort():["no_payment_acceptor"]]});return e.watch(()=>[c.value,h.value.join("|")],([a,i],l)=>{if(a!=="UNAVAILABLE"||(l==null?void 0:l[0])==="UNAVAILABLE"&&l[1]===i)return;const{invoiceId:p,subscriptionId:_}=e.toValue(n)??{};u.error("NO_PAYMENT_METHODS_AVAILABLE","No payment method can be offered to the customer",{fingerprint:h.value,paymentAcceptorIds:s.value.map(({payment_acceptor:o})=>o==null?void 0:o.id),integrationIds:s.value.map(({integration:o})=>o==null?void 0:o.id),...p?{invoiceId:p}:{},..._?{subscriptionId:_}:{}})},{immediate:!0}),{availability:c}}exports._sfc_main=A;exports.usePaymentMethodAvailability=N;
@@ -1 +1 @@
1
- const r=require("./useService-H7BjLg8P.js"),f=require("vue"),I=require("./paymentMethods-ChWAwDSF.js");function M(n){return n.customerId!==void 0}function P(){const{getPaymentMethodOptions:n}=I.createPaymentMethodsService(),i=t=>M(t)?n({customerId:t.customerId,amount:t.amount,country:t.country}):n({subscriptionId:t.subscriptionId,amount:t.amount,country:t.country}),c=[],{data:u,execute:m,apiStatus:a,error:v,isPending:d}=r.useService({initialValue:c,service:i}),s=f.ref();let e;return{paymentMethodOptions:u,get:async t=>{if(r.isEqual(t,s.value))return u.value;if(e&&r.isEqual(t,e.payload))return e.options;const o=m(t).then(h=>(s.value=t,h));e={payload:t,options:o};try{return await o}finally{(e==null?void 0:e.payload)===t&&(e=void 0)}},apiStatus:a,error:v,isPending:d}}exports.usePaymentMethodOptions=P;
1
+ const r=require("./useService-H7BjLg8P.js"),f=require("vue"),I=require("./paymentMethods-CQdhZwq4.js");function M(n){return n.customerId!==void 0}function P(){const{getPaymentMethodOptions:n}=I.createPaymentMethodsService(),i=t=>M(t)?n({customerId:t.customerId,amount:t.amount,country:t.country}):n({subscriptionId:t.subscriptionId,amount:t.amount,country:t.country}),c=[],{data:u,execute:m,apiStatus:a,error:v,isPending:d}=r.useService({initialValue:c,service:i}),s=f.ref();let e;return{paymentMethodOptions:u,get:async t=>{if(r.isEqual(t,s.value))return u.value;if(e&&r.isEqual(t,e.payload))return e.options;const o=m(t).then(h=>(s.value=t,h));e={payload:t,options:o};try{return await o}finally{(e==null?void 0:e.payload)===t&&(e=void 0)}},apiStatus:a,error:v,isPending:d}}exports.usePaymentMethodOptions=P;
@@ -1,6 +1,6 @@
1
1
  import { u as h, a as u } from "./useService-Bh47bllz.mjs";
2
2
  import { ref as I } from "vue";
3
- import { c as P } from "./paymentMethods-BuwoJ1y9.mjs";
3
+ import { c as P } from "./paymentMethods-BNQbW_f1.mjs";
4
4
  function p(n) {
5
5
  return n.customerId !== void 0;
6
6
  }
@@ -1 +1 @@
1
- const o=require("./useIncrementalLoading-CaWOE8Xl.js"),c=require("./paymentMethods-ChWAwDSF.js");function r({customerId:e,pageSize:n=15}){const{getPaymentMethods:t}=c.createPaymentMethodsService(),s=async a=>t({customerId:e,pagination:{page:a,pageSize:n}});return o.useIncrementalLoading({service:s})}exports.usePaymentMethods=r;
1
+ const o=require("./useIncrementalLoading-CaWOE8Xl.js"),c=require("./paymentMethods-CQdhZwq4.js");function r({customerId:e,pageSize:n=15}){const{getPaymentMethods:t}=c.createPaymentMethodsService(),s=async a=>t({customerId:e,pagination:{page:a,pageSize:n}});return o.useIncrementalLoading({service:s})}exports.usePaymentMethods=r;
@@ -1,5 +1,5 @@
1
1
  import { u as s } from "./useIncrementalLoading-Cgxw2GD7.mjs";
2
- import { c as a } from "./paymentMethods-BuwoJ1y9.mjs";
2
+ import { c as a } from "./paymentMethods-BNQbW_f1.mjs";
3
3
  function m({
4
4
  customerId: e,
5
5
  pageSize: t = 15
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as b, createPropsRestProxy as T, ref as A, computed as o, openBlock as c, createElementBlock as _, createVNode as h, unref as l, mergeProps as O, createSlots as S, withCtx as s, renderSlot as I, createBlock as E, createTextVNode as v, toDisplayString as D, createCommentVNode as g, createElementVNode as L } from "vue";
2
- import { u as N, _ as R } from "./customElements-Com2NiGU.mjs";
3
- import { _ as B } from "./IconTitle.vue.es-Bbusc4wK.mjs";
4
- import { _ as P } from "./Chip.vue.es-CXG8o1Qf.mjs";
2
+ import { u as N, _ as R } from "./customElements-Df6dGrN-.mjs";
3
+ import { _ as B } from "./IconTitle.vue.es-CzuPQtOX.mjs";
4
+ import { _ as P } from "./Chip.vue.es-DGbc4L_D.mjs";
5
5
  import { a as x } from "./formatting.es-RclXHhKo.mjs";
6
6
  import { a as V, b as z } from "./index.es-CXkP_k3u.mjs";
7
- import { _ as $ } from "./Button.vue.es-VQCd3V3C.mjs";
7
+ import { _ as $ } from "./Button.vue.es-BJEy-e9C.mjs";
8
8
  import { _ as k } from "./FormMessage.vue.es-jG3fQZms.mjs";
9
- import { c as U } from "./invoices-CV9iAUHf.mjs";
9
+ import { c as U } from "./invoices-CrO6p4Ms.mjs";
10
10
  import { u as C } from "./useService-Bh47bllz.mjs";
11
- import { c as M } from "./payments-C_cMXQzE.mjs";
11
+ import { c as M } from "./payments-VS_N2xpJ.mjs";
12
12
  const G = {
13
13
  neutral: { indicatorClass: "border-gray-500 bg-gray-500", chipIntent: "neutral" },
14
14
  info: { indicatorClass: "border-blue-600 bg-blue-600", chipIntent: "info" },
@@ -1 +1 @@
1
- const e=require("vue"),f=require("./customElements-Bt8PbjIn.js"),h=require("./IconTitle.vue.es-D-q6w2E-.js"),E=require("./Chip.vue.es-DUgjuRWm.js"),g=require("./formatting.es-C72Nsrmh.js"),v=require("./index.es-BclokHQX.js"),I=require("./Button.vue.es-BWl37nzm.js"),w=require("./FormMessage.vue.es-dqATjC2N.js"),y=require("./invoices-CvpL4rv5.js"),D=require("./useService-H7BjLg8P.js"),b=require("./payments-DGckugN0.js"),N={neutral:{indicatorClass:"border-gray-500 bg-gray-500",chipIntent:"neutral"},info:{indicatorClass:"border-blue-600 bg-blue-600",chipIntent:"info"},success:{indicatorClass:"border-green-600 bg-green-600",chipIntent:"success"},warning:{indicatorClass:"border-yellow-600 bg-yellow-600",chipIntent:"warning"},danger:{indicatorClass:"border-red-600 bg-red-600",chipIntent:"danger"}},_={ACCEPTED:"success",ACTIVE:"success",APPROVED:"success",ARCHIVED:"neutral",CANCELLED:"neutral",CLOSED:"success",CREATED:"neutral",DECLINED:"danger",DELETED:"danger",DENIED:"danger",DEPRECATED:"warning",DONE:"success",DOWNLOADED:"success",DOWNLOADING:"info",DRAFT:"warning",DUPLICATE:"warning",EMPTY:"neutral",ENABLED:"success",ERROR:"danger",FAILED:"danger",FINAL:"success",GENERATING:"info",IGNORE:"neutral",IMPORTED:"success",IMPORTING:"info",INACTIVE:"neutral",INVALID:"danger",INVITED:"info",INVITE_REVOKED:"neutral",NONE:"neutral",NOT_EXECUTED:"neutral",NOT_MATCHED:"warning",ON_HOLD:"warning",OPEN:"neutral",OVERPAID:"warning",PAID:"success",PARTIALLY_PAID:"warning",PAUSED:"warning",PAYMENT_FAILED:"danger",PENDING:"info",PENDING_REVIEW:"warning",PROCESSING:"info",QUEUED:"info",REJECTED:"danger",SCHEDULED:"info",SEND:"info",SIGNATURE_REQUESTED:"warning",SIGNED:"success",SUBMITTED:"info",SUCCEEDED:"success",SUCCESS:"success",TO_BE_DOWNLOADED:"info",TO_BE_REPROCESSED:"info",UNPAID:"warning",UPLOADED:"success",VALID:"success",VOID:"neutral",WAITING_APPROVAL:"warning",DISABLED:"neutral"},C=t=>{const n=_[t]??"neutral";return N[n]},A={class:"inline-flex flex-col items-end gap-1"},T=e.defineComponent({__name:"DownloadButton",props:{downloadService:{type:Function},mobileIconOnly:{type:Boolean,default:!1},type:{},intent:{default:"secondary"},size:{default:"md"},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{},iconSuffix:{},tag:{},preventDoubleClick:{type:Boolean}},setup(t){const{$t:n}=f.useIntl(),a=e.createPropsRestProxy(t,["downloadService","size","intent","mobileIconOnly"]),o=e.ref(!1),i=e.ref(!1),l=v.useBreakpoints(v.breakpointsTailwind).smaller("md"),r=e.computed(()=>t.mobileIconOnly&&l.value),u=async()=>{i.value=!0,o.value=!1;try{await t.downloadService()}catch{o.value=!0}finally{i.value=!1}};return(d,p)=>(e.openBlock(),e.createElementBlock("div",A,[e.createVNode(e.unref(I._sfc_main),e.mergeProps({...a,size:t.size,intent:t.intent},{loading:i.value,type:"button","icon-prefix":"download",onClick:u}),e.createSlots({_:2},[d.$slots.default&&!r.value?{name:"default",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),key:"0"}:void 0]),1040,["loading"]),o.value?(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"download_button.download_failed_message",defaultMessage:"Download failed, please try again later",description:"Error message when a download fails"})),1)]),_:1})):e.createCommentVNode("",!0)]))}}),S=e.defineComponent({__name:"StatusChip",props:{status:{},size:{default:"md"},hasChipBefore:{type:Boolean,default:!1},hasChipAfter:{type:Boolean,default:!1}},setup(t){return(n,a)=>(e.openBlock(),e.createBlock(E._sfc_main,{intent:e.unref(C)(t.status).chipIntent,size:t.size,"has-chip-after":t.hasChipAfter,"has-chip-before":t.hasChipBefore},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(g.formatEnum)(t.status)),1)]),e.renderSlot(n.$slots,"suffix")]),_:3},8,["intent","size","has-chip-after","has-chip-before"]))}}),P={class:"flex items-center justify-between md:py-2"},B={class:"ml-2 inline-flex gap-0.5 print:hidden"},O=e.defineComponent({__name:"InvoiceHeader",props:{invoice:{},paymentAttempts:{},downloadService:{},showDownloadButton:{type:Boolean},variant:{default:"internal"},showInvoiceNumberLabel:{type:Boolean}},setup(t){const n=t,{$t:a,formatDate:o}=f.useIntl(),i=e.computed(()=>n.paymentAttempts.findLast(c=>c.result==="AUTHORIZED")),s=e.computed(()=>a({defaultMessage:"Due on {date}",description:"Label for due date, where {date} gets replaced with the due date",id:"invoice.due_on_label"},{date:o({date:n.invoice.due_date,format:"date",offsetType:"offsetted",timezone:n.invoice.customer.timezone})})),l=e.computed(()=>o({date:n.invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:n.invoice.customer.timezone})),r=e.computed(()=>a({defaultMessage:"Invoice",description:"Label prefixed before the invoice number in the header title",id:"invoiceHeader.invoiceNumberLabel"})),u=e.computed(()=>{if(n.variant==="external")return l.value;const c=n.invoice.invoice_number;return c?n.showInvoiceNumberLabel?`${r.value} ${c}`:c:r.value}),d=e.computed(()=>{if(!(!n.invoice.paid||!i.value))return a({defaultMessage:"Paid on {date}",description:"Label for payment date, where {date} gets replaced with the date",id:"invoice.paid_on_label"},{date:o({date:i.value.created_at,format:"date",offsetType:"offsetted",timezone:n.invoice.customer.timezone})})}),p=e.computed(()=>n.variant==="external"?[n.invoice.invoice_number,d.value||s.value].join(" - "):d.value||s.value),m=e.computed(()=>n.invoice.status!=="PAID");return(c,V)=>(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(h._sfc_main,{title:u.value},{suffix:e.withCtx(()=>[e.createElementVNode("span",B,[m.value?(e.openBlock(),e.createBlock(S,{key:0,status:t.invoice.status,"has-chip-after":!!t.invoice.paid},null,8,["status","has-chip-after"])):e.createCommentVNode("",!0),t.invoice.paid?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,intent:"success","has-chip-before":m.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Paid",description:"The paid chip label text for a paid invoice",id:"invoice.paid_chip"})),1)]),_:1},8,["has-chip-before"])):e.createCommentVNode("",!0)])]),subTitle:e.withCtx(()=>[e.createVNode(f._sfc_main,{variant:"body-xs",class:"flex gap-1 print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1},8,["title"]),t.showDownloadButton?(e.openBlock(),e.createBlock(T,{key:0,size:"lg",intent:"secondary","download-service":t.downloadService,"mobile-icon-only":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Download PDF",description:"Title for button download pdf invoice",id:"invoice.download_pdf_button"})),1)]),_:1},8,["download-service"])):e.createCommentVNode("",!0)]))}});function x({invoiceId:t}){const{getInvoice:n,getInvoicePdf:a}=y.createInvoicesService(),o=()=>n(t),{data:i,execute:s,apiStatus:l,error:r,isPending:u}=D.useService({service:o});return{invoice:i,downloadInvoicePdf:a,apiStatus:l,error:r,get:s,isPending:u}}function L(){const{getPayments:t}=b.createPaymentsService(),{data:n,execute:a,error:o,apiStatus:i,isPending:s}=D.useService({service:t,isCollection:!0});return{payments:n,get:a,error:o,apiStatus:i,isPending:s}}exports._sfc_main=O;exports.useInvoice=x;exports.usePayments=L;
1
+ const e=require("vue"),f=require("./customElements-BYIdPSzQ.js"),h=require("./IconTitle.vue.es-DN9r6nfK.js"),E=require("./Chip.vue.es-DLQ4QEPo.js"),g=require("./formatting.es-C72Nsrmh.js"),v=require("./index.es-BclokHQX.js"),I=require("./Button.vue.es-CJNxYacb.js"),w=require("./FormMessage.vue.es-dqATjC2N.js"),y=require("./invoices-mw87cNTS.js"),D=require("./useService-H7BjLg8P.js"),b=require("./payments-KTjVHqOa.js"),N={neutral:{indicatorClass:"border-gray-500 bg-gray-500",chipIntent:"neutral"},info:{indicatorClass:"border-blue-600 bg-blue-600",chipIntent:"info"},success:{indicatorClass:"border-green-600 bg-green-600",chipIntent:"success"},warning:{indicatorClass:"border-yellow-600 bg-yellow-600",chipIntent:"warning"},danger:{indicatorClass:"border-red-600 bg-red-600",chipIntent:"danger"}},_={ACCEPTED:"success",ACTIVE:"success",APPROVED:"success",ARCHIVED:"neutral",CANCELLED:"neutral",CLOSED:"success",CREATED:"neutral",DECLINED:"danger",DELETED:"danger",DENIED:"danger",DEPRECATED:"warning",DONE:"success",DOWNLOADED:"success",DOWNLOADING:"info",DRAFT:"warning",DUPLICATE:"warning",EMPTY:"neutral",ENABLED:"success",ERROR:"danger",FAILED:"danger",FINAL:"success",GENERATING:"info",IGNORE:"neutral",IMPORTED:"success",IMPORTING:"info",INACTIVE:"neutral",INVALID:"danger",INVITED:"info",INVITE_REVOKED:"neutral",NONE:"neutral",NOT_EXECUTED:"neutral",NOT_MATCHED:"warning",ON_HOLD:"warning",OPEN:"neutral",OVERPAID:"warning",PAID:"success",PARTIALLY_PAID:"warning",PAUSED:"warning",PAYMENT_FAILED:"danger",PENDING:"info",PENDING_REVIEW:"warning",PROCESSING:"info",QUEUED:"info",REJECTED:"danger",SCHEDULED:"info",SEND:"info",SIGNATURE_REQUESTED:"warning",SIGNED:"success",SUBMITTED:"info",SUCCEEDED:"success",SUCCESS:"success",TO_BE_DOWNLOADED:"info",TO_BE_REPROCESSED:"info",UNPAID:"warning",UPLOADED:"success",VALID:"success",VOID:"neutral",WAITING_APPROVAL:"warning",DISABLED:"neutral"},C=t=>{const n=_[t]??"neutral";return N[n]},A={class:"inline-flex flex-col items-end gap-1"},T=e.defineComponent({__name:"DownloadButton",props:{downloadService:{type:Function},mobileIconOnly:{type:Boolean,default:!1},type:{},intent:{default:"secondary"},size:{default:"md"},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{},iconSuffix:{},tag:{},preventDoubleClick:{type:Boolean}},setup(t){const{$t:n}=f.useIntl(),a=e.createPropsRestProxy(t,["downloadService","size","intent","mobileIconOnly"]),o=e.ref(!1),i=e.ref(!1),l=v.useBreakpoints(v.breakpointsTailwind).smaller("md"),r=e.computed(()=>t.mobileIconOnly&&l.value),u=async()=>{i.value=!0,o.value=!1;try{await t.downloadService()}catch{o.value=!0}finally{i.value=!1}};return(d,p)=>(e.openBlock(),e.createElementBlock("div",A,[e.createVNode(e.unref(I._sfc_main),e.mergeProps({...a,size:t.size,intent:t.intent},{loading:i.value,type:"button","icon-prefix":"download",onClick:u}),e.createSlots({_:2},[d.$slots.default&&!r.value?{name:"default",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),key:"0"}:void 0]),1040,["loading"]),o.value?(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"download_button.download_failed_message",defaultMessage:"Download failed, please try again later",description:"Error message when a download fails"})),1)]),_:1})):e.createCommentVNode("",!0)]))}}),S=e.defineComponent({__name:"StatusChip",props:{status:{},size:{default:"md"},hasChipBefore:{type:Boolean,default:!1},hasChipAfter:{type:Boolean,default:!1}},setup(t){return(n,a)=>(e.openBlock(),e.createBlock(E._sfc_main,{intent:e.unref(C)(t.status).chipIntent,size:t.size,"has-chip-after":t.hasChipAfter,"has-chip-before":t.hasChipBefore},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(g.formatEnum)(t.status)),1)]),e.renderSlot(n.$slots,"suffix")]),_:3},8,["intent","size","has-chip-after","has-chip-before"]))}}),P={class:"flex items-center justify-between md:py-2"},B={class:"ml-2 inline-flex gap-0.5 print:hidden"},O=e.defineComponent({__name:"InvoiceHeader",props:{invoice:{},paymentAttempts:{},downloadService:{},showDownloadButton:{type:Boolean},variant:{default:"internal"},showInvoiceNumberLabel:{type:Boolean}},setup(t){const n=t,{$t:a,formatDate:o}=f.useIntl(),i=e.computed(()=>n.paymentAttempts.findLast(c=>c.result==="AUTHORIZED")),s=e.computed(()=>a({defaultMessage:"Due on {date}",description:"Label for due date, where {date} gets replaced with the due date",id:"invoice.due_on_label"},{date:o({date:n.invoice.due_date,format:"date",offsetType:"offsetted",timezone:n.invoice.customer.timezone})})),l=e.computed(()=>o({date:n.invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:n.invoice.customer.timezone})),r=e.computed(()=>a({defaultMessage:"Invoice",description:"Label prefixed before the invoice number in the header title",id:"invoiceHeader.invoiceNumberLabel"})),u=e.computed(()=>{if(n.variant==="external")return l.value;const c=n.invoice.invoice_number;return c?n.showInvoiceNumberLabel?`${r.value} ${c}`:c:r.value}),d=e.computed(()=>{if(!(!n.invoice.paid||!i.value))return a({defaultMessage:"Paid on {date}",description:"Label for payment date, where {date} gets replaced with the date",id:"invoice.paid_on_label"},{date:o({date:i.value.created_at,format:"date",offsetType:"offsetted",timezone:n.invoice.customer.timezone})})}),p=e.computed(()=>n.variant==="external"?[n.invoice.invoice_number,d.value||s.value].join(" - "):d.value||s.value),m=e.computed(()=>n.invoice.status!=="PAID");return(c,V)=>(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(h._sfc_main,{title:u.value},{suffix:e.withCtx(()=>[e.createElementVNode("span",B,[m.value?(e.openBlock(),e.createBlock(S,{key:0,status:t.invoice.status,"has-chip-after":!!t.invoice.paid},null,8,["status","has-chip-after"])):e.createCommentVNode("",!0),t.invoice.paid?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,intent:"success","has-chip-before":m.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Paid",description:"The paid chip label text for a paid invoice",id:"invoice.paid_chip"})),1)]),_:1},8,["has-chip-before"])):e.createCommentVNode("",!0)])]),subTitle:e.withCtx(()=>[e.createVNode(f._sfc_main,{variant:"body-xs",class:"flex gap-1 print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1},8,["title"]),t.showDownloadButton?(e.openBlock(),e.createBlock(T,{key:0,size:"lg",intent:"secondary","download-service":t.downloadService,"mobile-icon-only":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Download PDF",description:"Title for button download pdf invoice",id:"invoice.download_pdf_button"})),1)]),_:1},8,["download-service"])):e.createCommentVNode("",!0)]))}});function x({invoiceId:t}){const{getInvoice:n,getInvoicePdf:a}=y.createInvoicesService(),o=()=>n(t),{data:i,execute:s,apiStatus:l,error:r,isPending:u}=D.useService({service:o});return{invoice:i,downloadInvoicePdf:a,apiStatus:l,error:r,get:s,isPending:u}}function L(){const{getPayments:t}=b.createPaymentsService(),{data:n,execute:a,error:o,apiStatus:i,isPending:s}=D.useService({service:t,isCollection:!0});return{payments:n,get:a,error:o,apiStatus:i,isPending:s}}exports._sfc_main=O;exports.useInvoice=x;exports.usePayments=L;
@@ -1 +1 @@
1
- const e=require("vue"),o=require("./customElements-Bt8PbjIn.js");function t(){const r=e.inject(o.PORTAL_INJECTION_KEY);if(!r)throw new Error("PortalProvider is not provided");return r}exports.usePortal=t;
1
+ const e=require("vue"),o=require("./customElements-BYIdPSzQ.js");function t(){const r=e.inject(o.PORTAL_INJECTION_KEY);if(!r)throw new Error("PortalProvider is not provided");return r}exports.usePortal=t;
@@ -1,5 +1,5 @@
1
1
  import { inject as o } from "vue";
2
- import { P as t } from "./customElements-Com2NiGU.mjs";
2
+ import { P as t } from "./customElements-Df6dGrN-.mjs";
3
3
  function n() {
4
4
  const r = o(t);
5
5
  if (!r)
@@ -1 +1 @@
1
- const m=require("./useService-H7BjLg8P.js"),w=require("./subscriptions-X0Ciw8z3.js"),P=n=>n.original_pricing_id??n.id,g=n=>n.original_pricing_item_id??n.id,h=n=>n.original_pricing_item_config_id??n.id,S=(n,i)=>(n==null?void 0:n.type)===(i==null?void 0:i.type)&&(n==null?void 0:n.value)===(i==null?void 0:i.value);function l(n){const i={};for(const c in n)n[c]!==void 0&&(i[c]=n[c]);return i}function o(n,i,c){if(!(i!=null&&i.length))return n;if(!(n!=null&&n.length))return i;const r=new Set;return[...n.reduce((p,u)=>{const _=i.find(d=>h(d)===h(u));return _?(r.add(_),[...p,U(u,_)]):c.dropUnmatched?p:[...p,u]},[]),...i.filter(p=>!r.has(p))]}function e(n,i,c){return i!=null&&i.length?n!=null&&n.length?[...n.map(r=>{const t=i.find(p=>S(p.billing_period,r.billing_period));return t?{...r,configs:o(r.configs,t.configs,c)??[]}:r}),...i.filter(r=>!n.some(t=>S(r.billing_period,t.billing_period)))]:i:n}function O(n,i,c){return i!=null&&i.length?n!=null&&n.length?[...n.map(r=>{const t=i.find(p=>p.currency===r.currency);return t?{...r,...l(t),configs:o(r.configs,t.configs,c),billing_period_configs:e(r.billing_period_configs,t.billing_period_configs,c)}:r}),...i.filter(r=>!n.some(t=>t.currency===r.currency))]:i:n}function U(n,i){const c={dropUnmatched:!1};return{...n,...l(i),id:i.id??n.id,original_pricing_item_config_id:h(n),conditions:n.conditions&&i.conditions?{...n.conditions,...l(i.conditions),meter_properties:n.conditions.meter_properties??i.conditions.meter_properties,configs:o(n.conditions.configs,i.conditions.configs,c)}:i.conditions??n.conditions,billing_period_configs:e(n.billing_period_configs,i.billing_period_configs,c)}}function L(n,i){const c={dropUnmatched:i.override==="ALL"};return{...n,...l(i),id:i.id??n.id,original_pricing_item_id:g(n),product_items:n.product_items,configs:o(n.configs,i.configs,c),billing_period_configs:e(n.billing_period_configs,i.billing_period_configs,c),pricing_currency_configs:O(n.pricing_currency_configs,i.pricing_currency_configs,c)}}function A(n,i,c){if(!(i!=null&&i.length))return n;if(!(n!=null&&n.length))return i;const r=new Set;return[...n.reduce((p,u)=>{const _=i.find(d=>g(d)===g(u));return _?(r.add(_),[...p,L(u,_)]):c.dropUnmatched?p:[...p,u]},[]),...i.filter(p=>!r.has(p))]}function D(n,i){return i!=null&&i.length?i.map(c=>{var t;const r=(t=n==null?void 0:n.find(p=>p.feature_id===c.feature_id))==null?void 0:t.feature;return r?{...c,feature:r}:c}):n}function q(n,i){const c={dropUnmatched:i.override==="ALL"};return{...n,...l(i),id:i.id??n.id,original_pricing_id:P(n),products:n.products,entitlements:D(n.entitlements,i.entitlements),items:A(n.items,i.items,c)}}function y(n,i){return n.map(c=>{const r=i.find(t=>t.original_pricing_id===P(c));return r?q(c,r):c})}function s({pricingPlanVersion:n,overridePricings:i}){var r;const c=i??[];return c.length?{...n,pricing_categories:(r=n.pricing_categories)==null?void 0:r.map(t=>{var p;return{...t,pricings:t.pricings&&y(t.pricings,c),pricing_groups:(p=t.pricing_groups)==null?void 0:p.map(u=>({...u,pricings:y(u.pricings,c)}))}})}:n}function x(n){return n.pricing_plan_schedule_infos.map(i=>{var c;return{schedule:i.pricing_plan_schedule,selectedPricingPlan:i.pricing_plan_version.pricing_plan,selectedPricingPlanVersion:s({pricingPlanVersion:i.pricing_plan_version,overridePricings:(c=i.pricing_plan_schedule)==null?void 0:c.override_pricings})}})}function B({subscriptionId:n}){const{getSubscription:i}=w.createSubscriptionsService(),{data:c,execute:r,apiStatus:t,error:p,isPending:u}=m.useService({service:()=>i({id:n,expanded:!0})});return{subscription:c,withPlanData:d=>x(d),apiStatus:t,error:p,get:r,isPending:u}}exports.useSubscription=B;
1
+ const m=require("./useService-H7BjLg8P.js"),w=require("./subscriptions-Dugd-oZ1.js"),P=n=>n.original_pricing_id??n.id,g=n=>n.original_pricing_item_id??n.id,h=n=>n.original_pricing_item_config_id??n.id,S=(n,i)=>(n==null?void 0:n.type)===(i==null?void 0:i.type)&&(n==null?void 0:n.value)===(i==null?void 0:i.value);function l(n){const i={};for(const c in n)n[c]!==void 0&&(i[c]=n[c]);return i}function o(n,i,c){if(!(i!=null&&i.length))return n;if(!(n!=null&&n.length))return i;const r=new Set;return[...n.reduce((p,u)=>{const _=i.find(d=>h(d)===h(u));return _?(r.add(_),[...p,U(u,_)]):c.dropUnmatched?p:[...p,u]},[]),...i.filter(p=>!r.has(p))]}function e(n,i,c){return i!=null&&i.length?n!=null&&n.length?[...n.map(r=>{const t=i.find(p=>S(p.billing_period,r.billing_period));return t?{...r,configs:o(r.configs,t.configs,c)??[]}:r}),...i.filter(r=>!n.some(t=>S(r.billing_period,t.billing_period)))]:i:n}function O(n,i,c){return i!=null&&i.length?n!=null&&n.length?[...n.map(r=>{const t=i.find(p=>p.currency===r.currency);return t?{...r,...l(t),configs:o(r.configs,t.configs,c),billing_period_configs:e(r.billing_period_configs,t.billing_period_configs,c)}:r}),...i.filter(r=>!n.some(t=>t.currency===r.currency))]:i:n}function U(n,i){const c={dropUnmatched:!1};return{...n,...l(i),id:i.id??n.id,original_pricing_item_config_id:h(n),conditions:n.conditions&&i.conditions?{...n.conditions,...l(i.conditions),meter_properties:n.conditions.meter_properties??i.conditions.meter_properties,configs:o(n.conditions.configs,i.conditions.configs,c)}:i.conditions??n.conditions,billing_period_configs:e(n.billing_period_configs,i.billing_period_configs,c)}}function L(n,i){const c={dropUnmatched:i.override==="ALL"};return{...n,...l(i),id:i.id??n.id,original_pricing_item_id:g(n),product_items:n.product_items,configs:o(n.configs,i.configs,c),billing_period_configs:e(n.billing_period_configs,i.billing_period_configs,c),pricing_currency_configs:O(n.pricing_currency_configs,i.pricing_currency_configs,c)}}function A(n,i,c){if(!(i!=null&&i.length))return n;if(!(n!=null&&n.length))return i;const r=new Set;return[...n.reduce((p,u)=>{const _=i.find(d=>g(d)===g(u));return _?(r.add(_),[...p,L(u,_)]):c.dropUnmatched?p:[...p,u]},[]),...i.filter(p=>!r.has(p))]}function D(n,i){return i!=null&&i.length?i.map(c=>{var t;const r=(t=n==null?void 0:n.find(p=>p.feature_id===c.feature_id))==null?void 0:t.feature;return r?{...c,feature:r}:c}):n}function q(n,i){const c={dropUnmatched:i.override==="ALL"};return{...n,...l(i),id:i.id??n.id,original_pricing_id:P(n),products:n.products,entitlements:D(n.entitlements,i.entitlements),items:A(n.items,i.items,c)}}function y(n,i){return n.map(c=>{const r=i.find(t=>t.original_pricing_id===P(c));return r?q(c,r):c})}function s({pricingPlanVersion:n,overridePricings:i}){var r;const c=i??[];return c.length?{...n,pricing_categories:(r=n.pricing_categories)==null?void 0:r.map(t=>{var p;return{...t,pricings:t.pricings&&y(t.pricings,c),pricing_groups:(p=t.pricing_groups)==null?void 0:p.map(u=>({...u,pricings:y(u.pricings,c)}))}})}:n}function x(n){return n.pricing_plan_schedule_infos.map(i=>{var c;return{schedule:i.pricing_plan_schedule,selectedPricingPlan:i.pricing_plan_version.pricing_plan,selectedPricingPlanVersion:s({pricingPlanVersion:i.pricing_plan_version,overridePricings:(c=i.pricing_plan_schedule)==null?void 0:c.override_pricings})}})}function B({subscriptionId:n}){const{getSubscription:i}=w.createSubscriptionsService(),{data:c,execute:r,apiStatus:t,error:p,isPending:u}=m.useService({service:()=>i({id:n,expanded:!0})});return{subscription:c,withPlanData:d=>x(d),apiStatus:t,error:p,get:r,isPending:u}}exports.useSubscription=B;
@@ -1,5 +1,5 @@
1
1
  import { u as P } from "./useService-Bh47bllz.mjs";
2
- import { c as w } from "./subscriptions-B5VqRayX.mjs";
2
+ import { c as w } from "./subscriptions-U4xg2CO1.mjs";
3
3
  const e = (n) => n.original_pricing_id ?? n.id, g = (n) => n.original_pricing_item_id ?? n.id, h = (n) => n.original_pricing_item_config_id ?? n.id, m = (n, i) => (n == null ? void 0 : n.type) === (i == null ? void 0 : i.type) && (n == null ? void 0 : n.value) === (i == null ? void 0 : i.value);
4
4
  function l(n) {
5
5
  const i = {};
@@ -1 +1 @@
1
- const o=require("vue"),d=require("./customElements-Bt8PbjIn.js");function s(){const{$t:e}=d.useIntl(),l=o.computed(()=>({DAY:{literal:{singular:e({defaultMessage:"day",id:"time_period.day.singular",description:"The singular form of the day time period"}),plural:e({defaultMessage:"days",id:"time_period.day.plural",description:"The plural form of the day time period"})},full:e({defaultMessage:"daily",id:"time_period.day.full",description:"The full form of the day time period"})},WEEK:{literal:{singular:e({defaultMessage:"week",id:"time_period.week.singular",description:"The singular form of the week time period"}),plural:e({defaultMessage:"weeks",id:"time_period.week.plural",description:"The plural form of the week time period"})},full:e({defaultMessage:"weekly",id:"time_period.week.full",description:"The full form of the week time period"})},MONTH:{literal:{singular:e({defaultMessage:"month",id:"time_period.month.singular",description:"The singular form of the month time period"}),plural:e({defaultMessage:"months",id:"time_period.month.plural",description:"The plural form of the month time period"})},full:e({defaultMessage:"monthly",id:"time_period.month.full",description:"The full form of the month time period"})},YEAR:{literal:{singular:e({defaultMessage:"year",id:"time_period.year.singular",description:"The singular form of the year time period"}),plural:e({defaultMessage:"years",id:"time_period.year.plural",description:"The plural form of the year time period"})},full:e({defaultMessage:"yearly",id:"time_period.year.full",description:"The full form of the year time period"})}}));return{map:l,formatTimePeriod:(r,i={short:!1,hideValueForExactPeriods:!1,singular:!1})=>{const a=r.value??1,t=l.value[r.type].literal[i.singular||+a==1?"singular":"plural"].toLowerCase();return`${i.prefix&&!i.short?`${i.prefix} `:""}${i.hideValueForExactPeriods&&a===1?t:`${a} ${t}`}`},formatTimePeriodLiteral:(r,i={singular:!1})=>l.value[r].literal[i.singular?"singular":"plural"]}}exports.useTimePeriod=s;
1
+ const o=require("vue"),d=require("./customElements-BYIdPSzQ.js");function s(){const{$t:e}=d.useIntl(),l=o.computed(()=>({DAY:{literal:{singular:e({defaultMessage:"day",id:"time_period.day.singular",description:"The singular form of the day time period"}),plural:e({defaultMessage:"days",id:"time_period.day.plural",description:"The plural form of the day time period"})},full:e({defaultMessage:"daily",id:"time_period.day.full",description:"The full form of the day time period"})},WEEK:{literal:{singular:e({defaultMessage:"week",id:"time_period.week.singular",description:"The singular form of the week time period"}),plural:e({defaultMessage:"weeks",id:"time_period.week.plural",description:"The plural form of the week time period"})},full:e({defaultMessage:"weekly",id:"time_period.week.full",description:"The full form of the week time period"})},MONTH:{literal:{singular:e({defaultMessage:"month",id:"time_period.month.singular",description:"The singular form of the month time period"}),plural:e({defaultMessage:"months",id:"time_period.month.plural",description:"The plural form of the month time period"})},full:e({defaultMessage:"monthly",id:"time_period.month.full",description:"The full form of the month time period"})},YEAR:{literal:{singular:e({defaultMessage:"year",id:"time_period.year.singular",description:"The singular form of the year time period"}),plural:e({defaultMessage:"years",id:"time_period.year.plural",description:"The plural form of the year time period"})},full:e({defaultMessage:"yearly",id:"time_period.year.full",description:"The full form of the year time period"})}}));return{map:l,formatTimePeriod:(r,i={short:!1,hideValueForExactPeriods:!1,singular:!1})=>{const a=r.value??1,t=l.value[r.type].literal[i.singular||+a==1?"singular":"plural"].toLowerCase();return`${i.prefix&&!i.short?`${i.prefix} `:""}${i.hideValueForExactPeriods&&a===1?t:`${a} ${t}`}`},formatTimePeriodLiteral:(r,i={singular:!1})=>l.value[r].literal[i.singular?"singular":"plural"]}}exports.useTimePeriod=s;
@@ -1,5 +1,5 @@
1
1
  import { computed as o } from "vue";
2
- import { u as d } from "./customElements-Com2NiGU.mjs";
2
+ import { u as d } from "./customElements-Df6dGrN-.mjs";
3
3
  function p() {
4
4
  const { $t: e } = d(), l = o(() => ({
5
5
  DAY: {
@@ -0,0 +1 @@
1
+ const g=require("./formatting.es-C72Nsrmh.js"),q=(t,l,n)=>{var i,u,a,r,e,c;if(n!=null&&n.amount)return g.formatAmount(n.amount);if(n!=null&&n.credits){const o=Number(n.credits.quantity),d=(o===1?(u=(i=n.credits.credit_type)==null?void 0:i.unit_name)==null?void 0:u.singular:((r=(a=n.credits.credit_type)==null?void 0:a.unit_name)==null?void 0:r.plural)??((c=(e=n.credits.credit_type)==null?void 0:e.unit_name)==null?void 0:c.singular))??t({defaultMessage:"credits",description:"Wallet balances credits default message",id:"wB/wXs"});return`${l(o)} ${d}`}return t({defaultMessage:"N/A",description:"Fallback wallet balance label when no balance is available",id:"PW+sL4"})},b=t=>t!=null&&t.amount?`${t.amount.quantity} ${t.amount.currency}`:t!=null&&t.credits?`${t.credits.quantity} ${t.credits.credit_type_id??""}`:"",I=t=>{var l;return((l=t.split(".")[1])==null?void 0:l.length)??0},w=(t,l)=>{if(!t)return l??void 0;if(!l)return t;const n=Math.max(I(t.quantity),I(l.quantity)),i=10**n,u=(Math.round(Number(t.quantity)*i)+Math.round(Number(l.quantity)*i))/i;return{...t,quantity:u.toFixed(n)}},W=(t,l)=>l.reduce((n,i)=>{const u=n.find(a=>a.wallet_grant_id===i.wallet_grant_id);return u?n.map(a=>{var r,e;return a===u?{...a,used_balance:{amount:w((r=a.used_balance)==null?void 0:r.amount,(e=i.used_balance)==null?void 0:e.amount)}}:a}):[...n,i]},t),$=t=>{var l,n,i,u,a,r,e,c;const o=new Map;for(const m of t??[])for(const d of((l=m.details)==null?void 0:l.wallet_balances)??[]){const y=[d.used_balance,d.left_balance,d.available_balance],v=(i=(n=y.find(s=>s==null?void 0:s.amount))==null?void 0:n.amount)==null?void 0:i.currency,f=v?`${d.wallet_id}|${v}`:[d.wallet_id,...y.map(b)].join("|"),_=o.get(f),B=(((u=m.details)==null?void 0:u.used_wallet_grants)??[]).filter(s=>s.wallet_id===d.wallet_id);if(!_){const s=(a=y.find(p=>p==null?void 0:p.credits))==null?void 0:a.credits;o.set(f,{key:f,walletId:d.wallet_id,usedBalance:d.used_balance,leftBalance:d.left_balance,availableBalance:d.available_balance,creditTypeId:s==null?void 0:s.credit_type_id,creditTypeName:(r=s==null?void 0:s.credit_type)==null?void 0:r.name,currency:v,usedGrants:B});continue}v&&(_.usedBalance={amount:w((e=_.usedBalance)==null?void 0:e.amount,(c=d.used_balance)==null?void 0:c.amount)},_.usedGrants=W(_.usedGrants,B))}return[...o.values()]},N=(t,{formatMoney:l,formatQuantity:n})=>t!=null&&t.amount?l(t.amount):t!=null&&t.credits?n(t.credits.quantity):"-",h=(t,{creditTypes:l,creditsLabel:n,walletLabel:i})=>{const u=new Set(t.filter(e=>!!e.currency).map(e=>e.walletId)),a=(l??[]).reduce((e,c)=>(e[c.id]=c.name,e),{}),r=e=>e.currency?u.size>1?`${i} (${e.currency})`:i:e.creditTypeId?e.creditTypeName??a[e.creditTypeId]??e.creditTypeId:[e.usedBalance,e.leftBalance,e.availableBalance].some(o=>!!(o!=null&&o.credits))?n:i;return t.map(e=>({...e,label:r(e)}))};exports.formatInvoiceWalletBalanceValue=N;exports.formatWalletBalanceValue=q;exports.getInvoiceWalletBalanceRows=$;exports.getLabelledInvoiceWalletBalanceRows=h;
@@ -0,0 +1,102 @@
1
+ import { f as q } from "./formatting.es-RclXHhKo.mjs";
2
+ const N = (t, i, n) => {
3
+ var l, u, d, r, e, s;
4
+ if (n != null && n.amount)
5
+ return q(n.amount);
6
+ if (n != null && n.credits) {
7
+ const c = Number(n.credits.quantity), a = (c === 1 ? (u = (l = n.credits.credit_type) == null ? void 0 : l.unit_name) == null ? void 0 : u.singular : ((r = (d = n.credits.credit_type) == null ? void 0 : d.unit_name) == null ? void 0 : r.plural) ?? ((s = (e = n.credits.credit_type) == null ? void 0 : e.unit_name) == null ? void 0 : s.singular)) ?? t({
8
+ defaultMessage: "credits",
9
+ description: "Wallet balances credits default message",
10
+ id: "wB/wXs"
11
+ });
12
+ return `${i(c)} ${a}`;
13
+ }
14
+ return t({
15
+ defaultMessage: "N/A",
16
+ description: "Fallback wallet balance label when no balance is available",
17
+ id: "PW+sL4"
18
+ });
19
+ }, w = (t) => t != null && t.amount ? `${t.amount.quantity} ${t.amount.currency}` : t != null && t.credits ? `${t.credits.quantity} ${t.credits.credit_type_id ?? ""}` : "", I = (t) => {
20
+ var i;
21
+ return ((i = t.split(".")[1]) == null ? void 0 : i.length) ?? 0;
22
+ }, b = (t, i) => {
23
+ if (!t)
24
+ return i ?? void 0;
25
+ if (!i)
26
+ return t;
27
+ const n = Math.max(I(t.quantity), I(i.quantity)), l = 10 ** n, u = (Math.round(Number(t.quantity) * l) + Math.round(Number(i.quantity) * l)) / l;
28
+ return { ...t, quantity: u.toFixed(n) };
29
+ }, g = (t, i) => i.reduce((n, l) => {
30
+ const u = n.find(
31
+ (d) => d.wallet_grant_id === l.wallet_grant_id
32
+ );
33
+ return u ? n.map(
34
+ (d) => {
35
+ var r, e;
36
+ return d === u ? {
37
+ ...d,
38
+ used_balance: {
39
+ amount: b(
40
+ (r = d.used_balance) == null ? void 0 : r.amount,
41
+ (e = l.used_balance) == null ? void 0 : e.amount
42
+ )
43
+ }
44
+ } : d;
45
+ }
46
+ ) : [...n, l];
47
+ }, t), W = (t) => {
48
+ var i, n, l, u, d, r, e, s;
49
+ const c = /* @__PURE__ */ new Map();
50
+ for (const v of t ?? [])
51
+ for (const a of ((i = v.details) == null ? void 0 : i.wallet_balances) ?? []) {
52
+ const y = [
53
+ a.used_balance,
54
+ a.left_balance,
55
+ a.available_balance
56
+ ], m = (l = (n = y.find((o) => o == null ? void 0 : o.amount)) == null ? void 0 : n.amount) == null ? void 0 : l.currency, f = m ? `${a.wallet_id}|${m}` : [a.wallet_id, ...y.map(w)].join("|"), _ = c.get(f), p = (((u = v.details) == null ? void 0 : u.used_wallet_grants) ?? []).filter(
57
+ (o) => o.wallet_id === a.wallet_id
58
+ );
59
+ if (!_) {
60
+ const o = (d = y.find((B) => B == null ? void 0 : B.credits)) == null ? void 0 : d.credits;
61
+ c.set(f, {
62
+ key: f,
63
+ walletId: a.wallet_id,
64
+ usedBalance: a.used_balance,
65
+ leftBalance: a.left_balance,
66
+ availableBalance: a.available_balance,
67
+ creditTypeId: o == null ? void 0 : o.credit_type_id,
68
+ creditTypeName: (r = o == null ? void 0 : o.credit_type) == null ? void 0 : r.name,
69
+ currency: m,
70
+ usedGrants: p
71
+ });
72
+ continue;
73
+ }
74
+ m && (_.usedBalance = {
75
+ amount: b((e = _.usedBalance) == null ? void 0 : e.amount, (s = a.used_balance) == null ? void 0 : s.amount)
76
+ }, _.usedGrants = g(_.usedGrants, p));
77
+ }
78
+ return [...c.values()];
79
+ }, h = (t, {
80
+ formatMoney: i,
81
+ formatQuantity: n
82
+ }) => t != null && t.amount ? i(t.amount) : t != null && t.credits ? n(t.credits.quantity) : "-", T = (t, {
83
+ creditTypes: i,
84
+ creditsLabel: n,
85
+ walletLabel: l
86
+ }) => {
87
+ const u = new Set(
88
+ t.filter((e) => !!e.currency).map((e) => e.walletId)
89
+ ), d = (i ?? []).reduce(
90
+ (e, s) => (e[s.id] = s.name, e),
91
+ {}
92
+ ), r = (e) => e.currency ? u.size > 1 ? `${l} (${e.currency})` : l : e.creditTypeId ? e.creditTypeName ?? d[e.creditTypeId] ?? e.creditTypeId : [e.usedBalance, e.leftBalance, e.availableBalance].some(
93
+ (c) => !!(c != null && c.credits)
94
+ ) ? n : l;
95
+ return t.map((e) => ({ ...e, label: r(e) }));
96
+ };
97
+ export {
98
+ W as a,
99
+ N as b,
100
+ h as f,
101
+ T as g
102
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvimon/solvimon-web",
3
- "version": "0.1.0-alpha.21",
3
+ "version": "0.1.0-alpha.23",
4
4
  "description": "Solvimon's Front-end SDK provides you with the building blocks to create a billing self serve experience",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -46,6 +46,7 @@
46
46
  "version:patch": "npm version patch --no-git-tag-version",
47
47
  "version:minor": "npm version minor --no-git-tag-version",
48
48
  "version:major": "npm version major --no-git-tag-version",
49
+ "version:prerelease": "npm version prerelease --no-git-tag-version",
49
50
  "changelog:check": "node scripts/check-changelog.mjs",
50
51
  "publish:guard": "node scripts/publish-guard.mjs",
51
52
  "prepublishOnly": "npm run publish:guard && npm run changelog:check && npm run build && npm run bundle:check-contents",