@solvimon/solvimon-web 0.1.0-alpha.14 → 0.1.0-alpha.16

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 (126) hide show
  1. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-0_VYW5Wu.js → BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js} +1 -1
  2. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D8ZeVBWO.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs} +2 -2
  3. package/dist/ContentWithAsideLayout-DHpnJfGA.js +1 -0
  4. package/dist/{ContentWithAsideLayout-DhfUkZZg.mjs → ContentWithAsideLayout-Dy9xgxuF.mjs} +6 -3
  5. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DEqfojR8.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs} +8 -23
  6. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js +1 -0
  7. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CFLR4ptB.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js} +1 -1
  8. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-COnrD4ew.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs} +1 -1
  9. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js +1 -0
  10. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs +27 -0
  11. package/dist/{PaymentHistoryBlock-DUeSRR3k.js → PaymentHistoryBlock-BGbTy4Se.js} +1 -1
  12. package/dist/{PaymentHistoryBlock-BTRFc4ki.mjs → PaymentHistoryBlock-BKMttUyk.mjs} +1 -1
  13. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-TgZYSSQe.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js} +1 -1
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-GeyErAW6.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs} +1 -1
  15. package/dist/{PaymentIntegrationForm-DX6kv0_v.mjs → PaymentIntegrationForm-CypW6fZY.mjs} +1 -1
  16. package/dist/{PaymentIntegrationForm-CQntx0TH.js → PaymentIntegrationForm-D4QupHWl.js} +1 -1
  17. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +1 -0
  18. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dkd-Cp8c.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs} +736 -162
  19. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs +145 -0
  20. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +1 -0
  21. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs +139 -0
  22. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js +1 -0
  23. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +1 -0
  24. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D-BFQZiM.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs} +24 -23
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-D-hpJL8I.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js} +1 -1
  26. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-B7IOIy-v.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs} +4 -4
  27. package/dist/component-Bg2JVC_O.mjs +933 -0
  28. package/dist/component-Bs8oszfD.js +1 -0
  29. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  30. package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
  31. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  32. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +3 -3
  33. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  34. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
  35. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  36. package/dist/components/Invoice/Invoice.es.js +14 -13
  37. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  38. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  39. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +3 -0
  40. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -0
  41. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +123 -0
  42. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  43. package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
  44. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  45. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  46. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  47. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +11 -110
  48. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  49. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +5 -5
  50. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  51. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
  52. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  53. package/dist/components/WalletBalances/WalletBalances.es.js +3 -3
  54. package/dist/core/index.cjs.js +1 -1
  55. package/dist/core/index.es.js +1 -1
  56. package/dist/core/types.d.ts +4 -0
  57. package/dist/{customer-Bn6GdxP8.mjs → customer-Bv_fqXzO.mjs} +1 -1
  58. package/dist/{customer-CGyZojAB.js → customer-_W8gIX5m.js} +1 -1
  59. package/dist/{en-US-G2HBHqjq.js → en-US-C0gIE4Q1.js} +1 -1
  60. package/dist/{en-US-BKhsdJQ2.mjs → en-US-DAgOSlgv.mjs} +19 -12
  61. package/dist/index.cjs.js +1 -1
  62. package/dist/index.es.js +1 -1
  63. package/dist/{invoices-Rs-QBUGS.mjs → invoices-BGb0AwVF.mjs} +2 -2
  64. package/dist/{invoices-DDeL8tvI.js → invoices-D-OKipCg.js} +1 -1
  65. package/dist/{nl-NL-DvVsMfhA.js → nl-NL-Br7muSHK.js} +1 -1
  66. package/dist/{nl-NL-BdeAy1tY.mjs → nl-NL-DCsmrA8A.mjs} +9 -2
  67. package/dist/paymentMethods-DIbB759g.js +1 -0
  68. package/dist/{paymentMethods-DOH9-6M1.mjs → paymentMethods-DvqlWe96.mjs} +11 -3
  69. package/dist/{payments-DGPENXiS.mjs → payments-CpzTVrQM.mjs} +1 -1
  70. package/dist/{payments-C0vYbn5Q.js → payments-DMDDI3MK.js} +1 -1
  71. package/dist/{registry-7UKVW93Q.mjs → registry-B-If1W_u.mjs} +9 -3
  72. package/dist/registry-uG2isab0.js +1 -0
  73. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  74. package/dist/screens/Checkout/Checkout.es.js +103 -70
  75. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  76. package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -13
  77. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
  78. package/dist/screens/PayInvoice/PayInvoice.es.js +45 -34
  79. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +3 -0
  80. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -0
  81. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +231 -0
  82. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  83. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +29 -34
  84. package/dist/solvimon-web.css +1 -1
  85. package/dist/{subscriptions-BIGqt2N0.mjs → subscriptions-BPYyv09M.mjs} +2 -2
  86. package/dist/{subscriptions-CcpEwubd.js → subscriptions-CC61I6Nj.js} +1 -1
  87. package/dist/{adyen-D0yvZvq5.mjs → url-1Lbg5Yni.mjs} +35 -35
  88. package/dist/url-B6-3PkW2.js +1 -0
  89. package/dist/{useActionDispatchProvider-aqYyqIdb.js → useActionDispatchProvider-BHTknMoH.js} +1 -1
  90. package/dist/{useActionDispatchProvider-Ca1YbU61.mjs → useActionDispatchProvider-Dz8-e4gZ.mjs} +1 -1
  91. package/dist/{useCustomer-DUA8Y-2I.mjs → useCustomer-VVJi8z2w.mjs} +2 -2
  92. package/dist/{useCustomer-D9ZrqMFY.js → useCustomer-Z24KchWC.js} +1 -1
  93. package/dist/useIncrementalLoading-CuSndpP2.js +1 -0
  94. package/dist/{useIncrementalLoading-C1LKdVP8.mjs → useIncrementalLoading-DmOT2MXH.mjs} +4 -4
  95. package/dist/{useInvoiceData-HNnt3703.js → useInvoiceData-Bl87gzIS.js} +1 -1
  96. package/dist/{useInvoiceData-Bz4a2Mfa.mjs → useInvoiceData-Di5pLPM0.mjs} +2 -2
  97. package/dist/{useInvoicesList-DXBTGdcI.js → useInvoicesList-CFk-_oVK.js} +1 -1
  98. package/dist/{useInvoicesList-b2_fiHsc.mjs → useInvoicesList-z19cteaD.mjs} +4 -4
  99. package/dist/{useLoadInitialData-D0t-Lk3k.js → useLoadInitialData-CTqfiMTN.js} +1 -1
  100. package/dist/{useLoadInitialData-Cyp1xpuv.mjs → useLoadInitialData-CkpryfjF.mjs} +1 -1
  101. package/dist/{usePaymentMethodOptions-r0Opz7BC.mjs → usePaymentMethodOptions-BoGHJjng.mjs} +2 -2
  102. package/dist/{usePaymentMethodOptions-DgGDcVeE.js → usePaymentMethodOptions-BsCZnCQW.js} +1 -1
  103. package/dist/{usePaymentMethods-BHLXXaCa.js → usePaymentMethods-AC-4rrR9.js} +1 -1
  104. package/dist/{usePaymentMethods-C-NCtOom.mjs → usePaymentMethods-ocHmNoP7.mjs} +2 -2
  105. package/dist/{usePayments-DADpdoI7.js → usePayments-CgXZeWrU.js} +1 -1
  106. package/dist/{usePayments-BtByiIMy.mjs → usePayments-D85eB5l4.mjs} +3 -3
  107. package/dist/{usePortal-CpW3EDD-.mjs → usePortal-B1O1zgdV.mjs} +1 -1
  108. package/dist/{usePortal-DhaZBAGi.js → usePortal-DVD7PcWI.js} +1 -1
  109. package/dist/{useService-C0h9UlQW.js → useService-CHrkefKd.js} +1 -1
  110. package/dist/{useService-BcYQRxPS.mjs → useService-DF57xuDd.mjs} +1 -1
  111. package/dist/{useWalletBalanceItems-COzKSpmt.js → useWalletBalanceItems-BL-R5foK.js} +1 -1
  112. package/dist/{useWalletBalanceItems-DKz-2vUy.mjs → useWalletBalanceItems-COQDLfoZ.mjs} +3 -3
  113. package/dist/{vendor-ui-CdOX_IS-.mjs → vendor-ui-B8IlviSs.mjs} +6483 -5867
  114. package/dist/vendor-ui-C3Tq-qY_.js +1 -0
  115. package/package.json +5 -4
  116. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +0 -1
  117. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-zdBaVj-K.js +0 -1
  118. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BhGQB-c9.js +0 -1
  119. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BuJGxitV.js +0 -1
  120. package/dist/adyen-BvNyYAg-.js +0 -1
  121. package/dist/component-By_A1VHh.js +0 -1
  122. package/dist/component-CGfjV_7z.mjs +0 -889
  123. package/dist/paymentMethods-BR9w3qy8.js +0 -1
  124. package/dist/registry-DrV0jFnM.js +0 -1
  125. package/dist/useIncrementalLoading-FNH4k4a3.js +0 -1
  126. package/dist/vendor-ui-1SHma7t1.js +0 -1
