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

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 (179) hide show
  1. package/dist/Alert.vue.es-DMPvSykx.js +1 -0
  2. package/dist/Alert.vue.es-DsJ1ckRU.mjs +172 -0
  3. package/dist/Amount.vue.es-C6JE5rL8.mjs +23 -0
  4. package/dist/Amount.vue.es-h8wulbBG.js +1 -0
  5. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +93 -0
  6. package/dist/Avatar.vue.es-BbyE0AjW.js +1 -0
  7. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +1 -0
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DZ1XkSJ3.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +6 -4
  9. package/dist/Button.vue.es-6sBk5tBL.mjs +408 -0
  10. package/dist/Button.vue.es-BC4_TItq.js +1 -0
  11. package/dist/CardContent.vue.es-ChEMrFCc.mjs +115 -0
  12. package/dist/CardContent.vue.es-i9ivuGKG.js +1 -0
  13. package/dist/Chip.vue.es-D0fkSe8a.js +1 -0
  14. package/dist/Chip.vue.es-DcW2CjUA.mjs +1576 -0
  15. package/dist/Comparators.vue.es-BdxDqU8o.js +1 -0
  16. package/dist/Comparators.vue.es-DdTKGB80.mjs +406 -0
  17. package/dist/{ContentWithAsideLayout-D_T137tN.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
  18. package/dist/{ContentWithAsideLayout-BZJPhvLh.js → ContentWithAsideLayout-UHovpjZu.js} +1 -1
  19. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +1 -0
  20. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +175 -0
  21. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +1 -0
  22. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DK6tiecN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +14 -11
  23. package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
  24. package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
  25. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +72 -0
  26. package/dist/DividerText.vue.es-yiFdPQvo.js +1 -0
  27. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +30 -0
  28. package/dist/ErrorNotification.vue.es-FpRyg0De.js +1 -0
  29. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
  30. package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
  31. package/dist/IconButton.vue.es-DNCwwH_j.mjs +825 -0
  32. package/dist/IconButton.vue.es-DiSiGPWO.js +1 -0
  33. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +1 -0
  34. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BWXmZmGZ.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs} +3 -2
  35. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +1 -0
  36. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BSn_Zy0Y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs} +9 -5
  37. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs +1067 -0
  38. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +1 -0
  39. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +1 -0
  40. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +1255 -0
  41. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-X7-dfeZP.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs} +6 -5
  42. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +1 -0
  43. package/dist/Section.vue.es-3-H1pUTB.mjs +79 -0
  44. package/dist/Section.vue.es-BuzTXRLP.js +1 -0
  45. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-AxYjVFUM.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +23 -20
  46. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +1 -0
  47. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +136 -0
  48. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +1 -0
  49. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +759 -0
  50. package/dist/TrialChip.vue.es-C6Xg_5rR.js +1 -0
  51. package/dist/_flatRest.es-BHFPCqZh.mjs +642 -0
  52. package/dist/_flatRest.es-dFffnTpX.js +1 -0
  53. package/dist/adyen-51SvcyqV.mjs +4 -0
  54. package/dist/adyen-DZsyEXkw.js +1 -0
  55. package/dist/api.es-B4qAAJKr.js +1 -0
  56. package/dist/api.es-UkfpLiLL.mjs +83 -0
  57. package/dist/{cloneDeep-DranHQkY.js → cloneDeep-Hs8Pp07F.js} +1 -1
  58. package/dist/cn.es-C7xoIs3C.js +1 -0
  59. package/dist/cn.es-tfxVlz02.mjs +3191 -0
  60. package/dist/component-ZRZIt3ZW.js +1 -0
  61. package/dist/component-dpA83LIN.mjs +6569 -0
  62. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
  63. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  64. package/dist/components/BillingInformation/BillingInformation.es.js +14 -10
  65. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
  66. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  67. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +27 -23
  68. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
  69. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  70. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -3
  71. package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
  72. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  73. package/dist/components/Invoice/Invoice.es.js +2612 -28
  74. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
  75. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  76. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  77. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
  78. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  79. package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
  80. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
  81. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  82. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  83. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
  84. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  85. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +10 -8
  86. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
  87. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  88. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4820 -7
  89. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
  90. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  91. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
  92. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -1
  93. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  94. package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
  95. package/dist/core/index.cjs.js +1 -1
  96. package/dist/core/index.es.js +1 -1
  97. package/dist/countryData.es--zJAd6LA.mjs +252 -0
  98. package/dist/countryData.es-D3MFzU92.js +1 -0
  99. package/dist/customer-CJrpbGX4.mjs +32 -0
  100. package/dist/customer-CcQR-JIm.js +1 -0
  101. package/dist/customer.es-D42Md24r.js +1 -0
  102. package/dist/customer.es-LIW2YmLL.mjs +30 -0
  103. package/dist/formatting.es-9hM8aHSg.js +1 -0
  104. package/dist/formatting.es-D5H_ySFv.mjs +68 -0
  105. package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
  106. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
  107. package/dist/index-CI71bVGE.mjs +2521 -0
  108. package/dist/index-WLSPwi90.js +1 -0
  109. package/dist/index.cjs.js +1 -1
  110. package/dist/index.es-BBJF2O2l.js +1 -0
  111. package/dist/index.es-LCAKs4tH.mjs +438 -0
  112. package/dist/index.es.js +1 -1
  113. package/dist/invoices-3kVHsAXr.js +1 -0
  114. package/dist/{invoices-C7BHqB0g.mjs → invoices-CNK1Ushv.mjs} +15 -1
  115. package/dist/isEmpty.es-Bp1SbWFu.mjs +131 -0
  116. package/dist/isEmpty.es-Dycf-CD_.js +1 -0
  117. package/dist/{paymentMethods-BA7Kt8ti.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
  118. package/dist/paymentMethods-DZRf0WRl.js +1 -0
  119. package/dist/{payments-NTHUh5je.mjs → payments-CE9U7aKK.mjs} +1 -1
  120. package/dist/{payments-B8W0W6wZ.js → payments-CLt0SExf.js} +1 -1
  121. package/dist/pick.es-BgDAfhAl.js +1 -0
  122. package/dist/pick.es-DdVOyp0Q.mjs +45 -0
  123. package/dist/{registry-DgRnFEVF.mjs → registry-B99ZnfEn.mjs} +1 -2
  124. package/dist/registry-ClZ43bQn.js +1 -0
  125. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
  126. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  127. package/dist/screens/Checkout/Checkout.es.js +1862 -162
  128. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
  129. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  130. package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
  131. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +1 -1
  132. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  133. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +46 -40
  134. package/dist/solvimon-web.css +1 -1
  135. package/dist/subscriptions-CS8HTxzC.js +1 -0
  136. package/dist/{subscriptions-BEoXaAHw.mjs → subscriptions-CoeCrY1I.mjs} +2 -1
  137. package/dist/typeGuards.es-C4nR5FkL.js +1 -0
  138. package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
  139. package/dist/{useActionDispatchProvider-DmTJ_bqE.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
  140. package/dist/{useActionDispatchProvider-zSXRlc2S.mjs → useActionDispatchProvider-eO2qFPGv.mjs} +1 -1
  141. package/dist/useCustomer--jycAz--.mjs +25 -0
  142. package/dist/useCustomer-PthyTFLl.js +1 -0
  143. package/dist/useIncrementalLoading-CAdNW-Bf.js +1 -0
  144. package/dist/{useIncrementalLoading-Bgs0mqyb.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
  145. package/dist/{useInvoiceData-B6P2VShe.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
  146. package/dist/{useInvoiceData-CS7hLTea.js → useInvoiceData-DvQO_nKz.js} +1 -1
  147. package/dist/useInvoicesList-CHkwSNO9.js +1 -0
  148. package/dist/{useInvoicesList-23Ra-23Z.mjs → useInvoicesList-DFhF_gp7.mjs} +260 -23
  149. package/dist/{usePaymentMethods-BK4unvj2.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
  150. package/dist/{usePaymentMethods-B8Nft16c.mjs → usePaymentMethods-BX2RnHZN.mjs} +2 -2
  151. package/dist/{useService-D-CUtlp3.js → useService-B67YWAcN.js} +1 -1
  152. package/dist/{useService-B4qv5N2D.mjs → useService-DG_zedHV.mjs} +1 -0
  153. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +308 -0
  154. package/dist/useWalletBalanceItems-BY3gq0fc.js +1 -0
  155. package/package.json +14 -8
  156. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-eRGZRjmq.js +0 -1
  157. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BvmKLc2H.js +0 -1
  158. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DNWspHtC.js +0 -1
  159. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Cx4c8E4i.js +0 -1
  160. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ct26TY0a.js +0 -1
  161. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-WRXecMCj.mjs +0 -6568
  162. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-KnhKv07X.js +0 -1
  163. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D9_G7CyE.js +0 -1
  164. package/dist/component-DI3AxwdD.mjs +0 -58733
  165. package/dist/component-yWF07boR.js +0 -1
  166. package/dist/index-CzL1ZcGi.mjs +0 -85
  167. package/dist/index-DRdBmZ2-.js +0 -1
  168. package/dist/invoices-CjBHfDXp.js +0 -1
  169. package/dist/paymentMethods-A-5SBmy1.js +0 -1
  170. package/dist/registry-SwmYGFn7.js +0 -1
  171. package/dist/subscriptions-DSi93KpN.js +0 -1
  172. package/dist/useCustomer-DkrBNt5f.mjs +0 -45
  173. package/dist/useCustomer-fK-w7ifj.js +0 -1
  174. package/dist/useIncrementalLoading-BK6N8sYW.js +0 -1
  175. package/dist/useInvoicesList-CIFGVsDj.js +0 -1
  176. package/dist/useWalletBalanceItems-DreHuOra.mjs +0 -105
  177. package/dist/useWalletBalanceItems-NlFk6jPD.js +0 -1
  178. /package/dist/{sprite-DZD704h3-CCc3Mz1x.js → sprite.svg.es-CCc3Mz1x.js} +0 -0
  179. /package/dist/{sprite-DZD704h3-DZD704h3.mjs → sprite.svg.es-DZD704h3.mjs} +0 -0
@@ -0,0 +1,308 @@
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
+ };
@@ -0,0 +1 @@
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}})})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvimon/solvimon-web",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "description": "Solvimon's Front-end SDK provides you with the building blocks to create a billing self serve experience",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -9,25 +9,30 @@
9
9
  },
