@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,245 +1,8 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import { _ as _sfc_main$
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { b as _export_sfc, _ as _sfc_main$f } from "./Chip.vue.es-DcW2CjUA.mjs";
|
|
7
|
-
import { _ as _sfc_main$b, T as TooltipContent, a as _sfc_main$c } from "./TooltipParagraph.vue.es-DVJLF9Kv.mjs";
|
|
8
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-eO2qFPGv.mjs";
|
|
9
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-CcnL3flF.mjs";
|
|
10
|
-
import { c as createInvoicesService } from "./invoices-CNK1Ushv.mjs";
|
|
11
|
-
const _hoisted_1$5 = { class: "relative" };
|
|
12
|
-
const _hoisted_2$2 = { class: "w-full text-sm text-left text-gray-500" };
|
|
13
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
14
|
-
__name: "Table",
|
|
15
|
-
props: {
|
|
16
|
-
striped: { type: Boolean },
|
|
17
|
-
stripeClass: {},
|
|
18
|
-
hoverable: { type: Boolean },
|
|
19
|
-
sorting: {},
|
|
20
|
-
rounded: { type: Boolean },
|
|
21
|
-
noBorder: { type: Boolean }
|
|
22
|
-
},
|
|
23
|
-
emits: ["sort"],
|
|
24
|
-
setup(__props, { emit: __emit }) {
|
|
25
|
-
const props = __props;
|
|
26
|
-
const emit = __emit;
|
|
27
|
-
provide("striped", props.striped);
|
|
28
|
-
provide("stripeClass", props.stripeClass);
|
|
29
|
-
provide("hoverable", props.hoverable);
|
|
30
|
-
provide("sorting", props.sorting);
|
|
31
|
-
provide("emit", emit);
|
|
32
|
-
provide("rounded", props.rounded ?? false);
|
|
33
|
-
provide("noBorder", props.noBorder ?? false);
|
|
34
|
-
return (_ctx, _cache) => {
|
|
35
|
-
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
36
|
-
createElementVNode("table", _hoisted_2$2, [
|
|
37
|
-
renderSlot(_ctx.$slots, "default")
|
|
38
|
-
])
|
|
39
|
-
]);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const _hoisted_1$4 = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "transition-opacity transition-duration-700 shadow-left absolute z-10 pointer-events-none w-3.5 h-full shadow-none top-0 bg-transparent right-0 translate-x-3.5 bg-gradient-to-r from-black/[.06] to-transparent [.scroll-shadow-left_&]:opacity-100 opacity-0"
|
|
46
|
-
};
|
|
47
|
-
const _hoisted_2$1 = {
|
|
48
|
-
key: 1,
|
|
49
|
-
class: "transition-opacity transition-duration-700 shadow-right absolute z-10 pointer-events-none w-3.5 h-full shadow-none top-0 bg-transparent left-0 -translate-x-3.5 bg-gradient-to-l from-black/[.06] to-transparent [.scroll-shadow-right_&]:opacity-100 opacity-0"
|
|
50
|
-
};
|
|
51
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
52
|
-
__name: "TableCellScrollShadow",
|
|
53
|
-
props: {
|
|
54
|
-
elRef: {}
|
|
55
|
-
},
|
|
56
|
-
setup(__props) {
|
|
57
|
-
const props = __props;
|
|
58
|
-
const isFirst = ref(false);
|
|
59
|
-
const isLast = ref(false);
|
|
60
|
-
onMounted(() => {
|
|
61
|
-
var _a;
|
|
62
|
-
if (((_a = props.elRef) == null ? void 0 : _a.value) && props.elRef.value.parentElement) {
|
|
63
|
-
const siblings = Array.from(props.elRef.value.parentElement.children);
|
|
64
|
-
isFirst.value = siblings[0] === props.elRef.value;
|
|
65
|
-
isLast.value = siblings[siblings.length - 1] === props.elRef.value;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
return (_ctx, _cache) => {
|
|
69
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
70
|
-
isFirst.value ? (openBlock(), createElementBlock("div", _hoisted_1$4)) : createCommentVNode("", true),
|
|
71
|
-
isLast.value ? (openBlock(), createElementBlock("div", _hoisted_2$1)) : createCommentVNode("", true)
|
|
72
|
-
], 64);
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
77
|
-
__name: "TableCell",
|
|
78
|
-
props: {
|
|
79
|
-
hasPadding: { type: Boolean, default: false }
|
|
80
|
-
},
|
|
81
|
-
setup(__props) {
|
|
82
|
-
const stripeClass = inject("stripeClass") ?? "group-odd:bg-gray-50";
|
|
83
|
-
const rounded = inject("rounded") ?? false;
|
|
84
|
-
const isHoverable = inject("hoverable");
|
|
85
|
-
const isStriped = inject("striped");
|
|
86
|
-
const tdLinkSlot = inject("tdLinkSlot");
|
|
87
|
-
const props = __props;
|
|
88
|
-
const el = ref();
|
|
89
|
-
const classes = computed(() => {
|
|
90
|
-
let classes2 = "relative transition ease-in-out px-4 py-3 text-gray-800 first:whitespace-nowrap leading-none";
|
|
91
|
-
if (isStriped) classes2 += ` group-even:bg-white ${stripeClass}`;
|
|
92
|
-
if (rounded) classes2 += " first-of-type:rounded-l last-of-type:rounded-r overflow-clip";
|
|
93
|
-
if (!props.hasPadding) classes2 += " first:pl-0";
|
|
94
|
-
if (isHoverable) classes2 += " group-hover:bg-gray-50 cursor-pointer";
|
|
95
|
-
return classes2;
|
|
96
|
-
});
|
|
97
|
-
return (_ctx, _cache) => {
|
|
98
|
-
return openBlock(), createElementBlock("td", {
|
|
99
|
-
ref_key: "el",
|
|
100
|
-
ref: el,
|
|
101
|
-
class: normalizeClass(classes.value)
|
|
102
|
-
}, [
|
|
103
|
-
el.value ? (openBlock(), createBlock(_sfc_main$8, {
|
|
104
|
-
key: 0,
|
|
105
|
-
"el-ref": toRef(el.value)
|
|
106
|
-
}, null, 8, ["el-ref"])) : createCommentVNode("", true),
|
|
107
|
-
unref(tdLinkSlot) ? (openBlock(), createBlock(resolveDynamicComponent(unref(tdLinkSlot)), { key: 1 })) : createCommentVNode("", true),
|
|
108
|
-
renderSlot(_ctx.$slots, "default")
|
|
109
|
-
], 2);
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
const _hoisted_1$3 = ["colspan", "tabindex"];
|
|
114
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
115
|
-
__name: "TableHeadCell",
|
|
116
|
-
props: {
|
|
117
|
-
colspan: {},
|
|
118
|
-
columnName: {},
|
|
119
|
-
sortable: { type: Boolean },
|
|
120
|
-
hasPadding: { type: Boolean, default: false },
|
|
121
|
-
tooltip: {},
|
|
122
|
-
fixedWidth: {}
|
|
123
|
-
},
|
|
124
|
-
emits: ["sort"],
|
|
125
|
-
setup(__props, { emit: __emit }) {
|
|
126
|
-
const emit = __emit;
|
|
127
|
-
const sorting = inject("sorting");
|
|
128
|
-
const props = __props;
|
|
129
|
-
const el = ref();
|
|
130
|
-
const sorted = computed(() => {
|
|
131
|
-
if (!props.sortable || !sorting) return false;
|
|
132
|
-
return sorting.columnName === props.columnName ? sorting == null ? void 0 : sorting.direction : false;
|
|
133
|
-
});
|
|
134
|
-
const handleClick = () => {
|
|
135
|
-
if (!props.sortable || !sorting) return;
|
|
136
|
-
if (props.columnName) {
|
|
137
|
-
emit("sort", props.columnName);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
return (_ctx, _cache) => {
|
|
141
|
-
return openBlock(), createElementBlock("th", {
|
|
142
|
-
ref_key: "el",
|
|
143
|
-
ref: el,
|
|
144
|
-
style: normalizeStyle(__props.fixedWidth ? { "--col-w": `${__props.fixedWidth}px` } : void 0),
|
|
145
|
-
class: normalizeClass([[
|
|
146
|
-
{ "cursor-pointer": __props.sortable, "first:pl-0": !__props.hasPadding },
|
|
147
|
-
__props.fixedWidth ? ["min-w-[var(--col-w)]"] : null
|
|
148
|
-
], "relative px-4 py-2 font-medium text-xs whitespace-nowrap select-none"]),
|
|
149
|
-
colspan: __props.colspan,
|
|
150
|
-
tabindex: __props.sortable ? 0 : -1,
|
|
151
|
-
scope: "col",
|
|
152
|
-
onClick: handleClick
|
|
153
|
-
}, [
|
|
154
|
-
el.value ? (openBlock(), createBlock(_sfc_main$8, {
|
|
155
|
-
key: 0,
|
|
156
|
-
"el-ref": toRef(el.value)
|
|
157
|
-
}, null, 8, ["el-ref"])) : createCommentVNode("", true),
|
|
158
|
-
createElementVNode("span", {
|
|
159
|
-
class: normalizeClass({ "text-blue-700": sorted.value })
|
|
160
|
-
}, [
|
|
161
|
-
renderSlot(_ctx.$slots, "default")
|
|
162
|
-
], 2),
|
|
163
|
-
__props.sortable ? (openBlock(), createBlock(_sfc_main$a, {
|
|
164
|
-
key: 1,
|
|
165
|
-
icon: sorted.value && sorted.value === "desc" ? "north" : "south",
|
|
166
|
-
class: normalizeClass([{ "text-blue-700": sorted.value }, "text-sm"]),
|
|
167
|
-
size: "2xs"
|
|
168
|
-
}, null, 8, ["icon", "class"])) : createCommentVNode("", true),
|
|
169
|
-
__props.tooltip ? (openBlock(), createBlock(_sfc_main$b, {
|
|
170
|
-
key: 2,
|
|
171
|
-
variant: "outline"
|
|
172
|
-
}, {
|
|
173
|
-
default: withCtx(() => [
|
|
174
|
-
createVNode(_sfc_main$a, {
|
|
175
|
-
icon: "help",
|
|
176
|
-
size: "xs",
|
|
177
|
-
class: "rounded drop-shadow-sm hover:bg-gray-50 hover:cursor-default -mt-0.5 ml-0.5"
|
|
178
|
-
})
|
|
179
|
-
]),
|
|
180
|
-
tooltip: withCtx(() => [
|
|
181
|
-
createVNode(TooltipContent, null, {
|
|
182
|
-
default: withCtx(() => [
|
|
183
|
-
createVNode(_sfc_main$c, null, {
|
|
184
|
-
default: withCtx(() => [
|
|
185
|
-
createTextVNode(toDisplayString(__props.tooltip), 1)
|
|
186
|
-
]),
|
|
187
|
-
_: 1
|
|
188
|
-
})
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
})
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
})) : createCommentVNode("", true)
|
|
195
|
-
], 14, _hoisted_1$3);
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
200
|
-
__name: "TableRow",
|
|
201
|
-
props: {
|
|
202
|
-
backgroundClass: {}
|
|
203
|
-
},
|
|
204
|
-
setup(__props) {
|
|
205
|
-
const slot = useSlots();
|
|
206
|
-
provide("tdLinkSlot", slot.link);
|
|
207
|
-
const noBorder = inject("noBorder");
|
|
208
|
-
return (_ctx, _cache) => {
|
|
209
|
-
return openBlock(), createElementBlock("tr", {
|
|
210
|
-
class: normalizeClass(["group rounded-md", {
|
|
211
|
-
"bg-white": !__props.backgroundClass,
|
|
212
|
-
"border-y border-gray-200": !unref(noBorder)
|
|
213
|
-
}])
|
|
214
|
-
}, [
|
|
215
|
-
renderSlot(_ctx.$slots, "default")
|
|
216
|
-
], 2);
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
const _sfc_main$4 = {};
|
|
221
|
-
function _sfc_render$2(_ctx, _cache) {
|
|
222
|
-
return openBlock(), createElementBlock("tbody", null, [
|
|
223
|
-
renderSlot(_ctx.$slots, "default")
|
|
224
|
-
]);
|
|
225
|
-
}
|
|
226
|
-
const TableBody = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$2]]);
|
|
227
|
-
const _sfc_main$3 = {};
|
|
228
|
-
const _hoisted_1$2 = { class: "bg-white" };
|
|
229
|
-
function _sfc_render$1(_ctx, _cache) {
|
|
230
|
-
return openBlock(), createElementBlock("thead", _hoisted_1$2, [
|
|
231
|
-
renderSlot(_ctx.$slots, "default")
|
|
232
|
-
]);
|
|
233
|
-
}
|
|
234
|
-
const TableHead = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$1]]);
|
|
235
|
-
const _sfc_main$2 = {};
|
|
236
|
-
const _hoisted_1$1 = { class: "bg-white" };
|
|
237
|
-
function _sfc_render(_ctx, _cache) {
|
|
238
|
-
return openBlock(), createElementBlock("tr", _hoisted_1$1, [
|
|
239
|
-
renderSlot(_ctx.$slots, "default")
|
|
240
|
-
]);
|
|
241
|
-
}
|
|
242
|
-
const TableHeadRow = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createBlock, createSlots, createElementVNode, withModifiers, createCommentVNode } from "vue";
|
|
2
|
+
import { u as useIntl, k as _sfc_main$2, T as TableHead, l as TableHeadRow, m as _sfc_main$3, n as TableBody, o as _sfc_main$4, p as _sfc_main$5, _ as _sfc_main$6, q as _sfc_main$7, f as _sfc_main$8, e as _sfc_main$9, b as _sfc_main$a } from "./vendor-ui-BwxuPDg8.mjs";
|
|
3
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-B4gszz0Q.mjs";
|
|
4
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-RRicokf1.mjs";
|
|
5
|
+
import { c as createInvoicesService } from "./invoices-BuVOuTOm.mjs";
|
|
243
6
|
const _hoisted_1 = { class: "grid-cols-1 gap-4" };
|
|
244
7
|
const _hoisted_2 = ["onClick"];
|
|
245
8
|
const _hoisted_3 = { class: "flex flex-col" };
|
|
@@ -261,7 +24,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
261
24
|
const showLoadMoreButton = computed(() => props.hasMoreItems);
|
|
262
25
|
return (_ctx, _cache) => {
|
|
263
26
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
264
|
-
createVNode(unref(_sfc_main$
|
|
27
|
+
createVNode(unref(_sfc_main$2), {
|
|
265
28
|
striped: "",
|
|
266
29
|
"no-border": "",
|
|
267
30
|
rounded: "",
|
|
@@ -273,7 +36,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
273
36
|
default: withCtx(() => [
|
|
274
37
|
createVNode(unref(TableHeadRow), null, {
|
|
275
38
|
default: withCtx(() => [
|
|
276
|
-
createVNode(unref(_sfc_main$
|
|
39
|
+
createVNode(unref(_sfc_main$3), null, {
|
|
277
40
|
default: withCtx(() => [
|
|
278
41
|
createTextVNode(toDisplayString(unref($t)({
|
|
279
42
|
defaultMessage: "Invoice",
|
|
@@ -283,7 +46,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
283
46
|
]),
|
|
284
47
|
_: 1
|
|
285
48
|
}),
|
|
286
|
-
createVNode(unref(_sfc_main$
|
|
49
|
+
createVNode(unref(_sfc_main$3), { class: "hidden md:table-cell" }, {
|
|
287
50
|
default: withCtx(() => [
|
|
288
51
|
createTextVNode(toDisplayString(unref($t)({
|
|
289
52
|
defaultMessage: "Date",
|
|
@@ -293,7 +56,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
293
56
|
]),
|
|
294
57
|
_: 1
|
|
295
58
|
}),
|
|
296
|
-
createVNode(unref(_sfc_main$
|
|
59
|
+
createVNode(unref(_sfc_main$3), null, {
|
|
297
60
|
default: withCtx(() => [
|
|
298
61
|
createTextVNode(toDisplayString(unref($t)({
|
|
299
62
|
defaultMessage: "Amount",
|
|
@@ -303,7 +66,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
303
66
|
]),
|
|
304
67
|
_: 1
|
|
305
68
|
}),
|
|
306
|
-
createVNode(unref(_sfc_main$
|
|
69
|
+
createVNode(unref(_sfc_main$3), { class: "text-right" }, {
|
|
307
70
|
default: withCtx(() => [
|
|
308
71
|
createTextVNode(toDisplayString(unref($t)({
|
|
309
72
|
defaultMessage: "Status",
|
|
@@ -322,17 +85,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
322
85
|
createVNode(unref(TableBody), null, {
|
|
323
86
|
default: withCtx(() => [
|
|
324
87
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoices, (invoice) => {
|
|
325
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
88
|
+
return openBlock(), createBlock(unref(_sfc_main$4), {
|
|
326
89
|
key: invoice.id
|
|
327
90
|
}, createSlots({
|
|
328
91
|
default: withCtx(() => [
|
|
329
|
-
createVNode(unref(_sfc_main$
|
|
92
|
+
createVNode(unref(_sfc_main$5), {
|
|
330
93
|
"has-padding": "",
|
|
331
94
|
class: "h-14"
|
|
332
95
|
}, {
|
|
333
96
|
default: withCtx(() => [
|
|
334
97
|
createElementVNode("div", _hoisted_3, [
|
|
335
|
-
createVNode(unref(_sfc_main$
|
|
98
|
+
createVNode(unref(_sfc_main$6), {
|
|
336
99
|
tag: "span",
|
|
337
100
|
variant: "body-sm",
|
|
338
101
|
class: "md:hidden"
|
|
@@ -347,7 +110,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
347
110
|
]),
|
|
348
111
|
_: 2
|
|
349
112
|
}, 1024),
|
|
350
|
-
createVNode(unref(_sfc_main$
|
|
113
|
+
createVNode(unref(_sfc_main$6), {
|
|
351
114
|
tag: "span",
|
|
352
115
|
variant: "body-xs",
|
|
353
116
|
shade: "lighter"
|
|
@@ -361,7 +124,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
361
124
|
]),
|
|
362
125
|
_: 2
|
|
363
126
|
}, 1024),
|
|
364
|
-
createVNode(unref(_sfc_main$
|
|
127
|
+
createVNode(unref(_sfc_main$5), { class: "hidden h-14 md:table-cell" }, {
|
|
365
128
|
default: withCtx(() => [
|
|
366
129
|
createTextVNode(toDisplayString(unref(formatDate)({
|
|
367
130
|
date: invoice.invoice_date,
|
|
@@ -372,14 +135,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
372
135
|
]),
|
|
373
136
|
_: 2
|
|
374
137
|
}, 1024),
|
|
375
|
-
createVNode(unref(_sfc_main$
|
|
138
|
+
createVNode(unref(_sfc_main$5), { class: "h-14" }, {
|
|
376
139
|
default: withCtx(() => [
|
|
377
|
-
createVNode(unref(_sfc_main$
|
|
140
|
+
createVNode(unref(_sfc_main$6), {
|
|
378
141
|
tag: "span",
|
|
379
142
|
weight: "semibold"
|
|
380
143
|
}, {
|
|
381
144
|
default: withCtx(() => [
|
|
382
|
-
createVNode(unref(_sfc_main$
|
|
145
|
+
createVNode(unref(_sfc_main$7), {
|
|
383
146
|
value: invoice.invoice_amount_including_tax
|
|
384
147
|
}, null, 8, ["value"])
|
|
385
148
|
]),
|
|
@@ -388,9 +151,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
388
151
|
]),
|
|
389
152
|
_: 2
|
|
390
153
|
}, 1024),
|
|
391
|
-
createVNode(unref(_sfc_main$
|
|
154
|
+
createVNode(unref(_sfc_main$5), { class: "h-14 text-right" }, {
|
|
392
155
|
default: withCtx(() => [
|
|
393
|
-
invoice.paid ? (openBlock(), createBlock(unref(_sfc_main$
|
|
156
|
+
invoice.paid ? (openBlock(), createBlock(unref(_sfc_main$8), {
|
|
394
157
|
key: 0,
|
|
395
158
|
color: "green"
|
|
396
159
|
}, {
|
|
@@ -402,7 +165,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
402
165
|
})), 1)
|
|
403
166
|
]),
|
|
404
167
|
_: 1
|
|
405
|
-
})) : showPayButton.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
168
|
+
})) : showPayButton.value ? (openBlock(), createBlock(unref(_sfc_main$9), {
|
|
406
169
|
key: 1,
|
|
407
170
|
variant: "outline",
|
|
408
171
|
color: "gray",
|
|
@@ -445,7 +208,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
445
208
|
_: 1
|
|
446
209
|
}),
|
|
447
210
|
createElementVNode("div", _hoisted_4, [
|
|
448
|
-
showLoadMoreButton.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
211
|
+
showLoadMoreButton.value ? (openBlock(), createBlock(unref(_sfc_main$9), {
|
|
449
212
|
key: 0,
|
|
450
213
|
variant: "outline",
|
|
451
214
|
color: "gray",
|
|
@@ -488,7 +251,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
488
251
|
const { $t } = useIntl();
|
|
489
252
|
const { dispatchAction } = useActionDispatchProvider();
|
|
490
253
|
return (_ctx, _cache) => {
|
|
491
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
254
|
+
return openBlock(), createBlock(unref(_sfc_main$a), {
|
|
492
255
|
"no-border": "",
|
|
493
256
|
"no-spacing": "",
|
|
494
257
|
"content-background": "none",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Ce_Yp7xA.js"),i=require("./useActionDispatchProvider-DfS2P0bd.js"),o=require("./useIncrementalLoading-DFe5Yh8M.js"),n=require("./invoices-DbvwXAsm.js"),a={class:"grid-cols-1 gap-4"},c=["onClick"],r={class:"flex flex-col"},s={class:"mt-2 flex items-center justify-center"},l=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(i){const o=i,{formatDate:n,$t:l}=t.useIntl(),d=e.computed(()=>o.configuration.showPayButton),u=e.computed(()=>o.configuration.showViewButton),f=e.computed(()=>o.hasMoreItems);return(o,m)=>(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(t._sfc_main$6),{striped:"","no-border":"",rounded:"",hoverable:"","stripe-class":"group-odd:bg-gray-50/50"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHead),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHeadRow),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$7),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$7),{class:"hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$7),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$7),{class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(t.TableBody),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.invoices,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$8),{key:i.id},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$9),{"has-padding":"",class:"h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",r,[e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(t._sfc_main$9),{class:"hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$9),{class:"h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$10),{value:i.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$9),{class:"h-14 text-right"},{default:e.withCtx(()=>[i.paid?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$4),{key:0,color:"green"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):d.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:1,variant:"outline",color:"gray",size:"sm",type:"button",onClick:e.withModifiers(e=>o.$emit("pay-invoice",{invoiceId:i.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[u.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"absolute inset-0 h-full w-full",onClick:e=>o.$emit("view-invoice",{invoiceId:i.id})},null,8,c)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",s,[f.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"outline",color:"gray",size:"sm",class:"w-full",loading:i.isLoading,onClick:m[0]||(m[0]=e=>o.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),d=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{default:()=>({showPayButton:!0,showViewButton:!0,pagination:{batchSize:15,enabled:!0}}),type:Object}},emits:["load-more"],setup(o){const{$t:n}=t.useIntl(),{dispatchAction:a}=i.useActionDispatchProvider();return(i,c)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"no-border":"","no-spacing":"","content-background":"none",title:e.unref(n)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(l,{configuration:o.configuration,"has-more-items":o.hasMoreItems,invoices:o.invoices,"is-loading":o.isLoading,onLoadMore:c[0]||(c[0]=e=>i.$emit("load-more")),onViewInvoice:c[1]||(c[1]=t=>e.unref(a)({action:"view-invoice",data:{invoiceId:t.invoiceId}})),onPayInvoice:c[2]||(c[2]=t=>e.unref(a)({action:"pay-invoice",data:{invoiceId:t.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});exports._sfc_main=d,exports.useInvoicesList=function({customerId:e,batchSize:t=15}){const i=n.createInvoicesService();return o.useIncrementalLoading({service:async o=>i.getInvoices({customerId:e,pagination:{page:o,pageSize:t}})})};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { u as useService } from "./useService-BuWWE5ND.mjs";
|
|
2
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-Di32oJ39.mjs";
|
|
3
|
+
function hasCustomerId(payload) {
|
|
4
|
+
return payload.customerId !== void 0;
|
|
5
|
+
}
|
|
6
|
+
function usePaymentMethodOptions() {
|
|
7
|
+
const { getPaymentMethodOptions } = createPaymentMethodsService();
|
|
8
|
+
const service = (payload) => hasCustomerId(payload) ? getPaymentMethodOptions({
|
|
9
|
+
customerId: payload.customerId,
|
|
10
|
+
amount: payload.amount,
|
|
11
|
+
country: payload.country
|
|
12
|
+
}) : getPaymentMethodOptions({
|
|
13
|
+
subscriptionId: payload.subscriptionId,
|
|
14
|
+
amount: payload.amount,
|
|
15
|
+
country: payload.country
|
|
16
|
+
});
|
|
17
|
+
const initialValue = [];
|
|
18
|
+
const { data, execute: get, apiStatus, error, isPending } = useService({
|
|
19
|
+
initialValue,
|
|
20
|
+
service
|
|
21
|
+
});
|
|
22
|
+
return { paymentMethodOptions: data, get, apiStatus, error, isPending };
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
usePaymentMethodOptions as u
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useService-9fCKPTmu.js"),t=require("./paymentMethods-B4AYGf0K.js");exports.usePaymentMethodOptions=function(){const{getPaymentMethodOptions:n}=t.createPaymentMethodsService(),{data:o,execute:r,apiStatus:u,error:i,isPending:s}=e.useService({initialValue:[],service:e=>function(e){return void 0!==e.customerId}(e)?n({customerId:e.customerId,amount:e.amount,country:e.country}):n({subscriptionId:e.subscriptionId,amount:e.amount,country:e.country})});return{paymentMethodOptions:o,get:r,apiStatus:u,error:i,isPending:s}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useIncrementalLoading-
|
|
1
|
+
const e=require("./useIncrementalLoading-DFe5Yh8M.js"),t=require("./paymentMethods-B4AYGf0K.js");exports.usePaymentMethods=function({customerId:n,pageSize:s=15}){const{getPaymentMethods:a}=t.createPaymentMethodsService();return e.useIncrementalLoading({service:async e=>a({customerId:n,pagination:{page:e,pageSize:s}})})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
2
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
1
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-RRicokf1.mjs";
|
|
2
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-Di32oJ39.mjs";
|
|
3
3
|
function usePaymentMethods({
|
|
4
4
|
customerId,
|
|
5
5
|
pageSize = 15
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./invoices-DbvwXAsm.js"),i=require("./useService-9fCKPTmu.js"),t=require("./payments-DeutKq9x.js");exports.useInvoice=function({invoiceId:t}){const{getInvoice:r,getInvoicePdf:n}=e.createInvoicesService(),{data:s,execute:c,apiStatus:o,error:a,isPending:u}=i.useService({service:()=>r(t)});return{invoice:s,downloadInvoicePdf:n,apiStatus:o,error:a,get:c,isPending:u}},exports.usePayments=function(){const{getPayments:e}=t.createPaymentsService(),{data:r,execute:n,error:s,apiStatus:c,isPending:o}=i.useService({service:e,isCollection:!0});return{payments:r,get:n,error:s,apiStatus:c,isPending:o}};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { c as createInvoicesService } from "./invoices-BuVOuTOm.mjs";
|
|
2
|
+
import { u as useService } from "./useService-BuWWE5ND.mjs";
|
|
3
|
+
import { c as createPaymentsService } from "./payments-C5fD1PXB.mjs";
|
|
4
|
+
function useInvoice({ invoiceId }) {
|
|
5
|
+
const { getInvoice, getInvoicePdf: downloadInvoicePdf } = createInvoicesService();
|
|
6
|
+
const service = () => getInvoice(invoiceId);
|
|
7
|
+
const {
|
|
8
|
+
data,
|
|
9
|
+
execute: get,
|
|
10
|
+
apiStatus,
|
|
11
|
+
error,
|
|
12
|
+
isPending
|
|
13
|
+
} = useService({
|
|
14
|
+
service
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
invoice: data,
|
|
18
|
+
downloadInvoicePdf,
|
|
19
|
+
apiStatus,
|
|
20
|
+
error,
|
|
21
|
+
get,
|
|
22
|
+
isPending
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function usePayments() {
|
|
26
|
+
const { getPayments } = createPaymentsService();
|
|
27
|
+
const { data, execute: get, error, apiStatus, isPending } = useService({
|
|
28
|
+
service: getPayments,
|
|
29
|
+
isCollection: true
|
|
30
|
+
});
|
|
31
|
+
return { payments: data, get, error, apiStatus, isPending };
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
usePayments as a,
|
|
35
|
+
useInvoice as u
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { inject } from "vue";
|
|
2
|
+
import { P as PORTAL_INJECTION_KEY } from "./component-CM9g6tbD.mjs";
|
|
3
|
+
function usePortal() {
|
|
4
|
+
const portal = inject(PORTAL_INJECTION_KEY);
|
|
5
|
+
if (!portal) {
|
|
6
|
+
throw new Error("PortalProvider is not provided");
|
|
7
|
+
}
|
|
8
|
+
return portal;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
usePortal as u
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=require("vue"),e=require("./component-C2Gc-wsE.js");exports.usePortal=function(){const o=r.inject(e.PORTAL_INJECTION_KEY);if(!o)throw new Error("PortalProvider is not provided");return o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./ApiStatus-oqvUEWJx.js"),t=require("vue");function n(e,t){return void 0===t?"\0undefined":t}function r(e,t){return JSON.stringify(e,n)===JSON.stringify(t,n)}function i(e,t){return t?function(e){if(!function(e){return"object"==typeof e&&null!==e&&"data"in e}(e))throw new Error("Expected collection response.");return e.data}(e):e}exports.isEmpty=function(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"!=typeof e||0===Object.keys(e).length)},exports.isEqual=r,exports.useService=function({initialValue:n,service:u,isCollection:a=!1}){const o=t.shallowRef(n),s=t.ref(e.ApiStatus.Initial),c=t.ref(null),l=t.computed(()=>s.value===e.ApiStatus.Loading);return{data:o,execute:async(...t)=>{try{s.value=e.ApiStatus.Loading,c.value=null;const f=i(await u(...t),a);return l=f,r((n=o).value,l)||(n.value=l),s.value=e.ApiStatus.Done,f}catch(f){return c.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(f),s.value=e.ApiStatus.Failed,Promise.reject()}var n,l},apiStatus:s,isPending:l,error:c}};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { A as ApiStatus } from "./ApiStatus-CyNDp_op.mjs";
|
|
2
|
+
import { shallowRef, ref, computed } from "vue";
|
|
3
|
+
const UNDEFINED_SENTINEL = "\0undefined";
|
|
4
|
+
function replacer(_key, value) {
|
|
5
|
+
return value === void 0 ? UNDEFINED_SENTINEL : value;
|
|
6
|
+
}
|
|
7
|
+
function isEqual(a, b) {
|
|
8
|
+
return JSON.stringify(a, replacer) === JSON.stringify(b, replacer);
|
|
9
|
+
}
|
|
10
|
+
function isEmpty(value) {
|
|
11
|
+
if (value == null) return true;
|
|
12
|
+
if (typeof value === "string" || Array.isArray(value)) return value.length === 0;
|
|
13
|
+
if (value instanceof Map || value instanceof Set) return value.size === 0;
|
|
14
|
+
if (typeof value === "object") return Object.keys(value).length === 0;
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
function updateRefIfChanged(ref2, value) {
|
|
18
|
+
if (isEqual(ref2.value, value)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
ref2.value = value;
|
|
22
|
+
}
|
|
23
|
+
function toError(error) {
|
|
24
|
+
return error instanceof Error ? error : new Error("Something went wrong while fetching data.");
|
|
25
|
+
}
|
|
26
|
+
function isCollectionResponse(response) {
|
|
27
|
+
return typeof response === "object" && response !== null && "data" in response;
|
|
28
|
+
}
|
|
29
|
+
function getCollectionResponseData(response) {
|
|
30
|
+
if (!isCollectionResponse(response)) {
|
|
31
|
+
throw new Error("Expected collection response.");
|
|
32
|
+
}
|
|
33
|
+
return response.data;
|
|
34
|
+
}
|
|
35
|
+
function mapServiceResponse(response, isCollection) {
|
|
36
|
+
return isCollection ? getCollectionResponseData(response) : response;
|
|
37
|
+
}
|
|
38
|
+
function useService({
|
|
39
|
+
initialValue,
|
|
40
|
+
service,
|
|
41
|
+
isCollection = false
|
|
42
|
+
}) {
|
|
43
|
+
const data = shallowRef(initialValue);
|
|
44
|
+
const apiStatus = ref(ApiStatus.Initial);
|
|
45
|
+
const error = ref(null);
|
|
46
|
+
const isPending = computed(() => apiStatus.value === ApiStatus.Loading);
|
|
47
|
+
const execute = async (...args) => {
|
|
48
|
+
try {
|
|
49
|
+
apiStatus.value = ApiStatus.Loading;
|
|
50
|
+
error.value = null;
|
|
51
|
+
const response = await service(...args);
|
|
52
|
+
const mapped = mapServiceResponse(response, isCollection);
|
|
53
|
+
updateRefIfChanged(data, mapped);
|
|
54
|
+
apiStatus.value = ApiStatus.Done;
|
|
55
|
+
return mapped;
|
|
56
|
+
} catch (err) {
|
|
57
|
+
error.value = toError(err);
|
|
58
|
+
apiStatus.value = ApiStatus.Failed;
|
|
59
|
+
return Promise.reject();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return { data, execute, apiStatus, isPending, error };
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
isEmpty as a,
|
|
66
|
+
isEqual as i,
|
|
67
|
+
useService as u
|
|
68
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ref, onMounted, onUnmounted } from "vue";
|
|
2
|
+
function useMediaQuery(query) {
|
|
3
|
+
const matches = ref(false);
|
|
4
|
+
let mediaQueryList;
|
|
5
|
+
const handler = (event) => {
|
|
6
|
+
matches.value = event.matches;
|
|
7
|
+
};
|
|
8
|
+
onMounted(() => {
|
|
9
|
+
mediaQueryList = window.matchMedia(query);
|
|
10
|
+
matches.value = mediaQueryList.matches;
|
|
11
|
+
mediaQueryList.addEventListener("change", handler);
|
|
12
|
+
});
|
|
13
|
+
onUnmounted(() => {
|
|
14
|
+
mediaQueryList == null ? void 0 : mediaQueryList.removeEventListener("change", handler);
|
|
15
|
+
});
|
|
16
|
+
return matches;
|
|
17
|
+
}
|
|
18
|
+
const breakpoints = {
|
|
19
|
+
sm: 640,
|
|
20
|
+
md: 768,
|
|
21
|
+
lg: 1024,
|
|
22
|
+
xl: 1280,
|
|
23
|
+
"2xl": 1536
|
|
24
|
+
};
|
|
25
|
+
function useBreakpoints() {
|
|
26
|
+
const smaller = (bp) => useMediaQuery(`(max-width: ${breakpoints[bp] - 1}px)`);
|
|
27
|
+
const smallerOrEqual = (bp) => useMediaQuery(`(max-width: ${breakpoints[bp]}px)`);
|
|
28
|
+
const greaterOrEqual = (bp) => useMediaQuery(`(min-width: ${breakpoints[bp]}px)`);
|
|
29
|
+
return { smaller, smallerOrEqual, greaterOrEqual };
|
|
30
|
+
}
|
|
31
|
+
function useViewport() {
|
|
32
|
+
const breakpoints2 = useBreakpoints();
|
|
33
|
+
const isMobileViewport = breakpoints2.smallerOrEqual("sm");
|
|
34
|
+
return { isMobileViewport };
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
useViewport as u
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue");function t(t){const n=e.ref(!1);let r;const a=e=>{n.value=e.matches};return e.onMounted(()=>{r=window.matchMedia(t),n.value=r.matches,r.addEventListener("change",a)}),e.onUnmounted(()=>{null==r||r.removeEventListener("change",a)}),n}const n={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};exports.useViewport=function(){return{isMobileViewport:{smaller:e=>t(`(max-width: ${n[e]-1}px)`),smallerOrEqual:e=>t(`(max-width: ${n[e]}px)`),greaterOrEqual:e=>t(`(min-width: ${n[e]}px)`)}.smallerOrEqual("sm")}};
|