@@ -1 +1 @@
1
- const i=require("./vendor-ui-1SHma7t1.js"),e=require("./component-By_A1VHh.js"),r="/portal/pricing-plan-subscriptions";exports.createSubscriptionsService=function(){const n=e.useConfig(),_=e.createRequestService();return{getSubscription:function({id:e,expanded:c=!1}){const s=c?["pricing_plan_schedule_infos.id","pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id","pricing_plan_schedule_infos.pricing_plan_version.credit_types","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.product_category_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.entitlements.feature_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id"]:[];return _({url:`${n.apiUrls.config}${r}/${e}${i.serializeQueryParams(i.withExpand({expandParams:s}))}`})},getActiveSubscriptions:function({customerId:e,pagination:c}){const s=c??{},p=i.withExpand({initialParams:{customer_id:e,statuses:["ACTIVE"],type:"BILLING"},expandParams:["pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id"]}),t=i.serializeQueryParams(i.withPagination(p,s));return _({url:`${n.apiUrls.config}${r}${t}`,isCollection:!0})}}};
1
+ const i=require("./vendor-ui-C3Tq-qY_.js"),e=require("./component-Bs8oszfD.js"),r="/portal/pricing-plan-subscriptions";exports.createSubscriptionsService=function(){const n=e.useConfig(),_=e.createRequestService();return{getSubscription:function({id:e,expanded:c=!1}){const s=c?["pricing_plan_schedule_infos.id","pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id","pricing_plan_schedule_infos.pricing_plan_version.credit_types","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.product_category_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.entitlements.feature_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id"]:[];return _({url:`${n.apiUrls.config}${r}/${e}${i.serializeQueryParams(i.withExpand({expandParams:s}))}`})},getActiveSubscriptions:function({customerId:e,pagination:c}){const s=c??{},p=i.withExpand({initialParams:{customer_id:e,statuses:["ACTIVE"],type:"BILLING"},expandParams:["pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id"]}),t=i.serializeQueryParams(i.withPagination(p,s));return _({url:`${n.apiUrls.config}${r}${t}`,isCollection:!0})}}};
@@ -1,5 +1,16 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeClass, createTextVNode, toDisplayString, renderSlot, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$1, l as _sfc_main$2, b as _sfc_main$3 } from "./vendor-ui-CdOX_IS-.mjs";
2
+ import { _ as _sfc_main$1, A as _sfc_main$2, e as _sfc_main$3 } from "./vendor-ui-B8IlviSs.mjs";
3
+ function toMinorUnitAmount(amount) {
4
+ const formatter = new Intl.NumberFormat(void 0, {
5
+ style: "currency",
6
+ currency: amount.currency
7
+ });
8
+ const { maximumFractionDigits = 10 } = formatter.resolvedOptions();
9
+ return {
10
+ value: Math.round(+amount.quantity * Math.pow(10, maximumFractionDigits)),
11
+ currency: amount.currency
12
+ };
13
+ }
3
14
  const _hoisted_1 = { class: "flex flex-col items-center py-10" };
4
15
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
16
  __name: "PaymentFeedbackCard",
@@ -47,44 +58,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
58
  };
48
59
  }
49
60
  });
50
- const SAFE_PROTOCOLS = /* @__PURE__ */ new Set(["https:", "http:"]);
51
- function getQueryParam(name, locationSearch = window.location.search) {
52
- const currentUrl = new URLSearchParams(locationSearch);
53
- return currentUrl.get(name);
54
- }
55
- function sanitizeUrl(url) {
56
- try {
57
- const parsed = new URL(url);
58
- if (!SAFE_PROTOCOLS.has(parsed.protocol)) return "";
59
- return url;
60
- } catch {
61
- return "";
62
- }
63
- }
64
- function safeUrlRedirect(url) {
65
- const safe = sanitizeUrl(url);
66
- if (safe) window.location.replace(safe);
67
- }
68
61
  const PAYMENT_ACCEPTOR_ID_QUERY_STRING = "payment_acceptor_id";