10
10
  "scripts": {
11
11
  "analyze": "vite-bundle-visualizer",
12
- "prebuild": "npm run build:css && npm run type-check:declarations",
12
+ "prebuild": "npm run build:css && npm run type-check",
13
13
  "build": "vite build",
14
14
  "build:css": "tailwindcss -i ./src/assets/index.css -o ./.sdk/tailwind.css",
15
15
  "dev": "npm run watch",
16
+ "playground:dev": "npm --prefix playground run dev",
17
+ "playground:install": "npm --prefix playground install",
16
18
  "lint": "eslint . --fix",
17
19
  "lint:ci": "eslint . --ignore-pattern .eslintignore",
18
20
  "test:unit": "vitest",
21
+ "test:coverage": "vitest --run --coverage",
19
22
  "type-check:declarations": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --composite false",
20
23
  "type-check": "vue-tsc --noEmit -p tsconfig.json --composite false",
21
- "watch": "vite build --watch",
24
+ "prewatch": "npm run build:css",
25
+ "watch": "run-p watch:js watch:css",
26
+ "watch:js": "vite build --watch",
22
27
  "watch:css": "npm run build:css -- --watch",
23
28
  "translations:extract": "formatjs extract 'src/**/*.{ts,vue}*' --ignore='**/*.d.ts' --out-file 'src/translations/source.json' --flatten --additional-function-names '$t'",
24
29
  "translations:compile": "formatjs compile 'src/translations/source.json' --out-file 'src/translations/en-US.json'",
25
- "translations:check": "tsx ./scripts/check-translations.ts",
26
- "test:e2e:run-app": "tsx scripts/start-test-app.ts",
30
+ "translations:check": "node ./scripts/check-translations.mjs",
31
+ "test:e2e:run-app": "node scripts/start-test-app.mjs",
27
32
  "test:e2e": "playwright test",
28
33
  "test:e2e:ui": "playwright test --ui",
29
34
  "test:e2e:ci": "playwright test",
30
- "test:ssl:generate": "tsx scripts/generate-ssl-cert.ts",
35
+ "test:ssl:generate": "node scripts/generate-ssl-cert.mjs",
31
36
  "version:bump": "node scripts/bump-version.mjs",
32
37
  "version:patch": "npm version patch --no-git-tag-version",
33
38
  "version:minor": "npm version minor --no-git-tag-version",
@@ -142,13 +147,14 @@
142
147
  "@playwright/test": "^1.57.0",
143
148
  "@rushstack/eslint-patch": "^1.2.0",
144
149
  "@solvimon/solvimon-types": "^1.0.0",
145
- "@solvimon/solvimon-ui": "^1.0.1",
150
+ "@solvimon/solvimon-ui": "^1.0.2",
146
151
  "@tsconfig/node22": "^22.0.0",
147
152
  "@types/jsdom": "^21.1.7",
148
153
  "@types/lodash-es": "^4.17.12",
149
154
  "@types/node": "^22.10.2",
150
155
  "@typescript-eslint/parser": "^8.46.2",
151
156
  "@vitejs/plugin-vue": "^5.2.3",
157
+ "@vitest/coverage-v8": "^3.2.4",
152
158
  "@vitest/eslint-plugin": "1.1.20",
153
159
  "@vue/eslint-config-prettier": "^10.2.0",
154
160
  "@vue/eslint-config-typescript": "^14.6.0",
@@ -167,7 +173,7 @@
167
173
  "glob": "^11.0.1",
168
174
  "jsdom": "^26.0.0",
169
175
  "npm-run-all2": "^7.0.2",
170
- "postcss": "^8.5.1",
176
+ "postcss": "^8.5.10",
171
177
  "prettier": "^3.8.3",
172
178
  "prettier-plugin-tailwindcss": "^0.8.0",
173
179
  "tailwindcss": "^3.4.17",
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-yWF07boR.js"),i=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),o=require("./useActionDispatchProvider-DmTJ_bqE.js"),n=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(n){const{$t:r}=t.useIntl(),{dispatchAction:s}=o.useActionDispatchProvider();return(o,a)=>n.isLoading?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,variant:"section",class:"min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$z),{key:1,customer:n.customer,"fallback-to-reference":!1},e.createSlots({_:2},[n.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2H),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",onClick:a[0]||(a[0]=t=>e.unref(s)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=n;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-yWF07boR.js"),o=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js"),n=require("./useActionDispatchProvider-DmTJ_bqE.js"),a={key:0,class:"flex flex-col gap-2"},i=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(o){const n=o,{$t:i}=t.useIntl(),d=e.computed(()=>n.paymentMethods.length>0);return(n,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{"no-spacing":"","no-border":"",title:e.unref(i)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(o.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.paymentMethods,o=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:o.id},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main),{"payment-method":o},null,8,["payment-method"])]),_:2},1024))),128))])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),o.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2H),{key:0,class:"mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:s[1]||(s[1]=e=>n.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[o.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2H),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",type:"button",onClick:s[0]||(s[0]=e=>n.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),d=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{default:()=>({showViewAllButton:!0,showAddButton:!0}),type:Object}},setup(t){const{dispatchAction:a}=n.useActionDispatchProvider();return(n,d)=>{var s,r;return t.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(i,{key:1,"is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":null==(s=t.configuration)?void 0:s.showViewAllButton,"show-add-button":null==(r=t.configuration)?void 0:r.showAddButton,onViewAllPaymentMethods:d[0]||(d[0]=t=>e.unref(a)({action:"view-all-payment-methods"})),onAddPaymentMethod:d[1]||(d[1]=t=>e.unref(a)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}}});exports._sfc_main=d;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-yWF07boR.js"),i={key:0,class:"flex flex-col gap-2"},o=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(o){const{$t:n,formatDate:a}=t.useIntl();return(c,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{title:e.unref(n)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[o.invoice?(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$2),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),o.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:o.invoice.invoice_date,format:"date",timezone:o.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$2),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),o.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:o.invoice.due_date,format:"date",timezone:o.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=o;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-yWF07boR.js"),a={class:"flex flex-col-reverse gap-1"},n={class:"flex justify-between items-center mb-2"},o=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(o){const{$t:r,formatDate:i}=t.useIntl(),s={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(m,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(t._sfc_main$2),{tag:"h2",variant:"heading-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:a.id,class:"mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",n,[e.createVNode(e.unref(t._sfc_main$2),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$3),{color:s[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:o.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=o;