@solvimon/solvimon-web 0.1.0-alpha.2 → 0.1.0-alpha.20

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 (724) hide show
  1. package/README.md +244 -49
  2. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Ce30EXY5.mjs +240 -0
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-kmam2c7P.js +1 -0
  4. package/dist/Amount.vue.es-BO5sS1UX.mjs +25 -0
  5. package/dist/Amount.vue.es-JDVa_3H-.js +1 -0
  6. package/dist/Avatar.vue.es-BGTZSAqU.js +1 -0
  7. package/dist/Avatar.vue.es-DJzJiYtv.mjs +91 -0
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DQAp1xwu.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Bq2mTdUs.mjs} +23 -13
  9. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BtNTRSqH.js +1 -0
  10. package/dist/Button.vue.es-Cm9pLU9i.mjs +421 -0
  11. package/dist/Button.vue.es-O8mNivLL.js +1 -0
  12. package/dist/Chip.vue.es-BBmn-qJp.mjs +120 -0
  13. package/dist/Chip.vue.es-DmCjC1hi.js +1 -0
  14. package/dist/Comparators.vue.es-CYfxd5H-.mjs +120 -0
  15. package/dist/Comparators.vue.es-DK8wGjxM.js +1 -0
  16. package/dist/ContentWithAsideLayout-DHpnJfGA.js +1 -0
  17. package/dist/ContentWithAsideLayout-Dy9xgxuF.mjs +39 -0
  18. package/dist/ContextMenu.vue.es-CTc1ktXb.mjs +681 -0
  19. package/dist/ContextMenu.vue.es-DaW0yp4Y.js +1 -0
  20. package/dist/CustomerBillingInformation.vue.es-BX0Da7Kr.js +1 -0
  21. package/dist/CustomerBillingInformation.vue.es-CMZO8oLj.mjs +175 -0
  22. package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +1 -0
  23. package/dist/CustomerPaymentMethods.lib-CcSt0sl1.mjs +4 -0
  24. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bi_dCntQ.js +1 -0
  25. package/dist/{useCustomerPaymentMethodOptions-BzEquyUV.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CtdFharm.mjs} +43 -62
  26. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BDqBXbJq.mjs +3264 -0
  27. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-ZyN2vlNu.js +1 -0
  28. package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
  29. package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
  30. package/dist/DividerText.vue.es-CeAHAe_Y.mjs +72 -0
  31. package/dist/DividerText.vue.es-DjT4i_YD.js +1 -0
  32. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DLE5-9wz.mjs +562 -0
  33. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DkIK-lID.js +1 -0
  34. package/dist/ErrorNotification.vue.es-CHyVTBGs.mjs +38 -0
  35. package/dist/ErrorNotification.vue.es-CaEFTi2k.js +1 -0
  36. package/dist/Expand.vue.es-C-lnbA1v.js +1 -0
  37. package/dist/Expand.vue.es-C4_XmqbR.mjs +50 -0
  38. package/dist/FormMessage.vue.es-Bd4_NG9H.js +1 -0
  39. package/dist/FormMessage.vue.es-C3oxwq_8.mjs +46 -0
  40. package/dist/IconButton.vue.es-BHdQskx0.js +1 -0
  41. package/dist/IconButton.vue.es-KywqWWvr.mjs +228 -0
  42. package/dist/IconTitle.vue.es-BmjBdZb_.mjs +107 -0
  43. package/dist/IconTitle.vue.es-D9Wc3PIq.js +1 -0
  44. package/dist/Input.vue.es-DqKJhFTr.js +1 -0
  45. package/dist/Input.vue.es-WZGF8dfr.mjs +251 -0
  46. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0ie9Krt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B6efz7NU.mjs} +21 -9
  47. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-LE6zBLKM.js +1 -0
  48. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-C2aLMfu6.mjs +49 -0
  49. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-CtpFzWU3.js +1 -0
  50. package/dist/InvoiceSummary.vue.es-BI5sD_8F.mjs +2944 -0
  51. package/dist/InvoiceSummary.vue.es-BWYIHezU.js +1 -0
  52. package/dist/Modal.vue.es-B_1aqm_m.js +1 -0
  53. package/dist/Modal.vue.es-qdUHDOnU.mjs +483 -0
  54. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BKKXQbge.js +1 -0
  55. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Ch1TFO7x.mjs +154 -0
  56. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CsH47WSM.mjs +54 -0
  57. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-mKNNYnMU.js +1 -0
  58. package/dist/PaymentHistoryBlock-CgNUV8Gy.mjs +4 -0
  59. package/dist/PaymentHistoryBlock-Ci8aSJeb.js +1 -0
  60. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DZwnDzha.js +1 -0
  61. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DVDOsMnT.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Uj1aK-dp.mjs} +34 -23
  62. package/dist/PaymentIntegrationForm-CLokpXvK.mjs +4 -0
  63. package/dist/PaymentIntegrationForm-CsuueDE0.js +1 -0
  64. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CRUs7sP4.mjs +167 -0
  65. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-kKkzRi6w.js +1 -0
  66. package/dist/PaymentIntegrationFormAdyen-C885o8IE.mjs +699 -0
  67. package/dist/PaymentIntegrationFormAdyen-Co19AgvG.js +1 -0
  68. package/dist/PaymentIntegrationFormStripe-BjMdJmDC.mjs +547 -0
  69. package/dist/PaymentIntegrationFormStripe-DWff6wzK.js +1 -0
  70. package/dist/PaymentMethod.vue.es-CdskNJ3Z.js +1 -0
  71. package/dist/PaymentMethod.vue.es-rv-pu1CC.mjs +677 -0
  72. package/dist/PaymentMethodForm-IEuDxEPN.mjs +4 -0
  73. package/dist/PaymentMethodForm-hZuVHAti.js +1 -0
  74. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-Cj60U90J.js +1 -0
  75. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-gA74Rak9.mjs +172 -0
  76. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-B3H_AWMM.js +1 -0
  77. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-CTn-OxM6.mjs +189 -0
  78. package/dist/PricingGroupRangeInput.vue.es-ButaePib.mjs +632 -0
  79. package/dist/PricingGroupRangeInput.vue.es-Cls2lm80.js +1 -0
  80. package/dist/Section.vue.es-CAJvEDn6.js +1 -0
  81. package/dist/Section.vue.es-DX_9ueCG.mjs +79 -0
  82. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CQAkPfJz.js +1 -0
  83. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DVtMzgjc.mjs +1044 -0
  84. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +23 -8
  85. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
  86. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BJVXCHny.js +1 -0
  87. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-ByO-L6nm.mjs +6171 -0
  88. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-C5zB3CgZ.mjs +101 -0
  89. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CabskT-r.js +1 -0
  90. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D-T1wGg7.js +1 -0
  91. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DKd2DIVb.mjs} +61 -125
  92. package/dist/TooltipParagraph.vue.es-C5RTcrid.mjs +136 -0
  93. package/dist/TooltipParagraph.vue.es-H9fI7zzt.js +1 -0
  94. package/dist/TrialChip.vue.es-B1puKyR-.mjs +56 -0
  95. package/dist/TrialChip.vue.es-CCs50m02.js +1 -0
  96. package/dist/accel.svg.es-CE5tIWtm.mjs +4 -0
  97. package/dist/accel.svg.es-Dt_1wJmV.js +1 -0
  98. package/dist/ach.svg.es-B4tn0_IV.js +1 -0
  99. package/dist/ach.svg.es-D4QPcIU-.mjs +4 -0
  100. package/dist/adyen-51SvcyqV.mjs +4 -0
  101. package/dist/adyen-BXi_D9TQ.mjs +123 -0
  102. package/dist/adyen-DZsyEXkw.js +1 -0
  103. package/dist/adyen-VS2sDW0m.js +1 -0
  104. package/dist/amazon-pay.svg.es-B428S4f3.js +1 -0
  105. package/dist/amazon-pay.svg.es-DUScOW15.mjs +4 -0
  106. package/dist/amex.svg.es-BCXkaVLN.mjs +4 -0
  107. package/dist/amex.svg.es-Bn9e31C3.js +1 -0
  108. package/dist/api.es-C5pe8LUl.mjs +62 -0
  109. package/dist/api.es-Czekkp_X.js +1 -0
  110. package/dist/apple-pay.svg.es-Cfgn0K28.js +1 -0
  111. package/dist/apple-pay.svg.es-DlCfkt39.mjs +4 -0
  112. package/dist/bacs.svg.es-BKsvSeIP.mjs +4 -0
  113. package/dist/bacs.svg.es-hL7hLPkQ.js +1 -0
  114. package/dist/bancontact.svg.es-BbRqGgZ9.mjs +4 -0
  115. package/dist/bancontact.svg.es-DU2ejvNL.js +1 -0
  116. package/dist/carnet.svg.es-C5SFaOsa.js +1 -0
  117. package/dist/carnet.svg.es-Db-KEb13.mjs +4 -0
  118. package/dist/cartes-bancaires.svg.es-ByD-JAAi.mjs +4 -0
  119. package/dist/cartes-bancaires.svg.es-CbBJQZrk.js +1 -0
  120. package/dist/cashapp.svg.es-CnS5r_D8.mjs +4 -0
  121. package/dist/cashapp.svg.es-DE4vMu_p.js +1 -0
  122. package/dist/cn.es-BEU5D0Wz.mjs +3298 -0
  123. package/dist/cn.es-DxSeYcoP.js +1 -0
  124. package/dist/comparators.es-9VsCB-JI.mjs +175 -0
  125. package/dist/comparators.es-wrKHduVq.js +1 -0
  126. package/dist/component-BG6DmXcy.mjs +9 -0
  127. package/dist/component-hDuDTBt5.js +1 -0
  128. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -3
  129. package/dist/components/BillingInformation/BillingInformation.cjs +1 -0
  130. package/dist/components/BillingInformation/{BillingInformation.es.js → BillingInformation.mjs} +26 -34
  131. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -3
  132. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -0
  133. package/dist/components/BillingInformationForm/{BillingInformationForm.es.js → BillingInformationForm.mjs} +68 -154
  134. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -3
  135. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -0
  136. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +95 -0
  137. package/dist/components/Invoice/Invoice.ce.d.ts +1 -3
  138. package/dist/components/Invoice/Invoice.cjs +1 -0
  139. package/dist/components/Invoice/{Invoice.es.js → Invoice.mjs} +133 -180
  140. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -3
  141. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -0
  142. package/dist/components/InvoiceDetails/{InvoiceDetails.es.js → InvoiceDetails.mjs} +17 -29
  143. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +1 -0
  144. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -0
  145. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +73 -0
  146. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -3
  147. package/dist/components/InvoicesList/InvoicesList.cjs +1 -0
  148. package/dist/components/InvoicesList/{InvoicesList.es.js → InvoicesList.mjs} +21 -29
  149. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -3
  150. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -0
  151. package/dist/components/PaymentHistory/{PaymentHistory.es.js → PaymentHistory.mjs} +17 -29
  152. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -3
  153. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -0
  154. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +108 -0
  155. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -3
  156. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -0
  157. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +93 -0
  158. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -3
  159. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -0
  160. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +103 -0
  161. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -3
  162. package/dist/components/WalletBalances/WalletBalances.cjs +1 -0
  163. package/dist/components/WalletBalances/{WalletBalances.es.js → WalletBalances.mjs} +38 -34
  164. package/dist/configuration-BjYwV4_B.js +1 -0
  165. package/dist/configuration-CD8cOXAJ.mjs +15 -0
  166. package/dist/core/action-request.types.d.ts +1 -58
  167. package/dist/core/configuration.d.ts +1 -3
  168. package/dist/core/index.cjs +1 -0
  169. package/dist/core/index.d.ts +1 -10
  170. package/dist/core/index.mjs +197 -0
  171. package/dist/core/registry.ce.d.ts +1 -2
  172. package/dist/core/registry.d.ts +1 -6
  173. package/dist/core/types.d.ts +1 -111
  174. package/dist/countryData.es--zJAd6LA.mjs +252 -0
  175. package/dist/countryData.es-D3MFzU92.js +1 -0
  176. package/dist/customElements-B-89a5oH.mjs +6810 -0
  177. package/dist/customElements-DD7bpqkx.js +1 -0
  178. package/dist/customer-DozNwS_a.js +1 -0
  179. package/dist/customer-Dzj1g9lV.mjs +32 -0
  180. package/dist/customer.es-C_vSWcVA.mjs +30 -0
  181. package/dist/customer.es-D42Md24r.js +1 -0
  182. package/dist/dana.svg.es-Bbn6_ktN.mjs +4 -0
  183. package/dist/dana.svg.es-DKZaseoJ.js +1 -0
  184. package/dist/dankort.svg.es-D8FgSiFf.js +1 -0
  185. package/dist/dankort.svg.es-DtAdliQq.mjs +4 -0
  186. package/dist/de-DE-BeyQVhTv.mjs +299 -0
  187. package/dist/de-DE-BvHD68Ay.js +1 -0
  188. package/dist/de-DE-CI2zQkiP.mjs +266 -0
  189. package/dist/de-DE-_40QfLNJ.js +1 -0
  190. package/dist/diners.svg.es-DhchsD1D.mjs +4 -0
  191. package/dist/diners.svg.es-SydF_H-Z.js +1 -0
  192. package/dist/discover.svg.es-B8vgzVNG.js +1 -0
  193. package/dist/discover.svg.es-BnqYPvnV.mjs +4 -0
  194. package/dist/eftpos.svg.es-DO0YPaY1.js +1 -0
  195. package/dist/eftpos.svg.es-DRLaafYa.mjs +4 -0
  196. package/dist/elo.svg.es-CTOm1rvj.js +1 -0
  197. package/dist/elo.svg.es-CgkEOP_O.mjs +4 -0
  198. package/dist/en-US--NRsi7Hz.js +1 -0
  199. package/dist/en-US-5YWNEi-V.mjs +299 -0
  200. package/dist/en-US-DksUWPIu.mjs +266 -0
  201. package/dist/en-US-dqfKx3GS.js +1 -0
  202. package/dist/eps.svg.es-CApyGjyU.js +1 -0
  203. package/dist/eps.svg.es-D6IHsRYP.mjs +4 -0
  204. package/dist/error-Cg-i7gGl.js +1 -0
  205. package/dist/error-DY_I2hPx.mjs +13 -0
  206. package/dist/floating-ui.vue.es-Bv94BfDm.js +1 -0
  207. package/dist/floating-ui.vue.es-DWY7pdz8.mjs +1573 -0
  208. package/dist/formatting.es-DBtYnvI5.js +1 -0
  209. package/dist/formatting.es-eYgXv_AK.mjs +70 -0
  210. package/dist/gcash.svg.es-BhJ-eA2z.mjs +4 -0
  211. package/dist/gcash.svg.es-JaL4fpZr.js +1 -0
  212. package/dist/getComposedString.es-CELkn0I7.mjs +14 -0
  213. package/dist/getComposedString.es-DvSNX-_z.js +1 -0
  214. package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
  215. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
  216. package/dist/girocard.svg.es-D_3LML4l.mjs +4 -0
  217. package/dist/girocard.svg.es-tVgtT23w.js +1 -0
  218. package/dist/go-pay.svg.es-6UtgwVBA.mjs +4 -0
  219. package/dist/go-pay.svg.es-fYX6yMzJ.js +1 -0
  220. package/dist/google-pay.svg.es-BYXX1em8.js +1 -0
  221. package/dist/google-pay.svg.es-CRxXgFVl.mjs +4 -0
  222. package/dist/hipercard.svg.es-Ct1-mF9F.mjs +4 -0
  223. package/dist/hipercard.svg.es-D-nmiFXB.js +1 -0
  224. package/dist/icon-sprite.svg.es-BpwT0GQ5.js +1 -0
  225. package/dist/icon-sprite.svg.es-YYqtl2IP.mjs +4 -0
  226. package/dist/ideal.svg.es-D23EhJJ2.mjs +4 -0
  227. package/dist/ideal.svg.es-DXtHE0Jb.js +1 -0
  228. package/dist/index-Cai7laNY.mjs +1069 -0
  229. package/dist/index-DIFK3mcJ.js +6 -0
  230. package/dist/index-DyvRdSR7.mjs +9673 -0
  231. package/dist/index-IZaUTAsE.js +1 -0
  232. package/dist/index.cjs +1 -0
  233. package/dist/index.d.ts +1 -15
  234. package/dist/index.es-2JWHHSgP.js +1 -0
  235. package/dist/index.es-D5xOw_SJ.mjs +542 -0
  236. package/dist/index.mjs +42 -0
  237. package/dist/invoices-1oYkdQQV.mjs +121 -0
  238. package/dist/invoices-BAoh6X2a.js +1 -0
  239. package/dist/it-IT-B6blp8MI.mjs +299 -0
  240. package/dist/it-IT-CEP3oeWs.js +1 -0
  241. package/dist/it-IT-CMy1tHKZ.mjs +266 -0
  242. package/dist/it-IT-aPQY57ht.js +1 -0
  243. package/dist/jcb.svg.es-Bz6J-c0s.js +1 -0
  244. package/dist/jcb.svg.es-CcH08OoO.mjs +4 -0
  245. package/dist/kakao-pay.svg.es-DcgRDAsc.mjs +4 -0
  246. package/dist/kakao-pay.svg.es-qVTABboW.js +1 -0
  247. package/dist/klarna.svg.es-Clu-7zkp.js +1 -0
  248. package/dist/klarna.svg.es-DfIPX0gr.mjs +4 -0
  249. package/dist/maestro.svg.es-CVmNVokN.mjs +4 -0
  250. package/dist/maestro.svg.es-e8E_H2QU.js +1 -0
  251. package/dist/mastercard.svg.es-B8z0ZySS.mjs +4 -0
  252. package/dist/mastercard.svg.es-YO3_jGD6.js +1 -0
  253. package/dist/momo.svg.es-BXTQlQRy.js +1 -0
  254. package/dist/momo.svg.es-Bm5zCTOT.mjs +4 -0
  255. package/dist/nl-NL-CckNM7R9.mjs +266 -0
  256. package/dist/nl-NL-CjoW8r_M.mjs +314 -0
  257. package/dist/nl-NL-e_vf6OuT.js +1 -0
  258. package/dist/nl-NL-zRUAuEHg.js +1 -0
  259. package/dist/nyce.svg.es-CgurqLKH.mjs +4 -0
  260. package/dist/nyce.svg.es-DM6esO47.js +1 -0
  261. package/dist/object.es-DFXiU9p3.js +1 -0
  262. package/dist/object.es-jvvnR8Kr.mjs +12 -0
  263. package/dist/open-banking.svg.es-DUM360xB.js +1 -0
  264. package/dist/open-banking.svg.es-DzzLCVp_.mjs +4 -0
  265. package/dist/paymentMethods-CZ3ydybI.js +1 -0
  266. package/dist/{paymentMethods-CqKUfc3w.mjs → paymentMethods-DIV78w0O.mjs} +31 -18
  267. package/dist/payments--lkjiwCt.js +1 -0
  268. package/dist/{payments-CosaPZwo.mjs → payments-Cvqdrprv.mjs} +1 -1
  269. package/dist/paypal.svg.es-BdkNTf3c.js +1 -0
  270. package/dist/paypal.svg.es-DltWzW4V.mjs +4 -0
  271. package/dist/pricing-3W7XLwL6.js +1 -0
  272. package/dist/pricing-CJxS2hr2.mjs +17 -0
  273. package/dist/pricingItemConfigs.es-BPIm6S8M.mjs +107 -0
  274. package/dist/pricingItemConfigs.es-C73cQlxQ.js +1 -0
  275. package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
  276. package/dist/pricingPlanSchedule-CXG3CQ61.mjs +146 -0
  277. package/dist/pulse.svg.es-BdpWAuIN.js +1 -0
  278. package/dist/pulse.svg.es-BecAwT-p.mjs +4 -0
  279. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -3
  280. package/dist/screens/Checkout/Checkout.cjs +1 -0
  281. package/dist/screens/Checkout/{Checkout.es.js → Checkout.mjs} +1531 -1434
  282. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -3
  283. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -0
  284. package/dist/screens/CustomerOverview/CustomerOverview.mjs +175 -0
  285. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +1 -0
  286. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -0
  287. package/dist/screens/PayInvoice/PayInvoice.mjs +582 -0
  288. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +1 -0
  289. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -0
  290. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +227 -0
  291. package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +1 -0
  292. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -0
  293. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +882 -0
  294. package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +1 -0
  295. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -0
  296. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +707 -0
  297. package/dist/sepa.svg.es-BF8PYKZg.js +1 -0
  298. package/dist/sepa.svg.es-cbE9g8gV.mjs +4 -0
  299. package/dist/slots.es-BpwYO3A3.mjs +18 -0
  300. package/dist/slots.es-Dq1PTUOv.js +1 -0
  301. package/dist/sorting.es-CjTrRfSW.mjs +105 -0
  302. package/dist/sorting.es-RyvcgbSL.js +1 -0
  303. package/dist/star.svg.es-DsCD-tSp.mjs +4 -0
  304. package/dist/star.svg.es-Q50IzqXr.js +1 -0
  305. package/dist/subscription-C41lG-rH.mjs +89 -0
  306. package/dist/subscription-b0OPx8Du.js +1 -0
  307. package/dist/subscriptions-300o4ae0.js +1 -0
  308. package/dist/subscriptions-DcMHBPVJ.mjs +58 -0
  309. package/dist/trustly.svg.es-C0Ou1HWk.mjs +4 -0
  310. package/dist/trustly.svg.es-CHojqNqm.js +1 -0
  311. package/dist/twint.svg.es-CQ-ZDfy8.js +1 -0
  312. package/dist/twint.svg.es-WrZYquRs.mjs +4 -0
  313. package/dist/typeGuards.es-C4nR5FkL.js +1 -0
  314. package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
  315. package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +19 -0
  316. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  317. package/dist/types/components/checkout/EmptyStatePlaceholder.types.d.ts +4 -0
  318. package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +8 -0
  319. package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +24 -0
  320. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +32 -0
  321. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +12 -0
  322. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +14 -0
  323. package/dist/types/components/payments/AddPaymentMethodPane/AddPaymentMethodPane.types.d.ts +19 -0
  324. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +74 -0
  325. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +9 -0
  326. package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +3 -0
  327. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +21 -0
  328. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +10 -0
  329. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +5 -0
  330. package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +4 -0
  331. package/dist/types/components/payments/PaymentFeedbackCard/PaymentFeedbackCard.types.d.ts +4 -0
  332. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +74 -0
  333. package/dist/types/components/payments/PaymentIntegrationFormAdyen/PaymentIntegrationFormAdyen.types.d.ts +6 -0
  334. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripe.types.d.ts +7 -0
  335. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +61 -0
  336. package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +53 -0
  337. package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +8 -0
  338. package/dist/types/components/payments/PaymentMethodsUnavailableCard/PaymentMethodsUnavailableCard.types.d.ts +8 -0
  339. package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +3 -0
  340. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.d.ts +4 -0
  341. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +3 -0
  342. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +17 -0
  343. package/dist/types/components/providers/ActionDispatchProvider/composables/useActionDispatchProvider.d.ts +3 -0
  344. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +5 -0
  345. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +8 -0
  346. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +18 -0
  347. package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +3 -0
  348. package/dist/types/components/providers/AuthProvider/index.d.ts +3 -0
  349. package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +5 -0
  350. package/dist/types/components/providers/ConfigProvider/ConfigProvider.types.d.ts +9 -0
  351. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +18 -0
  352. package/dist/types/components/providers/ConfigProvider/composables/useConfig.d.ts +3 -0
  353. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.types.d.ts +3 -0
  354. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +18 -0
  355. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +10 -0
  356. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +22 -0
  357. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +17 -0
  358. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +5 -0
  359. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.types.d.ts +4 -0
  360. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +18 -0
  361. package/dist/types/components/providers/ExperimentalFeatureProvider/composables/useExperimentalFeature.d.ts +1 -0
  362. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +12 -0
  363. package/dist/types/components/providers/HostElementProvider/HostElementProvider.types.d.ts +3 -0
  364. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +18 -0
  365. package/dist/types/components/providers/HostElementProvider/composables/useHostElementProvider.d.ts +1 -0
  366. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +32 -0
  367. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +70 -0
  368. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +20 -0
  369. package/dist/types/components/providers/LoggerProvider/composables/useLogger.d.ts +6 -0
  370. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +7 -0
  371. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +11 -0
  372. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +18 -0
  373. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +3 -0
  374. package/dist/types/components/providers/Provider/Provider.types.d.ts +15 -0
  375. package/dist/types/components/providers/Provider/Provider.vue.d.ts +21 -0
  376. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +17 -0
  377. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +18 -0
  378. package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +9 -0
  379. package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +22 -0
  380. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +18 -0
  381. package/dist/types/components/providers/index.d.ts +9 -0
  382. package/dist/types/components/shared/ScreenTitle/ScreenTitle.types.d.ts +4 -0
  383. package/dist/types/components/shared/Section/Section.types.d.ts +21 -0
  384. package/dist/types/components/shared/Skeleton.types.d.ts +5 -0
  385. package/dist/types/components/shared/SlidingPanes/SlidingPanes.types.d.ts +12 -0
  386. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsList.types.d.ts +15 -0
  387. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +7 -0
  388. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +65 -0
  389. package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +5 -0
  390. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +8 -0
  391. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupContent.types.d.ts +4 -0
  392. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupEditorBase.types.d.ts +8 -0
  393. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +6 -0
  394. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +6 -0
  395. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTable.types.d.ts +5 -0
  396. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTableRow.types.d.ts +7 -0
  397. package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +12 -0
  398. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +47 -0
  399. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +28 -0
  400. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +7 -0
  401. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +7 -0
  402. package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +33 -0
  403. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
  404. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +13 -0
  405. package/dist/types/components/wallets/AutoTopUpCancellationModal/AutoTopUpCancellationModal.types.d.ts +9 -0
  406. package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +56 -0
  407. package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +16 -0
  408. package/dist/types/components/wallets/ConvertedAmountInput/ConvertedAmountInput.types.d.ts +32 -0
  409. package/dist/types/components/wallets/TopUpModal/TopUpInvoicePreview.types.d.ts +11 -0
  410. package/dist/types/components/wallets/TopUpModal/TopUpModal.types.d.ts +31 -0
  411. package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +23 -0
  412. package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +11 -0
  413. package/dist/types/components/wallets/WalletModalShell.types.d.ts +24 -0
  414. package/dist/types/composables/useInvoicePreview.types.d.ts +9 -0
  415. package/dist/types/config/config.beta.d.ts +2 -0
  416. package/dist/types/config/config.dev.d.ts +2 -0
  417. package/dist/types/config/config.live.d.ts +2 -0
  418. package/dist/types/config/internalEnvironments.d.ts +11 -0
  419. package/dist/types/config/internalEnvironments.published.d.ts +7 -0
  420. package/dist/types/config/lib.d.ts +6 -0
  421. package/dist/types/config/types.d.ts +13 -0
  422. package/dist/types/index.d.ts +23 -0
  423. package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -0
  424. package/dist/types/public/components/BillingInformation/BillingInformation.entry.types.d.ts +4 -0
  425. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +12 -0
  426. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -0
  427. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +4 -0
  428. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.types.d.ts +10 -0
  429. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -0
  430. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.types.d.ts +6 -0
  431. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +22 -0
  432. package/dist/types/public/components/CustomerWalletBalances/CustomerWalletBalances.types.d.ts +22 -0
  433. package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -0
  434. package/dist/types/public/components/Invoice/Invoice.entry.types.d.ts +5 -0
  435. package/dist/types/public/components/Invoice/Invoice.types.d.ts +26 -0
  436. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -0
  437. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +5 -0
  438. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +9 -0
  439. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -0
  440. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.types.d.ts +5 -0
  441. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +16 -0
  442. package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -0
  443. package/dist/types/public/components/InvoicesList/InvoicesList.entry.types.d.ts +5 -0
  444. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +37 -0
  445. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -0
  446. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +5 -0
  447. package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +10 -0
  448. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -0
  449. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +5 -0
  450. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +38 -0
  451. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -0
  452. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +5 -0
  453. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +9 -0
  454. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -0
  455. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.types.d.ts +5 -0
  456. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
  457. package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -0
  458. package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +5 -0
  459. package/dist/types/public/components/WalletBalances/WalletBalances.types.d.ts +3 -0
  460. package/dist/types/public/core/action-request.types.d.ts +55 -0
  461. package/dist/types/public/core/configuration.d.ts +3 -0
  462. package/dist/types/public/core/index.d.ts +14 -0
  463. package/dist/types/public/core/registry.ce.d.ts +8 -0
  464. package/dist/types/public/core/registry.d.ts +6 -0
  465. package/dist/types/public/core/types.d.ts +120 -0
  466. package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -0
  467. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +18 -0
  468. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +46 -0
  469. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -0
  470. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.types.d.ts +5 -0
  471. package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +2 -0
  472. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -0
  473. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.types.d.ts +4 -0
  474. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +23 -0
  475. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -0
  476. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.types.d.ts +3 -0
  477. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.types.d.ts +7 -0
  478. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -0
  479. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +6 -0
  480. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +23 -0
  481. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -0
  482. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.types.d.ts +5 -0
  483. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +13 -0
  484. package/dist/types/public/screens/types.d.ts +4 -0
  485. package/dist/types/public/types/index.d.ts +23 -0
  486. package/dist/types/services/invoices.types.d.ts +26 -0
  487. package/dist/types/services/paymentMethods.types.d.ts +31 -0
  488. package/dist/types/services/portals.types.d.ts +68 -0
  489. package/dist/types/services/requests.types.d.ts +24 -0
  490. package/dist/types/translations/supported.d.ts +1 -0
  491. package/dist/types/types/EntryBaseProps.d.ts +10 -0
  492. package/dist/types/types/errors.d.ts +7 -0
  493. package/dist/types/types/subscription.d.ts +4 -0
  494. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +111 -0
  495. package/dist/types/vendor/@solvimon/solvimon-types/types/Address.d.ts +17 -0
  496. package/dist/types/vendor/@solvimon/solvimon-types/types/Alerts.d.ts +72 -0
  497. package/dist/types/vendor/@solvimon/solvimon-types/types/Amount.d.ts +4 -0
  498. package/dist/types/vendor/@solvimon/solvimon-types/types/Api.d.ts +50 -0
  499. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiError.d.ts +7 -0
  500. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiKey.d.ts +21 -0
  501. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiStatus.d.ts +7 -0
  502. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +77 -0
  503. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +22 -0
  504. package/dist/types/vendor/@solvimon/solvimon-types/types/Attachment.d.ts +14 -0
  505. package/dist/types/vendor/@solvimon/solvimon-types/types/Band.d.ts +30 -0
  506. package/dist/types/vendor/@solvimon/solvimon-types/types/BaseResourceStatus.d.ts +3 -0
  507. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingEntity.d.ts +45 -0
  508. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingPeriod.d.ts +5 -0
  509. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingTime.d.ts +1 -0
  510. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +24 -0
  511. package/dist/types/vendor/@solvimon/solvimon-types/types/Commitment.d.ts +9 -0
  512. package/dist/types/vendor/@solvimon/solvimon-types/types/CommitmentItem.d.ts +17 -0
  513. package/dist/types/vendor/@solvimon/solvimon-types/types/Comparator.d.ts +1 -0
  514. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +12 -0
  515. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfiguredMeterValue.d.ts +9 -0
  516. package/dist/types/vendor/@solvimon/solvimon-types/types/Country.d.ts +1 -0
  517. package/dist/types/vendor/@solvimon/solvimon-types/types/CreateMeterData.d.ts +5 -0
  518. package/dist/types/vendor/@solvimon/solvimon-types/types/CreatePricingPlanVersion.d.ts +3 -0
  519. package/dist/types/vendor/@solvimon/solvimon-types/types/CreditType.d.ts +16 -0
  520. package/dist/types/vendor/@solvimon/solvimon-types/types/Currency.d.ts +8 -0
  521. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +39 -0
  522. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomerContact.d.ts +12 -0
  523. package/dist/types/vendor/@solvimon/solvimon-types/types/Customers.d.ts +75 -0
  524. package/dist/types/vendor/@solvimon/solvimon-types/types/Discount.d.ts +12 -0
  525. package/dist/types/vendor/@solvimon/solvimon-types/types/DiscountItem.d.ts +24 -0
  526. package/dist/types/vendor/@solvimon/solvimon-types/types/Document.d.ts +22 -0
  527. package/dist/types/vendor/@solvimon/solvimon-types/types/DueDateConfiguration.d.ts +8 -0
  528. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +16 -0
  529. package/dist/types/vendor/@solvimon/solvimon-types/types/Environment.d.ts +1 -0
  530. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTrace.d.ts +23 -0
  531. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceExtended.d.ts +22 -0
  532. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLink.d.ts +14 -0
  533. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLinkExtended.d.ts +15 -0
  534. package/dist/types/vendor/@solvimon/solvimon-types/types/Features.d.ts +25 -0
  535. package/dist/types/vendor/@solvimon/solvimon-types/types/IdentityProvider.d.ts +40 -0
  536. package/dist/types/vendor/@solvimon/solvimon-types/types/IndexingSettings.d.ts +24 -0
  537. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +367 -0
  538. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +349 -0
  539. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +22 -0
  540. package/dist/types/vendor/@solvimon/solvimon-types/types/Markup.d.ts +8 -0
  541. package/dist/types/vendor/@solvimon/solvimon-types/types/MarkupItem.d.ts +11 -0
  542. package/dist/types/vendor/@solvimon/solvimon-types/types/Meter.d.ts +32 -0
  543. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterConditions.d.ts +26 -0
  544. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterData.d.ts +25 -0
  545. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterDataExpanded.d.ts +5 -0
  546. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterProperty.d.ts +34 -0
  547. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyValue.d.ts +5 -0
  548. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValue.d.ts +16 -0
  549. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueCalculation.d.ts +20 -0
  550. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueValue.d.ts +7 -0
  551. package/dist/types/vendor/@solvimon/solvimon-types/types/ModelType.d.ts +1 -0
  552. package/dist/types/vendor/@solvimon/solvimon-types/types/Name.d.ts +5 -0
  553. package/dist/types/vendor/@solvimon/solvimon-types/types/NotificationPreferences.d.ts +9 -0
  554. package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +124 -0
  555. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +120 -0
  556. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAction.d.ts +74 -0
  557. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethod.d.ts +173 -0
  558. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethodOptions.d.ts +45 -0
  559. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentSchedules.d.ts +142 -0
  560. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -0
  561. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +118 -0
  562. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +58 -0
  563. package/dist/types/vendor/@solvimon/solvimon-types/types/Pricing.d.ts +41 -0
  564. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategory.d.ts +18 -0
  565. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategoryExtended.d.ts +9 -0
  566. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingExtended.d.ts +9 -0
  567. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingGroup.d.ts +29 -0
  568. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItem.d.ts +40 -0
  569. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +130 -0
  570. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +103 -0
  571. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +7 -0
  572. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleWithPlanData.d.ts +9 -0
  573. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +80 -0
  574. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscriptionGroup.d.ts +10 -0
  575. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersion.d.ts +71 -0
  576. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersionExtended.d.ts +7 -0
  577. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +44 -0
  578. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +22 -0
  579. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductCategory.d.ts +10 -0
  580. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +60 -0
  581. package/dist/types/vendor/@solvimon/solvimon-types/types/PromotionCodes.d.ts +14 -0
  582. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +43 -0
  583. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +93 -0
  584. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +65 -0
  585. package/dist/types/vendor/@solvimon/solvimon-types/types/ReprocessLog.d.ts +31 -0
  586. package/dist/types/vendor/@solvimon/solvimon-types/types/Resource.d.ts +5 -0
  587. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +2 -0
  588. package/dist/types/vendor/@solvimon/solvimon-types/types/Role.d.ts +19 -0
  589. package/dist/types/vendor/@solvimon/solvimon-types/types/SignatureRequest.d.ts +27 -0
  590. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxCategory.d.ts +1 -0
  591. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxIdentifier.d.ts +17 -0
  592. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxSummary.d.ts +21 -0
  593. package/dist/types/vendor/@solvimon/solvimon-types/types/TimePeriod.d.ts +5 -0
  594. package/dist/types/vendor/@solvimon/solvimon-types/types/Timestamp.d.ts +4 -0
  595. package/dist/types/vendor/@solvimon/solvimon-types/types/Token.d.ts +6 -0
  596. package/dist/types/vendor/@solvimon/solvimon-types/types/User.d.ts +106 -0
  597. package/dist/types/vendor/@solvimon/solvimon-types/types/ValueType.d.ts +1 -0
  598. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +44 -0
  599. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletAutoTopUpConfigs.d.ts +28 -0
  600. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletType.d.ts +54 -0
  601. package/dist/types/vendor/@solvimon/solvimon-types/types/Webhook.d.ts +48 -0
  602. package/dist/types/vendor/@solvimon/solvimon-types/types/WebhookEvent.d.ts +18 -0
  603. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +95 -0
  604. package/dist/types/vendor/@solvimon/solvimon-types/types/forms.d.ts +1 -0
  605. package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +17 -0
  606. package/dist/unionpay.svg.es-DYgo83Hf.mjs +4 -0
  607. package/dist/unionpay.svg.es-YqJKKFEj.js +1 -0
  608. package/dist/url-CjULBkjW.js +1 -0
  609. package/dist/url-CvNDq4wp.mjs +22 -0
  610. package/dist/{useActionDispatchProvider-CgRcOqv3.mjs → useActionDispatchProvider-BVOBO0Jx.mjs} +1 -1
  611. package/dist/useActionDispatchProvider-Cv9amjTf.js +1 -0
  612. package/dist/useCustomer-DLHOs4BR.js +1 -0
  613. package/dist/useCustomer-EDhref7T.mjs +25 -0
  614. package/dist/useCustomerFormLabels-B61-4xQ7.mjs +1168 -0
  615. package/dist/useCustomerFormLabels-C6wW4n2e.js +1 -0
  616. package/dist/useExperimentalFeature-0yFoaEzV.js +1 -0
  617. package/dist/useExperimentalFeature-DvxOrFPU.mjs +9 -0
  618. package/dist/{useIncrementalLoading-C7ToTmZK.mjs → useIncrementalLoading-BK9pRYAU.mjs} +9 -9
  619. package/dist/useIncrementalLoading-CdtGJm_Y.js +1 -0
  620. package/dist/useInvoiceData-BSjVeJrI.js +1 -0
  621. package/dist/{useInvoiceData-CcueV3We.mjs → useInvoiceData-C0Y5WrbT.mjs} +6 -12
  622. package/dist/useInvoicesList-BRDZqsaB.js +1 -0
  623. package/dist/useInvoicesList-CYoE7q0u.mjs +580 -0
  624. package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-Cp1OA8y6.mjs} +5 -0
  625. package/dist/useLoadInitialData-u7IyXqb6.js +1 -0
  626. package/dist/usePaymentMethodAvailability-B3s1lqQ2.js +1 -0
  627. package/dist/usePaymentMethodAvailability-EuhZPghG.mjs +141 -0
  628. package/dist/usePaymentMethodOptions--8QpMvNm.js +1 -0
  629. package/dist/usePaymentMethodOptions-Cljh7HYp.mjs +36 -0
  630. package/dist/{usePaymentMethods-Db-1R6rI.mjs → usePaymentMethods-BJzoI8dZ.mjs} +2 -2
  631. package/dist/{usePaymentMethods-DCGVRXA4.js → usePaymentMethods-DvEnJWmB.js} +1 -1
  632. package/dist/usePayments-CANj0QVc.js +1 -0
  633. package/dist/usePayments-CaT1CBzE.mjs +362 -0
  634. package/dist/usePortal-BjGoSeLy.js +1 -0
  635. package/dist/usePortal-CMPQ0M9R.mjs +12 -0
  636. package/dist/useService-D73FNBjT.js +1 -0
  637. package/dist/useService-W3Kxems4.mjs +72 -0
  638. package/dist/useSubscription-D1UKnZAx.mjs +250 -0
  639. package/dist/useSubscription-DZfRHbL7.js +1 -0
  640. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  641. package/dist/useViewport-CKRY1CKR.js +1 -0
  642. package/dist/useWatchDebounced-C_YxgoQ6.js +1 -0
  643. package/dist/useWatchDebounced-Zmxd6InB.mjs +16 -0
  644. package/dist/visa.svg.es-B6aU_qRs.mjs +4 -0
  645. package/dist/visa.svg.es-D6sc4YTE.js +1 -0
  646. package/dist/vpay.svg.es-4qIqS4aX.mjs +4 -0
  647. package/dist/vpay.svg.es-CLGTyB09.js +1 -0
  648. package/dist/zip.svg.es-3PzSBe1E.mjs +4 -0
  649. package/dist/zip.svg.es-BRsgmur-.js +1 -0
  650. package/package.json +112 -61
  651. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BD3CrJzj.js +0 -1
  652. package/dist/ContentWithAsideLayout-CRsFr9TH.mjs +0 -42
  653. package/dist/ContentWithAsideLayout-DczcgSrt.js +0 -1
  654. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BE3I7Oe1.js +0 -1
  655. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-sNdlKgdU.js +0 -1
  656. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs +0 -6568
  657. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Sn1Jq19s.js +0 -1
  658. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Bifo4jTH.js +0 -1
  659. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-DWp42_G4.mjs +0 -75
  660. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +0 -1
  661. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js +0 -1
  662. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  663. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  664. package/dist/auto-DzZuCneB.mjs +0 -14387
  665. package/dist/auto-PpnAChnH.js +0 -6
  666. package/dist/cloneDeep-DranHQkY.js +0 -1
  667. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  668. package/dist/component-DEo_ndpK.mjs +0 -58668
  669. package/dist/component-XHQYFLA_.js +0 -1
  670. package/dist/components/BillingInformation/BillingInformation.cjs.js +0 -1
  671. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +0 -1
  672. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +0 -1
  673. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +0 -134
  674. package/dist/components/Invoice/Invoice.cjs.js +0 -1
  675. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +0 -1
  676. package/dist/components/InvoicesList/InvoicesList.cjs.js +0 -1
  677. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +0 -1
  678. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +0 -1
  679. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +0 -238
  680. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +0 -1
  681. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +0 -152
  682. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +0 -1
  683. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +0 -134
  684. package/dist/components/WalletBalances/WalletBalances.cjs.js +0 -1
  685. package/dist/core/index.cjs.js +0 -1
  686. package/dist/core/index.es.js +0 -6
  687. package/dist/index-2jo9BSPM.js +0 -1
  688. package/dist/index-BFZ0dPh9.mjs +0 -179
  689. package/dist/index-CWSXne1Q.js +0 -1
  690. package/dist/index-CzL1ZcGi.mjs +0 -85
  691. package/dist/index-D3v7hAtc.mjs +0 -253
  692. package/dist/index-DRdBmZ2-.js +0 -1
  693. package/dist/index.cjs.js +0 -1
  694. package/dist/index.es.js +0 -45
  695. package/dist/invoices-BW1notiX.js +0 -1
  696. package/dist/invoices-M5oYVch6.mjs +0 -84
  697. package/dist/paymentMethods-BX80t2zk.js +0 -1
  698. package/dist/payments-BHv4hCeJ.js +0 -1
  699. package/dist/registry-BwKEYOf7.js +0 -1
  700. package/dist/registry-Cag1Jj7P.mjs +0 -143
  701. package/dist/screens/Checkout/Checkout.cjs.js +0 -1
  702. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +0 -1
  703. package/dist/screens/CustomerOverview/CustomerOverview.es.js +0 -136
  704. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
  705. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
  706. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1012
  707. package/dist/solvimon-web.css +0 -1
  708. package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
  709. package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
  710. package/dist/subscriptions-Bs4DIE8f.mjs +0 -74
  711. package/dist/subscriptions-CnxvsBXd.js +0 -1
  712. package/dist/useActionDispatchProvider-Cru69mAl.js +0 -1
  713. package/dist/useCustomer-B0NK96dA.js +0 -1
  714. package/dist/useCustomer-DlcjY3fP.mjs +0 -45
  715. package/dist/useCustomerPaymentMethodOptions-C-8BLzqb.js +0 -1
  716. package/dist/useIncrementalLoading-D60Vttil.js +0 -1
  717. package/dist/useInvoiceData-DstXfI7t.js +0 -1
  718. package/dist/useInvoicesList-CXng3aUm.mjs +0 -294
  719. package/dist/useInvoicesList-DmzjgMlW.js +0 -1
  720. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  721. package/dist/useService-B4qv5N2D.mjs +0 -281
  722. package/dist/useService-D-CUtlp3.js +0 -1
  723. package/dist/useWalletBalanceItems-BZyiAhcV.js +0 -1
  724. package/dist/useWalletBalanceItems-CHkLaccm.mjs +0 -105