69
62
  const REDIRECT_RESULT_QUERY_STRING = "redirectResult";
70
63
  function getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionResponse) {
71
64
  var _a, _b;
72
65
  return (_b = (_a = paymentMethodOptionResponse.integration.payment_gateway) == null ? void 0 : _a.adyen) == null ? void 0 : _b.public_key;
73
66
  }
74
- function transformToAdyenAmount(amount) {
75
- const formatter = new Intl.NumberFormat(void 0, {
76
- style: "currency",
77
- currency: amount.currency
78
- });
79
- const { maximumFractionDigits = 10 } = formatter.resolvedOptions();
80
- return {
81
- value: Math.round(+amount.quantity * Math.pow(10, maximumFractionDigits)),
82
- currency: amount.currency
83
- };
84
- }
85
67
  function mapAdyenPaymentMethods(paymentMethodOptionResponse) {
86
68
  var _a;
87
- return ((_a = paymentMethodOptionResponse.options) == null ? void 0 : _a.flatMap(
69
+ return ((_a = paymentMethodOptionResponse.options) == null ? void 0 : _a.filter((option) => option.payment_gateway_variant === "ADYEN").flatMap(
88
70
  (adyenPaymentMethodOption) => mapAdyenPaymentMethod(adyenPaymentMethodOption.adyen)
89
71
  )) ?? [];
90
72
  }
@@ -139,7 +121,7 @@ function getAdyenExpressCheckoutConfiguration({
139
121
  logger
140
122
  }) {
141
123
  return {
142
- ...amount ? { amount: transformToAdyenAmount(amount) } : {},
124
+ ...amount ? { amount: toMinorUnitAmount(amount) } : {},
143
125
  analytics: { enabled: false },
144
126
  clientKey: getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionResponse),
145
127
  countryCode,
@@ -156,17 +138,35 @@ function getAdyenExpressCheckoutConfiguration({
156
138
  function transformObjectToAdyenObject(obj) {
157
139
  return obj ? Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, String(value)])) : void 0;
158
140
  }
141
+ const SAFE_PROTOCOLS = /* @__PURE__ */ new Set(["https:", "http:"]);
142
+ function getQueryParam(name, locationSearch = window.location.search) {
143
+ const currentUrl = new URLSearchParams(locationSearch);
144
+ return currentUrl.get(name);
145
+ }
146
+ function sanitizeUrl(url) {
147
+ try {
148
+ const parsed = new URL(url);
149
+ if (!SAFE_PROTOCOLS.has(parsed.protocol)) return "";
150
+ return url;
151
+ } catch {
152
+ return "";
153
+ }
154
+ }
155
+ function safeUrlRedirect(url) {
156
+ const safe = sanitizeUrl(url);
157
+ if (safe) window.location.replace(safe);
158
+ }
159
159
  export {
160
160
  PAYMENT_ACCEPTOR_ID_QUERY_STRING as P,
161
161
  REDIRECT_RESULT_QUERY_STRING as R,
162
162
  _sfc_main as _,
163
163
  getAdyenEnvironmentFromPaymentMethodOptionsResponse as a,
164
164
  getAdyenClientKeyFromPaymentMethodOptionsResponse as b,
165
- transformObjectToAdyenObject as c,
166
- createReturnUrl as d,
165
+ createReturnUrl as c,
166
+ transformObjectToAdyenObject as d,
167
167
  getAdyenExpressCheckoutConfiguration as e,
168
168
  getQueryParam as g,
169
169
  mapAdyenPaymentMethods as m,
170
170
  safeUrlRedirect as s,
171
- transformToAdyenAmount as t
171
+ toMinorUnitAmount as t
172
172
  };
@@ -0,0 +1 @@
1
+ const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js");function n(e){const t=new Intl.NumberFormat(void 0,{style:"currency",currency:e.currency}),{maximumFractionDigits:n=10}=t.resolvedOptions();return{value:Math.round(+e.quantity*Math.pow(10,n)),currency:e.currency}}const r={class:"flex flex-col items-center py-10"},o=e.defineComponent({__name:"PaymentFeedbackCard",props:{status:{default:"success",type:String},title:{type:String}},setup:n=>(o,a)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),null,{default:e.withCtx(()=>[e.createElementVNode("div",r,[e.createVNode(e.unref(t._sfc_main$14),{icon:"success"===n.status?"check_circle":"error",class:e.normalizeClass({"text-green-400":"success"===n.status,"text-red-600":"error"===n.status}),size:"lg"},null,8,["icon","class"]),e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-3",tag:"span",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1}),o.$slots.default?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,tag:"div",variant:"body-sm"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])]),_:3}))}),a="payment_acceptor_id";function s(e){var t,n;return null==(n=null==(t=e.integration.payment_gateway)?void 0:t.adyen)?void 0:n.public_key}function i(e){var t;return(null==(t=e.options)?void 0:t.filter(e=>"ADYEN"===e.payment_gateway_variant).flatMap(e=>{return{type:(t=e.adyen).type,name:t.name,...t.issuers?{issuers:t.issuers}:{},...t.brands?{brands:t.brands}:{},...t.funding_source?{fundingSource:t.funding_source}:{},...t.configuration?{configuration:t.configuration}:{}};var t}))??[]}function c(e,t){var n,r;const o=null==(r=null==(n=null==e?void 0:e.integration.payment_gateway)?void 0:n.adyen)?void 0:r.environment;if(!o)return t.warn("ADYEN_INVALID_CONFIGURATION","No environment set for adyen advanced flow, defaulted to live"),"live";switch(o){case"TEST":return"test";case"LIVE_IN":return"live-in";case"LIVE_AU":return"live-au";case"LIVE_US":return"live-us";case"LIVE_APSE":return"live-apse";case"LIVE":return"live";default:return t.warn("ADYEN_INVALID_CONFIGURATION",`Unsupported environment "${o}" for adyen advanced flow, defaulted to "live"`),"live"}}const u=new Set(["https:","http:"]);exports.PAYMENT_ACCEPTOR_ID_QUERY_STRING=a,exports.REDIRECT_RESULT_QUERY_STRING="redirectResult",exports._sfc_main=o,exports.createReturnUrl=function({paymentAcceptorId:e,redirectUrl:t=window.location.href}){const n=new URL(t);return n.searchParams.set(a,e),n.toString()},exports.getAdyenClientKeyFromPaymentMethodOptionsResponse=s,exports.getAdyenEnvironmentFromPaymentMethodOptionsResponse=c,exports.getAdyenExpressCheckoutConfiguration=function({amount:e,countryCode:t,locale:r,paymentMethodOptionResponse:o,logger:a}){return{...e?{amount:n(e)}:{},analytics:{enabled:!1},clientKey:s(o),countryCode:t,environment:c(o,a),locale:r,paymentMethodsResponse:{paymentMethods:i(o)}}},exports.getQueryParam=function(e,t=window.location.search){return new URLSearchParams(t).get(e)},exports.mapAdyenPaymentMethods=i,exports.safeUrlRedirect=function(e){const t=function(e){try{const t=new URL(e);return u.has(t.protocol)?e:""}catch{return""}}(e);t&&window.location.replace(t)},exports.toMinorUnitAmount=n,exports.transformObjectToAdyenObject=function(e){return e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,String(t)])):void 0};
@@ -1 +1 @@
1
- const t=require("vue"),i=require("./component-By_A1VHh.js");exports.useActionDispatchProvider=function(){const o=t.inject(i.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!o)throw new Error("dispatchAction is not provided");return{dispatchAction:o}};
1
+ const t=require("vue"),i=require("./component-Bs8oszfD.js");exports.useActionDispatchProvider=function(){const o=t.inject(i.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!o)throw new Error("dispatchAction is not provided");return{dispatchAction:o}};
@@ -1,5 +1,5 @@
1
1
  import { inject } from "vue";
