@solvimon/solvimon-web 0.1.0-alpha.7 → 0.1.0-alpha.8

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 (202) hide show
  1. package/dist/ApiStatus-CyNDp_op.mjs +9 -0
  2. package/dist/ApiStatus-oqvUEWJx.js +1 -0
  3. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs} +2 -4
  5. package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-BTdixy3L.mjs} +2 -11
  6. package/dist/ContentWithAsideLayout-oAYVrLvL.js +1 -0
  7. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs} +2 -5
  8. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +1 -0
  9. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +1 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dt_Vb7Wz.mjs} +1 -2
  11. package/dist/PaymentHistoryBlock-DHM-3fh-.js +1 -0
  12. package/dist/PaymentHistoryBlock-YzJ6bxKr.mjs +4 -0
  13. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs} +1 -5
  14. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +1 -0
  15. package/dist/PaymentIntegrationForm-Cl5ua8v8.js +1 -0
  16. package/dist/PaymentIntegrationForm-ID4QnvA3.mjs +4 -0
  17. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs} +32 -189
  18. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +1 -0
  19. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js +1 -0
  20. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs} +5 -31
  21. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs} +4 -7
  22. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +1 -0
  23. package/dist/adyenLoader-CEH4A2b2.js +1 -0
  24. package/dist/adyenLoader-gsbzSjYV.mjs +177 -0
  25. package/dist/component-C2Gc-wsE.js +1 -0
  26. package/dist/component-CM9g6tbD.mjs +804 -0
  27. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  28. package/dist/components/BillingInformation/BillingInformation.es.js +3 -7
  29. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  30. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +9 -17
  31. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  32. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -7
  33. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  34. package/dist/components/Invoice/Invoice.es.js +42 -2659
  35. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  36. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -7
  37. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  38. package/dist/components/InvoicesList/InvoicesList.es.js +2 -6
  39. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  40. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -7
  41. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  42. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +7 -33
  43. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  44. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +8 -4824
  45. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  46. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -8
  47. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  48. package/dist/components/WalletBalances/WalletBalances.es.js +3 -7
  49. package/dist/core/index.cjs.js +1 -1
  50. package/dist/core/index.es.js +1 -1
  51. package/dist/core/types.d.ts +2 -0
  52. package/dist/{customer-CcQR-JIm.js → customer-C_Hz_npf.js} +1 -1
  53. package/dist/{customer-CJrpbGX4.mjs → customer-TIi7iZFw.mjs} +1 -1
  54. package/dist/en-US-CBoPxQwX.mjs +199 -0
  55. package/dist/en-US-DJq-9dD8.js +1 -0
  56. package/dist/index-CzL1ZcGi.mjs +85 -0
  57. package/dist/index-DRdBmZ2-.js +1 -0
  58. package/dist/index.cjs.js +1 -1
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.es.js +4 -1
  61. package/dist/{invoices-CNK1Ushv.mjs → invoices-BuVOuTOm.mjs} +2 -15
  62. package/dist/invoices-DbvwXAsm.js +1 -0
  63. package/dist/nl-NL-BB7KbK-h.mjs +181 -0
  64. package/dist/nl-NL-CtU1Lg2F.js +1 -0
  65. package/dist/paymentMethods-B4AYGf0K.js +1 -0
  66. package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-Di32oJ39.mjs} +2 -2
  67. package/dist/{payments-CE9U7aKK.mjs → payments-C5fD1PXB.mjs} +1 -1
  68. package/dist/{payments-CLt0SExf.js → payments-DeutKq9x.js} +1 -1
  69. package/dist/{registry-B99ZnfEn.mjs → registry-BLwMl1bK.mjs} +6 -4
  70. package/dist/registry-CMSmkLcy.js +1 -0
  71. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  72. package/dist/screens/Checkout/Checkout.es.js +420 -2388
  73. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  74. package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -14
  75. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  76. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  77. package/dist/screens/PayInvoice/PayInvoice.es.js +456 -0
  78. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  79. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +79 -61
  80. package/dist/solvimon-web.css +1 -1
  81. package/dist/source-DKDKBlUm.mjs +179 -0
  82. package/dist/source-dkMNFWDc.js +1 -0
  83. package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-mOgjjzUi.mjs} +2 -2
  84. package/dist/subscriptions-wdMADcQZ.js +1 -0
  85. package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-B4gszz0Q.mjs} +1 -1
  86. package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-DfS2P0bd.js} +1 -1
  87. package/dist/{useCustomer-PthyTFLl.js → useCustomer-DanZzn-l.js} +1 -1
  88. package/dist/{useCustomer--jycAz--.mjs → useCustomer-cbhDyWJL.mjs} +2 -2
  89. package/dist/useIncrementalLoading-DFe5Yh8M.js +1 -0
  90. package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-RRicokf1.mjs} +3 -8
  91. package/dist/useInvoiceData-CxxHa5R2.js +1 -0
  92. package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-fS6G_244.mjs} +6 -12
  93. package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-BQQxcPdz.mjs} +23 -260
  94. package/dist/useInvoicesList-CtJqmblZ.js +1 -0
  95. package/dist/usePaymentMethodOptions-2MloZ9bY.mjs +26 -0
  96. package/dist/usePaymentMethodOptions-D01YWW3G.js +1 -0
  97. package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-Cm9WdSW0.js} +1 -1
  98. package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-DZvfWSlx.mjs} +2 -2
  99. package/dist/usePayments-B13S_yai.js +1 -0
  100. package/dist/usePayments-D4uGKBsV.mjs +36 -0
  101. package/dist/usePortal-DJDJNLbo.mjs +12 -0
  102. package/dist/usePortal-DWJEVkTj.js +1 -0
  103. package/dist/useService-9fCKPTmu.js +1 -0
  104. package/dist/useService-BuWWE5ND.mjs +68 -0
  105. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  106. package/dist/useViewport-CKRY1CKR.js +1 -0
  107. package/dist/useWalletBalanceItems-B53Gkjro.mjs +106 -0
  108. package/dist/useWalletBalanceItems-BMaVT4TW.js +1 -0
  109. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  110. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  111. package/dist/vendor-ui-BwxuPDg8.mjs +28598 -0
  112. package/dist/vendor-ui-Ce_Yp7xA.js +1 -0
  113. package/package.json +17 -10
  114. package/dist/Alert.vue.es-DMPvSykx.js +0 -1
  115. package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
  116. package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
  117. package/dist/Amount.vue.es-h8wulbBG.js +0 -1
  118. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
  119. package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
  120. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
  121. package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
  122. package/dist/Button.vue.es-BC4_TItq.js +0 -1
  123. package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
  124. package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
  125. package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
  126. package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
  127. package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
  128. package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
  129. package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
  130. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
  131. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
  132. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
  133. package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
  134. package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
  135. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
  136. package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
  137. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
  138. package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
  139. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
  140. package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
  141. package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
  142. package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
  143. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
  144. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
  145. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
  146. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
  147. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
  148. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
  149. package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
  150. package/dist/Section.vue.es-BuzTXRLP.js +0 -1
  151. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
  152. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
  153. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
  154. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
  155. package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
  156. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  157. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  158. package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
  159. package/dist/_flatRest.es-dFffnTpX.js +0 -1
  160. package/dist/api.es-B4qAAJKr.js +0 -1
  161. package/dist/api.es-UkfpLiLL.mjs +0 -83
  162. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  163. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  164. package/dist/cn.es-C7xoIs3C.js +0 -1
  165. package/dist/cn.es-tfxVlz02.mjs +0 -3191
  166. package/dist/component-ZRZIt3ZW.js +0 -1
  167. package/dist/component-dpA83LIN.mjs +0 -6569
  168. package/dist/countryData.es--zJAd6LA.mjs +0 -252
  169. package/dist/countryData.es-D3MFzU92.js +0 -1
  170. package/dist/customer.es-D42Md24r.js +0 -1
  171. package/dist/customer.es-LIW2YmLL.mjs +0 -30
  172. package/dist/formatting.es-9hM8aHSg.js +0 -1
  173. package/dist/formatting.es-D5H_ySFv.mjs +0 -68
  174. package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
  175. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
  176. package/dist/index-2jo9BSPM.js +0 -1
  177. package/dist/index-BFZ0dPh9.mjs +0 -179
  178. package/dist/index-CI71bVGE.mjs +0 -2521
  179. package/dist/index-CWSXne1Q.js +0 -1
  180. package/dist/index-D3v7hAtc.mjs +0 -253
  181. package/dist/index-WLSPwi90.js +0 -1
  182. package/dist/index.es-BBJF2O2l.js +0 -1
  183. package/dist/index.es-LCAKs4tH.mjs +0 -438
  184. package/dist/invoices-3kVHsAXr.js +0 -1
  185. package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
  186. package/dist/isEmpty.es-Dycf-CD_.js +0 -1
  187. package/dist/paymentMethods-DZRf0WRl.js +0 -1
  188. package/dist/pick.es-BgDAfhAl.js +0 -1
  189. package/dist/pick.es-DdVOyp0Q.mjs +0 -45
  190. package/dist/registry-ClZ43bQn.js +0 -1
  191. package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
  192. package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
  193. package/dist/subscriptions-CS8HTxzC.js +0 -1
  194. package/dist/typeGuards.es-C4nR5FkL.js +0 -1
  195. package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
  196. package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
  197. package/dist/useInvoiceData-DvQO_nKz.js +0 -1
  198. package/dist/useInvoicesList-CHkwSNO9.js +0 -1
  199. package/dist/useService-B67YWAcN.js +0 -1
  200. package/dist/useService-DG_zedHV.mjs +0 -282
  201. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
  202. package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
