@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.
- package/dist/ApiStatus-CyNDp_op.mjs +9 -0
- package/dist/ApiStatus-oqvUEWJx.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C-C0i6i6.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CT0Tjsnw.mjs} +2 -4
- package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-BTdixy3L.mjs} +2 -11
- package/dist/ContentWithAsideLayout-oAYVrLvL.js +1 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CK73bYUe.mjs} +2 -5
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CLU7Yiyx.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B_WLgBur.js +1 -0
- 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
- package/dist/PaymentHistoryBlock-DHM-3fh-.js +1 -0
- package/dist/PaymentHistoryBlock-YzJ6bxKr.mjs +4 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D6Cr2Uga.mjs} +1 -5
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DFw8lrDv.js +1 -0
- package/dist/PaymentIntegrationForm-Cl5ua8v8.js +1 -0
- package/dist/PaymentIntegrationForm-ID4QnvA3.mjs +4 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CVWPT3Ni.mjs} +32 -189
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DifRn1ok.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CKNMt-JH.js +1 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-CzS32ZUt.mjs} +5 -31
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BIxGqr9U.mjs} +4 -7
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CpEqDnO3.js +1 -0
- package/dist/adyenLoader-CEH4A2b2.js +1 -0
- package/dist/adyenLoader-gsbzSjYV.mjs +177 -0
- package/dist/component-C2Gc-wsE.js +1 -0
- package/dist/component-CM9g6tbD.mjs +804 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +3 -7
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +9 -17
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -7
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +42 -2659
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -7
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +2 -6
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -7
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +7 -33
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +8 -4824
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -8
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +3 -7
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/{customer-CcQR-JIm.js → customer-C_Hz_npf.js} +1 -1
- package/dist/{customer-CJrpbGX4.mjs → customer-TIi7iZFw.mjs} +1 -1
- package/dist/en-US-CBoPxQwX.mjs +199 -0
- package/dist/en-US-DJq-9dD8.js +1 -0
- package/dist/index-CzL1ZcGi.mjs +85 -0
- package/dist/index-DRdBmZ2-.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +4 -1
- package/dist/{invoices-CNK1Ushv.mjs → invoices-BuVOuTOm.mjs} +2 -15
- package/dist/invoices-DbvwXAsm.js +1 -0
- package/dist/nl-NL-BB7KbK-h.mjs +181 -0
- package/dist/nl-NL-CtU1Lg2F.js +1 -0
- package/dist/paymentMethods-B4AYGf0K.js +1 -0
- package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-Di32oJ39.mjs} +2 -2
- package/dist/{payments-CE9U7aKK.mjs → payments-C5fD1PXB.mjs} +1 -1
- package/dist/{payments-CLt0SExf.js → payments-DeutKq9x.js} +1 -1
- package/dist/{registry-B99ZnfEn.mjs → registry-BLwMl1bK.mjs} +6 -4
- package/dist/registry-CMSmkLcy.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +420 -2388
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -14
- package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
- package/dist/screens/PayInvoice/PayInvoice.es.js +456 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +79 -61
- package/dist/solvimon-web.css +1 -1
- package/dist/source-DKDKBlUm.mjs +179 -0
- package/dist/source-dkMNFWDc.js +1 -0
- package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-mOgjjzUi.mjs} +2 -2
- package/dist/subscriptions-wdMADcQZ.js +1 -0
- package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-B4gszz0Q.mjs} +1 -1
- package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-DfS2P0bd.js} +1 -1
- package/dist/{useCustomer-PthyTFLl.js → useCustomer-DanZzn-l.js} +1 -1
- package/dist/{useCustomer--jycAz--.mjs → useCustomer-cbhDyWJL.mjs} +2 -2
- package/dist/useIncrementalLoading-DFe5Yh8M.js +1 -0
- package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-RRicokf1.mjs} +3 -8
- package/dist/useInvoiceData-CxxHa5R2.js +1 -0
- package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-fS6G_244.mjs} +6 -12
- package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-BQQxcPdz.mjs} +23 -260
- package/dist/useInvoicesList-CtJqmblZ.js +1 -0
- package/dist/usePaymentMethodOptions-2MloZ9bY.mjs +26 -0
- package/dist/usePaymentMethodOptions-D01YWW3G.js +1 -0
- package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-Cm9WdSW0.js} +1 -1
- package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-DZvfWSlx.mjs} +2 -2
- package/dist/usePayments-B13S_yai.js +1 -0
- package/dist/usePayments-D4uGKBsV.mjs +36 -0
- package/dist/usePortal-DJDJNLbo.mjs +12 -0
- package/dist/usePortal-DWJEVkTj.js +1 -0
- package/dist/useService-9fCKPTmu.js +1 -0
- package/dist/useService-BuWWE5ND.mjs +68 -0
- package/dist/useViewport-Bu0cyeSi.mjs +38 -0
- package/dist/useViewport-CKRY1CKR.js +1 -0
- package/dist/useWalletBalanceItems-B53Gkjro.mjs +106 -0
- package/dist/useWalletBalanceItems-BMaVT4TW.js +1 -0
- package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
- package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
- package/dist/vendor-ui-BwxuPDg8.mjs +28598 -0
- package/dist/vendor-ui-Ce_Yp7xA.js +1 -0
- package/package.json +17 -10
- package/dist/Alert.vue.es-DMPvSykx.js +0 -1
- package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
- package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
- package/dist/Amount.vue.es-h8wulbBG.js +0 -1
- package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
- package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
- package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
- package/dist/Button.vue.es-BC4_TItq.js +0 -1
- package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
- package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
- package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
- package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
- package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
- package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
- package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
- package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
- package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
- package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
- package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
- package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
- package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
- package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
- package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
- package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
- package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
- package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
- package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
- package/dist/Section.vue.es-BuzTXRLP.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
- package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
- package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
- package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
- package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
- package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
- package/dist/_Uint8Array-DxISR7XF.js +0 -1
- package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
- package/dist/_flatRest.es-dFffnTpX.js +0 -1
- package/dist/api.es-B4qAAJKr.js +0 -1
- package/dist/api.es-UkfpLiLL.mjs +0 -83
- package/dist/cloneDeep-Hs8Pp07F.js +0 -1
- package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
- package/dist/cn.es-C7xoIs3C.js +0 -1
- package/dist/cn.es-tfxVlz02.mjs +0 -3191
- package/dist/component-ZRZIt3ZW.js +0 -1
- package/dist/component-dpA83LIN.mjs +0 -6569
- package/dist/countryData.es--zJAd6LA.mjs +0 -252
- package/dist/countryData.es-D3MFzU92.js +0 -1
- package/dist/customer.es-D42Md24r.js +0 -1
- package/dist/customer.es-LIW2YmLL.mjs +0 -30
- package/dist/formatting.es-9hM8aHSg.js +0 -1
- package/dist/formatting.es-D5H_ySFv.mjs +0 -68
- package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
- package/dist/index-2jo9BSPM.js +0 -1
- package/dist/index-BFZ0dPh9.mjs +0 -179
- package/dist/index-CI71bVGE.mjs +0 -2521
- package/dist/index-CWSXne1Q.js +0 -1
- package/dist/index-D3v7hAtc.mjs +0 -253
- package/dist/index-WLSPwi90.js +0 -1
- package/dist/index.es-BBJF2O2l.js +0 -1
- package/dist/index.es-LCAKs4tH.mjs +0 -438
- package/dist/invoices-3kVHsAXr.js +0 -1
- package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
- package/dist/isEmpty.es-Dycf-CD_.js +0 -1
- package/dist/paymentMethods-DZRf0WRl.js +0 -1
- package/dist/pick.es-BgDAfhAl.js +0 -1
- package/dist/pick.es-DdVOyp0Q.mjs +0 -45
- package/dist/registry-ClZ43bQn.js +0 -1
- package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
- package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
- package/dist/subscriptions-CS8HTxzC.js +0 -1
- package/dist/typeGuards.es-C4nR5FkL.js +0 -1
- package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
- package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
- package/dist/useInvoiceData-DvQO_nKz.js +0 -1
- package/dist/useInvoicesList-CHkwSNO9.js +0 -1
- package/dist/useService-B67YWAcN.js +0 -1
- package/dist/useService-DG_zedHV.mjs +0 -282
- package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
- 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}})})};
|