2
- import { A as ACTION_DISPATCHER_PROVIDER_INJECTION_KEY } from "./component-CGfjV_7z.mjs";
2
+ import { A as ACTION_DISPATCHER_PROVIDER_INJECTION_KEY } from "./component-Bg2JVC_O.mjs";
3
3
  function useActionDispatchProvider() {
4
4
  const dispatchAction = inject(ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);
5
5
  if (!dispatchAction) {
@@ -1,6 +1,6 @@
1
1
  import { ref } from "vue";
2
- import { c as createCustomerService } from "./customer-Bn6GdxP8.mjs";
3
- import { u as useService } from "./useService-BcYQRxPS.mjs";
2
+ import { c as createCustomerService } from "./customer-Bv_fqXzO.mjs";
3
+ import { u as useService } from "./useService-DF57xuDd.mjs";
4
4
  function useCustomer({ customerId }) {
5
5
  const { getCustomer, updateCustomer } = createCustomerService();
6
6
  const customer = ref();
@@ -1 +1 @@
1
- const e=require("vue"),r=require("./customer-CGyZojAB.js"),t=require("./useService-C0h9UlQW.js");exports.useCustomer=function({customerId:u}){const{getCustomer:s,updateCustomer:c}=r.createCustomerService(),a=e.ref(),{data:o,...i}=t.useService({service:async()=>{const e=await s(u);return a.value=e,e}}),{data:n,...v}=t.useService({service:async e=>{const r=await c(u,e);return a.value=r,r}});return{customer:a,get:i,update:v}};
1
+ const e=require("vue"),r=require("./customer-_W8gIX5m.js"),t=require("./useService-CHrkefKd.js");exports.useCustomer=function({customerId:u}){const{getCustomer:s,updateCustomer:c}=r.createCustomerService(),a=e.ref(),{data:o,...i}=t.useService({service:async()=>{const e=await s(u);return a.value=e,e}}),{data:n,...v}=t.useService({service:async e=>{const r=await c(u,e);return a.value=r,r}});return{customer:a,get:i,update:v}};
@@ -0,0 +1 @@
1
+ const e=require("./ApiStatus-oqvUEWJx.js"),a=require("./vendor-ui-C3Tq-qY_.js"),t=require("vue");exports.useIncrementalLoading=function({initialData:i=[],service:n}){const u=t.shallowRef(i),l=t.ref(e.ApiStatus.Initial),s=t.ref(null),r=t.ref(1),o=t.ref(!1),c=t.computed(()=>l.value===e.ApiStatus.Loading),v=async(t,{replace:i=!1}={})=>{var v;if(!c.value)try{s.value=null,l.value=e.ApiStatus.Loading;const c=await n(t);if(!a.isApiSuccessCollectionResponse(c))return void(l.value=e.ApiStatus.Done);o.value=!!(null==(v=c.links)?void 0:v.next),u.value=i?c.data:[...u.value,...c.data],l.value=e.ApiStatus.Done,r.value=t}catch(d){s.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(d),l.value=e.ApiStatus.Failed}};return{items:t.computed(()=>structuredClone(u.value)),error:s,fetchInitial:async()=>await v(1,{replace:!0}),fetchMore:async()=>await v(r.value+1),fetchAll:async()=>{s.value=null,l.value=e.ApiStatus.Loading;const t=await a.getPaginatedFullList(async t=>{const i=await n(t);if(!a.isApiSuccessCollectionResponse(i))throw l.value=e.ApiStatus.Failed,new Error("message"in i?i.message:"Request failed");return i});u.value=t.data,l.value=e.ApiStatus.Done},isPending:c,hasNextBatch:o}};
@@ -1,5 +1,5 @@
1
1
  import { A as ApiStatus } from "./ApiStatus-CyNDp_op.mjs";
2
- import { g as getPaginatedFullList, i as isApiSuccessCollectionResponse } from "./vendor-ui-CdOX_IS-.mjs";
2
+ import { h as getPaginatedFullList, i as isApiSuccessCollectionResponse } from "./vendor-ui-B8IlviSs.mjs";
3
3
  import { shallowRef, ref, computed } from "vue";
4
4
  function toError(error) {
5
5
  return error instanceof Error ? error : new Error("Something went wrong while fetching data.");
@@ -14,7 +14,7 @@ function useIncrementalLoading({
14
14
  const page = ref(1);
15
15
  const hasNextBatch = ref(false);
16
16
  const isPending = computed(() => status.value === ApiStatus.Loading);
17
- const loadPage = async (pageNumber) => {
17
+ const loadPage = async (pageNumber, { replace = false } = {}) => {
18
18
  var _a;
19
19
  if (isPending.value) return;
20
20
  try {
@@ -26,7 +26,7 @@ function useIncrementalLoading({
26
26
  return;
27
27
  }
28
28
  hasNextBatch.value = !!((_a = response.links) == null ? void 0 : _a.next);
29
- items.value = [...items.value, ...response.data];
29
+ items.value = replace ? response.data : [...items.value, ...response.data];
30
30
  status.value = ApiStatus.Done;
31
31
  page.value = pageNumber;
32
32
  } catch (err) {
@@ -53,7 +53,7 @@ function useIncrementalLoading({
53
53
  };
54
54
  const nonMutableItems = computed(() => structuredClone(items.value));
55
55
  const fetchInitial = async () => {
56
- return await loadPage(1);
56
+ return await loadPage(1, { replace: true });
57
57
  };
58
58
  return {
59
59
  items: nonMutableItems,
@@ -1 +1 @@
1
- const e=require("./invoices-DDeL8tvI.js"),t=require("./payments-C0vYbn5Q.js"),n=require("vue"),a=require("./useWatchDebounced-C_YxgoQ6.js");exports.useInvoiceData=function(c){const{getInvoice:r}=e.createInvoicesService(),{getPayments:s}=t.createPaymentsService();return(({getData:e,onError:t,watchValue:c,debounce:r=200})=>{const s=n.ref(),u=n.ref(!0),i=async()=>{try{s.value=await e(c)}catch(n){null==t||t(n)}finally{u.value=!1}};return c&&a.useWatchDebounced(c,()=>{i()},{debounce:r}),n.onMounted(async()=>{i()}),{data:s,isPending:u}})({getData:async()=>{const[e,t]=await Promise.all([r(c),s(c)]);return{invoice:e,paymentAttempts:t}}})};
1
+ const e=require("./invoices-D-OKipCg.js"),t=require("./payments-DMDDI3MK.js"),n=require("vue"),a=require("./useWatchDebounced-C_YxgoQ6.js");exports.useInvoiceData=function(c){const{getInvoice:r}=e.createInvoicesService(),{getPayments:s}=t.createPaymentsService();return(({getData:e,onError:t,watchValue:c,debounce:r=200})=>{const s=n.ref(),u=n.ref(!0),i=async()=>{try{s.value=await e(c)}catch(n){null==t||t(n)}finally{u.value=!1}};return c&&a.useWatchDebounced(c,()=>{i()},{debounce:r}),n.onMounted(async()=>{i()}),{data:s,isPending:u}})({getData:async()=>{const[e,t]=await Promise.all([r(c),s(c)]);return{invoice:e,paymentAttempts:t}}})};
@@ -1,5 +1,5 @@
1
- import { c as createInvoicesService } from "./invoices-Rs-QBUGS.mjs";
2
- import { c as createPaymentsService } from "./payments-DGPENXiS.mjs";
1
+ import { c as createInvoicesService } from "./invoices-BGb0AwVF.mjs";
2
+ import { c as createPaymentsService } from "./payments-CpzTVrQM.mjs";
3
3
  import { ref, onMounted } from "vue";
4
4
  import { u as useWatchDebounced } from "./useWatchDebounced-Zmxd6InB.mjs";
5
5
  const useData = ({
@@ -1 +1 @@
1
- const e=require("vue"),t=require("./vendor-ui-1SHma7t1.js"),i=require("./useActionDispatchProvider-aqYyqIdb.js"),o=require("./useIncrementalLoading-FNH4k4a3.js"),a=require("./invoices-DDeL8tvI.js"),n={class:"sv-table sv-invoices-list__table grid-cols-1 gap-4"},s=["onClick"],c={class:"flex flex-col"},l={class:"sv-invoices-list__load-more mt-2 flex items-center justify-center"},r=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(i){const o=i,{formatDate:a,$t:r}=t.useIntl(),d=e.computed(()=>o.configuration.showPayButton),u=e.computed(()=>o.configuration.showViewButton),_=e.computed(()=>o.hasMoreItems);return(o,v)=>(e.openBlock(),e.createElementBlock("div",n,[e.createVNode(e.unref(t._sfc_main$7),{striped:"","no-border":"",rounded:"",hoverable:"","stripe-class":"group-odd:bg-gray-50/50"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHead),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHeadRow),{class:"sv-table__head"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--invoice"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--date hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--amount"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--status text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(t.TableBody),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.invoices,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$9),{key:i.id,class:"sv-table__row sv-invoices-list__row"},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$10),{"has-padding":"",class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--invoice h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(t._sfc_main$10),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--date hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$10),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--amount h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$11),{value:i.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$10),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--status h-14 text-right"},{default:e.withCtx(()=>[i.paid?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$4),{key:0,color:"green"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):d.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:1,variant:"outline",color:"gray",size:"sm",class:"sv-action sv-action--secondary sv-invoices-list__pay",type:"button",onClick:e.withModifiers(e=>o.$emit("pay-invoice",{invoiceId:i.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[u.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"sv-invoices-list__row-action absolute inset-0 h-full w-full",onClick:e=>o.$emit("view-invoice",{invoiceId:i.id})},null,8,s)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",l,[_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"outline",color:"gray",size:"sm",class:"sv-action sv-action--secondary sv-action--full-width w-full",loading:i.isLoading,onClick:v[0]||(v[0]=e=>o.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),d=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{default:()=>({showPayButton:!0,showViewButton:!0,pagination:{batchSize:15,enabled:!0}}),type:Object}},emits:["load-more"],setup(o){const{$t:a}=t.useIntl(),{dispatchAction:n}=i.useActionDispatchProvider();return(i,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-invoices-list sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(r,{class:"sv-invoices-list__table",configuration:o.configuration,"has-more-items":o.hasMoreItems,invoices:o.invoices,"is-loading":o.isLoading,onLoadMore:s[0]||(s[0]=e=>i.$emit("load-more")),onViewInvoice:s[1]||(s[1]=t=>e.unref(n)({action:"view-invoice",data:{invoiceId:t.invoiceId}})),onPayInvoice:s[2]||(s[2]=t=>e.unref(n)({action:"pay-invoice",data:{invoiceId:t.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});exports._sfc_main=d,exports.useInvoicesList=function({customerId:e,batchSize:t=15}){const i=a.createInvoicesService();return o.useIncrementalLoading({service:async o=>i.getInvoices({customerId:e,pagination:{page:o,pageSize:t}})})};
1
+ const e=require("vue"),t=require("./vendor-ui-C3Tq-qY_.js"),i=require("./useActionDispatchProvider-BHTknMoH.js"),o=require("./useIncrementalLoading-CuSndpP2.js"),a=require("./invoices-D-OKipCg.js"),n={class:"sv-table sv-invoices-list__table grid-cols-1 gap-4"},s=["onClick"],c={class:"flex flex-col"},l={class:"sv-invoices-list__load-more mt-2 flex items-center justify-center"},r=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(i){const o=i,{formatDate:a,$t:r}=t.useIntl(),d=e.computed(()=>o.configuration.showPayButton),u=e.computed(()=>o.configuration.showViewButton),_=e.computed(()=>o.hasMoreItems);return(o,v)=>(e.openBlock(),e.createElementBlock("div",n,[e.createVNode(e.unref(t._sfc_main$7),{striped:"","no-border":"",rounded:"",hoverable:"","stripe-class":"group-odd:bg-gray-50/50"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHead),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHeadRow),{class:"sv-table__head"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--invoice"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--date hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--amount"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$8),{class:"sv-table__cell sv-invoices-list__cell--status text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(t.TableBody),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.invoices,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$9),{key:i.id,class:"sv-table__row sv-invoices-list__row"},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$10),{"has-padding":"",class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--invoice h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main$3),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$3),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(t._sfc_main$10),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--date hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$10),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--amount h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$3),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$11),{value:i.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$10),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--status h-14 text-right"},{default:e.withCtx(()=>[i.paid?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$5),{key:0,color:"green"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):d.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:1,variant:"outline",color:"gray",size:"sm",class:"sv-action sv-action--secondary sv-invoices-list__pay",type:"button",onClick:e.withModifiers(e=>o.$emit("pay-invoice",{invoiceId:i.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[u.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"sv-invoices-list__row-action absolute inset-0 h-full w-full",onClick:e=>o.$emit("view-invoice",{invoiceId:i.id})},null,8,s)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",l,[_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,variant:"outline",color:"gray",size:"sm",class:"sv-action sv-action--secondary sv-action--full-width w-full",loading:i.isLoading,onClick:v[0]||(v[0]=e=>o.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),d=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{default:()=>({showPayButton:!0,showViewButton:!0,pagination:{batchSize:15,enabled:!0}}),type:Object}},emits:["load-more"],setup(o){const{$t:a}=t.useIntl(),{dispatchAction:n}=i.useActionDispatchProvider();return(i,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-invoices-list sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(r,{class:"sv-invoices-list__table",configuration:o.configuration,"has-more-items":o.hasMoreItems,invoices:o.invoices,"is-loading":o.isLoading,onLoadMore:s[0]||(s[0]=e=>i.$emit("load-more")),onViewInvoice:s[1]||(s[1]=t=>e.unref(n)({action:"view-invoice",data:{invoiceId:t.invoiceId}})),onPayInvoice:s[2]||(s[2]=t=>e.unref(n)({action:"pay-invoice",data:{invoiceId:t.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});exports._sfc_main=d,exports.useInvoicesList=function({customerId:e,batchSize:t=15}){const i=a.createInvoicesService();return o.useIncrementalLoading({service:async o=>i.getInvoices({customerId:e,pagination:{page:o,pageSize:t}})})};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createBlock, createSlots, createElementVNode, withModifiers, createCommentVNode } from "vue";
2
- import { u as useIntl, m as _sfc_main$2, T as TableHead, n as TableHeadRow, o as _sfc_main$3, p as TableBody, q as _sfc_main$4, r as _sfc_main$5, b as _sfc_main$6, t as _sfc_main$7, f as _sfc_main$8, e as _sfc_main$9, _ as _sfc_main$a } from "./vendor-ui-CdOX_IS-.mjs";
3
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Ca1YbU61.mjs";
4
- import { u as useIncrementalLoading } from "./useIncrementalLoading-C1LKdVP8.mjs";
5
- import { c as createInvoicesService } from "./invoices-Rs-QBUGS.mjs";
2
+ import { u as useIntl, o as _sfc_main$2, T as TableHead, p as TableHeadRow, q as _sfc_main$3, r as TableBody, t as _sfc_main$4, v as _sfc_main$5, e as _sfc_main$6, x as _sfc_main$7, k as _sfc_main$8, c as _sfc_main$9, _ as _sfc_main$a } from "./vendor-ui-B8IlviSs.mjs";
3
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
4
+ import { u as useIncrementalLoading } from "./useIncrementalLoading-DmOT2MXH.mjs";
5
+ import { c as createInvoicesService } from "./invoices-BGb0AwVF.mjs";
6
6
  const _hoisted_1 = { class: "sv-table sv-invoices-list__table grid-cols-1 gap-4" };
7
7
  const _hoisted_2 = ["onClick"];
8
8
  const _hoisted_3 = { class: "flex flex-col" };
@@ -1 +1 @@
1
- const e=require("vue"),a=require("./component-By_A1VHh.js");exports.useLoadInitialData=function(...o){const t=e.ref(!0),n=a.useLogger();return e.onMounted(async()=>{await Promise.all(o).then(()=>{t.value=!1}).catch(e=>{t.value=!1,n.error("INITIAL_DATA_LOAD_FAILED","Failed to load initial data",{},e)})}),{isLoading:t}};
1
+ const e=require("vue"),a=require("./component-Bs8oszfD.js");exports.useLoadInitialData=function(...o){const t=e.ref(!0),n=a.useLogger();return e.onMounted(async()=>{await Promise.all(o).then(()=>{t.value=!1}).catch(e=>{t.value=!1,n.error("INITIAL_DATA_LOAD_FAILED","Failed to load initial data",{},e)})}),{isLoading:t}};
@@ -1,5 +1,5 @@
1
1
  import { ref, onMounted } from "vue";
2
- import { a as useLogger } from "./component-CGfjV_7z.mjs";
2
+ import { a as useLogger } from "./component-Bg2JVC_O.mjs";
3
3
  function useLoadInitialData(...services) {
4
4
  const isLoading = ref(true);
5
5
  const logger = useLogger();
@@ -1,5 +1,5 @@
1
- import { u as useService } from "./useService-BcYQRxPS.mjs";
2
- import { c as createPaymentMethodsService } from "./paymentMethods-DOH9-6M1.mjs";
1
+ import { u as useService } from "./useService-DF57xuDd.mjs";
2
+ import { c as createPaymentMethodsService } from "./paymentMethods-DvqlWe96.mjs";
3
3
  function hasCustomerId(payload) {
4
4
  return payload.customerId !== void 0;
5
5
  }
@@ -1 +1 @@
1
- const e=require("./useService-C0h9UlQW.js"),t=require("./paymentMethods-BR9w3qy8.js");exports.usePaymentMethodOptions=function(){const{getPaymentMethodOptions:n}=t.createPaymentMethodsService(),{data:o,execute:r,apiStatus:u,error:i,isPending:s}=e.useService({initialValue:[],service:e=>function(e){return void 0!==e.customerId}(e)?n({customerId:e.customerId,amount:e.amount,country:e.country}):n({subscriptionId:e.subscriptionId,amount:e.amount,country:e.country})});return{paymentMethodOptions:o,get:r,apiStatus:u,error:i,isPending:s}};
1
+ const e=require("./useService-CHrkefKd.js"),t=require("./paymentMethods-DIbB759g.js");exports.usePaymentMethodOptions=function(){const{getPaymentMethodOptions:n}=t.createPaymentMethodsService(),{data:o,execute:r,apiStatus:u,error:i,isPending:s}=e.useService({initialValue:[],service:e=>function(e){return void 0!==e.customerId}(e)?n({customerId:e.customerId,amount:e.amount,country:e.country}):n({subscriptionId:e.subscriptionId,amount:e.amount,country:e.country})});return{paymentMethodOptions:o,get:r,apiStatus:u,error:i,isPending:s}};
@@ -1 +1 @@
1
- const e=require("./useIncrementalLoading-FNH4k4a3.js"),t=require("./paymentMethods-BR9w3qy8.js");exports.usePaymentMethods=function({customerId:n,pageSize:s=15}){const{getPaymentMethods:a}=t.createPaymentMethodsService();return e.useIncrementalLoading({service:async e=>a({customerId:n,pagination:{page:e,pageSize:s}})})};
1
+ const e=require("./useIncrementalLoading-CuSndpP2.js"),t=require("./paymentMethods-DIbB759g.js");exports.usePaymentMethods=function({customerId:n,pageSize:s=15}){const{getPaymentMethods:a}=t.createPaymentMethodsService();return e.useIncrementalLoading({service:async e=>a({customerId:n,pagination:{page:e,pageSize:s}})})};
@@ -1,5 +1,5 @@
1
- import { u as useIncrementalLoading } from "./useIncrementalLoading-C1LKdVP8.mjs";
2
- import { c as createPaymentMethodsService } from "./paymentMethods-DOH9-6M1.mjs";
1
+ import { u as useIncrementalLoading } from "./useIncrementalLoading-DmOT2MXH.mjs";
2
+ import { c as createPaymentMethodsService } from "./paymentMethods-DvqlWe96.mjs";
3
3
  function usePaymentMethods({
4
4
  customerId,
5
5
  pageSize = 15
@@ -1 +1 @@
1
- const e=require("./invoices-DDeL8tvI.js"),i=require("./useService-C0h9UlQW.js"),t=require("./payments-C0vYbn5Q.js");exports.useInvoice=function({invoiceId:t}){const{getInvoice:r,getInvoicePdf:n}=e.createInvoicesService(),{data:s,execute:c,apiStatus:o,error:a,isPending:u}=i.useService({service:()=>r(t)});return{invoice:s,downloadInvoicePdf:n,apiStatus:o,error:a,get:c,isPending:u}},exports.usePayments=function(){const{getPayments:e}=t.createPaymentsService(),{data:r,execute:n,error:s,apiStatus:c,isPending:o}=i.useService({service:e,isCollection:!0});return{payments:r,get:n,error:s,apiStatus:c,isPending:o}};
1
+ const e=require("./invoices-D-OKipCg.js"),i=require("./useService-CHrkefKd.js"),t=require("./payments-DMDDI3MK.js");exports.useInvoice=function({invoiceId:t}){const{getInvoice:r,getInvoicePdf:n}=e.createInvoicesService(),{data:s,execute:c,apiStatus:o,error:a,isPending:u}=i.useService({service:()=>r(t)});return{invoice:s,downloadInvoicePdf:n,apiStatus:o,error:a,get:c,isPending:u}},exports.usePayments=function(){const{getPayments:e}=t.createPaymentsService(),{data:r,execute:n,error:s,apiStatus:c,isPending:o}=i.useService({service:e,isCollection:!0});return{payments:r,get:n,error:s,apiStatus:c,isPending:o}};
@@ -1,6 +1,6 @@
1
- import { c as createInvoicesService } from "./invoices-Rs-QBUGS.mjs";
2
- import { u as useService } from "./useService-BcYQRxPS.mjs";
3
- import { c as createPaymentsService } from "./payments-DGPENXiS.mjs";
1
+ import { c as createInvoicesService } from "./invoices-BGb0AwVF.mjs";
2
+ import { u as useService } from "./useService-DF57xuDd.mjs";
3
+ import { c as createPaymentsService } from "./payments-CpzTVrQM.mjs";
4
4
  function useInvoice({ invoiceId }) {
5
5
  const { getInvoice, getInvoicePdf: downloadInvoicePdf } = createInvoicesService();
6
6
  const service = () => getInvoice(invoiceId);
@@ -1,5 +1,5 @@
1
1
  import { inject } from "vue";
2
- import { P as PORTAL_INJECTION_KEY } from "./component-CGfjV_7z.mjs";
2
+ import { P as PORTAL_INJECTION_KEY } from "./component-Bg2JVC_O.mjs";
3
3
  function usePortal() {
4
4
  const portal = inject(PORTAL_INJECTION_KEY);
5
5
  if (!portal) {
@@ -1 +1 @@
1
- const r=require("vue"),e=require("./component-By_A1VHh.js");exports.usePortal=function(){const o=r.inject(e.PORTAL_INJECTION_KEY);if(!o)throw new Error("PortalProvider is not provided");return o};
1
+ const r=require("vue"),e=require("./component-Bs8oszfD.js");exports.usePortal=function(){const o=r.inject(e.PORTAL_INJECTION_KEY);if(!o)throw new Error("PortalProvider is not provided");return o};
@@ -1 +1 @@
1
- const e=require("./ApiStatus-oqvUEWJx.js"),t=require("vue"),r=require("./vendor-ui-1SHma7t1.js");function n(e,t){return t?function(e){if(!function(e){return"object"==typeof e&&null!==e&&"data"in e}(e))throw new Error("Expected collection response.");return e.data}(e):e}exports.useService=function({initialValue:i,service:u,isCollection:a=!1}){const o=t.shallowRef(i),l=t.ref(e.ApiStatus.Initial),s=t.ref(null),c=t.computed(()=>l.value===e.ApiStatus.Loading);return{data:o,execute:async(...t)=>{try{l.value=e.ApiStatus.Loading,s.value=null;const f=n(await u(...t),a);return i=o,c=f,r.isEqual(i.value,c)||(i.value=c),l.value=e.ApiStatus.Done,f}catch(f){return s.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(f),l.value=e.ApiStatus.Failed,Promise.reject()}var i,c},apiStatus:l,isPending:c,error:s}};
1
+ const e=require("./ApiStatus-oqvUEWJx.js"),t=require("vue"),r=require("./vendor-ui-C3Tq-qY_.js");function n(e,t){return t?function(e){if(!function(e){return"object"==typeof e&&null!==e&&"data"in e}(e))throw new Error("Expected collection response.");return e.data}(e):e}exports.useService=function({initialValue:i,service:u,isCollection:a=!1}){const o=t.shallowRef(i),l=t.ref(e.ApiStatus.Initial),s=t.ref(null),c=t.computed(()=>l.value===e.ApiStatus.Loading);return{data:o,execute:async(...t)=>{try{l.value=e.ApiStatus.Loading,s.value=null;const v=n(await u(...t),a);return i=o,c=v,r.isEqual(i.value,c)||(i.value=c),l.value=e.ApiStatus.Done,v}catch(v){return s.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(v),l.value=e.ApiStatus.Failed,Promise.reject()}var i,c},apiStatus:l,isPending:c,error:s}};
@@ -1,6 +1,6 @@
1
1
  import { A as ApiStatus } from "./ApiStatus-CyNDp_op.mjs";
2
2
  import { shallowRef, ref, computed } from "vue";
3
- import { k as isEqual } from "./vendor-ui-CdOX_IS-.mjs";
3
+ import { n as isEqual } from "./vendor-ui-B8IlviSs.mjs";
4
4
  function updateRefIfChanged(ref2, value) {
5
5
  if (isEqual(ref2.value, value)) {
6
6
  return;
@@ -1 +1 @@
1
- const e=require("vue"),l=require("./component-By_A1VHh.js"),a=require("./useService-C0h9UlQW.js"),t=require("./vendor-ui-1SHma7t1.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js");const s=e.defineComponent({__name:"CustomerWalletBalancesBlock",props:{walletBalances:{type:Array}},setup(l){const{$t:a}=t.useIntl();return(n,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$15),{class:"sv-wallet-balances",items:l.walletBalances,title:e.unref(a)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(l.walletBalances.length)})},null,8,["items","title"]))}}),o=e.defineComponent({__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup(l){const{$t:a}=t.useIntl();return(o,c)=>l.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"})):l.hasError?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:1,class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(a)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})},null,8,["title"])):l.walletBalances.length>0?(e.openBlock(),e.createBlock(s,{key:2,class:"sv-wallet-balances sv-root sv-component","wallet-balances":l.walletBalances},null,8,["wallet-balances"])):e.createCommentVNode("",!0)}});exports._sfc_main=o,exports.useCustomerWalletBalances=function({customerId:t}){const{getCustomerWalletBalances:n}=function(){const e=l.createRequestService(),a=l.useConfig();return{getCustomerWalletBalances:function(l){return e({url:`${a.apiUrls.config}/portal/customers/${l}/wallets/balance`,options:{method:"POST"},data:{}})}}}(),{data:s,execute:o,apiStatus:c,error:r,isPending:u}=a.useService({service:()=>n(t)});return{walletBalances:e.computed(()=>s.value??null),apiStatus:c,error:r,fetch:o,isPending:u}},exports.useWalletBalanceItems=function(l){const{$t:a}=t.useIntl();return e.computed(()=>{var e;return((null==(e=l.value)?void 0:e.wallet_balances)??[]).map(e=>{var t;return{walletId:e.wallet_id,title:a({defaultMessage:"Balance",description:"Fallback wallet title in wallet balance components",id:"wallet_balance.wallet_ballance_title"}),balance:e.wallet_balance.open_balance,balanceAt:e.wallet_balance.balance_at??(null==(t=l.value)?void 0:t.balance_at)??null}})})};
1
+ const e=require("vue"),l=require("./component-Bs8oszfD.js"),a=require("./useService-CHrkefKd.js"),t=require("./vendor-ui-C3Tq-qY_.js"),n=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js");const s=e.defineComponent({__name:"CustomerWalletBalancesBlock",props:{walletBalances:{type:Array}},setup(l){const{$t:a}=t.useIntl();return(n,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{class:"sv-wallet-balances",items:l.walletBalances,title:e.unref(a)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(l.walletBalances.length)})},null,8,["items","title"]))}}),o=e.defineComponent({__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup(l){const{$t:a}=t.useIntl();return(o,c)=>l.isLoading?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:"section",class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"})):l.hasError?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$17),{key:1,class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(a)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})},null,8,["title"])):l.walletBalances.length>0?(e.openBlock(),e.createBlock(s,{key:2,class:"sv-wallet-balances sv-root sv-component","wallet-balances":l.walletBalances},null,8,["wallet-balances"])):e.createCommentVNode("",!0)}});exports._sfc_main=o,exports.useCustomerWalletBalances=function({customerId:t}){const{getCustomerWalletBalances:n}=function(){const e=l.createRequestService(),a=l.useConfig();return{getCustomerWalletBalances:function(l){return e({url:`${a.apiUrls.config}/portal/customers/${l}/wallets/balance`,options:{method:"POST"},data:{}})}}}(),{data:s,execute:o,apiStatus:c,error:r,isPending:u}=a.useService({service:()=>n(t)});return{walletBalances:e.computed(()=>s.value??null),apiStatus:c,error:r,fetch:o,isPending:u}},exports.useWalletBalanceItems=function(l){const{$t:a}=t.useIntl();return e.computed(()=>{var e;return((null==(e=l.value)?void 0:e.wallet_balances)??[]).map(e=>{var t;return{walletId:e.wallet_id,title:a({defaultMessage:"Balance",description:"Fallback wallet title in wallet balance components",id:"wallet_balance.wallet_ballance_title"}),balance:e.wallet_balance.open_balance,balanceAt:e.wallet_balance.balance_at??(null==(t=l.value)?void 0:t.balance_at)??null}})})};
@@ -1,7 +1,7 @@
1
1
  import { computed, defineComponent, openBlock, createBlock, unref, createCommentVNode } from "vue";
2
- import { c as createRequestService, u as useConfig } from "./component-CGfjV_7z.mjs";
3
- import { u as useService } from "./useService-BcYQRxPS.mjs";
4
- import { u as useIntl, B as _sfc_main$2, C as _sfc_main$4 } from "./vendor-ui-CdOX_IS-.mjs";
2
+ import { c as createRequestService, u as useConfig } from "./component-Bg2JVC_O.mjs";
3
+ import { u as useService } from "./useService-DF57xuDd.mjs";
4
+ import { u as useIntl, D as _sfc_main$2, E as _sfc_main$4 } from "./vendor-ui-B8IlviSs.mjs";
5
5
  import { _ as _sfc_main$3 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
6
6
  function createWalletsService() {
7
7
  const request = createRequestService();