@@ -0,0 +1,2944 @@
1
+ import { ref, openBlock, createElementBlock, renderSlot, defineComponent, normalizeClass, Fragment, renderList, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createBlock, unref, createCommentVNode, createSlots, withKeys, normalizeProps, guardReactiveProps, computed, mergeProps, isRef } from "vue";
2
+ import { u as useIntl, _ as _sfc_main$u, k as formatTimezone } from "./customElements-B-89a5oH.mjs";
3
+ import { _ as _sfc_main$l } from "./Amount.vue.es-BO5sS1UX.mjs";
4
+ import { i as isEmpty } from "./useService-W3Kxems4.mjs";
5
+ import { _ as _sfc_main$n, a as _sfc_main$s } from "./Button.vue.es-Cm9pLU9i.mjs";
6
+ import { _ as _export_sfc } from "./floating-ui.vue.es-DWY7pdz8.mjs";
7
+ import { a as getCustomerName } from "./customer.es-C_vSWcVA.mjs";
8
+ import { M as MAX_FRACTION_DIGITS, f as formatAmount, a as formatEnum } from "./formatting.es-eYgXv_AK.mjs";
9
+ import { _ as _sfc_main$k, u as useToggleList } from "./Comparators.vue.es-CYfxd5H-.mjs";
10
+ import { _ as _sfc_main$m } from "./Chip.vue.es-BBmn-qJp.mjs";
11
+ import { g as getComposedString } from "./getComposedString.es-CELkn0I7.mjs";
12
+ import { _ as _sfc_main$o, T as TooltipContent, a as _sfc_main$p } from "./TooltipParagraph.vue.es-C5RTcrid.mjs";
13
+ import { f as useResizeObserver } from "./index.es-D5xOw_SJ.mjs";
14
+ import { _ as _sfc_main$t } from "./DividerText.vue.es-CeAHAe_Y.mjs";
15
+ import { _ as _sfc_main$q } from "./IconTitle.vue.es-BmjBdZb_.mjs";
16
+ import { a as _sfc_main$r } from "./ContextMenu.vue.es-CTc1ktXb.mjs";
17
+ const useSimpleToggleList = (initialToggledItems = []) => {
18
+ const toggledItems = ref(initialToggledItems);
19
+ const toggle = (index) => {
20
+ const match = toggledItems.value.find((groupIndex) => groupIndex === index);
21
+ if (typeof match === "number") {
22
+ toggledItems.value = toggledItems.value.filter((groupIndex) => groupIndex !== index);
23
+ } else {
24
+ toggledItems.value = [...toggledItems.value, index];
25
+ }
26
+ };
27
+ return [toggledItems, toggle];
28
+ };
29
+ const _sfc_main$j = {};
30
+ const _hoisted_1$g = { class: "w-full table-fixed" };
31
+ function _sfc_render(_ctx, _cache) {
32
+ return openBlock(), createElementBlock("table", _hoisted_1$g, [
33
+ renderSlot(_ctx.$slots, "default")
34
+ ]);
35
+ }
36
+ const InvoiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render]]);
37
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
38
+ __name: "InvoiceTableData",
39
+ props: {
40
+ number: { type: Boolean, default: false },
41
+ hasPadding: { type: Boolean, default: true }
42
+ },
43
+ setup(__props) {
44
+ return (_ctx, _cache) => {
45
+ return openBlock(), createElementBlock("td", {
46
+ class: normalizeClass({
47
+ "text-right tabular-nums": __props.number,
48
+ "py-2": __props.hasPadding
49
+ })
50
+ }, [
51
+ renderSlot(_ctx.$slots, "default")
52
+ ], 2);
53
+ };
54
+ }
55
+ });
56
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
57
+ __name: "InvoiceTableHeader",
58
+ props: {
59
+ left: { type: Boolean, default: false },
60
+ right: { type: Boolean, default: false }
61
+ },
62
+ setup(__props) {
63
+ return (_ctx, _cache) => {
64
+ return openBlock(), createElementBlock("th", {
65
+ class: normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-subtle", { "text-left": __props.left, "text-right": __props.right }])
66
+ }, [
67
+ renderSlot(_ctx.$slots, "default")
68
+ ], 2);
69
+ };
70
+ }
71
+ });
72
+ const INVOICE_PERIOD = "INVOICE_PERIOD";
73
+ const INVOICE_PERIOD_SUBTOTAL = "INVOICE_PERIOD_SUBTOTAL";
74
+ const INVOICE_PERIOD_TOTAL = "INVOICE_PERIOD_TOTAL";
75
+ const SUMMARY_LINE_AMOUNT = "SUMMARY_LINE_AMOUNT";
76
+ const SUMMARY_TOTAL_TAX = "SUMMARY_TOTAL_TAX";
77
+ const SUMMARY_TOTAL_INCLUDING_TAX = "SUMMARY_TOTAL_INCLUDING_TAX";
78
+ const SUMMARY_TOTAL_EXCLUDING_TAX = "SUMMARY_TOTAL_EXCLUDING_TAX";
79
+ const SUMMARY_TOTAL_DISCOUNT = "SUMMARY_TOTAL_DISCOUNT";
80
+ const SUMMARY_AMOUNT_DUE = "SUMMARY_AMOUNT_DUE";
81
+ const DEDUCTION = "DEDUCTION";
82
+ const HAS_SUBLINES = "HAS_SUBLINES";
83
+ const _hoisted_1$f = { class: "flex items-center" };
84
+ const _hoisted_2$a = {
85
+ key: 0,
86
+ class: "text-xs text-secondary"
87
+ };
88
+ const _hoisted_3$6 = { class: "flex items-center" };
89
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
90
+ __name: "InvoiceSubLineRow",
91
+ props: {
92
+ subLines: {},
93
+ isOpen: { type: Boolean },
94
+ lineOrder: {},
95
+ periodOrder: {},
96
+ groupOrder: {},
97
+ processingOnlyCustomers: {},
98
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
99
+ showTaxPerLineItem: { type: Boolean, default: true }
100
+ },
101
+ setup(__props) {
102
+ const { formatMessage, formatNumber } = useIntl();
103
+ const props = __props;
104
+ const getCustomerName$1 = (customerId) => {
105
+ var _a;
106
+ const childCustomer = (_a = props.processingOnlyCustomers) == null ? void 0 : _a.find(
107
+ (childCustomer2) => childCustomer2.id === customerId
108
+ );
109
+ if (!childCustomer) {
110
+ return formatMessage({
111
+ id: "generic.not_available",
112
+ defaultMessage: "N/A",
113
+ description: "Used in scenarios where no data is available to be displayed"
114
+ });
115
+ }
116
+ return getCustomerName(childCustomer);
117
+ };
118
+ const getSubLineConditions = (subLine) => {
119
+ var _a;
120
+ return ((_a = subLine.usage_based_conversion) == null ? void 0 : _a.conditions) ?? subLine.conditions;
121
+ };
122
+ const getConversionCreditsQuantity = (subLine) => {
123
+ var _a, _b;
124
+ const quantity = (_b = (_a = subLine.details.conversion) == null ? void 0 : _a.credits) == null ? void 0 : _b.quantity;
125
+ if (quantity === void 0) {
126
+ return formatMessage({
127
+ id: "generic.not_available",
128
+ defaultMessage: "N/A",
129
+ description: "Used in scenarios where no data is available to be displayed"
130
+ });
131
+ }
132
+ return formatNumber(+quantity, { maximumFractionDigits: MAX_FRACTION_DIGITS });
133
+ };
134
+ return (_ctx, _cache) => {
135
+ return __props.subLines && __props.isOpen ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.subLines, (subLine, subLineIndex) => {
136
+ return openBlock(), createElementBlock(Fragment, { key: subLineIndex }, [
137
+ !subLine.processing_only_customer_resource_id ? (openBlock(), createElementBlock("tr", {
138
+ key: 0,
139
+ class: normalizeClass(subLineIndex > 0 ? "border-t" : "")
140
+ }, [
141
+ createVNode(_sfc_main$i, null, {
142
+ default: withCtx(() => {
143
+ var _a, _b, _c, _d, _e, _f;
144
+ return [
145
+ createElementVNode("div", _hoisted_1$f, [
146
+ renderSlot(_ctx.$slots, "invoice-line-prefix", {
147
+ lineOrder: __props.lineOrder,
148
+ periodOrder: __props.periodOrder,
149
+ groupOrder: __props.groupOrder
150
+ }),
151
+ createElementVNode("div", null, [
152
+ createElementVNode("div", null, [
153
+ subLine.description ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
154
+ createTextVNode(toDisplayString(subLine.description), 1)
155
+ ], 64)) : subLine.details.description ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
156
+ createTextVNode(toDisplayString(subLine.details.description), 1)
157
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
158
+ createTextVNode(" N/A ")
159
+ ], 64))
160
+ ]),
161
+ ((_a = getSubLineConditions(subLine)) == null ? void 0 : _a.name) || ((_b = getSubLineConditions(subLine)) == null ? void 0 : _b.meter_properties) ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
162
+ ((_c = getSubLineConditions(subLine)) == null ? void 0 : _c.name) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
163
+ createTextVNode(toDisplayString((_d = getSubLineConditions(subLine)) == null ? void 0 : _d.name), 1)
164
+ ], 64)) : ((_e = getSubLineConditions(subLine)) == null ? void 0 : _e.meter_properties) ? (openBlock(), createBlock(unref(_sfc_main$k), {
165
+ key: 1,
166
+ comparators: (_f = getSubLineConditions(subLine)) == null ? void 0 : _f.meter_properties
167
+ }, null, 8, ["comparators"])) : createCommentVNode("", true)
168
+ ])) : createCommentVNode("", true)
169
+ ])
170
+ ])
171
+ ];
172
+ }),
173
+ _: 2
174
+ }, 1024),
175
+ createVNode(_sfc_main$i, {
176
+ number: "",
177
+ class: "text-right tabular-nums"
178
+ }, {
179
+ default: withCtx(() => [
180
+ createTextVNode(toDisplayString(getConversionCreditsQuantity(subLine)), 1)
181
+ ]),
182
+ _: 2
183
+ }, 1024),
184
+ createVNode(_sfc_main$i, { class: "text-right tabular-nums" }, {
185
+ default: withCtx(() => {
186
+ var _a, _b;
187
+ return [
188
+ ((_a = subLine.details.band) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$l, {
189
+ key: 0,
190
+ value: subLine.details.band.amount
191
+ }, null, 8, ["value"])) : ((_b = subLine.details.band) == null ? void 0 : _b.percentage) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
192
+ createTextVNode(toDisplayString(subLine.details.band.percentage) + "% ", 1)
193
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
194
+ createTextVNode(" N/A ")
195
+ ], 64))
196
+ ];
197
+ }),
198
+ _: 2
199
+ }, 1024),
200
+ __props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$i, { key: 0 }, {
201
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
202
+ createTextVNode(" ", -1)
203
+ ])]),
204
+ _: 1
205
+ })) : createCommentVNode("", true),
206
+ subLine.details.amount ? (openBlock(), createBlock(_sfc_main$i, {
207
+ key: 1,
208
+ class: "text-right tabular-nums"
209
+ }, {
210
+ default: withCtx(() => [
211
+ createVNode(_sfc_main$l, {
212
+ value: subLine.details.amount,
213
+ "data-testid": unref(INVOICE_PERIOD_SUBTOTAL)
214
+ }, null, 8, ["value", "data-testid"])
215
+ ]),
216
+ _: 2
217
+ }, 1024)) : createCommentVNode("", true)
218
+ ], 2)) : __props.displayInvoiceSubLinesPerProcessingOnlyCustomer && __props.processingOnlyCustomers ? (openBlock(), createElementBlock("tr", {
219
+ key: 1,
220
+ class: normalizeClass(["group", { "border-t": subLineIndex > 0 }])
221
+ }, [
222
+ createVNode(_sfc_main$i, { class: "pl-4" }, {
223
+ default: withCtx(() => [
224
+ createElementVNode("div", _hoisted_3$6, [
225
+ createElementVNode("div", null, toDisplayString(getCustomerName$1(subLine.processing_only_customer_resource_id)), 1)
226
+ ])
227
+ ]),
228
+ _: 2
229
+ }, 1024),
230
+ renderSlot(_ctx.$slots, "subline-content", {
231
+ details: subLine.details,
232
+ hideTaxDetails: true
233
+ })
234
+ ], 2)) : createCommentVNode("", true)
235
+ ], 64);
236
+ }), 128)) : createCommentVNode("", true);
237
+ };
238
+ }
239
+ });
240
+ const _hoisted_1$e = { class: "flex gap-4" };
241
+ const _hoisted_2$9 = { class: "flex items-center gap-2" };
242
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
243
+ __name: "PricingClauseChip",
244
+ props: {
245
+ iconName: {}
246
+ },
247
+ setup(__props) {
248
+ return (_ctx, _cache) => {
249
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
250
+ createVNode(_sfc_main$m, null, {
251
+ default: withCtx(() => [
252
+ createElementVNode("div", _hoisted_2$9, [
253
+ createVNode(_sfc_main$n, {
254
+ icon: __props.iconName,
255
+ size: "xs"
256
+ }, null, 8, ["icon"]),
257
+ createElementVNode("span", null, [
258
+ renderSlot(_ctx.$slots, "chip-content")
259
+ ])
260
+ ])
261
+ ]),
262
+ _: 3
263
+ }),
264
+ renderSlot(_ctx.$slots, "chip-postfix")
265
+ ]);
266
+ };
267
+ }
268
+ });
269
+ const _hoisted_1$d = { class: "flex flex-col gap-2" };
270
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
271
+ __name: "InvoicePricingClauseChip",
272
+ props: {
273
+ clauseType: {},
274
+ priceDetailsBand: {},
275
+ invoiceLineDescription: {}
276
+ },
277
+ setup(__props) {
278
+ const intl = useIntl();
279
+ return (_ctx, _cache) => {
280
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
281
+ createElementVNode("span", null, toDisplayString(__props.invoiceLineDescription), 1),
282
+ __props.clauseType === "DISCOUNT" && __props.priceDetailsBand ? (openBlock(), createBlock(unref(_sfc_main$f), {
283
+ key: 0,
284
+ "icon-name": "south_east"
285
+ }, createSlots({ _: 2 }, [
286
+ __props.priceDetailsBand.amount ? {
287
+ name: "chip-content",
288
+ fn: withCtx(() => [
289
+ createTextVNode(toDisplayString(unref(intl).$t(
290
+ {
291
+ id: "invoice.amount_discount",
292
+ defaultMessage: "{amount} discount",
293
+ description: "Represents a certain amount of discount, where {amount} is replaced with the amount"
294
+ },
295
+ {
296
+ amount: unref(formatAmount)(__props.priceDetailsBand.amount)
297
+ }
298
+ ).toUpperCase()), 1)
299
+ ]),
300
+ key: "0"
301
+ } : __props.priceDetailsBand.percentage ? {
302
+ name: "chip-content",
303
+ fn: withCtx(() => [
304
+ createTextVNode(toDisplayString(unref(intl).$t(
305
+ {
306
+ id: "invoice.percentage_discount",
307
+ defaultMessage: "{percentage}% discount",
308
+ description: "Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"
309
+ },
310
+ {
311
+ percentage: __props.priceDetailsBand.percentage ?? "0"
312
+ }
313
+ ).toUpperCase()), 1)
314
+ ]),
315
+ key: "1"
316
+ } : void 0
317
+ ]), 1024)) : __props.clauseType === "ADJUSTMENT" ? (openBlock(), createBlock(unref(_sfc_main$f), {
318
+ key: 1,
319
+ "icon-name": "info"
320
+ }, {
321
+ "chip-content": withCtx(() => [
322
+ createTextVNode(toDisplayString(unref(intl).$t({
323
+ id: "invoice.adjustment_chip_body",
324
+ defaultMessage: "Adjustment",
325
+ description: "Used on invoice lines to mark as adjusted"
326
+ }).toUpperCase()), 1)
327
+ ]),
328
+ _: 1
329
+ })) : __props.clauseType === "MARKUP" ? (openBlock(), createBlock(unref(_sfc_main$f), {
330
+ key: 2,
331
+ "icon-name": "north_east"
332
+ }, {
333
+ "chip-content": withCtx(() => {
334
+ var _a;
335
+ return [
336
+ createTextVNode(toDisplayString(unref(intl).$t(
337
+ {
338
+ id: "invoice.markup_percentage",
339
+ defaultMessage: "{percentage}% markup",
340
+ description: "Markup percentage, where {percentage} is replaced with the percentage (number only)"
341
+ },
342
+ { percentage: ((_a = __props.priceDetailsBand) == null ? void 0 : _a.percentage) ?? "0" }
343
+ ).toUpperCase()), 1)
344
+ ];
345
+ }),
346
+ _: 1
347
+ })) : __props.clauseType === "COMMITMENT" ? (openBlock(), createBlock(unref(_sfc_main$f), {
348
+ key: 3,
349
+ "icon-name": "sell"
350
+ }, {
351
+ "chip-content": withCtx(() => [
352
+ createTextVNode(toDisplayString(unref(intl).$t({
353
+ id: "invoice.commitment",
354
+ defaultMessage: "commitment",
355
+ description: "Used on invoice lines to mark as commitment"
356
+ }).toUpperCase()), 1)
357
+ ]),
358
+ _: 1
359
+ })) : createCommentVNode("", true)
360
+ ]);
361
+ };
362
+ }
363
+ });
364
+ const _hoisted_1$c = ["tabindex", "onClick"];
365
+ const _hoisted_2$8 = { class: "flex items-center" };
366
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
367
+ __name: "InvoiceCommitment",
368
+ props: {
369
+ commitments: {},
370
+ groupOrder: {},
371
+ invoicePeriodOrder: {},
372
+ processingOnlyCustomers: {},
373
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
374
+ },
375
+ setup(__props) {
376
+ const intl = useIntl();
377
+ const { getIsOpen, toggle } = useToggleList();
378
+ const toggleLine = (groupOrder, invoiceLineOrder) => {
379
+ toggle(formatIndex(groupOrder, invoiceLineOrder));
380
+ };
381
+ const formatIndex = (rootIndex, index) => `${rootIndex}-line-${index}`;
382
+ const getLineDescription = (line) => {
383
+ var _a;
384
+ return line.description ?? ((_a = line.details) == null ? void 0 : _a.description) ?? intl.$t({
385
+ id: "generic.not_available",
386
+ defaultMessage: "N/A",
387
+ description: "Used in scenarios where no data is available to be displayed"
388
+ });
389
+ };
390
+ return (_ctx, _cache) => {
391
+ return openBlock(), createBlock(InvoiceTable, null, {
392
+ default: withCtx(() => [
393
+ createElementVNode("tr", null, [
394
+ createVNode(_sfc_main$h, {
395
+ left: "",
396
+ colspan: "5"
397
+ }, {
398
+ default: withCtx(() => [
399
+ createTextVNode(toDisplayString(unref(intl).$t({
400
+ id: "invoice.table_header.unit",
401
+ defaultMessage: "Unit",
402
+ description: "Table header for the column containing the number of units of invoice groups"
403
+ })), 1)
404
+ ]),
405
+ _: 1
406
+ }),
407
+ createVNode(_sfc_main$h, {
408
+ right: "",
409
+ class: "w-60"
410
+ }, {
411
+ default: withCtx(() => [
412
+ createTextVNode(toDisplayString(unref(intl).$t({
413
+ id: "invoice.table_header.sub_total",
414
+ defaultMessage: "Subtotal",
415
+ description: "Table header for the column containing the subtotal for invoices"
416
+ })), 1)
417
+ ]),
418
+ _: 1
419
+ })
420
+ ]),
421
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.commitments, (line, lineIndex) => {
422
+ return openBlock(), createElementBlock(Fragment, { key: lineIndex }, [
423
+ createElementVNode("tr", {
424
+ class: normalizeClass(["border-t", { "cursor-pointer": line.sub_lines }]),
425
+ tabindex: line.sub_lines ? 0 : void 0,
426
+ onClick: ($event) => toggleLine(__props.groupOrder, line["line_order"])
427
+ }, [
428
+ createVNode(_sfc_main$i, { colspan: "2" }, {
429
+ default: withCtx(() => {
430
+ var _a;
431
+ return [
432
+ line.sub_lines ? (openBlock(), createBlock(_sfc_main$n, {
433
+ key: 0,
434
+ icon: "keyboard_arrow_down",
435
+ size: "md",
436
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", {
437
+ "-rotate-90": !unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"]))
438
+ }])
439
+ }, null, 8, ["class"])) : createCommentVNode("", true),
440
+ createElementVNode("div", _hoisted_2$8, [
441
+ renderSlot(_ctx.$slots, "invoice-line-prefix", {
442
+ lineOrder: line.line_order,
443
+ periodOrder: __props.invoicePeriodOrder,
444
+ groupOrder: __props.groupOrder
445
+ }),
446
+ createVNode(_sfc_main$e, {
447
+ "clause-type": "COMMITMENT",
448
+ "invoice-line-description": getLineDescription(line),
449
+ "price-details-band": (_a = line.details) == null ? void 0 : _a.band
450
+ }, null, 8, ["invoice-line-description", "price-details-band"])
451
+ ])
452
+ ];
453
+ }),
454
+ _: 2
455
+ }, 1024),
456
+ createVNode(_sfc_main$i, { colspan: "3" }, {
457
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
458
+ createTextVNode(" ", -1)
459
+ ])]),
460
+ _: 1
461
+ }),
462
+ createVNode(_sfc_main$i, { number: "" }, {
463
+ default: withCtx(() => {
464
+ var _a, _b;
465
+ return [
466
+ ((_a = line.details) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$l, {
467
+ key: 0,
468
+ value: (_b = line.details) == null ? void 0 : _b.amount,
469
+ "data-testid": unref(SUMMARY_LINE_AMOUNT)
470
+ }, null, 8, ["value", "data-testid"])) : createCommentVNode("", true)
471
+ ];
472
+ }),
473
+ _: 2
474
+ }, 1024)
475
+ ], 10, _hoisted_1$c),
476
+ createVNode(_sfc_main$g, {
477
+ ref_for: true,
478
+ ref: formatIndex(__props.groupOrder, line["line_order"]),
479
+ "sub-lines": line.sub_lines ?? [],
480
+ "line-order": line["line_order"],
481
+ "period-order": __props.invoicePeriodOrder,
482
+ "group-order": __props.groupOrder,
483
+ "is-open": unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"])),
484
+ "processing-only-customers": __props.processingOnlyCustomers,
485
+ "display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
486
+ }, null, 8, ["sub-lines", "line-order", "period-order", "group-order", "is-open", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
487
+ ], 64);
488
+ }), 128))
489
+ ]),
490
+ _: 3
491
+ });
492
+ };
493
+ }
494
+ });
495
+ const _hoisted_1$b = ["tabindex", "onClick"];
496
+ const _hoisted_2$7 = { class: "flex items-center" };
497
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
498
+ __name: "InvoiceDiscountMarkup",
499
+ props: {
500
+ lines: {},
501
+ type: {},
502
+ handleToggleItems: { type: Function },
503
+ formatIndex: { type: Function },
504
+ expandedItems: {},
505
+ isExpandable: { type: Boolean },
506
+ invoicePeriodOrder: {},
507
+ groupOrder: {},
508
+ processingOnlyCustomers: {},
509
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
510
+ },
511
+ setup(__props) {
512
+ const intl = useIntl();
513
+ const { getIsOpen, toggle } = useToggleList();
514
+ const toggleLine = (groupOrder, invoiceLineOrder) => {
515
+ toggle(formatIndex(groupOrder, invoiceLineOrder));
516
+ };
517
+ const formatIndex = (rootIndex, index) => `${rootIndex}-line-${index}`;
518
+ return (_ctx, _cache) => {
519
+ return openBlock(), createBlock(InvoiceTable, null, {
520
+ default: withCtx(() => [
521
+ createElementVNode("tr", null, [
522
+ createVNode(_sfc_main$h, {
523
+ left: "",
524
+ class: "w-3/5"
525
+ }, {
526
+ default: withCtx(() => [
527
+ createTextVNode(toDisplayString(unref(intl).$t({
528
+ id: "invoice.table_header.quantity",
529
+ defaultMessage: "Quantity",
530
+ description: "Table header for quantity column"
531
+ })), 1)
532
+ ]),
533
+ _: 1
534
+ }),
535
+ createVNode(_sfc_main$h, { colspan: "2" }, {
536
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
537
+ createTextVNode(" ", -1)
538
+ ])]),
539
+ _: 1
540
+ }),
541
+ createVNode(_sfc_main$h, {
542
+ left: "",
543
+ class: "w-1/5"
544
+ }, {
545
+ default: withCtx(() => [
546
+ createTextVNode(toDisplayString(__props.type === "DISCOUNT" ? unref(intl).$t({
547
+ id: "invoice.table_header.discount",
548
+ defaultMessage: "Discount",
549
+ description: "Table header for discount column"
550
+ }) : unref(intl).$t({
551
+ id: "invoice.table_header.markup",
552
+ defaultMessage: "Markup",
553
+ description: "Table header for markup column"
554
+ })), 1)
555
+ ]),
556
+ _: 1
557
+ }),
558
+ createVNode(_sfc_main$h, {
559
+ left: "",
560
+ class: "w-1/5"
561
+ }, {
562
+ default: withCtx(() => [
563
+ createTextVNode(toDisplayString(__props.type === "DISCOUNT" ? unref(intl).$t({
564
+ id: "invoice.table_header.total",
565
+ defaultMessage: "Total",
566
+ description: "Table header for total column"
567
+ }) : " "), 1)
568
+ ]),
569
+ _: 1
570
+ }),
571
+ createVNode(_sfc_main$h, {
572
+ right: "",
573
+ class: "w-1/5"
574
+ }, {
575
+ default: withCtx(() => [
576
+ createTextVNode(toDisplayString(unref(intl).$t({
577
+ id: "invoice.table_header.sub_total",
578
+ defaultMessage: "Subtotal",
579
+ description: "Table header for the column containing the subtotal for invoices"
580
+ })), 1)
581
+ ]),
582
+ _: 1
583
+ })
584
+ ]),
585
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.lines, (line, lineIndex) => {
586
+ return openBlock(), createElementBlock(Fragment, { key: lineIndex }, [
587
+ createElementVNode("tr", {
588
+ class: normalizeClass(["border-t", { "cursor-pointer": __props.isExpandable }]),
589
+ tabindex: __props.isExpandable ? 0 : void 0,
590
+ onClick: ($event) => toggleLine(__props.groupOrder, line["line_order"])
591
+ }, [
592
+ createVNode(_sfc_main$i, { class: "w-3/5" }, {
593
+ default: withCtx(() => {
594
+ var _a, _b;
595
+ return [
596
+ line.sub_lines ? (openBlock(), createBlock(_sfc_main$n, {
597
+ key: 0,
598
+ icon: "keyboard_arrow_down",
599
+ size: "md",
600
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", {
601
+ "-rotate-90": !unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"]))
602
+ }])
603
+ }, null, 8, ["class"])) : createCommentVNode("", true),
604
+ createElementVNode("div", _hoisted_2$7, [
605
+ renderSlot(_ctx.$slots, "invoice-line-prefix", {
606
+ lineOrder: line.line_order,
607
+ periodOrder: __props.invoicePeriodOrder,
608
+ groupOrder: __props.groupOrder
609
+ }),
610
+ line.description ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
611
+ createTextVNode(toDisplayString(line.description), 1)
612
+ ], 64)) : ((_a = line.details) == null ? void 0 : _a.description) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
613
+ createTextVNode(toDisplayString((_b = line.details) == null ? void 0 : _b.description), 1)
614
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
615
+ createTextVNode("N/A")
616
+ ], 64))
617
+ ])
618
+ ];
619
+ }),
620
+ _: 2
621
+ }, 1024),
622
+ createVNode(_sfc_main$i, { colspan: "2" }, {
623
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [
624
+ createTextVNode(" ", -1)
625
+ ])]),
626
+ _: 1
627
+ }),
628
+ createVNode(_sfc_main$i, { class: "w-1/5 tabular-nums" }, {
629
+ default: withCtx(() => {
630
+ var _a, _b, _c;
631
+ return [
632
+ createTextVNode(toDisplayString(((_b = (_a = line.details) == null ? void 0 : _a.band) == null ? void 0 : _b.percentage) ? `${(_c = line.details) == null ? void 0 : _c.band.percentage}%` : " "), 1)
633
+ ];
634
+ }),
635
+ _: 2
636
+ }, 1024),
637
+ createVNode(_sfc_main$i, { class: "w-1/5" }, {
638
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [
639
+ createTextVNode(" ", -1)
640
+ ])]),
641
+ _: 1
642
+ }),
643
+ createVNode(_sfc_main$i, {
644
+ number: "",
645
+ class: "w-1/5"
646
+ }, {
647
+ default: withCtx(() => {
648
+ var _a;
649
+ return [
650
+ ((_a = line.details) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$l, {
651
+ key: 0,
652
+ value: line.details.amount,
653
+ "data-testid": unref(SUMMARY_LINE_AMOUNT)
654
+ }, null, 8, ["value", "data-testid"])) : createCommentVNode("", true)
655
+ ];
656
+ }),
657
+ _: 2
658
+ }, 1024)
659
+ ], 10, _hoisted_1$b),
660
+ createVNode(_sfc_main$g, {
661
+ ref_for: true,
662
+ ref: formatIndex(__props.groupOrder, line["line_order"]),
663
+ "sub-lines": line.sub_lines ?? [],
664
+ "line-order": line["line_order"],
665
+ "is-open": unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"])),
666
+ "period-order": __props.invoicePeriodOrder,
667
+ "group-order": __props.groupOrder,
668
+ "processing-only-customers": __props.processingOnlyCustomers,
669
+ "display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
670
+ }, null, 8, ["sub-lines", "line-order", "is-open", "period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
671
+ ], 64);
672
+ }), 128))
673
+ ]),
674
+ _: 3
675
+ });
676
+ };
677
+ }
678
+ });
679
+ const getInvoiceGroupAmountType = (group) => {
680
+ var _a;
681
+ return ((_a = group.lines) == null ? void 0 : _a.some((line) => !!line.sub_lines)) ? HAS_SUBLINES : void 0;
682
+ };
683
+ const _hoisted_1$a = ["tabindex"];
684
+ const _hoisted_2$6 = { key: 0 };
685
+ const _hoisted_3$5 = {
686
+ colspan: "2",
687
+ class: "p-0"
688
+ };
689
+ const _hoisted_4$5 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
690
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
691
+ __name: "InvoiceGroupCommitment",
692
+ props: {
693
+ group: {},
694
+ expandedItems: {},
695
+ handleToggleItems: { type: Function },
696
+ formatIndex: { type: Function },
697
+ invoicePeriodOrder: {},
698
+ groupOrder: {},
699
+ isExpandable: { type: Boolean },
700
+ forceExpanded: { type: Boolean },
701
+ amountType: {},
702
+ processingOnlyCustomers: {},
703
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
704
+ showTaxPerLineItem: { type: Boolean }
705
+ },
706
+ setup(__props) {
707
+ const intl = useIntl();
708
+ return (_ctx, _cache) => {
709
+ return openBlock(), createElementBlock(Fragment, null, [
710
+ createElementVNode("tr", {
711
+ class: normalizeClass(["border-t break-inside-avoid", { "cursor-pointer": __props.isExpandable }]),
712
+ tabindex: __props.isExpandable ? 0 : void 0,
713
+ onClick: _cache[0] || (_cache[0] = ($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))),
714
+ onKeyup: [
715
+ _cache[1] || (_cache[1] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["enter"])),
716
+ _cache[2] || (_cache[2] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["space"]))
717
+ ]
718
+ }, [
719
+ createVNode(_sfc_main$i, { class: "p-0" }, {
720
+ default: withCtx(() => [
721
+ __props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
722
+ key: 0,
723
+ icon: "keyboard_arrow_down",
724
+ size: "md",
725
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", {
726
+ "-rotate-90": !__props.expandedItems.includes(
727
+ __props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)
728
+ )
729
+ }])
730
+ }, null, 8, ["class"])) : createCommentVNode("", true),
731
+ createTextVNode(" " + toDisplayString(unref(intl).$t({
732
+ id: "invoice.commitment_heading",
733
+ defaultMessage: "Commitment",
734
+ description: "Heading used for commitment in invoice tables"
735
+ })), 1)
736
+ ]),
737
+ _: 1
738
+ }),
739
+ createVNode(_sfc_main$i, { number: "" }, {
740
+ default: withCtx(() => [
741
+ __props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$l, {
742
+ key: 0,
743
+ value: __props.group.amount_including_tax,
744
+ "data-testid": unref(INVOICE_PERIOD_TOTAL),
745
+ "data-type": unref(getInvoiceGroupAmountType)(__props.group)
746
+ }, null, 8, ["value", "data-testid", "data-type"])) : (openBlock(), createBlock(_sfc_main$l, {
747
+ key: 1,
748
+ value: __props.group.amount_excluding_tax,
749
+ "data-testid": unref(INVOICE_PERIOD_TOTAL),
750
+ "data-type": unref(getInvoiceGroupAmountType)(__props.group)
751
+ }, null, 8, ["value", "data-testid", "data-type"]))
752
+ ]),
753
+ _: 1
754
+ })
755
+ ], 42, _hoisted_1$a),
756
+ (__props.forceExpanded || __props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))) && __props.group.lines ? (openBlock(), createElementBlock("tr", _hoisted_2$6, [
757
+ createElementVNode("td", _hoisted_3$5, [
758
+ createElementVNode("div", _hoisted_4$5, [
759
+ createVNode(_sfc_main$d, {
760
+ commitments: __props.group.lines,
761
+ "format-index": __props.formatIndex,
762
+ "handle-toggle-items": __props.handleToggleItems,
763
+ "expanded-items": __props.expandedItems,
764
+ "is-expandable": __props.isExpandable,
765
+ "invoice-period-order": __props.invoicePeriodOrder,
766
+ "group-order": __props.groupOrder,
767
+ "processing-only-customers": __props.processingOnlyCustomers,
768
+ "display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
769
+ }, {
770
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
771
+ renderSlot(_ctx.$slots, "invoice-line-prefix", normalizeProps(guardReactiveProps(linePrefixProps)))
772
+ ]),
773
+ _: 3
774
+ }, 8, ["commitments", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
775
+ ])
776
+ ])
777
+ ])) : createCommentVNode("", true)
778
+ ], 64);
779
+ };
780
+ }
781
+ });
782
+ const _hoisted_1$9 = ["tabindex"];
783
+ const _hoisted_2$5 = { key: 0 };
784
+ const _hoisted_3$4 = {
785
+ colspan: "2",
786
+ class: "p-0"
787
+ };
788
+ const _hoisted_4$4 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
789
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
790
+ __name: "InvoiceGroupDiscountMarkup",
791
+ props: {
792
+ heading: {},
793
+ group: {},
794
+ expandedItems: {},
795
+ handleToggleItems: { type: Function },
796
+ formatIndex: { type: Function },
797
+ invoicePeriodOrder: {},
798
+ groupOrder: {},
799
+ isExpandable: { type: Boolean },
800
+ forceExpanded: { type: Boolean },
801
+ amountType: {},
802
+ processingOnlyCustomers: {},
803
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
804
+ showTaxPerLineItem: { type: Boolean }
805
+ },
806
+ setup(__props) {
807
+ return (_ctx, _cache) => {
808
+ return openBlock(), createElementBlock(Fragment, null, [
809
+ createElementVNode("tr", {
810
+ class: normalizeClass(["border-t break-inside-avoid", { "cursor-pointer": __props.isExpandable }]),
811
+ tabindex: __props.isExpandable ? 0 : void 0,
812
+ onClick: _cache[0] || (_cache[0] = ($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))),
813
+ onKeyup: [
814
+ _cache[1] || (_cache[1] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["enter"])),
815
+ _cache[2] || (_cache[2] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["space"]))
816
+ ]
817
+ }, [
818
+ createVNode(_sfc_main$i, { class: "p-0" }, {
819
+ default: withCtx(() => [
820
+ __props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
821
+ key: 0,
822
+ icon: "keyboard_arrow_down",
823
+ size: "md",
824
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", {
825
+ "-rotate-90": !__props.expandedItems.includes(
826
+ __props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)
827
+ )
828
+ }])
829
+ }, null, 8, ["class"])) : createCommentVNode("", true),
830
+ createTextVNode(" " + toDisplayString(__props.heading), 1)
831
+ ]),
832
+ _: 1
833
+ }),
834
+ createVNode(_sfc_main$i, { number: "" }, {
835
+ default: withCtx(() => [
836
+ __props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$l, {
837
+ key: 0,
838
+ value: __props.group.amount_including_tax,
839
+ "data-testid": unref(INVOICE_PERIOD_TOTAL),
840
+ "data-type": unref(getInvoiceGroupAmountType)(__props.group)
841
+ }, null, 8, ["value", "data-testid", "data-type"])) : (openBlock(), createBlock(_sfc_main$l, {
842
+ key: 1,
843
+ value: __props.group.amount_excluding_tax,
844
+ "data-testid": unref(INVOICE_PERIOD_TOTAL),
845
+ "data-type": unref(getInvoiceGroupAmountType)(__props.group)
846
+ }, null, 8, ["value", "data-testid", "data-type"]))
847
+ ]),
848
+ _: 1
849
+ })
850
+ ], 42, _hoisted_1$9),
851
+ (__props.forceExpanded || __props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))) && __props.group.lines ? (openBlock(), createElementBlock("tr", _hoisted_2$5, [
852
+ createElementVNode("td", _hoisted_3$4, [
853
+ createElementVNode("div", _hoisted_4$4, [
854
+ createVNode(_sfc_main$c, {
855
+ type: __props.group.type,
856
+ lines: __props.group.lines,
857
+ "format-index": __props.formatIndex,
858
+ "handle-toggle-items": __props.handleToggleItems,
859
+ "expanded-items": __props.expandedItems,
860
+ "is-expandable": __props.isExpandable,
861
+ "invoice-period-order": __props.invoicePeriodOrder,
862
+ "group-order": __props.groupOrder,
863
+ "processing-only-customers": __props.processingOnlyCustomers,
864
+ "display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
865
+ }, {
866
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
867
+ renderSlot(_ctx.$slots, "invoice-line-prefix", normalizeProps(guardReactiveProps(linePrefixProps)))
868
+ ]),
869
+ _: 3
870
+ }, 8, ["type", "lines", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
871
+ ])
872
+ ])
873
+ ])) : createCommentVNode("", true)
874
+ ], 64);
875
+ };
876
+ }
877
+ });
878
+ const getInvoiceGroupOriginalCustomerId = (group, isShowOriginalCustomerInvoiceLine) => {
879
+ if (!isShowOriginalCustomerInvoiceLine) {
880
+ return void 0;
881
+ }
882
+ return group.forwarded_from_customer_id;
883
+ };
884
+ const resolveInvoiceLineTierBounds = (band) => {
885
+ let lowerBound = { kind: "default" };
886
+ let topBound = { kind: "default" };
887
+ if (band.tier_lower_bound && "number" in band.tier_lower_bound) {
888
+ lowerBound = { kind: "number", value: +band.tier_lower_bound.number };
889
+ } else if (band.tier_lower_bound && "amount" in band.tier_lower_bound) {
890
+ const { quantity, currency } = band.tier_lower_bound.amount;
891
+ lowerBound = { kind: "amount", currency, quantity: quantity ?? 0 };
892
+ }
893
+ if (band.tier_top_bound && "number" in band.tier_top_bound) {
894
+ topBound = { kind: "number", value: +band.tier_top_bound.number };
895
+ } else if (band.tier_top_bound && "amount" in band.tier_top_bound) {
896
+ const { quantity, currency } = band.tier_top_bound.amount;
897
+ topBound = { kind: "amount", currency, quantity };
898
+ }
899
+ return { lowerBound, topBound };
900
+ };
901
+ const resolveInvoiceLineStatusLabel = (details) => {
902
+ var _a, _b, _c, _d;
903
+ switch (details == null ? void 0 : details.price_bound) {
904
+ case "BELOW_MINIMUM_AMOUNT":
905
+ return { kind: "band_minimum_amount", amount: (_a = details.band) == null ? void 0 : _a.minimum_amount };
906
+ case "NOT_HIT":
907
+ return { kind: "price_bound_within_bounds" };
908
+ case "ABOVE_MAXIMUM_AMOUNT":
909
+ return { kind: "price_bound_maximum_amount", amount: (_b = details.band) == null ? void 0 : _b.maximum_amount };
910
+ case "BELOW_MINIMUM_NUMBER":
911
+ return { kind: "band_minimum_number", value: (_c = details.band) == null ? void 0 : _c.minimum_number };
912
+ case "ABOVE_MAXIMUM_NUMBER":
913
+ return { kind: "band_maximum_number", value: (_d = details.band) == null ? void 0 : _d.maximum_number };
914
+ default:
915
+ return { kind: "none" };
916
+ }
917
+ };
918
+ const _hoisted_1$8 = { class: "items-left flex flex-col gap-1 leading-none" };
919
+ const _hoisted_2$4 = { class: "flex items-center" };
920
+ const _hoisted_3$3 = {
921
+ key: 0,
922
+ class: "ml-1 text-xs text-secondary"
923
+ };
924
+ const _hoisted_4$3 = { key: 0 };
925
+ const _hoisted_5$2 = {
926
+ key: 1,
927
+ class: "text-xs text-secondary"
928
+ };
929
+ const _hoisted_6$2 = {
930
+ key: 2,
931
+ class: "text-xs text-secondary"
932
+ };
933
+ const _hoisted_7$2 = { class: "text-[9pt] text-secondary" };
934
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
935
+ __name: "InvoiceLineRow",
936
+ props: {
937
+ data: {},
938
+ isLast: { type: Boolean },
939
+ periodOrder: {},
940
+ groupOrder: {},
941
+ groupType: {},
942
+ isExpanded: { type: Boolean }
943
+ },
944
+ setup(__props) {
945
+ const { $t, formatNumber } = useIntl();
946
+ const props = __props;
947
+ const formatTierBound = (bound) => {
948
+ if (bound.kind === "default") return void 0;
949
+ if (bound.kind === "number") return formatNumber(bound.value);
950
+ return `${bound.currency} ${bound.quantity}`;
951
+ };
952
+ const formattedTier = (band) => {
953
+ if (!band) return "";
954
+ const { lowerBound, topBound } = resolveInvoiceLineTierBounds(band);
955
+ const formattedTopBound = formatTierBound(topBound);
956
+ return (formatTierBound(lowerBound) ?? "0") + (formattedTopBound ? ` - ${formattedTopBound}` : "+");
957
+ };
958
+ const includedVolumeDetails = computed(() => {
959
+ var _a;
960
+ return (_a = props.data.details) == null ? void 0 : _a.included_volume_details;
961
+ });
962
+ const statusLabel = computed(() => resolveInvoiceLineStatusLabel(props.data.details));
963
+ const invoiceLineName = computed(() => {
964
+ var _a, _b;
965
+ if ((_a = props.data) == null ? void 0 : _a.product_items) {
966
+ return getComposedString(props.data.product_items.map((item) => item.name));
967
+ }
968
+ return ((_b = props.data) == null ? void 0 : _b.description) ?? "N/A";
969
+ });
970
+ return (_ctx, _cache) => {
971
+ return openBlock(), createElementBlock(Fragment, null, [
972
+ createVNode(_sfc_main$i, { class: "align-top" }, {
973
+ default: withCtx(() => {
974
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
975
+ return [
976
+ createElementVNode("div", _hoisted_1$8, [
977
+ createElementVNode("div", null, [
978
+ __props.data.sub_lines ? (openBlock(), createBlock(_sfc_main$n, {
979
+ key: 0,
980
+ icon: "keyboard_arrow_down",
981
+ size: "md",
982
+ class: normalizeClass(["absolute -translate-x-7 -translate-y-2 text-slate-400", {
983
+ "-rotate-90": !__props.isExpanded
984
+ }])
985
+ }, null, 8, ["class"])) : createCommentVNode("", true),
986
+ createElementVNode("div", _hoisted_2$4, [
987
+ renderSlot(_ctx.$slots, "invoice-line-prefix", {
988
+ lineOrder: __props.data.line_order,
989
+ periodOrder: __props.periodOrder,
990
+ groupOrder: __props.groupOrder
991
+ }),
992
+ ["PRICING", "REVENUE", "ONE_OFF"].includes(__props.data.type) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
993
+ createTextVNode(toDisplayString(invoiceLineName.value) + " ", 1),
994
+ __props.data.type === "ONE_OFF" && __props.groupType !== "ONE_OFF" ? (openBlock(), createElementBlock("div", _hoisted_3$3, toDisplayString(unref(formatEnum)(__props.data.type)), 1)) : createCommentVNode("", true)
995
+ ], 64)) : (openBlock(), createBlock(_sfc_main$e, {
996
+ key: 1,
997
+ "invoice-line-description": invoiceLineName.value,
998
+ "clause-type": __props.data.type,
999
+ "price-details-band": (_a = __props.data.details) == null ? void 0 : _a.band
1000
+ }, null, 8, ["invoice-line-description", "clause-type", "price-details-band"]))
1001
+ ])
1002
+ ]),
1003
+ ["TIERED", "STAIR_STEP", "TOP_TIERED"].includes(__props.data.pricing_type) && !includedVolumeDetails.value && ((_b = __props.data.details) == null ? void 0 : _b.band) ? (openBlock(), createElementBlock("div", _hoisted_4$3, toDisplayString(formattedTier((_c = __props.data.details) == null ? void 0 : _c.band)), 1)) : createCommentVNode("", true),
1004
+ ((_e = (_d = __props.data.details) == null ? void 0 : _d.split_pricing) == null ? void 0 : _e.meter_properties) ? (openBlock(), createElementBlock("span", _hoisted_5$2, [
1005
+ (openBlock(true), createElementBlock(Fragment, null, renderList((_g = (_f = __props.data.details) == null ? void 0 : _f.split_pricing) == null ? void 0 : _g.meter_properties, (meterProperty, index) => {
1006
+ return openBlock(), createElementBlock(Fragment, null, [
1007
+ createTextVNode(toDisplayString(meterProperty.meter_property.name) + ": " + toDisplayString(meterProperty.value), 1),
1008
+ index < __props.data.details.split_pricing.meter_properties.length - 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1009
+ createTextVNode(toDisplayString(", "))
1010
+ ], 64)) : createCommentVNode("", true)
1011
+ ], 64);
1012
+ }), 256))
1013
+ ])) : createCommentVNode("", true),
1014
+ ((_h = __props.data.conditions) == null ? void 0 : _h.name) || ((_i = __props.data.conditions) == null ? void 0 : _i.meter_properties) ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
1015
+ __props.data.conditions.name ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1016
+ createTextVNode(toDisplayString(__props.data.conditions.name), 1)
1017
+ ], 64)) : __props.data.conditions.meter_properties ? (openBlock(), createBlock(unref(_sfc_main$k), {
1018
+ key: 1,
1019
+ comparators: __props.data.conditions.meter_properties
1020
+ }, null, 8, ["comparators"])) : createCommentVNode("", true)
1021
+ ])) : createCommentVNode("", true)
1022
+ ]),
1023
+ createElementVNode("span", _hoisted_7$2, [
1024
+ statusLabel.value.kind === "band_minimum_amount" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1025
+ createTextVNode(toDisplayString(unref($t)({
1026
+ id: "invoice.line.band_minimum_amount",
1027
+ defaultMessage: "Band minimum amount",
1028
+ description: "Minimum amount specified in a band"
1029
+ })) + " ", 1),
1030
+ statusLabel.value.amount ? (openBlock(), createBlock(_sfc_main$l, {
1031
+ key: 0,
1032
+ value: statusLabel.value.amount
1033
+ }, null, 8, ["value"])) : createCommentVNode("", true)
1034
+ ], 64)) : statusLabel.value.kind === "price_bound_within_bounds" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1035
+ createTextVNode(toDisplayString(unref($t)({
1036
+ id: "invoice.line.price_bound_within_bounds",
1037
+ defaultMessage: "Within bounds",
1038
+ description: "Label used when min and max bounds are specified but reached"
1039
+ })), 1)
1040
+ ], 64)) : statusLabel.value.kind === "price_bound_maximum_amount" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1041
+ createTextVNode(toDisplayString(unref($t)({
1042
+ id: "invoice.line.price_bound_maximum_amount",
1043
+ defaultMessage: "Maximum amount",
1044
+ description: "Maximum amount specified in a band"
1045
+ })) + " ", 1),
1046
+ statusLabel.value.amount ? (openBlock(), createBlock(_sfc_main$l, {
1047
+ key: 0,
1048
+ value: statusLabel.value.amount
1049
+ }, null, 8, ["value"])) : createCommentVNode("", true)
1050
+ ], 64)) : statusLabel.value.kind === "band_minimum_number" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
1051
+ createTextVNode(toDisplayString(unref($t)({
1052
+ id: "invoice.line.band_minimum_number",
1053
+ defaultMessage: "Minimum number",
1054
+ description: "Minimum number of units specified in a band"
1055
+ })) + " " + toDisplayString(statusLabel.value.value), 1)
1056
+ ], 64)) : statusLabel.value.kind === "band_maximum_number" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1057
+ createTextVNode(toDisplayString(unref($t)({
1058
+ id: "invoice.line.band_maximum_number",
1059
+ defaultMessage: "Maximum number",
1060
+ description: "Maximum number of units specified in a band"
1061
+ })) + " " + toDisplayString(statusLabel.value.value), 1)
1062
+ ], 64)) : createCommentVNode("", true)
1063
+ ])
1064
+ ];
1065
+ }),
1066
+ _: 3
1067
+ }),
1068
+ renderSlot(_ctx.$slots, "line-content", {
1069
+ details: __props.data.details
1070
+ })
1071
+ ], 64);
1072
+ };
1073
+ }
1074
+ });
1075
+ const resolveInvoiceRowQuantity = (pricingType, details, preferConversionCredits) => {
1076
+ var _a, _b;
1077
+ if (pricingType === "PASS_THROUGH") return { kind: "hidden" };
1078
+ if (preferConversionCredits && ((_b = (_a = details == null ? void 0 : details.conversion) == null ? void 0 : _a.credits) == null ? void 0 : _b.quantity)) {
1079
+ return { kind: "conversion-credits", value: details.conversion.credits.quantity };
1080
+ }
1081
+ if (details == null ? void 0 : details.price_bound) {
1082
+ const { price_bound: priceBound, meter_value: meterValue, band } = details;
1083
+ if (priceBound === "BELOW_MINIMUM_AMOUNT" || priceBound === "ABOVE_MAXIMUM_AMOUNT") {
1084
+ return { kind: "raw", value: meterValue.count };
1085
+ }
1086
+ if (priceBound === "NOT_HIT" && "amount" in meterValue && meterValue.amount) {
1087
+ return { kind: "amount", amount: meterValue.amount };
1088
+ }
1089
+ if (priceBound === "NOT_HIT" && "number" in meterValue && meterValue.number) {
1090
+ return { kind: "raw", value: meterValue.number };
1091
+ }
1092
+ if (priceBound === "RATIO" && meterValue.number) {
1093
+ return { kind: "number", value: +meterValue.number };
1094
+ }
1095
+ if (priceBound === "BELOW_MINIMUM_NUMBER" && (band == null ? void 0 : band.minimum_number)) {
1096
+ return { kind: "number", value: +band.minimum_number };
1097
+ }
1098
+ if (priceBound === "ABOVE_MAXIMUM_NUMBER" && (band == null ? void 0 : band.maximum_number)) {
1099
+ return { kind: "number", value: +band.maximum_number };
1100
+ }
1101
+ return { kind: "hidden" };
1102
+ }
1103
+ if ((details == null ? void 0 : details.meter_value) && "number" in details.meter_value) {
1104
+ return { kind: "number", value: +details.meter_value.number };
1105
+ }
1106
+ if ((details == null ? void 0 : details.meter_value) && "amount" in details.meter_value) {
1107
+ return { kind: "amount", amount: details.meter_value.amount };
1108
+ }
1109
+ return { kind: "one" };
1110
+ };
1111
+ const BOUNDED_NUMBER_PRICE_BOUNDS = ["NOT_HIT", "BELOW_MINIMUM_NUMBER", "ABOVE_MAXIMUM_NUMBER"];
1112
+ const resolveInvoiceRowPrice = (pricingType, details, modelType) => {
1113
+ if (pricingType === "PASS_THROUGH") return { kind: "pass-through" };
1114
+ if (details == null ? void 0 : details.price_bound) {
1115
+ const { price_bound: priceBound, band: band2, amount: amount2 } = details;
1116
+ if (priceBound === "BELOW_MINIMUM_AMOUNT" && (band2 == null ? void 0 : band2.minimum_amount)) {
1117
+ return { kind: "amount", amount: band2.minimum_amount };
1118
+ }
1119
+ if (priceBound === "ABOVE_MAXIMUM_AMOUNT" && (band2 == null ? void 0 : band2.maximum_amount)) {
1120
+ return { kind: "amount", amount: band2.maximum_amount };
1121
+ }
1122
+ if (priceBound === "RATIO") {
1123
+ const perSeatAmount = modelType === "PER_SEAT" ? band2 == null ? void 0 : band2.amount : void 0;
1124
+ return { kind: "amount", amount: perSeatAmount ?? amount2, suffix: { kind: "tier-top-bound" } };
1125
+ }
1126
+ if (BOUNDED_NUMBER_PRICE_BOUNDS.includes(priceBound)) {
1127
+ if (band2 && band2.amount) {
1128
+ return { kind: "amount", amount: band2.amount };
1129
+ }
1130
+ if (band2 && "percentage" in band2) {
1131
+ return { kind: "percentage", value: band2.percentage };
1132
+ }
1133
+ if (band2 && amount2) {
1134
+ return { kind: "amount", amount: amount2, suffix: { kind: "fixed-amount" } };
1135
+ }
1136
+ }
1137
+ return { kind: "hidden" };
1138
+ }
1139
+ const band = details == null ? void 0 : details.band;
1140
+ const amount = details == null ? void 0 : details.amount;
1141
+ if (band && band.amount) {
1142
+ return { kind: "amount", amount: band.amount, suffix: { kind: "block-size-or-per-unit" } };
1143
+ }
1144
+ if (band && "percentage" in band) {
1145
+ return { kind: "percentage", value: band.percentage };
1146
+ }
1147
+ if (band && amount) {
1148
+ if (pricingType === "STAIR_STEP" || pricingType === "STAIR_STEP_TOP_UP") {
1149
+ return { kind: "amount", amount, suffix: { kind: "fixed-amount" } };
1150
+ }
1151
+ if (pricingType === "TOP_TIERED") {
1152
+ return { kind: "amount", amount, suffix: { kind: "per-unit" } };
1153
+ }
1154
+ if (pricingType === "FLAT") {
1155
+ return { kind: "amount", amount, suffix: { kind: "flat-fee" } };
1156
+ }
1157
+ return { kind: "amount", amount };
1158
+ }
1159
+ return { kind: "hidden" };
1160
+ };
1161
+ const _hoisted_1$7 = {
1162
+ key: 5,
1163
+ class: "text-xs text-secondary"
1164
+ };
1165
+ const _hoisted_2$3 = {
1166
+ key: 1,
1167
+ class: "tabular-nums"
1168
+ };
1169
+ const _hoisted_3$2 = {
1170
+ key: 0,
1171
+ class: "text-2xs text-secondary"
1172
+ };
1173
+ const _hoisted_4$2 = {
1174
+ key: 1,
1175
+ class: "text-2xs text-secondary"
1176
+ };
1177
+ const _hoisted_5$1 = {
1178
+ key: 0,
1179
+ class: "text-2xs text-secondary"
1180
+ };
1181
+ const _hoisted_6$1 = {
1182
+ key: 1,
1183
+ class: "text-2xs text-secondary"
1184
+ };
1185
+ const _hoisted_7$1 = {
1186
+ key: 2,
1187
+ class: "text-2xs text-secondary"
1188
+ };
1189
+ const _hoisted_8$1 = {
1190
+ key: 3,
1191
+ class: "text-2xs text-secondary"
1192
+ };
1193
+ const _hoisted_9$1 = {
1194
+ key: 4,
1195
+ class: "text-2xs text-secondary"
1196
+ };
1197
+ const _hoisted_10$1 = { class: "text-2xs text-secondary" };
1198
+ const _hoisted_11$1 = {
1199
+ key: 0,
1200
+ class: "flex justify-end"
1201
+ };
1202
+ const _hoisted_12$1 = { class: "flex items-center justify-end gap-1" };
1203
+ const _hoisted_13$1 = {
1204
+ key: 0,
1205
+ class: "text-2xs tabular-nums text-secondary"
1206
+ };
1207
+ const _hoisted_14$1 = {
1208
+ key: 1,
1209
+ class: "inline-block"
1210
+ };
1211
+ const _hoisted_15$1 = { class: "flex items-center justify-end gap-1" };
1212
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1213
+ __name: "InvoiceRowContent",
1214
+ props: {
1215
+ pricingType: {},
1216
+ details: {},
1217
+ taxCategories: {},
1218
+ amountType: {},
1219
+ hideTaxDetails: { type: Boolean },
1220
+ modelType: {},
1221
+ showTaxPerLineItem: { type: Boolean, default: true },
1222
+ preferConversionCredits: { type: Boolean }
1223
+ },
1224
+ setup(__props) {
1225
+ const props = __props;
1226
+ const includedVolumeDetails = computed(() => {
1227
+ var _a;
1228
+ return (_a = props.details) == null ? void 0 : _a.included_volume_details;
1229
+ });
1230
+ const availableIncludedVolume = computed(
1231
+ () => {
1232
+ var _a;
1233
+ return (_a = includedVolumeDetails.value) == null ? void 0 : _a.available_included_volume;
1234
+ }
1235
+ );
1236
+ const quantityDisplay = computed(
1237
+ () => resolveInvoiceRowQuantity(props.pricingType, props.details, props.preferConversionCredits)
1238
+ );
1239
+ const priceDisplay = computed(
1240
+ () => resolveInvoiceRowPrice(props.pricingType, props.details, props.modelType)
1241
+ );
1242
+ const { $t, formatNumber } = useIntl();
1243
+ const fixedAmountLabel = computed(
1244
+ () => $t({
1245
+ id: "invoice.line.fixed_amount",
1246
+ defaultMessage: "Fixed amount",
1247
+ description: "Label shown when a price band charges a fixed amount regardless of usage"
1248
+ })
1249
+ );
1250
+ const flatFeeLabel = computed(
1251
+ () => $t({
1252
+ id: "invoice.line.flat_fee",
1253
+ defaultMessage: "Flat fee",
1254
+ description: "Label shown for a flat, usage-independent fee"
1255
+ })
1256
+ );
1257
+ const tierTopBoundNumber = computed(() => {
1258
+ var _a, _b;
1259
+ const tierTopBound = (_b = (_a = props.details) == null ? void 0 : _a.band) == null ? void 0 : _b.tier_top_bound;
1260
+ return tierTopBound && "number" in tierTopBound ? tierTopBound.number : void 0;
1261
+ });
1262
+ const tierTopBoundUnitsLabel = computed(() => {
1263
+ if (tierTopBoundNumber.value === void 0) return void 0;
1264
+ return $t(
1265
+ {
1266
+ id: "invoice.line.per_units_tier_top_bound",
1267
+ defaultMessage: "per {count, plural, one {unit} other {{formattedCount} units}}",
1268
+ description: "Number of units a tiered price band applies per. Singular form omits the count."
1269
+ },
1270
+ { count: +tierTopBoundNumber.value, formattedCount: tierTopBoundNumber.value }
1271
+ );
1272
+ });
1273
+ const perSeatAmount = computed(
1274
+ () => {
1275
+ var _a, _b;
1276
+ return props.modelType === "PER_SEAT" ? (_b = (_a = props.details) == null ? void 0 : _a.band) == null ? void 0 : _b.amount : void 0;
1277
+ }
1278
+ );
1279
+ const perUnitLabel = computed(
1280
+ () => props.modelType === "PER_SEAT" ? $t({
1281
+ id: "invoice.line.per_seat",
1282
+ defaultMessage: "Per seat",
1283
+ description: "Label shown when a price band applies per single seat"
1284
+ }) : $t({
1285
+ id: "invoice.line.per_unit",
1286
+ defaultMessage: "Per unit",
1287
+ description: "Label shown when a price band applies per single unit"
1288
+ })
1289
+ );
1290
+ const blockSizeNumber = computed(() => {
1291
+ var _a, _b;
1292
+ const blockSize = (_b = (_a = props.details) == null ? void 0 : _a.band) == null ? void 0 : _b.block_size;
1293
+ return blockSize && "number" in blockSize ? blockSize.number : void 0;
1294
+ });
1295
+ const blockSizeUnitsLabel = computed(() => {
1296
+ if (blockSizeNumber.value === void 0) return void 0;
1297
+ return $t(
1298
+ {
1299
+ id: "invoice.line.per_units_block_size",
1300
+ defaultMessage: "Per {count, plural, one {unit} other {{formattedCount} units}}",
1301
+ description: "Number of units a price band block applies per. Singular form omits the count."
1302
+ },
1303
+ {
1304
+ count: +blockSizeNumber.value,
1305
+ formattedCount: formatNumber(+blockSizeNumber.value)
1306
+ }
1307
+ );
1308
+ });
1309
+ return (_ctx, _cache) => {
1310
+ return openBlock(), createElementBlock(Fragment, null, [
1311
+ createVNode(_sfc_main$i, {
1312
+ number: "",
1313
+ class: "align-top"
1314
+ }, {
1315
+ default: withCtx(() => {
1316
+ var _a;
1317
+ return [
1318
+ quantityDisplay.value.kind === "raw" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1319
+ createTextVNode(toDisplayString(quantityDisplay.value.value), 1)
1320
+ ], 64)) : quantityDisplay.value.kind === "amount" ? (openBlock(), createBlock(_sfc_main$l, {
1321
+ key: 1,
1322
+ value: quantityDisplay.value.amount
1323
+ }, null, 8, ["value"])) : quantityDisplay.value.kind === "number" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1324
+ createTextVNode(toDisplayString(unref(formatNumber)(quantityDisplay.value.value)), 1)
1325
+ ], 64)) : quantityDisplay.value.kind === "conversion-credits" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
1326
+ createTextVNode(toDisplayString(unref(formatNumber)(+quantityDisplay.value.value, {
1327
+ maximumFractionDigits: unref(MAX_FRACTION_DIGITS)
1328
+ })), 1)
1329
+ ], 64)) : quantityDisplay.value.kind === "one" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1330
+ createTextVNode("1")
1331
+ ], 64)) : createCommentVNode("", true),
1332
+ quantityDisplay.value.kind !== "conversion-credits" && quantityDisplay.value.kind !== "hidden" && !((_a = __props.details) == null ? void 0 : _a.price_bound) && availableIncludedVolume.value ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
1333
+ availableIncludedVolume.value.type === "AMOUNT" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1334
+ createVNode(_sfc_main$l, {
1335
+ value: availableIncludedVolume.value.amount
1336
+ }, null, 8, ["value"]),
1337
+ createTextVNode(" " + toDisplayString(unref($t)({
1338
+ id: "invoice.line.included",
1339
+ defaultMessage: "included",
1340
+ description: "Used to specify an included amount. Should be lowercase."
1341
+ })), 1)
1342
+ ], 64)) : availableIncludedVolume.value.type === "NUMBER" ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(availableIncludedVolume.value.number) + " " + toDisplayString(unref($t)({
1343
+ id: "invoice.line.units_included",
1344
+ defaultMessage: "units included",
1345
+ description: "Used to specify an included units. Should be lowercase."
1346
+ })), 1)) : createCommentVNode("", true)
1347
+ ])) : createCommentVNode("", true)
1348
+ ];
1349
+ }),
1350
+ _: 1
1351
+ }),
1352
+ priceDisplay.value.kind === "pass-through" ? (openBlock(), createBlock(_sfc_main$i, {
1353
+ key: 0,
1354
+ class: "text-right align-top"
1355
+ }, {
1356
+ default: withCtx(() => [
1357
+ createTextVNode(toDisplayString(unref($t)({
1358
+ id: "invoice.line.pass_through",
1359
+ defaultMessage: "Pass through",
1360
+ description: "Name of the pass through pricing type"
1361
+ })), 1)
1362
+ ]),
1363
+ _: 1
1364
+ })) : (openBlock(), createBlock(_sfc_main$i, {
1365
+ key: 1,
1366
+ number: "",
1367
+ class: "align-top"
1368
+ }, {
1369
+ default: withCtx(() => {
1370
+ var _a, _b, _c, _d, _e;
1371
+ return [
1372
+ priceDisplay.value.kind === "amount" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1373
+ createVNode(_sfc_main$l, {
1374
+ value: priceDisplay.value.amount
1375
+ }, null, 8, ["value"]),
1376
+ ((_a = priceDisplay.value.suffix) == null ? void 0 : _a.kind) === "tier-top-bound" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1377
+ tierTopBoundUnitsLabel.value ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(tierTopBoundUnitsLabel.value), 1)) : perSeatAmount.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, toDisplayString(perUnitLabel.value), 1)) : createCommentVNode("", true)
1378
+ ], 64)) : ((_b = priceDisplay.value.suffix) == null ? void 0 : _b.kind) === "block-size-or-per-unit" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1379
+ blockSizeUnitsLabel.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, toDisplayString(blockSizeUnitsLabel.value), 1)) : __props.modelType !== "RECURRING" ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString(perUnitLabel.value), 1)) : createCommentVNode("", true)
1380
+ ], 64)) : ((_c = priceDisplay.value.suffix) == null ? void 0 : _c.kind) === "per-unit" ? (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString(perUnitLabel.value), 1)) : ((_d = priceDisplay.value.suffix) == null ? void 0 : _d.kind) === "fixed-amount" ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(fixedAmountLabel.value), 1)) : ((_e = priceDisplay.value.suffix) == null ? void 0 : _e.kind) === "flat-fee" ? (openBlock(), createElementBlock("div", _hoisted_9$1, toDisplayString(flatFeeLabel.value), 1)) : createCommentVNode("", true)
1381
+ ], 64)) : priceDisplay.value.kind === "percentage" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1382
+ createTextVNode(toDisplayString(priceDisplay.value.value) + "% ", 1)
1383
+ ], 64)) : createCommentVNode("", true)
1384
+ ];
1385
+ }),
1386
+ _: 1
1387
+ })),
1388
+ __props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$i, {
1389
+ key: 2,
1390
+ number: "",
1391
+ class: "align-top"
1392
+ }, {
1393
+ default: withCtx(() => [
1394
+ !__props.hideTaxDetails ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.taxCategories, (taxCategory, taxCategoryIndex) => {
1395
+ return openBlock(), createElementBlock("div", {
1396
+ key: taxCategoryIndex,
1397
+ class: "tabular-nums"
1398
+ }, [
1399
+ createElementVNode("div", null, toDisplayString(taxCategory.percentage) + "%", 1),
1400
+ createElementVNode("div", _hoisted_10$1, [
1401
+ createVNode(_sfc_main$l, {
1402
+ value: taxCategory.tax_amount
1403
+ }, null, 8, ["value"])
1404
+ ])
1405
+ ]);
1406
+ }), 128)) : createCommentVNode("", true)
1407
+ ]),
1408
+ _: 1
1409
+ })) : createCommentVNode("", true),
1410
+ createVNode(_sfc_main$i, {
1411
+ number: "",
1412
+ class: "align-top"
1413
+ }, {
1414
+ default: withCtx(() => {
1415
+ var _a, _b, _c, _d, _e;
1416
+ return [
1417
+ ((_b = (_a = __props.details) == null ? void 0 : _a.amount) == null ? void 0 : _b.currency) && ((_d = (_c = __props.details) == null ? void 0 : _c.amount) == null ? void 0 : _d.quantity) ? (openBlock(), createElementBlock("div", _hoisted_11$1, [
1418
+ __props.showTaxPerLineItem ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.taxCategories, (taxCategory, taxCategoryIndex) => {
1419
+ var _a2;
1420
+ return openBlock(), createElementBlock("div", {
1421
+ key: taxCategoryIndex,
1422
+ class: "inline-block"
1423
+ }, [
1424
+ createElementVNode("div", _hoisted_12$1, [
1425
+ createVNode(_sfc_main$l, {
1426
+ value: __props.details.amount,
1427
+ "data-testid": unref(SUMMARY_LINE_AMOUNT)
1428
+ }, null, 8, ["value", "data-testid"]),
1429
+ ((_a2 = __props.details) == null ? void 0 : _a2.pricing_amount.quantity) !== __props.details.amount.quantity ? (openBlock(), createBlock(_sfc_main$o, {
1430
+ key: 0,
1431
+ placement: "top-end"
1432
+ }, {
1433
+ tooltip: withCtx(() => [
1434
+ createVNode(TooltipContent, null, {
1435
+ default: withCtx(() => [
1436
+ createVNode(_sfc_main$p, null, {
1437
+ default: withCtx(() => [
1438
+ createTextVNode(toDisplayString(unref($t)({
1439
+ id: "invoice.line.original_currency",
1440
+ defaultMessage: "Original currency",
1441
+ description: "Original currency"
1442
+ })) + " ", 1),
1443
+ createVNode(_sfc_main$l, {
1444
+ value: __props.details.pricing_amount,
1445
+ class: "font-semibold"
1446
+ }, null, 8, ["value"])
1447
+ ]),
1448
+ _: 1
1449
+ })
1450
+ ]),
1451
+ _: 1
1452
+ })
1453
+ ]),
1454
+ default: withCtx(() => [
1455
+ createVNode(_sfc_main$n, {
1456
+ icon: "info",
1457
+ size: "2xs"
1458
+ })
1459
+ ]),
1460
+ _: 1
1461
+ })) : createCommentVNode("", true)
1462
+ ]),
1463
+ !__props.hideTaxDetails ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
1464
+ __props.amountType === "INCLUDING_TAX" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1465
+ createTextVNode(toDisplayString(unref($t)({
1466
+ id: "invoice.line.excl.tax",
1467
+ defaultMessage: "Excl. tax",
1468
+ description: "Value excludes tax"
1469
+ })) + " ", 1),
1470
+ createVNode(_sfc_main$l, {
1471
+ value: taxCategory.base_amount
1472
+ }, null, 8, ["value"])
1473
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1474
+ createTextVNode(toDisplayString(unref($t)({
1475
+ id: "invoice.line.incl.tax",
1476
+ defaultMessage: "Incl. tax",
1477
+ description: "Value includes tax"
1478
+ })) + " ", 1),
1479
+ createVNode(_sfc_main$l, {
1480
+ value: taxCategory.total_amount
1481
+ }, null, 8, ["value"])
1482
+ ], 64))
1483
+ ])) : createCommentVNode("", true)
1484
+ ]);
1485
+ }), 128)) : (openBlock(), createElementBlock("div", _hoisted_14$1, [
1486
+ createElementVNode("div", _hoisted_15$1, [
1487
+ createVNode(_sfc_main$l, {
1488
+ value: __props.details.amount,
1489
+ "data-testid": unref(SUMMARY_LINE_AMOUNT)
1490
+ }, null, 8, ["value", "data-testid"]),
1491
+ ((_e = __props.details) == null ? void 0 : _e.pricing_amount.quantity) !== __props.details.amount.quantity ? (openBlock(), createBlock(_sfc_main$o, {
1492
+ key: 0,
1493
+ placement: "top-end"
1494
+ }, {
1495
+ tooltip: withCtx(() => [
1496
+ createVNode(TooltipContent, null, {
1497
+ default: withCtx(() => [
1498
+ createVNode(_sfc_main$p, null, {
1499
+ default: withCtx(() => [
1500
+ createTextVNode(toDisplayString(unref($t)({
1501
+ id: "invoice.line.original_currency",
1502
+ defaultMessage: "Original currency",
1503
+ description: "Original currency"
1504
+ })) + " ", 1),
1505
+ createVNode(_sfc_main$l, {
1506
+ value: __props.details.pricing_amount,
1507
+ class: "font-semibold"
1508
+ }, null, 8, ["value"])
1509
+ ]),
1510
+ _: 1
1511
+ })
1512
+ ]),
1513
+ _: 1
1514
+ })
1515
+ ]),
1516
+ default: withCtx(() => [
1517
+ createVNode(_sfc_main$n, {
1518
+ icon: "info",
1519
+ size: "2xs"
1520
+ })
1521
+ ]),
1522
+ _: 1
1523
+ })) : createCommentVNode("", true)
1524
+ ])
1525
+ ])),
1526
+ renderSlot(_ctx.$slots, "one-off-line-context-menu")
1527
+ ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1528
+ createTextVNode("-")
1529
+ ], 64))
1530
+ ];
1531
+ }),
1532
+ _: 3
1533
+ })
1534
+ ], 64);
1535
+ };
1536
+ }
1537
+ });
1538
+ const _hoisted_1$6 = ["tabindex", "onClick"];
1539
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1540
+ __name: "InvoiceLineGroup",
1541
+ props: {
1542
+ group: {},
1543
+ startDate: {},
1544
+ endDate: {},
1545
+ total: {},
1546
+ amountType: {},
1547
+ invoicePeriodOrder: {},
1548
+ processingOnlyCustomers: {},
1549
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
1550
+ showTaxPerLineItem: { type: Boolean, default: true },
1551
+ isExpandable: { type: Boolean, default: true }
1552
+ },
1553
+ setup(__props) {
1554
+ const props = __props;
1555
+ const sortedLines = computed(
1556
+ () => {
1557
+ var _a;
1558
+ return (_a = [...props.group.lines ?? []]) == null ? void 0 : _a.sort((a, b) => a.line_order - b.line_order);
1559
+ }
1560
+ );
1561
+ const intl = useIntl();
1562
+ const { getIsOpen, toggle } = useToggleList();
1563
+ const toggleLine = (groupOrder, invoiceLineOrder) => {
1564
+ toggle(formatIndex(groupOrder, invoiceLineOrder));
1565
+ };
1566
+ const formatIndex = (rootIndex, index) => `${rootIndex}-line-${index}`;
1567
+ return (_ctx, _cache) => {
1568
+ return openBlock(), createElementBlock("div", null, [
1569
+ createVNode(InvoiceTable, null, {
1570
+ default: withCtx(() => [
1571
+ createElementVNode("tr", null, [
1572
+ createVNode(_sfc_main$h, {
1573
+ left: "",
1574
+ class: "w-1/5 text-secondary"
1575
+ }, {
1576
+ default: withCtx(() => [
1577
+ createTextVNode(toDisplayString(unref(intl).$t({
1578
+ id: "invoice.table_header.unit",
1579
+ defaultMessage: "Unit",
1580
+ description: "Table header for the column containing the number of units of invoice groups"
1581
+ })), 1)
1582
+ ]),
1583
+ _: 1
1584
+ }),
1585
+ createVNode(_sfc_main$h, {
1586
+ right: "",
1587
+ class: "w-1/5 text-secondary"
1588
+ }, {
1589
+ default: withCtx(() => [
1590
+ createTextVNode(toDisplayString(unref(intl).$t({
1591
+ id: "invoice.table_header.quantity",
1592
+ defaultMessage: "Quantity",
1593
+ description: "Table header for quantity column"
1594
+ })), 1)
1595
+ ]),
1596
+ _: 1
1597
+ }),
1598
+ createVNode(_sfc_main$h, {
1599
+ right: "",
1600
+ class: "w-1/5 text-secondary"
1601
+ }, {
1602
+ default: withCtx(() => [
1603
+ createTextVNode(toDisplayString(unref(intl).$t({
1604
+ id: "invoice.table_header.price",
1605
+ defaultMessage: "Price",
1606
+ description: "Table header for the column containing the number of units of invoice groups"
1607
+ })), 1)
1608
+ ]),
1609
+ _: 1
1610
+ }),
1611
+ __props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$h, {
1612
+ key: 0,
1613
+ right: "",
1614
+ class: "w-1/5 text-secondary"
1615
+ }, {
1616
+ default: withCtx(() => [
1617
+ createTextVNode(toDisplayString(unref(intl).$t({
1618
+ id: "invoice.table_header.tax_rate",
1619
+ defaultMessage: "Tax rate",
1620
+ description: "Table header for the column containing the tax percentage of invoice groups"
1621
+ })), 1)
1622
+ ]),
1623
+ _: 1
1624
+ })) : createCommentVNode("", true),
1625
+ createVNode(_sfc_main$h, {
1626
+ right: "",
1627
+ class: "w-1/5 text-secondary"
1628
+ }, {
1629
+ default: withCtx(() => [
1630
+ createTextVNode(toDisplayString(unref(intl).$t({
1631
+ id: "invoice.table_header.sub_total",
1632
+ defaultMessage: "Subtotal",
1633
+ description: "Table header for the column containing the subtotal for invoices"
1634
+ })), 1)
1635
+ ]),
1636
+ _: 1
1637
+ })
1638
+ ]),
1639
+ (openBlock(true), createElementBlock(Fragment, null, renderList(sortedLines.value, (line, i) => {
1640
+ return openBlock(), createElementBlock(Fragment, { key: i }, [
1641
+ createElementVNode("tr", {
1642
+ tabindex: __props.isExpandable && line.sub_lines ? 0 : void 0,
1643
+ class: normalizeClass(["group", {
1644
+ "cursor-pointer": __props.isExpandable && line.sub_lines,
1645
+ "border-t": i !== 0
1646
+ }]),
1647
+ onClick: ($event) => toggleLine(__props.group.group_order, line["line_order"])
1648
+ }, [
1649
+ (openBlock(), createBlock(_sfc_main$9, {
1650
+ key: i,
1651
+ data: line,
1652
+ "period-order": __props.invoicePeriodOrder,
1653
+ "group-order": __props.group.group_order,
1654
+ "is-last": i === sortedLines.value.length - 1,
1655
+ "group-type": __props.group.type,
1656
+ "is-expanded": unref(getIsOpen)(formatIndex(__props.group.group_order, line["line_order"]))
1657
+ }, {
1658
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
1659
+ renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
1660
+ ]),
1661
+ "line-content": withCtx((lineContentProps) => {
1662
+ var _a, _b;
1663
+ return [
1664
+ createVNode(_sfc_main$8, {
1665
+ details: lineContentProps.details,
1666
+ "pricing-type": line.pricing_type,
1667
+ "tax-categories": line.tax_categories,
1668
+ "amount-type": __props.amountType,
1669
+ "model-type": (_b = (_a = line.product_items) == null ? void 0 : _a[0]) == null ? void 0 : _b.model_type,
1670
+ "show-tax-per-line-item": __props.showTaxPerLineItem
1671
+ }, createSlots({ _: 2 }, [
1672
+ line.type === "ONE_OFF" ? {
1673
+ name: "one-off-line-context-menu",
1674
+ fn: withCtx((oneOffGroupProps) => [
1675
+ renderSlot(_ctx.$slots, "one-off-line-context-menu", mergeProps({ ref_for: true }, oneOffGroupProps, {
1676
+ lineOrder: line.line_order
1677
+ }))
1678
+ ]),
1679
+ key: "0"
1680
+ } : void 0
1681
+ ]), 1032, ["details", "pricing-type", "tax-categories", "amount-type", "model-type", "show-tax-per-line-item"])
1682
+ ];
1683
+ }),
1684
+ _: 2
1685
+ }, 1032, ["data", "period-order", "group-order", "is-last", "group-type", "is-expanded"]))
1686
+ ], 10, _hoisted_1$6),
1687
+ createVNode(_sfc_main$g, {
1688
+ ref_for: true,
1689
+ ref: formatIndex(__props.group.group_order, line["line_order"]),
1690
+ "sub-lines": line.sub_lines ?? [],
1691
+ "processing-only-customers": __props.processingOnlyCustomers,
1692
+ "display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer,
1693
+ "line-order": line["line_order"],
1694
+ "is-open": unref(getIsOpen)(formatIndex(__props.group.group_order, line["line_order"])),
1695
+ "period-order": __props.invoicePeriodOrder,
1696
+ "group-order": __props.group.group_order,
1697
+ "show-tax-per-line-item": __props.showTaxPerLineItem
1698
+ }, {
1699
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
1700
+ renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
1701
+ ]),
1702
+ "subline-content": withCtx((sublineContentProps) => {
1703
+ var _a, _b;
1704
+ return [
1705
+ createVNode(_sfc_main$8, {
1706
+ details: sublineContentProps.details,
1707
+ "hide-tax-details": sublineContentProps.hideTaxDetails,
1708
+ "prefer-conversion-credits": "",
1709
+ "pricing-type": line.pricing_type,
1710
+ "tax-categories": line.tax_categories,
1711
+ "amount-type": __props.amountType,
1712
+ "model-type": (_b = (_a = line.product_items) == null ? void 0 : _a[0]) == null ? void 0 : _b.model_type,
1713
+ "show-tax-per-line-item": __props.showTaxPerLineItem
1714
+ }, null, 8, ["details", "hide-tax-details", "pricing-type", "tax-categories", "amount-type", "model-type", "show-tax-per-line-item"])
1715
+ ];
1716
+ }),
1717
+ _: 2
1718
+ }, 1032, ["sub-lines", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer", "line-order", "is-open", "period-order", "group-order", "show-tax-per-line-item"])
1719
+ ], 64);
1720
+ }), 128))
1721
+ ]),
1722
+ _: 3
1723
+ })
1724
+ ]);
1725
+ };
1726
+ }
1727
+ });
1728
+ const _hoisted_1$5 = { class: "flex items-center" };
1729
+ const _hoisted_2$2 = {
1730
+ key: 2,
1731
+ class: "ml-1 inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-primary-100 text-2xs font-bold text-primary-600"
1732
+ };
1733
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1734
+ __name: "InvoiceTableRowLabel",
1735
+ props: {
1736
+ label: {},
1737
+ count: {}
1738
+ },
1739
+ setup(__props) {
1740
+ const labelElement = ref();
1741
+ const isLabelCutOff = ref(false);
1742
+ useResizeObserver(labelElement, ([entry]) => {
1743
+ isLabelCutOff.value = entry.target.clientWidth < entry.target.scrollWidth;
1744
+ });
1745
+ return (_ctx, _cache) => {
1746
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
1747
+ isLabelCutOff.value ? (openBlock(), createBlock(_sfc_main$o, {
1748
+ key: 0,
1749
+ placement: "bottom-start",
1750
+ class: "min-w-0 leading-normal"
1751
+ }, {
1752
+ tooltip: withCtx(() => [
1753
+ createVNode(TooltipContent, null, {
1754
+ default: withCtx(() => [
1755
+ createVNode(_sfc_main$p, null, {
1756
+ default: withCtx(() => [
1757
+ createTextVNode(toDisplayString(__props.label), 1)
1758
+ ]),
1759
+ _: 1
1760
+ })
1761
+ ]),
1762
+ _: 1
1763
+ })
1764
+ ]),
1765
+ default: withCtx(() => [
1766
+ createElementVNode("span", {
1767
+ ref_key: "labelElement",
1768
+ ref: labelElement,
1769
+ class: "block truncate"
1770
+ }, toDisplayString(__props.label), 513)
1771
+ ]),
1772
+ _: 1
1773
+ })) : (openBlock(), createElementBlock("span", {
1774
+ key: 1,
1775
+ ref_key: "labelElement",
1776
+ ref: labelElement,
1777
+ class: normalizeClass(["block", { truncate: __props.count !== void 0 }])
1778
+ }, toDisplayString(__props.label), 3)),
1779
+ __props.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
1780
+ ]);
1781
+ };
1782
+ }
1783
+ });
1784
+ const _hoisted_1$4 = ["tabindex"];
1785
+ const _hoisted_2$1 = { key: 0 };
1786
+ const _hoisted_3$1 = {
1787
+ colspan: "2",
1788
+ class: "p-0"
1789
+ };
1790
+ const _hoisted_4$1 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
1791
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1792
+ __name: "InvoiceGroupRevenue",
1793
+ props: {
1794
+ forwardedFromCustomers: {},
1795
+ showOriginalCustomerInvoiceLine: {},
1796
+ group: {},
1797
+ expandedItems: {},
1798
+ handleToggleItems: {},
1799
+ formatIndex: {},
1800
+ invoicePeriodOrder: {},
1801
+ groupOrder: {},
1802
+ isExpandable: { type: Boolean },
1803
+ forceExpanded: { type: Boolean },
1804
+ amountType: {},
1805
+ processingOnlyCustomers: {},
1806
+ displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
1807
+ showTaxPerLineItem: { type: Boolean, default: true }
1808
+ },
1809
+ setup(__props) {
1810
+ const props = __props;
1811
+ const label = computed(() => {
1812
+ var _a, _b, _c;
1813
+ const pricingAndProducts = [
1814
+ (_a = props.group.pricing) == null ? void 0 : _a.name,
1815
+ getComposedString(((_b = props.group.products) == null ? void 0 : _b.map((item) => item.name)) ?? [])
1816
+ ].filter(Boolean).join(" - ");
1817
+ const originalCustomerId = getInvoiceGroupOriginalCustomerId(
1818
+ props.group,
1819
+ !!props.showOriginalCustomerInvoiceLine
1820
+ );
1821
+ if (!originalCustomerId) {
1822
+ return pricingAndProducts;
1823
+ }
1824
+ const originalCustomer = (_c = props.forwardedFromCustomers) == null ? void 0 : _c.find(
1825
+ (customer) => customer.id === originalCustomerId
1826
+ );
1827
+ return [originalCustomer && getCustomerName(originalCustomer), pricingAndProducts].filter(Boolean).join(" - ");
1828
+ });
1829
+ return (_ctx, _cache) => {
1830
+ return openBlock(), createElementBlock(Fragment, null, [
1831
+ createElementVNode("tr", {
1832
+ class: normalizeClass(["border-t break-inside-avoid", { "cursor-pointer": __props.isExpandable }]),
1833
+ tabindex: __props.isExpandable ? 0 : void 0,
1834
+ onClick: _cache[0] || (_cache[0] = ($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))),
1835
+ onKeyup: [
1836
+ _cache[1] || (_cache[1] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["enter"])),
1837
+ _cache[2] || (_cache[2] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["space"]))
1838
+ ]
1839
+ }, [
1840
+ createVNode(_sfc_main$i, { class: "p-0" }, {
1841
+ default: withCtx(() => {
1842
+ var _a;
1843
+ return [
1844
+ __props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
1845
+ key: 0,
1846
+ icon: "keyboard_arrow_down",
1847
+ size: "md",
1848
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", {
1849
+ "-rotate-90": !__props.expandedItems.includes(
1850
+ __props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)
1851
+ )
1852
+ }])
1853
+ }, null, 8, ["class"])) : createCommentVNode("", true),
1854
+ createVNode(_sfc_main$6, {
1855
+ label: label.value,
1856
+ count: __props.isExpandable ? ((_a = __props.group.lines) == null ? void 0 : _a.length) ?? 0 : void 0
1857
+ }, null, 8, ["label", "count"])
1858
+ ];
1859
+ }),
1860
+ _: 1
1861
+ }),
1862
+ createVNode(_sfc_main$i, { number: "" }, {
1863
+ default: withCtx(() => [
1864
+ __props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$l, {
1865
+ key: 0,
1866
+ value: __props.group.amount_including_tax,
1867
+ "data-testid": unref(INVOICE_PERIOD_TOTAL),
1868
+ "data-type": unref(getInvoiceGroupAmountType)(__props.group)
1869
+ }, null, 8, ["value", "data-testid", "data-type"])) : (openBlock(), createBlock(_sfc_main$l, {
1870
+ key: 1,
1871
+ value: __props.group.amount_excluding_tax,
1872
+ "data-testid": unref(INVOICE_PERIOD_TOTAL),
1873
+ "data-type": unref(getInvoiceGroupAmountType)(__props.group)
1874
+ }, null, 8, ["value", "data-testid", "data-type"]))
1875
+ ]),
1876
+ _: 1
1877
+ })
1878
+ ], 42, _hoisted_1$4),
1879
+ __props.forceExpanded || __props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)) ? (openBlock(), createElementBlock("tr", _hoisted_2$1, [
1880
+ createElementVNode("td", _hoisted_3$1, [
1881
+ createElementVNode("div", _hoisted_4$1, [
1882
+ createVNode(_sfc_main$7, {
1883
+ "invoice-period-order": __props.invoicePeriodOrder,
1884
+ "start-date": __props.group.start_at,
1885
+ "end-date": __props.group.end_at,
1886
+ total: __props.group.amount_excluding_tax,
1887
+ group: __props.group,
1888
+ "amount-type": __props.amountType,
1889
+ "processing-only-customers": __props.processingOnlyCustomers,
1890
+ "display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer,
1891
+ "show-tax-per-line-item": __props.showTaxPerLineItem,
1892
+ "is-expandable": __props.isExpandable
1893
+ }, {
1894
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
1895
+ renderSlot(_ctx.$slots, "invoice-line-prefix", normalizeProps(guardReactiveProps(linePrefixProps)))
1896
+ ]),
1897
+ "one-off-line-context-menu": withCtx((oneOffGroupProps) => [
1898
+ renderSlot(_ctx.$slots, "one-off-line-context-menu", mergeProps(oneOffGroupProps, { groupOrder: __props.groupOrder }))
1899
+ ]),
1900
+ _: 3
1901
+ }, 8, ["invoice-period-order", "start-date", "end-date", "total", "group", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer", "show-tax-per-line-item", "is-expandable"])
1902
+ ])
1903
+ ])
1904
+ ])) : createCommentVNode("", true)
1905
+ ], 64);
1906
+ };
1907
+ }
1908
+ });
1909
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1910
+ __name: "InvoiceGroupWalletBalance",
1911
+ props: {
1912
+ lines: {},
1913
+ creditTypes: {}
1914
+ },
1915
+ setup(__props) {
1916
+ const props = __props;
1917
+ const { $t } = useIntl();
1918
+ const creditsLabel = computed(
1919
+ () => $t({
1920
+ defaultMessage: "Credits",
1921
+ description: "Generic fallback label for a wallet balance row with no known credit type",
1922
+ id: "invoiceGroupWalletBalance.creditsLabel"
1923
+ })
1924
+ );
1925
+ const creditTypesById = computed(
1926
+ () => (props.creditTypes ?? []).reduce((acc, creditType) => {
1927
+ acc[creditType.id] = creditType.name;
1928
+ return acc;
1929
+ }, {})
1930
+ );
1931
+ const getCreditTypeLabel = (credit) => {
1932
+ if (!(credit == null ? void 0 : credit.credit_type_id)) {
1933
+ return creditsLabel.value;
1934
+ }
1935
+ return creditTypesById.value[credit.credit_type_id] ?? credit.credit_type_id;
1936
+ };
1937
+ const walletBalanceRows = computed(() => {
1938
+ const seenRowKeys = /* @__PURE__ */ new Set();
1939
+ return (props.lines ?? []).map((line) => {
1940
+ var _a;
1941
+ return (_a = line.details) == null ? void 0 : _a.wallet_balance_details;
1942
+ }).filter((details) => !!details).map((details, index) => {
1943
+ var _a, _b, _c;
1944
+ const primaryCredit = [
1945
+ details.used_wallet_credits,
1946
+ details.left_wallet_credits,
1947
+ details.available_wallet_credits
1948
+ ].find((credit) => Boolean(credit == null ? void 0 : credit.credit_type_id));
1949
+ return {
1950
+ key: `${(primaryCredit == null ? void 0 : primaryCredit.credit_type_id) ?? "credits"}-${index}`,
1951
+ label: getCreditTypeLabel(primaryCredit),
1952
+ available: ((_a = details.available_wallet_credits) == null ? void 0 : _a.quantity) ?? "-",
1953
+ used: ((_b = details.used_wallet_credits) == null ? void 0 : _b.quantity) ?? "-",
1954
+ left: ((_c = details.left_wallet_credits) == null ? void 0 : _c.quantity) ?? "-"
1955
+ };
1956
+ }).filter((row) => {
1957
+ const rowKey = `${row.label}-${row.available}-${row.used}-${row.left}`;
1958
+ if (seenRowKeys.has(rowKey)) {
1959
+ return false;
1960
+ }
1961
+ seenRowKeys.add(rowKey);
1962
+ return true;
1963
+ });
1964
+ });
1965
+ return (_ctx, _cache) => {
1966
+ return walletBalanceRows.value.length ? (openBlock(), createBlock(InvoiceTable, { key: 0 }, {
1967
+ default: withCtx(() => [
1968
+ createElementVNode("tr", null, [
1969
+ createVNode(_sfc_main$h, {
1970
+ left: "",
1971
+ class: "w-2/5 text-gray-400"
1972
+ }, {
1973
+ default: withCtx(() => [
1974
+ createTextVNode(toDisplayString(unref($t)({
1975
+ defaultMessage: "Credit breakdown",
1976
+ description: "Table heading for the credit-type column in the wallet balance table",
1977
+ id: "invoiceGroupWalletBalance.creditBreakdownHeading"
1978
+ })), 1)
1979
+ ]),
1980
+ _: 1
1981
+ }),
1982
+ createVNode(_sfc_main$h, {
1983
+ right: "",
1984
+ class: "w-1/5 text-gray-400"
1985
+ }, {
1986
+ default: withCtx(() => [
1987
+ createTextVNode(toDisplayString(unref($t)({
1988
+ defaultMessage: "Available",
1989
+ description: "Table heading for the available-credits column in the wallet balance table",
1990
+ id: "invoiceGroupWalletBalance.availableHeading"
1991
+ })), 1)
1992
+ ]),
1993
+ _: 1
1994
+ }),
1995
+ createVNode(_sfc_main$h, {
1996
+ right: "",
1997
+ class: "w-1/5 text-gray-400"
1998
+ }, {
1999
+ default: withCtx(() => [
2000
+ createTextVNode(toDisplayString(unref($t)({
2001
+ defaultMessage: "Used",
2002
+ description: "Table heading for the used-credits column in the wallet balance table",
2003
+ id: "invoiceGroupWalletBalance.usedHeading"
2004
+ })), 1)
2005
+ ]),
2006
+ _: 1
2007
+ }),
2008
+ createVNode(_sfc_main$h, {
2009
+ right: "",
2010
+ class: "w-1/5 text-gray-400"
2011
+ }, {
2012
+ default: withCtx(() => [
2013
+ createTextVNode(toDisplayString(unref($t)({
2014
+ defaultMessage: "Left",
2015
+ description: "Table heading for the remaining-credits column in the wallet balance table",
2016
+ id: "invoiceGroupWalletBalance.leftHeading"
2017
+ })), 1)
2018
+ ]),
2019
+ _: 1
2020
+ })
2021
+ ]),
2022
+ (openBlock(true), createElementBlock(Fragment, null, renderList(walletBalanceRows.value, (row) => {
2023
+ return openBlock(), createElementBlock("tr", {
2024
+ key: row.key
2025
+ }, [
2026
+ createVNode(_sfc_main$i, null, {
2027
+ default: withCtx(() => [
2028
+ createTextVNode(toDisplayString(row.label), 1)
2029
+ ]),
2030
+ _: 2
2031
+ }, 1024),
2032
+ createVNode(_sfc_main$i, { number: "" }, {
2033
+ default: withCtx(() => [
2034
+ createTextVNode(toDisplayString(row.available), 1)
2035
+ ]),
2036
+ _: 2
2037
+ }, 1024),
2038
+ createVNode(_sfc_main$i, { number: "" }, {
2039
+ default: withCtx(() => [
2040
+ createTextVNode(toDisplayString(row.used), 1)
2041
+ ]),
2042
+ _: 2
2043
+ }, 1024),
2044
+ createVNode(_sfc_main$i, { number: "" }, {
2045
+ default: withCtx(() => [
2046
+ createTextVNode(toDisplayString(row.left), 1)
2047
+ ]),
2048
+ _: 2
2049
+ }, 1024)
2050
+ ]);
2051
+ }), 128))
2052
+ ]),
2053
+ _: 1
2054
+ })) : createCommentVNode("", true);
2055
+ };
2056
+ }
2057
+ });
2058
+ function toValue(r) {
2059
+ return typeof r === "function" ? r() : unref(r);
2060
+ }
2061
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
2062
+ function useToggle(initialValue = false, options = {}) {
2063
+ const {
2064
+ truthyValue = true,
2065
+ falsyValue = false
2066
+ } = options;
2067
+ const valueIsRef = isRef(initialValue);
2068
+ const _value = ref(initialValue);
2069
+ function toggle(value) {
2070
+ if (arguments.length) {
2071
+ _value.value = value;
2072
+ return _value.value;
2073
+ } else {
2074
+ const truthy = toValue(truthyValue);
2075
+ _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;
2076
+ return _value.value;
2077
+ }
2078
+ }
2079
+ if (valueIsRef)
2080
+ return toggle;
2081
+ else
2082
+ return [_value, toggle];
2083
+ }
2084
+ const _hoisted_1$3 = {
2085
+ key: 0,
2086
+ totals: "",
2087
+ class: "border-t break-inside-avoid"
2088
+ };
2089
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2090
+ __name: "InvoiceSummaryTotalExcludingTax",
2091
+ props: {
2092
+ baseAmount: {}
2093
+ },
2094
+ setup(__props) {
2095
+ const intl = useIntl();
2096
+ return (_ctx, _cache) => {
2097
+ return __props.baseAmount ? (openBlock(), createElementBlock("tr", _hoisted_1$3, [
2098
+ createVNode(_sfc_main$i, null, {
2099
+ default: withCtx(() => [
2100
+ createTextVNode(toDisplayString(unref(intl).$t({
2101
+ id: "invoice.table_header.total_excluding_taxes",
2102
+ defaultMessage: "Total excluding taxes",
2103
+ description: "Table row header for the total excluding taxes column in the invoice table"
2104
+ })), 1)
2105
+ ]),
2106
+ _: 1
2107
+ }),
2108
+ createVNode(_sfc_main$i, { number: "" }, {
2109
+ default: withCtx(() => [
2110
+ createVNode(_sfc_main$l, {
2111
+ value: __props.baseAmount,
2112
+ "data-testid": unref(SUMMARY_TOTAL_EXCLUDING_TAX)
2113
+ }, null, 8, ["value", "data-testid"])
2114
+ ]),
2115
+ _: 1
2116
+ })
2117
+ ])) : createCommentVNode("", true);
2118
+ };
2119
+ }
2120
+ });
2121
+ const _hoisted_1$2 = {
2122
+ key: 0,
2123
+ class: "border-t font-bold break-inside-avoid"
2124
+ };
2125
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2126
+ __name: "InvoiceSummaryTotalIncludingTax",
2127
+ props: {
2128
+ totalAmount: {},
2129
+ isCustomerFacing: { type: Boolean }
2130
+ },
2131
+ setup(__props) {
2132
+ const intl = useIntl();
2133
+ return (_ctx, _cache) => {
2134
+ return __props.totalAmount ? (openBlock(), createElementBlock("tr", _hoisted_1$2, [
2135
+ createVNode(_sfc_main$i, { class: "font-bold" }, {
2136
+ default: withCtx(() => [
2137
+ createTextVNode(toDisplayString(__props.isCustomerFacing ? unref(intl).$t({
2138
+ id: "invoice.table_header.total_including_taxes_customer_facing",
2139
+ defaultMessage: "Total due today",
2140
+ description: "Table row header for the total including taxes column in the invoice table for a customer facing component"
2141
+ }) : unref(intl).$t({
2142
+ id: "invoice.table_header.total_including_taxes",
2143
+ defaultMessage: "Total including taxes",
2144
+ description: "Table row header for the total including taxes column in the invoice table"
2145
+ })), 1)
2146
+ ]),
2147
+ _: 1
2148
+ }),
2149
+ createVNode(_sfc_main$i, { number: "" }, {
2150
+ default: withCtx(() => [
2151
+ createVNode(_sfc_main$l, {
2152
+ value: __props.totalAmount,
2153
+ "data-testid": unref(SUMMARY_TOTAL_INCLUDING_TAX)
2154
+ }, null, 8, ["value", "data-testid"])
2155
+ ]),
2156
+ _: 1
2157
+ })
2158
+ ])) : createCommentVNode("", true);
2159
+ };
2160
+ }
2161
+ });
2162
+ const _hoisted_1$1 = {
2163
+ key: 0,
2164
+ colspan: "4",
2165
+ class: "p-0"
2166
+ };
2167
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2168
+ __name: "InvoiceTaxes",
2169
+ props: {
2170
+ taxCategories: {}
2171
+ },
2172
+ setup(__props) {
2173
+ const intl = useIntl();
2174
+ return (_ctx, _cache) => {
2175
+ return openBlock(), createBlock(InvoiceTable, { class: "table-fixed" }, {
2176
+ default: withCtx(() => [
2177
+ createElementVNode("tr", null, [
2178
+ createVNode(_sfc_main$h, { left: "" }, {
2179
+ default: withCtx(() => [
2180
+ createTextVNode(toDisplayString(unref(intl).$t({
2181
+ id: "invoice.table_header.tax type",
2182
+ defaultMessage: "Tax type",
2183
+ description: "Table header for the column containing the tax type"
2184
+ })), 1)
2185
+ ]),
2186
+ _: 1
2187
+ }),
2188
+ createVNode(_sfc_main$h, { right: "" }, {
2189
+ default: withCtx(() => [
2190
+ createTextVNode(toDisplayString(unref(intl).$t({
2191
+ id: "invoice.table_header.base amount",
2192
+ defaultMessage: "Base amount",
2193
+ description: "Table header for the column containing the base amount"
2194
+ })), 1)
2195
+ ]),
2196
+ _: 1
2197
+ }),
2198
+ createVNode(_sfc_main$h, { right: "" }, {
2199
+ default: withCtx(() => [
2200
+ createTextVNode(toDisplayString(unref(intl).$t({
2201
+ id: "invoice.table_header.tax_percentage",
2202
+ defaultMessage: "Percentage",
2203
+ description: "Table header for the column containing the tax percentage"
2204
+ })), 1)
2205
+ ]),
2206
+ _: 1
2207
+ }),
2208
+ createVNode(_sfc_main$h, { right: "" }, {
2209
+ default: withCtx(() => [
2210
+ createTextVNode(toDisplayString(unref(intl).$t({
2211
+ id: "invoice.table_header.tax amount",
2212
+ defaultMessage: "Tax amount",
2213
+ description: "Table header for the column containing the tax amount"
2214
+ })), 1)
2215
+ ]),
2216
+ _: 1
2217
+ })
2218
+ ]),
2219
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.taxCategories, (taxCategory, taxCategoryIndex) => {
2220
+ return openBlock(), createElementBlock("tr", { key: taxCategoryIndex }, [
2221
+ taxCategory.rates ? (openBlock(), createElementBlock("td", _hoisted_1$1, [
2222
+ createVNode(InvoiceTable, { class: "table-fixed" }, {
2223
+ default: withCtx(() => [
2224
+ (openBlock(true), createElementBlock(Fragment, null, renderList(taxCategory.rates, (rate, rateIndex) => {
2225
+ return openBlock(), createElementBlock("tr", { key: rateIndex }, [
2226
+ createVNode(_sfc_main$i, null, {
2227
+ default: withCtx(() => [
2228
+ createTextVNode(toDisplayString(rate.name) + " (" + toDisplayString(taxCategory.category) + ") ", 1)
2229
+ ]),
2230
+ _: 2
2231
+ }, 1024),
2232
+ createVNode(_sfc_main$i, { number: "" }, {
2233
+ default: withCtx(() => [
2234
+ createVNode(_sfc_main$l, {
2235
+ value: taxCategory.base_amount
2236
+ }, null, 8, ["value"])
2237
+ ]),
2238
+ _: 2
2239
+ }, 1024),
2240
+ createVNode(_sfc_main$i, { number: "" }, {
2241
+ default: withCtx(() => [
2242
+ createTextVNode(toDisplayString(rate.percentage) + "%", 1)
2243
+ ]),
2244
+ _: 2
2245
+ }, 1024),
2246
+ createVNode(_sfc_main$i, { number: "" }, {
2247
+ default: withCtx(() => [
2248
+ createVNode(_sfc_main$l, {
2249
+ value: rate.tax_amount
2250
+ }, null, 8, ["value"])
2251
+ ]),
2252
+ _: 2
2253
+ }, 1024)
2254
+ ]);
2255
+ }), 128))
2256
+ ]),
2257
+ _: 2
2258
+ }, 1024)
2259
+ ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2260
+ createVNode(_sfc_main$i, null, {
2261
+ default: withCtx(() => [
2262
+ createTextVNode(toDisplayString(taxCategory.name) + " (" + toDisplayString(taxCategory.category) + ") ", 1)
2263
+ ]),
2264
+ _: 2
2265
+ }, 1024),
2266
+ createVNode(_sfc_main$i, { number: "" }, {
2267
+ default: withCtx(() => [
2268
+ createVNode(_sfc_main$l, {
2269
+ value: taxCategory.base_amount
2270
+ }, null, 8, ["value"])
2271
+ ]),
2272
+ _: 2
2273
+ }, 1024),
2274
+ createVNode(_sfc_main$i, { number: "" }, {
2275
+ default: withCtx(() => [
2276
+ createTextVNode(toDisplayString(taxCategory.percentage) + "%", 1)
2277
+ ]),
2278
+ _: 2
2279
+ }, 1024),
2280
+ createVNode(_sfc_main$i, { number: "" }, {
2281
+ default: withCtx(() => [
2282
+ createVNode(_sfc_main$l, {
2283
+ value: taxCategory.tax_amount
2284
+ }, null, 8, ["value"])
2285
+ ]),
2286
+ _: 2
2287
+ }, 1024)
2288
+ ], 64))
2289
+ ]);
2290
+ }), 128))
2291
+ ]),
2292
+ _: 1
2293
+ });
2294
+ };
2295
+ }
2296
+ });
2297
+ const _hoisted_1 = { class: "flex items-start justify-between" };
2298
+ const _hoisted_2 = {
2299
+ key: 0,
2300
+ class: "max-h-9"
2301
+ };
2302
+ const _hoisted_3 = { class: "flex flex-col gap-2" };
2303
+ const _hoisted_4 = { key: 0 };
2304
+ const _hoisted_5 = { key: 3 };
2305
+ const _hoisted_6 = {
2306
+ colspan: "2",
2307
+ class: "p-0"
2308
+ };
2309
+ const _hoisted_7 = ["tabindex"];
2310
+ const _hoisted_8 = { key: 1 };
2311
+ const _hoisted_9 = {
2312
+ colspan: "2",
2313
+ class: "p-0"
2314
+ };
2315
+ const _hoisted_10 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
2316
+ const _hoisted_11 = ["tabindex", "onClick", "onKeyup"];
2317
+ const _hoisted_12 = { key: 0 };
2318
+ const _hoisted_13 = {
2319
+ colspan: "2",
2320
+ class: "p-0"
2321
+ };
2322
+ const _hoisted_14 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
2323
+ const _hoisted_15 = { key: 1 };
2324
+ const _hoisted_16 = {
2325
+ colspan: "2",
2326
+ class: "p-0"
2327
+ };
2328
+ const _hoisted_17 = {
2329
+ key: 0,
2330
+ class: "break-inside-avoid border-t font-bold"
2331
+ };
2332
+ const _sfc_main = /* @__PURE__ */ defineComponent({
2333
+ __name: "InvoiceSummary",
2334
+ props: {
2335
+ invoice: {},
2336
+ isExpandable: { type: Boolean, default: false },
2337
+ forceExpanded: { type: Boolean, default: false },
2338
+ heading: { default: "details" },
2339
+ isInvoiceLineCreatable: { type: Boolean, default: false },
2340
+ isNoteCreatable: { type: Boolean, default: false },
2341
+ showRenderedServicesHeader: { type: Boolean, default: true },
2342
+ isCustomerFacing: { type: Boolean },
2343
+ showTotals: { type: Boolean, default: true },
2344
+ hideOneOffCreditBreakdown: { type: Boolean, default: false },
2345
+ showWalletBalance: { type: Boolean, default: true }
2346
+ },
2347
+ emits: ["add-invoice-line", "add-note"],
2348
+ setup(__props, { emit: __emit }) {
2349
+ const intl = useIntl();
2350
+ const { formatMessage } = intl;
2351
+ const emit = __emit;
2352
+ const props = __props;
2353
+ const [expandedItems, toggleItems] = useSimpleToggleList();
2354
+ const [expandedDeductions, toggleDeductions] = useSimpleToggleList();
2355
+ const [expandedTaxes, toggleTaxes] = useToggle();
2356
+ const handleToggleItems = (...params) => {
2357
+ if (!props.isExpandable) return;
2358
+ toggleItems(...params);
2359
+ };
2360
+ const handleToggleDeductions = (index) => {
2361
+ if (!props.isExpandable) return;
2362
+ toggleDeductions(index);
2363
+ };
2364
+ const handleToggleTaxes = () => {
2365
+ if (!props.invoice.tax_categories || !props.isExpandable) return;
2366
+ toggleTaxes();
2367
+ };
2368
+ const formatIndex = (rootIndex, itemIndex) => +`${rootIndex}${itemIndex}`;
2369
+ const getTitle = (invoicePeriod) => {
2370
+ return intl.$t(
2371
+ {
2372
+ id: "invoice.service_period_heading",
2373
+ defaultMessage: "Service period - {start_at} - {end_at}",
2374
+ description: "Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"
2375
+ },
2376
+ {
2377
+ start_at: intl.formatDate({
2378
+ date: invoicePeriod.start_at,
2379
+ format: "date",
2380
+ timezone: formatTimezone(props.invoice.customer.timezone),
2381
+ offsetType: "offsetted"
2382
+ }),
2383
+ end_at: intl.formatDate({
2384
+ date: invoicePeriod.end_at,
2385
+ format: "date",
2386
+ timezone: formatTimezone(props.invoice.customer.timezone),
2387
+ offsetType: "offsetted"
2388
+ })
2389
+ }
2390
+ );
2391
+ };
2392
+ const getTableHeading = (invoiceGroupType) => {
2393
+ switch (invoiceGroupType) {
2394
+ case "PRICING":
2395
+ case "REVENUE": {
2396
+ return intl.$t({
2397
+ id: "invoice.table_heading.products",
2398
+ defaultMessage: "Products",
2399
+ description: "Table heading for the column containing the products of the invoice"
2400
+ });
2401
+ }
2402
+ case "COMMITMENT":
2403
+ return intl.$t({
2404
+ id: "invoice.table_heading.commitments",
2405
+ defaultMessage: "Commitments",
2406
+ description: "Table heading for the column containing the commitments of the invoice"
2407
+ });
2408
+ case "DISCOUNT":
2409
+ return intl.$t({
2410
+ id: "invoice.table_heading.discounts",
2411
+ defaultMessage: "Discounts",
2412
+ description: "Table heading for the column containing the discounts of the invoice"
2413
+ });
2414
+ case "MARKUP":
2415
+ return intl.$t({
2416
+ id: "invoice.table_heading.markups",
2417
+ defaultMessage: "Markups",
2418
+ description: "Table heading for the column containing the markups of the invoice"
2419
+ });
2420
+ case "ONE_OFF":
2421
+ return intl.$t({
2422
+ id: "invoice.table_heading.one_offs",
2423
+ defaultMessage: "One-off's",
2424
+ description: "Table heading for the column containing the one-offs of the invoice"
2425
+ });
2426
+ }
2427
+ };
2428
+ const getDeductionLabel = (group) => {
2429
+ var _a, _b;
2430
+ if ((_a = group.products) == null ? void 0 : _a.length) {
2431
+ return [(_b = group.pricing) == null ? void 0 : _b.name, getComposedString(group.products.map((item) => item.name))].filter(Boolean).join(" - ");
2432
+ }
2433
+ return group.description ?? "";
2434
+ };
2435
+ const groupHasWalletBalance = (group) => props.showWalletBalance && !(props.hideOneOffCreditBreakdown && group.type === "ONE_OFF") && (group.lines ?? []).some((line) => {
2436
+ var _a;
2437
+ return !!((_a = line.details) == null ? void 0 : _a.wallet_balance_details);
2438
+ });
2439
+ const getInvoiceGroupsByType = (invoicePeriod) => {
2440
+ return invoicePeriod.groups.reduce(
2441
+ (acc, invoiceGroup) => {
2442
+ if (!(invoiceGroup.type in acc)) {
2443
+ return { ...acc, [invoiceGroup.type]: [invoiceGroup] };
2444
+ }
2445
+ return {
2446
+ ...acc,
2447
+ [invoiceGroup.type]: [...acc[invoiceGroup.type], invoiceGroup]
2448
+ };
2449
+ },
2450
+ {}
2451
+ );
2452
+ };
2453
+ const addInvoiceContextMenuItems = computed(() => {
2454
+ const result = [];
2455
+ const showInvoiceLineAddButton = ["ONE_OFF", "STANDARD", "ONE_OFF_CREDIT"].includes(props.invoice.type) && ["DRAFT", "OPEN"].includes(props.invoice.status) && props.isInvoiceLineCreatable;
2456
+ if (showInvoiceLineAddButton) {
2457
+ result.push({
2458
+ label: formatMessage({
2459
+ defaultMessage: "Invoice line",
2460
+ id: "JlhdD2",
2461
+ description: "Label for adding an invoice line"
2462
+ }),
2463
+ onClick: () => emit("add-invoice-line")
2464
+ });
2465
+ }
2466
+ if (props.isNoteCreatable) {
2467
+ result.push({
2468
+ label: formatMessage({
2469
+ defaultMessage: "Note",
2470
+ id: "jB8+k/",
2471
+ description: "Label for adding a note to an invoice"
2472
+ }),
2473
+ onClick: () => emit("add-note")
2474
+ });
2475
+ }
2476
+ return result;
2477
+ });
2478
+ const showTaxPerLineItem = computed(() => props.invoice.show_tax_per_line_item !== false);
2479
+ const sectionTitle = computed(() => {
2480
+ if (props.heading === "summary") {
2481
+ return intl.$t({
2482
+ id: "invoice.summaryTitle",
2483
+ defaultMessage: "Invoice summary",
2484
+ description: "Title for the compact, always-shown invoice summary section"
2485
+ });
2486
+ }
2487
+ switch (props.invoice.type) {
2488
+ case "CREDIT":
2489
+ return intl.$t({
2490
+ id: "invoice.creditDetailsTitle",
2491
+ defaultMessage: "Credit details",
2492
+ description: "Title for the invoice summary of a credit-note invoice"
2493
+ });
2494
+ case "ONE_OFF":
2495
+ return intl.$t({
2496
+ id: "invoice.oneOffDetailsTitle",
2497
+ defaultMessage: "One-off details",
2498
+ description: "Title for the invoice summary of a one-off invoice"
2499
+ });
2500
+ case "ONE_OFF_CREDIT":
2501
+ return intl.$t({
2502
+ id: "invoice.oneOffCreditDetailsTitle",
2503
+ defaultMessage: "One-off credit details",
2504
+ description: "Title for the invoice summary of a one-off credit-note invoice"
2505
+ });
2506
+ default:
2507
+ return intl.$t({
2508
+ id: "invoice.title",
2509
+ defaultMessage: "Details",
2510
+ description: "Title for the invoice summary"
2511
+ });
2512
+ }
2513
+ });
2514
+ return (_ctx, _cache) => {
2515
+ var _a;
2516
+ return openBlock(), createElementBlock("div", null, [
2517
+ createElementVNode("div", _hoisted_1, [
2518
+ _ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_2, [
2519
+ renderSlot(_ctx.$slots, "logo")
2520
+ ])) : (openBlock(), createBlock(_sfc_main$q, {
2521
+ key: 1,
2522
+ title: sectionTitle.value,
2523
+ variant: "neutral",
2524
+ icon: "draft",
2525
+ "icon-class": "print:hidden",
2526
+ "title-class": "print:text-sm"
2527
+ }, null, 8, ["title"])),
2528
+ _ctx.$slots.intro ? renderSlot(_ctx.$slots, "intro", {}, void 0, void 0, 2) : createCommentVNode("", true),
2529
+ createElementVNode("div", _hoisted_3, [
2530
+ ((_a = addInvoiceContextMenuItems.value) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_sfc_main$r, {
2531
+ key: 0,
2532
+ items: addInvoiceContextMenuItems.value,
2533
+ width: "auto"
2534
+ }, {
2535
+ trigger: withCtx(() => [
2536
+ createVNode(_sfc_main$s, {
2537
+ "icon-prefix": "add",
2538
+ size: "sm",
2539
+ intent: "secondary"
2540
+ }, {
2541
+ default: withCtx(() => [
2542
+ createTextVNode(toDisplayString(unref(formatMessage)({
2543
+ defaultMessage: "Add",
2544
+ id: "YnK/yF",
2545
+ description: "Label for adding an item to an invoice"
2546
+ })), 1)
2547
+ ]),
2548
+ _: 1
2549
+ })
2550
+ ]),
2551
+ _: 1
2552
+ }, 8, ["items"])) : createCommentVNode("", true),
2553
+ renderSlot(_ctx.$slots, "child-customers-selector")
2554
+ ])
2555
+ ]),
2556
+ _ctx.$slots.total ? renderSlot(_ctx.$slots, "total", {}, void 0, void 0, 0) : createCommentVNode("", true),
2557
+ renderSlot(_ctx.$slots, "notes"),
2558
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoice.periods, (invoicePeriod, invoicePeriodIndex) => {
2559
+ return openBlock(), createElementBlock(Fragment, { key: invoicePeriodIndex }, [
2560
+ __props.showRenderedServicesHeader ? (openBlock(), createBlock(_sfc_main$t, {
2561
+ key: 0,
2562
+ class: "mt-6"
2563
+ }, {
2564
+ default: withCtx(() => [
2565
+ createVNode(_sfc_main$u, {
2566
+ tag: "h2",
2567
+ variant: "caps-heading"
2568
+ }, {
2569
+ default: withCtx(() => [
2570
+ createTextVNode(toDisplayString(getTitle(invoicePeriod)), 1)
2571
+ ]),
2572
+ _: 2
2573
+ }, 1024)
2574
+ ]),
2575
+ _: 2
2576
+ }, 1024)) : createCommentVNode("", true),
2577
+ invoicePeriod.groups ? (openBlock(), createBlock(InvoiceTable, {
2578
+ key: 1,
2579
+ class: normalizeClass({ "mt-3": __props.showRenderedServicesHeader }),
2580
+ "data-testid": unref(INVOICE_PERIOD)
2581
+ }, {
2582
+ default: withCtx(() => [
2583
+ (openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(
2584
+ getInvoiceGroupsByType(invoicePeriod)
2585
+ ), ([groupType, groups], index) => {
2586
+ return openBlock(), createElementBlock(Fragment, { key: groupType }, [
2587
+ index > 0 ? (openBlock(), createElementBlock("tr", _hoisted_4, [..._cache[0] || (_cache[0] = [
2588
+ createElementVNode("td", null, [
2589
+ createElementVNode("div", { class: "h-4" })
2590
+ ], -1)
2591
+ ])])) : createCommentVNode("", true),
2592
+ createElementVNode("tr", null, [
2593
+ createVNode(_sfc_main$h, {
2594
+ left: "",
2595
+ class: "text-secondary"
2596
+ }, {
2597
+ default: withCtx(() => [
2598
+ createTextVNode(toDisplayString(getTableHeading(groupType)), 1)
2599
+ ]),
2600
+ _: 2
2601
+ }, 1024),
2602
+ createVNode(_sfc_main$h, {
2603
+ right: "",
2604
+ class: "w-28 text-secondary"
2605
+ }, {
2606
+ default: withCtx(() => [
2607
+ createTextVNode(toDisplayString(unref(intl).$t({
2608
+ id: "invoice.amount_table_heading",
2609
+ defaultMessage: "Amount",
2610
+ description: "Table heading for the amount column in the invoice table"
2611
+ })), 1)
2612
+ ]),
2613
+ _: 1
2614
+ })
2615
+ ]),
2616
+ (openBlock(true), createElementBlock(Fragment, null, renderList(groups, (group, groupIndex) => {
2617
+ return openBlock(), createElementBlock(Fragment, { key: groupIndex }, [
2618
+ groupType === "REVENUE" || groupType === "PRICING" || groupType === "ONE_OFF" ? (openBlock(), createBlock(_sfc_main$5, {
2619
+ key: 0,
2620
+ group,
2621
+ "expanded-items": unref(expandedItems),
2622
+ "handle-toggle-items": handleToggleItems,
2623
+ "is-expandable": __props.isExpandable,
2624
+ "force-expanded": __props.forceExpanded,
2625
+ "format-index": formatIndex,
2626
+ "invoice-period-order": invoicePeriod.period_order,
2627
+ "group-order": group.group_order,
2628
+ "amount-type": __props.invoice.pricing_amount_type,
2629
+ "processing-only-customers": __props.invoice.processing_only_customers,
2630
+ "display-invoice-sub-lines-per-processing-only-customer": __props.invoice.display_invoice_sub_lines_per_processing_only_customer,
2631
+ "show-tax-per-line-item": showTaxPerLineItem.value,
2632
+ "forwarded-from-customers": __props.invoice.forwarded_from_customers,
2633
+ "show-original-customer-invoice-line": __props.invoice.show_original_customer_invoice_line
2634
+ }, {
2635
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
2636
+ renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
2637
+ ]),
2638
+ "one-off-line-context-menu": withCtx((oneOffGroupProps) => [
2639
+ renderSlot(_ctx.$slots, "one-off-line-context-menu", mergeProps({ ref_for: true }, oneOffGroupProps, {
2640
+ periodOrder: invoicePeriod.period_order
2641
+ }))
2642
+ ]),
2643
+ _: 2
2644
+ }, 1032, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer", "show-tax-per-line-item", "forwarded-from-customers", "show-original-customer-invoice-line"])) : groupType === "DISCOUNT" || groupType === "MARKUP" ? (openBlock(), createBlock(_sfc_main$a, {
2645
+ key: 1,
2646
+ group,
2647
+ "expanded-items": unref(expandedItems),
2648
+ "handle-toggle-items": handleToggleItems,
2649
+ "is-expandable": __props.isExpandable,
2650
+ "force-expanded": __props.forceExpanded,
2651
+ "format-index": formatIndex,
2652
+ "invoice-period-order": invoicePeriod.period_order,
2653
+ "group-order": group.group_order,
2654
+ "amount-type": __props.invoice.pricing_amount_type,
2655
+ heading: groupType === "DISCOUNT" ? unref(intl).$t({
2656
+ id: "invoice.discounts_table_heading",
2657
+ defaultMessage: "Discounts",
2658
+ description: "Heading for discounts in the invoice table"
2659
+ }) : unref(intl).$t({
2660
+ id: "invoice.markups_table_heading",
2661
+ defaultMessage: "Markups",
2662
+ description: "Heading for markups in the invoice table"
2663
+ })
2664
+ }, {
2665
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
2666
+ renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
2667
+ ]),
2668
+ _: 3
2669
+ }, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type", "heading"])) : groupType === "COMMITMENT" ? (openBlock(), createBlock(_sfc_main$b, {
2670
+ key: 2,
2671
+ group,
2672
+ "expanded-items": unref(expandedItems),
2673
+ "handle-toggle-items": handleToggleItems,
2674
+ "is-expandable": __props.isExpandable,
2675
+ "force-expanded": __props.forceExpanded,
2676
+ "format-index": formatIndex,
2677
+ "invoice-period-order": invoicePeriod.period_order,
2678
+ "group-order": group.group_order,
2679
+ "amount-type": __props.invoice.pricing_amount_type
2680
+ }, {
2681
+ "invoice-line-prefix": withCtx((linePrefixProps) => [
2682
+ renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
2683
+ ]),
2684
+ _: 3
2685
+ }, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type"])) : createCommentVNode("", true),
2686
+ groupHasWalletBalance(group) ? (openBlock(), createElementBlock("tr", _hoisted_5, [
2687
+ createElementVNode("td", _hoisted_6, [
2688
+ createVNode(_sfc_main$4, {
2689
+ lines: group.lines,
2690
+ "credit-types": __props.invoice.credit_types
2691
+ }, null, 8, ["lines", "credit-types"])
2692
+ ])
2693
+ ])) : createCommentVNode("", true)
2694
+ ], 64);
2695
+ }), 128))
2696
+ ], 64);
2697
+ }), 128))
2698
+ ]),
2699
+ _: 2
2700
+ }, 1032, ["class", "data-testid"])) : createCommentVNode("", true)
2701
+ ], 64);
2702
+ }), 128)),
2703
+ __props.invoice.tax_summary && (__props.showTotals || (__props.forceExpanded || unref(expandedTaxes)) && __props.invoice.tax_categories) ? (openBlock(), createBlock(InvoiceTable, {
2704
+ key: 1,
2705
+ class: "mt-6 print:ml-auto print:w-2/3"
2706
+ }, {
2707
+ default: withCtx(() => [
2708
+ __props.showTotals ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2709
+ createElementVNode("tr", null, [
2710
+ createVNode(_sfc_main$h, {
2711
+ left: "",
2712
+ class: "text-secondary"
2713
+ }, {
2714
+ default: withCtx(() => [
2715
+ createTextVNode(toDisplayString(unref(intl).$t({
2716
+ id: "invoice.totals_table_heading",
2717
+ defaultMessage: "Totals",
2718
+ description: "Table heading for the totals column in the invoice table"
2719
+ })), 1)
2720
+ ]),
2721
+ _: 1
2722
+ }),
2723
+ createVNode(_sfc_main$h, {
2724
+ right: "",
2725
+ class: "w-28 text-secondary"
2726
+ }, {
2727
+ default: withCtx(() => [
2728
+ createTextVNode(toDisplayString(unref(intl).$t({
2729
+ id: "invoice.amount_table_heading",
2730
+ defaultMessage: "Amount",
2731
+ description: "Table heading for the amount column in the invoice table"
2732
+ })), 1)
2733
+ ]),
2734
+ _: 1
2735
+ })
2736
+ ]),
2737
+ __props.invoice.pricing_amount_type === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$2, {
2738
+ key: 0,
2739
+ "total-amount": __props.invoice.tax_summary.total_amount,
2740
+ "is-customer-facing": __props.isCustomerFacing
2741
+ }, null, 8, ["total-amount", "is-customer-facing"])) : (openBlock(), createBlock(_sfc_main$3, {
2742
+ key: 1,
2743
+ "base-amount": __props.invoice.tax_summary.base_amount
2744
+ }, null, 8, ["base-amount"])),
2745
+ __props.invoice.tax_summary.tax_amount ? (openBlock(), createElementBlock("tr", {
2746
+ key: 2,
2747
+ class: normalizeClass([{ "cursor-pointer": __props.invoice.tax_categories && __props.isExpandable }, "break-inside-avoid border-t"]),
2748
+ tabindex: __props.isExpandable ? 0 : void 0,
2749
+ onClick: handleToggleTaxes,
2750
+ onKeyup: [
2751
+ withKeys(handleToggleTaxes, ["enter"]),
2752
+ withKeys(handleToggleTaxes, ["space"])
2753
+ ]
2754
+ }, [
2755
+ createVNode(_sfc_main$i, null, {
2756
+ default: withCtx(() => [
2757
+ __props.isExpandable && __props.invoice.tax_categories && __props.invoice.tax_categories.length ? (openBlock(), createBlock(_sfc_main$n, {
2758
+ key: 0,
2759
+ icon: "keyboard_arrow_down",
2760
+ size: "md",
2761
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !unref(expandedTaxes) }])
2762
+ }, null, 8, ["class"])) : createCommentVNode("", true),
2763
+ createVNode(_sfc_main$6, {
2764
+ label: unref(intl).$t({
2765
+ id: "invoice.taxes_table_heading",
2766
+ defaultMessage: "Taxes",
2767
+ description: "Table heading for the taxes column in the invoice table"
2768
+ }),
2769
+ count: __props.isExpandable && __props.invoice.tax_categories ? __props.invoice.tax_categories.length : void 0
2770
+ }, null, 8, ["label", "count"])
2771
+ ]),
2772
+ _: 1
2773
+ }),
2774
+ createVNode(_sfc_main$i, { number: "" }, {
2775
+ default: withCtx(() => [
2776
+ createVNode(_sfc_main$l, {
2777
+ value: __props.invoice.tax_summary.tax_amount,
2778
+ "data-testid": unref(SUMMARY_TOTAL_TAX)
2779
+ }, null, 8, ["value", "data-testid"])
2780
+ ]),
2781
+ _: 1
2782
+ })
2783
+ ], 42, _hoisted_7)) : createCommentVNode("", true)
2784
+ ], 64)) : createCommentVNode("", true),
2785
+ (__props.forceExpanded || unref(expandedTaxes)) && __props.invoice.tax_categories ? (openBlock(), createElementBlock("tr", _hoisted_8, [
2786
+ createElementVNode("td", _hoisted_9, [
2787
+ createElementVNode("div", _hoisted_10, [
2788
+ createVNode(_sfc_main$1, {
2789
+ "tax-categories": __props.invoice.tax_categories
2790
+ }, null, 8, ["tax-categories"])
2791
+ ])
2792
+ ])
2793
+ ])) : createCommentVNode("", true),
2794
+ __props.showTotals ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
2795
+ __props.invoice.pricing_amount_type === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$3, {
2796
+ key: 0,
2797
+ "base-amount": __props.invoice.tax_summary.base_amount
2798
+ }, null, 8, ["base-amount"])) : (openBlock(), createBlock(_sfc_main$2, {
2799
+ key: 1,
2800
+ "total-amount": __props.invoice.tax_summary.total_amount
2801
+ }, null, 8, ["total-amount"]))
2802
+ ], 64)) : createCommentVNode("", true)
2803
+ ]),
2804
+ _: 1
2805
+ })) : createCommentVNode("", true),
2806
+ !unref(isEmpty)(__props.invoice.closed_periods) ? (openBlock(), createBlock(InvoiceTable, {
2807
+ key: 2,
2808
+ class: "mt-6"
2809
+ }, {
2810
+ default: withCtx(() => [
2811
+ createElementVNode("tr", null, [
2812
+ createVNode(_sfc_main$h, {
2813
+ left: "",
2814
+ class: "text-secondary"
2815
+ }, {
2816
+ default: withCtx(() => [
2817
+ createTextVNode(toDisplayString(unref(intl).$t({
2818
+ id: "invoice.already_deducted_table_heading",
2819
+ defaultMessage: "Already deducted",
2820
+ description: "Table heading for the already deducted rows in the invoice table"
2821
+ })), 1)
2822
+ ]),
2823
+ _: 1
2824
+ })
2825
+ ]),
2826
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoice.closed_periods, (rootGroup, rootGroupIndex) => {
2827
+ return openBlock(), createElementBlock(Fragment, { key: rootGroupIndex }, [
2828
+ (openBlock(true), createElementBlock(Fragment, null, renderList(rootGroup.groups, (group, groupIndex) => {
2829
+ return openBlock(), createElementBlock(Fragment, { key: groupIndex }, [
2830
+ createElementVNode("tr", {
2831
+ class: normalizeClass(["break-inside-avoid border-t", { "pt-6": rootGroupIndex === 0, "cursor-pointer": __props.isExpandable }]),
2832
+ tabindex: __props.isExpandable ? 0 : void 0,
2833
+ onClick: ($event) => handleToggleDeductions(formatIndex(rootGroupIndex, groupIndex)),
2834
+ onKeyup: [
2835
+ withKeys(($event) => handleToggleDeductions(formatIndex(rootGroupIndex, groupIndex)), ["enter"]),
2836
+ withKeys(($event) => handleToggleDeductions(formatIndex(rootGroupIndex, groupIndex)), ["space"])
2837
+ ]
2838
+ }, [
2839
+ createVNode(_sfc_main$i, { class: "p-0" }, {
2840
+ default: withCtx(() => {
2841
+ var _a2;
2842
+ return [
2843
+ __props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
2844
+ key: 0,
2845
+ icon: "keyboard_arrow_down",
2846
+ size: "md",
2847
+ class: normalizeClass(["absolute -translate-x-7 text-slate-400", {
2848
+ "-rotate-90": !unref(expandedDeductions).includes(
2849
+ formatIndex(rootGroupIndex, groupIndex)
2850
+ )
2851
+ }])
2852
+ }, null, 8, ["class"])) : createCommentVNode("", true),
2853
+ createVNode(_sfc_main$6, {
2854
+ label: getDeductionLabel(group),
2855
+ count: __props.isExpandable ? ((_a2 = group.lines) == null ? void 0 : _a2.length) ?? 0 : void 0
2856
+ }, null, 8, ["label", "count"])
2857
+ ];
2858
+ }),
2859
+ _: 2
2860
+ }, 1024),
2861
+ createVNode(_sfc_main$i, {
2862
+ number: "",
2863
+ class: "w-28"
2864
+ }, {
2865
+ default: withCtx(() => [
2866
+ createVNode(_sfc_main$l, {
2867
+ value: group.amount_excluding_tax,
2868
+ "data-testid": unref(SUMMARY_TOTAL_DISCOUNT),
2869
+ "data-type": unref(DEDUCTION)
2870
+ }, null, 8, ["value", "data-testid", "data-type"])
2871
+ ]),
2872
+ _: 2
2873
+ }, 1024)
2874
+ ], 42, _hoisted_11),
2875
+ __props.forceExpanded || unref(expandedDeductions).includes(formatIndex(rootGroupIndex, groupIndex)) ? (openBlock(), createElementBlock("tr", _hoisted_12, [
2876
+ createElementVNode("td", _hoisted_13, [
2877
+ createElementVNode("div", _hoisted_14, [
2878
+ createVNode(_sfc_main$7, {
2879
+ "start-date": group.start_at,
2880
+ "end-date": group.end_at,
2881
+ total: group.amount_excluding_tax,
2882
+ group,
2883
+ "amount-type": __props.invoice.pricing_amount_type,
2884
+ "show-tax-per-line-item": showTaxPerLineItem.value,
2885
+ "processing-only-customers": __props.invoice.processing_only_customers,
2886
+ "display-invoice-sub-lines-per-processing-only-customer": __props.invoice.display_invoice_sub_lines_per_processing_only_customer
2887
+ }, {
2888
+ "one-off-line-context-menu": withCtx((oneOffGroupProps) => [
2889
+ renderSlot(_ctx.$slots, "one-off-line-context-menu", mergeProps({ ref_for: true }, oneOffGroupProps, {
2890
+ groupOrder: group.group_order,
2891
+ periodOrder: rootGroup.period_order
2892
+ }))
2893
+ ]),
2894
+ _: 2
2895
+ }, 1032, ["start-date", "end-date", "total", "group", "amount-type", "show-tax-per-line-item", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
2896
+ ])
2897
+ ])
2898
+ ])) : createCommentVNode("", true),
2899
+ groupHasWalletBalance(group) ? (openBlock(), createElementBlock("tr", _hoisted_15, [
2900
+ createElementVNode("td", _hoisted_16, [
2901
+ createVNode(_sfc_main$4, {
2902
+ lines: group.lines,
2903
+ "credit-types": __props.invoice.credit_types
2904
+ }, null, 8, ["lines", "credit-types"])
2905
+ ])
2906
+ ])) : createCommentVNode("", true)
2907
+ ], 64);
2908
+ }), 128))
2909
+ ], 64);
2910
+ }), 128)),
2911
+ __props.invoice.open_invoice_amount && !__props.invoice.paid && __props.showTotals ? (openBlock(), createElementBlock("tr", _hoisted_17, [
2912
+ createVNode(_sfc_main$i, { class: "font-bold" }, {
2913
+ default: withCtx(() => [
2914
+ createTextVNode(toDisplayString(unref(intl).$t({
2915
+ id: "invoice.amount_due_table_heading",
2916
+ defaultMessage: "Amount due",
2917
+ description: "Table heading for the amount due row in the invoice table"
2918
+ })), 1)
2919
+ ]),
2920
+ _: 1
2921
+ }),
2922
+ createVNode(_sfc_main$i, { number: "" }, {
2923
+ default: withCtx(() => [
2924
+ createVNode(_sfc_main$l, {
2925
+ value: __props.invoice.open_invoice_amount,
2926
+ "data-testid": unref(SUMMARY_AMOUNT_DUE)
2927
+ }, null, 8, ["value", "data-testid"])
2928
+ ]),
2929
+ _: 1
2930
+ })
2931
+ ])) : createCommentVNode("", true)
2932
+ ]),
2933
+ _: 3
2934
+ })) : createCommentVNode("", true)
2935
+ ]);
2936
+ };
2937
+ }
2938
+ });
2939
+ export {
2940
+ InvoiceTable as I,
2941
+ _sfc_main as _,
2942
+ _sfc_main$h as a,
2943
+ _sfc_main$i as b
2944
+ };