@@ -1,308 +0,0 @@
1
- import { defineComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, Fragment, renderList, createBlock, unref, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, computed } from "vue";
2
- import { a as useIntl, _ as _sfc_main$6, c as createRequestService, u as useConfig } from "./component-dpA83LIN.mjs";
3
- import { u as useService } from "./useService-DG_zedHV.mjs";
4
- import { _ as _sfc_main$9 } from "./ErrorNotification.vue.es-Bgw0MIl8.mjs";
5
- import { _ as _sfc_main$7 } from "./Section.vue.es-3-H1pUTB.mjs";
6
- import { a as formatAmount } from "./formatting.es-D5H_ySFv.mjs";
7
- import { _ as _sfc_main$4, a as _sfc_main$5 } from "./CardContent.vue.es-ChEMrFCc.mjs";
8
- import { _ as _sfc_main$8 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
9
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
10
- __name: "PageGridAsideCard",
11
- props: {
12
- title: {},
13
- contentSpacing: {}
14
- },
15
- setup(__props) {
16
- return (_ctx, _cache) => {
17
- return openBlock(), createElementBlock("div", null, [
18
- createVNode(_sfc_main$4, {
19
- spacing: "none",
20
- title: __props.title
21
- }, {
22
- right: withCtx(() => [
23
- renderSlot(_ctx.$slots, "settings")
24
- ]),
25
- default: withCtx(() => [
26
- createVNode(_sfc_main$5, { spacing: __props.contentSpacing }, {
27
- default: withCtx(() => [
28
- renderSlot(_ctx.$slots, "default")
29
- ]),
30
- _: 3
31
- }, 8, ["spacing"])
32
- ]),
33
- _: 3
34
- }, 8, ["title"])
35
- ]);
36
- };
37
- }
38
- });
39
- const _hoisted_1 = {
40
- key: 0,
41
- class: "flex flex-col gap-4"
42
- };
43
- const _hoisted_2 = { class: "flex flex-col items-start" };
44
- const _hoisted_3 = { class: "flex flex-col gap-2" };
45
- const _hoisted_4 = { class: "flex flex-col items-start" };
46
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
47
- __name: "WalletBalances",
48
- props: {
49
- items: {},
50
- title: { default: void 0 },
51
- variant: { default: "section" }
52
- },
53
- setup(__props) {
54
- const { $t, formatDate, formatNumber } = useIntl();
55
- const formatWalletBalance = (balanceValue) => {
56
- var _a, _b, _c, _d, _e, _f;
57
- if (balanceValue == null ? void 0 : balanceValue.amount) {
58
- return formatAmount(balanceValue.amount);
59
- }
60
- if (balanceValue == null ? void 0 : balanceValue.credits) {
61
- const quantity = Number(balanceValue.credits.quantity);
62
- const unitLabel = quantity === 1 ? (_b = (_a = balanceValue.credits.creditType) == null ? void 0 : _a.unit_name) == null ? void 0 : _b.singular : ((_d = (_c = balanceValue.credits.creditType) == null ? void 0 : _c.unit_name) == null ? void 0 : _d.plural) ?? ((_f = (_e = balanceValue.credits.creditType) == null ? void 0 : _e.unit_name) == null ? void 0 : _f.singular);
63
- return $t(
64
- {
65
- defaultMessage: "{quantity} {unit}",
66
- description: "Formatted wallet credits balance",
67
- id: "wallet_balance.formatted_credit_unit"
68
- },
69
- {
70
- quantity: formatNumber(quantity),
71
- unit: unitLabel ?? $t({
72
- defaultMessage: "credits",
73
- description: "Wallet balances credits default message",
74
- id: "wB/wXs"
75
- })
76
- }
77
- );
78
- }
79
- return $t({
80
- defaultMessage: "N/A",
81
- description: "Fallback wallet balance label when no balance is available",
82
- id: "PW+sL4"
83
- });
84
- };
85
- const formatUpdatedAtLabel = (balanceAt) => {
86
- if (!balanceAt) {
87
- return null;
88
- }
89
- return $t(
90
- {
91
- defaultMessage: "Updated at {date}",
92
- description: "Wallet balance timestamp label",
93
- id: "spcNSp"
94
- },
95
- {
96
- date: formatDate({
97
- date: balanceAt,
98
- format: "dateTime",
99
- offsetType: "local"
100
- })
101
- }
102
- );
103
- };
104
- return (_ctx, _cache) => {
105
- return __props.variant === "page-grid-aside" ? (openBlock(), createElementBlock("div", _hoisted_1, [
106
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
107
- return openBlock(), createBlock(unref(_sfc_main$3), {
108
- key: item.walletId,
109
- title: unref($t)({
110
- defaultMessage: "Wallet",
111
- description: "Title of a wallet balance card",
112
- id: "3yk8fB"
113
- })
114
- }, {
115
- default: withCtx(() => [
116
- createElementVNode("section", _hoisted_2, [
117
- createVNode(_sfc_main$6, {
118
- variant: "label",
119
- "no-spacing": ""
120
- }, {
121
- default: withCtx(() => [
122
- createTextVNode(toDisplayString(item.title), 1)
123
- ]),
124
- _: 2
125
- }, 1024),
126
- createVNode(_sfc_main$6, {
127
- variant: "body-lg",
128
- weight: "semibold",
129
- "no-spacing": ""
130
- }, {
131
- default: withCtx(() => [
132
- createTextVNode(toDisplayString(formatWalletBalance(item.balance)), 1)
133
- ]),
134
- _: 2
135
- }, 1024),
136
- item.balanceAt ? (openBlock(), createBlock(_sfc_main$6, {
137
- key: 0,
138
- variant: "body-xs",
139
- shade: "lighter",
140
- "no-spacing": ""
141
- }, {
142
- default: withCtx(() => [
143
- createTextVNode(toDisplayString(formatUpdatedAtLabel(item.balanceAt)), 1)
144
- ]),
145
- _: 2
146
- }, 1024)) : createCommentVNode("", true)
147
- ])
148
- ]),
149
- _: 2
150
- }, 1032, ["title"]);
151
- }), 128))
152
- ])) : (openBlock(), createBlock(_sfc_main$7, {
153
- key: 1,
154
- "no-spacing": "",
155
- "no-border": "",
156
- title: __props.title
157
- }, {
158
- default: withCtx(() => [
159
- createElementVNode("div", _hoisted_3, [
160
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
161
- return openBlock(), createBlock(_sfc_main$7, {
162
- key: item.walletId
163
- }, {
164
- default: withCtx(() => [
165
- createElementVNode("div", _hoisted_4, [
166
- createVNode(_sfc_main$6, {
167
- variant: "label",
168
- "no-spacing": ""
169
- }, {
170
- default: withCtx(() => [
171
- createTextVNode(toDisplayString(item.title), 1)
172
- ]),
173
- _: 2
174
- }, 1024),
175
- createVNode(_sfc_main$6, {
176
- variant: "body-lg",
177
- weight: "semibold",
178
- "no-spacing": ""
179
- }, {
180
- default: withCtx(() => [
181
- createTextVNode(toDisplayString(formatWalletBalance(item.balance)), 1)
182
- ]),
183
- _: 2
184
- }, 1024),
185
- item.balanceAt ? (openBlock(), createBlock(_sfc_main$6, {
186
- key: 0,
187
- variant: "body-xs",
188
- shade: "lighter",
189
- "no-spacing": ""
190
- }, {
191
- default: withCtx(() => [
192
- createTextVNode(toDisplayString(formatUpdatedAtLabel(item.balanceAt)), 1)
193
- ]),
194
- _: 2
195
- }, 1024)) : createCommentVNode("", true)
196
- ])
197
- ]),
198
- _: 2
199
- }, 1024);
200
- }), 128))
201
- ])
202
- ]),
203
- _: 1
204
- }, 8, ["title"]));
205
- };
206
- }
207
- });
208
- function createWalletsService() {
209
- const request = createRequestService();
210
- const config = useConfig();
211
- function getCustomerWalletBalances(customerId) {
212
- return request({
213
- url: `${config.apiUrls.config}/portal/customers/${customerId}/wallets/balance`,
214
- options: { method: "POST" },
215
- data: {}
216
- });
217
- }
218
- return {
219
- getCustomerWalletBalances
220
- };
221
- }
222
- function useCustomerWalletBalances({ customerId }) {
223
- const { getCustomerWalletBalances } = createWalletsService();
224
- const { data, execute, apiStatus, error, isPending } = useService({
225
- service: () => getCustomerWalletBalances(customerId)
226
- });
227
- const walletBalances = computed(
228
- () => data.value ?? null
229
- );
230
- return { walletBalances, apiStatus, error, fetch: execute, isPending };
231
- }
232
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
233
- __name: "CustomerWalletBalancesBlock",
234
- props: {
235
- walletBalances: { type: Array }
236
- },
237
- setup(__props) {
238
- const { $t } = useIntl();
239
- return (_ctx, _cache) => {
240
- return openBlock(), createBlock(unref(_sfc_main$2), {
241
- items: __props.walletBalances,
242
- title: unref($t)(
243
- {
244
- defaultMessage: "{count, plural, one {Wallet} other {Wallets}}",
245
- description: "Title for the wallets block on the customer overview page",
246
- id: "customer_overview.wallet_balances_block.title"
247
- },
248
- { count: String(__props.walletBalances.length) }
249
- )
250
- }, null, 8, ["items", "title"]);
251
- };
252
- }
253
- });
254
- const _sfc_main = /* @__PURE__ */ defineComponent({
255
- __name: "CustomerWalletBalances",
256
- props: {
257
- hasError: { type: Boolean },
258
- isLoading: { type: Boolean },
259
- walletBalances: { type: Array }
260
- },
261
- setup(__props) {
262
- const { $t } = useIntl();
263
- return (_ctx, _cache) => {
264
- return __props.isLoading ? (openBlock(), createBlock(_sfc_main$8, {
265
- key: 0,
266
- variant: "section",
267
- class: "min-h-48",
268
- "data-testid": "customer-wallet-balances-skeleton"
269
- })) : __props.hasError ? (openBlock(), createBlock(unref(_sfc_main$9), {
270
- key: 1,
271
- title: unref($t)({
272
- defaultMessage: "Could not load wallet balances",
273
- description: "Error shown when wallet balances fail to load",
274
- id: "wallet_balance.load_failed"
275
- })
276
- }, null, 8, ["title"])) : __props.walletBalances.length > 0 ? (openBlock(), createBlock(_sfc_main$1, {
277
- key: 2,
278
- "wallet-balances": __props.walletBalances
279
- }, null, 8, ["wallet-balances"])) : createCommentVNode("", true);
280
- };
281
- }
282
- });
283
- function useWalletBalanceItems(walletBalances) {
284
- const { $t } = useIntl();
285
- return computed(
286
- () => {
287
- var _a;
288
- return (((_a = walletBalances.value) == null ? void 0 : _a.wallet_balances) ?? []).map((walletBalance) => {
289
- var _a2;
290
- return {
291
- walletId: walletBalance.wallet_id,
292
- title: $t({
293
- defaultMessage: "Balance",
294
- description: "Fallback wallet title in wallet balance components",
295
- id: "H5+NAX"
296
- }),
297
- balance: walletBalance.wallet_balance.open_balance,
298
- balanceAt: walletBalance.wallet_balance.balance_at ?? ((_a2 = walletBalances.value) == null ? void 0 : _a2.balance_at) ?? null
299
- };
300
- });
301
- }
302
- );
303
- }
304
- export {
305
- _sfc_main as _,
306
- useWalletBalanceItems as a,
307
- useCustomerWalletBalances as u
308
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-ZRZIt3ZW.js"),a=require("./useService-B67YWAcN.js"),l=require("./ErrorNotification.vue.es-FpRyg0De.js"),n=require("./Section.vue.es-BuzTXRLP.js"),i=require("./formatting.es-9hM8aHSg.js"),o=require("./CardContent.vue.es-i9ivuGKG.js"),r=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),c=e.defineComponent({__name:"PageGridAsideCard",props:{title:{},contentSpacing:{}},setup:t=>(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o._sfc_main,{spacing:"none",title:t.title},{right:e.withCtx(()=>[e.renderSlot(a.$slots,"settings")]),default:e.withCtx(()=>[e.createVNode(o._sfc_main$1,{spacing:t.contentSpacing},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["spacing"])]),_:3},8,["title"])]))}),s={key:0,class:"flex flex-col gap-4"},d={class:"flex flex-col items-start"},u={class:"flex flex-col gap-2"},p={class:"flex flex-col items-start"},m=e.defineComponent({__name:"WalletBalances",props:{items:{},title:{default:void 0},variant:{default:"section"}},setup(a){const{$t:l,formatDate:o,formatNumber:r}=t.useIntl(),m=e=>{var t,a,n,o,c,s;if(null==e?void 0:e.amount)return i.formatAmount(e.amount);if(null==e?void 0:e.credits){const i=Number(e.credits.quantity),d=1===i?null==(a=null==(t=e.credits.creditType)?void 0:t.unit_name)?void 0:a.singular:(null==(o=null==(n=e.credits.creditType)?void 0:n.unit_name)?void 0:o.plural)??(null==(s=null==(c=e.credits.creditType)?void 0:c.unit_name)?void 0:s.singular);return l({defaultMessage:"{quantity} {unit}",description:"Formatted wallet credits balance",id:"wallet_balance.formatted_credit_unit"},{quantity:r(i),unit:d??l({defaultMessage:"credits",description:"Wallet balances credits default message",id:"wB/wXs"})})}return l({defaultMessage:"N/A",description:"Fallback wallet balance label when no balance is available",id:"PW+sL4"})},f=e=>e?l({defaultMessage:"Updated at {date}",description:"Wallet balance timestamp label",id:"spcNSp"},{date:o({date:e,format:"dateTime",offsetType:"local"})}):null;return(i,o)=>"page-grid-aside"===a.variant?(e.openBlock(),e.createElementBlock("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,a=>(e.openBlock(),e.createBlock(e.unref(c),{key:a.walletId,title:e.unref(l)({defaultMessage:"Wallet",description:"Title of a wallet balance card",id:"3yk8fB"})},{default:e.withCtx(()=>[e.createElementVNode("section",d,[e.createVNode(t._sfc_main,{variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:2},1024),e.createVNode(t._sfc_main,{variant:"body-lg",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(a.balance)),1)]),_:2},1024),a.balanceAt?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(a.balanceAt)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["title"]))),128))])):(e.openBlock(),e.createBlock(n._sfc_main,{key:1,"no-spacing":"","no-border":"",title:a.title},{default:e.withCtx(()=>[e.createElementVNode("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,a=>(e.openBlock(),e.createBlock(n._sfc_main,{key:a.walletId},{default:e.withCtx(()=>[e.createElementVNode("div",p,[e.createVNode(t._sfc_main,{variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:2},1024),e.createVNode(t._sfc_main,{variant:"body-lg",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(a.balance)),1)]),_:2},1024),a.balanceAt?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(a.balanceAt)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1024))),128))])]),_:1},8,["title"]))}});const f=e.defineComponent({__name:"CustomerWalletBalancesBlock",props:{walletBalances:{type:Array}},setup(a){const{$t:l}=t.useIntl();return(t,n)=>(e.openBlock(),e.createBlock(e.unref(m),{items:a.walletBalances,title:e.unref(l)({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(a.walletBalances.length)})},null,8,["items","title"]))}}),_=e.defineComponent({__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup(a){const{$t:n}=t.useIntl();return(t,i)=>a.isLoading?(e.openBlock(),e.createBlock(r._sfc_main,{key:0,variant:"section",class:"min-h-48","data-testid":"customer-wallet-balances-skeleton"})):a.hasError?(e.openBlock(),e.createBlock(e.unref(l._sfc_main),{key:1,title:e.unref(n)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})},null,8,["title"])):a.walletBalances.length>0?(e.openBlock(),e.createBlock(f,{key:2,"wallet-balances":a.walletBalances},null,8,["wallet-balances"])):e.createCommentVNode("",!0)}});exports._sfc_main=_,exports.useCustomerWalletBalances=function({customerId:l}){const{getCustomerWalletBalances:n}=function(){const e=t.createRequestService(),a=t.useConfig();return{getCustomerWalletBalances:function(t){return e({url:`${a.apiUrls.config}/portal/customers/${t}/wallets/balance`,options:{method:"POST"},data:{}})}}}(),{data:i,execute:o,apiStatus:r,error:c,isPending:s}=a.useService({service:()=>n(l)});return{walletBalances:e.computed(()=>i.value??null),apiStatus:r,error:c,fetch:o,isPending:s}},exports.useWalletBalanceItems=function(a){const{$t:l}=t.useIntl();return e.computed(()=>{var e;return((null==(e=a.value)?void 0:e.wallet_balances)??[]).map(e=>{var t;return{walletId:e.wallet_id,title:l({defaultMessage:"Balance",description:"Fallback wallet title in wallet balance components",id:"H5+NAX"}),balance:e.wallet_balance.open_balance,balanceAt:e.wallet_balance.balance_at??(null==(t=a.value)?void 0:t.balance_at)??null}})})};